@eeshaai/code 1.0.0 → 1.0.1

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 (150) hide show
  1. package/LICENSE.md +3 -3
  2. package/README.md +335 -322
  3. package/dist/cli.js +4 -4
  4. package/dist/resources/styles/custom/instructions/design.md +283 -283
  5. package/dist/resources/styles/custom/instructions/requirements.md +161 -161
  6. package/dist/resources/styles/custom/instructions/tasks-implement.md +90 -90
  7. package/dist/resources/styles/custom/instructions/tasks.md +159 -159
  8. package/dist/resources/styles/custom/process.md +49 -49
  9. package/dist/resources/styles/custom/prompts/first.md +29 -29
  10. package/dist/resources/styles/custom/prompts/implement.md +27 -27
  11. package/dist/resources/styles/custom/prompts/rewrite-note.md +40 -40
  12. package/dist/resources/styles/custom/prompts/rewrite.md +32 -32
  13. package/dist/resources/styles/custom/style.yml +46 -46
  14. package/dist/resources/styles/grammar.md +727 -731
  15. package/dist/resources/styles/kiro/style.yml +63 -0
  16. package/dist/resources/styles/speckit/style.yml +59 -0
  17. package/dist/server.js +473 -477
  18. package/dist/web/chunks/{abnfDiagram-VCTEODGH-6KC3BO47.js → abnfDiagram-VCTEODGH-P6AZFXJU.js} +2 -2
  19. package/dist/web/chunks/architecture-7GRP2DOG-K6PMPK7N.js +2 -0
  20. package/dist/web/chunks/{architectureDiagram-5GKGNRK7-QKPCVOD2.js → architectureDiagram-5GKGNRK7-JB5DD7KL.js} +2 -2
  21. package/dist/web/chunks/{blockDiagram-I7D4REHJ-4XZWNXLB.js → blockDiagram-I7D4REHJ-ARCDWS5D.js} +2 -2
  22. package/dist/web/chunks/{c4Diagram-7LVT6UL2-4HJHKNE3.js → c4Diagram-7LVT6UL2-57CIXPJZ.js} +2 -2
  23. package/dist/web/chunks/{chunk-GQPX4EIC.js → chunk-3EZ2OKHV.js} +2 -2
  24. package/dist/web/chunks/{chunk-37NHO5VO.js → chunk-4KJ2U3VQ.js} +2 -2
  25. package/dist/web/chunks/{chunk-OXLTOJNY.js → chunk-4ZUFUR3U.js} +2 -2
  26. package/dist/web/chunks/{chunk-46RPN6IE.js → chunk-63W35XXT.js} +2 -2
  27. package/dist/web/chunks/{chunk-LSVIQRSY.js → chunk-6YVFH4BZ.js} +2 -2
  28. package/dist/web/chunks/{chunk-6VRLULJH.js → chunk-7PUK2GON.js} +2 -2
  29. package/dist/web/chunks/{chunk-TPXX77KB.js → chunk-7Q4TXKAS.js} +2 -2
  30. package/dist/web/chunks/{chunk-4S2DRQJ6.js → chunk-7QRY2XB7.js} +2 -2
  31. package/dist/web/chunks/{chunk-2DLEMZHM.js → chunk-CA2KMNVI.js} +2 -2
  32. package/dist/web/chunks/{chunk-LHNPPNB7.js → chunk-CFMSYLIK.js} +2 -2
  33. package/dist/web/chunks/{chunk-4TORDSRR.js → chunk-CKJRXIX7.js} +2 -2
  34. package/dist/web/chunks/{chunk-L34PKG4P.js → chunk-CXXG5KL5.js} +2 -2
  35. package/dist/web/chunks/chunk-EFBAEJZJ.js +2 -0
  36. package/dist/web/chunks/{chunk-LQ6CTWX6.js → chunk-FKTXB6RJ.js} +2 -2
  37. package/dist/web/chunks/{chunk-TXNHMPKM.js → chunk-FU7R4QOG.js} +2 -2
  38. package/dist/web/chunks/{chunk-DIRT34TZ.js → chunk-GEV6X2TZ.js} +2 -2
  39. package/dist/web/chunks/{chunk-II6WN3ZG.js → chunk-GPW7TXQS.js} +2 -2
  40. package/dist/web/chunks/{chunk-5KNOHX5X.js → chunk-I6RMTJPN.js} +2 -2
  41. package/dist/web/chunks/{chunk-6TGTE6CF.js → chunk-IKC3ZQV7.js} +2 -2
  42. package/dist/web/chunks/{chunk-LDXBIOBF.js → chunk-ITN3D7RJ.js} +2 -2
  43. package/dist/web/chunks/{chunk-OODDZ447.js → chunk-J6N7AUC2.js} +2 -2
  44. package/dist/web/chunks/{chunk-FGASMJTA.js → chunk-J7VDGOTK.js} +2 -2
  45. package/dist/web/chunks/chunk-KVRWT2YT.js +2 -0
  46. package/dist/web/chunks/{chunk-6URXM4C4.js → chunk-NBC6B3KN.js} +2 -2
  47. package/dist/web/chunks/{chunk-HBEUVMXY.js → chunk-NLHJT4GD.js} +2 -2
  48. package/dist/web/chunks/{chunk-HNYXDXPN.js → chunk-NOVL2262.js} +2 -2
  49. package/dist/web/chunks/{chunk-FPLIRG3U.js → chunk-NQ2XP5EN.js} +2 -2
  50. package/dist/web/chunks/chunk-P44J6WNO.js +2 -0
  51. package/dist/web/chunks/{chunk-6KSWTVXD.js → chunk-QBOSTM7Q.js} +2 -2
  52. package/dist/web/chunks/{chunk-HAKJ3AUV.js → chunk-QKU4ZFG5.js} +2 -2
  53. package/dist/web/chunks/{chunk-T4HEWXAQ.js → chunk-RINQGKTH.js} +2 -2
  54. package/dist/web/chunks/{chunk-TPYBIPJG.js → chunk-RK4EOCHJ.js} +2 -2
  55. package/dist/web/chunks/{chunk-YM7LHP34.js → chunk-S4X6ERXI.js} +2 -2
  56. package/dist/web/chunks/{chunk-VY4GEFSG.js → chunk-SE57RN36.js} +2 -2
  57. package/dist/web/chunks/{chunk-6FQEBIA3.js → chunk-SGL7WI35.js} +3 -3
  58. package/dist/web/chunks/chunk-SOAWGUAD.js +2 -0
  59. package/dist/web/chunks/{chunk-7XAOOQR4.js → chunk-U6ILIHMR.js} +2 -2
  60. package/dist/web/chunks/{chunk-M3SWKTLZ.js → chunk-USZ3ZJYA.js} +2 -2
  61. package/dist/web/chunks/{chunk-MBZYSJFT.js → chunk-UU7BHEBD.js} +2 -2
  62. package/dist/web/chunks/{chunk-QNEZP2TE.js → chunk-WL4ZMLPV.js} +2 -2
  63. package/dist/web/chunks/{chunk-MZEMPN3C.js → chunk-XE4RLI22.js} +2 -2
  64. package/dist/web/chunks/{chunk-VAKN3BTM.js → chunk-XJ6FSQEO.js} +2 -2
  65. package/dist/web/chunks/{chunk-XBYCKXUJ.js → chunk-XM7VXEGI.js} +2 -2
  66. package/dist/web/chunks/{chunk-2RFQIKC6.js → chunk-XO4SHRSO.js} +2 -2
  67. package/dist/web/chunks/{chunk-BUZPUGIT.js → chunk-XOZZFIHV.js} +2 -2
  68. package/dist/web/chunks/{chunk-FNIFXWXL.js → chunk-YYJ5VFH5.js} +2 -2
  69. package/dist/web/chunks/{chunk-JOSXY3EP.js → chunk-ZX45GMMJ.js} +2 -2
  70. package/dist/web/chunks/{chunk-4IPDIKAU.js → chunk-ZXMMITLE.js} +2 -2
  71. package/dist/web/chunks/classDiagram-ZZMXUADV-ALD5ECFE.js +2 -0
  72. package/dist/web/chunks/classDiagram-v2-VYDZK3BY-IMIEVQNX.js +2 -0
  73. package/dist/web/chunks/{cose-bilkent-JH36ORCC-ZPRW5JRW.js → cose-bilkent-JH36ORCC-YVEPG7XZ.js} +2 -2
  74. package/dist/web/chunks/cynefin-OW5HDTMX-5G3MG4ZJ.js +2 -0
  75. package/dist/web/chunks/{cynefinDiagram-5FMLGOSQ-O7GURHJG.js → cynefinDiagram-5FMLGOSQ-A3E3NM6X.js} +2 -2
  76. package/dist/web/chunks/{dagre-GXQ25YYZ-WK67O4N6.js → dagre-GXQ25YYZ-WKL3XLC6.js} +2 -2
  77. package/dist/web/chunks/{diagram-S7CK7UJ4-2CEO2EN2.js → diagram-S7CK7UJ4-AENTNBTM.js} +2 -2
  78. package/dist/web/chunks/{diagram-UQ7AKVKN-2Z4VHGF3.js → diagram-UQ7AKVKN-BN6IVDBP.js} +2 -2
  79. package/dist/web/chunks/{diagram-VSXAHHWV-AN4BOWYB.js → diagram-VSXAHHWV-X7IW7FU6.js} +2 -2
  80. package/dist/web/chunks/{diagram-VX7I27RA-VEZ2GXCM.js → diagram-VX7I27RA-4V6RQ6IS.js} +2 -2
  81. package/dist/web/chunks/{diagram-Z3DM3KII-TGGNDSLW.js → diagram-Z3DM3KII-ODYVRYAT.js} +2 -2
  82. package/dist/web/chunks/{ebnfDiagram-PWID7BFC-7RM57IJV.js → ebnfDiagram-PWID7BFC-2KD46JNN.js} +2 -2
  83. package/dist/web/chunks/{erDiagram-RLTQ6QDP-LCATC3YT.js → erDiagram-RLTQ6QDP-6MYZ2NRT.js} +2 -2
  84. package/dist/web/chunks/eventmodeling-NTZA5JFV-QZXC5VKS.js +2 -0
  85. package/dist/web/chunks/flowDiagram-HODETNUW-BILJ37ZX.js +2 -0
  86. package/dist/web/chunks/{ganttDiagram-EL5Y4UJY-5VPBBF2V.js → ganttDiagram-EL5Y4UJY-LVA23DND.js} +2 -2
  87. package/dist/web/chunks/gitGraph-4MIJSDKK-H43S2MKN.js +2 -0
  88. package/dist/web/chunks/{gitGraphDiagram-WWUBYQGX-HZMAGPIJ.js → gitGraphDiagram-WWUBYQGX-JRB4SUZI.js} +2 -2
  89. package/dist/web/chunks/info-A6RAGUB7-DKS7Q63Q.js +2 -0
  90. package/dist/web/chunks/infoDiagram-27XIBGKW-JLOVILVF.js +3 -0
  91. package/dist/web/chunks/{ishikawaDiagram-5VMMS53U-A54WWBPX.js → ishikawaDiagram-5VMMS53U-SUA2YN5D.js} +2 -2
  92. package/dist/web/chunks/{journeyDiagram-3NMN7TZE-XRCTMTR7.js → journeyDiagram-3NMN7TZE-ORMC2WB2.js} +2 -2
  93. package/dist/web/chunks/{kanban-definition-UXKFOSKX-UW2PQXZF.js → kanban-definition-UXKFOSKX-TPRG3VMF.js} +2 -2
  94. package/dist/web/chunks/{katex-B7HWCVTN.js → katex-DLHJF5VS.js} +2 -2
  95. package/dist/web/chunks/{mermaid.core-VL5SQK5M.js → mermaid.core-ZM3JSPVU.js} +3 -3
  96. package/dist/web/chunks/{mindmap-definition-YA3MSWOX-2H2Z6CVN.js → mindmap-definition-YA3MSWOX-BLW6WWFS.js} +2 -2
  97. package/dist/web/chunks/packet-AYTQ26CC-FIXQVEDM.js +2 -0
  98. package/dist/web/chunks/{pegDiagram-XKGWAZYB-KC4BYUN7.js → pegDiagram-XKGWAZYB-BYMP3YHY.js} +2 -2
  99. package/dist/web/chunks/pie-WAS4IAKB-R4EUNVPB.js +2 -0
  100. package/dist/web/chunks/{pieDiagram-E7YTZNPT-54T6XSU5.js → pieDiagram-E7YTZNPT-XOJE3H3L.js} +2 -2
  101. package/dist/web/chunks/{quadrantDiagram-AXDQQJYC-3G3RXSTE.js → quadrantDiagram-AXDQQJYC-23VSADTC.js} +2 -2
  102. package/dist/web/chunks/radar-RG4KPBEZ-O6Y2TENX.js +2 -0
  103. package/dist/web/chunks/railroad-74A4TZTK-PHWZ7KVH.js +2 -0
  104. package/dist/web/chunks/railroad-abnf-HS5TGJTU-DZ4OSJAN.js +2 -0
  105. package/dist/web/chunks/railroad-ebnf-LZEXJU2U-GYBLRQUL.js +2 -0
  106. package/dist/web/chunks/railroad-peg-WCYAUIDC-ZK4ZOBSX.js +2 -0
  107. package/dist/web/chunks/{railroadDiagram-O6MQD6OU-3LHKFF5N.js → railroadDiagram-O6MQD6OU-Z5IEAZJK.js} +2 -2
  108. package/dist/web/chunks/{requirementDiagram-BXWQKSXE-M4LF54YT.js → requirementDiagram-BXWQKSXE-MNP4O73E.js} +2 -2
  109. package/dist/web/chunks/{sankeyDiagram-P5KCCOFB-USCKKKNT.js → sankeyDiagram-P5KCCOFB-PADI35QR.js} +2 -2
  110. package/dist/web/chunks/{sequenceDiagram-WJ2MYXX4-QZ2O4KWV.js → sequenceDiagram-WJ2MYXX4-FGWOVXU4.js} +2 -2
  111. package/dist/web/chunks/{sizeCapture-INFHLROL-DZI5JWEV.js → sizeCapture-INFHLROL-Y6H3VQLE.js} +2 -2
  112. package/dist/web/chunks/{stateDiagram-D77RDMKH-EQJNTBF3.js → stateDiagram-D77RDMKH-7PRO4WYR.js} +2 -2
  113. package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-2Y6SWEJW.js +2 -0
  114. package/dist/web/chunks/{swimlanes-42K2YHIH-H7SZ2HG6.js → swimlanes-42K2YHIH-DXVTFB6Q.js} +2 -2
  115. package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-U2LP4OEE.js +9 -0
  116. package/dist/web/chunks/{timeline-definition-24CTP7MA-4Q2ARIQ6.js → timeline-definition-24CTP7MA-7ZIALE6C.js} +2 -2
  117. package/dist/web/chunks/treeView-Q6P3EWNA-VSJ7TJ36.js +2 -0
  118. package/dist/web/chunks/treemap-WGGIJYW6-JZWFGRKS.js +2 -0
  119. package/dist/web/chunks/{vennDiagram-4TSXK5OY-WMJVK74C.js → vennDiagram-4TSXK5OY-IPXNDYWM.js} +2 -2
  120. package/dist/web/chunks/wardley-WFR3VGLG-PAUUFL5N.js +2 -0
  121. package/dist/web/chunks/{wardleyDiagram-VM6X3IG4-CLB324RQ.js → wardleyDiagram-VM6X3IG4-4Z2U2NNR.js} +2 -2
  122. package/dist/web/chunks/{xychartDiagram-S5SC5T6Z-G5C2R7C2.js → xychartDiagram-S5SC5T6Z-NAEIWN4K.js} +2 -2
  123. package/dist/web/page.css +1 -1
  124. package/dist/web/page.js +155 -123
  125. package/package.json +3 -1
  126. package/dist/web/chunks/architecture-7GRP2DOG-JLXNDD4H.js +0 -2
  127. package/dist/web/chunks/chunk-4KP3BIPB.js +0 -2
  128. package/dist/web/chunks/chunk-HX7W7GSO.js +0 -2
  129. package/dist/web/chunks/chunk-PR453BYT.js +0 -2
  130. package/dist/web/chunks/chunk-R7TFKRNM.js +0 -2
  131. package/dist/web/chunks/classDiagram-ZZMXUADV-4J5HHZD6.js +0 -2
  132. package/dist/web/chunks/classDiagram-v2-VYDZK3BY-X6WY2DAS.js +0 -2
  133. package/dist/web/chunks/cynefin-OW5HDTMX-SVVTQRRB.js +0 -2
  134. package/dist/web/chunks/eventmodeling-NTZA5JFV-2SR57JAH.js +0 -2
  135. package/dist/web/chunks/flowDiagram-HODETNUW-HU6Y2EYQ.js +0 -2
  136. package/dist/web/chunks/gitGraph-4MIJSDKK-25JPIQP7.js +0 -2
  137. package/dist/web/chunks/info-A6RAGUB7-72MROTVX.js +0 -2
  138. package/dist/web/chunks/infoDiagram-27XIBGKW-BQYTPGNG.js +0 -3
  139. package/dist/web/chunks/packet-AYTQ26CC-NEGDW4B6.js +0 -2
  140. package/dist/web/chunks/pie-WAS4IAKB-OT3EMGHT.js +0 -2
  141. package/dist/web/chunks/radar-RG4KPBEZ-DCHU5FOQ.js +0 -2
  142. package/dist/web/chunks/railroad-74A4TZTK-RZX6D7H6.js +0 -2
  143. package/dist/web/chunks/railroad-abnf-HS5TGJTU-STTFN7R4.js +0 -2
  144. package/dist/web/chunks/railroad-ebnf-LZEXJU2U-RBXU3IBK.js +0 -2
  145. package/dist/web/chunks/railroad-peg-WCYAUIDC-OD5BXOH6.js +0 -2
  146. package/dist/web/chunks/stateDiagram-v2-MP3YSRHH-WSCDKLG6.js +0 -2
  147. package/dist/web/chunks/swimlanesDiagram-VR7AAH4N-DFYTBPVS.js +0 -9
  148. package/dist/web/chunks/treeView-Q6P3EWNA-ADCP6RPT.js +0 -2
  149. package/dist/web/chunks/treemap-WGGIJYW6-NEV7DUDY.js +0 -2
  150. package/dist/web/chunks/wardley-WFR3VGLG-4QZOFDI5.js +0 -2
@@ -1,4 +1,4 @@
1
- import{C as Ce}from"./chunk-5KNOHX5X.js";import{a as Oe}from"./chunk-YM7LHP34.js";import{f as Ne,g as Ie,h as Te,i as ve}from"./chunk-GQPX4EIC.js";import{b as ae,e as De}from"./chunk-BUZPUGIT.js";import"./chunk-HNYXDXPN.js";import"./chunk-M3SWKTLZ.js";import"./chunk-OODDZ447.js";import"./chunk-FPLIRG3U.js";import"./chunk-II6WN3ZG.js";import{a as we,f as _e}from"./chunk-LHNPPNB7.js";import"./chunk-MBZYSJFT.js";import{N as me,O as ye,T as Ee,_ as ie,a as Le,b as ke,u as M}from"./chunk-6FQEBIA3.js";import{b as m,h as Y}from"./chunk-L34PKG4P.js";import{a as c}from"./chunk-LDXBIOBF.js";import{d as xe}from"./chunk-R7TFKRNM.js";xe();var oe=(function(){var e=c(function(C,u,r,a){for(r=r||{},a=C.length;a--;r[C[a]]=u);return r},"o"),o=[1,15],l=[1,7],n=[1,13],h=[1,14],p=[1,19],s=[1,16],g=[1,17],x=[1,18],k=[8,30],S=[8,10,21,28,29,30,31,39,43,46],b=[1,23],L=[1,24],E=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],w={trace:c(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:c(function(u,r,a,d,y,t,K){var i=t.length-1;switch(y){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",t[i-1]),d.setHierarchy(t[i-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",t[i]),typeof t[i].length=="number"?this.$=t[i]:this.$=[t[i]];break;case 13:d.getLogger().debug("Rule: statement #2: ",t[i-1]),this.$=[t[i-1]].concat(t[i]);break;case 14:d.getLogger().debug("Rule: link: ",t[i],u),this.$={edgeTypeStr:t[i],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",t[i-3],t[i-1],t[i]),this.$={edgeTypeStr:t[i],label:t[i-1]};break;case 18:let P=parseInt(t[i]),V=d.generateId();this.$={id:V,type:"space",label:"",width:P,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",t[i-2],t[i-1],t[i]," typestr: ",t[i-1].edgeTypeStr);let j=d.edgeStrToEdgeData(t[i-1].edgeTypeStr),Z=d.edgeStrToEdgeStartData(t[i-1].edgeTypeStr),U=d.edgeStrToThickness(t[i-1].edgeTypeStr),Q=d.edgeStrToPattern(t[i-1].edgeTypeStr);this.$=[{id:t[i-2].id,label:t[i-2].label,type:t[i-2].type,directions:t[i-2].directions},{id:t[i-2].id+"-"+t[i].id,start:t[i-2].id,end:t[i].id,label:t[i-1].label,type:"edge",thickness:U,pattern:Q,directions:t[i].directions,arrowTypeEnd:j,arrowTypeStart:Z},{id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[i-1],t[i]),this.$={id:t[i-1].id,label:t[i-1].label,type:d.typeStr2Type(t[i-1].typeStr),directions:t[i-1].directions,widthInColumns:parseInt(t[i],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",t[i]),this.$={id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",t[i]),this.$={type:"column-setting",columns:t[i]==="auto"?-1:parseInt(t[i])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",t[i-2],t[i-1]);let D=d.generateId();this.$={...t[i-2],type:"composite",children:t[i-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",t[i-2],t[i-1],t[i]);let B=d.generateId();this.$={id:B,type:"composite",label:"",children:t[i-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",t[i]),this.$={id:t[i]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[i-1],t[i]),this.$={id:t[i-1],label:t[i].label,typeStr:t[i].typeStr,directions:t[i].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",t[i]),this.$=[t[i]];break;case 32:d.getLogger().debug("Rule: dirList: ",t[i-1],t[i]),this.$=[t[i-1]].concat(t[i]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",t[i-2],t[i-1],t[i]),this.$={typeStr:t[i-2]+t[i],label:t[i-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[i-3],t[i-2]," #3:",t[i-1],t[i]),this.$={typeStr:t[i-3]+t[i],label:t[i-2],directions:t[i-1]};break;case 35:case 36:this.$={type:"classDef",id:t[i-1].trim(),css:t[i].trim()};break;case 37:this.$={type:"applyClass",id:t[i-1].trim(),styleClass:t[i].trim()};break;case 38:this.$={type:"applyStyles",id:t[i-1].trim(),stylesStr:t[i].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{8:[1,20]},e(k,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:l,28:n,29:h,31:p,39:s,43:g,46:x}),e(S,[2,16],{14:22,15:b,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(E,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:p},{10:o,11:27,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(k,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},e(E,[2,24]),{10:o,11:37,13:4,14:22,15:b,16:L,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(E,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(S,[2,27]),e(f,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:c(function(u,r){if(r.recoverable)this.trace(u);else{var a=new Error(u);throw a.hash=r,a}},"parseError"),parse:c(function(u){var r=this,a=[0],d=[],y=[null],t=[],K=this.table,i="",P=0,V=0,j=0,Z=2,U=1,Q=t.slice.call(arguments,1),D=Object.create(this.lexer),B={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(B.yy[$]=this.yy[$]);D.setInput(u,B.yy),B.yy.lexer=D,B.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ee=D.yylloc;t.push(ee);var Je=D.options&&D.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ze(T){a.length=a.length-2*T,y.length=y.length-T,t.length=t.length-T}c(Ze,"popStack");function fe(){var T;return T=d.pop()||D.lex()||U,typeof T!="number"&&(T instanceof Array&&(d=T,T=d.pop()),T=r.symbols_[T]||T),T}c(fe,"lex");for(var I,te,R,O,_t,se,F={},H,A,Se,X;;){if(R=a[a.length-1],this.defaultActions[R]?O=this.defaultActions[R]:((I===null||typeof I>"u")&&(I=fe()),O=K[R]&&K[R][I]),typeof O>"u"||!O.length||!O[0]){var re="";X=[];for(H in K[R])this.terminals_[H]&&H>Z&&X.push("'"+this.terminals_[H]+"'");D.showPosition?re="Parse error on line "+(P+1)+`:
1
+ import{C as Ce}from"./chunk-I6RMTJPN.js";import{a as Oe}from"./chunk-S4X6ERXI.js";import{f as Ne,g as Ie,h as Te,i as ve}from"./chunk-3EZ2OKHV.js";import{b as ae,e as De}from"./chunk-XOZZFIHV.js";import"./chunk-NOVL2262.js";import"./chunk-USZ3ZJYA.js";import"./chunk-J6N7AUC2.js";import"./chunk-NQ2XP5EN.js";import"./chunk-GPW7TXQS.js";import{a as we,f as _e}from"./chunk-CFMSYLIK.js";import"./chunk-UU7BHEBD.js";import{N as me,O as ye,T as Ee,_ as ie,a as Le,b as ke,u as M}from"./chunk-SGL7WI35.js";import{b as m,h as Y}from"./chunk-CXXG5KL5.js";import{a as c}from"./chunk-ITN3D7RJ.js";import{d as xe}from"./chunk-SOAWGUAD.js";xe();var oe=(function(){var e=c(function(C,u,r,a){for(r=r||{},a=C.length;a--;r[C[a]]=u);return r},"o"),o=[1,15],l=[1,7],n=[1,13],h=[1,14],p=[1,19],s=[1,16],g=[1,17],x=[1,18],k=[8,30],S=[8,10,21,28,29,30,31,39,43,46],b=[1,23],L=[1,24],E=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],w={trace:c(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:c(function(u,r,a,d,y,t,K){var i=t.length-1;switch(y){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",t[i-1]),d.setHierarchy(t[i-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",t[i]),typeof t[i].length=="number"?this.$=t[i]:this.$=[t[i]];break;case 13:d.getLogger().debug("Rule: statement #2: ",t[i-1]),this.$=[t[i-1]].concat(t[i]);break;case 14:d.getLogger().debug("Rule: link: ",t[i],u),this.$={edgeTypeStr:t[i],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",t[i-3],t[i-1],t[i]),this.$={edgeTypeStr:t[i],label:t[i-1]};break;case 18:let P=parseInt(t[i]),V=d.generateId();this.$={id:V,type:"space",label:"",width:P,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",t[i-2],t[i-1],t[i]," typestr: ",t[i-1].edgeTypeStr);let j=d.edgeStrToEdgeData(t[i-1].edgeTypeStr),Z=d.edgeStrToEdgeStartData(t[i-1].edgeTypeStr),U=d.edgeStrToThickness(t[i-1].edgeTypeStr),Q=d.edgeStrToPattern(t[i-1].edgeTypeStr);this.$=[{id:t[i-2].id,label:t[i-2].label,type:t[i-2].type,directions:t[i-2].directions},{id:t[i-2].id+"-"+t[i].id,start:t[i-2].id,end:t[i].id,label:t[i-1].label,type:"edge",thickness:U,pattern:Q,directions:t[i].directions,arrowTypeEnd:j,arrowTypeStart:Z},{id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[i-1],t[i]),this.$={id:t[i-1].id,label:t[i-1].label,type:d.typeStr2Type(t[i-1].typeStr),directions:t[i-1].directions,widthInColumns:parseInt(t[i],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",t[i]),this.$={id:t[i].id,label:t[i].label,type:d.typeStr2Type(t[i].typeStr),directions:t[i].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",t[i]),this.$={type:"column-setting",columns:t[i]==="auto"?-1:parseInt(t[i])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",t[i-2],t[i-1]);let D=d.generateId();this.$={...t[i-2],type:"composite",children:t[i-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",t[i-2],t[i-1],t[i]);let B=d.generateId();this.$={id:B,type:"composite",label:"",children:t[i-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",t[i]),this.$={id:t[i]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[i-1],t[i]),this.$={id:t[i-1],label:t[i].label,typeStr:t[i].typeStr,directions:t[i].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",t[i]),this.$=[t[i]];break;case 32:d.getLogger().debug("Rule: dirList: ",t[i-1],t[i]),this.$=[t[i-1]].concat(t[i]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",t[i-2],t[i-1],t[i]),this.$={typeStr:t[i-2]+t[i],label:t[i-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[i-3],t[i-2]," #3:",t[i-1],t[i]),this.$={typeStr:t[i-3]+t[i],label:t[i-2],directions:t[i-1]};break;case 35:case 36:this.$={type:"classDef",id:t[i-1].trim(),css:t[i].trim()};break;case 37:this.$={type:"applyClass",id:t[i-1].trim(),styleClass:t[i].trim()};break;case 38:this.$={type:"applyStyles",id:t[i-1].trim(),stylesStr:t[i].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:o,11:3,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{8:[1,20]},e(k,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:o,21:l,28:n,29:h,31:p,39:s,43:g,46:x}),e(S,[2,16],{14:22,15:b,16:L}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(E,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:p},{10:o,11:27,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(k,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},e(E,[2,24]),{10:o,11:37,13:4,14:22,15:b,16:L,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:n,29:h,31:p,39:s,43:g,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(E,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(S,[2,27]),e(f,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:c(function(u,r){if(r.recoverable)this.trace(u);else{var a=new Error(u);throw a.hash=r,a}},"parseError"),parse:c(function(u){var r=this,a=[0],d=[],y=[null],t=[],K=this.table,i="",P=0,V=0,j=0,Z=2,U=1,Q=t.slice.call(arguments,1),D=Object.create(this.lexer),B={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(B.yy[$]=this.yy[$]);D.setInput(u,B.yy),B.yy.lexer=D,B.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ee=D.yylloc;t.push(ee);var Je=D.options&&D.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ze(T){a.length=a.length-2*T,y.length=y.length-T,t.length=t.length-T}c(Ze,"popStack");function fe(){var T;return T=d.pop()||D.lex()||U,typeof T!="number"&&(T instanceof Array&&(d=T,T=d.pop()),T=r.symbols_[T]||T),T}c(fe,"lex");for(var I,te,R,O,_t,se,F={},H,A,Se,X;;){if(R=a[a.length-1],this.defaultActions[R]?O=this.defaultActions[R]:((I===null||typeof I>"u")&&(I=fe()),O=K[R]&&K[R][I]),typeof O>"u"||!O.length||!O[0]){var re="";X=[];for(H in K[R])this.terminals_[H]&&H>Z&&X.push("'"+this.terminals_[H]+"'");D.showPosition?re="Parse error on line "+(P+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+X.join(", ")+", got '"+(this.terminals_[I]||I)+"'":re="Parse error on line "+(P+1)+": Unexpected "+(I==U?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(re,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:ee,expected:X})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+I);switch(O[0]){case 1:a.push(I),y.push(D.yytext),t.push(D.yylloc),a.push(O[1]),I=null,te?(I=te,te=null):(V=D.yyleng,i=D.yytext,P=D.yylineno,ee=D.yylloc,j>0&&j--);break;case 2:if(A=this.productions_[O[1]][1],F.$=y[y.length-A],F._$={first_line:t[t.length-(A||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(A||1)].first_column,last_column:t[t.length-1].last_column},Je&&(F._$.range=[t[t.length-(A||1)].range[0],t[t.length-1].range[1]]),se=this.performAction.apply(F,[i,V,P,B.yy,O[1],y,t].concat(Q)),typeof se<"u")return se;A&&(a=a.slice(0,-1*A*2),y=y.slice(0,-1*A),t=t.slice(0,-1*A)),a.push(this.productions_[O[1]][0]),y.push(F.$),t.push(F._$),Se=K[a[a.length-2]][a[a.length-1]],a.push(Se);break;case 3:return!0}}return!0},"parse")},N=(function(){var C={EOF:1,parseError:c(function(r,a){if(this.yy.parser)this.yy.parser.parseError(r,a);else throw new Error(r)},"parseError"),setInput:c(function(u,r){return this.yy=r||this.yy||{},this._input=u,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:c(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var r=u.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:c(function(u){var r=u.length,a=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=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),a.length-1&&(this.yylineno-=a.length-1);var y=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:a?(a.length===d.length?this.yylloc.first_column:0)+d[d.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(u){this.unput(this.match.slice(u))},"less"),pastInput:c(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var u=this.pastInput(),r=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
@@ -127,4 +127,4 @@ Expecting `+X.join(", ")+", got '"+(this.terminals_[I]||I)+"'":re="Parse error o
127
127
  }
128
128
  ${Oe()}
129
129
  `,"getStyles"),kt=Lt;function ce(e,o){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(o<0||!Number.isInteger(o))throw new Error("Position must be a non-negative integer."+o);if(e<0)return{px:o,py:0};if(e===1)return{px:0,py:o};let l=o%e,n=Math.floor(o/e);return{px:l,py:n}}c(ce,"calculateBlockPosition");var mt=c(e=>{let o=0,l=0;for(let n of e.children){let{width:h,height:p,x:s,y:g}=n.size??{width:0,height:0,x:0,y:0};if(m.debug("getMaxChildSize abc95 child:",n.id,"width:",h,"height:",p,"x:",s,"y:",g,n.type),n.type==="space")continue;let x=h/(n.widthInColumns??1);x>o&&(o=x),p>l&&(l=p)}return{width:o,height:l}},"getMaxChildSize");function q(e,o,l=0,n=0,h=8){m.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",l),e?.size?.width||(e.size={width:l,height:n,x:0,y:0});let p=0,s=0;if(e.children?.length>0){for(let f of e.children)q(f,o,0,0,h);let g=mt(e);p=g.width,s=g.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",p,s);for(let f of e.children)f.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${f.id} ${p} ${s} ${JSON.stringify(f.size)}`),f.size.width=p*(f.widthInColumns??1)+h*((f.widthInColumns??1)-1),f.size.height=s,f.size.x=0,f.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${f.id} maxWidth:${p} maxHeight:${s}`));for(let f of e.children)q(f,o,p,s,h);let x=e.columns??-1,k=0;for(let f of e.children)k+=f.widthInColumns??1;let S=e.children.length;x>0&&x<k&&(S=x);let b=Math.ceil(k/S),L=S*(p+h)+h,E=b*(s+h)+h;if(L<l){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${l} siblingHeight ${n} width ${L}`),L=l,E=n;let f=(l-S*h-h)/S,_=(n-b*h-h)/b;m.debug("Size indata abc88",e.id,"childWidth",f,"maxWidth",p),m.debug("Size indata abc88",e.id,"childHeight",_,"maxHeight",s),m.debug("Size indata abc88 xSize",S,"padding",h);for(let w of e.children)w.size&&(w.size.width=f,w.size.height=_,w.size.x=0,w.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${S} ySize ${b} columns ${x}${e.children.length} width=${Math.max(L,e.size?.width||0)}`),L<(e?.size?.width||0)){L=e?.size?.width||0;let f=x>0?Math.min(e.children.length,x):e.children.length;if(f>0){let _=(L-f*h-h)/f;m.debug("abc95 (growing to fit) width",e.id,L,e.size?.width,_);for(let w of e.children)w.size&&(w.size.width=_)}}e.size={width:L,height:E,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}c(q,"setBlockSizes");function de(e,o,l=8){m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let n=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){let h=e?.children[0]?.size?.width??0,p=e.children.length*h+(e.children.length-1)*l;m.debug("widthOfChildren 88",p,"posX");let s=new Map;{let b=0;for(let L of e.children){if(!L.size)continue;let{py:E}=ce(n,b),f=s.get(E)??0;L.size.height>f&&s.set(E,L.size.height);let _=L?.widthInColumns??1;n>0&&(_=Math.min(_,n-b%n)),b+=_}}let g=new Map;{let b=0,L=[...s.keys()].sort((E,f)=>E-f);for(let E of L)g.set(E,b),b+=(s.get(E)??0)+l}let x=0;m.debug("abc91 block?.size?.x",e.id,e?.size?.x);let k=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-l,S=0;for(let b of e.children){let L=e;if(!b.size)continue;let{width:E,height:f}=b.size,{px:_,py:w}=ce(n,x);if(w!=S&&(S=w,k=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-l,m.debug("New row in layout for block",e.id," and child ",b.id,S)),m.debug(`abc89 layout blocks (child) id: ${b.id} Pos: ${x} (px, py) ${_},${w} (${L?.size?.x},${L?.size?.y}) parent: ${L.id} width: ${E}${l}`),L.size){let v=E/2;b.size.x=k+l+v,m.debug(`abc91 layout blocks (calc) px, pyid:${b.id} startingPos=X${k} new startingPosX${b.size.x} ${v} padding=${l} width=${E} halfWidth=${v} => x:${b.size.x} y:${b.size.y} ${b.widthInColumns} (width * (child?.w || 1)) / 2 ${E*(b?.widthInColumns??1)/2}`),k=b.size.x+v;let C=g.get(w)??0,u=s.get(w)??f;b.size.y=L.size.y-L.size.height/2+C+u/2+l,m.debug(`abc88 layout blocks (calc) px, pyid:${b.id}startingPosX${k}${l}${v}=>x:${b.size.x}y:${b.size.y}${b.widthInColumns}(width * (child?.w || 1)) / 2${E*(b?.widthInColumns??1)/2}`)}b.children&&de(b,o,l);let N=b?.widthInColumns??1;n>0&&(N=Math.min(N,n-x%n)),x+=N,m.debug("abc88 columnsPos",b,x)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}c(de,"layoutBlocks");function pe(e,{minX:o,minY:l,maxX:n,maxY:h}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:p,y:s,width:g,height:x}=e.size;p-g/2<o&&(o=p-g/2),s-x/2<l&&(l=s-x/2),p+g/2>n&&(n=p+g/2),s+x/2>h&&(h=s+x/2)}if(e.children)for(let p of e.children)({minX:o,minY:l,maxX:n,maxY:h}=pe(p,{minX:o,minY:l,maxX:n,maxY:h}));return{minX:o,minY:l,maxX:n,maxY:h}}c(pe,"findBounds");function je(e){let o=e.getBlock("root");if(!o)return;let l=ie()?.block?.padding??8;q(o,e,0,0,l),de(o,e,l),m.debug("getBlocks",JSON.stringify(o,null,2));let{minX:n,minY:h,maxX:p,maxY:s}=pe(o),g=s-h,x=p-n;return{x:n,y:h,width:x,height:g}}c(je,"layout");function be(e,o,l=!1){let n=e,h="default";(n?.classes?.length||0)>0&&(h=(n?.classes??[]).join(" ")),h=h+" flowchart-label";let p=(n?.classes??[]).flatMap(f=>o.getClasses().get(f)?.styles??[]),s=0,g="rect",x;switch(n.type){case"round":s=5,g="rect";break;case"composite":s=0,g="composite",x=0;break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"block_arrow":g="block_arrow";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"rect_left_inv_arrow":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;case"doublecircle":g="doublecircle";break;default:g="rect"}let k=_e(n?.styles??[]),S=n.label,b=n.size??{width:0,height:0,x:0,y:0},L=o.getDiagramId();return{labelStyle:k.labelStyle,shape:g,label:S,labelText:S,rx:s,ry:s,class:h,cssClasses:h,cssStyles:n?.styles??[],cssCompiledStyles:p,style:k.style,id:n.id,domId:L?`${L}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:b.width||void 0,height:b.height||void 0,wrappingWidth:b.width||Number.POSITIVE_INFINITY,x:b.x,y:b.y,positioned:l,intersect:void 0,padding:x??M()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}c(be,"getNodeFromBlock");async function Ue(e,o,l){let n=be(o,l,!1);if(o.type==="group")return;let h=M(),p=await ae(e,n,{config:h}),s=p.node()?.getBBox()??{width:0,height:0},g=l.getBlock(n.id);g.size={width:s.width,height:s.height,x:0,y:0,node:p},l.setBlock(g),p.remove()}c(Ue,"calculateBlockSize");async function He(e,o,l){let n=be(o,l,!0);if(l.getBlock(n.id).type!=="space"){let p=M();await ae(e,n,{config:p}),o.intersect=n?.intersect,De(n)}}c(He,"insertBlockPositioned");async function J(e,o,l,n){for(let h of o)await n(e,h,l),h.children&&await J(e,h.children,l,n)}c(J,"performOperations");async function Xe(e,o,l){await J(e,o,l,Ue)}c(Xe,"calculateBlockSizes");async function Ge(e,o,l){await J(e,o,l,He)}c(Ge,"insertBlocks");async function qe(e,o,l,n,h){let p=new Ce({multigraph:!0,compound:!0});p.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of l)s.size&&p.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of o)if(s.start&&s.end){let g=n.getBlock(s.start),x=n.getBlock(s.end);if(g?.size&&x?.size){let k=g.size,S=x.size,b=[{x:k.x,y:k.y},{x:k.x+(S.x-k.x)/2,y:k.y+(S.y-k.y)/2},{x:S.x,y:S.y}],L=h?`${h}-${s.id}`:s.id,E=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",f=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",_=`${E} ${f} flowchart-link LS-a1 LE-b1`;Te(e,{...s,id:L,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:_},{},"block",p.node(s.start),p.node(s.end),h),s.label&&(await Ne(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:_}),Ie({...s,x:b[1].x,y:b[1].y},{originalPath:b}))}}}c(qe,"insertEdges");var yt=c(function(e,o){return o.db.getClasses()},"getClasses"),Et=c(async function(e,o,l,n){let{securityLevel:h,block:p}=M(),s=n.db;s.setDiagramId(o);let g;h==="sandbox"&&(g=Y("#i"+o));let x=h==="sandbox"?Y(g.nodes()[0].contentDocument.body):Y("body"),k=h==="sandbox"?x.select(`[id="${o}"]`):Y(`[id="${o}"]`);ve(k,["point","circle","cross"],n.type,o);let b=s.getBlocks(),L=s.getBlocksFlat(),E=s.getEdges(),f=k.insert("g").attr("class","block");await Xe(f,b,s);let _=je(s);await Ge(f,b,s),await qe(f,E,L,s,o);let w=f.node()?.getBBox(),N=w&&Number.isFinite(w.width)&&Number.isFinite(w.height)?w:_;if(N){let v=Math.max(1,Math.round(.125*(N.width/N.height))),C=N.height+v+10,u=N.width+10,{useMaxWidth:r}=p;ye(k,C,u,!!r),m.debug("Here Bounds",_,N),k.attr("viewBox",`${N.x-5} ${N.y-5} ${N.width+10} ${N.height+10}`)}},"draw"),wt={draw:Et,getClasses:yt},Wt={parser:Qe,db:xt,renderer:wt,styles:kt};export{Wt as diagram};
130
- //# sourceMappingURL=blockDiagram-I7D4REHJ-4XZWNXLB.js.map
130
+ //# sourceMappingURL=blockDiagram-I7D4REHJ-ARCDWS5D.js.map
@@ -1,4 +1,4 @@
1
- import{a as Ee}from"./chunk-T4HEWXAQ.js";import{f as ke}from"./chunk-HNYXDXPN.js";import"./chunk-M3SWKTLZ.js";import"./chunk-OODDZ447.js";import"./chunk-FPLIRG3U.js";import"./chunk-II6WN3ZG.js";import{i as ve,j as te,k as Rt}from"./chunk-LHNPPNB7.js";import"./chunk-MBZYSJFT.js";import{H as $t,N as Vt,O as be,U as _e,V as me,W as ge,X as xe,_ as Et,h as ye}from"./chunk-6FQEBIA3.js";import{b as Zt,h as Yt}from"./chunk-L34PKG4P.js";import{a as d}from"./chunk-LDXBIOBF.js";import{d as fe}from"./chunk-R7TFKRNM.js";fe();var Ut=(function(){var t=d(function(yt,m,x,k){for(x=x||{},k=yt.length;k--;x[yt[k]]=m);return x},"o"),e=[1,24],s=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],r=[1,65],h=[1,66],y=[1,67],f=[1,68],_=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],M=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],rt=[1,48],st=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],Tt=[14,42],Wt=[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],wt=[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],E=[1,82],S=[1,83],T=[1,84],C=[1,85],R=[12,14,42],le=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],Xt=[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],qt={trace:d(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:d(function(m,x,k,b,D,o,Ot){var p=o.length-1;switch(D){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(o[p-3]);break;case 19:b.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:b.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),b.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:b.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:b.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:b.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:b.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:b.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:b.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:b.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:b.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:b.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:b.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:b.addContainer("container",...o[p]),this.$=o[p];break;case 48:b.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:b.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:b.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:b.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:b.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:b.addComponent("component",...o[p]),this.$=o[p];break;case 54:b.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:b.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:b.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:b.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:b.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:b.addRel("rel",...o[p]),this.$=o[p];break;case 61:b.addRel("birel",...o[p]),this.$=o[p];break;case 62:b.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:b.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:b.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:b.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:b.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),b.addRel("rel",...o[p]),this.$=o[p];break;case 68:b.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:b.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:b.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;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:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:r,38:h,39:y,40:f,41:_,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Tt,[2,14]),t(Wt,[2,16],{12:[1,76]}),t(Tt,[2,36],{12:[1,77]}),t(wt,[2,19]),t(wt,[2,20]),{25:[1,78]},{27:[1,79]},t(wt,[2,23]),{35:80,75:81,76:E,77:S,79:T,80:C},{35:86,75:81,76:E,77:S,79:T,80:C},{35:87,75:81,76:E,77:S,79:T,80:C},{35:88,75:81,76:E,77:S,79:T,80:C},{35:89,75:81,76:E,77:S,79:T,80:C},{35:90,75:81,76:E,77:S,79:T,80:C},{35:91,75:81,76:E,77:S,79:T,80:C},{35:92,75:81,76:E,77:S,79:T,80:C},{35:93,75:81,76:E,77:S,79:T,80:C},{35:94,75:81,76:E,77:S,79:T,80:C},{35:95,75:81,76:E,77:S,79:T,80:C},{35:96,75:81,76:E,77:S,79:T,80:C},{35:97,75:81,76:E,77:S,79:T,80:C},{35:98,75:81,76:E,77:S,79:T,80:C},{35:99,75:81,76:E,77:S,79:T,80:C},{35:100,75:81,76:E,77:S,79:T,80:C},{35:101,75:81,76:E,77:S,79:T,80:C},{35:102,75:81,76:E,77:S,79:T,80:C},{35:103,75:81,76:E,77:S,79:T,80:C},{35:104,75:81,76:E,77:S,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:E,77:S,79:T,80:C},{35:106,75:81,76:E,77:S,79:T,80:C},{35:107,75:81,76:E,77:S,79:T,80:C},{35:108,75:81,76:E,77:S,79:T,80:C},{35:109,75:81,76:E,77:S,79:T,80:C},{35:110,75:81,76:E,77:S,79:T,80:C},{35:111,75:81,76:E,77:S,79:T,80:C},{35:112,75:81,76:E,77:S,79:T,80:C},{35:113,75:81,76:E,77:S,79:T,80:C},{35:114,75:81,76:E,77:S,79:T,80:C},{35:115,75:81,76:E,77:S,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:S,79:T,80:C},{35:120,75:81,76:E,77:S,79:T,80:C},{35:121,75:81,76:E,77:S,79:T,80:C},{35:122,75:81,76:E,77:S,79:T,80:C},{35:123,75:81,76:E,77:S,79:T,80:C},{35:124,75:81,76:E,77:S,79:T,80:C},{35:125,75:81,76:E,77:S,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Tt,[2,15]),t(Wt,[2,17],{21:22,19:130,22:e,23:s,24:a,26:u,28:i}),t(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:s,24:a,26:u,28:i,34:n,36:l,37:r,38:h,39:y,40:f,41:_,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(wt,[2,21]),t(wt,[2,22]),t(R,[2,39]),t(le,[2,71],{75:81,35:132,76:E,77:S,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Wt,[2,18]),t(Tt,[2,38]),t(le,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(Xt,[2,25]),t(Xt,[2,26],{12:[1,138]}),t(Xt,[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:d(function(m,x){if(x.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=x,k}},"parseError"),parse:d(function(m){var x=this,k=[0],b=[],D=[null],o=[],Ot=this.table,p="",xt=0,ce=0,ue=0,Fe=2,he=1,Ue=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(vt.yy[Ht]=this.yy[Ht]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Qt=A.yylloc;o.push(Qt);var je=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(B){k.length=k.length-2*B,D.length=D.length-B,o.length=o.length-B}d(ze,"popStack");function de(){var B;return B=b.pop()||A.lex()||he,typeof B!="number"&&(B instanceof Array&&(b=B,B=b.pop()),B=x.symbols_[B]||B),B}d(de,"lex");for(var L,Kt,kt,V,H0,Gt,Ct={},Mt,j,pe,Bt;;){if(kt=k[k.length-1],this.defaultActions[kt]?V=this.defaultActions[kt]:((L===null||typeof L>"u")&&(L=de()),V=Ot[kt]&&Ot[kt][L]),typeof V>"u"||!V.length||!V[0]){var Jt="";Bt=[];for(Mt in Ot[kt])this.terminals_[Mt]&&Mt>Fe&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Jt="Parse error on line "+(xt+1)+`:
1
+ import{a as Ee}from"./chunk-RINQGKTH.js";import{f as ke}from"./chunk-NOVL2262.js";import"./chunk-USZ3ZJYA.js";import"./chunk-J6N7AUC2.js";import"./chunk-NQ2XP5EN.js";import"./chunk-GPW7TXQS.js";import{i as ve,j as te,k as Rt}from"./chunk-CFMSYLIK.js";import"./chunk-UU7BHEBD.js";import{H as $t,N as Vt,O as be,U as _e,V as me,W as ge,X as xe,_ as Et,h as ye}from"./chunk-SGL7WI35.js";import{b as Zt,h as Yt}from"./chunk-CXXG5KL5.js";import{a as d}from"./chunk-ITN3D7RJ.js";import{d as fe}from"./chunk-SOAWGUAD.js";fe();var Ut=(function(){var t=d(function(yt,m,x,k){for(x=x||{},k=yt.length;k--;x[yt[k]]=m);return x},"o"),e=[1,24],s=[1,25],a=[1,26],u=[1,27],i=[1,28],n=[1,63],l=[1,64],r=[1,65],h=[1,66],y=[1,67],f=[1,68],_=[1,69],v=[1,29],w=[1,30],N=[1,31],O=[1,32],P=[1,33],M=[1,34],W=[1,35],X=[1,36],q=[1,37],H=[1,38],Q=[1,39],K=[1,40],G=[1,41],J=[1,42],Z=[1,43],$=[1,44],tt=[1,45],et=[1,46],nt=[1,47],rt=[1,48],st=[1,50],at=[1,51],it=[1,52],ot=[1,53],lt=[1,54],ct=[1,55],ut=[1,56],ht=[1,57],dt=[1,58],pt=[1,59],ft=[1,60],Tt=[14,42],Wt=[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],wt=[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],E=[1,82],S=[1,83],T=[1,84],C=[1,85],R=[12,14,42],le=[12,14,33,42],Lt=[12,14,33,42,76,77,79,80],gt=[12,33],Xt=[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],qt={trace:d(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:d(function(m,x,k,b,D,o,Ot){var p=o.length-1;switch(D){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(o[p-3]);break;case 19:b.setTitle(o[p].substring(6)),this.$=o[p].substring(6);break;case 20:b.setAccDescription(o[p].substring(15)),this.$=o[p].substring(15);break;case 21:this.$=o[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=o[p].trim(),b.setAccDescription(this.$);break;case 28:o[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 29:o[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 30:b.addPersonOrSystemBoundary(...o[p]),this.$=o[p];break;case 31:o[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...o[p]),this.$=o[p];break;case 32:b.addDeploymentNode("node",...o[p]),this.$=o[p];break;case 33:b.addDeploymentNode("nodeL",...o[p]),this.$=o[p];break;case 34:b.addDeploymentNode("nodeR",...o[p]),this.$=o[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...o[p]),this.$=o[p];break;case 40:b.addPersonOrSystem("external_person",...o[p]),this.$=o[p];break;case 41:b.addPersonOrSystem("system",...o[p]),this.$=o[p];break;case 42:b.addPersonOrSystem("system_db",...o[p]),this.$=o[p];break;case 43:b.addPersonOrSystem("system_queue",...o[p]),this.$=o[p];break;case 44:b.addPersonOrSystem("external_system",...o[p]),this.$=o[p];break;case 45:b.addPersonOrSystem("external_system_db",...o[p]),this.$=o[p];break;case 46:b.addPersonOrSystem("external_system_queue",...o[p]),this.$=o[p];break;case 47:b.addContainer("container",...o[p]),this.$=o[p];break;case 48:b.addContainer("container_db",...o[p]),this.$=o[p];break;case 49:b.addContainer("container_queue",...o[p]),this.$=o[p];break;case 50:b.addContainer("external_container",...o[p]),this.$=o[p];break;case 51:b.addContainer("external_container_db",...o[p]),this.$=o[p];break;case 52:b.addContainer("external_container_queue",...o[p]),this.$=o[p];break;case 53:b.addComponent("component",...o[p]),this.$=o[p];break;case 54:b.addComponent("component_db",...o[p]),this.$=o[p];break;case 55:b.addComponent("component_queue",...o[p]),this.$=o[p];break;case 56:b.addComponent("external_component",...o[p]),this.$=o[p];break;case 57:b.addComponent("external_component_db",...o[p]),this.$=o[p];break;case 58:b.addComponent("external_component_queue",...o[p]),this.$=o[p];break;case 60:b.addRel("rel",...o[p]),this.$=o[p];break;case 61:b.addRel("birel",...o[p]),this.$=o[p];break;case 62:b.addRel("rel_u",...o[p]),this.$=o[p];break;case 63:b.addRel("rel_d",...o[p]),this.$=o[p];break;case 64:b.addRel("rel_l",...o[p]),this.$=o[p];break;case 65:b.addRel("rel_r",...o[p]),this.$=o[p];break;case 66:b.addRel("rel_b",...o[p]),this.$=o[p];break;case 67:o[p].splice(0,1),b.addRel("rel",...o[p]),this.$=o[p];break;case 68:b.updateElStyle("update_el_style",...o[p]),this.$=o[p];break;case 69:b.updateRelStyle("update_rel_style",...o[p]),this.$=o[p];break;case 70:b.updateLayoutConfig("update_layout_config",...o[p]),this.$=o[p];break;case 71:this.$=[o[p]];break;case 72:o[p].unshift(o[p-1]),this.$=o[p];break;case 73:case 75:this.$=o[p].trim();break;case 74:let xt={};xt[o[p-1].trim()]=o[p].trim(),this.$=xt;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:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:70,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:71,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:72,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{13:73,19:20,20:21,21:22,22:e,23:s,24:a,26:u,28:i,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{14:[1,74]},t(Tt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:l,37:r,38:h,39:y,40:f,41:_,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(Tt,[2,14]),t(Wt,[2,16],{12:[1,76]}),t(Tt,[2,36],{12:[1,77]}),t(wt,[2,19]),t(wt,[2,20]),{25:[1,78]},{27:[1,79]},t(wt,[2,23]),{35:80,75:81,76:E,77:S,79:T,80:C},{35:86,75:81,76:E,77:S,79:T,80:C},{35:87,75:81,76:E,77:S,79:T,80:C},{35:88,75:81,76:E,77:S,79:T,80:C},{35:89,75:81,76:E,77:S,79:T,80:C},{35:90,75:81,76:E,77:S,79:T,80:C},{35:91,75:81,76:E,77:S,79:T,80:C},{35:92,75:81,76:E,77:S,79:T,80:C},{35:93,75:81,76:E,77:S,79:T,80:C},{35:94,75:81,76:E,77:S,79:T,80:C},{35:95,75:81,76:E,77:S,79:T,80:C},{35:96,75:81,76:E,77:S,79:T,80:C},{35:97,75:81,76:E,77:S,79:T,80:C},{35:98,75:81,76:E,77:S,79:T,80:C},{35:99,75:81,76:E,77:S,79:T,80:C},{35:100,75:81,76:E,77:S,79:T,80:C},{35:101,75:81,76:E,77:S,79:T,80:C},{35:102,75:81,76:E,77:S,79:T,80:C},{35:103,75:81,76:E,77:S,79:T,80:C},{35:104,75:81,76:E,77:S,79:T,80:C},t(R,[2,59]),{35:105,75:81,76:E,77:S,79:T,80:C},{35:106,75:81,76:E,77:S,79:T,80:C},{35:107,75:81,76:E,77:S,79:T,80:C},{35:108,75:81,76:E,77:S,79:T,80:C},{35:109,75:81,76:E,77:S,79:T,80:C},{35:110,75:81,76:E,77:S,79:T,80:C},{35:111,75:81,76:E,77:S,79:T,80:C},{35:112,75:81,76:E,77:S,79:T,80:C},{35:113,75:81,76:E,77:S,79:T,80:C},{35:114,75:81,76:E,77:S,79:T,80:C},{35:115,75:81,76:E,77:S,79:T,80:C},{20:116,29:49,30:61,32:62,34:n,36:l,37:r,38:h,39:y,40:f,41:_,43:23,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:S,79:T,80:C},{35:120,75:81,76:E,77:S,79:T,80:C},{35:121,75:81,76:E,77:S,79:T,80:C},{35:122,75:81,76:E,77:S,79:T,80:C},{35:123,75:81,76:E,77:S,79:T,80:C},{35:124,75:81,76:E,77:S,79:T,80:C},{35:125,75:81,76:E,77:S,79:T,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Tt,[2,15]),t(Wt,[2,17],{21:22,19:130,22:e,23:s,24:a,26:u,28:i}),t(Tt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:s,24:a,26:u,28:i,34:n,36:l,37:r,38:h,39:y,40:f,41:_,44:v,45:w,46:N,47:O,48:P,49:M,50:W,51:X,52:q,53:H,54:Q,55:K,56:G,57:J,58:Z,59:$,60:tt,61:et,62:nt,63:rt,64:st,65:at,66:it,67:ot,68:lt,69:ct,70:ut,71:ht,72:dt,73:pt,74:ft}),t(wt,[2,21]),t(wt,[2,22]),t(R,[2,39]),t(le,[2,71],{75:81,35:132,76:E,77:S,79:T,80:C}),t(Lt,[2,73]),{78:[1,133]},t(Lt,[2,75]),t(Lt,[2,76]),t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(R,[2,52]),t(R,[2,53]),t(R,[2,54]),t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,60]),t(R,[2,61]),t(R,[2,62]),t(R,[2,63]),t(R,[2,64]),t(R,[2,65]),t(R,[2,66]),t(R,[2,67]),t(R,[2,68]),t(R,[2,69]),t(R,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(gt,[2,28]),t(gt,[2,29]),t(gt,[2,30]),t(gt,[2,31]),t(gt,[2,32]),t(gt,[2,33]),t(gt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Wt,[2,18]),t(Tt,[2,38]),t(le,[2,72]),t(Lt,[2,74]),t(R,[2,24]),t(R,[2,35]),t(Xt,[2,25]),t(Xt,[2,26],{12:[1,138]}),t(Xt,[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:d(function(m,x){if(x.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=x,k}},"parseError"),parse:d(function(m){var x=this,k=[0],b=[],D=[null],o=[],Ot=this.table,p="",xt=0,ce=0,ue=0,Fe=2,he=1,Ue=o.slice.call(arguments,1),A=Object.create(this.lexer),vt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(vt.yy[Ht]=this.yy[Ht]);A.setInput(m,vt.yy),vt.yy.lexer=A,vt.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Qt=A.yylloc;o.push(Qt);var je=A.options&&A.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(B){k.length=k.length-2*B,D.length=D.length-B,o.length=o.length-B}d(ze,"popStack");function de(){var B;return B=b.pop()||A.lex()||he,typeof B!="number"&&(B instanceof Array&&(b=B,B=b.pop()),B=x.symbols_[B]||B),B}d(de,"lex");for(var L,Kt,kt,V,H0,Gt,Ct={},Mt,j,pe,Bt;;){if(kt=k[k.length-1],this.defaultActions[kt]?V=this.defaultActions[kt]:((L===null||typeof L>"u")&&(L=de()),V=Ot[kt]&&Ot[kt][L]),typeof V>"u"||!V.length||!V[0]){var Jt="";Bt=[];for(Mt in Ot[kt])this.terminals_[Mt]&&Mt>Fe&&Bt.push("'"+this.terminals_[Mt]+"'");A.showPosition?Jt="Parse error on line "+(xt+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Bt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Jt="Parse error on line "+(xt+1)+": Unexpected "+(L==he?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Jt,{text:A.match,token:this.terminals_[L]||L,line:A.yylineno,loc:Qt,expected:Bt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+L);switch(V[0]){case 1:k.push(L),D.push(A.yytext),o.push(A.yylloc),k.push(V[1]),L=null,Kt?(L=Kt,Kt=null):(ce=A.yyleng,p=A.yytext,xt=A.yylineno,Qt=A.yylloc,ue>0&&ue--);break;case 2:if(j=this.productions_[V[1]][1],Ct.$=D[D.length-j],Ct._$={first_line:o[o.length-(j||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(j||1)].first_column,last_column:o[o.length-1].last_column},je&&(Ct._$.range=[o[o.length-(j||1)].range[0],o[o.length-1].range[1]]),Gt=this.performAction.apply(Ct,[p,ce,xt,vt.yy,V[1],D,o].concat(Ue)),typeof Gt<"u")return Gt;j&&(k=k.slice(0,-1*j*2),D=D.slice(0,-1*j),o=o.slice(0,-1*j)),k.push(this.productions_[V[1]][0]),D.push(Ct.$),o.push(Ct._$),pe=Ot[k[k.length-2]][k[k.length-1]],k.push(pe);break;case 3:return!0}}return!0},"parse")},Ye=(function(){var yt={EOF:1,parseError:d(function(x,k){if(this.yy.parser)this.yy.parser.parseError(x,k);else throw new Error(x)},"parseError"),setInput:d(function(m,x){return this.yy=x||this.yy||{},this._input=m,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:d(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:d(function(m){var x=m.length,k=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var b=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),k.length-1&&(this.yylineno-=k.length-1);var D=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:k?(k.length===b.length?this.yylloc.first_column:0)+b[b.length-k.length].length-k[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
@@ -36,4 +36,4 @@ ${W0()}
36
36
  stroke-width: 2px;
37
37
  }
38
38
  `,"getStyles"),q0=X0,a1={parser:We,db:ne,renderer:Re,styles:q0,init:d(({c4:t,wrap:e})=>{Re.setConf(t),ne.setWrap(e)},"init")};export{a1 as diagram};
39
- //# sourceMappingURL=c4Diagram-7LVT6UL2-4HJHKNE3.js.map
39
+ //# sourceMappingURL=c4Diagram-7LVT6UL2-57CIXPJZ.js.map
@@ -1,4 +1,4 @@
1
- import{a as Lt}from"./chunk-BUZPUGIT.js";import{e as I}from"./chunk-HNYXDXPN.js";import{a as Mt}from"./chunk-M3SWKTLZ.js";import{c as gt,d as xt}from"./chunk-OODDZ447.js";import{b as nt,d as wt}from"./chunk-FPLIRG3U.js";import{p as A,t as bt}from"./chunk-LHNPPNB7.js";import{_ as Y,u as X,y as at}from"./chunk-6FQEBIA3.js";import{$ as yt,G as J,H as it,J as lt,K as ct,L as et,P as dt,S as pt,W as ht,X as ft,Y as mt,Z as kt,_ as ut,b,h as W}from"./chunk-L34PKG4P.js";import{a as p}from"./chunk-LDXBIOBF.js";import{d as ot}from"./chunk-R7TFKRNM.js";ot();var N=p((r,t)=>{if(t)return"translate("+-r.width/2+", "+-r.height/2+")";let a=r.x??0,e=r.y??0;return"translate("+-(a+r.width/2)+", "+-(e+r.height/2)+")"},"computeLabelTransform"),v={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},_t={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Q(r,t){if(r===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};r=x(r),t=x(t);let[a,e]=[r.x,r.y],[o,s]=[t.x,t.y],n=o-a,i=s-e;return{angle:Math.atan(i/n),deltaX:n,deltaY:i}}p(Q,"calculateDeltaAndAngle");var x=p(r=>Array.isArray(r)?{x:r[0],y:r[1]}:r,"pointTransformer"),At=p(r=>({x:p(function(t,a,e){let o=0,s=x(e[0]).x<x(e[e.length-1]).x?"left":"right";if(a===0&&Object.hasOwn(v,r.arrowTypeStart)){let{angle:c,deltaX:y}=Q(e[0],e[1]);o=v[r.arrowTypeStart]*Math.cos(c)*(y>=0?1:-1)}else if(a===e.length-1&&Object.hasOwn(v,r.arrowTypeEnd)){let{angle:c,deltaX:y}=Q(e[e.length-1],e[e.length-2]);o=v[r.arrowTypeEnd]*Math.cos(c)*(y>=0?1:-1)}let n=Math.abs(x(t).x-x(e[e.length-1]).x),i=Math.abs(x(t).y-x(e[e.length-1]).y),d=Math.abs(x(t).x-x(e[0]).x),m=Math.abs(x(t).y-x(e[0]).y),l=v[r.arrowTypeStart],f=v[r.arrowTypeEnd],h=1;if(n<f&&n>0&&i<f){let c=f+h-n;c*=s==="right"?-1:1,o-=c}if(d<l&&d>0&&m<l){let c=l+h-d;c*=s==="right"?-1:1,o+=c}return x(t).x+o},"x"),y:p(function(t,a,e){let o=0,s=x(e[0]).y<x(e[e.length-1]).y?"down":"up";if(a===0&&Object.hasOwn(v,r.arrowTypeStart)){let{angle:c,deltaY:y}=Q(e[0],e[1]);o=v[r.arrowTypeStart]*Math.abs(Math.sin(c))*(y>=0?1:-1)}else if(a===e.length-1&&Object.hasOwn(v,r.arrowTypeEnd)){let{angle:c,deltaY:y}=Q(e[e.length-1],e[e.length-2]);o=v[r.arrowTypeEnd]*Math.abs(Math.sin(c))*(y>=0?1:-1)}let n=Math.abs(x(t).y-x(e[e.length-1]).y),i=Math.abs(x(t).x-x(e[e.length-1]).x),d=Math.abs(x(t).y-x(e[0]).y),m=Math.abs(x(t).x-x(e[0]).x),l=v[r.arrowTypeStart],f=v[r.arrowTypeEnd],h=1;if(n<f&&n>0&&i<f){let c=f+h-n;c*=s==="up"?-1:1,o-=c}if(d<l&&d>0&&m<l){let c=l+h-d;c*=s==="up"?-1:1,o+=c}return x(t).y+o},"y")}),"getLineFunctionsWithOffset"),Bt=p((r,t,a,e,o,s=!1,n)=>{t.arrowTypeStart&&St(r,"start",t.arrowTypeStart,a,e,o,s,n),t.arrowTypeEnd&&St(r,"end",t.arrowTypeEnd,a,e,o,s,n)},"addEdgeMarkers"),Ct={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},zt=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],St=p((r,t,a,e,o,s,n=!1,i)=>{if(!a||a==="none")return;let d=Ct[a],m=d&&zt.includes(d.type);if(!d){b.warn(`Unknown arrow type: ${a}`);return}let l=d.type,c=`${o}_${s}-${l}${t==="start"?"Start":"End"}${n&&m?"-margin":""}`;if(i&&i.trim()!==""){let y=i.replace(/[^\dA-Za-z]/g,"_"),g=`${c}_${y}`;if(!document.getElementById(g)){let k=document.getElementById(c);if(k){let M=k.cloneNode(!0);M.id=g,M.querySelectorAll("path, circle, line").forEach(B=>{B.setAttribute("stroke",i),d.fill&&B.setAttribute("fill",i)}),k.parentNode?.appendChild(M)}}r.attr(`marker-${t}`,`url(${e}#${g})`)}else r.attr(`marker-${t}`,`url(${e}#${c})`)},"addEdgeMarker"),Rt=p(r=>typeof r=="string"?r:Y()?.flowchart?.curve,"resolveEdgeCurveType"),G=new Map,_=new Map,Or=p(()=>{G.clear(),_.clear()},"clear"),Er=p(r=>!!(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),D=p(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Ur=p(async(r,t)=>{let a=Y(),e=at(a),{labelStyles:o}=xt(t);t.labelStyle=o;let s=r.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label").attr("data-id",t.id),i=t.labelType==="markdown",m=await wt(r,t.label,{style:D(t.labelStyle),useHtmlLabels:e,addSvgBackground:!0,isNode:!1,markdown:i,width:i?void 0:void 0},a);n.node().appendChild(m),b.info("abc82",t,t.labelType);let l,f;if(e){let c=m.children[0],y=W(m);l=await nt.measure(()=>c.getBoundingClientRect()),f=l,y.attr("width",l.width),y.attr("height",l.height)}else{let c=W(m).select("text").node();await nt.measure(()=>{l=m.getBBox(),c&&typeof c.getBBox=="function"?f=c.getBBox():f=l})}n.attr("transform",N(f,e)),G.set(t.id,s),t.width=l.width,t.height=l.height;let h;if(t.startLabelLeft){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(y,t.startLabelLeft,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).startLeft=c,Z(h,t.startLabelLeft)}if(t.startLabelRight){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(y,t.startLabelRight,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).startRight=c,Z(h,t.startLabelRight)}if(t.endLabelLeft){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(c,t.endLabelLeft,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).endLeft=c,Z(h,t.endLabelLeft)}if(t.endLabelRight){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(c,t.endLabelRight,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).endRight=c,Z(h,t.endLabelRight)}return m},"insertEdgeLabel");function Z(r,t){at(Y())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}p(Z,"setTerminalWidth");var $r=p((r,t)=>{b.debug("Moving label abc88 ",r.id,r.label,G.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,e=Y(),{subGraphTitleTotalMargin:o}=Lt(e);if(r.label){let s=G.get(r.id),n=r.x,i=r.y;if(a){let d=A.calcLabelPosition(a);b.debug("Moving label "+r.label+" from (",n,",",i,") to (",d.x,",",d.y,") abc88"),t.updatedPath&&(n=d.x,i=d.y)}s.attr("transform",`translate(${n}, ${i+o/2})`)}if(r.startLabelLeft){let s=_.get(r.id).startLeft,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.startLabelRight){let s=_.get(r.id).startRight,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelLeft){let s=_.get(r.id).endLeft,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelRight){let s=_.get(r.id).endRight,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),qt=p((r,t)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[a,e]=t,o=Math.abs(e.x-a.x),s=Math.abs(e.y-a.y);return o<.001||s<.001?t:s>=o?[a,{x:a.x,y:e.y},e]:[a,{x:e.x,y:a.y},e]},"orthogonalizeToLabelClippedPoints"),Pt=p((r,t)=>{let a=r.x,e=r.y,o=Math.abs(t.x-a),s=Math.abs(t.y-e),n=r.width/2,i=r.height/2;return o>=n||s>=i},"outsideNode"),It=p((r,t,a)=>{b.debug(`intersection calc abc89:
1
+ import{a as Lt}from"./chunk-XOZZFIHV.js";import{e as I}from"./chunk-NOVL2262.js";import{a as Mt}from"./chunk-USZ3ZJYA.js";import{c as gt,d as xt}from"./chunk-J6N7AUC2.js";import{b as nt,d as wt}from"./chunk-NQ2XP5EN.js";import{p as A,t as bt}from"./chunk-CFMSYLIK.js";import{_ as Y,u as X,y as at}from"./chunk-SGL7WI35.js";import{$ as yt,G as J,H as it,J as lt,K as ct,L as et,P as dt,S as pt,W as ht,X as ft,Y as mt,Z as kt,_ as ut,b,h as W}from"./chunk-CXXG5KL5.js";import{a as p}from"./chunk-ITN3D7RJ.js";import{d as ot}from"./chunk-SOAWGUAD.js";ot();var N=p((r,t)=>{if(t)return"translate("+-r.width/2+", "+-r.height/2+")";let a=r.x??0,e=r.y??0;return"translate("+-(a+r.width/2)+", "+-(e+r.height/2)+")"},"computeLabelTransform"),v={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},_t={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Q(r,t){if(r===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};r=x(r),t=x(t);let[a,e]=[r.x,r.y],[o,s]=[t.x,t.y],n=o-a,i=s-e;return{angle:Math.atan(i/n),deltaX:n,deltaY:i}}p(Q,"calculateDeltaAndAngle");var x=p(r=>Array.isArray(r)?{x:r[0],y:r[1]}:r,"pointTransformer"),At=p(r=>({x:p(function(t,a,e){let o=0,s=x(e[0]).x<x(e[e.length-1]).x?"left":"right";if(a===0&&Object.hasOwn(v,r.arrowTypeStart)){let{angle:c,deltaX:y}=Q(e[0],e[1]);o=v[r.arrowTypeStart]*Math.cos(c)*(y>=0?1:-1)}else if(a===e.length-1&&Object.hasOwn(v,r.arrowTypeEnd)){let{angle:c,deltaX:y}=Q(e[e.length-1],e[e.length-2]);o=v[r.arrowTypeEnd]*Math.cos(c)*(y>=0?1:-1)}let n=Math.abs(x(t).x-x(e[e.length-1]).x),i=Math.abs(x(t).y-x(e[e.length-1]).y),d=Math.abs(x(t).x-x(e[0]).x),m=Math.abs(x(t).y-x(e[0]).y),l=v[r.arrowTypeStart],f=v[r.arrowTypeEnd],h=1;if(n<f&&n>0&&i<f){let c=f+h-n;c*=s==="right"?-1:1,o-=c}if(d<l&&d>0&&m<l){let c=l+h-d;c*=s==="right"?-1:1,o+=c}return x(t).x+o},"x"),y:p(function(t,a,e){let o=0,s=x(e[0]).y<x(e[e.length-1]).y?"down":"up";if(a===0&&Object.hasOwn(v,r.arrowTypeStart)){let{angle:c,deltaY:y}=Q(e[0],e[1]);o=v[r.arrowTypeStart]*Math.abs(Math.sin(c))*(y>=0?1:-1)}else if(a===e.length-1&&Object.hasOwn(v,r.arrowTypeEnd)){let{angle:c,deltaY:y}=Q(e[e.length-1],e[e.length-2]);o=v[r.arrowTypeEnd]*Math.abs(Math.sin(c))*(y>=0?1:-1)}let n=Math.abs(x(t).y-x(e[e.length-1]).y),i=Math.abs(x(t).x-x(e[e.length-1]).x),d=Math.abs(x(t).y-x(e[0]).y),m=Math.abs(x(t).x-x(e[0]).x),l=v[r.arrowTypeStart],f=v[r.arrowTypeEnd],h=1;if(n<f&&n>0&&i<f){let c=f+h-n;c*=s==="up"?-1:1,o-=c}if(d<l&&d>0&&m<l){let c=l+h-d;c*=s==="up"?-1:1,o+=c}return x(t).y+o},"y")}),"getLineFunctionsWithOffset"),Bt=p((r,t,a,e,o,s=!1,n)=>{t.arrowTypeStart&&St(r,"start",t.arrowTypeStart,a,e,o,s,n),t.arrowTypeEnd&&St(r,"end",t.arrowTypeEnd,a,e,o,s,n)},"addEdgeMarkers"),Ct={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},zt=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],St=p((r,t,a,e,o,s,n=!1,i)=>{if(!a||a==="none")return;let d=Ct[a],m=d&&zt.includes(d.type);if(!d){b.warn(`Unknown arrow type: ${a}`);return}let l=d.type,c=`${o}_${s}-${l}${t==="start"?"Start":"End"}${n&&m?"-margin":""}`;if(i&&i.trim()!==""){let y=i.replace(/[^\dA-Za-z]/g,"_"),g=`${c}_${y}`;if(!document.getElementById(g)){let k=document.getElementById(c);if(k){let M=k.cloneNode(!0);M.id=g,M.querySelectorAll("path, circle, line").forEach(B=>{B.setAttribute("stroke",i),d.fill&&B.setAttribute("fill",i)}),k.parentNode?.appendChild(M)}}r.attr(`marker-${t}`,`url(${e}#${g})`)}else r.attr(`marker-${t}`,`url(${e}#${c})`)},"addEdgeMarker"),Rt=p(r=>typeof r=="string"?r:Y()?.flowchart?.curve,"resolveEdgeCurveType"),G=new Map,_=new Map,Or=p(()=>{G.clear(),_.clear()},"clear"),Er=p(r=>!!(r.label||r.startLabelLeft||r.startLabelRight||r.endLabelLeft||r.endLabelRight),"hasEdgeLabel"),D=p(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),Ur=p(async(r,t)=>{let a=Y(),e=at(a),{labelStyles:o}=xt(t);t.labelStyle=o;let s=r.insert("g").attr("class","edgeLabel"),n=s.insert("g").attr("class","label").attr("data-id",t.id),i=t.labelType==="markdown",m=await wt(r,t.label,{style:D(t.labelStyle),useHtmlLabels:e,addSvgBackground:!0,isNode:!1,markdown:i,width:i?void 0:void 0},a);n.node().appendChild(m),b.info("abc82",t,t.labelType);let l,f;if(e){let c=m.children[0],y=W(m);l=await nt.measure(()=>c.getBoundingClientRect()),f=l,y.attr("width",l.width),y.attr("height",l.height)}else{let c=W(m).select("text").node();await nt.measure(()=>{l=m.getBBox(),c&&typeof c.getBBox=="function"?f=c.getBBox():f=l})}n.attr("transform",N(f,e)),G.set(t.id,s),t.width=l.width,t.height=l.height;let h;if(t.startLabelLeft){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(y,t.startLabelLeft,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).startLeft=c,Z(h,t.startLabelLeft)}if(t.startLabelRight){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(y,t.startLabelRight,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).startRight=c,Z(h,t.startLabelRight)}if(t.endLabelLeft){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(c,t.endLabelLeft,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).endLeft=c,Z(h,t.endLabelLeft)}if(t.endLabelRight){let c=r.insert("g").attr("class","edgeTerminals"),y=c.insert("g").attr("class","inner"),g=await I(c,t.endLabelRight,D(t.labelStyle)||"",!1,!1);h=g;let k=g.getBBox();if(e){let M=g.children[0],u=W(g);k=M.getBoundingClientRect(),u.attr("width",k.width),u.attr("height",k.height)}y.attr("transform",N(k,e)),_.get(t.id)||_.set(t.id,{}),_.get(t.id).endRight=c,Z(h,t.endLabelRight)}return m},"insertEdgeLabel");function Z(r,t){at(Y())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}p(Z,"setTerminalWidth");var $r=p((r,t)=>{b.debug("Moving label abc88 ",r.id,r.label,G.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,e=Y(),{subGraphTitleTotalMargin:o}=Lt(e);if(r.label){let s=G.get(r.id),n=r.x,i=r.y;if(a){let d=A.calcLabelPosition(a);b.debug("Moving label "+r.label+" from (",n,",",i,") to (",d.x,",",d.y,") abc88"),t.updatedPath&&(n=d.x,i=d.y)}s.attr("transform",`translate(${n}, ${i+o/2})`)}if(r.startLabelLeft){let s=_.get(r.id).startLeft,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.startLabelRight){let s=_.get(r.id).startRight,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelLeft){let s=_.get(r.id).endLeft,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}if(r.endLabelRight){let s=_.get(r.id).endRight,n=r.x,i=r.y;if(a){let d=A.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);n=d.x,i=d.y}s.attr("transform",`translate(${n}, ${i})`)}},"positionEdgeLabel"),qt=p((r,t)=>{if(!r?.isLabelEdge||!r?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[a,e]=t,o=Math.abs(e.x-a.x),s=Math.abs(e.y-a.y);return o<.001||s<.001?t:s>=o?[a,{x:a.x,y:e.y},e]:[a,{x:e.x,y:a.y},e]},"orthogonalizeToLabelClippedPoints"),Pt=p((r,t)=>{let a=r.x,e=r.y,o=Math.abs(t.x-a),s=Math.abs(t.y-e),n=r.width/2,i=r.height/2;return o>=n||s>=i},"outsideNode"),It=p((r,t,a)=>{b.debug(`intersection calc abc89:
2
2
  outsidePoint: ${JSON.stringify(t)}
3
3
  insidePoint : ${JSON.stringify(a)}
4
4
  node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let e=r.x,o=r.y,s=Math.abs(e-a.x),n=r.width/2,i=a.x<t.x?n-s:n+s,d=r.height/2,m=Math.abs(t.y-a.y),l=Math.abs(t.x-a.x);if(Math.abs(o-t.y)*n>Math.abs(e-t.x)*d){let f=a.y<t.y?t.y-d-o:o-d-t.y;i=l*f/m;let h={x:a.x<t.x?a.x+i:a.x-l+i,y:a.y<t.y?a.y+m-f:a.y-m+f};return i===0&&(h.x=t.x,h.y=t.y),l===0&&(h.x=t.x),m===0&&(h.y=t.y),b.debug(`abc89 top/bottom calc, Q ${m}, q ${f}, R ${l}, r ${i}`,h),h}else{a.x<t.x?i=t.x-n-e:i=e-n-t.x;let f=m*i/l,h=a.x<t.x?a.x+l-i:a.x-l+i,c=a.y<t.y?a.y+f:a.y-f;return b.debug(`sides calc abc89, Q ${m}, q ${f}, R ${l}, r ${i}`,{_x:h,_y:c}),i===0&&(h=t.x,c=t.y),l===0&&(h=t.x),m===0&&(c=t.y),{x:h,y:c}}},"intersection"),vt=p((r,t)=>{b.warn("abc88 cutPathAtIntersect",r,t);let a=[],e=r[0],o=!1;return r.forEach(s=>{if(b.info("abc88 checking point",s,t),!Pt(t,s)&&!o){let n=It(t,e,s);b.debug("abc88 inside",s,e,n),b.debug("abc88 intersection",n,t);let i=!1;a.forEach(d=>{i=i||d.x===n.x&&d.y===n.y}),a.some(d=>d.x===n.x&&d.y===n.y)?b.warn("abc88 no intersect",n,a):a.push(n),o=!0}else b.warn("abc88 outside",s,e),e=s,o||a.push(s)}),b.debug("returning points",a),a},"cutPathAtIntersect");function Et(r){let t=[],a=[];for(let e=1;e<r.length-1;e++){let o=r[e-1],s=r[e],n=r[e+1];(o.x===s.x&&s.y===n.y&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-o.y)>5||o.y===s.y&&s.x===n.x&&Math.abs(s.x-o.x)>5&&Math.abs(s.y-n.y)>5)&&(t.push(s),a.push(e))}return{cornerPoints:t,cornerPointPositions:a}}p(Et,"extractCornerPoints");var Ot=p(function(r,t,a){let e=t.x-r.x,o=t.y-r.y,s=Math.sqrt(e*e+o*o),n=a/s;return{x:t.x-n*e,y:t.y-n*o}},"findAdjacentPoint"),Nt=p(function(r){let{cornerPointPositions:t}=Et(r),a=[];for(let e=0;e<r.length;e++)if(t.includes(e)){let o=r[e-1],s=r[e+1],n=r[e],i=Ot(o,n,5),d=Ot(s,n,5),m=d.x-i.x,l=d.y-i.y;a.push(i);let f=Math.sqrt(2)*2,h={x:n.x,y:n.y};if(Math.abs(s.x-o.x)>10&&Math.abs(s.y-o.y)>=10){b.debug("Corner point fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));let c=5;n.x===i.x?h={x:m<0?i.x-c+f:i.x+c-f,y:l<0?i.y-f:i.y+f}:h={x:m<0?i.x-f:i.x+f,y:l<0?i.y-c+f:i.y+c-f}}else b.debug("Corner point skipping fixing",Math.abs(s.x-o.x),Math.abs(s.y-o.y));a.push(h,d)}else a.push(r[e]);return a},"fixCorners"),Dt=p((r,t,a)=>{let e=r-t-a,o=2,s=2,n=o+s,i=Math.floor(e/n),d=Number.isFinite(i)?Math.max(0,i):0,m=Array(d).fill(`${o} ${s}`).join(" ");return`0 ${t} ${m} ${a}`},"generateDashArray"),Xr=p(function(r,t,a,e,o,s,n,i=!1){if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:d,layout:m}=Y(),l=t.points,f=!1,h=o;var c=s;let y=[];for(let w in t.cssCompiledStyles)gt(w)||y.push(t.cssCompiledStyles[w]);if(m==="swimlane"){if(c.intersect&&h.intersect&&Array.isArray(l)&&l.length>=2)if(l.length===2)l=[h.intersect(l[0]),c.intersect(l[1])];else{let w=l.slice(1,-1),$=w[0],O=w[w.length-1],E=.5,z=Math.abs(l[l.length-1].x-O.x)<E&&Math.abs(l[l.length-1].y-O.y)<E,T=h.intersect($),H=z?O:c.intersect(O),R=Math.abs(H.x-O.x)<E&&Math.abs(H.y-O.y)<E,Tt=Math.abs(T.x-$.x)<E&&Math.abs(T.y-$.y)<E?[]:[T],Ht=R?[]:[H];l=[...Tt,...w,...Ht]}l=qt(t,l)}else c.intersect&&h.intersect&&!i&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),l.push(c.intersect(l[l.length-1])));let g=btoa(JSON.stringify(l));t.toCluster&&(b.info("to cluster abc88",a.get(t.toCluster)),l=vt(t.points,a.get(t.toCluster).node),f=!0),t.fromCluster&&(b.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(l,null,2)),l=vt(l.reverse(),a.get(t.fromCluster).node).reverse(),f=!0);let k=l.filter(w=>!Number.isNaN(w.y)),M=Rt(t.curve);M!=="rounded"&&(k=Nt(k));let u=J;switch(M){case"linear":u=J;break;case"basis":u=et;break;case"cardinal":u=dt;break;case"bumpX":u=lt;break;case"bumpY":u=ct;break;case"catmullRom":u=pt;break;case"monotoneX":u=ht;break;case"monotoneY":u=ft;break;case"natural":u=mt;break;case"step":u=kt;break;case"stepAfter":u=yt;break;case"stepBefore":u=ut;break;case"rounded":u=J;break;default:u=et}let{x:B,y:K}=At(t),P=it().x(B).y(K).curve(u),S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let L,j=M==="rounded"?Ut($t(k,t),5):P(k),U=Array.isArray(t.style)?t.style:[t.style],V=U.find(w=>w?.startsWith("stroke:")),C="";t.animate&&(C="edge-animation-fast"),t.animation&&(C="edge-animation-"+t.animation);let tt=!1;if(t.look==="handDrawn"){let w=Mt.svg(r);Object.assign([],k);let $=w.path(j,{roughness:.3,seed:d});S+=" transition",L=W($).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(C?" "+C:"")).attr("style",U?U.reduce((E,z)=>E+";"+z,""):"");let O=L.attr("d");L.attr("d",O),r.node().appendChild(L.node())}else{let w=y.join(";"),$=U?U.reduce((R,q)=>R+q+";",""):"",O=(w?w+";"+$+";":$)+";"+(U?U.reduce((R,q)=>R+";"+q,""):"");L=r.append("path").attr("d",j).attr("id",`${n}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+(C?" "+C:"")).attr("style",O),V=O.match(/stroke:([^;]+)/)?.[1],tt=t.animate===!0||!!t.animation||w.includes("animation");let E=L.node(),z=typeof E.getTotalLength=="function"?E.getTotalLength():0,T=_t[t.arrowTypeStart]||0,H=_t[t.arrowTypeEnd]||0;if(t.look==="neo"&&!tt){let q=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Dt(z,T,H):`0 ${T} ${z-T-H} ${H}`}; stroke-dashoffset: 0;`;L.attr("style",q+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",t.id),L.attr("data-points",g),L.attr("data-look",bt(t.look)),t.showPoints&&k.forEach(w=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",w.x).attr("cy",w.y)});let F="";(Y().flowchart.arrowMarkerAbsolute||Y().state.arrowMarkerAbsolute)&&(F=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,F=F.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),b.info("arrowTypeStart",t.arrowTypeStart),b.info("arrowTypeEnd",t.arrowTypeEnd);let Xt=!tt&&t?.look==="neo";Bt(L,t,F,n,e,Xt,V);let Yt=Math.floor(l.length/2),Wt=l[Yt];A.isLabelCoordinateInPath(Wt,L.attr("d"))||(f=!0);let rt={};return f&&(rt.updatedPath=l),rt.originalPath=t.points,rt},"insertEdge");function Ut(r,t){if(r.length<2)return"";let a="",e=r.length,o=1e-5;for(let s=0;s<e;s++){let n=r[s],i=r[s-1],d=r[s+1];if(s===0)a+=`M${n.x},${n.y}`;else if(s===e-1)a+=`L${n.x},${n.y}`;else{let m=n.x-i.x,l=n.y-i.y,f=d.x-n.x,h=d.y-n.y,c=Math.hypot(m,l),y=Math.hypot(f,h);if(c<o||y<o){a+=`L${n.x},${n.y}`;continue}let g=m/c,k=l/c,M=f/y,u=h/y,B=g*M+k*u,K=Math.max(-1,Math.min(1,B)),P=Math.acos(K);if(P<o||Math.abs(Math.PI-P)<o){a+=`L${n.x},${n.y}`;continue}let S=Math.min(t/Math.sin(P/2),c/2,y/2),L=n.x-g*S,j=n.y-k*S,U=n.x+M*S,V=n.y+u*S;a+=`L${L},${j}`,a+=`Q${n.x},${n.y} ${U},${V}`}}return a}p(Ut,"generateRoundedPath");function st(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};let a=t.x-r.x,e=t.y-r.y;return{angle:Math.atan2(e,a),deltaX:a,deltaY:e}}p(st,"calculateDeltaAndAngle");function $t(r,t){let a=r.map(o=>({...o}));if(r.length>=2&&v[t.arrowTypeStart]){let o=v[t.arrowTypeStart],s=r[0],n=r[1],{angle:i}=st(s,n),d=o*Math.cos(i),m=o*Math.sin(i);a[0].x=s.x+d,a[0].y=s.y+m}let e=r.length;if(e>=2&&v[t.arrowTypeEnd]){let o=v[t.arrowTypeEnd],s=r[e-1],n=r[e-2],{angle:i}=st(n,s),d=o*Math.cos(i),m=o*Math.sin(i);a[e-1].x=s.x-d,a[e-1].y=s.y-m}return a}p($t,"applyMarkerOffsetsToPoints");var Qt=p((r,t,a,e)=>{t.forEach(o=>{kr[o](r,a,e)})},"insertMarkers"),Zt=p((r,t,a)=>{b.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),r.append("marker").attr("id",a+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),r.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),jt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Vt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ft=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Jt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),r.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Gt=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Kt=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),tr=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",a+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),r.append("marker").attr("id",a+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),rr=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),ar=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{transitionColor:s}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),er=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),nr=p((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),e.append("path").attr("d","M9,0 L9,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),sr=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),or=p((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");e.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),e.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let o=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ir=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{strokeWidth:s}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),lr=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{strokeWidth:s,mainBkg:n}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");i.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),i.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);let d=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");d.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),d.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),cr=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{strokeWidth:s}=o;r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),dr=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{strokeWidth:s,mainBkg:n}=o,i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");i.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);let d=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");d.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),d.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),pr=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
@@ -8,4 +8,4 @@ import{a as Lt}from"./chunk-BUZPUGIT.js";import{e as I}from"./chunk-HNYXDXPN.js"
8
8
  L20,10
9
9
  M20,10
10
10
  L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),fr=p((r,t,a)=>{let e=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");e.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),mr=p((r,t,a)=>{let e=X(),{themeVariables:o}=e,{strokeWidth:s}=o,n=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),kr={extension:Zt,composition:jt,aggregation:Vt,dependency:Ft,lollipop:Jt,point:Gt,circle:Kt,cross:tr,barb:rr,barbNeo:ar,only_one:er,zero_or_one:nr,one_or_more:sr,zero_or_more:or,only_one_neo:ir,zero_or_one_neo:lr,one_or_more_neo:cr,zero_or_more_neo:dr,requirement_arrow:pr,requirement_contains:fr,requirement_arrow_neo:hr,requirement_contains_neo:mr},Yr=Qt;export{v as a,G as b,_ as c,Or as d,Er as e,Ur as f,$r as g,Xr as h,Yr as i};
11
- //# sourceMappingURL=chunk-GQPX4EIC.js.map
11
+ //# sourceMappingURL=chunk-3EZ2OKHV.js.map
@@ -1,2 +1,2 @@
1
- import{a as t,b as d,c as l,d as o,e as u,g as c,p as f,w as m,y as v}from"./chunk-QNEZP2TE.js";import{d as s}from"./chunk-R7TFKRNM.js";s();var b=class extends v{static{t(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},A=class extends m{static{t(this,"RailroadAbnfValueConverter")}runConverter(r,e,a){let i=super.runConverter(r,e,a);if(r.name==="TITLE"&&typeof i=="string"){let n=i.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1)}return i}runCustomConverter(r,e,a){if(r.name==="ABNF_STRING")return e.slice(1,-1)}},C={parser:{TokenBuilder:t(()=>new b,"TokenBuilder"),ValueConverter:t(()=>new A,"ValueConverter")}};function R(r=u){let e=o(l(r),c),a=o(d({shared:e}),f,C);return e.ServiceRegistry.register(a),{shared:e,RailroadAbnf:a}}t(R,"createRailroadAbnfServices");export{C as a,R as b};
2
- //# sourceMappingURL=chunk-37NHO5VO.js.map
1
+ import{a as t,b as d,c as l,d as o,e as u,g as c,p as f,w as m,y as v}from"./chunk-WL4ZMLPV.js";import{d as s}from"./chunk-SOAWGUAD.js";s();var b=class extends v{static{t(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},A=class extends m{static{t(this,"RailroadAbnfValueConverter")}runConverter(r,e,a){let i=super.runConverter(r,e,a);if(r.name==="TITLE"&&typeof i=="string"){let n=i.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1)}return i}runCustomConverter(r,e,a){if(r.name==="ABNF_STRING")return e.slice(1,-1)}},C={parser:{TokenBuilder:t(()=>new b,"TokenBuilder"),ValueConverter:t(()=>new A,"ValueConverter")}};function R(r=u){let e=o(l(r),c),a=o(d({shared:e}),f,C);return e.ServiceRegistry.register(a),{shared:e,RailroadAbnf:a}}t(R,"createRailroadAbnfServices");export{C as a,R as b};
2
+ //# sourceMappingURL=chunk-4KJ2U3VQ.js.map
@@ -1,3 +1,3 @@
1
- import{a as o,b as c,c as l,d as i,e as u,g as v,s as g,w as m,y as h}from"./chunk-QNEZP2TE.js";import{d}from"./chunk-R7TFKRNM.js";d();var f=class extends h{static{o(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},p=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
1
+ import{a as o,b as c,c as l,d as i,e as u,g as v,s as g,w as m,y as h}from"./chunk-WL4ZMLPV.js";import{d}from"./chunk-SOAWGUAD.js";d();var f=class extends h{static{o(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},p=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
2
2
  `;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=n}return r},"decodeEscapedString"),C=class extends m{static{o(this,"RailroadPegValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return p(n)}return t}runCustomConverter(a,e,r){if(a.name==="PEG_STRING")return p(e)}},R={parser:{TokenBuilder:o(()=>new f,"TokenBuilder"),ValueConverter:o(()=>new C,"ValueConverter")}};function P(a=u){let e=i(l(a),v),r=i(c({shared:e}),g,R);return e.ServiceRegistry.register(r),{shared:e,RailroadPeg:r}}o(P,"createRailroadPegServices");export{R as a,P as b};
3
- //# sourceMappingURL=chunk-OXLTOJNY.js.map
3
+ //# sourceMappingURL=chunk-4ZUFUR3U.js.map
@@ -1,3 +1,3 @@
1
- import{a as o,b as c,c as l,d as i,e as u,g as f,q as E,w as m,y as v}from"./chunk-QNEZP2TE.js";import{d}from"./chunk-R7TFKRNM.js";d();var h=class extends v{static{o(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},b=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
1
+ import{a as o,b as c,c as l,d as i,e as u,g as f,q as E,w as m,y as v}from"./chunk-WL4ZMLPV.js";import{d}from"./chunk-SOAWGUAD.js";d();var h=class extends v{static{o(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},b=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let s=e[t];switch(s){case"n":r+=`
2
2
  `;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=n}return r},"decodeEscapedString"),C=class extends m{static{o(this,"RailroadEbnfValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return b(n)}return t}runCustomConverter(a,e,r){if(a.name==="EBNF_STRING")return b(e);if(a.name==="EBNF_SPECIAL_SEQUENCE")return e.slice(1,-1).trim()}},R={parser:{TokenBuilder:o(()=>new h,"TokenBuilder"),ValueConverter:o(()=>new C,"ValueConverter")}};function S(a=u){let e=i(l(a),f),r=i(c({shared:e}),E,R);return e.ServiceRegistry.register(r),{shared:e,RailroadEbnf:r}}o(S,"createRailroadEbnfServices");export{R as a,S as b};
3
- //# sourceMappingURL=chunk-46RPN6IE.js.map
3
+ //# sourceMappingURL=chunk-63W35XXT.js.map
@@ -1,2 +1,2 @@
1
- import{a as o,b as s,c as l,d as i,e as d,g as m,t as c,w as p,y as T}from"./chunk-QNEZP2TE.js";import{d as n}from"./chunk-R7TFKRNM.js";n();var u=class extends T{static{o(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},v=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,g=class extends p{static{o(this,"TreemapValueConverter")}runCustomConverter(r,e,t){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR")return e.substring(1,e.length-1);if(r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=v.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}};function f(r){let e=r.validation.TreemapValidator,t=r.validation.ValidationRegistry;if(t){let a={Treemap:e.checkSingleRoot.bind(e)};t.register(a,e)}}o(f,"registerValidationChecks");var h=class{static{o(this,"TreemapValidator")}checkSingleRoot(r,e){let t;for(let a of r.TreemapRows)a.item&&(t===void 0&&a.indent===void 0?t=0:a.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):t!==void 0&&t>=parseInt(a.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},C={parser:{TokenBuilder:o(()=>new u,"TokenBuilder"),ValueConverter:o(()=>new g,"ValueConverter")},validation:{TreemapValidator:o(()=>new h,"TreemapValidator")}};function V(r=d){let e=i(l(r),m),t=i(s({shared:e}),c,C);return e.ServiceRegistry.register(t),f(t),{shared:e,Treemap:t}}o(V,"createTreemapServices");export{C as a,V as b};
2
- //# sourceMappingURL=chunk-LSVIQRSY.js.map
1
+ import{a as o,b as s,c as l,d as i,e as d,g as m,t as c,w as p,y as T}from"./chunk-WL4ZMLPV.js";import{d as n}from"./chunk-SOAWGUAD.js";n();var u=class extends T{static{o(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},v=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,g=class extends p{static{o(this,"TreemapValueConverter")}runCustomConverter(r,e,t){if(r.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(r.name==="SEPARATOR")return e.substring(1,e.length-1);if(r.name==="STRING2")return e.substring(1,e.length-1);if(r.name==="INDENTATION")return e.length;if(r.name==="ClassDef"){if(typeof e!="string")return e;let a=v.exec(e);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}};function f(r){let e=r.validation.TreemapValidator,t=r.validation.ValidationRegistry;if(t){let a={Treemap:e.checkSingleRoot.bind(e)};t.register(a,e)}}o(f,"registerValidationChecks");var h=class{static{o(this,"TreemapValidator")}checkSingleRoot(r,e){let t;for(let a of r.TreemapRows)a.item&&(t===void 0&&a.indent===void 0?t=0:a.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):t!==void 0&&t>=parseInt(a.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},C={parser:{TokenBuilder:o(()=>new u,"TokenBuilder"),ValueConverter:o(()=>new g,"ValueConverter")},validation:{TreemapValidator:o(()=>new h,"TreemapValidator")}};function V(r=d){let e=i(l(r),m),t=i(s({shared:e}),c,C);return e.ServiceRegistry.register(t),f(t),{shared:e,Treemap:t}}o(V,"createTreemapServices");export{C as a,V as b};
2
+ //# sourceMappingURL=chunk-6YVFH4BZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as r,b as l,c,d as a,e as v,g as u,j as E,x as m,y as S}from"./chunk-QNEZP2TE.js";import{d as s}from"./chunk-R7TFKRNM.js";s();var k=class extends S{static{r(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},y=new Set(["cmd","command"]),h=new Set(["evt","event"]),d=new Set(["rmo","readmodel"]),M=new Set(["pcr","processor"]),T=new Set(["ui"]);function g(e){let t=e.validation.EventModelingValidator,o=e.validation.ValidationRegistry;if(o){let i={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};o.register(i,t)}}r(g,"registerValidationChecks");var C=class{static{r(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(y.has(e.modelEntityType)?this.validateSources(e,new Set([...T,...M]),"command","ui or processor",t):h.has(e.modelEntityType)?this.validateSources(e,y,"event","command",t):d.has(e.modelEntityType)?this.validateSources(e,h,"read model","event",t):M.has(e.modelEntityType)?this.validateSources(e,d,"processor","read model",t):T.has(e.modelEntityType)&&this.validateSources(e,d,"ui","read model",t))}validateSources(e,t,o,i,p){for(let V of e.sourceFrames){let n=V.ref;n!==void 0&&!t.has(n.modelEntityType)&&p("error",`A ${o} can only receive input from a ${i}, not from '${n.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},w={parser:{TokenBuilder:r(()=>new k,"TokenBuilder"),ValueConverter:r(()=>new m,"ValueConverter")},validation:{EventModelingValidator:r(()=>new C,"EventModelingValidator")}};function F(e=v){let t=a(c(e),u),o=a(l({shared:t}),E,w);return t.ServiceRegistry.register(o),g(o),{shared:t,EventModel:o}}r(F,"createEventModelingServices");export{w as a,F as b};
2
- //# sourceMappingURL=chunk-6VRLULJH.js.map
1
+ import{a as r,b as l,c,d as a,e as v,g as u,j as E,x as m,y as S}from"./chunk-WL4ZMLPV.js";import{d as s}from"./chunk-SOAWGUAD.js";s();var k=class extends S{static{r(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},y=new Set(["cmd","command"]),h=new Set(["evt","event"]),d=new Set(["rmo","readmodel"]),M=new Set(["pcr","processor"]),T=new Set(["ui"]);function g(e){let t=e.validation.EventModelingValidator,o=e.validation.ValidationRegistry;if(o){let i={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};o.register(i,t)}}r(g,"registerValidationChecks");var C=class{static{r(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(y.has(e.modelEntityType)?this.validateSources(e,new Set([...T,...M]),"command","ui or processor",t):h.has(e.modelEntityType)?this.validateSources(e,y,"event","command",t):d.has(e.modelEntityType)?this.validateSources(e,h,"read model","event",t):M.has(e.modelEntityType)?this.validateSources(e,d,"processor","read model",t):T.has(e.modelEntityType)&&this.validateSources(e,d,"ui","read model",t))}validateSources(e,t,o,i,p){for(let V of e.sourceFrames){let n=V.ref;n!==void 0&&!t.has(n.modelEntityType)&&p("error",`A ${o} can only receive input from a ${i}, not from '${n.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},w={parser:{TokenBuilder:r(()=>new k,"TokenBuilder"),ValueConverter:r(()=>new m,"ValueConverter")},validation:{EventModelingValidator:r(()=>new C,"EventModelingValidator")}};function F(e=v){let t=a(c(e),u),o=a(l({shared:t}),E,w);return t.ServiceRegistry.register(o),g(o),{shared:t,EventModel:o}}r(F,"createEventModelingServices");export{w as a,F as b};
2
+ //# sourceMappingURL=chunk-7PUK2GON.js.map
@@ -1,2 +1,2 @@
1
- import{C}from"./chunk-5KNOHX5X.js";import{a as A,b as _}from"./chunk-4IPDIKAU.js";import{b as L,c as w,d as O,e as D,f as S,h as F,i as j}from"./chunk-GQPX4EIC.js";import{a as X,b as G,d as $,e as N}from"./chunk-BUZPUGIT.js";import{a as M}from"./chunk-HNYXDXPN.js";import{p as b}from"./chunk-LHNPPNB7.js";import{_ as B,u as T}from"./chunk-6FQEBIA3.js";import{b as l}from"./chunk-L34PKG4P.js";import{a as f}from"./chunk-LDXBIOBF.js";import{d as R}from"./chunk-R7TFKRNM.js";R();function z(e,{edgePathsClass:n="edges edgePaths"}={}){let t=e.insert("g").attr("class","root"),s=t.insert("g").attr("class","clusters"),r=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),a=t.insert("g").attr("class","nodes");return{clusters:s,edgePaths:r,edgeLabels:i,nodes:a,rootGroups:t}}f(z,"createLayoutElementGroups");async function J(e,n){if(n.label){let{shapeSvg:t,bbox:s}=await M(e,n);n.labelBBox={width:s.width,height:s.height},t.remove()}else n.labelBBox={width:0,height:0}}f(J,"measureGroupLabel");async function W(e,n,t){let s=await G(e,n,t),r=s.node()?.getBBox()??{width:0,height:0};return n.width=r.width,n.height=r.height,s}f(W,"insertMeasuredNode");async function q(e,n){let t=new C({multigraph:!0,compound:!0}),s=[...n.edges],r=B(),i=z(e),{edgeLabels:a,nodes:u}=i,o=new Map,g=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup)g&&await J(u,d),t.setNode(d.id,{...d});else{if(g){let y=await W(u,d,{config:r,dir:d.dir});o.set(d.id,y)}t.setNode(d.id,{...d})}}));for(let d of s)g&&D(d)&&await S(a,d),t.setEdge(d.start,d.end,{...d},d.id),n.edges.some(v=>v.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-DZI5JWEV.js");d(e,n)}return{graph:t,groups:i,nodeElements:o}}f(q,"createGraphWithElements");var c=new Map,m=new Map,K=new Map,ue=f(()=>{m.clear(),K.clear(),c.clear()},"clear"),p=f((e,n)=>{let t=m.get(n)||[];return l.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),de=f((e,n)=>{let t=m.get(n)||[];return l.info("Descendants of ",n," is ",t),l.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||p(e.v,n)||p(e.w,n)||t.includes(e.w):(l.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),Q=f((e,n,t,s)=>{l.debug("Copying children of ",e,"root",s,"data",n.node(e),s);let r=n.children(e)||[];e!==s&&r.push(e),l.debug("Copying (nodes) clusterId",e,"nodes",r),r.forEach(i=>{if(n.children(i).length>0)Q(i,n,t,s);else{let a=n.node(i);l.info("cp ",i," to ",s," with parent ",e),t.setNode(i,a),s!==n.parent(i)&&(l.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==s&&i!==e?(l.debug("Setting parent",i,e),t.setParent(i,e)):(l.info("In copy ",e,"root",s,"data",n.node(e),s),l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==s,"node!==clusterId",i!==e));let u=n.edges(i);l.debug("Copying Edges",u),u.forEach(o=>{l.info("Edge",o);let g=n.edge(o.v,o.w,o.name);l.info("Edge data",g,s);try{de(o,s)?(l.info("Copying as ",o.v,o.w,g,o.name),t.setEdge(o.v,o.w,g,o.name),l.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):l.info("Skipping copy of edge ",o.v,"-->",o.w," rootId: ",s," clusterId:",e)}catch(d){l.error(d)}})}l.debug("Removing node",i),n.removeNode(i)})},"copy"),U=f((e,n)=>{let t=n.children(e),s=[...t];for(let r of t)K.set(r,e),s=[...s,...U(r,n)];return s},"extractDescendants"),ge=f((e,n,t)=>{let s=e.edges().filter(o=>o.v===n||o.w===n),r=e.edges().filter(o=>o.v===t||o.w===t),i=s.map(o=>({v:o.v===n?t:o.v,w:o.w===n?n:o.w})),a=r.map(o=>({v:o.v,w:o.w}));return i.filter(o=>a.some(g=>o.v===g.v&&o.w===g.w))},"findCommonEdges"),E=f((e,n,t)=>{let s=n.children(e);if(l.trace("Searching children of id ",e,s),s.length<1)return e;let r;for(let i of s){let a=E(i,n,t),u=ge(n,t,a);if(a)if(u.length>0)r=a;else return a}return r},"findNonClusterChild"),H=f(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),Le=f((e,n)=>{if(!e||n>10){l.debug("Opting out, no graph ");return}else l.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(l.debug("Cluster identified",t," Replacement id in edges: ",E(t,e,t)),m.set(t,U(t,e)),c.set(t,{id:E(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let s=e.children(t),r=e.edges();s.length>0?(l.debug("Cluster identified",t,m),r.forEach(i=>{let a=p(i.v,t),u=p(i.w,t);a^u&&(l.debug("Edge: ",i," leaves cluster ",t),l.debug("Descendants of XXX ",t,": ",m.get(t)),c.get(t).externalConnections=!0)})):l.debug("Not a cluster ",t,m)});for(let t of c.keys()){let s=c.get(t).id,r=e.parent(s);r!==t&&c.has(r)&&!c.get(r).externalConnections&&(c.get(t).id=r);let i=e.edges().some(a=>a.v===t);if(s&&c.get(t)?.externalConnections&&i&&Z(e,s,t)){let a=me(e,t,e.parent(s));a&&(c.get(t).id=a)}}e.edges().forEach(function(t){let s=e.edge(t);l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(l.debug("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c.get(t.v)," --- ",c.get(t.w)),c.get(t.v)||c.get(t.w)){if(l.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),r=H(t.v),i=H(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let a=e.parent(r);c.get(a).externalConnections=!0,s.fromCluster=t.v}if(i!==t.w){let a=e.parent(i);c.get(a).externalConnections=!0,s.toCluster=t.w}l.debug("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,s,t.name)}}),V(e,0),l.trace(c)},"adjustClustersAndEdges"),V=f((e,n)=>{if(n>10){l.error("Bailing out");return}let t=e.nodes(),s=!1;for(let r of t){let i=e.children(r);s=s||i.length>0}if(!s){l.debug("Done, no node has children",e.nodes());return}l.debug("Nodes = ",t,n);for(let r of t)if(l.debug("Extracting node",r,c,c.has(r)&&!c.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),!c.has(r))l.debug("Not a cluster",r,n);else if(!c.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){l.debug("Cluster without external connections, without a parent and with children",r,n);let a=e.graph().rankdir==="TB"?"LR":"TB";c.get(r)?.clusterData?.dir&&(a=c.get(r).clusterData.dir,l.debug("Fixing dir",c.get(r).clusterData.dir,a));let u=new C({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Q(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c.get(r).clusterData,label:c.get(r).label,graph:u})}else l.debug("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),l.debug(c);t=e.nodes(),l.debug("New list of nodes",t);for(let r of t){let i=e.node(r);l.debug(" Now next level",r,i),i?.clusterNode&&V(i.graph,n+1)}},"extractor"),Y=f((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(s=>{let r=e.children(s),i=Y(e,r);t=[...t,...i]}),t},"sorter"),De=f(e=>Y(e,e.children()),"sortNodesByHierarchy"),Z=f((e,n,t)=>{let s=e.parent(n);for(;s&&s!==t;){let r=c.get(s);if(r&&!r.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),me=f((e,n,t)=>{let s=e.children(n)??[];for(let r of s){if(r===t||p(r,t))continue;let i=E(r,e,n);if(i&&!Z(e,i,n))return i}return null},"findSafeAnchorNode");function be({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:s,afterPaint:r,paintOptions:i}){let a=n??ee;return f(async function(o,g,d,y){let v=g.select("g");(d?.insertMarkers??j)(v,o.markers,o.type,o.diagramId),I();let h={element:v,helpers:d,options:y};h.preparedLayout=await e?.(o,h);let ce=await a(o,h),k=await t(o,h),x={...h,measure:ce};s?await s(o,x,k):await te(o,x,i),await r?.(o,x,k)},"render")}f(be,"createCommonLayoutRenderer");function I(){$(),O(),_(),ue()}f(I,"clearLayoutRenderState");async function ee(e,{element:n}){return await q(n,e)}f(ee,"defaultMeasureLayout");async function te(e,n,t={}){let{measure:s}=n,{groups:r}=s;for(let a of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(a,n)||await ne(r,a,n,t);let i=se(e.nodes);for(let a of e.edges)ie(a,t)||await oe(r,a,i,e,t,n)}f(te,"paintLayoutData");async function ne(e,n,t,s){n.clusterNode?N(n):re(n,t,s)?await A(e.clusters,n):N(n)}f(ne,"paintLayoutNode");function re(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}f(re,"shouldPaintAsCluster");function se(e){let n=new Map;for(let t of e)t?.id&&n.set(t.id,t);return n}f(se,"buildNodeLookup");function ie(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}f(ie,"shouldSkipPaintEdge");async function oe(e,n,t,s,r,i){let a=F(e.edgePaths,{...n},r.clusterDb??new Map,s.type,P(n.start,n,t,i,r),P(n.end,n,t,i,r),s.diagramId,ae(n,r));D(n)&&(L.has(n.id)||await S(e.edgeLabels,n),le(n,a))}f(oe,"paintLayoutEdge");function P(e,n,t,s,r){return r.getEdgeNode?.(e,n,s)??(e?t.get(e)??{}:{})}f(P,"getRenderedNode");function ae(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}f(ae,"shouldSkipIntersect");function le(e,n){let t=n?.updatedPath??n?.originalPath,s=T(),{subGraphTitleTotalMargin:r}=X({flowchart:s.flowchart??{}});if(e.label){let i=L.get(e.id),a=e.x,u=e.y;if(t){let o=b.calcLabelPosition(t);l.debug("Moving label "+e.label+" from (",a,",",u,") to (",o.x,",",o.y,") abc88"),n?.updatedPath&&(a=o.x,u=o.y)}i.attr("transform",`translate(${a}, ${u+r/2})`)}if(e?.startLabelLeft){let i=w.get(e.id).startLeft,a=e?.x,u=e?.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.startLabelRight){let i=w.get(e.id).startRight,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.endLabelLeft){let i=w.get(e.id).endLeft,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.endLabelRight){let i=w.get(e.id).endRight,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}}f(le,"positionRenderedEdgeLabel");export{z as a,W as b,c,E as d,Le as e,De as f,be as g,I as h,ee as i,te as j};
2
- //# sourceMappingURL=chunk-TPXX77KB.js.map
1
+ import{C}from"./chunk-I6RMTJPN.js";import{a as A,b as _}from"./chunk-ZXMMITLE.js";import{b as L,c as w,d as O,e as D,f as S,h as F,i as j}from"./chunk-3EZ2OKHV.js";import{a as X,b as G,d as $,e as N}from"./chunk-XOZZFIHV.js";import{a as M}from"./chunk-NOVL2262.js";import{p as b}from"./chunk-CFMSYLIK.js";import{_ as B,u as T}from"./chunk-SGL7WI35.js";import{b as l}from"./chunk-CXXG5KL5.js";import{a as f}from"./chunk-ITN3D7RJ.js";import{d as R}from"./chunk-SOAWGUAD.js";R();function z(e,{edgePathsClass:n="edges edgePaths"}={}){let t=e.insert("g").attr("class","root"),s=t.insert("g").attr("class","clusters"),r=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),a=t.insert("g").attr("class","nodes");return{clusters:s,edgePaths:r,edgeLabels:i,nodes:a,rootGroups:t}}f(z,"createLayoutElementGroups");async function J(e,n){if(n.label){let{shapeSvg:t,bbox:s}=await M(e,n);n.labelBBox={width:s.width,height:s.height},t.remove()}else n.labelBBox={width:0,height:0}}f(J,"measureGroupLabel");async function W(e,n,t){let s=await G(e,n,t),r=s.node()?.getBBox()??{width:0,height:0};return n.width=r.width,n.height=r.height,s}f(W,"insertMeasuredNode");async function q(e,n){let t=new C({multigraph:!0,compound:!0}),s=[...n.edges],r=B(),i=z(e),{edgeLabels:a,nodes:u}=i,o=new Map,g=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup)g&&await J(u,d),t.setNode(d.id,{...d});else{if(g){let y=await W(u,d,{config:r,dir:d.dir});o.set(d.id,y)}t.setNode(d.id,{...d})}}));for(let d of s)g&&D(d)&&await S(a,d),t.setEdge(d.start,d.end,{...d},d.id),n.edges.some(v=>v.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:d}=await import("./sizeCapture-INFHLROL-Y6H3VQLE.js");d(e,n)}return{graph:t,groups:i,nodeElements:o}}f(q,"createGraphWithElements");var c=new Map,m=new Map,K=new Map,ue=f(()=>{m.clear(),K.clear(),c.clear()},"clear"),p=f((e,n)=>{let t=m.get(n)||[];return l.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),de=f((e,n)=>{let t=m.get(n)||[];return l.info("Descendants of ",n," is ",t),l.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||p(e.v,n)||p(e.w,n)||t.includes(e.w):(l.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),Q=f((e,n,t,s)=>{l.debug("Copying children of ",e,"root",s,"data",n.node(e),s);let r=n.children(e)||[];e!==s&&r.push(e),l.debug("Copying (nodes) clusterId",e,"nodes",r),r.forEach(i=>{if(n.children(i).length>0)Q(i,n,t,s);else{let a=n.node(i);l.info("cp ",i," to ",s," with parent ",e),t.setNode(i,a),s!==n.parent(i)&&(l.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==s&&i!==e?(l.debug("Setting parent",i,e),t.setParent(i,e)):(l.info("In copy ",e,"root",s,"data",n.node(e),s),l.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==s,"node!==clusterId",i!==e));let u=n.edges(i);l.debug("Copying Edges",u),u.forEach(o=>{l.info("Edge",o);let g=n.edge(o.v,o.w,o.name);l.info("Edge data",g,s);try{de(o,s)?(l.info("Copying as ",o.v,o.w,g,o.name),t.setEdge(o.v,o.w,g,o.name),l.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):l.info("Skipping copy of edge ",o.v,"-->",o.w," rootId: ",s," clusterId:",e)}catch(d){l.error(d)}})}l.debug("Removing node",i),n.removeNode(i)})},"copy"),U=f((e,n)=>{let t=n.children(e),s=[...t];for(let r of t)K.set(r,e),s=[...s,...U(r,n)];return s},"extractDescendants"),ge=f((e,n,t)=>{let s=e.edges().filter(o=>o.v===n||o.w===n),r=e.edges().filter(o=>o.v===t||o.w===t),i=s.map(o=>({v:o.v===n?t:o.v,w:o.w===n?n:o.w})),a=r.map(o=>({v:o.v,w:o.w}));return i.filter(o=>a.some(g=>o.v===g.v&&o.w===g.w))},"findCommonEdges"),E=f((e,n,t)=>{let s=n.children(e);if(l.trace("Searching children of id ",e,s),s.length<1)return e;let r;for(let i of s){let a=E(i,n,t),u=ge(n,t,a);if(a)if(u.length>0)r=a;else return a}return r},"findNonClusterChild"),H=f(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),Le=f((e,n)=>{if(!e||n>10){l.debug("Opting out, no graph ");return}else l.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(l.debug("Cluster identified",t," Replacement id in edges: ",E(t,e,t)),m.set(t,U(t,e)),c.set(t,{id:E(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let s=e.children(t),r=e.edges();s.length>0?(l.debug("Cluster identified",t,m),r.forEach(i=>{let a=p(i.v,t),u=p(i.w,t);a^u&&(l.debug("Edge: ",i," leaves cluster ",t),l.debug("Descendants of XXX ",t,": ",m.get(t)),c.get(t).externalConnections=!0)})):l.debug("Not a cluster ",t,m)});for(let t of c.keys()){let s=c.get(t).id,r=e.parent(s);r!==t&&c.has(r)&&!c.get(r).externalConnections&&(c.get(t).id=r);let i=e.edges().some(a=>a.v===t);if(s&&c.get(t)?.externalConnections&&i&&Z(e,s,t)){let a=me(e,t,e.parent(s));a&&(c.get(t).id=a)}}e.edges().forEach(function(t){let s=e.edge(t);l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(l.debug("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c.get(t.v)," --- ",c.get(t.w)),c.get(t.v)||c.get(t.w)){if(l.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),r=H(t.v),i=H(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let a=e.parent(r);c.get(a).externalConnections=!0,s.fromCluster=t.v}if(i!==t.w){let a=e.parent(i);c.get(a).externalConnections=!0,s.toCluster=t.w}l.debug("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,s,t.name)}}),V(e,0),l.trace(c)},"adjustClustersAndEdges"),V=f((e,n)=>{if(n>10){l.error("Bailing out");return}let t=e.nodes(),s=!1;for(let r of t){let i=e.children(r);s=s||i.length>0}if(!s){l.debug("Done, no node has children",e.nodes());return}l.debug("Nodes = ",t,n);for(let r of t)if(l.debug("Extracting node",r,c,c.has(r)&&!c.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),!c.has(r))l.debug("Not a cluster",r,n);else if(!c.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){l.debug("Cluster without external connections, without a parent and with children",r,n);let a=e.graph().rankdir==="TB"?"LR":"TB";c.get(r)?.clusterData?.dir&&(a=c.get(r).clusterData.dir,l.debug("Fixing dir",c.get(r).clusterData.dir,a));let u=new C({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Q(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c.get(r).clusterData,label:c.get(r).label,graph:u})}else l.debug("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),l.debug(c);t=e.nodes(),l.debug("New list of nodes",t);for(let r of t){let i=e.node(r);l.debug(" Now next level",r,i),i?.clusterNode&&V(i.graph,n+1)}},"extractor"),Y=f((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(s=>{let r=e.children(s),i=Y(e,r);t=[...t,...i]}),t},"sorter"),De=f(e=>Y(e,e.children()),"sortNodesByHierarchy"),Z=f((e,n,t)=>{let s=e.parent(n);for(;s&&s!==t;){let r=c.get(s);if(r&&!r.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),me=f((e,n,t)=>{let s=e.children(n)??[];for(let r of s){if(r===t||p(r,t))continue;let i=E(r,e,n);if(i&&!Z(e,i,n))return i}return null},"findSafeAnchorNode");function be({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:s,afterPaint:r,paintOptions:i}){let a=n??ee;return f(async function(o,g,d,y){let v=g.select("g");(d?.insertMarkers??j)(v,o.markers,o.type,o.diagramId),I();let h={element:v,helpers:d,options:y};h.preparedLayout=await e?.(o,h);let ce=await a(o,h),k=await t(o,h),x={...h,measure:ce};s?await s(o,x,k):await te(o,x,i),await r?.(o,x,k)},"render")}f(be,"createCommonLayoutRenderer");function I(){$(),O(),_(),ue()}f(I,"clearLayoutRenderState");async function ee(e,{element:n}){return await q(n,e)}f(ee,"defaultMeasureLayout");async function te(e,n,t={}){let{measure:s}=n,{groups:r}=s;for(let a of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(a,n)||await ne(r,a,n,t);let i=se(e.nodes);for(let a of e.edges)ie(a,t)||await oe(r,a,i,e,t,n)}f(te,"paintLayoutData");async function ne(e,n,t,s){n.clusterNode?N(n):re(n,t,s)?await A(e.clusters,n):N(n)}f(ne,"paintLayoutNode");function re(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}f(re,"shouldPaintAsCluster");function se(e){let n=new Map;for(let t of e)t?.id&&n.set(t.id,t);return n}f(se,"buildNodeLookup");function ie(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}f(ie,"shouldSkipPaintEdge");async function oe(e,n,t,s,r,i){let a=F(e.edgePaths,{...n},r.clusterDb??new Map,s.type,P(n.start,n,t,i,r),P(n.end,n,t,i,r),s.diagramId,ae(n,r));D(n)&&(L.has(n.id)||await S(e.edgeLabels,n),le(n,a))}f(oe,"paintLayoutEdge");function P(e,n,t,s,r){return r.getEdgeNode?.(e,n,s)??(e?t.get(e)??{}:{})}f(P,"getRenderedNode");function ae(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}f(ae,"shouldSkipIntersect");function le(e,n){let t=n?.updatedPath??n?.originalPath,s=T(),{subGraphTitleTotalMargin:r}=X({flowchart:s.flowchart??{}});if(e.label){let i=L.get(e.id),a=e.x,u=e.y;if(t){let o=b.calcLabelPosition(t);l.debug("Moving label "+e.label+" from (",a,",",u,") to (",o.x,",",o.y,") abc88"),n?.updatedPath&&(a=o.x,u=o.y)}i.attr("transform",`translate(${a}, ${u+r/2})`)}if(e?.startLabelLeft){let i=w.get(e.id).startLeft,a=e?.x,u=e?.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.startLabelRight){let i=w.get(e.id).startRight,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.endLabelLeft){let i=w.get(e.id).endLeft,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}if(e.endLabelRight){let i=w.get(e.id).endRight,a=e.x,u=e.y;if(t){let o=b.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",t);a=o.x,u=o.y}i.attr("transform",`translate(${a}, ${u})`)}}f(le,"positionRenderedEdgeLabel");export{z as a,W as b,c,E as d,Le as e,De as f,be as g,I as h,ee as i,te as j};
2
+ //# sourceMappingURL=chunk-7Q4TXKAS.js.map