MCPcopy Index your code
hub / github.com/google/adk-python / ms

Function ms

src/google/adk/cli/browser/chunk-W7PRDKNL.js:2–2  ·  view source on GitHub ↗
(l,r,f)

Source from the content-addressed store, hash-verified

1import{a as At,b as Ot}from"./chunk-DRBE27N3.js";import{a as w}from"./chunk-PRKFGJVH.js";import{a as jt,b as St,d as R,e as N}from"./chunk-VDPKVNDJ.js";import{d as $t,f as nt}from"./chunk-WXI2IBAH.js";import{i as wt,o as bt,q as st}from"./chunk-WBLSVR3V.js";import{$ as Rt,A as dt,E as it,G as Pt,I as Nt,J as _t,Y as U,u as ut}from"./chunk-QFMJV7VH.js";import{a as Q,g as b,i as Z}from"./chunk-JRNAXTJ7.js";import{a as tt,b as rt,j as C}from"./chunk-RMXJBC7V.js";var O=b((y,t,g)=>C(null,null,function*(){let o,l=t.useHtmlLabels||ut(U()?.htmlLabels);g?o=g:o="node default";let r=y.insert("g").attr("class",o).attr("id",t.domId||t.id),f=r.insert("g").attr("class","label").attr("style",st(t.labelStyle)),a;t.label===void 0?a="":a=typeof t.label=="string"?t.label:t.label[0];let c=!!t.icon||!!t.img,s=t.labelType==="markdown",e=yield nt(f,Pt(bt(a),U()),{useHtmlLabels:l,width:t.width||U().flowchart?.wrappingWidth,cssClasses:s?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:c,markdown:s},U()),i=e.getBBox(),h=(t?.padding??0)/2;if(l){let n=e.children[0],p=Q(e);yield Ot(n,a),i=n.getBoundingClientRect(),p.attr("width",i.width),p.attr("height",i.height)}return l?f.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"):f.attr("transform","translate(0, "+-i.height/2+")"),t.centerLabel&&f.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),f.insert("rect",":first-child"),{shapeSvg:r,bbox:i,halfPadding:h,label:f}}),"labelHelper"),Lt=b((y,t,g)=>C(null,null,function*(){let o=g.useHtmlLabels??it(U()),l=y.insert("g").attr("class","label").attr("style",g.labelStyle||""),r=yield nt(l,Pt(bt(t),U()),{useHtmlLabels:o,width:g.width||U()?.flowchart?.wrappingWidth,style:g.labelStyle,addSvgBackground:!!g.icon||!!g.img}),f=r.getBBox(),a=g.padding/2;if(it(U())){let c=r.children[0],s=Q(r);f=c.getBoundingClientRect(),s.attr("width",f.width),s.attr("height",f.height)}return o?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),g.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:y,bbox:f,halfPadding:a,label:l}}),"insertLabel"),A=b((y,t)=>{let g=t.node().getBBox();y.width=g.width,y.height=g.height},"updateNodeBounds"),T=b((y,t)=>(y.look==="handDrawn"?"rough-node":"node")+" "+y.cssClasses+" "+(t||""),"getNodeClasses");function z(y){let t=y.map((g,o)=>`${o===0?"M":"L"}${g.x},${g.y}`);return t.push("Z"),t.join(" ")}b(z,"createPathFromPoints");function ft(y,t,g,o,l,r){let f=[],c=g-y,s=o-t,e=c/r,i=2*Math.PI/e,h=t+s/2;for(let n=0;n<=50;n++){let p=n/50,u=y+p*c,m=h+l*Math.sin(i*(u-y));f.push({x:u,y:m})}return f}b(ft,"generateFullSineWavePoints");function kt(y,t,g,o,l,r){let f=[],a=l*Math.PI/180,e=(r*Math.PI/180-a)/(o-1);for(let i=0;i<o;i++){let h=a+i*e,n=y+g*Math.cos(h),p=t+g*Math.sin(h);f.push({x:-n,y:-p})}return f}b(kt,"generateCirclePoints");var ne=b((y,t)=>{var g=y.x,o=y.y,l=t.x-g,r=t.y-o,f=y.width/2,a=y.height/2,c,s;return Math.abs(r)*f>Math.abs(l)*a?(r<0&&(a=-a),c=r===0?0:a*l/r,s=a):(l<0&&(f=-f),c=f,s=l===0?0:f*r/l),{x:g+c,y:o+s}},"intersectRect"),xt=ne,ce=b((y,t,g,o=!1,l=!1)=>C(null,null,function*(){let r=t||"";typeof r=="object"&&(r=r[0]);let f=U(),a=it(f);return yield nt(y,r,{style:g,isTitle:o,useHtmlLabels:a,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},f)}),"createLabel"),Bt=ce,yt=b((y,t,g,o,l)=>["M",y+l,t,"H",y+g-l,"A",l,l,0,0,1,y+g,t+l,"V",t+o-l,"A",l,l,0,0,1,y+g-l,t+o,"H",y+l,"A",l,l,0,0,1,y,t+o-l,"V",t+l,"A",l,l,0,0,1,y+l,t,"Z"].join(" "),"createRoundedRectPathD"),Xt=b((y,t)=>C(null,null,function*(){Z.info("Creating subgraph rect for ",t.id,t);let g=U(),{themeVariables:o,handDrawnSeed:l}=g,{clusterBkg:r,clusterBorder:f}=o,{labelStyles:a,nodeStyles:c,borderStyles:s,backgroundStyles:e}=R(t),i=y.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),h=it(g),n=i.insert("g").attr("class","cluster-label "),p;t.labelType==="markdown"?p=yield nt(n,t.label,{style:t.labelStyle,useHtmlLabels:h,isNode:!0,width:t.width}):p=yield Bt(n,t.label,t.labelStyle||"",!1,!0);let u=p.getBBox();if(it(g)){let B=p.children[0],k=Q(p);u=B.getBoundingClientRect(),k.attr("width",u.width),k.attr("height",u.height)}let m=t.width<=u.width+t.padding?u.width+t.padding:t.width;t.width<=u.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,x=t.x-m/2,D=t.y-d/2;Z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let B=w.svg(i),k=N(t,{roughness:.7,fill:r,stroke:f,fillWeight:3,seed:l}),M=B.path(yt(x,D,m,d,0),k);S=i.insert(()=>(Z.debug("Rough node insert CXC",M),M),":first-child"),S.select("path:nth-child(2)").attr("style",s.join(";")),S.select("path").attr("style",e.join(";").replace("fill","stroke"))}else S=i.insert("rect",":first-child"),S.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",D).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:$}=At(g);if(n.attr("transform",`translate(${t.x-u.width/2}, ${t.y-t.height/2+$})`),a){let B=n.select("span");B&&B.attr("style",a)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=u.height-t.padding/2,t.intersect=function(B){return xt(t,B)},{cluster:i,labelBBox:u}}),"rect"),oe=b((y,t)=>{let g=y.insert("g").attr("class","note-cluster").attr("id",t.id),o=g.insert("rect",":first-child"),l=0*t.padding,r=l/2;o.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let f=o.node().getBBox();return t.width=f.width,t.height=f.height,t.intersect=function(a){return xt(t,a)},{cluster:g,labelBBox:{width:0,height:0}}},"noteGroup"),he=b((y,t)=>C(null,null,function*(){let g=U(),{themeVariables:o,handDrawnSeed:l}=g,{altBackground:r,compositeBackground:f,compositeTitleBackground:a,nodeBorder:c}=o,s=y.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),e=s.insert("g",":first-child"),i=s.insert("g").attr("class","cluster-label"),h=s.append("rect"),n=yield Bt(i,t.label,t.labelStyle,void 0,!0),p=n.getBBox();if(it(g)){let M=n.children[0],I=Q(n);p=M.getBoundingClientRect(),I.attr("width",p.width),I.attr("height",p.height)}let u=0*t.padding,m=u/2,d=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+u;t.width<=p.width+t.padding?t.diff=(d-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+u,D=t.height+u-p.height-6,S=t.x-d/2,$=t.y-x/2;t.width=d;let v=t.y-t.height/2-m+p.height+2,B;if(t.look==="handDrawn"){let M=t.cssClasses.includes("statediagram-cluster-alt"),I=w.svg(s),Y=t.rx||t.ry?I.path(yt(S,$,d,x,10),{roughness:.7,fill:a,fillStyle:"solid",stroke:c,seed:l}):I.rectangle(S,$,d,x,{seed:l});B=s.insert(()=>Y,":first-child");let V=I.rectangle(S,v,d,D,{fill:M?r:f,fillStyle:M?"hachure":"solid",stroke:c,seed:l});B=s.insert(()=>Y,":first-child"),h=s.insert(()=>V)}else B=e.insert("rect",":first-child"),B.attr("class","outer").attr("x",S).attr("y",$).attr("width",d).attr("height",x).attr("data-look",t.look),h.attr("class","inner").attr("x",S).attr("y",v).attr("width",d).attr("height",D);i.attr("transform",`translate(${t.x-p.width/2}, ${$+1-(it(g)?0:3)})`);let k=B.node().getBBox();return t.height=k.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(M){return xt(t,M)},{cluster:s,labelBBox:p}}),"roundedWithTitle"),ge=b((y,t)=>C(null,null,function*(){Z.info("Creating subgraph rect for ",t.id,t);let g=U(),{themeVariables:o,handDrawnSeed:l}=g,{clusterBkg:r,clusterBorder:f}=o,{labelStyles:a,nodeStyles:c,borderStyles:s,backgroundStyles:e}=R(t),i=y.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),h=it(g),n=i.insert("g").attr("class","cluster-label "),p=yield nt(n,t.label,{style:t.labelStyle,useHtmlLabels:h,isNode:!0,width:t.width}),u=p.getBBox();if(it(g)){let B=p.children[0],k=Q(p);u=B.getBoundingClientRect(),k.attr("width",u.width),k.attr("height",u.height)}let m=t.width<=u.width+t.padding?u.width+t.padding:t.width;t.width<=u.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,x=t.x-m/2,D=t.y-d/2;Z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let B=w.svg(i),k=N(t,{roughness:.7,fill:r,stroke:f,fillWeight:4,seed:l}),M=B.path(yt(x,D,m,d,t.rx),k);S=i.insert(()=>(Z.debug("Rough node insert CXC",M),M),":first-child"),S.select("path:nth-child(2)").attr("style",s.join(";")),S.select("path").attr("style",e.join(";").replace("fill","stroke"))}else S=i.insert("rect",":first-child"),S.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",D).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:$}=At(g);if(n.attr("transform",`translate(${t.x-u.width/2}, ${t.y-t.height/2+$})`),a){let B=n.select("span");B&&B.attr("style",a)}let v=S.node().getBBox();return t.offsetX=0,t.width=v.width,t.height=v.height,t.offsetY=u.height-t.padding/2,t.intersect=function(B){return xt(t,B)},{cluster:i,labelBBox:u}}),"kanbanSection"),fe=b((y,t)=>{let g=U(),{themeVariables:o,handDrawnSeed:l}=g,{nodeBorder:r}=o,f=y.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),a=f.insert("g",":first-child"),c=0*t.padding,s=t.width+c;t.diff=-t.padding;let e=t.height+c,i=t.x-s/2,h=t.y-e/2;t.width=s;let n;if(t.look==="handDrawn"){let m=w.svg(f).rectangle(i,h,s,e,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});n=f.insert(()=>m,":first-child")}else n=a.insert("rect",":first-child"),n.attr("class","divider").attr("x",i).attr("y",h).attr("width",s).attr("height",e).attr("data-look",t.look);let p=n.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(u){return xt(t,u)},{cluster:f,labelBBox:{}}},"divider"),ye=Xt,pe={rect:Xt,squareRect:ye,roundedWithTitle:he,noteGroup:oe,divider:fe,kanbanSection:ge},Yt=new Map,Fe=b((y,t)=>C(null,null,function*(){let g=t.shape||"rect",o=yield pe[g](y,t);return Yt.set(t.id,o),o}),"insertCluster"),Ge=b(()=>{Yt=new Map},"clear");function qt(y,t){return y.intersect(t)}b(qt,"intersectNode");var ue=qt;function Ft(y,t,g,o){var l=y.x,r=y.y,f=l-o.x,a=r-o.y,c=Math.sqrt(t*t*a*a+g*g*f*f),s=Math.abs(t*g*f/c);o.x<l&&(s=-s);var e=Math.abs(t*g*a/c);return o.y<r&&(e=-e),{x:l+s,y:r+e}}b(Ft,"intersectEllipse");var Gt=Ft;function zt(y,t,g){return Gt(y,t,t,g)}b(zt,"intersectCircle");var de=zt;function Vt(y,t,g,o){{let l=t.y-y.y,r=y.x-t.x,f=t.x*y.y-y.x*t.y,a=l*g.x+r*g.y+f,c=l*o.x+r*o.y+f,s=1e-6;if(a!==0&&c!==0&&Ht(a,c))return;let e=o.y-g.y,i=g.x-o.x,h=o.x*g.y-g.x*o.y,n=e*y.x+i*y.y+h,p=e*t.x+i*t.y+h;if(Math.abs(n)<s&&Math.abs(p)<s&&Ht(n,p))return;let u=l*i-e*r;if(u===0)return;let m=Math.abs(u/2),d=r*h-i*f,x=d<0?(d-m)/u:(d+m)/u;d=e*f-l*h;let D=d<0?(d-m)/u:(d+m)/u;return{x,y:D}}}b(Vt,"intersectLine");function Ht(y,t){return y*t>0}b(Ht,"sameSign");var me=Vt;function Zt(y,t,g){let o=y.x,l=y.y,r=[],f=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(e){f=Math.min(f,e.x),a=Math.min(a,e.y)}):(f=Math.min(f,t.x),a=Math.min(a,t.y));let c=o-y.width/2-f,s=l-y.height/2-a;for(let e=0;e<t.length;e++){let i=t[e],h=t[e<t.length-1?e+1:0],n=me(y,g,{x:c+i.x,y:s+i.y},{x:c+h.x,y:s+h.y});n&&r.push(n)}return r.length?(r.length>1&&r.sort(function(e,i){let h=e.x-g.x,n=e.y-g.y,p=Math.sqrt(h*h+n*n),u=i.x-g.x,m=i.y-g.y,d=Math.sqrt(u*u+m*m);return p<d?-1:p===d?0:1}),r[0]):y}b(Zt,"intersectPolygon");var xe=Zt,P={node:ue,circle:de,ellipse:Gt,polygon:xe,rect:xt};function Jt(y,t){let{labelStyles:g}=R(t);t.labelStyle=g;let o=T(t),l=o;o||(l="anchor");let r=y.insert("g").attr("class",l).attr("id",t.domId||t.id),f=1,{cssStyles:a}=t,c=w.svg(r),s=N(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(s.roughness=0);let e=c.circle(0,0,f*2,s),i=r.insert(()=>e,":first-child");return i.attr("class","anchor").attr("style",st(a)),A(t,i),t.intersect=function(h){return Z.info("Circle intersect",t,f,h),P.circle(t,f,h)},r}b(Jt,"anchor");function Wt(y,t,g,o,l,r,f){let c=(y+g)/2,s=(t+o)/2,e=Math.atan2(o-t,g-y),i=(g-y)/2,h=(o-t)/2,n=i/l,p=h/r,u=Math.sqrt(n**2+p**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-u**2),d=c+m*r*Math.sin(e)*(f?-1:1),x=s-m*l*Math.cos(e)*(f?-1:1),D=Math.atan2((t-x)/r,(y-d)/l),$=Math.atan2((o-x)/r,(g-d)/l)-D;f&&$<0&&($+=2*Math.PI),!f&&$>0&&($-=2*Math.PI);let v=[];for(let B=0;B<20;B++){let k=B/19,M=D+k*$,I=d+l*Math.cos(M),Y=x+r*Math.sin(M);v.push({x:I,y:Y})}return v}b(Wt,"generateArcPoints");function Qt(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=r.width+t.padding+20,a=r.height+t.padding,c=a/2,s=c/(2.5+a/50),{cssStyles:e}=t,i=[{x:f/2,y:-a/2},{x:-f/2,y:-a/2},...Wt(-f/2,-a/2,-f/2,a/2,s,c,!1),{x:f/2,y:a/2},...Wt(f/2,a/2,f/2,-a/2,s,c,!0)],h=w.svg(l),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=z(i),u=h.path(p,n),m=l.insert(()=>u,":first-child");return m.attr("class","basic label-container"),e&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",e),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),m.attr("transform",`translate(${s/2}, 0)`),A(t,m),t.intersect=function(d){return P.polygon(t,i,d)},l})}b(Qt,"bowTieRect");function ht(y,t,g,o){return y.insert("polygon",":first-child").attr("points",o.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+g/2+")")}b(ht,"insertPolygonShape");function Ut(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=r.height+t.padding,a=12,c=r.width+t.padding+a,s=0,e=c,i=-f,h=0,n=[{x:s+a,y:i},{x:e,y:i},{x:e,y:h},{x:s,y:h},{x:s,y:i+a},{x:s+a,y:i}],p,{cssStyles:u}=t;if(t.look==="handDrawn"){let m=w.svg(l),d=N(t,{}),x=z(n),D=m.path(x,d);p=l.insert(()=>D,":first-child").attr("transform",`translate(${-c/2}, ${f/2})`),u&&p.attr("style",u)}else p=ht(l,c,f,n);return o&&p.attr("style",o),A(t,p),t.intersect=function(m){return P.polygon(t,n,m)},l})}b(Ut,"card");function Kt(y,t){let{nodeStyles:g}=R(t);t.label="";let o=y.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),f=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],a=w.svg(o),c=N(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let s=z(f),e=a.path(s,c),i=o.insert(()=>e,":first-child");return l&&t.look!=="handDrawn"&&i.selectAll("path").attr("style",l),g&&t.look!=="handDrawn"&&i.selectAll("path").attr("style",g),t.width=28,t.height=28,t.intersect=function(h){return P.polygon(t,f,h)},o}b(Kt,"choice");function It(y,t,g){return C(this,null,function*(){let{labelStyles:o,nodeStyles:l}=R(t);t.labelStyle=o;let{shapeSvg:r,bbox:f,halfPadding:a}=yield O(y,t,T(t)),c=g?.padding??a,s=f.width/2+c,e,{cssStyles:i}=t;if(t.look==="handDrawn"){let h=w.svg(r),n=N(t,{}),p=h.circle(0,0,s*2,n);e=r.insert(()=>p,":first-child"),e.attr("class","basic label-container").attr("style",st(i))}else e=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return A(t,e),t.calcIntersect=function(h,n){let p=h.width/2;return P.circle(h,p,n)},t.intersect=function(h){return Z.info("Circle intersect",t,s,h),P.circle(t,s,h)},r})}b(It,"circle");function ts(y){let t=Math.cos(Math.PI/4),g=Math.sin(Math.PI/4),o=y*2,l={x:o/2*t,y:o/2*g},r={x:-(o/2)*t,y:o/2*g},f={x:-(o/2)*t,y:-(o/2)*g},a={x:o/2*t,y:-(o/2)*g};return`M ${r.x},${r.y} L ${a.x},${a.y}
2 M ${l.x},${l.y} L ${f.x},${f.y}`}b(ts,"createLine");function ss(y,t){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g,t.label="";let l=y.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:f}=t,a=w.svg(l),c=N(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let s=a.circle(0,0,r*2,c),e=ts(r),i=a.path(e,c),h=l.insert(()=>s,":first-child");return h.insert(()=>i),f&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",f),o&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",o),A(t,h),t.intersect=function(n){return Z.info("crossedCircle intersect",t,{radius:r,point:n}),P.circle(t,r,n)},l}b(ss,"crossedCircle");function ct(y,t,g,o=100,l=0,r=180){let f=[],a=l*Math.PI/180,e=(r*Math.PI/180-a)/(o-1);for(let i=0;i<o;i++){let h=a+i*e,n=y+g*Math.cos(h),p=t+g*Math.sin(h);f.push({x:-n,y:-p})}return f}b(ct,"generateCirclePoints");function es(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=r.width+(t.padding??0),c=r.height+(t.padding??0),s=Math.max(5,c*.1),{cssStyles:e}=t,i=[...ct(a/2,-c/2,s,30,-90,0),{x:-a/2-s,y:s},...ct(a/2+s*2,-s,s,20,-180,-270),...ct(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:-c/2},...ct(a/2,c/2,s,20,0,90)],h=[{x:a/2,y:-c/2-s},{x:-a/2,y:-c/2-s},...ct(a/2,-c/2,s,20,-90,0),{x:-a/2-s,y:-s},...ct(a/2+a*.1,-s,s,20,-180,-270),...ct(a/2+a*.1,s,s,20,-90,-180),{x:-a/2-s,y:c/2},...ct(a/2,c/2,s,20,0,90),{x:-a/2,y:c/2+s},{x:a/2,y:c/2+s}],n=w.svg(l),p=N(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=z(i).replace("Z",""),d=n.path(m,p),x=z(h),D=n.path(x,tt({},p)),S=l.insert("g",":first-child");return S.insert(()=>D,":first-child").attr("stroke-opacity",0),S.insert(()=>d,":first-child"),S.attr("class","text"),e&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",e),o&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",o),S.attr("transform",`translate(${s}, 0)`),f.attr("transform",`translate(${-a/2+s-(r.x-(r.left??0))},${-c/2+(t.padding??0)/2-(r.y-(r.top??0))})`),A(t,S),t.intersect=function($){return P.polygon(t,h,$)},l})}b(es,"curlyBraceLeft");function ot(y,t,g,o=100,l=0,r=180){let f=[],a=l*Math.PI/180,e=(r*Math.PI/180-a)/(o-1);for(let i=0;i<o;i++){let h=a+i*e,n=y+g*Math.cos(h),p=t+g*Math.sin(h);f.push({x:n,y:p})}return f}b(ot,"generateCirclePoints");function as(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=r.width+(t.padding??0),c=r.height+(t.padding??0),s=Math.max(5,c*.1),{cssStyles:e}=t,i=[...ot(a/2,-c/2,s,20,-90,0),{x:a/2+s,y:-s},...ot(a/2+s*2,-s,s,20,-180,-270),...ot(a/2+s*2,s,s,20,-90,-180),{x:a/2+s,y:c/2},...ot(a/2,c/2,s,20,0,90)],h=[{x:-a/2,y:-c/2-s},{x:a/2,y:-c/2-s},...ot(a/2,-c/2,s,20,-90,0),{x:a/2+s,y:-s},...ot(a/2+s*2,-s,s,20,-180,-270),...ot(a/2+s*2,s,s,20,-90,-180),{x:a/2+s,y:c/2},...ot(a/2,c/2,s,20,0,90),{x:a/2,y:c/2+s},{x:-a/2,y:c/2+s}],n=w.svg(l),p=N(t,{fill:"none"});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=z(i).replace("Z",""),d=n.path(m,p),x=z(h),D=n.path(x,tt({},p)),S=l.insert("g",":first-child");return S.insert(()=>D,":first-child").attr("stroke-opacity",0),S.insert(()=>d,":first-child"),S.attr("class","text"),e&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",e),o&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",o),S.attr("transform",`translate(${-s}, 0)`),f.attr("transform",`translate(${-a/2+(t.padding??0)/2-(r.x-(r.left??0))},${-c/2+(t.padding??0)/2-(r.y-(r.top??0))})`),A(t,S),t.intersect=function($){return P.polygon(t,h,$)},l})}b(as,"curlyBraceRight");function K(y,t,g,o=100,l=0,r=180){let f=[],a=l*Math.PI/180,e=(r*Math.PI/180-a)/(o-1);for(let i=0;i<o;i++){let h=a+i*e,n=y+g*Math.cos(h),p=t+g*Math.sin(h);f.push({x:-n,y:-p})}return f}b(K,"generateCirclePoints");function rs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=r.width+(t.padding??0),c=r.height+(t.padding??0),s=Math.max(5,c*.1),{cssStyles:e}=t,i=[...K(a/2,-c/2,s,30,-90,0),{x:-a/2-s,y:s},...K(a/2+s*2,-s,s,20,-180,-270),...K(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:-c/2},...K(a/2,c/2,s,20,0,90)],h=[...K(-a/2+s+s/2,-c/2,s,20,-90,-180),{x:a/2-s/2,y:s},...K(-a/2-s/2,-s,s,20,0,90),...K(-a/2-s/2,s,s,20,-90,0),{x:a/2-s/2,y:-s},...K(-a/2+s+s/2,c/2,s,30,-180,-270)],n=[{x:a/2,y:-c/2-s},{x:-a/2,y:-c/2-s},...K(a/2,-c/2,s,20,-90,0),{x:-a/2-s,y:-s},...K(a/2+s*2,-s,s,20,-180,-270),...K(a/2+s*2,s,s,20,-90,-180),{x:-a/2-s,y:c/2},...K(a/2,c/2,s,20,0,90),{x:-a/2,y:c/2+s},{x:a/2-s-s/2,y:c/2+s},...K(-a/2+s+s/2,-c/2,s,20,-90,-180),{x:a/2-s/2,y:s},...K(-a/2-s/2,-s,s,20,0,90),...K(-a/2-s/2,s,s,20,-90,0),{x:a/2-s/2,y:-s},...K(-a/2+s+s/2,c/2,s,30,-180,-270)],p=w.svg(l),u=N(t,{fill:"none"});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let d=z(i).replace("Z",""),x=p.path(d,u),S=z(h).replace("Z",""),$=p.path(S,u),v=z(n),B=p.path(v,tt({},u)),k=l.insert("g",":first-child");return k.insert(()=>B,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.insert(()=>$,":first-child"),k.attr("class","text"),e&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",e),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),k.attr("transform",`translate(${s-s/4}, 0)`),f.attr("transform",`translate(${-a/2+(t.padding??0)/2-(r.x-(r.left??0))},${-c/2+(t.padding??0)/2-(r.y-(r.top??0))})`),A(t,k),t.intersect=function(M){return P.polygon(t,n,M)},l})}b(rs,"curlyBraces");function is(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=80,a=20,c=Math.max(f,(r.width+(t.padding??0)*2)*1.25,t?.width??0),s=Math.max(a,r.height+(t.padding??0)*2,t?.height??0),e=s/2,{cssStyles:i}=t,h=w.svg(l),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=c,u=s,m=p-e,d=u/4,x=[{x:m,y:0},{x:d,y:0},{x:0,y:u/2},{x:d,y:u},{x:m,y:u},...kt(-m,-u/2,e,50,270,90)],D=z(x),S=h.path(D,n),$=l.insert(()=>S,":first-child");return $.attr("class","basic label-container"),i&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",i),o&&t.look!=="handDrawn"&&$.selectChildren("path").attr("style",o),$.attr("transform",`translate(${-c/2}, ${-s/2})`),A(t,$),t.intersect=function(v){return P.polygon(t,x,v)},l})}b(is,"curvedTrapezoid");var we=b((y,t,g,o,l,r)=>[`M${y},${t+r}`,`a${l},${r} 0,0,0 ${g},0`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${o}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-o}`].join(" "),"createCylinderPathD"),be=b((y,t,g,o,l,r)=>[`M${y},${t+r}`,`M${y+g},${t+r}`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${o}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-o}`].join(" "),"createOuterCylinderPathD"),Se=b((y,t,g,o,l,r)=>[`M${y-g/2},${-o/2}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createInnerCylinderPathD");function ls(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+t.padding,t.width??0),c=a/2,s=c/(2.5+a/50),e=Math.max(r.height+s+t.padding,t.height??0),i,{cssStyles:h}=t;if(t.look==="handDrawn"){let n=w.svg(l),p=be(0,0,a,e,c,s),u=Se(0,s,a,e,c,s),m=n.path(p,N(t,{})),d=n.path(u,N(t,{fill:"none"}));i=l.insert(()=>d,":first-child"),i=l.insert(()=>m,":first-child"),i.attr("class","basic label-container"),h&&i.attr("style",h)}else{let n=we(0,0,a,e,c,s);i=l.insert("path",":first-child").attr("d",n).attr("class","basic label-container").attr("style",st(h)).attr("style",o)}return i.attr("label-offset-y",s),i.attr("transform",`translate(${-a/2}, ${-(e/2+s)})`),A(t,i),f.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)+(t.padding??0)/1.5-(r.y-(r.top??0))})`),t.intersect=function(n){let p=P.rect(t,n),u=p.x-(t.x??0);if(c!=0&&(Math.abs(u)<(t.width??0)/2||Math.abs(u)==(t.width??0)/2&&Math.abs(p.y-(t.y??0))>(t.height??0)/2-s)){let m=s*s*(1-u*u/(c*c));m>0&&(m=Math.sqrt(m)),m=s-m,n.y-(t.y??0)>0&&(m=-m),p.y+=m}return p},l})}b(ls,"cylinder");function ns(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=r.width+t.padding,c=r.height+t.padding,s=c*.2,e=-a/2,i=-c/2-s/2,{cssStyles:h}=t,n=w.svg(l),p=N(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let u=[{x:e,y:i+s},{x:-e,y:i+s},{x:-e,y:-i},{x:e,y:-i},{x:e,y:i},{x:-e,y:i},{x:-e,y:i+s}],m=n.polygon(u.map(x=>[x.x,x.y]),p),d=l.insert(()=>m,":first-child");return d.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",h),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),f.attr("transform",`translate(${e+(t.padding??0)/2-(r.x-(r.left??0))}, ${i+s+(t.padding??0)/2-(r.y-(r.top??0))})`),A(t,d),t.intersect=function(x){return P.rect(t,x)},l})}b(ns,"dividedRectangle");function cs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,halfPadding:f}=yield O(y,t,T(t)),c=r.width/2+f+5,s=r.width/2+f,e,{cssStyles:i}=t;if(t.look==="handDrawn"){let h=w.svg(l),n=N(t,{roughness:.2,strokeWidth:2.5}),p=N(t,{roughness:.2,strokeWidth:1.5}),u=h.circle(0,0,c*2,n),m=h.circle(0,0,s*2,p);e=l.insert("g",":first-child"),e.attr("class",st(t.cssClasses)).attr("style",st(i)),e.node()?.appendChild(u),e.node()?.appendChild(m)}else{e=l.insert("g",":first-child");let h=e.insert("circle",":first-child"),n=e.insert("circle");e.attr("class","basic label-container").attr("style",o),h.attr("class","outer-circle").attr("style",o).attr("r",c).attr("cx",0).attr("cy",0),n.attr("class","inner-circle").attr("style",o).attr("r",s).attr("cx",0).attr("cy",0)}return A(t,e),t.intersect=function(h){return Z.info("DoubleCircle intersect",t,c,h),P.circle(t,c,h)},l})}b(cs,"doublecircle");function os(y,t,{config:{themeVariables:g}}){let{labelStyles:o,nodeStyles:l}=R(t);t.label="",t.labelStyle=o;let r=y.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),f=7,{cssStyles:a}=t,c=w.svg(r),{nodeBorder:s}=g,e=N(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(e.roughness=0);let i=c.circle(0,0,f*2,e),h=r.insert(()=>i,":first-child");return h.selectAll("path").attr("style",`fill: ${s} !important;`),a&&a.length>0&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",a),l&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",l),A(t,h),t.intersect=function(n){return Z.info("filledCircle intersect",t,{radius:f,point:n}),P.circle(t,f,n)},r}b(os,"filledCircle");function hs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=r.width+(t.padding??0),c=a+r.height,s=a+r.height,e=[{x:0,y:-c},{x:s,y:-c},{x:s/2,y:0}],{cssStyles:i}=t,h=w.svg(l),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=z(e),u=h.path(p,n),m=l.insert(()=>u,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),o&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",o),t.width=a,t.height=c,A(t,m),f.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-c/2+(t.padding??0)/2+(r.y-(r.top??0))})`),t.intersect=function(d){return Z.info("Triangle intersect",t,e,d),P.polygon(t,e,d)},l})}b(hs,"flippedTriangle");function gs(y,t,{dir:g,config:{state:o,themeVariables:l}}){let{nodeStyles:r}=R(t);t.label="";let f=y.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,c=Math.max(70,t?.width??0),s=Math.max(10,t?.height??0);g==="LR"&&(c=Math.max(10,t?.width??0),s=Math.max(70,t?.height??0));let e=-1*c/2,i=-1*s/2,h=w.svg(f),n=N(t,{stroke:l.lineColor,fill:l.lineColor});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=h.rectangle(e,i,c,s,n),u=f.insert(()=>p,":first-child");a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),A(t,u);let m=o?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(d){return P.rect(t,d)},f}b(gs,"forkJoin");function fs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let l=80,r=50,{shapeSvg:f,bbox:a}=yield O(y,t,T(t)),c=Math.max(l,a.width+(t.padding??0)*2,t?.width??0),s=Math.max(r,a.height+(t.padding??0)*2,t?.height??0),e=s/2,{cssStyles:i}=t,h=w.svg(f),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=[{x:-c/2,y:-s/2},{x:c/2-e,y:-s/2},...kt(-c/2+e,0,e,50,90,270),{x:c/2-e,y:s/2},{x:-c/2,y:s/2}],u=z(p),m=h.path(u,n),d=f.insert(()=>m,":first-child");return d.attr("class","basic label-container"),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),A(t,d),t.intersect=function(x){return Z.info("Pill intersect",t,{radius:e,point:x}),P.polygon(t,p,x)},f})}b(fs,"halfRoundedRectangle");var $e=b((y,t,g,o,l)=>[`M${y+l},${t}`,`L${y+g-l},${t}`,`L${y+g},${t-o/2}`,`L${y+g-l},${t-o}`,`L${y+l},${t-o}`,`L${y},${t-o/2}`,"Z"].join(" "),"createHexagonPathD");function ys(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=4,a=r.height+t.padding,c=a/f,s=r.width+2*c+t.padding,e=[{x:c,y:0},{x:s-c,y:0},{x:s,y:-a/2},{x:s-c,y:-a},{x:c,y:-a},{x:0,y:-a/2}],i,{cssStyles:h}=t;if(t.look==="handDrawn"){let n=w.svg(l),p=N(t,{}),u=$e(0,0,s,a,c),m=n.path(u,p);i=l.insert(()=>m,":first-child").attr("transform",`translate(${-s/2}, ${a/2})`),h&&i.attr("style",h)}else i=ht(l,s,a,e);return o&&i.attr("style",o),t.width=s,t.height=a,A(t,i),t.intersect=function(n){return P.polygon(t,e,n)},l})}b(ys,"hexagon");function ps(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.label="",t.labelStyle=g;let{shapeSvg:l}=yield O(y,t,T(t)),r=Math.max(30,t?.width??0),f=Math.max(30,t?.height??0),{cssStyles:a}=t,c=w.svg(l),s=N(t,{});t.look!=="handDrawn"&&(s.roughness=0,s.fillStyle="solid");let e=[{x:0,y:0},{x:r,y:0},{x:0,y:f},{x:r,y:f}],i=z(e),h=c.path(i,s),n=l.insert(()=>h,":first-child");return n.attr("class","basic label-container"),a&&t.look!=="handDrawn"&&n.selectChildren("path").attr("style",a),o&&t.look!=="handDrawn"&&n.selectChildren("path").attr("style",o),n.attr("transform",`translate(${-r/2}, ${-f/2})`),A(t,n),t.intersect=function(p){return Z.info("Pill intersect",t,{points:e}),P.polygon(t,e,p)},l})}b(ps,"hourglass");function us(l,r,f){return C(this,arguments,function*(y,t,{config:{themeVariables:g,flowchart:o}}){let{labelStyles:a}=R(t);t.labelStyle=a;let c=t.assetHeight??48,s=t.assetWidth??48,e=Math.max(c,s),i=o?.wrappingWidth;t.width=Math.max(e,i??0);let{shapeSvg:h,bbox:n,label:p}=yield O(y,t,"icon-shape default"),u=t.pos==="t",m=e,d=e,{nodeBorder:x}=g,{stylesMap:D}=St(t),S=-d/2,$=-m/2,v=t.label?8:0,B=w.svg(h),k=N(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let M=B.rectangle(S,$,d,m,k),I=Math.max(d,n.width),Y=m+n.height+v,V=B.rectangle(-I/2,-Y/2,I,Y,rt(tt({},k),{fill:"transparent",stroke:"none"})),q=h.insert(()=>M,":first-child"),W=h.insert(()=>V);if(t.icon){let j=h.append("g");j.html(`<g>${yield $t(t.icon,{height:e,width:e,fallbackPrefix:""})}</g>`);let L=j.node().getBBox(),F=L.width,_=L.height,H=L.x,X=L.y;j.attr("transform",`translate(${-F/2-H},${u?n.height/2+v/2-_/2-X:-n.height/2-v/2-_/2-X})`),j.attr("style",`color: ${D.get("stroke")??x};`)}return p.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${u?-Y/2:Y/2-n.height})`),q.attr("transform",`translate(0,${u?n.height/2+v/2:-n.height/2-v/2})`),A(t,W),t.intersect=function(j){if(Z.info("iconSquare intersect",t,j),!t.label)return P.rect(t,j);let L=t.x??0,F=t.y??0,_=t.height??0,H=[];return u?H=[{x:L-n.width/2,y:F-_/2},{x:L+n.width/2,y:F-_/2},{x:L+n.width/2,y:F-_/2+n.height+v},{x:L+d/2,y:F-_/2+n.height+v},{x:L+d/2,y:F+_/2},{x:L-d/2,y:F+_/2},{x:L-d/2,y:F-_/2+n.height+v},{x:L-n.width/2,y:F-_/2+n.height+v}]:H=[{x:L-d/2,y:F-_/2},{x:L+d/2,y:F-_/2},{x:L+d/2,y:F-_/2+m},{x:L+n.width/2,y:F-_/2+m},{x:L+n.width/2/2,y:F+_/2},{x:L-n.width/2,y:F+_/2},{x:L-n.width/2,y:F-_/2+m},{x:L-d/2,y:F-_/2+m}],P.polygon(t,H,j)},h})}b(us,"icon");function ds(l,r,f){return C(this,arguments,function*(y,t,{config:{themeVariables:g,flowchart:o}}){let{labelStyles:a}=R(t);t.labelStyle=a;let c=t.assetHeight??48,s=t.assetWidth??48,e=Math.max(c,s),i=o?.wrappingWidth;t.width=Math.max(e,i??0);let{shapeSvg:h,bbox:n,label:p}=yield O(y,t,"icon-shape default"),u=20,m=t.label?8:0,d=t.pos==="t",{nodeBorder:x,mainBkg:D}=g,{stylesMap:S}=St(t),$=w.svg(h),v=N(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let B=S.get("fill");v.stroke=B??D;let k=h.append("g");t.icon&&k.html(`<g>${yield $t(t.icon,{height:e,width:e,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),I=M.width,Y=M.height,V=M.x,q=M.y,W=Math.max(I,Y)*Math.SQRT2+u*2,j=$.circle(0,0,W,v),L=Math.max(W,n.width),F=W+n.height+m,_=$.rectangle(-L/2,-F/2,L,F,rt(tt({},v),{fill:"transparent",stroke:"none"})),H=h.insert(()=>j,":first-child"),X=h.insert(()=>_);return k.attr("transform",`translate(${-I/2-V},${d?n.height/2+m/2-Y/2-q:-n.height/2-m/2-Y/2-q})`),k.attr("style",`color: ${S.get("stroke")??x};`),p.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${d?-F/2:F/2-n.height})`),H.attr("transform",`translate(0,${d?n.height/2+m/2:-n.height/2-m/2})`),A(t,X),t.intersect=function(E){return Z.info("iconSquare intersect",t,E),P.rect(t,E)},h})}b(ds,"iconCircle");function ms(l,r,f){return C(this,arguments,function*(y,t,{config:{themeVariables:g,flowchart:o}}){let{labelStyles:a}=R(t);t.labelStyle=a;let c=t.assetHeight??48,s=t.assetWidth??48,e=Math.max(c,s),i=o?.wrappingWidth;t.width=Math.max(e,i??0);let{shapeSvg:h,bbox:n,halfPadding:p,label:u}=yield O(y,t,"icon-shape default"),m=t.pos==="t",d=e+p*2,x=e+p*2,{nodeBorder:D,mainBkg:S}=g,{stylesMap:$}=St(t),v=-x/2,B=-d/2,k=t.label?8:0,M=w.svg(h),I=N(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let Y=$.get("fill");I.stroke=Y??S;let V=M.path(yt(v,B,x,d,5),I),q=Math.max(x,n.width),W=d+n.height+k,j=M.rectangle(-q/2,-W/2,q,W,rt(tt({},I),{fill:"transparent",stroke:"none"})),L=h.insert(()=>V,":first-child").attr("class","icon-shape2"),F=h.insert(()=>j);if(t.icon){let _=h.append("g");_.html(`<g>${yield $t(t.icon,{height:e,width:e,fallbackPrefix:""})}</g>`);let H=_.node().getBBox(),X=H.width,E=H.height,G=H.x,J=H.y;_.attr("transform",`translate(${-X/2-G},${m?n.height/2+k/2-E/2-J:-n.height/2-k/2-E/2-J})`),_.attr("style",`color: ${$.get("stroke")??D};`)}return u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${m?-W/2:W/2-n.height})`),L.attr("transform",`translate(0,${m?n.height/2+k/2:-n.height/2-k/2})`),A(t,F),t.intersect=function(_){if(Z.info("iconSquare intersect",t,_),!t.label)return P.rect(t,_);let H=t.x??0,X=t.y??0,E=t.height??0,G=[];return m?G=[{x:H-n.width/2,y:X-E/2},{x:H+n.width/2,y:X-E/2},{x:H+n.width/2,y:X-E/2+n.height+k},{x:H+x/2,y:X-E/2+n.height+k},{x:H+x/2,y:X+E/2},{x:H-x/2,y:X+E/2},{x:H-x/2,y:X-E/2+n.height+k},{x:H-n.width/2,y:X-E/2+n.height+k}]:G=[{x:H-x/2,y:X-E/2},{x:H+x/2,y:X-E/2},{x:H+x/2,y:X-E/2+d},{x:H+n.width/2,y:X-E/2+d},{x:H+n.width/2/2,y:X+E/2},{x:H-n.width/2,y:X+E/2},{x:H-n.width/2,y:X-E/2+d},{x:H-x/2,y:X-E/2+d}],P.polygon(t,G,_)},h})}b(ms,"iconRounded");function xs(l,r,f){return C(this,arguments,function*(y,t,{config:{themeVariables:g,flowchart:o}}){let{labelStyles:a}=R(t);t.labelStyle=a;let c=t.assetHeight??48,s=t.assetWidth??48,e=Math.max(c,s),i=o?.wrappingWidth;t.width=Math.max(e,i??0);let{shapeSvg:h,bbox:n,halfPadding:p,label:u}=yield O(y,t,"icon-shape default"),m=t.pos==="t",d=e+p*2,x=e+p*2,{nodeBorder:D,mainBkg:S}=g,{stylesMap:$}=St(t),v=-x/2,B=-d/2,k=t.label?8:0,M=w.svg(h),I=N(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let Y=$.get("fill");I.stroke=Y??S;let V=M.path(yt(v,B,x,d,.1),I),q=Math.max(x,n.width),W=d+n.height+k,j=M.rectangle(-q/2,-W/2,q,W,rt(tt({},I),{fill:"transparent",stroke:"none"})),L=h.insert(()=>V,":first-child"),F=h.insert(()=>j);if(t.icon){let _=h.append("g");_.html(`<g>${yield $t(t.icon,{height:e,width:e,fallbackPrefix:""})}</g>`);let H=_.node().getBBox(),X=H.width,E=H.height,G=H.x,J=H.y;_.attr("transform",`translate(${-X/2-G},${m?n.height/2+k/2-E/2-J:-n.height/2-k/2-E/2-J})`),_.attr("style",`color: ${$.get("stroke")??D};`)}return u.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))},${m?-W/2:W/2-n.height})`),L.attr("transform",`translate(0,${m?n.height/2+k/2:-n.height/2-k/2})`),A(t,F),t.intersect=function(_){if(Z.info("iconSquare intersect",t,_),!t.label)return P.rect(t,_);let H=t.x??0,X=t.y??0,E=t.height??0,G=[];return m?G=[{x:H-n.width/2,y:X-E/2},{x:H+n.width/2,y:X-E/2},{x:H+n.width/2,y:X-E/2+n.height+k},{x:H+x/2,y:X-E/2+n.height+k},{x:H+x/2,y:X+E/2},{x:H-x/2,y:X+E/2},{x:H-x/2,y:X-E/2+n.height+k},{x:H-n.width/2,y:X-E/2+n.height+k}]:G=[{x:H-x/2,y:X-E/2},{x:H+x/2,y:X-E/2},{x:H+x/2,y:X-E/2+d},{x:H+n.width/2,y:X-E/2+d},{x:H+n.width/2/2,y:X+E/2},{x:H-n.width/2,y:X+E/2},{x:H-n.width/2,y:X-E/2+d},{x:H-x/2,y:X-E/2+d}],P.polygon(t,G,_)},h})}b(xs,"iconSquare");function ws(o,l,r){return C(this,arguments,function*(y,t,{config:{flowchart:g}}){let f=new Image;f.src=t?.img??"",yield f.decode();let a=Number(f.naturalWidth.toString().replace("px","")),c=Number(f.naturalHeight.toString().replace("px",""));t.imageAspectRatio=a/c;let{labelStyles:s}=R(t);t.labelStyle=s;let e=g?.wrappingWidth;t.defaultWidth=g?.wrappingWidth;let i=Math.max(t.label?e??0:0,t?.assetWidth??a),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:i,n=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??c;t.width=Math.max(h,e??0);let{shapeSvg:p,bbox:u,label:m}=yield O(y,t,"image-shape default"),d=t.pos==="t",x=-h/2,D=-n/2,S=t.label?8:0,$=w.svg(p),v=N(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let B=$.rectangle(x,D,h,n,v),k=Math.max(h,u.width),M=n+u.height+S,I=$.rectangle(-k/2,-M/2,k,M,rt(tt({},v),{fill:"none",stroke:"none"})),Y=p.insert(()=>B,":first-child"),V=p.insert(()=>I);if(t.img){let q=p.append("image");q.attr("href",t.img),q.attr("width",h),q.attr("height",n),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-h/2},${d?M/2-n:-M/2})`)}return m.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-n/2-u.height/2-S/2:n/2-u.height/2+S/2})`),Y.attr("transform",`translate(0,${d?u.height/2+S/2:-u.height/2-S/2})`),A(t,V),t.intersect=function(q){if(Z.info("iconSquare intersect",t,q),!t.label)return P.rect(t,q);let W=t.x??0,j=t.y??0,L=t.height??0,F=[];return d?F=[{x:W-u.width/2,y:j-L/2},{x:W+u.width/2,y:j-L/2},{x:W+u.width/2,y:j-L/2+u.height+S},{x:W+h/2,y:j-L/2+u.height+S},{x:W+h/2,y:j+L/2},{x:W-h/2,y:j+L/2},{x:W-h/2,y:j-L/2+u.height+S},{x:W-u.width/2,y:j-L/2+u.height+S}]:F=[{x:W-h/2,y:j-L/2},{x:W+h/2,y:j-L/2},{x:W+h/2,y:j-L/2+n},{x:W+u.width/2,y:j-L/2+n},{x:W+u.width/2/2,y:j+L/2},{x:W-u.width/2,y:j+L/2},{x:W-u.width/2,y:j-L/2+n},{x:W-h/2,y:j-L/2+n}],P.polygon(t,F,q)},p})}b(ws,"imageSquare");function bs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=Math.max(r.width+(t.padding??0)*2,t?.width??0),a=Math.max(r.height+(t.padding??0)*2,t?.height??0),c=[{x:0,y:0},{x:f,y:0},{x:f+3*a/6,y:-a},{x:-3*a/6,y:-a}],s,{cssStyles:e}=t;if(t.look==="handDrawn"){let i=w.svg(l),h=N(t,{}),n=z(c),p=i.path(n,h);s=l.insert(()=>p,":first-child").attr("transform",`translate(${-f/2}, ${a/2})`),e&&s.attr("style",e)}else s=ht(l,f,a,c);return o&&s.attr("style",o),t.width=f,t.height=a,A(t,s),t.intersect=function(i){return P.polygon(t,c,i)},l})}b(bs,"inv_trapezoid");function Dt(y,t,g){return C(this,null,function*(){let{labelStyles:o,nodeStyles:l}=R(t);t.labelStyle=o;let{shapeSvg:r,bbox:f}=yield O(y,t,T(t)),a=Math.max(f.width+g.labelPaddingX*2,t?.width||0),c=Math.max(f.height+g.labelPaddingY*2,t?.height||0),s=-a/2,e=-c/2,i,{rx:h,ry:n}=t,{cssStyles:p}=t;if(g?.rx&&g.ry&&(h=g.rx,n=g.ry),t.look==="handDrawn"){let u=w.svg(r),m=N(t,{}),d=h||n?u.path(yt(s,e,a,c,h||0),m):u.rectangle(s,e,a,c,m);i=r.insert(()=>d,":first-child"),i.attr("class","basic label-container").attr("style",st(p))}else i=r.insert("rect",":first-child"),i.attr("class","basic label-container").attr("style",l).attr("rx",st(h)).attr("ry",st(n)).attr("x",s).attr("y",e).attr("width",a).attr("height",c);return A(t,i),t.calcIntersect=function(u,m){return P.rect(u,m)},t.intersect=function(u){return P.rect(t,u)},r})}b(Dt,"drawRect");function Ss(y,t){return C(this,null,function*(){let{shapeSvg:g,bbox:o,label:l}=yield O(y,t,"label"),r=g.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),g.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),A(t,r),t.intersect=function(c){return P.rect(t,c)},g})}b(Ss,"labelRect");function $s(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=Math.max(r.width+(t.padding??0),t?.width??0),a=Math.max(r.height+(t.padding??0),t?.height??0),c=[{x:0,y:0},{x:f+3*a/6,y:0},{x:f,y:-a},{x:-(3*a)/6,y:-a}],s,{cssStyles:e}=t;if(t.look==="handDrawn"){let i=w.svg(l),h=N(t,{}),n=z(c),p=i.path(n,h);s=l.insert(()=>p,":first-child").attr("transform",`translate(${-f/2}, ${a/2})`),e&&s.attr("style",e)}else s=ht(l,f,a,c);return o&&s.attr("style",o),t.width=f,t.height=a,A(t,s),t.intersect=function(i){return P.polygon(t,c,i)},l})}b($s,"lean_left");function vs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=Math.max(r.width+(t.padding??0),t?.width??0),a=Math.max(r.height+(t.padding??0),t?.height??0),c=[{x:-3*a/6,y:0},{x:f,y:0},{x:f+3*a/6,y:-a},{x:0,y:-a}],s,{cssStyles:e}=t;if(t.look==="handDrawn"){let i=w.svg(l),h=N(t,{}),n=z(c),p=i.path(n,h);s=l.insert(()=>p,":first-child").attr("transform",`translate(${-f/2}, ${a/2})`),e&&s.attr("style",e)}else s=ht(l,f,a,c);return o&&s.attr("style",o),t.width=f,t.height=a,A(t,s),t.intersect=function(i){return P.polygon(t,c,i)},l})}b(vs,"lean_right");function ks(y,t){let{labelStyles:g,nodeStyles:o}=R(t);t.label="",t.labelStyle=g;let l=y.insert("g").attr("class",T(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,f=Math.max(35,t?.width??0),a=Math.max(35,t?.height??0),c=7,s=[{x:f,y:0},{x:0,y:a+c/2},{x:f-2*c,y:a+c/2},{x:0,y:2*a},{x:f,y:a-c/2},{x:2*c,y:a-c/2}],e=w.svg(l),i=N(t,{});t.look!=="handDrawn"&&(i.roughness=0,i.fillStyle="solid");let h=z(s),n=e.path(h,i),p=l.insert(()=>n,":first-child");return r&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",r),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),p.attr("transform",`translate(-${f/2},${-a})`),A(t,p),t.intersect=function(u){return Z.info("lightningBolt intersect",t,u),P.polygon(t,s,u)},l}b(ks,"lightningBolt");var ve=b((y,t,g,o,l,r,f)=>[`M${y},${t+r}`,`a${l},${r} 0,0,0 ${g},0`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${o}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-o}`,`M${y},${t+r+f}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createCylinderPathD"),ke=b((y,t,g,o,l,r,f)=>[`M${y},${t+r}`,`M${y+g},${t+r}`,`a${l},${r} 0,0,0 ${-g},0`,`l0,${o}`,`a${l},${r} 0,0,0 ${g},0`,`l0,${-o}`,`M${y},${t+r+f}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createOuterCylinderPathD"),De=b((y,t,g,o,l,r)=>[`M${y-g/2},${-o/2}`,`a${l},${r} 0,0,0 ${g},0`].join(" "),"createInnerCylinderPathD");function Ds(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0),t.width??0),c=a/2,s=c/(2.5+a/50),e=Math.max(r.height+s+(t.padding??0),t.height??0),i=e*.1,h,{cssStyles:n}=t;if(t.look==="handDrawn"){let p=w.svg(l),u=ke(0,0,a,e,c,s,i),m=De(0,s,a,e,c,s),d=N(t,{}),x=p.path(u,d),D=p.path(m,d);l.insert(()=>D,":first-child").attr("class","line"),h=l.insert(()=>x,":first-child"),h.attr("class","basic label-container"),n&&h.attr("style",n)}else{let p=ve(0,0,a,e,c,s,i);h=l.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",st(n)).attr("style",o)}return h.attr("label-offset-y",s),h.attr("transform",`translate(${-a/2}, ${-(e/2+s)})`),A(t,h),f.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)+s-(r.y-(r.top??0))})`),t.intersect=function(p){let u=P.rect(t,p),m=u.x-(t.x??0);if(c!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(u.y-(t.y??0))>(t.height??0)/2-s)){let d=s*s*(1-m*m/(c*c));d>0&&(d=Math.sqrt(d)),d=s-d,p.y-(t.y??0)>0&&(d=-d),u.y+=d}return u},l})}b(Ds,"linedCylinder");function Bs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),s=c/4,e=c+s,{cssStyles:i}=t,h=w.svg(l),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=[{x:-a/2-a/2*.1,y:-e/2},{x:-a/2-a/2*.1,y:e/2},...ft(-a/2-a/2*.1,e/2,a/2+a/2*.1,e/2,s,.8),{x:a/2+a/2*.1,y:-e/2},{x:-a/2-a/2*.1,y:-e/2},{x:-a/2,y:-e/2},{x:-a/2,y:e/2*1.1},{x:-a/2,y:-e/2}],u=h.polygon(p.map(d=>[d.x,d.y]),n),m=l.insert(()=>u,":first-child");return m.attr("class","basic label-container"),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),m.attr("transform",`translate(0,${-s/2})`),f.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(r.x-(r.left??0))},${-c/2+(t.padding??0)-s/2-(r.y-(r.top??0))})`),A(t,m),t.intersect=function(d){return P.polygon(t,p,d)},l})}b(Bs,"linedWaveEdgedRect");function Ms(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),s=5,e=-a/2,i=-c/2,{cssStyles:h}=t,n=w.svg(l),p=N(t,{}),u=[{x:e-s,y:i+s},{x:e-s,y:i+c+s},{x:e+a-s,y:i+c+s},{x:e+a-s,y:i+c},{x:e+a,y:i+c},{x:e+a,y:i+c-s},{x:e+a+s,y:i+c-s},{x:e+a+s,y:i-s},{x:e+s,y:i-s},{x:e+s,y:i},{x:e,y:i},{x:e,y:i+s}],m=[{x:e,y:i+s},{x:e+a-s,y:i+s},{x:e+a-s,y:i+c},{x:e+a,y:i+c},{x:e+a,y:i},{x:e,y:i}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let d=z(u),x=n.path(d,p),D=z(m),S=n.path(D,rt(tt({},p),{fill:"none"})),$=l.insert(()=>S,":first-child");return $.insert(()=>x,":first-child"),$.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",h),o&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",o),f.attr("transform",`translate(${-(r.width/2)-s-(r.x-(r.left??0))}, ${-(r.height/2)+s-(r.y-(r.top??0))})`),A(t,$),t.intersect=function(v){return P.polygon(t,u,v)},l})}b(Ms,"multiRect");function Cs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),s=c/4,e=c+s,i=-a/2,h=-e/2,n=5,{cssStyles:p}=t,u=ft(i-n,h+e+n,i+a-n,h+e+n,s,.8),m=u?.[u.length-1],d=[{x:i-n,y:h+n},{x:i-n,y:h+e+n},...u,{x:i+a-n,y:m.y-n},{x:i+a,y:m.y-n},{x:i+a,y:m.y-2*n},{x:i+a+n,y:m.y-2*n},{x:i+a+n,y:h-n},{x:i+n,y:h-n},{x:i+n,y:h},{x:i,y:h},{x:i,y:h+n}],x=[{x:i,y:h+n},{x:i+a-n,y:h+n},{x:i+a-n,y:m.y-n},{x:i+a,y:m.y-n},{x:i+a,y:h},{x:i,y:h}],D=w.svg(l),S=N(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let $=z(d),v=D.path($,S),B=z(x),k=D.path(B,S),M=l.insert(()=>v,":first-child");return M.insert(()=>k),M.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",p),o&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-s/2})`),f.attr("transform",`translate(${-(r.width/2)-n-(r.x-(r.left??0))}, ${-(r.height/2)+n-s/2-(r.y-(r.top??0))})`),A(t,M),t.intersect=function(I){return P.polygon(t,d,I)},l})}b(Cs,"multiWaveEdgedRectangle");function Ps(o,l,r){return C(this,arguments,function*(y,t,{config:{themeVariables:g}}){let{labelStyles:f,nodeStyles:a}=R(t);t.labelStyle=f,t.useHtmlLabels||it(dt())||(t.centerLabel=!0);let{shapeSvg:s,bbox:e,label:i}=yield O(y,t,T(t)),h=Math.max(e.width+(t.padding??0)*2,t?.width??0),n=Math.max(e.height+(t.padding??0)*2,t?.height??0),p=-h/2,u=-n/2,{cssStyles:m}=t,d=w.svg(s),x=N(t,{fill:g.noteBkgColor,stroke:g.noteBorderColor});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let D=d.rectangle(p,u,h,n,x),S=s.insert(()=>D,":first-child");return S.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),a&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",a),i.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-(e.height/2)-(e.y-(e.top??0))})`),A(t,S),t.intersect=function($){return P.rect(t,$)},s})}b(Ps,"note");var Be=b((y,t,g)=>[`M${y+g/2},${t}`,`L${y+g},${t-g/2}`,`L${y+g/2},${t-g}`,`L${y},${t-g/2}`,"Z"].join(" "),"createDecisionBoxPathD");function Ns(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=r.width+t.padding,a=r.height+t.padding,c=f+a,s=.5,e=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}],i,{cssStyles:h}=t;if(t.look==="handDrawn"){let n=w.svg(l),p=N(t,{}),u=Be(0,0,c),m=n.path(u,p);i=l.insert(()=>m,":first-child").attr("transform",`translate(${-c/2+s}, ${c/2})`),h&&i.attr("style",h)}else i=ht(l,c,c,e),i.attr("transform",`translate(${-c/2+s}, ${c/2})`);return o&&i.attr("style",o),A(t,i),t.calcIntersect=function(n,p){let u=n.width,m=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],d=P.polygon(n,m,p);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(n){return this.calcIntersect(t,n)},l})}b(Ns,"question");function Rs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0),t?.width??0),c=Math.max(r.height+(t.padding??0),t?.height??0),s=-a/2,e=-c/2,i=e/2,h=[{x:s+i,y:e},{x:s,y:0},{x:s+i,y:-e},{x:-s,y:-e},{x:-s,y:e}],{cssStyles:n}=t,p=w.svg(l),u=N(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=z(h),d=p.path(m,u),x=l.insert(()=>d,":first-child");return x.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",o),x.attr("transform",`translate(${-i/2},0)`),f.attr("transform",`translate(${-i/2-r.width/2-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),A(t,x),t.intersect=function(D){return P.polygon(t,h,D)},l})}b(Rs,"rect_left_inv_arrow");function As(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let l;t.cssClasses?l="node "+t.cssClasses:l="node default";let r=y.insert("g").attr("class",l).attr("id",t.domId||t.id),f=r.insert("g"),a=r.insert("g").attr("class","label").attr("style",o),c=t.description,s=t.label,e=yield Bt(a,s,t.labelStyle,!0,!0),i={width:0,height:0};if(it(U())){let k=e.children[0],M=Q(e);i=k.getBoundingClientRect(),M.attr("width",i.width),M.attr("height",i.height)}Z.info("Text 2",c);let h=c||[],n=e.getBBox(),p=yield Bt(a,Array.isArray(h)?h.join("<br/>"):h,t.labelStyle,!0,!0),u=p.children[0],m=Q(p);i=u.getBoundingClientRect(),m.attr("width",i.width),m.attr("height",i.height);let d=(t.padding||0)/2;Q(p).attr("transform","translate( "+(i.width>n.width?0:(n.width-i.width)/2)+", "+(n.height+d+5)+")"),Q(e).attr("transform","translate( "+(i.width<n.width?0:-(n.width-i.width)/2)+", 0)"),i=a.node().getBBox(),a.attr("transform","translate("+-i.width/2+", "+(-i.height/2-d+3)+")");let x=i.width+(t.padding||0),D=i.height+(t.padding||0),S=-i.width/2-d,$=-i.height/2-d,v,B;if(t.look==="handDrawn"){let k=w.svg(r),M=N(t,{}),I=k.path(yt(S,$,x,D,t.rx||0),M),Y=k.line(-i.width/2-d,-i.height/2-d+n.height+d,i.width/2+d,-i.height/2-d+n.height+d,M);B=r.insert(()=>(Z.debug("Rough node insert CXC",I),Y),":first-child"),v=r.insert(()=>(Z.debug("Rough node insert CXC",I),I),":first-child")}else v=f.insert("rect",":first-child"),B=f.insert("line"),v.attr("class","outer title-state").attr("style",o).attr("x",-i.width/2-d).attr("y",-i.height/2-d).attr("width",i.width+(t.padding||0)).attr("height",i.height+(t.padding||0)),B.attr("class","divider").attr("x1",-i.width/2-d).attr("x2",i.width/2+d).attr("y1",-i.height/2-d+n.height+d).attr("y2",-i.height/2-d+n.height+d);return A(t,v),t.intersect=function(k){return P.rect(t,k)},r})}b(As,"rectWithTitle");function Ls(y,t){return C(this,null,function*(){let g={rx:5,ry:5,classes:"",labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return Dt(y,t,g)})}b(Ls,"roundedRect");function Hs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=t?.padding??0,c=Math.max(r.width+(t.padding??0)*2,t?.width??0),s=Math.max(r.height+(t.padding??0)*2,t?.height??0),e=-r.width/2-a,i=-r.height/2-a,{cssStyles:h}=t,n=w.svg(l),p=N(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let u=[{x:e,y:i},{x:e+c+8,y:i},{x:e+c+8,y:i+s},{x:e-8,y:i+s},{x:e-8,y:i},{x:e,y:i},{x:e,y:i+s}],m=n.polygon(u.map(x=>[x.x,x.y]),p),d=l.insert(()=>m,":first-child");return d.attr("class","basic label-container").attr("style",st(h)),o&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),h&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),f.attr("transform",`translate(${-c/2+4+(t.padding??0)-(r.x-(r.left??0))},${-s/2+(t.padding??0)-(r.y-(r.top??0))})`),A(t,d),t.intersect=function(x){return P.rect(t,x)},l})}b(Hs,"shadedProcess");function Ws(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),s=-a/2,e=-c/2,{cssStyles:i}=t,h=w.svg(l),n=N(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let p=[{x:s,y:e},{x:s,y:e+c},{x:s+a,y:e+c},{x:s+a,y:e-c/2}],u=z(p),m=h.path(u,n),d=l.insert(()=>m,":first-child");return d.attr("class","basic label-container"),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),d.attr("transform",`translate(0, ${c/4})`),f.attr("transform",`translate(${-a/2+(t.padding??0)-(r.x-(r.left??0))}, ${-c/4+(t.padding??0)-(r.y-(r.top??0))})`),A(t,d),t.intersect=function(x){return P.polygon(t,p,x)},l})}b(Ws,"slopedRect");function Is(y,t){return C(this,null,function*(){let g={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Dt(y,t,g)})}b(Is,"squareRect");function Es(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=r.height+t.padding,a=r.width+f/4+t.padding,c=f/2,{cssStyles:s}=t,e=w.svg(l),i=N(t,{});t.look!=="handDrawn"&&(i.roughness=0,i.fillStyle="solid");let h=[{x:-a/2+c,y:-f/2},{x:a/2-c,y:-f/2},...kt(-a/2+c,0,c,50,90,270),{x:a/2-c,y:f/2},...kt(a/2-c,0,c,50,270,450)],n=z(h),p=e.path(n,i),u=l.insert(()=>p,":first-child");return u.attr("class","basic label-container outer-path"),s&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",s),o&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",o),A(t,u),t.intersect=function(m){return P.polygon(t,h,m)},l})}b(Es,"stadium");function Ts(y,t){return C(this,null,function*(){return Dt(y,t,{rx:5,ry:5,classes:"flowchart-node"})})}b(Ts,"state");function _s(y,t,{config:{themeVariables:g}}){let{labelStyles:o,nodeStyles:l}=R(t);t.labelStyle=o;let{cssStyles:r}=t,{lineColor:f,stateBorder:a,nodeBorder:c}=g,s=y.insert("g").attr("class","node default").attr("id",t.domId||t.id),e=w.svg(s),i=N(t,{});t.look!=="handDrawn"&&(i.roughness=0,i.fillStyle="solid");let h=e.circle(0,0,14,rt(tt({},i),{stroke:f,strokeWidth:2})),n=a??c,p=e.circle(0,0,5,rt(tt({},i),{fill:n,stroke:n,strokeWidth:2,fillStyle:"solid"})),u=s.insert(()=>h,":first-child");return u.insert(()=>p),r&&u.selectAll("path").attr("style",r),l&&u.selectAll("path").attr("style",l),A(t,u),t.intersect=function(m){return P.circle(t,7,m)},s}b(_s,"stateEnd");function Os(y,t,{config:{themeVariables:g}}){let{lineColor:o}=g,l=y.insert("g").attr("class","node default").attr("id",t.domId||t.id),r;if(t.look==="handDrawn"){let a=w.svg(l).circle(0,0,14,jt(o));r=l.insert(()=>a),r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else r=l.insert("circle",":first-child"),r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return A(t,r),t.intersect=function(f){return P.circle(t,7,f)},l}b(Os,"stateStart");function js(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=(t?.padding||0)/2,a=r.width+t.padding,c=r.height+t.padding,s=-r.width/2-f,e=-r.height/2-f,i=[{x:0,y:0},{x:a,y:0},{x:a,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-c},{x:-8,y:-c},{x:-8,y:0}];if(t.look==="handDrawn"){let h=w.svg(l),n=N(t,{}),p=h.rectangle(s-8,e,a+16,c,n),u=h.line(s,e,s,e+c,n),m=h.line(s+a,e,s+a,e+c,n);l.insert(()=>u,":first-child"),l.insert(()=>m,":first-child");let d=l.insert(()=>p,":first-child"),{cssStyles:x}=t;d.attr("class","basic label-container").attr("style",st(x)),A(t,d)}else{let h=ht(l,a,c,i);o&&h.attr("style",o),A(t,h)}return t.intersect=function(h){return P.polygon(t,i,h)},l})}b(js,"subroutine");function Xs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=Math.max(r.width+(t.padding??0)*2,t?.width??0),a=Math.max(r.height+(t.padding??0)*2,t?.height??0),c=-f/2,s=-a/2,e=.2*a,i=.2*a,{cssStyles:h}=t,n=w.svg(l),p=N(t,{}),u=[{x:c-e/2,y:s},{x:c+f+e/2,y:s},{x:c+f+e/2,y:s+a},{x:c-e/2,y:s+a}],m=[{x:c+f-e/2,y:s+a},{x:c+f+e/2,y:s+a},{x:c+f+e/2,y:s+a-i}];t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let d=z(u),x=n.path(d,p),D=z(m),S=n.path(D,rt(tt({},p),{fillStyle:"solid"})),$=l.insert(()=>S,":first-child");return $.insert(()=>x,":first-child"),$.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",h),o&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",o),A(t,$),t.intersect=function(v){return P.polygon(t,u,v)},l})}b(Xs,"taggedRect");function Ys(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r,label:f}=yield O(y,t,T(t)),a=Math.max(r.width+(t.padding??0)*2,t?.width??0),c=Math.max(r.height+(t.padding??0)*2,t?.height??0),s=c/4,e=.2*a,i=.2*c,h=c+s,{cssStyles:n}=t,p=w.svg(l),u=N(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-a/2-a/2*.1,y:h/2},...ft(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,s,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],d=-a/2+a/2*.1,x=-h/2-i*.4,D=[{x:d+a-e,y:(x+c)*1.4},{x:d+a,y:x+c-i},{x:d+a,y:(x+c)*.9},...ft(d+a,(x+c)*1.3,d+a-e,(x+c)*1.5,-c*.03,.5)],S=z(m),$=p.path(S,u),v=z(D),B=p.path(v,rt(tt({},u),{fillStyle:"solid"})),k=l.insert(()=>B,":first-child");return k.insert(()=>$,":first-child"),k.attr("class","basic label-container"),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",o),k.attr("transform",`translate(0,${-s/2})`),f.attr("transform",`translate(${-a/2+(t.padding??0)-(r.x-(r.left??0))},${-c/2+(t.padding??0)-s/2-(r.y-(r.top??0))})`),A(t,k),t.intersect=function(M){return P.polygon(t,m,M)},l})}b(Ys,"taggedWaveEdgedRectangle");function qs(y,t){return C(this,null,function*(){let{labelStyles:g,nodeStyles:o}=R(t);t.labelStyle=g;let{shapeSvg:l,bbox:r}=yield O(y,t,T(t)),f=Math.max(r.width+t.padding,t?.width||0),a=Math.max(r.height+t.padding,t?.height||0),c=-f/2,s=-a/2,e=l.insert("rect",":first-child");return e.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",c).attr("y",s).attr("width",f).attr("height",a),A(t,e),t.intersect=function(i){return P.rect(t,i)},l})}b(qs,"text");var Me=b((y,t,g,o,l,r)=>`M${y},${t}
3 a${l},${r} 0,0,1 0,${-o}
4 l${g},0
5 a${l},${r} 0,0,1 0,${o}

Callers

nothing calls this directly

Calls 15

AFunction · 0.90
rectangleMethod · 0.80
rectMethod · 0.80
polygonMethod · 0.80
CFunction · 0.70
RFunction · 0.70
OFunction · 0.70
StFunction · 0.70
NFunction · 0.70
ytFunction · 0.70
rtFunction · 0.70
ttFunction · 0.70

Tested by

no test coverage detected