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