pop-agent 0.1.1 → 0.1.2
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/dist/server/asr/bridge.js +135 -188
- package/dist/server/asr/routes.js +20 -11
- package/dist/server/computer/helper-client.js +3 -2
- package/dist/server/snapshot/state.js +3 -0
- package/package.json +2 -8
- package/web/dist/assets/{architecture-WOLXFQ4H-DwHKr8GA.js → architecture-WOLXFQ4H-DOSQge0o.js} +1 -1
- package/web/dist/assets/{blockDiagram-RJAE7QA3-CA2AOM6-.js → blockDiagram-RJAE7QA3-DJFf5WSV.js} +1 -1
- package/web/dist/assets/channel-Dys6KAxG.js +1 -0
- package/web/dist/assets/{chunk-55XCU76K-DlITu1ZH.js → chunk-55XCU76K-BymFzRwu.js} +1 -1
- package/web/dist/assets/{chunk-7S6XSTFO-DzX1XF3_.js → chunk-7S6XSTFO-0TGPJxiv.js} +1 -1
- package/web/dist/assets/{chunk-AQDTSKZB-BdEDejS-.js → chunk-AQDTSKZB-C3NroFBT.js} +1 -1
- package/web/dist/assets/{chunk-DSNLSHJZ-Chj2PD0m.js → chunk-DSNLSHJZ-C_LIPn61.js} +1 -1
- package/web/dist/assets/{chunk-HNE4Q36P-V3jylrEv.js → chunk-HNE4Q36P-riaksE6p.js} +1 -1
- package/web/dist/assets/{chunk-VQ5W62QI-BiWZxVe5.js → chunk-VQ5W62QI-D1v-PJLW.js} +1 -1
- package/web/dist/assets/{chunk-WQQL4CDK-BtyaHLI7.js → chunk-WQQL4CDK-Dv8ocEd6.js} +1 -1
- package/web/dist/assets/{chunk-ZAUX2LTX-DS3wpSTy.js → chunk-ZAUX2LTX-DP4s36LS.js} +1 -1
- package/web/dist/assets/{chunk-ZCHMQSOR-at82jgqF.js → chunk-ZCHMQSOR-CgvPm9f1.js} +1 -1
- package/web/dist/assets/{classDiagram-v2-4MYWR3UA-CTgR1e3M.js → classDiagram-v2-4MYWR3UA-BbG5SHcI.js} +1 -1
- package/web/dist/assets/{cynefin-EF2NZ3EQ-Pg-c-yVE.js → cynefin-EF2NZ3EQ-DImLnJIk.js} +1 -1
- package/web/dist/assets/{dagre-NK4GIZVX-B0Ivt5Pn.js → dagre-NK4GIZVX-DKVcPJLn.js} +1 -1
- package/web/dist/assets/{diagram-I5XIIV2D-jE6SNlbX.js → diagram-I5XIIV2D-Cgadlzhg.js} +1 -1
- package/web/dist/assets/{diagram-RJA3I4VV-DQJNgW0u.js → diagram-RJA3I4VV-_sRGhjHY.js} +1 -1
- package/web/dist/assets/{elk-QONTBCTQ-KOJVoDyP.js → elk-QONTBCTQ-m1jnHGpZ.js} +1 -1
- package/web/dist/assets/{erDiagram-KYQIGQAA-DNUqfe2J.js → erDiagram-KYQIGQAA-BJA55Q8F.js} +1 -1
- package/web/dist/assets/{eventmodeling-K75KTNOO-DnxXCUaf.js → eventmodeling-K75KTNOO-B0sNQJ7K.js} +1 -1
- package/web/dist/assets/{flowDiagram-IUGLLWBU-CRLc8ozS.js → flowDiagram-IUGLLWBU-DQTCQwSE.js} +1 -1
- package/web/dist/assets/{ganttDiagram-R7GPNTJY-DDLhSPGT.js → ganttDiagram-R7GPNTJY-DwG27iiU.js} +1 -1
- package/web/dist/assets/{gitGraph-VSP46ZUC-BjfoZeXP.js → gitGraph-VSP46ZUC-XxCjGklF.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-PDYL7XHY-6uZGw3lU.js → gitGraphDiagram-PDYL7XHY-juq_nFAa.js} +1 -1
- package/web/dist/assets/{index-CQ1VhLwx.js → index-D-YnULfY.js} +27 -27
- package/web/dist/assets/{info-OHQRW6UA-BMDHcIvy.js → info-OHQRW6UA-BGvjB5Yf.js} +1 -1
- package/web/dist/assets/{infoDiagram-MVDRKAX5-C2d1Uwhn.js → infoDiagram-MVDRKAX5-BPn-AsQi.js} +1 -1
- package/web/dist/assets/{journeyDiagram-BOSHW7O7-BAE_nPCd.js → journeyDiagram-BOSHW7O7-BXvjbozA.js} +1 -1
- package/web/dist/assets/{kanban-definition-FNSA4HC5-C2Z3ejvx.js → kanban-definition-FNSA4HC5-CxyIdAwF.js} +1 -1
- package/web/dist/assets/{line-DHlXL-f4.js → line-IQmg25td.js} +1 -1
- package/web/dist/assets/{mermaid-parser.core-CxD9DMnU.js → mermaid-parser.core-DZwBblMg.js} +3 -3
- package/web/dist/assets/{mermaid.core-CdVzG6_M.js → mermaid.core-CQFwDpsY.js} +4 -4
- package/web/dist/assets/{packet-JDAUHWVQ-Cx23kBS5.js → packet-JDAUHWVQ-DgkYilva.js} +1 -1
- package/web/dist/assets/{pie-XZMESJXO-BDdtcaza.js → pie-XZMESJXO-B3VKO2xO.js} +1 -1
- package/web/dist/assets/{pieDiagram-GNMPY74T-DRqt_o8d.js → pieDiagram-GNMPY74T-BveSF0g-.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-D57K4MC3-Cq3-_E3T.js → quadrantDiagram-D57K4MC3-BQWlPpUC.js} +1 -1
- package/web/dist/assets/{radar-ABXABTNO-yJ_gp7Uq.js → radar-ABXABTNO-CN_6P1P3.js} +1 -1
- package/web/dist/assets/{railroad-I3PHUGI6-BFVVDyfL.js → railroad-I3PHUGI6-B9PNW16c.js} +1 -1
- package/web/dist/assets/{railroad-abnf-LNEFI6M7-BhhpD6rl.js → railroad-abnf-LNEFI6M7-CTmCJfja.js} +1 -1
- package/web/dist/assets/{railroad-ebnf-DWYD2UWJ-os_iV6TA.js → railroad-ebnf-DWYD2UWJ-CoEhN_zz.js} +1 -1
- package/web/dist/assets/{railroad-peg-JR7BVNR7-kex9mDBE.js → railroad-peg-JR7BVNR7-BQYjO9-Q.js} +1 -1
- package/web/dist/assets/{requirementDiagram-EQYSW5RA-BnDM54-F.js → requirementDiagram-EQYSW5RA-DWCQ25jk.js} +1 -1
- package/web/dist/assets/{sankeyDiagram-SY24JHO5-CMQmL2Tu.js → sankeyDiagram-SY24JHO5-DsBwLv8a.js} +1 -1
- package/web/dist/assets/{sequenceDiagram-BLEHNHQU-Dqhxl46T.js → sequenceDiagram-BLEHNHQU-CXrCzr9_.js} +1 -1
- package/web/dist/assets/{stateDiagram-v2-A6IESKWZ-D1u1qdD7.js → stateDiagram-v2-A6IESKWZ-C8wl0PRO.js} +1 -1
- package/web/dist/assets/{timeline-definition-JXYKGLGB-DEjsSeWV.js → timeline-definition-JXYKGLGB-syLevD3_.js} +1 -1
- package/web/dist/assets/{treeView-D4JQ5SDB-BXYISxgj.js → treeView-D4JQ5SDB-D5Dhd9U9.js} +1 -1
- package/web/dist/assets/{treemap-SAJKECNS-B6BJK2c0.js → treemap-SAJKECNS-MiXU26tY.js} +1 -1
- package/web/dist/assets/{wardley-7MLQ67FV-DsjBYeKs.js → wardley-7MLQ67FV-DFAjR6qV.js} +1 -1
- package/web/dist/assets/{xychartDiagram-4URNHDU4-CBbRqTE2.js → xychartDiagram-4URNHDU4-DZzoyQQ0.js} +1 -1
- package/web/dist/index.html +1 -1
- package/dist/server/asr/install.js +0 -188
- package/dist/server/asr/paths.js +0 -101
- package/helper/asr/Info.plist +0 -24
- package/helper/asr/build.sh +0 -59
- package/helper/asr/main.swift +0 -279
- package/helper/asr/release/ASRBridge.zip +0 -0
- package/web/dist/assets/channel-PVcvMEH-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BWF7jMDv.js";import{O as r,R as i,b as a,f as o,g as s,j as c,w as l,y as u,z as d}from"./chunk-DSNLSHJZ-Chj2PD0m.js";import{a as f,n as p,o as m,r as h}from"./chunk-AQDTSKZB-BdEDejS-.js";import{f as g,l as _,r as v,t as y}from"./chunk-7S6XSTFO-DzX1XF3_.js";import{s as b}from"./chunk-J5ZVWO5B-oDCd-gWO.js";var x=e(e=>{let{handDrawnSeed:t}=a();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},`solidStateFill`),S=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),C=e(e=>{let t=w([...e.cssCompiledStyles||[],...e.cssStyles||[],...S(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),w=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),T=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),E=e(e=>{let{stylesArray:t}=C(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];T(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),D=e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i,mainBkg:o}=n,{stylesMap:s}=C(e);return Object.assign({roughness:.7,fill:s.get(`fill`)||o,fillStyle:`hachure`,fillWeight:1.5,hachureGap:1.5,stroke:s.get(`stroke`)||i,seed:r,strokeWidth:s.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:O(s.get(`stroke-dasharray`))},t)},`userNodeOverrides`),O=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);function k(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function A(e,t){return e[0]===t[0]&&e[1]===t[1]}function j(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)k(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];A(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)k(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),k(r,t,n)})(c,s,-i)}return c}function M(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),j(e,r,n,i||1)}var N=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=M(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function P(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var ee=class extends N{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=M(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)P([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},F=class extends N{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},I=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=M(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=P(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},te=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=M(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=P(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},ne=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=M(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=P(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},L={},R=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},z=0,re=1,ie=2,ae={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function B(e,t){return e.type===t}function V(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:z,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:re,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:ie,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!B(a,ie);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return V(`M0,0`+e);i++,o=ae[a.text],r=a.text}else B(a,re)?o=ae[r]:(i++,o=ae[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!B(t,re))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof ae[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function oe(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function se(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(le(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function ce(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function le(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=ce(e,t,-u),[n,r]=ce(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=le(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],D=[n+C*x,r-w*b],O=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,D,O].concat(f);{f=[E,D,O].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=ce(f[t][0],f[t][1],u),r=ce(f[t+1][0],f[t+1][1],u),i=ce(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var ue={randOffset:function(e,t){return H(e,t)},randOffsetWithRange:function(e,t,n){return Ce(e,t,n)},ellipse:function(e,t,n,r,i){return ge(e,t,i,he(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return we(e,t,n,r,i,!0)}};function de(e,t,n,r,i){return{type:`path`,ops:we(e,t,n,r,i)}}function fe(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...we(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...we(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?de(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function pe(e,t,n,r,i){return function(e,t){return fe(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function me(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=Ee(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:Ee(n[0],1.5*(1+.22*t.roughness),xe(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=Ee(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Ee(a,1.5*(1+.22*t.roughness),xe(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function he(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=H(o*c,n),s+=H(s*c,n),{increment:a,rx:o,ry:s}}function ge(e,t,n,r){let[i,a]=Oe(r.increment,e,t,r.rx,r.ry,1,r.increment*Ce(.1,Ce(.4,1,n),n),n),o=De(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=Oe(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=De(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function _e(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=H(.01*d,c),f+=H(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=ke(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=ke(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...we(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...we(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function ve(e,t){let n=se(oe(V(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...we(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...Ae(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...we(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function ye(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+H(e,t),r[0][1]+H(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+H(e,t),r[a][1]+H(e,t)]})}}return{type:`fillPath`,ops:n}}function be(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!L[n])switch(n){case`zigzag`:L[n]||(L[n]=new ee(t));break;case`cross-hatch`:L[n]||(L[n]=new F(t));break;case`dots`:L[n]||(L[n]=new I(t));break;case`dashed`:L[n]||(L[n]=new te(t));break;case`zigzag-line`:L[n]||(L[n]=new ne(t));break;default:n=`hachure`,L[n]||(L[n]=new N(t))}return L[n]}(t,ue).fillPolygons(e,t)}function xe(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Se(e){return e.randomizer||=new R(e.seed||0),e.randomizer.next()}function Ce(e,t,n,r=1){return n.roughness*r*(Se(n)*(t-e)+e)}function H(e,t,n=1){return Ce(-e,e,t,n)}function we(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=Te(e,t,n,r,i,!0,!1);if(o)return s;let c=Te(e,t,n,r,i,!0,!0);return s.concat(c)}function Te(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*Se(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=H(p,i,l),m=H(m,i,l);let h=[],g=()=>H(d,i,l),_=()=>H(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:H(u,i,l)),t+(v?0:H(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function Ee(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+H(t,n),e[0][1]+H(t,n)]),r.push([e[0][0]+H(t,n),e[0][1]+H(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+H(t,n),e[i][1]+H(t,n)]),i===e.length-1&&r.push([e[i][0]+H(t,n),e[i][1]+H(t,n)]);return De(r,null,n)}function De(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+H(e,n),t[1]+H(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...Te(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function Oe(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=H(.5,s)-Math.PI/2;l.push([H(a,s)+t+.9*r*Math.cos(u-e),H(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[H(a,s)+t+r*Math.cos(o),H(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([H(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),H(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([H(a,s)+t+.98*r*Math.cos(u+o),H(a,s)+n+.98*i*Math.sin(u+o)]),l.push([H(a,s)+t+.9*r*Math.cos(u+.5*o),H(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function ke(e,t,n,r,i,a,o,s,c){let l=a+H(.1,c),u=[];u.push([H(s,c)+t+.9*r*Math.cos(l-e),H(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([H(s,c)+t+r*Math.cos(a),H(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),De(u,null,c)}function Ae(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:H(l[0],s)),o[1]+(f?0:H(l[0],s))]}),u=f?[i,a]:[i+H(l[p],s),a+H(l[p],s)],c.push({op:`bcurveTo`,data:[e+H(l[p],s),t+H(l[p],s),n+H(l[p],s),r+H(l[p],s),u[0],u[1]]});return c}function je(e){return[...e]}function Me(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(je(e[0]),je(e[1]),je(e[2]),je(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(je(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function Ne(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function Pe(e,t,n){let r=Ne(t,n);if(r===0)return Ne(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Ne(e,Fe(t,n,i))}function Fe(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Ie(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Ne(a,o))>1&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=Fe(a,o,r),u=Fe(o,s,r),d=Fe(s,c,r),f=Fe(l,u,r),p=Fe(u,d,r),m=Fe(f,p,r);Ie([a,l,f,m],0,n,i),Ie([m,p,d,c],0,n,i)}var a,o;return i}function Le(e,t){return Re(e,0,e.length,t)}function Re(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=Pe(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Re(e,t,l+1,r,a),Re(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function ze(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)Ie(e,3*n,t,r);return n&&n>0?Re(r,0,r.length,n):r}var U=`none`,Be=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[de(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=pe(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(ye([i],a)):o.push(be([i],a))}return a.stroke!==U&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=he(n,r,a),c=ge(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=ge(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(be([c.estimatedPoints],a))}return a.stroke!==U&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[fe(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=_e(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=_e(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=H(.01*l,o),u+=H(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),be([m],o)}(e,t,n,r,i,a,c))}return c.stroke!==U&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=me(e,n);if(n.fill&&n.fill!==U){if(n.fillStyle===`solid`){let t=me(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...ze(Me([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...ze(Me(r),10,(1+n.roughness)/2))}t.length&&r.push(be([t],n))}}return n.stroke!==U&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=fe(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(ye([e],n)):r.push(be([e],n))),n.stroke!==U&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==U,a=n.stroke!==U,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=se(oe(V(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...ze(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=Le(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=ve(e,n);if(i){if(n.fillStyle===`solid`){if(s.length===1){let t=ve(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(ye(s,n))}else r.push(be(s,n))}return a&&(o?s.forEach((e=>{r.push(fe(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:U};break;case`fillPath`:t={d:this.opsToPath(e),stroke:U,strokeWidth:0,fill:n.fill||U};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||U,strokeWidth:n,fill:U}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Ve=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},He=`http://www.w3.org/2000/svg`,Ue=class{constructor(e,t){this.svg=e,this.gen=new Be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(He,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(He,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(He,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(He,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},W={canvas:(e,t)=>new Ve(e,t),svg:(e,t)=>new Ue(e,t),generator:e=>new Be(e),newSeed:()=>Be.newSeed()},We=1,Ge=3;async function Ke(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!qe(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let e=a().fontSize?a().fontSize:window.getComputedStyle(document.body).fontSize,[n=o.fontSize]=g(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(Ke,`configureLabelImages`);function qe(e){return e.nodeType===Ge?e.textContent?.trim()!==``:e.nodeType!==We||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(qe)}e(qe,`hasTextBesidesImages`);var Je=3,Ye=32,Xe=e(async(e,t,r)=>{let o=a(),s=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,_(t.labelStyle)),l=[{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),u=t.width?Math.max(t.width-2*(t.padding??0),Ye):a().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async e=>{let r=c.append(`g`).attr(`class`,e.cssClass),a=await p(r,i(v(e.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:t.labelStyle},o);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(...f.map(({box:e})=>e.width),0),h=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${h-t.y})`),h+=t.height+Je;let g=f.length>0?h-Je:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-m/2}, ${-g/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(t.padding??0)/2,label:c}},`c4LabelHelper`),Ze=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`),G=e(async(e,t,r,{ignoreMinWidth:o=!1}={})=>{if(t.stereotype!==void 0)return Xe(e,t,r);let c,l=t.useHtmlLabels||s(a()?.htmlLabels);c=r||`node default`;let u=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId||t.id),d=u.insert(`g`).attr(`class`,`label`).attr(`style`,_(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,y=f&&!t.width&&!o?t.minWidth??0:0,b=await p(d,i(v(f),a()),{useHtmlLabels:l,width:t.width||t.wrappingWidth||a().flowchart?.wrappingWidth,minWidth:y,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},a()),x=(t?.padding??0)/2,S;if(l){let e=b.children[0],t=n(b);await Ke(e),S=await h.measure(()=>e.getBoundingClientRect()),S=Ze(S,y),t.attr(`width`,S.width),t.attr(`height`,S.height)}else S=await h.measure(()=>b.getBBox()),S=Ze(S,y);return l?d.attr(`transform`,`translate(`+-S.width/2+`, `+-S.height/2+`)`):d.attr(`transform`,`translate(0, `+-S.height/2+`)`),t.centerLabel&&d.attr(`transform`,`translate(`+-S.width/2+`, `+-S.height/2+`)`),d.insert(`rect`,`:first-child`),{shapeSvg:u,bbox:S,halfPadding:x,label:d}},`labelHelper`),Qe=e(async(e,t,r)=>{let o=r.useHtmlLabels??l(a()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),c=await p(s,i(v(t),a()),{useHtmlLabels:o,width:r.width||a()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),u=r.padding/2,d;if(l(a())){let e=c.children[0],t=n(c);d=await h.measure(()=>e.getBoundingClientRect()),t.attr(`width`,d.width),t.attr(`height`,d.height)}else d=await h.measure(()=>c.getBBox());return o?s.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`):s.attr(`transform`,`translate(0, `+-d.height/2+`)`),r.centerLabel&&s.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:d,halfPadding:u,label:s}},`insertLabel`),K=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`),q=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function J(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(J,`createPathFromPoints`);function $e(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($e,`generateFullSineWavePoints`);function Y(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(Y,`generateCirclePoints`);function et(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(et,`mergePaths`);var tt=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 nt(e,t){return e.intersect(t)}e(nt,`intersectNode`);var rt=nt;function it(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(it,`intersectEllipse`);var at=it;function ot(e,t,n){return at(e,t,t,n)}e(ot,`intersectCircle`);var st=ot;function ct(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&<(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&<(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(ct,`intersectLine`);function lt(e,t){return e*t>0}e(lt,`sameSign`);var ut=ct;function dt(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=ut(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(dt,`intersectPolygon`);var X={node:rt,circle:st,ellipse:at,polygon:dt,rect:tt},Z=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`),ft=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=a(),c=l(s);return await p(e,o,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function pt(e,n){let{labelStyles:r}=E(n);n.labelStyle=r;let i=q(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=W.svg(o),l=D(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`,_(s)),K(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),X.circle(n,1,e)},o}e(pt,`anchor`);function mt(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(mt,`generateArcPoints`);function ht(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ht,`calculateArcSagitta`);async function gt(t,n){let{labelStyles:r,nodeStyles:i}=E(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 G(t,n,q(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ht(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},...mt(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...mt(g/2,_/2,g/2,-_/2,p,m,!0)],b=W.svg(u),x=D(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=J(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),w.attr(`transform`,`translate(${p/2}, 0)`),K(n,w),n.intersect=function(e){return X.polygon(n,y,e)},u}e(gt,`bowTieRect`);async function _t(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=E(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await G(t,n,q(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=W.svg(o).path(_,D(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`),K(n,y);let b=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`);let x=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`),S=[...x(d/2,m,-1),...x(g/2,h,1).reverse()];return n.intersect=function(e){return X.polygon(n,S,e)},o}e(_t,`bucket`);var vt=20,yt=8,bt=80,xt=8;function St(e){let{themeVariables:t}=a(),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:xt,fill:n,stroke:r,cssClass:`collapsed-group`}}}e(St,`getCollapsedStyle`);async function Ct(e,t){let n=St(t.metadata?.containerType),{fill:r,stroke:i}=n,{nodeStyles:o}=E(t),{shapeSvg:s,bbox:c}=await G(e,t,q(t)),{theme:u,themeVariables:d}=a();b(s,t.colorIndex,u,d.borderColorArray);let f=t.padding??8,p=c.height,m=Math.max(c.width+f*2,bt,t?.width??0),h=Math.max(p+yt+vt+f*2,t?.height??0),g=-m/2,v=-h/2,y=-(yt+vt)/2,x=s.select(`.label`);x&&(t.useHtmlLabels??l(a())?x.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):x.attr(`transform`,`translate(0, ${-c.height/2+y})`));let S;if(t.look===`handDrawn`){let e=W.svg(s),a=D(t,{fill:r,stroke:i,...n.strokeWidth===void 0?{}:{strokeWidth:n.strokeWidth},...r===`none`?{fillWeight:0}:{fillStyle:`solid`}}),o=e.path(Z(g,v,m,h,n.rx),a);S=s.insert(()=>o,`:first-child`),S.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,_(t.cssStyles))}else S=s.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,o).attr(`rx`,n.rx).attr(`ry`,n.rx).attr(`x`,g).attr(`y`,v).attr(`width`,m).attr(`height`,h).attr(`fill`,r).attr(`stroke`,i),n.strokeWidth!==void 0&&S.attr(`stroke-width`,n.strokeWidth+`px`);let C=v+f+p+yt;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,g+8).attr(`y1`,C).attr(`x2`,g+m-8).attr(`y2`,C).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=C+vt/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return K(t,S),t.calcIntersect=function(e,t){return X.rect(e,t)},t.intersect=function(e){return X.rect(t,e)},s}e(Ct,`collapsedGroup`);function wt(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(wt,`insertPolygonShape`);var Tt=[`right`,`left`,`up`,`down`],Et=`point`,Dt=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`),Ot=e(e=>Tt.filter(t=>e.has(t)).join(`|`)||Et,`getDirectionKey`),kt={"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`),[Et]:()=>[{x:0,y:0}]},At=e((e,t,n,r)=>{let i=Dt(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(kt[Ot(i)]??kt[Et])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function jt(e,t){let n=t,{shapeSvg:r,bbox:i}=await G(e,n,q(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=At(n.directions??[],i,n,u),f=wt(r,u,o,d);return f.attr(`style`,n.style??null),K(n,f),n.intersect=function(e){return X.polygon(n,d,e)},r}e(jt,`block_arrow`);async function Mt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await G(e,t,q(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=W.svg(a).path(Z(-u/2,f,u,d,12),D(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`),K(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 X.rect(t,e)},a}e(Mt,`browser`);var Nt=12;async function Pt(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+Nt),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+Nt,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+Nt},{x:0+Nt,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=W.svg(s),n=D(t,{}),r=J(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=wt(s,l,u,p);return r&&m.attr(`style`,r),K(t,m),t.intersect=function(e){return X.polygon(t,p,e)},s}e(Pt,`card`);function Ft(e,t){let{nodeStyles:n}=E(t);t.label=``;let r=e.insert(`g`).attr(`class`,q(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=W.svg(r),c=D(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=J(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 X.polygon(t,o,e)},r}e(Ft,`choice`);async function It(e,n,r){let{labelStyles:i,nodeStyles:a}=E(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await G(e,n,q(n),{ignoreMinWidth:!0}),l=r?.padding??c,u=Math.sqrt(s.width**2+s.height**2)/2,d=n.look===`neo`?u+16:u+l,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=W.svg(o),t=D(n,{}),r=e.circle(0,0,d*2,t);f=o.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,_(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 K(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return X.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,d,e),X.circle(n,d,e)},o}e(It,`circle`);async function Lt(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await G(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),K(n,o),n.intersect=function(e){return X.rect(n,e)},r}e(Lt,`composite`);async function Rt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await G(e,t,q(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=W.svg(a).path(Z(-u/2,f,u,d,12),D(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(`>_`),K(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 X.rect(t,e)},a}e(Rt,`consoleWindow`);function zt(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}
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BWF7jMDv.js";import{O as r,R as i,b as a,f as o,g as s,j as c,w as l,y as u,z as d}from"./chunk-DSNLSHJZ-C_LIPn61.js";import{a as f,n as p,o as m,r as h}from"./chunk-AQDTSKZB-C3NroFBT.js";import{f as g,l as _,r as v,t as y}from"./chunk-7S6XSTFO-0TGPJxiv.js";import{s as b}from"./chunk-J5ZVWO5B-oDCd-gWO.js";var x=e(e=>{let{handDrawnSeed:t}=a();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},`solidStateFill`),S=e(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),C=e(e=>{let t=w([...e.cssCompiledStyles||[],...e.cssStyles||[],...S(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),w=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),T=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),E=e(e=>{let{stylesArray:t}=C(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];T(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),D=e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=a(),{nodeBorder:i,mainBkg:o}=n,{stylesMap:s}=C(e);return Object.assign({roughness:.7,fill:s.get(`fill`)||o,fillStyle:`hachure`,fillWeight:1.5,hachureGap:1.5,stroke:s.get(`stroke`)||i,seed:r,strokeWidth:s.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:O(s.get(`stroke-dasharray`))},t)},`userNodeOverrides`),O=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);function k(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function A(e,t){return e[0]===t[0]&&e[1]===t[1]}function j(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)k(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];A(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)k(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),k(r,t,n)})(c,s,-i)}return c}function M(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),j(e,r,n,i||1)}var N=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=M(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function P(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var ee=class extends N{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=M(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)P([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},F=class extends N{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},I=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=M(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=P(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},te=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=M(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=P(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},ne=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=M(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=P(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},L={},R=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},z=0,re=1,ie=2,ae={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function B(e,t){return e.type===t}function V(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:z,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:re,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:ie,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!B(a,ie);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return V(`M0,0`+e);i++,o=ae[a.text],r=a.text}else B(a,re)?o=ae[r]:(i++,o=ae[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!B(t,re))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof ae[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function oe(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function se(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(le(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function ce(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function le(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=ce(e,t,-u),[n,r]=ce(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=le(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],D=[n+C*x,r-w*b],O=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,D,O].concat(f);{f=[E,D,O].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=ce(f[t][0],f[t][1],u),r=ce(f[t+1][0],f[t+1][1],u),i=ce(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var ue={randOffset:function(e,t){return H(e,t)},randOffsetWithRange:function(e,t,n){return Ce(e,t,n)},ellipse:function(e,t,n,r,i){return ge(e,t,i,he(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return we(e,t,n,r,i,!0)}};function de(e,t,n,r,i){return{type:`path`,ops:we(e,t,n,r,i)}}function fe(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...we(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...we(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?de(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function pe(e,t,n,r,i){return function(e,t){return fe(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function me(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=Ee(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:Ee(n[0],1.5*(1+.22*t.roughness),xe(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=Ee(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:Ee(a,1.5*(1+.22*t.roughness),xe(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function he(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=H(o*c,n),s+=H(s*c,n),{increment:a,rx:o,ry:s}}function ge(e,t,n,r){let[i,a]=Oe(r.increment,e,t,r.rx,r.ry,1,r.increment*Ce(.1,Ce(.4,1,n),n),n),o=De(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=Oe(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=De(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function _e(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=H(.01*d,c),f+=H(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=ke(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=ke(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...we(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...we(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function ve(e,t){let n=se(oe(V(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...we(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...Ae(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...we(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function ye(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+H(e,t),r[0][1]+H(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+H(e,t),r[a][1]+H(e,t)]})}}return{type:`fillPath`,ops:n}}function be(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!L[n])switch(n){case`zigzag`:L[n]||(L[n]=new ee(t));break;case`cross-hatch`:L[n]||(L[n]=new F(t));break;case`dots`:L[n]||(L[n]=new I(t));break;case`dashed`:L[n]||(L[n]=new te(t));break;case`zigzag-line`:L[n]||(L[n]=new ne(t));break;default:n=`hachure`,L[n]||(L[n]=new N(t))}return L[n]}(t,ue).fillPolygons(e,t)}function xe(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Se(e){return e.randomizer||=new R(e.seed||0),e.randomizer.next()}function Ce(e,t,n,r=1){return n.roughness*r*(Se(n)*(t-e)+e)}function H(e,t,n=1){return Ce(-e,e,t,n)}function we(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=Te(e,t,n,r,i,!0,!1);if(o)return s;let c=Te(e,t,n,r,i,!0,!0);return s.concat(c)}function Te(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*Se(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=H(p,i,l),m=H(m,i,l);let h=[],g=()=>H(d,i,l),_=()=>H(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:H(u,i,l)),t+(v?0:H(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function Ee(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+H(t,n),e[0][1]+H(t,n)]),r.push([e[0][0]+H(t,n),e[0][1]+H(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+H(t,n),e[i][1]+H(t,n)]),i===e.length-1&&r.push([e[i][0]+H(t,n),e[i][1]+H(t,n)]);return De(r,null,n)}function De(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+H(e,n),t[1]+H(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...Te(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function Oe(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=H(.5,s)-Math.PI/2;l.push([H(a,s)+t+.9*r*Math.cos(u-e),H(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[H(a,s)+t+r*Math.cos(o),H(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([H(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),H(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([H(a,s)+t+.98*r*Math.cos(u+o),H(a,s)+n+.98*i*Math.sin(u+o)]),l.push([H(a,s)+t+.9*r*Math.cos(u+.5*o),H(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function ke(e,t,n,r,i,a,o,s,c){let l=a+H(.1,c),u=[];u.push([H(s,c)+t+.9*r*Math.cos(l-e),H(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([H(s,c)+t+r*Math.cos(a),H(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),De(u,null,c)}function Ae(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:H(l[0],s)),o[1]+(f?0:H(l[0],s))]}),u=f?[i,a]:[i+H(l[p],s),a+H(l[p],s)],c.push({op:`bcurveTo`,data:[e+H(l[p],s),t+H(l[p],s),n+H(l[p],s),r+H(l[p],s),u[0],u[1]]});return c}function je(e){return[...e]}function Me(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(je(e[0]),je(e[1]),je(e[2]),je(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(je(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function Ne(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function Pe(e,t,n){let r=Ne(t,n);if(r===0)return Ne(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Ne(e,Fe(t,n,i))}function Fe(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Ie(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Ne(a,o))>1&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=Fe(a,o,r),u=Fe(o,s,r),d=Fe(s,c,r),f=Fe(l,u,r),p=Fe(u,d,r),m=Fe(f,p,r);Ie([a,l,f,m],0,n,i),Ie([m,p,d,c],0,n,i)}var a,o;return i}function Le(e,t){return Re(e,0,e.length,t)}function Re(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=Pe(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Re(e,t,l+1,r,a),Re(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function ze(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)Ie(e,3*n,t,r);return n&&n>0?Re(r,0,r.length,n):r}var U=`none`,Be=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[de(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=pe(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(ye([i],a)):o.push(be([i],a))}return a.stroke!==U&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=he(n,r,a),c=ge(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=ge(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(be([c.estimatedPoints],a))}return a.stroke!==U&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[fe(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=_e(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=_e(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=H(.01*l,o),u+=H(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),be([m],o)}(e,t,n,r,i,a,c))}return c.stroke!==U&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=me(e,n);if(n.fill&&n.fill!==U){if(n.fillStyle===`solid`){let t=me(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...ze(Me([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...ze(Me(r),10,(1+n.roughness)/2))}t.length&&r.push(be([t],n))}}return n.stroke!==U&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=fe(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(ye([e],n)):r.push(be([e],n))),n.stroke!==U&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==U,a=n.stroke!==U,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=se(oe(V(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...ze(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=Le(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=ve(e,n);if(i){if(n.fillStyle===`solid`){if(s.length===1){let t=ve(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(ye(s,n))}else r.push(be(s,n))}return a&&(o?s.forEach((e=>{r.push(fe(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:U};break;case`fillPath`:t={d:this.opsToPath(e),stroke:U,strokeWidth:0,fill:n.fill||U};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||U,strokeWidth:n,fill:U}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Ve=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},He=`http://www.w3.org/2000/svg`,Ue=class{constructor(e,t){this.svg=e,this.gen=new Be(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(He,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(He,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(He,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(He,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},W={canvas:(e,t)=>new Ve(e,t),svg:(e,t)=>new Ue(e,t),generator:e=>new Be(e),newSeed:()=>Be.newSeed()},We=1,Ge=3;async function Ke(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!qe(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let e=a().fontSize?a().fontSize:window.getComputedStyle(document.body).fontSize,[n=o.fontSize]=g(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(Ke,`configureLabelImages`);function qe(e){return e.nodeType===Ge?e.textContent?.trim()!==``:e.nodeType!==We||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(qe)}e(qe,`hasTextBesidesImages`);var Je=3,Ye=32,Xe=e(async(e,t,r)=>{let o=a(),s=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,_(t.labelStyle)),l=[{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),u=t.width?Math.max(t.width-2*(t.padding??0),Ye):a().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async e=>{let r=c.append(`g`).attr(`class`,e.cssClass),a=await p(r,i(v(e.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:t.labelStyle},o);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(...f.map(({box:e})=>e.width),0),h=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${h-t.y})`),h+=t.height+Je;let g=f.length>0?h-Je:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-m/2}, ${-g/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(t.padding??0)/2,label:c}},`c4LabelHelper`),Ze=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`),G=e(async(e,t,r,{ignoreMinWidth:o=!1}={})=>{if(t.stereotype!==void 0)return Xe(e,t,r);let c,l=t.useHtmlLabels||s(a()?.htmlLabels);c=r||`node default`;let u=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId||t.id),d=u.insert(`g`).attr(`class`,`label`).attr(`style`,_(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,y=f&&!t.width&&!o?t.minWidth??0:0,b=await p(d,i(v(f),a()),{useHtmlLabels:l,width:t.width||t.wrappingWidth||a().flowchart?.wrappingWidth,minWidth:y,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},a()),x=(t?.padding??0)/2,S;if(l){let e=b.children[0],t=n(b);await Ke(e),S=await h.measure(()=>e.getBoundingClientRect()),S=Ze(S,y),t.attr(`width`,S.width),t.attr(`height`,S.height)}else S=await h.measure(()=>b.getBBox()),S=Ze(S,y);return l?d.attr(`transform`,`translate(`+-S.width/2+`, `+-S.height/2+`)`):d.attr(`transform`,`translate(0, `+-S.height/2+`)`),t.centerLabel&&d.attr(`transform`,`translate(`+-S.width/2+`, `+-S.height/2+`)`),d.insert(`rect`,`:first-child`),{shapeSvg:u,bbox:S,halfPadding:x,label:d}},`labelHelper`),Qe=e(async(e,t,r)=>{let o=r.useHtmlLabels??l(a()),s=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),c=await p(s,i(v(t),a()),{useHtmlLabels:o,width:r.width||a()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),u=r.padding/2,d;if(l(a())){let e=c.children[0],t=n(c);d=await h.measure(()=>e.getBoundingClientRect()),t.attr(`width`,d.width),t.attr(`height`,d.height)}else d=await h.measure(()=>c.getBBox());return o?s.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`):s.attr(`transform`,`translate(0, `+-d.height/2+`)`),r.centerLabel&&s.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:d,halfPadding:u,label:s}},`insertLabel`),K=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`),q=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function J(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(J,`createPathFromPoints`);function $e(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($e,`generateFullSineWavePoints`);function Y(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(Y,`generateCirclePoints`);function et(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(et,`mergePaths`);var tt=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 nt(e,t){return e.intersect(t)}e(nt,`intersectNode`);var rt=nt;function it(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(it,`intersectEllipse`);var at=it;function ot(e,t,n){return at(e,t,t,n)}e(ot,`intersectCircle`);var st=ot;function ct(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&<(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&<(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(ct,`intersectLine`);function lt(e,t){return e*t>0}e(lt,`sameSign`);var ut=ct;function dt(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=ut(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(dt,`intersectPolygon`);var X={node:rt,circle:st,ellipse:at,polygon:dt,rect:tt},Z=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`),ft=e(async(e,t,n,r=!1,i=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=a(),c=l(s);return await p(e,o,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function pt(e,n){let{labelStyles:r}=E(n);n.labelStyle=r;let i=q(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=W.svg(o),l=D(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`,_(s)),K(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),X.circle(n,1,e)},o}e(pt,`anchor`);function mt(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(mt,`generateArcPoints`);function ht(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ht,`calculateArcSagitta`);async function gt(t,n){let{labelStyles:r,nodeStyles:i}=E(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 G(t,n,q(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ht(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},...mt(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...mt(g/2,_/2,g/2,-_/2,p,m,!0)],b=W.svg(u),x=D(n,{});n.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=J(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),w.attr(`transform`,`translate(${p/2}, 0)`),K(n,w),n.intersect=function(e){return X.polygon(n,y,e)},u}e(gt,`bowTieRect`);async function _t(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=E(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await G(t,n,q(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=W.svg(o).path(_,D(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`),K(n,y);let b=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${b-s.height/2-(s.y-(s.top??0))})`);let x=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`),S=[...x(d/2,m,-1),...x(g/2,h,1).reverse()];return n.intersect=function(e){return X.polygon(n,S,e)},o}e(_t,`bucket`);var vt=20,yt=8,bt=80,xt=8;function St(e){let{themeVariables:t}=a(),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:xt,fill:n,stroke:r,cssClass:`collapsed-group`}}}e(St,`getCollapsedStyle`);async function Ct(e,t){let n=St(t.metadata?.containerType),{fill:r,stroke:i}=n,{nodeStyles:o}=E(t),{shapeSvg:s,bbox:c}=await G(e,t,q(t)),{theme:u,themeVariables:d}=a();b(s,t.colorIndex,u,d.borderColorArray);let f=t.padding??8,p=c.height,m=Math.max(c.width+f*2,bt,t?.width??0),h=Math.max(p+yt+vt+f*2,t?.height??0),g=-m/2,v=-h/2,y=-(yt+vt)/2,x=s.select(`.label`);x&&(t.useHtmlLabels??l(a())?x.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):x.attr(`transform`,`translate(0, ${-c.height/2+y})`));let S;if(t.look===`handDrawn`){let e=W.svg(s),a=D(t,{fill:r,stroke:i,...n.strokeWidth===void 0?{}:{strokeWidth:n.strokeWidth},...r===`none`?{fillWeight:0}:{fillStyle:`solid`}}),o=e.path(Z(g,v,m,h,n.rx),a);S=s.insert(()=>o,`:first-child`),S.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,_(t.cssStyles))}else S=s.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container `+n.cssClass).attr(`style`,o).attr(`rx`,n.rx).attr(`ry`,n.rx).attr(`x`,g).attr(`y`,v).attr(`width`,m).attr(`height`,h).attr(`fill`,r).attr(`stroke`,i),n.strokeWidth!==void 0&&S.attr(`stroke-width`,n.strokeWidth+`px`);let C=v+f+p+yt;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,g+8).attr(`y1`,C).attr(`x2`,g+m-8).attr(`y2`,C).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=C+vt/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,i);return K(t,S),t.calcIntersect=function(e,t){return X.rect(e,t)},t.intersect=function(e){return X.rect(t,e)},s}e(Ct,`collapsedGroup`);function wt(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(wt,`insertPolygonShape`);var Tt=[`right`,`left`,`up`,`down`],Et=`point`,Dt=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`),Ot=e(e=>Tt.filter(t=>e.has(t)).join(`|`)||Et,`getDirectionKey`),kt={"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`),[Et]:()=>[{x:0,y:0}]},At=e((e,t,n,r)=>{let i=Dt(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(kt[Ot(i)]??kt[Et])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function jt(e,t){let n=t,{shapeSvg:r,bbox:i}=await G(e,n,q(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=At(n.directions??[],i,n,u),f=wt(r,u,o,d);return f.attr(`style`,n.style??null),K(n,f),n.intersect=function(e){return X.polygon(n,d,e)},r}e(jt,`block_arrow`);async function Mt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await G(e,t,q(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=W.svg(a).path(Z(-u/2,f,u,d,12),D(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`),K(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 X.rect(t,e)},a}e(Mt,`browser`);var Nt=12;async function Pt(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+Nt),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+Nt,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+Nt},{x:0+Nt,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=W.svg(s),n=D(t,{}),r=J(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=wt(s,l,u,p);return r&&m.attr(`style`,r),K(t,m),t.intersect=function(e){return X.polygon(t,p,e)},s}e(Pt,`card`);function Ft(e,t){let{nodeStyles:n}=E(t);t.label=``;let r=e.insert(`g`).attr(`class`,q(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=W.svg(r),c=D(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=J(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 X.polygon(t,o,e)},r}e(Ft,`choice`);async function It(e,n,r){let{labelStyles:i,nodeStyles:a}=E(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await G(e,n,q(n),{ignoreMinWidth:!0}),l=r?.padding??c,u=Math.sqrt(s.width**2+s.height**2)/2,d=n.look===`neo`?u+16:u+l,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=W.svg(o),t=D(n,{}),r=e.circle(0,0,d*2,t);f=o.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,_(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 K(n,f),n.calcIntersect=function(e,t){let n=e.width/2;return X.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,d,e),X.circle(n,d,e)},o}e(It,`circle`);async function Lt(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await G(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),K(n,o),n.intersect=function(e){return X.rect(n,e)},r}e(Lt,`composite`);async function Rt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await G(e,t,q(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=W.svg(a).path(Z(-u/2,f,u,d,12),D(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(`>_`),K(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 X.rect(t,e)},a}e(Rt,`consoleWindow`);function zt(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
2
|
M ${i.x},${i.y} L ${o.x},${o.y}`}e(zt,`createLine`);function Bt(e,n){let{labelStyles:r,nodeStyles:i}=E(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,q(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=W.svg(a),l=D(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=zt(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),K(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),X.circle(n,o,e)},a}e(Bt,`crossedCircle`);function Vt(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(Vt,`generateCirclePoints`);async function Ht(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=[...Vt(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Vt(l/2+d*2,-d,d,20,-180,-270),...Vt(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Vt(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...Vt(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Vt(l/2+l*.1,-d,d,20,-180,-270),...Vt(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Vt(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=W.svg(i),g=D(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=J(p).replace(`Z`,``),v=h.path(_,g),y=J(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.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))})`),K(t,x),t.intersect=function(e){return X.polygon(t,m,e)},i}e(Ht,`curlyBraceLeft`);function Ut(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(Ut,`generateCirclePoints`);async function Wt(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=[...Ut(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Ut(l/2+d*2,-d,d,20,-180,-270),...Ut(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Ut(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Ut(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Ut(l/2+d*2,-d,d,20,-180,-270),...Ut(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Ut(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=W.svg(i),g=D(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=J(p).replace(`Z`,``),v=h.path(_,g),y=J(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.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))})`),K(t,x),t.intersect=function(e){return X.polygon(t,m,e)},i}e(Wt,`curlyBraceRight`);function Q(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(Q,`generateCirclePoints`);async function Gt(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=[...Q(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...Q(l/2+d*2,-d,d,20,-180,-270),...Q(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...Q(l/2,u/2,d,20,0,90)],m=[...Q(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Q(-l/2-d/2,-d,d,20,0,90),...Q(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Q(-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},...Q(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...Q(l/2+d*2,-d,d,20,-180,-270),...Q(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...Q(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...Q(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...Q(-l/2-d/2,-d,d,20,0,90),...Q(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...Q(-l/2+d+d/2,u/2,d,30,-180,-270)],g=W.svg(i),_=D(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=J(p).replace(`Z`,``),y=g.path(v,_),b=J(m).replace(`Z`,``),x=g.path(b,_),S=J(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.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))})`),K(t,w),t.intersect=function(e){return X.polygon(t,h,e)},i}e(Gt,`curlyBraces`);async function Kt(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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=W.svg(s),g=D(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=p,v=l,y=_-u,b=v/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:v/2},{x:b,y:v},{x:y,y:v},...Y(-y,-v/2,u,50,270,90)],S=J(x),C=h.path(S,g),w=s.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&w.selectChildren(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-p/2}, ${-l/2})`),K(t,w),t.intersect=function(e){return X.polygon(t,x,e)},s}e(Kt,`curvedTrapezoid`);async function qt(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=W.svg(i),n=D(t,{}),r=e.path(Z(-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);K(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,b=Math.asin(Math.min(1,(h-y)/l))*180/Math.PI,x=[...Y(0,-y,l,24,180+b,-b),...Y(-(-c/2+f),-(h+f),f,12,90,0),...Y(-(-c/2+f),-(p/2-f),f,12,360,270),...Y(-(c/2-f),-(p/2-f),f,12,270,180),...Y(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return X.polygon(t,x,e)},i}e(qt,`person`);var Jt=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`),Yt=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`),Xt=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Zt=8,Qt=8;async function $t(e,t){let{labelStyles:n,nodeStyles:r}=E(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<Qt&&(t.width=Qt)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<Zt&&(t.height=Zt)}let{shapeSvg:c,bbox:l,label:u}=await G(e,t,q(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,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=W.svg(c),n=Yt(0,0,d,m,f,p),r=Xt(0,p,d,m,f,p),i=D(t,{}),a=e.path(n,i),o=e.path(r,D(t,{fill:`none`}));h=c.insert(()=>o,`:first-child`),h=c.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=Jt(0,0,d,m,f,p);h=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,_(g)).attr(`style`,r)}return h.attr(`label-offset-y`,p),h.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),K(t,h),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=X.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($t,`cylinder`);async function en(e,t,n){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await G(e,t,q(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=W.svg(a),n=D(t,{}),r=f||p?e.path(Z(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`,_(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,_(f)).attr(`ry`,_(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return K(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return X.rect(e,t)},t.intersect=function(e){return X.rect(t,e)},a}e(en,`drawRect`);async function tn(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await en(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=W.svg(c),n=D(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(tn,`datastore`);async function nn(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=W.svg(o),g=D(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))})`),K(t,y),t.intersect=function(e){return X.rect(t,e)},o}e(nn,`dividedRectangle`);async function rn(e,n){let{labelStyles:r,nodeStyles:i}=E(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 G(e,n,q(n),{ignoreMinWidth:!0}),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=W.svg(c),t=D(n,{roughness:.2,strokeWidth:2.5}),r=D(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`,_(n.cssClasses)).attr(`style`,_(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 K(n,p),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,f,e),X.circle(n,f,e)},c}e(rn,`doublecircle`);async function an(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:o,halfPadding:s}=await G(e,t,q(t)),{theme:c,themeVariables:l}=a();b(i,t.colorIndex,c,l.borderColorArray);let u=s??10,d=o.width/2+u*2,f=o.height/2+u*2,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=W.svg(i),n=D(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,K(t,p),t.calcIntersect=function(e,t){let n=e.width/2,r=e.height/2;return X.ellipse(e,n,r,t)},t.intersect=function(e){return X.ellipse(t,d,f,e)},i}e(an,`usecaseEllipse`);function on(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=E(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,q(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=W.svg(o),{nodeBorder:l}=r,u=D(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),K(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),X.circle(n,7,e)},o}e(on,`filledCircle`);var sn=10,cn=10;async function ln(e,n){let{labelStyles:r,nodeStyles:i}=E(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<sn&&(n.height=sn),n.width=(n?.width??0)-o-o/2,n.width<cn&&(n.width=cn));let{shapeSvg:s,bbox:c,label:l}=await G(e,n,q(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=W.svg(s),g=D(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=J(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,K(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),X.polygon(n,p,e)},s}e(ln,`flippedTriangle`);async function un(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=W.svg(i).path(g,D(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`?K(t,v):K(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 X.polygon(t,h,e)},i}e(un,`folder`);function dn(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=E(t);t.label=``;let o=e.insert(`g`).attr(`class`,q(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=W.svg(o),p=D(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),K(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 X.rect(t,e)},o}e(dn,`forkJoin`);async function fn(e,n){let{labelStyles:r,nodeStyles:i}=E(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 G(e,n,q(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=W.svg(s),h=D(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},...Y(-f/2+u,0,u,50,90,270),{x:f/2-u,y:l/2},{x:-f/2,y:l/2}],_=J(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),K(n,y),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:u,point:e}),X.polygon(n,g,e)},s}e(fn,`halfRoundedRectangle`);var pn=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 mn(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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=W.svg(c),n=D(t,{}),r=pn(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=wt(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,K(t,m),t.intersect=function(e){return X.polygon(t,p,e)},c}e(mn,`hexagon`);async function hn(e,n){let{labelStyles:r,nodeStyles:i}=E(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await G(e,n,q(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=W.svg(a),u=D(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=J(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})`),K(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),X.polygon(n,d,e)},a}e(hn,`hourglass`);async function gn(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=E(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:p}=await G(e,n,`icon-shape default`),m=n.pos===`t`,h=c,g=c,{nodeBorder:_}=r,{stylesMap:v}=C(n),y=-g/2,b=-h/2,x=n.label?8:0,S=W.svg(u),w=D(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=S.rectangle(y,b,g,h,w),O=Math.max(g,d.width),k=h+d.height+x,A=S.rectangle(-O/2,-k/2,O,k,{...w,fill:`transparent`,stroke:`none`}),j=u.insert(()=>T,`:first-child`),M=u.insert(()=>A);if(n.icon){let e=u.append(`g`);e.html(`<g>${await f(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+x/2-i/2-o:-d.height/2-x/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-k/2:k/2-d.height})`),j.attr(`transform`,`translate(0,${m?d.height/2+x/2:-d.height/2-x/2})`),K(n,M),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return X.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+x},{x:r+g/2,y:i-a/2+d.height+x},{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+x},{x:r-d.width/2,y:i-a/2+d.height+x}]:[{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}],X.polygon(n,o,e)},u}e(gn,`icon`);async function _n(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=E(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:p}=await G(e,n,`icon-shape default`),m=n.label?8:0,h=n.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:v}=C(n),y=W.svg(u),b=D(n,{});n.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`),b.stroke=v.get(`fill`)??_;let x=u.append(`g`);n.icon&&x.html(`<g>${await f(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let S=x.node().getBBox(),w=S.width,T=S.height,O=S.x,k=S.y,A=Math.max(w,T)*Math.SQRT2+40,j=y.circle(0,0,A,b),M=Math.max(A,d.width),N=A+d.height+m,P=y.rectangle(-M/2,-N/2,M,N,{...b,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>j,`:first-child`),F=u.insert(()=>P);return x.attr(`transform`,`translate(${-w/2-O},${h?d.height/2+m/2-T/2-k:-d.height/2-m/2-T/2-k})`),x.attr(`style`,`color: ${v.get(`stroke`)??g};`),p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-N/2:N/2-d.height})`),ee.attr(`transform`,`translate(0,${h?d.height/2+m/2:-d.height/2-m/2})`),K(n,F),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),X.rect(n,e)},u}e(_n,`iconCircle`);async function vn(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=E(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:p,label:m}=await G(e,n,`icon-shape default`),h=n.pos===`t`,g=c+p*2,_=c+p*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=C(n),x=-_/2,S=-g/2,w=n.label?8:0,T=W.svg(u),O=D(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`),O.stroke=b.get(`fill`)??y;let k=T.path(Z(x,S,_,g,5),O),A=Math.max(_,d.width),j=g+d.height+w,M=T.rectangle(-A/2,-j/2,A,j,{...O,fill:`transparent`,stroke:`none`}),N=u.insert(()=>k,`:first-child`).attr(`class`,`icon-shape2`),P=u.insert(()=>M);if(n.icon){let e=u.append(`g`);e.html(`<g>${await f(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},${h?d.height/2+w/2-i/2-o:-d.height/2-w/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??v};`)}return m.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-j/2:j/2-d.height})`),N.attr(`transform`,`translate(0,${h?d.height/2+w/2:-d.height/2-w/2})`),K(n,P),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return X.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{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+_/2,y:i-a/2+d.height+w},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+w},{x:r-d.width/2,y:i-a/2+d.height+w}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],X.polygon(n,o,e)},u}e(vn,`iconRounded`);async function yn(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=E(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:p,label:m}=await G(e,n,`icon-shape default`),h=n.pos===`t`,g=c+p*2,_=c+p*2,{nodeBorder:v,mainBkg:y}=r,{stylesMap:b}=C(n),x=-_/2,S=-g/2,w=n.label?8:0,T=W.svg(u),O=D(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`),O.stroke=b.get(`fill`)??y;let k=T.path(Z(x,S,_,g,.1),O),A=Math.max(_,d.width),j=g+d.height+w,M=T.rectangle(-A/2,-j/2,A,j,{...O,fill:`transparent`,stroke:`none`}),N=u.insert(()=>k,`:first-child`),P=u.insert(()=>M);if(n.icon){let e=u.append(`g`);e.html(`<g>${await f(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},${h?d.height/2+w/2-i/2-o:-d.height/2-w/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??v};`)}return m.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-j/2:j/2-d.height})`),N.attr(`transform`,`translate(0,${h?d.height/2+w/2:-d.height/2-w/2})`),K(n,P),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return X.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{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+_/2,y:i-a/2+d.height+w},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+w},{x:r-d.width/2,y:i-a/2+d.height+w}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],X.polygon(n,o,e)},u}e(yn,`iconSquare`);async function bn(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}=E(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 G(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,y=W.svg(f),b=D(n,{});n.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,u,d,b),S=Math.max(u,p.width),C=d+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=f.insert(()=>x,`:first-child`),O=f.insert(()=>w);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?C/2-d:-C/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})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),K(n,O),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return X.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}],X.polygon(n,o,e)},f}e(bn,`imageSquare`);async function xn(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await G(e,t,q(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=W.svg(s),n=D(t,{}),r=J(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=wt(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,K(t,f),t.intersect=function(e){return X.polygon(t,d,e)},s}e(xn,`inv_trapezoid`);async function Sn(e,t){let{shapeSvg:n,bbox:r,label:i}=await G(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))})`),K(t,a),t.intersect=function(e){return X.rect(t,e)},n}e(Sn,`labelRect`);async function Cn(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await G(e,t,q(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=W.svg(s),n=D(t,{}),r=J(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=wt(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,K(t,f),t.intersect=function(e){return X.polygon(t,d,e)},s}e(Cn,`lean_left`);async function wn(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await G(e,t,q(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=W.svg(s),n=D(t,{}),r=J(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=wt(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,K(t,f),t.intersect=function(e){return X.polygon(t,d,e)},s}e(wn,`lean_right`);function Tn(e,n){let{labelStyles:r,nodeStyles:i}=E(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,q(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=W.svg(a),d=D(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=J(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})`),K(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),X.polygon(n,l,e)},a}e(Tn,`lightningBolt`);var En=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`),Dn=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`),On=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),kn=10,An=10;async function jn(e,t){let{labelStyles:n,nodeStyles:r}=E(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<An&&(t.width=An);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<kn&&(t.height=kn)}let{shapeSvg:s,bbox:c,label:l}=await G(e,t,q(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,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=W.svg(s),n=Dn(0,0,u,p,d,f,m),r=On(0,f,u,p,d,f),i=D(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=En(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,_(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),K(t,h),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=X.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(jn,`linedCylinder`);async function Mn(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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=W.svg(s),g=D(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},...$e(-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))})`),K(t,y),t.intersect=function(e){return X.polygon(t,_,e)},s}e(Mn,`linedWaveEdgedRect`);var Nn=56,Pn=72,Fn=8,In=2,Ln=8,Rn={normal:`usecase-actor-shape usecase-actor-normal`,hollow:`usecase-actor-hollow`,awesome:`usecase-actor-awesome`,icon:`usecase-actor-icon`},zn=Math.PI/3,Bn=.6,Vn=e((e,t)=>{let n=t*Bn,r=t*Math.sqrt(1-Bn**2),i=Math.cos(zn),a=-Math.sin(zn),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`),Hn={normal:Vn(-24,12),hollow:Vn(-23,9),awesome:Vn(-21,13),icon:`M 12 -8 L 26 -26`},Un=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`),Wn=e((e,t,n,r,i=!1)=>{if(t.look===`handDrawn`){let a=W.svg(e).path(n,D(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`),Gn=e((e,t,n,r,i,a,o=!1)=>{if(t.look===`handDrawn`){let s=W.svg(e).circle(n,r,i*2,D(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`),Kn=e((e,t,n)=>{t.business&&e.append(`path`).attr(`class`,`usecase-business-marker usecase-actor-business-marker`).attr(`d`,Hn[n]).attr(`fill`,`none`).attr(`style`,`stroke: inherit !important; stroke-width: inherit !important`)},`appendBusinessActorMarker`);async function qn(e,t,n,r){let{labelStyles:i,nodeStyles:o}=E(t);t.labelStyle=i;let{shapeSvg:s,bbox:c,label:l}=await G(e,n===`icon`||t.stereotype!==void 0?{...t,icon:n===`icon`?void 0:t.icon,stereotype:void 0}:t,q(t,`usecase-actor-variant usecase-actor-${n}`)),u=t.accessibleName??t.label;u&&s.attr(`role`,`img`).attr(`aria-label`,u),l.attr(`class`,`label actor-label usecase-actor-label`);let{theme:d,themeVariables:f}=a();b(s,t.colorIndex,d,f.borderColorArray);let p,m;if(t.stereotype){let e=await Qe(s,`\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=s.append(`g`).attr(`class`,`usecase-actor-glyph ${Rn[n]}`).attr(`style`,o||null);await r(h,t),Kn(h,t,n);let g=t.padding??Ln,_=m?.height??0,v=Pn+Fn+c.height+(m?_+In:0),y=Math.max(Nn,c.width,m?.width??0)+g*2,x=v+g*2,S=-v/2;h.attr(`transform`,`translate(0,${S+Pn/2})`);let C=S+Pn+Fn;return p&&m&&(C+=_/2,Un(p,m,C),C+=_/2+In),Un(l,c,C+c.height/2),K(t,s.insert(`rect`,`:first-child`).attr(`class`,`usecase-actor-outline`).attr(`x`,-y/2).attr(`y`,-x/2).attr(`width`,y).attr(`height`,x).attr(`opacity`,0).attr(`aria-hidden`,`true`)),t.intersect=e=>X.rect(t,e),s}e(qn,`renderUsecaseActor`);var Jn=[`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 Yn(e,t){return qn(e,t,`normal`,(e,t)=>{Wn(e,t,Jn,`usecase-actor-stick`)})}e(Yn,`usecaseActor`);var Xn=[`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 Zn(e,t){return qn(e,t,`awesome`,(e,t)=>{Wn(e,t,Xn,`usecase-actor-awesome-silhouette`)})}e(Zn,`usecaseActorAwesome`);var Qn=[`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 $n(e,t){return qn(e,t,`hollow`,(e,t)=>{Gn(e,t,0,-23,9,`usecase-actor-hollow-head`,!0),Wn(e,t,Qn,`usecase-actor-hollow-body`,!0)})}e($n,`usecaseActorHollow`);var er=52,tr=42,nr=-2,rr=e(async(e,t)=>{let n=-er/2,r=nr-er/2;if(t.look===`handDrawn`){let i=W.svg(e).rectangle(n,r,er,er,D(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`,er).attr(`height`,er).attr(`rx`,4).attr(`ry`,4);let i=t.icon??``,a=await m(i.includes(`:`)?i:`fa:${i}`),o=await f(i,{height:tr,width:tr,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},${nr-c.height/2-c.y})`)},`drawIconActor`);async function ir(e,t){return qn(e,t,`icon`,rr)}e(ir,`usecaseActorIcon`);var ar=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 or(e,t){let n=t,{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r;let{shapeSvg:o,bbox:s,halfPadding:c,label:l}=await G(e,n.stereotype?{...t,stereotype:void 0}:t,q(t,`usecase-business-shape`));l.attr(`class`,`label usecase-label`);let{theme:u,themeVariables:d}=a();b(o,t.colorIndex,u,d.borderColorArray);let f,p;if(n.stereotype){let e=await Qe(o,`\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=s.height+(p?.height??0)+m,g=Math.max(s.width,p?.width??0),_=c??10,v=g/2+_*2,y=h/2+_*2,x=Math.min(Math.max(_/5,1),_/2),S=g/2+x,C=v-x,w=S/v,T=C/v,O=y*Math.sqrt(Math.max(0,1-w*w)),k=-y*Math.sqrt(Math.max(0,1-T*T));f&&p&&ar(f,p,-h/2+p.height/2),ar(l,s,h/2-s.height/2);let A;if(t.look===`handDrawn`){let e=W.svg(o).ellipse(0,0,v*2,y*2,D(t,{}));A=o.insert(()=>e,`:first-child`).attr(`class`,`basic label-container usecase-business-ellipse`)}else A=o.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);o.append(`path`).attr(`class`,`usecase-business-marker`).attr(`d`,`M ${S} ${O} L ${C} ${k}`).attr(`fill`,`none`).attr(`style`,i||null);let j=n.accessibleName??n.label;return j&&o.attr(`role`,`img`).attr(`aria-label`,j),K(t,A),t.calcIntersect=(e,t)=>X.ellipse(e,e.width/2,e.height/2,t),t.intersect=e=>X.ellipse(t,v,y,e),o}e(or,`usecaseBusiness`);var sr=8,cr=4,lr=1,ur=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`),dr=e(e=>{let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:lr},`numericStrokeWidth`);async function fr(t,n){let r=n,{labelStyles:i,nodeStyles:a}=E(n),{stylesMap:o}=C(n);n.labelStyle=i;let{shapeSvg:s,bbox:c,label:l}=await G(t,n,q(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 Qe(u,e.key,{labelStyle:i,useHtmlLabels:n.useHtmlLabels,padding:0,centerLabel:!0}),r=await Qe(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))+sr*2,p=Math.max(0,...d.map(({value:e})=>e.bbox.width))+sr*2,m=c.width+sr*2,h=Math.max(m,f+p),g=p+Math.max(0,h-f-p),_=c.height+cr*2,v=d.map(({key:e,value:t})=>Math.max(e.bbox.height,t.bbox.height)+cr*2),y=_+v.reduce((e,t)=>e+t,0),b=dr(o.get(`stroke-width`)),x=h+b*2,S=y+b*2,w=-h/2,T=-y/2,O=n.look===`handDrawn`?W.svg(s):void 0,k=O?D(n,{}):void 0,A=e((e,t,n,r,i,o)=>{if(O&&k){let a=O.rectangle(n,r,i,o,k);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`),j=A(s,`label-container usecase-json-border`,-x/2,-S/2,x,S);A(u,`usecase-json-cell usecase-json-title-cell`,w,T,h,_),u.node()?.append(l.node()),ur(l,c,0,T+_/2);let M=T+_;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,${M})`);A(i,`usecase-json-cell usecase-json-key-cell`,w,0,f,r),A(i,`usecase-json-cell usecase-json-value-cell`,w+f,0,g,r),i.node()?.append(e.label.node(),t.label.node()),ur(e.label,e.bbox,w+f/2,r/2),ur(t.label,t.bbox,w+f+g/2,r/2),M+=r}),K(n,j),n.intersect=e=>X.rect(n,e),s}e(fr,`usecaseJsonTable`);async function pr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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=W.svg(c),y=D(t,{}),b=[{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}],x=[{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 S=J(b),C=v.path(S,y),w=J(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=et(C),T=et(T));let O=c.insert(`g`,`:first-child`);return O.insert(()=>C),O.insert(()=>T),O.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&O.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))})`),K(t,O),t.intersect=function(e){return X.polygon(t,b,e)},c}e(pr,`multiRect`);async function mr(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=$e(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{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}],x=[{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}],S=W.svg(i),C=D(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=J(b),T=S.path(w,C),O=J(x),k=S.path(O,C),A=i.insert(()=>T,`:first-child`);return A.insert(()=>k),A.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&A.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&A.selectAll(`path`).attr(`style`,r),A.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))})`),K(t,A),t.intersect=function(e){return X.polygon(t,b,e)},i}e(mr,`multiWaveEdgedRectangle`);async function hr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(t);t.labelStyle=r,t.useHtmlLabels||l(u())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await G(e,t,q(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),d=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-c/2,p=-d/2,{cssStyles:m}=t,h=W.svg(a),g=D(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,c,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),K(t,v),t.intersect=function(e){return X.rect(t,e)},a}e(hr,`note`);var gr=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 _r(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await G(e,t,q(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=W.svg(i),n=D(t,{}),r=gr(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=wt(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),K(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 X.polygon(e,r,t)},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(_r,`question`);async function vr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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=W.svg(s),y=D(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=J(g),x=v.path(b,y),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.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))})`),K(t,S),t.intersect=function(e){return X.polygon(t,g,e)},s}e(vr,`rect_left_inv_arrow`);async function yr(e,r){let{labelStyles:i,nodeStyles:o}=E(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),u=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,o),f=r.description,p=r.label,m=await ft(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(l(a())){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 ft(d,Array.isArray(g)?g.join(`<br/>`):g,r.labelStyle,!0,!0),y=v.children[0],b=n(v);h=y.getBoundingClientRect(),b.attr(`width`,h.width),b.attr(`height`,h.height);let x=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+x+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-x+3)+`)`);let S=h.width+(r.padding||0),C=h.height+(r.padding||0),w=-h.width/2-x,T=-h.height/2-x,O,k;if(r.look===`handDrawn`){let e=W.svg(c),n=D(r,{}),i=e.path(Z(w,T,S,C,r.rx||0),n),a=e.line(-h.width/2-x,-h.height/2-x+_.height+x,h.width/2+x,-h.height/2-x+_.height+x,n);k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),O=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else O=u.insert(`rect`,`:first-child`),k=u.insert(`line`),O.attr(`class`,`outer title-state`).attr(`style`,o).attr(`x`,-h.width/2-x).attr(`y`,-h.height/2-x).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),k.attr(`class`,`divider`).attr(`x1`,-h.width/2-x).attr(`x2`,h.width/2+x).attr(`y1`,-h.height/2-x+_.height+x).attr(`y2`,-h.height/2-x+_.height+x);return K(r,O),r.intersect=function(e){return X.rect(r,e)},c}e(yr,`rectWithTitle`);async function br(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return en(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(br,`roundedRect`);var xr=8;async function Sr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?xr:xr*2),u=(t?.height??s.height)+a*2,d=l-xr,f=u,p=xr-l/2,m=-u/2,{cssStyles:h}=t,g=W.svg(o),v=D(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-xr,y:m+f},{x:p-xr,y:m},{x:p,y:m},{x:p,y:m+f}],b=g.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`).attr(`style`,_(h)),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${xr/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),K(t,x),t.intersect=function(e){return X.rect(t,e)},o}e(Sr,`shadedProcess`);async function Cr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(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,_=W.svg(s),v=D(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}],b=J(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.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))})`),K(t,S),t.intersect=function(e){return X.polygon(t,y,e)},s}e(Cr,`slopedRect`);async function wr(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n,o=await en(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i});if(t.colorIndex!==void 0){let{theme:e,themeVariables:n}=a();b(o,t.colorIndex,e,n.borderColorArray)}return o}e(wr,`squareRect`);var Tr=50,Er=e((e,t,n)=>{let r=e.height+n,i=r*Math.cos(Math.PI/(2*(Tr-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 Dr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),{w:l,h:u}=Er(c,a,o),d=u/2,{cssStyles:f}=t,p=W.svg(s),m=D(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},...Y(-l/2+d,0,d,Tr,90,270),{x:l/2-d,y:u/2},...Y(l/2-d,0,d,Tr,270,450)],g=J(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),K(t,v),t.intersect=function(e){return X.polygon(t,h,e)},s}e(Dr,`stadium`);async function Or(e,t){return en(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(Or,`state`);function kr(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=E(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=W.svg(u),f=D(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 K(t,_),t.intersect=function(e){return X.circle(t,(t.width??0)/2,e)},u}e(kr,`stateEnd`);function Ar(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=W.svg(a).circle(0,0,t.width,x(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 K(t,o),t.intersect=function(e){return X.circle(t,(t.width??7)/2,e)},a}e(Ar,`stateStart`);var jr=8;async function Mr(e,t){let{labelStyles:n,nodeStyles:r}=E(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 G(e,t,q(t)),l=Math.max(c.width+2*jr+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*jr,f=u,p=-l/2,m=-u/2,h=[{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=W.svg(s),n=D(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+jr,m,p+jr,m+f,n),a=e.line(p+jr+d,m,p+jr+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`,_(c)),K(t,o)}else{let e=wt(s,d,f,h);r&&e.attr(`style`,r),K(t,e)}return t.intersect=function(e){return X.polygon(t,h,e)},s}e(Mr,`subroutine`);var Nr=.2;async function Pr(e,t){let{labelStyles:n,nodeStyles:r}=E(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-Nr*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await G(e,t,q(t)),l=(t?.height?t?.height:c.height)+o*2,u=Nr*l,d=Nr*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=W.svg(s),v=D(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}],b=[{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 x=J(y),S=_.path(x,v),C=J(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),K(t,T),t.intersect=function(e){return X.polygon(t,y,e)},s}e(Pr,`taggedRect`);async function Fr(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await G(e,t,q(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=W.svg(i),h=D(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...$e(-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},...$e(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=J(g),x=m.path(b,h),S=J(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.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))})`),K(t,w),t.intersect=function(e){return X.polygon(t,g,e)},i}e(Fr,`taggedWaveEdgedRectangle`);async function Ir(e,t){let{labelStyles:n,nodeStyles:r}=E(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await G(e,t,q(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),K(t,u),t.intersect=function(e){return X.rect(t,e)},i}e(Ir,`text`);var Lr=e((e,t,n,r,i,a)=>`M${e},${t}
|
|
3
3
|
a${i},${a} 0,0,1 0,${-r}
|
|
4
4
|
l${n},0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-3uHXrFqA.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./index-CQ1VhLwx.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-BWF7jMDv.js";import{b as r,y as i}from"./chunk-DSNLSHJZ-Chj2PD0m.js";import{i as a,n as o,r as s,t as c,u as l}from"./chunk-ZAUX2LTX-DS3wpSTy.js";import{h as u}from"./chunk-7S6XSTFO-DzX1XF3_.js";import{a as d,c as f,d as p,i as m,n as h,r as g,t as _,u as v}from"./chunk-WQQL4CDK-BtyaHLI7.js";import{t as y}from"./graphlib-DS17s2tU.js";import{r as ee,t as te}from"./chunk-HNE4Q36P-V3jylrEv.js";function b(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(b,`createLayoutElementGroups`);async function x(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await l(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}t(x,`measureGroupLabel`);async function S(e,t,n){let r=await s(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(S,`insertMeasuredNode`);function C(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}t(C,`resolveNodeDir`);async function w(t,n,i={}){let a=new y({multigraph:!0,compound:!0}),o=[...n.edges],s=r(),c=b(t),{edgeLabels:l,nodes:u}=c,f=new Map,p=new Map(n.nodes.map(e=>[e.id,e])),m=n.direction,h=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup){if(h){let t=i.unwrapGroupLabels&&e.labelType!==`markdown`;await x(u,e,t?1/0:void 0)}a.setNode(e.id,{...e})}else{if(h){let t=await S(u,e,{config:s,dir:C(e,p,m)});f.set(e.id,t)}a.setNode(e.id,{...e})}}));for(let e of o)h&&g(e)&&await d(l,e),a.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-3uHXrFqA.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:a,groups:c,nodeElements:f}}t(w,`createGraphWithElements`);var T=new Map,E=new Map,D=new Map,O=t(()=>{E.clear(),D.clear(),T.clear()},`clear`),k=t((e,t)=>{let r=E.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),A=t((e,t)=>{let r=E.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||k(e.v,t)||k(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),j=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)j(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{A(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),M=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)D.set(i,e),r=[...r,...M(i,t)];return r},`extractDescendants`),N=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),P=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=P(e,t,r),i=N(t,r,n);if(n){if(i.length>0)a=n;else return n}}return a},`findNonClusterChild`),F=t(e=>!T.has(e)||!T.get(e).externalConnections?e:T.has(e)?T.get(e).id:e,`getAnchorId`),ne=t((e,t)=>{if(!e||t>10)n.debug(`Opting out, no graph `);else{n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,P(t,e,t)),E.set(t,M(t,e)),T.set(t,{id:P(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,E),i.forEach(e=>{k(e.v,t)^k(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,E.get(t)),T.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,E)});for(let t of T.keys()){let n=T.get(t).id,r=e.parent(n);r!==t&&T.has(r)&&!T.get(r).externalConnections&&(T.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&T.get(t)?.externalConnections&&i&&z(e,n,t)){let r=B(e,t,e.parent(n));r&&(T.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,T,`ids:`,t.v,t.w,`Translating: `,T.get(t.v),` --- `,T.get(t.w)),T.get(t.v)||T.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=F(t.v),a=F(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);T.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);T.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),I(e,0),n.trace(T)}},`adjustClustersAndEdges`),I=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i)n.debug(`Done, no node has children`,e.nodes());else{n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,T,T.has(i)&&!T.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!T.has(i))n.debug(`Not a cluster`,i,t);else if(!T.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;T.get(i)?.clusterData?.dir&&(r=T.get(i).clusterData.dir,n.debug(`Fixing dir`,T.get(i).clusterData.dir,r));let a=new y({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});j(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:T.get(i).clusterData,label:T.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!T.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(T);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&I(r.graph,t+1)}}},`extractor`),L=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=L(e,e.children(t));n=[...n,...r]}),n},`sorter`),R=t(e=>L(e,e.children()),`sortNodesByHierarchy`),z=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=T.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),B=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||k(i,n))continue;let r=P(i,e,t);if(r&&!z(e,r,t))return r}return null},`findSafeAnchorNode`);function V({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??U;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??f)(u,t.markers,t.type,t.diagramId),H();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let p=await s(t,d),m=await r(t,d),h={...d,measure:p};i?await i(t,h,m):await W(t,h,o),await a?.(t,h,m)},`render`)}t(V,`createCommonLayoutRenderer`);function H(){c(),_(),te(),O()}t(H,`clearLayoutRenderState`);async function U(e,{element:t},n){return await w(t,e,n)}t(U,`defaultMeasureLayout`);async function W(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await G(i,r,t,n);let a=q(e.nodes);for(let r of e.edges)J(r,n)||await Y(i,r,a,e,n,t)}t(W,`paintLayoutData`);async function G(e,t,n,r){t.clusterNode?a(t):K(t,n,r)?await ee(e.clusters,t):a(t)}t(G,`paintLayoutNode`);function K(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(K,`shouldPaintAsCluster`);function q(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(q,`buildNodeLookup`);function J(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(J,`shouldSkipPaintEdge`);async function Y(e,t,n,r,i,a){let o=m(e.edgePaths,{...t},i.clusterDb??new Map,r.type,X(t.start,t,n,a,i),X(t.end,t,n,a,i),r.diagramId,Z(t,i),r.layoutAlgorithm);g(t)&&(h.has(t.id)||await d(e.edgeLabels,t),Q(t,o))}t(Y,`paintLayoutEdge`);function X(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(X,`getRenderedNode`);function Z(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Z,`shouldSkipIntersect`);function Q(e,t){let n=t?.updatedPath??t?.originalPath,r=i(),{subGraphTitleTotalMargin:a}=o({flowchart:r.flowchart??{}});if(e.label){let n=h.get(e.id),{x:r,y:i}=v(e,t);n.attr(`transform`,`translate(${r}, ${i+a/2})`)}for(let[t,r]of[[`startLeft`,e.startLabelLeft],[`startRight`,e.startLabelRight],[`endLeft`,e.endLabelLeft],[`endRight`,e.endLabelRight]])if(r){let{x:r,y:i}=$(e,t,n);p.get(e.id)[t].attr(`transform`,`translate(${r}, ${i})`)}}t(Q,`positionRenderedEdgeLabel`);var re={startLeft:`start_left`,startRight:`start_right`,endLeft:`end_left`,endRight:`end_right`};function $(e,t,n){let r=e.terminalLabelCenters?.[t];if(r)return{...r};if(!n)return{x:e.x,y:e.y};let i=t.startsWith(`start`)?e.arrowTypeStart:e.arrowTypeEnd;return u.calcTerminalLabelPosition(i?10:0,re[t],n)}t($,`terminalLabelTranslate`);export{U as a,R as c,b as i,T as n,P as o,V as r,S as s,ne as t};
|
|
2
|
+
import{t as e}from"./index-D-YnULfY.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-BWF7jMDv.js";import{b as r,y as i}from"./chunk-DSNLSHJZ-C_LIPn61.js";import{i as a,n as o,r as s,t as c,u as l}from"./chunk-ZAUX2LTX-DP4s36LS.js";import{h as u}from"./chunk-7S6XSTFO-0TGPJxiv.js";import{a as d,c as f,d as p,i as m,n as h,r as g,t as _,u as v}from"./chunk-WQQL4CDK-Dv8ocEd6.js";import{t as y}from"./graphlib-DS17s2tU.js";import{r as ee,t as te}from"./chunk-HNE4Q36P-riaksE6p.js";function b(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t(b,`createLayoutElementGroups`);async function x(e,t,n){if(t.label){let{shapeSvg:r,bbox:i}=await l(e,n===void 0?t:{...t,width:n});t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}t(x,`measureGroupLabel`);async function S(e,t,n){let r=await s(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(S,`insertMeasuredNode`);function C(e,t,n){let r=e,i=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||i.has(r.parentId))break;i.add(r.parentId),r=t.get(r.parentId)}return n}t(C,`resolveNodeDir`);async function w(t,n,i={}){let a=new y({multigraph:!0,compound:!0}),o=[...n.edges],s=r(),c=b(t),{edgeLabels:l,nodes:u}=c,f=new Map,p=new Map(n.nodes.map(e=>[e.id,e])),m=n.direction,h=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup){if(h){let t=i.unwrapGroupLabels&&e.labelType!==`markdown`;await x(u,e,t?1/0:void 0)}a.setNode(e.id,{...e})}else{if(h){let t=await S(u,e,{config:s,dir:C(e,p,m)});f.set(e.id,t)}a.setNode(e.id,{...e})}}));for(let e of o)h&&g(e)&&await d(l,e),a.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-INFHLROL-3uHXrFqA.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:a,groups:c,nodeElements:f}}t(w,`createGraphWithElements`);var T=new Map,E=new Map,D=new Map,O=t(()=>{E.clear(),D.clear(),T.clear()},`clear`),k=t((e,t)=>{let r=E.get(t)||[];return n.trace(`In isDescendant`,t,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),A=t((e,t)=>{let r=E.get(t)||[];return n.info(`Descendants of `,t,` is `,r),n.info(`Edge is `,e),e.v===t||e.w===t?!1:r?r.includes(e.v)||k(e.v,t)||k(e.w,t)||r.includes(e.w):(n.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),j=t((e,t,r,i)=>{n.debug(`Copying children of `,e,`root`,i,`data`,t.node(e),i);let a=t.children(e)||[];e!==i&&a.push(e),n.debug(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)j(a,t,r,i);else{let o=t.node(a);n.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==t.parent(a)&&(n.debug(`Setting parent`,a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(n.debug(`Setting parent`,a,e),r.setParent(a,e)):(n.info(`In copy `,e,`root`,i,`data`,t.node(e),i),n.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=t.edges(a);n.debug(`Copying Edges`,s),s.forEach(a=>{n.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);n.info(`Edge data`,o,i);try{A(a,i)?(n.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),n.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):n.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){n.error(e)}})}n.debug(`Removing node`,a),t.removeNode(a)})},`copy`),M=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)D.set(i,e),r=[...r,...M(i,t)];return r},`extractDescendants`),N=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),P=t((e,t,r)=>{let i=t.children(e);if(n.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let n=P(e,t,r),i=N(t,r,n);if(n){if(i.length>0)a=n;else return n}}return a},`findNonClusterChild`),F=t(e=>!T.has(e)||!T.get(e).externalConnections?e:T.has(e)?T.get(e).id:e,`getAnchorId`),ne=t((e,t)=>{if(!e||t>10)n.debug(`Opting out, no graph `);else{n.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(n.debug(`Cluster identified`,t,` Replacement id in edges: `,P(t,e,t)),E.set(t,M(t,e)),T.set(t,{id:P(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let r=e.children(t),i=e.edges();r.length>0?(n.debug(`Cluster identified`,t,E),i.forEach(e=>{k(e.v,t)^k(e.w,t)&&(n.debug(`Edge: `,e,` leaves cluster `,t),n.debug(`Descendants of XXX `,t,`: `,E.get(t)),T.get(t).externalConnections=!0)})):n.debug(`Not a cluster `,t,E)});for(let t of T.keys()){let n=T.get(t).id,r=e.parent(n);r!==t&&T.has(r)&&!T.get(r).externalConnections&&(T.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&T.get(t)?.externalConnections&&i&&z(e,n,t)){let r=B(e,t,e.parent(n));r&&(T.get(t).id=r)}}e.edges().forEach(function(t){let r=e.edge(t);n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),n.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let i=t.v,a=t.w;if(n.debug(`Fix XXX`,T,`ids:`,t.v,t.w,`Translating: `,T.get(t.v),` --- `,T.get(t.w)),T.get(t.v)||T.get(t.w)){if(n.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),i=F(t.v),a=F(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){let n=e.parent(i);T.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){let n=e.parent(a);T.get(n).externalConnections=!0,r.toCluster=t.w}n.debug(`Fix Replacing with XXX`,i,a,t.name),e.setEdge(i,a,r,t.name)}}),I(e,0),n.trace(T)}},`adjustClustersAndEdges`),I=t((e,t)=>{if(t>10){n.error(`Bailing out`);return}let r=e.nodes(),i=!1;for(let t of r){let n=e.children(t);i||=n.length>0}if(!i)n.debug(`Done, no node has children`,e.nodes());else{n.debug(`Nodes = `,r,t);for(let i of r)if(n.debug(`Extracting node`,i,T,T.has(i)&&!T.get(i).externalConnections,!e.parent(i),e.node(i),e.children(`D`),` Depth `,t),!T.has(i))n.debug(`Not a cluster`,i,t);else if(!T.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){n.debug(`Cluster without external connections, without a parent and with children`,i,t);let r=e.graph().rankdir===`TB`?`LR`:`TB`;T.get(i)?.clusterData?.dir&&(r=T.get(i).clusterData.dir,n.debug(`Fixing dir`,T.get(i).clusterData.dir,r));let a=new y({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});j(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:T.get(i).clusterData,label:T.get(i).label,graph:a})}else n.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!T.get(i).externalConnections,` no parent: `,!e.parent(i),` children `,e.children(i)&&e.children(i).length>0,e.children(`D`),t),n.debug(T);r=e.nodes(),n.debug(`New list of nodes`,r);for(let i of r){let r=e.node(i);n.debug(` Now next level`,i,r),r?.clusterNode&&I(r.graph,t+1)}}},`extractor`),L=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=L(e,e.children(t));n=[...n,...r]}),n},`sorter`),R=t(e=>L(e,e.children()),`sortNodesByHierarchy`),z=t((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=T.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),B=t((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||k(i,n))continue;let r=P(i,e,t);if(r&&!z(e,r,t))return r}return null},`findSafeAnchorNode`);function V({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??U;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??f)(u,t.markers,t.type,t.diagramId),H();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let p=await s(t,d),m=await r(t,d),h={...d,measure:p};i?await i(t,h,m):await W(t,h,o),await a?.(t,h,m)},`render`)}t(V,`createCommonLayoutRenderer`);function H(){c(),_(),te(),O()}t(H,`clearLayoutRenderState`);async function U(e,{element:t},n){return await w(t,e,n)}t(U,`defaultMeasureLayout`);async function W(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await G(i,r,t,n);let a=q(e.nodes);for(let r of e.edges)J(r,n)||await Y(i,r,a,e,n,t)}t(W,`paintLayoutData`);async function G(e,t,n,r){t.clusterNode?a(t):K(t,n,r)?await ee(e.clusters,t):a(t)}t(G,`paintLayoutNode`);function K(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(K,`shouldPaintAsCluster`);function q(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(q,`buildNodeLookup`);function J(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(J,`shouldSkipPaintEdge`);async function Y(e,t,n,r,i,a){let o=m(e.edgePaths,{...t},i.clusterDb??new Map,r.type,X(t.start,t,n,a,i),X(t.end,t,n,a,i),r.diagramId,Z(t,i),r.layoutAlgorithm);g(t)&&(h.has(t.id)||await d(e.edgeLabels,t),Q(t,o))}t(Y,`paintLayoutEdge`);function X(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(X,`getRenderedNode`);function Z(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Z,`shouldSkipIntersect`);function Q(e,t){let n=t?.updatedPath??t?.originalPath,r=i(),{subGraphTitleTotalMargin:a}=o({flowchart:r.flowchart??{}});if(e.label){let n=h.get(e.id),{x:r,y:i}=v(e,t);n.attr(`transform`,`translate(${r}, ${i+a/2})`)}for(let[t,r]of[[`startLeft`,e.startLabelLeft],[`startRight`,e.startLabelRight],[`endLeft`,e.endLabelLeft],[`endRight`,e.endLabelRight]])if(r){let{x:r,y:i}=$(e,t,n);p.get(e.id)[t].attr(`transform`,`translate(${r}, ${i})`)}}t(Q,`positionRenderedEdgeLabel`);var re={startLeft:`start_left`,startRight:`start_right`,endLeft:`end_left`,endRight:`end_right`};function $(e,t,n){let r=e.terminalLabelCenters?.[t];if(r)return{...r};if(!n)return{x:e.x,y:e.y};let i=t.startsWith(`start`)?e.arrowTypeStart:e.arrowTypeEnd;return u.calcTerminalLabelPosition(i?10:0,re[t],n)}t($,`terminalLabelTranslate`);export{U as a,R as c,b as i,T as n,P as o,V as r,S as s,ne as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{m as n,p as r}from"./src-BWF7jMDv.js";import{$ as i,C as a,H as o,K as s,R as c,V as l,_ as u,a as d,b as f,j as p,s as m,v as h}from"./chunk-DSNLSHJZ-Chj2PD0m.js";import"./chunk-ZAUX2LTX-DS3wpSTy.js";import"./chunk-AQDTSKZB-BdEDejS-.js";import{h as g,o as _}from"./chunk-7S6XSTFO-DzX1XF3_.js";import{i as v,n as y,o as b,r as x}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-WQQL4CDK-BtyaHLI7.js";import{n as S,t as C}from"./chunk-VQ5W62QI-BiWZxVe5.js";import"./chunk-HNE4Q36P-V3jylrEv.js";import{t as w}from"./chunk-55XCU76K-DlITu1ZH.js";import{a as T,i as E}from"./mermaid.core-CdVzG6_M.js";var D=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],F=[1,64],I=[1,8,9,41],ee=[1,77],L=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],R=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],z=[13,60,86,100,102,103],B=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],V=[1,103],H=[1,121],U=[1,117],W=[1,113],G=[1,119],K=[1,114],q=[1,115],J=[1,116],Y=[1,118],X=[1,120],ne=[22,50,60,61,82,86,87,88,89,90],re=[1,128],Z=[12,39],ie=[1,8,9,39,41,44,46],Q=[1,8,9,22],ae=[1,153],oe=[1,8,9,61],$=[1,8,9,22,50,60,61,82,86,87,88,89,90],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:F}),{39:[1,65]},t(I,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:ee,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(L,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(L,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(R,[2,133]),t(R,[2,134]),t(R,[2,135]),t(R,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:F},t(O,[2,64]),{67:93,73:P,74:F},t(z,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(B,[2,84]),t(B,[2,85]),t(B,[2,86]),t(B,[2,87]),t(B,[2,88]),t(te,[2,89]),t(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:V},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:H,50:U,59:110,60:W,82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},{60:[1,122]},{13:ee,55:123},t(I,[2,72]),t(I,[2,138]),{22:H,50:U,59:124,60:W,61:[1,125],82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},t(ne,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(L,[2,16]),t(L,[2,17]),t(L,[2,18]),{11:127,12:re,39:[2,36]},t(Z,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(Z,[2,10]),t(ie,[2,55],{11:131,12:re}),t(D,[2,7]),{9:[1,132]},t(Q,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(z,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(z,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(I,[2,48],{39:[1,142]}),{41:[1,143]},t(I,[2,50]),{41:[2,61],45:144,51:V},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:ae}),t(oe,[2,107],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),t($,[2,109]),t($,[2,111]),t($,[2,112]),t($,[2,113]),t($,[2,114]),t($,[2,115]),t($,[2,116]),t($,[2,117]),t($,[2,118]),t($,[2,119]),t(O,[2,106]),t(I,[2,71]),t(O,[2,73],{61:ae}),{60:[1,155]},t(L,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(Z,[2,12]),t(ie,[2,56]),{1:[2,4]},t(Q,[2,69]),t(Q,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(z,[2,80]),t(I,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:V},t(I,[2,49]),{41:[2,62]},t(I,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:H,50:U,60:W,82:G,84:169,85:112,86:K,87:q,88:J,89:Y,90:X},t($,[2,110]),t(ne,[2,75]),{14:[1,170]},t(Z,[2,11]),t(Q,[2,70]),t(I,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:V},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(oe,[2,108],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),t(ie,[2,8]),t(I,[2,51]),{41:[1,175]},t(I,[2,54]),t(O,[2,104]),t(I,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{m as n,p as r}from"./src-BWF7jMDv.js";import{$ as i,C as a,H as o,K as s,R as c,V as l,_ as u,a as d,b as f,j as p,s as m,v as h}from"./chunk-DSNLSHJZ-C_LIPn61.js";import"./chunk-ZAUX2LTX-DP4s36LS.js";import"./chunk-AQDTSKZB-C3NroFBT.js";import{h as g,o as _}from"./chunk-7S6XSTFO-0TGPJxiv.js";import{i as v,n as y,o as b,r as x}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-WQQL4CDK-Dv8ocEd6.js";import{n as S,t as C}from"./chunk-VQ5W62QI-D1v-PJLW.js";import"./chunk-HNE4Q36P-riaksE6p.js";import{t as w}from"./chunk-55XCU76K-BymFzRwu.js";import{a as T,i as E}from"./mermaid.core-CQFwDpsY.js";var D=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],F=[1,64],I=[1,8,9,41],ee=[1,77],L=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],R=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],z=[13,60,86,100,102,103],B=[13,60,73,74,86,100,102,103],te=[13,60,68,69,70,71,72,86,100,102,103],V=[1,103],H=[1,121],U=[1,117],W=[1,113],G=[1,119],K=[1,114],q=[1,115],J=[1,116],Y=[1,118],X=[1,120],ne=[22,50,60,61,82,86,87,88,89,90],re=[1,128],Z=[12,39],ie=[1,8,9,39,41,44,46],Q=[1,8,9,22],ae=[1,153],oe=[1,8,9,61],$=[1,8,9,22,50,60,61,82,86,87,88,89,90],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:F}),{39:[1,65]},t(I,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:ee,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(L,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(L,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(R,[2,133]),t(R,[2,134]),t(R,[2,135]),t(R,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:F},t(O,[2,64]),{67:93,73:P,74:F},t(z,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(B,[2,84]),t(B,[2,85]),t(B,[2,86]),t(B,[2,87]),t(B,[2,88]),t(te,[2,89]),t(te,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:V},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:H,50:U,59:110,60:W,82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},{60:[1,122]},{13:ee,55:123},t(I,[2,72]),t(I,[2,138]),{22:H,50:U,59:124,60:W,61:[1,125],82:G,84:111,85:112,86:K,87:q,88:J,89:Y,90:X},t(ne,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(L,[2,16]),t(L,[2,17]),t(L,[2,18]),{11:127,12:re,39:[2,36]},t(Z,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(Z,[2,10]),t(ie,[2,55],{11:131,12:re}),t(D,[2,7]),{9:[1,132]},t(Q,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(z,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(z,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(I,[2,48],{39:[1,142]}),{41:[1,143]},t(I,[2,50]),{41:[2,61],45:144,51:V},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:ae}),t(oe,[2,107],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),t($,[2,109]),t($,[2,111]),t($,[2,112]),t($,[2,113]),t($,[2,114]),t($,[2,115]),t($,[2,116]),t($,[2,117]),t($,[2,118]),t($,[2,119]),t(O,[2,106]),t(I,[2,71]),t(O,[2,73],{61:ae}),{60:[1,155]},t(L,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(Z,[2,12]),t(ie,[2,56]),{1:[2,4]},t(Q,[2,69]),t(Q,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(z,[2,80]),t(I,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:V},t(I,[2,49]),{41:[2,62]},t(I,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:H,50:U,60:W,82:G,84:169,85:112,86:K,87:q,88:J,89:Y,90:X},t($,[2,110]),t(ne,[2,75]),{14:[1,170]},t(Z,[2,11]),t(Q,[2,70]),t(I,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:V},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(oe,[2,108],{85:154,22:H,50:U,60:W,82:G,86:K,87:q,88:J,89:Y,90:X}),t(ie,[2,8]),t(I,[2,51]),{41:[1,175]},t(I,[2,54]),t(O,[2,104]),t(I,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};se.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-NGNAAXSQ-DuHRe0y2.js";export{k as createCynefinServices}from"./mermaid-parser.core-
|
|
1
|
+
import"./chunk-NGNAAXSQ-DuHRe0y2.js";export{k as createCynefinServices}from"./mermaid-parser.core-DZwBblMg.js";
|