package.dist.chunks.mermaid.esm.min.chunk-4SRTBRON.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
import{M as h,b as m,fa as i}from"./chunk-NQURTBEV.mjs";import{a as n}from"./chunk-GTKDMUJJ.mjs";var f=n((t,e)=>{let o;return e==="sandbox"&&(o=i("#i"+t)),(e==="sandbox"?i(o.nodes()[0].contentDocument.body):i("body")).select(`[id="${t}"]`)},"getDiagramElement");var B=n((t,e,o,s)=>{t.attr("class",o);let{width:r,height:a,x:d,y:l}=u(t,e);h(t,a,r,s);let c=b(d,l,r,a,e);t.attr("viewBox",c),m.debug(`viewBox configured: ${c} with padding: ${e}`)},"setupViewPortForSVG"),u=n((t,e)=>{let o=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),b=n((t,e,o,s,r)=>`${t-r} ${e-r} ${o} ${s}`,"createViewBox");export{f as a,B as b};