mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-26 11:38:15 +08:00
62 lines
96 KiB
JavaScript
62 lines
96 KiB
JavaScript
import{t as e}from"./chunk-VELTKBKT-MF1JIm2u.js";import{V as t,q as n}from"./chunk-MGPAVIPZ-BiIvV5Xa.js";import{E as r,V as i,Y as a,a as o,et as s,k as c,o as l,p as u}from"./chunk-5YUVU3PZ-BK7KuoPj.js";import{f as d,l as f,o as p}from"./chunk-2HR5LOFI-BF6gey_n.js";import{n as m,o as h}from"./chunk-BWNR3NKH-DWeyBdhh.js";import{n as g,t as _}from"./chunk-SRFB55UJ-Cq5faoiH.js";import{a as v,i as y,r as b,t as x}from"./chunk-73ENG63I-BRlQ-GyX.js";import{t as S}from"./chunk-IWDTEBJL-CERtcYnn.js";var C=e(async(e,n,r)=>{let i,o=n.useHtmlLabels||l(a()?.htmlLabels);i=r||`node default`;let c=e.insert(`g`).attr(`class`,i).attr(`id`,n.domId||n.id),u=c.insert(`g`).attr(`class`,`label`).attr(`style`,f(n.labelStyle)),p;p=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let h=!!n.icon||!!n.img,g=n.labelType===`markdown`,v=await m(u,s(d(p),a()),{useHtmlLabels:o,width:n.width||a().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:h,markdown:g},a()),y=v.getBBox(),b=(n?.padding??0)/2;if(o){let e=v.children[0],n=t(v);await _(e,p),y=e.getBoundingClientRect(),n.attr(`width`,y.width),n.attr(`height`,y.height)}return o?u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):u.attr(`transform`,`translate(0, `+-y.height/2+`)`),n.centerLabel&&u.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),u.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:y,halfPadding:b,label:u}},`labelHelper`),w=e(async(e,n,r)=>{let o=r.useHtmlLabels??i(a()),c=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),l=await m(c,s(d(n),a()),{useHtmlLabels:o,width:r.width||a()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),u=l.getBBox(),f=r.padding/2;if(i(a())){let e=l.children[0],n=t(l);u=e.getBoundingClientRect(),n.attr(`width`,u.width),n.attr(`height`,u.height)}return o?c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`):c.attr(`transform`,`translate(0, `+-u.height/2+`)`),r.centerLabel&&c.attr(`transform`,`translate(`+-u.width/2+`, `+-u.height/2+`)`),c.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:u,halfPadding:f,label:c}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(k,`generateCirclePoints`);function A(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,o=!1)=>{let s=t||``;typeof s==`object`&&(s=s[0]);let c=a(),l=i(c);return await m(e,s,{style:n,isTitle:r,useHtmlLabels:l,markdown:!1,isNode:o,width:1/0},c)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,r)=>{n.info(`Creating subgraph rect for `,r.id,r);let o=a(),{themeVariables:s,handDrawnSeed:c}=o,{clusterBkg:l,clusterBorder:u}=s,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:h}=b(r),_=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=i(o),y=_.insert(`g`).attr(`class`,`cluster-label `),C;C=r.labelType===`markdown`?await m(y,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}):await M(y,r.label,r.labelStyle||``,!1,!0);let w=C.getBBox();if(i(o)){let e=C.children[0],n=t(C);w=e.getBoundingClientRect(),n.attr(`width`,w.width),n.attr(`height`,w.height)}let T=r.width<=w.width+r.padding?w.width+r.padding:r.width;r.width<=w.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;n.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=S.svg(_),t=x(r,{roughness:.7,fill:l,stroke:u,fillWeight:3,seed:c}),i=e.path(N(D,O,T,E,0),t);k=_.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(o);if(y.attr(`transform`,`translate(${r.x-w.width/2}, ${r.y-r.height/2+A})`),d){let e=y.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return r.offsetX=0,r.width=P.width,r.height=P.height,r.offsetY=w.height-r.padding/2,r.intersect=function(e){return j(r,e)},{cluster:_,labelBBox:w}},`rect`),F=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),I=e(async(e,n)=>{let r=a(),{themeVariables:o,handDrawnSeed:s}=r,{altBackground:c,compositeBackground:l,compositeTitleBackground:u,nodeBorder:d}=o,f=e.insert(`g`).attr(`class`,n.cssClasses).attr(`id`,n.domId).attr(`data-id`,n.id).attr(`data-look`,n.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,n.label,n.labelStyle,void 0,!0),_=g.getBBox();if(i(r)){let e=g.children[0],n=t(g);_=e.getBoundingClientRect(),n.attr(`width`,_.width),n.attr(`height`,_.height)}let v=0*n.padding,y=v/2,b=(n.width<=_.width+n.padding?_.width+n.padding:n.width)+v;n.width<=_.width+n.padding?n.diff=(b-n.width)/2-n.padding:n.diff=-n.padding;let x=n.height+v,C=n.height+v-_.height-6,w=n.x-b/2,T=n.y-x/2;n.width=b;let E=n.y-n.height/2-y+_.height+2,D;if(n.look===`handDrawn`){let e=n.cssClasses.includes(`statediagram-cluster-alt`),t=S.svg(f),r=n.rx||n.ry?t.path(N(w,T,b,x,10),{roughness:.7,fill:u,fillStyle:`solid`,stroke:d,seed:s}):t.rectangle(w,T,b,x,{seed:s});D=f.insert(()=>r,`:first-child`);let i=t.rectangle(w,E,b,C,{fill:e?c:l,fillStyle:e?`hachure`:`solid`,stroke:d,seed:s});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,n.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${n.x-_.width/2}, ${T+1-(i(r)?0:3)})`),n.height=D.node().getBBox().height,n.offsetX=0,n.offsetY=_.height-n.padding/2,n.labelBBox=_,n.intersect=function(e){return j(n,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),ee=e(async(e,r)=>{n.info(`Creating subgraph rect for `,r.id,r);let o=a(),{themeVariables:s,handDrawnSeed:c}=o,{clusterBkg:l,clusterBorder:u}=s,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:h}=b(r),_=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),v=i(o),y=_.insert(`g`).attr(`class`,`cluster-label `),C=await m(y,r.label,{style:r.labelStyle,useHtmlLabels:v,isNode:!0,width:r.width}),w=C.getBBox();if(i(o)){let e=C.children[0],n=t(C);w=e.getBoundingClientRect(),n.attr(`width`,w.width),n.attr(`height`,w.height)}let T=r.width<=w.width+r.padding?w.width+r.padding:r.width;r.width<=w.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;n.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=S.svg(_),t=x(r,{roughness:.7,fill:l,stroke:u,fillWeight:4,seed:c}),i=e.path(N(D,O,T,E,r.rx),t);k=_.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,h.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(o);if(y.attr(`transform`,`translate(${r.x-w.width/2}, ${r.y-r.height/2+A})`),d){let e=y.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return r.offsetX=0,r.width=M.width,r.height=M.height,r.offsetY=w.height-r.padding/2,r.intersect=function(e){return j(r,e)},{cluster:_,labelBBox:w}},`kanbanSection`),te={rect:P,squareRect:P,roundedWithTitle:I,noteGroup:F,divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i}=n,o=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),s=o.insert(`g`,`:first-child`),c=0*t.padding,l=t.width+c;t.diff=-t.padding;let u=t.height+c,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=S.svg(o).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=o.insert(()=>e,`:first-child`)}else{p=s.insert(`rect`,`:first-child`);let e=`outer`;t.look,e=`divider`,p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:o,labelBBox:{}}},`divider`),kanbanSection:ee},L=new Map,R=e(async(e,t)=>{let n=await te[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),ne=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var re=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}e(B,`intersectEllipse`);var V=B;function ie(e,t,n){return V(e,t,t,n)}e(ie,`intersectCircle`);var ae=ie;function H(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&U(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&U(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(H,`intersectLine`);function U(e,t){return e*t>0}e(U,`sameSign`);var W=H;function oe(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=W(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}e(oe,`intersectPolygon`);var G={node:re,circle:ae,ellipse:V,polygon:oe,rect:j};function se(e,t){let{labelStyles:r}=b(t);t.labelStyle=r;let i=E(t),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),{cssStyles:s}=t,c=S.svg(o),l=x(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,f(s)),T(t,d),t.intersect=function(e){return n.info(`Circle intersect`,t,1,e),G.circle(t,1,e)},o}e(se,`anchor`);function ce(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ce,`generateArcPoints`);function le(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(le,`calculateArcSagitta`);async function ue(t,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=le(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ce(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ce(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=x(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(y),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,y,e)},u}e(ue,`bowTieRect`);function K(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(K,`insertPolygonShape`);var de=12;async function fe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+de),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+de,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+de},{x:0+de,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=K(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(fe,`card`);function pe(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=x(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(pe,`choice`);async function me(e,t,r){let{labelStyles:i,nodeStyles:a}=b(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,t,E(t)),l=r?.padding??c,u=t.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(o),n=x(t,{}),r=e.circle(0,0,u*2,n);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,f(p))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},t.intersect=function(e){return n.info(`Circle intersect`,t,u,e),G.circle(t,u,e)},o}e(me,`circle`);function he(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
M ${i.x},${i.y} L ${o.x},${o.y}`}e(he,`createLine`);function ge(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.label=``;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=S.svg(a),l=x(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=he(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(t,p),t.intersect=function(e){return n.info(`crossedCircle intersect`,t,{radius:o,point:e}),G.circle(t,o,e)},a}e(ge,`crossedCircle`);function q(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(q,`generateCirclePoints`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...q(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...q(l/2+d*2,-d,d,20,-180,-270),...q(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...q(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...q(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...q(l/2+l*.1,-d,d,20,-180,-270),...q(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...q(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=S.svg(i),g=x(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),v=h.path(_,g),y=D(m),w=h.path(y,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>v,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(_e,`curlyBraceLeft`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}e(J,`generateCirclePoints`);async function ve(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=S.svg(i),g=x(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p).replace(`Z`,``),v=h.path(_,g),y=D(m),w=h.path(y,{...g}),O=i.insert(`g`,`:first-child`);return O.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>v,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(ve,`curlyBraceRight`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(Y,`generateCirclePoints`);async function ye(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Y(l/2,u/2,d,20,0,90)],m=[...Y(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Y(-l/2-d/2,-d,d,20,0,90),...Y(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Y(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...Y(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Y(-l/2-d/2,-d,d,20,0,90),...Y(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Y(-l/2+d+d/2,u/2,d,30,-180,-270)],g=S.svg(i),_=x(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=D(p).replace(`Z`,``),y=g.path(v,_),w=D(m).replace(`Z`,``),O=g.path(w,_),k=D(h),A=g.path(k,{..._}),j=i.insert(`g`,`:first-child`);return j.insert(()=>A,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>y,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,h,e)},i}e(ye,`curlyBraces`);async function be(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=S.svg(s),m=x(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...k(-_,-g/2,d,50,270,90)],w=D(y),O=p.path(w,m),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,y,e)},s}e(be,`curvedTrapezoid`);var xe=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Se=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Ce=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),we=8,Te=8;async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Te&&(t.width=Te);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<we&&(t.height=we)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t.width?t.width:c.width)+o,d=u/2,p=d/(2.5+u/50),m=(t.height?t.height:c.height)+a+p,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=Se(0,0,u,m,d,p),r=Ce(0,p,u,m,d,p),i=x(t,{}),a=e.path(n,i),o=e.path(r,x(t,{fill:`none`}));h=s.insert(()=>o,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=xe(0,0,u,m,d,p);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,f(g)).attr(`style`,r)}return h.attr(`label-offset-y`,p),h.attr(`transform`,`translate(${-u/2}, ${-(m/2+p)})`),T(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Ee,`cylinder`);async function De(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=S.svg(o),g=x(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,y),t.intersect=function(e){return G.rect(t,e)},o}e(De,`dividedRectangle`);async function Oe(e,t){let{labelStyles:r,nodeStyles:i}=b(t),a=t.look===`neo`?12:5;t.labelStyle=r;let o=t.padding??0,s=t.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.width?t?.width/2:l.width/2)+(s??0),d=u-a,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=x(t,{roughness:.2,strokeWidth:2.5}),r=x(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);p=c.insert(`g`,`:first-child`),p.attr(`class`,f(t.cssClasses)).attr(`style`,f(m)),p.node()?.appendChild(i),p.node()?.appendChild(a)}else{p=c.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return T(t,p),t.intersect=function(e){return n.info(`DoubleCircle intersect`,t,u,e),G.circle(t,u,e)},c}e(Oe,`doublecircle`);function ke(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(t);t.label=``,t.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=S.svg(o),{nodeBorder:l}=r,u=x(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),T(t,f),t.intersect=function(e){return n.info(`filledCircle intersect`,t,{radius:7,point:e}),G.circle(t,7,e)},o}e(ke,`filledCircle`);var Ae=10,je=10;async function Me(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.height<Ae&&(t.height=Ae),t.width=(t?.width??0)-o-o/2,t.width<je&&(t.width=je));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(o??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=S.svg(s),g=x(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=D(p),v=h.path(_,g),y=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,i),t.width=u,t.height=d,T(t,y),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return n.info(`Triangle intersect`,t,p,e),G.polygon(t,p,e)},s}e(Me,`flippedTriangle`);function Ne(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=S.svg(o),p=x(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return G.rect(t,e)},o}e(Ne,`forkJoin`);async function Pe(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:Math.max(15,c.width))+a*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=t,p=S.svg(s),m=x(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...k(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=D(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,i),T(t,v),t.intersect=function(e){return n.info(`Pill intersect`,t,{radius:d,point:e}),G.polygon(t,h,e)},s}e(Pe,`halfRoundedRectangle`);var Fe=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=x(t,{}),r=Fe(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=K(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},c}e(Ie,`hexagon`);async function Le(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.label=``,t.labelStyle=r;let{shapeSvg:a}=await C(e,t,E(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=S.svg(a),u=x(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=D(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(t,m),t.intersect=function(e){return n.info(`Pill intersect`,t,{points:d}),G.polygon(t,d,e)},a}e(Le,`hourglass`);async function Re(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,t,`icon-shape default`),p=t.pos===`t`,m=c,g=c,{nodeBorder:_}=r,{stylesMap:v}=y(t),w=-g/2,E=-m/2,D=t.label?8:0,O=S.svg(u),k=x(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,g,m,k),j=Math.max(g,d.width),M=m+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+D/2:-d.height/2-D/2})`),T(t,F),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-g/2,y:i-a/2+m}],G.polygon(t,o,e)},u}e(Re,`icon`);async function ze(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:v}=y(t),w=S.svg(u),E=x(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=v.get(`fill`)??_;let D=u.append(`g`);t.icon&&D.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,d.width),I=N+d.height+p,ee=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),te=u.insert(()=>P,`:first-child`),L=u.insert(()=>ee);return D.attr(`transform`,`translate(${-k/2-j},${m?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${v.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),te.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),T(t,L),t.intersect=function(e){return n.info(`iconSquare intersect`,t,e),G.rect(t,e)},u}e(ze,`iconCircle`);async function Be(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:w}=r,{stylesMap:E}=y(t),D=-_/2,O=-g/2,k=t.label?8:0,A=S.svg(u),j=x(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,5),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),te=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),T(t,te),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(t,o,e)},u}e(Be,`iconRounded`);async function Ve(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,t,`icon-shape default`),m=t.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:w}=r,{stylesMap:E}=y(t),D=-_/2,O=-g/2,k=t.label?8:0,A=S.svg(u),j=x(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,.1),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>M,`:first-child`),te=u.insert(()=>I);if(t.icon){let e=u.append(`g`);e.html(`<g>${await h(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+k/2:-d.height/2-k/2})`),T(t,te),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(t,o,e)},u}e(Ve,`iconSquare`);async function He(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=b(t);t.labelStyle=s;let c=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await C(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,y=S.svg(f),w=x(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=y.rectangle(g,_,u,d,w),D=Math.max(u,p.width),O=d+p.height+v,k=y.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=f.insert(()=>E,`:first-child`),j=f.insert(()=>k);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),T(t,j),t.intersect=function(e){if(n.info(`iconSquare intersect`,t,e),!t.label)return G.rect(t,e);let r=t.x??0,i=t.y??0,a=t.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],G.polygon(t,o,e)},f}e(He,`imageSquare`);async function Ue(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=K(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ue,`inv_trapezoid`);async function We(e,t,n){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=S.svg(a),n=x(t,{}),r=p||m?e.path(N(l,u,s,c,p||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,f(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,f(p)).attr(`ry`,f(m)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}e(We,`drawRect`);async function Ge(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}e(Ge,`labelRect`);async function Ke(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=K(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ke,`lean_left`);async function qe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=K(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(qe,`lean_right`);function Je(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=S.svg(a),d=x(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),T(t,m),t.intersect=function(e){return n.info(`lightningBolt intersect`,t,e),G.polygon(t,l,e)},a}e(Je,`lightningBolt`);var Ye=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Xe=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ze=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Qe=10,$e=10;async function et(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<$e&&(t.width=$e);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<Qe&&(t.height=Qe)}let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,p=d/(2.5+u/50),m=(t?.height?t?.height:c.height)+p+o*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=Xe(0,0,u,m,d,p,h),r=Ze(0,p,u,m,d,p),i=x(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Ye(0,0,u,m,d,p,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,f(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-u/2}, ${-(m/2+p)})`),T(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+p-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(et,`linedCylinder`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=S.svg(s),g=x(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...O(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),T(t,y),t.intersect=function(e){return G.polygon(t,_,e)},s}e(tt,`linedWaveEdgedRect`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=S.svg(c),y=x(t,{}),w=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],O=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let k=D(w),j=v.path(k,y),M=D(O),N=v.path(M,y);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}e(nt,`multiRect`);async function rt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=O(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],w=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],k=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],A=S.svg(i),j=x(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}e(rt,`multiWaveEdgedRectangle`);async function it(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=b(t);t.labelStyle=r,t.useHtmlLabels||i(u())||(t.centerLabel=!0);let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=Math.max(s.width+(t.padding??0)*2,t?.width??0),d=Math.max(s.height+(t.padding??0)*2,t?.height??0),f=-l/2,p=-d/2,{cssStyles:m}=t,h=S.svg(o),g=x(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,l,d,g),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),c.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),a&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,a),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,v),t.intersect=function(e){return G.rect(t,e)},o}e(it,`note`);var at=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function ot(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=x(t,{}),r=at(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=K(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(ot,`question`);async function st(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=S.svg(s),v=x(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=D(h),w=_.path(y,v),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,h,e)},s}e(st,`rect_left_inv_arrow`);async function ct(e,r){let{labelStyles:o,nodeStyles:s}=b(r);r.labelStyle=o;let c;c=r.cssClasses?`node `+r.cssClasses:`node default`;let l=e.insert(`g`).attr(`class`,c).attr(`id`,r.domId||r.id),u=l.insert(`g`),d=l.insert(`g`).attr(`class`,`label`).attr(`style`,s),f=r.description,p=r.label,m=await M(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(i(a())){let e=m.children[0],n=t(m);h=e.getBoundingClientRect(),n.attr(`width`,h.width),n.attr(`height`,h.height)}n.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await M(d,Array.isArray(g)?g.join(`<br/>`):g,r.labelStyle,!0,!0),y=v.children[0],C=t(v);h=y.getBoundingClientRect(),C.attr(`width`,h.width),C.attr(`height`,h.height);let w=(r.padding||0)/2;t(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),t(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let E=h.width+(r.padding||0),D=h.height+(r.padding||0),O=-h.width/2-w,k=-h.height/2-w,A,j;if(r.look===`handDrawn`){let e=S.svg(l),t=x(r,{}),i=e.path(N(O,k,E,D,r.rx||0),t),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,t);j=l.insert(()=>(n.debug(`Rough node insert CXC`,i),a),`:first-child`),A=l.insert(()=>(n.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=u.insert(`rect`,`:first-child`),j=u.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,s).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return T(r,A),r.intersect=function(e){return G.rect(r,e)},l}e(ct,`rectWithTitle`);async function lt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return We(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(lt,`roundedRect`);var X=8;async function ut(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?X:X*2),u=(t?.height??s.height)+a*2,d=l-X,p=u,m=X-l/2,h=-u/2,{cssStyles:g}=t,_=S.svg(o),v=x(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m+d,y:h},{x:m+d,y:h+p},{x:m-X,y:h+p},{x:m-X,y:h},{x:m,y:h},{x:m,y:h+p}],w=_.polygon(y.map(e=>[e.x,e.y]),v),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,f(g)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${X/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}e(ut,`shadedProcess`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),v=x(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],w=D(y),O=_.path(w,v),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,y,e)},s}e(dt,`slopedRect`);async function ft(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return We(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(ft,`squareRect`);async function pt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=S.svg(s),m=x(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...k(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...k(u/2-d,0,d,50,270,450)],g=D(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),T(t,v),t.intersect=function(e){return G.polygon(t,h,e)},s}e(pt,`stadium`);async function mt(e,t){return We(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(mt,`state`);function ht(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=S.svg(u),f=x(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return T(t,_),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}e(ht,`stateEnd`);function gt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=S.svg(a).circle(0,0,t.width,v(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}e(gt,`stateStart`);var Z=8;async function _t(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*Z+a,u=(t?.height??c.height)+o,d=l-2*Z,p=u,m=-l/2,h=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=e.rectangle(m,h,d+16,p,n),i=e.line(m+Z,h,m+Z,h+p,n),a=e.line(m+Z+d,h,m+Z+d,h+p,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,f(c)),T(t,o)}else{let e=K(s,d,p,g);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,g,e)},s}e(_t,`subroutine`);var vt=.2;async function yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-vt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=vt*l,d=vt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),v=x(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],w=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let O=D(y),k=_.path(O,v),A=D(w),j=_.path(A,{...v,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,y,e)},s}e(yt,`taggedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=S.svg(i),h=x(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...O(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...O(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],w=D(g),k=m.path(w,h),A=D(y),j=m.path(A,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,g,e)},i}e(bt,`taggedWaveEdgedRectangle`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}e(xt,`text`);var St=e((e,t,n,r,i,a)=>`M${e},${t}
|
|
a${i},${a} 0,0,1 0,${-r}
|
|
l${n},0
|
|
a${i},${a} 0,0,1 0,${r}
|
|
M${n},${-r}
|
|
a${i},${a} 0,0,0 0,${r}
|
|
l${-n},0`,`createCylinderPathD`),Ct=e((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),wt=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),Tt=5,Et=10;async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.height<Tt&&(t.height=Tt);let n=e/2/(2.5+e/50);t.width=(t.width??0)-a-n*3,t.width<Et&&(t.width=Et)}let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t.height?t.height:s.height)+a,u=l/2,d=u/(2.5+l/50),p=(t.width?t.width:s.width)+d+a,{cssStyles:m}=t,h;if(t.look===`handDrawn`){let e=S.svg(o),n=Ct(0,0,p,l,d,u),r=wt(0,0,p,l,d,u),i=e.path(n,x(t,{})),a=e.path(r,x(t,{fill:`none`}));h=o.insert(()=>a,`:first-child`),h=o.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=St(0,0,p,l,d,u);h=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,f(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,d),h.attr(`transform`,`translate(${-p/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,h),t.intersect=function(e){let n=G.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-d)){let i=d*d*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=d-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}e(Dt,`tiltedCylinder`);async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=x(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=K(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ot,`trapezoid`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=S.svg(s),p=x(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=D(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,m,e)},s}e(kt,`trapezoidalPentagon`);var At=10,jt=10;async function Mt(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let o=t.padding??0,s=t.look===`neo`?o*2:o;(t.width||t.height)&&(t.width=((t?.width??0)-s)/2,t.width<jt&&(t.width=jt),t.height=t?.height??0,t.height<At&&(t.height=At));let{shapeSvg:c,bbox:u,label:d}=await C(e,t,E(t)),f=l(a().flowchart?.htmlLabels),p=(t?.width?t?.width:u.width)+s,m=t?.height?t?.height:p+u.height,h=m,g=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-m}],{cssStyles:_}=t,v=S.svg(c),y=x(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let w=D(g),O=v.path(w,y),k=c.insert(()=>O,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,_),i&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,i),t.width=p,t.height=m,T(t,k),d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))}, ${m/2-(u.height+(t.padding??0)/(f?2:1)-(u.y-(u.top??0)))})`),t.intersect=function(e){return n.info(`Triangle intersect`,t,g,e),G.polygon(t,g,e)},c}e(Mt,`triangle`);async function Nt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=S.svg(c),y=x(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let w=[{x:-d/2-_,y:m/2},...O(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],k=D(w),A=v.path(k,y),j=c.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,w,e)},c}e(Nt,`waveEdgedRectangle`);async function Pt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=S.svg(s),h=x(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...O(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...O(l/2,-f/2,-l/2,-f/2,d,-1)],_=D(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),T(t,y),t.intersect=function(e){return G.polygon(t,g,e)},s}e(Pt,`waveRectangle`);var Q=10;async function Ft(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-Q,10),t.height=Math.max((t?.height??0)-a*2-Q,10));let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width?t?.width:s.width)+i*2+Q,u=(t?.height?t?.height:s.height)+a*2+Q,d=l-Q,f=u-Q,p=-d/2,m=-f/2,{cssStyles:h}=t,g=S.svg(o),_=x(t,{}),v=[{x:p-Q,y:m-Q},{x:p-Q,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-Q}],y=`M${p-Q},${m-Q} L${p+d},${m-Q} L${p+d},${m+f} L${p-Q},${m+f} L${p-Q},${m-Q}
|
|
M${p-Q},${m} L${p+d},${m}
|
|
M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let w=g.path(y,_),D=o.insert(()=>w,`:first-child`);return D.attr(`transform`,`translate(${Q/2}, ${Q/2})`),D.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.polygon(t,v,e)},o}e(Ft,`windowPane`);var It=new Set([`redux-color`,`redux-dark-color`]),Lt=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Rt(e,n){let r=n;r.alias&&(n.label=r.alias);let{theme:i,themeVariables:a}=u(),{rowEven:o,rowOdd:s,nodeBorder:c,borderColorArray:d}=a;if(n.look===`handDrawn`){let{themeVariables:t}=u(),{background:r}=t;await Rt(e,{...n,id:n.id+`-background`,domId:(n.domId||n.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let f=u();n.useHtmlLabels=f.htmlLabels;let m=f.er?.diagramPadding??10,h=f.er?.entityPadding??6,{cssStyles:g}=n,{labelStyles:_,nodeStyles:v}=b(n);if(r.attributes.length===0&&n.label){let t={rx:0,ry:0,labelPaddingX:m,labelPaddingY:m*1.5,classes:``};p(n.label,f)+t.labelPaddingX*2<f.er.minEntityWidth&&(n.width=f.er.minEntityWidth);let a=await We(e,n,t);if(i!=null&&It.has(i)){let e=r.colorIndex??0;a.attr(`data-color-id`,`color-${e%d.length}`)}if(!l(f.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}f.htmlLabels||(m*=1.25,h*=1.25);let y=E(n);y||=`node default`;let C=e.insert(`g`).attr(`class`,y).attr(`id`,n.domId||n.id),w=await zt(C,n.label??``,f,0,0,[`name`],_);w.height+=h;let D=0,O=[],k=[],A=0,j=0,M=0,N=0,P=!0,F=!0;for(let e of r.attributes){let t=await zt(C,e.type,f,0,D,[`attribute-type`],_);A=Math.max(A,t.width+m);let n=await zt(C,e.name,f,0,D,[`attribute-name`],_);j=Math.max(j,n.width+m);let r=await zt(C,e.keys.join(),f,0,D,[`attribute-keys`],_);M=Math.max(M,r.width+m);let i=await zt(C,e.comment,f,0,D,[`attribute-comment`],_);N=Math.max(N,i.width+m);let a=Math.max(t.height,n.height,r.height,i.height)+h;k.push({yOffset:D,rowHeight:a}),D+=a}let I=4;M<=m&&(P=!1,M=0,I--),N<=m&&(F=!1,N=0,I--);let ee=C.node().getBBox();if(w.width+m*2-(A+j+M+N)>0){let e=w.width+m*2-(A+j+M+N);A+=e/I,j+=e/I,M>0&&(M+=e/I),N>0&&(N+=e/I)}let te=A+j+M+N,L=S.svg(C),R=x(n,{});n.look!==`handDrawn`&&(R.roughness=0,R.fillStyle=`solid`);let ne=0;k.length>0&&(ne=k.reduce((e,t)=>e+(t?.rowHeight??0),0));let z=Math.max(ee.width+m*2,n?.width||0,te),re=Math.max((ne??0)+w.height,n?.height||0),B=-z/2,V=-re/2;if(C.selectAll(`g:not(:first-child)`).each((e,n,r)=>{let i=t(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=A:i.attr(`class`).includes(`attribute-keys`)?o+=A+j:i.attr(`class`).includes(`attribute-comment`)&&(o+=A+j+M))}i.attr(`transform`,`translate(${B+m/2+o}, ${s+V+w.height+h/2})`)}),C.select(`.name`).attr(`transform`,`translate(`+-w.width/2+`, `+(V+h/2)+`)`),i!=null&&It.has(i)){let e=r.colorIndex??0;C.attr(`data-color-id`,`color-${e%d.length}`)}let ie=L.rectangle(B,V,z,re,R),ae=C.insert(()=>ie,`:first-child`).attr(`class`,`outer-path`).attr(`style`,g.join(``));O.push(0);for(let[e,t]of k.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=L.rectangle(B,w.height+V+t?.yOffset,z,t?.rowHeight,{...R,fill:n?o:s,stroke:c});C.insert(()=>r,`g.label`).attr(`style`,g.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let H=1e-4,U=Bt(B,w.height+V,z+B,w.height+V,H),W=L.polygon(U.map(e=>[e.x,e.y]),R);if(C.insert(()=>W).attr(`class`,`divider`),U=Bt(A+B,w.height+V,A+B,re+V,H),W=L.polygon(U.map(e=>[e.x,e.y]),R),C.insert(()=>W).attr(`class`,`divider`),P){let e=A+j+B;U=Bt(e,w.height+V,e,re+V,H),W=L.polygon(U.map(e=>[e.x,e.y]),R),C.insert(()=>W).attr(`class`,`divider`)}if(F){let e=A+j+M+B;U=Bt(e,w.height+V,e,re+V,H),W=L.polygon(U.map(e=>[e.x,e.y]),R),C.insert(()=>W).attr(`class`,`divider`)}for(let e of O){let t=w.height+V+e;U=Bt(B,t,z+B,t,H),W=L.polygon(U.map(e=>[e.x,e.y]),R),C.insert(()=>W).attr(`class`,`divider`)}if(T(n,ae),v&&n.look!==`handDrawn`)if(i!=null&&Lt.has(i))C.selectAll(`path`).attr(`style`,v);else{let e=v.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);C.selectAll(`path`).attr(`style`,e??``),C.selectAll(`.row-rect-even path`).attr(`style`,v)}return n.intersect=function(e){return G.rect(n,e)},C}e(Rt,`erBox`);async function zt(e,n,i,a=0,o=0,s=[],c=``){let u=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${a}, ${o})`).attr(`style`,c);n!==r(n)&&(n=r(n),n=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=u.node().appendChild(await m(u,n,{width:p(n,i)+100,style:c,useHtmlLabels:i.htmlLabels},i));if(n.includes(`<`)||n.includes(`>`)){let e=d.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let f=d.getBBox();if(l(i.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let n=t(d);f=e.getBoundingClientRect(),n.attr(`width`,f.width),n.attr(`height`,f.height)}return f}e(zt,`addText`);function Bt(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}e(Bt,`lineToPolygon`);async function Vt(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Ht(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Ht(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Ht(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Ht(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}e(Vt,`textHelper`);async function Ht(n,r,i,a=[]){let s=n.insert(`g`).attr(`class`,`label`).attr(`style`,a.join(`; `)),f=u(),h=`useHtmlLabels`in r?r.useHtmlLabels:l(f.htmlLabels)??!0,g=``;g=`text`in r?r.text:r.label,!h&&g.startsWith(`\\`)&&(g=g.substring(1)),o(g)&&(h=!0);let _=await m(s,c(d(g)),{width:p(g,f)+50,classes:`markdown-node-label`,useHtmlLabels:h},f),v,y=1;if(h){let n=_.children[0],r=t(_);y=n.innerHTML.split(`<br>`).length,n.innerHTML.includes(`</math>`)&&(y+=n.innerHTML.split(`<mrow>`).length-1);let i=n.getElementsByTagName(`img`);if(i){let t=g.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...i].map(n=>new Promise(r=>{function i(){if(n.style.display=`flex`,n.style.flexDirection=`column`,t){let e=f.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=parseInt(e,10)*5+`px`;n.style.minWidth=t,n.style.maxWidth=t}else n.style.width=`100%`;r(n)}e(i,`setupImage`),setTimeout(()=>{n.complete&&i()}),n.addEventListener(`error`,i),n.addEventListener(`load`,i)})))}v=n.getBoundingClientRect(),r.attr(`width`,v.width),r.attr(`height`,v.height)}else{a.includes(`font-weight: bolder`)&&t(_).selectAll(`tspan`).attr(`font-weight`,``),y=_.children.length;let e=_.children[0];(_.textContent===``||_.textContent.includes(`>`))&&(e.textContent=g[0]+g.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),g[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),v=_.getBBox()}return s.attr(`transform`,`translate(0,`+(-v.height/(2*y)+i)+`)`),v.height}e(Ht,`addText`);async function Ut(e,n){let r=a(),{themeVariables:i}=r,{useGradient:o}=i,s=r.class.padding??12,c=s,u=n.useHtmlLabels??l(r.htmlLabels)??!0,d=n;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];let{shapeSvg:f,bbox:p}=await Vt(e,n,r,u,c),{labelStyles:m,nodeStyles:h}=b(n);n.labelStyle=m,n.cssStyles=d.styles||``;let g=d.styles?.join(`;`)||h||``;n.cssStyles||=g.replaceAll(`!important`,``).split(`;`);let _=d.members.length===0&&d.methods.length===0&&!r.class?.hideEmptyMembersBox,v=S.svg(f),y=x(n,{});n.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let C=Math.max(n.width??0,p.width),w=Math.max(n.height??0,p.height),E=(n.height??0)>p.height;d.members.length===0&&d.methods.length===0?w+=c:d.members.length>0&&d.methods.length===0&&(w+=c*2);let D=-C/2,O=-w/2,k=_?s*2:d.members.length===0&&d.methods.length===0?-s:0;E&&(k=s*2);let A=v.rectangle(D-s,O-s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0),C+2*s,w+2*s+k,y),j=f.insert(()=>A,`:first-child`);j.attr(`class`,`basic label-container outer-path`);let M=j.node().getBBox(),N=f.select(`.annotation-group`).node().getBBox().height-(_?s/2:0)||0,P=f.select(`.label-group`).node().getBBox().height-(_?s/2:0)||0,F=f.select(`.members-group`).node().getBBox().height-(_?s/2:0)||0,I=(N+P+O+s-(O-s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0)))/2;if(f.selectAll(`.text`).each((e,n,i)=>{let a=t(i[n]),o=a.attr(`transform`),l=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(l=parseFloat(e[2]))}let p=l+O+s-(_?s:d.members.length===0&&d.methods.length===0?-s/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(F,c/2);p=E?Math.max(I,N+P+e+O+c*2+s)+c*2:N+P+e+O+c*4+s}d.members.length===0&&d.methods.length===0&&r.class?.hideEmptyMembersBox&&(p=d.annotations.length>0?l-c:l),u||(p-=4);let m=D;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(m=-a.node()?.getBBox().width/2||0,f.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(m=0)})),a.attr(`transform`,`translate(${m}, ${p})`)}),d.members.length>0||d.methods.length>0||_){let e=N+P+O+s,t=v.line(M.x,e,M.x+M.width,e+.001,y);f.insert(()=>t).attr(`class`,`divider${n.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,g)}if(_||d.members.length>0||d.methods.length>0){let e=N+P+F+O+c*2+s,t=v.line(M.x,E?Math.max(I,e):e,M.x+M.width,(E?Math.max(I,e):e)+.001,y);f.insert(()=>t).attr(`class`,`divider${n.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,g)}if(d.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,g),j.select(`:nth-child(2)`).attr(`style`,g),f.selectAll(`.divider`).select(`path`).attr(`style`,g),n.labelStyle?f.selectAll(`span`).attr(`style`,n.labelStyle):f.selectAll(`span`).attr(`style`,g),!u){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(g);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}else if(m){let t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}}}return T(n,j),n.intersect=function(e){return G.rect(n,e)},f}e(Ut,`classBox`);async function Wt(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let o=n,s=n,c=`verifyMethod`in n,l=E(n),{themeVariables:u}=a(),{borderColorArray:d,requirementEdgeLabelBackground:f}=u,p=e.insert(`g`).attr(`class`,l).attr(`id`,n.domId??n.id),m;m=c?await $(p,`<<${o.type}>>`,0,n.labelStyle):await $(p,`<<Element>>`,0,n.labelStyle);let h=m,g=await $(p,o.name,h,n.labelStyle+`; font-weight: bold;`);if(h+=g+20,c){let e=await $(p,`${o.requirementId?`ID: ${o.requirementId}`:``}`,h,n.labelStyle);h+=e;let t=await $(p,`${o.text?`Text: ${o.text}`:``}`,h,n.labelStyle);h+=t;let r=await $(p,`${o.risk?`Risk: ${o.risk}`:``}`,h,n.labelStyle);h+=r,await $(p,`${o.verifyMethod?`Verification: ${o.verifyMethod}`:``}`,h,n.labelStyle)}else{let e=await $(p,`${s.type?`Type: ${s.type}`:``}`,h,n.labelStyle);h+=e,await $(p,`${s.docRef?`Doc Ref: ${s.docRef}`:``}`,h,n.labelStyle)}let _=(p.node()?.getBBox().width??200)+20,v=(p.node()?.getBBox().height??200)+20,y=-_/2,C=-v/2,w=S.svg(p),D=x(n,{});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=w.rectangle(y,C,_,v,D),k=p.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,i),d?.length){let e=n.colorIndex??0;p.attr(`data-color-id`,`color-${e%d.length}`)}if(p.selectAll(`.label`).each((e,n,r)=>{let i=t(r[n]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-v/2,l=y+20/2;(n===0||n===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),h>m+g+20){let e=C+m+g+20,t;if(n.look===`neo`){let n=[[y,e],[y+_,e],[y+_,e+.001],[y,e+.001]];t=w.polygon(n,D)}else t=w.line(y,e,y+_,e,D);p.insert(()=>t).attr(`class`,`divider`)}return T(n,k),n.intersect=function(e){return G.rect(n,e)},i&&n.look!==`handDrawn`&&(f||d?.length)&&p.selectAll(`path`).attr(`style`,i),p}e(Wt,`requirementBox`);async function $(e,n,r,i=``){if(n===``)return 0;let o=e.insert(`g`).attr(`class`,`label`).attr(`style`,i),s=a(),l=s.htmlLabels??!0,u=await m(o,c(d(n)),{width:p(n,s)+50,classes:`markdown-node-label`,useHtmlLabels:l,style:i},s),f;if(l){let e=u.children[0],n=t(u);f=e.getBoundingClientRect(),n.attr(`width`,f.width),n.attr(`height`,f.height)}else{let e=u.children[0];for(let t of e.children)i&&t.setAttribute(`style`,i);f=u.getBBox(),f.height+=6}return o.attr(`transform`,`translate(${-f.width/2},${-f.height/2+r})`),f.height}e($,`addText`);var Gt=e(e=>{switch(e){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 Kt(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await w(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await w(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await w(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,D=-_/2,O=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let k,{rx:A,ry:j}=t,{cssStyles:M}=t;if(t.look===`handDrawn`){let e=S.svg(o),n=x(t,{}),r=A||j?e.path(N(D,O,_,y,A||0),n):e.rectangle(D,O,_,y,n);k=o.insert(()=>r,`:first-child`),k.attr(`class`,`basic label-container`).attr(`style`,M||null)}else{k=o.insert(`rect`,`:first-child`),k.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,A??5).attr(`ry`,j??5).attr(`x`,D).attr(`y`,O).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=D+2,r=O+Math.floor((A??0)/2),i=O+y-Math.floor((A??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Gt(e))}}return T(t,k),t.height=y,t.intersect=function(e){return G.rect(t,e)},o}e(Kt,`kanbanItem`);async function qt(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,t,E(t)),l=o.width+10*s,u=o.height+8*s,d=.15*l,{cssStyles:p}=t,m=o.width+20,h=o.height+20,g=Math.max(l,m),_=Math.max(u,h);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let v,y=`M0 0
|
|
a${d},${d} 1 0,0 ${g*.25},${-1*_*.1}
|
|
a${d},${d} 1 0,0 ${g*.25},0
|
|
a${d},${d} 1 0,0 ${g*.25},0
|
|
a${d},${d} 1 0,0 ${g*.25},${_*.1}
|
|
|
|
a${d},${d} 1 0,0 ${g*.15},${_*.33}
|
|
a${d*.8},${d*.8} 1 0,0 0,${_*.34}
|
|
a${d},${d} 1 0,0 ${-1*g*.15},${_*.33}
|
|
|
|
a${d},${d} 1 0,0 ${-1*g*.25},${_*.15}
|
|
a${d},${d} 1 0,0 ${-1*g*.25},0
|
|
a${d},${d} 1 0,0 ${-1*g*.25},0
|
|
a${d},${d} 1 0,0 ${-1*g*.25},${-1*_*.15}
|
|
|
|
a${d},${d} 1 0,0 ${-1*g*.1},${-1*_*.33}
|
|
a${d*.8},${d*.8} 1 0,0 0,${-1*_*.34}
|
|
a${d},${d} 1 0,0 ${g*.1},${-1*_*.33}
|
|
H0 V0 Z`;if(t.look===`handDrawn`){let e=S.svg(a),n=x(t,{}),r=e.path(y,n);v=a.insert(()=>r,`:first-child`),v.attr(`class`,`basic label-container`).attr(`style`,f(p))}else v=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,y);return v.attr(`transform`,`translate(${-g/2}, ${-_/2})`),T(t,v),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return n.info(`Bang intersect`,t,e),G.rect(t,e)},a}e(qt,`bang`);async function Jt(e,t){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,t,E(t)),l=o.width+2*s,u=o.height+2*s,d=.15*l,p=.25*l,m=.35*l,h=.2*l,{cssStyles:g}=t,_,v=`M0 0
|
|
a${d},${d} 0 0,1 ${l*.25},${-1*l*.1}
|
|
a${m},${m} 1 0,1 ${l*.4},${-1*l*.1}
|
|
a${p},${p} 1 0,1 ${l*.35},${l*.2}
|
|
|
|
a${d},${d} 1 0,1 ${l*.15},${u*.35}
|
|
a${h},${h} 1 0,1 ${-1*l*.15},${u*.65}
|
|
|
|
a${p},${d} 1 0,1 ${-1*l*.25},${l*.15}
|
|
a${m},${m} 1 0,1 ${-1*l*.5},0
|
|
a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
|
|
a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35}
|
|
a${h},${h} 1 0,1 ${l*.1},${-1*u*.65}
|
|
H0 V0 Z`;if(t.look===`handDrawn`){let e=S.svg(a),n=x(t,{}),r=e.path(v,n);_=a.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,f(g))}else _=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,v);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),_.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,_),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return n.info(`Cloud intersect`,t,e),G.rect(t,e)},a}e(Jt,`cloud`);async function Yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await C(e,t,E(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
|
M${-c/2} ${l/2-5}
|
|
v${-l+10}
|
|
q0,-5 5,-5
|
|
h${c-10}
|
|
q5,0 5,5
|
|
v${l-5}
|
|
H${-c/2}
|
|
Z
|
|
`:`
|
|
M${-c/2} ${l/2-5}
|
|
v${-l+10}
|
|
q0,-5 5,-5
|
|
h${c-10}
|
|
q5,0 5,5
|
|
v${l-10}
|
|
q0,5 -5,5
|
|
h${-(c-10)}
|
|
q-5,0 -5,-5
|
|
Z
|
|
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},i}e(Yt,`defaultMindmapNode`);async function Xt(e,t){return me(e,t,{padding:t.padding??0})}e(Xt,`mindmapCircle`);var Zt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ft},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:lt},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:pt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:_t},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ee},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:me},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:qt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Jt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:ot},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Ie},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:qe},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Ke},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Ot},{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:Ue},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Oe},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:xt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:fe},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ut},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:gt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:ht},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Ne},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Le},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:_e},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:ve},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:ye},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Je},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Nt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Pe},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Dt},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:et},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:be},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:De},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:Mt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Ft},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:ke},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:kt},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Me},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:dt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:rt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:nt},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:ue},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:ge},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:bt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:yt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Pt},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:st},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:tt}],Qt=e(()=>{let e=[...Object.entries({state:mt,choice:pe,note:it,rectWithTitle:ct,labelRect:Ge,iconSquare:Ve,iconCircle:ze,icon:Re,iconRounded:Be,imageSquare:He,anchor:se,kanbanItem:Kt,mindmapCircle:Xt,defaultMindmapNode:Yt,classBox:Ut,erBox:Rt,requirementBox:Wt}),...Zt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function $t(e){return e in Qt}e($t,`isValidShape`);var en=new Map;async function tn(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?Qt[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,f(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),en.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}e(tn,`insertNode`);var nn=e((e,t)=>{en.set(t.id,e)},`setNodeElem`),rn=e(()=>{en.clear()},`clear`),an=e(e=>{let t=en.get(e.id);n.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{tn as a,$t as c,ne as i,T as l,an as n,nn as o,C as r,rn as s,R as t,M as u}; |