PageSourceSearch

https://www.lighthouseacademy.ai/_next/static/chunks/f2098590.b1e9140f4f0cf6f7.js

js lighthouseacademy.ai collected 2026-10-04 23:38:16 UTC 116,270 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6664],{93950:function(t,e,l){l.d(e,{C1:function(){return u},Lf:function(){return ef},XO:function(){return b},Yn:function(){return ew},ZH:function(){return A},aH:function(){return ev},dW:function(){return eg},gU:function(){return ep},jr:function(){return y},us:function(){return B}});var a,n=l(1565),i=l(66005),o=l(6045),r=l(42877),c=l(66764),s=l(99573),d=l(53082),h=l(70160),u=(0,s.eW)(async(t,e,l)=>{var a,i,s;let h;let u=e.useHtmlLabels||(0,c.ku)(null===(a=(0,c.nV)())||void 0===a?void 0:a.htmlLabels),g=t.insert("g").attr("class",l||"node default").attr("id",e.domId||e.id),y=g.insert("g").attr("class","label").attr("style",(0,r.R7)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let f=!!e.icon||!!e.img,w="markdown"===e.labelType,p=await (0,o.rw)(y,(0,c.oO)((0,r.SH)(h),(0,c.nV)()),{useHtmlLabels:u,width:e.width||(null===(i=(0,c.nV)().flowchart)||void 0===i?void 0:i.wrappingWidth),classes:w?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:f,markdown:w},(0,c.nV)()),v=p.getBBox(),m=(null!==(s=null==e?void 0:e.padding)&&void 0!==s?s:0)/2;if(u){let t=p.children[0],e=(0,d.Ys)(p);await (0,n.i)(t,h),v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}return u?y.attr("transform","translate("+-v.width/2+", "+-v.height/2+")"):y.attr("transform","translate(0, "+-v.height/2+")"),e.centerLabel&&y.attr("transform","translate("+-v.width/2+", "+-v.height/2+")"),y.insert("rect",":first-child"),{shapeSvg:g,bbox:v,halfPadding:m,label:y}},"labelHelper"),g=(0,s.eW)(async(t,e,l)=>{var a,n,i;let s=null!==(i=l.useHtmlLabels)&&void 0!==i?i:(0,c._X)((0,c.nV)()),h=t.insert("g").attr("class","label").attr("style",l.labelStyle||""),u=await (0,o.rw)(h,(0,c.oO)((0,r.SH)(e),(0,c.nV)()),{useHtmlLabels:s,width:l.width||(null===(n=(0,c.nV)())||void 0===n?void 0:null===(a=n.flowchart)||void 0===a?void 0:a.wrappingWidth),style:l.labelStyle,addSvgBackground:!!l.icon||!!l.img}),g=u.getBBox(),y=l.padding/2;if((0,c._X)((0,c.nV)())){let t=u.children[0],e=(0,d.Ys)(u);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return s?h.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"):h.attr("transform","translate(0, "+-g.height/2+")"),l.centerLabel&&h.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:t,bbox:g,halfPadding:y,label:h}},"insertLabel"),y=(0,s.eW)((t,e)=>{let l=e.node().getBBox();t.width=l.width,t.height=l.height},"updateNodeBounds"),f=(0,s.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function w(t){let e=t.map((t,e)=>"".concat(0===e?"M":"L").concat(t.x,",").concat(t.y));return e.push("Z"),e.join(" ")}function p(t,e,l,a,n,i){let o=[],r=l-t,c=2*Math.PI/(r/i),s=e+(a-e)/2;for(let e=0;e<=50;e++){let l=t+e/50*r,a=s+n*Math.sin(c*(l-t));o.push({x:l,y:a})}return o}function v(t,e,l,a,n,i){let o=[],r=n*Math.PI/180,c=(i*Math.PI/180-r)/(a-1);for(let n=0;n<a;n++){let a=r+n*c,i=t+l*Math.cos(a),s=e+l*Math.sin(a);o.push({x:-i,y:-s})}return o}function m(t){var e,l,a;let n=Array.from(t.childNodes).filter(t=>"path"===t.tagName),i=document.createElementNS("http://www.w3.org/2000/svg","path"),o=n.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");i.setAttribute("d",o);let r=n.find(t=>"none"!==t.getAttribute("fill")),c=n.find(t=>"none"!==t.getAttribute("stroke")),d=(0,s.eW)((t,e)=>{var l;return null!==(l=null==t?void 0:t.getAttribute(e))&&void 0!==l?l:void 0},"getAttr");r&&Object.entries({fill:d(r,"fill"),"fill-opacity":null!==(e=d(r,"fill-opacity"))&&void 0!==e?e:"1"}).forEach(t=>{let[e,l]=t;l&&i.setAttribute(e,l)}),c&&Object.entries({stroke:d(c,"stroke"),"stroke-width":null!==(l=d(c,"stroke-width"))&&void 0!==l?l:"1","stroke-opacity":null!==(a=d(c,"stroke-opacity"))&&void 0!==a?a:"1"}).forEach(t=>{let[e,l]=t;l&&i.setAttribute(e,l)});let h=document.createElementNS("http://www.w3.org/2000/svg","g");return h.appendChild(i),h}(0,s.eW)(w,"createPathFromPoints"),(0,s.eW)(p,"generateFullSineWavePoints"),(0,s.eW)(v,"generateCirclePoints"),(0,s.eW)(m,"mergePaths");var x=(0,s.eW)((t,e)=>{var l,a,n=t.x,i=t.y,o=e.x-n,r=e.y-i,c=t.width/2,s=t.height/2;return Math.abs(r)*c>Math.abs(o)*s?(r<0&&(s=-s),l=0===r?0:s*o/r,a=s):(o<0&&(c=-c),l=c,a=0===o?0:c*r/o),{x:n+l,y:i+a}},"intersectRect"),b=(0,s.eW)(async function(t,e,l){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=e||"";"object"==typeof i&&(i=i[0]);let r=(0,c.nV)(),s=(0,c._X)(r);return await (0,o.rw)(t,i,{style:l,isTitle:a,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},r)},"createLabel"),k=(0,s.eW)((t,e,l,a,n)=>["M",t+n,e,"H",t+l-n,"A",n,n,0,0,1,t+l,e+n,"V",e+a-n,"A",n,n,0,0,1,t+l-n,e+a,"H",t+n,"A",n,n,0,0,1,t,e+a-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,s.eW)(async(t,e)=>{let l,a;s.cM.info("Creating subgraph rect for ",e.id,e);let r=(0,c.nV)(),{themeVariables:u,handDrawnSeed:g}=r,{clusterBkg:y,clusterBorder:f}=u,{labelStyles:w,nodeStyles:p,borderStyles:v,backgroundStyles:m}=(0,i.UG)(e),M=t.insert("g").attr("class","cluster "+e.cssClasse
1s).attr("id",e.domId).attr("data-look",e.look),S=(0,c._X)(r),D=M.insert("g").attr("class","cluster-label "),W=(l="markdown"===e.labelType?await (0,o.rw)(D,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await b(D,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,c._X)(r)){let t=l.children[0],e=(0,d.Ys)(l);W=t.getBoundingClientRect(),e.attr("width",W.width),e.attr("height",W.height)}let C=e.width<=W.width+e.padding?W.width+e.padding:e.width;e.width<=W.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;let N=e.height,B=e.x-C/2,A=e.y-N/2;if(s.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=h.Z.svg(M),l=(0,i._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),n=t.path(k(B,A,C,N,0),l);(a=M.insert(()=>(s.cM.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",v.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=M.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",A).attr("width",C).attr("height",N);let{subGraphTitleTopMargin:_}=(0,n.L)(r);if(D.attr("transform","translate(".concat(e.x-W.width/2,", ").concat(e.y-e.height/2+_,")")),w){let t=D.select("span");t&&t.attr("style",w)}let q=a.node().getBBox();return e.offsetX=0,e.width=q.width,e.height=q.height,e.offsetY=W.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:M,labelBBox:W}},"rect"),S=(0,s.eW)((t,e)=>{let l=t.insert("g").attr("class","note-cluster").attr("id",e.domId),a=l.insert("rect",":first-child"),n=0*e.padding,i=n/2;a.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+n).attr("height",e.height+n).attr("fill","none");let o=a.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return x(e,t)},{cluster:l,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,s.eW)(async(t,e)=>{let l;let a=(0,c.nV)(),{themeVariables:n,handDrawnSeed:i}=a,{altBackground:o,compositeBackground:r,compositeTitleBackground:s,nodeBorder:u}=n,g=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),y=g.insert("g",":first-child"),f=g.insert("g").attr("class","cluster-label"),w=g.append("rect"),p=await b(f,e.label,e.labelStyle,void 0,!0),v=p.getBBox();if((0,c._X)(a)){let t=p.children[0],e=(0,d.Ys)(p);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}let m=0*e.padding,M=(e.width<=v.width+e.padding?v.width+e.padding:e.width)+m;e.width<=v.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+m,D=e.height+m-v.height-6,W=e.x-M/2,C=e.y-S/2;e.width=M;let N=e.y-e.height/2-m/2+v.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),a=h.Z.svg(g),n=e.rx||e.ry?a.path(k(W,C,M,S,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:u,seed:i}):a.rectangle(W,C,M,S,{seed:i});l=g.insert(()=>n,":first-child");let c=a.rectangle(W,N,M,D,{fill:t?o:r,fillStyle:t?"hachure":"solid",stroke:u,seed:i});l=g.insert(()=>n,":first-child"),w=g.insert(()=>c)}else(l=y.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",C).attr("width",M).attr("height",S).attr("data-look",e.look),w.attr("class","inner").attr("x",W).attr("y",N).attr("width",M).attr("height",D);f.attr("transform","translate(".concat(e.x-v.width/2,", ").concat(C+1-((0,c._X)(a)?0:3),")"));let B=l.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=v.height-e.padding/2,e.labelBBox=v,e.intersect=function(t){return x(e,t)},{cluster:g,labelBBox:v}},"roundedWithTitle"),W=(0,s.eW)(async(t,e)=>{let l;s.cM.info("Creating subgraph rect for ",e.id,e);let a=(0,c.nV)(),{themeVariables:r,handDrawnSeed:u}=a,{clusterBkg:g,clusterBorder:y}=r,{labelStyles:f,nodeStyles:w,borderStyles:p,backgroundStyles:v}=(0,i.UG)(e),m=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,c._X)(a),M=m.insert("g").attr("class","cluster-label "),S=await (0,o.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}),D=S.getBBox();if((0,c._X)(a)){let t=S.children[0],e=(0,d.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let C=e.height,N=e.x-W/2,B=e.y-C/2;if(s.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=h.Z.svg(m),a=(0,i._q)(e,{roughness:.7,fill:g,stroke:y,fillWeight:4,seed:u}),n=t.path(k(N,B,W,C,e.rx),a);(l=m.insert(()=>(s.cM.debug("Rough node insert CXC",n),n),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),l.select("path").attr("style",v.join(";").replace("fill","stroke"))}else(l=m.insert("rect",":first-child")).attr("style",w).attr("rx",e.rx).attr("ry",e.ry).attr("x",N).attr("y",B).attr("width",W).attr("height",C);let{subGraphTitleTopMargin:A}=(0,n.L)(a);if(M.attr("transform","translate(".concat(e.x-D.width/2,", ").concat(e.y-e.height/2+A,")")),f){let t=M.select("span");t&&t.attr("style",f)}let _=l.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:m,labelBBox:D}}
1,"kanbanSection"),C={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,s.eW)((t,e)=>{let l;let{themeVariables:a,handDrawnSeed:n}=(0,c.nV)(),{nodeBorder:i}=a,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),r=o.insert("g",":first-child"),s=0*e.padding,d=e.width+s;e.diff=-e.padding;let u=e.height+s,g=e.x-d/2,y=e.y-u/2;if(e.width=d,"handDrawn"===e.look){let t=h.Z.svg(o).rectangle(g,y,d,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});l=o.insert(()=>t,":first-child")}else{l=r.insert("rect",":first-child");let t="outer";e.look,t="divider",l.attr("class",t).attr("x",g).attr("y",y).attr("width",d).attr("height",u).attr("data-look",e.look)}let f=l.node().getBBox();return e.height=f.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:W},N=new Map,B=(0,s.eW)(async(t,e)=>{let l=e.shape||"rect",a=await C[l](t,e);return N.set(e.id,a),a},"insertCluster"),A=(0,s.eW)(()=>{N=new Map},"clear");function _(t,e){return t.intersect(e)}function q(t,e,l,a){var n=t.x,i=t.y,o=n-a.x,r=i-a.y,c=Math.sqrt(e*e*r*r+l*l*o*o),s=Math.abs(e*l*o/c);a.x<n&&(s=-s);var d=Math.abs(e*l*r/c);return a.y<i&&(d=-d),{x:n+s,y:i+d}}function R(t,e,l){return q(t,e,e,l)}function P(t,e,l,a){{let n=e.y-t.y,i=t.x-e.x,o=e.x*t.y-t.x*e.y,r=n*l.x+i*l.y+o,c=n*a.x+i*a.y+o;if(0!==r&&0!==c&&I(r,c))return;let s=a.y-l.y,d=l.x-a.x,h=a.x*l.y-l.x*a.y,u=s*t.x+d*t.y+h,g=s*e.x+d*e.y+h;if(1e-6>Math.abs(u)&&1e-6>Math.abs(g)&&I(u,g))return;let y=n*d-s*i;if(0===y)return;let f=Math.abs(y/2),w=i*h-d*o;return{x:w<0?(w-f)/y:(w+f)/y,y:(w=s*o-n*h)<0?(w-f)/y:(w+f)/y}}}function I(t,e){return t*e>0}function L(t,e,l){let a=t.x,n=t.y,i=[],o=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),r=Math.min(r,t.y)}):(o=Math.min(o,e.x),r=Math.min(r,e.y));let c=a-t.width/2-o,s=n-t.height/2-r;for(let a=0;a<e.length;a++){let n=e[a],o=e[a<e.length-1?a+1:0],r=P(t,l,{x:c+n.x,y:s+n.y},{x:c+o.x,y:s+o.y});r&&i.push(r)}return i.length?(i.length>1&&i.sort(function(t,e){let a=t.x-l.x,n=t.y-l.y,i=Math.sqrt(a*a+n*n),o=e.x-l.x,r=e.y-l.y,c=Math.sqrt(o*o+r*r);return i<c?-1:i===c?0:1}),i[0]):t}(0,s.eW)(_,"intersectNode"),(0,s.eW)(q,"intersectEllipse"),(0,s.eW)(R,"intersectCircle"),(0,s.eW)(P,"intersectLine"),(0,s.eW)(I,"sameSign"),(0,s.eW)(L,"intersectPolygon");var Z={node:_,circle:R,ellipse:q,polygon:L,rect:x};function U(t,e){let{labelStyles:l}=(0,i.UG)(e);e.labelStyle=l;let a=f(e),n=a;a||(n="anchor");let o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:c}=e,d=h.Z.svg(o),u=(0,i._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);let g=d.circle(0,0,2,u),w=o.insert(()=>g,":first-child");return w.attr("class","anchor").attr("style",(0,r.R7)(c)),y(e,w),e.intersect=function(t){return s.cM.info("Circle intersect",e,1,t),Z.circle(e,1,t)},o}function G(t,e,l,a,n,i,o){let r=Math.atan2(a-e,l-t),c=Math.sqrt(((l-t)/2/n)**2+((a-e)/2/i)**2);if(c>1)throw Error("The given radii are too small to create an arc between the points.");let s=Math.sqrt(1-c**2),d=(t+l)/2+s*i*Math.sin(r)*(o?-1:1),h=(e+a)/2-s*n*Math.cos(r)*(o?-1:1),u=Math.atan2((e-h)/i,(t-d)/n),g=Math.atan2((a-h)/i,(l-d)/n)-u;o&&g<0&&(g+=2*Math.PI),!o&&g>0&&(g-=2*Math.PI);let y=[];for(let t=0;t<20;t++){let e=u+t/19*g,l=d+n*Math.cos(e),a=h+i*Math.sin(e);y.push({x:l,y:a})}return y}function T(t,e,l){let[a,n]=[e,l].sort((t,e)=>e-t);return n*(1-Math.sqrt(1-(t/a/2)**2))}async function E(t,e){var l;let{labelStyles:a,nodeStyles:n}=(0,i.UG)(e);e.labelStyle=a;let o=null!==(l=e.padding)&&void 0!==l?l:0,r="neo"===e.look?16:o,c="neo"===e.look?12:o,d=(0,s.eW)(t=>t+c,"calcTotalHeight"),g=(0,s.eW)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:p,bbox:v}=await u(t,e,f(e)),m=d((null==e?void 0:e.height)?null==e?void 0:e.height:v.height),[x,b]=g(m),k=T(m,x,b),M=((null==e?void 0:e.width)?null==e?void 0:e.width:v.width)+2*r+k-k,{cssStyles:S}=e,D=[{x:M/2,y:-m/2},{x:-M/2,y:-m/2},...G(-M/2,-m/2,-M/2,m/2,x,b,!1),{x:M/2,y:m/2},...G(M/2,m/2,M/2,-m/2,x,b,!0)],W=h.Z.svg(p),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=w(D),B=W.path(N,C),A=p.insert(()=>B,":first-child");return A.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",S),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),A.attr("transform","translate(".concat(x/2,", 0)")),y(e,A),e.intersect=function(t){return Z.polygon(e,D,t)},p}function H(t,e,l,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+l/2+")")}async function j(t,e){var l,a,n;let o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let s=null!==(l=e.padding)&&void 0!==l?l:0,d="neo"===e.look?28:s,g="neo"===e.look?24:s,{shapeSvg:p,bbox:v}=await u(t,e,f(e)),m=(null!==(a=null==e?void 0:e.width)&&void 0!==a?a:v.width)+("neo"===e.look?2*d:d+12),x=(null!==(n=null==e?void 0:e.he
1ight)&&void 0!==n?n:v.height)+("neo"===e.look?2*g:g),b=-x,k=[{x:12,y:b},{x:m,y:b},{x:m,y:0},{x:0,y:0},{x:0,y:b+12},{x:12,y:b}],{cssStyles:M}=e;if("handDrawn"===e.look){let t=h.Z.svg(p),l=(0,i._q)(e,{}),a=w(k),n=t.path(a,l);o=p.insert(()=>n,":first-child").attr("transform","translate(".concat(-m/2,", ").concat(x/2,")")),M&&o.attr("style",M)}else o=H(p,m,x,k);return c&&o.attr("style",c),y(e,o),e.intersect=function(t){return Z.polygon(e,k,t)},p}function V(t,e){var l,a;let{nodeStyles:n}=(0,i.UG)(e);e.label="";let o=t.insert("g").attr("class",f(e)).attr("id",null!==(l=e.domId)&&void 0!==l?l:e.id),{cssStyles:r}=e,c=Math.max(28,null!==(a=e.width)&&void 0!==a?a:0),s=[{x:0,y:c/2},{x:c/2,y:0},{x:0,y:-c/2},{x:-c/2,y:0}],d=h.Z.svg(o),u=(0,i._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let g=w(s),y=d.path(g,u),p=o.insert(()=>y,":first-child");return r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return Z.polygon(e,s,t)},o}async function X(t,e,l){var a;let n;let{labelStyles:o,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=o;let{shapeSvg:d,bbox:g,halfPadding:w}=await u(t,e,f(e)),p=null!==(a=null==l?void 0:l.padding)&&void 0!==a?a:w,v="neo"===e.look?g.width/2+32:g.width/2+p,{cssStyles:m}=e;
1if("handDrawn"===e.look){let t=h.Z.svg(d),l=(0,i._q)(e,{}),a=t.circle(0,0,2*v,l);(n=d.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",(0,r.R7)(m))}else n=d.insert("circle",":first-child").attr("class","basic label-container").attr("style",c).attr("r",v).attr("cx",0).attr("cy",0);return y(e,n),e.calcIntersect=function(t,e){let l=t.width/2;return Z.circle(t,l,e)},e.intersect=function(t){return s.cM.info("Circle intersect",e,v,t),Z.circle(e,v,t)},d}function Y(t){let e=Math.cos(Math.PI/4),l=Math.sin(Math.PI/4),a=2*t,n={x:a/2*e,y:a/2*l},i={x:-(a/2)*e,y:a/2*l},o={x:-(a/2)*e,y:-(a/2)*l},r={x:a/2*e,y:-(a/2)*l};return"M ".concat(i.x,",").concat(i.y," L ").concat(r.x,",").concat(r.y,"\n                   M ").concat(n.x,",").concat(n.y," L ").concat(o.x,",").concat(o.y)}function O(t,e){var l,a;let{labelStyles:n,nodeStyles:o}=(0,i.UG)(e);e.labelStyle=n,e.label="";let r=t.insert("g").attr("class",f(e)).attr("id",null!==(l=e.domId)&&void 0!==l?l:e.id),c=Math.max(30,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),{cssStyles:d}=e,u=h.Z.svg(r),g=(0,i._q)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let w=u.circle(0,0,2*c,g),p=Y(c),v=u.path(p,g),m=r.insert(()=>w,":first-child");return m.insert(()=>v),m.attr("class","outer-path"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),o&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",o),y(e,m),e.intersect=function(t){return s.cM.info("crossedCircle intersect",e,{radius:c,point:t}),Z.circle(e,c,t)},r}function F(t,e,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,o=[],r=n*Math.PI/180,c=(i*Math.PI/180-r)/(a-1);for(let n=0;n<a;n++){let a=r+n*c,i=t+l*Math.cos(a),s=e+l*Math.sin(a);o.push({x:-i,y:-s})}return o}async function z(t,e){var l,a,n,o,r;let{labelStyles:c,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=c;let{shapeSvg:d,bbox:g,label:p}=await u(t,e,f(e)),v="neo"===e.look?18:null!==(l=e.padding)&&void 0!==l?l:0,m="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0,x=g.width+v,b=g.height+m,k=Math.max(5,.1*b),{cssStyles:M}=e,S=[...F(x/2,-b/2,k,30,-90,0),{x:-x/2-k,y:k},...F(x/2+2*k,-k,k,20,-180,-270),...F(x/2+2*k,k,k,20,-90,-180),{x:-x/2-k,y:-b/2},...F(x/2,b/2,k,20,0,90)],D=[{x:x/2,y:-b/2-k},{x:-x/2,y:-b/2-k},...F(x/2,-b/2,k,20,-90,0),{x:-x/2-k,y:-k},...F(x/2+.1*x,-k,k,20,-180,-270),...F(x/2+.1*x,k,k,20,-90,-180),{x:-x/2-k,y:b/2},...F(x/2,b/2,k,20,0,90),{x:-x/2,y:b/2+k},{x:x/2,y:b/2+k}],W=h.Z.svg(d),C=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=w(S).replace("Z",""),B=W.path(N,C),A=w(D),_=W.path(A,{...C}),q=d.insert("g",":first-child");return q.insert(()=>_,":first-child").attr("stroke-opacity",0),q.insert(()=>B,":first-child"),q.attr("class","text"),M&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",M),s&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",s),q.attr("transform","translate(".concat(k,", 0)")),p.attr("transform","translate(".concat(-x/2+k-(g.x-(null!==(n=g.left)&&void 0!==n?n:0)),",").concat(-b/2+(null!==(o=e.padding)&&void 0!==o?o:0)/2-(g.y-(null!==(r=g.top)&&void 0!==r?r:0)),")")),y(e,q),e.intersect=function(t){return Z.polygon(e,D,t)},d}function J(t,e,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,o=[],r=n*Math.PI/180,c=(i*Math.PI/180-r)/(a-1);for(let n=0;n<a;n++){let a=r+n*c,i=t+l*Math.cos(a),s=e+l*Math.sin(a);o.push({x:i,y:s})}return o}async function K(t,e){var l,a,n,o,r,c;let{labelStyles:s,nodeStyles:d}=(0,i.UG)(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:v}=await u(t,e,f(e)),m="neo"===e.look?18:null!==(l=e.padding)&&void 0!==l?l:0,x="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0,b=p.width+("neo"===e.look?2*m:m),k=p.height+("neo"===e.look?2*x:x),M=Math.max(5,.1*k),{cssStyles:S}=e,D=[...J(b/2,-k/2,M,20,-90,0),{x:b/2+M,y:-M},...J(b/2+2*M,-M,M,20,-180,-270),...J(b/2+2*M,M,M,20,-90,-180),{x:b/2+M,y:k/2},...J(b/2,k/2,M,20,0,90)],W=[{x:-b/2,y:-k/2-M},{x:b/2,y:-k/2-M}
1,...J(b/2,-k/2,M,20,-90,0),{x:b/2+M,y:-M},...J(b/2+2*M,-M,M,20,-180,-270),...J(b/2+2*M,M,M,20,-90,-180),{x:b/2+M,y:k/2},...J(b/2,k/2,M,20,0,90),{x:b/2,y:k/2+M},{x:-b/2,y:k/2+M}],C=h.Z.svg(g),N=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let B=w(D).replace("Z",""),A=C.path(B,N),_=w(W),q=C.path(_,{...N}),R=g.insert("g",":first-child");return R.insert(()=>q,":first-child").attr("stroke-opacity",0),R.insert(()=>A,":first-child"),R.attr("class","text"),S&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",S),d&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",d),R.attr("transform","translate(".concat(-M,", 0)")),v.attr("transform","translate(".concat(-b/2+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(p.x-(null!==(o=p.left)&&void 0!==o?o:0)),",").concat(-k/2+(null!==(r=e.padding)&&void 0!==r?r:0)/2-(p.y-(null!==(c=p.top)&&void 0!==c?c:0)),")")),y(e,R),e.intersect=function(t){return Z.polygon(e,W,t)},g}function Q(t,e,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:100,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:180,o=[],r=n*Math.PI/180,c=(i*Math.PI/180-r)/(a-1);for(let n=0;n<a;n++){let a=r+n*c,i=t+l*Math.cos(a),s=e+l*Math.sin(a);o.push({x:-i,y:-s})}return o}async function $(t,e){var l,a,n,o,r,c;let{labelStyles:s,nodeStyles:d}=(0,i.UG)(e);e.labelStyle=s;let{shapeSvg:g,bbox:p,label:v}=await u(t,e,f(e)),m="neo"===e.look?18:null!==(l=e.padding)&&void 0!==l?l:0,x="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0,b=p.width+("neo"===e.look?2*m:m),k=p.height+("neo"===e.look?2*x:x),M=Math.max(5,.1*k),{cssStyles:S}=e,D=[...Q(b/2,-k/2,M,30,-90,0),{x:-b/2-M,y:M},...Q(b/2+2*M,-M,M,20,-180,-270),...Q(b/2+2*M,M,M,20,-90,-180),{x:-b/2-M,y:-k/2},...Q(b/2,k/2,M,20,0,90)],W=[...Q(-b/2+M+M/2,-k/2,M,20,-90,-180),{x:b/2-M/2,y:M},...Q(-b/2-M/2,-M,M,20,0,90),...Q(-b/2-M/2,M,M,20,-90,0),{x:b/2-M/2,y:-M},...Q(-b/2+M+M/2,k/2,M,30,-180,-270)],C=[{x:b/2,y:-k/2-M},{x:-b/2,y:-k/2-M},...Q(b/2,-k/2,M,20,-90,0),{x:-b/2-M,y:-M},...Q(b/2+2*M,-M,M,20,-180,-270),...Q(b/2+2*M,M,M,20,-90,-180),{x:-b/2-M,y:k/2},...Q(b/2,k/2,M,20,0,90),{x:-b/2,y:k/2+M},{x:b/2-M-M/2,y:k/2+M},...Q(-b/2+M+M/2,-k/2,M,20,-90,-180),{x:b/2-M/2,y:M},...Q(-b/2-M/2,-M,M,20,0,90),...Q(-b/2-M/2,M,M,20,-90,0),{x:b/2-M/2,y:-M},...Q(-b/2+M+M/2,k/2,M,30,-180,-270)],N=h.Z.svg(g),B=(0,i._q)(e,{fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let A=w(D).replace("Z",""),_=N.path(A,B),q=w(W).replace("Z",""),R=N.path(q,B),P=w(C),I=N.path(P,{...B}),L=g.insert("g",":first-child");return L.insert(()=>I,":first-child").attr("stroke-opacity",0),L.insert(()=>_,":first-child"),L.insert(()=>R,":first-child"),L.attr("class","text"),S&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",S),d&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",d),L.attr("transform","translate(".concat(M-M/4,", 0)")),v.attr("transform","translate(".concat(-b/2+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(p.x-(null!==(o=p.left)&&void 0!==o?o:0)),",").concat(-k/2+(null!==(r=e.padding)&&void 0!==r?r:0)/2-(p.y-(null!==(c=p.top)&&void 0!==c?c:0)),")")),y(e,L),e.intersect=function(t){return Z.polygon(e,C,t)},g}async function tt(t,e){var l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o;let c=null!==(l=e.padding)&&void 0!==l?l:0,s="neo"===e.look?16:c,d="neo"===e.look?12:c,{shapeSvg:g,bbox:p}=await u(t,e,f(e)),m=Math.max(20,(p.width+2*s)*1.25,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),x=Math.max(5,p.height+2*d,null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0),b=x/2,{cssStyles:k}=e,M=h.Z.svg(g),S=(0,i._q)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=m-b,W=x/4,C=[{x:D,y:0},{x:W,y:0},{x:0,y:x/2},{x:W,y:x},{x:D,y:x},...v(-D,-x/2,b,50,270,90)],N=w(C),B=M.path(N,S),A=g.insert(()=>B,":first-child");return A.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",k),r&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",r),A.attr("transform","translate(".concat(-m/2,", ").concat(-x/2,")")),y(e,A),e.intersect=function(t){return Z.polygon(e,C,t)},g}(0,s.eW)(U,"anchor"),(0,s.eW)(G,"generateArcPoints"),(0,s.eW)(T,"calculateArcSagitta"),(0,s.eW)(E,"bowTieRect"),(0,s.eW)(H,"insertPolygonShape"),(0,s.eW)(j,"card"),(0,s.eW)(V,"choice"),(0,s.eW)(X,"circle"),(0,s.eW)(Y,"createLine"),(0,s.eW)(O,"crossedCircle"),(0,s.eW)(F,"generateCirclePoints"),(0,s.eW)(z,"curlyBraceLeft"),(0,s.eW)(J,"generateCirclePoints"),(0,s.eW)(K,"curlyBraceRight"),(0,s.eW)(Q,"generateCirclePoints"),(0,s.eW)($,"curlyBraces"),(0,s.eW)(tt,"curvedTrapezoid");var te=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"a".concat(n,",").concat(i," 0,0,0 ").concat(-l,",0"),"l0,".concat(a),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"l0,".concat(-a)].join(" "),"createCylinderPathD"),tl=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t,",").concat(e+i),"M".concat(t+l,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(-l,",0"),"l0,".concat(a),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"l0,".concat(-a)].join(" "),"createOuterCylinderPathD"),ta=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t-l/2,",").concat(-a/2),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0")].join(" "),"createInnerCylinderPathD");async function tn(t,e){var l,a,n,o,c,s,d;let g;let{labelStyles:w,nodeStyles:p}=(0,i.UG)(e);e.labelStyle=w;let v=null!==(l=e.padding)&&void 0!==l?l:0,m="neo"===e.look?24:v,x="neo"===e.look?24:v;if(e.width||e.height){let t=null!==(a=e.width)&&void 0!==a?a:0;e.width=(null!==(n=e.width)&&void 0!==n?n:0)-x,e.width<8&&(e.width=8),e.height=(null!==(o=e.he
1ight)&&void 0!==o?o:0)-m-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:b,bbox:k,label:M}=await u(t,e,f(e)),S=(e.width?e.width:k.width)+x,D=S/2,W=D/(2.5+S/50),C=(e.height?e.height:k.height)+m+W,{cssStyles:N}=e;if("handDrawn"===e.look){let t=h.Z.svg(b),l=tl(0,0,S,C,D,W),a=ta(0,W,S,C,D,W),n=(0,i._q)(e,{}),o=t.path(l,n),r=t.path(a,(0,i._q)(e,{fill:"none"}));g=b.insert(()=>r,":first-child"),(g=b.insert(()=>o,":first-child")).attr("class","basic label-container"),N&&g.attr("style",N)}else{let t=te(0,0,S,C,D,W);g=b.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,r.R7)(N)).attr("style",p)}return g.attr("label-offset-y",W),g.attr("transform","translate(".concat(-S/2,", ").concat(-(C/2+W),")")),y(e,g),M.attr("transform","translate(".concat(-(k.width/2)-(k.x-(null!==(c=k.left)&&void 0!==c?c:0)),", ").concat(-(k.height/2)+(null!==(s=e.padding)&&void 0!==s?s:0)/1.5-(k.y-(null!==(d=k.top)&&void 0!==d?d:0)),")")),e.intersect=function(t){var l,a,n,i,o,r;let c=Z.rect(e,t),s=c.x-(null!==(l=e.x)&&void 0!==l?l:0);if(0!=D&&(Math.abs(s)<(null!==(a=e.width)&&void 0!==a?a:0)/2||Math.abs(s)==(null!==(n=e.width)&&void 0!==n?n:0)/2&&Math.abs(c.y-(null!==(i=e.y)&&void 0!==i?i:0))>(null!==(o=e.height)&&void 0!==o?o:0)/2-W)){let l=W*W*(1-s*s/(D*D));l>0&&(l=Math.sqrt(l)),l=W-l,t.y-(null!==(r=e.y)&&void 0!==r?r:0)>0&&(l=-l),c.y+=l}return c},b}async function ti(t,e){var l,a,n,o,r,c;let{labelStyles:s,nodeStyles:d}=(0,i.UG)(e);e.labelStyle=s;let g="neo"===e.look?16:null!==(l=e.padding)&&void 0!==l?l:0,w="neo"===e.look?16:null!==(a=e.padding)&&void 0!==a?a:0,{shapeSvg:p,bbox:v,label:m}=await u(t,e,f(e)),x=v.width+g,b=v.height+w,k=.2*b,M=-x/2,S=-b/2-k/2,{cssStyles:D}=e,W=h.Z.svg(p),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=W.polygon([{x:M,y:S+k},{x:-M,y:S+k},{x:-M,y:-S},{x:M,y:-S},{x:M,y:S},{x:-M,y:S},{x:-M,y:S+k}].map(t=>[t.x,t.y]),C),B=p.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),D&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",D),d&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",d),m.attr("transform","translate(".concat(M+(null!==(n=e.padding)&&void 0!==n?n:0)/2-(v.x-(null!==(o=v.left)&&void 0!==o?o:0)),", ").concat(S+k+(null!==(r=e.padding)&&void 0!==r?r:0)/2-(v.y-(null!==(c=v.top)&&void 0!==c?c:0)),")")),y(e,B),e.intersect=function(t){return Z.rect(e,t)},p}async function to(t,e){var l,a,n;let o;let{labelStyles:c,nodeStyles:d}=(0,i.UG)(e),g="neo"===e.look?12:5;e.labelStyle=c;let w=null!==(l=e.padding)&&void 0!==l?l:0,p="neo"===e.look?16:w,{shapeSvg:v,bbox:m}=await u(t,e,f(e)),x=((null==e?void 0:e.width)?(null==e?void 0:e.width)/2:m.width/2)+(null!=p?p:0),b=x-g,{cssStyles:k}=e;if("handDrawn"===e.look){let t=h.Z.svg(v),l=(0,i._q)(e,{roughness:.2,strokeWidth:2.5}),c=(0,i._q)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*x,l),d=t.circle(0,0,2*b,c);(o=v.insert("g",":first-child")).attr("class",(0,r.R7)(e.cssClasses)).attr("style",(0,r.R7)(k)),null===(a=o.node())||void 0===a||a.appendChild(s),null===(n=o.node())||void 0===n||n.appendChild(d)}else{let t=(o=v.insert("g",":first-child")).insert("circle",":first-child"),e=o.insert("circle");o.attr("class","basic label-container").attr("style",d),t.attr("class","outer-circle").attr("style",d).attr("r",x).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",d).attr("r",b).attr("cx",0).attr("cy",0)}return y(e,o),e.intersect=function(t){return s.cM.info("DoubleCircle intersect",e,x,t),Z.circle(e,x,t)},v}function tr(t,e,l){var a;let{config:{themeVariables:n}}=l,{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.label="",e.labelStyle=o;let c=t.insert("g").attr("class",f(e)).attr("id",null!==(a=e.domId)&&void 0!==a?a:e.id),{cssStyles:d}=e,u=h.Z.svg(c),{nodeBorder:g}=n,w=(0,i._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(w.roughness=0);let p=u.circle(0,0,14,w),v=c.insert(()=>p,":first-child");return v.selectAll("path").attr("style","fill: ".concat(g," !important;")),d&&d.length>0&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",d),r&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",r),y(e,v),e.intersect=function(t){return s.cM.info("filledCircle intersect",e,{radius:7,point:t}),Z.circle(e,7,t)},c}async function tc(t,e){var l,a,n,o,r,c;let{labelStyles:d,nodeStyles:g}=(0,i.UG)(e);e.labelStyle=d;let p=null!==(l=e.padding)&&void 0!==l?l:0,v="neo"===e.look?2*p:p;
1(e.width||e.height)&&(e.height=null!==(a=null==e?void 0:e.height)&&void 0!==a?a:0,e.height<10&&(e.height=10),e.width=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0)-v-v/2,e.width<10&&(e.width=10));let{shapeSvg:m,bbox:x,label:b}=await u(t,e,f(e)),k=((null==e?void 0:e.width)?null==e?void 0:e.width:x.width)+(null!=v?v:0),M=(null==e?void 0:e.height)?null==e?void 0:e.height:k+x.height,S=[{x:0,y:-M},{x:M,y:-M},{x:M/2,y:0}],{cssStyles:D}=e,W=h.Z.svg(m),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=w(S),B=W.path(N,C),A=m.insert(()=>B,":first-child").attr("transform","translate(".concat(-M/2,", ").concat(M/2,")")).attr("class","outer-path");return D&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",D),g&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",g),e.width=k,e.height=M,y(e,A),b.attr("transform","translate(".concat(-x.width/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),", ").concat(-M/2+(null!==(r=e.padding)&&void 0!==r?r:0)/2+(x.y-(null!==(c=x.top)&&void 0!==c?c:0)),")")),e.intersect=function(t){return s.cM.info("Triangle intersect",e,S,t),Z.polygon(e,S,t)},m}function ts(t,e,l){var a,n,o,r,c,s;let{dir:d,config:{state:u,themeVariables:g}}=l,{nodeStyles:w}=(0,i.UG)(e);e.label="";let p=t.insert("g").attr("class",f(e)).attr("id",null!==(a=e.domId)&&void 0!==a?a:e.id),{cssStyles:v}=e,m=Math.max(70,null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0),x=Math.max(10,null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0);"LR"===d&&(m=Math.max(10,null!==(r=null==e?void 0:e.width)&&void 0!==r?r:0),x=Math.max(70,null!==(c=null==e?void 0:e.height)&&void 0!==c?c:0));let b=-1*m/2,k=-1*x/2,M=h.Z.svg(p),S=(0,i._q)(e,{stroke:g.lineColor,fill:g.lineColor});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let D=M.rectangle(b,k,m,x,S),W=p.insert(()=>D,":first-child");v&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",v),w&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",w),y(e,W);let C=null!==(s=null==u?void 0:u.padding)&&void 0!==s?s:0;return e.width&&e.height&&(e.width+=C/2||0,e.height+=C/2||0),e.intersect=function(t){return Z.rect(e,t)},p}async function td(t,e){var l,a,n,o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let d="neo"===e.look?16:null!==(l=e.padding)&&void 0!==l?l:0,g="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0;(e.width||e.height)&&(e.height=(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0)-2*g,e.height<10&&(e.height=10),e.width=(null!==(o=null==e?void 0:e.width)&&void 0!==o?o:0)-2*d,e.width<15&&(e.width=15));let{shapeSvg:p,bbox:m}=await u(t,e,f(e)),x=((null==e?void 0:e.width)?null==e?void 0:e.width:Math.max(15,m.width))+2*d,b=((null==e?void 0:e.height)?null==e?void 0:e.height:Math.max(10,m.height))+2*g,k=b/2,{cssStyles:M}=e,S=h.Z.svg(p),D=(0,i._q)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let W=[{x:-x/2,y:-b/2},{x:x/2-k,y:-b/2},...v(-x/2+k,0,k,50,90,270),{x:x/2-k,y:b/2},{x:-x/2,y:b/2}],C=w(W),N=S.path(C,D),B=p.insert(()=>N,":first-child");return B.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",M),c&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",c),y(e,B),e.intersect=function(t){return s.cM.info("Pill intersect",e,{radius:k,point:t}),Z.polygon(e,W,t)},p}(0,s.eW)(tn,"cylinder"),(0,s.eW)(ti,"dividedRectangle"),(0,s.eW)(to,"doublecircle"),(0,s.eW)(tr,"filledCircle"),(0,s.eW)(tc,"flippedTriangle"),(0,s.eW)(ts,"forkJoin"),(0,s.eW)(td,"halfRoundedRectangle");var th=(0,s.eW)((t,e,l,a,n)=>["M".concat(t+n,",").concat(e),"L".concat(t+l-n,",").concat(e),"L".concat(t+l,",").concat(e-a/2),"L".concat(t+l-n,",").concat(e-a),"L".concat(t+n,",").concat(e-a),"L".concat(t,",").concat(e-a/2),"Z"].join(" "),"createHexagonPathD");async function tu(t,e){var l,a,n,o;let r;let{labelStyles:c,nodeStyles:s}=(0,i.UG)(e),d="neo"===e.look?3.5:4;e.labelStyle=c;let g=null!==(l=e.padding)&&void 0!==l?l:0,w="neo"===e.look?70:g,p="neo"===e.look?32:g;if(e.width||e.height){let t=null!==(a=e.height)&&void 0!==a?a:0;e.width=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0)-t/d*2-p,e.height=(null!==(o=e.he
1ight)&&void 0!==o?o:0)-w}let{shapeSvg:v,bbox:m}=await u(t,e,f(e)),x=((null==e?void 0:e.height)?null==e?void 0:e.height:m.height)+w,b=x/d,k=((null==e?void 0:e.width)?null==e?void 0:e.width:m.width)+2*b+p,M=[{x:b,y:0},{x:k-b,y:0},{x:k,y:-x/2},{x:k-b,y:-x},{x:b,y:-x},{x:0,y:-x/2}],{cssStyles:S}=e;if("handDrawn"===e.look){let t=h.Z.svg(v),l=(0,i._q)(e,{}),a=th(0,0,k,x,b),n=t.path(a,l);r=v.insert(()=>n,":first-child").attr("transform","translate(".concat(-k/2,", ").concat(x/2,")")),S&&r.attr("style",S)}else r=H(v,k,x,M);return s&&r.attr("style",s),e.width=k,e.height=x,y(e,r),e.intersect=function(t){return Z.polygon(e,M,t)},v}async function tg(t,e){var l,a;let{labelStyles:n,nodeStyles:o}=(0,i.UG)(e);e.label="",e.labelStyle=n;let{shapeSvg:r}=await u(t,e,f(e)),c=Math.max(30,null!==(l=null==e?void 0:e.width)&&void 0!==l?l:0),d=Math.max(30,null!==(a=null==e?void 0:e.height)&&void 0!==a?a:0),{cssStyles:g}=e,p=h.Z.svg(r),v=(0,i._q)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");let m=[{x:0,y:0},{x:c,y:0},{x:0,y:d},{x:c,y:d}],x=w(m),b=p.path(x,v),k=r.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),o&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",o),k.attr("transform","translate(".concat(-c/2,", ").concat(-d/2,")")),y(e,k),e.intersect=function(t){return s.cM.info("Pill intersect",e,{points:m}),Z.polygon(e,m,t)},r}async function ty(t,e,l){var a,n,r,c;let{config:{themeVariables:d,flowchart:g}}=l,{labelStyles:f}=(0,i.UG)(e);e.labelStyle=f;let w=Math.max(null!==(a=e.assetHeight)&&void 0!==a?a:48,null!==(n=e.assetWidth)&&void 0!==n?n:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(w,null!=p?p:0);let{shapeSvg:v,bbox:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,{nodeBorder:k}=d,{stylesMap:M}=(0,i.dT)(e),S=-w/2,D=-w/2,W=e.label?8:0,C=h.Z.svg(v),N=(0,i._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let B=C.rectangle(S,D,w,w,N),A=Math.max(w,m.width),_=w+m.height+W,q=C.rectangle(-A/2,-_/2,A,_,{...N,fill:"transparent",stroke:"none"}),R=v.insert(()=>B,":first-child"),P=v.insert(()=>q);if(e.icon){let t=v.append("g");t.html("<g>".concat(await (0,o.s4)(e.icon,{height:w,width:w,fallbackPrefix:""}),"</g>"));let l=t.node().getBBox(),a=l.width,n=l.height,i=l.x,c=l.y;t.attr("transform","translate(".concat(-a/2-i,",").concat(b?m.height/2+W/2-n/2-c:-m.height/2-W/2-n/2-c,")")),t.attr("style","color: ".concat(null!==(r=M.get("stroke"))&&void 0!==r?r:k,";"))}return x.attr("transform","translate(".concat(-m.width/2-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),",").concat(b?-_/2:_/2-m.height,")")),R.attr("transform","translate(".concat(0,",").concat(b?m.height/2+W/2:-m.height/2-W/2,")")),y(e,P),e.intersect=function(t){var l,a,n;if(s.cM.info("iconSquare intersect",e,t),!e.label)return Z.rect(e,t);let i=null!==(l=e.x)&&void 0!==l?l:0,o=null!==(a=e.y)&&void 0!==a?a:0,r=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=b?[{x:i-m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2+m.height+W},{x:i+w/2,y:o-r/2+m.height+W},{x:i+w/2,y:o+r/2},{x:i-w/2,y:o+r/2},{x:i-w/2,y:o-r/2+m.height+W},{x:i-m.width/2,y:o-r/2+m.height+W}]:[{x:i-w/2,y:o-r/2},{x:i+w/2,y:o-r/2},{x:i+w/2,y:o-r/2+w},{x:i+m.width/2,y:o-r/2+w},{x:i+m.width/2/2,y:o+r/2},{x:i-m.width/2,y:o+r/2},{x:i-m.width/2,y:o-r/2+w},{x:i-w/2,y:o-r/2+w}],Z.polygon(e,c,t)},v}async function tf(t,e,l){var a,n,r,c;let{config:{themeVariables:d,flowchart:g}}=l,{labelStyles:f}=(0,i.UG)(e);e.labelStyle=f;let w=Math.max(null!==(a=e.assetHeight)&&void 0!==a?a:48,null!==(n=e.assetWidth)&&void 0!==n?n:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(w,null!=p?p:0);let{shapeSvg:v,bbox:m,label:x}=await u(t,e,"icon-shape default"),b=e.label?8:0,k="t"===e.pos,{nodeBorder:M,mainBkg:S}=d,{stylesMap:D}=(0,i.dT)(e),W=h.Z.svg(v),C=(0,i._q)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=D.get("fill");C.stroke=null!=N?N:S;let B=v.append("g");e.icon&&B.html("<g>".concat(await (0,o.s4)(e.icon,{height:w,width:w,fallbackPrefix:""}),"</g>"));let A=B.node().getBBox(),_=A.width,q=A.height,R=A.x,P=A.y,I=Math.max(_,q)*Math.SQRT2+40,L=W.circle(0,0,I,C),U=Math.max(I,m.width),G=I+m.height+b,T=W.rectangle(-U/2,-G/2,U,G,{...C,fill:"transparent",stroke:"none"}),E=v.insert(()=>L,":first-child"),H=v.insert(()=>T);return B.attr("transform","translate(".concat(-_/2-R,",").concat(k?m.height/2+b/2-q/2-P:-m.height/2-b/2-q/2-P,")")),B.attr("style","color: ".concat(null!==(r=D.get("stroke"))&&void 0!==r?r:M,";")),x.attr("transform","translate(".concat(-m.width/2-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),",").concat(k?-G/2:G/2-m.height,")")),E.attr("transform","translate(".concat(0,",").concat(k?m.height/2+b/2:-m.height/2-b/2,")")),y(e,H),e.intersect=function(t){return s.cM.info("iconSquare intersect",e,t),Z.rect(e,t)},v}async function tw(t,e,l){var a,n,r,c;
1let{config:{themeVariables:d,flowchart:g}}=l,{labelStyles:f}=(0,i.UG)(e);e.labelStyle=f;let w=Math.max(null!==(a=e.assetHeight)&&void 0!==a?a:48,null!==(n=e.assetWidth)&&void 0!==n?n:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(w,null!=p?p:0);let{shapeSvg:v,bbox:m,halfPadding:x,label:b}=await u(t,e,"icon-shape default"),M="t"===e.pos,S=w+2*x,D=w+2*x,{nodeBorder:W,mainBkg:C}=d,{stylesMap:N}=(0,i.dT)(e),B=e.label?8:0,A=h.Z.svg(v),_=(0,i._q)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let q=N.get("fill");_.stroke=null!=q?q:C;let R=A.path(k(-D/2,-S/2,D,S,5),_),P=Math.max(D,m.width),I=S+m.height+B,L=A.rectangle(-P/2,-I/2,P,I,{..._,fill:"transparent",stroke:"none"}),U=v.insert(()=>R,":first-child").attr("class","icon-shape2"),G=v.insert(()=>L);if(e.icon){let t=v.append("g");t.html("<g>".concat(await (0,o.s4)(e.icon,{height:w,width:w,fallbackPrefix:""}),"</g>"));let l=t.node().getBBox(),a=l.width,n=l.height,i=l.x,c=l.y;t.attr("transform","translate(".concat(-a/2-i,",").concat(M?m.height/2+B/2-n/2-c:-m.height/2-B/2-n/2-c,")")),t.attr("style","color: ".concat(null!==(r=N.get("stroke"))&&void 0!==r?r:W,";"))}return b.attr("transform","translate(".concat(-m.width/2-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),",").concat(M?-I/2:I/2-m.height,")")),U.attr("transform","translate(".concat(0,",").concat(M?m.height/2+B/2:-m.height/2-B/2,")")),y(e,G),e.intersect=function(t){var l,a,n;if(s.cM.info("iconSquare intersect",e,t),!e.label)return Z.rect(e,t);let i=null!==(l=e.x)&&void 0!==l?l:0,o=null!==(a=e.y)&&void 0!==a?a:0,r=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=M?[{x:i-m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2+m.height+B},{x:i+D/2,y:o-r/2+m.height+B},{x:i+D/2,y:o+r/2},{x:i-D/2,y:o+r/2},{x:i-D/2,y:o-r/2+m.height+B},{x:i-m.width/2,y:o-r/2+m.height+B}]:[{x:i-D/2,y:o-r/2},{x:i+D/2,y:o-r/2},{x:i+D/2,y:o-r/2+S},{x:i+m.width/2,y:o-r/2+S},{x:i+m.width/2/2,y:o+r/2},{x:i-m.width/2,y:o+r/2},{x:i-m.width/2,y:o-r/2+S},{x:i-D/2,y:o-r/2+S}],Z.polygon(e,c,t)},v}async function tp(t,e,l){var a,n,r,c;let{config:{themeVariables:d,flowchart:g}}=l,{labelStyles:f}=(0,i.UG)(e);e.labelStyle=f;let w=Math.max(null!==(a=e.assetHeight)&&void 0!==a?a:48,null!==(n=e.assetWidth)&&void 0!==n?n:48),p=null==g?void 0:g.wrappingWidth;e.width=Math.max(w,null!=p?p:0);let{shapeSvg:v,bbox:m,halfPadding:x,label:b}=await u(t,e,"icon-shape default"),M="t"===e.pos,S=w+2*x,D=w+2*x,{nodeBorder:W,mainBkg:C}=d,{stylesMap:N}=(0,i.dT)(e),B=e.label?8:0,A=h.Z.svg(v),_=(0,i._q)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let q=N.get("fill");_.stroke=null!=q?q:C;let R=A.path(k(-D/2,-S/2,D,S,.1),_),P=Math.max(D,m.width),I=S+m.height+B,L=A.rectangle(-P/2,-I/2,P,I,{..._,fill:"transparent",stroke:"none"}),U=v.insert(()=>R,":first-child"),G=v.insert(()=>L);if(e.icon){let t=v.append("g");t.html("<g>".concat(await (0,o.s4)(e.icon,{height:w,width:w,fallbackPrefix:""}),"</g>"));let l=t.node().getBBox(),a=l.width,n=l.height,i=l.x,c=l.y;t.attr("transform","translate(".concat(-a/2-i,",").concat(M?m.height/2+B/2-n/2-c:-m.height/2-B/2-n/2-c,")")),t.attr("style","color: ".concat(null!==(r=N.get("stroke"))&&void 0!==r?r:W,";"))}return b.attr("transform","translate(".concat(-m.width/2-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),",").concat(M?-I/2:I/2-m.height,")")),U.attr("transform","translate(".concat(0,",").concat(M?m.height/2+B/2:-m.height/2-B/2,")")),y(e,G),e.intersect=function(t){var l,a,n;if(s.cM.info("iconSquare intersect",e,t),!e.label)return Z.rect(e,t);let i=null!==(l=e.x)&&void 0!==l?l:0,o=null!==(a=e.y)&&void 0!==a?a:0,r=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=M?[{x:i-m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2},{x:i+m.width/2,y:o-r/2+m.height+B},{x:i+D/2,y:o-r/2+m.height+B},{x:i+D/2,y:o+r/2},{x:i-D/2,y:o+r/2},{x:i-D/2,y:o-r/2+m.height+B},{x:i-m.width/2,y:o-r/2+m.height+B}]:[{x:i-D/2,y:o-r/2},{x:i+D/2,y:o-r/2},{x:i+D/2,y:o-r/2+S},{x:i+m.width/2,y:o-r/2+S},{x:i+m.width/2/2,y:o+r/2},{x:i-m.width/2,y:o+r/2},{x:i-m.width/2,y:o-r/2+S},{x:i-D/2,y:o-r/2+S}],Z.polygon(e,c,t)},v}async function tv(t,e,l){var a,n,o,r;let{config:{flowchart:c}}=l,d=new Image;d.src=null!==(a=null==e?void 0:e.img)&&void 0!==a?a:"",await d.decode();
1let g=Number(d.naturalWidth.toString().replace("px","")),f=Number(d.naturalHeight.toString().replace("px",""));e.imageAspectRatio=g/f;let{labelStyles:w}=(0,i.UG)(e);e.labelStyle=w;let p=null==c?void 0:c.wrappingWidth;e.defaultWidth=null==c?void 0:c.wrappingWidth;let v=Math.max(e.label&&null!=p?p:0,null!==(n=null==e?void 0:e.assetWidth)&&void 0!==n?n:g),m="on"===e.constraint&&(null==e?void 0:e.assetHeight)?e.assetHeight*e.imageAspectRatio:v,x="on"===e.constraint?m/e.imageAspectRatio:null!==(o=null==e?void 0:e.assetHeight)&&void 0!==o?o:f;e.width=Math.max(m,null!=p?p:0);let{shapeSvg:b,bbox:k,label:M}=await u(t,e,"image-shape default"),S="t"===e.pos,D=-m/2,W=e.label?8:0,C=h.Z.svg(b),N=(0,i._q)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let B=C.rectangle(D,-x/2,m,x,N),A=Math.max(m,k.width),_=x+k.height+W,q=C.rectangle(-A/2,-_/2,A,_,{...N,fill:"none",stroke:"none"}),R=b.insert(()=>B,":first-child"),P=b.insert(()=>q);if(e.img){let t=b.append("image");t.attr("href",e.img),t.attr("width",m),t.attr("height",x),t.attr("preserveAspectRatio","none"),t.attr("transform","translate(".concat(-m/2,",").concat(S?_/2-x:-_/2,")"))}return M.attr("transform","translate(".concat(-k.width/2-(k.x-(null!==(r=k.left)&&void 0!==r?r:0)),",").concat(S?-x/2-k.height/2-W/2:x/2-k.height/2+W/2,")")),R.attr("transform","translate(".concat(0,",").concat(S?k.height/2+W/2:-k.height/2-W/2,")")),y(e,P),e.intersect=function(t){var l,a,n;if(s.cM.info("iconSquare intersect",e,t),!e.label)return Z.rect(e,t);let i=null!==(l=e.x)&&void 0!==l?l:0,o=null!==(a=e.y)&&void 0!==a?a:0,r=null!==(n=e.height)&&void 0!==n?n:0,c=[];return c=S?[{x:i-k.width/2,y:o-r/2},{x:i+k.width/2,y:o-r/2},{x:i+k.width/2,y:o-r/2+k.height+W},{x:i+m/2,y:o-r/2+k.height+W},{x:i+m/2,y:o+r/2},{x:i-m/2,y:o+r/2},{x:i-m/2,y:o-r/2+k.height+W},{x:i-k.width/2,y:o-r/2+k.height+W}]:[{x:i-m/2,y:o-r/2},{x:i+m/2,y:o-r/2},{x:i+m/2,y:o-r/2+x},{x:i+k.width/2,y:o-r/2+x},{x:i+k.width/2/2,y:o+r/2},{x:i-k.width/2,y:o+r/2},{x:i-k.width/2,y:o-r/2+x},{x:i-m/2,y:o-r/2+x}],Z.polygon(e,c,t)},b}async function tm(t,e){var l,a,n;let o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let s=null!==(l=e.padding)&&void 0!==l?l:0,d="neo"===e.look?2*s:s,{shapeSvg:g,bbox:p}=await u(t,e,f(e)),v=Math.max(p.width+(null!=d?d:0)*2,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),m=Math.max(p.height+(null!=s?s:0)*2,null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0),x=[{x:0,y:0},{x:v,y:0},{x:v+3*m/6,y:-m},{x:-3*m/6,y:-m}],{cssStyles:b}=e;
1if("handDrawn"===e.look){let t=h.Z.svg(g),l=(0,i._q)(e,{}),a=w(x),n=t.path(a,l);o=g.insert(()=>n,":first-child").attr("transform","translate(".concat(-v/2,", ").concat(m/2,")")),b&&o.attr("style",b)}else o=H(g,v,m,x);return c&&o.attr("style",c),e.width=v,e.height=m,y(e,o),e.intersect=function(t){return Z.polygon(e,x,t)},g}async function tx(t,e,l){let a;let{labelStyles:n,nodeStyles:o}=(0,i.UG)(e);e.labelStyle=n;let{shapeSvg:c,bbox:s}=await u(t,e,f(e)),d=Math.max(s.width+2*l.labelPaddingX,(null==e?void 0:e.width)||0),g=Math.max(s.height+2*l.labelPaddingY,(null==e?void 0:e.height)||0),w=-d/2,p=-g/2,{rx:v,ry:m}=e,{cssStyles:x}=e;if((null==l?void 0:l.rx)&&l.ry&&(v=l.rx,m=l.ry),"handDrawn"===e.look){let t=h.Z.svg(c),l=(0,i._q)(e,{}),n=v||m?t.path(k(w,p,d,g,v||0),l):t.rectangle(w,p,d,g,l);(a=c.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,r.R7)(x))}else(a=c.insert("rect",":first-child")).attr("class","basic label-container").attr("style",o).attr("rx",(0,r.R7)(v)).attr("ry",(0,r.R7)(m)).attr("x",w).attr("y",p).attr("width",d).attr("height",g);return y(e,a),e.calcIntersect=function(t,e){return Z.rect(t,e)},e.intersect=function(t){return Z.rect(e,t)},c}async function tb(t,e){var l,a;let{shapeSvg:n,bbox:i,label:o}=await u(t,e,"label"),r=n.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),o.attr("transform","translate(".concat(-(i.width/2)-(i.x-(null!==(l=i.left)&&void 0!==l?l:0)),", ").concat(-(i.height/2)-(i.y-(null!==(a=i.top)&&void 0!==a?a:0)),")")),y(e,r),e.intersect=function(t){return Z.rect(e,t)},n}async function tk(t,e){var l,a,n;let o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let s=null!==(l=e.padding)&&void 0!==l?l:0,d="neo"===e.look?2*s:s,{shapeSvg:g,bbox:p}=await u(t,e,f(e)),v=(null!==(a=null==e?void 0:e.height)&&void 0!==a?a:p.height)+s,m=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:p.width)+d,x=[{x:0,y:0},{x:m+3*v/6,y:0},{x:m,y:-v},{x:-(3*v)/6,y:-v}],{cssStyles:b}=e;
1if("handDrawn"===e.look){let t=h.Z.svg(g),l=(0,i._q)(e,{}),a=w(x),n=t.path(a,l);o=g.insert(()=>n,":first-child").attr("transform","translate(".concat(-m/2,", ").concat(v/2,")")),b&&o.attr("style",b)}else o=H(g,m,v,x);return c&&o.attr("style",c),e.width=m,e.height=v,y(e,o),e.intersect=function(t){return Z.polygon(e,x,t)},g}async function tM(t,e){var l,a,n;let o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let s=null!==(l=e.padding)&&void 0!==l?l:0,d="neo"===e.look?2*s:s,{shapeSvg:g,bbox:p}=await u(t,e,f(e)),v=(null!==(a=null==e?void 0:e.height)&&void 0!==a?a:p.height)+s,m=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:p.width)+d,x=[{x:-3*v/6,y:0},{x:m,y:0},{x:m+3*v/6,y:-v},{x:0,y:-v}],{cssStyles:b}=e;if("handDrawn"===e.look){let t=h.Z.svg(g),l=(0,i._q)(e,{}),a=w(x),n=t.path(a,l);o=g.insert(()=>n,":first-child").attr("transform","translate(".concat(-m/2,", ").concat(v/2,")")),b&&o.attr("style",b)}else o=H(g,m,v,x);return c&&o.attr("style",c),e.width=m,e.height=v,y(e,o),e.intersect=function(t){return Z.polygon(e,x,t)},g}function tS(t,e){var l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.label="",e.labelStyle=o;let c=t.insert("g").attr("class",f(e)).attr("id",null!==(l=e.domId)&&void 0!==l?l:e.id),{cssStyles:d}=e,u=Math.max(35,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),g=Math.max(35,null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0),p=[{x:u,y:0},{x:0,y:g+3.5},{x:u-14,y:g+3.5},{x:0,y:2*g},{x:u,y:g-3.5},{x:14,y:g-3.5}],v=h.Z.svg(c),m=(0,i._q)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=w(p),b=v.path(x,m),k=c.insert(()=>b,":first-child");return k.attr("class","outer-path"),d&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",d),r&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",r),k.attr("transform","translate(-".concat(u/2,",").concat(-g,")")),y(e,k),e.intersect=function(t){return s.cM.info("lightningBolt intersect",e,t),Z.polygon(e,p,t)},c}(0,s.eW)(tu,"hexagon"),(0,s.eW)(tg,"hourglass"),(0,s.eW)(ty,"icon"),(0,s.eW)(tf,"iconCircle"),(0,s.eW)(tw,"iconRounded"),(0,s.eW)(tp,"iconSquare"),(0,s.eW)(tv,"imageSquare"),(0,s.eW)(tm,"inv_trapezoid"),(0,s.eW)(tx,"drawRect"),(0,s.eW)(tb,"labelRect"),(0,s.eW)(tk,"lean_left"),(0,s.eW)(tM,"lean_right"),(0,s.eW)(tS,"lightningBolt");var tD=(0,s.eW)((t,e,l,a,n,i,o)=>["M".concat(t,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"a".concat(n,",").concat(i," 0,0,0 ").concat(-l,",0"),"l0,".concat(a),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"l0,".concat(-a),"M".concat(t,",").concat(e+i+o),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0")].join(" "),"createCylinderPathD"),tW=(0,s.eW)((t,e,l,a,n,i,o)=>["M".concat(t,",").concat(e+i),"M".concat(t+l,",").concat(e+i),"a".concat(n,",").concat(i," 0,0,0 ").concat(-l,",0"),"l0,".concat(a),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0"),"l0,".concat(-a),"M".concat(t,",").concat(e+i+o),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0")].join(" "),"createOuterCylinderPathD"),tC=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t-l/2,",").concat(-a/2),"a".concat(n,",").concat(i," 0,0,0 ").concat(l,",0")].join(" "),"createInnerCylinderPathD");async function tN(t,e){var l,a,n,o,c,s;let d;let{labelStyles:g,nodeStyles:w}=(0,i.UG)(e);e.labelStyle=g;let p=null!==(l=e.padding)&&void 0!==l?l:0,v="neo"===e.look?16:p,m="neo"===e.look?24:p;if(e.width||e.height){let t=null!==(a=e.width)&&void 0!==a?a:0;e.width=(null!==(n=e.width)&&void 0!==n?n:0)-v,e.width<10&&(e.width=10),e.height=(null!==(o=e.height)&&void 0!==o?o:0)-m-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:x,bbox:b,label:k}=await u(t,e,f(e)),M=((null==e?void 0:e.width)?null==e?void 0:e.width:b.width)+2*v,S=M/2,D=S/(2.5+M/50),W=((null==e?void 0:e.height)?null==e?void 0:e.height:b.height)+D+2*m,C=.1*W,{cssStyles:N}=e;if("handDrawn"===e.look){let t=h.Z.svg(x),l=tW(0,0,M,W,S,D,C),a=tC(0,D,M,W,S,D),n=(0,i._q)(e,{}),o=t.path(l,n),r=t.path(a,n);x.insert(()=>r,":first-child").attr("class","line"),(d=x.insert(()=>o,":first-child")).attr("class","basic label-container"),N&&d.attr("style",N)}else{let t=tD(0,0,M,W,S,D,C);d=x.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,r.R7)(N)).attr("style",w)}return d.attr("label-offset-y",D),d.attr("transform","translate(".concat(-M/2,", ").concat(-(W/2+D),")")),y(e,d),k.attr("transform","translate(".concat(-(b.width/2)-(b.x-(null!==(c=b.left)&&void 0!==c?c:0)),", ").concat(-(b.height/2)+D-(b.y-(null!==(s=b.top)&&void 0!==s?s:0)),")")),e.intersect=function(t){var l,a,n,i,o,r;let c=Z.rect(e,t),s=c.x-(null!==(l=e.x)&&void 0!==l?l:0);if(0!=S&&(Math.abs(s)<(null!==(a=e.width)&&void 0!==a?a:0)/2||Math.abs(s)==(null!==(n=e.width)&&void 0!==n?n:0)/2&&Math.abs(c.y-(null!==(i=e.y)&&void 0!==i?i:0))>
1(null!==(o=e.height)&&void 0!==o?o:0)/2-D)){let l=D*D*(1-s*s/(S*S));l>0&&(l=Math.sqrt(l)),l=D-l,t.y-(null!==(r=e.y)&&void 0!==r?r:0)>0&&(l=-l),c.y+=l}return c},x}async function tB(t,e){var l,a,n,o,r,c;let{labelStyles:s,nodeStyles:d}=(0,i.UG)(e);e.labelStyle=s;let g=null!==(l=e.padding)&&void 0!==l?l:0,w="neo"===e.look?16:g,v="neo"===e.look?12:g;if(e.width||e.height){let t=e.width;e.width=(null!=t?t:0)*10/11-2*w,e.width<10&&(e.width=10),e.height=(null!==(a=null==e?void 0:e.height)&&void 0!==a?a:0)-2*v,e.height<10&&(e.height=10)}let{shapeSvg:m,bbox:x,label:b}=await u(t,e,f(e)),k=((null==e?void 0:e.width)?null==e?void 0:e.width:x.width)+(null!=w?w:0)*2,M=((null==e?void 0:e.height)?null==e?void 0:e.height:x.height)+(null!=v?v:0)*2,S="neo"===e.look?M/4:M/8,D=M+S,{cssStyles:W}=e,C=h.Z.svg(m),N=(0,i._q)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let B=[{x:-k/2-k/2*.1,y:-D/2},{x:-k/2-k/2*.1,y:D/2},...p(-k/2-k/2*.1,D/2,k/2+k/2*.1,D/2,S,.8),{x:k/2+k/2*.1,y:-D/2},{x:-k/2-k/2*.1,y:-D/2},{x:-k/2,y:-D/2},{x:-k/2,y:D/2*1.1},{x:-k/2,y:-D/2}],A=C.polygon(B.map(t=>[t.x,t.y]),N),_=m.insert(()=>A,":first-child");return _.attr("class","basic label-container outer-path"),W&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",W),d&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",d),_.attr("transform","translate(0,".concat(-S/2,")")),b.attr("transform","translate(".concat(-k/2+(null!==(n=e.padding)&&void 0!==n?n:0)+k/2*.1/2-(x.x-(null!==(o=x.left)&&void 0!==o?o:0)),",").concat(-M/2+(null!==(r=e.padding)&&void 0!==r?r:0)-S/2-(x.y-(null!==(c=x.top)&&void 0!==c?c:0)),")")),y(e,_),e.intersect=function(t){return Z.polygon(e,B,t)},m}async function tA(t,e){var l,a,n,o,r;let{labelStyles:c,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=c;let d=null!==(l=e.padding)&&void 0!==l?l:0,g="neo"===e.look?16:d,p="neo"===e.look?12:d,v="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0)-2*g-2*v,10),e.height=Math.max((null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0)-2*p-2*v,10));let{shapeSvg:x,bbox:b,label:k}=await u(t,e,f(e)),M=((null==e?void 0:e.width)?null==e?void 0:e.width:b.width)+2*g+2*v,S=((null==e?void 0:e.height)?null==e?void 0:e.height:b.height)+2*p+2*v,D=M-2*v,W=S-2*v,C=-D/2,N=-W/2,{cssStyles:B}=e,A=h.Z.svg(x),_=(0,i._q)(e,{}),q=[{x:C-v,y:N+v},{x:C-v,y:N+W+v},{x:C+D-v,y:N+W+v},{x:C+D-v,y:N+W},{x:C+D,y:N+W},{x:C+D,y:N+W-v},{x:C+D+v,y:N+W-v},{x:C+D+v,y:N-v},{x:C+v,y:N-v},{x:C+v,y:N},{x:C,y:N},{x:C,y:N+v}];"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");let R=w(q),P=A.path(R,_),I=w([{x:C,y:N+v},{x:C+D-v,y:N+v},{x:C+D-v,y:N+W},{x:C+D,y:N+W},{x:C+D,y:N},{x:C,y:N}]),L=A.path(I,_);"handDrawn"!==e.look&&(P=m(P),L=m(L));let U=x.insert("g",":first-child");return U.insert(()=>P),U.insert(()=>L),U.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&U.selectAll("path").attr("style",B),s&&"handDrawn"!==e.look&&U.selectAll("path").attr("style",s),k.attr("transform","translate(".concat(-(b.width/2)-v-(b.x-(null!==(o=b.left)&&void 0!==o?o:0)),", ").concat(-(b.height/2)+v-(b.y-(null!==(r=b.top)&&void 0!==r?r:0)),")")),y(e,U),e.intersect=function(t){return Z.polygon(e,q,t)},x}async function t_(t,e){var l,a,n,o,r,c,s;let{labelStyles:d,nodeStyles:g}=(0,i.UG)(e);e.labelStyle=d;let{shapeSvg:v,bbox:m,label:x}=await u(t,e,f(e)),b=null!==(l=e.padding)&&void 0!==l?l:0,k="neo"===e.look?16:b,M="neo"===e.look?12:b,S=!0;(e.width||e.height)&&(S=!1,e.width=(null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0)-2*k,e.height=(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0)-3*M);let D=Math.max(m.width,null!==(o=null==e?void 0:e.width)&&void 0!==o?o:0)+2*k,W=Math.max(m.height,null!==(r=null==e?void 0:e.height)&&void 0!==r?r:0)+3*M,C="neo"===e.look?W/4:W/8,N=W+(S?C/2:-C/2),B=-D/2,A=-N/2,{cssStyles:_}=e,q=p(B-10,A+N+10,B+D-10,A+N+10,C,.8),R=null==q?void 0:q[q.length-1],P=[{x:B-10,y:A+10},{x:B-10,y:A+N+10},...q,{x:B+D-10,y:R.y-10},{x:B+D,y:R.y-10},{x:B+D,y:R.y-20},{x:B+D+10,y:R.y-20},{x:B+D+10,y:A-10},{x:B+10,y:A-10},{x:B+10,y:A},{x:B,y:A},{x:B,y:A+10}],I=[{x:B,y:A+10},{x:B+D-10,y:A+10},{x:B+D-10,y:R.y-10},{x:B+D,y:R.y-10},{x:B+D,y:A},{x:B,y:A}],L=h.Z.svg(v),U=(0,i._q)(e,{});"handDrawn"!==e.look&&(U.roughness=0,U.fillStyle="solid");let G=w(P),T=L.path(G,U),E=w(I),H=L.path(E,U),j=v.insert(()=>T,":first-child");return j.insert(()=>H),j.attr("class","basic label-container outer-path"),_&&"handDrawn"!==e.look&&j.selectAll("path").attr("style",_),g&&"handDrawn"!==e.look&&j.selectAll("path").attr("style",g),j.attr("transform","translate(0,".concat(-C/2,")")),x.attr("transform","translate(".concat(-(m.width/2)-10-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),", ").concat(-(m.height/2)+10-C/2-(m.y-(null!==(s=m.top)&&void 0!==s?s:0)),")")),y(e,j),e.intersect=function(t){return Z.polygon(e,P,t)},v}async function tq(t,e,l){var a,n,o,r,s,d;let{config:{themeVariables:g}}=l,{labelStyles:w,nodeStyles:p}=(0,i.UG)(e);e.labelStyle=w,e.useHtmlLabels||(0,c._X)((0,c.iE)())||(e.centerLabel=!0);let{shapeSvg:v,bbox:m,label:x}=await u(t,e,f(e)),b=Math.max(m.width+(null!==(a=e.padding)&&void 0!==a?a:0)*2,null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0),k=Math.max(m.height+(null!==(o=e.padding)&&void 0!==o?o:0)*2,null!==(r=null==e?void 0:e.he
1ight)&&void 0!==r?r:0),{cssStyles:M}=e,S=h.Z.svg(v),D=(0,i._q)(e,{fill:g.noteBkgColor,stroke:g.noteBorderColor});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let W=S.rectangle(-b/2,-k/2,b,k,D),C=v.insert(()=>W,":first-child");return C.attr("class","basic label-container outer-path"),x.attr("class","label noteLabel"),M&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",M),p&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",p),x.attr("transform","translate(".concat(-m.width/2-(m.x-(null!==(s=m.left)&&void 0!==s?s:0)),", ").concat(-(m.height/2)-(m.y-(null!==(d=m.top)&&void 0!==d?d:0)),")")),y(e,C),e.intersect=function(t){return Z.rect(e,t)},v}(0,s.eW)(tN,"linedCylinder"),(0,s.eW)(tB,"linedWaveEdgedRect"),(0,s.eW)(tA,"multiRect"),(0,s.eW)(t_,"multiWaveEdgedRectangle"),(0,s.eW)(tq,"note");var tR=(0,s.eW)((t,e,l)=>["M".concat(t+l/2,",").concat(e),"L".concat(t+l,",").concat(e-l/2),"L".concat(t+l/2,",").concat(e-l),"L".concat(t,",").concat(e-l/2),"Z"].join(" "),"createDecisionBoxPathD");async function tP(t,e){var l,a;let n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o;let{shapeSvg:c,bbox:s}=await u(t,e,f(e)),d=s.width+(null!==(l=e.padding)&&void 0!==l?l:0)+(s.height+(null!==(a=e.padding)&&void 0!==a?a:0)),g=[{x:d/2,y:0},{x:d,y:-d/2},{x:d/2,y:-d},{x:0,y:-d/2}],{cssStyles:w}=e;if("handDrawn"===e.look){let t=h.Z.svg(c),l=(0,i._q)(e,{}),a=tR(0,0,d),o=t.path(a,l);n=c.insert(()=>o,":first-child").attr("transform","translate(".concat(-d/2+.5,", ").concat(d/2,")")),w&&n.attr("style",w)}else(n=H(c,d,d,g)).attr("transform","translate(".concat(-d/2+.5,", ").concat(d/2,")"));return r&&n.attr("style",r),y(e,n),e.calcIntersect=function(t,e){let l=t.width,a=Z.polygon(t,[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],e);return{x:a.x-.5,y:a.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},c}async function tI(t,e){var l,a,n,o,r;let{labelStyles:c,nodeStyles:s}=(0,i.UG)(e);e.labelStyle=c;let d=null!==(l=e.padding)&&void 0!==l?l:0,g="neo"===e.look?21:null!=d?d:0,p="neo"===e.look?12:null!=d?d:0,{shapeSvg:v,bbox:m,label:x}=await u(t,e,f(e)),b=(null!==(a=null==e?void 0:e.width)&&void 0!==a?a:m.width)+("neo"===e.look?2*g:g),k=(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:m.height)+("neo"===e.look?2*p:p),M=-b/2,S=-k/2,D=S/2,W=[{x:M+D,y:S},{x:M,y:0},{x:M+D,y:-S},{x:-M,y:-S},{x:-M,y:S}],{cssStyles:C}=e,N=h.Z.svg(v),B=(0,i._q)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let A=w(W),_=N.path(A,B),q=v.insert(()=>_,":first-child");return q.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",C),s&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",s),q.attr("transform","translate(".concat(-D/2,",0)")),x.attr("transform","translate(".concat(-D/2-m.width/2-(m.x-(null!==(o=m.left)&&void 0!==o?o:0)),", ").concat(-(m.height/2)-(m.y-(null!==(r=m.top)&&void 0!==r?r:0)),")")),y(e,q),e.intersect=function(t){return Z.polygon(e,W,t)},v}async function tL(t,e){let l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o,l=e.cssClasses?"node "+e.cssClasses:"node default";let u=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=u.insert("g"),f=u.insert("g").attr("class","label").attr("style",r),w=e.description,p=e.label,v=await b(f,p,e.labelStyle,!0,!0),m={width:0,height:0};if((0,c._X)((0,c.nV)())){let t=v.children[0],e=(0,d.Ys)(v);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}s.cM.info("Text 2",w);let x=w||[],M=v.getBBox(),S=await b(f,Array.isArray(x)?x.join("<br/>"):x,e.labelStyle,!0,!0),D=S.children[0],W=(0,d.Ys)(S);m=D.getBoundingClientRect(),W.attr("width",m.width),W.attr("height",m.height);let C=(e.padding||0)/2;(0,d.Ys)(S).attr("transform","translate( "+(m.width>M.width?0:(M.width-m.width)/2)+", "+(M.height+C+5)+")"),(0,d.Ys)(v).attr("transform","translate( "+(m.width<M.width?0:-(M.width-m.width)/2)+", 0)"),m=f.node().getBBox(),f.attr("transform","translate("+-m.width/2+", "+(-m.height/2-C+3)+")");let N=m.width+(e.padding||0),B=m.height+(e.padding||0),A=-m.width/2-C,_=-m.height/2-C;
1if("handDrawn"===e.look){let t=h.Z.svg(u),l=(0,i._q)(e,{}),o=t.path(k(A,_,N,B,e.rx||0),l),r=t.line(-m.width/2-C,-m.height/2-C+M.height+C,m.width/2+C,-m.height/2-C+M.height+C,l);n=u.insert(()=>(s.cM.debug("Rough node insert CXC",o),r),":first-child"),a=u.insert(()=>(s.cM.debug("Rough node insert CXC",o),o),":first-child")}else a=g.insert("rect",":first-child"),n=g.insert("line"),a.attr("class","outer title-state").attr("style",r).attr("x",-m.width/2-C).attr("y",-m.height/2-C).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),n.attr("class","divider").attr("x1",-m.width/2-C).attr("x2",m.width/2+C).attr("y1",-m.height/2-C+M.height+C).attr("y2",-m.height/2-C+M.height+C);return y(e,a),e.intersect=function(t){return Z.rect(e,t)},u}async function tZ(t,e,l){var a,n,i;let{config:{themeVariables:o}}=l,r=null!==(a=null==o?void 0:o.radius)&&void 0!==a?a:5,c={rx:r,ry:r,classes:"",labelPaddingX:(null!==(n=null==e?void 0:e.padding)&&void 0!==n?n:0)*1,labelPaddingY:(null!==(i=null==e?void 0:e.padding)&&void 0!==i?i:0)*1};return tx(t,e,c)}async function tU(t,e){var l,a,n,o,c,s;let{labelStyles:d,nodeStyles:g}=(0,i.UG)(e);e.labelStyle=d;let w="neo"===e.look?16:null!==(l=e.padding)&&void 0!==l?l:0,p="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0,{shapeSvg:v,bbox:m,label:x}=await u(t,e,f(e)),b=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:m.width)+2*w+("neo"===e.look?8:16),k=(null!==(o=null==e?void 0:e.height)&&void 0!==o?o:m.height)+2*p,M=b-8,S=8-b/2,D=-k/2,{cssStyles:W}=e,C=h.Z.svg(v),N=(0,i._q)(e,{});"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let B=C.polygon([{x:S,y:D},{x:S+M,y:D},{x:S+M,y:D+k},{x:S-8,y:D+k},{x:S-8,y:D},{x:S,y:D},{x:S,y:D+k}].map(t=>[t.x,t.y]),N),A=v.insert(()=>B,":first-child");return A.attr("class","basic label-container outer-path").attr("style",(0,r.R7)(W)),g&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",g),W&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",g),x.attr("transform","translate(".concat(4-m.width/2-(m.x-(null!==(c=m.left)&&void 0!==c?c:0)),", ").concat(-(m.height/2)-(m.y-(null!==(s=m.top)&&void 0!==s?s:0)),")")),y(e,A),e.intersect=function(t){return Z.rect(e,t)},v}async function tG(t,e){var l,a,n,o,r,c,s;let{labelStyles:d,nodeStyles:g}=(0,i.UG)(e);e.labelStyle=d;let p=null!==(l=e.padding)&&void 0!==l?l:0,v="neo"===e.look?16:p,m="neo"===e.look?12:p;(e.width||e.height)&&(e.width=Math.max((null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0)-2*v,10),e.height=Math.max((null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0)/1.5-2*m,10));let{shapeSvg:x,bbox:b,label:k}=await u(t,e,f(e)),M=((null==e?void 0:e.width)?null==e?void 0:e.width:b.width)+2*v,S=(((null==e?void 0:e.height)?null==e?void 0:e.height:b.height)+2*m)*1.5/1.5,D=-M/2,W=-S/2,{cssStyles:C}=e,N=h.Z.svg(x),B=(0,i._q)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");let A=[{x:D,y:W},{x:D,y:W+S},{x:D+M,y:W+S},{x:D+M,y:W-S/2}],_=w(A),q=N.path(_,B),R=x.insert(()=>q,":first-child");return R.attr("class","basic label-container  outer-path"),C&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",C),g&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",g),R.attr("transform","translate(0, ".concat(S/4,")")),k.attr("transform","translate(".concat(-M/2+(null!==(o=e.padding)&&void 0!==o?o:0)-(b.x-(null!==(r=b.left)&&void 0!==r?r:0)),", ").concat(-S/4+(null!==(c=e.padding)&&void 0!==c?c:0)-(b.y-(null!==(s=b.top)&&void 0!==s?s:0)),")")),y(e,R),e.intersect=function(t){return Z.polygon(e,A,t)},x}async function tT(t,e){var l,a;let n=null!==(l=e.padding)&&void 0!==l?l:0,i="neo"===e.look?16:2*n,o="neo"===e.look?12:n,r={rx:0,ry:0,classes:"",labelPaddingX:null!==(a=e.labelPaddingX)&&void 0!==a?a:i,labelPaddingY:o};return tx(t,e,r)}async function tE(t,e){var l;let{labelStyles:a,nodeStyles:n}=(0,i.UG)(e);e.labelStyle=a;let o=null!==(l=e.padding)&&void 0!==l?l:0,r="neo"===e.look?20:o,c="neo"===e.look?12:o,{shapeSvg:s,bbox:d}=await u(t,e,f(e)),g=d.height+("neo"===e.look?2*c:c),p=d.width+g/4+("neo"===e.look?2*r:r),m=g/2,{cssStyles:x}=e,b=h.Z.svg(s),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-p/2+m,y:-g/2},{x:p/2-m,y:-g/2},...v(-p/2+m,0,m,50,90,270),{x:p/2-m,y:g/2},...v(p/2-m,0,m,50,270,450)],S=w(M),D=b.path(S,k),W=s.insert(()=>D,":first-child");return W.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",x),n&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",n),y(e,W),e.intersect=function(t){return Z.polygon(e,M,t)},s}async function tH(t,e){let l={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tx(t,e,l)}function tj(t,e,l){var a,n,o,r,c,s,d;let{config:{themeVariables:u}}=l,{labelStyles:g,nodeStyles:f}=(0,i.UG)(e);e.labelStyle=g;let{cssStyles:w}=e,{lineColor:p,stateBorder:v,nodeBorder:m,nodeShadow:x}=u;(e.width||e.height)&&((null!==(a=e.width)&&void 0!==a?a:0)<14&&(e.width=14),(null!==(n=e.height)&&void 0!==n?n:0)<14&&(e.height=14)),e.
1width||(e.width=14),e.height||(e.height=14);let b=t.insert("g").attr("class","node default").attr("id",null!==(o=e.domId)&&void 0!==o?o:e.id),k=h.Z.svg(b),M=(0,i._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.circle(0,0,e.width,{...M,stroke:p,strokeWidth:2}),D=null!=v?v:m,W=(null!==(r=e.width)&&void 0!==r?r:0)*5/14,C=k.circle(0,0,W,{...M,fill:D,stroke:D,strokeWidth:2,fillStyle:"solid"}),N=b.insert(()=>S,":first-child");if(N.insert(()=>C),"handDrawn"!==e.look&&N.attr("class","outer-path"),w&&N.selectAll("path").attr("style",w),f&&N.selectAll("path").attr("style",f),e.width<25&&x&&"handDrawn"!==e.look){let e=null!==(d=null===(s=t.node())||void 0===s?void 0:null===(c=s.ownerSVGElement)||void 0===c?void 0:c.id)&&void 0!==d?d:"";N.attr("style","filter:url(#".concat(e?"".concat(e,"-drop-shadow-small"):"drop-shadow-small",")"))}return y(e,N),e.intersect=function(t){var l;return Z.circle(e,(null!==(l=e.width)&&void 0!==l?l:0)/2,t)},b}function tV(t,e,l){var a,n,o,r,c,s,d,u,g,f,w;let p,{config:{themeVariables:v}}=l,{lineColor:m,nodeShadow:x}=v;(e.width||e.height)&&((null!==(a=e.width)&&void 0!==a?a:0)<14&&(e.width=14),(null!==(n=e.height)&&void 0!==n?n:0)<14&&(e.height=14)),e.
1width||(e.width=14),e.height||(e.height=14);let b=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=h.Z.svg(b).circle(0,0,e.width,(0,i.TA)(m));(p=b.insert(()=>t)).attr("class","state-start").attr("r",(null!==(o=e.width)&&void 0!==o?o:7)/2).attr("width",null!==(r=e.width)&&void 0!==r?r:14).attr("height",null!==(c=e.height)&&void 0!==c?c:14)}else(p=b.insert("circle",":first-child")).attr("class","state-start").attr("r",(null!==(s=e.width)&&void 0!==s?s:7)/2).attr("width",null!==(d=e.width)&&void 0!==d?d:14).attr("height",null!==(u=e.height)&&void 0!==u?u:14);if(e.width<25&&x&&"handDrawn"!==e.look){let e=null!==(w=null===(f=t.node())||void 0===f?void 0:null===(g=f.ownerSVGElement)||void 0===g?void 0:g.id)&&void 0!==w?w:"";p.attr("style","filter:url(#".concat(e?"".concat(e,"-drop-shadow-small"):"drop-shadow-small",")"))}return y(e,p),e.intersect=function(t){var l;return Z.circle(e,(null!==(l=e.width)&&void 0!==l?l:7)/2,t)},b}async function tX(t,e){var l,a,n;let{labelStyles:o,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=o;let s=null!==(l=null==e?void 0:e.padding)&&void 0!==l?l:8,d="neo"===e.look?28:s,g="neo"===e.look?12:s,{shapeSvg:w,bbox:p}=await u(t,e,f(e)),v=(null!==(a=null==e?void 0:e.width)&&void 0!==a?a:p.width)+16+d,m=(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:p.height)+g,x=v-16,b=-v/2,k=-m/2,M=[{x:0,y:0},{x:x,y:0},{x:x,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:x+8,y:0},{x:x+8,y:-m},{x:-8,y:-m},{x:-8,y:0}];if("handDrawn"===e.look){let t=h.Z.svg(w),l=(0,i._q)(e,{}),a=t.rectangle(b,k,x+16,m,l),n=t.line(b+8,k,b+8,k+m,l),o=t.line(b+8+x,k,b+8+x,k+m,l);w.insert(()=>n,":first-child"),w.insert(()=>o,":first-child");let c=w.insert(()=>a,":first-child"),{cssStyles:s}=e;c.attr("class","basic label-container").attr("style",(0,r.R7)(s)),y(e,c)}else{let t=H(w,x,m,M);c&&t.attr("style",c),y(e,t)}return e.intersect=function(t){return Z.polygon(e,M,t)},w}async function tY(t,e){var l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o;let c=null!==(l=e.padding)&&void 0!==l?l:0,s="neo"===e.look?16:c,d="neo"===e.look?12:c;(e.width||e.height)&&(e.height=Math.max((null!==(a=null==e?void 0:e.height)&&void 0!==a?a:0)-2*d,10),e.width=Math.max((null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0)-2*s-.2*(e.height+2*d),10));let{shapeSvg:g,bbox:p}=await u(t,e,f(e)),v=((null==e?void 0:e.height)?null==e?void 0:e.height:p.height)+2*d,m=.2*v,x=((null==e?void 0:e.width)?null==e?void 0:e.width:p.width)+2*s+m-m,b=-x/2,k=-v/2,{cssStyles:M}=e,S=h.Z.svg(g),D=(0,i._q)(e,{}),W=[{x:b-m/2,y:k},{x:b+x+m/2,y:k},{x:b+x+m/2,y:k+v},{x:b-m/2,y:k+v}];"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let C=w(W),N=S.path(C,D),B=w([{x:b+x-m/2,y:k+v},{x:b+x+m/2,y:k+v},{x:b+x+m/2,y:k+v-.2*v}]),A=S.path(B,{...D,fillStyle:"solid"}),_=g.insert(()=>A,":first-child");return _.insert(()=>N,":first-child"),_.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",M),r&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",r),y(e,_),e.intersect=function(t){return Z.polygon(e,W,t)},g}async function tO(t,e){var l,a,n,o,r,c,s,d;let{labelStyles:g,nodeStyles:v}=(0,i.UG)(e);e.labelStyle=g;let{shapeSvg:m,bbox:x,label:b}=await u(t,e,f(e)),k=Math.max(x.width+(null!==(l=e.padding)&&void 0!==l?l:0)*2,null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0),M=Math.max(x.height+(null!==(n=e.padding)&&void 0!==n?n:0)*2,null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0),S=M/8,D=.2*k,W=.2*M,C=M+S,{cssStyles:N}=e,B=h.Z.svg(m),A=(0,i._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let _=[{x:-k/2-k/2*.1,y:C/2},...p(-k/2-k/2*.1,C/2,k/2+k/2*.1,C/2,S,.8),{x:k/2+k/2*.1,y:-C/2},{x:-k/2-k/2*.1,y:-C/2}],q=-k/2+k/2*.1,R=-C/2-.4*W,P=[{x:q+k-D,y:(R+M)*1.3},{x:q+k,y:R+M-W},{x:q+k,y:(R+M)*.9},...p(q+k,(R+M)*1.25,q+k-D,(R+M)*1.3,-(.02*M),.5)],I=w(_),L=B.path(I,A),U=w(P),G=B.path(U,{...A,fillStyle:"solid"}),T=m.insert(()=>G,":first-child");return T.insert(()=>L,":first-child"),T.attr("class","basic label-container outer-path"),N&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",N),v&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",v),T.attr("transform","translate(0,".concat(-S/2,")")),b.attr("transform","translate(".concat(-k/2+(null!==(r=e.padding)&&void 0!==r?r:0)-(x.x-(null!==(c=x.left)&&void 0!==c?c:0)),",").concat(-M/2+(null!==(s=e.padding)&&void 0!==s?s:0)-S/2-(x.y-(null!==(d=x.top)&&void 0!==d?d:0)),")")),y(e,T),e.intersect=function(t){return Z.polygon(e,_,t)},m}async function tF(t,e){var l,a;let{labelStyles:n,nodeStyles:o}=(0,i.UG)(e);e.labelStyle=n;let{shapeSvg:r,bbox:c}=await u(t,e,f(e)),s=Math.max(c.width+(null!==(l=e.padding)&&void 0!==l?l:0),(null==e?void 0:e.width)||0),d=Math.max(c.height+(null!==(a=e.padding)&&void 0!==a?a:0),(null==e?void 0:e.he
1ight)||0),h=r.insert("rect",":first-child");return h.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-d/2).attr("width",s).attr("height",d),y(e,h),e.intersect=function(t){return Z.rect(e,t)},r}(0,s.eW)(tP,"question"),(0,s.eW)(tI,"rect_left_inv_arrow"),(0,s.eW)(tL,"rectWithTitle"),(0,s.eW)(tZ,"roundedRect"),(0,s.eW)(tU,"shadedProcess"),(0,s.eW)(tG,"slopedRect"),(0,s.eW)(tT,"squareRect"),(0,s.eW)(tE,"stadium"),(0,s.eW)(tH,"state"),(0,s.eW)(tj,"stateEnd"),(0,s.eW)(tV,"stateStart"),(0,s.eW)(tX,"subroutine"),(0,s.eW)(tY,"taggedRect"),(0,s.eW)(tO,"taggedWaveEdgedRectangle"),(0,s.eW)(tF,"text");var tz=(0,s.eW)((t,e,l,a,n,i)=>"M".concat(t,",").concat(e,"\n    a").concat(n,",").concat(i," 0,0,1 ",0,",").concat(-a,"\n    l").concat(l,",",0,"\n    a").concat(n,",").concat(i," 0,0,1 ",0,",").concat(a,"\n    M").concat(l,",").concat(-a,"\n    a").concat(n,",").concat(i," 0,0,0 ",0,",").concat(a,"\n    l").concat(-l,",",0),"createCylinderPathD"),tJ=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t,",").concat(e),"M".concat(t+l,",").concat(e),"a".concat(n,",").concat(i," 0,0,0 ",0,",").concat(-a),"l".concat(-l,",0"),"a".concat(n,",").concat(i," 0,0,0 ",0,",").concat(a),"l".concat(l,",0")].join(" "),"createOuterCylinderPathD"),tK=(0,s.eW)((t,e,l,a,n,i)=>["M".concat(t+l/2,",").concat(-a/2),"a".concat(n,",").concat(i," 0,0,0 0,").concat(a)].join(" "),"createInnerCylinderPathD");async function tQ(t,e){var l,a,n,o,c,s;let d;let{labelStyles:g,nodeStyles:w}=(0,i.UG)(e);e.labelStyle=g;let p=null!==(l=e.padding)&&void 0!==l?l:0,v="neo"===e.look?12:p/2;if(e.width||e.height){let t=null!==(a=e.height)&&void 0!==a?a:0;e.height=(null!==(n=e.height)&&void 0!==n?n:0)-v,e.height<5&&(e.height=5),e.width=(null!==(o=e.width)&&void 0!==o?o:0)-v-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:m,bbox:x,label:b}=await u(t,e,f(e)),k=(e.height?e.height:x.height)+v,M=k/2,S=M/(2.5+k/50),D=(e.width?e.width:x.width)+S+v,{cssStyles:W}=e;
1if("handDrawn"===e.look){let t=h.Z.svg(m),l=tJ(0,0,D,k,S,M),a=tK(0,0,D,k,S,M),n=t.path(l,(0,i._q)(e,{})),o=t.path(a,(0,i._q)(e,{fill:"none"}));d=m.insert(()=>o,":first-child"),(d=m.insert(()=>n,":first-child")).attr("class","basic label-container"),W&&d.attr("style",W)}else{let t=tz(0,0,D,k,S,M);(d=m.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,r.R7)(W)).attr("style",w)).attr("class","basic label-container outer-path"),W&&d.selectAll("path").attr("style",W),w&&d.selectAll("path").attr("style",w)}return d.attr("label-offset-x",S),d.attr("transform","translate(".concat(-D/2,", ").concat(k/2," )")),b.attr("transform","translate(".concat(-(x.width/2)-S-(x.x-(null!==(c=x.left)&&void 0!==c?c:0)),", ").concat(-(x.height/2)-(x.y-(null!==(s=x.top)&&void 0!==s?s:0)),")")),y(e,d),e.intersect=function(t){var l,a,n,i,o,r;let c=Z.rect(e,t),s=c.y-(null!==(l=e.y)&&void 0!==l?l:0);if(0!=M&&(Math.abs(s)<(null!==(a=e.height)&&void 0!==a?a:0)/2||Math.abs(s)==(null!==(n=e.height)&&void 0!==n?n:0)/2&&Math.abs(c.x-(null!==(i=e.x)&&void 0!==i?i:0))>(null!==(o=e.width)&&void 0!==o?o:0)/2-S)){let l=S*S*(1-s*s/(M*M));0!=l&&(l=Math.sqrt(Math.abs(l))),l=S-l,t.x-(null!==(r=e.x)&&void 0!==r?r:0)>0&&(l=-l),c.x+=l}return c},m}async function t$(t,e){var l,a,n;let o;let{labelStyles:r,nodeStyles:c}=(0,i.UG)(e);e.labelStyle=r;let s=null!==(l=e.padding)&&void 0!==l?l:0,d=(e.look,s),g="neo"===e.look?2*s:s,{shapeSvg:p,bbox:v}=await u(t,e,f(e)),m=(null!==(a=null==e?void 0:e.height)&&void 0!==a?a:v.height)+d,x=(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:v.width)+g,b=[{x:-3*m/6,y:0},{x:x+3*m/6,y:0},{x:x,y:-m},{x:0,y:-m}],{cssStyles:k}=e;if("handDrawn"===e.look){let t=h.Z.svg(p),l=(0,i._q)(e,{}),a=w(b),n=t.path(a,l);o=p.insert(()=>n,":first-child").attr("transform","translate(".concat(-x/2,", ").concat(m/2,")")),k&&o.attr("style",k)}else o=H(p,x,m,b);return c&&o.attr("style",c),e.width=x,e.height=m,y(e,o),e.intersect=function(t){return Z.polygon(e,b,t)},p}async function t0(t,e){var l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o;let c=null!==(l=e.padding)&&void 0!==l?l:0,s="neo"===e.look?16:c,d="neo"===e.look?12:c;(e.width||e.height)&&(e.height=(null!==(a=e.height)&&void 0!==a?a:0)-2*d,e.height<5&&(e.height=5),e.width=(null!==(n=e.width)&&void 0!==n?n:0)-2*s,e.width<15&&(e.width=15));let{shapeSvg:g,bbox:p}=await u(t,e,f(e)),v=((null==e?void 0:e.width)?null==e?void 0:e.width:p.width)+2*s,m=((null==e?void 0:e.height)?null==e?void 0:e.height:p.height)+2*d,{cssStyles:x}=e,b=h.Z.svg(g),k=(0,i._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-v/2*.8,y:-m/2},{x:v/2*.8,y:-m/2},{x:v/2,y:-m/2*.6},{x:v/2,y:m/2},{x:-v/2,y:m/2},{x:-v/2,y:-m/2*.6}],S=w(M),D=b.path(S,k),W=g.insert(()=>D,":first-child");return W.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",x),r&&"handDrawn"!==e.look&&W.selectChildren("path").attr("style",r),y(e,W),e.intersect=function(t){return Z.polygon(e,M,t)},g}async function t2(t,e){var l,a,n,o,r,d,g;let{labelStyles:p,nodeStyles:v}=(0,i.UG)(e);e.labelStyle=p;let m=null!==(a=e.padding)&&void 0!==a?a:0,x="neo"===e.look?2*m:m;(e.width||e.height)&&(e.width=((null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0)-x)/2,e.width<10&&(e.width=10),e.height=null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0,e.height<10&&(e.height=10));let{shapeSvg:b,bbox:k,label:M}=await u(t,e,f(e)),S=(0,c.ku)(null===(l=(0,c.nV)().flowchart)||void 0===l?void 0:l.htmlLabels),D=((null==e?void 0:e.width)?null==e?void 0:e.width:k.width)+x,W=(null==e?void 0:e.height)?null==e?void 0:e.height:D+k.height,C=[{x:0,y:0},{x:W,y:0},{x:W/2,y:-W}],{cssStyles:N}=e,B=h.Z.svg(b),A=(0,i._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let _=w(C),q=B.path(_,A),R=b.insert(()=>q,":first-child").attr("transform","translate(".concat(-W/2,", ").concat(W/2,")")).attr("class","outer-path");return N&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",N),v&&"handDrawn"!==e.look&&R.selectChildren("path").attr("style",v),e.width=D,e.height=W,y(e,R),M.attr("transform","translate(".concat(-k.width/2-(k.x-(null!==(r=k.left)&&void 0!==r?r:0)),", ").concat(W/2-(k.height+(null!==(d=e.padding)&&void 0!==d?d:0)/(S?2:1)-(k.y-(null!==(g=k.top)&&void 0!==g?g:0))),")")),e.intersect=function(t){return s.cM.info("Triangle intersect",e,C,t),Z.polygon(e,C,t)},b}async function t1(t,e){var l,a,n,o,r,c,s;let{labelStyles:d,nodeStyles:g}=(0,i.UG)(e);e.labelStyle=d;let v=null!==(l=e.padding)&&void 0!==l?l:0,m="neo"===e.look?16:v,x="neo"===e.look?12:v,b=!0;(e.width||e.height)&&(b=!1,e.width=(null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0)-2*m,e.width<10&&(e.width=10),e.height=(null!==(n=null==e?void 0:e.he
1ight)&&void 0!==n?n:0)-2*x,e.height<10&&(e.height=10));let{shapeSvg:k,bbox:M,label:S}=await u(t,e,f(e)),D=((null==e?void 0:e.width)?null==e?void 0:e.width:M.width)+(null!=m?m:0)*2,W=((null==e?void 0:e.height)?null==e?void 0:e.height:M.height)+(null!=x?x:0)*2,C="neo"===e.look?W/4:W/8,N=W+(b?C:-C),{cssStyles:B}=e,A=14-D,_=A>0?A/2:0,q=h.Z.svg(k),R=(0,i._q)(e,{});"handDrawn"!==e.look&&(R.roughness=0,R.fillStyle="solid");let P=[{x:-D/2-_,y:N/2},...p(-D/2-_,N/2,D/2+_,N/2,C,.8),{x:D/2+_,y:-N/2},{x:-D/2-_,y:-N/2}],I=w(P),L=q.path(I,R),U=k.insert(()=>L,":first-child");return U.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&U.selectAll("path").attr("style",B),g&&"handDrawn"!==e.look&&U.selectAll("path").attr("style",g),U.attr("transform","translate(0,".concat(-C/2,")")),S.attr("transform","translate(".concat(-D/2+(null!==(o=e.padding)&&void 0!==o?o:0)-(M.x-(null!==(r=M.left)&&void 0!==r?r:0)),",").concat(-W/2+(null!==(c=e.padding)&&void 0!==c?c:0)-C-(M.y-(null!==(s=M.top)&&void 0!==s?s:0)),")")),y(e,U),e.intersect=function(t){return Z.polygon(e,P,t)},k}async function t5(t,e){var l,a,n;let{labelStyles:o,nodeStyles:r}=(0,i.UG)(e);e.labelStyle=o;let c=null!==(l=e.padding)&&void 0!==l?l:0,s="neo"===e.look?16:c,d="neo"===e.look?20:c;if(e.width||e.height){e.width=null!==(a=null==e?void 0:e.width)&&void 0!==a?a:0,e.width<20&&(e.width=20),e.height=null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-d-20/9*t),e.width=e.width-2*s}let{shapeSvg:g,bbox:v}=await u(t,e,f(e)),m=((null==e?void 0:e.width)?null==e?void 0:e.width:v.width)+2*s,x=((null==e?void 0:e.height)?null==e?void 0:e.height:v.height)+d,b=x/8,k=x+2*b,{cssStyles:M}=e,S=h.Z.svg(g),D=(0,i._q)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let W=[{x:-m/2,y:k/2},...p(-m/2,k/2,m/2,k/2,b,1),{x:m/2,y:-k/2},...p(m/2,-k/2,-m/2,-k/2,b,-1)],C=w(W),N=S.path(C,D),B=g.insert(()=>N,":first-child");return B.attr("class","basic label-container"),M&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",M),r&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",r),y(e,B),e.intersect=function(t){return Z.polygon(e,W,t)},g}async function t4(t,e){var l,a,n,o,r,c;let{labelStyles:s,nodeStyles:d}=(0,i.UG)(e);e.labelStyle=s;let g="neo"===e.look?16:null!==(l=e.padding)&&void 0!==l?l:0,w="neo"===e.look?12:null!==(a=e.padding)&&void 0!==a?a:0;(e.width||e.height)&&(e.width=Math.max((null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0)-2*g-10,10),e.height=Math.max((null!==(o=null==e?void 0:e.height)&&void 0!==o?o:0)-2*w-10,10));let{shapeSvg:p,bbox:v,label:m}=await u(t,e,f(e)),x=((null==e?void 0:e.width)?null==e?void 0:e.width:v.width)+2*g+10,b=((null==e?void 0:e.height)?null==e?void 0:e.height:v.height)+2*w+10,k=x-10,M=b-10,S=-k/2,D=-M/2,{cssStyles:W}=e,C=h.Z.svg(p),N=(0,i._q)(e,{}),B=[{x:S-10,y:D-10},{x:S-10,y:D+M},{x:S+k,y:D+M},{x:S+k,y:D-10}],A="M".concat(S-10,",").concat(D-10," L").concat(S+k,",").concat(D-10," L").concat(S+k,",").concat(D+M," L").concat(S-10,",").concat(D+M," L").concat(S-10,",").concat(D-10,"\n                M").concat(S-10,",").concat(D," L").concat(S+k,",").concat(D,"\n                M").concat(S,",").concat(D-10," L").concat(S,",").concat(D+M);"handDrawn"!==e.look&&(N.roughness=0,N.fillStyle="solid");let _=C.path(A,N),q=p.insert(()=>_,":first-child");return q.attr("transform","translate(".concat(5,", ").concat(5,")")),q.attr("class","basic label-container outer-path"),W&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",W),d&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",d),m.attr("transform","translate(".concat(-(v.width/2)+5-(v.x-(null!==(r=v.left)&&void 0!==r?r:0)),", ").concat(-(v.height/2)+5-(v.y-(null!==(c=v.top)&&void 0!==c?c:0)),")")),y(e,q),e.intersect=function(t){return Z.polygon(e,B,t)},p}(0,s.eW)(tQ,"tiltedCylinder"),(0,s.eW)(t$,"trapezoid"),(0,s.eW)(t0,"trapezoidalPentagon"),(0,s.eW)(t2,"triangle"),(0,s.eW)(t1,"waveEdgedRectangle"),(0,s.eW)(t5,"waveRectangle"),(0,s.eW)(t4,"windowPane");var t8=new Set(["redux-color","redux-dark-color"]),t3=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t6(t,e){var l,a,n,o,s,u,g,w,p;e.alias&&(e.label=e.alias);let{theme:v,themeVariables:m}
1=(0,c.iE)(),{rowEven:x,rowOdd:b,nodeBorder:k,borderColorArray:M}=m;if("handDrawn"===e.look){let{themeVariables:l}=(0,c.iE)(),{background:a}=l,n={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none","fill: ".concat(a)]};await t6(t,n)}let S=(0,c.iE)();e.useHtmlLabels=S.htmlLabels;let D=null!==(n=null===(l=S.er)||void 0===l?void 0:l.diagramPadding)&&void 0!==n?n:10,W=null!==(o=null===(a=S.er)||void 0===a?void 0:a.entityPadding)&&void 0!==o?o:6,{cssStyles:C}=e,{labelStyles:N,nodeStyles:B}=(0,i.UG)(e);if(0===e.attributes.length&&e.label){let l={rx:0,ry:0,labelPaddingX:D,labelPaddingY:1.5*D,classes:""};(0,r.Cq)(e.label,S)+2*l.labelPaddingX<S.er.minEntityWidth&&(e.width=S.er.minEntityWidth);let a=await tx(t,e,l);if(null!=v&&t8.has(v)){let t=null!==(s=e.colorIndex)&&void 0!==s?s:0;a.attr("data-color-id","color-".concat(t%M.length))}if(!(0,c.ku)(S.htmlLabels)){let t=a.select("text"),e=null===(u=t.node())||void 0===u?void 0:u.getBBox();t.attr("transform","translate(".concat(-e.width/2,", 0)"))}return a}S.htmlLabels||(D*=1.25,W*=1.25);let A=f(e);A||(A="node default");let _=t.insert("g").attr("class",A).attr("id",e.domId||e.id),q=await t7(_,null!==(g=e.label)&&void 0!==g?g:"",S,0,0,["name"],N);q.height+=W;let R=0,P=[],I=[],L=0,U=0,G=0,T=0,E=!0,H=!0;for(let t of e.attributes){let e=await t7(_,t.type,S,0,R,["attribute-type"],N);L=Math.max(L,e.width+D);let l=await t7(_,t.name,S,0,R,["attribute-name"],N);U=Math.max(U,l.width+D);let a=await t7(_,t.keys.join(),S,0,R,["attribute-keys"],N);G=Math.max(G,a.width+D);let n=await t7(_,t.comment,S,0,R,["attribute-comment"],N);T=Math.max(T,n.width+D);let i=Math.max(e.height,l.height,a.height,n.height)+W;I.push({yOffset:R,rowHeight:i}),R+=i}let j=4;G<=D&&(E=!1,G=0,j--),T<=D&&(H=!1,T=0,j--);let V=_.node().getBBox();if(q.width+2*D-(L+U+G+T)>0){let t=q.width+2*D-(L+U+G+T);L+=t/j,U+=t/j,G>0&&(G+=t/j),T>0&&(T+=t/j)}let X=L+U+G+T,Y=h.Z.svg(_),O=(0,i._q)(e,{});"handDrawn"!==e.look&&(O.roughness=0,O.fillStyle="solid");let F=0;I.length>0&&(F=I.reduce((t,e)=>{var l;return t+(null!==(l=null==e?void 0:e.rowHeight)&&void 0!==l?l:0)},0));let z=Math.max(V.width+2*D,(null==e?void 0:e.width)||0,X),J=Math.max((null!=F?F:0)+q.height,(null==e?void 0:e.height)||0),K=-z/2,Q=-J/2;if(_.selectAll("g:not(:first-child)").each((t,e,l)=>{let a=(0,d.Ys)(l[e]),n=a.attr("transform"),i=0,o=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(i=parseFloat(t[1]),o=parseFloat(t[2]),a.attr("class").includes("attribute-name")?i+=L:a.attr("class").includes("attribute-keys")?i+=L+U:a.attr("class").includes("attribute-comment")&&(i+=L+U+G))}a.attr("transform","translate(".concat(K+D/2+i,", ").concat(o+Q+q.height+W/2,")"))}),_.select(".name").attr("transform","translate("+-q.width/2+", "+(Q+W/2)+")"),null!=v&&t8.has(v)){let t=null!==(w=e.colorIndex)&&void 0!==w?w:0;_.attr("data-color-id","color-".concat(t%M.length))}let $=Y.rectangle(K,Q,z,J,O),tt=_.insert(()=>$,":first-child").attr("class","outer-path").attr("style",C.join(""));for(let[t,e]of(P.push(0),I.entries())){let l=(t+1)%2==0&&0!==e.yOffset,a=Y.rectangle(K,q.height+Q+(null==e?void 0:e.yOffset),z,null==e?void 0:e.rowHeight,{...O,fill:l?x:b,stroke:k});_.insert(()=>a,"g.label").attr("style",C.join("")).attr("class","row-rect-".concat(l?"even":"odd"))}let te=t9(K,q.height+Q,z+K,q.height+Q,1e-4),tl=Y.polygon(te.map(t=>[t.x,t.y]),O);if(_.insert(()=>tl).attr("class","divider"),te=t9(L+K,q.height+Q,L+K,J+Q,1e-4),tl=Y.polygon(te.map(t=>[t.x,t.y]),O),_.insert(()=>tl).attr("class","divider"),E){let t=L+U+K;te=t9(t,q.height+Q,t,J+Q,1e-4),tl=Y.polygon(te.map(t=>[t.x,t.y]),O),_.insert(()=>tl).attr("class","divider")}if(H){let t=L+U+G+K;te=t9(t,q.height+Q,t,J+Q,1e-4),tl=Y.polygon(te.map(t=>[t.x,t.y]),O),_.insert(()=>tl).attr("class","divider")}for(let t of P){let e=q.height+Q+t;te=t9(K,e,z+K,e,1e-4),tl=Y.polygon(te.map(t=>[t.x,t.y]),O),_.insert(()=>tl).attr("class","divider")}if(y(e,tt),B&&"handDrawn"!==e.look){if(null!=v&&t3.has(v))_.selectAll("path").attr("style",B);else{let t=B.split(";"),e=null==t?void 0:null===(p=t.filter(t=>t.includes("stroke")))||void 0===p?void 0:p.map(t=>"".concat(t)).join("; ");_.selectAll("path").attr("style",null!=e?e:""),_.selectAll(".row-rect-even path").attr("style",B)}}return e.intersect=function(t){return Z.rect(e,t)},_}async function t7(t,e,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",h=t.insert("g").attr("class","label ".concat(i.join(" "))).attr("transform","translate(".concat(a,", ").concat(n,")")).attr("style",s);e!==(0,c.UO)(e)&&(e=(e=(0,c.UO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));let u=h.node().appendChild(await (0,o.rw)(h,e,{width:(0,r.Cq)(e,l)+100,style:s,useHtmlLabels:l.htmlLabels},l));if(e.includes("&lt;")||e.includes("&gt;")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let g=u.getBBox();
1if((0,c.ku)(l.htmlLabels)){let t=u.children[0];t.style.textAlign="start";let e=(0,d.Ys)(u);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}return g}function t9(t,e,l,a,n){return t===l?[{x:t-n/2,y:e},{x:t+n/2,y:e},{x:l+n/2,y:a},{x:l-n/2,y:a}]:[{x:t,y:e-n/2},{x:t,y:e+n/2},{x:l,y:a+n/2},{x:l,y:a-n/2}]}async function et(t,e,l,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null!==(a=l.class.padding)&&void 0!==a?a:12,o=n?0:3,r=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),c=null,s=null,d=null,h=null,u=0,g=0,y=0;if(c=r.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await ee(c,{text:"\xab".concat(t,"\xbb")},0),u=c.node().getBBox().height}s=r.insert("g").attr("class","label-group text"),await ee(s,e,0,["font-weight: bolder"]);let w=s.node().getBBox();g=w.height,d=r.insert("g").attr("class","members-group text");let p=0;for(let t of e.members){let e=await ee(d,t,p,[t.parseClassifier()]);p+=e+o}(y=d.node().getBBox().height)<=0&&(y=i/2),h=r.insert("g").attr("class","methods-group text");let v=0;for(let t of e.methods){let e=await ee(h,t,v,[t.parseClassifier()]);v+=e+o}let m=r.node().getBBox();if(null!==c){let t=c.node().getBBox();c.attr("transform","translate(".concat(-t.width/2,")"))}return s.attr("transform","translate(".concat(-w.width/2,", ").concat(u,")")),m=r.node().getBBox(),d.attr("transform","translate(".concat(0,", ").concat(u+g+2*i,")")),m=r.node().getBBox(),h.attr("transform","translate(".concat(0,", ").concat(u+g+(y?y+4*i:2*i),")")),m=r.node().getBBox(),{shapeSvg:r,bbox:m}}async function ee(t,e,l){var a;let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],h=t.insert("g").attr("class","label").attr("style",i.join("; ")),u=(0,c.iE)(),g="useHtmlLabels"in e?e.useHtmlLabels:null===(a=(0,c.ku)(u.htmlLabels))||void 0===a||a,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,c.l0)(y)&&(g=!0);let f=await (0,o.rw)(h,(0,c.uX)((0,r.SH)(y)),{width:(0,r.Cq)(y,u)+50,classes:"markdown-node-label",useHtmlLabels:g},u),w=1;if(g){let t=f.children[0],e=(0,d.Ys)(f);w=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(w+=t.innerHTML.split("<mrow>").length-1);let l=t.getElementsByTagName("img");if(l){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...l].map(e=>new Promise(l=>{function a(){if(e.style.display="flex",e.style.flexDirection="column",t){var a,n;let t=5*parseInt(null!==(n=null===(a=u.fontSize)||void 0===a?void 0:a.toString())&&void 0!==n?n:window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";l(e)}(0,s.eW)(a,"setupImage"),setTimeout(()=>{e.complete&&a()}),e.addEventListener("error",a),e.addEventListener("load",a)})))}n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{i.includes("font-weight: bolder")&&(0,d.Ys)(f).selectAll("tspan").attr("font-weight",""),w=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes("&gt"))&&(t.textContent=y[0]+y.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),n=f.getBBox()}return h.attr("transform","translate(0,"+(-n.height/(2*w)+l)+")"),n.height}async function el(t,e){var l,a,n,o,r,s,u,g,f,w,p;let v=(0,c.nV)(),{themeVariables:m}=v,{useGradient:x}=m,b=null!==(n=v.class.padding)&&void 0!==n?n:12,k=null===(r=null!==(o=e.useHtmlLabels)&&void 0!==o?o:(0,c.ku)(v.htmlLabels))||void 0===r||r;e.annotations=null!==(s=e.annotations)&&void 0!==s?s:[],e.members=null!==(u=e.members)&&void 0!==u?u:[],e.methods=null!==(g=e.methods)&&void 0!==g?g:[];let{shapeSvg:M,bbox:S}=await et(t,e,v,k,b),{labelStyles:D,nodeStyles:W}=(0,i.UG)(e);e.labelStyle=D,e.cssStyles=e.styles||"";let C=(null===(l=e.styles)||void 0===l?void 0:l.join(";"))||W||"";e.cssStyles||(e.cssStyles=C.replaceAll("!important","").split(";"));let N=0===e.members.length&&0===e.methods.length&&!(null===(a=v.class)||void 0===a?void 0:a.hideEmptyMembersBox),B=h.Z.svg(M),A=(0,i._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let _=Math.max(null!==(f=e.width)&&void 0!==f?f:0,S.width),q=Math.max(null!==(w=e.height)&&void 0!==w?w:0,S.height),R=(null!==(p=e.height)&&void 0!==p?p:0)>S.height;0===e.members.length&&0===e.methods.length?q+=b:e.members.length>0&&0===e.methods.length&&(q+=2*b);
1let P=-_/2,I=-q/2,L=N?2*b:0===e.members.length&&0===e.methods.length?-b:0;R&&(L=2*b);let U=B.rectangle(P-b,I-b-(N?b:0===e.members.length&&0===e.methods.length?-b/2:0),_+2*b,q+2*b+L,A),G=M.insert(()=>U,":first-child");G.attr("class","basic label-container outer-path");let T=G.node().getBBox(),E=M.select(".annotation-group").node().getBBox().height-(N?b/2:0)||0,H=M.select(".label-group").node().getBBox().height-(N?b/2:0)||0,j=M.select(".members-group").node().getBBox().height-(N?b/2:0)||0,V=(E+H+I+b-(I-b-(N?b:0===e.members.length&&0===e.methods.length?-b/2:0)))/2;if(M.selectAll(".text").each((t,l,a)=>{var n,i;let o=(0,d.Ys)(a[l]),r=o.attr("transform"),c=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(c=parseFloat(t[2]))}let s=c+I+b-(N?b:0===e.members.length&&0===e.methods.length?-b/2:0);if(o.attr("class").includes("methods-group")){let t=Math.max(j,b/2);s=R?Math.max(V,E+H+t+I+2*b+b)+2*b:E+H+t+I+4*b+b}0===e.members.length&&0===e.methods.length&&(null===(n=v.class)||void 0===n?void 0:n.hideEmptyMembersBox)&&(s=e.annotations.length>0?c-b:c),k||(s-=4);let h=P;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(h=-(null===(i=o.node())||void 0===i?void 0:i.getBBox().width)/2||0,M.selectAll("text").each(function(t,e,l){"middle"===window.getComputedStyle(l[e]).textAnchor&&(h=0)})),o.attr("transform","translate(".concat(h,", ").concat(s,")"))}),e.members.length>0||e.methods.length>0||N){let t=E+H+I+b,l=B.line(T.x,t,T.x+T.width,t+.001,A);M.insert(()=>l).attr("class","divider".concat("neo"!==e.look||x?"":" neo-line")).attr("style",C)}if(N||e.members.length>0||e.methods.length>0){let t=E+H+j+I+2*b+b,l=B.line(T.x,R?Math.max(V,t):t,T.x+T.width,(R?Math.max(V,t):t)+.001,A);M.insert(()=>l).attr("class","divider".concat("neo"!==e.look||x?"":" neo-line")).attr("style",C)}if("handDrawn"!==e.look&&M.selectAll("path").attr("style",C),G.select(":nth-child(2)").attr("style",C),M.selectAll(".divider").select("path").attr("style",C),e.labelStyle?M.selectAll("span").attr("style",e.labelStyle):M.selectAll("span").attr("style",C),!k){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(C);if(e){let t=e[0].replace("color","fill");M.selectAll("tspan").attr("style",t)}else if(D){let e=t.exec(D);if(e){let t=e[0].replace("color","fill");M.selectAll("tspan").attr("style",t)}}}return y(e,G),e.intersect=function(t){return Z.rect(e,t)},M}async function ea(t,e){var l,a,n,o,r,s;let u;let{labelStyles:g,nodeStyles:w}=(0,i.UG)(e);e.labelStyle=g;let p="verifyMethod"in e,v=f(e),{themeVariables:m}=(0,c.nV)(),{borderColorArray:x,requirementEdgeLabelBackground:b}=m,k=t.insert("g").attr("class",v).attr("id",null!==(n=e.domId)&&void 0!==n?n:e.id),M=u=p?await en(k,"&lt;&lt;".concat(e.type,"&gt;&gt;"),0,e.labelStyle):await en(k,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle),S=await en(k,e.name,M,e.labelStyle+"; font-weight: bold;");if(M+=S+20,p){let t=await en(k,"".concat(e.requirementId?"ID: ".concat(e.requirementId):""),M,e.labelStyle);M+=t;let l=await en(k,"".concat(e.text?"Text: ".concat(e.text):""),M,e.labelStyle);M+=l;let a=await en(k,"".concat(e.risk?"Risk: ".concat(e.risk):""),M,e.labelStyle);M+=a,await en(k,"".concat(e.verifyMethod?"Verification: ".concat(e.verifyMethod):""),M,e.labelStyle)}else{let t=await en(k,"".concat(e.type?"Type: ".concat(e.type):""),M,e.labelStyle);M+=t,await en(k,"".concat(e.docRef?"Doc Ref: ".concat(e.docRef):""),M,e.labelStyle)}let D=(null!==(o=null===(l=k.node())||void 0===l?void 0:l.getBBox().width)&&void 0!==o?o:200)+20,W=(null!==(r=null===(a=k.node())||void 0===a?void 0:a.getBBox().height)&&void 0!==r?r:200)+20,C=-D/2,N=-W/2,B=h.Z.svg(k),A=(0,i._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let _=B.rectangle(C,N,D,W,A),q=k.insert(()=>_,":first-child");if(q.attr("class","basic label-container outer-path").attr("style",w),null==x?void 0:x.length){let t=null!==(s=e.colorIndex)&&void 0!==s?s:0;k.attr("data-color-id","color-".concat(t%x.length))}if(k.selectAll(".label").each((t,e,l)=>{let a=(0,d.Ys)(l[e]),n=a.attr("transform"),i=0,o=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(i=parseFloat(t[1]),o=parseFloat(t[2]))}let r=o-W/2,c=C+10;(0===e||1===e)&&(c=i),a.attr("transform","translate(".concat(c,", ").concat(r+20,")"))}),M>u+S+20){let t;let l=N+u+S+20;if("neo"===e.look){let e=[[C,l],[C+D,l],[C+D,l+.001],[C,l+.001]];t=B.polygon(e,A)}else t=B.line(C,l,C+D,l,A);k.insert(()=>t).attr("class","divider")}return y(e,q),e.intersect=function(t){return Z.rect(e,t)},w&&"handDrawn"!==e.look&&(b||(null==x?void 0:x.length))&&k.selectAll("path").attr("style",w),k}async function en(t,e,l){var a;let n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(""===e)return 0;let s=t.insert("g").attr("class","label").attr("style",i),h=(0,c.nV)(),u=null===(a=h.htmlLabels)||void 0===a||a,g=await (0,o.rw)(s,(0,c.uX)((0,r.SH)(e)),{width:(0,r.Cq)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:u,style:i},h);if(u){let t=g.children[0],e=(0,d.Ys)(g);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}else{for(let t of g.children[0].children)i&&t.setAttribute("style",i);n=g.getBBox(),n.height+=6}return s.attr("transform","translate(".concat(-n.width/2,",").concat(-n.height/2+l,")")),n.height}(0,s.eW)(t6,"erBox"),(0,s.eW)(t7,"addText"),(0,s.eW)(t9,"lineToPolygon"),(0,s.eW)(et,"textHelper"),(0,s.eW)(ee,"addText"),(0,s.eW)(el,"classBox"),(0,s.eW)(ea,"requirementBox"),(0,s.eW)(en,"addText");var ei=(0,s.eW)(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 eo(t,e,l){var a,n,o;let r,c,s,d,{config:w}=l,{labelStyles:p,nodeStyles:v}=(0,i.UG)(e);e.labelStyle=p||"";let m=e.width;e.width=(null!==(n=e.width)&&void 0!==n?n:200)-10;let{shapeSvg:x,bbox:b,label:M}=await u(t,e,f(e)),S=e.padding||10,D="";"ticket"in e&&e.ticket&&(null==w?void 0:null===(a=w.kanban)||void 0===a?void 0:a.ticketBaseUrl)&&(D=null==w?void 0:null===(o=w.kanban)||void 0===o?void 0:o.ticketBaseUrl.replace("#TICKET#",e.ticket),r=x.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",D).attr("target","_blank"));let W={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};r?{label:c,bbox:s}=await g(r,"ticket"in e&&e.ticket||"",W):{label:c,bbox:s}=await g(x,"ticket"in e&&e.ticket||"",W);let{label:C,bbox:N}=await g(x,"assigned"in e&&e.assigned||"",W);e.width=m;let B=(null==e?void 0:e.width)||0,A=Math.max(s.height,N.height)/2,_=Math.max(b.height+20,(null==e?void 0:e.he
1ight)||0)+A,q=-B/2,R=-_/2;M.attr("transform","translate("+(S-B/2)+", "+(-A-b.height/2)+")"),c.attr("transform","translate("+(S-B/2)+", "+(-A+b.height/2)+")"),C.attr("transform","translate("+(S+B/2-N.width-20)+", "+(-A+b.height/2)+")");let{rx:P,ry:I}=e,{cssStyles:L}=e;if("handDrawn"===e.look){let t=h.Z.svg(x),l=(0,i._q)(e,{}),a=P||I?t.path(k(q,R,B,_,P||0),l):t.rectangle(q,R,B,_,l);(d=x.insert(()=>a,":first-child")).attr("class","basic label-container").attr("style",L||null)}else{(d=x.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",v).attr("rx",null!=P?P:5).attr("ry",null!=I?I:5).attr("x",q).attr("y",R).attr("width",B).attr("height",_);let t="priority"in e&&e.priority;if(t){let e=x.append("line"),l=q+2,a=R+Math.floor((null!=P?P:0)/2),n=R+_-Math.floor((null!=P?P:0)/2);e.attr("x1",l).attr("y1",a).attr("x2",l).attr("y2",n).attr("stroke-width","4").attr("stroke",ei(t))}}return y(e,d),e.height=_,e.intersect=function(t){return Z.rect(e,t)},x}async function er(t,e){let l;let{labelStyles:a,nodeStyles:n}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:o,bbox:c,halfPadding:d,label:g}=await u(t,e,f(e)),w=c.width+10*d,p=c.height+8*d,v=.15*w,{cssStyles:m}=e,x=c.width+20,b=c.height+20,k=Math.max(w,x),M=Math.max(p,b);g.attr("transform","translate(".concat(-c.width/2,", ").concat(-c.height/2,")"));let S="M0 0 \n    a".concat(v,",").concat(v," 1 0,0 ").concat(.25*k,",").concat(-1*M*.1,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(.25*k,",",0,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(.25*k,",",0,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(.25*k,",").concat(.1*M,"\n\n    a").concat(v,",").concat(v," 1 0,0 ").concat(.15*k,",").concat(.33*M,"\n    a").concat(.8*v,",").concat(.8*v," 1 0,0 0,").concat(.34*M,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.15,",").concat(.33*M,"\n\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.25,",").concat(.15*M,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.25,",0\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.25,",0\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.25,",").concat(-1*M*.15,"\n\n    a").concat(v,",").concat(v," 1 0,0 ").concat(-1*k*.1,",").concat(-1*M*.33,"\n    a").concat(.8*v,",").concat(.8*v," 1 0,0 0,").concat(-1*M*.34,"\n    a").concat(v,",").concat(v," 1 0,0 ").concat(.1*k,",").concat(-1*M*.33,"\n  H0 V0 Z");if("handDrawn"===e.look){let t=h.Z.svg(o),a=(0,i._q)(e,{}),n=t.path(S,a);(l=o.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,r.R7)(m))}else l=o.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",S);return l.attr("transform","translate(".concat(-k/2,", ").concat(-M/2,")")),y(e,l),e.calcIntersect=function(t,e){return Z.rect(t,e)},e.intersect=function(t){return s.cM.info("Bang intersect",e,t),Z.rect(e,t)},o}async function ec(t,e){let l;let{labelStyles:a,nodeStyles:n}=(0,i.UG)(e);e.labelStyle=a;let{shapeSvg:o,bbox:c,halfPadding:d,label:g}=await u(t,e,f(e)),w=c.width+2*d,p=c.height+2*d,v=.15*w,m=.25*w,x=.35*w,b=.2*w,{cssStyles:k}=e,M="M0 0 \n    a".concat(v,",").concat(v," 0 0,1 ").concat(.25*w,",").concat(-1*w*.1,"\n    a").concat(x,",").concat(x," 1 0,1 ").concat(.4*w,",").concat(-1*w*.1,"\n    a").concat(m,",").concat(m," 1 0,1 ").concat(.35*w,",").concat(.2*w,"\n\n    a").concat(v,",").concat(v," 1 0,1 ").concat(.15*w,",").concat(.35*p,"\n    a").concat(b,",").concat(b," 1 0,1 ").concat(-1*w*.15,",").concat(.65*p,"\n\n    a").concat(m,",").concat(v," 1 0,1 ").concat(-1*w*.25,",").concat(.15*w,"\n    a").concat(x,",").concat(x," 1 0,1 ").concat(-1*w*.5,",0\n    a").concat(v,",").concat(v," 1 0,1 ").concat(-1*w*.25,",").concat(-1*w*.15,"\n\n    a").concat(v,",").concat(v," 1 0,1 ").concat(-1*w*.1,",").concat(-1*p*.35,"\n    a").concat(b,",").concat(b," 1 0,1 ").concat(.1*w,",").concat(-1*p*.65,"\n  H0 V0 Z");if("handDrawn"===e.look){let t=h.Z.svg(o),a=(0,i._q)(e,{}),n=t.path(M,a);(l=o.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",(0,r.R7)(k))}else l=o.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",M);return g.attr("transform","translate(".concat(-c.width/2,", ").concat(-c.height/2,")")),l.attr("transform","translate(".concat(-w/2,", ").concat(-p/2,")")),y(e,l),e.calcIntersect=function(t,e){return Z.rect(t,e)},e.intersect=function(t){return s.cM.info("Cloud intersect",e,t),Z.rect(e,t)},o}async function es(t,e){let{labelStyles:l,nodeStyles:a}=(0,i.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:o,halfPadding:r,label:c}=await u(t,e,f(e)),s=o.width+8*r,d=o.height+2*r,h="neo"===e.look?"\n    M".concat(-s/2," ").concat(d/2-5,"\n    v").concat(-d+10,"\n    q0,-").concat(5," ").concat(5,",-").concat(5,"\n    h").concat(s-10,"\n    q").concat(5,",0 ").concat(5,",").concat(5,"\n    v").concat(d-5,"\n    H").concat(-s/2,"\n    Z\n  "):"\n    M".concat(-s/2," ").concat(d/2-5,"\n    v").concat(-d+10,"\n    q0,-").concat(5," ").concat(5,",-").concat(5,"\n    h").concat(s-10,"\n    q").concat(5,",0 ").concat(5,",").concat(5,"\n    v").concat(d-10,"\n    q0,").
1concat(5," ").concat(-5,",").concat(5,"\n    h").concat(-(s-10),"\n    q").concat(-5,",0 ").concat(-5,",").concat(-5,"\n    Z\n  ");if(!e.domId)throw Error('defaultMindmapNode: node "'.concat(e.id,'" is missing a domId — was render.ts domId prefixing skipped?'));let g=n.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",a).attr("d",h);return n.append("line").attr("class","node-line-").attr("x1",-s/2).attr("y1",d/2).attr("x2",s/2).attr("y2",d/2),c.attr("transform","translate(".concat(-o.width/2,", ").concat(-o.height/2,")")),n.append(()=>c.node()),y(e,g),e.calcIntersect=function(t,e){return Z.rect(t,e)},e.intersect=function(t){return Z.rect(e,t)},n}async function ed(t,e){var l;let a={padding:null!==(l=e.padding)&&void 0!==l?l:0};return X(t,e,a)}(0,s.eW)(eo,"kanbanItem"),(0,s.eW)(er,"bang"),(0,s.eW)(ec,"cloud"),(0,s.eW)(es,"defaultMindmapNode"),(0,s.eW)(ed,"mindmapCircle");var eh=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tT},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tZ},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tE},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tX},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tn},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:X},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:er},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ec}
1,{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tu},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tM},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tk},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:t$},{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:to},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tF}
1,{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:j},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tU},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tV},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tj},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:z},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:K},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:$},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tS}
1,{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t1},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:td},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tQ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tN},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ti},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:t2},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t4},{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:t0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tc},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tG},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:t_},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tA},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:E},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:O},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tO},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tY},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t5},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tI},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tB}],eu=(0,s.eW)(()=>Object.fromEntries([...Object.entries({state:tH,choice:V,note:tq,rectWithTitle:tL,labelRect:tb,iconSquare:tp,iconCircle:tf,icon:ty,iconRounded:tw,imageSquare:tv,anchor:U,kanbanItem:eo,mindmapCircle:ed,defaultMindmapNode:es,classBox:el,erBox:t6,requirementBox:ea}),...eh.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eg(t){return t in eu}(0,s.eW)(eg,"isValidShape");var ey=new Map;async function ef(t,e,l){let a,n;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?eu[e.shape]:void 0;if(!i)throw Error("No such shape: ".concat(e.shape,". Please check your syntax."));if(e.link){let o;"sandbox"===l.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",null!=o?o:null),n=await i(a,e,l)}else a=n=await i(t,e,l);return a.attr("data-look",(0,r.R7)(e.look)),e.tooltip&&n.attr("title",e.tooltip),ey.set(e.id,a),e.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}
1(0,s.eW)(ef,"insertNode");var ew=(0,s.eW)((t,e)=>{ey.set(e.id,t)},"setNodeElem"),ep=(0,s.eW)(()=>{ey.clear()},"clear"),ev=(0,s.eW)(t=>{let e=ey.get(t.id);s.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let l=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+l-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),l},"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.