@sme.up/ketchup2 2.0.0-SNAPSHOT-20250908152453 → 2.0.0-SNAPSHOT-20250909094906

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 (119) hide show
  1. package/dist/{_basePickBy-Bq-OHVlJ.js → _basePickBy-Do84EYM_.js} +23 -23
  2. package/dist/{_basePickBy-DNewzgl9.cjs → _basePickBy-jbGD0zVt.cjs} +1 -1
  3. package/dist/{_baseUniq-DUO9awf7.js → _baseUniq-ChWtQCAg.js} +40 -40
  4. package/dist/{_baseUniq-CQ7AOjch.cjs → _baseUniq-QOx9ZFk8.cjs} +1 -1
  5. package/dist/{arc-H_1C-9yW.cjs → arc-BIKBJW81.cjs} +1 -1
  6. package/dist/{arc-BC6Mnh_l.js → arc-ChfU56Id.js} +1 -1
  7. package/dist/{architecture-O4VJ6CD3-Bfi1Y3W3.cjs → architecture-O4VJ6CD3-3YFJqJ0Z.cjs} +1 -1
  8. package/dist/{architecture-O4VJ6CD3-B2_zBkXA.js → architecture-O4VJ6CD3-BUnL0V-N.js} +1 -1
  9. package/dist/{architectureDiagram-KFL7JDKH-Dzqraep6.js → architectureDiagram-W76B3OCA-CBK4zgfT.js} +132 -132
  10. package/dist/{architectureDiagram-KFL7JDKH-DOaG_WZV.cjs → architectureDiagram-W76B3OCA-CZqalw5r.cjs} +1 -1
  11. package/dist/{blockDiagram-ZYB65J3Q-BF5gB3wI.js → blockDiagram-QIGZ2CNN-D-oSz2sZ.js} +5 -5
  12. package/dist/{blockDiagram-ZYB65J3Q-0TfXbzbL.cjs → blockDiagram-QIGZ2CNN-GTeJnx7A.cjs} +4 -4
  13. package/dist/{c4Diagram-AAMF2YG6-CZutQWdQ.js → c4Diagram-FPNF74CW-ARWMN1wL.js} +2 -2
  14. package/dist/{c4Diagram-AAMF2YG6-BUdDUCAg.cjs → c4Diagram-FPNF74CW-CTzfs_2H.cjs} +4 -4
  15. package/dist/channel-B4Pxd4YX.cjs +1 -0
  16. package/dist/channel-DioWzi4t.js +5 -0
  17. package/dist/{chunk-ANTBXLJU-BdaEgFx7.js → chunk-4BX2VUAB-B3NOuiDi.js} +1 -1
  18. package/dist/{chunk-ANTBXLJU-DqW7nBC-.cjs → chunk-4BX2VUAB-CseI-Vvw.cjs} +1 -1
  19. package/dist/{chunk-WVR4S24B-Chw9GJ4r.cjs → chunk-55IACEB6-DWsrLxcl.cjs} +1 -1
  20. package/dist/{chunk-WVR4S24B-DkA4uS4H.js → chunk-55IACEB6-J1JahOGA.js} +1 -1
  21. package/dist/{chunk-GLLZNHP4-BA8r1pFP.cjs → chunk-FMBD7UC4-CM5L8bW6.cjs} +1 -1
  22. package/dist/{chunk-GLLZNHP4-DiiaqYXe.js → chunk-FMBD7UC4-CZgAaUUx.js} +1 -1
  23. package/dist/{chunk-JBRWN2VN-BaREAv8H.js → chunk-K7UQS3LO-BT7hVqcS.js} +176 -176
  24. package/dist/chunk-K7UQS3LO-CtzkJjTw.cjs +165 -0
  25. package/dist/{chunk-NRVI72HA-DLE8wk3-.js → chunk-QN33PNHL-DfPMtcCm.js} +1 -1
  26. package/dist/{chunk-NRVI72HA-DRmCDH9L.cjs → chunk-QN33PNHL-Djjr-gFo.cjs} +1 -1
  27. package/dist/{chunk-FHKO5MBM-DXqhRcMm.cjs → chunk-QZHKN3VN-D80R1Bnw.cjs} +1 -1
  28. package/dist/{chunk-FHKO5MBM-CzQq96F_.js → chunk-QZHKN3VN-DiLRWGZ4.js} +1 -1
  29. package/dist/{chunk-LXBSTHXV-DFifdLZK.js → chunk-TVAH2DTR-BUlQxrvQ.js} +3 -3
  30. package/dist/{chunk-LXBSTHXV-B0scQvN2.cjs → chunk-TVAH2DTR-OscPged-.cjs} +3 -3
  31. package/dist/{chunk-OMD6QJNC-BYvyUH2d.js → chunk-TZMSLE5B-BFDfGKmV.js} +1 -1
  32. package/dist/{chunk-OMD6QJNC-RjSGzdd8.cjs → chunk-TZMSLE5B-C4Bupww9.cjs} +1 -1
  33. package/dist/{classDiagram-v2-QTMF73CY-CAtFVXFw.js → classDiagram-KNZD7YFC-D2lEcWc2.js} +2 -2
  34. package/dist/{classDiagram-3BZAVTQC-BOmQDPcS.cjs → classDiagram-KNZD7YFC-DU5lVeNU.cjs} +1 -1
  35. package/dist/{classDiagram-3BZAVTQC-CAtFVXFw.js → classDiagram-v2-RKCZMP56-D2lEcWc2.js} +2 -2
  36. package/dist/{classDiagram-v2-QTMF73CY-BOmQDPcS.cjs → classDiagram-v2-RKCZMP56-DU5lVeNU.cjs} +1 -1
  37. package/dist/{clone-B-bAOLls.js → clone-BIRPLFeu.js} +1 -1
  38. package/dist/clone-Yz3NuvEr.cjs +1 -0
  39. package/dist/cose-bilkent-S5V4N54A-BWGKRiDx.js +2608 -0
  40. package/dist/cose-bilkent-S5V4N54A-DL456FIj.cjs +1 -0
  41. package/dist/{dagre-2BBEFEWP-BCS301Dq.cjs → dagre-5GWH7T2D-N31ttJV3.cjs} +1 -1
  42. package/dist/{dagre-2BBEFEWP-CLTO8d-K.js → dagre-5GWH7T2D-gZxGoa1q.js} +108 -108
  43. package/dist/{diagram-4IRLE6MV-Cz4wPwXi.js → diagram-N5W7TBWH-BdTxNJib.js} +23 -23
  44. package/dist/{diagram-4IRLE6MV-_WYVJBfL.cjs → diagram-N5W7TBWH-Drncbwhp.cjs} +2 -2
  45. package/dist/{diagram-RP2FKANI-C_dWK3j7.cjs → diagram-QEK2KX5R-RjWKQ2ED.cjs} +4 -4
  46. package/dist/{diagram-RP2FKANI-CXmRNmBu.js → diagram-QEK2KX5R-WZI40S3K.js} +15 -15
  47. package/dist/{diagram-GUPCWM2R-CH-4x3WD.js → diagram-S2PKOQOG-B9JzzA2t.js} +10 -10
  48. package/dist/{diagram-GUPCWM2R-O4fOIHyx.cjs → diagram-S2PKOQOG-BNCnAE-c.cjs} +1 -1
  49. package/dist/{erDiagram-HZWUO2LU-uRisj4mV.cjs → erDiagram-AWTI2OKA-CC7O9cWw.cjs} +4 -4
  50. package/dist/{erDiagram-HZWUO2LU-Dqt1BE2C.js → erDiagram-AWTI2OKA-CHFxr-_a.js} +4 -4
  51. package/dist/{flowDiagram-THRYKUMA-C-r5MZds.js → flowDiagram-PVAE7QVJ-BqSE3m5u.js} +5 -5
  52. package/dist/{flowDiagram-THRYKUMA-bRWo210y.cjs → flowDiagram-PVAE7QVJ-HeYvgtJE.cjs} +7 -7
  53. package/dist/{ganttDiagram-WV7ZQ7D5-BVe9Yi12.js → ganttDiagram-OWAHRB6G-BP1W4LwQ.js} +57 -57
  54. package/dist/{ganttDiagram-WV7ZQ7D5-Dh9UR52T.cjs → ganttDiagram-OWAHRB6G-Cd3cccSw.cjs} +1 -1
  55. package/dist/{gitGraph-ZV4HHKMB-Bwp8pNLp.js → gitGraph-ZV4HHKMB-C3MJKIFJ.js} +1 -1
  56. package/dist/{gitGraph-ZV4HHKMB-rHh_4sTF.cjs → gitGraph-ZV4HHKMB-jdm9JJYB.cjs} +1 -1
  57. package/dist/{gitGraphDiagram-OJR772UL-BNm74Q9n.js → gitGraphDiagram-NY62KEGX-CAuDLddf.js} +4 -4
  58. package/dist/{gitGraphDiagram-OJR772UL-Bq60AaCq.cjs → gitGraphDiagram-NY62KEGX-MeKzzURg.cjs} +4 -4
  59. package/dist/{graph-BrGj_Gfv.cjs → graph-D6Um4HxB.cjs} +1 -1
  60. package/dist/{graph-CMnK4YO3.js → graph-Vhpd_PNV.js} +4 -4
  61. package/dist/index-DizklrOW.cjs +301 -0
  62. package/dist/{index-VJw3klPt.js → index-JAUwzcHq.js} +10075 -9464
  63. package/dist/info-63CPKGFF-BADmngvb.js +5 -0
  64. package/dist/{info-63CPKGFF-0H7FGkBP.cjs → info-63CPKGFF-CVwGg7sm.cjs} +1 -1
  65. package/dist/{infoDiagram-DDUCL6P7-Cf77NdxY.js → infoDiagram-STP46IZ2-BCtb4AJp.js} +2 -2
  66. package/dist/{infoDiagram-DDUCL6P7-DjqD8eRi.cjs → infoDiagram-STP46IZ2-TvwZFY0I.cjs} +1 -1
  67. package/dist/{journeyDiagram-FFXJYRFH-DtxrMVYZ.cjs → journeyDiagram-BIP6EPQ6-BpcOCeFx.cjs} +4 -4
  68. package/dist/{journeyDiagram-FFXJYRFH-C7_bJR3c.js → journeyDiagram-BIP6EPQ6-CyCYA5CK.js} +4 -4
  69. package/dist/{kanban-definition-KOZQBZVT-Bo9dRDl_.js → kanban-definition-6OIFK2YF-4YIBsMQL.js} +24 -24
  70. package/dist/{kanban-definition-KOZQBZVT-Bel-f3_i.cjs → kanban-definition-6OIFK2YF-__0ex79Z.cjs} +5 -5
  71. package/dist/ketchup2.cjs.js +1 -1
  72. package/dist/ketchup2.es.js +9 -9
  73. package/dist/{layout-Bt4IJcSa.cjs → layout-4fomnJM7.cjs} +1 -1
  74. package/dist/{layout-kUC11kUc.js → layout-DtdTzvka.js} +32 -32
  75. package/dist/{linear-BDcEY_LY.js → linear-BFBJjwEz.js} +12 -12
  76. package/dist/{linear-50cMYwZQ.cjs → linear-DqF6L3Zm.cjs} +1 -1
  77. package/dist/{mermaid-parser.core-Bxkmx2-5.cjs → mermaid-parser.core-CySFdxC3.cjs} +2 -2
  78. package/dist/{mermaid-parser.core-BnvQOoyE.js → mermaid-parser.core-DX0wl6-K.js} +11 -11
  79. package/dist/mindmap-definition-Q6HEUPPD-DS17jgrc.cjs +68 -0
  80. package/dist/mindmap-definition-Q6HEUPPD-xX1MDaCF.js +755 -0
  81. package/dist/{packet-HUATNLJX-DaHhWwAU.js → packet-HUATNLJX-BYVUpbG6.js} +1 -1
  82. package/dist/{packet-HUATNLJX-6TXP1bqK.cjs → packet-HUATNLJX-Cg3sBc6j.cjs} +1 -1
  83. package/dist/pie-WTHONI2E-8_e9e1PJ.js +5 -0
  84. package/dist/{pie-WTHONI2E-AzeewyiY.cjs → pie-WTHONI2E-aHt6d3si.cjs} +1 -1
  85. package/dist/{pieDiagram-DBDJKBY4-DBzbWAu9.js → pieDiagram-ADFJNKIX-B8i8yWnV.js} +25 -25
  86. package/dist/{pieDiagram-DBDJKBY4-W8GACAWO.cjs → pieDiagram-ADFJNKIX-DT0Ws9pS.cjs} +3 -3
  87. package/dist/{quadrantDiagram-YPSRARAO-mnX6YljL.js → quadrantDiagram-LMRXKWRM-BhJb9RD_.js} +2 -2
  88. package/dist/{quadrantDiagram-YPSRARAO-BjYPzvUJ.cjs → quadrantDiagram-LMRXKWRM-DtGKIjme.cjs} +1 -1
  89. package/dist/{radar-NJJJXTRR-BocemfZ8.cjs → radar-NJJJXTRR-BAYIFlfJ.cjs} +1 -1
  90. package/dist/radar-NJJJXTRR-zWC19E7g.js +5 -0
  91. package/dist/{requirementDiagram-EGVEC5DT-Bimu3sL7.cjs → requirementDiagram-4UW4RH46-CVZ_dXqx.cjs} +4 -4
  92. package/dist/{requirementDiagram-EGVEC5DT-B9Bwf2ay.js → requirementDiagram-4UW4RH46-DAI3Uiz3.js} +3 -3
  93. package/dist/{sankeyDiagram-HRAUVNP4-DzXnX0Ga.js → sankeyDiagram-GR3RE2ED-BXuYlJUa.js} +1 -1
  94. package/dist/{sankeyDiagram-HRAUVNP4-DJiyVYTm.cjs → sankeyDiagram-GR3RE2ED-DKDgKlXn.cjs} +1 -1
  95. package/dist/sequenceDiagram-C3RYC4MD-CIIj5p5i.cjs +145 -0
  96. package/dist/sequenceDiagram-C3RYC4MD-DW6rFBHn.js +2511 -0
  97. package/dist/{stateDiagram-UUKSUZ4H-DNsbUQC8.cjs → stateDiagram-KXAO66HF-DHLO3kOk.cjs} +1 -1
  98. package/dist/{stateDiagram-UUKSUZ4H-BfB7OKY5.js → stateDiagram-KXAO66HF-ZTmYAzzc.js} +4 -4
  99. package/dist/{stateDiagram-v2-EYPG3UTE-k2P5SO6h.cjs → stateDiagram-v2-UMBNRL4Z-1TzBIAjq.cjs} +1 -1
  100. package/dist/{stateDiagram-v2-EYPG3UTE-CrbgZXhp.js → stateDiagram-v2-UMBNRL4Z-8NUwdmML.js} +2 -2
  101. package/dist/{timeline-definition-3HZDQTIS-CJz-ObCi.cjs → timeline-definition-XQNQX7LJ-CtFKMZOO.cjs} +1 -1
  102. package/dist/{timeline-definition-3HZDQTIS-TVmN8Z80.js → timeline-definition-XQNQX7LJ-D4fALhvp.js} +2 -2
  103. package/dist/{treemap-75Q7IDZK-MVFNLG-W.cjs → treemap-75Q7IDZK-DH4yrCnW.cjs} +1 -1
  104. package/dist/{treemap-75Q7IDZK-CbpJhl6F.js → treemap-75Q7IDZK-tSdwGttm.js} +1 -1
  105. package/dist/{xychartDiagram-FDP5SA34-QzZvVH2o.js → xychartDiagram-6GGTOJPD-CRUaY0o_.js} +2 -2
  106. package/dist/{xychartDiagram-FDP5SA34-kb-QmiwQ.cjs → xychartDiagram-6GGTOJPD-vmeOyvTD.cjs} +1 -1
  107. package/package.json +13 -13
  108. package/dist/channel-D7-lFnTD.js +0 -5
  109. package/dist/channel-DveM5GOL.cjs +0 -1
  110. package/dist/chunk-JBRWN2VN-4oDxplqY.cjs +0 -165
  111. package/dist/clone-C0dQSPFZ.cjs +0 -1
  112. package/dist/index-BA07EijG.cjs +0 -266
  113. package/dist/info-63CPKGFF-CV7HrEKO.js +0 -5
  114. package/dist/mindmap-definition-LNHGMQRG-CVh0vQd5.js +0 -3230
  115. package/dist/mindmap-definition-LNHGMQRG-qQmqPKl8.cjs +0 -95
  116. package/dist/pie-WTHONI2E-Cq9zrqsG.js +0 -5
  117. package/dist/radar-NJJJXTRR-Yz9jsEDT.js +0 -5
  118. package/dist/sequenceDiagram-4MX5Z3NR-DHUCnBgG.cjs +0 -122
  119. package/dist/sequenceDiagram-4MX5Z3NR-DuaMVfG7.js +0 -2281
@@ -0,0 +1,755 @@
1
+ import { g as ae } from "./chunk-55IACEB6-J1JahOGA.js";
2
+ import { s as oe } from "./chunk-QN33PNHL-DfPMtcCm.js";
3
+ import { _ as c, l as O, o as ce, r as le, F as U, c as H, i as F, af as he, ag as ge, W as de, X as ue, Y as pe } from "./index-JAUwzcHq.js";
4
+ var W = function() {
5
+ var r = /* @__PURE__ */ c(function(L, s, t, a) {
6
+ for (t = t || {}, a = L.length; a--; t[L[a]] = s) ;
7
+ return t;
8
+ }, "o"), e = [1, 4], i = [1, 13], l = [1, 12], u = [1, 15], h = [1, 16], f = [1, 20], y = [1, 19], p = [6, 7, 8], k = [1, 26], z = [1, 24], X = [1, 25], _ = [6, 7, 11], Y = [1, 6, 13, 15, 16, 19, 22], q = [1, 33], J = [1, 34], I = [1, 6, 7, 11, 13, 15, 16, 19, 22], B = {
9
+ trace: /* @__PURE__ */ c(function() {
10
+ }, "trace"),
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
14
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
15
+ performAction: /* @__PURE__ */ c(function(s, t, a, o, d, n, R) {
16
+ var g = n.length - 1;
17
+ switch (d) {
18
+ case 6:
19
+ case 7:
20
+ return o;
21
+ case 8:
22
+ o.getLogger().trace("Stop NL ");
23
+ break;
24
+ case 9:
25
+ o.getLogger().trace("Stop EOF ");
26
+ break;
27
+ case 11:
28
+ o.getLogger().trace("Stop NL2 ");
29
+ break;
30
+ case 12:
31
+ o.getLogger().trace("Stop EOF2 ");
32
+ break;
33
+ case 15:
34
+ o.getLogger().info("Node: ", n[g].id), o.addNode(n[g - 1].length, n[g].id, n[g].descr, n[g].type);
35
+ break;
36
+ case 16:
37
+ o.getLogger().trace("Icon: ", n[g]), o.decorateNode({ icon: n[g] });
38
+ break;
39
+ case 17:
40
+ case 21:
41
+ o.decorateNode({ class: n[g] });
42
+ break;
43
+ case 18:
44
+ o.getLogger().trace("SPACELIST");
45
+ break;
46
+ case 19:
47
+ o.getLogger().trace("Node: ", n[g].id), o.addNode(0, n[g].id, n[g].descr, n[g].type);
48
+ break;
49
+ case 20:
50
+ o.decorateNode({ icon: n[g] });
51
+ break;
52
+ case 25:
53
+ o.getLogger().trace("node found ..", n[g - 2]), this.$ = { id: n[g - 1], descr: n[g - 1], type: o.getType(n[g - 2], n[g]) };
54
+ break;
55
+ case 26:
56
+ this.$ = { id: n[g], descr: n[g], type: o.nodeType.DEFAULT };
57
+ break;
58
+ case 27:
59
+ o.getLogger().trace("node found ..", n[g - 3]), this.$ = { id: n[g - 3], descr: n[g - 1], type: o.getType(n[g - 2], n[g]) };
60
+ break;
61
+ }
62
+ }, "anonymous"),
63
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: e }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: e }, { 6: i, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: u, 16: h, 17: 17, 18: 18, 19: f, 22: y }, r(p, [2, 3]), { 1: [2, 2] }, r(p, [2, 4]), r(p, [2, 5]), { 1: [2, 6], 6: i, 12: 21, 13: l, 14: 14, 15: u, 16: h, 17: 17, 18: 18, 19: f, 22: y }, { 6: i, 9: 22, 12: 11, 13: l, 14: 14, 15: u, 16: h, 17: 17, 18: 18, 19: f, 22: y }, { 6: k, 7: z, 10: 23, 11: X }, r(_, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: f, 22: y }), r(_, [2, 18]), r(_, [2, 19]), r(_, [2, 20]), r(_, [2, 21]), r(_, [2, 23]), r(_, [2, 24]), r(_, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: k, 7: z, 10: 32, 11: X }, { 1: [2, 7], 6: i, 12: 21, 13: l, 14: 14, 15: u, 16: h, 17: 17, 18: 18, 19: f, 22: y }, r(Y, [2, 14], { 7: q, 11: J }), r(I, [2, 8]), r(I, [2, 9]), r(I, [2, 10]), r(_, [2, 15]), r(_, [2, 16]), r(_, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, r(Y, [2, 13], { 7: q, 11: J }), r(I, [2, 11]), r(I, [2, 12]), { 21: [1, 37] }, r(_, [2, 25]), r(_, [2, 27])],
64
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
65
+ parseError: /* @__PURE__ */ c(function(s, t) {
66
+ if (t.recoverable)
67
+ this.trace(s);
68
+ else {
69
+ var a = new Error(s);
70
+ throw a.hash = t, a;
71
+ }
72
+ }, "parseError"),
73
+ parse: /* @__PURE__ */ c(function(s) {
74
+ var t = this, a = [0], o = [], d = [null], n = [], R = this.table, g = "", w = 0, K = 0, ie = 2, Q = 1, se = n.slice.call(arguments, 1), m = Object.create(this.lexer), x = { yy: {} };
75
+ for (var V in this.yy)
76
+ Object.prototype.hasOwnProperty.call(this.yy, V) && (x.yy[V] = this.yy[V]);
77
+ m.setInput(s, x.yy), x.yy.lexer = m, x.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
78
+ var G = m.yylloc;
79
+ n.push(G);
80
+ var ne = m.options && m.options.ranges;
81
+ typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
82
+ function re(b) {
83
+ a.length = a.length - 2 * b, d.length = d.length - b, n.length = n.length - b;
84
+ }
85
+ c(re, "popStack");
86
+ function Z() {
87
+ var b;
88
+ return b = o.pop() || m.lex() || Q, typeof b != "number" && (b instanceof Array && (o = b, b = o.pop()), b = t.symbols_[b] || b), b;
89
+ }
90
+ c(Z, "lex");
91
+ for (var E, v, S, j, T = {}, P, N, ee, M; ; ) {
92
+ if (v = a[a.length - 1], this.defaultActions[v] ? S = this.defaultActions[v] : ((E === null || typeof E > "u") && (E = Z()), S = R[v] && R[v][E]), typeof S > "u" || !S.length || !S[0]) {
93
+ var $ = "";
94
+ M = [];
95
+ for (P in R[v])
96
+ this.terminals_[P] && P > ie && M.push("'" + this.terminals_[P] + "'");
97
+ m.showPosition ? $ = "Parse error on line " + (w + 1) + `:
98
+ ` + m.showPosition() + `
99
+ Expecting ` + M.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : $ = "Parse error on line " + (w + 1) + ": Unexpected " + (E == Q ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError($, {
100
+ text: m.match,
101
+ token: this.terminals_[E] || E,
102
+ line: m.yylineno,
103
+ loc: G,
104
+ expected: M
105
+ });
106
+ }
107
+ if (S[0] instanceof Array && S.length > 1)
108
+ throw new Error("Parse Error: multiple actions possible at state: " + v + ", token: " + E);
109
+ switch (S[0]) {
110
+ case 1:
111
+ a.push(E), d.push(m.yytext), n.push(m.yylloc), a.push(S[1]), E = null, K = m.yyleng, g = m.yytext, w = m.yylineno, G = m.yylloc;
112
+ break;
113
+ case 2:
114
+ if (N = this.productions_[S[1]][1], T.$ = d[d.length - N], T._$ = {
115
+ first_line: n[n.length - (N || 1)].first_line,
116
+ last_line: n[n.length - 1].last_line,
117
+ first_column: n[n.length - (N || 1)].first_column,
118
+ last_column: n[n.length - 1].last_column
119
+ }, ne && (T._$.range = [
120
+ n[n.length - (N || 1)].range[0],
121
+ n[n.length - 1].range[1]
122
+ ]), j = this.performAction.apply(T, [
123
+ g,
124
+ K,
125
+ w,
126
+ x.yy,
127
+ S[1],
128
+ d,
129
+ n
130
+ ].concat(se)), typeof j < "u")
131
+ return j;
132
+ N && (a = a.slice(0, -1 * N * 2), d = d.slice(0, -1 * N), n = n.slice(0, -1 * N)), a.push(this.productions_[S[1]][0]), d.push(T.$), n.push(T._$), ee = R[a[a.length - 2]][a[a.length - 1]], a.push(ee);
133
+ break;
134
+ case 3:
135
+ return !0;
136
+ }
137
+ }
138
+ return !0;
139
+ }, "parse")
140
+ }, te = /* @__PURE__ */ function() {
141
+ var L = {
142
+ EOF: 1,
143
+ parseError: /* @__PURE__ */ c(function(t, a) {
144
+ if (this.yy.parser)
145
+ this.yy.parser.parseError(t, a);
146
+ else
147
+ throw new Error(t);
148
+ }, "parseError"),
149
+ // resets the lexer, sets new input
150
+ setInput: /* @__PURE__ */ c(function(s, t) {
151
+ return this.yy = t || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
152
+ first_line: 1,
153
+ first_column: 0,
154
+ last_line: 1,
155
+ last_column: 0
156
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
157
+ }, "setInput"),
158
+ // consumes and returns one char from the input
159
+ input: /* @__PURE__ */ c(function() {
160
+ var s = this._input[0];
161
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
162
+ var t = s.match(/(?:\r\n?|\n).*/g);
163
+ return t ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
164
+ }, "input"),
165
+ // unshifts one char (or a string) into the input
166
+ unput: /* @__PURE__ */ c(function(s) {
167
+ var t = s.length, a = s.split(/(?:\r\n?|\n)/g);
168
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
169
+ var o = this.match.split(/(?:\r\n?|\n)/g);
170
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
171
+ var d = this.yylloc.range;
172
+ return this.yylloc = {
173
+ first_line: this.yylloc.first_line,
174
+ last_line: this.yylineno + 1,
175
+ first_column: this.yylloc.first_column,
176
+ last_column: a ? (a.length === o.length ? this.yylloc.first_column : 0) + o[o.length - a.length].length - a[0].length : this.yylloc.first_column - t
177
+ }, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
178
+ }, "unput"),
179
+ // When called from action, caches matched text and appends it on next action
180
+ more: /* @__PURE__ */ c(function() {
181
+ return this._more = !0, this;
182
+ }, "more"),
183
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
184
+ reject: /* @__PURE__ */ c(function() {
185
+ if (this.options.backtrack_lexer)
186
+ this._backtrack = !0;
187
+ else
188
+ 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).
189
+ ` + this.showPosition(), {
190
+ text: "",
191
+ token: null,
192
+ line: this.yylineno
193
+ });
194
+ return this;
195
+ }, "reject"),
196
+ // retain first n characters of the match
197
+ less: /* @__PURE__ */ c(function(s) {
198
+ this.unput(this.match.slice(s));
199
+ }, "less"),
200
+ // displays already matched input, i.e. for error messages
201
+ pastInput: /* @__PURE__ */ c(function() {
202
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
203
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
204
+ }, "pastInput"),
205
+ // displays upcoming input, i.e. for error messages
206
+ upcomingInput: /* @__PURE__ */ c(function() {
207
+ var s = this.match;
208
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
209
+ }, "upcomingInput"),
210
+ // displays the character position where the lexing error occurred, i.e. for error messages
211
+ showPosition: /* @__PURE__ */ c(function() {
212
+ var s = this.pastInput(), t = new Array(s.length + 1).join("-");
213
+ return s + this.upcomingInput() + `
214
+ ` + t + "^";
215
+ }, "showPosition"),
216
+ // test the lexed token: return FALSE when not a match, otherwise return token
217
+ test_match: /* @__PURE__ */ c(function(s, t) {
218
+ var a, o, d;
219
+ if (this.options.backtrack_lexer && (d = {
220
+ yylineno: this.yylineno,
221
+ yylloc: {
222
+ first_line: this.yylloc.first_line,
223
+ last_line: this.last_line,
224
+ first_column: this.yylloc.first_column,
225
+ last_column: this.yylloc.last_column
226
+ },
227
+ yytext: this.yytext,
228
+ match: this.match,
229
+ matches: this.matches,
230
+ matched: this.matched,
231
+ yyleng: this.yyleng,
232
+ offset: this.offset,
233
+ _more: this._more,
234
+ _input: this._input,
235
+ yy: this.yy,
236
+ conditionStack: this.conditionStack.slice(0),
237
+ done: this.done
238
+ }, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), o = s[0].match(/(?:\r\n?|\n).*/g), o && (this.yylineno += o.length), this.yylloc = {
239
+ first_line: this.yylloc.last_line,
240
+ last_line: this.yylineno + 1,
241
+ first_column: this.yylloc.last_column,
242
+ last_column: o ? o[o.length - 1].length - o[o.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
243
+ }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
244
+ return a;
245
+ if (this._backtrack) {
246
+ for (var n in d)
247
+ this[n] = d[n];
248
+ return !1;
249
+ }
250
+ return !1;
251
+ }, "test_match"),
252
+ // return next match in input
253
+ next: /* @__PURE__ */ c(function() {
254
+ if (this.done)
255
+ return this.EOF;
256
+ this._input || (this.done = !0);
257
+ var s, t, a, o;
258
+ this._more || (this.yytext = "", this.match = "");
259
+ for (var d = this._currentRules(), n = 0; n < d.length; n++)
260
+ if (a = this._input.match(this.rules[d[n]]), a && (!t || a[0].length > t[0].length)) {
261
+ if (t = a, o = n, this.options.backtrack_lexer) {
262
+ if (s = this.test_match(a, d[n]), s !== !1)
263
+ return s;
264
+ if (this._backtrack) {
265
+ t = !1;
266
+ continue;
267
+ } else
268
+ return !1;
269
+ } else if (!this.options.flex)
270
+ break;
271
+ }
272
+ return t ? (s = this.test_match(t, d[o]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
273
+ ` + this.showPosition(), {
274
+ text: "",
275
+ token: null,
276
+ line: this.yylineno
277
+ });
278
+ }, "next"),
279
+ // return next match that has a token
280
+ lex: /* @__PURE__ */ c(function() {
281
+ var t = this.next();
282
+ return t || this.lex();
283
+ }, "lex"),
284
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
285
+ begin: /* @__PURE__ */ c(function(t) {
286
+ this.conditionStack.push(t);
287
+ }, "begin"),
288
+ // pop the previously active lexer condition state off the condition stack
289
+ popState: /* @__PURE__ */ c(function() {
290
+ var t = this.conditionStack.length - 1;
291
+ return t > 0 ? this.conditionStack.pop() : this.conditionStack[0];
292
+ }, "popState"),
293
+ // produce the lexer rule set which is active for the currently active lexer condition state
294
+ _currentRules: /* @__PURE__ */ c(function() {
295
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
296
+ }, "_currentRules"),
297
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
298
+ topState: /* @__PURE__ */ c(function(t) {
299
+ return t = this.conditionStack.length - 1 - Math.abs(t || 0), t >= 0 ? this.conditionStack[t] : "INITIAL";
300
+ }, "topState"),
301
+ // alias for begin(condition)
302
+ pushState: /* @__PURE__ */ c(function(t) {
303
+ this.begin(t);
304
+ }, "pushState"),
305
+ // return the number of states currently on the stack
306
+ stateStackSize: /* @__PURE__ */ c(function() {
307
+ return this.conditionStack.length;
308
+ }, "stateStackSize"),
309
+ options: { "case-insensitive": !0 },
310
+ performAction: /* @__PURE__ */ c(function(t, a, o, d) {
311
+ switch (o) {
312
+ case 0:
313
+ return t.getLogger().trace("Found comment", a.yytext), 6;
314
+ case 1:
315
+ return 8;
316
+ case 2:
317
+ this.begin("CLASS");
318
+ break;
319
+ case 3:
320
+ return this.popState(), 16;
321
+ case 4:
322
+ this.popState();
323
+ break;
324
+ case 5:
325
+ t.getLogger().trace("Begin icon"), this.begin("ICON");
326
+ break;
327
+ case 6:
328
+ return t.getLogger().trace("SPACELINE"), 6;
329
+ case 7:
330
+ return 7;
331
+ case 8:
332
+ return 15;
333
+ case 9:
334
+ t.getLogger().trace("end icon"), this.popState();
335
+ break;
336
+ case 10:
337
+ return t.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
338
+ case 11:
339
+ return t.getLogger().trace("Cloud"), this.begin("NODE"), 19;
340
+ case 12:
341
+ return t.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
342
+ case 13:
343
+ return t.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
344
+ case 14:
345
+ return this.begin("NODE"), 19;
346
+ case 15:
347
+ return this.begin("NODE"), 19;
348
+ case 16:
349
+ return this.begin("NODE"), 19;
350
+ case 17:
351
+ return this.begin("NODE"), 19;
352
+ case 18:
353
+ return 13;
354
+ case 19:
355
+ return 22;
356
+ case 20:
357
+ return 11;
358
+ case 21:
359
+ this.begin("NSTR2");
360
+ break;
361
+ case 22:
362
+ return "NODE_DESCR";
363
+ case 23:
364
+ this.popState();
365
+ break;
366
+ case 24:
367
+ t.getLogger().trace("Starting NSTR"), this.begin("NSTR");
368
+ break;
369
+ case 25:
370
+ return t.getLogger().trace("description:", a.yytext), "NODE_DESCR";
371
+ case 26:
372
+ this.popState();
373
+ break;
374
+ case 27:
375
+ return this.popState(), t.getLogger().trace("node end ))"), "NODE_DEND";
376
+ case 28:
377
+ return this.popState(), t.getLogger().trace("node end )"), "NODE_DEND";
378
+ case 29:
379
+ return this.popState(), t.getLogger().trace("node end ...", a.yytext), "NODE_DEND";
380
+ case 30:
381
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
382
+ case 31:
383
+ return this.popState(), t.getLogger().trace("node end (-"), "NODE_DEND";
384
+ case 32:
385
+ return this.popState(), t.getLogger().trace("node end (-"), "NODE_DEND";
386
+ case 33:
387
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
388
+ case 34:
389
+ return this.popState(), t.getLogger().trace("node end (("), "NODE_DEND";
390
+ case 35:
391
+ return t.getLogger().trace("Long description:", a.yytext), 20;
392
+ case 36:
393
+ return t.getLogger().trace("Long description:", a.yytext), 20;
394
+ }
395
+ }, "anonymous"),
396
+ rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
397
+ conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
398
+ };
399
+ return L;
400
+ }();
401
+ B.lexer = te;
402
+ function A() {
403
+ this.yy = {};
404
+ }
405
+ return c(A, "Parser"), A.prototype = B, B.Parser = A, new A();
406
+ }();
407
+ W.parser = W;
408
+ var fe = W, D = {
409
+ DEFAULT: 0,
410
+ NO_BORDER: 0,
411
+ ROUNDED_RECT: 1,
412
+ RECT: 2,
413
+ CIRCLE: 3,
414
+ CLOUD: 4,
415
+ BANG: 5,
416
+ HEXAGON: 6
417
+ }, C, ye = (C = class {
418
+ constructor() {
419
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = D, this.clear(), this.getType = this.getType.bind(this), this.getElementById = this.getElementById.bind(this), this.getParent = this.getParent.bind(this), this.getMindmap = this.getMindmap.bind(this), this.addNode = this.addNode.bind(this), this.decorateNode = this.decorateNode.bind(this);
420
+ }
421
+ clear() {
422
+ this.nodes = [], this.count = 0, this.elements = {};
423
+ }
424
+ getParent(e) {
425
+ for (let i = this.nodes.length - 1; i >= 0; i--)
426
+ if (this.nodes[i].level < e)
427
+ return this.nodes[i];
428
+ return null;
429
+ }
430
+ getMindmap() {
431
+ return this.nodes.length > 0 ? this.nodes[0] : null;
432
+ }
433
+ addNode(e, i, l, u) {
434
+ O.info("addNode", e, i, l, u);
435
+ const h = H();
436
+ let f = h.mindmap?.padding ?? U.mindmap.padding;
437
+ switch (u) {
438
+ case this.nodeType.ROUNDED_RECT:
439
+ case this.nodeType.RECT:
440
+ case this.nodeType.HEXAGON:
441
+ f *= 2;
442
+ break;
443
+ }
444
+ const y = {
445
+ id: this.count++,
446
+ nodeId: F(i, h),
447
+ level: e,
448
+ descr: F(l, h),
449
+ type: u,
450
+ children: [],
451
+ width: h.mindmap?.maxNodeWidth ?? U.mindmap.maxNodeWidth,
452
+ padding: f
453
+ }, p = this.getParent(e);
454
+ if (p)
455
+ p.children.push(y), this.nodes.push(y);
456
+ else if (this.nodes.length === 0)
457
+ this.nodes.push(y);
458
+ else
459
+ throw new Error(
460
+ `There can be only one root. No parent could be found for ("${y.descr}")`
461
+ );
462
+ }
463
+ getType(e, i) {
464
+ switch (O.debug("In get type", e, i), e) {
465
+ case "[":
466
+ return this.nodeType.RECT;
467
+ case "(":
468
+ return i === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
469
+ case "((":
470
+ return this.nodeType.CIRCLE;
471
+ case ")":
472
+ return this.nodeType.CLOUD;
473
+ case "))":
474
+ return this.nodeType.BANG;
475
+ case "{{":
476
+ return this.nodeType.HEXAGON;
477
+ default:
478
+ return this.nodeType.DEFAULT;
479
+ }
480
+ }
481
+ setElementForId(e, i) {
482
+ this.elements[e] = i;
483
+ }
484
+ getElementById(e) {
485
+ return this.elements[e];
486
+ }
487
+ decorateNode(e) {
488
+ if (!e)
489
+ return;
490
+ const i = H(), l = this.nodes[this.nodes.length - 1];
491
+ e.icon && (l.icon = F(e.icon, i)), e.class && (l.class = F(e.class, i));
492
+ }
493
+ type2Str(e) {
494
+ switch (e) {
495
+ case this.nodeType.DEFAULT:
496
+ return "no-border";
497
+ case this.nodeType.RECT:
498
+ return "rect";
499
+ case this.nodeType.ROUNDED_RECT:
500
+ return "rounded-rect";
501
+ case this.nodeType.CIRCLE:
502
+ return "circle";
503
+ case this.nodeType.CLOUD:
504
+ return "cloud";
505
+ case this.nodeType.BANG:
506
+ return "bang";
507
+ case this.nodeType.HEXAGON:
508
+ return "hexgon";
509
+ // cspell: disable-line
510
+ default:
511
+ return "no-border";
512
+ }
513
+ }
514
+ /**
515
+ * Assign section numbers to nodes based on their position relative to root
516
+ * @param node - The mindmap node to process
517
+ * @param sectionNumber - The section number to assign (undefined for root)
518
+ */
519
+ assignSections(e, i) {
520
+ if (e.level === 0 ? e.section = void 0 : e.section = i, e.children)
521
+ for (const [l, u] of e.children.entries()) {
522
+ const h = e.level === 0 ? l : i;
523
+ this.assignSections(u, h);
524
+ }
525
+ }
526
+ /**
527
+ * Convert mindmap tree structure to flat array of nodes
528
+ * @param node - The mindmap node to process
529
+ * @param processedNodes - Array to collect processed nodes
530
+ */
531
+ flattenNodes(e, i) {
532
+ const l = ["mindmap-node"];
533
+ e.level === 0 ? l.push("section-root", "section--1") : e.section !== void 0 && l.push(`section-${e.section}`), e.class && l.push(e.class);
534
+ const u = l.join(" "), h = /* @__PURE__ */ c((y) => {
535
+ switch (y) {
536
+ case D.CIRCLE:
537
+ return "mindmapCircle";
538
+ case D.RECT:
539
+ return "rect";
540
+ case D.ROUNDED_RECT:
541
+ return "rounded";
542
+ case D.CLOUD:
543
+ return "cloud";
544
+ case D.BANG:
545
+ return "bang";
546
+ case D.HEXAGON:
547
+ return "hexagon";
548
+ case D.DEFAULT:
549
+ return "defaultMindmapNode";
550
+ case D.NO_BORDER:
551
+ default:
552
+ return "rect";
553
+ }
554
+ }, "getShapeFromType"), f = {
555
+ id: e.id.toString(),
556
+ domId: "node_" + e.id.toString(),
557
+ label: e.descr,
558
+ isGroup: !1,
559
+ shape: h(e.type),
560
+ width: e.width,
561
+ height: e.height ?? 0,
562
+ padding: e.padding,
563
+ cssClasses: u,
564
+ cssStyles: [],
565
+ look: "default",
566
+ icon: e.icon,
567
+ x: e.x,
568
+ y: e.y,
569
+ // Mindmap-specific properties
570
+ level: e.level,
571
+ nodeId: e.nodeId,
572
+ type: e.type,
573
+ section: e.section
574
+ };
575
+ if (i.push(f), e.children)
576
+ for (const y of e.children)
577
+ this.flattenNodes(y, i);
578
+ }
579
+ /**
580
+ * Generate edges from parent-child relationships in mindmap tree
581
+ * @param node - The mindmap node to process
582
+ * @param edges - Array to collect edges
583
+ */
584
+ generateEdges(e, i) {
585
+ if (e.children)
586
+ for (const l of e.children) {
587
+ let u = "edge";
588
+ l.section !== void 0 && (u += ` section-edge-${l.section}`);
589
+ const h = e.level + 1;
590
+ u += ` edge-depth-${h}`;
591
+ const f = {
592
+ id: `edge_${e.id}_${l.id}`,
593
+ start: e.id.toString(),
594
+ end: l.id.toString(),
595
+ type: "normal",
596
+ curve: "basis",
597
+ thickness: "normal",
598
+ look: "default",
599
+ classes: u,
600
+ // Store mindmap-specific data
601
+ depth: e.level,
602
+ section: l.section
603
+ };
604
+ i.push(f), this.generateEdges(l, i);
605
+ }
606
+ }
607
+ /**
608
+ * Get structured data for layout algorithms
609
+ * Following the pattern established by ER diagrams
610
+ * @returns Structured data containing nodes, edges, and config
611
+ */
612
+ getData() {
613
+ const e = this.getMindmap(), i = H(), u = he().layout !== void 0, h = i;
614
+ if (u || (h.layout = "cose-bilkent"), !e)
615
+ return {
616
+ nodes: [],
617
+ edges: [],
618
+ config: h
619
+ };
620
+ O.debug("getData: mindmapRoot", e, i), this.assignSections(e);
621
+ const f = [], y = [];
622
+ this.flattenNodes(e, f), this.generateEdges(e, y), O.debug(
623
+ `getData: processed ${f.length} nodes and ${y.length} edges`
624
+ );
625
+ const p = /* @__PURE__ */ new Map();
626
+ for (const k of f)
627
+ p.set(k.id, {
628
+ shape: k.shape,
629
+ width: k.width,
630
+ height: k.height,
631
+ padding: k.padding
632
+ });
633
+ return {
634
+ nodes: f,
635
+ edges: y,
636
+ config: h,
637
+ // Store the root node for mindmap-specific layout algorithms
638
+ rootNode: e,
639
+ // Properties required by dagre layout algorithm
640
+ markers: ["point"],
641
+ // Mindmaps don't use markers
642
+ direction: "TB",
643
+ // Top-to-bottom direction for mindmaps
644
+ nodeSpacing: 50,
645
+ // Default spacing between nodes
646
+ rankSpacing: 50,
647
+ // Default spacing between ranks
648
+ // Add shapes for ELK compatibility
649
+ shapes: Object.fromEntries(p),
650
+ // Additional properties that layout algorithms might expect
651
+ type: "mindmap",
652
+ diagramId: "mindmap-" + ge()
653
+ };
654
+ }
655
+ // Expose logger to grammar
656
+ getLogger() {
657
+ return O;
658
+ }
659
+ }, c(C, "MindmapDB"), C), me = /* @__PURE__ */ c(async (r, e, i, l) => {
660
+ O.debug(`Rendering mindmap diagram
661
+ ` + r);
662
+ const u = l.db, h = u.getData(), f = ae(e, h.config.securityLevel);
663
+ h.type = l.type, h.layoutAlgorithm = ce(h.config.layout, {
664
+ fallback: "cose-bilkent"
665
+ }), h.diagramId = e, u.getMindmap() && (h.nodes.forEach((p) => {
666
+ p.shape === "rounded" ? (p.radius = 15, p.taper = 15, p.stroke = "none", p.width = 0, p.padding = 15) : p.shape === "circle" ? p.padding = 10 : p.shape === "rect" && (p.width = 0, p.padding = 10);
667
+ }), await le(h, f), oe(
668
+ f,
669
+ h.config.mindmap?.padding ?? U.mindmap.padding,
670
+ "mindmapDiagram",
671
+ h.config.mindmap?.useMaxWidth ?? U.mindmap.useMaxWidth
672
+ ));
673
+ }, "draw"), Ee = {
674
+ draw: me
675
+ }, _e = /* @__PURE__ */ c((r) => {
676
+ let e = "";
677
+ for (let i = 0; i < r.THEME_COLOR_LIMIT; i++)
678
+ r["lineColor" + i] = r["lineColor" + i] || r["cScaleInv" + i], de(r["lineColor" + i]) ? r["lineColor" + i] = ue(r["lineColor" + i], 20) : r["lineColor" + i] = pe(r["lineColor" + i], 20);
679
+ for (let i = 0; i < r.THEME_COLOR_LIMIT; i++) {
680
+ const l = "" + (17 - 3 * i);
681
+ e += `
682
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
683
+ fill: ${r["cScale" + i]};
684
+ }
685
+ .section-${i - 1} text {
686
+ fill: ${r["cScaleLabel" + i]};
687
+ }
688
+ .node-icon-${i - 1} {
689
+ font-size: 40px;
690
+ color: ${r["cScaleLabel" + i]};
691
+ }
692
+ .section-edge-${i - 1}{
693
+ stroke: ${r["cScale" + i]};
694
+ }
695
+ .edge-depth-${i - 1}{
696
+ stroke-width: ${l};
697
+ }
698
+ .section-${i - 1} line {
699
+ stroke: ${r["cScaleInv" + i]} ;
700
+ stroke-width: 3;
701
+ }
702
+
703
+ .disabled, .disabled circle, .disabled text {
704
+ fill: lightgray;
705
+ }
706
+ .disabled text {
707
+ fill: #efefef;
708
+ }
709
+ `;
710
+ }
711
+ return e;
712
+ }, "genSections"), be = /* @__PURE__ */ c((r) => `
713
+ .edge {
714
+ stroke-width: 3;
715
+ }
716
+ ${_e(r)}
717
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
718
+ fill: ${r.git0};
719
+ }
720
+ .section-root text {
721
+ fill: ${r.gitBranchLabel0};
722
+ }
723
+ .section-root span {
724
+ color: ${r.gitBranchLabel0};
725
+ }
726
+ .section-2 span {
727
+ color: ${r.gitBranchLabel0};
728
+ }
729
+ .icon-container {
730
+ height:100%;
731
+ display: flex;
732
+ justify-content: center;
733
+ align-items: center;
734
+ }
735
+ .edge {
736
+ fill: none;
737
+ }
738
+ .mindmap-node-label {
739
+ dy: 1em;
740
+ alignment-baseline: middle;
741
+ text-anchor: middle;
742
+ dominant-baseline: middle;
743
+ text-align: center;
744
+ }
745
+ `, "getStyles"), Se = be, Le = {
746
+ get db() {
747
+ return new ye();
748
+ },
749
+ renderer: Ee,
750
+ parser: fe,
751
+ styles: Se
752
+ };
753
+ export {
754
+ Le as diagram
755
+ };