@aiderdesk/aiderdesk 0.88.0 → 0.89.0

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 (163) hide show
  1. package/out/renderer/assets/2DXBBFLN-DhlZjS3f.js +666 -0
  2. package/out/renderer/assets/46IJ22JX-C1e8pvI2.js +853 -0
  3. package/out/renderer/assets/4TTDE5I4-Bea_IXhu.js +501 -0
  4. package/out/renderer/assets/4UF3HTLV-CVqcE2iq.js +29 -0
  5. package/out/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
  6. package/out/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
  7. package/out/renderer/assets/AAXQQPKT-BVbjBycX.js +1130 -0
  8. package/out/renderer/assets/AKE5O7KZ-Dr4O6i9X.js +184 -0
  9. package/out/renderer/assets/{AgentSettings-DffQ3g7i.js → AgentSettings-ByYnHHTv.js} +710 -255
  10. package/out/renderer/assets/BNMLP6AG-CHDGj3j_.js +804 -0
  11. package/out/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
  12. package/out/renderer/assets/DR6PKOQU-C6a3Tq7K.js +301 -0
  13. package/out/renderer/assets/E4RJ7UJB-BQWgl9gv.js +441 -0
  14. package/out/renderer/assets/ELSXBIJH-CVPK3kX4.js +39 -0
  15. package/out/renderer/assets/ERTIBQVS-71_Ru0iJ.js +182 -0
  16. package/out/renderer/assets/F653G4FO-Dj2Ang6n.js +1497 -0
  17. package/out/renderer/assets/FKCDD66M-DCrQTwBi.js +205 -0
  18. package/out/renderer/assets/FP7KDXVC-DKVnH-En.js +221 -0
  19. package/out/renderer/assets/FT5I3RHX-hlTJy7Nw.js +243 -0
  20. package/out/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
  21. package/out/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
  22. package/out/renderer/assets/GY35JXOZ-cSi0MdIc.js +168 -0
  23. package/out/renderer/assets/H5EEJPP2-bpYW0xE8.js +353 -0
  24. package/out/renderer/assets/HWDLEDTA-uLGgs5fE.js +982 -0
  25. package/out/renderer/assets/{InfoIcon-CMLVIQF3.js → InfoIcon-DI4teJbi.js} +1 -1
  26. package/out/renderer/assets/JZWSX6AR-B0pkfB2b.js +67 -0
  27. package/out/renderer/assets/KQOEJWJY-EQFQbIDt.js +84 -0
  28. package/out/renderer/assets/KS3BB3KE-DclWHpbY.js +138 -0
  29. package/out/renderer/assets/KXJRRZHI-CHoCRoQ4.js +502 -0
  30. package/out/renderer/assets/MFVI5XKI-TmPyVySZ.js +10 -0
  31. package/out/renderer/assets/MWY2J62P-BlVjis68.js +1102 -0
  32. package/out/renderer/assets/MXGNCBL2-HvKcixVr.js +216 -0
  33. package/out/renderer/assets/N6DAJLIZ-B0JHSPS3.js +120 -0
  34. package/out/renderer/assets/NU5M23IW-CWgVJ5o_.js +116 -0
  35. package/out/renderer/assets/NV4XNBIS-uOSoaYKk.js +1221 -0
  36. package/out/renderer/assets/OGLU4SIR-CiNpshB1.js +289 -0
  37. package/out/renderer/assets/OUNS5N76-C6p0zhvm.js +1064 -0
  38. package/out/renderer/assets/{Onboarding-699qRMTN.js → Onboarding-Ct6-CF4Z.js} +4 -4
  39. package/out/renderer/assets/PU4ISKXV-BQc-2oYa.js +515 -0
  40. package/out/renderer/assets/PUZGS23X-Bf89SCAj.js +21 -0
  41. package/out/renderer/assets/{ProviderHeader-BnuGEmze.js → ProviderHeader-Buje398H.js} +2 -2
  42. package/out/renderer/assets/Q3IYVLG5-DbP4qs2C.js +500 -0
  43. package/out/renderer/assets/QYHQDLKZ-dANs6SeT.js +983 -0
  44. package/out/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
  45. package/out/renderer/assets/RZSVICHU-CeuX_9H4.js +263 -0
  46. package/out/renderer/assets/{SettingsPage-CLTNRnQI.js → SettingsPage-CLpPKXG1.js} +975 -845
  47. package/out/renderer/assets/UEXXS2NB-Bmbum3yG.js +25 -0
  48. package/out/renderer/assets/UHTQJXKL-C2OuiQBx.js +134 -0
  49. package/out/renderer/assets/URA2L2QI-DJ2BF8fn.js +201 -0
  50. package/out/renderer/assets/UXCHDUKG-B6wMZRAn.js +173 -0
  51. package/out/renderer/assets/{UsageDashboard-DRihVOqx.js → UsageDashboard-ORnsHGxF.js} +9130 -6449
  52. package/out/renderer/assets/VKNV3BUX-BMK4lviM.js +277 -0
  53. package/out/renderer/assets/VMV7XPHP-CzHnUaWh.js +127 -0
  54. package/out/renderer/assets/WEVWDWVA-BYWYeLxq.js +57 -0
  55. package/out/renderer/assets/XRRJ35LF-DaeQ2kbN.js +119 -0
  56. package/out/renderer/assets/YFKBLVVN-DsXlM7HO.js +990 -0
  57. package/out/renderer/assets/YHRE5QGZ-nB9z3NP1.js +697 -0
  58. package/out/renderer/assets/ZF3OVT4B-Ctn5OOBd.js +420 -0
  59. package/out/renderer/assets/{index-CC_7dh5L.js → index-BCaQe4ny.js} +2 -2
  60. package/out/renderer/assets/{index-HjbPyDJm.js → index-BD-JYQGT.js} +5 -5
  61. package/out/renderer/assets/{index-CBVmxCYX.js → index-BGR4ZXWZ.js} +2 -2
  62. package/out/renderer/assets/{index-D1Him45L.js → index-BZBhErKV.js} +2 -2
  63. package/out/renderer/assets/{index-DUOs3uZb.js → index-BcWszklu.js} +1 -1
  64. package/out/renderer/assets/{index-D1jY29Az.js → index-BpNNugm2.js} +4 -4
  65. package/out/renderer/assets/{index-3hl2j-_p.js → index-BrgyIQaN.js} +2 -2
  66. package/out/renderer/assets/{index-BJ-vdpjD.js → index-Bt1dN7k_.js} +1 -1
  67. package/out/renderer/assets/{index-B41U46QG.js → index-Bxu6rqm3.js} +1 -1
  68. package/out/renderer/assets/{index-TTgmBk0H.js → index-C6mXHxX3.js} +1 -1
  69. package/out/renderer/assets/{index-CNGDTtBW.js → index-CCbq90uE.js} +1 -1
  70. package/out/renderer/assets/{index-4IKrE3Ch.js → index-CCm3UXZP.js} +2 -2
  71. package/out/renderer/assets/{index-CY4zeK5l.js → index-CNkiGtsK.js} +3 -3
  72. package/out/renderer/assets/{index-ly0cB32v.css → index-CWfnJXNI.css} +116 -0
  73. package/out/renderer/assets/{index-DZ8Tuuit.js → index-Cc-He418.js} +29267 -54630
  74. package/out/renderer/assets/{index-Otcl72On.js → index-Crdzxx6k.js} +19 -15
  75. package/out/renderer/assets/{index-Z7VaFhjR.js → index-D30k3y98.js} +1 -1
  76. package/out/renderer/assets/{index-Bv8Yvnki.js → index-DAWoHfjM.js} +2 -2
  77. package/out/renderer/assets/{index-tkTKXqGX.js → index-DG5AIC6J.js} +3 -3
  78. package/out/renderer/assets/{index-DHZvdQmh.js → index-DSBgCNMv.js} +2 -2
  79. package/out/renderer/assets/{index-D2Y9BB9n.js → index-DeRKeskE.js} +5 -5
  80. package/out/renderer/assets/{index-Dq8m0XiD.js → index-DgQEgdew.js} +2 -2
  81. package/out/renderer/assets/{index-BeF6VrSe.js → index-Dgdp4i2K.js} +1 -1
  82. package/out/renderer/assets/{index--DpoC2Fa.js → index-DnNK6R2g.js} +2 -2
  83. package/out/renderer/assets/{index-vBiBurKH.js → index-DrNutodm.js} +2 -2
  84. package/out/renderer/assets/{index-DTwId9nn.js → index-FS3mY8Ct.js} +1 -1
  85. package/out/renderer/assets/{index-DBHj35Nq.js → index-KId2jLzt.js} +2 -2
  86. package/out/renderer/assets/{index-BFLm6WFt.js → index-PyRCX6hq.js} +5 -5
  87. package/out/renderer/assets/{index-8-JzmzqC.js → index-U8nE80jx.js} +2 -2
  88. package/out/renderer/assets/{index-BhXi7Le_.js → index-Vw8jKJU_.js} +5 -5
  89. package/out/renderer/assets/{index-CnxPOcjf.js → index-_a6zbU-0.js} +1 -1
  90. package/out/renderer/assets/{index-BSh2X31_.js → index-dsqlqRSG.js} +5 -5
  91. package/out/renderer/assets/{index-C-WEDvyw.js → index-rQL1hwaP.js} +5 -5
  92. package/out/renderer/assets/{jsx-dev-runtime-DshTpFeb.js → jsx-dev-runtime-Bwt8d4vP.js} +1 -1
  93. package/out/renderer/index.html +2 -2
  94. package/out/resources/prompts/system-prompt.hbs +11 -0
  95. package/out/resources/skills/extension-creator/SKILL.md +20 -1
  96. package/out/resources/skills/extension-creator/references/event-types.md +3 -3
  97. package/out/resources/skills/extension-creator/references/extension-interface.md +52 -0
  98. package/out/resources/skills/extension-creator/references/external-agent-providers.md +90 -0
  99. package/out/runner.js +1456 -182
  100. package/package.json +2 -2
  101. package/out/renderer/assets/abnfDiagram-N423BO3Z-D0STbTTF.js +0 -118
  102. package/out/renderer/assets/arc-DeFSKBzy.js +0 -131
  103. package/out/renderer/assets/architectureDiagram-T3A2C74G-BDrfxwK6.js +0 -8829
  104. package/out/renderer/assets/band-zXq5o_Ib.js +0 -77
  105. package/out/renderer/assets/blockDiagram-VBNYF7ZC-x_YF9Yme.js +0 -3824
  106. package/out/renderer/assets/c4Diagram-5PPSVZJV-C7kuvNRf.js +0 -2482
  107. package/out/renderer/assets/channel-T97-CMvj.js +0 -7
  108. package/out/renderer/assets/chunk-2GRJ4B5K-C7nbnxgH.js +0 -116
  109. package/out/renderer/assets/chunk-2Q5K7J3B-D5IUyzX4.js +0 -19
  110. package/out/renderer/assets/chunk-5RXB4S5H-DkL2I1-Q.js +0 -1988
  111. package/out/renderer/assets/chunk-5VM5RSS4-qszW8EYL.js +0 -19
  112. package/out/renderer/assets/chunk-6Q2QTUOP-CbtMo4y_.js +0 -860
  113. package/out/renderer/assets/chunk-GF5L2VYU-C6qdgHXJ.js +0 -2026
  114. package/out/renderer/assets/chunk-JWPE2WC7-DxAg7bLn.js +0 -16
  115. package/out/renderer/assets/chunk-KBJHAD2P-Cqd2HDdS.js +0 -24
  116. package/out/renderer/assets/chunk-RYQCIY6F-DVzbqgRf.js +0 -474
  117. package/out/renderer/assets/chunk-XXDRQBXY-DF_8pbWI.js +0 -13
  118. package/out/renderer/assets/classDiagram-JCYQIIEL-MfTsDS5w.js +0 -23
  119. package/out/renderer/assets/classDiagram-v2-OCEON4UE-MfTsDS5w.js +0 -23
  120. package/out/renderer/assets/cose-bilkent-JH36ORCC-BvzyW9fn.js +0 -4942
  121. package/out/renderer/assets/cynefin-VYW2F7L2-BmRenSSB.js +0 -32093
  122. package/out/renderer/assets/cynefinDiagram-MW4NZA55-DmybMaTR.js +0 -453
  123. package/out/renderer/assets/cytoscape.esm-Bx_1tVW-.js +0 -30332
  124. package/out/renderer/assets/dagre-VZM6K2ZE-b6plu1_t.js +0 -522
  125. package/out/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
  126. package/out/renderer/assets/diagram-7IWD3JNH-B0LyLNK-.js +0 -488
  127. package/out/renderer/assets/diagram-B4RE2ZJO-BtJGLH72.js +0 -632
  128. package/out/renderer/assets/diagram-LBJQPF4R-BpSykW90.js +0 -212
  129. package/out/renderer/assets/diagram-Q27KOJAE-_vw0jdNl.js +0 -857
  130. package/out/renderer/assets/diagram-UB23O5K3-rE12zYQ8.js +0 -311
  131. package/out/renderer/assets/ebnfDiagram-BXEA7PRR-BXR1_d_o.js +0 -138
  132. package/out/renderer/assets/erDiagram-JOGREHBK-B1QCAGl4.js +0 -1238
  133. package/out/renderer/assets/flowDiagram-UKHOOZJN-wRfN63to.js +0 -2348
  134. package/out/renderer/assets/ganttDiagram-PKOTCBZU-DsXpzatp.js +0 -2782
  135. package/out/renderer/assets/gitGraphDiagram-DS77QQ5N-CsYsZ42q.js +0 -1373
  136. package/out/renderer/assets/graph-CfUL5tFv.js +0 -1308
  137. package/out/renderer/assets/infoDiagram-6WML65LV-BXT6TYnf.js +0 -31
  138. package/out/renderer/assets/init-CTO7spbL.js +0 -35
  139. package/out/renderer/assets/ishikawaDiagram-WSZJBQD7-6BJ687Ec.js +0 -967
  140. package/out/renderer/assets/journeyDiagram-NVQOT4AX-HgkRlCT0.js +0 -1255
  141. package/out/renderer/assets/kanban-definition-27J2QSJJ-COYri25f.js +0 -1052
  142. package/out/renderer/assets/layout-BBVpFPy1.js +0 -2326
  143. package/out/renderer/assets/linear-DuNIFrPi.js +0 -361
  144. package/out/renderer/assets/map-toxJVbdU.js +0 -299
  145. package/out/renderer/assets/mindmap-definition-FAOFIHXS-DhCEcxPL.js +0 -1153
  146. package/out/renderer/assets/ordinal-BD3Y6v77.js +0 -77
  147. package/out/renderer/assets/pegDiagram-VL7TDLO6-DZ8w3ViJ.js +0 -126
  148. package/out/renderer/assets/pieDiagram-7S7Q4E2Y-JcEYE_Dn.js +0 -316
  149. package/out/renderer/assets/quadrantDiagram-CIZ2JOQS-De59Sk4l.js +0 -1343
  150. package/out/renderer/assets/railroadDiagram-AXF67PYL-D7nWbE5S.js +0 -92
  151. package/out/renderer/assets/requirementDiagram-LRYGKXZP-DKWcKu7I.js +0 -1204
  152. package/out/renderer/assets/sankeyDiagram-W5VNT64P-Bj8jLitx.js +0 -1274
  153. package/out/renderer/assets/sequenceDiagram-SI44F4Z6-D9Jp65xC.js +0 -4514
  154. package/out/renderer/assets/sizeCapture-X5ZJPWSS-mY9H2lE6.js +0 -62
  155. package/out/renderer/assets/stateDiagram-OKZ733FA-BEn9ud4k.js +0 -452
  156. package/out/renderer/assets/stateDiagram-v2-UEYNNEHI-D_psrMs3.js +0 -22
  157. package/out/renderer/assets/swimlanes-SLNWSIFB-BMcpfWEi.js +0 -8557
  158. package/out/renderer/assets/swimlanesDiagram-ULZ7WXOC-OwdbT2xV.js +0 -20
  159. package/out/renderer/assets/time-DMe8nTku.js +0 -985
  160. package/out/renderer/assets/timeline-definition-Z64GVDOM-BTi-OvtJ.js +0 -1596
  161. package/out/renderer/assets/vennDiagram-T6HMQDX7-CoxSnB7W.js +0 -2515
  162. package/out/renderer/assets/wardleyDiagram-T6FBY63Y-Dj0FNpwr.js +0 -975
  163. package/out/renderer/assets/xychartDiagram-ELKLHX3M-jVSDR4Ov.js +0 -1943
@@ -1,1153 +0,0 @@
1
- import { g as getDiagramElement } from "./chunk-XXDRQBXY-DF_8pbWI.js";
2
- import { s as setupViewPortForSVG } from "./chunk-KBJHAD2P-Cqd2HDdS.js";
3
- import { _ as __name, A as log, a0 as getRegisteredLayoutAlgorithm, a1 as render, a3 as getConfig, a6 as defaultConfig_default, y as getConfig2, J as sanitizeText, aJ as getUserDefinedConfig, aK as v4, aE as isDark, aF as lighten, aG as darken } from "./index-DZ8Tuuit.js";
4
- var parser = (function() {
5
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
6
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
7
- return o2;
8
- }, "o"), $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22];
9
- var parser2 = {
10
- trace: /* @__PURE__ */ __name(function trace() {
11
- }, "trace"),
12
- yy: {},
13
- 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 },
14
- 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" },
15
- 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]],
16
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
17
- var $0 = $$.length - 1;
18
- switch (yystate) {
19
- case 6:
20
- case 7:
21
- return yy;
22
- case 8:
23
- yy.getLogger().trace("Stop NL ");
24
- break;
25
- case 9:
26
- yy.getLogger().trace("Stop EOF ");
27
- break;
28
- case 11:
29
- yy.getLogger().trace("Stop NL2 ");
30
- break;
31
- case 12:
32
- yy.getLogger().trace("Stop EOF2 ");
33
- break;
34
- case 15:
35
- yy.getLogger().info("Node: ", $$[$0].id);
36
- yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
37
- break;
38
- case 16:
39
- yy.getLogger().trace("Icon: ", $$[$0]);
40
- yy.decorateNode({ icon: $$[$0] });
41
- break;
42
- case 17:
43
- case 21:
44
- yy.decorateNode({ class: $$[$0] });
45
- break;
46
- case 18:
47
- yy.getLogger().trace("SPACELIST");
48
- break;
49
- case 19:
50
- yy.getLogger().trace("Node: ", $$[$0].id);
51
- yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
52
- break;
53
- case 20:
54
- yy.decorateNode({ icon: $$[$0] });
55
- break;
56
- case 25:
57
- yy.getLogger().trace("node found ..", $$[$0 - 2]);
58
- this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
59
- break;
60
- case 26:
61
- this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT };
62
- break;
63
- case 27:
64
- yy.getLogger().trace("node found ..", $$[$0 - 3]);
65
- this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
66
- break;
67
- }
68
- }, "anonymous"),
69
- table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])],
70
- defaultActions: { 2: [2, 1], 6: [2, 2] },
71
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
72
- if (hash.recoverable) {
73
- this.trace(str);
74
- } else {
75
- var error = new Error(str);
76
- error.hash = hash;
77
- throw error;
78
- }
79
- }, "parseError"),
80
- parse: /* @__PURE__ */ __name(function parse(input) {
81
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
82
- var args = lstack.slice.call(arguments, 1);
83
- var lexer2 = Object.create(this.lexer);
84
- var sharedState = { yy: {} };
85
- for (var k in this.yy) {
86
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
87
- sharedState.yy[k] = this.yy[k];
88
- }
89
- }
90
- lexer2.setInput(input, sharedState.yy);
91
- sharedState.yy.lexer = lexer2;
92
- sharedState.yy.parser = this;
93
- if (typeof lexer2.yylloc == "undefined") {
94
- lexer2.yylloc = {};
95
- }
96
- var yyloc = lexer2.yylloc;
97
- lstack.push(yyloc);
98
- var ranges = lexer2.options && lexer2.options.ranges;
99
- if (typeof sharedState.yy.parseError === "function") {
100
- this.parseError = sharedState.yy.parseError;
101
- } else {
102
- this.parseError = Object.getPrototypeOf(this).parseError;
103
- }
104
- function popStack(n) {
105
- stack.length = stack.length - 2 * n;
106
- vstack.length = vstack.length - n;
107
- lstack.length = lstack.length - n;
108
- }
109
- __name(popStack, "popStack");
110
- function lex() {
111
- var token;
112
- token = tstack.pop() || lexer2.lex() || EOF;
113
- if (typeof token !== "number") {
114
- if (token instanceof Array) {
115
- tstack = token;
116
- token = tstack.pop();
117
- }
118
- token = self.symbols_[token] || token;
119
- }
120
- return token;
121
- }
122
- __name(lex, "lex");
123
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
124
- while (true) {
125
- state = stack[stack.length - 1];
126
- if (this.defaultActions[state]) {
127
- action = this.defaultActions[state];
128
- } else {
129
- if (symbol === null || typeof symbol == "undefined") {
130
- symbol = lex();
131
- }
132
- action = table[state] && table[state][symbol];
133
- }
134
- if (typeof action === "undefined" || !action.length || !action[0]) {
135
- var errStr = "";
136
- expected = [];
137
- for (p in table[state]) {
138
- if (this.terminals_[p] && p > TERROR) {
139
- expected.push("'" + this.terminals_[p] + "'");
140
- }
141
- }
142
- if (lexer2.showPosition) {
143
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
144
- } else {
145
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
146
- }
147
- this.parseError(errStr, {
148
- text: lexer2.match,
149
- token: this.terminals_[symbol] || symbol,
150
- line: lexer2.yylineno,
151
- loc: yyloc,
152
- expected
153
- });
154
- }
155
- if (action[0] instanceof Array && action.length > 1) {
156
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
157
- }
158
- switch (action[0]) {
159
- case 1:
160
- stack.push(symbol);
161
- vstack.push(lexer2.yytext);
162
- lstack.push(lexer2.yylloc);
163
- stack.push(action[1]);
164
- symbol = null;
165
- {
166
- yyleng = lexer2.yyleng;
167
- yytext = lexer2.yytext;
168
- yylineno = lexer2.yylineno;
169
- yyloc = lexer2.yylloc;
170
- }
171
- break;
172
- case 2:
173
- len = this.productions_[action[1]][1];
174
- yyval.$ = vstack[vstack.length - len];
175
- yyval._$ = {
176
- first_line: lstack[lstack.length - (len || 1)].first_line,
177
- last_line: lstack[lstack.length - 1].last_line,
178
- first_column: lstack[lstack.length - (len || 1)].first_column,
179
- last_column: lstack[lstack.length - 1].last_column
180
- };
181
- if (ranges) {
182
- yyval._$.range = [
183
- lstack[lstack.length - (len || 1)].range[0],
184
- lstack[lstack.length - 1].range[1]
185
- ];
186
- }
187
- r = this.performAction.apply(yyval, [
188
- yytext,
189
- yyleng,
190
- yylineno,
191
- sharedState.yy,
192
- action[1],
193
- vstack,
194
- lstack
195
- ].concat(args));
196
- if (typeof r !== "undefined") {
197
- return r;
198
- }
199
- if (len) {
200
- stack = stack.slice(0, -1 * len * 2);
201
- vstack = vstack.slice(0, -1 * len);
202
- lstack = lstack.slice(0, -1 * len);
203
- }
204
- stack.push(this.productions_[action[1]][0]);
205
- vstack.push(yyval.$);
206
- lstack.push(yyval._$);
207
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
208
- stack.push(newState);
209
- break;
210
- case 3:
211
- return true;
212
- }
213
- }
214
- return true;
215
- }, "parse")
216
- };
217
- var lexer = /* @__PURE__ */ (function() {
218
- var lexer2 = {
219
- EOF: 1,
220
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
221
- if (this.yy.parser) {
222
- this.yy.parser.parseError(str, hash);
223
- } else {
224
- throw new Error(str);
225
- }
226
- }, "parseError"),
227
- // resets the lexer, sets new input
228
- setInput: /* @__PURE__ */ __name(function(input, yy) {
229
- this.yy = yy || this.yy || {};
230
- this._input = input;
231
- this._more = this._backtrack = this.done = false;
232
- this.yylineno = this.yyleng = 0;
233
- this.yytext = this.matched = this.match = "";
234
- this.conditionStack = ["INITIAL"];
235
- this.yylloc = {
236
- first_line: 1,
237
- first_column: 0,
238
- last_line: 1,
239
- last_column: 0
240
- };
241
- if (this.options.ranges) {
242
- this.yylloc.range = [0, 0];
243
- }
244
- this.offset = 0;
245
- return this;
246
- }, "setInput"),
247
- // consumes and returns one char from the input
248
- input: /* @__PURE__ */ __name(function() {
249
- var ch = this._input[0];
250
- this.yytext += ch;
251
- this.yyleng++;
252
- this.offset++;
253
- this.match += ch;
254
- this.matched += ch;
255
- var lines = ch.match(/(?:\r\n?|\n).*/g);
256
- if (lines) {
257
- this.yylineno++;
258
- this.yylloc.last_line++;
259
- } else {
260
- this.yylloc.last_column++;
261
- }
262
- if (this.options.ranges) {
263
- this.yylloc.range[1]++;
264
- }
265
- this._input = this._input.slice(1);
266
- return ch;
267
- }, "input"),
268
- // unshifts one char (or a string) into the input
269
- unput: /* @__PURE__ */ __name(function(ch) {
270
- var len = ch.length;
271
- var lines = ch.split(/(?:\r\n?|\n)/g);
272
- this._input = ch + this._input;
273
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
274
- this.offset -= len;
275
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
276
- this.match = this.match.substr(0, this.match.length - 1);
277
- this.matched = this.matched.substr(0, this.matched.length - 1);
278
- if (lines.length - 1) {
279
- this.yylineno -= lines.length - 1;
280
- }
281
- var r = this.yylloc.range;
282
- this.yylloc = {
283
- first_line: this.yylloc.first_line,
284
- last_line: this.yylineno + 1,
285
- first_column: this.yylloc.first_column,
286
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
287
- };
288
- if (this.options.ranges) {
289
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
290
- }
291
- this.yyleng = this.yytext.length;
292
- return this;
293
- }, "unput"),
294
- // When called from action, caches matched text and appends it on next action
295
- more: /* @__PURE__ */ __name(function() {
296
- this._more = true;
297
- return this;
298
- }, "more"),
299
- // 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.
300
- reject: /* @__PURE__ */ __name(function() {
301
- if (this.options.backtrack_lexer) {
302
- this._backtrack = true;
303
- } else {
304
- 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).\n" + this.showPosition(), {
305
- text: "",
306
- token: null,
307
- line: this.yylineno
308
- });
309
- }
310
- return this;
311
- }, "reject"),
312
- // retain first n characters of the match
313
- less: /* @__PURE__ */ __name(function(n) {
314
- this.unput(this.match.slice(n));
315
- }, "less"),
316
- // displays already matched input, i.e. for error messages
317
- pastInput: /* @__PURE__ */ __name(function() {
318
- var past = this.matched.substr(0, this.matched.length - this.match.length);
319
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
320
- }, "pastInput"),
321
- // displays upcoming input, i.e. for error messages
322
- upcomingInput: /* @__PURE__ */ __name(function() {
323
- var next = this.match;
324
- if (next.length < 20) {
325
- next += this._input.substr(0, 20 - next.length);
326
- }
327
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
328
- }, "upcomingInput"),
329
- // displays the character position where the lexing error occurred, i.e. for error messages
330
- showPosition: /* @__PURE__ */ __name(function() {
331
- var pre = this.pastInput();
332
- var c = new Array(pre.length + 1).join("-");
333
- return pre + this.upcomingInput() + "\n" + c + "^";
334
- }, "showPosition"),
335
- // test the lexed token: return FALSE when not a match, otherwise return token
336
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
337
- var token, lines, backup;
338
- if (this.options.backtrack_lexer) {
339
- backup = {
340
- yylineno: this.yylineno,
341
- yylloc: {
342
- first_line: this.yylloc.first_line,
343
- last_line: this.last_line,
344
- first_column: this.yylloc.first_column,
345
- last_column: this.yylloc.last_column
346
- },
347
- yytext: this.yytext,
348
- match: this.match,
349
- matches: this.matches,
350
- matched: this.matched,
351
- yyleng: this.yyleng,
352
- offset: this.offset,
353
- _more: this._more,
354
- _input: this._input,
355
- yy: this.yy,
356
- conditionStack: this.conditionStack.slice(0),
357
- done: this.done
358
- };
359
- if (this.options.ranges) {
360
- backup.yylloc.range = this.yylloc.range.slice(0);
361
- }
362
- }
363
- lines = match[0].match(/(?:\r\n?|\n).*/g);
364
- if (lines) {
365
- this.yylineno += lines.length;
366
- }
367
- this.yylloc = {
368
- first_line: this.yylloc.last_line,
369
- last_line: this.yylineno + 1,
370
- first_column: this.yylloc.last_column,
371
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
372
- };
373
- this.yytext += match[0];
374
- this.match += match[0];
375
- this.matches = match;
376
- this.yyleng = this.yytext.length;
377
- if (this.options.ranges) {
378
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
379
- }
380
- this._more = false;
381
- this._backtrack = false;
382
- this._input = this._input.slice(match[0].length);
383
- this.matched += match[0];
384
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
385
- if (this.done && this._input) {
386
- this.done = false;
387
- }
388
- if (token) {
389
- return token;
390
- } else if (this._backtrack) {
391
- for (var k in backup) {
392
- this[k] = backup[k];
393
- }
394
- return false;
395
- }
396
- return false;
397
- }, "test_match"),
398
- // return next match in input
399
- next: /* @__PURE__ */ __name(function() {
400
- if (this.done) {
401
- return this.EOF;
402
- }
403
- if (!this._input) {
404
- this.done = true;
405
- }
406
- var token, match, tempMatch, index;
407
- if (!this._more) {
408
- this.yytext = "";
409
- this.match = "";
410
- }
411
- var rules = this._currentRules();
412
- for (var i = 0; i < rules.length; i++) {
413
- tempMatch = this._input.match(this.rules[rules[i]]);
414
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
415
- match = tempMatch;
416
- index = i;
417
- if (this.options.backtrack_lexer) {
418
- token = this.test_match(tempMatch, rules[i]);
419
- if (token !== false) {
420
- return token;
421
- } else if (this._backtrack) {
422
- match = false;
423
- continue;
424
- } else {
425
- return false;
426
- }
427
- } else if (!this.options.flex) {
428
- break;
429
- }
430
- }
431
- }
432
- if (match) {
433
- token = this.test_match(match, rules[index]);
434
- if (token !== false) {
435
- return token;
436
- }
437
- return false;
438
- }
439
- if (this._input === "") {
440
- return this.EOF;
441
- } else {
442
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
443
- text: "",
444
- token: null,
445
- line: this.yylineno
446
- });
447
- }
448
- }, "next"),
449
- // return next match that has a token
450
- lex: /* @__PURE__ */ __name(function lex() {
451
- var r = this.next();
452
- if (r) {
453
- return r;
454
- } else {
455
- return this.lex();
456
- }
457
- }, "lex"),
458
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
459
- begin: /* @__PURE__ */ __name(function begin(condition) {
460
- this.conditionStack.push(condition);
461
- }, "begin"),
462
- // pop the previously active lexer condition state off the condition stack
463
- popState: /* @__PURE__ */ __name(function popState() {
464
- var n = this.conditionStack.length - 1;
465
- if (n > 0) {
466
- return this.conditionStack.pop();
467
- } else {
468
- return this.conditionStack[0];
469
- }
470
- }, "popState"),
471
- // produce the lexer rule set which is active for the currently active lexer condition state
472
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
473
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
474
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
475
- } else {
476
- return this.conditions["INITIAL"].rules;
477
- }
478
- }, "_currentRules"),
479
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
480
- topState: /* @__PURE__ */ __name(function topState(n) {
481
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
482
- if (n >= 0) {
483
- return this.conditionStack[n];
484
- } else {
485
- return "INITIAL";
486
- }
487
- }, "topState"),
488
- // alias for begin(condition)
489
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
490
- this.begin(condition);
491
- }, "pushState"),
492
- // return the number of states currently on the stack
493
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
494
- return this.conditionStack.length;
495
- }, "stateStackSize"),
496
- options: { "case-insensitive": true },
497
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
498
- switch ($avoiding_name_collisions) {
499
- case 0:
500
- yy.getLogger().trace("Found comment", yy_.yytext);
501
- return 6;
502
- case 1:
503
- return 8;
504
- case 2:
505
- this.begin("CLASS");
506
- break;
507
- case 3:
508
- this.popState();
509
- return 16;
510
- case 4:
511
- this.popState();
512
- break;
513
- case 5:
514
- yy.getLogger().trace("Begin icon");
515
- this.begin("ICON");
516
- break;
517
- case 6:
518
- yy.getLogger().trace("SPACELINE");
519
- return 6;
520
- case 7:
521
- return 7;
522
- case 8:
523
- return 15;
524
- case 9:
525
- yy.getLogger().trace("end icon");
526
- this.popState();
527
- break;
528
- case 10:
529
- yy.getLogger().trace("Exploding node");
530
- this.begin("NODE");
531
- return 19;
532
- case 11:
533
- yy.getLogger().trace("Cloud");
534
- this.begin("NODE");
535
- return 19;
536
- case 12:
537
- yy.getLogger().trace("Explosion Bang");
538
- this.begin("NODE");
539
- return 19;
540
- case 13:
541
- yy.getLogger().trace("Cloud Bang");
542
- this.begin("NODE");
543
- return 19;
544
- case 14:
545
- this.begin("NODE");
546
- return 19;
547
- case 15:
548
- this.begin("NODE");
549
- return 19;
550
- case 16:
551
- this.begin("NODE");
552
- return 19;
553
- case 17:
554
- this.begin("NODE");
555
- return 19;
556
- case 18:
557
- return 13;
558
- case 19:
559
- return 22;
560
- case 20:
561
- return 11;
562
- case 21:
563
- this.begin("NSTR2");
564
- break;
565
- case 22:
566
- return "NODE_DESCR";
567
- case 23:
568
- this.popState();
569
- break;
570
- case 24:
571
- yy.getLogger().trace("Starting NSTR");
572
- this.begin("NSTR");
573
- break;
574
- case 25:
575
- yy.getLogger().trace("description:", yy_.yytext);
576
- return "NODE_DESCR";
577
- case 26:
578
- this.popState();
579
- break;
580
- case 27:
581
- this.popState();
582
- yy.getLogger().trace("node end ))");
583
- return "NODE_DEND";
584
- case 28:
585
- this.popState();
586
- yy.getLogger().trace("node end )");
587
- return "NODE_DEND";
588
- case 29:
589
- this.popState();
590
- yy.getLogger().trace("node end ...", yy_.yytext);
591
- return "NODE_DEND";
592
- case 30:
593
- this.popState();
594
- yy.getLogger().trace("node end ((");
595
- return "NODE_DEND";
596
- case 31:
597
- this.popState();
598
- yy.getLogger().trace("node end (-");
599
- return "NODE_DEND";
600
- case 32:
601
- this.popState();
602
- yy.getLogger().trace("node end (-");
603
- return "NODE_DEND";
604
- case 33:
605
- this.popState();
606
- yy.getLogger().trace("node end ((");
607
- return "NODE_DEND";
608
- case 34:
609
- this.popState();
610
- yy.getLogger().trace("node end ((");
611
- return "NODE_DEND";
612
- case 35:
613
- yy.getLogger().trace("Long description:", yy_.yytext);
614
- return 20;
615
- case 36:
616
- yy.getLogger().trace("Long description:", yy_.yytext);
617
- return 20;
618
- }
619
- }, "anonymous"),
620
- 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],
621
- conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } }
622
- };
623
- return lexer2;
624
- })();
625
- parser2.lexer = lexer;
626
- function Parser() {
627
- this.yy = {};
628
- }
629
- __name(Parser, "Parser");
630
- Parser.prototype = parser2;
631
- parser2.Parser = Parser;
632
- return new Parser();
633
- })();
634
- parser.parser = parser;
635
- var mindmap_default = parser;
636
- var MAX_SECTIONS = 12;
637
- var nodeType = {
638
- DEFAULT: 0,
639
- NO_BORDER: 0,
640
- ROUNDED_RECT: 1,
641
- RECT: 2,
642
- CIRCLE: 3,
643
- CLOUD: 4,
644
- BANG: 5,
645
- HEXAGON: 6
646
- };
647
- var MindmapDB = class {
648
- constructor() {
649
- this.nodes = [];
650
- this.count = 0;
651
- this.elements = {};
652
- this.getLogger = this.getLogger.bind(this);
653
- this.nodeType = nodeType;
654
- this.clear();
655
- this.getType = this.getType.bind(this);
656
- this.getElementById = this.getElementById.bind(this);
657
- this.getParent = this.getParent.bind(this);
658
- this.getMindmap = this.getMindmap.bind(this);
659
- this.addNode = this.addNode.bind(this);
660
- this.decorateNode = this.decorateNode.bind(this);
661
- }
662
- static {
663
- __name(this, "MindmapDB");
664
- }
665
- clear() {
666
- this.nodes = [];
667
- this.count = 0;
668
- this.elements = {};
669
- this.baseLevel = void 0;
670
- }
671
- getParent(level) {
672
- for (let i = this.nodes.length - 1; i >= 0; i--) {
673
- if (this.nodes[i].level < level) {
674
- return this.nodes[i];
675
- }
676
- }
677
- return null;
678
- }
679
- getMindmap() {
680
- return this.nodes.length > 0 ? this.nodes[0] : null;
681
- }
682
- addNode(level, id, descr, type) {
683
- log.info("addNode", level, id, descr, type);
684
- let isRoot = false;
685
- if (this.nodes.length === 0) {
686
- this.baseLevel = level;
687
- level = 0;
688
- isRoot = true;
689
- } else if (this.baseLevel !== void 0) {
690
- level = level - this.baseLevel;
691
- isRoot = false;
692
- }
693
- const conf = getConfig2();
694
- let padding = conf.mindmap?.padding ?? defaultConfig_default.mindmap.padding;
695
- switch (type) {
696
- case this.nodeType.ROUNDED_RECT:
697
- case this.nodeType.RECT:
698
- case this.nodeType.HEXAGON:
699
- padding *= 2;
700
- break;
701
- }
702
- const node = {
703
- id: this.count++,
704
- nodeId: sanitizeText(id, conf),
705
- level,
706
- descr: sanitizeText(descr, conf),
707
- type,
708
- children: [],
709
- width: conf.mindmap?.maxNodeWidth ?? defaultConfig_default.mindmap.maxNodeWidth,
710
- padding,
711
- isRoot
712
- };
713
- const parent = this.getParent(level);
714
- if (parent) {
715
- parent.children.push(node);
716
- this.nodes.push(node);
717
- } else {
718
- if (isRoot) {
719
- this.nodes.push(node);
720
- } else {
721
- throw new Error(
722
- `There can be only one root. No parent could be found for ("${node.descr}")`
723
- );
724
- }
725
- }
726
- }
727
- getType(startStr, endStr) {
728
- log.debug("In get type", startStr, endStr);
729
- switch (startStr) {
730
- case "[":
731
- return this.nodeType.RECT;
732
- case "(":
733
- return endStr === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
734
- case "((":
735
- return this.nodeType.CIRCLE;
736
- case ")":
737
- return this.nodeType.CLOUD;
738
- case "))":
739
- return this.nodeType.BANG;
740
- case "{{":
741
- return this.nodeType.HEXAGON;
742
- default:
743
- return this.nodeType.DEFAULT;
744
- }
745
- }
746
- setElementForId(id, element) {
747
- this.elements[id] = element;
748
- }
749
- getElementById(id) {
750
- return this.elements[id];
751
- }
752
- decorateNode(decoration) {
753
- if (!decoration) {
754
- return;
755
- }
756
- const config = getConfig2();
757
- const node = this.nodes[this.nodes.length - 1];
758
- if (decoration.icon) {
759
- node.icon = sanitizeText(decoration.icon, config);
760
- }
761
- if (decoration.class) {
762
- node.class = sanitizeText(decoration.class, config);
763
- }
764
- }
765
- type2Str(type) {
766
- switch (type) {
767
- case this.nodeType.DEFAULT:
768
- return "no-border";
769
- case this.nodeType.RECT:
770
- return "rect";
771
- case this.nodeType.ROUNDED_RECT:
772
- return "rounded-rect";
773
- case this.nodeType.CIRCLE:
774
- return "circle";
775
- case this.nodeType.CLOUD:
776
- return "cloud";
777
- case this.nodeType.BANG:
778
- return "bang";
779
- case this.nodeType.HEXAGON:
780
- return "hexgon";
781
- // cspell: disable-line
782
- default:
783
- return "no-border";
784
- }
785
- }
786
- /**
787
- * Assign section numbers to nodes based on their position relative to root
788
- * @param node - The mindmap node to process
789
- * @param sectionNumber - The section number to assign (undefined for root)
790
- */
791
- assignSections(node, sectionNumber) {
792
- if (node.level === 0) {
793
- node.section = void 0;
794
- } else {
795
- node.section = sectionNumber;
796
- }
797
- if (node.children) {
798
- for (const [index, child] of node.children.entries()) {
799
- const childSectionNumber = node.level === 0 ? index % (MAX_SECTIONS - 1) : sectionNumber;
800
- this.assignSections(child, childSectionNumber);
801
- }
802
- }
803
- }
804
- /**
805
- * Convert mindmap tree structure to flat array of nodes
806
- * @param node - The mindmap node to process
807
- * @param processedNodes - Array to collect processed nodes
808
- */
809
- flattenNodes(node, processedNodes) {
810
- const conf = getConfig2();
811
- const cssClasses = ["mindmap-node"];
812
- if (node.isRoot === true) {
813
- cssClasses.push("section-root", "section--1");
814
- } else if (node.section !== void 0) {
815
- cssClasses.push(`section-${node.section}`);
816
- }
817
- if (node.class) {
818
- cssClasses.push(node.class);
819
- }
820
- const classes = cssClasses.join(" ");
821
- const getShapeFromType = /* @__PURE__ */ __name((type) => {
822
- const theme = conf.theme?.toLowerCase() ?? "";
823
- const isReduxTheme = theme.includes("redux");
824
- switch (type) {
825
- case nodeType.CIRCLE:
826
- return "mindmapCircle";
827
- case nodeType.RECT:
828
- return "rect";
829
- case nodeType.ROUNDED_RECT:
830
- return "rounded";
831
- case nodeType.CLOUD:
832
- return "cloud";
833
- case nodeType.BANG:
834
- return "bang";
835
- case nodeType.HEXAGON:
836
- return "hexagon";
837
- case nodeType.DEFAULT:
838
- return isReduxTheme ? "rounded" : "defaultMindmapNode";
839
- case nodeType.NO_BORDER:
840
- default:
841
- return "rect";
842
- }
843
- }, "getShapeFromType");
844
- const processedNode = {
845
- id: node.id.toString(),
846
- domId: "node_" + node.id.toString(),
847
- label: node.descr,
848
- labelType: "markdown",
849
- isGroup: false,
850
- shape: getShapeFromType(node.type),
851
- width: node.width,
852
- height: node.height ?? 0,
853
- padding: node.padding,
854
- cssClasses: classes,
855
- cssStyles: [],
856
- look: conf.look,
857
- icon: node.icon,
858
- x: node.x,
859
- y: node.y,
860
- // Mindmap-specific properties
861
- level: node.level,
862
- nodeId: node.nodeId,
863
- type: node.type,
864
- section: node.section
865
- };
866
- processedNodes.push(processedNode);
867
- if (node.children) {
868
- for (const child of node.children) {
869
- this.flattenNodes(child, processedNodes);
870
- }
871
- }
872
- }
873
- /**
874
- * Generate edges from parent-child relationships in mindmap tree
875
- * @param node - The mindmap node to process
876
- * @param edges - Array to collect edges
877
- */
878
- generateEdges(node, edges) {
879
- if (!node.children) {
880
- return;
881
- }
882
- const conf = getConfig2();
883
- for (const child of node.children) {
884
- let edgeClasses = "edge";
885
- if (child.section !== void 0) {
886
- edgeClasses += ` section-edge-${child.section}`;
887
- }
888
- const edgeDepth = node.level + 1;
889
- edgeClasses += ` edge-depth-${edgeDepth}`;
890
- const edge = {
891
- id: `edge_${node.id}_${child.id}`,
892
- start: node.id.toString(),
893
- end: child.id.toString(),
894
- type: "normal",
895
- curve: "basis",
896
- thickness: "normal",
897
- look: conf.look,
898
- classes: edgeClasses,
899
- // Store mindmap-specific data
900
- depth: node.level,
901
- section: child.section
902
- };
903
- edges.push(edge);
904
- this.generateEdges(child, edges);
905
- }
906
- }
907
- /**
908
- * Get structured data for layout algorithms
909
- * Following the pattern established by ER diagrams
910
- * @returns Structured data containing nodes, edges, and config
911
- */
912
- getData() {
913
- const mindmapRoot = this.getMindmap();
914
- const config = getConfig2();
915
- const userDefinedConfig = getUserDefinedConfig();
916
- const hasUserDefinedLayout = userDefinedConfig.layout !== void 0;
917
- const finalConfig = config;
918
- if (!hasUserDefinedLayout) {
919
- finalConfig.layout = "cose-bilkent";
920
- }
921
- if (!mindmapRoot) {
922
- return {
923
- nodes: [],
924
- edges: [],
925
- config: finalConfig
926
- };
927
- }
928
- log.debug("getData: mindmapRoot", mindmapRoot, config);
929
- this.assignSections(mindmapRoot);
930
- const processedNodes = [];
931
- const processedEdges = [];
932
- this.flattenNodes(mindmapRoot, processedNodes);
933
- this.generateEdges(mindmapRoot, processedEdges);
934
- log.debug(
935
- `getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`
936
- );
937
- const shapes = /* @__PURE__ */ new Map();
938
- for (const node of processedNodes) {
939
- shapes.set(node.id, {
940
- shape: node.shape,
941
- width: node.width,
942
- height: node.height,
943
- padding: node.padding
944
- });
945
- }
946
- return {
947
- nodes: processedNodes,
948
- edges: processedEdges,
949
- config: finalConfig,
950
- // Store the root node for mindmap-specific layout algorithms
951
- rootNode: mindmapRoot,
952
- // Properties required by dagre layout algorithm
953
- markers: ["point"],
954
- // Mindmaps don't use markers
955
- direction: "TB",
956
- // Top-to-bottom direction for mindmaps
957
- nodeSpacing: 50,
958
- // Default spacing between nodes
959
- rankSpacing: 50,
960
- // Default spacing between ranks
961
- // Add shapes for ELK compatibility
962
- shapes: Object.fromEntries(shapes),
963
- // Additional properties that layout algorithms might expect
964
- type: "mindmap",
965
- diagramId: "mindmap-" + v4()
966
- };
967
- }
968
- // Expose logger to grammar
969
- getLogger() {
970
- return log;
971
- }
972
- };
973
- var draw = /* @__PURE__ */ __name(async (text, id, _version, diagObj) => {
974
- log.debug("Rendering mindmap diagram\n" + text);
975
- const db = diagObj.db;
976
- const data4Layout = db.getData();
977
- const svg = getDiagramElement(id, data4Layout.config.securityLevel);
978
- data4Layout.type = diagObj.type;
979
- data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(data4Layout.config.layout, {
980
- fallback: "cose-bilkent"
981
- });
982
- data4Layout.diagramId = id;
983
- const mm = db.getMindmap();
984
- if (!mm) {
985
- return;
986
- }
987
- data4Layout.nodes.forEach((node) => {
988
- if (node.shape === "rounded") {
989
- node.radius = 15;
990
- node.taper = 15;
991
- node.stroke = "none";
992
- node.width = 0;
993
- node.padding = 15;
994
- } else if (node.shape === "circle") {
995
- node.padding = 10;
996
- } else if (node.shape === "rect") {
997
- node.width = 0;
998
- node.padding = 10;
999
- } else if (node.shape === "hexagon") {
1000
- node.width = 0;
1001
- node.height = 0;
1002
- }
1003
- });
1004
- await render(data4Layout, svg);
1005
- const { themeVariables } = getConfig();
1006
- const { useGradient, gradientStart, gradientStop } = themeVariables;
1007
- if (useGradient && gradientStart && gradientStop) {
1008
- const svgId = svg.attr("id");
1009
- const gradient = svg.append("defs").append("linearGradient").attr("id", `${svgId}-gradient`).attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
1010
- gradient.append("stop").attr("offset", "0%").attr("stop-color", gradientStart).attr("stop-opacity", 1);
1011
- gradient.append("stop").attr("offset", "100%").attr("stop-color", gradientStop).attr("stop-opacity", 1);
1012
- }
1013
- setupViewPortForSVG(
1014
- svg,
1015
- data4Layout.config.mindmap?.padding ?? defaultConfig_default.mindmap.padding,
1016
- "mindmapDiagram",
1017
- data4Layout.config.mindmap?.useMaxWidth ?? defaultConfig_default.mindmap.useMaxWidth
1018
- );
1019
- }, "draw");
1020
- var mindmapRenderer_default = {
1021
- draw
1022
- };
1023
- var genSections = /* @__PURE__ */ __name((options) => {
1024
- const { theme, look } = options;
1025
- let sections = "";
1026
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1027
- options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
1028
- if (isDark(options["lineColor" + i])) {
1029
- options["lineColor" + i] = lighten(options["lineColor" + i], 20);
1030
- } else {
1031
- options["lineColor" + i] = darken(options["lineColor" + i], 20);
1032
- }
1033
- }
1034
- for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1035
- const sw = "" + (look === "neo" ? Math.max(10 - (i - 1) * 2, 2) : 17 - 3 * i);
1036
- sections += `
1037
- .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
1038
- fill: ${options["cScale" + i]};
1039
- }
1040
- .section-${i - 1} text {
1041
- fill: ${options["cScaleLabel" + i]};
1042
- }
1043
- .section-${i - 1} span {
1044
- color: ${options["cScaleLabel" + i]};
1045
- }
1046
- .node-icon-${i - 1} {
1047
- font-size: 40px;
1048
- color: ${options["cScaleLabel" + i]};
1049
- }
1050
- .section-edge-${i - 1}{
1051
- stroke: ${options["cScale" + i]};
1052
- }
1053
- .edge-depth-${i - 1}{
1054
- stroke-width: ${sw};
1055
- }
1056
- .section-${i - 1} line {
1057
- stroke: ${options["cScaleInv" + i]} ;
1058
- stroke-width: 3;
1059
- }
1060
-
1061
- .disabled, .disabled circle, .disabled text {
1062
- fill: lightgray;
1063
- }
1064
- .disabled text {
1065
- fill: #efefef;
1066
- }
1067
- [data-look="neo"].mindmap-node.section-${i - 1} rect, [data-look="neo"].mindmap-node.section-${i - 1} path, [data-look="neo"].mindmap-node.section-${i - 1} circle, [data-look="neo"].mindmap-node.section-${i - 1} polygon {
1068
- fill: ${theme === "redux" || theme === "redux-dark" || theme === "neutral" ? options.mainBkg : options["cScale" + i]};
1069
- stroke: ${theme === "redux" || theme === "redux-dark" ? options.nodeBorder : options["cScale" + i]};
1070
- stroke-width: ${options.strokeWidth ?? 2}px;
1071
- }
1072
- [data-look="neo"].section-edge-${i - 1}{
1073
- stroke: ${theme?.includes("redux") || theme === "neo-dark" ? options.nodeBorder : options["cScale" + i]};
1074
- }
1075
- [data-look="neo"].mindmap-node.section-${i - 1} text {
1076
- fill: ${theme === "redux" || theme === "redux-dark" ? options.nodeBorder : options["cScaleLabel" + (theme === "neutral" ? 1 : i)]};
1077
- }
1078
- `;
1079
- }
1080
- return sections;
1081
- }, "genSections");
1082
- var genGradient = /* @__PURE__ */ __name((THEME_COLOR_LIMIT, svgId, mainBkg) => {
1083
- let sections = "";
1084
- for (let i = 0; i < THEME_COLOR_LIMIT; i++) {
1085
- sections += `
1086
- [data-look="neo"].mindmap-node.section-${i - 1} rect, [data-look="neo"].mindmap-node.section-${i - 1} path, [data-look="neo"].mindmap-node.section-${i - 1} circle, [data-look="neo"].mindmap-node.section-${i - 1} polygon {
1087
- stroke: url(${svgId}-gradient);
1088
- fill: ${mainBkg};
1089
- }
1090
- .section-${i - 1} line {
1091
- stroke-width: 0;
1092
- }`;
1093
- }
1094
- return sections;
1095
- }, "genGradient");
1096
- var getStyles = /* @__PURE__ */ __name((options) => {
1097
- const { theme } = options;
1098
- const svgId = options.svgId;
1099
- const scopedDropShadow = options.dropShadow ? options.dropShadow.replace("url(#drop-shadow)", `url(${svgId}-drop-shadow)`) : "none";
1100
- return `
1101
- .edge {
1102
- stroke-width: 3;
1103
- }
1104
- ${genSections(options)}
1105
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
1106
- fill: ${options.git0};
1107
- }
1108
- .section-root text {
1109
- fill: ${options.gitBranchLabel0};
1110
- }
1111
- .section-root span {
1112
- color: ${theme?.includes("redux") ? options.nodeBorder : options.gitBranchLabel0};
1113
- }
1114
- .icon-container {
1115
- height:100%;
1116
- display: flex;
1117
- justify-content: center;
1118
- align-items: center;
1119
- }
1120
- .edge {
1121
- fill: none;
1122
- }
1123
- .mindmap-node-label {
1124
- dy: 1em;
1125
- alignment-baseline: middle;
1126
- text-anchor: middle;
1127
- dominant-baseline: middle;
1128
- text-align: center;
1129
- }
1130
- [data-look="neo"].mindmap-node {
1131
- filter: ${scopedDropShadow};
1132
- }
1133
- [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
1134
- fill: ${theme?.includes("redux") ? options.mainBkg : options.git0};
1135
- }
1136
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
1137
- fill: ${theme?.includes("redux") ? options.nodeBorder : options["cScaleLabel" + (theme === "neutral" ? 1 : 0)]};
1138
- }
1139
- ${options.useGradient && svgId && options.mainBkg ? genGradient(options.THEME_COLOR_LIMIT, svgId, options.mainBkg) : ""}
1140
- `;
1141
- }, "getStyles");
1142
- var styles_default = getStyles;
1143
- var diagram = {
1144
- get db() {
1145
- return new MindmapDB();
1146
- },
1147
- renderer: mindmapRenderer_default,
1148
- parser: mindmap_default,
1149
- styles: styles_default
1150
- };
1151
- export {
1152
- diagram
1153
- };