`+n+""+i+`>
`}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+au(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`${e}
`}checkbox({checked:t}){return" '}paragraph({tokens:t}){return`${this.parser.parseInline(t)}
`}table(t){let e="",r="";for(let i=0;i${n}`),`
`}tablerow({text:t}){return`
${t}
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`${r}>
`}strong({tokens:t}){return`${this.parser.parseInline(t)} `}em({tokens:t}){return`${this.parser.parseInline(t)} `}codespan({text:t}){return`${au(t,!0)}`}br(t){return" "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let n=this.parser.parseInline(r),i=une(t);if(i===null)return n;t=i;let a='"+n+" ",a}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=une(t);if(i===null)return au(r);t=i;let a=` ",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:au(t.text)}},jN=class{static{o(this,"$")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},kh=class $N{static{o(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||f0,this.options.renderer=this.options.renderer||new _k,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jN}static parse(e,r){return new $N(r).parse(e)}static parseInline(e,r){return new $N(r).parseInline(e)}parse(e,r=!0){let n="";for(let i=0;i{let s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let l=i.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new _k(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Ak(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],u=i[s];i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Xx;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],u=i[s];Xx.passThroughHooks.has(a)?i[s]=h=>{if(this.defaults.async&&Xx.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(i,h)).then(d=>u.call(i,d));let f=l.call(i,h);return u.call(i,f)}:i[s]=(...h)=>{let f=l.apply(i,h);return f===!1&&(f=u.apply(i,h)),f}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return wh.lex(t,e??this.defaults)}parser(t,e){return kh.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let s=i.hooks?i.hooks.provideLexer():t?wh.lex:wh.lexInline,l=i.hooks?i.hooks.provideParser():t?kh.parse:kh.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then(u=>s(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let u=s(e,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(t,e){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,t){let n="An error occurred:
"+au(r.message+"",!0)+" ";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},h0=new KBe;o(dn,"d");dn.options=dn.setOptions=function(t){return h0.setOptions(t),dn.defaults=h0.defaults,dne(dn.defaults),dn};dn.getDefaults=zN;dn.defaults=f0;dn.use=function(...t){return h0.use(...t),dn.defaults=h0.defaults,dne(dn.defaults),dn};dn.walkTokens=function(t,e){return h0.walkTokens(t,e)};dn.parseInline=h0.parseInline;dn.Parser=kh;dn.parser=kh.parse;dn.Renderer=_k;dn.TextRenderer=jN;dn.Lexer=wh;dn.lexer=wh.lex;dn.Tokenizer=Ak;dn.Hooks=Xx;dn.parse=dn;PLt=dn.options,BLt=dn.setOptions,FLt=dn.use,$Lt=dn.walkTokens,zLt=dn.parseInline,GLt=kh.parse,VLt=wh.lex});function QBe(t,{markdownAutoWrap:e}){let n=t.replace(/ /g,`
`).replace(/\n{2,}/g,`
`),i=bw(n);return e===!1?i.replace(/ /g," "):i}function Ene(t,e={}){let r=QBe(t,e),n=dn.lexer(r),i=[[]],a=0;function s(l,u="normal"){l.type==="text"?l.text.split(`
`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{s(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return o(s,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{s(u)}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"})}),i}function Cne(t,{markdownAutoWrap:e}={}){let r=dn.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g," ").replace(/ /g," "):i.text.replace(/\n */g," "):i.type==="strong"?`${i.tokens?.map(n).join("")} `:i.type==="em"?`${i.tokens?.map(n).join("")} `:i.type==="paragraph"?`${i.tokens?.map(n).join("")}
`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(X.warn(`Unsupported markdown: ${i.type}`),i.raw)}return o(n,"output"),r.map(n).join("")}var Ane=I(()=>{"use strict";Sne();nD();gt();o(QBe,"preprocessMarkdown");o(Ene,"markdownToLines");o(Cne,"markdownToHTML")});function ZBe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function JBe(t,e){let r=ZBe(e.content);return _ne(t,[],r,e.type)}function _ne(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?_ne(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function Dne(t,e){if(t.some(({content:r})=>r.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return XN(t,e)}function XN(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return XN(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=JBe(e,a);r.push([l]),u.content&&t.unshift(u)}return XN(t,e,r)}var Rne=I(()=>{"use strict";o(ZBe,"splitTextToChars");o(JBe,"splitWordToFitWidth");o(_ne,"splitWordToFitWidthRecursion");o(Dne,"splitLineToFitWidth");o(XN,"splitLineToFitWidthRecursion")});function Lne(t,e){e&&t.attr("style",e)}async function eFe(t,e,r,n,i=!1,a=tr()){let s=t.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);let l=s.append("xhtml:div"),u=Nn(e.label)?await vf(e.label.replace(nt.lineBreakRegex,`
`),a):fr(e.label,a),h=e.isNode?"nodeLabel":"edgeLabel",f=l.append("span");f.html(u),Lne(f,e.labelStyle),f.attr("class",`${h} ${n}`),Lne(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function KN(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function tFe(t,e,r){let n=t.append("text"),i=KN(n,1,e);QN(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function Nne(t,e,r){let n=t.append("text"),i=KN(n,1,e);QN(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function rFe(t,e,r,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=o(p=>tFe(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:Dne(h,f);for(let p of d){let m=KN(l,u,1.1);QN(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return s.attr("x",h.x-f).attr("y",h.y-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node()}else return l.node()}function QN(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}async function ZN(t,e={}){let r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{let l=`${a}:${s}`;return await Gj(l)?await Ks(l,void 0,{class:"label-icon"}):` `})()),i));let n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var Ai,yl=I(()=>{"use strict";kr();wr();gt();Ane();sr();Gc();Rne();ti();o(Lne,"applyStyle");o(eFe,"addHtmlSpan");o(KN,"createTspan");o(tFe,"computeWidthOfText");o(Nne,"computeDimensionOfText");o(rFe,"createFormattedText");o(QN,"updateTextContentAndStyles");o(ZN,"replaceIconSubstring");Ai=o(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(X.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",u),a){let f=Cne(e,h),d=await ZN(ga(f),h),p=e.replace(/\\\\/g,"\\"),m={isNode:s,label:Nn(e)?p:d,labelStyle:r.replace("fill:","color:")};return await eFe(t,m,l,i,u,h)}else{let f=e.replace(/ /g," "),d=Ene(f.replace(" "," "),h),p=rFe(l,t,d,e?u:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");He(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");He(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");He(p).select("text").attr("style",g)}return p}},"createText")});function Wt(t){let e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}function vl(t,e,r,n,i,a){let s=[],u=r-t,h=n-e,f=u/a,d=2*Math.PI/f,p=e+h/2;for(let m=0;m<=50;m++){let g=m/50,y=t+g*u,v=p+i*Math.sin(d*(y-t));s.push({x:y,y:v})}return s}function d0(t,e,r,n,i,a){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;d{"use strict";yl();Qt();kr();Ka();wr();sr();ft=o(async(t,e,r)=>{let n,i=e.useHtmlLabels||Sr(xe()?.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",On(e.labelStyle)),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u=await Ai(s,fr(ga(l),xe()),{useHtmlLabels:i,width:e.width||xe().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),h=u.getBBox(),f=(e?.padding??0)/2;if(i){let d=u.children[0],p=He(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=xe().fontSize?xe().fontSize:window.getComputedStyle(document.body).fontSize,T=5,[E=gr.fontSize]=ru(b),w=E*T+"px";y.style.minWidth=w,y.style.maxWidth=w}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):s.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:s}},"labelHelper"),Lk=o(async(t,e,r)=>{let n=r.useHtmlLabels||Sr(xe()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ai(i,fr(ga(e),xe()),{useHtmlLabels:n,width:r.width||xe()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(Sr(xe()?.flowchart?.htmlLabels)){let u=a.children[0],h=He(a);s=u.getBoundingClientRect(),h.attr("width",s.width),h.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:l,label:i}},"insertLabel"),Ze=o((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),lt=o((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");o(Wt,"createPathFromPoints");o(vl,"generateFullSineWavePoints");o(d0,"generateCirclePoints")});function nFe(t,e){return t.intersect(e)}var Mne,Ine=I(()=>{"use strict";o(nFe,"intersectNode");Mne=nFe});function iFe(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/u);n.x{"use strict";o(iFe,"intersectEllipse");Nk=iFe});function aFe(t,e,r){return Nk(t,e,e,r)}var One,Pne=I(()=>{"use strict";JN();o(aFe,"intersectCircle");One=aFe});function sFe(t,e,r,n){{let i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,l=i*r.x+a*r.y+s,u=i*n.x+a*n.y+s,h=1e-6;if(l!==0&&u!==0&&Bne(l,u))return;let f=n.y-r.y,d=r.x-n.x,p=n.x*r.y-r.x*n.y,m=f*t.x+d*t.y+p,g=f*e.x+d*e.y+p;if(Math.abs(m)0}var Fne,$ne=I(()=>{"use strict";o(sFe,"intersectLine");o(Bne,"sameSign");Fne=sFe});function oFe(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){s=Math.min(s,f.x),l=Math.min(l,f.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let u=n-t.width/2-s,h=i-t.height/2-l;for(let f=0;f1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g{"use strict";$ne();o(oFe,"intersectPolygon");zne=oFe});var lFe,Hf,eM=I(()=>{"use strict";lFe=o((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,l=t.height/2,u,h;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(s=-s),u=s,h=i===0?0:s*a/i),{x:r+u,y:n+h}},"intersectRect"),Hf=lFe});var Ke,Ht=I(()=>{"use strict";Ine();Pne();JN();Gne();eM();Ke={node:Mne,circle:One,ellipse:Nk,polygon:zne,rect:Hf}});var Vne,su,cFe,Zx,Qe,tt,uFe,Vt=I(()=>{"use strict";Qt();Vne=o(t=>{let{handDrawnSeed:e}=xe();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),su=o(t=>{let e=cFe([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),cFe=o(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Zx=o(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),Qe=o(t=>{let{stylesArray:e}=su(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{let l=s[0];Zx(l)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),l.includes("stroke")&&i.push(s.join(":")+" !important"),l==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),tt=o((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=xe(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=su(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:uFe(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),uFe=o(t=>{if(!t)return[0,0];let e=t.trim().split(/\s+/).map(Number);if(e.length===1){let i=isNaN(e[0])?0:e[0];return[i,i]}let r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray")});function tM(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*s-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*s+i}}}function hFe(t,e){return t[0]===e[0]&&t[1]===e[1]}function fFe(t,e,r,n=1){let i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of s)tM(h,l,i);let u=(function(h,f,d){let p=[];for(let b of h){let T=[...b];hFe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&p.push(T)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let T=0;Tb.yminT.ymin?1:b.xT.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax))),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let T=0;Tv);T++)b=T;g.splice(0,b+1).forEach((T=>{y.push({s:v,edge:T})}))}if(y=y.filter((b=>!(b.edge.ymax<=v))),y.sort(((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x))),(d!==1||x%f==0)&&y.length>1)for(let b=0;b=y.length)break;let E=y[b].edge,w=y[T].edge;m.push([[Math.round(E.x),v],[Math.round(w.x),v]])}v+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),x++}return m})(s,a,n);if(i){for(let h of s)tM(h,l,-i);(function(h,f,d){let p=[];h.forEach((m=>p.push(...m))),tM(p,f,d)})(u,l,-i)}return u}function rb(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),fFe(t,i,n,a||1)}function Gk(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function nM(t,e){return t.type===e}function yM(t){let e=[],r=(function(s){let l=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:dFe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:rM,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:qne,text:""},l})(t),n="BOD",i=0,a=r[i];for(;!nM(a,qne);){let s=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return yM("M0,0"+t);i++,s=Mk[a.text],n=a.text}else nM(a,rM)?s=Mk[n]:(i++,s=Mk[a.text],n=a.text);if(!(i+sf%2?h+r:h+e));a.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map(((h,f)=>f%2?h+r:h+e));a.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map(((h,f)=>f%2?h+r:h+e));a.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function Zne(t){let e=[],r="",n=0,i=0,a=0,s=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,s]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(Jne(n,i,v,x,d,p,m,g,y).forEach((function(b){e.push({key:"C",data:b})})),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=h}return e}function Jx(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Jne(t,e,r,n,i,a,s,l,u,h){let f=(d=s,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=Jx(t,e,-f),[r,n]=Jx(r,n,-f);let A=(t-r)/2,_=(e-n)/2,N=A*A/(i*i)+_*_/(a*a);N>1&&(N=Math.sqrt(N),i*=N,a*=N);let M=i*i,P=a*a,B=M*P-M*_*_-P*A*A,F=M*_*_+P*A*A,G=(l===u?-1:1)*Math.sqrt(Math.abs(B/F));y=G*i*_/a+(t+r)/2,v=G*-a*A/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let A=g,_=r,N=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=Jne(r=y+i*Math.cos(g),n=v+a*Math.sin(g),_,N,i,a,s,0,u,[g,A,y,v])}x=g-m;let b=Math.cos(m),T=Math.sin(m),E=Math.cos(g),w=Math.sin(g),k=Math.tan(x/4),C=4/3*i*k,D=4/3*a*k,R=[t,e],O=[t+C*T,e-D*b],L=[r+C*w,n-D*E],S=[r,n];if(O[0]=2*R[0]-O[0],O[1]=2*R[1]-O[1],h)return[O,L,S].concat(p);{p=[O,L,S].concat(p);let A=[];for(let _=0;_2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=Xne(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=Xne(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return s&&(l?x.push(...Yf(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Yf(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function Hne(t,e){let r=Zne(Qne(yM(t))),n=[],i=[0,0],a=[0,0];for(let{key:s,data:l}of r)switch(s){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Yf(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...gFe(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Yf(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function iM(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+dr(i,e),n[0][1]+dr(i,e)]});for(let s=1;s500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*rie(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=dr(m,i,h),g=dr(g,i,h);let y=[],v=o(()=>dr(d,i,h),"M"),x=o(()=>dr(f,i,h),"k"),b=i.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:dr(f,i,h)),e+(b?0:dr(f,i,h))]})),s?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function Ik(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+dr(e,r),t[0][1]+dr(e,r)]),n.push([t[0][0]+dr(e,r),t[0][1]+dr(e,r)]);for(let i=1;i3){let a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(t[e+3])}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=p0(u,h,.5),m=p0(h,f,.5),g=p0(f,d,.5),y=p0(p,m,.5),v=p0(m,g,.5),x=p0(y,v,.5);pM([u,p,y,x],0,r,i),pM([x,v,g,d],0,r,i)}var a,s;return i}function vFe(t,e){return zk(t,0,t.length,e)}function zk(t,e,r,n,i){let a=i||[],s=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;fu&&(u=d,h=f)}return Math.sqrt(u)>n?(zk(t,e,h+1,n,a),zk(t,h,r,n,a)):(a.length||a.push(s),a.push(l)),a}function aM(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?zk(n,0,n.length,r):n}var tb,sM,oM,lM,cM,uM,io,hM,dFe,rM,qne,Mk,pFe,Bo,o1,mM,Ok,gM,Je,Yt=I(()=>{"use strict";o(tM,"t");o(hFe,"e");o(fFe,"s");o(rb,"n");tb=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=rb(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};o(Gk,"a");sM=class extends tb{static{o(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=rb(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)Gk([h,f])&&s.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}},oM=class extends tb{static{o(this,"r")}fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},lM=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=rb(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let s=i/4;for(let l of e){let u=Gk(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=Gk(s),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=s[0],d=s[1];f[0]>d[0]&&(f=s[1],d=s[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m{let s=Gk(a),l=Math.round(s/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d2*Math.PI&&(C=0,D=2*Math.PI);let R=(D-C)/b.curveStepCount,O=[];for(let L=C;L<=D;L+=R)O.push([T+w*Math.cos(L),E+k*Math.sin(L)]);return O.push([T+w*Math.cos(D),E+k*Math.sin(D)]),O.push([T,E]),s1([O],b)})(e,r,n,i,a,s,h));return h.stroke!==Bo&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=Une(e,n);if(n.fill&&n.fill!==Bo)if(n.fillStyle==="solid"){let s=Une(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{let s=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?s.push(...h):h.length===3?s.push(...aM(Kne([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...aM(Kne(h),10,(1+n.roughness)/2))}s.length&&i.push(s1([s],n))}return n.stroke!==Bo&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=Pk(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(iM([e],n)):i.push(s1([e],n))),n.stroke!==Bo&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Bo,s=n.stroke!==Bo,l=!!(n.simplification&&n.simplification<1),u=(function(f,d,p){let m=Zne(Qne(yM(f))),g=[],y=[],v=[0,0],x=[],b=o(()=>{x.length>=4&&y.push(...aM(x,d)),x=[]},"i"),T=o(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:k}of m)switch(w){case"M":T(),v=[k[0],k[1]],y.push(v);break;case"L":b(),y.push([k[0],k[1]]);break;case"C":if(!x.length){let C=y.length?y[y.length-1]:v;x.push([C[0],C[1]])}x.push([k[0],k[1]]),x.push([k[2],k[3]]),x.push([k[4],k[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(T(),!p)return g;let E=[];for(let w of g){let k=vFe(w,p);k.length&&E.push(k)}return E})(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=Hne(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=Hne(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(iM(u,n));else i.push(s1(u,n));return s&&(l?u.forEach((f=>{i.push(Pk(f,!1,n))})):i.push(h)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map((s=>+s.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Bo};break;case"fillPath":s={d:this.opsToPath(a),stroke:Bo,strokeWidth:0,fill:n.fill||Bo};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Bo,strokeWidth:n,fill:Bo}}_mergedShape(e){return e.filter(((r,n)=>n===0||r.op!=="move"))}},mM=class{static{o(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new o1(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let s=typeof n=="number"&&n>=0?a.data.map((l=>+l.toFixed(n))):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h),h}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},Ok="http://www.w3.org/2000/svg",gM=class{static{o(this,"ot")}constructor(e,r){this.svg=e,this.gen=new o1(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(Ok,"g"),s=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(Ok,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(Ok,"path"),u.setAttribute("d",this.opsToPath(l,s)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(Ok,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){let s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){let s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,l=!1,u){let h=this.gen.arc(e,r,n,i,a,s,l,u);return this.draw(h)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},Je={canvas:o((t,e)=>new mM(t,e),"canvas"),svg:o((t,e)=>new gM(t,e),"svg"),generator:o(t=>new o1(t),"generator"),newSeed:o(()=>o1.newSeed(),"newSeed")}});function nie(t,e){let{labelStyles:r}=Qe(e);e.labelStyle=r;let n=lt(e),i=n;n||(i="anchor");let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=1,{cssStyles:l}=e,u=Je.svg(a),h=tt(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);let f=u.circle(0,0,s*2,h),d=a.insert(()=>f,":first-child");return d.attr("class","anchor").attr("style",On(l)),Ze(e,d),e.intersect=function(p){return X.info("Circle intersect",e,s,p),Ke.circle(e,s,p)},a}var iie=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();sr();o(nie,"anchor")});function aie(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let k=[];for(let C=0;C<20;C++){let D=C/19,R=T+D*w,O=x+i*Math.cos(R),L=b+a*Math.sin(R);k.push({x:O,y:L})}return k}async function sie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.width+e.padding+20,l=a.height+e.padding,u=l/2,h=u/(2.5+l/50),{cssStyles:f}=e,d=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...aie(-s/2,-l/2,-s/2,l/2,h,u,!1),{x:s/2,y:l/2},...aie(s/2,l/2,s/2,-l/2,h,u,!0)],p=Je.svg(i),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Wt(d),y=p.path(g,m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${h/2}, 0)`),Ze(e,v),e.intersect=function(x){return Ke.polygon(e,d,x)},i}var oie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(aie,"generateArcPoints");o(sie,"bowTieRect")});function ao(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var jf=I(()=>{"use strict";o(ao,"insertPolygonShape")});async function lie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.height+e.padding,l=12,u=a.width+e.padding+l,h=0,f=u,d=-s,p=0,m=[{x:h+l,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+l},{x:h+l,y:d}],g,{cssStyles:y}=e;if(e.look==="handDrawn"){let v=Je.svg(i),x=tt(e,{}),b=Wt(m),T=v.path(b,x);g=i.insert(()=>T,":first-child").attr("transform",`translate(${-u/2}, ${s/2})`),y&&g.attr("style",y)}else g=ao(i,u,s,m);return n&&g.attr("style",n),Ze(e,g),e.intersect=function(v){return Ke.polygon(e,m,v)},i}var cie=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();Bt();o(lie,"card")});function uie(t,e){let{nodeStyles:r}=Qe(e);e.label="";let n=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=Je.svg(n),u=tt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=Wt(s),f=l.path(h,u),d=n.insert(()=>f,":first-child");return i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(p){return Ke.polygon(e,s,p)},n}var hie=I(()=>{"use strict";Ht();Yt();Vt();Bt();o(uie,"choice")});async function Vk(t,e,r){let{labelStyles:n,nodeStyles:i}=Qe(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:l}=await ft(t,e,lt(e)),u=r?.padding??l,h=s.width/2+u,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Je.svg(a),m=tt(e,{}),g=p.circle(0,0,h*2,m);f=a.insert(()=>g,":first-child"),f.attr("class","basic label-container").attr("style",On(d))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0);return Ze(e,f),e.calcIntersect=function(p,m){let g=p.width/2;return Ke.circle(p,g,m)},e.intersect=function(p){return X.info("Circle intersect",e,h,p),Ke.circle(e,h,p)},a}var vM=I(()=>{"use strict";Yt();gt();sr();Ht();Vt();Bt();o(Vk,"circle")});function xFe(t){let e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},l={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y}
M ${i.x},${i.y} L ${s.x},${s.y}`}function fie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,l=Je.svg(i),u=tt(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),f=xFe(a),d=l.path(f,u),p=i.insert(()=>h,":first-child");return p.insert(()=>d),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Ze(e,p),e.intersect=function(m){return X.info("crossedCircle intersect",e,{radius:a,point:m}),Ke.circle(e,a,m)},i}var die=I(()=>{"use strict";gt();Bt();Vt();Yt();Ht();o(xFe,"createLine");o(fie,"crossedCircle")});function Xf(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dT,":first-child").attr("stroke-opacity",0),E.insert(()=>x,":first-child"),E.attr("class","text"),f&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${h}, 0)`),s.attr("transform",`translate(${-l/2+h-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ze(e,E),e.intersect=function(w){return Ke.polygon(e,p,w)},i}var mie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Xf,"generateCirclePoints");o(pie,"curlyBraceLeft")});function Kf(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dT,":first-child").attr("stroke-opacity",0),E.insert(()=>x,":first-child"),E.attr("class","text"),f&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${-h}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ze(e,E),e.intersect=function(w){return Ke.polygon(e,p,w)},i}var yie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Kf,"generateCirclePoints");o(gie,"curlyBraceRight")});function ts(t,e,r,n=100,i=0,a=180){let s=[],l=i*Math.PI/180,f=(a*Math.PI/180-l)/(n-1);for(let d=0;dC,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>w,":first-child"),D.attr("class","text"),f&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${h-h/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ze(e,D),e.intersect=function(R){return Ke.polygon(e,m,R)},i}var xie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(ts,"generateCirclePoints");o(vie,"curlyBraces")});async function bie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=80,l=20,u=Math.max(s,(a.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(l,a.height+(e.padding??0)*2,e?.height??0),f=h/2,{cssStyles:d}=e,p=Je.svg(i),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=u,y=h,v=g-f,x=y/4,b=[{x:v,y:0},{x,y:0},{x:0,y:y/2},{x,y},{x:v,y},...d0(-v,-y/2,f,50,270,90)],T=Wt(b),E=p.path(T,m),w=i.insert(()=>E,":first-child");return w.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),w.attr("transform",`translate(${-u/2}, ${-h/2})`),Ze(e,w),e.intersect=function(k){return Ke.polygon(e,b,k)},i}var Tie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(bie,"curvedTrapezoid")});async function wie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+e.padding,e.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+e.padding,e.height??0),d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Je.svg(i),g=TFe(0,0,l,f,u,h),y=wFe(0,h,l,f,u,h),v=m.path(g,tt(e,{})),x=m.path(y,tt(e,{fill:"none"}));d=i.insert(()=>x,":first-child"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{let m=bFe(0,0,l,f,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",On(p)).attr("style",n)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ze(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(m){let g=Ke.rect(e,m),y=g.x-(e.x??0);if(u!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-h)){let v=h*h*(1-y*y/(u*u));v>0&&(v=Math.sqrt(v)),v=h-v,m.y-(e.y??0)>0&&(v=-v),g.y+=v}return g},i}var bFe,TFe,wFe,kie=I(()=>{"use strict";Bt();Ht();Vt();Yt();sr();bFe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),TFe=o((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),wFe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(wie,"cylinder")});async function Sie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=a.width+e.padding,u=a.height+e.padding,h=u*.2,f=-l/2,d=-u/2-h/2,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${f+(e.padding??0)/2-(a.x-(a.left??0))}, ${d+h+(e.padding??0)/2-(a.y-(a.top??0))})`),Ze(e,x),e.intersect=function(b){return Ke.rect(e,b)},i}var Eie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Sie,"dividedRectangle")});async function Cie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s}=await ft(t,e,lt(e)),u=a.width/2+s+5,h=a.width/2+s,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Je.svg(i),m=tt(e,{roughness:.2,strokeWidth:2.5}),g=tt(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",On(e.cssClasses)).attr("style",On(d)),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return Ze(e,f),e.intersect=function(p){return X.info("DoubleCircle intersect",e,u,p),Ke.circle(e,u,p)},i}var Aie=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();sr();o(Cie,"doublecircle")});function _ie(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Qe(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),s=7,{cssStyles:l}=e,u=Je.svg(a),{nodeBorder:h}=r,f=tt(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(f.roughness=0);let d=u.circle(0,0,s*2,f),p=a.insert(()=>d,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Ze(e,p),e.intersect=function(m){return X.info("filledCircle intersect",e,{radius:s,point:m}),Ke.circle(e,s,m)},a}var Die=I(()=>{"use strict";Yt();gt();Ht();Vt();Bt();o(_ie,"filledCircle")});async function Rie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=a.width+(e.padding??0),u=l+a.height,h=l+a.height,f=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:d}=e,p=Je.svg(i),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=Wt(f),y=p.path(g,m),v=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`);return d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),e.width=l,e.height=u,Ze(e,v),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-u/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(x){return X.info("Triangle intersect",e,f,x),Ke.polygon(e,f,x)},i}var Lie=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();Bt();o(Rie,"flippedTriangle")});function Nie(t,e,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=Qe(e);e.label="";let s=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),{cssStyles:l}=e,u=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);r==="LR"&&(u=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));let f=-1*u/2,d=-1*h/2,p=Je.svg(s),m=tt(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(f,d,u,h,m),y=s.insert(()=>g,":first-child");l&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ze(e,y);let v=n?.padding??0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(x){return Ke.rect(e,x)},s}var Mie=I(()=>{"use strict";Yt();Ht();Vt();Bt();o(Nie,"forkJoin")});async function Iie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let i=80,a=50,{shapeSvg:s,bbox:l}=await ft(t,e,lt(e)),u=Math.max(i,l.width+(e.padding??0)*2,e?.width??0),h=Math.max(a,l.height+(e.padding??0)*2,e?.height??0),f=h/2,{cssStyles:d}=e,p=Je.svg(s),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-u/2,y:-h/2},{x:u/2-f,y:-h/2},...d0(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],y=Wt(g),v=p.path(y,m),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Ze(e,x),e.intersect=function(b){return X.info("Pill intersect",e,{radius:f,point:b}),Ke.polygon(e,g,b)},s}var Oie=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();o(Iie,"halfRoundedRectangle")});async function Pie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.height+(e.padding??0),l=a.width+(e.padding??0)*2.5,{cssStyles:u}=e,h=Je.svg(i),f=tt(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let d=l/2,p=d/6;d=d+p;let m=s/2,g=m/2,y=d-g,v=[{x:-y,y:-m},{x:0,y:-m},{x:y,y:-m},{x:d,y:0},{x:y,y:m},{x:0,y:m},{x:-y,y:m},{x:-d,y:0}],x=Wt(v),b=h.path(x,f),T=i.insert(()=>b,":first-child");return T.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),e.width=l,e.height=s,Ze(e,T),e.intersect=function(E){return Ke.polygon(e,v,E)},i}var Bie=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Pie,"hexagon")});async function Fie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.label="",e.labelStyle=r;let{shapeSvg:i}=await ft(t,e,lt(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:l}=e,u=Je.svg(i),h=tt(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let f=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],d=Wt(f),p=u.path(d,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-a/2}, ${-s/2})`),Ze(e,m),e.intersect=function(g){return X.info("Pill intersect",e,{points:f}),Ke.polygon(e,f,g)},i}var $ie=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();o(Fie,"hourglass")});async function zie(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Qe(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await ft(t,e,"icon-shape default"),p=e.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:v}=su(e),x=-g/2,b=-m/2,T=e.label?8:0,E=Je.svg(h),w=tt(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let k=E.rectangle(x,b,g,m,w),C=Math.max(g,f.width),D=m+f.height+T,R=E.rectangle(-C/2,-D/2,C,D,{...w,fill:"transparent",stroke:"none"}),O=h.insert(()=>k,":first-child"),L=h.insert(()=>R);if(e.icon){let S=h.append("g");S.html(`${await Ks(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let A=S.node().getBBox(),_=A.width,N=A.height,M=A.x,P=A.y;S.attr("transform",`translate(${-_/2-M},${p?f.height/2+T/2-N/2-P:-f.height/2-T/2-N/2-P})`),S.attr("style",`color: ${v.get("stroke")??y};`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-D/2:D/2-f.height})`),O.attr("transform",`translate(0,${p?f.height/2+T/2:-f.height/2-T/2})`),Ze(e,L),e.intersect=function(S){if(X.info("iconSquare intersect",e,S),!e.label)return Ke.rect(e,S);let A=e.x??0,_=e.y??0,N=e.height??0,M=[];return p?M=[{x:A-f.width/2,y:_-N/2},{x:A+f.width/2,y:_-N/2},{x:A+f.width/2,y:_-N/2+f.height+T},{x:A+g/2,y:_-N/2+f.height+T},{x:A+g/2,y:_+N/2},{x:A-g/2,y:_+N/2},{x:A-g/2,y:_-N/2+f.height+T},{x:A-f.width/2,y:_-N/2+f.height+T}]:M=[{x:A-g/2,y:_-N/2},{x:A+g/2,y:_-N/2},{x:A+g/2,y:_-N/2+m},{x:A+f.width/2,y:_-N/2+m},{x:A+f.width/2/2,y:_+N/2},{x:A-f.width/2,y:_+N/2},{x:A-f.width/2,y:_-N/2+m},{x:A-g/2,y:_-N/2+m}],Ke.polygon(e,M,S)},h}var Gie=I(()=>{"use strict";Yt();gt();Gc();Ht();Vt();Bt();o(zie,"icon")});async function Vie(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Qe(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,label:d}=await ft(t,e,"icon-shape default"),p=20,m=e.label?8:0,g=e.pos==="t",{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=su(e),b=Je.svg(h),T=tt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let E=x.get("fill");T.stroke=E??v;let w=h.append("g");e.icon&&w.html(`${await Ks(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let k=w.node().getBBox(),C=k.width,D=k.height,R=k.x,O=k.y,L=Math.max(C,D)*Math.SQRT2+p*2,S=b.circle(0,0,L,T),A=Math.max(L,f.width),_=L+f.height+m,N=b.rectangle(-A/2,-_/2,A,_,{...T,fill:"transparent",stroke:"none"}),M=h.insert(()=>S,":first-child"),P=h.insert(()=>N);return w.attr("transform",`translate(${-C/2-R},${g?f.height/2+m/2-D/2-O:-f.height/2-m/2-D/2-O})`),w.attr("style",`color: ${x.get("stroke")??y};`),d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-_/2:_/2-f.height})`),M.attr("transform",`translate(0,${g?f.height/2+m/2:-f.height/2-m/2})`),Ze(e,P),e.intersect=function(B){return X.info("iconSquare intersect",e,B),Ke.rect(e,B)},h}var qie=I(()=>{"use strict";Yt();gt();Gc();Ht();Vt();Bt();o(Vie,"iconCircle")});var so,m0=I(()=>{"use strict";so=o((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});async function Uie(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Qe(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await ft(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=su(e),T=-y/2,E=-g/2,w=e.label?8:0,k=Je.svg(h),C=tt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let D=b.get("fill");C.stroke=D??x;let R=k.path(so(T,E,y,g,5),C),O=Math.max(y,f.width),L=g+f.height+w,S=k.rectangle(-O/2,-L/2,O,L,{...C,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child").attr("class","icon-shape2"),_=h.insert(()=>S);if(e.icon){let N=h.append("g");N.html(`${await Ks(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=N.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;N.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),N.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-L/2:L/2-f.height})`),A.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Ze(e,_),e.intersect=function(N){if(X.info("iconSquare intersect",e,N),!e.label)return Ke.rect(e,N);let M=e.x??0,P=e.y??0,B=e.height??0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Ke.polygon(e,F,N)},h}var Wie=I(()=>{"use strict";Yt();gt();Gc();Ht();Vt();m0();Bt();o(Uie,"iconRounded")});async function Hie(t,e,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=Qe(e);e.labelStyle=i;let a=e.assetHeight??48,s=e.assetWidth??48,l=Math.max(a,s),u=n?.wrappingWidth;e.width=Math.max(l,u??0);let{shapeSvg:h,bbox:f,halfPadding:d,label:p}=await ft(t,e,"icon-shape default"),m=e.pos==="t",g=l+d*2,y=l+d*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=su(e),T=-y/2,E=-g/2,w=e.label?8:0,k=Je.svg(h),C=tt(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let D=b.get("fill");C.stroke=D??x;let R=k.path(so(T,E,y,g,.1),C),O=Math.max(y,f.width),L=g+f.height+w,S=k.rectangle(-O/2,-L/2,O,L,{...C,fill:"transparent",stroke:"none"}),A=h.insert(()=>R,":first-child"),_=h.insert(()=>S);if(e.icon){let N=h.append("g");N.html(`${await Ks(e.icon,{height:l,width:l,fallbackPrefix:""})} `);let M=N.node().getBBox(),P=M.width,B=M.height,F=M.x,G=M.y;N.attr("transform",`translate(${-P/2-F},${m?f.height/2+w/2-B/2-G:-f.height/2-w/2-B/2-G})`),N.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-L/2:L/2-f.height})`),A.attr("transform",`translate(0,${m?f.height/2+w/2:-f.height/2-w/2})`),Ze(e,_),e.intersect=function(N){if(X.info("iconSquare intersect",e,N),!e.label)return Ke.rect(e,N);let M=e.x??0,P=e.y??0,B=e.height??0,F=[];return m?F=[{x:M-f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2},{x:M+f.width/2,y:P-B/2+f.height+w},{x:M+y/2,y:P-B/2+f.height+w},{x:M+y/2,y:P+B/2},{x:M-y/2,y:P+B/2},{x:M-y/2,y:P-B/2+f.height+w},{x:M-f.width/2,y:P-B/2+f.height+w}]:F=[{x:M-y/2,y:P-B/2},{x:M+y/2,y:P-B/2},{x:M+y/2,y:P-B/2+g},{x:M+f.width/2,y:P-B/2+g},{x:M+f.width/2/2,y:P+B/2},{x:M-f.width/2,y:P+B/2},{x:M-f.width/2,y:P-B/2+g},{x:M-y/2,y:P-B/2+g}],Ke.polygon(e,F,N)},h}var Yie=I(()=>{"use strict";Yt();gt();Gc();Ht();m0();Vt();Bt();o(Hie,"iconSquare")});async function jie(t,e,{config:{flowchart:r}}){let n=new Image;n.src=e?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;let{labelStyles:s}=Qe(e);e.labelStyle=s;let l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let u=Math.max(e.label?l??0:0,e?.assetWidth??i),h=e.constraint==="on"&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f=e.constraint==="on"?h/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(h,l??0);let{shapeSvg:d,bbox:p,label:m}=await ft(t,e,"image-shape default"),g=e.pos==="t",y=-h/2,v=-f/2,x=e.label?8:0,b=Je.svg(d),T=tt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let E=b.rectangle(y,v,h,f,T),w=Math.max(h,p.width),k=f+p.height+x,C=b.rectangle(-w/2,-k/2,w,k,{...T,fill:"none",stroke:"none"}),D=d.insert(()=>E,":first-child"),R=d.insert(()=>C);if(e.img){let O=d.append("image");O.attr("href",e.img),O.attr("width",h),O.attr("height",f),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-h/2},${g?k/2-f:-k/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-f/2-p.height/2-x/2:f/2-p.height/2+x/2})`),D.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),Ze(e,R),e.intersect=function(O){if(X.info("iconSquare intersect",e,O),!e.label)return Ke.rect(e,O);let L=e.x??0,S=e.y??0,A=e.height??0,_=[];return g?_=[{x:L-p.width/2,y:S-A/2},{x:L+p.width/2,y:S-A/2},{x:L+p.width/2,y:S-A/2+p.height+x},{x:L+h/2,y:S-A/2+p.height+x},{x:L+h/2,y:S+A/2},{x:L-h/2,y:S+A/2},{x:L-h/2,y:S-A/2+p.height+x},{x:L-p.width/2,y:S-A/2+p.height+x}]:_=[{x:L-h/2,y:S-A/2},{x:L+h/2,y:S-A/2},{x:L+h/2,y:S-A/2+f},{x:L+p.width/2,y:S-A/2+f},{x:L+p.width/2/2,y:S+A/2},{x:L-p.width/2,y:S+A/2},{x:L-p.width/2,y:S-A/2+f},{x:L-h/2,y:S-A/2+f}],Ke.polygon(e,_,O)},d}var Xie=I(()=>{"use strict";Yt();gt();Ht();Vt();Bt();o(jie,"imageSquare")});async function Kie(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Je.svg(i),p=tt(e,{}),m=Wt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=ao(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ze(e,h),e.intersect=function(d){return Ke.polygon(e,u,d)},i}var Qie=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();o(Kie,"inv_trapezoid")});async function g0(t,e,r){let{labelStyles:n,nodeStyles:i}=Qe(e);e.labelStyle=n;let{shapeSvg:a,bbox:s}=await ft(t,e,lt(e)),l=Math.max(s.width+r.labelPaddingX*2,e?.width||0),u=Math.max(s.height+r.labelPaddingY*2,e?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=Je.svg(a),v=tt(e,{}),x=p||m?y.path(so(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",On(g))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",On(p)).attr("ry",On(m)).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return Ze(e,d),e.calcIntersect=function(y,v){return Ke.rect(y,v)},e.intersect=function(y){return Ke.rect(e,y)},a}var nb=I(()=>{"use strict";Bt();Ht();m0();Vt();Yt();sr();o(g0,"drawRect")});async function Zie(t,e){let{shapeSvg:r,bbox:n,label:i}=await ft(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ze(e,a),e.intersect=function(u){return Ke.rect(e,u)},r}var Jie=I(()=>{"use strict";nb();Bt();Ht();o(Zie,"labelRect")});async function eae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-(3*l)/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Je.svg(i),p=tt(e,{}),m=Wt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=ao(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ze(e,h),e.intersect=function(d){return Ke.polygon(e,u,d)},i}var tae=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();o(eae,"lean_left")});async function rae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),u=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Je.svg(i),p=tt(e,{}),m=Wt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=ao(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ze(e,h),e.intersect=function(d){return Ke.polygon(e,u,d)},i}var nae=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();o(rae,"lean_right")});function iae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",lt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),u=7,h=[{x:s,y:0},{x:0,y:l+u/2},{x:s-2*u,y:l+u/2},{x:0,y:2*l},{x:s,y:l-u/2},{x:2*u,y:l-u/2}],f=Je.svg(i),d=tt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=Wt(h),m=f.path(p,d),g=i.insert(()=>m,":first-child");return a&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${s/2},${-l})`),Ze(e,g),e.intersect=function(y){return X.info("lightningBolt intersect",e,y),Ke.polygon(e,h,y)},i}var aae=I(()=>{"use strict";gt();Bt();Vt();Yt();Ht();Bt();o(iae,"lightningBolt")});async function sae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0),e.width??0),u=l/2,h=u/(2.5+l/50),f=Math.max(a.height+h+(e.padding??0),e.height??0),d=f*.1,p,{cssStyles:m}=e;if(e.look==="handDrawn"){let g=Je.svg(i),y=SFe(0,0,l,f,u,h,d),v=EFe(0,h,l,f,u,h),x=tt(e,{}),b=g.path(y,x),T=g.path(v,x);i.insert(()=>T,":first-child").attr("class","line"),p=i.insert(()=>b,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{let g=kFe(0,0,l,f,u,h,d);p=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",On(m)).attr("style",n)}return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(f/2+h)})`),Ze(e,p),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),e.intersect=function(g){let y=Ke.rect(e,g),v=y.x-(e.x??0);if(u!=0&&(Math.abs(v)<(e.width??0)/2||Math.abs(v)==(e.width??0)/2&&Math.abs(y.y-(e.y??0))>(e.height??0)/2-h)){let x=h*h*(1-v*v/(u*u));x>0&&(x=Math.sqrt(x)),x=h-x,g.y-(e.y??0)>0&&(x=-x),y.y+=x}return y},i}var kFe,SFe,EFe,oae=I(()=>{"use strict";Bt();Ht();Vt();Yt();sr();kFe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),SFe=o((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),EFe=o((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");o(sae,"linedCylinder")});async function lae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=u+h,{cssStyles:d}=e,p=Je.svg(i),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:-l/2-l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:f/2},...vl(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,h,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2},{x:-l/2,y:-f/2},{x:-l/2,y:f/2*1.1},{x:-l/2,y:-f/2}],y=p.polygon(g.map(x=>[x.x,x.y]),m),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Ze(e,v),e.intersect=function(x){return Ke.polygon(e,g,x)},i}var cae=I(()=>{"use strict";Bt();Ht();Yt();Vt();o(lae,"linedWaveEdgedRect")});async function uae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{}),y=[{x:f-h,y:d+h},{x:f-h,y:d+u+h},{x:f+l-h,y:d+u+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d+u-h},{x:f+l+h,y:d+u-h},{x:f+l+h,y:d-h},{x:f+h,y:d-h},{x:f+h,y:d},{x:f,y:d},{x:f,y:d+h}],v=[{x:f,y:d+h},{x:f+l-h,y:d+h},{x:f+l-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d},{x:f,y:d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Wt(y),b=m.path(x,g),T=Wt(v),E=m.path(T,{...g,fill:"none"}),w=i.insert(()=>E,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-(a.left??0))}, ${-(a.height/2)+h-(a.y-(a.top??0))})`),Ze(e,w),e.intersect=function(k){return Ke.polygon(e,y,k)},i}var hae=I(()=>{"use strict";Bt();Vt();Yt();Ht();o(uae,"multiRect")});async function fae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=u+h,d=-l/2,p=-f/2,m=5,{cssStyles:g}=e,y=vl(d-m,p+f+m,d+l-m,p+f+m,h,.8),v=y?.[y.length-1],x=[{x:d-m,y:p+m},{x:d-m,y:p+f+m},...y,{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:v.y-2*m},{x:d+l+m,y:v.y-2*m},{x:d+l+m,y:p-m},{x:d+m,y:p-m},{x:d+m,y:p},{x:d,y:p},{x:d,y:p+m}],b=[{x:d,y:p+m},{x:d+l-m,y:p+m},{x:d+l-m,y:v.y-m},{x:d+l,y:v.y-m},{x:d+l,y:p},{x:d,y:p}],T=Je.svg(i),E=tt(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let w=Wt(x),k=T.path(w,E),C=Wt(b),D=T.path(C,E),R=i.insert(()=>k,":first-child");return R.insert(()=>D),R.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&R.selectAll("path").attr("style",n),R.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-(a.width/2)-m-(a.x-(a.left??0))}, ${-(a.height/2)+m-h/2-(a.y-(a.top??0))})`),Ze(e,R),e.intersect=function(O){return Ke.polygon(e,x,O)},i}var dae=I(()=>{"use strict";Bt();Ht();Yt();Vt();o(fae,"multiWaveEdgedRectangle")});async function pae(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Qe(e);e.labelStyle=n,e.useHtmlLabels||tr().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:l,label:u}=await ft(t,e,lt(e)),h=Math.max(l.width+(e.padding??0)*2,e?.width??0),f=Math.max(l.height+(e.padding??0)*2,e?.height??0),d=-h/2,p=-f/2,{cssStyles:m}=e,g=Je.svg(s),y=tt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=g.rectangle(d,p,h,f,y),x=s.insert(()=>v,":first-child");return x.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ze(e,x),e.intersect=function(b){return Ke.rect(e,b)},s}var mae=I(()=>{"use strict";Yt();Ht();Vt();Bt();ti();o(pae,"note")});async function gae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.width+e.padding,l=a.height+e.padding,u=s+l,h=.5,f=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Je.svg(i),g=tt(e,{}),y=CFe(0,0,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&d.attr("style",p)}else d=ao(i,u,u,f),d.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&d.attr("style",n),Ze(e,d),e.calcIntersect=function(m,g){let y=m.width,v=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=Ke.polygon(m,v,g);return{x:x.x-.5,y:x.y-.5}},e.intersect=function(m){return this.calcIntersect(e,m)},i}var CFe,yae=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();CFe=o((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");o(gae,"question")});async function vae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0),e?.width??0),u=Math.max(a.height+(e.padding??0),e?.height??0),h=-l/2,f=-u/2,d=f/2,p=[{x:h+d,y:f},{x:h,y:0},{x:h+d,y:-f},{x:-h,y:-f},{x:-h,y:f}],{cssStyles:m}=e,g=Je.svg(i),y=tt(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=Wt(p),x=g.path(v,y),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Ze(e,b),e.intersect=function(T){return Ke.polygon(e,p,T)},i}var xae=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(vae,"rect_left_inv_arrow")});function AFe(t,e){e&&t.attr("style",e)}async function _Fe(t){let e=He(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=xe(),i=t.label;t.label&&Nn(t.label)&&(i=await vf(t.label.replace(nt.lineBreakRegex,`
`),n));let s='"+i+" ";return r.html(fr(s,n)),AFe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var DFe,ou,qk=I(()=>{"use strict";kr();Qt();wr();gt();sr();o(AFe,"applyStyle");o(_Fe,"addHtmlLabel");DFe=o(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Sr(xe().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g," "),X.info("vertexText"+i);let a={isNode:n,label:ga(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>` `),labelStyle:e&&e.replace("fill:","color:")};return await _Fe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n| /gi):Array.isArray(i)?s=i:s=[];for(let l of s){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),ou=DFe});async function bae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await ou(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(Sr(xe()?.flowchart?.htmlLabels)){let D=f.children[0],R=He(f);d=D.getBoundingClientRect(),R.attr("width",d.width),R.attr("height",d.height)}X.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await ou(p.join?p.join(" "):p,e.labelStyle,!0,!0)),y=g.children[0],v=He(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;He(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),He(f).attr("transform","translate( "+(d.width(X.debug("Rough node insert CXC",O),L),":first-child"),k=a.insert(()=>(X.debug("Rough node insert CXC",O),O),":first-child")}else k=s.insert("rect",":first-child"),C=s.insert("line"),k.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),C.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return Ze(e,k),e.intersect=function(D){return Ke.rect(e,D)},a}var Tae=I(()=>{"use strict";kr();wr();Bt();qk();Ht();Vt();Yt();Qt();m0();gt();o(bae,"rectWithTitle")});function Uk(t,e,r,n,i,a,s){let u=(t+r)/2,h=(e+n)/2,f=Math.atan2(n-e,r-t),d=(r-t)/2,p=(n-e)/2,m=d/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(f)*(s?-1:1),b=h-v*i*Math.cos(f)*(s?-1:1),T=Math.atan2((e-b)/a,(t-x)/i),w=Math.atan2((n-b)/a,(r-x)/i)-T;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);let k=[];for(let C=0;C<20;C++){let D=C/19,R=T+D*w,O=x+i*Math.cos(R),L=b+a*Math.sin(R);k.push({x:O,y:L})}return k}async function wae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=e?.padding??0,l=e?.padding??0,u=(e?.width?e?.width:a.width)+s*2,h=(e?.height?e?.height:a.height)+l*2,f=e.radius||5,d=e.taper||5,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{});e.stroke&&(g.stroke=e.stroke),e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-u/2+d,y:-h/2},{x:u/2-d,y:-h/2},...Uk(u/2-d,-h/2,u/2,-h/2+d,f,f,!0),{x:u/2,y:-h/2+d},{x:u/2,y:h/2-d},...Uk(u/2,h/2-d,u/2-d,h/2,f,f,!0),{x:u/2-d,y:h/2},{x:-u/2+d,y:h/2},...Uk(-u/2+d,h/2,-u/2,h/2-d,f,f,!0),{x:-u/2,y:h/2-d},{x:-u/2,y:-h/2+d},...Uk(-u/2,-h/2+d,-u/2+d,-h/2,f,f,!0)],v=Wt(y),x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Ze(e,b),e.intersect=function(T){return Ke.polygon(e,y,T)},i}var kae=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Uk,"generateArcPoints");o(wae,"roundedRect")});async function Sae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=e?.padding??0,u=Math.max(a.width+(e.padding??0)*2,e?.width??0),h=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=-a.width/2-l,d=-a.height/2-l,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:f,y:d},{x:f+u+8,y:d},{x:f+u+8,y:d+h},{x:f-8,y:d+h},{x:f-8,y:d},{x:f,y:d},{x:f,y:d+h}],v=m.polygon(y.map(b=>[b.x,b.y]),g),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container").attr("style",On(p)),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),p&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),s.attr("transform",`translate(${-u/2+4+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-(a.y-(a.top??0))})`),Ze(e,x),e.intersect=function(b){return Ke.rect(e,b)},i}var Eae=I(()=>{"use strict";Bt();Ht();Vt();Yt();sr();o(Sae,"shadedProcess")});async function Cae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=-l/2,f=-u/2,{cssStyles:d}=e,p=Je.svg(i),m=tt(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=[{x:h,y:f},{x:h,y:f+u},{x:h+l,y:f+u},{x:h+l,y:f-u/2}],y=Wt(g),v=p.path(y,m),x=i.insert(()=>v,":first-child");return x.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),x.attr("transform",`translate(0, ${u/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))}, ${-u/4+(e.padding??0)-(a.y-(a.top??0))})`),Ze(e,x),e.intersect=function(b){return Ke.polygon(e,g,b)},i}var Aae=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Cae,"slopedRect")});async function _ae(t,e){let r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return g0(t,e,r)}var Dae=I(()=>{"use strict";nb();o(_ae,"squareRect")});async function Rae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.height+e.padding,l=a.width+s/4+e.padding,u=s/2,{cssStyles:h}=e,f=Je.svg(i),d=tt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-l/2+u,y:-s/2},{x:l/2-u,y:-s/2},...d0(-l/2+u,0,u,50,90,270),{x:l/2-u,y:s/2},...d0(l/2-u,0,u,50,270,450)],m=Wt(p),g=f.path(m,d),y=i.insert(()=>g,":first-child");return y.attr("class","basic label-container outer-path"),h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Ze(e,y),e.intersect=function(v){return Ke.polygon(e,p,v)},i}var Lae=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Rae,"stadium")});async function Nae(t,e){return g0(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var Mae=I(()=>{"use strict";nb();o(Nae,"state")});function Iae(t,e,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=Qe(e);e.labelStyle=n;let{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:u}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),f=Je.svg(h),d=tt(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let p=f.circle(0,0,14,{...d,stroke:s,strokeWidth:2}),m=l??u,g=f.circle(0,0,5,{...d,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>p,":first-child");return y.insert(()=>g),a&&y.selectAll("path").attr("style",a),i&&y.selectAll("path").attr("style",i),Ze(e,y),e.intersect=function(v){return Ke.circle(e,7,v)},h}var Oae=I(()=>{"use strict";Yt();Ht();Vt();Bt();o(Iae,"stateEnd")});function Pae(t,e,{config:{themeVariables:r}}){let{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=Je.svg(i).circle(0,0,14,Vne(n));a=i.insert(()=>l),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ze(e,a),e.intersect=function(s){return Ke.circle(e,7,s)},i}var Bae=I(()=>{"use strict";Yt();Ht();Vt();Bt();o(Pae,"stateStart")});async function Fae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-s,f=-a.height/2-s,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Je.svg(i),m=tt(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",On(b)),Ze(e,x)}else{let p=ao(i,l,u,d);n&&p.attr("style",n),Ze(e,p)}return e.intersect=function(p){return Ke.polygon(e,d,p)},i}var $ae=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();sr();o(Fae,"subroutine")});async function zae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=Math.max(a.width+(e.padding??0)*2,e?.width??0),l=Math.max(a.height+(e.padding??0)*2,e?.height??0),u=-s/2,h=-l/2,f=.2*l,d=.2*l,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{}),y=[{x:u-f/2,y:h},{x:u+s+f/2,y:h},{x:u+s+f/2,y:h+l},{x:u-f/2,y:h+l}],v=[{x:u+s-f/2,y:h+l},{x:u+s+f/2,y:h+l},{x:u+s+f/2,y:h+l-d}];e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=Wt(y),b=m.path(x,g),T=Wt(v),E=m.path(T,{...g,fillStyle:"solid"}),w=i.insert(()=>E,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Ze(e,w),e.intersect=function(k){return Ke.polygon(e,y,k)},i}var Gae=I(()=>{"use strict";Bt();Vt();Yt();Ht();o(zae,"taggedRect")});async function Vae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/4,f=.2*l,d=.2*u,p=u+h,{cssStyles:m}=e,g=Je.svg(i),y=tt(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-l/2-l/2*.1,y:p/2},...vl(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],x=-l/2+l/2*.1,b=-p/2-d*.4,T=[{x:x+l-f,y:(b+u)*1.4},{x:x+l,y:b+u-d},{x:x+l,y:(b+u)*.9},...vl(x+l,(b+u)*1.3,x+l-f,(b+u)*1.5,-u*.03,.5)],E=Wt(v),w=g.path(E,y),k=Wt(T),C=g.path(k,{...y,fillStyle:"solid"}),D=i.insert(()=>C,":first-child");return D.insert(()=>w,":first-child"),D.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h/2-(a.y-(a.top??0))})`),Ze(e,D),e.intersect=function(R){return Ke.polygon(e,v,R)},i}var qae=I(()=>{"use strict";Bt();Ht();Yt();Vt();o(Vae,"taggedWaveEdgedRectangle")});async function Uae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=Math.max(a.width+e.padding,e?.width||0),l=Math.max(a.height+e.padding,e?.height||0),u=-s/2,h=-l/2,f=i.insert("rect",":first-child");return f.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",s).attr("height",l),Ze(e,f),e.intersect=function(d){return Ke.rect(e,d)},i}var Wae=I(()=>{"use strict";Bt();Ht();Vt();o(Uae,"text")});async function Hae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s,halfPadding:l}=await ft(t,e,lt(e)),u=e.look==="neo"?l*2:l,h=a.height+u,f=h/2,d=f/(2.5+h/50),p=a.width+d+u,{cssStyles:m}=e,g;if(e.look==="handDrawn"){let y=Je.svg(i),v=LFe(0,0,p,h,d,f),x=NFe(0,0,p,h,d,f),b=y.path(v,tt(e,{})),T=y.path(x,tt(e,{fill:"none"}));g=i.insert(()=>T,":first-child"),g=i.insert(()=>b,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=RFe(0,0,p,h,d,f);g=i.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",On(m)).attr("style",n),g.attr("class","basic label-container"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",d),g.attr("transform",`translate(${-p/2}, ${h/2} )`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Ze(e,g),e.intersect=function(y){let v=Ke.rect(e,y),x=v.y-(e.y??0);if(f!=0&&(Math.abs(x)<(e.height??0)/2||Math.abs(x)==(e.height??0)/2&&Math.abs(v.x-(e.x??0))>(e.width??0)/2-d)){let b=d*d*(1-x*x/(f*f));b!=0&&(b=Math.sqrt(Math.abs(b))),b=d-b,y.x-(e.x??0)>0&&(b=-b),v.x+=b}return v},i}var RFe,LFe,NFe,Yae=I(()=>{"use strict";Bt();Vt();Yt();Ht();sr();RFe=o((t,e,r,n,i,a)=>`M${t},${e}
a${i},${a} 0,0,1 0,${-n}
l${r},0
a${i},${a} 0,0,1 0,${n}
M${r},${-n}
a${i},${a} 0,0,0 0,${n}
l${-r},0`,"createCylinderPathD"),LFe=o((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),NFe=o((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");o(Hae,"tiltedCylinder")});async function jae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=a.width+e.padding,l=a.height+e.padding,u=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Je.svg(i),p=tt(e,{}),m=Wt(u),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),f&&h.attr("style",f)}else h=ao(i,s,l,u);return n&&h.attr("style",n),e.width=s,e.height=l,Ze(e,h),e.intersect=function(d){return Ke.polygon(e,u,d)},i}var Xae=I(()=>{"use strict";Bt();Ht();Vt();Yt();jf();o(jae,"trapezoid")});async function Kae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=60,l=20,u=Math.max(s,a.width+(e.padding??0)*2,e?.width??0),h=Math.max(l,a.height+(e.padding??0)*2,e?.height??0),{cssStyles:f}=e,d=Je.svg(i),p=tt(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=[{x:-u/2*.8,y:-h/2},{x:u/2*.8,y:-h/2},{x:u/2,y:-h/2*.6},{x:u/2,y:h/2},{x:-u/2,y:h/2},{x:-u/2,y:-h/2*.6}],g=Wt(m),y=d.path(g,p),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Ze(e,v),e.intersect=function(x){return Ke.polygon(e,m,x)},i}var Qae=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(Kae,"trapezoidalPentagon")});async function Zae(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Sr(xe().flowchart?.htmlLabels),u=a.width+(e.padding??0),h=u+a.height,f=u+a.height,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-h}],{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=Wt(d),v=m.path(y,g),x=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return p&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=u,e.height=h,Ze(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${h/2-(a.height+(e.padding??0)/(l?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(b){return X.info("Triangle intersect",e,d,b),Ke.polygon(e,d,b)},i}var Jae=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();Bt();wr();Qt();o(Zae,"triangle")});async function ese(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=u/8,f=u+h,{cssStyles:d}=e,m=70-l,g=m>0?m/2:0,y=Je.svg(i),v=tt(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-l/2-g,y:f/2},...vl(-l/2-g,f/2,l/2+g,f/2,h,.8),{x:l/2+g,y:-f/2},{x:-l/2-g,y:-f/2}],b=Wt(x),T=y.path(b,v),E=i.insert(()=>T,":first-child");return E.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-u/2+(e.padding??0)-h-(a.y-(a.top??0))})`),Ze(e,E),e.intersect=function(w){return Ke.polygon(e,x,w)},i}var tse=I(()=>{"use strict";Bt();Ht();Yt();Vt();o(ese,"waveEdgedRectangle")});async function rse(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await ft(t,e,lt(e)),s=100,l=50,u=Math.max(a.width+(e.padding??0)*2,e?.width??0),h=Math.max(a.height+(e.padding??0)*2,e?.height??0),f=u/h,d=u,p=h;d>p*f?p=d/f:d=p*f,d=Math.max(d,s),p=Math.max(p,l);let m=Math.min(p*.2,p/4),g=p+m*2,{cssStyles:y}=e,v=Je.svg(i),x=tt(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-d/2,y:g/2},...vl(-d/2,g/2,d/2,g/2,m,1),{x:d/2,y:-g/2},...vl(d/2,-g/2,-d/2,-g/2,m,-1)],T=Wt(b),E=v.path(T,x),w=i.insert(()=>E,":first-child");return w.attr("class","basic label-container"),y&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&w.selectAll("path").attr("style",n),Ze(e,w),e.intersect=function(k){return Ke.polygon(e,b,k)},i}var nse=I(()=>{"use strict";Bt();Ht();Vt();Yt();o(rse,"waveRectangle")});async function ise(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await ft(t,e,lt(e)),l=Math.max(a.width+(e.padding??0)*2,e?.width??0),u=Math.max(a.height+(e.padding??0)*2,e?.height??0),h=5,f=-l/2,d=-u/2,{cssStyles:p}=e,m=Je.svg(i),g=tt(e,{}),y=[{x:f-h,y:d-h},{x:f-h,y:d+u},{x:f+l,y:d+u},{x:f+l,y:d-h}],v=`M${f-h},${d-h} L${f+l},${d-h} L${f+l},${d+u} L${f-h},${d+u} L${f-h},${d-h}
M${f-h},${d} L${f+l},${d}
M${f},${d-h} L${f},${d+u}`;e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let x=m.path(v,g),b=i.insert(()=>x,":first-child");return b.attr("transform",`translate(${h/2}, ${h/2})`),b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+h/2-(a.x-(a.left??0))}, ${-(a.height/2)+h/2-(a.y-(a.top??0))})`),Ze(e,b),e.intersect=function(T){return Ke.polygon(e,y,T)},i}var ase=I(()=>{"use strict";Bt();Vt();Yt();Ht();o(ise,"windowPane")});async function xM(t,e){let r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){let{themeVariables:V}=tr(),{background:K}=V,ee={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await xM(t,ee)}let n=tr();e.useHtmlLabels=n.htmlLabels;let i=n.er?.diagramPadding??10,a=n.er?.entityPadding??6,{cssStyles:s}=e,{labelStyles:l,nodeStyles:u}=Qe(e);if(r.attributes.length===0&&e.label){let V={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5,classes:""};ma(e.label,n)+V.labelPaddingX*20){let V=d.width+i*2-(y+v+x+b);y+=V/w,v+=V/w,x>0&&(x+=V/w),b>0&&(b+=V/w)}let C=y+v+x+b,D=Je.svg(f),R=tt(e,{});e.look!=="handDrawn"&&(R.roughness=0,R.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((V,K)=>V+(K?.rowHeight??0),0));let L=Math.max(k.width+i*2,e?.width||0,C),S=Math.max((O??0)+d.height,e?.height||0),A=-L/2,_=-S/2;f.selectAll("g:not(:first-child)").each((V,K,ee)=>{let H=He(ee[K]),he=H.attr("transform"),Z=0,de=0;if(he){let ne=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(he);ne&&(Z=parseFloat(ne[1]),de=parseFloat(ne[2]),H.attr("class").includes("attribute-name")?Z+=y:H.attr("class").includes("attribute-keys")?Z+=y+v:H.attr("class").includes("attribute-comment")&&(Z+=y+v+x))}H.attr("transform",`translate(${A+i/2+Z}, ${de+_+d.height+a/2})`)}),f.select(".name").attr("transform","translate("+-d.width/2+", "+(_+a/2)+")");let N=D.rectangle(A,_,L,S,R),M=f.insert(()=>N,":first-child").attr("style",s.join("")),{themeVariables:P}=tr(),{rowEven:B,rowOdd:F,nodeBorder:G}=P;m.push(0);for(let[V,K]of g.entries()){let H=(V+1)%2===0&&K.yOffset!==0,he=D.rectangle(A,d.height+_+K?.yOffset,L,K?.rowHeight,{...R,fill:H?B:F,stroke:G});f.insert(()=>he,"g.label").attr("style",s.join("")).attr("class",`row-rect-${H?"even":"odd"}`)}let $=D.line(A,d.height+_,L+A,d.height+_,R);f.insert(()=>$).attr("class","divider"),$=D.line(y+A,d.height+_,y+A,S+_,R),f.insert(()=>$).attr("class","divider"),T&&($=D.line(y+v+A,d.height+_,y+v+A,S+_,R),f.insert(()=>$).attr("class","divider")),E&&($=D.line(y+v+x+A,d.height+_,y+v+x+A,S+_,R),f.insert(()=>$).attr("class","divider"));for(let V of m)$=D.line(A,d.height+_+V,L+A,d.height+_+V,R),f.insert(()=>$).attr("class","divider");if(Ze(e,M),u&&e.look!=="handDrawn"){let K=u.split(";")?.filter(ee=>ee.includes("stroke"))?.map(ee=>`${ee}`).join("; ");f.selectAll("path").attr("style",K??""),f.selectAll(".row-rect-even path").attr("style",u)}return e.intersect=function(V){return Ke.rect(e,V)},f}async function ib(t,e,r,n=0,i=0,a=[],s=""){let l=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==zc(e)&&(e=zc(e),e=e.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await Ai(l,e,{width:ma(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let f=u.children[0];for(f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">");f.childNodes[0];)f=f.childNodes[0],f.textContent=f.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(Sr(r.htmlLabels)){let f=u.children[0];f.style.textAlign="start";let d=He(u);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}var sse=I(()=>{"use strict";Bt();Ht();Vt();Yt();nb();ti();yl();wr();kr();sr();o(xM,"erBox");o(ib,"addText")});async function ose(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",lt(e)).attr("id",e.domId||e.id),l=null,u=null,h=null,f=null,d=0,p=0,m=0;if(l=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let b=e.annotations[0];await Wk(l,{text:`\xAB${b}\xBB`},0),d=l.node().getBBox().height}u=s.insert("g").attr("class","label-group text"),await Wk(u,e,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=s.insert("g").attr("class","members-group text");let y=0;for(let b of e.members){let T=await Wk(h,b,y,[b.parseClassifier()]);y+=T+a}m=h.node().getBBox().height,m<=0&&(m=i/2),f=s.insert("g").attr("class","methods-group text");let v=0;for(let b of e.methods){let T=await Wk(f,b,v,[b.parseClassifier()]);v+=T+a}let x=s.node().getBBox();if(l!==null){let b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${d})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${d+p+i*2})`),x=s.node().getBBox(),f.attr("transform",`translate(0, ${d+p+(m?m+i*4:i*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}async function Wk(t,e,r,n=[]){let i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=tr(),s="useHtmlLabels"in e?e.useHtmlLabels:Sr(a.htmlLabels)??!0,l="";"text"in e?l=e.text:l=e.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),Nn(l)&&(s=!0);let u=await Ai(i,_2(ga(l)),{width:ma(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),h,f=1;if(s){let d=u.children[0],p=He(u);f=d.innerHTML.split(" ").length,d.innerHTML.includes("")&&(f+=d.innerHTML.split("").length-1);let m=d.getElementsByTagName("img");if(m){let g=l.replace(/ ]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,E=parseInt(b,10)*5+"px";y.style.minWidth=E,y.style.maxWidth=E}else y.style.width="100%";v(y)}o(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&&He(u).selectAll("tspan").attr("font-weight",""),f=u.children.length;let d=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(d.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*f)+r)+")"),h.height}var lse=I(()=>{"use strict";kr();ti();Bt();sr();Qt();yl();wr();o(ose,"textHelper");o(Wk,"addText")});async function cse(t,e){let r=xe(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??Sr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];let{shapeSvg:l,bbox:u}=await ose(t,e,r,a,i),{labelStyles:h,nodeStyles:f}=Qe(e);e.labelStyle=h,e.cssStyles=s.styles||"";let d=s.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=d.replaceAll("!important","").split(";"));let p=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,m=Je.svg(l),g=tt(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=u.width,v=u.height;s.members.length===0&&s.methods.length===0?v+=i:s.members.length>0&&s.methods.length===0&&(v+=i*2);let x=-y/2,b=-v/2,T=m.rectangle(x-n,b-n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0),y+2*n,v+2*n+(p?n*2:s.members.length===0&&s.methods.length===0?-n:0),g),E=l.insert(()=>T,":first-child");E.attr("class","basic label-container");let w=E.node().getBBox();l.selectAll(".text").each((R,O,L)=>{let S=He(L[O]),A=S.attr("transform"),_=0;if(A){let B=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);B&&(_=parseFloat(B[2]))}let N=_+b+n-(p?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(N-=4);let M=x;(S.attr("class").includes("label-group")||S.attr("class").includes("annotation-group"))&&(M=-S.node()?.getBBox().width/2||0,l.selectAll("text").each(function(P,B,F){window.getComputedStyle(F[B]).textAnchor==="middle"&&(M=0)})),S.attr("transform",`translate(${M}, ${N})`)});let k=l.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,C=l.select(".label-group").node().getBBox().height-(p?n/2:0)||0,D=l.select(".members-group").node().getBBox().height-(p?n/2:0)||0;if(s.members.length>0||s.methods.length>0||p){let R=m.line(w.x,k+C+b+n,w.x+w.width,k+C+b+n,g);l.insert(()=>R).attr("class","divider").attr("style",d)}if(p||s.members.length>0||s.methods.length>0){let R=m.line(w.x,k+C+D+b+i*2+n,w.x+w.width,k+C+D+b+n+i*2,g);l.insert(()=>R).attr("class","divider").attr("style",d)}if(s.look!=="handDrawn"&&l.selectAll("path").attr("style",d),E.select(":nth-child(2)").attr("style",d),l.selectAll(".divider").select("path").attr("style",d),e.labelStyle?l.selectAll("span").attr("style",e.labelStyle):l.selectAll("span").attr("style",d),!a){let R=RegExp(/color\s*:\s*([^;]*)/),O=R.exec(d);if(O){let L=O[0].replace("color","fill");l.selectAll("tspan").attr("style",L)}else if(h){let L=R.exec(h);if(L){let S=L[0].replace("color","fill");l.selectAll("tspan").attr("style",S)}}}return Ze(e,E),e.intersect=function(R){return Ke.rect(e,R)},l}var use=I(()=>{"use strict";Bt();Qt();kr();Yt();Vt();Ht();lse();wr();o(cse,"classBox")});async function hse(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let i=e,a=e,s=20,l=20,u="verifyMethod"in e,h=lt(e),f=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d;u?d=await Sh(f,`<<${i.type}>>`,0,e.labelStyle):d=await Sh(f,"<<Element>>",0,e.labelStyle);let p=d,m=await Sh(f,i.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+l,u){let k=await Sh(f,`${i.requirementId?`ID: ${i.requirementId}`:""}`,p,e.labelStyle);p+=k;let C=await Sh(f,`${i.text?`Text: ${i.text}`:""}`,p,e.labelStyle);p+=C;let D=await Sh(f,`${i.risk?`Risk: ${i.risk}`:""}`,p,e.labelStyle);p+=D,await Sh(f,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,p,e.labelStyle)}else{let k=await Sh(f,`${a.type?`Type: ${a.type}`:""}`,p,e.labelStyle);p+=k,await Sh(f,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,p,e.labelStyle)}let g=(f.node()?.getBBox().width??200)+s,y=(f.node()?.getBBox().height??200)+s,v=-g/2,x=-y/2,b=Je.svg(f),T=tt(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let E=b.rectangle(v,x,g,y,T),w=f.insert(()=>E,":first-child");if(w.attr("class","basic label-container").attr("style",n),f.selectAll(".label").each((k,C,D)=>{let R=He(D[C]),O=R.attr("transform"),L=0,S=0;if(O){let M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);M&&(L=parseFloat(M[1]),S=parseFloat(M[2]))}let A=S-y/2,_=v+s/2;(C===0||C===1)&&(_=L),R.attr("transform",`translate(${_}, ${A+s})`)}),p>d+m+l){let k=b.line(v,x+d+m+l,v+g,x+d+m+l,T);f.insert(()=>k).attr("style",n)}return Ze(e,w),e.intersect=function(k){return Ke.rect(e,k)},f}async function Sh(t,e,r,n=""){if(e==="")return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=xe(),s=a.htmlLabels??!0,l=await Ai(i,_2(ga(e)),{width:ma(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),u;if(s){let h=l.children[0],f=He(l);u=h.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{let h=l.children[0];for(let f of h.children)f.textContent=f.textContent.replaceAll(">",">").replaceAll("<","<"),n&&f.setAttribute("style",n);u=l.getBBox(),u.height+=6}return i.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}var fse=I(()=>{"use strict";Bt();Ht();Vt();Yt();sr();Qt();yl();kr();o(hse,"requirementBox");o(Sh,"addText")});async function dse(t,e,{config:r}){let{labelStyles:n,nodeStyles:i}=Qe(e);e.labelStyle=n||"";let a=10,s=e.width;e.width=(e.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await ft(t,e,lt(e)),f=e.padding||10,d="",p;"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));let m={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await Lk(p,"ticket"in e&&e.ticket||"",m):{label:g,bbox:y}=await Lk(l,"ticket"in e&&e.ticket||"",m);let{label:v,bbox:x}=await Lk(l,"assigned"in e&&e.assigned||"",m);e.width=s;let b=10,T=e?.width||0,E=Math.max(y.height,x.height)/2,w=Math.max(u.height+b*2,e?.height||0)+E,k=-T/2,C=-w/2;h.attr("transform","translate("+(f-T/2)+", "+(-E-u.height/2)+")"),g.attr("transform","translate("+(f-T/2)+", "+(-E+u.height/2)+")"),v.attr("transform","translate("+(f+T/2-x.width-2*a)+", "+(-E+u.height/2)+")");let D,{rx:R,ry:O}=e,{cssStyles:L}=e;if(e.look==="handDrawn"){let S=Je.svg(l),A=tt(e,{}),_=R||O?S.path(so(k,C,T,w,R||0),A):S.rectangle(k,C,T,w,A);D=l.insert(()=>_,":first-child"),D.attr("class","basic label-container").attr("style",L||null)}else{D=l.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",i).attr("rx",R??5).attr("ry",O??5).attr("x",k).attr("y",C).attr("width",T).attr("height",w);let S="priority"in e&&e.priority;if(S){let A=l.append("line"),_=k+2,N=C+Math.floor((R??0)/2),M=C+w-Math.floor((R??0)/2);A.attr("x1",_).attr("y1",N).attr("x2",_).attr("y2",M).attr("stroke-width","4").attr("stroke",MFe(S))}}return Ze(e,D),e.height=w,e.intersect=function(S){return Ke.rect(e,S)},l}var MFe,pse=I(()=>{"use strict";Bt();Ht();m0();Vt();Yt();MFe=o(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");o(dse,"kanbanItem")});async function mse(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ft(t,e,lt(e)),u=a.width+10*s,h=a.height+8*s,f=.15*u,{cssStyles:d}=e,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let v,x=`M0 0
a${f},${f} 1 0,0 ${g*.25},${-1*y*.1}
a${f},${f} 1 0,0 ${g*.25},0
a${f},${f} 1 0,0 ${g*.25},0
a${f},${f} 1 0,0 ${g*.25},${y*.1}
a${f},${f} 1 0,0 ${g*.15},${y*.33}
a${f*.8},${f*.8} 1 0,0 0,${y*.34}
a${f},${f} 1 0,0 ${-1*g*.15},${y*.33}
a${f},${f} 1 0,0 ${-1*g*.25},${y*.15}
a${f},${f} 1 0,0 ${-1*g*.25},0
a${f},${f} 1 0,0 ${-1*g*.25},0
a${f},${f} 1 0,0 ${-1*g*.25},${-1*y*.15}
a${f},${f} 1 0,0 ${-1*g*.1},${-1*y*.33}
a${f*.8},${f*.8} 1 0,0 0,${-1*y*.34}
a${f},${f} 1 0,0 ${g*.1},${-1*y*.33}
H0 V0 Z`;if(e.look==="handDrawn"){let b=Je.svg(i),T=tt(e,{}),E=b.path(x,T);v=i.insert(()=>E,":first-child"),v.attr("class","basic label-container").attr("style",On(d))}else v=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return v.attr("transform",`translate(${-g/2}, ${-y/2})`),Ze(e,v),e.calcIntersect=function(b,T){return Ke.rect(b,T)},e.intersect=function(b){return X.info("Bang intersect",e,b),Ke.rect(e,b)},i}var gse=I(()=>{"use strict";gt();Bt();Ht();Vt();Yt();sr();o(mse,"bang")});async function yse(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ft(t,e,lt(e)),u=a.width+2*s,h=a.height+2*s,f=.15*u,d=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=e,y,v=`M0 0
a${f},${f} 0 0,1 ${u*.25},${-1*u*.1}
a${p},${p} 1 0,1 ${u*.4},${-1*u*.1}
a${d},${d} 1 0,1 ${u*.35},${u*.2}
a${f},${f} 1 0,1 ${u*.15},${h*.35}
a${m},${m} 1 0,1 ${-1*u*.15},${h*.65}
a${d},${f} 1 0,1 ${-1*u*.25},${u*.15}
a${p},${p} 1 0,1 ${-1*u*.5},0
a${f},${f} 1 0,1 ${-1*u*.25},${-1*u*.15}
a${f},${f} 1 0,1 ${-1*u*.1},${-1*h*.35}
a${m},${m} 1 0,1 ${u*.1},${-1*h*.65}
H0 V0 Z`;if(e.look==="handDrawn"){let x=Je.svg(i),b=tt(e,{}),T=x.path(v,b);y=i.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",On(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Ze(e,y),e.calcIntersect=function(x,b){return Ke.rect(x,b)},e.intersect=function(x){return X.info("Cloud intersect",e,x),Ke.rect(e,x)},i}var vse=I(()=>{"use strict";Yt();gt();sr();Ht();Vt();Bt();o(yse,"cloud")});async function xse(t,e){let{labelStyles:r,nodeStyles:n}=Qe(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:s,label:l}=await ft(t,e,lt(e)),u=a.width+8*s,h=a.height+2*s,f=5,d=`
M${-u/2} ${h/2-f}
v${-h+2*f}
q0,-${f} ${f},-${f}
h${u-2*f}
q${f},0 ${f},${f}
v${h-2*f}
q0,${f} -${f},${f}
h${-u+2*f}
q-${f},0 -${f},-${f}
Z
`,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",d);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>l.node()),Ze(e,p),e.calcIntersect=function(m,g){return Ke.rect(m,g)},e.intersect=function(m){return Ke.rect(e,m)},i}var bse=I(()=>{"use strict";Ht();Vt();Bt();o(xse,"defaultMindmapNode")});async function Tse(t,e){let r={padding:e.padding??0};return Vk(t,e,r)}var wse=I(()=>{"use strict";vM();o(Tse,"mindmapCircle")});function kse(t){return t in bM}var IFe,OFe,bM,TM=I(()=>{"use strict";iie();oie();cie();hie();vM();die();mie();yie();xie();Tie();kie();Eie();Aie();Die();Lie();Mie();Oie();Bie();$ie();Gie();qie();Wie();Yie();Xie();Qie();Jie();tae();nae();aae();oae();cae();hae();dae();mae();yae();xae();Tae();kae();Eae();Aae();Dae();Lae();Mae();Oae();Bae();$ae();Gae();qae();Wae();Yae();Xae();Qae();Jae();tse();nse();ase();sse();use();fse();pse();gse();vse();bse();wse();IFe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:_ae},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:wae},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Rae},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Fae},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:wie},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Vk},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:mse},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:yse},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:gae},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Pie},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:rae},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:eae},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:jae},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Kie},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Cie},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Uae},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:lie},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Sae},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Pae},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Iae},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Nie},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Fie},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:pie},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:gie},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:vie},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:iae},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ese},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Iie},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Hae},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:sae},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:bie},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Sie},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Zae},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ise},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:_ie},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Kae},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Rie},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Cae},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fae},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:uae},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:sie},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:fie},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vae},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zae},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rse},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:vae},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:lae}],OFe=o(()=>{let e=[...Object.entries({state:Nae,choice:uie,note:pae,rectWithTitle:bae,labelRect:Zie,iconSquare:Hie,iconCircle:Vie,icon:zie,iconRounded:Uie,imageSquare:jie,anchor:nie,kanbanItem:dse,mindmapCircle:Tse,defaultMindmapNode:xse,classBox:cse,erBox:xM,requirementBox:hse}),...IFe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),bM=OFe();o(kse,"isValidShape")});var PFe,Hk,Sse=I(()=>{"use strict";kr();Hx();Qt();gt();TM();sr();wr();ki();PFe="flowchart-",Hk=class{constructor(){this.vertexCounter=0;this.config=xe();this.vertices=new Map;this.edges=[];this.classes=new Map;this.subGraphs=[];this.subGraphLookup=new Map;this.tooltips=new Map;this.subCount=0;this.firstGraphFlag=!0;this.secCount=-1;this.posCrossRef=[];this.funs=[];this.setAccTitle=zr;this.setAccDescription=qr;this.setDiagramTitle=Xr;this.getAccTitle=Vr;this.getAccDescription=Ur;this.getDiagramTitle=Wr;this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{o(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return r.domId;return e}addVertex(e,r,n,i,a,s,l={},u){if(!e||e.trim().length===0)return;let h;if(u!==void 0){let m;u.includes(`
`)?m=u+`
`:m=`{
`+u+`
}`,h=Wf(m,{schema:Uf})}let f=this.edges.find(m=>m.id===e);if(f){let m=h;m?.animate!==void 0&&(f.animate=m.animate),m?.animation!==void 0&&(f.animation=m.animation),m?.curve!==void 0&&(f.interpolate=m.curve);return}let d,p=this.vertices.get(e);if(p===void 0&&(p={id:e,labelType:"text",domId:PFe+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,r!==void 0?(this.config=xe(),d=this.sanitizeText(r.text.trim()),p.labelType=r.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=e),n!==void 0&&(p.type=n),i?.forEach(m=>{p.styles.push(m)}),a?.forEach(m=>{p.classes.push(m)}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=l:l!==void 0&&Object.assign(p.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!kse(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===e&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===e&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(e,r,n,i){let l={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};X.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=u.type),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(f=>f.start===l.start&&f.end===l.end);h.length===0?l.id=nu(l.start,l.end,{counter:0,prefix:"L"}):l.id=nu(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))X.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
Initialize mermaid with maxEdges set to a higher number to allow more edges.
You cannot set this config via configuration inside the diagram as it is a secure config.
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;X.info("addLink",e,r,i);for(let a of e)for(let s of r){let l=a===e[e.length-1],u=s===r[0];l&&u?this.addSingleLink(a,s,n,i):this.addSingleLink(a,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(e,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/ยงยงยง/g,",").split(";");e.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(s=>{if(/color/.exec(s)){let l=s.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(s)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(let n of e.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){let i=this.lookUpDomId(e);if(xe().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=document.querySelector(`[id="${i}"]`);l!==null&&l.addEventListener("click",()=>{jt.runFunc(r,...a)},!1)}))}setLink(e,r,n){e.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=jt.formatUrl(r,this.config),a.linkTarget=n)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=He(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=He("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),He(e).select("svg").selectAll("g.node").on("mouseover",a=>{let s=He(a.currentTarget);if(s.attr("title")===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(r.html().replace(/<br\/>/g," ")),s.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),He(a.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=xe(),Mr()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){let i=e.text.trim(),a=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);let l=o(p=>{let m={boolean:{},number:{},string:{}},g=[],y;return{nodeList:p.filter(function(x){let b=typeof x;return x.stmt&&x.stmt==="dir"?(y=x.value,!1):x.trim()===""?!1:b in m?m[b].hasOwnProperty(x)?!1:m[b][x]=!0:g.includes(x)?!1:g.push(x)}),dir:y}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,f=xe().flowchart??{};if(h=h??(f.inheritDir?this.getDirection()??xe().direction??void 0:void 0),this.version==="gen-1")for(let p=0;p2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let i=0,a=1;for(;i=0){let l=this.indexNodes2(e,s);if(l.result)return{result:!0,count:a+l.count};a=a+l.count}i=i+1}return{result:!1,count:a}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(e,r){let n=r.length,i=0;for(let a=0;a":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let a="normal",s=n.length-1;n.startsWith("=")&&(a="thick"),n.startsWith("~")&&(a="invisible");let l=this.countChar(".",n);return l&&(a="dotted",s=l),{type:i,stroke:a,length:s}}destructLink(e,r){let n=this.destructEndLink(e),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((i,a)=>{this.exists(r,i)||n.push(e.nodes[a])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find(n=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,i,a,s){let l=n.get(e.id),u=i.get(e.id)??!1,h=this.findNode(r,e.id);if(h)h.cssStyles=e.styles,h.cssCompiledStyles=this.getCompiledStyles(e.classes),h.cssClasses=e.classes.join(" ");else{let f={id:e.id,label:e.text,labelStyle:"",parentId:l,padding:a.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};u?r.push({...f,isGroup:!0,shape:"rect"}):r.push({...f,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let r=[];for(let n of e){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}getData(){let e=xe(),r=[],n=[],i=this.getSubGraphs(),a=new Map,s=new Map;for(let h=i.length-1;h>=0;h--){let f=i[h];f.nodes.length>0&&s.set(f.id,!0);for(let d of f.nodes)a.set(d,f.id)}for(let h=i.length-1;h>=0;h--){let f=i[h];r.push({id:f.id,label:f.title,labelStyle:"",parentId:a.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:e.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,a,s,e,e.look||"classic")});let u=this.getEdges();return u.forEach((h,f)=>{let{arrowTypeStart:d,arrowTypeEnd:p}=this.destructEdgeType(h.type),m=[...u.defaultStyle??[]];h.style&&m.push(...h.style);let g={id:nu(h.start,h.end,{counter:f,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:h.type??"normal",label:h.text,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:h?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":d,arrowTypeEnd:h?.stroke==="invisible"||h?.type==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:m,style:m,pattern:h.stroke,look:e.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(g)}),{nodes:r,edges:n,other:{},config:e}}defaultConfig(){return Ew.flowchart}}});var xl,y0=I(()=>{"use strict";kr();xl=o((t,e)=>{let r;return e==="sandbox"&&(r=He("#i"+t)),(e==="sandbox"?He(r.nodes()[0].contentDocument.body):He("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Eh,ab=I(()=>{"use strict";Eh=o(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var Ese,BFe,FFe,$Fe,zFe,GFe,VFe,Cse,l1,Ase,Yk=I(()=>{"use strict";Qt();wr();gt();ab();kr();Yt();yl();eM();qk();m0();Vt();Ese=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=xe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Qe(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Sr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Ai(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(Sr(r.flowchart.htmlLabels)){let C=g.children[0],D=He(g);y=C.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){let C=Je.svg(d),D=tt(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),R=C.path(so(b,T,v,x,0),D);E=d.insert(()=>(X.debug("Rough node insert CXC",R),R),":first-child"),E.select("path:nth-child(2)").attr("style",h.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=d.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Eh(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let C=m.select("span");C&&C.attr("style",l)}let k=E.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=y.height-e.padding/2,e.intersect=function(C){return Hf(e,C)},{cluster:d,labelBBox:y}},"rect"),BFe=o((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(l){return Hf(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),FFe=o(async(t,e)=>{let r=xe(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await ou(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(Sr(r.flowchart.htmlLabels)){let R=m.children[0],O=He(m);g=R.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,T=e.height+y-g.height-6,E=e.x-x/2,w=e.y-b/2;e.width=x;let k=e.y-e.height/2-v+g.height+2,C;if(e.look==="handDrawn"){let R=e.cssClasses.includes("statediagram-cluster-alt"),O=Je.svg(h),L=e.rx||e.ry?O.path(so(E,w,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):O.rectangle(E,w,x,b,{seed:i});C=h.insert(()=>L,":first-child");let S=O.rectangle(E,k,x,T,{fill:R?a:s,fillStyle:R?"hachure":"solid",stroke:u,seed:i});C=h.insert(()=>L,":first-child"),p=h.insert(()=>S)}else C=f.insert("rect",":first-child"),C.attr("class","outer").attr("x",E).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",E).attr("y",k).attr("width",x).attr("height",T);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(Sr(r.flowchart.htmlLabels)?0:3)})`);let D=C.node().getBBox();return e.height=D.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(R){return Hf(e,R)},{cluster:h,labelBBox:g}},"roundedWithTitle"),$Fe=o(async(t,e)=>{X.info("Creating subgraph rect for ",e.id,e);let r=xe(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Qe(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=Sr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await Ai(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}),y=g.getBBox();if(Sr(r.flowchart.htmlLabels)){let C=g.children[0],D=He(g);y=C.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,T=e.y-x/2;X.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){let C=Je.svg(d),D=tt(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),R=C.path(so(b,T,v,x,e.rx),D);E=d.insert(()=>(X.debug("Rough node insert CXC",R),R),":first-child"),E.select("path:nth-child(2)").attr("style",h.join(";")),E.select("path").attr("style",f.join(";").replace("fill","stroke"))}else E=d.insert("rect",":first-child"),E.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Eh(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let C=m.select("span");C&&C.attr("style",l)}let k=E.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=y.height-e.padding/2,e.intersect=function(C){return Hf(e,C)},{cluster:d,labelBBox:y}},"kanbanSection"),zFe=o((t,e)=>{let r=xe(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Je.svg(s).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=s.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Hf(e,y)},{cluster:s,labelBBox:{}}},"divider"),GFe=Ese,VFe={rect:Ese,squareRect:GFe,roundedWithTitle:FFe,noteGroup:BFe,divider:zFe,kanbanSection:$Fe},Cse=new Map,l1=o(async(t,e)=>{let r=e.shape||"rect",n=await VFe[r](t,e);return Cse.set(e.id,n),n},"insertCluster"),Ase=o(()=>{Cse=new Map},"clear")});function jk(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=ii(t),e=ii(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,l=a-n;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}var Ia,wM,ii,Xk,kM=I(()=>{"use strict";Ia={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},wM={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};o(jk,"calculateDeltaAndAngle");ii=o(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),Xk=o(t=>({x:o(function(e,r,n){let i=0,a=ii(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ia,t.arrowTypeEnd)){let{angle:m,deltaX:g}=jk(n[n.length-1],n[n.length-2]);i=Ia[t.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let s=Math.abs(ii(e).x-ii(n[n.length-1]).x),l=Math.abs(ii(e).y-ii(n[n.length-1]).y),u=Math.abs(ii(e).x-ii(n[0]).x),h=Math.abs(ii(e).y-ii(n[0]).y),f=Ia[t.arrowTypeStart],d=Ia[t.arrowTypeEnd],p=1;if(s0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ia,t.arrowTypeEnd)){let{angle:m,deltaY:g}=jk(n[n.length-1],n[n.length-2]);i=Ia[t.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let s=Math.abs(ii(e).y-ii(n[n.length-1]).y),l=Math.abs(ii(e).x-ii(n[n.length-1]).x),u=Math.abs(ii(e).y-ii(n[0]).y),h=Math.abs(ii(e).x-ii(n[0]).x),f=Ia[t.arrowTypeStart],d=Ia[t.arrowTypeEnd],p=1;if(s0&&l0&&h{"use strict";gt();Dse=o((t,e,r,n,i,a)=>{e.arrowTypeStart&&_se(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&_se(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),qFe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},_se=o((t,e,r,n,i,a,s)=>{let l=qFe[r];if(!l){X.warn(`Unknown arrow type: ${r}`);return}let u=l.type,f=`${i}_${a}-${u}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){let d=s.replace(/[^\dA-Za-z]/g,"_"),p=`${f}_${d}`;if(!document.getElementById(p)){let m=document.getElementById(f);if(m){let g=m.cloneNode(!0);g.id=p,g.querySelectorAll("path, circle, line").forEach(v=>{v.setAttribute("stroke",s),l.fill&&v.setAttribute("fill",s)}),m.parentNode?.appendChild(g)}}t.attr(`marker-${e}`,`url(${n}#${p})`)}else t.attr(`marker-${e}`,`url(${n}#${f})`)},"addEdgeMarker")});function Qk(t,e){xe().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function HFe(t){let e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}function XFe(t,e){if(t.length<2)return"";let r="",n=t.length,i=1e-5;for(let a=0;a({...i}));if(t.length>=2&&Ia[e.arrowTypeStart]){let i=Ia[e.arrowTypeStart],a=t[0],s=t[1],{angle:l}=Mse(a,s),u=i*Math.cos(l),h=i*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+h}let n=t.length;if(n>=2&&Ia[e.arrowTypeEnd]){let i=Ia[e.arrowTypeEnd],a=t[n-1],s=t[n-2],{angle:l}=Mse(s,a),u=i*Math.cos(l),h=i*Math.sin(l);r[n-1].x=a.x-u,r[n-1].y=a.y-h}return r}var Zk,Oa,Ise,Kk,Jk,eS,UFe,WFe,Lse,Nse,YFe,jFe,tS,SM=I(()=>{"use strict";Qt();wr();gt();yl();sr();kM();ab();kr();Yt();qk();Rse();Vt();Zk=new Map,Oa=new Map,Ise=o(()=>{Zk.clear(),Oa.clear()},"clear"),Kk=o(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),Jk=o(async(t,e)=>{let r=Sr(xe().flowchart.htmlLabels),{labelStyles:n}=Qe(e);e.labelStyle=n;let i=await Ai(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});X.info("abc82",e,e.labelType);let a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id);s.node().appendChild(i);let l=i.getBBox();if(r){let h=i.children[0],f=He(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),Zk.set(e.id,a),e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=await ou(e.startLabelLeft,Kk(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Oa.get(e.id)||Oa.set(e.id,{}),Oa.get(e.id).startLeft=f,Qk(u,e.startLabelLeft)}if(e.startLabelRight){let h=await ou(e.startLabelRight,Kk(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),Oa.get(e.id)||Oa.set(e.id,{}),Oa.get(e.id).startRight=f,Qk(u,e.startLabelRight)}if(e.endLabelLeft){let h=await ou(e.endLabelLeft,Kk(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Oa.get(e.id)||Oa.set(e.id,{}),Oa.get(e.id).endLeft=f,Qk(u,e.endLabelLeft)}if(e.endLabelRight){let h=await ou(e.endLabelRight,Kk(e.labelStyle)),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),Oa.get(e.id)||Oa.set(e.id,{}),Oa.get(e.id).endRight=f,Qk(u,e.endLabelRight)}return i},"insertEdgeLabel");o(Qk,"setTerminalWidth");eS=o((t,e)=>{X.debug("Moving label abc88 ",t.id,t.label,Zk.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=xe(),{subGraphTitleTotalMargin:i}=Eh(n);if(t.label){let a=Zk.get(t.id),s=t.x,l=t.y;if(r){let u=jt.calcLabelPosition(r);X.debug("Moving label "+t.label+" from (",s,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,l=u.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(t.startLabelLeft){let a=Oa.get(t.id).startLeft,s=t.x,l=t.y;if(r){let u=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.startLabelRight){let a=Oa.get(t.id).startRight,s=t.x,l=t.y;if(r){let u=jt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelLeft){let a=Oa.get(t.id).endLeft,s=t.x,l=t.y;if(r){let u=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}if(t.endLabelRight){let a=Oa.get(t.id).endRight,s=t.x,l=t.y;if(r){let u=jt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,l=u.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),UFe=o((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,l=t.height/2;return i>=s||a>=l},"outsideNode"),WFe=o((t,e,r)=>{X.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(e)}
insidePoint : ${JSON.stringify(r)}
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2,l=r.xMath.abs(n-e.x)*u){let d=r.y{X.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(X.info("abc88 checking point",a,e),!UFe(e,a)&&!i){let s=WFe(e,n,a);X.debug("abc88 inside",a,n,s),X.debug("abc88 intersection",s,e);let l=!1;r.forEach(u=>{l=l||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)?X.warn("abc88 no intersect",s,r):r.push(s),i=!0}else X.warn("abc88 outside",a,n),n=a,i||r.push(a)}),X.debug("returning points",r),r},"cutPathAtIntersect");o(HFe,"extractCornerPoints");Nse=o(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),YFe=o(function(t){let{cornerPointPositions:e}=HFe(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){X.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;s.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else X.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),jFe=o((t,e,r)=>{let n=t-e-r,i=2,a=2,s=i+a,l=Math.floor(n/s),u=Array(l).fill(`${i} ${a}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),tS=o(function(t,e,r,n,i,a,s,l=!1){let{handDrawnSeed:u}=xe(),h=e.points,f=!1,d=i;var p=a;let m=[];for(let _ in e.cssCompiledStyles)Zx(_)||m.push(e.cssCompiledStyles[_]);X.debug("UIO intersect check",e.points,p.x,d.x),p.intersect&&d.intersect&&!l&&(h=h.slice(1,e.points.length-1),h.unshift(d.intersect(h[0])),X.debug("Last point UIO",e.start,"-->",e.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));let g=btoa(JSON.stringify(h));e.toCluster&&(X.info("to cluster abc88",r.get(e.toCluster)),h=Lse(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(X.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(h,null,2)),h=Lse(h.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let y=h.filter(_=>!Number.isNaN(_.y));y=YFe(y);let v=cl;switch(v=mh,e.curve){case"linear":v=mh;break;case"basis":v=cl;break;case"cardinal":v=yx;break;case"bumpX":v=fx;break;case"bumpY":v=dx;break;case"catmullRom":v=bx;break;case"monotoneX":v=Tx;break;case"monotoneY":v=wx;break;case"natural":v=Pg;break;case"step":v=Bg;break;case"stepAfter":v=Sx;break;case"stepBefore":v=kx;break;default:v=cl}let{x,y:b}=Xk(e),T=ac().x(x).y(b).curve(v),E;switch(e.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-invisible";break;default:E="edge-thickness-normal"}switch(e.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break;default:E+=" edge-pattern-solid"}let w,k=e.curve==="rounded"?XFe(KFe(y,e),5):T(y),C=Array.isArray(e.style)?e.style:[e.style],D=C.find(_=>_?.startsWith("stroke:")),R=!1;if(e.look==="handDrawn"){let _=Je.svg(t);Object.assign([],y);let N=_.path(k,{roughness:.3,seed:u});E+=" transition",w=He(N).select("path").attr("id",e.id).attr("class"," "+E+(e.classes?" "+e.classes:"")).attr("style",C?C.reduce((P,B)=>P+";"+B,""):"");let M=w.attr("d");w.attr("d",M),t.node().appendChild(w.node())}else{let _=m.join(";"),N=C?C.reduce((V,K)=>V+K+";",""):"",M="";e.animate&&(M=" edge-animation-fast"),e.animation&&(M=" edge-animation-"+e.animation);let P=(_?_+";"+N+";":N)+";"+(C?C.reduce((V,K)=>V+";"+K,""):"");w=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+E+(e.classes?" "+e.classes:"")+(M??"")).attr("style",P),D=P.match(/stroke:([^;]+)/)?.[1],R=e.animate===!0||!!e.animation||_.includes("animation");let B=w.node(),F=typeof B.getTotalLength=="function"?B.getTotalLength():0,G=wM[e.arrowTypeStart]||0,$=wM[e.arrowTypeEnd]||0;if(e.look==="neo"&&!R){let K=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?jFe(F,G,$):`0 ${G} ${F-G-$} ${$}`}; stroke-dashoffset: 0;`;w.attr("style",K+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",e.id),w.attr("data-points",g),e.showPoints&&y.forEach(_=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",_.x).attr("cy",_.y)});let O="";(xe().flowchart.arrowMarkerAbsolute||xe().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),X.info("arrowTypeStart",e.arrowTypeStart),X.info("arrowTypeEnd",e.arrowTypeEnd),Dse(w,e,O,s,n,D);let L=Math.floor(h.length/2),S=h[L];jt.isLabelCoordinateInPath(S,w.attr("d"))||(f=!0);let A={};return f&&(A.updatedPath=h),A.originalPath=e.points,A},"insertEdge");o(XFe,"generateRoundedPath");o(Mse,"calculateDeltaAndAngle");o(KFe,"applyMarkerOffsetsToPoints")});var QFe,ZFe,JFe,e$e,t$e,r$e,n$e,i$e,a$e,s$e,o$e,l$e,c$e,u$e,h$e,f$e,d$e,rS,EM=I(()=>{"use strict";gt();QFe=o((t,e,r,n)=>{e.forEach(i=>{d$e[i](t,r,n)})},"insertMarkers"),ZFe=o((t,e,r)=>{X.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),JFe=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),e$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),t$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),r$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),n$e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),i$e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),a$e=o((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),s$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),o$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),l$e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),c$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),u$e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),h$e=o((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),f$e=o((t,e,r)=>{let n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),d$e={extension:ZFe,composition:JFe,aggregation:e$e,dependency:t$e,lollipop:r$e,point:n$e,circle:i$e,cross:a$e,barb:s$e,only_one:o$e,zero_or_one:l$e,one_or_more:c$e,zero_or_more:u$e,requirement_arrow:h$e,requirement_contains:f$e},rS=QFe});async function c1(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let a=e.shape?bM[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),nS.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var nS,Ose,Pse,sb,iS=I(()=>{"use strict";gt();TM();nS=new Map;o(c1,"insertNode");Ose=o((t,e)=>{nS.set(e.id,t)},"setNodeElem"),Pse=o(()=>{nS.clear()},"clear"),sb=o(t=>{let e=nS.get(t.id);X.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var Bse,Fse=I(()=>{"use strict";ti();wr();gt();Yk();SM();EM();iS();Bt();sr();Bse={common:nt,getConfig:tr,insertCluster:l1,insertEdge:tS,insertEdgeLabel:Jk,insertMarkers:rS,insertNode:c1,interpolateToCurve:dN,labelHelper:ft,log:X,positionEdgeLabel:eS}});function m$e(t){return typeof t=="symbol"||gi(t)&&Ma(t)==p$e}var p$e,Fo,v0=I(()=>{"use strict";yh();fl();p$e="[object Symbol]";o(m$e,"isSymbol");Fo=m$e});function g$e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{"use strict";o(g$e,"arrayMap");oo=g$e});function Gse(t){if(typeof t=="string")return t;if(zt(t))return oo(t,Gse)+"";if(Fo(t))return zse?zse.call(t):"";var e=t+"";return e=="0"&&1/t==-y$e?"-0":e}var y$e,$se,zse,Vse,qse=I(()=>{"use strict";r0();x0();ni();v0();y$e=1/0,$se=da?da.prototype:void 0,zse=$se?$se.toString:void 0;o(Gse,"baseToString");Vse=Gse});function x$e(t){for(var e=t.length;e--&&v$e.test(t.charAt(e)););return e}var v$e,Use,Wse=I(()=>{"use strict";v$e=/\s/;o(x$e,"trimmedEndIndex");Use=x$e});function T$e(t){return t&&t.slice(0,Use(t)+1).replace(b$e,"")}var b$e,Hse,Yse=I(()=>{"use strict";Wse();b$e=/^\s+/;o(T$e,"baseTrim");Hse=T$e});function C$e(t){if(typeof t=="number")return t;if(Fo(t))return jse;if(In(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=In(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Hse(t);var r=k$e.test(t);return r||S$e.test(t)?E$e(t.slice(2),r?2:8):w$e.test(t)?jse:+t}var jse,w$e,k$e,S$e,E$e,Xse,Kse=I(()=>{"use strict";Yse();Oo();v0();jse=NaN,w$e=/^[-+]0x[0-9a-f]+$/i,k$e=/^0b[01]+$/i,S$e=/^0o[0-7]+$/i,E$e=parseInt;o(C$e,"toNumber");Xse=C$e});function _$e(t){if(!t)return t===0?t:0;if(t=Xse(t),t===Qse||t===-Qse){var e=t<0?-1:1;return e*A$e}return t===t?t:0}var Qse,A$e,u1,CM=I(()=>{"use strict";Kse();Qse=1/0,A$e=17976931348623157e292;o(_$e,"toFinite");u1=_$e});function D$e(t){var e=u1(t),r=e%1;return e===e?r?e-r:e:0}var lu,h1=I(()=>{"use strict";CM();o(D$e,"toInteger");lu=D$e});var R$e,aS,Zse=I(()=>{"use strict";Mf();ul();R$e=Zs(Ei,"WeakMap"),aS=R$e});function L$e(){}var yi,AM=I(()=>{"use strict";o(L$e,"noop");yi=L$e});function N$e(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(N$e,"arrayEach");sS=N$e});function M$e(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{"use strict";o(M$e,"baseFindIndex");oS=M$e});function I$e(t){return t!==t}var Jse,eoe=I(()=>{"use strict";o(I$e,"baseIsNaN");Jse=I$e});function O$e(t,e,r){for(var n=r-1,i=t.length;++n{"use strict";o(O$e,"strictIndexOf");toe=O$e});function P$e(t,e,r){return e===e?toe(t,e,r):oS(t,Jse,r)}var f1,lS=I(()=>{"use strict";DM();eoe();roe();o(P$e,"baseIndexOf");f1=P$e});function B$e(t,e){var r=t==null?0:t.length;return!!r&&f1(t,e,0)>-1}var cS,RM=I(()=>{"use strict";lS();o(B$e,"arrayIncludes");cS=B$e});var F$e,noe,ioe=I(()=>{"use strict";eN();F$e=nk(Object.keys,Object),noe=F$e});function G$e(t){if(!Jc(t))return noe(t);var e=[];for(var r in Object(t))z$e.call(t,r)&&r!="constructor"&&e.push(r);return e}var $$e,z$e,d1,uS=I(()=>{"use strict";Kg();ioe();$$e=Object.prototype,z$e=$$e.hasOwnProperty;o(G$e,"baseKeys");d1=G$e});function V$e(t){return Ci(t)?lk(t):d1(t)}var en,cu=I(()=>{"use strict";aN();uS();dl();o(V$e,"keys");en=V$e});var q$e,U$e,W$e,Pa,aoe=I(()=>{"use strict";e1();o0();cN();dl();Kg();cu();q$e=Object.prototype,U$e=q$e.hasOwnProperty,W$e=hk(function(t,e){if(Jc(e)||Ci(e)){gl(e,en(e),t);return}for(var r in e)U$e.call(e,r)&&eu(t,r,e[r])}),Pa=W$e});function j$e(t,e){if(zt(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Fo(t)?!0:Y$e.test(t)||!H$e.test(t)||e!=null&&t in Object(e)}var H$e,Y$e,p1,hS=I(()=>{"use strict";ni();v0();H$e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y$e=/^\w*$/;o(j$e,"isKey");p1=j$e});function K$e(t){var e=Vg(t,function(n){return r.size===X$e&&r.clear(),n}),r=e.cache;return e}var X$e,soe,ooe=I(()=>{"use strict";Y9();X$e=500;o(K$e,"memoizeCapped");soe=K$e});var Q$e,Z$e,J$e,loe,coe=I(()=>{"use strict";ooe();Q$e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z$e=/\\(\\)?/g,J$e=soe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Q$e,function(r,n,i,a){e.push(i?a.replace(Z$e,"$1"):n||r)}),e}),loe=J$e});function eze(t){return t==null?"":Vse(t)}var fS,LM=I(()=>{"use strict";qse();o(eze,"toString");fS=eze});function tze(t,e){return zt(t)?t:p1(t,e)?[t]:loe(fS(t))}var Qf,ob=I(()=>{"use strict";ni();hS();coe();LM();o(tze,"castPath");Qf=tze});function nze(t){if(typeof t=="string"||Fo(t))return t;var e=t+"";return e=="0"&&1/t==-rze?"-0":e}var rze,uu,m1=I(()=>{"use strict";v0();rze=1/0;o(nze,"toKey");uu=nze});function ize(t,e){e=Qf(e,t);for(var r=0,n=e.length;t!=null&&r{"use strict";ob();m1();o(ize,"baseGet");Zf=ize});function aze(t,e,r){var n=t==null?void 0:Zf(t,e);return n===void 0?r:n}var uoe,hoe=I(()=>{"use strict";lb();o(aze,"get");uoe=aze});function sze(t,e){for(var r=-1,n=e.length,i=t.length;++r{"use strict";o(sze,"arrayPush");g1=sze});function oze(t){return zt(t)||oc(t)||!!(foe&&t&&t[foe])}var foe,doe,poe=I(()=>{"use strict";r0();Qg();ni();foe=da?da.isConcatSpreadable:void 0;o(oze,"isFlattenable");doe=oze});function moe(t,e,r,n,i){var a=-1,s=t.length;for(r||(r=doe),i||(i=[]);++a0&&r(l)?e>1?moe(l,e-1,r,n,i):g1(i,l):n||(i[i.length]=l)}return i}var hu,y1=I(()=>{"use strict";dS();poe();o(moe,"baseFlatten");hu=moe});function lze(t){var e=t==null?0:t.length;return e?hu(t,1):[]}var ln,pS=I(()=>{"use strict";y1();o(lze,"flatten");ln=lze});function cze(t){return uk(ck(t,void 0,ln),t+"")}var goe,yoe=I(()=>{"use strict";pS();sN();lN();o(cze,"flatRest");goe=cze});function uze(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{"use strict";o(uze,"baseSlice");mS=uze});function xze(t){return vze.test(t)}var hze,fze,dze,pze,mze,gze,yze,vze,voe,xoe=I(()=>{"use strict";hze="\\ud800-\\udfff",fze="\\u0300-\\u036f",dze="\\ufe20-\\ufe2f",pze="\\u20d0-\\u20ff",mze=fze+dze+pze,gze="\\ufe0e\\ufe0f",yze="\\u200d",vze=RegExp("["+yze+hze+mze+gze+"]");o(xze,"hasUnicode");voe=xze});function bze(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{"use strict";o(bze,"arrayReduce");boe=bze});function Tze(t,e){return t&&gl(e,en(e),t)}var woe,koe=I(()=>{"use strict";o0();cu();o(Tze,"baseAssign");woe=Tze});function wze(t,e){return t&&gl(e,Js(e),t)}var Soe,Eoe=I(()=>{"use strict";o0();zf();o(wze,"baseAssignIn");Soe=wze});function kze(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{"use strict";o(kze,"arrayFilter");v1=kze});function Sze(){return[]}var yS,MM=I(()=>{"use strict";o(Sze,"stubArray");yS=Sze});var Eze,Cze,Coe,Aze,x1,vS=I(()=>{"use strict";gS();MM();Eze=Object.prototype,Cze=Eze.propertyIsEnumerable,Coe=Object.getOwnPropertySymbols,Aze=Coe?function(t){return t==null?[]:(t=Object(t),v1(Coe(t),function(e){return Cze.call(t,e)}))}:yS,x1=Aze});function _ze(t,e){return gl(t,x1(t),e)}var Aoe,_oe=I(()=>{"use strict";o0();vS();o(_ze,"copySymbols");Aoe=_ze});var Dze,Rze,xS,IM=I(()=>{"use strict";dS();ik();vS();MM();Dze=Object.getOwnPropertySymbols,Rze=Dze?function(t){for(var e=[];t;)g1(e,x1(t)),t=Xg(t);return e}:yS,xS=Rze});function Lze(t,e){return gl(t,xS(t),e)}var Doe,Roe=I(()=>{"use strict";o0();IM();o(Lze,"copySymbolsIn");Doe=Lze});function Nze(t,e,r){var n=e(t);return zt(t)?n:g1(n,r(t))}var bS,OM=I(()=>{"use strict";dS();ni();o(Nze,"baseGetAllKeys");bS=Nze});function Mze(t){return bS(t,en,x1)}var cb,PM=I(()=>{"use strict";OM();vS();cu();o(Mze,"getAllKeys");cb=Mze});function Ize(t){return bS(t,Js,xS)}var TS,BM=I(()=>{"use strict";OM();IM();zf();o(Ize,"getAllKeysIn");TS=Ize});var Oze,wS,Loe=I(()=>{"use strict";Mf();ul();Oze=Zs(Ei,"DataView"),wS=Oze});var Pze,kS,Noe=I(()=>{"use strict";Mf();ul();Pze=Zs(Ei,"Promise"),kS=Pze});var Bze,Jf,FM=I(()=>{"use strict";Mf();ul();Bze=Zs(Ei,"Set"),Jf=Bze});var Moe,Fze,Ioe,Ooe,Poe,Boe,$ze,zze,Gze,Vze,qze,b0,$o,T0=I(()=>{"use strict";Loe();K5();Noe();FM();Zse();yh();U9();Moe="[object Map]",Fze="[object Object]",Ioe="[object Promise]",Ooe="[object Set]",Poe="[object WeakMap]",Boe="[object DataView]",$ze=vh(wS),zze=vh(Pf),Gze=vh(kS),Vze=vh(Jf),qze=vh(aS),b0=Ma;(wS&&b0(new wS(new ArrayBuffer(1)))!=Boe||Pf&&b0(new Pf)!=Moe||kS&&b0(kS.resolve())!=Ioe||Jf&&b0(new Jf)!=Ooe||aS&&b0(new aS)!=Poe)&&(b0=o(function(t){var e=Ma(t),r=e==Fze?t.constructor:void 0,n=r?vh(r):"";if(n)switch(n){case $ze:return Boe;case zze:return Moe;case Gze:return Ioe;case Vze:return Ooe;case qze:return Poe}return e},"getTag"));$o=b0});function Hze(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Wze.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Uze,Wze,Foe,$oe=I(()=>{"use strict";Uze=Object.prototype,Wze=Uze.hasOwnProperty;o(Hze,"initCloneArray");Foe=Hze});function Yze(t,e){var r=e?jg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var zoe,Goe=I(()=>{"use strict";ek();o(Yze,"cloneDataView");zoe=Yze});function Xze(t){var e=new t.constructor(t.source,jze.exec(t));return e.lastIndex=t.lastIndex,e}var jze,Voe,qoe=I(()=>{"use strict";jze=/\w*$/;o(Xze,"cloneRegExp");Voe=Xze});function Kze(t){return Woe?Object(Woe.call(t)):{}}var Uoe,Woe,Hoe,Yoe=I(()=>{"use strict";r0();Uoe=da?da.prototype:void 0,Woe=Uoe?Uoe.valueOf:void 0;o(Kze,"cloneSymbol");Hoe=Kze});function gGe(t,e,r){var n=t.constructor;switch(e){case aGe:return jg(t);case Qze:case Zze:return new n(+t);case sGe:return zoe(t,r);case oGe:case lGe:case cGe:case uGe:case hGe:case fGe:case dGe:case pGe:case mGe:return tk(t,r);case Jze:return new n;case eGe:case nGe:return new n(t);case tGe:return Voe(t);case rGe:return new n;case iGe:return Hoe(t)}}var Qze,Zze,Jze,eGe,tGe,rGe,nGe,iGe,aGe,sGe,oGe,lGe,cGe,uGe,hGe,fGe,dGe,pGe,mGe,joe,Xoe=I(()=>{"use strict";ek();Goe();qoe();Yoe();Z9();Qze="[object Boolean]",Zze="[object Date]",Jze="[object Map]",eGe="[object Number]",tGe="[object RegExp]",rGe="[object Set]",nGe="[object String]",iGe="[object Symbol]",aGe="[object ArrayBuffer]",sGe="[object DataView]",oGe="[object Float32Array]",lGe="[object Float64Array]",cGe="[object Int8Array]",uGe="[object Int16Array]",hGe="[object Int32Array]",fGe="[object Uint8Array]",dGe="[object Uint8ClampedArray]",pGe="[object Uint16Array]",mGe="[object Uint32Array]";o(gGe,"initCloneByTag");joe=gGe});function vGe(t){return gi(t)&&$o(t)==yGe}var yGe,Koe,Qoe=I(()=>{"use strict";T0();fl();yGe="[object Map]";o(vGe,"baseIsMap");Koe=vGe});var Zoe,xGe,Joe,ele=I(()=>{"use strict";Qoe();s0();Px();Zoe=ml&&ml.isMap,xGe=Zoe?pl(Zoe):Koe,Joe=xGe});function TGe(t){return gi(t)&&$o(t)==bGe}var bGe,tle,rle=I(()=>{"use strict";T0();fl();bGe="[object Set]";o(TGe,"baseIsSet");tle=TGe});var nle,wGe,ile,ale=I(()=>{"use strict";rle();s0();Px();nle=ml&&ml.isSet,wGe=nle?pl(nle):tle,ile=wGe});function SS(t,e,r,n,i,a){var s,l=e&kGe,u=e&SGe,h=e&EGe;if(r&&(s=i?r(t,n,i,a):r(t)),s!==void 0)return s;if(!In(t))return t;var f=zt(t);if(f){if(s=Foe(t),!l)return rk(t,s)}else{var d=$o(t),p=d==ole||d==RGe;if(lc(t))return J5(t,l);if(d==lle||d==sle||p&&!i){if(s=u||p?{}:ak(t),!l)return u?Doe(t,Soe(s,t)):Aoe(t,woe(s,t))}else{if(!Gn[d])return i?t:{};s=joe(t,d,l)}}a||(a=new Qc);var m=a.get(t);if(m)return m;a.set(t,s),ile(t)?t.forEach(function(v){s.add(SS(v,e,r,v,t,a))}):Joe(t)&&t.forEach(function(v,x){s.set(x,SS(v,e,r,x,t,a))});var g=h?u?TS:cb:u?Js:en,y=f?void 0:g(t);return sS(y||t,function(v,x){y&&(x=v,v=t[x]),eu(s,x,SS(v,e,r,x,t,a))}),s}var kGe,SGe,EGe,sle,CGe,AGe,_Ge,DGe,ole,RGe,LGe,NGe,lle,MGe,IGe,OGe,PGe,BGe,FGe,$Ge,zGe,GGe,VGe,qGe,UGe,WGe,HGe,YGe,jGe,Gn,ES,$M=I(()=>{"use strict";Mx();_M();e1();koe();Eoe();K9();J9();_oe();Roe();PM();BM();T0();$oe();Xoe();tN();ni();Jg();ele();Oo();ale();cu();zf();kGe=1,SGe=2,EGe=4,sle="[object Arguments]",CGe="[object Array]",AGe="[object Boolean]",_Ge="[object Date]",DGe="[object Error]",ole="[object Function]",RGe="[object GeneratorFunction]",LGe="[object Map]",NGe="[object Number]",lle="[object Object]",MGe="[object RegExp]",IGe="[object Set]",OGe="[object String]",PGe="[object Symbol]",BGe="[object WeakMap]",FGe="[object ArrayBuffer]",$Ge="[object DataView]",zGe="[object Float32Array]",GGe="[object Float64Array]",VGe="[object Int8Array]",qGe="[object Int16Array]",UGe="[object Int32Array]",WGe="[object Uint8Array]",HGe="[object Uint8ClampedArray]",YGe="[object Uint16Array]",jGe="[object Uint32Array]",Gn={};Gn[sle]=Gn[CGe]=Gn[FGe]=Gn[$Ge]=Gn[AGe]=Gn[_Ge]=Gn[zGe]=Gn[GGe]=Gn[VGe]=Gn[qGe]=Gn[UGe]=Gn[LGe]=Gn[NGe]=Gn[lle]=Gn[MGe]=Gn[IGe]=Gn[OGe]=Gn[PGe]=Gn[WGe]=Gn[HGe]=Gn[YGe]=Gn[jGe]=!0;Gn[DGe]=Gn[ole]=Gn[BGe]=!1;o(SS,"baseClone");ES=SS});function KGe(t){return ES(t,XGe)}var XGe,yn,zM=I(()=>{"use strict";$M();XGe=4;o(KGe,"clone");yn=KGe});function JGe(t){return ES(t,QGe|ZGe)}var QGe,ZGe,GM,cle=I(()=>{"use strict";$M();QGe=1,ZGe=4;o(JGe,"cloneDeep");GM=JGe});function eVe(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{"use strict";o(eVe,"compact");fu=eVe});function rVe(t){return this.__data__.set(t,tVe),this}var tVe,hle,fle=I(()=>{"use strict";tVe="__lodash_hash_undefined__";o(rVe,"setCacheAdd");hle=rVe});function nVe(t){return this.__data__.has(t)}var dle,ple=I(()=>{"use strict";o(nVe,"setCacheHas");dle=nVe});function CS(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new i0;++e{"use strict";Q5();fle();ple();o(CS,"SetCache");CS.prototype.add=CS.prototype.push=hle;CS.prototype.has=dle;b1=CS});function iVe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";o(iVe,"arraySome");_S=iVe});function aVe(t,e){return t.has(e)}var T1,DS=I(()=>{"use strict";o(aVe,"cacheHas");T1=aVe});function lVe(t,e,r,n,i,a){var s=r&sVe,l=t.length,u=e.length;if(l!=u&&!(s&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&oVe?new b1:void 0;for(a.set(t,e),a.set(e,t);++d{"use strict";AS();VM();DS();sVe=1,oVe=2;o(lVe,"equalArrays");RS=lVe});function cVe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var mle,gle=I(()=>{"use strict";o(cVe,"mapToArray");mle=cVe});function uVe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var w1,LS=I(()=>{"use strict";o(uVe,"setToArray");w1=uVe});function SVe(t,e,r,n,i,a,s){switch(r){case kVe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case wVe:return!(t.byteLength!=e.byteLength||!a(new Yg(t),new Yg(e)));case dVe:case pVe:case yVe:return hl(+t,+e);case mVe:return t.name==e.name&&t.message==e.message;case vVe:case bVe:return t==e+"";case gVe:var l=mle;case xVe:var u=n&hVe;if(l||(l=w1),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=fVe,s.set(t,e);var f=RS(l(t),l(e),n,i,a,s);return s.delete(t),f;case TVe:if(UM)return UM.call(t)==UM.call(e)}return!1}var hVe,fVe,dVe,pVe,mVe,gVe,yVe,vVe,xVe,bVe,TVe,wVe,kVe,yle,UM,vle,xle=I(()=>{"use strict";r0();Q9();n0();qM();gle();LS();hVe=1,fVe=2,dVe="[object Boolean]",pVe="[object Date]",mVe="[object Error]",gVe="[object Map]",yVe="[object Number]",vVe="[object RegExp]",xVe="[object Set]",bVe="[object String]",TVe="[object Symbol]",wVe="[object ArrayBuffer]",kVe="[object DataView]",yle=da?da.prototype:void 0,UM=yle?yle.valueOf:void 0;o(SVe,"equalByTag");vle=SVe});function _Ve(t,e,r,n,i,a){var s=r&EVe,l=cb(t),u=l.length,h=cb(e),f=h.length;if(u!=f&&!s)return!1;for(var d=u;d--;){var p=l[d];if(!(s?p in e:AVe.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=s;++d{"use strict";PM();EVe=1,CVe=Object.prototype,AVe=CVe.hasOwnProperty;o(_Ve,"equalObjects");ble=_Ve});function LVe(t,e,r,n,i,a){var s=zt(t),l=zt(e),u=s?kle:$o(t),h=l?kle:$o(e);u=u==wle?NS:u,h=h==wle?NS:h;var f=u==NS,d=h==NS,p=u==h;if(p&&lc(t)){if(!lc(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Qc),s||Ff(t)?RS(t,e,r,n,i,a):vle(t,e,u,r,n,i,a);if(!(r&DVe)){var m=f&&Sle.call(t,"__wrapped__"),g=d&&Sle.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new Qc),i(y,v,r,n,a)}}return p?(a||(a=new Qc),ble(t,e,r,n,i,a)):!1}var DVe,wle,kle,NS,RVe,Sle,Ele,Cle=I(()=>{"use strict";Mx();qM();xle();Tle();T0();ni();Jg();Bx();DVe=1,wle="[object Arguments]",kle="[object Array]",NS="[object Object]",RVe=Object.prototype,Sle=RVe.hasOwnProperty;o(LVe,"baseIsEqualDeep");Ele=LVe});function Ale(t,e,r,n,i){return t===e?!0:t==null||e==null||!gi(t)&&!gi(e)?t!==t&&e!==e:Ele(t,e,r,n,Ale,i)}var MS,WM=I(()=>{"use strict";Cle();fl();o(Ale,"baseIsEqual");MS=Ale});function IVe(t,e,r,n){var i=r.length,a=i,s=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i