import{b as h,c as u,d as y,e as w}from"/vendor/chunk-NISO52RM.js";import{a as m,d as f,g as c}from"/vendor/chunk-O6MUNKCT.js";import{e as g}from"/vendor/chunk-IXALBLWE.js";import{A as l,M as p}from"/vendor/chunk-VN7363SK.js";import{b as e,d as i}from"/vendor/chunk-6GL7Y2SV.js";var I={common:p,getConfig:l,insertCluster:f,insertEdge:y,insertEdgeLabel:h,insertMarkers:w,insertNode:c,interpolateToCurve:g,labelHelper:m,log:i,positionEdgeLabel:u},a={},L=e(t=>{for(let r of t)a[r.name]=r},"registerLayoutLoaders"),E=e(()=>{L([{name:"dagre",loader:e(async()=>await import("/vendor/chunk-CMHJN25Q.js"),"loader")},{name:"cose-bilkent",loader:e(async()=>await import("/vendor/chunk-RSDLAEQH.js"),"loader")}])},"registerDefaultLayoutLoaders");E();var C=e(async(t,r)=>{if(!(t.layoutAlgorithm in a))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(let o of t.nodes){let A=o.domId||o.id;o.domId=`${t.diagramId}-${A}`}let d=a[t.layoutAlgorithm],F=await d.loader(),{theme:n,themeVariables:$}=t.config,{useGradient:D,gradientStart:v,gradientStop:x}=$,s=r.attr("id");if(r.append("defs").append("filter").attr("id",`${s}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),r.append("defs").append("filter").attr("id",`${s}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n?.includes("dark")?"#FFFFFF":"#000000"}`),D){let o=r.append("linearGradient").attr("id",r.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");o.append("svg:stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),o.append("svg:stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}return F.render(t,r,I,{algorithm:d.algorithm})},"render"),R=e((t="",{fallback:r="dagre"}={})=>{if(t in a)return t;if(r in a)return i.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Both layout algorithms ${t} and ${r} are not registered.`)},"getRegisteredLayoutAlgorithm");export{L as a,C as b,R as c};
