1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[170],{45458:(t,e,a)=>{a.d(e,{DA:()=>b,IU:()=>B,U:()=>K,U7:()=>en,U_:()=>eh,Zk:()=>d,aP:()=>el,gh:()=>es,lC:()=>g,on:()=>ei});var l=a(60239),r=a(267),i=a(64699),n=a(56800),s=a(51273),h=a(3170),o=a(30726),d=(0,s.K2)(async(t,e,a)=>{let l,r;let o=e.useHtmlLabels||(0,s._3)(s.D7()?.htmlLabels);l=a||"node default";let d=t.insert("g").attr("class",l).attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,n.KL)(e.labelStyle));r=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,i.GZ)(c,(0,s.jZ)((0,n.Sm)(r),(0,s.D7)()),{useHtmlLabels:o,width:e.width||s.D7().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),y=g.getBBox(),f=(e?.padding??0)/2;if(o){let t=g.children[0],e=(0,h.Ltv)(g),a=t.getElementsByTagName("img");if(a){let t=""===r.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.UI.fontSize]=(0,n.I5)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,s.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return o?c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):c.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:y,halfPadding:f,label:c}},"labelHelper"),c=(0,s.K2)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s._3)(s.D7()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),o=await (0,i.GZ)(r,(0,s.jZ)((0,n.Sm)(e),(0,s.D7)()),{useHtmlLabels:l,width:a.width||s.D7()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=o.getBBox(),c=a.padding/2;if((0,s._3)(s.D7()?.flowchart?.htmlLabels)){let t=o.children[0],e=(0,h.Ltv)(o);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),g=(0,s.K2)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),y=(0,s.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function f(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function p(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,s.K2)(f,"createPathFromPoints"),(0,s.K2)(p,"generateFullSineWavePoints"),(0,s.K2)(m,"generateCirclePoints");var u=(0,s.K2)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function w(t){let e=(0,h.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=t.label;t.label&&(0,s.Wi)(t.label)&&(l=await (0,s.VJ)(t.label.replace(s.Y2.lineBreakRegex,"\n"),(0,s.D7)()));let r=t.isNode?"nodeLabel":"edgeLabel";return a.html('<span class="'+r+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+l+"</span>"),x(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,s.K2)(x,"applyStyle"),(0,s.K2)(w,"addHtmlLabel");var b=(0,s.K2)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)
1){r=r.replace(/\\n|\n/g,"<br />"),s.Rm.info("vertexText"+r);let t={isNode:l,label:(0,n.Sm)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await w(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),$=(0,s.K2)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,0,0,1,t+a,e+r,"V",e+l-r,"A",r,r,0,0,1,t+a-r,e+l,"H",t+r,"A",r,r,0,0,1,t,e+l-r,"V",e+r,"A",r,r,0,0,1,t+r,e,"Z"].join(" "),"createRoundedRectPathD"),k=(0,s.K2)(async(t,e)=>{let a;s.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:d,handDrawnSeed:c}=n,{clusterBkg:g,clusterBorder:y}=d,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:x}=(0,r.GX)(e),w=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),b=(0,s._3)(n.flowchart.htmlLabels),k=w.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0}),M=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,h.Ltv)(S);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let D=e.width<=M.width+e.padding?M.width+e.padding:e.width;e.width<=M.width+e.padding?e.diff=(D-e.width)/2-e.padding:e.diff=-e.padding;let A=e.height,v=e.x-D/2,K=e.y-A/2;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=o.A.svg(w),l=(0,r.Fr)(e,{roughness:.7,fill:g,stroke:y,fillWeight:3,seed:c}),i=t.path($(v,K,D,A,0),l);(a=w.insert(()=>(s.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=w.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",K).attr("width",D).attr("height",A);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(k.attr("transform",`translate(${e.x-M.width/2}, ${e.y-e.height/2+B})`),f){let t=k.select("span");t&&t.attr("style",f)}let C=a.node().getBBox();return e.offsetX=0,e.width=C.width,e.height=C.height,e.offsetY=M.height-e.padding/2,e.intersect=function(t){return u(e,t)},{cluster:w,labelBBox:M}},"rect"),S=(0,s.K2)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return u(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),M=(0,s.K2)(async(t,e)=>{let a;let l=(0,s.D7)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:d,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),m=y.append("rect"),x=p.node().appendChild(await b(e.label,e.labelStyle,void 0,!0)),w=x.getBBox();if((0,s._3)(l.flowchart.htmlLabels)){let t=x.children[0],e=(0,h.Ltv)(x);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}let k=0*e.padding,S=(e.width<=w.width+e.padding?w.width+e.padding:e.width)+k;e.width<=w.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;let M=e.height+k,D=e.height+k-w.height-6,A=e.x-S/2,v=e.y-M/2;e.width=S;let K=e.y-e.height/2-k/2+w.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=o.A.svg(y),r=e.rx||e.ry?l.path($(A,v,S,M,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(A,v,S,M,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(A,K,S,D,{fill:t?n:d,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),m=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",S).attr("height",M).attr("data-look",e.look),m.attr("class","inner").attr("x",A).attr("y",K
1).attr("width",S).attr("height",D);p.attr("transform",`translate(${e.x-w.width/2}, ${v+1-((0,s._3)(l.flowchart.htmlLabels)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=w.height-e.padding/2,e.labelBBox=w,e.intersect=function(t){return u(e,t)},{cluster:y,labelBBox:w}},"roundedWithTitle"),D=(0,s.K2)(async(t,e)=>{let a;s.Rm.info("Creating subgraph rect for ",e.id,e);let n=(0,s.D7)(),{themeVariables:d,handDrawnSeed:c}=n,{clusterBkg:g,clusterBorder:y}=d,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:x}=(0,r.GX)(e),w=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),b=(0,s._3)(n.flowchart.htmlLabels),k=w.insert("g").attr("class","cluster-label "),S=await (0,i.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),M=S.getBBox();if((0,s._3)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,h.Ltv)(S);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let D=e.width<=M.width+e.padding?M.width+e.padding:e.width;e.width<=M.width+e.padding?e.diff=(D-e.width)/2-e.padding:e.diff=-e.padding;let A=e.height,v=e.x-D/2,K=e.y-A/2;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=o.A.svg(w),l=(0,r.Fr)(e,{roughness:.7,fill:g,stroke:y,fillWeight:4,seed:c}),i=t.path($(v,K,D,A,e.rx),l);(a=w.insert(()=>(s.Rm.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=w.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",K).attr("width",D).attr("height",A);let{subGraphTitleTopMargin:B}=(0,l.O)(n);if(k.attr("transform",`translate(${e.x-M.width/2}, ${e.y-e.height/2+B})`),f){let t=k.select("span");t&&t.attr("style",f)}let C=a.node().getBBox();return e.offsetX=0,e.width=C.width,e.height=C.height,e.offsetY=M.height-e.padding/2,e.intersect=function(t){return u(e,t)},{cluster:w,labelBBox:M}},"kanbanSection"),A={rect:k,squareRect:k,roundedWithTitle:M,noteGroup:S,divider:(0,s.K2)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:r}=(0,s.D7)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),d=0*e.padding,c=e.width+d;e.diff=-e.padding;let g=e.height+d,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=o.A.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);let p=a.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return u(e,t)},{cluster:n,labelBBox:{}}}
1,"divider"),kanbanSection:D},v=new Map,K=(0,s.K2)(async(t,e)=>{let a=e.shape||"rect",l=await A[a](t,e);return v.set(e.id,l),l},"insertCluster"),B=(0,s.K2)(()=>{v=new Map},"clear");function C(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function N(t,e,a){return C(t,e,e,a)}function L(t,e,a,l){var r,i,n,s,h,o,d,c,g,y,f,p,m;if(r=e.y-t.y,n=t.x-e.x,h=e.x*t.y-t.x*e.y,g=r*a.x+n*a.y+h,y=r*l.x+n*l.y+h,!(0!==g&&0!==y&&R(g,y))&&(i=l.y-a.y,s=a.x-l.x,o=l.x*a.y-a.x*l.y,d=i*t.x+s*t.y+o,c=i*e.x+s*e.y+o,!(0!==d&&0!==c&&R(d,c))&&0!=(f=r*s-i*n)))return p=Math.abs(f/2),{x:(m=n*o-s*h)<0?(m-p)/f:(m+p)/f,y:(m=i*h-r*o)<0?(m-p)/f:(m+p)/f}}function R(t,e){return t*e>0}function P(t,e,a){let l=t.x,r=t.y,i=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=L(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:i===h?0:1}),i[0]):t}(0,s.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,s.K2)(C,"intersectEllipse"),(0,s.K2)(N,"intersectCircle"),(0,s.K2)(L,"intersectLine"),(0,s.K2)(R,"sameSign"),(0,s.K2)(P,"intersectPolygon");var F={circle:N,polygon:P,rect:u};function X(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=y(e),i=l;l||(i="anchor");let h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:d}=e,c=o.A.svg(h),f=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);let p=c.circle(0,0,2,f),m=h.insert(()=>p,":first-child");return m.attr("class","anchor").attr("style",(0,n.KL)(d)),g(e,m),e.intersect=function(t){return s.Rm.info("Circle intersect",e,1,t),F.circle(e,1,t)},h}function G(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function I(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=n.width+e.padding+20,h=n.height+e.padding,c=h/2,p=c/(2.5+h/50),{cssStyles:m}=e,u=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...G(-s/2,-h/2,-s/2,h/2,p,c,!1),{x:s/2,y:h/2},...G(s/2,h/2,s/2,-h/2,p,c,!0)],x=o.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=f(u),$=x.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${p/2}, 0)`),g(e,k),e.intersect=function(t){return F.polygon(e,u,t)},i}function T(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function W(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await d(t,e,y(e)),h=s.height+e.padding,c=s.width+e.padding+12,p=-h,m=[{x:12,y:p},{x:c,y:p},{x:c,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}],{cssStyles:u}=e;
1if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=f(m),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&a.attr("style",u)}else a=T(n,c,h,m);return i&&a.attr("style",i),g(e,a),e.intersect=function(t){return F.polygon(e,m,t)},n}function _(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=o.A.svg(l),d=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=f(s),g=h.path(c,d),p=l.insert(()=>g,":first-child");return i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return F.polygon(e,s,t)},l}async function E(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:h,bbox:c,halfPadding:f}=await d(t,e,y(e)),p=c.width/2+f,{cssStyles:m}=e;if("handDrawn"===e.look){let t=o.A.svg(h),l=(0,r.Fr)(e,{}),i=t.circle(0,0,2*p,l);(a=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(m))}else a=h.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0);return g(e,a),e.intersect=function(t){return s.Rm.info("Circle intersect",e,p,t),F.circle(e,p,t)},h}function H(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y} 2 M ${r.x},${r.y} L ${n.x},${n.y}`}function j(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:h}=e,d=o.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let f=d.circle(0,0,2*n,c),p=H(n),m=d.path(p,c),u=i.insert(()=>f,":first-child");return u.insert(()=>m),h&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",h),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),g(e,u),e.intersect=function(t){return s.Rm.info("crossedCircle intersect",e,{radius:n,point:t}),F.circle(e,n,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function q(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=n.width+(e.padding??0),c=n.height+(e.padding??0),p=Math.max(5,.1*c),{cssStyles:m}=e,u=[...z(h/2,-c/2,p,30,-90,0),{x:-h/2-p,y:p},...z(h/2+2*p,-p,p,20,-180,-270),...z(h/2+2*p,p,p,20,-90,-180),{x:-h/2-p,y:-c/2},...z(h/2,c/2,p,20,0,90)],x=[{x:h/2,y:-c/2-p},{x:-h/2,y:-c/2-p}
2,...z(h/2,-c/2,p,20,-90,0),{x:-h/2-p,y:-p},...z(h/2+.1*h,-p,p,20,-180,-270),...z(h/2+.1*h,p,p,20,-90,-180),{x:-h/2-p,y:c/2},...z(h/2,c/2,p,20,0,90),{x:-h/2,y:c/2+p},{x:h/2,y:c/2+p}],w=o.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=f(u).replace("Z",""),k=w.path($,b),S=f(x),M=w.path(S,{...b}),D=i.insert("g",":first-child");return D.insert(()=>M,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-h/2+p-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),g(e,D),e.intersect=function(t){return F.polygon(e,x,t)},i}function O(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function Z(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=n.width+(e.padding??0),c=n.height+(e.padding??0),p=Math.max(5,.1*c),{cssStyles:m}
2=e,u=[...O(h/2,-c/2,p,20,-90,0),{x:h/2+p,y:-p},...O(h/2+2*p,-p,p,20,-180,-270),...O(h/2+2*p,p,p,20,-90,-180),{x:h/2+p,y:c/2},...O(h/2,c/2,p,20,0,90)],x=[{x:-h/2,y:-c/2-p},{x:h/2,y:-c/2-p},...O(h/2,-c/2,p,20,-90,0),{x:h/2+p,y:-p},...O(h/2+2*p,-p,p,20,-180,-270),...O(h/2+2*p,p,p,20,-90,-180),{x:h/2+p,y:c/2},...O(h/2,c/2,p,20,0,90),{x:h/2,y:c/2+p},{x:-h/2,y:c/2+p}],w=o.A.svg(i),b=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=f(u).replace("Z",""),k=w.path($,b),S=f(x),M=w.path(S,{...b}),D=i.insert("g",":first-child");return D.insert(()=>M,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),g(e,D),e.intersect=function(t){return F.polygon(e,x,t)},i}function Y(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function U(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=n.width+(e.padding??0),c=n.height+(e.padding??0),p=Math.max(5,.1*c),{cssStyles:m}=e,u=[...Y(h/2,-c/2,p,30,-90,0),{x:-h/2-p,y:p},...Y(h/2+2*p,-p,p,20,-180,-270),...Y(h/2+2*p,p,p,20,-90,-180),{x:-h/2-p,y:-c/2},...Y(h/2,c/2,p,20,0,90)],x=[...Y(-h/2+p+p/2,-c/2,p,20,-90,-180),{x:h/2-p/2,y:p},...Y(-h/2-p/2,-p,p,20,0,90),...Y(-h/2-p/2,p,p,20,-90,0),{x:h/2-p/2,y:-p},...Y(-h/2+p+p/2,c/2,p,30,-180,-270)],w=[{x:h/2,y:-c/2-p},{x:-h/2,y:-c/2-p}
2,...Y(h/2,-c/2,p,20,-90,0),{x:-h/2-p,y:-p},...Y(h/2+2*p,-p,p,20,-180,-270),...Y(h/2+2*p,p,p,20,-90,-180),{x:-h/2-p,y:c/2},...Y(h/2,c/2,p,20,0,90),{x:-h/2,y:c/2+p},{x:h/2-p-p/2,y:c/2+p},...Y(-h/2+p+p/2,-c/2,p,20,-90,-180),{x:h/2-p/2,y:p},...Y(-h/2-p/2,-p,p,20,0,90),...Y(-h/2-p/2,p,p,20,-90,0),{x:h/2-p/2,y:-p},...Y(-h/2+p+p/2,c/2,p,30,-180,-270)],b=o.A.svg(i),$=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=f(u).replace("Z",""),S=b.path(k,$),M=f(x).replace("Z",""),D=b.path(M,$),A=f(w),v=b.path(A,{...$}),K=i.insert("g",":first-child");return K.insert(()=>v,":first-child").attr("stroke-opacity",0),K.insert(()=>S,":first-child"),K.insert(()=>D,":first-child"),K.attr("class","text"),m&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",l),K.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),g(e,K),e.intersect=function(t){return F.polygon(e,w,t)},i}async function V(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),c=h/2,{cssStyles:p}=e,u=o.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=s-c,b=h/4,$=[{x:w,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:w,y:h},...m(-w,-h/2,c,50,270,90)],k=f($),S=u.path(k,x),M=i.insert(()=>S,":first-child");return M.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(${-s/2}, ${-h/2})`),g(e,M),e.intersect=function(t){return F.polygon(e,$,t)},i}(0,s.K2)(X,"anchor"),(0,s.K2)(G,"generateArcPoints"),(0,s.K2)(I,"bowTieRect"),(0,s.K2)(T,"insertPolygonShape"),(0,s.K2)(W,"card"),(0,s.K2)(_,"choice"),(0,s.K2)(E,"circle"),(0,s.K2)(H,"createLine"),(0,s.K2)(j,"crossedCircle"),(0,s.K2)(z,"generateCirclePoints"),(0,s.K2)(q,"curlyBraceLeft"),(0,s.K2)(O,"generateCirclePoints"),(0,s.K2)(Z,"curlyBraceRight"),(0,s.K2)(Y,"generateCirclePoints"),(0,s.K2)(U,"curlyBraces"),(0,s.K2)(V,"curvedTrapezoid");var J=(0,s.K2)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),Q=(0,s.K2)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),tt=(0,s.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function te(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:c}=await d(t,e,y(e)),f=Math.max(h.width+e.padding,e.width??0),p=f/2,m=p/(2.5+f/50),u=Math.max(h.height+m+e.padding,e.height??0),{cssStyles:x}=e;if("handDrawn"===e.look){let t=o.A.svg(s),l=Q(0,0,f,u,p,m),i=tt(0,m,f,u,p,m),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=J(0,0,f,u,p,m);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(x)).attr("style",i)}return a.attr("label-offset-y",m),a.attr("transform",`translate(${-f/2}, ${-(u/2+m)})`),g(e,a),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=F.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-m)){let r=m*m*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=m-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function ta(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=n.width+e.padding,c=n.height+e.padding,f=.2*c,p=-h/2,m=-c/2-f/2,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=x.polygon([{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}].map(t=>[t.x,t.y]),w),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)
2/2-(n.x-(n.left??0))}, ${m+f+(e.padding??0)/2-(n.y-(n.top??0))})`),g(e,$),e.intersect=function(t){return F.rect(e,t)},i}async function tl(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:h,bbox:c,halfPadding:f}=await d(t,e,y(e)),p=c.width/2+f+5,m=c.width/2+f,{cssStyles:u}=e;if("handDrawn"===e.look){let t=o.A.svg(h),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*p,l),d=t.circle(0,0,2*m,i);(a=h.insert("g",":first-child")).attr("class",(0,n.KL)(e.cssClasses)).attr("style",(0,n.KL)(u)),a.node()?.appendChild(s),a.node()?.appendChild(d)}else{let t=(a=h.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",m).attr("cx",0).attr("cy",0)}return g(e,a),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,p,t),F.circle(e,p,t)},h}function tr(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,d=o.A.svg(n),{nodeBorder:c}=a,f=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(f.roughness=0);let p=d.circle(0,0,14,f),m=n.insert(()=>p,":first-child");return m.selectAll("path").attr("style",`fill: ${c} !important;`),h&&h.length>0&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),g(e,m),e.intersect=function(t){return s.Rm.info("filledCircle intersect",e,{radius:7,point:t}),F.circle(e,7,t)},n}async function ti(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:h}=await d(t,e,y(e)),c=n.width+(e.padding??0),p=c+n.height,m=c+n.height,u=[{x:0,y:-p},{x:m,y:-p},{x:m/2,y:0}],{cssStyles:x}=e,w=o.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=f(u),k=w.path($,b),S=i.insert(()=>k,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`);return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=c,e.height=p,g(e,S),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-p/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,u,t),F.polygon(e,u,t)},i}function tn(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,d=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(d=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let f=-1*d/2,p=-1*c/2,m=o.A.svg(s),u=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let x=m.rectangle(f,p,d,c,u),w=s.insert(()=>x,":first-child");h&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),g(e,w);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return F.rect(e,t)},s}async function ts(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),h=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),c=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),p=c/2,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-h/2,y:-c/2},{x:h/2-p,y:-c/2},...m(-h/2+p,0,p,50,90,270),{x:h/2-p,y:c/2},{x:-h/2,y:c/2}],$=f(b),k=x.path($,w),S=i.insert(()=>k,":first-child");return S.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),g(e,S),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{radius:p,point:t}),F.polygon(e,b,t)},i}(0,s.K2)(te,"cylinder"),(0,s.K2)(ta,"dividedRectangle"),(0,s.K2)(tl,"doublecircle"),(0,s.K2)(tr,"filledCircle"),(0,s.K2)(ti,"flippedTriangle"),(0,s.K2)(tn,"forkJoin"),(0,s.K2)(ts,"halfRoundedRectangle");var th=(0,s.K2)((t,e,a,l,r)=>`M${t+r},${e} L${t+a-r},${e} L${t+a},${e-l/2} L${t+a-r},${e-l} L${t+r},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function to(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}
2=await d(t,e,y(e)),h=s.height+e.padding,c=h/4,f=s.width+2*c+e.padding,p=[{x:c,y:0},{x:f-c,y:0},{x:f,y:-h/2},{x:f-c,y:-h},{x:c,y:-h},{x:0,y:-h/2}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=th(0,0,f,h,c),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-f/2}, ${h/2})`),m&&a.attr("style",m)}else a=T(n,f,h,p);return i&&a.attr("style",i),e.width=f,e.height=h,g(e,a),e.intersect=function(t){return F.polygon(e,p,t)},n}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await d(t,e,y(e)),n=Math.max(30,e?.width??0),h=Math.max(30,e?.height??0),{cssStyles:c}=e,p=o.A.svg(i),m=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let u=[{x:0,y:0},{x:n,y:0},{x:0,y:h},{x:n,y:h}],x=f(u),w=p.path(x,m),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",c),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-h/2})`),g(e,b),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{points:u}),F.polygon(e,u,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let h=Math.max(e.assetHeight??48,e.assetWidth??48),c=l?.wrappingWidth;e.width=Math.max(h,c??0);let{shapeSvg:y,bbox:f,label:p}=await d(t,e,"icon-shape default"),m="t"===e.pos,{nodeBorder:u}=a,{stylesMap:x}=(0,r.WW)(e),w=-h/2,b=-h/2,$=e.label?8:0,k=o.A.svg(y),S=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=k.rectangle(w,b,h,h,S),D=Math.max(h,f.width),A=h+f.height+$,v=k.rectangle(-D/2,-A/2,D,A,{...S,fill:"transparent",stroke:"none"}),K=y.insert(()=>M,":first-child"),B=y.insert(()=>v);if(e.icon){let t=y.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+$/2-r/2-s:-f.height/2-$/2-r/2-s})`),t.attr("style",`color: ${x.get("stroke")??u};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-A/2:A/2-f.height})`),K.attr("transform",`translate(0,${m?f.height/2+$/2:-f.height/2-$/2})`),g(e,B),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+$},{x:a+h/2,y:l-r/2+f.height+$},{x:a+h/2,y:l+r/2},{x:a-h/2,y:l+r/2},{x:a-h/2,y:l-r/2+f.height+$},{x:a-f.width/2,y:l-r/2+f.height+$}]:[{x:a-h/2,y:l-r/2},{x:a+h/2,y:l-r/2},{x:a+h/2,y:l-r/2+h},{x:a+f.width/2,y:l-r/2+h},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+h},{x:a-h/2,y:l-r/2+h}],F.polygon(e,i,t)},y}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let h=Math.max(e.assetHeight??48,e.assetWidth??48),c=l?.wrappingWidth;e.width=Math.max(h,c??0);let{shapeSvg:y,bbox:f,label:p}=await d(t,e,"icon-shape default"),m=e.label?8:0,u="t"===e.pos,{nodeBorder:x,mainBkg:w}=a,{stylesMap:b}=(0,r.WW)(e),$=o.A.svg(y),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=b.get("fill");k.stroke=S??w;let M=y.append("g");e.icon&&M.html(`<g>${await (0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let D=M.node().getBBox(),A=D.width,v=D.height,K=D.x,B=D.y,C=Math.max(A,v)*Math.SQRT2+40,N=$.circle(0,0,C,k),L=Math.max(C,f.width),R=C+f.height+m,P=$.rectangle(-L/2,-R/2,L,R,{...k,fill:"transparent",stroke:"none"}),X=y.insert(()=>N,":first-child"),G=y.insert(()=>P);return M.attr("transform",`translate(${-A/2-K},${u?f.height/2+m/2-v/2-B:-f.height/2-m/2-v/2-B})`),M.attr("style",`color: ${b.get("stroke")??x};`),p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-R/2:R/2-f.height})`),X.attr("transform",`translate(0,${u?f.height/2+m/2:-f.height/2-m/2})`),g(e,G),e.intersect=function(t){return s.Rm.info("iconSquare intersect",e,t),F.rect(e,t)},y}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}
2){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let h=Math.max(e.assetHeight??48,e.assetWidth??48),c=l?.wrappingWidth;e.width=Math.max(h,c??0);let{shapeSvg:y,bbox:f,halfPadding:p,label:m}=await d(t,e,"icon-shape default"),u="t"===e.pos,x=h+2*p,w=h+2*p,{nodeBorder:b,mainBkg:k}=a,{stylesMap:S}=(0,r.WW)(e),M=e.label?8:0,D=o.A.svg(y),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=S.get("fill");A.stroke=v??k;let K=D.path($(-w/2,-x/2,w,x,5),A),B=Math.max(w,f.width),C=x+f.height+M,N=D.rectangle(-B/2,-C/2,B,C,{...A,fill:"transparent",stroke:"none"}),L=y.insert(()=>K,":first-child").attr("class","icon-shape2"),R=y.insert(()=>N);if(e.icon){let t=y.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-l/2-n},${u?f.height/2+M/2-r/2-s:-f.height/2-M/2-r/2-s})`),t.attr("style",`color: ${S.get("stroke")??b};`)}return m.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-C/2:C/2-f.height})`),L.attr("transform",`translate(0,${u?f.height/2+M/2:-f.height/2-M/2})`),g(e,R),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+M},{x:a+w/2,y:l-r/2+f.height+M},{x:a+w/2,y:l+r/2},{x:a-w/2,y:l+r/2},{x:a-w/2,y:l-r/2+f.height+M},{x:a-f.width/2,y:l-r/2+f.height+M}]:[{x:a-w/2,y:l-r/2},{x:a+w/2,y:l-r/2},{x:a+w/2,y:l-r/2+x},{x:a+f.width/2,y:l-r/2+x},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+x},{x:a-w/2,y:l-r/2+x}],F.polygon(e,i,t)},y}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let h=Math.max(e.assetHeight??48,e.assetWidth??48),c=l?.wrappingWidth;e.width=Math.max(h,c??0);let{shapeSvg:y,bbox:f,halfPadding:p,label:m}=await d(t,e,"icon-shape default"),u="t"===e.pos,x=h+2*p,w=h+2*p,{nodeBorder:b,mainBkg:k}=a,{stylesMap:S}=(0,r.WW)(e),M=e.label?8:0,D=o.A.svg(y),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=S.get("fill");A.stroke=v??k;let K=D.path($(-w/2,-x/2,w,x,.1),A),B=Math.max(w,f.width),C=x+f.height+M,N=D.rectangle(-B/2,-C/2,B,C,{...A,fill:"transparent",stroke:"none"}),L=y.insert(()=>K,":first-child"),R=y.insert(()=>N);if(e.icon){let t=y.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,s=a.y;t.attr("transform",`translate(${-l/2-n},${u?f.height/2+M/2-r/2-s:-f.height/2-M/2-r/2-s})`),t.attr("style",`color: ${S.get("stroke")??b};`)}return m.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-C/2:C/2-f.height})`),L.attr("transform",`translate(0,${u?f.height/2+M/2:-f.height/2-M/2})`),g(e,R),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+M},{x:a+w/2,y:l-r/2+f.height+M},{x:a+w/2,y:l+r/2},{x:a-w/2,y:l+r/2},{x:a-w/2,y:l-r/2+f.height+M},{x:a-f.width/2,y:l-r/2+f.height+M}]:[{x:a-w/2,y:l-r/2},{x:a+w/2,y:l-r/2},{x:a+w/2,y:l-r/2+x},{x:a+f.width/2,y:l-r/2+x},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+x},{x:a-w/2,y:l-r/2+x}],F.polygon(e,i,t)},y}async function tp(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:h}=(0,r.GX)(e);e.labelStyle=h;let c=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let y=Math.max(e.label?c??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:y,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,c??0);let{shapeSvg:m,bbox:u,label:x}=await d(t,e,"image-shape default"),w="t"===e.pos,b=-f/2,$=e.label?8:0,k=o.A.svg(m),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=k.rectangle(b,-p/2,f,p,S),D=Math.max(f,u.width),A=p+u.height+$,v=k.rectangle(-D/2,-A/2,D,A,{...S,fill:"none",stroke:"none"}),K=m.insert(()=>M,":first-child"),B=m.insert(()=>v);if(e.img){let t=m.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${w?A/2-p:-A/2})`)}return x.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${w?-p/2-u.height/2-$/2:p/2-u.height/2+$/2})`),K.attr("transform",`translate(0,${w?u.height/2+$/2:-u.height/2-$/2})`),g(e,B),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return F.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=w?[{x:a-u.width/2,y:l-r/2},{x:a+u.width/2,y:l-r/2},{x:a+u.width/2,y:l-r/2+u.height+$},{x:a+f/2,y:l-r/2+u.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+u.height+$},{x:a-u.width/2,y:l-r/2+u.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+u.width/2,y:l-r/2+p},{x:a+u.width/2/2,y:l+r/2},{x:a-u.width/2,y:l+r/2},{x:a-u.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],F.polygon(e,i,t)},m}async function tm(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await d(t,e,y(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),c=Math.max(s.height+(e.padding??0)*2,e?.height??0),p=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}],{cssStyles:m}=e;
2if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=f(p),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),m&&a.attr("style",m)}else a=T(n,h,c,p);return i&&a.attr("style",i),e.width=h,e.height=c,g(e,a),e.intersect=function(t){return F.polygon(e,p,t)},n}async function tu(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:h,bbox:c}=await d(t,e,y(e)),f=Math.max(c.width+2*a.labelPaddingX,e?.width||0),p=Math.max(c.height+2*a.labelPaddingY,e?.height||0),m=-f/2,u=-p/2,{rx:x,ry:w}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(x=a.rx,w=a.ry),"handDrawn"===e.look){let t=o.A.svg(h),a=(0,r.Fr)(e,{}),i=x||w?t.path($(m,u,f,p,x||0),a):t.rectangle(m,u,f,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.KL)(x)).attr("ry",(0,n.KL)(w)).attr("x",m).attr("y",u).attr("width",f).attr("height",p);return g(e,l),e.intersect=function(t){return F.rect(e,t)},h}async function tx(t,e){let{shapeSvg:a,bbox:l,label:r}=await d(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),g(e,i),e.intersect=function(t){return F.rect(e,t)},a}async function tw(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await d(t,e,y(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),c=Math.max(s.height+(e.padding??0),e?.height??0),p=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}],{cssStyles:m}=e;
2if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=f(p),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),m&&a.attr("style",m)}else a=T(n,h,c,p);return i&&a.attr("style",i),e.width=h,e.height=c,g(e,a),e.intersect=function(t){return F.polygon(e,p,t)},n}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await d(t,e,y(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),c=Math.max(s.height+(e.padding??0),e?.height??0),p=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=f(p),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),m&&a.attr("style",m)}else a=T(n,h,c,p);return i&&a.attr("style",i),e.width=h,e.height=c,g(e,a),e.intersect=function(t){return F.polygon(e,p,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",y(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,h=Math.max(35,e?.width??0),d=Math.max(35,e?.height??0),c=[{x:h,y:0},{x:0,y:d+3.5},{x:h-14,y:d+3.5},{x:0,y:2*d},{x:h,y:d-3.5},{x:14,y:d-3.5}],p=o.A.svg(i),m=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let u=f(c),x=p.path(u,m),w=i.insert(()=>x,":first-child");return n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",l),w.attr("transform",`translate(-${h/2},${-d})`),g(e,w),e.intersect=function(t){return s.Rm.info("lightningBolt intersect",e,t),F.polygon(e,c,t)},i}(0,s.K2)(to,"hexagon"),(0,s.K2)(td,"hourglass"),(0,s.K2)(tc,"icon"),(0,s.K2)(tg,"iconCircle"),(0,s.K2)(ty,"iconRounded"),(0,s.K2)(tf,"iconSquare"),(0,s.K2)(tp,"imageSquare"),(0,s.K2)(tm,"inv_trapezoid"),(0,s.K2)(tu,"drawRect"),(0,s.K2)(tx,"labelRect"),(0,s.K2)(tw,"lean_left"),(0,s.K2)(tb,"lean_right"),(0,s.K2)(t$,"lightningBolt");var tk=(0,s.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tS=(0,s.K2)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tM=(0,s.K2)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:c}=await d(t,e,y(e)),f=Math.max(h.width+(e.padding??0),e.width??0),p=f/2,m=p/(2.5+f/50),u=Math.max(h.height+m+(e.padding??0),e.height??0),x=.1*u,{cssStyles:w}=e;if("handDrawn"===e.look){let t=o.A.svg(s),l=tS(0,0,f,u,p,m,x),i=tM(0,m,f,u,p,m),n=(0,r.Fr)(e,{}),h=t.path(l,n),d=t.path(i,n);s.insert(()=>d,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=tk(0,0,f,u,p,m,x);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(w)).attr("style",i)}return a.attr("label-offset-y",m),a.attr("transform",`translate(${-f/2}, ${-(u/2+m)})`),g(e,a),c.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+m-(h.y-(h.top??0))})`),e.intersect=function(t){let a=F.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-m)){let r=m*m*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=m-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),f=c/4,m=c+f,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-m/2},{x:-h/2-h/2*.1,y:m/2},...p(-h/2-h/2*.1,m/2,h/2+h/2*.1,m/2,f,.8),{x:h/2+h/2*.1,y:-m/2},{x:-h/2-h/2*.1,y:-m/2},{x:-h/2,y:-m/2},{x:-h/2,y:m/2*1.1},{x:-h/2,y:-m/2}],$=x.polygon(b.map(t=>[t.x,t.y]),w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-f/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)-f/2-(n.y-(n.top??0))}
2)`),g(e,k),e.intersect=function(t){return F.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),p=-h/2,m=-c/2,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:p-5,y:m+5},{x:p-5,y:m+c+5},{x:p+h-5,y:m+c+5},{x:p+h-5,y:m+c},{x:p+h,y:m+c},{x:p+h,y:m+c-5},{x:p+h+5,y:m+c-5},{x:p+h+5,y:m-5},{x:p+5,y:m-5},{x:p+5,y:m},{x:p,y:m},{x:p,y:m+5}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=f(b),k=x.path($,w),S=f([{x:p,y:m+5},{x:p+h-5,y:m+5},{x:p+h-5,y:m+c},{x:p+h,y:m+c},{x:p+h,y:m},{x:p,y:m}]),M=x.path(S,{...w,fill:"none"}),D=i.insert(()=>M,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),g(e,D),e.intersect=function(t){return F.polygon(e,b,t)},i}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=c/4,u=c+m,x=-h/2,w=-u/2,{cssStyles:b}=e,$=p(x-5,w+u+5,x+h-5,w+u+5,m,.8),k=$?.[$.length-1],S=[{x:x-5,y:w+5},{x:x-5,y:w+u+5},...$,{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:k.y-10},{x:x+h+5,y:k.y-10},{x:x+h+5,y:w-5},{x:x+5,y:w-5},{x:x+5,y:w},{x,y:w},{x,y:w+5}],M=[{x,y:w+5},{x:x+h-5,y:w+5},{x:x+h-5,y:k.y-5},{x:x+h,y:k.y-5},{x:x+h,y:w},{x,y:w}],D=o.A.svg(i),A=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=f(S),K=D.path(v,A),B=f(M),C=D.path(B,A),N=i.insert(()=>K,":first-child");return N.insert(()=>C),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-m/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-m/2-(n.y-(n.top??0))})`),g(e,N),e.intersect=function(t){return F.polygon(e,S,t)},i}async function tB(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||s.zj().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:c}=await d(t,e,y(e)),f=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:m}=e,u=o.A.svg(n),x=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let w=u.rectangle(-f/2,-p/2,f,p,x),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),c.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),g(e,b),e.intersect=function(t){return F.rect(e,t)},n}(0,s.K2)(tD,"linedCylinder"),(0,s.K2)(tA,"linedWaveEdgedRect"),(0,s.K2)(tv,"multiRect"),(0,s.K2)(tK,"multiWaveEdgedRectangle"),(0,s.K2)(tB,"note");var tC=(0,s.K2)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tN(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:h}=await d(t,e,y(e)),c=h.width+e.padding+(h.height+e.padding),f=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],{cssStyles:p}=e;if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=tC(0,0,c),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`),p&&a.attr("style",p)}else a=T(n,c,c,f);return i&&a.attr("style",i),g(e,a),e.intersect=function(t){return s.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",F.polygon(e,f,t)),F.polygon(e,f,t)},n}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),c=Math.max(n.height+(e.padding??0),e?.height??0),p=-h/2,m=-c/2,u=m/2,x=[{x:p+u,y:m},{x:p,y:0},{x:p+u,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:w}=e,b=o.A.svg(i),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=f(x),S=b.path(k,$),M=i.insert(()=>S,":first-child");return M.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),M.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),g(e,M),e.intersect=function(t){return F.polygon(e,x,t)},i}async function tR(t,e){let a,l,i;let{labelStyles:n,nodeStyles:d}=(0,r.GX)(e);
2e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let c=t.insert("g").attr("class",a).attr("id",e.domId||e.id),y=c.insert("g"),f=c.insert("g").attr("class","label").attr("style",d),p=e.description,m=e.label,u=f.node().appendChild(await b(m,e.labelStyle,!0,!0)),x={width:0,height:0};if((0,s._3)(s.D7()?.flowchart?.htmlLabels)){let t=u.children[0],e=(0,h.Ltv)(u);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}s.Rm.info("Text 2",p);let w=p||[],k=u.getBBox(),S=f.node().appendChild(await b(w.join?w.join("<br/>"):w,e.labelStyle,!0,!0)),M=S.children[0],D=(0,h.Ltv)(S);x=M.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height);let A=(e.padding||0)/2;(0,h.Ltv)(S).attr("transform","translate( "+(x.width>k.width?0:(k.width-x.width)/2)+", "+(k.height+A+5)+")"),(0,h.Ltv)(u).attr("transform","translate( "+(x.width<k.width?0:-(k.width-x.width)/2)+", 0)"),x=f.node().getBBox(),f.attr("transform","translate("+-x.width/2+", "+(-x.height/2-A+3)+")");let v=x.width+(e.padding||0),K=x.height+(e.padding||0),B=-x.width/2-A,C=-x.height/2-A;if("handDrawn"===e.look){let t=o.A.svg(c),a=(0,r.Fr)(e,{}),n=t.path($(B,C,v,K,e.rx||0),a),h=t.line(-x.width/2-A,-x.height/2-A+k.height+A,x.width/2+A,-x.height/2-A+k.height+A,a);i=c.insert(()=>(s.Rm.debug("Rough node insert CXC",n),h),":first-child"),l=c.insert(()=>(s.Rm.debug("Rough node insert CXC",n),n),":first-child")}else l=y.insert("rect",":first-child"),i=y.insert("line"),l.attr("class","outer title-state").attr("style",d).attr("x",-x.width/2-A).attr("y",-x.height/2-A).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-A).attr("x2",x.width/2+A).attr("y1",-x.height/2-A+k.height+A).attr("y2",-x.height/2-A+k.height+A);return g(e,l),e.intersect=function(t){return F.rect(e,t)},c}async function tP(t,e){let a={rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tu(t,e,a)}async function tF(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await d(t,e,y(e)),c=e?.padding??0,f=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),m=-s.width/2-c,u=-s.height/2-c,{cssStyles:x}=e,w=o.A.svg(i),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.polygon([{x:m,y:u},{x:m+f+8,y:u},{x:m+f+8,y:u+p},{x:m-8,y:u+p},{x:m-8,y:u},{x:m,y:u},{x:m,y:u+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.KL)(x)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-f/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),g(e,k),e.intersect=function(t){return F.rect(e,t)},i}async function tX(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),p=-h/2,m=-c/2,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=[{x:p,y:m},{x:p,y:m+c},{x:p+h,y:m+c},{x:p+h,y:m-c/2}],$=f(b),k=x.path($,w),S=i.insert(()=>k,":first-child");return S.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-c/4+(e.padding??0)-(n.y-(n.top??0))})`),g(e,S),e.intersect=function(t){return F.polygon(e,b,t)},i}async function tG(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tu(t,e,a)}async function tI(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h}=await d(t,e,y(e)),c=h.height+e.padding,f=h.width+c/4+e.padding,{cssStyles:p}=e;
2if("handDrawn"===e.look){let t=o.A.svg(s),l=(0,r.Fr)(e,{}),i=$(-f/2,-c/2,f,c,c/2),h=t.path(i,l);(a=s.insert(()=>h,":first-child")).attr("class","basic label-container").attr("style",(0,n.KL)(p))}else(a=s.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",c/2).attr("ry",c/2).attr("x",-f/2).attr("y",-c/2).attr("width",f).attr("height",c);return g(e,a),e.intersect=function(t){return F.rect(e,t)},s}async function tT(t,e){return tu(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function tW(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:d}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),y=o.A.svg(c),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=y.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),m=h??d,u=y.circle(0,0,5,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),x=c.insert(()=>p,":first-child");return x.insert(()=>u),n&&x.selectAll("path").attr("style",n),i&&x.selectAll("path").attr("style",i),g(e,x),e.intersect=function(t){return F.circle(e,7,t)},c}function t_(t,e,{config:{themeVariables:a}}){let l;let{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=o.A.svg(n).circle(0,0,14,(0,r.ue)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return g(e,l),e.intersect=function(t){return F.circle(e,7,t)},n}async function tE(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await d(t,e,y(e)),h=(e?.padding||0)/2,c=s.width+e.padding,f=s.height+e.padding,p=-s.width/2-h,m=-s.height/2-h,u=[{x:0,y:0},{x:c,y:0},{x:c,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if("handDrawn"===e.look){let t=o.A.svg(i),a=(0,r.Fr)(e,{}),l=t.rectangle(p-8,m,c+16,f,a),s=t.line(p,m,p,m+f,a),h=t.line(p+c,m,p+c,m+f,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let d=i.insert(()=>l,":first-child"),{cssStyles:y}=e;d.attr("class","basic label-container").attr("style",(0,n.KL)(y)),g(e,d)}else{let t=T(i,c,f,u);l&&t.attr("style",l),g(e,t)}return e.intersect=function(t){return F.polygon(e,u,t)},i}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=-s/2,p=-h/2,m=.2*h,{cssStyles:u}=e,x=o.A.svg(i),w=(0,r.Fr)(e,{}),b=[{x:c-m/2,y:p},{x:c+s+m/2,y:p},{x:c+s+m/2,y:p+h},{x:c-m/2,y:p+h}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=f(b),k=x.path($,w),S=f([{x:c+s-m/2,y:p+h},{x:c+s+m/2,y:p+h},{x:c+s+m/2,y:p+h-.2*h}]),M=x.path(S,{...w,fillStyle:"solid"}),D=i.insert(()=>M,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),g(e,D),e.intersect=function(t){return F.polygon(e,b,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=c/4,u=.2*h,x=.2*c,w=c+m,{cssStyles:b}=e,$=o.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=[{x:-h/2-h/2*.1,y:w/2},...p(-h/2-h/2*.1,w/2,h/2+h/2*.1,w/2,m,.8),{x:h/2+h/2*.1,y:-w/2},{x:-h/2-h/2*.1,y:-w/2}],M=-h/2+h/2*.1,D=-w/2-.4*x,A=[{x:M+h-u,y:(D+c)*1.4},{x:M+h,y:D+c-x},{x:M+h,y:(D+c)*.9},...p(M+h,(D+c)*1.3,M+h-u,(D+c)*1.5,-(.03*c),.5)],v=f(S),K=$.path(v,k),B=f(A),C=$.path(B,{...k,fillStyle:"solid"}),N=i.insert(()=>C,":first-child");return N.insert(()=>K,":first-child"),N.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-m/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-m/2-(n.y-(n.top??0))})`),g(e,N),e.intersect=function(t){return F.polygon(e,S,t)},i}async function tz(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),g(e,o),e.intersect=function(t){return F.rect(e,t)},i}(0,s.K2)(tN,"question"),(0,s.K2)(tL,"rect_left_inv_arrow"),(0,s.K2)(tR,"rectWithTitle"),
2(0,s.K2)(tP,"roundedRect"),(0,s.K2)(tF,"shadedProcess"),(0,s.K2)(tX,"slopedRect"),(0,s.K2)(tG,"squareRect"),(0,s.K2)(tI,"stadium"),(0,s.K2)(tT,"state"),(0,s.K2)(tW,"stateEnd"),(0,s.K2)(t_,"stateStart"),(0,s.K2)(tE,"subroutine"),(0,s.K2)(tH,"taggedRect"),(0,s.K2)(tj,"taggedWaveEdgedRectangle"),(0,s.K2)(tz,"text");var tq=(0,s.K2)((t,e,a,l,r,i)=>`M${t},${e} 3 a${r},${i} 0,0,1 0,${-l} 4 l${a},0 5 a${r},${i} 0,0,1 0,${l} 6 M${a},${-l} 7 a${r},${i} 0,0,0 0,${l} 8 l${-a},0`,"createCylinderPathD"),tO=(0,s.K2)((t,e,a,l,r,i)=>`M${t},${e} M${t+a},${e} a${r},${i} 0,0,0 0,${-l} l${-a},0 a${r},${i} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tZ=(0,s.K2)((t,e,a,l,r,i)=>`M${t+a/2},${-l/2} a${r},${i} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tY(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:c,halfPadding:f}=await d(t,e,y(e)),p="neo"===e.look?2*f:f,m=h.height+p,u=m/2,x=u/(2.5+m/50),w=h.width+x+p,{cssStyles:b}=e;if("handDrawn"===e.look){let t=o.A.svg(s),l=tO(0,0,w,m,x,u),i=tZ(0,0,w,m,x,u),n=t.path(l,(0,r.Fr)(e,{})),h=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tq(0,0,w,m,x,u);(a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.KL)(b)).attr("style",i)).attr("class","basic label-container"),b&&a.selectAll("path").attr("style",b),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",x),a.attr("transform",`translate(${-w/2}, ${m/2} )`),c.attr("transform",`translate(${-(h.width/2)-x-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),g(e,a),e.intersect=function(t){let a=F.rect(e,t),l=a.y-(e.y??0);if(0!=u&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-x)){let r=x*x*(1-l*l/(u*u));0!=r&&(r=Math.sqrt(Math.abs(r))),r=x-r,t.x-(e.x??0)>0&&(r=-r),a.x+=r}return a},s}async function tU(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await d(t,e,y(e)),h=s.width+e.padding,c=s.height+e.padding,p=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}],{cssStyles:m}=e;
8if("handDrawn"===e.look){let t=o.A.svg(n),l=(0,r.Fr)(e,{}),i=f(p),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),m&&a.attr("style",m)}else a=T(n,h,c,p);return i&&a.attr("style",i),e.width=h,e.height=c,g(e,a),e.intersect=function(t){return F.polygon(e,p,t)},n}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=Math.max(60,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:c}=e,p=o.A.svg(i),m=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let u=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],x=f(u),w=p.path(x,m),b=i.insert(()=>w,":first-child");return b.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",c),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),g(e,b),e.intersect=function(t){return F.polygon(e,u,t)},i}async function tJ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:h}=await d(t,e,y(e)),c=(0,s._3)(s.D7().flowchart?.htmlLabels),p=n.width+(e.padding??0),m=p+n.height,u=p+n.height,x=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-m}],{cssStyles:w}=e,b=o.A.svg(i),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=f(x),S=b.path(k,$),M=i.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return w&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=p,e.height=m,g(e,M),h.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,x,t),F.polygon(e,x,t)},i}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),m=c/8,u=c+m,{cssStyles:x}=e,w=70-h,b=w>0?w/2:0,$=o.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=[{x:-h/2-b,y:u/2},...p(-h/2-b,u/2,h/2+b,u/2,m,.8),{x:h/2+b,y:-u/2},{x:-h/2-b,y:-u/2}],M=f(S),D=$.path(M,k),A=i.insert(()=>D,":first-child");return A.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-m/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-c/2+(e.padding??0)-m-(n.y-(n.top??0))})`),g(e,A),e.intersect=function(t){return F.polygon(e,S,t)},i}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await d(t,e,y(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),c=s/h,m=s,u=h;m>u*c?u=m/c:m=u*c,m=Math.max(m,100);let x=Math.min(.2*(u=Math.max(u,50)),u/4),w=u+2*x,{cssStyles:b}=e,$=o.A.svg(i),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=[{x:-m/2,y:w/2},...p(-m/2,w/2,m/2,w/2,x,1),{x:m/2,y:-w/2},...p(m/2,-w/2,-m/2,-w/2,x,-1)],M=f(S),D=$.path(M,k),A=i.insert(()=>D,":first-child");return A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),g(e,A),e.intersect=function(t){return F.polygon(e,S,t)},i}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await d(t,e,y(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),c=Math.max(n.height+(e.padding??0)*2,e?.height??0),f=-h/2,p=-c/2,{cssStyles:m}=e,u=o.A.svg(i),x=(0,r.Fr)(e,{}),w=[{x:f-5,y:p-5},{x:f-5,y:p+c},{x:f+h,y:p+c},{x:f+h,y:p-5}],b=`M${f-5},${p-5} L${f+h},${p-5} L${f+h},${p+c} L${f-5},${p+c} L${f-5},${p-5} 9 M${f-5},${p} L${f+h},${p} 10 M${f},${p-5} L${f},${p+c}`;"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=u.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("transform","translate(2.5, 2.5)"),k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)+2.5-(n.x-(n.left??0))}, ${-(n.height/2)+2.5-(n.y-(n.top??0))}
10)`),g(e,k),e.intersect=function(t){return F.polygon(e,w,t)},i}async function t1(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.zj)(),{background:l}=a,r={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t1(t,r)}let a=(0,s.zj)();e.useHtmlLabels=a.htmlLabels;let l=a.er?.diagramPadding??10,i=a.er?.entityPadding??6,{cssStyles:d}=e,{labelStyles:c,nodeStyles:f}=(0,r.GX)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l,classes:""};(0,n.Un)(e.label,a)+2*r.labelPaddingX<a.er.minEntityWidth&&(e.width=a.er.minEntityWidth);let i=await tu(t,e,r);if(!(0,s._3)(a.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}a.htmlLabels||(l*=1.25,i*=1.25);let p=y(e);p||(p="node default");let m=t.insert("g").attr("class",p).attr("id",e.domId||e.id),u=await t5(m,e.label??"",a,0,0,["name"],c);u.height+=i;let x=0,w=[],b=[],$=0,k=0,S=0,M=0,D=!0,A=!0;for(let t of e.attributes){let e=await t5(m,t.type,a,0,x,["attribute-type"],c);$=Math.max($,e.width+l);let r=await t5(m,t.name,a,0,x,["attribute-name"],c);k=Math.max(k,r.width+l);let n=await t5(m,t.keys.join(),a,0,x,["attribute-keys"],c);S=Math.max(S,n.width+l);let s=await t5(m,t.comment,a,0,x,["attribute-comment"],c);M=Math.max(M,s.width+l);let h=Math.max(e.height,r.height,n.height,s.height)+i;b.push({yOffset:x,rowHeight:h}),x+=h}let v=4;S<=l&&(D=!1,S=0,v--),M<=l&&(A=!1,M=0,v--);let K=m.node().getBBox();if(u.width+2*l-($+k+S+M)>0){let t=u.width+2*l-($+k+S+M);$+=t/v,k+=t/v,S>0&&(S+=t/v),M>0&&(M+=t/v)}let B=$+k+S+M,C=o.A.svg(m),N=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let L=0;b.length>0&&(L=b.reduce((t,e)=>t+(e?.rowHeight??0),0));let R=Math.max(K.width+2*l,e?.width||0,B),P=Math.max((L??0)+u.height,e?.height||0),X=-R/2,G=-P/2;m.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,h.Ltv)(a[e]),n=r.attr("transform"),s=0,o=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[1]),o=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=$:r.attr("class").includes("attribute-keys")?s+=$+k:r.attr("class").includes("attribute-comment")&&(s+=$+k+S))}r.attr("transform",`translate(${X+l/2+s}, ${o+G+u.height+i/2})`)}),m.select(".name").attr("transform","translate("+-u.width/2+", "+(G+i/2)+")");let I=C.rectangle(X,G,R,P,N),T=m.insert(()=>I,":first-child").attr("style",d.join("")),{themeVariables:W}=(0,s.zj)(),{rowEven:_,rowOdd:E,nodeBorder:H}=W;for(let[t,e]of(w.push(0),b.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=C.rectangle(X,u.height+G+e?.yOffset,R,e?.rowHeight,{...N,fill:a?_:E,stroke:H});m.insert(()=>l,"g.label").attr("style",d.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let j=C.line(X,u.height+G,R+X,u.height+G,N);for(let t of(m.insert(()=>j).attr("class","divider"),j=C.line($+X,u.height+G,$+X,P+G,N),m.insert(()=>j).attr("class","divider"),D&&(j=C.line($+k+X,u.height+G,$+k+X,P+G,N),m.insert(()=>j).attr("class","divider")),A&&(j=C.line($+k+S+X,u.height+G,$+k+S+X,P+G,N),m.insert(()=>j).attr("class","divider")),w))j=C.line(X,u.height+G+t,R+X,u.height+G+t,N),m.insert(()=>j).attr("class","divider");if(g(e,T),f&&"handDrawn"!==e.look){let t=f.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");m.selectAll("path").attr("style",e??""),m.selectAll(".row-rect-even path").attr("style",f)}return e.intersect=function(t){return F.rect(e,t)},m}async function t5(t,e,a,l=0,r=0,o=[],d=""){let c=t.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${l}, ${r})`).attr("style",d);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,i.GZ)(c,e,{width:(0,n.Un)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let y=g.getBBox();
10if((0,s._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,h.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}async function t8(t,e,a,l,r=a.class.padding??12){let i=l?0:3,n=t.insert("g").attr("class",y(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,f=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await t3(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t3(h,e,0,["font-weight: bolder"]);let p=h.node().getBBox();g=p.height,o=n.insert("g").attr("class","members-group text");let m=0;for(let t of e.members){let e=await t3(o,t,m,[t.parseClassifier()]);m+=e+i}(f=o.node().getBBox().height)<=0&&(f=r/2),d=n.insert("g").attr("class","methods-group text");let u=0;for(let t of e.methods){let e=await t3(d,t,u,[t.parseClassifier()]);u+=e+i}let x=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-p.width/2}, ${c})`),x=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*r})`),x=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(f?f+4*r:2*r)})`),x=n.node().getBBox(),{shapeSvg:n,bbox:x}}async function t3(t,e,a,l=[]){let r;let o=t.insert("g").attr("class","label").attr("style",l.join("; ")),d=(0,s.zj)(),c="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(d.htmlLabels)??!0,g="";g="text"in e?e.text:e.label,!c&&g.startsWith("\\")&&(g=g.substring(1)),(0,s.Wi)(g)&&(c=!0);let y=await (0,i.GZ)(o,(0,s.oB)((0,n.Sm)(g)),{width:(0,n.Un)(g,d)+50,classes:"markdown-node-label",useHtmlLabels:c},d),f=1;if(c){let t=y.children[0],e=(0,h.Ltv)(y);f=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(f+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===g.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(d.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,s.K2)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{l.includes("font-weight: bolder")&&(0,h.Ltv)(y).selectAll("tspan").attr("font-weight",""),f=y.children.length;let t=y.children[0];(""===y.textContent||y.textContent.includes(">"))&&(t.textContent=g[0]+g.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===g[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),r=y.getBBox()}return o.attr("transform","translate(0,"+(-r.height/(2*f)+a)+")"),r.height}async function t7(t,e){let a=(0,s.D7)(),l=a.class.padding??12,i=e.useHtmlLabels??(0,s._3)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:n,bbox:d}=await t8(t,e,a,i,l),{labelStyles:c,nodeStyles:y}=(0,r.GX)(e);e.labelStyle=c,e.cssStyles=e.styles||"";let f=e.styles?.join(";")||y||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,m=o.A.svg(n),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let x=d.width,w=d.height;0===e.members.length&&0===e.methods.length?w+=l:e.members.length>0&&0===e.methods.length&&(w+=2*l);let b=-x/2,$=-w/2,k=m.rectangle(b-l,$-l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0),x+2*l,w+2*l+(p?2*l:0===e.members.length&&0===e.methods.length?-l:0),u),S=n.insert(()=>k,":first-child");S.attr("class","basic label-container");let M=S.node().getBBox();n.selectAll(".text").each((t,a,r)=>{let s=(0,h.Ltv)(r[a]),o=s.attr("transform"),d=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(d=parseFloat(t[2]))}let c=d+$+l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=b;(s.attr("class").includes("label-group")||s.attr("class").includes("annotation-group"))&&(g=-s.node()?.getBBox().width/2||0,n.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),s.attr("transform",`translate(${g}, ${c})`)});let D=n.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,A=n.select(".label-group").node().getBBox().height-(p?l/2:0)||0,v=n.select(".members-group").node().getBBox().height-(p?l/2:0)||0;if(e.members.length>0||e.methods.length>0||p){let t=m.line(M.x,D+A+$+l,M.x+M.width,D+A+$+l,u);n.insert(()=>t).attr("class","divider").attr("style",f)}if(p||e.members.length>0||e.methods.length>0){let t=m.line(M.x,D+A+v+$+2*l+l,M.x+M.width,D+A+v+$+l+2*l,u);n.insert(()=>t).attr("class","divider").attr("style",f)}if("handDrawn"!==e.look&&n.selectAll("path").attr("style",f),S.select(":nth-child(2)").attr("style",f),n.selectAll(".divider").select("path").attr("style",f),e.labelStyle?n.selectAll("span").attr("style",e.labelStyle):n.selectAll("span").attr("style",f),!i){let t=Reg
10Exp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}else if(c){let e=t.exec(c);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}}}return g(e,S),e.intersect=function(t){return F.rect(e,t)},n}async function t4(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n="verifyMethod"in e,s=y(e),d=t.insert("g").attr("class",s).attr("id",e.domId??e.id),c=a=n?await t9(d,`<<${e.type}>>`,0,e.labelStyle):await t9(d,"<<Element>>",0,e.labelStyle),f=await t9(d,e.name,c,e.labelStyle+"; font-weight: bold;");if(c+=f+20,n){let t=await t9(d,`${e.requirementId?`id: ${e.requirementId}`:""}`,c,e.labelStyle);c+=t;let a=await t9(d,`${e.text?`Text: ${e.text}`:""}`,c,e.labelStyle);c+=a;let l=await t9(d,`${e.risk?`Risk: ${e.risk}`:""}`,c,e.labelStyle);c+=l,await t9(d,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,c,e.labelStyle)}else{let t=await t9(d,`${e.type?`Type: ${e.type}`:""}`,c,e.labelStyle);c+=t,await t9(d,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,c,e.labelStyle)}let p=(d.node()?.getBBox().width??200)+20,m=(d.node()?.getBBox().height??200)+20,u=-p/2,x=-m/2,w=o.A.svg(d),b=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.rectangle(u,x,p,m,b),k=d.insert(()=>$,":first-child");if(k.attr("class","basic label-container").attr("style",i),d.selectAll(".label").each((t,e,a)=>{let l=(0,h.Ltv)(a[e]),r=l.attr("transform"),i=0,n=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-m/2,o=u+10;(0===e||1===e)&&(o=i),l.attr("transform",`translate(${o}, ${s+20})`)}),c>a+f+20){let t=w.line(u,x+a+f+20,u+p,x+a+f+20,b);d.insert(()=>t).attr("style",i)}return g(e,k),e.intersect=function(t){return F.rect(e,t)},d}async function t9(t,e,a,l=""){let r;if(""===e)return 0;let o=t.insert("g").attr("class","label").attr("style",l),d=(0,s.D7)(),c=d.htmlLabels??!0,g=await (0,i.GZ)(o,(0,s.oB)((0,n.Sm)(e)),{width:(0,n.Un)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,h.Ltv)(g);r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),l&&t.setAttribute("style",l);r=g.getBBox(),r.height+=6}return o.attr("transform",`translate(${-r.width/2},${-r.height/2+a})`),r.height}(0,s.K2)(tY,"tiltedCylinder"),(0,s.K2)(tU,"trapezoid"),(0,s.K2)(tV,"trapezoidalPentagon"),(0,s.K2)(tJ,"triangle"),(0,s.K2)(tQ,"waveEdgedRectangle"),(0,s.K2)(t0,"waveRectangle"),(0,s.K2)(t2,"windowPane"),(0,s.K2)(t1,"erBox"),(0,s.K2)(t5,"addText"),(0,s.K2)(t8,"textHelper"),(0,s.K2)(t3,"addText"),(0,s.K2)(t7,"classBox"),(0,s.K2)(t4,"requirementBox"),(0,s.K2)(t9,"addText");var t6=(0,s.K2)(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");async function et(t,e,{config:a}){let l,i,n,s;let{labelStyles:h,nodeStyles:f}=(0,r.GX)(e);e.labelStyle=h||"";let p=e.width;e.width=(e.width??200)-10;let{shapeSvg:m,bbox:u,label:x}=await d(t,e,y(e)),w=e.padding||10,b="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(b=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=m.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).attr("target","_blank"));let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:i,bbox:n}=await c(l,"ticket"in e&&e.ticket||"",k):{label:i,bbox:n}=await c(m,"ticket"in e&&e.ticket||"",k);let{label:S,bbox:M}=await c(m,"assigned"in e&&e.assigned||"",k);e.width=p;let D=e?.width||0,A=Math.max(n.height,M.height)/2,v=Math.max(u.height+20,e?.height||0)+A,K=-D/2,B=-v/2;x.attr("transform","translate("+(w-D/2)+", "+(-A-u.height/2)+")"),i.attr("transform","translate("+(w-D/2)+", "+(-A+u.height/2)+")"),S.attr("transform","translate("+(w+D/2-M.width-20)+", "+(-A+u.height/2)+")");let{rx:C,ry:N}=e,{cssStyles:L}=e;
10if("handDrawn"===e.look){let t=o.A.svg(m),a=(0,r.Fr)(e,{}),l=C||N?t.path($(K,B,D,v,C||0),a):t.rectangle(K,B,D,v,a);(s=m.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",L||null)}else{(s=m.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",f).attr("rx",C??5).attr("ry",N??5).attr("x",K).attr("y",B).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=m.append("line"),a=K+2,l=B+Math.floor((C??0)/2),r=B+v-Math.floor((C??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",r).attr("stroke-width","4").attr("stroke",t6(t))}}return g(e,s),e.height=v,e.intersect=function(t){return F.rect(e,t)},m}(0,s.K2)(et,"kanbanItem");var ee=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tG},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tP},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tI},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tE},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:te},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:E}
10,{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tN},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:to},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tw},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tU},{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:tm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tl},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tz}
10,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:W},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tF},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:t_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tW},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tn},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:td},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Z},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:U},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:t$}
10,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:tQ},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ts},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tY},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:V},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ta},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tJ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t2},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:tr},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tV},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ti},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tX},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tK},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:I},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:j},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tj},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tH},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tL},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tA}],ea=(0,s.K2)(()=>Object.fromEntries([...Object.entries({state:tT,choice:_,note:tB,rectWithTitle:tR,labelRect:tx,iconSquare:tf,iconCircle:tg,icon:tc,iconRounded:ty,imageSquare:tp,anchor:X,kanbanItem:et,classBox:t7,erBox:t1,requirementBox:t4}),...ee.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function el(t){return t in ea}(0,s.K2)(el,"isValidShape");var er=new Map;async function ei(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?ea[e.shape]:void 0;if(!i)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),r=await i(l,e,a)}else l=r=await i(t,e,a);return e.tooltip&&r.attr("title",e.tooltip),er.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}
10(0,s.K2)(ei,"insertNode");var en=(0,s.K2)((t,e)=>{er.set(e.id,t)},"setNodeElem"),es=(0,s.K2)(()=>{er.clear()},"clear"),eh=(0,s.K2)(t=>{let e=er.get(t.id);s.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.