project-athena 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +247 -0
- package/dist/cli.js +8614 -0
- package/dist/cli.js.map +1 -0
- package/dist/web/assets/Editor-DmFaONG7.js +39 -0
- package/dist/web/assets/_basePickBy-QJXUw_pr.js +1 -0
- package/dist/web/assets/_baseUniq-DR4vVjyC.js +1 -0
- package/dist/web/assets/abnfDiagram-O67JEVCF-BEaDGLKl.js +1 -0
- package/dist/web/assets/arc-DgcGdgmL.js +1 -0
- package/dist/web/assets/architecture-7GRP2DOG-CHNxu4zI.js +1 -0
- package/dist/web/assets/architectureDiagram-NJMV4G6O-Cr_YqU4C.js +36 -0
- package/dist/web/assets/array-BifhSqXX.js +1 -0
- package/dist/web/assets/blockDiagram-BEXU5L5S-NA64lNxM.js +140 -0
- package/dist/web/assets/c4Diagram-YGBWAQC7-C9OZTI8T.js +38 -0
- package/dist/web/assets/channel-D_T5GGJX.js +1 -0
- package/dist/web/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/web/assets/chunk-3FUC2YCW-PivwegVV.js +2 -0
- package/dist/web/assets/chunk-5DYCD2WN-DH_dVKgx.js +1 -0
- package/dist/web/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/web/assets/chunk-742MDFTN-DTR6iTOw.js +1 -0
- package/dist/web/assets/chunk-7INBJB4K-XeJOzIDQ.js +62 -0
- package/dist/web/assets/chunk-7M6MHVWA-Bn-cXg0l.js +213 -0
- package/dist/web/assets/chunk-7PRAP22T-CPe5zfLc.js +1 -0
- package/dist/web/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/web/assets/chunk-FOHPRMQF-DzxwRta7.js +161 -0
- package/dist/web/assets/chunk-GTNCS2PH-DSn-mpqy.js +88 -0
- package/dist/web/assets/chunk-GWA4HPMP-DE4DJkth.js +1 -0
- package/dist/web/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/web/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/web/assets/chunk-MBY4JIJT-9uaOqseW.js +72 -0
- package/dist/web/assets/chunk-NETBCI7D-bxqe7jPe.js +1 -0
- package/dist/web/assets/chunk-O7XYJQB3-CjZQSnt8.js +126 -0
- package/dist/web/assets/chunk-UA2S7LBM-BfYbPxwY.js +1 -0
- package/dist/web/assets/chunk-WEXAMYUT-CT8bG5L7.js +1 -0
- package/dist/web/assets/chunk-XXDRQBXY-BvKO0v-W.js +1 -0
- package/dist/web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/web/assets/chunk-Z7XXMR3K-CHWuLoFG.js +10 -0
- package/dist/web/assets/chunk-ZIGJFQKS-C6SOqBs6.js +2 -0
- package/dist/web/assets/classDiagram-v2-NBCMYWYE-CrSxkUNF.js +217 -0
- package/dist/web/assets/cose-bilkent-JH36ORCC-COXSdE6a.js +1 -0
- package/dist/web/assets/cynefin-OW5HDTMX-CMbTYwga.js +1 -0
- package/dist/web/assets/cynefinDiagram-VND7K2PF-B8wb03CF.js +62 -0
- package/dist/web/assets/cytoscape.esm-Yq6u8L66.js +321 -0
- package/dist/web/assets/dagre-6A5THRUB-Bz-BHtjW.js +4 -0
- package/dist/web/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dist/web/assets/diagram-22UHCM2B-C9M-mcex.js +200 -0
- package/dist/web/assets/diagram-3UASUU5V-q18RgATq.js +24 -0
- package/dist/web/assets/diagram-ATOU4E4O-zywdDXPc.js +3 -0
- package/dist/web/assets/diagram-CDSNMT55-BGMdofKO.js +30 -0
- package/dist/web/assets/diagram-MLGK6HIB-BdT0J6Xl.js +24 -0
- package/dist/web/assets/diagram-MPIPVDR6-BXdFmdOp.js +41 -0
- package/dist/web/assets/dist-B_J_HbC0.js +1 -0
- package/dist/web/assets/ebnfDiagram-ZINNZB2B-B7Mz8zd0.js +1 -0
- package/dist/web/assets/elk-276RUBZZ-CQ4lVw-r.js +27 -0
- package/dist/web/assets/erDiagram-OPXOYQCR-DmmZBLvC.js +99 -0
- package/dist/web/assets/eventmodeling-NTZA5JFV-BgPhBkRf.js +1 -0
- package/dist/web/assets/flowDiagram-KWPJA3E3-C3wNriu7.js +1 -0
- package/dist/web/assets/ganttDiagram-FUAMR5RP-B0egPzgH.js +292 -0
- package/dist/web/assets/gitGraph-4MIJSDKK-BdShI4JY.js +1 -0
- package/dist/web/assets/gitGraphDiagram-X574FWY7-jwG6nUmP.js +106 -0
- package/dist/web/assets/graphlib-C9Tl7QrK.js +1 -0
- package/dist/web/assets/index-BSiW3yI1.js +45 -0
- package/dist/web/assets/index-DKE3ojTe.css +1 -0
- package/dist/web/assets/info-A6RAGUB7-Hm3KO-lX.js +1 -0
- package/dist/web/assets/infoDiagram-VRGFBTTK-CdcggvNW.js +2 -0
- package/dist/web/assets/init-C-OQMol4.js +1 -0
- package/dist/web/assets/ishikawaDiagram-OU5B5YK6-C8x3tV6X.js +70 -0
- package/dist/web/assets/journeyDiagram-ZHPQQLJL-CLXIkiwl.js +139 -0
- package/dist/web/assets/kanban-definition-PNTS6WVX-P94klDAy.js +89 -0
- package/dist/web/assets/katex-ZlcWpGUi.js +257 -0
- package/dist/web/assets/line-DtGZCXZs.js +1 -0
- package/dist/web/assets/linear-BUnzfXgk.js +1 -0
- package/dist/web/assets/mermaid-parser.core-Du2mcMMx.js +7 -0
- package/dist/web/assets/mermaid.core-B4zgSyXF.js +44 -0
- package/dist/web/assets/mindmap-definition-NLK3R4M7-C0EF7lWr.js +96 -0
- package/dist/web/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dist/web/assets/packet-AYTQ26CC-SJ1tKR5t.js +1 -0
- package/dist/web/assets/path-fybaL0A-.js +1 -0
- package/dist/web/assets/pegDiagram-GJSIUBJH-Dek_S7Z0.js +1 -0
- package/dist/web/assets/pie-WAS4IAKB-C0wgWLu4.js +1 -0
- package/dist/web/assets/pieDiagram-5QR66LMP-Dy1jV_P-.js +39 -0
- package/dist/web/assets/quadrantDiagram-O4NWA36T-Df6Jl4OG.js +7 -0
- package/dist/web/assets/radar-RG4KPBEZ-BCtk017a.js +1 -0
- package/dist/web/assets/railroad-74A4TZTK-_ZAooQok.js +1 -0
- package/dist/web/assets/railroad-abnf-HS5TGJTU-Bacbbg7g.js +1 -0
- package/dist/web/assets/railroad-ebnf-LZEXJU2U-Cb23oOsU.js +1 -0
- package/dist/web/assets/railroad-peg-WCYAUIDC-EPh5LyCw.js +1 -0
- package/dist/web/assets/railroadDiagram-XR7U4H2S-DNraioKj.js +1 -0
- package/dist/web/assets/requirementDiagram-PLB6GJNP-C09s8xl6.js +84 -0
- package/dist/web/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/dist/web/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/web/assets/sankeyDiagram-IPEJSGJF-cwVwdash.js +40 -0
- package/dist/web/assets/sequenceDiagram-PO4LG4MO-Uz6m2m-d.js +169 -0
- package/dist/web/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dist/web/assets/src-oBChb5qS.js +1 -0
- package/dist/web/assets/stateDiagram-v2-GCMORJYK-DASY_MN7.js +291 -0
- package/dist/web/assets/swimlanes-2SLR337P-DjbxDj0Z.js +1 -0
- package/dist/web/assets/swimlanesDiagram-TC7HE7FX-Bv90z5my.js +8 -0
- package/dist/web/assets/timeline-definition-EJHVYXUP-Dffxj5AG.js +120 -0
- package/dist/web/assets/treeView-Q6P3EWNA-CXAvuG6A.js +1 -0
- package/dist/web/assets/treemap-WGGIJYW6-D_BSE2GX.js +1 -0
- package/dist/web/assets/usecaseDiagram-POWQR4AR-CKcfbpDB.js +328 -0
- package/dist/web/assets/vennDiagram-UO4OBE2U-DkJknm_I.js +34 -0
- package/dist/web/assets/wardley-WFR3VGLG-Drx6WB-t.js +1 -0
- package/dist/web/assets/wardleyDiagram-VNRHLVJA-fdjd5am3.js +78 -0
- package/dist/web/assets/xychartDiagram-PMCCYNJV-DCWTWMv0.js +7 -0
- package/dist/web/favicon.svg +1 -0
- package/dist/web/index.html +17 -0
- package/package.json +77 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-oBChb5qS.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-O7XYJQB3-CjZQSnt8.js";import{a as f,p,r as m,u as h}from"./chunk-ZIGJFQKS-C6SOqBs6.js";import{n as g,t as _}from"./chunk-742MDFTN-DTR6iTOw.js";import{n as v,r as y}from"./chunk-MBY4JIJT-9uaOqseW.js";import{a as b,i as x,r as S,t as C}from"./chunk-7PRAP22T-CPe5zfLc.js";import{s as w}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{t as T}from"./rough.esm-Dy-Kn_BL.js";var E=1,D=3;async function O(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!k(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let e=u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize,[n=c.fontSize]=p(e),r=n*5+`px`;t.style.minWidth=r,t.style.maxWidth=r}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(O,`configureLabelImages`);function k(e){return e.nodeType===D?e.textContent?.trim()!==``:e.nodeType!==E||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(k)}e(k,`hasTextBesidesImages`);var A=3,j=32,M=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=t.width?Math.max(t.width-2*(t.padding??0),j):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await v(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+A;let _=p.length>0?g-A:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-_/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),N=e((t,n)=>{let{x:r,y:i,width:a,height:o}=t;return a>=n?t:`left`in t?{x:r,y:i,width:n,height:o,top:i,left:r,bottom:i+o,right:r+n,toJSON:e(()=>({}),`toJSON`)}:{x:r-(n-a)/2,y:i,width:n,height:o}},`withMinWidth`),P=e(async(e,t,r)=>{if(t.stereotype!==void 0)return M(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=c&&!t.width?t.minWidth??0:0,_=await v(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,minWidth:g,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),b=(t?.padding??0)/2,x;if(a){let e=_.children[0],t=n(_);await O(e),x=await y.measure(()=>e.getBoundingClientRect()),x=N(x,g),t.attr(`width`,x.width),t.attr(`height`,x.height)}else x=await y.measure(()=>_.getBBox()),x=N(x,g);return a?s.attr(`transform`,`translate(`+-x.width/2+`, `+-x.height/2+`)`):s.attr(`transform`,`translate(0, `+-x.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-x.width/2+`, `+-x.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:x,halfPadding:b,label:s}},`labelHelper`),F=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await v(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await y.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await y.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),I=e((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),L=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function R(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(R,`createPathFromPoints`);function z(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(z,`generateFullSineWavePoints`);function B(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(B,`generateCirclePoints`);function ee(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(ee,`mergePaths`);var V=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`);function te(e,t){return e.intersect(t)}e(te,`intersectNode`);var H=te;function U(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(U,`intersectEllipse`);var ne=U;function re(e,t,n){return ne(e,t,t,n)}e(re,`intersectCircle`);var ie=re;function W(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&&G(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&&G(p,m))return;let h=i*d-u*a;return h===0?void 0:{x:(a*f-d*o)/h,y:(u*o-i*f)/h}}}e(W,`intersectLine`);function G(e,t){return e*t>0}e(G,`sameSign`);var ae=W;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=ae(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 K={node:H,circle:ie,ellipse:ne,polygon:oe,rect:V},q=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`),se=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await v(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function ce(e,n){let{labelStyles:r}=x(n);n.labelStyle=r;let i=L(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=T.svg(o),l=b(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.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`,h(s)),I(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(ce,`anchor`);function le(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(le,`generateArcPoints`);function ue(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ue,`calculateArcSagitta`);async function de(t,n){let{labelStyles:r,nodeStyles:i}=x(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 P(t,n,L(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ue(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},...le(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...le(g/2,_/2,g/2,-_/2,p,m,!0)],S=T.svg(u),C=b(n,{});n.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=R(y),E=S.path(w,C),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),I(n,D),n.intersect=function(e){return K.polygon(n,y,e)},u}e(de,`bowTieRect`);async function fe(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=x(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(t,n,L(n)),l=r?.nodeBorder??r?.lineColor??`currentColor`,u=n.padding??12,d=Math.max(s.width+u*2,n.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,n.height??0),m=-p/2+f,h=p/2,g=d*.72,_=[`M${-d/2},${m}`,`L${-g/2},${h}`,`A${g/2},${f} 0 0 0 ${g/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:v}=n,y=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=T.svg(o).path(_,b(n,{}));y.node()?.appendChild(e),v&&y.attr(`style`,v)}else y.append(`path`).attr(`d`,_).attr(`style`,a);y.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),I(n,y);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let C=e((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),w=[...C(d/2,m,-1),...C(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,w,e)},o}e(fe,`bucket`);var pe=20,me=8,he=80,ge=8;function _e(e){let{themeVariables:t}=u(),n=t.clusterBkg,r=t.clusterBorder;switch(e){case`flow`:return{rx:10,fill:`none`,stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:`flow-collapsed`};default:return{rx:ge,fill:n,stroke:r,cssClass:`collapsed-group`}}}e(_e,`getCollapsedStyle`);async function ve(e,t){let n=_e(t.metadata?.containerType),{fill:r,stroke:i}=n,{nodeStyles:a}=x(t),{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{theme:l,themeVariables:d}=u();w(s,t.colorIndex,l,d.borderColorArray);let f=t.padding??8,p=c.height,m=Math.max(c.width+f*2,he,t?.width??0),g=Math.max(p+me+pe+f*2,t?.height??0),_=-m/2,v=-g/2,y=-(me+pe)/2,S=s.select(`.label`);S&&(t.useHtmlLabels??o(u())?S.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):S.attr(`transform`,`translate(0, ${-c.height/2+y})`));let C;if(t.look===`handDrawn`){let e=T.svg(s),a=b(t,{fill:r,stroke:i,...n.strokeWidth===void 0?{}:{strokeWidth:n.strokeWidth},...r===`none`?{fillWeight:0}:{fillStyle:`solid`}}),o=e.path(q(_,v,m,g,n.rx),a);C=s.insert(()=>o,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,h(t.cssStyles))}else C=s.insert(`rect`,`:first-child`),C.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,a).attr(`rx`,n.rx).attr(`ry`,n.rx).attr(`x`,_).attr(`y`,v).attr(`width`,m).attr(`height`,g).attr(`fill`,r).attr(`stroke`,i),n.strokeWidth!==void 0&&C.attr(`stroke-width`,n.strokeWidth+`px`);let E=v+f+p+me;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,_+8).attr(`y1`,E).attr(`x2`,_+m-8).attr(`y2`,E).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let D=E+pe/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,D).attr(`r`,2.5).attr(`fill`,i);return I(t,C),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(ve,`collapsedGroup`);function J(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(J,`insertPolygonShape`);var ye=[`right`,`left`,`up`,`down`],be=`point`,xe=e(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),Se=e(e=>ye.filter(t=>e.has(t)).join(`|`)||be,`getDirectionKey`),Ce={"right|left|up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":e(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":e(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":e(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":e(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":e(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:e(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[be]:()=>[{x:0,y:0}]},we=e((e,t,n,r)=>{let i=xe(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(Ce[Se(i)]??Ce[be])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Te(e,t){let n=t,{shapeSvg:r,bbox:i}=await P(e,n,L(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=we(n.directions??[],i,n,u),f=J(r,u,o,d);return f.attr(`style`,n.style??null),I(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Te,`block_arrow`);async function Ee(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),b(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),I(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ee,`browser`);var De=12;async function Oe(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(s),n=b(t,{}),r=R(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=J(s,l,u,p);return r&&m.attr(`style`,r),I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Oe,`card`);function ke(e,t){let{nodeStyles:n}=x(t);t.label=``;let r=e.insert(`g`).attr(`class`,L(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=T.svg(r),c=b(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=R(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 K.polygon(t,o,e)},r}e(ke,`choice`);async function Ae(e,n,r){let{labelStyles:i,nodeStyles:a}=x(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await P(e,n,L(n)),l=r?.padding??c,u=Math.sqrt(s.width**2+s.height**2)/2,d=n.look===`neo`?u+32:u+l,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=T.svg(o),t=b(n,{}),r=e.circle(0,0,d*2,t);f=o.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,h(p))}else f=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return I(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,d,e),K.circle(n,d,e)},o}e(Ae,`circle`);async function je(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await P(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),I(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(je,`composite`);async function Me(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await P(e,t,L(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=T.svg(a).path(q(-u/2,f,u,d,12),b(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),I(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Me,`consoleWindow`);function Ne(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}
|
|
2
|
+
M ${i.x},${i.y} L ${o.x},${o.y}`}e(Ne,`createLine`);function Pe(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=T.svg(a),l=b(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ne(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),I(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}e(Pe,`crossedCircle`);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 Fe(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(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=[...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=[{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+l*.1,-d,d,20,-180,-270),...Y(l/2+l*.1,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,y:u/2+d}],h=T.svg(i),g=b(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=R(p).replace(`Z`,``),v=h.path(_,g),y=R(m),S=h.path(y,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.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))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Fe,`curlyBraceLeft`);function X(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(X,`generateCirclePoints`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(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=[...X(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...X(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=T.svg(i),g=b(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=R(p).replace(`Z`,``),v=h.path(_,g),y=R(m),S=h.path(y,{...g}),C=i.insert(`g`,`:first-child`);return C.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),C.insert(()=>v,`:first-child`),C.attr(`class`,`text`),f&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.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))})`),I(t,C),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Ie,`curlyBraceRight`);function Z(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(Z,`generateCirclePoints`);async function Le(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(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=[...Z(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Z(l/2+d*2,-d,d,20,-180,-270),...Z(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Z(l/2,u/2,d,20,0,90)],m=[...Z(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Z(-l/2-d/2,-d,d,20,0,90),...Z(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Z(-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},...Z(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Z(l/2+d*2,-d,d,20,-180,-270),...Z(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Z(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},...Z(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Z(-l/2-d/2,-d,d,20,0,90),...Z(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Z(-l/2+d+d/2,u/2,d,30,-180,-270)],g=T.svg(i),_=b(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=R(p).replace(`Z`,``),y=g.path(v,_),S=R(m).replace(`Z`,``),C=g.path(S,_),w=R(h),E=g.path(w,{..._}),D=i.insert(`g`,`:first-child`);return D.insert(()=>E,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>y,`:first-child`),D.insert(()=>C,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.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))})`),I(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Le,`curlyBraces`);async function Re(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=Math.max(5,c.height+o*2,t?.height??0),u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=Math.max(l/4,d),p=Math.max(20,c.width+a*2+f*2,(c.width+a*2)*1.25,t?.width??0),{cssStyles:m}=t,h=T.svg(s),g=b(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=p,v=l,y=_-u,S=v/4,C=[{x:y,y:0},{x:S,y:0},{x:0,y:v/2},{x:S,y:v},{x:y,y:v},...B(-y,-v/2,u,50,270,90)],w=R(C),E=h.path(w,g),D=s.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&D.selectChildren(`path`).attr(`style`,r),D.attr(`transform`,`translate(${-p/2}, ${-l/2})`),I(t,D),t.intersect=function(e){return K.polygon(t,C,e)},s}e(Re,`curvedTrapezoid`);async function ze(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,g=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:_}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=b(t,{}),r=e.path(q(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);g.insert(()=>a,`:first-child`),g.insert(()=>r,`:first-child`),_&&g.attr(`style`,_)}else g.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),g.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);I(t,g);let v=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`);let y=m+l,S=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,C=[...B(0,-y,l,24,180+S,-S),...B(-(-c/2+f),-(h+f),f,12,90,0),...B(-(-c/2+f),-(p/2-f),f,12,360,270),...B(-(c/2-f),-(p/2-f),f,12,270,180),...B(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,C,e)},i}e(ze,`person`);var Be=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`),Ve=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`),He=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Ue=8,We=8;async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<We&&(t.width=We)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<Ue&&(t.height=Ue)}let{shapeSvg:c,bbox:l,label:u}=await P(e,t,L(t)),d=Math.max(t.width??0,l.width)+o,f=d/2,p=f/(2.5+d/50),m=Math.max(t.height??0,l.height)+a+p,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=T.svg(c),n=Ve(0,0,d,m,f,p),r=He(0,p,d,m,f,p),i=b(t,{}),a=e.path(n,i),o=e.path(r,b(t,{fill:`none`}));g=c.insert(()=>o,`:first-child`),g=c.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Be(0,0,d,m,f,p);g=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),I(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=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/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}e(Ge,`cylinder`);async function Ke(e,t,n){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await P(e,t,L(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:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=T.svg(a),n=b(t,{}),r=f||p?e.path(q(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return I(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}e(Ke,`drawRect`);async function qe(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ke(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=T.svg(c),n=b(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(qe,`datastore`);async function Je(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=T.svg(o),g=b(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))})`),I(t,y),t.intersect=function(e){return K.rect(t,e)},o}e(Je,`dividedRectangle`);async function Ye(e,n){let{labelStyles:r,nodeStyles:i}=x(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await P(e,n,L(n)),u=Math.sqrt(l.width**2+l.height**2)/2,d=(n?.width?n?.width/2:u)+(s??0),f=d+a,p,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=T.svg(c),t=b(n,{roughness:.2,strokeWidth:2.5}),r=b(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,f*2,t),a=e.circle(0,0,d*2,r);p=c.insert(`g`,`:first-child`),p.attr(`class`,h(n.cssClasses)).attr(`style`,h(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`,f).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return I(n,p),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,f,e),K.circle(n,f,e)},c}e(Ye,`doublecircle`);async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o}=await P(e,t,L(t)),{theme:s,themeVariables:c}=u();w(i,t.colorIndex,s,c.borderColorArray);let l=o??10,d=a.width/2+l*2,f=a.height/2+l*2,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=T.svg(i),n=b(t,{}),r=e.ellipse(0,0,d*2,f*2,n);p=i.insert(()=>r,`:first-child`),p.attr(`class`,`basic label-container`),m&&p.attr(`style`,m)}else p=i.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`rx`,d).attr(`ry`,f).attr(`cx`,0).attr(`cy`,0);return t.width=d*2,t.height=f*2,I(t,p),t.calcIntersect=function(e,t){let n=e.width/2,r=e.height/2;return K.ellipse(e,n,r,t)},t.intersect=function(e){return K.ellipse(t,d,f,e)},i}e(Xe,`usecaseEllipse`);function Ze(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=x(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=T.svg(o),{nodeBorder:l}=r,u=b(n,{fillStyle:`solid`});n.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&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),I(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}e(Ze,`filledCircle`);var Qe=10,$e=10;async function et(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.height<Qe&&(n.height=Qe),n.width=(n?.width??0)-o-o/2,n.width<$e&&(n.width=$e));let{shapeSvg:s,bbox:c,label:l}=await P(e,n,L(n)),u=(n?.width?n?.width:c.width)+(o??0),d=n?.height?n?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=n,h=T.svg(s),g=b(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=R(p),v=h.path(_,g),y=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,I(n,y),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}e(et,`flippedTriangle`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],g=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:_}=t,v;if(t.look===`handDrawn`){let e=T.svg(i).path(g,b(t,{}));v=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),_&&v.attr(`style`,_)}else v=i.insert(`path`,`:first-child`).attr(`d`,g).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?I(t,v):I(t,v,{width:c,height:d});let y=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}e(tt,`folder`);function nt(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=x(t);t.label=``;let o=e.insert(`g`).attr(`class`,L(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`||n===`RL`)&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=T.svg(o),p=b(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),I(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 K.rect(t,e)},o}e(nt,`forkJoin`);async function rt(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await P(e,n,L(n)),l=(n?.height?n?.height:Math.max(10,c.height))+o*2,u=l/2,d=u-Math.sqrt(Math.max(0,u**2-(c.height/2)**2)),f=(n?.width?n?.width:Math.max(15,c.width)+d*2)+a*2,{cssStyles:p}=n,m=T.svg(s),h=b(n,{});n.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-f/2,y:-l/2},{x:f/2-u,y:-l/2},...B(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],_=R(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),p&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,p),i&&n.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,i),I(n,y),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:u,point:e}),K.polygon(n,g,e)},s}e(rt,`halfRoundedRectangle`);var it=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 at(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(c),n=b(t,{}),r=it(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=J(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,I(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}e(at,`hexagon`);async function ot(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await P(e,n,L(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=T.svg(a),u=b(n,{});n.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=R(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),I(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}e(ot,`hourglass`);async function st(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:g}=r,{stylesMap:v}=C(n),y=-h/2,S=-m/2,w=n.label?8:0,E=T.svg(u),D=b(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(y,S,h,m,D),k=Math.max(h,d.width),A=m+d.height+w,j=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),M=u.insert(()=>O,`:first-child`),N=u.insert(()=>j);if(n.icon){let e=u.append(`g`);e.html(`<g>${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+w/2-i/2-o:-d.height/2-w/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),M.attr(`transform`,`translate(0,${p?d.height/2+w/2:-d.height/2-w/2})`),I(n,N),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.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+w},{x:r+h/2,y:i-a/2+d.height+w},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+w},{x:r-d.width/2,y:i-a/2+d.height+w}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/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-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}e(st,`icon`);async function ct(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await P(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:g}=r,{stylesMap:v}=C(n),y=T.svg(u),S=b(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`),S.stroke=v.get(`fill`)??g;let w=u.append(`g`);n.icon&&w.html(`<g>${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let E=w.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,j=Math.max(D,O)*Math.SQRT2+40,M=y.circle(0,0,j,S),N=Math.max(j,d.width),F=j+d.height+p,L=y.rectangle(-N/2,-F/2,N,F,{...S,fill:`transparent`,stroke:`none`}),R=u.insert(()=>M,`:first-child`),z=u.insert(()=>L);return w.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),w.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-F/2:F/2-d.height})`),R.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),I(n,z),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}e(ct,`iconCircle`);async function lt(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:S}=C(n),w=-g/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=b(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=S.get(`fill`)??y;let A=O.path(q(w,E,g,h,5),k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`<g>${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${S.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.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+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+h},{x:r+d.width/2,y:i-a/2+h},{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+h},{x:r-g/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(lt,`iconRounded`);async function ut(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=x(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await P(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,g=c+f*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:S}=C(n),w=-g/2,E=-h/2,D=n.label?8:0,O=T.svg(u),k=b(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=S.get(`fill`)??y;let A=O.path(q(w,E,g,h,.1),k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),F=u.insert(()=>A,`:first-child`),L=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`<g>${await _(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${S.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-M/2:M/2-d.height})`),F.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),I(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.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+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+h},{x:r+d.width/2,y:i-a/2+h},{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+h},{x:r-g/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(ut,`iconSquare`);async function dt(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=x(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await P(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,y=T.svg(f),S=b(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=y.rectangle(g,_,u,d,S),w=Math.max(u,p.width),E=d+p.height+v,D=y.rectangle(-w/2,-E/2,w,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>C,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/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})`),O.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),I(n,k),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.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}],K.polygon(n,o,e)},f}e(dt,`imageSquare`);async function ft(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=R(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=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ft,`inv_trapezoid`);async function pt(e,t){let{shapeSvg:n,bbox:r,label:i}=await P(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))})`),I(t,a),t.intersect=function(e){return K.rect(t,e)},n}e(pt,`labelRect`);async function mt(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),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=T.svg(s),n=b(t,{}),r=R(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=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(mt,`lean_left`);async function ht(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),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=T.svg(s),n=b(t,{}),r=R(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=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ht,`lean_right`);function gt(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,L(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.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=T.svg(a),d=b(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=R(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),I(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}e(gt,`lightningBolt`);var _t=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`),vt=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`),yt=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),bt=10,xt=10;async function St(e,t){let{labelStyles:n,nodeStyles:r}=x(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<xt&&(t.width=xt);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<bt&&(t.height=bt)}let{shapeSvg:s,bbox:c,label:l}=await P(e,t,L(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=T.svg(s),n=vt(0,0,u,p,d,f,m),r=yt(0,f,u,p,d,f),i=b(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=_t(0,0,u,p,d,f,m);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),I(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.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-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(St,`linedCylinder`);async function Ct(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(s),g=b(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},...z(-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-(c.y-(c.top??0))})`),I(t,y),t.intersect=function(e){return K.polygon(t,_,e)},s}e(Ct,`linedWaveEdgedRect`);var wt=56,Tt=72,Et=8,Dt=2,Ot=8,kt={normal:`usecase-actor-shape usecase-actor-normal`,hollow:`usecase-actor-hollow`,awesome:`usecase-actor-awesome`,icon:`usecase-actor-icon`},At=Math.PI/3,jt=.6,Mt=e((e,t)=>{let n=t*jt,r=t*Math.sqrt(1-jt**2),i=Math.cos(At),a=-Math.sin(At),o=n*-a,s=e+n*i,c=r*i,l=r*a;return`M ${o-c} ${s-l} L ${o+c} ${s+l}`},`businessMarkerPathForCircle`),Nt={normal:Mt(-24,12),hollow:Mt(-23,9),awesome:Mt(-21,13),icon:`M 12 -8 L 26 -26`},Pt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`),Ft=e((e,t,n,r,i=!1)=>{if(t.look===`handDrawn`){let a=T.svg(e).path(n,b(t,i?{fill:`none`}:{}));return e.insert(()=>a,`:first-child`).attr(`class`,r)}let a=e.append(`path`).attr(`class`,r).attr(`d`,n);return i&&a.attr(`fill`,`none`),a},`appendActorPath`),It=e((e,t,n,r,i,a,o=!1)=>{if(t.look===`handDrawn`){let s=T.svg(e).circle(n,r,i*2,b(t,o?{fill:`none`}:{}));return e.insert(()=>s,`:first-child`).attr(`class`,a)}let s=e.append(`circle`).attr(`class`,a).attr(`cx`,n).attr(`cy`,r).attr(`r`,i);return o&&s.attr(`fill`,`none`),s},`appendActorCircle`),Lt=e((e,t,n)=>{t.business&&e.append(`path`).attr(`class`,`usecase-business-marker usecase-actor-business-marker`).attr(`d`,Nt[n]).attr(`fill`,`none`).attr(`style`,`stroke: inherit !important; stroke-width: inherit !important`)},`appendBusinessActorMarker`);async function Rt(e,t,n,r){let{labelStyles:i,nodeStyles:a}=x(t);t.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await P(e,n===`icon`||t.stereotype!==void 0?{...t,icon:n===`icon`?void 0:t.icon,stereotype:void 0}:t,L(t,`usecase-actor-variant usecase-actor-${n}`)),l=t.accessibleName??t.label;l&&o.attr(`role`,`img`).attr(`aria-label`,l),c.attr(`class`,`label actor-label usecase-actor-label`);let{theme:d,themeVariables:f}=u();w(o,t.colorIndex,d,f.borderColorArray);let p,m;if(t.stereotype){let e=await F(o,`\xAB${t.stereotype}\xBB`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});p=e.label.attr(`class`,`label usecase-stereotype`),m=e.bbox}let h=o.append(`g`).attr(`class`,`usecase-actor-glyph ${kt[n]}`).attr(`style`,a||null);await r(h,t),Lt(h,t,n);let g=t.padding??Ot,_=m?.height??0,v=Tt+Et+s.height+(m?_+Dt:0),y=Math.max(wt,s.width,m?.width??0)+g*2,b=v+g*2,S=-v/2;h.attr(`transform`,`translate(0,${S+Tt/2})`);let C=S+Tt+Et;return p&&m&&(C+=_/2,Pt(p,m,C),C+=_/2+Dt),Pt(c,s,C+s.height/2),I(t,o.insert(`rect`,`:first-child`).attr(`class`,`usecase-actor-outline`).attr(`x`,-y/2).attr(`y`,-b/2).attr(`width`,y).attr(`height`,b).attr(`opacity`,0).attr(`aria-hidden`,`true`)),t.intersect=e=>K.rect(t,e),o}e(Rt,`renderUsecaseActor`);var zt=[`M 0 -12`,`C 6.627 -12 12 -17.373 12 -24`,`C 12 -30.627 6.627 -36 0 -36`,`C -6.627 -36 -12 -30.627 -12 -24`,`C -12 -17.373 -6.627 -12 0 -12 Z`,`M 0 -12 V 8`,`M -17 -5 H 17`,`M 0 8 L -15 28`,`M 0 8 L 15 28`].join(` `);async function Bt(e,t){return Rt(e,t,`normal`,(e,t)=>{Ft(e,t,zt,`usecase-actor-stick`)})}e(Bt,`usecaseActor`);var Vt=[`M 0 -34`,`C 7.18 -34 13 -28.18 13 -21`,`C 13 -13.82 7.18 -8 0 -8`,`C -7.18 -8 -13 -13.82 -13 -21`,`C -13 -28.18 -7.18 -34 0 -34 Z`,`M -24 25`,`C -24 7 -14 -3 0 -3`,`C 14 -3 24 7 24 25`,`C 24 28 21 30 18 30`,`H -18`,`C -21 30 -24 28 -24 25 Z`].join(` `);async function Ht(e,t){return Rt(e,t,`awesome`,(e,t)=>{Ft(e,t,Vt,`usecase-actor-awesome-silhouette`)})}e(Ht,`usecaseActorAwesome`);var Ut=[`M -22 -10`,`H 22`,`V 0`,`H 6`,`L 22 17`,`L 13 28`,`L 0 13`,`L -13 28`,`L -22 17`,`L -6 0`,`H -22`,`Z`].join(` `);async function Wt(e,t){return Rt(e,t,`hollow`,(e,t)=>{It(e,t,0,-23,9,`usecase-actor-hollow-head`,!0),Ft(e,t,Ut,`usecase-actor-hollow-body`,!0)})}e(Wt,`usecaseActorHollow`);var Gt=52,Kt=42,qt=-2,Jt=e(async(e,t)=>{let n=-Gt/2,r=qt-Gt/2;if(t.look===`handDrawn`){let i=T.svg(e).rectangle(n,r,Gt,Gt,b(t,{}));e.insert(()=>i,`:first-child`).attr(`class`,`usecase-actor-icon-frame`)}else e.append(`rect`).attr(`class`,`usecase-actor-icon-frame`).attr(`x`,n).attr(`y`,r).attr(`width`,Gt).attr(`height`,Gt).attr(`rx`,4).attr(`ry`,4);let i=t.icon??``,a=await g(i.includes(`:`)?i:`fa:${i}`),o=await _(i,{height:Kt,width:Kt,fallbackPrefix:`fa`}),s=e.append(`g`).attr(`class`,`usecase-actor-icon-symbol${a?``:` usecase-actor-icon-fallback`}`).attr(`aria-hidden`,`true`).html(`<g>${o}</g>`),c=s.node()?.getBBox();c&&s.attr(`transform`,`translate(${-c.width/2-c.x},${qt-c.height/2-c.y})`)},`drawIconActor`);async function Yt(e,t){return Rt(e,t,`icon`,Jt)}e(Yt,`usecaseActorIcon`);var Xt=e((e,t,n)=>{let r=(t.x??0)-(t.left??0),i=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${-t.width/2-r},${n-t.height/2-i})`)},`positionLabel`);async function Zt(e,t){let n=t,{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n.stereotype?{...t,stereotype:void 0}:t,L(t,`usecase-business-shape`));c.attr(`class`,`label usecase-label`);let{theme:l,themeVariables:d}=u();w(a,t.colorIndex,l,d.borderColorArray);let f,p;if(n.stereotype){let e=await F(a,`\xAB${n.stereotype}\xBB`,{labelStyle:r,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});f=e.label.attr(`class`,`label usecase-stereotype`),p=e.bbox}let m=p?2:0,h=o.height+(p?.height??0)+m,g=Math.max(o.width,p?.width??0),_=s??10,v=g/2+_*2,y=h/2+_*2,S=Math.min(Math.max(_/5,1),_/2),C=g/2+S,E=v-S,D=C/v,O=E/v,k=y*Math.sqrt(Math.max(0,1-D*D)),A=-y*Math.sqrt(Math.max(0,1-O*O));f&&p&&Xt(f,p,-h/2+p.height/2),Xt(c,o,h/2-o.height/2);let j;if(t.look===`handDrawn`){let e=T.svg(a).ellipse(0,0,v*2,y*2,b(t,{}));j=a.insert(()=>e,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`)}else j=a.insert(`ellipse`,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`).attr(`style`,i).attr(`rx`,v).attr(`ry`,y).attr(`cx`,0).attr(`cy`,0);a.append(`path`).attr(`class`,`usecase-business-marker`).attr(`d`,`M ${C} ${k} L ${E} ${A}`).attr(`fill`,`none`).attr(`style`,i||null);let M=n.accessibleName??n.label;return M&&a.attr(`role`,`img`).attr(`aria-label`,M),I(t,j),t.calcIntersect=(e,t)=>K.ellipse(e,e.width/2,e.height/2,t),t.intersect=e=>K.ellipse(t,v,y,e),a}e(Zt,`usecaseBusiness`);var Qt=8,$t=4,en=1,tn=e((e,t,n,r)=>{let i=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr(`transform`,`translate(${n-t.width/2-i},${r-t.height/2-a})`)},`positionLabel`),nn=e(e=>{let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:en},`numericStrokeWidth`);async function rn(t,n){let r=n,{labelStyles:i,nodeStyles:a}=x(n),{stylesMap:o}=C(n);n.labelStyle=i;let{shapeSvg:s,bbox:c,label:l}=await P(t,n,L(n,`usecase-json-table`));s.attr(`role`,`img`),r.accessibleName&&s.attr(`aria-label`,r.accessibleName),l.attr(`class`,`label usecase-json-title`);let u=s.append(`g`).attr(`class`,`usecase-json-table-grid`),d=[];for(let e of r.jsonRows??[]){let t=await F(u,e.key,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0}),r=await F(u,e.value,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0});d.push({key:{label:t.label.attr(`class`,`label usecase-json-key`),bbox:t.bbox},value:{label:r.label.attr(`class`,`label usecase-json-value`),bbox:r.bbox}})}let f=Math.max(0,...d.map(({key:e})=>e.bbox.width))+Qt*2,p=Math.max(0,...d.map(({value:e})=>e.bbox.width))+Qt*2,m=c.width+Qt*2,h=Math.max(m,f+p),g=p+Math.max(0,h-f-p),_=c.height+$t*2,v=d.map(({key:e,value:t})=>Math.max(e.bbox.height,t.bbox.height)+$t*2),y=_+v.reduce((e,t)=>e+t,0),S=nn(o.get(`stroke-width`)),w=h+S*2,E=y+S*2,D=-h/2,O=-y/2,k=n.look===`handDrawn`?T.svg(s):void 0,A=k?b(n,{}):void 0,j=e((e,t,n,r,i,o)=>{if(k&&A){let a=k.rectangle(n,r,i,o,A);return e.insert(()=>a,`:first-child`).attr(`class`,t)}return e.insert(`rect`,`:first-child`).attr(`class`,t).attr(`x`,n).attr(`y`,r).attr(`width`,i).attr(`height`,o).attr(`style`,a)},`insertCell`),M=j(s,`label-container usecase-json-border`,-w/2,-E/2,w,E);j(u,`usecase-json-cell usecase-json-title-cell`,D,O,h,_),u.node()?.append(l.node()),tn(l,c,0,O+_/2);let N=O+_;return d.forEach(({key:e,value:t},n)=>{let r=v[n],i=u.append(`g`).attr(`class`,`usecase-json-row`).attr(`data-row-index`,n).attr(`transform`,`translate(0,${N})`);j(i,`usecase-json-cell usecase-json-key-cell`,D,0,f,r),j(i,`usecase-json-cell usecase-json-value-cell`,D+f,0,g,r),i.node()?.append(e.label.node(),t.label.node()),tn(e.label,e.bbox,D+f/2,r/2),tn(t.label,t.bbox,D+f+g/2,r/2),N+=r}),I(n,M),n.intersect=e=>K.rect(n,e),s}e(rn,`usecaseJsonTable`);async function an(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(c),y=b(t,{}),S=[{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}],C=[{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 w=R(S),E=v.path(w,y),D=R(C),O=v.path(D,y);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.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))})`),I(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}e(an,`multiRect`);async function on(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(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=z(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],S=[{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}],C=[{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}],w=T.svg(i),E=b(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=R(S),O=w.path(D,E),k=R(C),A=w.path(k,E),j=i.insert(()=>O,`:first-child`);return j.insert(()=>A),j.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p-(a.y-(a.top??0))})`),I(t,j),t.intersect=function(e){return K.polygon(t,S,e)},i}e(on,`multiWaveEdgedRectangle`);async function sn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await P(e,t,L(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=T.svg(a),g=b(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,v),t.intersect=function(e){return K.rect(t,e)},a}e(sn,`note`);var cn=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 ln(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(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=T.svg(i),n=b(t,{}),r=cn(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=J(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),I(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}];return K.polygon(e,r,t)},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(ln,`question`);async function un(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,g=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:_}=t,v=T.svg(s),y=b(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=R(g),C=v.path(S,y),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,w),t.intersect=function(e){return K.polygon(t,g,e)},s}e(un,`rect_left_inv_arrow`);async function dn(e,r){let{labelStyles:i,nodeStyles:a}=x(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await se(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await se(d,Array.isArray(g)?g.join(`<br/>`):g,r.labelStyle,!0,!0),y=v.children[0],S=n(v);h=y.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let C=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+C+5)+`)`),n(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-C+3)+`)`);let w=h.width+(r.padding||0),E=h.height+(r.padding||0),D=-h.width/2-C,O=-h.height/2-C,k,A;if(r.look===`handDrawn`){let e=T.svg(c),n=b(r,{}),i=e.path(q(D,O,w,E,r.rx||0),n),a=e.line(-h.width/2-C,-h.height/2-C+_.height+C,h.width/2+C,-h.height/2-C+_.height+C,n);A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-C).attr(`y`,-h.height/2-C).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-C).attr(`x2`,h.width/2+C).attr(`y1`,-h.height/2-C+_.height+C).attr(`y2`,-h.height/2-C+_.height+C);return I(r,k),r.intersect=function(e){return K.rect(r,e)},c}e(dn,`rectWithTitle`);async function fn(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ke(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(fn,`roundedRect`);var pn=8;async function mn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?pn:pn*2),u=(t?.height??s.height)+a*2,d=l-pn,f=u,p=pn-l/2,m=-u/2,{cssStyles:g}=t,_=T.svg(o),v=b(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-pn,y:m+f},{x:p-pn,y:m},{x:p,y:m},{x:p,y:m+f}],S=_.polygon(y.map(e=>[e.x,e.y]),v),C=o.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`).attr(`style`,h(g)),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${pn/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),I(t,C),t.intersect=function(e){return K.rect(t,e)},o}e(mn,`shadedProcess`);async function hn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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,_=T.svg(s),v=b(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}],S=R(y),C=_.path(S,v),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,r),w.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))})`),I(t,w),t.intersect=function(e){return K.polygon(t,y,e)},s}e(hn,`slopedRect`);async function gn(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n,a=await Ke(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i});if(t.colorIndex!==void 0){let{theme:e,themeVariables:n}=u();w(a,t.colorIndex,e,n.borderColorArray)}return a}e(gn,`squareRect`);var _n=50,vn=e((e,t,n)=>{let r=e.height+n,i=r*Math.cos(Math.PI/(2*(_n-1))),a=Math.sqrt(Math.max(0,i**2-e.height**2));return{w:Math.max(e.width+r/4+t,1.5*r+(r-i),e.width+t+r-a),h:r}},`stadiumDimensions`);async function yn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?40:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await P(e,t,L(t)),{w:l,h:u}=vn(c,a,o),d=u/2,{cssStyles:f}=t,p=T.svg(s),m=b(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2+d,y:-u/2},{x:l/2-d,y:-u/2},...B(-l/2+d,0,d,_n,90,270),{x:l/2-d,y:u/2},...B(l/2-d,0,d,_n,270,450)],g=R(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),I(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}e(yn,`stadium`);async function bn(e,t){return Ke(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(bn,`state`);function xn(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=x(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=T.svg(u),f=b(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 I(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}e(xn,`stateEnd`);function Sn(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=T.svg(a).circle(0,0,t.width,S(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 I(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}e(Sn,`stateStart`);var Cn=8;async function wn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=Math.max(c.width+2*Cn+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Cn,f=u,p=-l/2,m=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=T.svg(s),n=b(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Cn,m,p+Cn,m+f,n),a=e.line(p+Cn+d,m,p+Cn+d,m+f,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`,h(c)),I(t,o)}else{let e=J(s,d,f,g);r&&e.attr(`style`,r),I(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}e(wn,`subroutine`);var Tn=.2;async function En(e,t){let{labelStyles:n,nodeStyles:r}=x(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-Tn*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await P(e,t,L(t)),l=(t?.height?t?.height:c.height)+o*2,u=Tn*l,d=Tn*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=T.svg(s),v=b(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}],S=[{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 C=R(y),w=_.path(C,v),E=R(S),D=_.path(E,{...v,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>w,`:first-child`),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),I(t,O),t.intersect=function(e){return K.polygon(t,y,e)},s}e(En,`taggedRect`);async function Dn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await P(e,t,L(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=T.svg(i),h=b(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...z(-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},...z(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=R(g),C=m.path(S,h),w=R(y),E=m.path(w,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>C,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.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))})`),I(t,D),t.intersect=function(e){return K.polygon(t,g,e)},i}e(Dn,`taggedWaveEdgedRectangle`);async function On(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await P(e,t,L(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),I(t,u),t.intersect=function(e){return K.rect(t,e)},i}e(On,`text`);var kn=e((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
|
+
a${i},${a} 0,0,1 0,${-r}
|
|
4
|
+
l${n},0
|
|
5
|
+
a${i},${a} 0,0,1 0,${r}
|
|
6
|
+
M${n},${-r}
|
|
7
|
+
a${i},${a} 0,0,0 0,${r}
|
|
8
|
+
l${-n},0`,`createCylinderPathD`),An=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`),jn=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),Mn=5,Nn=10;async function Pn(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.height<Mn&&(t.height=Mn)),t.width){let e=o/2/(2.5+o/50);t.width=t.width-a-e*3,t.width<Nn&&(t.width=Nn)}let{shapeSvg:s,bbox:c,label:l}=await P(e,t,L(t)),u=Math.max(t.height??0,c.height)+a,d=u/2,f=d/(2.5+u/50),p=Math.max(t.width??0,c.width)+f+a,{cssStyles:m}=t,g;if(t.look===`handDrawn`){let e=T.svg(s),n=An(0,0,p,u,f,d),r=jn(0,0,p,u,f,d),i=e.path(n,b(t,{})),a=e.path(r,b(t,{fill:`none`}));g=s.insert(()=>a,`:first-child`),g=s.insert(()=>i,`:first-child`),g.attr(`class`,`basic label-container`),m&&g.attr(`style`,m)}else{let e=kn(0,0,p,u,f,d);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,h(m)).attr(`style`,r),g.attr(`class`,`basic label-container outer-path`),m&&g.selectAll(`path`).attr(`style`,m),r&&g.selectAll(`path`).attr(`style`,r)}return g.attr(`label-offset-x`,f),g.attr(`transform`,`translate(${-p/2}, ${u/2} )`),l.attr(`transform`,`translate(${-(c.width/2)-f-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),I(t,g),t.intersect=function(e){let n=K.rect(t,e),r=n.y-(t.y??0);if(d!=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-f)){let i=f*f*(1-r*r/(d*d));i!=0&&(i=Math.sqrt(Math.abs(i))),i=f-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}e(Pn,`tiltedCylinder`);async function Fn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),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=T.svg(s),n=b(t,{}),r=R(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=J(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,I(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(Fn,`trapezoid`);async function In(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=T.svg(s),p=b(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=R(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),I(t,_),t.intersect=function(e){return K.polygon(t,m,e)},s}e(In,`trapezoidalPentagon`);var Ln=10,Rn=10;async function zn(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.width=((n?.width??0)-o)/2,n.width<Rn&&(n.width=Rn),n.height=n?.height??0,n.height<Ln&&(n.height=Ln));let{shapeSvg:s,bbox:c,label:d}=await P(e,n,L(n)),f=l(u().flowchart?.htmlLabels),p=(n?.width?n?.width:c.width)+o,m=n?.height?n?.height:p+c.height,h=m,g=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-m}],{cssStyles:_}=n,v=T.svg(s),y=b(n,{});n.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=R(g),C=v.path(S,y),w=s.insert(()=>C,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,_),i&&n.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,i),n.width=p,n.height=m,I(n,w),d.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${m/2-(c.height+(n.padding??0)/(f?2:1)-(c.y-(c.top??0)))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,g,e),K.polygon(n,g,e)},s}e(zn,`triangle`);async function Bn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(c),y=b(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=[{x:-d/2-_,y:m/2},...z(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],C=R(S),w=v.path(C,y),E=c.insert(()=>w,`:first-child`);return E.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),E.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))})`),I(t,E),t.intersect=function(e){return K.polygon(t,S,e)},c}e(Bn,`waveEdgedRectangle`);async function Vn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(s),h=b(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...z(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...z(l/2,-f/2,-l/2,-f/2,d,-1)],_=R(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),I(t,y),t.intersect=function(e){return K.polygon(t,g,e)},s}e(Vn,`waveRectangle`);var Q=10;async function Hn(e,t){let{labelStyles:n,nodeStyles:r}=x(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 P(e,t,L(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=T.svg(o),_=b(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}
|
|
9
|
+
M${p-Q},${m} L${p+d},${m}
|
|
10
|
+
M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let S=g.path(y,_),C=o.insert(()=>S,`:first-child`);return C.attr(`transform`,`translate(${Q/2}, ${Q/2})`),C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.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))})`),I(t,C),t.intersect=function(e){return K.polygon(t,v,e)},o}e(Hn,`windowPane`);var Un=new Set([`redux-color`,`redux-dark-color`]),Wn=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Gn(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:a}=s(),{rowEven:o,rowOdd:c,nodeBorder:u,borderColorArray:d}=a;if(t.look===`handDrawn`){let{themeVariables:n}=s(),{background:r}=n;await Gn(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let f=s();t.useHtmlLabels=f.htmlLabels;let p=f.er?.diagramPadding??10,h=f.er?.entityPadding??6,{cssStyles:g}=t,{labelStyles:_,nodeStyles:v}=x(t);if(r.attributes.length===0&&t.label){let n={rx:0,ry:0,labelPaddingX:p,labelPaddingY:p*1.5,classes:``};m(t.label,f)+n.labelPaddingX*2<f.er.minEntityWidth&&(t.width=f.er.minEntityWidth);let a=await Ke(e,t,n);if(i!=null&&Un.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||(p*=1.25,h*=1.25);let y=L(t);y||=`node default`;let S=e.insert(`g`).attr(`class`,y).attr(`id`,t.domId||t.id),C=await Kn(S,t.label??``,f,0,0,[`name`],_);C.height+=h;let w=0,E=[],D=[],O=0,k=0,A=0,j=0,M=!0,N=!0;for(let e of r.attributes){let t=await Kn(S,e.type,f,0,w,[`attribute-type`],_);O=Math.max(O,t.width+p);let n=await Kn(S,e.name,f,0,w,[`attribute-name`],_);k=Math.max(k,n.width+p);let r=await Kn(S,e.keys.join(),f,0,w,[`attribute-keys`],_);A=Math.max(A,r.width+p);let i=await Kn(S,e.comment,f,0,w,[`attribute-comment`],_);j=Math.max(j,i.width+p);let a=Math.max(t.height,n.height,r.height,i.height)+h;D.push({yOffset:w,rowHeight:a}),w+=a}let P=4;A<=p&&(M=!1,A=0,P--),j<=p&&(N=!1,j=0,P--);let F=S.node().getBBox();if(C.width+p*2-(O+k+A+j)>0){let e=C.width+p*2-(O+k+A+j);O+=e/P,k+=e/P,A>0&&(A+=e/P),j>0&&(j+=e/P)}let R=O+k+A+j,z=T.svg(S),B=b(t,{});t.look!==`handDrawn`&&(B.roughness=0,B.fillStyle=`solid`);let ee=0;D.length>0&&(ee=D.reduce((e,t)=>e+(t?.rowHeight??0),0));let V=Math.max(F.width+p*2,t?.width||0,R),te=Math.max((ee??0)+C.height,t?.height||0),H=-V/2,U=-te/2;if(S.selectAll(`g:not(:first-child)`).each((e,t,r)=>{let i=n(r[t]),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+=O:i.attr(`class`).includes(`attribute-keys`)?o+=O+k:i.attr(`class`).includes(`attribute-comment`)&&(o+=O+k+A))}i.attr(`transform`,`translate(${H+p/2+o}, ${s+U+C.height+h/2})`)}),S.select(`.name`).attr(`transform`,`translate(`+-C.width/2+`, `+(U+h/2)+`)`),i!=null&&Un.has(i)){let e=r.colorIndex??0;S.attr(`data-color-id`,`color-${e%d.length}`)}let ne=z.rectangle(H,U,V,te,B),re=S.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,g.join(``));E.push(0);for(let[e,t]of D.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=z.rectangle(H,C.height+U+t?.yOffset,V,t?.rowHeight,{...B,fill:n?o:c,stroke:u});S.insert(()=>r,`g.label`).attr(`style`,g.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=qn(H,C.height+U,V+H,C.height+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B);if(S.insert(()=>G).attr(`class`,`divider`),W=qn(O+H,C.height+U,O+H,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`),M){let e=O+k+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(N){let e=O+k+A+H;W=qn(e,C.height+U,e,te+U,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}for(let e of E){let t=C.height+U+e;W=qn(H,t,V+H,t,ie),G=z.polygon(W.map(e=>[e.x,e.y]),B),S.insert(()=>G).attr(`class`,`divider`)}if(I(t,re),v&&t.look!==`handDrawn`){if(i!=null&&Wn.has(i))S.selectAll(`path`).attr(`style`,v);else{let e=v.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);S.selectAll(`path`).attr(`style`,e??``),S.selectAll(`.row-rect-even path`).attr(`style`,v)}}return t.intersect=function(e){return K.rect(t,e)},S}e(Gn,`erBox`);async function Kn(e,t,r,i=0,o=0,s=[],c=``){let u=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${o})`).attr(`style`,c);t!==a(t)&&(t=a(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=u.node().appendChild(await v(u,t,{width:m(t,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(t.includes(`<`)||t.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(r.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let t=n(d);f=e.getBoundingClientRect(),t.attr(`width`,f.width),t.attr(`height`,f.height)}return f}e(Kn,`addText`);function qn(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(qn,`lineToPolygon`);async function Jn(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,L(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 Yn(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Yn(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 Yn(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 Yn(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(Jn,`textHelper`);async function Yn(e,t,a,o=[]){let c=e.insert(`g`).attr(`class`,`label`).attr(`style`,o.join(`; `)),u=s(),d=`useHtmlLabels`in t?t.useHtmlLabels:l(u.htmlLabels)??!0,p=``;p=`text`in t?t.text:t.label,!d&&p.startsWith(`\\`)&&(p=p.substring(1)),r(p)&&(d=!0);let h=await v(c,i(f(p)),{width:m(p,u)+50,classes:`markdown-node-label`,useHtmlLabels:d},u),g,_=1;if(d){let e=h.children[0],t=n(h);_=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(_+=e.innerHTML.split(`<mrow>`).length-1),await O(e),g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}else{o.includes(`font-weight: bolder`)&&n(h).selectAll(`tspan`).attr(`font-weight`,``),_=h.children.length;let e=h.children[0];(h.textContent===``||h.textContent.includes(`>`))&&(e.textContent=p[0]+p.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),p[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),g=h.getBBox()}return c.attr(`transform`,`translate(0,`+(-g.height/(2*_)+a)+`)`),g.height}e(Yn,`addText`);async function Xn(e,t){let r=u(),{theme:i,themeVariables:a}=r,{useGradient:o,borderColorArray:s}=a,c=r.class.padding??12,d=c,f=t.useHtmlLabels??l(r.htmlLabels)??!0,p=t;p.annotations=p.annotations??[],p.members=p.members??[],p.methods=p.methods??[];let{shapeSvg:m,bbox:h}=await Jn(e,t,r,f,d);w(m,t.colorIndex,i,s);let{labelStyles:g,nodeStyles:_}=x(t);t.labelStyle=g,t.cssStyles=p.styles||``;let v=p.styles?.join(`;`)||_||``;t.cssStyles||=v.replaceAll(`!important`,``).split(`;`);let y=p.members.length===0&&p.methods.length===0&&!r.class?.hideEmptyMembersBox,S=T.svg(m),C=b(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let E=Math.max(t.width??0,h.width),D=Math.max(t.height??0,h.height),O=(t.height??0)>h.height;p.members.length===0&&p.methods.length===0?D+=d:p.members.length>0&&p.methods.length===0&&(D+=d*2);let k=-E/2,A=-D/2,j=y?c*2:p.members.length===0&&p.methods.length===0?-c:0;O&&(j=c*2);let M=S.rectangle(k-c,A-c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0),E+2*c,D+2*c+j,C),N=m.insert(()=>M,`:first-child`);N.attr(`class`,`basic label-container outer-path`);let P=N.node().getBBox(),F=m.select(`.annotation-group`).node().getBBox().height-(y?c/2:0)||0,L=m.select(`.label-group`).node().getBBox().height-(y?c/2:0)||0,R=m.select(`.members-group`).node().getBBox().height-(y?c/2:0)||0,z=(F+L+A+c-(A-c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0)))/2;if(m.selectAll(`.text`).each((e,t,i)=>{let a=n(i[t]),o=a.attr(`transform`),s=0;if(o){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);e&&(s=parseFloat(e[2]))}let l=s+A+c-(y?c:p.members.length===0&&p.methods.length===0?-c/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(R,d/2);l=O?Math.max(z,F+L+e+A+d*2+c)+d*2:F+L+e+A+d*4+c}p.members.length===0&&p.methods.length===0&&r.class?.hideEmptyMembersBox&&(l=p.annotations.length>0?s-d:s),f||(l-=4);let u=k;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(u=-a.node()?.getBBox().width/2||0,m.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(u=0)})),a.attr(`transform`,`translate(${u}, ${l})`)}),p.members.length>0||p.methods.length>0||y){let e=F+L+A+c,n=S.line(P.x,e,P.x+P.width,e+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,v)}if(y||p.members.length>0||p.methods.length>0){let e=F+L+R+A+d*2+c,n=S.line(P.x,O?Math.max(z,e):e,P.x+P.width,(O?Math.max(z,e):e)+.001,C);m.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!o?` neo-line`:``}`).attr(`style`,v)}if(p.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,v),N.select(`:nth-child(2)`).attr(`style`,v),m.selectAll(`.divider`).select(`path`).attr(`style`,v),t.labelStyle?m.selectAll(`span`).attr(`style`,t.labelStyle):m.selectAll(`span`).attr(`style`,v),!f){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(v);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}else if(g){let t=e.exec(g);if(t){let e=t[0].replace(`color`,`fill`);m.selectAll(`tspan`).attr(`style`,e)}}}return I(t,N),t.intersect=function(e){return K.rect(t,e)},m}e(Xn,`classBox`);async function Zn(e,t){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r;let a=t,o=t,s=`verifyMethod`in t,c=L(t),l=u(),{themeVariables:d}=l,{borderColorArray:f,requirementEdgeLabelBackground:p}=d,m=l.layout===`elk`?`start`:`center`,h=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),g;g=s?await $(h,`<<${a.type}>>`,0,t.labelStyle):await $(h,`<<Element>>`,0,t.labelStyle);let _=g,v=await $(h,a.name,_,t.labelStyle+`; font-weight: bold;`);if(_+=v+20,s){let e=await $(h,`${a.requirementId?`ID: ${a.requirementId}`:``}`,_,t.labelStyle,m);_+=e;let n=await $(h,`${a.text?`Text: ${a.text}`:``}`,_,t.labelStyle,m);_+=n;let r=await $(h,`${a.risk?`Risk: ${a.risk}`:``}`,_,t.labelStyle,m);_+=r,await $(h,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:``}`,_,t.labelStyle,m)}else{let e=await $(h,`${o.type?`Type: ${o.type}`:``}`,_,t.labelStyle,m);_+=e,await $(h,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,_,t.labelStyle,m)}let y=(h.node()?.getBBox().width??200)+20,S=(h.node()?.getBBox().height??200)+20,C=-y/2,w=-S/2,E=T.svg(h),D=b(t,{});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(C,w,y,S,D),k=h.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,i),f?.length){let e=t.colorIndex??0;h.attr(`data-color-id`,`color-${e%f.length}`)}if(h.selectAll(`.label`).each((e,t,r)=>{let i=n(r[t]),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-S/2,l=C+10;(t===0||t===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),_>g+v+20){let e=w+g+v+20,n;if(t.look===`neo`){let t=.001,r=[[C,e],[C+y,e],[C+y,e+t],[C,e+t]];n=E.polygon(r,D)}else n=E.line(C,e,C+y,e,D);h.insert(()=>n).attr(`class`,`divider`)}return I(t,k),t.intersect=function(e){return K.rect(t,e)},i&&t.look!==`handDrawn`&&(p||f?.length)&&h.selectAll(`path`).attr(`style`,i),h}e(Zn,`requirementBox`);async function $(e,t,r,a=``,o=`center`){if(t===``)return 0;let s=e.insert(`g`).attr(`class`,`label`).attr(`style`,a),c=u(),l=c.htmlLabels??!0,d=await v(s,i(f(t)),{width:m(t,c)+50,classes:`markdown-node-label`,useHtmlLabels:l,style:a},c),p;if(l){let e=d.children[0],t=n(d);o===`start`&&n(e).style(`text-align`,`left`),p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=d.children[0];for(let t of e.children)a&&t.setAttribute(`style`,a);if(o===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}p=d.getBBox(),p.height+=6}return s.attr(`transform`,`translate(${-p.width/2},${-p.height/2+r})`),p.height}e($,`addText`);var Qn=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 $n(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=x(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await P(e,t,L(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 F(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await F(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await F(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,S=-_/2,C=-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 w,{rx:E,ry:D}=t,{cssStyles:O}=t;if(t.look===`handDrawn`){let e=T.svg(o),n=b(t,{}),r=E||D?e.path(q(S,C,_,y,E||0),n):e.rectangle(S,C,_,y,n);w=o.insert(()=>r,`:first-child`),w.attr(`class`,`basic label-container`).attr(`style`,O||null)}else{w=o.insert(`rect`,`:first-child`),w.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,E??5).attr(`ry`,D??5).attr(`x`,S).attr(`y`,C).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=S+2,r=C+Math.floor((E??0)/2),i=C+y-Math.floor((E??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Qn(e))}}return I(t,w),t.height=y,t.intersect=function(e){return K.rect(t,e)},o}e($n,`kanbanItem`);async function er(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+10*s,u=o.height+8*s,d=.15*l,{cssStyles:f}=n,p=o.width+20,m=o.height+20,g=Math.max(l,p),_=Math.max(u,m);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let v,y=`M0 0
|
|
11
|
+
a${d},${d} 1 0,0 ${g*.25},${-1*_*.1}
|
|
12
|
+
a${d},${d} 1 0,0 ${g*.25},0
|
|
13
|
+
a${d},${d} 1 0,0 ${g*.25},0
|
|
14
|
+
a${d},${d} 1 0,0 ${g*.25},${_*.1}
|
|
15
|
+
|
|
16
|
+
a${d},${d} 1 0,0 ${g*.15},${_*.33}
|
|
17
|
+
a${d*.8},${d*.8} 1 0,0 0,${_*.34}
|
|
18
|
+
a${d},${d} 1 0,0 ${-1*g*.15},${_*.33}
|
|
19
|
+
|
|
20
|
+
a${d},${d} 1 0,0 ${-1*g*.25},${_*.15}
|
|
21
|
+
a${d},${d} 1 0,0 ${-1*g*.25},0
|
|
22
|
+
a${d},${d} 1 0,0 ${-1*g*.25},0
|
|
23
|
+
a${d},${d} 1 0,0 ${-1*g*.25},${-1*_*.15}
|
|
24
|
+
|
|
25
|
+
a${d},${d} 1 0,0 ${-1*g*.1},${-1*_*.33}
|
|
26
|
+
a${d*.8},${d*.8} 1 0,0 0,${-1*_*.34}
|
|
27
|
+
a${d},${d} 1 0,0 ${g*.1},${-1*_*.33}
|
|
28
|
+
H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=b(n,{}),r=e.path(y,t);v=a.insert(()=>r,`:first-child`),v.attr(`class`,`basic label-container`).attr(`style`,h(f))}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})`),I(n,v),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Bang intersect`,n,e),K.rect(n,e)},a}e(er,`bang`);async function tr(e,n){let{labelStyles:r,nodeStyles:i}=x(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await P(e,n,L(n)),l=o.width+2*s,u=o.height+2*s,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:g}=n,_,v=`M0 0
|
|
29
|
+
a${d},${d} 0 0,1 ${l*.25},${-1*l*.1}
|
|
30
|
+
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
31
|
+
a${f},${f} 1 0,1 ${l*.35},${l*.2}
|
|
32
|
+
|
|
33
|
+
a${d},${d} 1 0,1 ${l*.15},${u*.35}
|
|
34
|
+
a${m},${m} 1 0,1 ${-1*l*.15},${u*.65}
|
|
35
|
+
|
|
36
|
+
a${f},${d} 1 0,1 ${-1*l*.25},${l*.15}
|
|
37
|
+
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
38
|
+
a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
39
|
+
|
|
40
|
+
a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35}
|
|
41
|
+
a${m},${m} 1 0,1 ${l*.1},${-1*u*.65}
|
|
42
|
+
H0 V0 Z`;if(n.look===`handDrawn`){let e=T.svg(a),t=b(n,{}),r=e.path(v,t);_=a.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,h(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})`),I(n,_),n.calcIntersect=function(e,t){return K.rect(e,t)},n.intersect=function(e){return t.info(`Cloud intersect`,n,e),K.rect(n,e)},a}e(tr,`cloud`);async function nr(e,t){let{labelStyles:n,nodeStyles:r}=x(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await P(e,t,L(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
|
43
|
+
M${-c/2} ${l/2-5}
|
|
44
|
+
v${-l+10}
|
|
45
|
+
q0,-5 5,-5
|
|
46
|
+
h${c-10}
|
|
47
|
+
q5,0 5,5
|
|
48
|
+
v${l-5}
|
|
49
|
+
H${-c/2}
|
|
50
|
+
Z
|
|
51
|
+
`:`
|
|
52
|
+
M${-c/2} ${l/2-5}
|
|
53
|
+
v${-l+10}
|
|
54
|
+
q0,-5 5,-5
|
|
55
|
+
h${c-10}
|
|
56
|
+
q5,0 5,5
|
|
57
|
+
v${l-10}
|
|
58
|
+
q0,5 -5,5
|
|
59
|
+
h${-(c-10)}
|
|
60
|
+
q-5,0 -5,-5
|
|
61
|
+
Z
|
|
62
|
+
`;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()),I(t,d),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},i}e(nr,`defaultMindmapNode`);async function rr(e,t){return Ae(e,t,{padding:t.padding??0})}e(rr,`mindmapCircle`);var ir=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:gn},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:fn},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:yn},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:wn},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ge},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:qe},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:tt},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:fe},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:Me},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:Ee},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:ze},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:Ae},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:er},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:tr},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:ln},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:at},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:ht},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:mt},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Fn},{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:ft},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Ye},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:On},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:Oe},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:mn},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:Sn},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:xn},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:nt},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:ot},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:Fe},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Ie},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Le},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:gt},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Bn},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:rt},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Pn},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:St},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:Re},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Je},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:zn},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Hn},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Ze},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:In},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:et},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:hn},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:on},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:an},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:de},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:Pe},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:Dn},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:En},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Vn},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:un},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:Ct}],ar=e(()=>{let e=[...Object.entries({state:bn,choice:ke,note:sn,composite:je,rectWithTitle:dn,labelRect:pt,block_arrow:Te,collapsedGroup:ve,iconSquare:ut,iconCircle:ct,icon:st,iconRounded:lt,imageSquare:dt,anchor:ce,kanbanItem:$n,mindmapCircle:rr,defaultMindmapNode:nr,classBox:Xn,erBox:Gn,requirementBox:Zn,usecaseActor:Bt,usecaseActorHollow:Wt,usecaseActorAwesome:Ht,usecaseActorIcon:Yt,usecaseBusiness:Zt,usecaseEllipse:Xe,usecaseJsonTable:rn}),...ir.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 or(e){return e in ar}e(or,`isValidShape`);export{or as a,I as c,V as i,q as n,P as o,K as r,ar as s,se as t};
|