@openbkn/workshop 0.2.2-rc.5 → 0.2.2-rc.6

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 (158) hide show
  1. package/README.md +79 -8
  2. package/component.d.ts +10 -0
  3. package/dist/ActionConfirm-DJ91X3ml.js +236 -0
  4. package/dist/ActionFailure-ZgPt_3B-.js +37 -0
  5. package/dist/AgentChat-CRYai8ge.js +1062 -0
  6. package/dist/AppFormModal-D73ucaHK.js +4282 -0
  7. package/dist/AppListPage-D87piiOw.js +1364 -0
  8. package/dist/AskDrawer-BUMYsRnt.js +38 -0
  9. package/dist/ComputedView-CgYrDbx1.js +3221 -0
  10. package/dist/ConclusionApply-sjGfoEBY.js +153 -0
  11. package/dist/CypherEditor-lus6FA5L.js +485 -0
  12. package/dist/LandingList-6JI6864C.js +230 -0
  13. package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
  14. package/dist/ModelTrial-ClHFGTpQ.js +359 -0
  15. package/dist/PageRenderer-DBd_g6mN.js +85480 -0
  16. package/dist/README-DjRyTQSR.js +76 -0
  17. package/dist/ScenarioApply-DtW_hh47.js +590 -0
  18. package/dist/SimulateForm-C-i08Jjd.js +153 -0
  19. package/dist/Subgraph-CnrkH9AN.js +32586 -0
  20. package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
  21. package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
  22. package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
  23. package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
  24. package/dist/actionButton-DA5CNEzx.js +94 -0
  25. package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
  26. package/dist/agentChat-EoDznd58.js +116 -0
  27. package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
  28. package/dist/alertList-DqditwM8.js +84 -0
  29. package/dist/alertList.en-US-BAXAgltP.js +84 -0
  30. package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
  31. package/dist/asOfSlider-QPvHWUMV.js +83 -0
  32. package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
  33. package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
  34. package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
  35. package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
  36. package/dist/channel-B034hcOF.js +5 -0
  37. package/dist/china-C6m7zXIv.js +9 -0
  38. package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
  39. package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
  40. package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
  41. package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
  42. package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
  43. package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
  44. package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
  45. package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
  46. package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
  47. package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
  48. package/dist/component.d-DFoMKuUv.js +179 -0
  49. package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
  50. package/dist/customComponents-DasaZ6pq.js +4 -0
  51. package/dist/customComponents.en-US-CkabuCXg.js +79 -0
  52. package/dist/customParseFormat-C0uLEpdq.js +182 -0
  53. package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
  54. package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
  55. package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
  56. package/dist/d3-scale-DA8IHmf0.js +1841 -0
  57. package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
  58. package/dist/dateRange-BbkLMg8L.js +79 -0
  59. package/dist/dateRange.en-US-CV12Q02G.js +79 -0
  60. package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
  61. package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
  62. package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
  63. package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
  64. package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
  65. package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
  66. package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
  67. package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
  68. package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
  69. package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
  70. package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
  71. package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
  72. package/dist/eventList-CnsAwfDS.js +115 -0
  73. package/dist/eventList.en-US-Cof3rCLq.js +115 -0
  74. package/dist/eventReport-XS-HegnH.js +76 -0
  75. package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
  76. package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
  77. package/dist/ganttChart-DEeSvTJA.js +77 -0
  78. package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
  79. package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
  80. package/dist/generateCypher-Ch9_lQa6.js +399 -0
  81. package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
  82. package/dist/graph-CKJmgLki.js +1541 -0
  83. package/dist/index-BA-GzCXt.js +441 -0
  84. package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
  85. package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
  86. package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
  87. package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
  88. package/dist/katex-BsrBVQKd.js +11314 -0
  89. package/dist/manifest-BjV1PJ6u.js +41 -0
  90. package/dist/mermaid.core-yQghUlIz.js +17642 -0
  91. package/dist/metricCards-CSb-_cT2.js +104 -0
  92. package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
  93. package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
  94. package/dist/modelTrial-Bvb-RhGt.js +137 -0
  95. package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
  96. package/dist/models-DekiCOuZ.js +6 -0
  97. package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
  98. package/dist/object-metric.service-flZgBMRX.js +233 -0
  99. package/dist/objectDetail-SQUbp4Py.js +117 -0
  100. package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
  101. package/dist/objectList-D99wPtJH.js +97 -0
  102. package/dist/objectList.en-US-PBBNyVLW.js +97 -0
  103. package/dist/objectTable-0jsFFMN3.js +127 -0
  104. package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
  105. package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
  106. package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
  107. package/dist/pivotTable-CHmQw18-.js +102 -0
  108. package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
  109. package/dist/prompt-DYrjlEFr.js +373 -0
  110. package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
  111. package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
  112. package/dist/regionMap-Cme-JyV_.js +128 -0
  113. package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
  114. package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
  115. package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
  116. package/dist/scenarioBar-BV43p7n-.js +122 -0
  117. package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
  118. package/dist/scheduleGantt-CTYO-zYP.js +180 -0
  119. package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
  120. package/dist/searchBox-Ca7w0f_6.js +67 -0
  121. package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
  122. package/dist/segmentedFilter-MhjVcWo0.js +80 -0
  123. package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
  124. package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
  125. package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
  126. package/dist/stageChain-BxBafwjD.js +74 -0
  127. package/dist/stageChain.en-US-CP0G27n8.js +74 -0
  128. package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
  129. package/dist/subgraph-7n4SwliR.js +71 -0
  130. package/dist/subgraph.en-US-BNvY18IW.js +71 -0
  131. package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
  132. package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
  133. package/dist/taskInbox-DGWYeI2b.js +118 -0
  134. package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
  135. package/dist/text-BqSVQKS6.js +78 -0
  136. package/dist/text.en-US-BhAxy_LE.js +78 -0
  137. package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
  138. package/dist/trendChart-BjEeRS5_.js +135 -0
  139. package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
  140. package/dist/useLabData-Df-jEHKs.js +20470 -0
  141. package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
  142. package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
  143. package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
  144. package/dist/workshop-app-DnHNjBqy.js +86038 -0
  145. package/dist/workshop-app.css +1 -0
  146. package/dist/workshop-app.js +4 -0
  147. package/dist/world-Djau1JyJ.js +9 -0
  148. package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
  149. package/dist-cli/workshop.js +340 -217
  150. package/example/host.js +109 -0
  151. package/example/index.html +93 -0
  152. package/example/server.mjs +237 -0
  153. package/index.d.ts +48 -0
  154. package/lib/validate.js +47 -1
  155. package/package.json +17 -5
  156. package/runtime/frame-runtime.js +13 -1
  157. package/workshop-component.js +32 -12
  158. package/workshop.js +2 -0
@@ -0,0 +1,834 @@
1
+ import { g as ce } from "./chunk-XXDRQBXY-CPYrcdVW.js";
2
+ import { s as le } from "./chunk-VQ5W62QI-BiVKc40w.js";
3
+ import { _ as h, l as I, r as he, t as de, O as ge, R as j, c as P, j as G, b1 as ue, a7 as pe, a8 as fe, a9 as me } from "./mermaid.core-yQghUlIz.js";
4
+ const _ = [];
5
+ for (let t = 0; t < 256; ++t)
6
+ _.push((t + 256).toString(16).slice(1));
7
+ function ye(t, e = 0) {
8
+ return (_[t[e + 0]] + _[t[e + 1]] + _[t[e + 2]] + _[t[e + 3]] + "-" + _[t[e + 4]] + _[t[e + 5]] + "-" + _[t[e + 6]] + _[t[e + 7]] + "-" + _[t[e + 8]] + _[t[e + 9]] + "-" + _[t[e + 10]] + _[t[e + 11]] + _[t[e + 12]] + _[t[e + 13]] + _[t[e + 14]] + _[t[e + 15]]).toLowerCase();
9
+ }
10
+ const Ee = new Uint8Array(16);
11
+ function _e() {
12
+ return crypto.getRandomValues(Ee);
13
+ }
14
+ function be(t, e, a) {
15
+ return crypto.randomUUID ? crypto.randomUUID() : ke(t);
16
+ }
17
+ function ke(t, e, a) {
18
+ t = t || {};
19
+ const l = t.random ?? t.rng?.() ?? _e();
20
+ if (l.length < 16)
21
+ throw new Error("Random bytes length must be >= 16");
22
+ return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, ye(l);
23
+ }
24
+ var q = (function() {
25
+ var t = /* @__PURE__ */ h(function(D, s, i, o) {
26
+ for (i = i || {}, o = D.length; o--; i[D[o]] = s) ;
27
+ return i;
28
+ }, "o"), e = [1, 4], a = [1, 13], l = [1, 12], n = [1, 15], d = [1, 16], u = [1, 20], m = [1, 19], E = [6, 7, 8], b = [1, 26], v = [1, 24], R = [1, 25], g = [6, 7, 11], A = [1, 6, 13, 15, 16, 19, 22], J = [1, 33], K = [1, 34], $ = [1, 6, 7, 11, 13, 15, 16, 19, 22], H = {
29
+ trace: /* @__PURE__ */ h(function() {
30
+ }, "trace"),
31
+ yy: {},
32
+ 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 },
33
+ 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" },
34
+ 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]],
35
+ performAction: /* @__PURE__ */ h(function(s, i, o, c, f, r, B) {
36
+ var p = r.length - 1;
37
+ switch (f) {
38
+ case 6:
39
+ case 7:
40
+ return c;
41
+ case 8:
42
+ c.getLogger().trace("Stop NL ");
43
+ break;
44
+ case 9:
45
+ c.getLogger().trace("Stop EOF ");
46
+ break;
47
+ case 11:
48
+ c.getLogger().trace("Stop NL2 ");
49
+ break;
50
+ case 12:
51
+ c.getLogger().trace("Stop EOF2 ");
52
+ break;
53
+ case 15:
54
+ c.getLogger().info("Node: ", r[p].id), c.addNode(r[p - 1].length, r[p].id, r[p].descr, r[p].type);
55
+ break;
56
+ case 16:
57
+ c.getLogger().trace("Icon: ", r[p]), c.decorateNode({ icon: r[p] });
58
+ break;
59
+ case 17:
60
+ case 21:
61
+ c.decorateNode({ class: r[p] });
62
+ break;
63
+ case 18:
64
+ c.getLogger().trace("SPACELIST");
65
+ break;
66
+ case 19:
67
+ c.getLogger().trace("Node: ", r[p].id), c.addNode(0, r[p].id, r[p].descr, r[p].type);
68
+ break;
69
+ case 20:
70
+ c.decorateNode({ icon: r[p] });
71
+ break;
72
+ case 25:
73
+ c.getLogger().trace("node found ..", r[p - 2]), this.$ = { id: r[p - 1], descr: r[p - 1], type: c.getType(r[p - 2], r[p]) };
74
+ break;
75
+ case 26:
76
+ this.$ = { id: r[p], descr: r[p], type: c.nodeType.DEFAULT };
77
+ break;
78
+ case 27:
79
+ c.getLogger().trace("node found ..", r[p - 3]), this.$ = { id: r[p - 3], descr: r[p - 1], type: c.getType(r[p - 2], r[p]) };
80
+ break;
81
+ }
82
+ }, "anonymous"),
83
+ 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: a, 7: [1, 10], 9: 9, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: u, 22: m }, t(E, [2, 3]), { 1: [2, 2] }, t(E, [2, 4]), t(E, [2, 5]), { 1: [2, 6], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: u, 22: m }, { 6: a, 9: 22, 12: 11, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: u, 22: m }, { 6: b, 7: v, 10: 23, 11: R }, t(g, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: u, 22: m }), t(g, [2, 18]), t(g, [2, 19]), t(g, [2, 20]), t(g, [2, 21]), t(g, [2, 23]), t(g, [2, 24]), t(g, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: b, 7: v, 10: 32, 11: R }, { 1: [2, 7], 6: a, 12: 21, 13: l, 14: 14, 15: n, 16: d, 17: 17, 18: 18, 19: u, 22: m }, t(A, [2, 14], { 7: J, 11: K }), t($, [2, 8]), t($, [2, 9]), t($, [2, 10]), t(g, [2, 15]), t(g, [2, 16]), t(g, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, t(A, [2, 13], { 7: J, 11: K }), t($, [2, 11]), t($, [2, 12]), { 21: [1, 37] }, t(g, [2, 25]), t(g, [2, 27])],
84
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
85
+ parseError: /* @__PURE__ */ h(function(s, i) {
86
+ if (i.recoverable)
87
+ this.trace(s);
88
+ else {
89
+ var o = new Error(s);
90
+ throw o.hash = i, o;
91
+ }
92
+ }, "parseError"),
93
+ parse: /* @__PURE__ */ h(function(s) {
94
+ var i = this, o = [0], c = [], f = [null], r = [], B = this.table, p = "", U = 0, Q = 0, se = 2, Z = 1, re = r.slice.call(arguments, 1), y = Object.create(this.lexer), T = { yy: {} };
95
+ for (var W in this.yy)
96
+ Object.prototype.hasOwnProperty.call(this.yy, W) && (T.yy[W] = this.yy[W]);
97
+ y.setInput(s, T.yy), T.yy.lexer = y, T.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
98
+ var z = y.yylloc;
99
+ r.push(z);
100
+ var oe = y.options && y.options.ranges;
101
+ typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
102
+ function ae(S) {
103
+ o.length = o.length - 2 * S, f.length = f.length - S, r.length = r.length - S;
104
+ }
105
+ h(ae, "popStack");
106
+ function ee() {
107
+ var S;
108
+ return S = c.pop() || y.lex() || Z, typeof S != "number" && (S instanceof Array && (c = S, S = c.pop()), S = i.symbols_[S] || S), S;
109
+ }
110
+ h(ee, "lex");
111
+ for (var k, O, x, X, C = {}, V, N, te, F; ; ) {
112
+ if (O = o[o.length - 1], this.defaultActions[O] ? x = this.defaultActions[O] : ((k === null || typeof k > "u") && (k = ee()), x = B[O] && B[O][k]), typeof x > "u" || !x.length || !x[0]) {
113
+ var Y = "";
114
+ F = [];
115
+ for (V in B[O])
116
+ this.terminals_[V] && V > se && F.push("'" + this.terminals_[V] + "'");
117
+ y.showPosition ? Y = "Parse error on line " + (U + 1) + `:
118
+ ` + y.showPosition() + `
119
+ Expecting ` + F.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Y = "Parse error on line " + (U + 1) + ": Unexpected " + (k == Z ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Y, {
120
+ text: y.match,
121
+ token: this.terminals_[k] || k,
122
+ line: y.yylineno,
123
+ loc: z,
124
+ expected: F
125
+ });
126
+ }
127
+ if (x[0] instanceof Array && x.length > 1)
128
+ throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + k);
129
+ switch (x[0]) {
130
+ case 1:
131
+ o.push(k), f.push(y.yytext), r.push(y.yylloc), o.push(x[1]), k = null, Q = y.yyleng, p = y.yytext, U = y.yylineno, z = y.yylloc;
132
+ break;
133
+ case 2:
134
+ if (N = this.productions_[x[1]][1], C.$ = f[f.length - N], C._$ = {
135
+ first_line: r[r.length - (N || 1)].first_line,
136
+ last_line: r[r.length - 1].last_line,
137
+ first_column: r[r.length - (N || 1)].first_column,
138
+ last_column: r[r.length - 1].last_column
139
+ }, oe && (C._$.range = [
140
+ r[r.length - (N || 1)].range[0],
141
+ r[r.length - 1].range[1]
142
+ ]), X = this.performAction.apply(C, [
143
+ p,
144
+ Q,
145
+ U,
146
+ T.yy,
147
+ x[1],
148
+ f,
149
+ r
150
+ ].concat(re)), typeof X < "u")
151
+ return X;
152
+ N && (o = o.slice(0, -1 * N * 2), f = f.slice(0, -1 * N), r = r.slice(0, -1 * N)), o.push(this.productions_[x[1]][0]), f.push(C.$), r.push(C._$), te = B[o[o.length - 2]][o[o.length - 1]], o.push(te);
153
+ break;
154
+ case 3:
155
+ return !0;
156
+ }
157
+ }
158
+ return !0;
159
+ }, "parse")
160
+ }, ie = /* @__PURE__ */ (function() {
161
+ var D = {
162
+ EOF: 1,
163
+ parseError: /* @__PURE__ */ h(function(i, o) {
164
+ if (this.yy.parser)
165
+ this.yy.parser.parseError(i, o);
166
+ else
167
+ throw new Error(i);
168
+ }, "parseError"),
169
+ // resets the lexer, sets new input
170
+ setInput: /* @__PURE__ */ h(function(s, i) {
171
+ return this.yy = i || 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 = {
172
+ first_line: 1,
173
+ first_column: 0,
174
+ last_line: 1,
175
+ last_column: 0
176
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
177
+ }, "setInput"),
178
+ // consumes and returns one char from the input
179
+ input: /* @__PURE__ */ h(function() {
180
+ var s = this._input[0];
181
+ this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
182
+ var i = s.match(/(?:\r\n?|\n).*/g);
183
+ return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
184
+ }, "input"),
185
+ // unshifts one char (or a string) into the input
186
+ unput: /* @__PURE__ */ h(function(s) {
187
+ var i = s.length, o = s.split(/(?:\r\n?|\n)/g);
188
+ this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
189
+ var c = this.match.split(/(?:\r\n?|\n)/g);
190
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
191
+ var f = this.yylloc.range;
192
+ return this.yylloc = {
193
+ first_line: this.yylloc.first_line,
194
+ last_line: this.yylineno + 1,
195
+ first_column: this.yylloc.first_column,
196
+ last_column: o ? (o.length === c.length ? this.yylloc.first_column : 0) + c[c.length - o.length].length - o[0].length : this.yylloc.first_column - i
197
+ }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
198
+ }, "unput"),
199
+ // When called from action, caches matched text and appends it on next action
200
+ more: /* @__PURE__ */ h(function() {
201
+ return this._more = !0, this;
202
+ }, "more"),
203
+ // 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.
204
+ reject: /* @__PURE__ */ h(function() {
205
+ if (this.options.backtrack_lexer)
206
+ this._backtrack = !0;
207
+ else
208
+ 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).
209
+ ` + this.showPosition(), {
210
+ text: "",
211
+ token: null,
212
+ line: this.yylineno
213
+ });
214
+ return this;
215
+ }, "reject"),
216
+ // retain first n characters of the match
217
+ less: /* @__PURE__ */ h(function(s) {
218
+ this.unput(this.match.slice(s));
219
+ }, "less"),
220
+ // displays already matched input, i.e. for error messages
221
+ pastInput: /* @__PURE__ */ h(function() {
222
+ var s = this.matched.substr(0, this.matched.length - this.match.length);
223
+ return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
224
+ }, "pastInput"),
225
+ // displays upcoming input, i.e. for error messages
226
+ upcomingInput: /* @__PURE__ */ h(function() {
227
+ var s = this.match;
228
+ return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
229
+ }, "upcomingInput"),
230
+ // displays the character position where the lexing error occurred, i.e. for error messages
231
+ showPosition: /* @__PURE__ */ h(function() {
232
+ var s = this.pastInput(), i = new Array(s.length + 1).join("-");
233
+ return s + this.upcomingInput() + `
234
+ ` + i + "^";
235
+ }, "showPosition"),
236
+ // test the lexed token: return FALSE when not a match, otherwise return token
237
+ test_match: /* @__PURE__ */ h(function(s, i) {
238
+ var o, c, f;
239
+ if (this.options.backtrack_lexer && (f = {
240
+ yylineno: this.yylineno,
241
+ yylloc: {
242
+ first_line: this.yylloc.first_line,
243
+ last_line: this.last_line,
244
+ first_column: this.yylloc.first_column,
245
+ last_column: this.yylloc.last_column
246
+ },
247
+ yytext: this.yytext,
248
+ match: this.match,
249
+ matches: this.matches,
250
+ matched: this.matched,
251
+ yyleng: this.yyleng,
252
+ offset: this.offset,
253
+ _more: this._more,
254
+ _input: this._input,
255
+ yy: this.yy,
256
+ conditionStack: this.conditionStack.slice(0),
257
+ done: this.done
258
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), c = s[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
259
+ first_line: this.yylloc.last_line,
260
+ last_line: this.yylineno + 1,
261
+ first_column: this.yylloc.last_column,
262
+ last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
263
+ }, 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], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
264
+ return o;
265
+ if (this._backtrack) {
266
+ for (var r in f)
267
+ this[r] = f[r];
268
+ return !1;
269
+ }
270
+ return !1;
271
+ }, "test_match"),
272
+ // return next match in input
273
+ next: /* @__PURE__ */ h(function() {
274
+ if (this.done)
275
+ return this.EOF;
276
+ this._input || (this.done = !0);
277
+ var s, i, o, c;
278
+ this._more || (this.yytext = "", this.match = "");
279
+ for (var f = this._currentRules(), r = 0; r < f.length; r++)
280
+ if (o = this._input.match(this.rules[f[r]]), o && (!i || o[0].length > i[0].length)) {
281
+ if (i = o, c = r, this.options.backtrack_lexer) {
282
+ if (s = this.test_match(o, f[r]), s !== !1)
283
+ return s;
284
+ if (this._backtrack) {
285
+ i = !1;
286
+ continue;
287
+ } else
288
+ return !1;
289
+ } else if (!this.options.flex)
290
+ break;
291
+ }
292
+ return i ? (s = this.test_match(i, f[c]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
293
+ ` + this.showPosition(), {
294
+ text: "",
295
+ token: null,
296
+ line: this.yylineno
297
+ });
298
+ }, "next"),
299
+ // return next match that has a token
300
+ lex: /* @__PURE__ */ h(function() {
301
+ var i = this.next();
302
+ return i || this.lex();
303
+ }, "lex"),
304
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
305
+ begin: /* @__PURE__ */ h(function(i) {
306
+ this.conditionStack.push(i);
307
+ }, "begin"),
308
+ // pop the previously active lexer condition state off the condition stack
309
+ popState: /* @__PURE__ */ h(function() {
310
+ var i = this.conditionStack.length - 1;
311
+ return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
312
+ }, "popState"),
313
+ // produce the lexer rule set which is active for the currently active lexer condition state
314
+ _currentRules: /* @__PURE__ */ h(function() {
315
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
316
+ }, "_currentRules"),
317
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
318
+ topState: /* @__PURE__ */ h(function(i) {
319
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
320
+ }, "topState"),
321
+ // alias for begin(condition)
322
+ pushState: /* @__PURE__ */ h(function(i) {
323
+ this.begin(i);
324
+ }, "pushState"),
325
+ // return the number of states currently on the stack
326
+ stateStackSize: /* @__PURE__ */ h(function() {
327
+ return this.conditionStack.length;
328
+ }, "stateStackSize"),
329
+ options: { "case-insensitive": !0 },
330
+ performAction: /* @__PURE__ */ h(function(i, o, c, f) {
331
+ switch (c) {
332
+ case 0:
333
+ return i.getLogger().trace("Found comment", o.yytext), 6;
334
+ case 1:
335
+ return 8;
336
+ case 2:
337
+ this.begin("CLASS");
338
+ break;
339
+ case 3:
340
+ return this.popState(), 16;
341
+ case 4:
342
+ this.popState();
343
+ break;
344
+ case 5:
345
+ i.getLogger().trace("Begin icon"), this.begin("ICON");
346
+ break;
347
+ case 6:
348
+ return i.getLogger().trace("SPACELINE"), 6;
349
+ case 7:
350
+ return 7;
351
+ case 8:
352
+ return 15;
353
+ case 9:
354
+ i.getLogger().trace("end icon"), this.popState();
355
+ break;
356
+ case 10:
357
+ return i.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
358
+ case 11:
359
+ return i.getLogger().trace("Cloud"), this.begin("NODE"), 19;
360
+ case 12:
361
+ return i.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
362
+ case 13:
363
+ return i.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
364
+ case 14:
365
+ return this.begin("NODE"), 19;
366
+ case 15:
367
+ return this.begin("NODE"), 19;
368
+ case 16:
369
+ return this.begin("NODE"), 19;
370
+ case 17:
371
+ return this.begin("NODE"), 19;
372
+ case 18:
373
+ return 13;
374
+ case 19:
375
+ return 22;
376
+ case 20:
377
+ return 11;
378
+ case 21:
379
+ this.begin("NSTR2");
380
+ break;
381
+ case 22:
382
+ return "NODE_DESCR";
383
+ case 23:
384
+ this.popState();
385
+ break;
386
+ case 24:
387
+ i.getLogger().trace("Starting NSTR"), this.begin("NSTR");
388
+ break;
389
+ case 25:
390
+ return i.getLogger().trace("description:", o.yytext), "NODE_DESCR";
391
+ case 26:
392
+ this.popState();
393
+ break;
394
+ case 27:
395
+ return this.popState(), i.getLogger().trace("node end ))"), "NODE_DEND";
396
+ case 28:
397
+ return this.popState(), i.getLogger().trace("node end )"), "NODE_DEND";
398
+ case 29:
399
+ return this.popState(), i.getLogger().trace("node end ...", o.yytext), "NODE_DEND";
400
+ case 30:
401
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
402
+ case 31:
403
+ return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
404
+ case 32:
405
+ return this.popState(), i.getLogger().trace("node end (-"), "NODE_DEND";
406
+ case 33:
407
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
408
+ case 34:
409
+ return this.popState(), i.getLogger().trace("node end (("), "NODE_DEND";
410
+ case 35:
411
+ return i.getLogger().trace("Long description:", o.yytext), 20;
412
+ case 36:
413
+ return i.getLogger().trace("Long description:", o.yytext), 20;
414
+ }
415
+ }, "anonymous"),
416
+ 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],
417
+ 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 } }
418
+ };
419
+ return D;
420
+ })();
421
+ H.lexer = ie;
422
+ function M() {
423
+ this.yy = {};
424
+ }
425
+ return h(M, "Parser"), M.prototype = H, H.Parser = M, new M();
426
+ })();
427
+ q.parser = q;
428
+ var Se = q, ne = 12, L = {
429
+ DEFAULT: 0,
430
+ NO_BORDER: 0,
431
+ ROUNDED_RECT: 1,
432
+ RECT: 2,
433
+ CIRCLE: 3,
434
+ CLOUD: 4,
435
+ BANG: 5,
436
+ HEXAGON: 6
437
+ }, w, xe = (w = class {
438
+ constructor() {
439
+ this.nodes = [], this.count = 0, this.elements = {}, this.getLogger = this.getLogger.bind(this), this.nodeType = L, 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);
440
+ }
441
+ clear() {
442
+ this.nodes = [], this.count = 0, this.elements = {}, this.baseLevel = void 0;
443
+ }
444
+ getParent(e) {
445
+ for (let a = this.nodes.length - 1; a >= 0; a--)
446
+ if (this.nodes[a].level < e)
447
+ return this.nodes[a];
448
+ return null;
449
+ }
450
+ getMindmap() {
451
+ return this.nodes.length > 0 ? this.nodes[0] : null;
452
+ }
453
+ addNode(e, a, l, n) {
454
+ I.info("addNode", e, a, l, n);
455
+ let d = !1;
456
+ this.nodes.length === 0 ? (this.baseLevel = e, e = 0, d = !0) : this.baseLevel !== void 0 && (e = e - this.baseLevel, d = !1);
457
+ const u = P();
458
+ let m = u.mindmap?.padding ?? j.mindmap.padding;
459
+ switch (n) {
460
+ case this.nodeType.ROUNDED_RECT:
461
+ case this.nodeType.RECT:
462
+ case this.nodeType.HEXAGON:
463
+ m *= 2;
464
+ break;
465
+ }
466
+ const E = {
467
+ id: this.count++,
468
+ nodeId: G(a, u),
469
+ level: e,
470
+ descr: G(l, u),
471
+ type: n,
472
+ children: [],
473
+ width: u.mindmap?.maxNodeWidth ?? j.mindmap.maxNodeWidth,
474
+ padding: m,
475
+ isRoot: d
476
+ }, b = this.getParent(e);
477
+ if (b)
478
+ b.children.push(E), this.nodes.push(E);
479
+ else if (d)
480
+ this.nodes.push(E);
481
+ else
482
+ throw new Error(
483
+ `There can be only one root. No parent could be found for ("${E.descr}")`
484
+ );
485
+ }
486
+ getType(e, a) {
487
+ switch (I.debug("In get type", e, a), e) {
488
+ case "[":
489
+ return this.nodeType.RECT;
490
+ case "(":
491
+ return a === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
492
+ case "((":
493
+ return this.nodeType.CIRCLE;
494
+ case ")":
495
+ return this.nodeType.CLOUD;
496
+ case "))":
497
+ return this.nodeType.BANG;
498
+ case "{{":
499
+ return this.nodeType.HEXAGON;
500
+ default:
501
+ return this.nodeType.DEFAULT;
502
+ }
503
+ }
504
+ setElementForId(e, a) {
505
+ this.elements[e] = a;
506
+ }
507
+ getElementById(e) {
508
+ return this.elements[e];
509
+ }
510
+ decorateNode(e) {
511
+ if (!e)
512
+ return;
513
+ const a = P(), l = this.nodes[this.nodes.length - 1];
514
+ e.icon && (l.icon = G(e.icon, a)), e.class && (l.class = G(e.class, a));
515
+ }
516
+ type2Str(e) {
517
+ switch (e) {
518
+ case this.nodeType.DEFAULT:
519
+ return "no-border";
520
+ case this.nodeType.RECT:
521
+ return "rect";
522
+ case this.nodeType.ROUNDED_RECT:
523
+ return "rounded-rect";
524
+ case this.nodeType.CIRCLE:
525
+ return "circle";
526
+ case this.nodeType.CLOUD:
527
+ return "cloud";
528
+ case this.nodeType.BANG:
529
+ return "bang";
530
+ case this.nodeType.HEXAGON:
531
+ return "hexgon";
532
+ // cspell: disable-line
533
+ default:
534
+ return "no-border";
535
+ }
536
+ }
537
+ /**
538
+ * Assign color sections by top-level branch (default) or structural depth.
539
+ * @param node - The mindmap node to process
540
+ * @param sectionNumber - The section number to assign (undefined for root)
541
+ * @param depth - Distance from the root, independent of indentation width
542
+ * @param colorByDepth - Whether to assign sections by depth instead of top-level branch
543
+ */
544
+ assignSections(e, a, l = 0, n = !1) {
545
+ if (e.level === 0 ? e.section = void 0 : e.section = n ? (l - 1) % (ne - 1) : a, e.children)
546
+ for (const [d, u] of e.children.entries()) {
547
+ const m = e.level === 0 ? d % (ne - 1) : a;
548
+ this.assignSections(u, m, l + 1, n);
549
+ }
550
+ }
551
+ /**
552
+ * Convert mindmap tree structure to flat array of nodes
553
+ * @param node - The mindmap node to process
554
+ * @param processedNodes - Array to collect processed nodes
555
+ */
556
+ flattenNodes(e, a) {
557
+ const l = P(), n = ["mindmap-node"];
558
+ e.isRoot === !0 ? n.push("section-root", "section--1") : e.section !== void 0 && n.push(`section-${e.section}`), e.class && n.push(e.class);
559
+ const d = n.join(" "), u = /* @__PURE__ */ h((E) => {
560
+ const v = (l.theme?.toLowerCase() ?? "").includes("redux");
561
+ switch (E) {
562
+ case L.CIRCLE:
563
+ return "mindmapCircle";
564
+ case L.RECT:
565
+ return "rect";
566
+ case L.ROUNDED_RECT:
567
+ return "rounded";
568
+ case L.CLOUD:
569
+ return "cloud";
570
+ case L.BANG:
571
+ return "bang";
572
+ case L.HEXAGON:
573
+ return "hexagon";
574
+ case L.DEFAULT:
575
+ return v ? "rounded" : "defaultMindmapNode";
576
+ case L.NO_BORDER:
577
+ default:
578
+ return "rect";
579
+ }
580
+ }, "getShapeFromType"), m = {
581
+ id: e.id.toString(),
582
+ domId: "node_" + e.id.toString(),
583
+ label: e.descr,
584
+ labelType: "markdown",
585
+ isGroup: !1,
586
+ shape: u(e.type),
587
+ width: e.width,
588
+ height: e.height ?? 0,
589
+ padding: e.padding,
590
+ cssClasses: d,
591
+ cssStyles: [],
592
+ // Mindmap styles don't set text-anchor: middle, so SVG-text labels must be
593
+ // offset by half their width to be centred (issue #8387)
594
+ centerLabel: !0,
595
+ look: l.look,
596
+ icon: e.icon,
597
+ x: e.x,
598
+ y: e.y,
599
+ // Mindmap-specific properties
600
+ level: e.level,
601
+ nodeId: e.nodeId,
602
+ type: e.type,
603
+ section: e.section
604
+ };
605
+ if (a.push(m), e.children)
606
+ for (const E of e.children)
607
+ this.flattenNodes(E, a);
608
+ }
609
+ /**
610
+ * Generate edges from parent-child relationships in mindmap tree
611
+ * @param node - The mindmap node to process
612
+ * @param edges - Array to collect edges
613
+ */
614
+ generateEdges(e, a) {
615
+ if (!e.children)
616
+ return;
617
+ const l = P();
618
+ for (const n of e.children) {
619
+ let d = "edge";
620
+ n.section !== void 0 && (d += ` section-edge-${n.section}`);
621
+ const u = e.level + 1;
622
+ d += ` edge-depth-${u}`;
623
+ const m = {
624
+ id: `edge_${e.id}_${n.id}`,
625
+ start: e.id.toString(),
626
+ end: n.id.toString(),
627
+ type: "normal",
628
+ curve: "basis",
629
+ thickness: "normal",
630
+ look: l.look,
631
+ classes: d,
632
+ // Store mindmap-specific data
633
+ depth: e.level,
634
+ section: n.section
635
+ };
636
+ a.push(m), this.generateEdges(n, a);
637
+ }
638
+ }
639
+ /**
640
+ * Get structured data for layout algorithms
641
+ * Following the pattern established by ER diagrams
642
+ * @returns Structured data containing nodes, edges, and config
643
+ */
644
+ getData() {
645
+ const e = this.getMindmap(), a = P(), n = ue().layout !== void 0, d = a;
646
+ if (n || (d.layout = "cose-bilkent"), !e)
647
+ return {
648
+ nodes: [],
649
+ edges: [],
650
+ config: d
651
+ };
652
+ I.debug("getData: mindmapRoot", e, a), this.assignSections(e, void 0, 0, a.mindmap?.colorBy === "depth");
653
+ const u = [], m = [];
654
+ this.flattenNodes(e, u), this.generateEdges(e, m), I.debug(
655
+ `getData: processed ${u.length} nodes and ${m.length} edges`
656
+ );
657
+ const E = /* @__PURE__ */ new Map();
658
+ for (const b of u)
659
+ E.set(b.id, {
660
+ shape: b.shape,
661
+ width: b.width,
662
+ height: b.height,
663
+ padding: b.padding
664
+ });
665
+ return {
666
+ nodes: u,
667
+ edges: m,
668
+ config: d,
669
+ // Store the root node for mindmap-specific layout algorithms
670
+ rootNode: e,
671
+ // Properties required by dagre layout algorithm
672
+ markers: ["point"],
673
+ // Mindmaps don't use markers
674
+ direction: "TB",
675
+ // Top-to-bottom direction for mindmaps
676
+ nodeSpacing: 50,
677
+ // Default spacing between nodes
678
+ rankSpacing: 50,
679
+ // Default spacing between ranks
680
+ // Add shapes for ELK compatibility
681
+ shapes: Object.fromEntries(E),
682
+ // Additional properties that layout algorithms might expect
683
+ type: "mindmap",
684
+ diagramId: "mindmap-" + be()
685
+ };
686
+ }
687
+ // Expose logger to grammar
688
+ getLogger() {
689
+ return I;
690
+ }
691
+ }, h(w, "MindmapDB"), w), Ne = /* @__PURE__ */ h(async (t, e, a, l) => {
692
+ I.debug(`Rendering mindmap diagram
693
+ ` + t);
694
+ const n = l.db, d = n.getData(), u = ce(e, d.config.securityLevel);
695
+ if (d.type = l.type, d.layoutAlgorithm = he(d.config.layout, {
696
+ fallback: "cose-bilkent"
697
+ }), d.diagramId = e, !n.getMindmap())
698
+ return;
699
+ d.nodes.forEach((g) => {
700
+ g.shape === "rounded" ? (g.radius = 15, g.taper = 15, g.stroke = "none", g.width = 0, g.padding = 15) : g.shape === "circle" ? g.padding = 10 : g.shape === "rect" ? (g.width = 0, g.padding = 10) : g.shape === "hexagon" && (g.width = 0, g.height = 0);
701
+ }), await de(d, u);
702
+ const { themeVariables: E } = ge(), { useGradient: b, gradientStart: v, gradientStop: R } = E;
703
+ if (b && v && R) {
704
+ const g = u.attr("id"), A = u.append("defs").append("linearGradient").attr("id", `${g}-gradient`).attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
705
+ A.append("stop").attr("offset", "0%").attr("stop-color", v).attr("stop-opacity", 1), A.append("stop").attr("offset", "100%").attr("stop-color", R).attr("stop-opacity", 1);
706
+ }
707
+ le(
708
+ u,
709
+ d.config.mindmap?.padding ?? j.mindmap.padding,
710
+ "mindmapDiagram",
711
+ d.config.mindmap?.useMaxWidth ?? j.mindmap.useMaxWidth
712
+ );
713
+ }, "draw"), Le = {
714
+ draw: Ne
715
+ }, De = /* @__PURE__ */ h((t) => {
716
+ const { theme: e, look: a } = t;
717
+ let l = "";
718
+ for (let n = 0; n < t.THEME_COLOR_LIMIT; n++)
719
+ t["lineColor" + n] = t["lineColor" + n] || t["cScaleInv" + n], pe(t["lineColor" + n]) ? t["lineColor" + n] = fe(t["lineColor" + n], 20) : t["lineColor" + n] = me(t["lineColor" + n], 20);
720
+ for (let n = 0; n < t.THEME_COLOR_LIMIT; n++) {
721
+ const d = "" + (a === "neo" ? Math.max(10 - (n - 1) * 2, 2) : 17 - 3 * n), u = e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : n)];
722
+ l += `
723
+ .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} polygon, .section-${n - 1} path {
724
+ fill: ${t["cScale" + n]};
725
+ }
726
+ .section-${n - 1} text {
727
+ fill: ${t["cScaleLabel" + n]};
728
+ }
729
+ .section-${n - 1} span {
730
+ color: ${t["cScaleLabel" + n]};
731
+ }
732
+ .node-icon-${n - 1} {
733
+ font-size: 40px;
734
+ color: ${t["cScaleLabel" + n]};
735
+ }
736
+ .section-edge-${n - 1}{
737
+ stroke: ${t["cScale" + n]};
738
+ }
739
+ .edge-depth-${n - 1}{
740
+ stroke-width: ${d};
741
+ }
742
+ .section-${n - 1} line {
743
+ stroke: ${t["cScaleInv" + n]} ;
744
+ stroke-width: 3;
745
+ }
746
+
747
+ .disabled, .disabled circle, .disabled text {
748
+ fill: lightgray;
749
+ }
750
+ .disabled text {
751
+ fill: #efefef;
752
+ }
753
+ [data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
754
+ fill: ${e === "redux" || e === "redux-dark" || e === "neutral" ? t.mainBkg : t["cScale" + n]};
755
+ stroke: ${e === "redux" || e === "redux-dark" ? t.nodeBorder : t["cScale" + n]};
756
+ stroke-width: ${t.strokeWidth ?? 2}px;
757
+ }
758
+ [data-look="neo"].section-edge-${n - 1}{
759
+ stroke: ${e?.includes("redux") || e === "neo-dark" ? t.nodeBorder : t["cScale" + n]};
760
+ }
761
+ [data-look="neo"].mindmap-node.section-${n - 1} text, [data-look="neo"].mindmap-node.section-${n - 1} span {
762
+ fill: ${u};
763
+ color: ${u};
764
+ }
765
+ `;
766
+ }
767
+ return l;
768
+ }, "genSections"), ve = /* @__PURE__ */ h((t, e, a) => {
769
+ let l = "";
770
+ for (let n = 0; n < t; n++)
771
+ l += `
772
+ [data-look="neo"].mindmap-node.section-${n - 1} rect, [data-look="neo"].mindmap-node.section-${n - 1} path, [data-look="neo"].mindmap-node.section-${n - 1} circle, [data-look="neo"].mindmap-node.section-${n - 1} polygon {
773
+ stroke: url(${e}-gradient);
774
+ fill: ${a};
775
+ }
776
+ .section-${n - 1} line {
777
+ stroke-width: 0;
778
+ }`;
779
+ return l;
780
+ }, "genGradient"), Te = /* @__PURE__ */ h((t) => {
781
+ const { theme: e } = t, a = t.svgId, l = e?.includes("redux") ? t.nodeBorder : t["cScaleLabel" + (e === "neutral" ? 1 : 0)], n = t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${a}-drop-shadow)`) : "none";
782
+ return `
783
+ .edge {
784
+ stroke-width: 3;
785
+ }
786
+ ${De(t)}
787
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
788
+ fill: ${t.git0};
789
+ }
790
+ .section-root text {
791
+ fill: ${t.gitBranchLabel0};
792
+ }
793
+ .section-root span {
794
+ color: ${e?.includes("redux") ? t.nodeBorder : t.gitBranchLabel0};
795
+ }
796
+ .icon-container {
797
+ height:100%;
798
+ display: flex;
799
+ justify-content: center;
800
+ align-items: center;
801
+ }
802
+ .edge {
803
+ fill: none;
804
+ }
805
+ .mindmap-node-label {
806
+ dy: 1em;
807
+ alignment-baseline: middle;
808
+ text-anchor: middle;
809
+ dominant-baseline: middle;
810
+ text-align: center;
811
+ }
812
+ [data-look="neo"].mindmap-node {
813
+ filter: ${n};
814
+ }
815
+ [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 {
816
+ fill: ${e?.includes("redux") ? t.mainBkg : t.git0};
817
+ }
818
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan, [data-look="neo"].mindmap-node.section-root span {
819
+ fill: ${l};
820
+ color: ${l};
821
+ }
822
+ ${t.useGradient && a && t.mainBkg ? ve(t.THEME_COLOR_LIMIT, a, t.mainBkg) : ""}
823
+ `;
824
+ }, "getStyles"), Oe = Te, Re = {
825
+ get db() {
826
+ return new xe();
827
+ },
828
+ renderer: Le,
829
+ parser: Se,
830
+ styles: Oe
831
+ };
832
+ export {
833
+ Re as diagram
834
+ };