import{T as e,w as t}from"./src-BkCVz_TJ.mjs";import{s as n,y as r}from"./chunk-ICPOFSXX-C--tVIY5.mjs";import{u as i}from"./chunk-5PVQY5BW-DUXm3tDu.mjs";import{a,i as o,s}from"./chunk-5FUZZQ4R-Bf6nbyQG.mjs";import{a as c,i as l,n as u,r as d}from"./chunk-ENJZ2VHE-CQwjtY5A.mjs";var f={common:n,getConfig:r,insertCluster:o,insertEdge:u,insertEdgeLabel:d,insertMarkers:l,insertNode:a,interpolateToCurve:i,labelHelper:s,log:e,positionEdgeLabel:c},p={},m=t(e=>{for(let t of e)p[t.name]=t},`registerLayoutLoaders`);t(()=>{m([{name:`dagre`,loader:t(async()=>await import(`./dagre-KV5264BT-Ci7CcQr4.mjs`),`loader`)},...[{name:`cose-bilkent`,loader:t(async()=>await import(`./cose-bilkent-S5V4N54A-E5vxHQ63.mjs`),`loader`)}]])},`registerDefaultLayoutLoaders`)();var h=t(async(e,t)=>{if(!(e.layoutAlgorithm in p))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=p[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,f,{algorithm:n.algorithm})},`render`),g=t((t=``,{fallback:n=`dagre`}={})=>{if(t in p)return t;if(n in p)return e.warn(`Layout algorithm ${t} is not registered. Using ${n} as fallback.`),n;throw Error(`Both layout algorithms ${t} and ${n} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{m as n,h as r,g as t};
//# sourceMappingURL=chunk-336JU56O-KTMEs5Wk.mjs.map