import{n as p}from"/vendor/chunk-IXALBLWE.js";import{Z as s,q as g}from"/vendor/chunk-VN7363SK.js";import{b as a}from"/vendor/chunk-6GL7Y2SV.js";var h=a(({flowchart:o})=>{let n=o?.subGraphTitleMargin?.top??0,t=o?.subGraphTitleMargin?.bottom??0,r=n+t;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:t,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function d(o,n){let t=o.getElementsByTagName("img");if(!t||t.length===0)return;let r=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...t].map(e=>new Promise(m=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",r){let u=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[c=g.fontSize]=p(u),l=c*f+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";m(e)}a(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}a(d,"configureLabelImages");export{h as a,d as b};
