@coopcli/specsketch 2026.904.1 → 2026.904.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.
Files changed (96) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/client/assets/{abnfDiagram-VCTEODGH-BRSPbDe2.js → abnfDiagram-VCTEODGH-DD_PZcSF.js} +1 -1
  3. package/dist/client/assets/{arc-CydpUA4x.js → arc-Cgz_9Rec.js} +1 -1
  4. package/dist/client/assets/architecture-7GRP2DOG-DXDmqNnm.js +1 -0
  5. package/dist/client/assets/{architectureDiagram-5GKGNRK7-BnAWQ9BF.js → architectureDiagram-5GKGNRK7-BScciCDW.js} +1 -1
  6. package/dist/client/assets/{blockDiagram-I7D4REHJ-BLfEm7nQ.js → blockDiagram-I7D4REHJ-DdkohP1y.js} +1 -1
  7. package/dist/client/assets/{c4Diagram-7LVT6UL2-BiGdyDb3.js → c4Diagram-7LVT6UL2-DW7c-mw9.js} +1 -1
  8. package/dist/client/assets/channel-CwsNyF5o.js +1 -0
  9. package/dist/client/assets/{chunk-2E4U76K2-B7jDhluq.js → chunk-2E4U76K2-D22vVzfj.js} +1 -1
  10. package/dist/client/assets/{chunk-4HAMMTFA-CeU3f92U.js → chunk-4HAMMTFA-CbqFZjYE.js} +1 -1
  11. package/dist/client/assets/{chunk-75Z2AOVW-4JCVdQWY.js → chunk-75Z2AOVW-BrvZc1p0.js} +1 -1
  12. package/dist/client/assets/{chunk-CLGD4ZFX-BOVbR6kW.js → chunk-CLGD4ZFX-DuXEhdQn.js} +1 -1
  13. package/dist/client/assets/{chunk-DU6HZSFF-CIXLDUI_.js → chunk-DU6HZSFF-CP2Lgblu.js} +1 -1
  14. package/dist/client/assets/{chunk-F27PBJKO-B5GmXBLb.js → chunk-F27PBJKO-Ba4L3nhq.js} +1 -1
  15. package/dist/client/assets/{chunk-GMAD6QVW-D6jp_rLd.js → chunk-GMAD6QVW-BnbjlruA.js} +1 -1
  16. package/dist/client/assets/{chunk-GVQU2GXP-BSS01C8s.js → chunk-GVQU2GXP-D0KIxwSd.js} +1 -1
  17. package/dist/client/assets/{chunk-IMKFNOWR-RYwZN0Xs.js → chunk-IMKFNOWR-BL5dhTfX.js} +1 -1
  18. package/dist/client/assets/{chunk-L3NEJ4N5-D0rNlikd.js → chunk-L3NEJ4N5-CId2ELM4.js} +1 -1
  19. package/dist/client/assets/{chunk-OSK3NFVY-CxtLTZDw.js → chunk-OSK3NFVY-Cu-qGECv.js} +1 -1
  20. package/dist/client/assets/{chunk-P2QGCYS3-CYiUdWzq.js → chunk-P2QGCYS3-CPSCQ9tG.js} +1 -1
  21. package/dist/client/assets/{chunk-POPQ4Y6H-DgkPLssL.js → chunk-POPQ4Y6H-DQc_eWvB.js} +1 -1
  22. package/dist/client/assets/{chunk-PWAF6VOD-Db4-4OsA.js → chunk-PWAF6VOD-D-ell2Md.js} +1 -1
  23. package/dist/client/assets/{chunk-SHT3W25Y-Ji-xYakZ.js → chunk-SHT3W25Y-VWM93YfB.js} +1 -1
  24. package/dist/client/assets/{chunk-SVP7TREG-cmFzvno3.js → chunk-SVP7TREG-ChWLqRWw.js} +1 -1
  25. package/dist/client/assets/{chunk-TICWLB2K-Cx1Qs9wQ.js → chunk-TICWLB2K-sZ-wKN0T.js} +1 -1
  26. package/dist/client/assets/{chunk-TLUHSLCS-BLXY086M.js → chunk-TLUHSLCS-DpK1BwpG.js} +2 -2
  27. package/dist/client/assets/{chunk-XXDRQBXY--jdiETSF.js → chunk-XXDRQBXY-9J8a3peG.js} +1 -1
  28. package/dist/client/assets/classDiagram-ZZMXUADV-CL1Gsl42.js +1 -0
  29. package/dist/client/assets/classDiagram-v2-VYDZK3BY-CL1Gsl42.js +1 -0
  30. package/dist/client/assets/{cose-bilkent-JH36ORCC-Ba6yLkVt.js → cose-bilkent-JH36ORCC-D2f7pHnZ.js} +1 -1
  31. package/dist/client/assets/{cynefin-OW5HDTMX-ra_KnFP6.js → cynefin-OW5HDTMX-DQgOtlBW.js} +1 -1
  32. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-Ct-LNR_1.js → cynefinDiagram-5FMLGOSQ-Bt6s92Zp.js} +1 -1
  33. package/dist/client/assets/{dagre-GXQ25YYZ-DJi473sw.js → dagre-GXQ25YYZ-DsH6Sn6x.js} +1 -1
  34. package/dist/client/assets/{diagram-S7CK7UJ4-kMRGU2Fv.js → diagram-S7CK7UJ4-BuBY0Bmw.js} +1 -1
  35. package/dist/client/assets/{diagram-UQ7AKVKN-YvBZDAJN.js → diagram-UQ7AKVKN-WYhDPgip.js} +1 -1
  36. package/dist/client/assets/{diagram-VSXAHHWV-DDK4yWa2.js → diagram-VSXAHHWV-CVbeXXq_.js} +1 -1
  37. package/dist/client/assets/{diagram-VX7I27RA-DGg18jEl.js → diagram-VX7I27RA-BCJ12vij.js} +1 -1
  38. package/dist/client/assets/{diagram-Z3DM3KII-i5D_IxwV.js → diagram-Z3DM3KII-QbY9hS0C.js} +1 -1
  39. package/dist/client/assets/{dist-fh2zfMMY.js → dist-0EGPFeb8.js} +1 -1
  40. package/dist/client/assets/{ebnfDiagram-PWID7BFC-lD2h9EBl.js → ebnfDiagram-PWID7BFC-BYfTt2xk.js} +1 -1
  41. package/dist/client/assets/{erDiagram-RLTQ6QDP-xW2abP7i.js → erDiagram-RLTQ6QDP-Dgzx8syB.js} +1 -1
  42. package/dist/client/assets/eventmodeling-NTZA5JFV-CWXcsSMV.js +1 -0
  43. package/dist/client/assets/flowDiagram-HODETNUW-o819EIE2.js +1 -0
  44. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-BeymYKLD.js → ganttDiagram-EL5Y4UJY-s11_0VbC.js} +1 -1
  45. package/dist/client/assets/{gitGraph-4MIJSDKK-BEWLgvm2.js → gitGraph-4MIJSDKK-BZuvD_PX.js} +1 -1
  46. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BUDPc-8k.js → gitGraphDiagram-WWUBYQGX-BW4-DEKx.js} +1 -1
  47. package/dist/client/assets/{index-BWHy8TXM.js → index-BGwJ9-no.js} +14 -2
  48. package/dist/client/assets/{info-A6RAGUB7-CKfM1Jkg.js → info-A6RAGUB7-Bm1ThZXR.js} +1 -1
  49. package/dist/client/assets/{infoDiagram-27XIBGKW-Ad-Gyaye.js → infoDiagram-27XIBGKW-DsknnkHg.js} +1 -1
  50. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-KbTiiaHC.js → ishikawaDiagram-5VMMS53U-Cdfb5kXH.js} +1 -1
  51. package/dist/client/assets/{journeyDiagram-3NMN7TZE-CN2MkzPK.js → journeyDiagram-3NMN7TZE-CDl_YsGf.js} +1 -1
  52. package/dist/client/assets/{kanban-definition-UXKFOSKX-DhEzOLN4.js → kanban-definition-UXKFOSKX-OJxOfQwb.js} +1 -1
  53. package/dist/client/assets/{line-B90f4k6X.js → line-t4x2fKn5.js} +1 -1
  54. package/dist/client/assets/{linear-CW7Oi12O.js → linear-CBc6Ea1r.js} +1 -1
  55. package/dist/client/assets/{mermaid-parser.core-C9nLZzv4.js → mermaid-parser.core-CYnmpzvb.js} +3 -3
  56. package/dist/client/assets/{mermaid.core-DQoThCaK.js → mermaid.core-D7jcKChO.js} +3 -3
  57. package/dist/client/assets/{mindmap-definition-YA3MSWOX-J048QoEO.js → mindmap-definition-YA3MSWOX-BgN0KJt8.js} +1 -1
  58. package/dist/client/assets/{packet-AYTQ26CC-BKj_BZVA.js → packet-AYTQ26CC-DGBhG6cf.js} +1 -1
  59. package/dist/client/assets/{pegDiagram-XKGWAZYB-DG0kAfWm.js → pegDiagram-XKGWAZYB-CvwTxswb.js} +1 -1
  60. package/dist/client/assets/{pie-WAS4IAKB-DE_LVWU7.js → pie-WAS4IAKB-auXynLdx.js} +1 -1
  61. package/dist/client/assets/{pieDiagram-E7YTZNPT-Z3FhwRXc.js → pieDiagram-E7YTZNPT-DMZSzZw9.js} +1 -1
  62. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-Dw3TFUlr.js → quadrantDiagram-AXDQQJYC-DjRdBagM.js} +1 -1
  63. package/dist/client/assets/{radar-RG4KPBEZ-BtwXXEfu.js → radar-RG4KPBEZ-CDEkR2bm.js} +1 -1
  64. package/dist/client/assets/{railroad-74A4TZTK-CBKff9R-.js → railroad-74A4TZTK-BZrJNRNC.js} +1 -1
  65. package/dist/client/assets/railroad-abnf-HS5TGJTU-7HflyutZ.js +1 -0
  66. package/dist/client/assets/railroad-ebnf-LZEXJU2U-nR7cwH8I.js +1 -0
  67. package/dist/client/assets/railroad-peg-WCYAUIDC-DkUjz2sV.js +1 -0
  68. package/dist/client/assets/{railroadDiagram-O6MQD6OU-Cf_GxnJ6.js → railroadDiagram-O6MQD6OU-DL_c4CKT.js} +1 -1
  69. package/dist/client/assets/{requirementDiagram-BXWQKSXE-DeSfKgO1.js → requirementDiagram-BXWQKSXE-Lz7KPAjJ.js} +1 -1
  70. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-ZJbsUmhM.js → sankeyDiagram-P5KCCOFB-GohefsDN.js} +1 -1
  71. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-CZV-uNwY.js → sequenceDiagram-WJ2MYXX4-WJWaum0c.js} +1 -1
  72. package/dist/client/assets/{src-CKIr8zwz.js → src-BWdS1h-p.js} +1 -1
  73. package/dist/client/assets/{stateDiagram-D77RDMKH-S2gUXjCW.js → stateDiagram-D77RDMKH-CZsHQweI.js} +1 -1
  74. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CCd-0dX8.js +1 -0
  75. package/dist/client/assets/{swimlanes-42K2YHIH-D9K5izOo.js → swimlanes-42K2YHIH-CKl_nnL5.js} +1 -1
  76. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DW9265l_.js +8 -0
  77. package/dist/client/assets/{timeline-definition-24CTP7MA-o1QNGpc1.js → timeline-definition-24CTP7MA-BNAk0s8S.js} +1 -1
  78. package/dist/client/assets/{treeView-Q6P3EWNA-shNxWNdU.js → treeView-Q6P3EWNA-CkwT9NAE.js} +1 -1
  79. package/dist/client/assets/{treemap-WGGIJYW6-CTnOzBS1.js → treemap-WGGIJYW6-CJsaa-xE.js} +1 -1
  80. package/dist/client/assets/{vennDiagram-4TSXK5OY-C74kYmI6.js → vennDiagram-4TSXK5OY-Cr1_kVwN.js} +1 -1
  81. package/dist/client/assets/{wardley-WFR3VGLG-wa25fBU8.js → wardley-WFR3VGLG-CUGkROU2.js} +1 -1
  82. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-DMCFZZJI.js → wardleyDiagram-VM6X3IG4-kgbnNUuG.js} +1 -1
  83. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CZzaBxU9.js → xychartDiagram-S5SC5T6Z-Djts_YQl.js} +1 -1
  84. package/dist/client/index.html +1 -1
  85. package/package.json +1 -1
  86. package/dist/client/assets/architecture-7GRP2DOG-DN-gDuKL.js +0 -1
  87. package/dist/client/assets/channel-CViH2Cbt.js +0 -1
  88. package/dist/client/assets/classDiagram-ZZMXUADV-BFPBK_Z1.js +0 -1
  89. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BFPBK_Z1.js +0 -1
  90. package/dist/client/assets/eventmodeling-NTZA5JFV-DNmj4472.js +0 -1
  91. package/dist/client/assets/flowDiagram-HODETNUW-Df4CErRm.js +0 -1
  92. package/dist/client/assets/railroad-abnf-HS5TGJTU-Bv7gdzGQ.js +0 -1
  93. package/dist/client/assets/railroad-ebnf-LZEXJU2U-CCPDJ5pu.js +0 -1
  94. package/dist/client/assets/railroad-peg-WCYAUIDC-PBEP962D.js +0 -1
  95. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-BEJXWTYJ.js +0 -1
  96. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-ze5UMZmc.js +0 -8
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-CKIr8zwz.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./chunk-DU6HZSFF-CIXLDUI_.js";import{t as l}from"./channel-CViH2Cbt.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-4JCVdQWY.js";import"./chunk-PWAF6VOD-Db4-4OsA.js";import"./chunk-GMAD6QVW-D6jp_rLd.js";import{t as re}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-CYiUdWzq.js";import"./chunk-4HAMMTFA-CeU3f92U.js";import{i as ie,r as N}from"./chunk-GVQU2GXP-BSS01C8s.js";import{a as ae,c as oe,i as se,s as ce}from"./chunk-OSK3NFVY-CxtLTZDw.js";import{t as le}from"./graphlib-B8gBHxth.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function me(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},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;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.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{m as t,p as n}from"./src-BWdS1h-p.js";import{a as r,b as i,c as a,it as o,s,x as c}from"./chunk-DU6HZSFF-CP2Lgblu.js";import{t as l}from"./channel-CwsNyF5o.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,L as y,M as b,N as x,O as S,P as C,R as w,T,U as E,V as D,W as O,b as k,j as A,k as j,l as M,v as ee,w as te,z as ne}from"./chunk-75Z2AOVW-BrvZc1p0.js";import"./chunk-PWAF6VOD-D-ell2Md.js";import"./chunk-GMAD6QVW-BnbjlruA.js";import{t as re}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-CPSCQ9tG.js";import"./chunk-4HAMMTFA-CbqFZjYE.js";import{i as ie,r as N}from"./chunk-GVQU2GXP-D0KIxwSd.js";import{a as ae,c as oe,i as se,s as ce}from"./chunk-OSK3NFVY-Cu-qGECv.js";import{t as le}from"./graphlib-B8gBHxth.js";function ue(e){return Array.isArray(e)}function de(e){if(k(e))return e;let t=g(e);if(!fe(e))return{};if(ue(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ee(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?me(r,e):P(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return P(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return he(n,e),P(n,e),pe(n,e),n}function fe(e){switch(g(e)){case f:case T:case te:case p:case m:case S:case j:case u:case x:case A:case b:case C:case h:case v:case y:case w:case ne:case d:case E:case O:case D:case _:return!0;default:return!1}}function P(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function pe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function me(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function he(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var F=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},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;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.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`)};_.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,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-CKIr8zwz.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-CIXLDUI_.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-4JCVdQWY.js";import"./chunk-PWAF6VOD-Db4-4OsA.js";import"./chunk-GMAD6QVW-D6jp_rLd.js";import"./chunk-P2QGCYS3-CYiUdWzq.js";import{o as g}from"./chunk-4HAMMTFA-CeU3f92U.js";import{a as _}from"./chunk-F27PBJKO-B5GmXBLb.js";var v=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ae,[2,28]),t(ae,[2,29]),t(ae,[2,30]),t(ae,[2,31]),t(ae,[2,32]),t(ae,[2,33]),t(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(oe,[2,25]),t(oe,[2,26],{12:[1,138]}),t(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},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,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BWdS1h-p.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-DU6HZSFF-CP2Lgblu.js";import{_ as p,n as m,r as h}from"./chunk-75Z2AOVW-BrvZc1p0.js";import"./chunk-PWAF6VOD-D-ell2Md.js";import"./chunk-GMAD6QVW-BnbjlruA.js";import"./chunk-P2QGCYS3-CPSCQ9tG.js";import{o as g}from"./chunk-4HAMMTFA-CbqFZjYE.js";import{a as _}from"./chunk-F27PBJKO-Ba4L3nhq.js";var v=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],ae=[12,33],oe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],se={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ae,[2,28]),t(ae,[2,29]),t(ae,[2,30]),t(ae,[2,31]),t(ae,[2,32]),t(ae,[2,33]),t(ae,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(oe,[2,25]),t(oe,[2,26],{12:[1,138]}),t(oe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},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,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);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()+`
@@ -0,0 +1 @@
1
+ import{at as e,ot as t}from"./chunk-DU6HZSFF-CP2Lgblu.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-INFHLROL-B0uUizjq.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./index-BWHy8TXM.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-CKIr8zwz.js";import{b as r,x as i}from"./chunk-DU6HZSFF-CIXLDUI_.js";import{g as a}from"./chunk-75Z2AOVW-4JCVdQWY.js";import{a as o}from"./chunk-4HAMMTFA-CeU3f92U.js";import{i as s,n as c,r as l,t as u}from"./chunk-GVQU2GXP-BSS01C8s.js";import{a as d,i as f,l as p,n as m,r as h,s as g,t as _}from"./chunk-OSK3NFVY-CxtLTZDw.js";import{t as v}from"./graphlib-B8gBHxth.js";import{n as y,t as b}from"./chunk-L3NEJ4N5-D0rNlikd.js";function x(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(x,`createLayoutElementGroups`);async function S(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await o(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);async function w(t,n){let r=new v({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=x(t),{edgeLabels:c,nodes:l}=s,u=new Map,f=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)f&&await S(l,e),r.setNode(e.id,{...e});else{if(f){let t=await C(l,e,{config:o,dir:e.dir});u.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of a)f&&h(e)&&await d(c,e),r.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-B0uUizjq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:r,groups:s,nodeElements:u}}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`),I=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}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&&B(e,n,t)){let r=V(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)}}),L(e,0),n.trace(T)},`adjustClustersAndEdges`),L=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());return}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 v({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&&L(r.graph,t+1)}},`extractor`),R=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=R(e,e.children(t));n=[...n,...r]}),n},`sorter`),z=t(e=>R(e,e.children()),`sortNodesByHierarchy`),B=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`),V=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&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??g)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await G(t,m,o),await a?.(t,m,p)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),_(),b(),O()}t(U,`clearLayoutRenderState`);async function W(e,{element:t}){return await w(t,e)}t(W,`defaultMeasureLayout`);async function G(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 K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await y(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=f(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));h(t)&&(m.has(t.id)||await d(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=c({flowchart:r().flowchart??{}});if(e.label){let r=m.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=p.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=p.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=p.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=p.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{x as a,C as c,H as i,G as l,U as n,W as o,T as r,P as s,I as t,z as u};
2
+ import{t as e}from"./index-BGwJ9-no.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-BWdS1h-p.js";import{b as r,x as i}from"./chunk-DU6HZSFF-CP2Lgblu.js";import{g as a}from"./chunk-75Z2AOVW-BrvZc1p0.js";import{a as o}from"./chunk-4HAMMTFA-CbqFZjYE.js";import{i as s,n as c,r as l,t as u}from"./chunk-GVQU2GXP-D0KIxwSd.js";import{a as d,i as f,l as p,n as m,r as h,s as g,t as _}from"./chunk-OSK3NFVY-Cu-qGECv.js";import{t as v}from"./graphlib-B8gBHxth.js";import{n as y,t as b}from"./chunk-L3NEJ4N5-CId2ELM4.js";function x(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(x,`createLayoutElementGroups`);async function S(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await o(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t(S,`measureGroupLabel`);async function C(e,t,n){let r=await l(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t(C,`insertMeasuredNode`);async function w(t,n){let r=new v({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=x(t),{edgeLabels:c,nodes:l}=s,u=new Map,f=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)f&&await S(l,e),r.setNode(e.id,{...e});else{if(f){let t=await C(l,e,{config:o,dir:e.dir});u.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of a)f&&h(e)&&await d(c,e),r.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-B0uUizjq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:r,groups:s,nodeElements:u}}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`),I=t((e,t)=>{if(!e||t>10){n.debug(`Opting out, no graph `);return}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&&B(e,n,t)){let r=V(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)}}),L(e,0),n.trace(T)},`adjustClustersAndEdges`),L=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());return}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 v({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&&L(r.graph,t+1)}},`extractor`),R=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=R(e,e.children(t));n=[...n,...r]}),n},`sorter`),z=t(e=>R(e,e.children()),`sortNodesByHierarchy`),B=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`),V=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&&!B(e,r,t))return r}return null},`findSafeAnchorNode`);function H({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let s=n??W;return t(async function(t,n,c,l){let u=n.select(`g`);(c?.insertMarkers??g)(u,t.markers,t.type,t.diagramId),U();let d={element:u,helpers:c,options:l};d.preparedLayout=await e?.(t,d);let f=await s(t,d),p=await r(t,d),m={...d,measure:f};i?await i(t,m,p):await G(t,m,o),await a?.(t,m,p)},`render`)}t(H,`createCommonLayoutRenderer`);function U(){u(),_(),b(),O()}t(U,`clearLayoutRenderState`);async function W(e,{element:t}){return await w(t,e)}t(W,`defaultMeasureLayout`);async function G(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 K(i,r,t,n);let a=J(e.nodes);for(let r of e.edges)Y(r,n)||await X(i,r,a,e,n,t)}t(G,`paintLayoutData`);async function K(e,t,n,r){t.clusterNode?s(t):q(t,n,r)?await y(e.clusters,t):s(t)}t(K,`paintLayoutNode`);function q(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t(q,`shouldPaintAsCluster`);function J(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t(J,`buildNodeLookup`);function Y(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t(Y,`shouldSkipPaintEdge`);async function X(e,t,n,r,i,a){let o=f(e.edgePaths,{...t},i.clusterDb??new Map,r.type,Z(t.start,t,n,a,i),Z(t.end,t,n,a,i),r.diagramId,Q(t,i));h(t)&&(m.has(t.id)||await d(e.edgeLabels,t),$(t,o))}t(X,`paintLayoutEdge`);function Z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t(Z,`getRenderedNode`);function Q(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t(Q,`shouldSkipIntersect`);function $(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=c({flowchart:r().flowchart??{}});if(e.label){let r=m.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=p.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=p.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=p.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=p.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t($,`positionRenderedEdgeLabel`);export{x as a,C as c,H as i,G as l,U as n,W as o,T as r,P as s,I as t,z as u};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-CKIr8zwz.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-CIXLDUI_.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-4JCVdQWY.js";import{t as g}from"./chunk-PWAF6VOD-Db4-4OsA.js";import{n as _,r as v}from"./chunk-GMAD6QVW-D6jp_rLd.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-CYiUdWzq.js";import{t as C}from"./rough.esm-CSKSodPl.js";var w=1,T=3;async function E(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let[e=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=e*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}e(D,`hasTextBesidesImages`);var O=3,k=32,A=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=t.width?Math.max(t.width-2*(t.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await _(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-v/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),j=e(async(e,t,r)=>{if(t.stereotype!==void 0)return A(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=await _(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),y=(t?.padding??0)/2,b;if(a){let e=g.children[0],t=n(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):s.attr(`transform`,`translate(0, `+-b.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:b,halfPadding:y,label:s}},`labelHelper`),M=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=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`),P=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(F,`createPathFromPoints`);function I(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(I,`generateFullSineWavePoints`);function L(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(L,`generateCirclePoints`);function ee(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var R=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`),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`),te=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}e(B,`intersectNode`);var ne=B;function V(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(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}e(re,`intersectCircle`);var ie=re;function U(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&&W(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&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(U,`intersectLine`);function W(e,t){return e*t>0}e(W,`sameSign`);var G=U;function ae(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=G(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(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,n){let{labelStyles:r}=b(n);n.labelStyle=r;let i=P(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=C.svg(o),l=y(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(oe,`anchor`);function se(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(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ce,`calculateArcSagitta`);async function le(t,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(t,n,P(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(n,D),n.intersect=function(e){return K.polygon(n,x,e)},u}e(le,`bowTieRect`);async function ue(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(t,n,P(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,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=C.svg(o).path(_,y(n,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(n,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=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`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,T,e)},o}e(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??o(u())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,g,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/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 N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(he,`collapsedGroup`);function q(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(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=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);break}return t},`expandAndDeduplicateDirections`),ye=e(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"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`),[_e]:()=>[{x:0,y:0}]},xe=e((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(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=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(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=C.svg(a).path(z(-u/2,f,u,d,12),y(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+18/2).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`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(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=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(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=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(Ee,`choice`);async function De(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(e,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}e(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(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),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(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=C.svg(a).path(z(-u/2,f,u,d,12),y(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(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(ke,`consoleWindow`);function Ae(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-BWdS1h-p.js";import{A as r,B as i,M as a,T as o,b as s,f as c,g as l,x as u,z as d}from"./chunk-DU6HZSFF-CP2Lgblu.js";import{a as f,p,r as m,u as h}from"./chunk-75Z2AOVW-BrvZc1p0.js";import{t as g}from"./chunk-PWAF6VOD-D-ell2Md.js";import{n as _,r as v}from"./chunk-GMAD6QVW-BnbjlruA.js";import{a as y,i as b,r as x,t as S}from"./chunk-P2QGCYS3-CPSCQ9tG.js";import{t as C}from"./rough.esm-CSKSodPl.js";var w=1,T=3;async function E(t){let n=t.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(t);await Promise.all([...n].map(t=>new Promise(n=>{function i(){if(t.style.display=`flex`,t.style.flexDirection=`column`,r){let[e=c.fontSize]=p(u().fontSize?u().fontSize:window.getComputedStyle(document.body).fontSize),n=e*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}e(i,`setupImage`),setTimeout(()=>{t.complete&&i()}),t.addEventListener(`error`,i),t.addEventListener(`load`,i)})))}e(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}e(D,`hasTextBesidesImages`);var O=3,k=32,A=e(async(e,t,r)=>{let i=u(),a=e.insert(`g`).attr(`class`,r??`node default`).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),s=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),c=t.width?Math.max(t.width-2*(t.padding??0),k):u().flowchart?.wrappingWidth??200,l=i.c4?.wrap??!0?c:1/0,p=await Promise.all(s.map(async e=>{let r=o.append(`g`).attr(`class`,e.cssClass),a=await _(r,d(f(e.text??``),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return n(a).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),n(a).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),m=Math.max(...p.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of p)e.attr(`transform`,`translate(${m/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let v=p.length>0?g-O:0;return o.insert(`rect`,`:first-child`),o.attr(`transform`,`translate(${-m/2}, ${-v/2})`),{shapeSvg:a,bbox:o.node().getBBox(),halfPadding:(t.padding??0)/2,label:o}},`c4LabelHelper`),j=e(async(e,t,r)=>{if(t.stereotype!==void 0)return A(e,t,r);let i,a=t.useHtmlLabels||l(u()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,h(t.labelStyle)),c;c=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let p=!!t.icon||!!t.img,m=t.labelType===`markdown`,g=await _(s,d(f(c),u()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||u().flowchart?.wrappingWidth,classes:m?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:p,markdown:m},u()),y=(t?.padding??0)/2,b;if(a){let e=g.children[0],t=n(g);await E(e),b=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,b.width),t.attr(`height`,b.height)}else b=await v.measure(()=>g.getBBox());return a?s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`):s.attr(`transform`,`translate(0, `+-b.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-b.width/2+`, `+-b.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:b,halfPadding:y,label:s}},`labelHelper`),M=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(u()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await _(a,d(f(t),u()),{useHtmlLabels:i,width:r.width||u()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(o(u())){let e=s.children[0],t=n(s);l=await v.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await v.measure(()=>s.getBBox());return i?a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):a.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:l,halfPadding:c,label:a}},`insertLabel`),N=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`),P=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(F,`createPathFromPoints`);function I(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(I,`generateFullSineWavePoints`);function L(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(L,`generateCirclePoints`);function ee(t){let n=Array.from(t.childNodes).filter(e=>e.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(ee,`mergePaths`);var R=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`),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`),te=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=u(),c=o(s);return await _(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`);function B(e,t){return e.intersect(t)}e(B,`intersectNode`);var ne=B;function V(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(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}e(re,`intersectCircle`);var ie=re;function U(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&&W(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&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}e(U,`intersectLine`);function W(e,t){return e*t>0}e(W,`sameSign`);var G=U;function ae(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=G(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(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,n){let{labelStyles:r}=b(n);n.labelStyle=r;let i=P(n),a=i;i||(a=`anchor`);let o=e.insert(`g`).attr(`class`,a).attr(`id`,n.domId||n.id),{cssStyles:s}=n,c=C.svg(o),l=y(n,{fill:`black`,stroke:`none`,fillStyle:`solid`});n.look!==`handDrawn`&&(l.roughness=0);let u=c.circle(0,0,2,l),d=o.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,h(s)),N(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),K.circle(n,1,e)},o}e(oe,`anchor`);function se(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(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(ce,`calculateArcSagitta`);async function le(t,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(t,n,P(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=ce(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:v}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...se(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...se(g/2,_/2,g/2,-_/2,p,m,!0)],S=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),v&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),i&&n.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,i),D.attr(`transform`,`translate(${p/2}, 0)`),N(n,D),n.intersect=function(e){return K.polygon(n,x,e)},u}e(le,`bowTieRect`);async function ue(t,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,label:c}=await j(t,n,P(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,x=o.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(n.look===`handDrawn`){let e=C.svg(o).path(_,y(n,{}));x.node()?.appendChild(e),v&&x.attr(`style`,v)}else x.append(`path`).attr(`d`,_).attr(`style`,a);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(n,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=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`),T=[...w(d/2,m,-1),...w(g/2,h,1).reverse()];return n.intersect=function(e){return K.polygon(n,T,e)},o}e(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=u(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=b(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),m=-f/2,g=-p/2,_=-(fe+de)/2,v=s.select(`.label`);v&&(t.useHtmlLabels??o(u())?v.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+_})`):v.attr(`transform`,`translate(0, ${-c.height/2+_})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(z(m,g,f,p,me),n);x=s.insert(()=>a,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,h(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,me).attr(`ry`,me).attr(`x`,m).attr(`y`,g).attr(`width`,f).attr(`height`,p).attr(`fill`,r).attr(`stroke`,i);let S=g+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,m+8).attr(`y1`,S).attr(`x2`,m+f-8).attr(`y2`,S).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let w=S+de/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 N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}e(he,`collapsedGroup`);function q(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(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=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);break}return t},`expandAndDeduplicateDirections`),ye=e(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"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`),[_e]:()=>[{x:0,y:0}]},xe=e((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(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=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}e(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(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=C.svg(a).path(z(-u/2,f,u,d,12),y(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+18/2).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`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=F(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=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}e(Te,`card`);function Ee(e,t){let{nodeStyles:n}=b(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(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=C.svg(r),c=y(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}e(Ee,`choice`);async function De(e,n,r){let{labelStyles:i,nodeStyles:a}=b(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await j(e,n,P(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=C.svg(o),t=y(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,h(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return N(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),K.circle(n,u,e)},o}e(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(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),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}e(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(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=C.svg(a).path(z(-u/2,f,u,d,12),y(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(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}e(ke,`consoleWindow`);function Ae(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(Ae,`createLine`);function je(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=C.svg(a),l=y(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(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),N(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),K.circle(n,o,e)},a}e(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(J,`generateCirclePoints`);async function Me(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(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=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=C.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p).replace(`Z`,``),v=h.path(_,g),x=F(m),S=h.path(x,{...g}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`: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}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}e(Y,`generateCirclePoints`);async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=C.svg(i),g=y(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p).replace(`Z`,``),v=h.path(_,g),x=F(m),S=h.path(x,{...g}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>v,`: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}, 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))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}e(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}e(X,`generateCirclePoints`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-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},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],g=C.svg(i),_=y(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=F(p).replace(`Z`,``),x=g.path(v,_),S=F(m).replace(`Z`,``),w=g.path(S,_),T=F(h),E=g.path(T,{..._}),D=i.insert(`g`,`:first-child`);return D.insert(()=>E,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,x=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...L(-_,-g/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}e(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(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=C.svg(i),n=y(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);N(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 x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}e(Ie,`person`);var Le=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`),Re=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`),ze=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<Ve&&(t.width=Ve)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<Be&&(t.height=Be)}let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=Math.max(t.width??0,l.width)+o,f=d/2,p=f/(2.5+d/50),m=Math.max(t.height??0,l.height)+a+p,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=Re(0,0,d,m,f,p),r=ze(0,p,d,m,f,p),i=y(t,{}),a=e.path(n,i),o=e.path(r,y(t,{fill:`none`}));g=c.insert(()=>o,`:first-child`),g=c.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=Le(0,0,d,m,f,p);g=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}e(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await j(e,t,P(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=C.svg(a),n=y(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`,h(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,h(f)).attr(`ry`,h(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return N(t,d,t.look===`handDrawn`?void 0:{width:s,height:c}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},a}e(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=y(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(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),g=y(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),x=o.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.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))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}e(Ge,`dividedRectangle`);async function Ke(e,n){let{labelStyles:r,nodeStyles:i}=b(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 j(e,n,P(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:p}=n;if(n.look===`handDrawn`){let e=C.svg(c),t=y(n,{roughness:.2,strokeWidth:2.5}),r=y(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,h(n.cssClasses)).attr(`style`,h(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return N(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),K.circle(n,u,e)},c}e(Ke,`doublecircle`);function qe(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=b(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,P(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=C.svg(o),{nodeBorder:l}=r,u=y(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),N(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),K.circle(n,7,e)},o}e(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(e,n){let{labelStyles:r,nodeStyles:i}=b(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<Je&&(n.height=Je),n.width=(n?.width??0)-o-o/2,n.width<Ye&&(n.width=Ye));let{shapeSvg:s,bbox:c,label:l}=await j(e,n,P(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=C.svg(s),g=y(n,{});n.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=F(p),v=h.path(_,g),x=s.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,N(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),K.polygon(n,p,e)},s}e(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(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=C.svg(i).path(g,y(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`?N(t,v):N(t,v,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}e(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=b(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=y(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),N(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return K.rect(t,e)},o}e(Qe,`forkJoin`);async function $e(e,n){let{labelStyles:r,nodeStyles:i}=b(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 j(e,n,P(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=C.svg(s),m=y(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=F(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,i),N(n,v),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),K.polygon(n,h,e)},s}e($e,`halfRoundedRectangle`);var et=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 tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(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=C.svg(c),n=y(t,{}),r=et(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=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}e(tt,`hexagon`);async function nt(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await j(e,n,P(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=C.svg(a),u=y(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=F(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})`),N(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),K.polygon(n,d,e)},a}e(nt,`hourglass`);async function rt(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,n,`icon-shape default`),p=n.pos===`t`,m=c,h=c,{nodeBorder:_}=r,{stylesMap:v}=S(n),x=-h/2,w=-m/2,T=n.label?8:0,E=C.svg(u),D=y(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(x,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${v.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+T},{x:r+h/2,y:i-a/2+d.height+T},{x:r+h/2,y:i+a/2},{x:r-h/2,y:i+a/2},{x:r-h/2,y:i-a/2+d.height+T},{x:r-d.width/2,y:i-a/2+d.height+T}]:[{x:r-h/2,y:i-a/2},{x:r+h/2,y:i-a/2},{x:r+h/2,y:i-a/2+m},{x:r+d.width/2,y:i-a/2+m},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+m},{x:r-h/2,y:i-a/2+m}],K.polygon(n,o,e)},u}e(rt,`icon`);async function it(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,n,`icon-shape default`),p=n.label?8:0,m=n.pos===`t`,{nodeBorder:h,mainBkg:_}=r,{stylesMap:v}=S(n),x=C.svg(u),w=y(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=v.get(`fill`)??_;let T=u.append(`g`);n.icon&&T.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=x.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=x.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${v.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(n,R),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),K.rect(n,e)},u}e(it,`iconCircle`);async function at(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:w}=S(n),T=-_/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=y(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,5),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+_/2,y:i-a/2+d.height+D},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/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-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(at,`iconRounded`);async function ot(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=b(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,n,`icon-shape default`),m=n.pos===`t`,h=c+f*2,_=c+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:w}=S(n),T=-_/2,E=-h/2,D=n.label?8:0,O=C.svg(u),k=y(n,{});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??x;let A=O.path(z(T,E,_,h,.1),k),M=Math.max(_,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(n.icon){let e=u.append(`g`);e.html(`<g>${await g(n.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??v};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(n,L),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=m?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+_/2,y:i-a/2+d.height+D},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/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-_/2,y:i-a/2+h}],K.polygon(n,o,e)},u}e(ot,`iconSquare`);async function st(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}=b(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 j(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,v=n.label?8:0,x=C.svg(f),S=y(n,{});n.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(g,_,u,d,S),T=Math.max(u,p.width),E=d+p.height+v,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),N(n,k),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return K.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+v},{x:r+u/2,y:i-a/2+p.height+v},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+v},{x:r-p.width/2,y:i-a/2+p.height+v}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],K.polygon(n,o,e)},f}e(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(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=C.svg(s),n=y(t,{}),r=F(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=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(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))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}e(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(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=C.svg(s),n=y(t,{}),r=F(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=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(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=C.svg(s),n=y(t,{}),r=F(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=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}e(dt,`lean_right`);function ft(e,n){let{labelStyles:r,nodeStyles:i}=b(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,P(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=C.svg(a),d=y(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(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})`),N(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),K.polygon(n,l,e)},a}e(ft,`lightningBolt`);var pt=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`),mt=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`),ht=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<gt&&(t.height=gt)}let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=mt(0,0,u,p,d,f,m),r=ht(0,f,u,p,d,f),i=y(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=pt(0,0,u,p,d,f,m);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,h(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),N(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.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 j(e,t,P(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=C.svg(s),g=y(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},...I(-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),x=s.insert(()=>v,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,_,e)},s}e(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(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=C.svg(c),x=y(t,{}),S=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],w=[{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`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=v.path(T,x),D=F(w),O=v.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}e(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(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=I(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=v?.[v.length-1],S=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.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}],w=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],T=C.svg(i),E=y(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}e(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await j(e,t,P(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=C.svg(a),g=y(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),v=a.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&v.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,v),t.intersect=function(e){return K.rect(t,e)},a}e(St,`note`);var Ct=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 wt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(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=C.svg(i),n=y(t,{}),r=Ct(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=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(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=C.svg(s),x=y(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(g),w=v.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.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))})`),N(t,T),t.intersect=function(e){return K.polygon(t,g,e)},s}e(Tt,`rect_left_inv_arrow`);async function Et(e,r){let{labelStyles:i,nodeStyles:a}=b(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),l=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await te(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(u())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),v=await te(d,Array.isArray(g)?g.join(`<br/>`):g,r.labelStyle,!0,!0),x=v.children[0],S=n(v);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(r.padding||0)/2;n(v).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+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-w+3)+`)`);let T=h.width+(r.padding||0),E=h.height+(r.padding||0),D=-h.width/2-w,O=-h.height/2-w,k,A;if(r.look===`handDrawn`){let e=C.svg(c),n=y(r,{}),i=e.path(z(D,O,T,E,r.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,n);A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),k=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else k=l.insert(`rect`,`:first-child`),A=l.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return N(r,k),r.intersect=function(e){return K.rect(r,e)},c}e(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,p=Z-l/2,m=-u/2,{cssStyles:g}=t,_=C.svg(o),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-Z,y:m+f},{x:p-Z,y:m},{x:p,y:m},{x:p,y:m+f}],S=_.polygon(x.map(e=>[e.x,e.y]),v),w=o.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,h(g)),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},o}e(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.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 j(e,t,P(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,_=C.svg(s),v=y(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=_.path(S,v),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.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))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}e(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=y(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],g=F(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),N(t,v),t.intersect=function(e){return K.polygon(t,h,e)},s}e(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=b(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=y(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 N(t,_),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}e(Nt,`stateEnd`);function Pt(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=C.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 N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}e(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.width+2*Ft+a,t.width??0),u=Math.max(c.height+o,t.height??0),d=l-2*Ft,f=u,p=-l/2,m=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(s),n=y(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+Ft,m,p+Ft,m+f,n),a=e.line(p+Ft+d,m,p+Ft+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,h(c)),N(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),N(t,e)}return t.intersect=function(e){return K.polygon(t,g,e)},s}e(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=C.svg(s),v=y(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let w=F(x),T=_.path(w,v),E=F(S),D=_.path(E,{...v,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}e(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(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=C.svg(i),h=y(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...I(-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,x=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...I(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],S=F(g),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,g,e)},i}e(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=b(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(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),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}e(Bt,`text`);var Vt=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
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-CKIr8zwz.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-CIXLDUI_.js";import{t as c}from"./dist-fh2zfMMY.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function De(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Oe(e){return new Ee(e)}function C(e,t){this._context=e,this._t=t}C.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,I(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(I(a,void 0,n,r,i));return t}if(N(e))return e.subarray();if(F(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,L(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(typeof e==`object`&&et(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n=e,r,i){let a=[...Object.keys(t),...je(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function et(e){switch(D(e)){case j:case Le:case Re:case M:case A:case Pe:case qe:case Je:case We:case Ge:case Ke:case Fe:case k:case ze:case Me:case Ie:case O:case Ne:case Be:case Ve:case He:case Ue:return!0;default:return!1}}function tt(e,t){return $e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}function H(e,t,n,r){if(P(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return it(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...je(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Qe(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),N(s)&&(s=nt(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||z(c)&&z(s)&&(E(c)||E(s)||V(c)||V(s))?e[o]=H(c,s,n,r):c==null&&E(s)?e[o]=H({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ot(e,...t){return at(e,...t,Ae)}var st=c(),ct={curveBasis:te,curveBasisClosed:re,curveBasisOpen:ae,curveBumpX:f,curveBumpY:ee,curveBundle:se,curveCardinalClosed:le,curveCardinalOpen:ue,curveCardinal:ce,curveCatmullRomClosed:me,curveCatmullRomOpen:ge,curveCatmullRom:fe,curveLinear:u,curveLinearClosed:ve,curveMonotoneX:we,curveMonotoneY:Te,curveNatural:Oe,curveStep:w,curveStepAfter:ke,curveStepBefore:T},lt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ut=e(function(e,t){let n=dt(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(n)){let e=n.map(e=>e.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).*
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-BWdS1h-p.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-DU6HZSFF-CP2Lgblu.js";import{t as c}from"./dist-0EGPFeb8.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function De(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Oe(e){return new Ee(e)}function C(e,t){this._context=e,this._t=t}C.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,I(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(I(a,void 0,n,r,i));return t}if(N(e))return e.subarray();if(F(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,L(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(typeof e==`object`&&et(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n=e,r,i){let a=[...Object.keys(t),...je(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function et(e){switch(D(e)){case j:case Le:case Re:case M:case A:case Pe:case qe:case Je:case We:case Ge:case Ke:case Fe:case k:case ze:case Me:case Ie:case O:case Ne:case Be:case Ve:case He:case Ue:return!0;default:return!1}}function tt(e,t){return $e(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(B.Cache||Map),n}B.Cache=Map;function V(e){return F(e)}function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=H(i,t,r,new Map)}return i}function H(e,t,n,r){if(P(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return it(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...je(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Qe(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),N(s)&&(s=nt(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(rt(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||z(c)&&z(s)&&(E(c)||E(s)||V(c)||V(s))?e[o]=H(c,s,n,r):c==null&&E(s)?e[o]=H({},s,n,r):c==null&&V(s)?e[o]=nt(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ot(e,...t){return at(e,...t,Ae)}var st=c(),ct={curveBasis:te,curveBasisClosed:re,curveBasisOpen:ae,curveBumpX:f,curveBumpY:ee,curveBundle:se,curveCardinalClosed:le,curveCardinalOpen:ue,curveCardinal:ce,curveCatmullRomClosed:me,curveCatmullRomOpen:ge,curveCatmullRom:fe,curveLinear:u,curveLinearClosed:ve,curveMonotoneX:we,curveMonotoneY:Te,curveNatural:Oe,curveStep:w,curveStepAfter:ke,curveStepBefore:T},lt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ut=e(function(e,t){let n=dt(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(n)){let e=n.map(e=>e.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).*
2
2
  `,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=i.exec(e))!==null;)if(a.index===i.lastIndex&&i.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ft=e(function(e){return e.replace(i,``)},`removeDirectives`),pt=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?ct[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(U,`interpolateToCurve`);function mt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,st.sanitizeUrl)(n)}e(mt,`formatUrl`);var ht=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n<i;n++)if(o=o[r[n]],!o){t.error(`Function name: ${e} not found in window`);return}o[a](...n)},`runFunc`);function W(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}e(W,`distance`);function gt(e){let t,n=0;return e.forEach(e=>{n+=W(e,t),t=e}),G(e,n/2)}e(gt,`traverseEdge`);function _t(e){return e.length===1?e[0]:gt(e)}e(_t,`calcLabelPosition`);var vt=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:vt((1-i)*n.x+i*t.x,5),y:vt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),yt=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function bt(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(bt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(K,`getStylesFromArray`);var xt=0,St=e(()=>(xt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+xt),`generateId`);function Ct(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}e(Ct,`makeRandomHex`);var wt=e(e=>Ct(e.length),`random`),Tt=e(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Et=e(function(e,t){let n=t.text.replace(s.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Dt=B((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),s.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ot(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ot=B((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}e(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}e(J,`calculateTextWidth`);var Y=B((e,t)=>{let{fontSize:r=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Z(r),c=[`sans-serif`,i],l=e.split(s.lineBreakRegex),u=[],d=n(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=Tt();i.text=r||`​`;let s=Et(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),kt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},X,At=e(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function jt(e){return`str`in e}e(jt,`isDetailedError`);var Mt=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return ot({},e,t)}e(Q,`cleanAndMerge`);var Nt={assignWithDepth:o,wrapLabel:Dt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ut,detectDirective:dt,isSubstringInArray:pt,interpolateToCurve:U,calcLabelPosition:_t,calcCardinalityPosition:yt,calcTerminalLabelPosition:bt,formatUrl:mt,getStylesFromArray:K,generateId:St,random:wt,runFunc:ht,entityDecode:At,insertTitle:Mt,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:kt},Pt=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Ft=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),It=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Lt(e){return e??null}e(Lt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e($,`isLabelCoordinateInPath`);export{ce as $,Je as A,Ne as B,j as C,M as D,A as E,k as F,D as G,Ue as H,ze as I,w as J,ke as K,Me as L,Ke as M,We as N,Pe as O,Fe as P,fe as Q,Ie as R,N as S,Le as T,Be as U,He as V,Ve as W,we as X,Oe as Y,Te as Z,Dt as _,Ft as a,P as b,It as c,U as d,te as et,jt as f,Nt as g,ft as h,Q as i,Ge as j,qe as k,K as l,wt as m,q as n,ee as nt,Pt as o,Z as p,T as q,J as r,u as rt,St as s,Y as t,f as tt,Lt as u,V as v,Re as w,Ze as x,R as y,O as z};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-CKIr8zwz.js";import{x as n}from"./chunk-DU6HZSFF-CIXLDUI_.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-BWdS1h-p.js";import{x as n}from"./chunk-DU6HZSFF-CP2Lgblu.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t};