const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-0eNWrEyK.js","assets/preload-helper-CEhsl8MR.js","assets/rolldown-runtime-QTnfLwEv.js","assets/compiler-runtime-CLAvuQ-D.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/chunk-I66GZJ75-CJWXi3bs.js","assets/chunk-NSK5VX7P-CoeZ_Lgi.js","assets/dist-D9sYb5Oa.js","assets/chunk-3NCLNEKW-lgePDcrq.js","assets/chunk-4I5QYGJK-CYvb6li-.js","assets/chunk-WRU74C26-C2Rb3ATV.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-UBXNYLIW-F4hmeeiG.js","assets/chunk-W5SLKNZC-Bwmo9x3j.js","assets/chunk-QR6OTTB3-D0IyLhez.js","assets/rough.esm-CSKSodPl.js","assets/chunk-7Z6QIM7H-kaZRbPTV.js","assets/line-DSV8zekT.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-J7OUQ5F2-D19QWtqC.js","assets/chunk-ZIRB5QZD-C6fEPe3t.js"])))=>i.map(i=>d[i]);
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./preload-helper-CEhsl8MR.js";import{n,r,t as i}from"./compiler-runtime-CLAvuQ-D.js";var a=i(),o=e(r(),1),s=n(),c=null;function l(e){return c??=t(()=>import(`./mermaid.core-0eNWrEyK.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),c.then(t=>(t.initialize({startOnLoad:!1,securityLevel:`strict`,htmlLabels:!1,flowchart:{htmlLabels:!1},theme:e===`dark`?`dark`:`default`}),t))}function u(e){let t=/line\s+(\d+)/i.exec(e),n=t?.[1]?Number.parseInt(t[1],10):NaN;return Number.isFinite(n)?n:null}function d(e){let t=(0,a.c)(22),{source:n,theme:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={svg:null,error:null},t[0]=i):i=t[0];let[c,d]=(0,o.useState)(i),f=(0,o.useId)(),p;if(t[1]!==f){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=/[^a-zA-Z0-9]/g,t[3]=e):e=t[3],p=f.replace(e,``),t[1]=f,t[2]=p}else p=t[2];let m=p,h=(0,o.useRef)(null),g,_;if(t[4]!==m||t[5]!==n||t[6]!==r?(g=()=>{let e=!1;return l(r).then(e=>e.render(`mermaid-${m}`,n.trim())).then(t=>{let{svg:n}=t;e||d({svg:n,error:null})}).catch(t=>{if(e)return;let n=t instanceof Error?t.message:`Unable to render this diagram.`;d({svg:null,error:{message:n,line:u(n)}})}),()=>{e=!0}},_=[m,n,r],t[4]=m,t[5]=n,t[6]=r,t[7]=g,t[8]=_):(g=t[7],_=t[8]),(0,o.useEffect)(g,_),c.error){let e=c.error.line===null?``:` at line ${c.error.line}`,r;t[9]!==c.error.message||t[10]!==e?(r=(0,s.jsxs)(`div`,{className:`placeholder`,children:[`Diagram failed to render`,e,`:`,` `,c.error.message]}),t[9]=c.error.message,t[10]=e,t[11]=r):r=t[11];let i;t[12]===n?i=t[13]:(i=n.trim(),t[12]=n,t[13]=i);let a;t[14]===i?a=t[15]:(a=(0,s.jsx)(`pre`,{children:(0,s.jsx)(`code`,{children:i})}),t[14]=i,t[15]=a);let o;return t[16]!==r||t[17]!==a?(o=(0,s.jsxs)(`div`,{className:`diagram`,children:[r,a]}),t[16]=r,t[17]=a,t[18]=o):o=t[18],o}if(c.svg===null){let e;return t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,s.jsx)(`div`,{className:`diagram`,children:(0,s.jsx)(`div`,{className:`placeholder`,children:`Rendering diagram…`})}),t[19]=e):e=t[19],e}let v;return t[20]===c.svg?v=t[21]:(v=(0,s.jsx)(`div`,{ref:h,className:`diagram`,dangerouslySetInnerHTML:{__html:c.svg}}),t[20]=c.svg,t[21]=v),v}export{d as default};
//# sourceMappingURL=Diagram-CP713Hf0.js.map