UNPKG

mermaid

Version:

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

2 lines (1 loc) 1.25 kB
import{b as g,c as y,d,e as u}from"./chunk-5YHUCXBM.mjs";import{a as l,e as p,g as f}from"./chunk-BDKIFH7H.mjs";import{c as m}from"./chunk-Q3CC2MQB.mjs";import{F as s,s as a}from"./chunk-3UWU4A3N.mjs";import{b as i}from"./chunk-MGPAVIPZ.mjs";import{a as t}from"./chunk-VELTKBKT.mjs";var L={common:s,getConfig:a,insertCluster:p,insertEdge:d,insertEdgeLabel:g,insertMarkers:u,insertNode:f,interpolateToCurve:m,labelHelper:l,log:i,positionEdgeLabel:y};var o={},c=t(r=>{for(let e of r)o[e.name]=e},"registerLayoutLoaders"),h=t(()=>{c([{name:"dagre",loader:t(async()=>await import("./dagre-GNUAUHNH.mjs"),"loader")},{name:"cose-bilkent",loader:t(async()=>await import("./cose-bilkent-PNC4W37J.mjs"),"loader")}])},"registerDefaultLayoutLoaders");h();var S=t(async(r,e)=>{if(!(r.layoutAlgorithm in o))throw new Error(`Unknown layout algorithm: ${r.layoutAlgorithm}`);let n=o[r.layoutAlgorithm];return(await n.loader()).render(r,e,L,{algorithm:n.algorithm})},"render"),V=t((r="",{fallback:e="dagre"}={})=>{if(r in o)return r;if(e in o)return i.warn(`Layout algorithm ${r} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${r} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm");export{c as a,S as b,V as c};