@leanspec/ui 0.2.22 → 0.2.23

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 (108) hide show
  1. package/dist/assets/_baseUniq-C4bkXOdh-BJ3-SRjw.js +1 -0
  2. package/dist/assets/{_baseUniq-iT192ZJn.js → _baseUniq-DuAmhUI0.js} +1 -1
  3. package/dist/assets/{arc-bSbgZKu2-DL3rNhb4.js → arc-DFohBtPV-Cpx6wOGp.js} +1 -1
  4. package/dist/assets/{arc-BpF2CtTd.js → arc-DlFrPohT.js} +1 -1
  5. package/dist/assets/{architectureDiagram-VXUJARFQ-RJJR00DR.js → architectureDiagram-VXUJARFQ-DieXp-qW.js} +1 -1
  6. package/dist/assets/{architectureDiagram-VXUJARFQ-B9csKaKv-CjjNwF-J.js → architectureDiagram-VXUJARFQ-_R9_zrc5-D59ZHzYq.js} +3 -3
  7. package/dist/assets/{blockDiagram-VD42YOAC-DrRsdznF-BABvqVBT.js → blockDiagram-VD42YOAC-CiyHYW6w-D8Afi1Q2.js} +5 -5
  8. package/dist/assets/{blockDiagram-VD42YOAC-1uTfdDe0.js → blockDiagram-VD42YOAC-Cr1Ymz-c.js} +1 -1
  9. package/dist/assets/{c4Diagram-YG6GDRKO-Di2rkJ8i-Ds0QfElR.js → c4Diagram-YG6GDRKO-D9NuNc3r-Cre6pw7Q.js} +1 -1
  10. package/dist/assets/{c4Diagram-YG6GDRKO-f40n5_vc.js → c4Diagram-YG6GDRKO-w76CB7zN.js} +1 -1
  11. package/dist/assets/channel-C9MJ1fN1.js +1 -0
  12. package/dist/assets/channel-mhjF1lKa-DRGKdmbU.js +1 -0
  13. package/dist/assets/{chunk-4BX2VUAB-BWm6jvkB.js → chunk-4BX2VUAB-C4VXUg_9.js} +1 -1
  14. package/dist/assets/{chunk-4BX2VUAB-Dkr-Egsj-hwESrSLd.js → chunk-4BX2VUAB-D4Zhvat9-CJ2cQFgO.js} +1 -1
  15. package/dist/assets/{chunk-55IACEB6-D_uwi6CC-CwcdTnFf.js → chunk-55IACEB6-C_MzxCLx-DeYSk-O4.js} +1 -1
  16. package/dist/assets/{chunk-55IACEB6-SXD_npDw.js → chunk-55IACEB6-DUEMD_vX.js} +1 -1
  17. package/dist/assets/{chunk-B4BG7PRW-UGjCd_Gn.js → chunk-B4BG7PRW-DlwRLtQb.js} +1 -1
  18. package/dist/assets/{chunk-B4BG7PRW-BipBIVhj-1FtWONL8.js → chunk-B4BG7PRW-Q8H7OQ1o-CGrle4fB.js} +1 -1
  19. package/dist/assets/{chunk-DI55MBZ5-BQAFhPjX.js → chunk-DI55MBZ5-DqvoeGRX.js} +1 -1
  20. package/dist/assets/{chunk-DI55MBZ5-8tWOlvAD-Cye13dPz.js → chunk-DI55MBZ5-qwPYmgAw-BDnXruql.js} +5 -5
  21. package/dist/assets/{chunk-FMBD7UC4-CLc8_72--CGehZjII.js → chunk-FMBD7UC4-DhXvRHU3-Ck_6Dma3.js} +1 -1
  22. package/dist/assets/{chunk-FMBD7UC4-GQVp2u3C.js → chunk-FMBD7UC4-eFjHw5gB.js} +1 -1
  23. package/dist/assets/{chunk-QN33PNHL-QKH9jByz-BVKajMNG.js → chunk-QN33PNHL-CLwAcvO2-CC8RVa2u.js} +1 -1
  24. package/dist/assets/{chunk-QN33PNHL-xEzemp3c.js → chunk-QN33PNHL-CXXtNr0q.js} +1 -1
  25. package/dist/assets/{chunk-QZHKN3VN-BPpgPA2g-DfaPwKB_.js → chunk-QZHKN3VN-3tLb49S_-7wBVjYM3.js} +1 -1
  26. package/dist/assets/{chunk-QZHKN3VN-DmaRauNH.js → chunk-QZHKN3VN-HkJTS77T.js} +1 -1
  27. package/dist/assets/{chunk-TZMSLE5B-Bx7Kyzw7.js → chunk-TZMSLE5B-CC9IwurK.js} +1 -1
  28. package/dist/assets/{chunk-TZMSLE5B-Coq49FaX-CdOY_0Y9.js → chunk-TZMSLE5B-DfaYobmr-uCvXwJUe.js} +1 -1
  29. package/dist/assets/classDiagram-2ON5EDUG-Dl5mwgLk.js +1 -0
  30. package/dist/assets/classDiagram-2ON5EDUG-xB0RyXwt-B4jZvvsf.js +1 -0
  31. package/dist/assets/classDiagram-v2-WZHVMYZB-Dl5mwgLk.js +1 -0
  32. package/dist/assets/classDiagram-v2-WZHVMYZB-xB0RyXwt-B4jZvvsf.js +1 -0
  33. package/dist/assets/clone-B-ElcgAC.js +1 -0
  34. package/dist/assets/clone-DqT6If4_-aVfgI0F6.js +1 -0
  35. package/dist/assets/{code-block-37QAKDTI-3zaK1Sok-DkWCKnjc.js → code-block-37QAKDTI-CWOOD74I-DcBaZRtr.js} +2 -2
  36. package/dist/assets/{cose-bilkent-S5V4N54A-OjaorTGT.js → cose-bilkent-S5V4N54A-BYenyErH.js} +1 -1
  37. package/dist/assets/{cose-bilkent-S5V4N54A-iUMgKFJZ-CcWe6Gov.js → cose-bilkent-S5V4N54A-DBS7wwrE-CwpmLGLG.js} +1 -1
  38. package/dist/assets/{dagre-6UL2VRFP-BLazRBE2.js → dagre-6UL2VRFP-DC4sfLGs.js} +1 -1
  39. package/dist/assets/dagre-6UL2VRFP-Lv6cE2gX-BtLPrZf0.js +4 -0
  40. package/dist/assets/{diagram-PSM6KHXK-DERIvROx-B9mGRCGq.js → diagram-PSM6KHXK-8QKT-Vki-CYrLTehq.js} +1 -1
  41. package/dist/assets/{diagram-PSM6KHXK-Cz_Zed26.js → diagram-PSM6KHXK-DSaG1dLc.js} +1 -1
  42. package/dist/assets/{diagram-QEK2KX5R-B6CdcylU-lSCL2dm4.js → diagram-QEK2KX5R-Bqh-tlSV-BSsdJ6p7.js} +2 -2
  43. package/dist/assets/{diagram-QEK2KX5R-BAMwQLy8.js → diagram-QEK2KX5R-z8D6ilji.js} +1 -1
  44. package/dist/assets/{diagram-S2PKOQOG-5f_4uCtF-CUC-ZBue.js → diagram-S2PKOQOG-Csj0p-s--BSyJI4Aq.js} +2 -2
  45. package/dist/assets/{diagram-S2PKOQOG-v5vZ9P70.js → diagram-S2PKOQOG-gFoeY1VL.js} +1 -1
  46. package/dist/assets/{erDiagram-Q2GNP2WA-DFCKi0mZ.js → erDiagram-Q2GNP2WA-oZvzX2B_.js} +1 -1
  47. package/dist/assets/{erDiagram-Q2GNP2WA-CnN7DF_N-yqb-l1CZ.js → erDiagram-Q2GNP2WA-sDpapMNP-BlW75l-5.js} +3 -3
  48. package/dist/assets/{flowDiagram-NV44I4VS-Dl3ZZj2W-C9K7yiSN.js → flowDiagram-NV44I4VS-CitCGiJE-2Yn6xqge.js} +5 -5
  49. package/dist/assets/{flowDiagram-NV44I4VS-3Rq7lbgS.js → flowDiagram-NV44I4VS-DNfZjFHv.js} +1 -1
  50. package/dist/assets/{ganttDiagram-JELNMOA3-D76DQdCK.js → ganttDiagram-JELNMOA3-CI7qwp_G.js} +1 -1
  51. package/dist/assets/{ganttDiagram-JELNMOA3-q87tSGGF-CKPOItTI.js → ganttDiagram-JELNMOA3-DAaUYzNs-CqERSUiR.js} +3 -3
  52. package/dist/assets/{gitGraphDiagram-NY62KEGX-Db2iqJeU.js → gitGraphDiagram-NY62KEGX-CTRy4vBb.js} +1 -1
  53. package/dist/assets/{gitGraphDiagram-NY62KEGX-NeHUXng4-DDlIETSy.js → gitGraphDiagram-NY62KEGX-lj732X3H-CLhZmLfE.js} +6 -6
  54. package/dist/assets/{graph-Da1z0n_J-yJ-tLMG7.js → graph-Bg_3T7Ud-8p9G4Jrq.js} +1 -1
  55. package/dist/assets/{graph-D9RB6DwV.js → graph-C_DQAJXv.js} +1 -1
  56. package/dist/assets/index-BA4_7VkX.css +1 -0
  57. package/dist/assets/{index-B7GqH6If.js → index-BzhKcNOt.js} +624 -618
  58. package/dist/assets/infoDiagram-WHAUD3N6-BbjOpAi3-DFq7Zumb.js +2 -0
  59. package/dist/assets/{infoDiagram-WHAUD3N6-CgNeND0m.js → infoDiagram-WHAUD3N6-BjgZuatx.js} +1 -1
  60. package/dist/assets/{journeyDiagram-XKPGCS4Q-BbXXFBC--Cb6ONhr6.js → journeyDiagram-XKPGCS4Q-Cx34P8cj-Cuc55qMS.js} +4 -4
  61. package/dist/assets/{journeyDiagram-XKPGCS4Q-D0meuzwF.js → journeyDiagram-XKPGCS4Q-JTQBV6RS.js} +1 -1
  62. package/dist/assets/{kanban-definition-3W4ZIXB7-ClCUbNCO-DyL1fJFZ.js → kanban-definition-3W4ZIXB7-BP3ykzKL-BccB0ADl.js} +9 -9
  63. package/dist/assets/{kanban-definition-3W4ZIXB7-BCx2MTD3.js → kanban-definition-3W4ZIXB7-CB7Cc0I4.js} +1 -1
  64. package/dist/assets/{layout-DFWNR-Y1.js → layout-BDWTKgn6.js} +1 -1
  65. package/dist/assets/{layout-BoJlbrAK-CAQ1YqzH.js → layout-Bft_7Aja-CYwoLCqB.js} +1 -1
  66. package/dist/assets/{linear-4rmylyIU-DexK5wO7.js → linear-BDIyMYXP-Va3gUrsu.js} +1 -1
  67. package/dist/assets/{min-CRMSN7nx.js → min-CzDI_uFs.js} +1 -1
  68. package/dist/assets/min-g4o2CnuX-D41MdeNm.js +1 -0
  69. package/dist/assets/{mindmap-definition-VGOIOE7T-BGABgSVt.js → mindmap-definition-VGOIOE7T-BFemN0Et.js} +1 -1
  70. package/dist/assets/{mindmap-definition-VGOIOE7T-BRNm-2aJ-DQQO6TMa.js → mindmap-definition-VGOIOE7T-CteUNe1z-BgC77XEX.js} +3 -3
  71. package/dist/assets/{pieDiagram-ADFJNKIX-BAPQcD4y.js → pieDiagram-ADFJNKIX-2fKAK3CV.js} +1 -1
  72. package/dist/assets/pieDiagram-ADFJNKIX-COS6mtim-2rnhimKu.js +30 -0
  73. package/dist/assets/{quadrantDiagram-AYHSOK5B-kNxQZTX1.js → quadrantDiagram-AYHSOK5B-Del1ofYi.js} +1 -1
  74. package/dist/assets/{quadrantDiagram-AYHSOK5B-CcsZBY3e-DjxqpMlH.js → quadrantDiagram-AYHSOK5B-DmRa7VCS-D5jPyfOD.js} +2 -2
  75. package/dist/assets/{requirementDiagram-UZGBJVZJ-CV5SUGj--Crvo94rv.js → requirementDiagram-UZGBJVZJ-CcQIz-20-DYIFGLWB.js} +2 -2
  76. package/dist/assets/{requirementDiagram-UZGBJVZJ-BZ08al2Y.js → requirementDiagram-UZGBJVZJ-aYICY3Ph.js} +1 -1
  77. package/dist/assets/{sankeyDiagram-TZEHDZUN-BQT0X4qe.js → sankeyDiagram-TZEHDZUN-CSxXWX7b.js} +1 -1
  78. package/dist/assets/{sankeyDiagram-TZEHDZUN-BFPvVGcz-DAajH7lE.js → sankeyDiagram-TZEHDZUN-CpcshR0Z-Ds6_Y4XZ.js} +5 -5
  79. package/dist/assets/{sequenceDiagram-WL72ISMW-CQ5u3b_o-B7RzlL6P.js → sequenceDiagram-WL72ISMW-B1iDbV8x-Ba6xj9am.js} +7 -7
  80. package/dist/assets/{sequenceDiagram-WL72ISMW-BcmegQjZ.js → sequenceDiagram-WL72ISMW-_zLrGWf3.js} +1 -1
  81. package/dist/assets/{stateDiagram-FKZM4ZOC-zOb-V3pD-D2k2TVkN.js → stateDiagram-FKZM4ZOC-DIutB6RS-BM8RqJKW.js} +1 -1
  82. package/dist/assets/{stateDiagram-FKZM4ZOC-C-u3YY-3.js → stateDiagram-FKZM4ZOC-DOd4P3H-.js} +1 -1
  83. package/dist/assets/stateDiagram-v2-4FDKWEC3-BKEaZomO-8zJq3ge5.js +1 -0
  84. package/dist/assets/stateDiagram-v2-4FDKWEC3-nRAFnllC.js +1 -0
  85. package/dist/assets/{timeline-definition-IT6M3QCI-Dx4HH0C5.js → timeline-definition-IT6M3QCI-BKxuM11p.js} +1 -1
  86. package/dist/assets/{timeline-definition-IT6M3QCI-B2T2QrC5-eoEFP1Po.js → timeline-definition-IT6M3QCI-D1yY4TSO-DoVTwDMg.js} +5 -5
  87. package/dist/assets/{treemap-KMMF4GRG-DfaADvmb.js → treemap-KMMF4GRG-ByJ02xk5.js} +1 -1
  88. package/dist/assets/{treemap-KMMF4GRG-wB3pBnFc-DQrUn2c6.js → treemap-KMMF4GRG-KtkxYt13-CZA1d7fY.js} +1 -1
  89. package/dist/assets/{xychartDiagram-PRI3JC2R-DusIzSwm.js → xychartDiagram-PRI3JC2R-CGA3Bi-e.js} +1 -1
  90. package/dist/assets/{xychartDiagram-PRI3JC2R-BSPghzKh-CYIgkUk9.js → xychartDiagram-PRI3JC2R-a_g9ptTp-BX4uGx-D.js} +3 -3
  91. package/dist/index.html +2 -2
  92. package/package.json +7 -11
  93. package/dist/assets/_baseUniq-D7Jo4wA--B2TRxPWE.js +0 -1
  94. package/dist/assets/channel-B6afjgOL.js +0 -1
  95. package/dist/assets/channel-CTeTHv-y-DAoPNf9o.js +0 -1
  96. package/dist/assets/classDiagram-2ON5EDUG-DDdP3lEc.js +0 -1
  97. package/dist/assets/classDiagram-2ON5EDUG-DYaKkEXb-BMs1bhMY.js +0 -1
  98. package/dist/assets/classDiagram-v2-WZHVMYZB-DDdP3lEc.js +0 -1
  99. package/dist/assets/classDiagram-v2-WZHVMYZB-DYaKkEXb-BMs1bhMY.js +0 -1
  100. package/dist/assets/clone-B4FGNCC9.js +0 -1
  101. package/dist/assets/clone-Ctm6tjrV-cgncjIrI.js +0 -1
  102. package/dist/assets/dagre-6UL2VRFP-CKc2IEbO-CPlhk_ig.js +0 -4
  103. package/dist/assets/index-Blg_AJgc.css +0 -1
  104. package/dist/assets/infoDiagram-WHAUD3N6-Cj-s-gtw-B2FbdsVb.js +0 -2
  105. package/dist/assets/min-C8aXS73f-D0DvW8t2.js +0 -1
  106. package/dist/assets/pieDiagram-ADFJNKIX-BVRqurYx-QWWibrkj.js +0 -30
  107. package/dist/assets/stateDiagram-v2-4FDKWEC3-CvvobAsa.js +0 -1
  108. package/dist/assets/stateDiagram-v2-4FDKWEC3-_Mzc1jVl-lAsEHEbp.js +0 -1
@@ -1,9 +1,9 @@
1
- import{l as le}from"./chunk-FMBD7UC4-CLc8_72--CGehZjII.js";import{H as g,aC as rt,a5 as I,ab as ce,z as m,au as de,aw as he,b as B,bn as ge,b8 as ue,bf as ye,bc as pe,bo as H,bp as Mt,k as be,an as Q,ah as xe,bq as fe,br as pt,ae as bt,bs as we}from"./index-B7GqH6If.js";import{a as me}from"./clone-Ctm6tjrV-cgncjIrI.js";import{X as Le}from"./graph-Da1z0n_J-yJ-tLMG7.js";import{t as Se}from"./channel-CTeTHv-y-DAoPNf9o.js";import"./_baseUniq-D7Jo4wA--B2TRxPWE.js";var xt=(function(){var e=g(function(v,c,p,w){for(p=p||{},w=v.length;w--;p[v[w]]=c);return p},"o"),t=[1,15],a=[1,7],i=[1,13],o=[1,14],r=[1,19],s=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],b=[1,23],f=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],S=[1,49],k={trace:g(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:g(function(v,c,p,w,E,d,_){var y=d.length-1;switch(E){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",d[y-1]),w.setHierarchy(d[y-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",d[y]),typeof d[y].length=="number"?this.$=d[y]:this.$=[d[y]];break;case 13:w.getLogger().debug("Rule: statement #2: ",d[y-1]),this.$=[d[y-1]].concat(d[y]);break;case 14:w.getLogger().debug("Rule: link: ",d[y],v),this.$={edgeTypeStr:d[y],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",d[y-3],d[y-1],d[y]),this.$={edgeTypeStr:d[y],label:d[y-1]};break;case 18:const A=parseInt(d[y]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",d[y-2],d[y-1],d[y]," typestr: ",d[y-1].edgeTypeStr);const q=w.edgeStrToEdgeData(d[y-1].edgeTypeStr);this.$=[{id:d[y-2].id,label:d[y-2].label,type:d[y-2].type,directions:d[y-2].directions},{id:d[y-2].id+"-"+d[y].id,start:d[y-2].id,end:d[y].id,label:d[y-1].label,type:"edge",directions:d[y].directions,arrowTypeEnd:q,arrowTypeStart:"arrow_open"},{id:d[y].id,label:d[y].label,type:w.typeStr2Type(d[y].typeStr),directions:d[y].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",d[y-1],d[y]),this.$={id:d[y-1].id,label:d[y-1].label,type:w.typeStr2Type(d[y-1].typeStr),directions:d[y-1].directions,widthInColumns:parseInt(d[y],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",d[y]),this.$={id:d[y].id,label:d[y].label,type:w.typeStr2Type(d[y].typeStr),directions:d[y].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",d[y]),this.$={type:"column-setting",columns:d[y]==="auto"?-1:parseInt(d[y])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",d[y-2],d[y-1]),w.generateId(),this.$={...d[y-2],type:"composite",children:d[y-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",d[y-2],d[y-1],d[y]);const j=w.generateId();this.$={id:j,type:"composite",label:"",children:d[y-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",d[y]),this.$={id:d[y]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",d[y-1],d[y]),this.$={id:d[y-1],label:d[y].label,typeStr:d[y].typeStr,directions:d[y].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",d[y]),this.$=[d[y]];break;case 32:w.getLogger().debug("Rule: dirList: ",d[y-1],d[y]),this.$=[d[y-1]].concat(d[y]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",d[y-2],d[y-1],d[y]),this.$={typeStr:d[y-2]+d[y],label:d[y-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",d[y-3],d[y-2]," #3:",d[y-1],d[y]),this.$={typeStr:d[y-3]+d[y],label:d[y-2],directions:d[y-1]};break;case 35:case 36:this.$={type:"classDef",id:d[y-1].trim(),css:d[y].trim()};break;case 37:this.$={type:"applyClass",id:d[y-1].trim(),styleClass:d[y].trim()};break;case 38:this.$={type:"applyStyles",id:d[y-1].trim(),stylesStr:d[y].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:o,31:r,39:s,43:n,46:l}),e(h,[2,16],{14:22,15:b,16:f}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:r},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:r},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:b,16:f,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:S},{15:[1,50]},e(h,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:S,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(v,c){if(c.recoverable)this.trace(v);else{var p=new Error(v);throw p.hash=c,p}},"parseError"),parse:g(function(v){var c=this,p=[0],w=[],E=[null],d=[],_=this.table,y="",A=0,O=0,q=2,j=1,ie=d.slice.call(arguments,1),z=Object.create(this.lexer),V={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(V.yy[ht]=this.yy[ht]);z.setInput(v,V.yy),V.yy.lexer=z,V.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var gt=z.yylloc;d.push(gt);var ne=z.options&&z.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(Y){p.length=p.length-2*Y,E.length=E.length-Y,d.length=d.length-Y}g(oe,"popStack");function vt(){var Y;return Y=w.pop()||z.lex()||j,typeof Y!="number"&&(Y instanceof Array&&(w=Y,Y=w.pop()),Y=c.symbols_[Y]||Y),Y}g(vt,"lex");for(var P,G,X,ut,J={},at,Z,Nt,st;;){if(G=p[p.length-1],this.defaultActions[G]?X=this.defaultActions[G]:((P===null||typeof P>"u")&&(P=vt()),X=_[G]&&_[G][P]),typeof X>"u"||!X.length||!X[0]){var yt="";st=[];for(at in _[G])this.terminals_[at]&&at>q&&st.push("'"+this.terminals_[at]+"'");z.showPosition?yt="Parse error on line "+(A+1)+`:
1
+ import{l as le}from"./chunk-FMBD7UC4-DhXvRHU3-Ck_6Dma3.js";import{H as g,aC as rt,a5 as I,ab as ce,a as m,au as de,aw as he,b as B,bn as ge,b8 as ue,bf as ye,bc as pe,bo as H,bp as Mt,k as be,an as Q,ah as xe,bq as fe,br as pt,ae as bt,bs as we}from"./index-BzhKcNOt.js";import{a as me}from"./clone-DqT6If4_-aVfgI0F6.js";import{X as Le}from"./graph-Bg_3T7Ud-8p9G4Jrq.js";import{t as Se}from"./channel-mhjF1lKa-DRGKdmbU.js";import"./_baseUniq-C4bkXOdh-BJ3-SRjw.js";var xt=(function(){var e=g(function(v,c,p,w){for(p=p||{},w=v.length;w--;p[v[w]]=c);return p},"o"),t=[1,15],a=[1,7],i=[1,13],o=[1,14],r=[1,19],s=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],b=[1,23],f=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],L=[8,10,15,16,21,27,28,29,30,31,39,43,46],S=[1,49],k={trace:g(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:g(function(v,c,p,w,E,d,_){var y=d.length-1;switch(E){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",d[y-1]),w.setHierarchy(d[y-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",d[y]),typeof d[y].length=="number"?this.$=d[y]:this.$=[d[y]];break;case 13:w.getLogger().debug("Rule: statement #2: ",d[y-1]),this.$=[d[y-1]].concat(d[y]);break;case 14:w.getLogger().debug("Rule: link: ",d[y],v),this.$={edgeTypeStr:d[y],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",d[y-3],d[y-1],d[y]),this.$={edgeTypeStr:d[y],label:d[y-1]};break;case 18:const A=parseInt(d[y]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",d[y-2],d[y-1],d[y]," typestr: ",d[y-1].edgeTypeStr);const q=w.edgeStrToEdgeData(d[y-1].edgeTypeStr);this.$=[{id:d[y-2].id,label:d[y-2].label,type:d[y-2].type,directions:d[y-2].directions},{id:d[y-2].id+"-"+d[y].id,start:d[y-2].id,end:d[y].id,label:d[y-1].label,type:"edge",directions:d[y].directions,arrowTypeEnd:q,arrowTypeStart:"arrow_open"},{id:d[y].id,label:d[y].label,type:w.typeStr2Type(d[y].typeStr),directions:d[y].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",d[y-1],d[y]),this.$={id:d[y-1].id,label:d[y-1].label,type:w.typeStr2Type(d[y-1].typeStr),directions:d[y-1].directions,widthInColumns:parseInt(d[y],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",d[y]),this.$={id:d[y].id,label:d[y].label,type:w.typeStr2Type(d[y].typeStr),directions:d[y].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",d[y]),this.$={type:"column-setting",columns:d[y]==="auto"?-1:parseInt(d[y])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",d[y-2],d[y-1]),w.generateId(),this.$={...d[y-2],type:"composite",children:d[y-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",d[y-2],d[y-1],d[y]);const j=w.generateId();this.$={id:j,type:"composite",label:"",children:d[y-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",d[y]),this.$={id:d[y]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",d[y-1],d[y]),this.$={id:d[y-1],label:d[y].label,typeStr:d[y].typeStr,directions:d[y].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",d[y]),this.$=[d[y]];break;case 32:w.getLogger().debug("Rule: dirList: ",d[y-1],d[y]),this.$=[d[y-1]].concat(d[y]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",d[y-2],d[y-1],d[y]),this.$={typeStr:d[y-2]+d[y],label:d[y-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",d[y-3],d[y-2]," #3:",d[y-1],d[y]),this.$={typeStr:d[y-3]+d[y],label:d[y-2],directions:d[y-1]};break;case 35:case 36:this.$={type:"classDef",id:d[y-1].trim(),css:d[y].trim()};break;case 37:this.$={type:"applyClass",id:d[y-1].trim(),styleClass:d[y].trim()};break;case 38:this.$={type:"applyStyles",id:d[y-1].trim(),stylesStr:d[y].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:o,31:r,39:s,43:n,46:l}),e(h,[2,16],{14:22,15:b,16:f}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:r},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(L,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:r},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:b,16:f,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:o,31:r,39:s,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(L,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:S},{15:[1,50]},e(h,[2,27]),e(L,[2,33]),{38:[1,51]},{33:52,34:S,38:[2,31]},{31:[2,15]},e(L,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(v,c){if(c.recoverable)this.trace(v);else{var p=new Error(v);throw p.hash=c,p}},"parseError"),parse:g(function(v){var c=this,p=[0],w=[],E=[null],d=[],_=this.table,y="",A=0,O=0,q=2,j=1,ie=d.slice.call(arguments,1),z=Object.create(this.lexer),V={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(V.yy[ht]=this.yy[ht]);z.setInput(v,V.yy),V.yy.lexer=z,V.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var gt=z.yylloc;d.push(gt);var ne=z.options&&z.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(Y){p.length=p.length-2*Y,E.length=E.length-Y,d.length=d.length-Y}g(oe,"popStack");function vt(){var Y;return Y=w.pop()||z.lex()||j,typeof Y!="number"&&(Y instanceof Array&&(w=Y,Y=w.pop()),Y=c.symbols_[Y]||Y),Y}g(vt,"lex");for(var P,J,W,ut,G={},at,Z,Nt,st;;){if(J=p[p.length-1],this.defaultActions[J]?W=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=vt()),W=_[J]&&_[J][P]),typeof W>"u"||!W.length||!W[0]){var yt="";st=[];for(at in _[J])this.terminals_[at]&&at>q&&st.push("'"+this.terminals_[at]+"'");z.showPosition?yt="Parse error on line "+(A+1)+`:
2
2
  `+z.showPosition()+`
3
- Expecting `+st.join(", ")+", got '"+(this.terminals_[P]||P)+"'":yt="Parse error on line "+(A+1)+": Unexpected "+(P==j?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(yt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:gt,expected:st})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+P);switch(X[0]){case 1:p.push(P),E.push(z.yytext),d.push(z.yylloc),p.push(X[1]),P=null,O=z.yyleng,y=z.yytext,A=z.yylineno,gt=z.yylloc;break;case 2:if(Z=this.productions_[X[1]][1],J.$=E[E.length-Z],J._$={first_line:d[d.length-(Z||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(Z||1)].first_column,last_column:d[d.length-1].last_column},ne&&(J._$.range=[d[d.length-(Z||1)].range[0],d[d.length-1].range[1]]),ut=this.performAction.apply(J,[y,O,A,V.yy,X[1],E,d].concat(ie)),typeof ut<"u")return ut;Z&&(p=p.slice(0,-1*Z*2),E=E.slice(0,-1*Z),d=d.slice(0,-1*Z)),p.push(this.productions_[X[1]][0]),E.push(J.$),d.push(J._$),Nt=_[p[p.length-2]][p[p.length-1]],p.push(Nt);break;case 3:return!0}}return!0},"parse")},$=(function(){var v={EOF:1,parseError:g(function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw new Error(c)},"parseError"),setInput:g(function(c,p){return this.yy=p||this.yy||{},this._input=c,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:g(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var p=c.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:g(function(c){var p=c.length,w=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var E=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),w.length-1&&(this.yylineno-=w.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:w?(w.length===E.length?this.yylloc.first_column:0)+E[E.length-w.length].length-w[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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).
3
+ Expecting `+st.join(", ")+", got '"+(this.terminals_[P]||P)+"'":yt="Parse error on line "+(A+1)+": Unexpected "+(P==j?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(yt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:gt,expected:st})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+P);switch(W[0]){case 1:p.push(P),E.push(z.yytext),d.push(z.yylloc),p.push(W[1]),P=null,O=z.yyleng,y=z.yytext,A=z.yylineno,gt=z.yylloc;break;case 2:if(Z=this.productions_[W[1]][1],G.$=E[E.length-Z],G._$={first_line:d[d.length-(Z||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(Z||1)].first_column,last_column:d[d.length-1].last_column},ne&&(G._$.range=[d[d.length-(Z||1)].range[0],d[d.length-1].range[1]]),ut=this.performAction.apply(G,[y,O,A,V.yy,W[1],E,d].concat(ie)),typeof ut<"u")return ut;Z&&(p=p.slice(0,-1*Z*2),E=E.slice(0,-1*Z),d=d.slice(0,-1*Z)),p.push(this.productions_[W[1]][0]),E.push(G.$),d.push(G._$),Nt=_[p[p.length-2]][p[p.length-1]],p.push(Nt);break;case 3:return!0}}return!0},"parse")},$=(function(){var v={EOF:1,parseError:g(function(c,p){if(this.yy.parser)this.yy.parser.parseError(c,p);else throw new Error(c)},"parseError"),setInput:g(function(c,p){return this.yy=p||this.yy||{},this._input=c,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:g(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var p=c.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:g(function(c){var p=c.length,w=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var E=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),w.length-1&&(this.yylineno-=w.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:w?(w.length===E.length?this.yylloc.first_column:0)+E[E.length-w.length].length-w[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(c){this.unput(this.match.slice(c))},"less"),pastInput:g(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var c=this.pastInput(),p=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
5
5
  `+p+"^"},"showPosition"),test_match:g(function(c,p){var w,E,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),E=c[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],w=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var _ in d)this[_]=d[_];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,p,w,E;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),_=0;_<d.length;_++)if(w=this._input.match(this.rules[d[_]]),w&&(!p||w[0].length>p[0].length)){if(p=w,E=_,this.options.backtrack_lexer){if(c=this.test_match(w,d[_]),c!==!1)return c;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(c=this.test_match(p,d[E]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var c=this.next();return c||this.lex()},"lex"),begin:g(function(c){this.conditionStack.push(c)},"begin"),popState:g(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:g(function(c){this.begin(c)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(c,p,w,E){switch(w){case 0:return c.getLogger().debug("Found block-beta"),10;case 1:return c.getLogger().debug("Found id-block"),29;case 2:return c.getLogger().debug("Found block"),10;case 3:c.getLogger().debug(".",p.yytext);break;case 4:c.getLogger().debug("_",p.yytext);break;case 5:return 5;case 6:return p.yytext=-1,28;case 7:return p.yytext=p.yytext.replace(/columns\s+/,""),c.getLogger().debug("COLUMNS (LEX)",p.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:c.getLogger().debug("LEX: POPPING STR:",p.yytext),this.popState();break;case 13:return c.getLogger().debug("LEX: STR end:",p.yytext),"STR";case 14:return p.yytext=p.yytext.replace(/space\:/,""),c.getLogger().debug("SPACE NUM (LEX)",p.yytext),21;case 15:return p.yytext="1",c.getLogger().debug("COLUMNS (LEX)",p.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),c.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),c.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),c.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),c.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),c.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),c.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),c.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),c.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),c.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),c.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),c.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),c.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return c.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return c.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return c.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return c.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return c.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return c.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return c.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),c.getLogger().debug("LEX ARR START"),37;case 74:return c.getLogger().debug("Lex: NODE_ID",p.yytext),31;case 75:return c.getLogger().debug("Lex: EOF",p.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:c.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:c.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return c.getLogger().debug("LEX: NODE_DESCR:",p.yytext),"NODE_DESCR";case 83:c.getLogger().debug("LEX POPPING"),this.popState();break;case 84:c.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (right): dir:",p.yytext),"DIR";case 86:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (left):",p.yytext),"DIR";case 87:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (x):",p.yytext),"DIR";case 88:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (y):",p.yytext),"DIR";case 89:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (up):",p.yytext),"DIR";case 90:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (down):",p.yytext),"DIR";case 91:return p.yytext="]>",c.getLogger().debug("Lex (ARROW_DIR end):",p.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return c.getLogger().debug("Lex: LINK","#"+p.yytext+"#"),15;case 93:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 94:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 95:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 96:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 97:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 98:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return c.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),c.getLogger().debug("Lex: LINK","#"+p.yytext+"#"),15;case 102:return this.popState(),c.getLogger().debug("Lex: LINK",p.yytext),15;case 103:return this.popState(),c.getLogger().debug("Lex: LINK",p.yytext),15;case 104:return c.getLogger().debug("Lex: COLON",p.yytext),p.yytext=p.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return v})();k.lexer=$;function D(){this.yy={}}return g(D,"Parser"),D.prototype=k,k.Parser=D,new D})();xt.parser=xt;var ke=xt,U=new Map,St=[],ft=new Map,Tt="color",$t="fill",_e="bgFill",Pt=",",Ee=B(),ot=new Map,De=g(e=>xe.sanitizeText(e,Ee),"sanitizeText"),ve=g(function(e,t=""){let a=ot.get(e);a||(a={id:e,styles:[],textStyles:[]},ot.set(e,a)),t?.split(Pt).forEach(i=>{const o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Tt).exec(i)){const r=o.replace($t,_e).replace(Tt,$t);a.textStyles.push(r)}a.styles.push(o)})},"addStyleClass"),Ne=g(function(e,t=""){const a=U.get(e);t!=null&&(a.styles=t.split(Pt))},"addStyle2Node"),Te=g(function(e,t){e.split(",").forEach(function(a){let i=U.get(a);if(i===void 0){const o=a.trim();i={id:o,type:"na",children:[]},U.set(o,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),Yt=g((e,t)=>{const a=e.flat(),i=[],o=a.find(r=>r?.type==="column-setting")?.columns??-1;for(const r of a){if(typeof o=="number"&&o>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>o&&m.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${o}`),r.label&&(r.label=De(r.label)),r.type==="classDef"){ve(r.id,r.css);continue}if(r.type==="applyClass"){Te(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Ne(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const s=(ft.get(r.id)??0)+1;ft.set(r.id,s),r.id=s+"-"+r.id,St.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const s=U.get(r.id);if(s===void 0?U.set(r.id,r):(r.type!=="na"&&(s.type=r.type),r.label!==r.id&&(s.label=r.label)),r.children&&Yt(r.children,r),r.type==="space"){const n=r.width??1;for(let l=0;l<n;l++){const u=me(r);u.id=u.id+"-"+l,U.set(u.id,u),i.push(u)}}else s===void 0&&i.push(r)}}t.children=i},"populateBlockDatabase"),kt=[],et={id:"root",type:"composite",children:[],columns:-1},$e=g(()=>{m.debug("Clear called"),de(),et={id:"root",type:"composite",children:[],columns:-1},U=new Map([["root",et]]),kt=[],ot=new Map,St=[],ft=new Map},"clear");function Wt(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(Wt,"typeStr2Type");function Xt(e){return m.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(Xt,"edgeTypeStr2Type");function Kt(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(Kt,"edgeStrToEdgeData");var Ct=0,Ce=g(()=>(Ct++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ct),"generateId"),Ie=g(e=>{et.children=e,Yt(e,et),kt=et.children},"setHierarchy"),Be=g(e=>{const t=U.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Oe=g(()=>[...U.values()],"getBlocksFlat"),ze=g(()=>kt||[],"getBlocks"),Re=g(()=>St,"getEdges"),Ae=g(e=>U.get(e),"getBlock"),Me=g(e=>{U.set(e.id,e)},"setBlock"),Pe=g(()=>m,"getLogger"),Ye=g(function(){return ot},"getClasses"),We={getConfig:g(()=>rt().block,"getConfig"),typeStr2Type:Wt,edgeTypeStr2Type:Xt,edgeStrToEdgeData:Kt,getLogger:Pe,getBlocksFlat:Oe,getBlocks:ze,getEdges:Re,setHierarchy:Ie,getBlock:Ae,setBlock:Me,getColumns:Be,getClasses:Ye,clear:$e,generateId:Ce},Xe=We,it=g((e,t)=>{const a=Se,i=a(e,"r"),o=a(e,"g"),r=a(e,"b");return he(i,o,r,t)},"fade"),Ke=g(e=>`.label {
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var c=this.next();return c||this.lex()},"lex"),begin:g(function(c){this.conditionStack.push(c)},"begin"),popState:g(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:g(function(c){this.begin(c)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(c,p,w,E){switch(w){case 0:return c.getLogger().debug("Found block-beta"),10;case 1:return c.getLogger().debug("Found id-block"),29;case 2:return c.getLogger().debug("Found block"),10;case 3:c.getLogger().debug(".",p.yytext);break;case 4:c.getLogger().debug("_",p.yytext);break;case 5:return 5;case 6:return p.yytext=-1,28;case 7:return p.yytext=p.yytext.replace(/columns\s+/,""),c.getLogger().debug("COLUMNS (LEX)",p.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:c.getLogger().debug("LEX: POPPING STR:",p.yytext),this.popState();break;case 13:return c.getLogger().debug("LEX: STR end:",p.yytext),"STR";case 14:return p.yytext=p.yytext.replace(/space\:/,""),c.getLogger().debug("SPACE NUM (LEX)",p.yytext),21;case 15:return p.yytext="1",c.getLogger().debug("COLUMNS (LEX)",p.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),c.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),c.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),c.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),c.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),c.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),c.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),c.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),c.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),c.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),c.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),c.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),c.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),c.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return c.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return c.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return c.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return c.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return c.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return c.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return c.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return c.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),c.getLogger().debug("LEX ARR START"),37;case 74:return c.getLogger().debug("Lex: NODE_ID",p.yytext),31;case 75:return c.getLogger().debug("Lex: EOF",p.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:c.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:c.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return c.getLogger().debug("LEX: NODE_DESCR:",p.yytext),"NODE_DESCR";case 83:c.getLogger().debug("LEX POPPING"),this.popState();break;case 84:c.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (right): dir:",p.yytext),"DIR";case 86:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (left):",p.yytext),"DIR";case 87:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (x):",p.yytext),"DIR";case 88:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (y):",p.yytext),"DIR";case 89:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (up):",p.yytext),"DIR";case 90:return p.yytext=p.yytext.replace(/^,\s*/,""),c.getLogger().debug("Lex (down):",p.yytext),"DIR";case 91:return p.yytext="]>",c.getLogger().debug("Lex (ARROW_DIR end):",p.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return c.getLogger().debug("Lex: LINK","#"+p.yytext+"#"),15;case 93:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 94:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 95:return c.getLogger().debug("Lex: LINK",p.yytext),15;case 96:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 97:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 98:return c.getLogger().debug("Lex: START_LINK",p.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return c.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),c.getLogger().debug("Lex: LINK","#"+p.yytext+"#"),15;case 102:return this.popState(),c.getLogger().debug("Lex: LINK",p.yytext),15;case 103:return this.popState(),c.getLogger().debug("Lex: LINK",p.yytext),15;case 104:return c.getLogger().debug("Lex: COLON",p.yytext),p.yytext=p.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return v})();k.lexer=$;function D(){this.yy={}}return g(D,"Parser"),D.prototype=k,k.Parser=D,new D})();xt.parser=xt;var ke=xt,U=new Map,St=[],ft=new Map,Tt="color",$t="fill",_e="bgFill",Pt=",",Ee=B(),ot=new Map,De=g(e=>xe.sanitizeText(e,Ee),"sanitizeText"),ve=g(function(e,t=""){let a=ot.get(e);a||(a={id:e,styles:[],textStyles:[]},ot.set(e,a)),t?.split(Pt).forEach(i=>{const o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Tt).exec(i)){const r=o.replace($t,_e).replace(Tt,$t);a.textStyles.push(r)}a.styles.push(o)})},"addStyleClass"),Ne=g(function(e,t=""){const a=U.get(e);t!=null&&(a.styles=t.split(Pt))},"addStyle2Node"),Te=g(function(e,t){e.split(",").forEach(function(a){let i=U.get(a);if(i===void 0){const o=a.trim();i={id:o,type:"na",children:[]},U.set(o,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),Yt=g((e,t)=>{const a=e.flat(),i=[],o=a.find(r=>r?.type==="column-setting")?.columns??-1;for(const r of a){if(typeof o=="number"&&o>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>o&&m.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${o}`),r.label&&(r.label=De(r.label)),r.type==="classDef"){ve(r.id,r.css);continue}if(r.type==="applyClass"){Te(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Ne(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const s=(ft.get(r.id)??0)+1;ft.set(r.id,s),r.id=s+"-"+r.id,St.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const s=U.get(r.id);if(s===void 0?U.set(r.id,r):(r.type!=="na"&&(s.type=r.type),r.label!==r.id&&(s.label=r.label)),r.children&&Yt(r.children,r),r.type==="space"){const n=r.width??1;for(let l=0;l<n;l++){const u=me(r);u.id=u.id+"-"+l,U.set(u.id,u),i.push(u)}}else s===void 0&&i.push(r)}}t.children=i},"populateBlockDatabase"),kt=[],et={id:"root",type:"composite",children:[],columns:-1},$e=g(()=>{m.debug("Clear called"),de(),et={id:"root",type:"composite",children:[],columns:-1},U=new Map([["root",et]]),kt=[],ot=new Map,St=[],ft=new Map},"clear");function Xt(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(Xt,"typeStr2Type");function Wt(e){return m.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(Wt,"edgeTypeStr2Type");function Kt(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(Kt,"edgeStrToEdgeData");var Ct=0,Ce=g(()=>(Ct++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ct),"generateId"),Ie=g(e=>{et.children=e,Yt(e,et),kt=et.children},"setHierarchy"),Be=g(e=>{const t=U.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Oe=g(()=>[...U.values()],"getBlocksFlat"),ze=g(()=>kt||[],"getBlocks"),Re=g(()=>St,"getEdges"),Ae=g(e=>U.get(e),"getBlock"),Me=g(e=>{U.set(e.id,e)},"setBlock"),Pe=g(()=>m,"getLogger"),Ye=g(function(){return ot},"getClasses"),Xe={getConfig:g(()=>rt().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Wt,edgeStrToEdgeData:Kt,getLogger:Pe,getBlocksFlat:Oe,getBlocks:ze,getEdges:Re,setHierarchy:Ie,getBlock:Ae,setBlock:Me,getColumns:Be,getClasses:Ye,clear:$e,generateId:Ce},We=Xe,it=g((e,t)=>{const a=Se,i=a(e,"r"),o=a(e,"g"),r=a(e,"b");return he(i,o,r,t)},"fade"),Ke=g(e=>`.label {
7
7
  font-family: ${e.fontFamily};
8
8
  color: ${e.nodeTextColor||e.textColor};
9
9
  }
@@ -116,7 +116,7 @@ Expecting `+st.join(", ")+", got '"+(this.terminals_[P]||P)+"'":yt="Parse error
116
116
  fill: ${e.textColor};
117
117
  }
118
118
  ${le()}
119
- `,"getStyles"),Ue=Ke,Fe=g((e,t,a,i)=>{t.forEach(o=>{er[o](e,a,i)})},"insertMarkers"),je=g((e,t,a)=>{m.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.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").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),He=g((e,t,a)=>{e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=g((e,t,a)=>{e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=g((e,t,a)=>{e.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").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ve=g((e,t,a)=>{e.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").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.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").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Ge=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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"),e.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",12).attr("markerHeight",12).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")},"point"),Je=g((e,t,a)=>{e.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"),e.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")},"circle"),Qe=g((e,t,a)=>{e.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"),e.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")},"cross"),tr=g((e,t,a)=>{e.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 L9,13 L14,7 L9,1 Z")},"barb"),er={extension:je,composition:He,aggregation:Ze,dependency:qe,lollipop:Ve,point:Ge,circle:Je,cross:Qe,barb:tr},rr=Fe,C=B()?.block?.padding??8;function Ut(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,i=Math.floor(t/e);return{px:a,py:i}}g(Ut,"calculateBlockPosition");var ar=g(e=>{let t=0,a=0;for(const i of e.children){const{width:o,height:r,x:s,y:n}=i.size??{width:0,height:0,x:0,y:0};m.debug("getMaxChildSize abc95 child:",i.id,"width:",o,"height:",r,"x:",s,"y:",n,i.type),i.type!=="space"&&(o>t&&(t=o/(e.widthInColumns??1)),r>a&&(a=r))}return{width:t,height:a}},"getMaxChildSize");function lt(e,t,a=0,i=0){m.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:i,x:0,y:0});let o=0,r=0;if(e.children?.length>0){for(const x of e.children)lt(x,t);const s=ar(e);o=s.width,r=s.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",o,r);for(const x of e.children)x.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${x.id} ${o} ${r} ${JSON.stringify(x.size)}`),x.size.width=o*(x.widthInColumns??1)+C*((x.widthInColumns??1)-1),x.size.height=r,x.size.x=0,x.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${o} maxHeight:${r}`));for(const x of e.children)lt(x,t,o,r);const n=e.columns??-1;let l=0;for(const x of e.children)l+=x.widthInColumns??1;let u=e.children.length;n>0&&n<l&&(u=n);const h=Math.ceil(l/u);let b=u*(o+C)+C,f=h*(r+C)+C;if(b<a){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${b}`),b=a,f=i;const x=(a-u*C-C)/u,L=(i-h*C-C)/h;m.debug("Size indata abc88",e.id,"childWidth",x,"maxWidth",o),m.debug("Size indata abc88",e.id,"childHeight",L,"maxHeight",r),m.debug("Size indata abc88 xSize",u,"padding",C);for(const S of e.children)S.size&&(S.size.width=x,S.size.height=L,S.size.x=0,S.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${h} columns ${n}${e.children.length} width=${Math.max(b,e.size?.width||0)}`),b<(e?.size?.width||0)){b=e?.size?.width||0;const x=n>0?Math.min(e.children.length,n):e.children.length;if(x>0){const L=(b-x*C-C)/x;m.debug("abc95 (growing to fit) width",e.id,b,e.size?.width,L);for(const S of e.children)S.size&&(S.size.width=L)}}e.size={width:b,height:f,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(lt,"setBlockSizes");function _t(e,t){m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const a=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,o=e.children.length*i+(e.children.length-1)*C;m.debug("widthOfChildren 88",o,"posX");let r=0;m.debug("abc91 block?.size?.x",e.id,e?.size?.x);let s=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,n=0;for(const l of e.children){const u=e;if(!l.size)continue;const{width:h,height:b}=l.size,{px:f,py:x}=Ut(a,r);if(x!=n&&(n=x,s=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,m.debug("New row in layout for block",e.id," and child ",l.id,n)),m.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${r} (px, py) ${f},${x} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${C}`),u.size){const S=h/2;l.size.x=s+C+S,m.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+S,l.size.y=u.size.y-u.size.height/2+x*(b+C)+b/2+C,m.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${C}${S}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&_t(l);let L=l?.widthInColumns??1;a>0&&(L=Math.min(L,a-r%a)),r+=L,m.debug("abc88 columnsPos",l,r)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(_t,"layoutBlocks");function Et(e,{minX:t,minY:a,maxX:i,maxY:o}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:r,y:s,width:n,height:l}=e.size;r-n/2<t&&(t=r-n/2),s-l/2<a&&(a=s-l/2),r+n/2>i&&(i=r+n/2),s+l/2>o&&(o=s+l/2)}if(e.children)for(const r of e.children)({minX:t,minY:a,maxX:i,maxY:o}=Et(r,{minX:t,minY:a,maxX:i,maxY:o}));return{minX:t,minY:a,maxX:i,maxY:o}}g(Et,"findBounds");function Ft(e){const t=e.getBlock("root");if(!t)return;lt(t,e,0,0),_t(t),m.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:i,maxX:o,maxY:r}=Et(t),s=r-i,n=o-a;return{x:a,y:i,width:n,height:s}}g(Ft,"layout");function wt(e,t){t&&e.attr("style",t)}g(wt,"applyStyle");function jt(e,t){const a=I(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=a.append("xhtml:div"),o=e.label,r=e.isNode?"nodeLabel":"edgeLabel",s=i.append("span");return s.html(bt(o,t)),wt(s,e.labelStyle),s.attr("class",r),wt(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}g(jt,"addHtmlLabel");var sr=g(async(e,t,a,i)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const r=B();if(H(r.flowchart.htmlLabels)){o=o.replace(/\\n|\n/g,"<br />"),m.debug("vertexText"+o);const s=await fe(pt(o)),n={isNode:i,label:s,labelStyle:t.replace("fill:","color:")};return jt(n,r)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof o=="string"?n=o.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(o)?n=o:n=[];for(const l of n){const u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),a?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),K=sr,ir=g((e,t,a,i,o)=>{t.arrowTypeStart&&It(e,"start",t.arrowTypeStart,a,i,o),t.arrowTypeEnd&&It(e,"end",t.arrowTypeEnd,a,i,o)},"addEdgeMarkers"),nr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},It=g((e,t,a,i,o,r)=>{const s=nr[a];if(!s){m.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${o}_${r}-${s}${n})`)},"addEdgeMarker"),mt={},M={},or=g(async(e,t)=>{const a=B(),i=H(a.flowchart.htmlLabels),o=t.labelType==="markdown"?Mt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},a):await K(t.label,t.labelStyle),r=e.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(o);let n=o.getBBox();if(i){const u=o.children[0],h=I(o);n=u.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),mt[t.id]=r,t.width=n.width,t.height=n.height;let l;if(t.startLabelLeft){const u=await K(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startLeft=h,tt(l,t.startLabelLeft)}if(t.startLabelRight){const u=await K(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=h.node().appendChild(u),b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startRight=h,tt(l,t.startLabelRight)}if(t.endLabelLeft){const u=await K(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endLeft=h,tt(l,t.endLabelLeft)}if(t.endLabelRight){const u=await K(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endRight=h,tt(l,t.endLabelRight)}return o},"insertEdgeLabel");function tt(e,t){B().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(tt,"setTerminalWidth");var lr=g((e,t)=>{m.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const i=B(),{subGraphTitleTotalMargin:o}=be(i);if(e.label){const r=mt[e.id];let s=e.x,n=e.y;if(a){const l=Q.calcLabelPosition(a);m.debug("Moving label "+e.label+" from (",s,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,n=l.y)}r.attr("transform",`translate(${s}, ${n+o/2})`)}if(e.startLabelLeft){const r=M[e.id].startLeft;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const r=M[e.id].startRight;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const r=M[e.id].endLeft;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const r=M[e.id].endRight;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),cr=g((e,t)=>{const a=e.x,i=e.y,o=Math.abs(t.x-a),r=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return o>=s||r>=n},"outsideNode"),dr=g((e,t,a)=>{m.debug(`intersection calc abc89:
119
+ `,"getStyles"),Ue=Ke,Fe=g((e,t,a,i)=>{t.forEach(o=>{er[o](e,a,i)})},"insertMarkers"),je=g((e,t,a)=>{m.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.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").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),He=g((e,t,a)=>{e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=g((e,t,a)=>{e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=g((e,t,a)=>{e.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").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.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").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ve=g((e,t,a)=>{e.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").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.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").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Je=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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"),e.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",12).attr("markerHeight",12).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")},"point"),Ge=g((e,t,a)=>{e.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"),e.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")},"circle"),Qe=g((e,t,a)=>{e.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"),e.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")},"cross"),tr=g((e,t,a)=>{e.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 L9,13 L14,7 L9,1 Z")},"barb"),er={extension:je,composition:He,aggregation:Ze,dependency:qe,lollipop:Ve,point:Je,circle:Ge,cross:Qe,barb:tr},rr=Fe,C=B()?.block?.padding??8;function Ut(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,i=Math.floor(t/e);return{px:a,py:i}}g(Ut,"calculateBlockPosition");var ar=g(e=>{let t=0,a=0;for(const i of e.children){const{width:o,height:r,x:s,y:n}=i.size??{width:0,height:0,x:0,y:0};m.debug("getMaxChildSize abc95 child:",i.id,"width:",o,"height:",r,"x:",s,"y:",n,i.type),i.type!=="space"&&(o>t&&(t=o/(e.widthInColumns??1)),r>a&&(a=r))}return{width:t,height:a}},"getMaxChildSize");function lt(e,t,a=0,i=0){m.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:i,x:0,y:0});let o=0,r=0;if(e.children?.length>0){for(const x of e.children)lt(x,t);const s=ar(e);o=s.width,r=s.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",o,r);for(const x of e.children)x.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${x.id} ${o} ${r} ${JSON.stringify(x.size)}`),x.size.width=o*(x.widthInColumns??1)+C*((x.widthInColumns??1)-1),x.size.height=r,x.size.x=0,x.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${o} maxHeight:${r}`));for(const x of e.children)lt(x,t,o,r);const n=e.columns??-1;let l=0;for(const x of e.children)l+=x.widthInColumns??1;let u=e.children.length;n>0&&n<l&&(u=n);const h=Math.ceil(l/u);let b=u*(o+C)+C,f=h*(r+C)+C;if(b<a){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${b}`),b=a,f=i;const x=(a-u*C-C)/u,L=(i-h*C-C)/h;m.debug("Size indata abc88",e.id,"childWidth",x,"maxWidth",o),m.debug("Size indata abc88",e.id,"childHeight",L,"maxHeight",r),m.debug("Size indata abc88 xSize",u,"padding",C);for(const S of e.children)S.size&&(S.size.width=x,S.size.height=L,S.size.x=0,S.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${h} columns ${n}${e.children.length} width=${Math.max(b,e.size?.width||0)}`),b<(e?.size?.width||0)){b=e?.size?.width||0;const x=n>0?Math.min(e.children.length,n):e.children.length;if(x>0){const L=(b-x*C-C)/x;m.debug("abc95 (growing to fit) width",e.id,b,e.size?.width,L);for(const S of e.children)S.size&&(S.size.width=L)}}e.size={width:b,height:f,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(lt,"setBlockSizes");function _t(e,t){m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const a=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,o=e.children.length*i+(e.children.length-1)*C;m.debug("widthOfChildren 88",o,"posX");let r=0;m.debug("abc91 block?.size?.x",e.id,e?.size?.x);let s=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,n=0;for(const l of e.children){const u=e;if(!l.size)continue;const{width:h,height:b}=l.size,{px:f,py:x}=Ut(a,r);if(x!=n&&(n=x,s=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,m.debug("New row in layout for block",e.id," and child ",l.id,n)),m.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${r} (px, py) ${f},${x} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${h}${C}`),u.size){const S=h/2;l.size.x=s+C+S,m.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${s} new startingPosX${l.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${h*(l?.widthInColumns??1)/2}`),s=l.size.x+S,l.size.y=u.size.y-u.size.height/2+x*(b+C)+b/2+C,m.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${s}${C}${S}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${h*(l?.widthInColumns??1)/2}`)}l.children&&_t(l);let L=l?.widthInColumns??1;a>0&&(L=Math.min(L,a-r%a)),r+=L,m.debug("abc88 columnsPos",l,r)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(_t,"layoutBlocks");function Et(e,{minX:t,minY:a,maxX:i,maxY:o}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:r,y:s,width:n,height:l}=e.size;r-n/2<t&&(t=r-n/2),s-l/2<a&&(a=s-l/2),r+n/2>i&&(i=r+n/2),s+l/2>o&&(o=s+l/2)}if(e.children)for(const r of e.children)({minX:t,minY:a,maxX:i,maxY:o}=Et(r,{minX:t,minY:a,maxX:i,maxY:o}));return{minX:t,minY:a,maxX:i,maxY:o}}g(Et,"findBounds");function Ft(e){const t=e.getBlock("root");if(!t)return;lt(t,e,0,0),_t(t),m.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:i,maxX:o,maxY:r}=Et(t),s=r-i,n=o-a;return{x:a,y:i,width:n,height:s}}g(Ft,"layout");function wt(e,t){t&&e.attr("style",t)}g(wt,"applyStyle");function jt(e,t){const a=I(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=a.append("xhtml:div"),o=e.label,r=e.isNode?"nodeLabel":"edgeLabel",s=i.append("span");return s.html(bt(o,t)),wt(s,e.labelStyle),s.attr("class",r),wt(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}g(jt,"addHtmlLabel");var sr=g(async(e,t,a,i)=>{let o=e||"";typeof o=="object"&&(o=o[0]);const r=B();if(H(r.flowchart.htmlLabels)){o=o.replace(/\\n|\n/g,"<br />"),m.debug("vertexText"+o);const s=await fe(pt(o)),n={isNode:i,label:s,labelStyle:t.replace("fill:","color:")};return jt(n,r)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof o=="string"?n=o.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(o)?n=o:n=[];for(const l of n){const u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),a?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),s.appendChild(u)}return s}},"createLabel"),K=sr,ir=g((e,t,a,i,o)=>{t.arrowTypeStart&&It(e,"start",t.arrowTypeStart,a,i,o),t.arrowTypeEnd&&It(e,"end",t.arrowTypeEnd,a,i,o)},"addEdgeMarkers"),nr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},It=g((e,t,a,i,o,r)=>{const s=nr[a];if(!s){m.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${o}_${r}-${s}${n})`)},"addEdgeMarker"),mt={},M={},or=g(async(e,t)=>{const a=B(),i=H(a.flowchart.htmlLabels),o=t.labelType==="markdown"?Mt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},a):await K(t.label,t.labelStyle),r=e.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(o);let n=o.getBBox();if(i){const u=o.children[0],h=I(o);n=u.getBoundingClientRect(),h.attr("width",n.width),h.attr("height",n.height)}s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),mt[t.id]=r,t.width=n.width,t.height=n.height;let l;if(t.startLabelLeft){const u=await K(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startLeft=h,tt(l,t.startLabelLeft)}if(t.startLabelRight){const u=await K(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=h.node().appendChild(u),b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startRight=h,tt(l,t.startLabelRight)}if(t.endLabelLeft){const u=await K(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endLeft=h,tt(l,t.endLabelLeft)}if(t.endLabelRight){const u=await K(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),b=h.insert("g").attr("class","inner");l=b.node().appendChild(u);const f=u.getBBox();b.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endRight=h,tt(l,t.endLabelRight)}return o},"insertEdgeLabel");function tt(e,t){B().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(tt,"setTerminalWidth");var lr=g((e,t)=>{m.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const i=B(),{subGraphTitleTotalMargin:o}=be(i);if(e.label){const r=mt[e.id];let s=e.x,n=e.y;if(a){const l=Q.calcLabelPosition(a);m.debug("Moving label "+e.label+" from (",s,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,n=l.y)}r.attr("transform",`translate(${s}, ${n+o/2})`)}if(e.startLabelLeft){const r=M[e.id].startLeft;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.startLabelRight){const r=M[e.id].startRight;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelLeft){const r=M[e.id].endLeft;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}if(e.endLabelRight){const r=M[e.id].endRight;let s=e.x,n=e.y;if(a){const l=Q.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);s=l.x,n=l.y}r.attr("transform",`translate(${s}, ${n})`)}},"positionEdgeLabel"),cr=g((e,t)=>{const a=e.x,i=e.y,o=Math.abs(t.x-a),r=Math.abs(t.y-i),s=e.width/2,n=e.height/2;return o>=s||r>=n},"outsideNode"),dr=g((e,t,a)=>{m.debug(`intersection calc abc89:
120
120
  outsidePoint: ${JSON.stringify(t)}
121
121
  insidePoint : ${JSON.stringify(a)}
122
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,r=Math.abs(i-a.x),s=e.width/2;let n=a.x<t.x?s-r:s+r;const l=e.height/2,u=Math.abs(t.y-a.y),h=Math.abs(t.x-a.x);if(Math.abs(o-t.y)*s>Math.abs(i-t.x)*l){let b=a.y<t.y?t.y-l-o:o-l-t.y;n=h*b/u;const f={x:a.x<t.x?a.x+n:a.x-h+n,y:a.y<t.y?a.y+u-b:a.y-u+b};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),u===0&&(f.y=t.y),m.debug(`abc89 topp/bott calc, Q ${u}, q ${b}, R ${h}, r ${n}`,f),f}else{a.x<t.x?n=t.x-s-i:n=i-s-t.x;let b=u*n/h,f=a.x<t.x?a.x+h-n:a.x-h+n,x=a.y<t.y?a.y+b:a.y-b;return m.debug(`sides calc abc89, Q ${u}, q ${b}, R ${h}, r ${n}`,{_x:f,_y:x}),n===0&&(f=t.x,x=t.y),h===0&&(f=t.x),u===0&&(x=t.y),{x:f,y:x}}},"intersection"),Bt=g((e,t)=>{m.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],o=!1;return e.forEach(r=>{if(!cr(t,r)&&!o){const s=dr(t,i,r);let n=!1;a.forEach(l=>{n=n||l.x===s.x&&l.y===s.y}),a.some(l=>l.x===s.x&&l.y===s.y)||a.push(s),o=!0}else i=r,o||a.push(r)}),a},"cutPathAtIntersect"),hr=g(function(e,t,a,i,o,r,s){let n=a.points;m.debug("abc88 InsertEdge: edge=",a,"e=",t);let l=!1;const u=r.node(t.v);var h=r.node(t.w);h?.intersect&&u?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),a.toCluster&&(m.debug("to cluster abc88",i[a.toCluster]),n=Bt(a.points,i[a.toCluster].node),l=!0),a.fromCluster&&(m.debug("from cluster abc88",i[a.fromCluster]),n=Bt(n.reverse(),i[a.fromCluster].node).reverse(),l=!0);const b=n.filter(c=>!Number.isNaN(c.y));let f=ye;a.curve&&(o==="graph"||o==="flowchart")&&(f=a.curve);const{x,y:L}=ge(a),S=ue().x(x).y(L).curve(f);let k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}const $=e.append("path").attr("d",S(b)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style);let D="";(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(D=pe(!0)),ir($,a,D,s,o);let v={};return l&&(v.updatedPath=n),v.originalPath=a.points,v},"insertEdge"),gr=g(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),ur=g((e,t,a)=>{const i=gr(e),o=2,r=t.height+2*a.padding,s=r/o,n=t.width+2*s+a.padding,l=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*l},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*l,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*l},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*l,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-r+l},{x:0,y:-r+l},{x:n/2,y:-r},{x:n,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l},{x:n,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r+l}]:i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-l},{x:s,y:-r+l},{x:0,y:-r+l},{x:n/2,y:-r},{x:n,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l},{x:n,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function Ht(e,t){return e.intersect(t)}g(Ht,"intersectNode");var yr=Ht;function Zt(e,t,a,i){var o=e.x,r=e.y,s=o-i.x,n=r-i.y,l=Math.sqrt(t*t*n*n+a*a*s*s),u=Math.abs(t*a*s/l);i.x<o&&(u=-u);var h=Math.abs(t*a*n/l);return i.y<r&&(h=-h),{x:o+u,y:r+h}}g(Zt,"intersectEllipse");var qt=Zt;function Vt(e,t,a){return qt(e,t,t,a)}g(Vt,"intersectCircle");var pr=Vt;function Gt(e,t,a,i){var o,r,s,n,l,u,h,b,f,x,L,S,k,$,D;if(o=t.y-e.y,s=e.x-t.x,l=t.x*e.y-e.x*t.y,f=o*a.x+s*a.y+l,x=o*i.x+s*i.y+l,!(f!==0&&x!==0&&Lt(f,x))&&(r=i.y-a.y,n=a.x-i.x,u=i.x*a.y-a.x*i.y,h=r*e.x+n*e.y+u,b=r*t.x+n*t.y+u,!(h!==0&&b!==0&&Lt(h,b))&&(L=o*n-r*s,L!==0)))return S=Math.abs(L/2),k=s*u-n*l,$=k<0?(k-S)/L:(k+S)/L,k=r*l-o*u,D=k<0?(k-S)/L:(k+S)/L,{x:$,y:D}}g(Gt,"intersectLine");function Lt(e,t){return e*t>0}g(Lt,"sameSign");var br=Gt,xr=Jt;function Jt(e,t,a){var i=e.x,o=e.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){s=Math.min(s,L.x),n=Math.min(n,L.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var l=i-e.width/2-s,u=o-e.height/2-n,h=0;h<t.length;h++){var b=t[h],f=t[h<t.length-1?h+1:0],x=br(e,a,{x:l+b.x,y:u+b.y},{x:l+f.x,y:u+f.y});x&&r.push(x)}return r.length?(r.length>1&&r.sort(function(L,S){var k=L.x-a.x,$=L.y-a.y,D=Math.sqrt(k*k+$*$),v=S.x-a.x,c=S.y-a.y,p=Math.sqrt(v*v+c*c);return D<p?-1:D===p?0:1}),r[0]):e}g(Jt,"intersectPolygon");var fr=g((e,t)=>{var a=e.x,i=e.y,o=t.x-a,r=t.y-i,s=e.width/2,n=e.height/2,l,u;return Math.abs(r)*s>Math.abs(o)*n?(r<0&&(n=-n),l=r===0?0:n*o/r,u=n):(o<0&&(s=-s),l=s,u=o===0?0:s*r/o),{x:a+l,y:i+u}},"intersectRect"),wr=fr,N={node:yr,circle:pr,ellipse:qt,polygon:xr,rect:wr},R=g(async(e,t,a,i)=>{const o=B();let r;const s=t.useHtmlLabels||H(o.flowchart.htmlLabels);a?r=a:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),l=n.insert("g").attr("class","label").attr("style",t.labelStyle);let u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=l.node();let b;t.labelType==="markdown"?b=Mt(l,bt(pt(u),o),{useHtmlLabels:s,width:t.width||o.flowchart.wrappingWidth,classes:"markdown-node-label"},o):b=h.appendChild(await K(bt(pt(u),o),t.labelStyle,!1,i));let f=b.getBBox();const x=t.padding/2;if(H(o.flowchart.htmlLabels)){const L=b.children[0],S=I(b),k=L.getElementsByTagName("img");if(k){const $=u.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...k].map(D=>new Promise(v=>{function c(){if(D.style.display="flex",D.style.flexDirection="column",$){const p=o.fontSize?o.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(p,10)*5+"px";D.style.minWidth=w,D.style.maxWidth=w}else D.style.width="100%";v(D)}g(c,"setupImage"),setTimeout(()=>{D.complete&&c()}),D.addEventListener("error",c),D.addEventListener("load",c)})))}f=L.getBoundingClientRect(),S.attr("width",f.width),S.attr("height",f.height)}return s?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:n,bbox:f,halfPadding:x,label:l}},"labelHelper"),T=g((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function F(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(F,"insertPolygonShape");var mr=g(async(e,t)=>{t.useHtmlLabels||B().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes,!0);m.info("Classes = ",t.classes);const r=a.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-o).attr("y",-i.height/2-o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),T(t,r),t.intersect=function(s){return N.rect(t,s)},a},"note"),Lr=mr,Ot=g(e=>e?" "+e:"","formatClass"),W=g((e,t)=>`${t||"node default"}${Ot(e.classes)} ${Ot(e.class)}`,"getClassesFromNode"),zt=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=o+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];m.info("Question main (Circle)");const l=F(a,s,s,n);return l.attr("style",t.style),T(t,l),t.intersect=function(u){return m.warn("Intersect called"),N.polygon(t,n,u)},a},"question"),Sr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,o=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",o.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return N.circle(t,14,r)},a},"choice"),kr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=4,r=i.height+t.padding,s=r/o,n=i.width+2*s+t.padding,l=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],u=F(a,n,r,l);return u.attr("style",t.style),T(t,u),t.intersect=function(h){return N.polygon(t,l,h)},a},"hexagon"),_r=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,void 0,!0),o=2,r=i.height+2*t.padding,s=r/o,n=i.width+2*s+t.padding,l=ur(t.directions,i,t),u=F(a,n,r,l);return u.attr("style",t.style),T(t,u),t.intersect=function(h){return N.polygon(t,l,h)},a},"block_arrow"),Er=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:o,y:0},{x:o,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return F(a,o,r,s).attr("style",t.style),t.width=o+r,t.height=r,t.intersect=function(n){return N.polygon(t,s,n)},a},"rect_left_inv_arrow"),Dr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:o-r/6,y:0},{x:o+2*r/6,y:-r},{x:r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"lean_right"),vr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:o+r/6,y:0},{x:o-2*r/6,y:-r},{x:-r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"lean_left"),Nr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:o+2*r/6,y:0},{x:o-r/6,y:-r},{x:r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"trapezoid"),Tr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:o-r/6,y:0},{x:o+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"inv_trapezoid"),$r=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:o+r/2,y:0},{x:o,y:-r/2},{x:o+r/2,y:-r},{x:0,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"rect_right_inv_arrow"),Cr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=o/2,s=r/(2.5+o/50),n=i.height+s+t.padding,l="M 0,"+s+" a "+r+","+s+" 0,0,0 "+o+" 0 a "+r+","+s+" 0,0,0 "+-o+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+o+" 0 l 0,"+-n,u=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-o/2+","+-(n/2+s)+")");return T(t,u),t.intersect=function(h){const b=N.rect(t,h),f=b.x-t.x;if(r!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(b.y-t.y)>t.height/2-s)){let x=s*s*(1-f*f/(r*r));x!=0&&(x=Math.sqrt(x)),x=s-x,h.y-t.y>0&&(x=-x),b.y+=x}return b},a},"cylinder"),Ir=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes+" "+t.class,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-o,u=t.positioned?-n/2:-i.height/2-o;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ct(r,t.props.borders,s,n),h.delete("borders")),h.forEach(b=>{m.warn(`Unknown node property ${b}`)})}return T(t,r),t.intersect=function(h){return N.rect(t,h)},a},"rect"),Br=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-o,u=t.positioned?-n/2:-i.height/2-o;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ct(r,t.props.borders,s,n),h.delete("borders")),h.forEach(b=>{m.warn(`Unknown node property ${b}`)})}return T(t,r),t.intersect=function(h){return N.rect(t,h)},a},"composite"),Or=g(async(e,t)=>{const{shapeSvg:a}=await R(e,t,"label",!0);m.trace("Classes = ",t.class);const i=a.insert("rect",":first-child"),o=0,r=0;if(i.attr("width",o).attr("height",r),a.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ct(i,t.props.borders,o,r),s.delete("borders")),s.forEach(n=>{m.warn(`Unknown node property ${n}`)})}return T(t,i),t.intersect=function(s){return N.rect(t,s)},a},"labelRect");function ct(e,t,a,i){const o=[],r=g(n=>{o.push(n,0)},"addBorder"),s=g(n=>{o.push(0,n)},"skipBorder");t.includes("t")?(m.debug("add top border"),r(a)):s(a),t.includes("r")?(m.debug("add right border"),r(i)):s(i),t.includes("b")?(m.debug("add bottom border"),r(a)):s(a),t.includes("l")?(m.debug("add left border"),r(i)):s(i),e.attr("stroke-dasharray",o.join(" "))}g(ct,"applyNodePropertyBorders");var zr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof n=="object"?l=n[0]:l=n,m.info("Label text abc79",l,n,typeof n=="object");const u=s.node().appendChild(await K(l,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(B().flowchart.htmlLabels)){const S=u.children[0],k=I(u);h=S.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}m.info("Text 2",n);const b=n.slice(1,n.length);let f=u.getBBox();const x=s.node().appendChild(await K(b.join?b.join("<br/>"):b,t.labelStyle,!0,!0));if(H(B().flowchart.htmlLabels)){const S=x.children[0],k=I(x);h=S.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}const L=t.padding/2;return I(x).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+L+5)+")"),I(u).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-L+3)+")"),o.attr("class","outer title-state").attr("x",-h.width/2-L).attr("y",-h.height/2-L).attr("width",h.width+t.padding).attr("height",h.height+t.padding),r.attr("class","divider").attr("x1",-h.width/2-L).attr("x2",h.width/2+L).attr("y1",-h.height/2-L+f.height+L).attr("y2",-h.height/2-L+f.height+L),T(t,o),t.intersect=function(S){return N.rect(t,S)},i},"rectWithTitle"),Rr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.height+t.padding,r=i.width+o/4+t.padding,s=a.insert("rect",":first-child").attr("style",t.style).attr("rx",o/2).attr("ry",o/2).attr("x",-r/2).attr("y",-o/2).attr("width",r).attr("height",o);return T(t,s),t.intersect=function(n){return N.rect(t,n)},a},"stadium"),Ar=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,W(t,void 0),!0),r=a.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("Circle main"),T(t,r),t.intersect=function(s){return m.info("Circle intersect",t,i.width/2+o,s),N.circle(t,i.width/2+o,s)},a},"circle"),Mr=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,W(t,void 0),!0),r=5,s=a.insert("g",":first-child"),n=s.insert("circle"),l=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("DoubleCircle main"),T(t,n),t.intersect=function(u){return m.info("DoubleCircle intersect",t,i.width/2+o+r,u),N.circle(t,i.width/2+o+r,u)},a},"doublecircle"),Pr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,W(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:o,y:0},{x:o,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"subroutine"),Yr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),T(t,i),t.intersect=function(o){return N.circle(t,7,o)},a},"start"),Rt=g((e,t,a)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o=70,r=10;a==="LR"&&(o=10,r=70);const s=i.append("rect").attr("x",-1*o/2).attr("y",-1*r/2).attr("width",o).attr("height",r).attr("class","fork-join");return T(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return N.rect(t,n)},i},"forkJoin"),Wr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),o=a.insert("circle",":first-child");return o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),T(t,o),t.intersect=function(r){return N.circle(t,7,r)},a},"end"),Xr=g(async(e,t)=>{const a=t.padding/2,i=4,o=8;let r;t.classes?r="node "+t.classes:r="node default";const s=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line");let h=0,b=i;const f=s.insert("g").attr("class","label");let x=0;const L=t.classData.annotations?.[0],S=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",k=f.node().appendChild(await K(S,t.labelStyle,!0,!0));let $=k.getBBox();if(H(B().flowchart.htmlLabels)){const d=k.children[0],_=I(k);$=d.getBoundingClientRect(),_.attr("width",$.width),_.attr("height",$.height)}t.classData.annotations[0]&&(b+=$.height+i,h+=$.width);let D=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(B().flowchart.htmlLabels?D+="&lt;"+t.classData.type+"&gt;":D+="<"+t.classData.type+">");const v=f.node().appendChild(await K(D,t.labelStyle,!0,!0));I(v).attr("class","classTitle");let c=v.getBBox();if(H(B().flowchart.htmlLabels)){const d=v.children[0],_=I(v);c=d.getBoundingClientRect(),_.attr("width",c.width),_.attr("height",c.height)}b+=c.height+i,c.width>h&&(h=c.width);const p=[];t.classData.members.forEach(async d=>{const _=d.getDisplayDetails();let y=_.displayText;B().flowchart.htmlLabels&&(y=y.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const A=f.node().appendChild(await K(y,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(H(B().flowchart.htmlLabels)){const q=A.children[0],j=I(A);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),b+=O.height+i,p.push(A)}),b+=o;const w=[];if(t.classData.methods.forEach(async d=>{const _=d.getDisplayDetails();let y=_.displayText;B().flowchart.htmlLabels&&(y=y.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const A=f.node().appendChild(await K(y,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(H(B().flowchart.htmlLabels)){const q=A.children[0],j=I(A);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),b+=O.height+i,w.push(A)}),b+=o,L){let d=(h-$.width)/2;I(k).attr("transform","translate( "+(-1*h/2+d)+", "+-1*b/2+")"),x=$.height+i}let E=(h-c.width)/2;return I(v).attr("transform","translate( "+(-1*h/2+E)+", "+(-1*b/2+x)+")"),x+=c.height+i,l.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-b/2-a+o+x).attr("y2",-b/2-a+o+x),x+=o,p.forEach(d=>{I(d).attr("transform","translate( "+-h/2+", "+(-1*b/2+x+o/2)+")");const _=d?.getBBox();x+=(_?.height??0)+i}),x+=o,u.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-b/2-a+o+x).attr("y2",-b/2-a+o+x),x+=o,w.forEach(d=>{I(d).attr("transform","translate( "+-h/2+", "+(-1*b/2+x)+")");const _=d?.getBBox();x+=(_?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-(b/2)-a).attr("width",h+t.padding).attr("height",b+t.padding),T(t,n),t.intersect=function(d){return N.rect(t,d)},s},"class_box"),At={rhombus:zt,composite:Br,question:zt,rect:Ir,labelRect:Or,rectWithTitle:zr,choice:Sr,circle:Ar,doublecircle:Mr,stadium:Rr,hexagon:kr,block_arrow:_r,rect_left_inv_arrow:Er,lean_right:Dr,lean_left:vr,trapezoid:Nr,inv_trapezoid:Tr,rect_right_inv_arrow:$r,cylinder:Cr,start:Yr,end:Wr,note:Lr,subroutine:Pr,fork:Rt,join:Rt,class_box:Xr},nt={},Qt=g(async(e,t,a)=>{let i,o;if(t.link){let r;B().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",r),o=await At[t.shape](i,t,a)}else o=await At[t.shape](e,t,a),i=o;return t.tooltip&&o.attr("title",t.tooltip),t.class&&o.attr("class","node default "+t.class),nt[t.id]=i,t.haveCallback&&nt[t.id].attr("class",nt[t.id].attr("class")+" clickable"),i},"insertNode"),Kr=g(e=>{const t=nt[e.id];m.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");function Dt(e,t,a=!1){const i=e;let o="default";(i?.classes?.length||0)>0&&(o=(i?.classes??[]).join(" ")),o=o+" flowchart-label";let r=0,s="",n;switch(i.type){case"round":r=5,s="rect";break;case"composite":r=0,s="composite",n=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const l=we(i?.styles??[]),u=i.label,h=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:r,ry:r,class:o,style:l.style,id:i.id,directions:i.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:a,intersect:void 0,type:i.type,padding:n??rt()?.block?.padding??0}}g(Dt,"getNodeFromBlock");async function te(e,t,a){const i=Dt(t,a,!1);if(i.type==="group")return;const o=rt(),r=await Qt(e,i,{config:o}),s=r.node().getBBox(),n=a.getBlock(i.id);n.size={width:s.width,height:s.height,x:0,y:0,node:r},a.setBlock(n),r.remove()}g(te,"calculateBlockSize");async function ee(e,t,a){const i=Dt(t,a,!0);if(a.getBlock(i.id).type!=="space"){const o=rt();await Qt(e,i,{config:o}),t.intersect=i?.intersect,Kr(i)}}g(ee,"insertBlockPositioned");async function dt(e,t,a,i){for(const o of t)await i(e,o,a),o.children&&await dt(e,o.children,a,i)}g(dt,"performOperations");async function re(e,t,a){await dt(e,t,a,te)}g(re,"calculateBlockSizes");async function ae(e,t,a){await dt(e,t,a,ee)}g(ae,"insertBlocks");async function se(e,t,a,i,o){const r=new Le({multigraph:!0,compound:!0});r.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of a)s.size&&r.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const n=i.getBlock(s.start),l=i.getBlock(s.end);if(n?.size&&l?.size){const u=n.size,h=l.size,b=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];hr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",r,o),s.label&&(await or(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),lr({...s,x:b[1].x,y:b[1].y},{originalPath:b}))}}}g(se,"insertEdges");var Ur=g(function(e,t){return t.db.getClasses()},"getClasses"),Fr=g(async function(e,t,a,i){const{securityLevel:o,block:r}=rt(),s=i.db;let n;o==="sandbox"&&(n=I("#i"+t));const l=o==="sandbox"?I(n.nodes()[0].contentDocument.body):I("body"),u=o==="sandbox"?l.select(`[id="${t}"]`):I(`[id="${t}"]`);rr(u,["point","circle","cross"],i.type,t);const h=s.getBlocks(),b=s.getBlocksFlat(),f=s.getEdges(),x=u.insert("g").attr("class","block");await re(x,h,s);const L=Ft(s);if(await ae(x,h,s),await se(x,f,b,s,t),L){const S=L,k=Math.max(1,Math.round(.125*(S.width/S.height))),$=S.height+k+10,D=S.width+10,{useMaxWidth:v}=r;ce(u,$,D,!!v),m.debug("Here Bounds",L,S),u.attr("viewBox",`${S.x-5} ${S.y-5} ${S.width+10} ${S.height+10}`)}},"draw"),jr={draw:Fr,getClasses:Ur},Qr={parser:ke,db:Xe,renderer:jr,styles:Ue};export{Qr as diagram};
122
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,o=e.y,r=Math.abs(i-a.x),s=e.width/2;let n=a.x<t.x?s-r:s+r;const l=e.height/2,u=Math.abs(t.y-a.y),h=Math.abs(t.x-a.x);if(Math.abs(o-t.y)*s>Math.abs(i-t.x)*l){let b=a.y<t.y?t.y-l-o:o-l-t.y;n=h*b/u;const f={x:a.x<t.x?a.x+n:a.x-h+n,y:a.y<t.y?a.y+u-b:a.y-u+b};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),u===0&&(f.y=t.y),m.debug(`abc89 topp/bott calc, Q ${u}, q ${b}, R ${h}, r ${n}`,f),f}else{a.x<t.x?n=t.x-s-i:n=i-s-t.x;let b=u*n/h,f=a.x<t.x?a.x+h-n:a.x-h+n,x=a.y<t.y?a.y+b:a.y-b;return m.debug(`sides calc abc89, Q ${u}, q ${b}, R ${h}, r ${n}`,{_x:f,_y:x}),n===0&&(f=t.x,x=t.y),h===0&&(f=t.x),u===0&&(x=t.y),{x:f,y:x}}},"intersection"),Bt=g((e,t)=>{m.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],o=!1;return e.forEach(r=>{if(!cr(t,r)&&!o){const s=dr(t,i,r);let n=!1;a.forEach(l=>{n=n||l.x===s.x&&l.y===s.y}),a.some(l=>l.x===s.x&&l.y===s.y)||a.push(s),o=!0}else i=r,o||a.push(r)}),a},"cutPathAtIntersect"),hr=g(function(e,t,a,i,o,r,s){let n=a.points;m.debug("abc88 InsertEdge: edge=",a,"e=",t);let l=!1;const u=r.node(t.v);var h=r.node(t.w);h?.intersect&&u?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),a.toCluster&&(m.debug("to cluster abc88",i[a.toCluster]),n=Bt(a.points,i[a.toCluster].node),l=!0),a.fromCluster&&(m.debug("from cluster abc88",i[a.fromCluster]),n=Bt(n.reverse(),i[a.fromCluster].node).reverse(),l=!0);const b=n.filter(c=>!Number.isNaN(c.y));let f=ye;a.curve&&(o==="graph"||o==="flowchart")&&(f=a.curve);const{x,y:L}=ge(a),S=ue().x(x).y(L).curve(f);let k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}const $=e.append("path").attr("d",S(b)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style);let D="";(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(D=pe(!0)),ir($,a,D,s,o);let v={};return l&&(v.updatedPath=n),v.originalPath=a.points,v},"insertEdge"),gr=g(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),ur=g((e,t,a)=>{const i=gr(e),o=2,r=t.height+2*a.padding,s=r/o,n=t.width+2*s+a.padding,l=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*l},{x:n-s,y:0},{x:n,y:0},{x:n,y:-r/3},{x:n+2*l,y:-r/2},{x:n,y:-2*r/3},{x:n,y:-r},{x:n-s,y:-r},{x:n/2,y:-r-2*l},{x:s,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*l,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-r},{x:n-s,y:-r},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-r+s},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-r+s},{x:n,y:-r}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-r+l},{x:0,y:-r+l},{x:n/2,y:-r},{x:n,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l},{x:n,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-r}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-r}]:i.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r+l}]:i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:-r+l},{x:s,y:-r+l},{x:s,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:s,y:-l},{x:s,y:-r+l},{x:0,y:-r+l},{x:n/2,y:-r},{x:n,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-r+l},{x:n-s,y:-r+l},{x:n-s,y:-l},{x:n,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function Ht(e,t){return e.intersect(t)}g(Ht,"intersectNode");var yr=Ht;function Zt(e,t,a,i){var o=e.x,r=e.y,s=o-i.x,n=r-i.y,l=Math.sqrt(t*t*n*n+a*a*s*s),u=Math.abs(t*a*s/l);i.x<o&&(u=-u);var h=Math.abs(t*a*n/l);return i.y<r&&(h=-h),{x:o+u,y:r+h}}g(Zt,"intersectEllipse");var qt=Zt;function Vt(e,t,a){return qt(e,t,t,a)}g(Vt,"intersectCircle");var pr=Vt;function Jt(e,t,a,i){var o,r,s,n,l,u,h,b,f,x,L,S,k,$,D;if(o=t.y-e.y,s=e.x-t.x,l=t.x*e.y-e.x*t.y,f=o*a.x+s*a.y+l,x=o*i.x+s*i.y+l,!(f!==0&&x!==0&&Lt(f,x))&&(r=i.y-a.y,n=a.x-i.x,u=i.x*a.y-a.x*i.y,h=r*e.x+n*e.y+u,b=r*t.x+n*t.y+u,!(h!==0&&b!==0&&Lt(h,b))&&(L=o*n-r*s,L!==0)))return S=Math.abs(L/2),k=s*u-n*l,$=k<0?(k-S)/L:(k+S)/L,k=r*l-o*u,D=k<0?(k-S)/L:(k+S)/L,{x:$,y:D}}g(Jt,"intersectLine");function Lt(e,t){return e*t>0}g(Lt,"sameSign");var br=Jt,xr=Gt;function Gt(e,t,a){var i=e.x,o=e.y,r=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(L){s=Math.min(s,L.x),n=Math.min(n,L.y)}):(s=Math.min(s,t.x),n=Math.min(n,t.y));for(var l=i-e.width/2-s,u=o-e.height/2-n,h=0;h<t.length;h++){var b=t[h],f=t[h<t.length-1?h+1:0],x=br(e,a,{x:l+b.x,y:u+b.y},{x:l+f.x,y:u+f.y});x&&r.push(x)}return r.length?(r.length>1&&r.sort(function(L,S){var k=L.x-a.x,$=L.y-a.y,D=Math.sqrt(k*k+$*$),v=S.x-a.x,c=S.y-a.y,p=Math.sqrt(v*v+c*c);return D<p?-1:D===p?0:1}),r[0]):e}g(Gt,"intersectPolygon");var fr=g((e,t)=>{var a=e.x,i=e.y,o=t.x-a,r=t.y-i,s=e.width/2,n=e.height/2,l,u;return Math.abs(r)*s>Math.abs(o)*n?(r<0&&(n=-n),l=r===0?0:n*o/r,u=n):(o<0&&(s=-s),l=s,u=o===0?0:s*r/o),{x:a+l,y:i+u}},"intersectRect"),wr=fr,N={node:yr,circle:pr,ellipse:qt,polygon:xr,rect:wr},R=g(async(e,t,a,i)=>{const o=B();let r;const s=t.useHtmlLabels||H(o.flowchart.htmlLabels);a?r=a:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),l=n.insert("g").attr("class","label").attr("style",t.labelStyle);let u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=l.node();let b;t.labelType==="markdown"?b=Mt(l,bt(pt(u),o),{useHtmlLabels:s,width:t.width||o.flowchart.wrappingWidth,classes:"markdown-node-label"},o):b=h.appendChild(await K(bt(pt(u),o),t.labelStyle,!1,i));let f=b.getBBox();const x=t.padding/2;if(H(o.flowchart.htmlLabels)){const L=b.children[0],S=I(b),k=L.getElementsByTagName("img");if(k){const $=u.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...k].map(D=>new Promise(v=>{function c(){if(D.style.display="flex",D.style.flexDirection="column",$){const p=o.fontSize?o.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(p,10)*5+"px";D.style.minWidth=w,D.style.maxWidth=w}else D.style.width="100%";v(D)}g(c,"setupImage"),setTimeout(()=>{D.complete&&c()}),D.addEventListener("error",c),D.addEventListener("load",c)})))}f=L.getBoundingClientRect(),S.attr("width",f.width),S.attr("height",f.height)}return s?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:n,bbox:f,halfPadding:x,label:l}},"labelHelper"),T=g((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function F(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(F,"insertPolygonShape");var mr=g(async(e,t)=>{t.useHtmlLabels||B().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes,!0);m.info("Classes = ",t.classes);const r=a.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-o).attr("y",-i.height/2-o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),T(t,r),t.intersect=function(s){return N.rect(t,s)},a},"note"),Lr=mr,Ot=g(e=>e?" "+e:"","formatClass"),X=g((e,t)=>`${t||"node default"}${Ot(e.classes)} ${Ot(e.class)}`,"getClassesFromNode"),zt=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=o+r,n=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];m.info("Question main (Circle)");const l=F(a,s,s,n);return l.attr("style",t.style),T(t,l),t.intersect=function(u){return m.warn("Intersect called"),N.polygon(t,n,u)},a},"question"),Sr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,o=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",o.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return N.circle(t,14,r)},a},"choice"),kr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=4,r=i.height+t.padding,s=r/o,n=i.width+2*s+t.padding,l=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-r/2},{x:n-s,y:-r},{x:s,y:-r},{x:0,y:-r/2}],u=F(a,n,r,l);return u.attr("style",t.style),T(t,u),t.intersect=function(h){return N.polygon(t,l,h)},a},"hexagon"),_r=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,void 0,!0),o=2,r=i.height+2*t.padding,s=r/o,n=i.width+2*s+t.padding,l=ur(t.directions,i,t),u=F(a,n,r,l);return u.attr("style",t.style),T(t,u),t.intersect=function(h){return N.polygon(t,l,h)},a},"block_arrow"),Er=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-r/2,y:0},{x:o,y:0},{x:o,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return F(a,o,r,s).attr("style",t.style),t.width=o+r,t.height=r,t.intersect=function(n){return N.polygon(t,s,n)},a},"rect_left_inv_arrow"),Dr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:o-r/6,y:0},{x:o+2*r/6,y:-r},{x:r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"lean_right"),vr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:2*r/6,y:0},{x:o+r/6,y:0},{x:o-2*r/6,y:-r},{x:-r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"lean_left"),Nr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:-2*r/6,y:0},{x:o+2*r/6,y:0},{x:o-r/6,y:-r},{x:r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"trapezoid"),Tr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:r/6,y:0},{x:o-r/6,y:0},{x:o+2*r/6,y:-r},{x:-2*r/6,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"inv_trapezoid"),$r=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:o+r/2,y:0},{x:o,y:-r/2},{x:o+r/2,y:-r},{x:0,y:-r}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"rect_right_inv_arrow"),Cr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=o/2,s=r/(2.5+o/50),n=i.height+s+t.padding,l="M 0,"+s+" a "+r+","+s+" 0,0,0 "+o+" 0 a "+r+","+s+" 0,0,0 "+-o+" 0 l 0,"+n+" a "+r+","+s+" 0,0,0 "+o+" 0 l 0,"+-n,u=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-o/2+","+-(n/2+s)+")");return T(t,u),t.intersect=function(h){const b=N.rect(t,h),f=b.x-t.x;if(r!=0&&(Math.abs(f)<t.width/2||Math.abs(f)==t.width/2&&Math.abs(b.y-t.y)>t.height/2-s)){let x=s*s*(1-f*f/(r*r));x!=0&&(x=Math.sqrt(x)),x=s-x,h.y-t.y>0&&(x=-x),b.y+=x}return b},a},"cylinder"),Ir=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes+" "+t.class,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-o,u=t.positioned?-n/2:-i.height/2-o;if(r.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ct(r,t.props.borders,s,n),h.delete("borders")),h.forEach(b=>{m.warn(`Unknown node property ${b}`)})}return T(t,r),t.intersect=function(h){return N.rect(t,h)},a},"rect"),Br=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,"node "+t.classes,!0),r=a.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,l=t.positioned?-s/2:-i.width/2-o,u=t.positioned?-n/2:-i.height/2-o;if(r.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",s).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ct(r,t.props.borders,s,n),h.delete("borders")),h.forEach(b=>{m.warn(`Unknown node property ${b}`)})}return T(t,r),t.intersect=function(h){return N.rect(t,h)},a},"composite"),Or=g(async(e,t)=>{const{shapeSvg:a}=await R(e,t,"label",!0);m.trace("Classes = ",t.class);const i=a.insert("rect",":first-child"),o=0,r=0;if(i.attr("width",o).attr("height",r),a.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ct(i,t.props.borders,o,r),s.delete("borders")),s.forEach(n=>{m.warn(`Unknown node property ${n}`)})}return T(t,i),t.intersect=function(s){return N.rect(t,s)},a},"labelRect");function ct(e,t,a,i){const o=[],r=g(n=>{o.push(n,0)},"addBorder"),s=g(n=>{o.push(0,n)},"skipBorder");t.includes("t")?(m.debug("add top border"),r(a)):s(a),t.includes("r")?(m.debug("add right border"),r(i)):s(i),t.includes("b")?(m.debug("add bottom border"),r(a)):s(a),t.includes("l")?(m.debug("add left border"),r(i)):s(i),e.attr("stroke-dasharray",o.join(" "))}g(ct,"applyNodePropertyBorders");var zr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=i.insert("rect",":first-child"),r=i.insert("line"),s=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof n=="object"?l=n[0]:l=n,m.info("Label text abc79",l,n,typeof n=="object");const u=s.node().appendChild(await K(l,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(B().flowchart.htmlLabels)){const S=u.children[0],k=I(u);h=S.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}m.info("Text 2",n);const b=n.slice(1,n.length);let f=u.getBBox();const x=s.node().appendChild(await K(b.join?b.join("<br/>"):b,t.labelStyle,!0,!0));if(H(B().flowchart.htmlLabels)){const S=x.children[0],k=I(x);h=S.getBoundingClientRect(),k.attr("width",h.width),k.attr("height",h.height)}const L=t.padding/2;return I(x).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+L+5)+")"),I(u).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-L+3)+")"),o.attr("class","outer title-state").attr("x",-h.width/2-L).attr("y",-h.height/2-L).attr("width",h.width+t.padding).attr("height",h.height+t.padding),r.attr("class","divider").attr("x1",-h.width/2-L).attr("x2",h.width/2+L).attr("y1",-h.height/2-L+f.height+L).attr("y2",-h.height/2-L+f.height+L),T(t,o),t.intersect=function(S){return N.rect(t,S)},i},"rectWithTitle"),Rr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.height+t.padding,r=i.width+o/4+t.padding,s=a.insert("rect",":first-child").attr("style",t.style).attr("rx",o/2).attr("ry",o/2).attr("x",-r/2).attr("y",-o/2).attr("width",r).attr("height",o);return T(t,s),t.intersect=function(n){return N.rect(t,n)},a},"stadium"),Ar=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,X(t,void 0),!0),r=a.insert("circle",":first-child");return r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("Circle main"),T(t,r),t.intersect=function(s){return m.info("Circle intersect",t,i.width/2+o,s),N.circle(t,i.width/2+o,s)},a},"circle"),Mr=g(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:o}=await R(e,t,X(t,void 0),!0),r=5,s=a.insert("g",":first-child"),n=s.insert("circle"),l=s.insert("circle");return s.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o+r).attr("width",i.width+t.padding+r*2).attr("height",i.height+t.padding+r*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+o).attr("width",i.width+t.padding).attr("height",i.height+t.padding),m.info("DoubleCircle main"),T(t,n),t.intersect=function(u){return m.info("DoubleCircle intersect",t,i.width/2+o+r,u),N.circle(t,i.width/2+o+r,u)},a},"doublecircle"),Pr=g(async(e,t)=>{const{shapeSvg:a,bbox:i}=await R(e,t,X(t,void 0),!0),o=i.width+t.padding,r=i.height+t.padding,s=[{x:0,y:0},{x:o,y:0},{x:o,y:-r},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-r},{x:-8,y:-r},{x:-8,y:0}],n=F(a,o,r,s);return n.attr("style",t.style),T(t,n),t.intersect=function(l){return N.polygon(t,s,l)},a},"subroutine"),Yr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),T(t,i),t.intersect=function(o){return N.circle(t,7,o)},a},"start"),Rt=g((e,t,a)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o=70,r=10;a==="LR"&&(o=10,r=70);const s=i.append("rect").attr("x",-1*o/2).attr("y",-1*r/2).attr("width",o).attr("height",r).attr("class","fork-join");return T(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return N.rect(t,n)},i},"forkJoin"),Xr=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),o=a.insert("circle",":first-child");return o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),T(t,o),t.intersect=function(r){return N.circle(t,7,r)},a},"end"),Wr=g(async(e,t)=>{const a=t.padding/2,i=4,o=8;let r;t.classes?r="node "+t.classes:r="node default";const s=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line");let h=0,b=i;const f=s.insert("g").attr("class","label");let x=0;const L=t.classData.annotations?.[0],S=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",k=f.node().appendChild(await K(S,t.labelStyle,!0,!0));let $=k.getBBox();if(H(B().flowchart.htmlLabels)){const d=k.children[0],_=I(k);$=d.getBoundingClientRect(),_.attr("width",$.width),_.attr("height",$.height)}t.classData.annotations[0]&&(b+=$.height+i,h+=$.width);let D=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(B().flowchart.htmlLabels?D+="&lt;"+t.classData.type+"&gt;":D+="<"+t.classData.type+">");const v=f.node().appendChild(await K(D,t.labelStyle,!0,!0));I(v).attr("class","classTitle");let c=v.getBBox();if(H(B().flowchart.htmlLabels)){const d=v.children[0],_=I(v);c=d.getBoundingClientRect(),_.attr("width",c.width),_.attr("height",c.height)}b+=c.height+i,c.width>h&&(h=c.width);const p=[];t.classData.members.forEach(async d=>{const _=d.getDisplayDetails();let y=_.displayText;B().flowchart.htmlLabels&&(y=y.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const A=f.node().appendChild(await K(y,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(H(B().flowchart.htmlLabels)){const q=A.children[0],j=I(A);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),b+=O.height+i,p.push(A)}),b+=o;const w=[];if(t.classData.methods.forEach(async d=>{const _=d.getDisplayDetails();let y=_.displayText;B().flowchart.htmlLabels&&(y=y.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const A=f.node().appendChild(await K(y,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(H(B().flowchart.htmlLabels)){const q=A.children[0],j=I(A);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>h&&(h=O.width),b+=O.height+i,w.push(A)}),b+=o,L){let d=(h-$.width)/2;I(k).attr("transform","translate( "+(-1*h/2+d)+", "+-1*b/2+")"),x=$.height+i}let E=(h-c.width)/2;return I(v).attr("transform","translate( "+(-1*h/2+E)+", "+(-1*b/2+x)+")"),x+=c.height+i,l.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-b/2-a+o+x).attr("y2",-b/2-a+o+x),x+=o,p.forEach(d=>{I(d).attr("transform","translate( "+-h/2+", "+(-1*b/2+x+o/2)+")");const _=d?.getBBox();x+=(_?.height??0)+i}),x+=o,u.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-b/2-a+o+x).attr("y2",-b/2-a+o+x),x+=o,w.forEach(d=>{I(d).attr("transform","translate( "+-h/2+", "+(-1*b/2+x)+")");const _=d?.getBBox();x+=(_?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-(b/2)-a).attr("width",h+t.padding).attr("height",b+t.padding),T(t,n),t.intersect=function(d){return N.rect(t,d)},s},"class_box"),At={rhombus:zt,composite:Br,question:zt,rect:Ir,labelRect:Or,rectWithTitle:zr,choice:Sr,circle:Ar,doublecircle:Mr,stadium:Rr,hexagon:kr,block_arrow:_r,rect_left_inv_arrow:Er,lean_right:Dr,lean_left:vr,trapezoid:Nr,inv_trapezoid:Tr,rect_right_inv_arrow:$r,cylinder:Cr,start:Yr,end:Xr,note:Lr,subroutine:Pr,fork:Rt,join:Rt,class_box:Wr},nt={},Qt=g(async(e,t,a)=>{let i,o;if(t.link){let r;B().securityLevel==="sandbox"?r="_top":t.linkTarget&&(r=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",r),o=await At[t.shape](i,t,a)}else o=await At[t.shape](e,t,a),i=o;return t.tooltip&&o.attr("title",t.tooltip),t.class&&o.attr("class","node default "+t.class),nt[t.id]=i,t.haveCallback&&nt[t.id].attr("class",nt[t.id].attr("class")+" clickable"),i},"insertNode"),Kr=g(e=>{const t=nt[e.id];m.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");function Dt(e,t,a=!1){const i=e;let o="default";(i?.classes?.length||0)>0&&(o=(i?.classes??[]).join(" ")),o=o+" flowchart-label";let r=0,s="",n;switch(i.type){case"round":r=5,s="rect";break;case"composite":r=0,s="composite",n=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const l=we(i?.styles??[]),u=i.label,h=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:r,ry:r,class:o,style:l.style,id:i.id,directions:i.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:a,intersect:void 0,type:i.type,padding:n??rt()?.block?.padding??0}}g(Dt,"getNodeFromBlock");async function te(e,t,a){const i=Dt(t,a,!1);if(i.type==="group")return;const o=rt(),r=await Qt(e,i,{config:o}),s=r.node().getBBox(),n=a.getBlock(i.id);n.size={width:s.width,height:s.height,x:0,y:0,node:r},a.setBlock(n),r.remove()}g(te,"calculateBlockSize");async function ee(e,t,a){const i=Dt(t,a,!0);if(a.getBlock(i.id).type!=="space"){const o=rt();await Qt(e,i,{config:o}),t.intersect=i?.intersect,Kr(i)}}g(ee,"insertBlockPositioned");async function dt(e,t,a,i){for(const o of t)await i(e,o,a),o.children&&await dt(e,o.children,a,i)}g(dt,"performOperations");async function re(e,t,a){await dt(e,t,a,te)}g(re,"calculateBlockSizes");async function ae(e,t,a){await dt(e,t,a,ee)}g(ae,"insertBlocks");async function se(e,t,a,i,o){const r=new Le({multigraph:!0,compound:!0});r.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of a)s.size&&r.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const n=i.getBlock(s.start),l=i.getBlock(s.end);if(n?.size&&l?.size){const u=n.size,h=l.size,b=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}];hr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",r,o),s.label&&(await or(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:b,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),lr({...s,x:b[1].x,y:b[1].y},{originalPath:b}))}}}g(se,"insertEdges");var Ur=g(function(e,t){return t.db.getClasses()},"getClasses"),Fr=g(async function(e,t,a,i){const{securityLevel:o,block:r}=rt(),s=i.db;let n;o==="sandbox"&&(n=I("#i"+t));const l=o==="sandbox"?I(n.nodes()[0].contentDocument.body):I("body"),u=o==="sandbox"?l.select(`[id="${t}"]`):I(`[id="${t}"]`);rr(u,["point","circle","cross"],i.type,t);const h=s.getBlocks(),b=s.getBlocksFlat(),f=s.getEdges(),x=u.insert("g").attr("class","block");await re(x,h,s);const L=Ft(s);if(await ae(x,h,s),await se(x,f,b,s,t),L){const S=L,k=Math.max(1,Math.round(.125*(S.width/S.height))),$=S.height+k+10,D=S.width+10,{useMaxWidth:v}=r;ce(u,$,D,!!v),m.debug("Here Bounds",L,S),u.attr("viewBox",`${S.x-5} ${S.y-5} ${S.width+10} ${S.height+10}`)}},"draw"),jr={draw:Fr,getClasses:Ur},Qr={parser:ke,db:We,renderer:jr,styles:Ue};export{Qr as diagram};
@@ -1,4 +1,4 @@
1
- import{g as oe}from"./chunk-FMBD7UC4-GQVp2u3C.js";import{bE as d,cb as rt,bK as O,bM as he,bL as L,c3 as de,c5 as ge,bJ as R,cR as ue,cz as pe,cH as fe,cE as xe,cS as j,cT as Wt,cU as ye,bY as $,bS as be,cV as we,cW as xt,bP as yt,cX as me}from"./index-B7GqH6If.js";import{c as Le}from"./clone-B4FGNCC9.js";import{G as Se}from"./graph-D9RB6DwV.js";import{c as ke}from"./channel-B6afjgOL.js";import"./_baseUniq-iT192ZJn.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(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:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Tt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Tt,"lex");for(var F,J,H,pt,Q={},st,G,Nt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Tt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
1
+ import{g as oe}from"./chunk-FMBD7UC4-eFjHw5gB.js";import{bE as d,cb as rt,bK as O,bM as he,bL as L,c3 as de,c5 as ge,bJ as R,cR as ue,cz as pe,cH as fe,cE as xe,cS as j,cT as Wt,cU as ye,bY as $,bS as be,cV as we,cW as xt,bP as yt,cX as me}from"./index-BzhKcNOt.js";import{c as Le}from"./clone-B-ElcgAC.js";import{G as Se}from"./graph-C_DQAJXv.js";import{c as ke}from"./channel-C9MJ1fN1.js";import"./_baseUniq-DuAmhUI0.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(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:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Tt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Tt,"lex");for(var F,J,H,pt,Q={},st,G,Nt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Tt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
2
2
  `+z.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":ft="Parse error on line "+(I+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(ft,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ut,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),E.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,Z=z.yyleng,p=z.yytext,I=z.yylineno,ut=z.yylloc;break;case 2:if(G=this.productions_[H[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},le&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),pt=this.performAction.apply(Q,[p,Z,I,q.yy,H[1],E,h].concat(ne)),typeof pt<"u")return pt;G&&(f=f.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),f.push(this.productions_[H[1]][0]),E.push(Q.$),h.push(Q._$),Nt=W[f[f.length-2]][f[f.length-1]],f.push(Nt);break;case 3:return!0}}return!0},"parse")},B=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(y,g){return this.yy=g||this.yy||{},this._input=y,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 y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var g=y.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},"input"),unput:d(function(y){var g=y.length,f=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),f.length-1&&(this.yylineno-=f.length-1);var E=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:f?(f.length===m.length?this.yylloc.first_column:0)+m[m.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-g]),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(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),g=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{y as ve,x as Re}from"./chunk-TZMSLE5B-Coq49FaX-CdOY_0Y9.js";import{H as g,a7 as De,a8 as Pe,a9 as Ne,aa as Be,b as Rt,a5 as jt,z as de,ab as Me,ac as je,ad as wt,ae as fe,af as Le,ag as Ye,ah as Jt,ai as ue}from"./index-B7GqH6If.js";var Yt=(function(){var e=g(function(z,_,x,b){for(x=x||{},b=z.length;b--;x[z[b]]=_);return x},"o"),t=[1,24],r=[1,25],h=[1,26],l=[1,27],a=[1,28],s=[1,63],i=[1,64],n=[1,65],d=[1,66],u=[1,67],y=[1,68],f=[1,69],E=[1,29],T=[1,30],v=[1,31],B=[1,32],X=[1,33],I=[1,34],q=[1,35],V=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],tt=[1,41],et=[1,42],at=[1,43],nt=[1,44],it=[1,45],st=[1,46],rt=[1,47],lt=[1,48],ot=[1,50],ct=[1,51],ht=[1,52],dt=[1,53],ut=[1,54],pt=[1,55],yt=[1,56],ft=[1,57],gt=[1,58],bt=[1,59],_t=[1,60],Ot=[14,42],zt=[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],Tt=[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],S=[1,82],C=[1,83],A=[1,84],O=[1,85],k=[12,14,42],re=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],Et=[12,33],Qt=[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],$t={trace:g(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:g(function(z,_,x,b,w,o,P){var p=o.length-1;switch(w){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 St={};St[o[p-1].trim()]=o[p].trim(),this.$=St;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:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:70,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:71,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:72,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:73,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{14:[1,74]},e(Ot,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:i,37:n,38:d,39:u,40:y,41:f,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t}),e(Ot,[2,14]),e(zt,[2,16],{12:[1,76]}),e(Ot,[2,36],{12:[1,77]}),e(Tt,[2,19]),e(Tt,[2,20]),{25:[1,78]},{27:[1,79]},e(Tt,[2,23]),{35:80,75:81,76:S,77:C,79:A,80:O},{35:86,75:81,76:S,77:C,79:A,80:O},{35:87,75:81,76:S,77:C,79:A,80:O},{35:88,75:81,76:S,77:C,79:A,80:O},{35:89,75:81,76:S,77:C,79:A,80:O},{35:90,75:81,76:S,77:C,79:A,80:O},{35:91,75:81,76:S,77:C,79:A,80:O},{35:92,75:81,76:S,77:C,79:A,80:O},{35:93,75:81,76:S,77:C,79:A,80:O},{35:94,75:81,76:S,77:C,79:A,80:O},{35:95,75:81,76:S,77:C,79:A,80:O},{35:96,75:81,76:S,77:C,79:A,80:O},{35:97,75:81,76:S,77:C,79:A,80:O},{35:98,75:81,76:S,77:C,79:A,80:O},{35:99,75:81,76:S,77:C,79:A,80:O},{35:100,75:81,76:S,77:C,79:A,80:O},{35:101,75:81,76:S,77:C,79:A,80:O},{35:102,75:81,76:S,77:C,79:A,80:O},{35:103,75:81,76:S,77:C,79:A,80:O},{35:104,75:81,76:S,77:C,79:A,80:O},e(k,[2,59]),{35:105,75:81,76:S,77:C,79:A,80:O},{35:106,75:81,76:S,77:C,79:A,80:O},{35:107,75:81,76:S,77:C,79:A,80:O},{35:108,75:81,76:S,77:C,79:A,80:O},{35:109,75:81,76:S,77:C,79:A,80:O},{35:110,75:81,76:S,77:C,79:A,80:O},{35:111,75:81,76:S,77:C,79:A,80:O},{35:112,75:81,76:S,77:C,79:A,80:O},{35:113,75:81,76:S,77:C,79:A,80:O},{35:114,75:81,76:S,77:C,79:A,80:O},{35:115,75:81,76:S,77:C,79:A,80:O},{20:116,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:C,79:A,80:O},{35:120,75:81,76:S,77:C,79:A,80:O},{35:121,75:81,76:S,77:C,79:A,80:O},{35:122,75:81,76:S,77:C,79:A,80:O},{35:123,75:81,76:S,77:C,79:A,80:O},{35:124,75:81,76:S,77:C,79:A,80:O},{35:125,75:81,76:S,77:C,79:A,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ot,[2,15]),e(zt,[2,17],{21:22,19:130,22:t,23:r,24:h,26:l,28:a}),e(Ot,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:h,26:l,28:a,34:s,36:i,37:n,38:d,39:u,40:y,41:f,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t}),e(Tt,[2,21]),e(Tt,[2,22]),e(k,[2,39]),e(re,[2,71],{75:81,35:132,76:S,77:C,79:A,80:O}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(k,[2,40]),e(k,[2,41]),e(k,[2,42]),e(k,[2,43]),e(k,[2,44]),e(k,[2,45]),e(k,[2,46]),e(k,[2,47]),e(k,[2,48]),e(k,[2,49]),e(k,[2,50]),e(k,[2,51]),e(k,[2,52]),e(k,[2,53]),e(k,[2,54]),e(k,[2,55]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(k,[2,65]),e(k,[2,66]),e(k,[2,67]),e(k,[2,68]),e(k,[2,69]),e(k,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Et,[2,28]),e(Et,[2,29]),e(Et,[2,30]),e(Et,[2,31]),e(Et,[2,32]),e(Et,[2,33]),e(Et,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(zt,[2,18]),e(Ot,[2,38]),e(re,[2,72]),e(Pt,[2,74]),e(k,[2,24]),e(k,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[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:g(function(z,_){if(_.recoverable)this.trace(z);else{var x=new Error(z);throw x.hash=_,x}},"parseError"),parse:g(function(z){var _=this,x=[0],b=[],w=[null],o=[],P=this.table,p="",St=0,le=0,Oe=2,oe=1,ke=o.slice.call(arguments,1),R=Object.create(this.lexer),Ct={yy:{}};for(var Wt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wt)&&(Ct.yy[Wt]=this.yy[Wt]);R.setInput(z,Ct.yy),Ct.yy.lexer=R,Ct.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var Ht=R.yylloc;o.push(Ht);var we=R.options&&R.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(M){x.length=x.length-2*M,w.length=w.length-M,o.length=o.length-M}g(Te,"popStack");function ce(){var M;return M=b.pop()||R.lex()||oe,typeof M!="number"&&(M instanceof Array&&(b=M,M=b.pop()),M=_.symbols_[M]||M),M}g(ce,"lex");for(var N,At,j,qt,kt={},Bt,W,he,Mt;;){if(At=x[x.length-1],this.defaultActions[At]?j=this.defaultActions[At]:((N===null||typeof N>"u")&&(N=ce()),j=P[At]&&P[At][N]),typeof j>"u"||!j.length||!j[0]){var Vt="";Mt=[];for(Bt in P[At])this.terminals_[Bt]&&Bt>Oe&&Mt.push("'"+this.terminals_[Bt]+"'");R.showPosition?Vt="Parse error on line "+(St+1)+`:
1
+ import{y as ve,x as Re}from"./chunk-TZMSLE5B-DfaYobmr-uCvXwJUe.js";import{H as g,a7 as De,a8 as Pe,a9 as Ne,aa as Be,b as Rt,a5 as jt,a as de,ab as Me,ac as je,ad as wt,ae as fe,af as Le,ag as Ye,ah as Jt,ai as ue}from"./index-BzhKcNOt.js";var Yt=(function(){var e=g(function(z,_,x,b){for(x=x||{},b=z.length;b--;x[z[b]]=_);return x},"o"),t=[1,24],r=[1,25],h=[1,26],l=[1,27],a=[1,28],s=[1,63],i=[1,64],n=[1,65],d=[1,66],u=[1,67],y=[1,68],f=[1,69],E=[1,29],T=[1,30],v=[1,31],B=[1,32],X=[1,33],I=[1,34],q=[1,35],V=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],tt=[1,41],et=[1,42],at=[1,43],nt=[1,44],it=[1,45],st=[1,46],rt=[1,47],lt=[1,48],ot=[1,50],ct=[1,51],ht=[1,52],dt=[1,53],ut=[1,54],pt=[1,55],yt=[1,56],ft=[1,57],gt=[1,58],bt=[1,59],_t=[1,60],Ot=[14,42],zt=[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],Tt=[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],S=[1,82],C=[1,83],A=[1,84],O=[1,85],k=[12,14,42],re=[12,14,33,42],Pt=[12,14,33,42,76,77,79,80],Et=[12,33],Qt=[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],$t={trace:g(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:g(function(z,_,x,b,w,o,P){var p=o.length-1;switch(w){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 St={};St[o[p-1].trim()]=o[p].trim(),this.$=St;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:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:70,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:71,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:72,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{13:73,19:20,20:21,21:22,22:t,23:r,24:h,26:l,28:a,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{14:[1,74]},e(Ot,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:i,37:n,38:d,39:u,40:y,41:f,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t}),e(Ot,[2,14]),e(zt,[2,16],{12:[1,76]}),e(Ot,[2,36],{12:[1,77]}),e(Tt,[2,19]),e(Tt,[2,20]),{25:[1,78]},{27:[1,79]},e(Tt,[2,23]),{35:80,75:81,76:S,77:C,79:A,80:O},{35:86,75:81,76:S,77:C,79:A,80:O},{35:87,75:81,76:S,77:C,79:A,80:O},{35:88,75:81,76:S,77:C,79:A,80:O},{35:89,75:81,76:S,77:C,79:A,80:O},{35:90,75:81,76:S,77:C,79:A,80:O},{35:91,75:81,76:S,77:C,79:A,80:O},{35:92,75:81,76:S,77:C,79:A,80:O},{35:93,75:81,76:S,77:C,79:A,80:O},{35:94,75:81,76:S,77:C,79:A,80:O},{35:95,75:81,76:S,77:C,79:A,80:O},{35:96,75:81,76:S,77:C,79:A,80:O},{35:97,75:81,76:S,77:C,79:A,80:O},{35:98,75:81,76:S,77:C,79:A,80:O},{35:99,75:81,76:S,77:C,79:A,80:O},{35:100,75:81,76:S,77:C,79:A,80:O},{35:101,75:81,76:S,77:C,79:A,80:O},{35:102,75:81,76:S,77:C,79:A,80:O},{35:103,75:81,76:S,77:C,79:A,80:O},{35:104,75:81,76:S,77:C,79:A,80:O},e(k,[2,59]),{35:105,75:81,76:S,77:C,79:A,80:O},{35:106,75:81,76:S,77:C,79:A,80:O},{35:107,75:81,76:S,77:C,79:A,80:O},{35:108,75:81,76:S,77:C,79:A,80:O},{35:109,75:81,76:S,77:C,79:A,80:O},{35:110,75:81,76:S,77:C,79:A,80:O},{35:111,75:81,76:S,77:C,79:A,80:O},{35:112,75:81,76:S,77:C,79:A,80:O},{35:113,75:81,76:S,77:C,79:A,80:O},{35:114,75:81,76:S,77:C,79:A,80:O},{35:115,75:81,76:S,77:C,79:A,80:O},{20:116,29:49,30:61,32:62,34:s,36:i,37:n,38:d,39:u,40:y,41:f,43:23,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t},{12:[1,118],33:[1,117]},{35:119,75:81,76:S,77:C,79:A,80:O},{35:120,75:81,76:S,77:C,79:A,80:O},{35:121,75:81,76:S,77:C,79:A,80:O},{35:122,75:81,76:S,77:C,79:A,80:O},{35:123,75:81,76:S,77:C,79:A,80:O},{35:124,75:81,76:S,77:C,79:A,80:O},{35:125,75:81,76:S,77:C,79:A,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ot,[2,15]),e(zt,[2,17],{21:22,19:130,22:t,23:r,24:h,26:l,28:a}),e(Ot,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:h,26:l,28:a,34:s,36:i,37:n,38:d,39:u,40:y,41:f,44:E,45:T,46:v,47:B,48:X,49:I,50:q,51:V,52:G,53:K,54:J,55:Z,56:tt,57:et,58:at,59:nt,60:it,61:st,62:rt,63:lt,64:ot,65:ct,66:ht,67:dt,68:ut,69:pt,70:yt,71:ft,72:gt,73:bt,74:_t}),e(Tt,[2,21]),e(Tt,[2,22]),e(k,[2,39]),e(re,[2,71],{75:81,35:132,76:S,77:C,79:A,80:O}),e(Pt,[2,73]),{78:[1,133]},e(Pt,[2,75]),e(Pt,[2,76]),e(k,[2,40]),e(k,[2,41]),e(k,[2,42]),e(k,[2,43]),e(k,[2,44]),e(k,[2,45]),e(k,[2,46]),e(k,[2,47]),e(k,[2,48]),e(k,[2,49]),e(k,[2,50]),e(k,[2,51]),e(k,[2,52]),e(k,[2,53]),e(k,[2,54]),e(k,[2,55]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(k,[2,65]),e(k,[2,66]),e(k,[2,67]),e(k,[2,68]),e(k,[2,69]),e(k,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(Et,[2,28]),e(Et,[2,29]),e(Et,[2,30]),e(Et,[2,31]),e(Et,[2,32]),e(Et,[2,33]),e(Et,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(zt,[2,18]),e(Ot,[2,38]),e(re,[2,72]),e(Pt,[2,74]),e(k,[2,24]),e(k,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[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:g(function(z,_){if(_.recoverable)this.trace(z);else{var x=new Error(z);throw x.hash=_,x}},"parseError"),parse:g(function(z){var _=this,x=[0],b=[],w=[null],o=[],P=this.table,p="",St=0,le=0,Oe=2,oe=1,ke=o.slice.call(arguments,1),R=Object.create(this.lexer),Ct={yy:{}};for(var Wt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Wt)&&(Ct.yy[Wt]=this.yy[Wt]);R.setInput(z,Ct.yy),Ct.yy.lexer=R,Ct.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var Ht=R.yylloc;o.push(Ht);var we=R.options&&R.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(M){x.length=x.length-2*M,w.length=w.length-M,o.length=o.length-M}g(Te,"popStack");function ce(){var M;return M=b.pop()||R.lex()||oe,typeof M!="number"&&(M instanceof Array&&(b=M,M=b.pop()),M=_.symbols_[M]||M),M}g(ce,"lex");for(var N,At,j,qt,kt={},Bt,W,he,Mt;;){if(At=x[x.length-1],this.defaultActions[At]?j=this.defaultActions[At]:((N===null||typeof N>"u")&&(N=ce()),j=P[At]&&P[At][N]),typeof j>"u"||!j.length||!j[0]){var Vt="";Mt=[];for(Bt in P[At])this.terminals_[Bt]&&Bt>Oe&&Mt.push("'"+this.terminals_[Bt]+"'");R.showPosition?Vt="Parse error on line "+(St+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+Mt.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Vt="Parse error on line "+(St+1)+": Unexpected "+(N==oe?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Vt,{text:R.match,token:this.terminals_[N]||N,line:R.yylineno,loc:Ht,expected:Mt})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+N);switch(j[0]){case 1:x.push(N),w.push(R.yytext),o.push(R.yylloc),x.push(j[1]),N=null,le=R.yyleng,p=R.yytext,St=R.yylineno,Ht=R.yylloc;break;case 2:if(W=this.productions_[j[1]][1],kt.$=w[w.length-W],kt._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},we&&(kt._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),qt=this.performAction.apply(kt,[p,le,St,Ct.yy,j[1],w,o].concat(ke)),typeof qt<"u")return qt;W&&(x=x.slice(0,-1*W*2),w=w.slice(0,-1*W),o=o.slice(0,-1*W)),x.push(this.productions_[j[1]][0]),w.push(kt.$),o.push(kt._$),he=P[x[x.length-2]][x[x.length-1]],x.push(he);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var z={EOF:1,parseError:g(function(_,x){if(this.yy.parser)this.yy.parser.parseError(_,x);else throw new Error(_)},"parseError"),setInput:g(function(_,x){return this.yy=x||this.yy||{},this._input=_,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:g(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.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),_},"input"),unput:g(function(_){var x=_.length,b=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var w=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),b.length-1&&(this.yylineno-=b.length-1);var o=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:b?(b.length===w.length?this.yylloc.first_column:0)+w[w.length-b.length].length-b[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(_){this.unput(this.match.slice(_))},"less"),pastInput:g(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+`