@omg-dev/app 0.5.1 → 0.6.2
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-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-CirRyMnC.js} +54 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-W4QKB0HL.js} +64 -64
- package/dist-lib/{TermView-CWr-zJmM.js → TermView-CoD-VkHs.js} +495 -520
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CRzDKNTH.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-OER8HHRF.js} +152 -131
- package/dist-lib/computer-page-D9cSNLa9.js +8990 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-CLYU5z7h.js → embedded-DqTPdMCh.js} +10561 -10581
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/keyboard-Yfa1ETse.js +21 -0
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-bjDJmwq6.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-D2zDt9P7.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-Cr7dCCc2.js} +232 -235
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-Qq9_RgFv.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { g as de } from "./chunk-5VM5RSS4-
|
|
2
|
-
import { aA as fe, aB as
|
|
3
|
-
import { G as Ze } from "./graph-
|
|
4
|
-
import { c as qe } from "./channel-
|
|
1
|
+
import { g as de } from "./chunk-5VM5RSS4-xd6XuI9Q.js";
|
|
2
|
+
import { aA as fe, aB as Kt, aC as pe, aD as xe, aE as ye, aF as be, aG as we, aH as me, aI as Se, aJ as Le, aK as ke, aL as ve, aM as Ee, aN as _e, aO as Te, aP as De, aQ as Be, aR as Ne, aS as Ie, aT as Ce, aU as Oe, aV as Re, aW as Ae, aX as ze, aY as Me, _ as g, z as rt, d as D, e as Pe, l as k, q as Fe, t as We, c as R, aZ as Ye, a7 as He, a8 as Ke, a3 as Ue, a_ as M, a$ as kt, b0 as Q, as as Xe, y as $, k as Ve, b1 as je, i as Ct, b2 as Ot, b3 as Ge } from "./index-B0neMIbR.js";
|
|
3
|
+
import { G as Ze } from "./graph-DAHC4kPm.js";
|
|
4
|
+
import { c as qe } from "./channel-D6YHMmF7.js";
|
|
5
5
|
function Je(e) {
|
|
6
6
|
return Array.isArray(e);
|
|
7
7
|
}
|
|
8
8
|
function Qe(e) {
|
|
9
9
|
if (fe(e)) return e;
|
|
10
|
-
const t =
|
|
10
|
+
const t = Kt(e);
|
|
11
11
|
if (!$e(e)) return {};
|
|
12
12
|
if (Je(e)) {
|
|
13
13
|
const s = Array.from(e);
|
|
@@ -52,29 +52,29 @@ function Qe(e) {
|
|
|
52
52
|
return rr(a, e), xt(a, e), tr(a, e), a;
|
|
53
53
|
}
|
|
54
54
|
function $e(e) {
|
|
55
|
-
switch (
|
|
55
|
+
switch (Kt(e)) {
|
|
56
56
|
case Me:
|
|
57
57
|
case ze:
|
|
58
58
|
case Ae:
|
|
59
59
|
case Re:
|
|
60
60
|
case Oe:
|
|
61
|
-
case Be:
|
|
62
61
|
case Ce:
|
|
63
62
|
case Ie:
|
|
64
63
|
case Ne:
|
|
64
|
+
case Be:
|
|
65
65
|
case De:
|
|
66
66
|
case Te:
|
|
67
|
-
case ke:
|
|
68
67
|
case _e:
|
|
69
68
|
case Ee:
|
|
70
69
|
case ve:
|
|
70
|
+
case ke:
|
|
71
71
|
case Le:
|
|
72
72
|
case Se:
|
|
73
73
|
case me:
|
|
74
74
|
case we:
|
|
75
75
|
case be:
|
|
76
|
-
case xe:
|
|
77
76
|
case ye:
|
|
77
|
+
case xe:
|
|
78
78
|
return !0;
|
|
79
79
|
default:
|
|
80
80
|
return !1;
|
|
@@ -98,186 +98,186 @@ function rr(e, t) {
|
|
|
98
98
|
const a = Object.getPrototypeOf(t);
|
|
99
99
|
a !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, a);
|
|
100
100
|
}
|
|
101
|
-
var
|
|
102
|
-
var e = /* @__PURE__ */
|
|
103
|
-
for (
|
|
104
|
-
return
|
|
105
|
-
}, "o"), t = [1, 15], a = [1, 7], s = [1, 13], i = [1, 14], c = [1, 19], r = [1, 16], n = [1, 17], l = [1, 18],
|
|
106
|
-
trace: /* @__PURE__ */
|
|
101
|
+
var bt = (function() {
|
|
102
|
+
var e = /* @__PURE__ */ g(function(T, m, f, x) {
|
|
103
|
+
for (f = f || {}, x = T.length; x--; f[T[x]] = m) ;
|
|
104
|
+
return f;
|
|
105
|
+
}, "o"), t = [1, 15], a = [1, 7], s = [1, 13], i = [1, 14], c = [1, 19], r = [1, 16], n = [1, 17], l = [1, 18], u = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], d = [1, 23], b = [1, 24], w = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], y = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], v = [1, 49], S = {
|
|
106
|
+
trace: /* @__PURE__ */ g(function() {
|
|
107
107
|
}, "trace"),
|
|
108
108
|
yy: {},
|
|
109
109
|
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
110
110
|
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
111
111
|
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
112
|
-
performAction: /* @__PURE__ */
|
|
113
|
-
var
|
|
114
|
-
switch (
|
|
112
|
+
performAction: /* @__PURE__ */ g(function(m, f, x, L, E, o, F) {
|
|
113
|
+
var p = o.length - 1;
|
|
114
|
+
switch (E) {
|
|
115
115
|
case 4:
|
|
116
|
-
|
|
116
|
+
L.getLogger().debug("Rule: separator (NL) ");
|
|
117
117
|
break;
|
|
118
118
|
case 5:
|
|
119
|
-
|
|
119
|
+
L.getLogger().debug("Rule: separator (Space) ");
|
|
120
120
|
break;
|
|
121
121
|
case 6:
|
|
122
|
-
|
|
122
|
+
L.getLogger().debug("Rule: separator (EOF) ");
|
|
123
123
|
break;
|
|
124
124
|
case 7:
|
|
125
|
-
|
|
125
|
+
L.getLogger().debug("Rule: hierarchy: ", o[p - 1]), L.setHierarchy(o[p - 1]);
|
|
126
126
|
break;
|
|
127
127
|
case 8:
|
|
128
|
-
|
|
128
|
+
L.getLogger().debug("Stop NL ");
|
|
129
129
|
break;
|
|
130
130
|
case 9:
|
|
131
|
-
|
|
131
|
+
L.getLogger().debug("Stop EOF ");
|
|
132
132
|
break;
|
|
133
133
|
case 10:
|
|
134
|
-
|
|
134
|
+
L.getLogger().debug("Stop NL2 ");
|
|
135
135
|
break;
|
|
136
136
|
case 11:
|
|
137
|
-
|
|
137
|
+
L.getLogger().debug("Stop EOF2 ");
|
|
138
138
|
break;
|
|
139
139
|
case 12:
|
|
140
|
-
|
|
140
|
+
L.getLogger().debug("Rule: statement: ", o[p]), typeof o[p].length == "number" ? this.$ = o[p] : this.$ = [o[p]];
|
|
141
141
|
break;
|
|
142
142
|
case 13:
|
|
143
|
-
|
|
143
|
+
L.getLogger().debug("Rule: statement #2: ", o[p - 1]), this.$ = [o[p - 1]].concat(o[p]);
|
|
144
144
|
break;
|
|
145
145
|
case 14:
|
|
146
|
-
|
|
146
|
+
L.getLogger().debug("Rule: link: ", o[p], m), this.$ = { edgeTypeStr: o[p], label: "" };
|
|
147
147
|
break;
|
|
148
148
|
case 15:
|
|
149
|
-
|
|
149
|
+
L.getLogger().debug("Rule: LABEL link: ", o[p - 3], o[p - 1], o[p]), this.$ = { edgeTypeStr: o[p], label: o[p - 1] };
|
|
150
150
|
break;
|
|
151
151
|
case 18:
|
|
152
|
-
const
|
|
153
|
-
this.$ = { id:
|
|
152
|
+
const C = parseInt(o[p]), Z = L.generateId();
|
|
153
|
+
this.$ = { id: Z, type: "space", label: "", width: C, children: [] };
|
|
154
154
|
break;
|
|
155
155
|
case 23:
|
|
156
|
-
|
|
157
|
-
const
|
|
156
|
+
L.getLogger().debug("Rule: (nodeStatement link node) ", o[p - 2], o[p - 1], o[p], " typestr: ", o[p - 1].edgeTypeStr);
|
|
157
|
+
const V = L.edgeStrToEdgeData(o[p - 1].edgeTypeStr), at = L.edgeStrToEdgeStartData(o[p - 1].edgeTypeStr), gt = L.edgeStrToThickness(o[p - 1].edgeTypeStr), O = L.edgeStrToPattern(o[p - 1].edgeTypeStr);
|
|
158
158
|
this.$ = [
|
|
159
|
-
{ id: o[
|
|
160
|
-
{ id: o[
|
|
161
|
-
{ id: o[
|
|
159
|
+
{ id: o[p - 2].id, label: o[p - 2].label, type: o[p - 2].type, directions: o[p - 2].directions },
|
|
160
|
+
{ id: o[p - 2].id + "-" + o[p].id, start: o[p - 2].id, end: o[p].id, label: o[p - 1].label, type: "edge", thickness: gt, pattern: O, directions: o[p].directions, arrowTypeEnd: V, arrowTypeStart: at },
|
|
161
|
+
{ id: o[p].id, label: o[p].label, type: L.typeStr2Type(o[p].typeStr), directions: o[p].directions }
|
|
162
162
|
];
|
|
163
163
|
break;
|
|
164
164
|
case 24:
|
|
165
|
-
|
|
165
|
+
L.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[p - 1], o[p]), this.$ = { id: o[p - 1].id, label: o[p - 1].label, type: L.typeStr2Type(o[p - 1].typeStr), directions: o[p - 1].directions, widthInColumns: parseInt(o[p], 10) };
|
|
166
166
|
break;
|
|
167
167
|
case 25:
|
|
168
|
-
|
|
168
|
+
L.getLogger().debug("Rule: nodeStatement (node) ", o[p]), this.$ = { id: o[p].id, label: o[p].label, type: L.typeStr2Type(o[p].typeStr), directions: o[p].directions, widthInColumns: 1 };
|
|
169
169
|
break;
|
|
170
170
|
case 26:
|
|
171
|
-
|
|
171
|
+
L.getLogger().debug("APA123", this ? this : "na"), L.getLogger().debug("COLUMNS: ", o[p]), this.$ = { type: "column-setting", columns: o[p] === "auto" ? -1 : parseInt(o[p]) };
|
|
172
172
|
break;
|
|
173
173
|
case 27:
|
|
174
|
-
|
|
174
|
+
L.getLogger().debug("Rule: id-block statement : ", o[p - 2], o[p - 1]), L.generateId(), this.$ = { ...o[p - 2], type: "composite", children: o[p - 1] };
|
|
175
175
|
break;
|
|
176
176
|
case 28:
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
this.$ = { id:
|
|
177
|
+
L.getLogger().debug("Rule: blockStatement : ", o[p - 2], o[p - 1], o[p]);
|
|
178
|
+
const j = L.generateId();
|
|
179
|
+
this.$ = { id: j, type: "composite", label: "", children: o[p - 1] };
|
|
180
180
|
break;
|
|
181
181
|
case 29:
|
|
182
|
-
|
|
182
|
+
L.getLogger().debug("Rule: node (NODE_ID separator): ", o[p]), this.$ = { id: o[p] };
|
|
183
183
|
break;
|
|
184
184
|
case 30:
|
|
185
|
-
|
|
185
|
+
L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[p - 1], o[p]), this.$ = { id: o[p - 1], label: o[p].label, typeStr: o[p].typeStr, directions: o[p].directions };
|
|
186
186
|
break;
|
|
187
187
|
case 31:
|
|
188
|
-
|
|
188
|
+
L.getLogger().debug("Rule: dirList: ", o[p]), this.$ = [o[p]];
|
|
189
189
|
break;
|
|
190
190
|
case 32:
|
|
191
|
-
|
|
191
|
+
L.getLogger().debug("Rule: dirList: ", o[p - 1], o[p]), this.$ = [o[p - 1]].concat(o[p]);
|
|
192
192
|
break;
|
|
193
193
|
case 33:
|
|
194
|
-
|
|
194
|
+
L.getLogger().debug("Rule: nodeShapeNLabel: ", o[p - 2], o[p - 1], o[p]), this.$ = { typeStr: o[p - 2] + o[p], label: o[p - 1] };
|
|
195
195
|
break;
|
|
196
196
|
case 34:
|
|
197
|
-
|
|
197
|
+
L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[p - 3], o[p - 2], " #3:", o[p - 1], o[p]), this.$ = { typeStr: o[p - 3] + o[p], label: o[p - 2], directions: o[p - 1] };
|
|
198
198
|
break;
|
|
199
199
|
case 35:
|
|
200
200
|
case 36:
|
|
201
|
-
this.$ = { type: "classDef", id: o[
|
|
201
|
+
this.$ = { type: "classDef", id: o[p - 1].trim(), css: o[p].trim() };
|
|
202
202
|
break;
|
|
203
203
|
case 37:
|
|
204
|
-
this.$ = { type: "applyClass", id: o[
|
|
204
|
+
this.$ = { type: "applyClass", id: o[p - 1].trim(), styleClass: o[p].trim() };
|
|
205
205
|
break;
|
|
206
206
|
case 38:
|
|
207
|
-
this.$ = { type: "applyStyles", id: o[
|
|
207
|
+
this.$ = { type: "applyStyles", id: o[p - 1].trim(), stylesStr: o[p].trim() };
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
210
|
}, "anonymous"),
|
|
211
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 8: [1, 20] }, e(
|
|
211
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }), e(h, [2, 16], { 14: 22, 15: d, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(w, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: c }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(y, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: c }, { 31: [2, 14] }, { 17: [1, 36] }, e(w, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: d, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: i, 31: c, 39: r, 43: n, 46: l }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(y, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(w, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: v }, { 15: [1, 50] }, e(h, [2, 27]), e(y, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: v, 38: [2, 31] }, { 31: [2, 15] }, e(y, [2, 34]), { 38: [2, 32] }],
|
|
212
212
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
213
|
-
parseError: /* @__PURE__ */
|
|
214
|
-
if (
|
|
215
|
-
this.trace(
|
|
213
|
+
parseError: /* @__PURE__ */ g(function(m, f) {
|
|
214
|
+
if (f.recoverable)
|
|
215
|
+
this.trace(m);
|
|
216
216
|
else {
|
|
217
|
-
var
|
|
218
|
-
throw
|
|
217
|
+
var x = new Error(m);
|
|
218
|
+
throw x.hash = f, x;
|
|
219
219
|
}
|
|
220
220
|
}, "parseError"),
|
|
221
|
-
parse: /* @__PURE__ */
|
|
222
|
-
var
|
|
223
|
-
for (var
|
|
224
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
225
|
-
|
|
226
|
-
var
|
|
227
|
-
o.push(
|
|
228
|
-
var
|
|
229
|
-
typeof
|
|
230
|
-
function ue(
|
|
231
|
-
|
|
221
|
+
parse: /* @__PURE__ */ g(function(m) {
|
|
222
|
+
var f = this, x = [0], L = [], E = [null], o = [], F = this.table, p = "", C = 0, Z = 0, V = 2, at = 1, gt = o.slice.call(arguments, 1), O = Object.create(this.lexer), j = { yy: {} };
|
|
223
|
+
for (var ut in this.yy)
|
|
224
|
+
Object.prototype.hasOwnProperty.call(this.yy, ut) && (j.yy[ut] = this.yy[ut]);
|
|
225
|
+
O.setInput(m, j.yy), j.yy.lexer = O, j.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
|
|
226
|
+
var dt = O.yylloc;
|
|
227
|
+
o.push(dt);
|
|
228
|
+
var ge = O.options && O.options.ranges;
|
|
229
|
+
typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
230
|
+
function ue(W) {
|
|
231
|
+
x.length = x.length - 2 * W, E.length = E.length - W, o.length = o.length - W;
|
|
232
232
|
}
|
|
233
|
-
|
|
234
|
-
function
|
|
235
|
-
var
|
|
236
|
-
return
|
|
233
|
+
g(ue, "popStack");
|
|
234
|
+
function Nt() {
|
|
235
|
+
var W;
|
|
236
|
+
return W = L.pop() || O.lex() || at, typeof W != "number" && (W instanceof Array && (L = W, W = L.pop()), W = f.symbols_[W] || W), W;
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
for (var
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
242
|
-
|
|
243
|
-
for (
|
|
244
|
-
this.terminals_[
|
|
245
|
-
|
|
246
|
-
` +
|
|
247
|
-
Expecting ` +
|
|
248
|
-
text:
|
|
249
|
-
token: this.terminals_[
|
|
250
|
-
line:
|
|
251
|
-
loc:
|
|
252
|
-
expected:
|
|
238
|
+
g(Nt, "lex");
|
|
239
|
+
for (var P, q, H, ft, J = {}, st, G, It, it; ; ) {
|
|
240
|
+
if (q = x[x.length - 1], this.defaultActions[q] ? H = this.defaultActions[q] : ((P === null || typeof P > "u") && (P = Nt()), H = F[q] && F[q][P]), typeof H > "u" || !H.length || !H[0]) {
|
|
241
|
+
var pt = "";
|
|
242
|
+
it = [];
|
|
243
|
+
for (st in F[q])
|
|
244
|
+
this.terminals_[st] && st > V && it.push("'" + this.terminals_[st] + "'");
|
|
245
|
+
O.showPosition ? pt = "Parse error on line " + (C + 1) + `:
|
|
246
|
+
` + O.showPosition() + `
|
|
247
|
+
Expecting ` + it.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : pt = "Parse error on line " + (C + 1) + ": Unexpected " + (P == at ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(pt, {
|
|
248
|
+
text: O.match,
|
|
249
|
+
token: this.terminals_[P] || P,
|
|
250
|
+
line: O.yylineno,
|
|
251
|
+
loc: dt,
|
|
252
|
+
expected: it
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
if (
|
|
256
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
257
|
-
switch (
|
|
255
|
+
if (H[0] instanceof Array && H.length > 1)
|
|
256
|
+
throw new Error("Parse Error: multiple actions possible at state: " + q + ", token: " + P);
|
|
257
|
+
switch (H[0]) {
|
|
258
258
|
case 1:
|
|
259
|
-
|
|
259
|
+
x.push(P), E.push(O.yytext), o.push(O.yylloc), x.push(H[1]), P = null, Z = O.yyleng, p = O.yytext, C = O.yylineno, dt = O.yylloc;
|
|
260
260
|
break;
|
|
261
261
|
case 2:
|
|
262
|
-
if (
|
|
263
|
-
first_line: o[o.length - (
|
|
262
|
+
if (G = this.productions_[H[1]][1], J.$ = E[E.length - G], J._$ = {
|
|
263
|
+
first_line: o[o.length - (G || 1)].first_line,
|
|
264
264
|
last_line: o[o.length - 1].last_line,
|
|
265
|
-
first_column: o[o.length - (
|
|
265
|
+
first_column: o[o.length - (G || 1)].first_column,
|
|
266
266
|
last_column: o[o.length - 1].last_column
|
|
267
|
-
},
|
|
268
|
-
o[o.length - (
|
|
267
|
+
}, ge && (J._$.range = [
|
|
268
|
+
o[o.length - (G || 1)].range[0],
|
|
269
269
|
o[o.length - 1].range[1]
|
|
270
|
-
]),
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
]), ft = this.performAction.apply(J, [
|
|
271
|
+
p,
|
|
272
|
+
Z,
|
|
273
|
+
C,
|
|
274
|
+
j.yy,
|
|
275
|
+
H[1],
|
|
273
276
|
E,
|
|
274
|
-
K.yy,
|
|
275
|
-
V[1],
|
|
276
|
-
D,
|
|
277
277
|
o
|
|
278
|
-
].concat(
|
|
279
|
-
return
|
|
280
|
-
|
|
278
|
+
].concat(gt)), typeof ft < "u")
|
|
279
|
+
return ft;
|
|
280
|
+
G && (x = x.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), o = o.slice(0, -1 * G)), x.push(this.productions_[H[1]][0]), E.push(J.$), o.push(J._$), It = F[x[x.length - 2]][x[x.length - 1]], x.push(It);
|
|
281
281
|
break;
|
|
282
282
|
case 3:
|
|
283
283
|
return !0;
|
|
@@ -285,18 +285,18 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
285
285
|
}
|
|
286
286
|
return !0;
|
|
287
287
|
}, "parse")
|
|
288
|
-
},
|
|
289
|
-
var
|
|
288
|
+
}, N = /* @__PURE__ */ (function() {
|
|
289
|
+
var T = {
|
|
290
290
|
EOF: 1,
|
|
291
|
-
parseError: /* @__PURE__ */
|
|
291
|
+
parseError: /* @__PURE__ */ g(function(f, x) {
|
|
292
292
|
if (this.yy.parser)
|
|
293
|
-
this.yy.parser.parseError(
|
|
293
|
+
this.yy.parser.parseError(f, x);
|
|
294
294
|
else
|
|
295
|
-
throw new Error(
|
|
295
|
+
throw new Error(f);
|
|
296
296
|
}, "parseError"),
|
|
297
297
|
// resets the lexer, sets new input
|
|
298
|
-
setInput: /* @__PURE__ */
|
|
299
|
-
return this.yy =
|
|
298
|
+
setInput: /* @__PURE__ */ g(function(m, f) {
|
|
299
|
+
return this.yy = f || this.yy || {}, this._input = m, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
300
300
|
first_line: 1,
|
|
301
301
|
first_column: 0,
|
|
302
302
|
last_line: 1,
|
|
@@ -304,32 +304,32 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
304
304
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
305
305
|
}, "setInput"),
|
|
306
306
|
// consumes and returns one char from the input
|
|
307
|
-
input: /* @__PURE__ */
|
|
308
|
-
var
|
|
309
|
-
this.yytext +=
|
|
310
|
-
var
|
|
311
|
-
return
|
|
307
|
+
input: /* @__PURE__ */ g(function() {
|
|
308
|
+
var m = this._input[0];
|
|
309
|
+
this.yytext += m, this.yyleng++, this.offset++, this.match += m, this.matched += m;
|
|
310
|
+
var f = m.match(/(?:\r\n?|\n).*/g);
|
|
311
|
+
return f ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), m;
|
|
312
312
|
}, "input"),
|
|
313
313
|
// unshifts one char (or a string) into the input
|
|
314
|
-
unput: /* @__PURE__ */
|
|
315
|
-
var
|
|
316
|
-
this._input =
|
|
317
|
-
var
|
|
318
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
319
|
-
var
|
|
314
|
+
unput: /* @__PURE__ */ g(function(m) {
|
|
315
|
+
var f = m.length, x = m.split(/(?:\r\n?|\n)/g);
|
|
316
|
+
this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
|
|
317
|
+
var L = this.match.split(/(?:\r\n?|\n)/g);
|
|
318
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), x.length - 1 && (this.yylineno -= x.length - 1);
|
|
319
|
+
var E = this.yylloc.range;
|
|
320
320
|
return this.yylloc = {
|
|
321
321
|
first_line: this.yylloc.first_line,
|
|
322
322
|
last_line: this.yylineno + 1,
|
|
323
323
|
first_column: this.yylloc.first_column,
|
|
324
|
-
last_column:
|
|
325
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
324
|
+
last_column: x ? (x.length === L.length ? this.yylloc.first_column : 0) + L[L.length - x.length].length - x[0].length : this.yylloc.first_column - f
|
|
325
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
|
|
326
326
|
}, "unput"),
|
|
327
327
|
// When called from action, caches matched text and appends it on next action
|
|
328
|
-
more: /* @__PURE__ */
|
|
328
|
+
more: /* @__PURE__ */ g(function() {
|
|
329
329
|
return this._more = !0, this;
|
|
330
330
|
}, "more"),
|
|
331
331
|
// 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.
|
|
332
|
-
reject: /* @__PURE__ */
|
|
332
|
+
reject: /* @__PURE__ */ g(function() {
|
|
333
333
|
if (this.options.backtrack_lexer)
|
|
334
334
|
this._backtrack = !0;
|
|
335
335
|
else
|
|
@@ -342,29 +342,29 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
342
342
|
return this;
|
|
343
343
|
}, "reject"),
|
|
344
344
|
// retain first n characters of the match
|
|
345
|
-
less: /* @__PURE__ */
|
|
346
|
-
this.unput(this.match.slice(
|
|
345
|
+
less: /* @__PURE__ */ g(function(m) {
|
|
346
|
+
this.unput(this.match.slice(m));
|
|
347
347
|
}, "less"),
|
|
348
348
|
// displays already matched input, i.e. for error messages
|
|
349
|
-
pastInput: /* @__PURE__ */
|
|
350
|
-
var
|
|
351
|
-
return (
|
|
349
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
350
|
+
var m = this.matched.substr(0, this.matched.length - this.match.length);
|
|
351
|
+
return (m.length > 20 ? "..." : "") + m.substr(-20).replace(/\n/g, "");
|
|
352
352
|
}, "pastInput"),
|
|
353
353
|
// displays upcoming input, i.e. for error messages
|
|
354
|
-
upcomingInput: /* @__PURE__ */
|
|
355
|
-
var
|
|
356
|
-
return
|
|
354
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
355
|
+
var m = this.match;
|
|
356
|
+
return m.length < 20 && (m += this._input.substr(0, 20 - m.length)), (m.substr(0, 20) + (m.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
357
357
|
}, "upcomingInput"),
|
|
358
358
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
359
|
-
showPosition: /* @__PURE__ */
|
|
360
|
-
var
|
|
361
|
-
return
|
|
362
|
-
` +
|
|
359
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
360
|
+
var m = this.pastInput(), f = new Array(m.length + 1).join("-");
|
|
361
|
+
return m + this.upcomingInput() + `
|
|
362
|
+
` + f + "^";
|
|
363
363
|
}, "showPosition"),
|
|
364
364
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
365
|
-
test_match: /* @__PURE__ */
|
|
366
|
-
var
|
|
367
|
-
if (this.options.backtrack_lexer && (
|
|
365
|
+
test_match: /* @__PURE__ */ g(function(m, f) {
|
|
366
|
+
var x, L, E;
|
|
367
|
+
if (this.options.backtrack_lexer && (E = {
|
|
368
368
|
yylineno: this.yylineno,
|
|
369
369
|
yylloc: {
|
|
370
370
|
first_line: this.yylloc.first_line,
|
|
@@ -383,41 +383,41 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
383
383
|
yy: this.yy,
|
|
384
384
|
conditionStack: this.conditionStack.slice(0),
|
|
385
385
|
done: this.done
|
|
386
|
-
}, this.options.ranges && (
|
|
386
|
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), L = m[0].match(/(?:\r\n?|\n).*/g), L && (this.yylineno += L.length), this.yylloc = {
|
|
387
387
|
first_line: this.yylloc.last_line,
|
|
388
388
|
last_line: this.yylineno + 1,
|
|
389
389
|
first_column: this.yylloc.last_column,
|
|
390
|
-
last_column:
|
|
391
|
-
}, this.yytext +=
|
|
392
|
-
return
|
|
390
|
+
last_column: L ? L[L.length - 1].length - L[L.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + m[0].length
|
|
391
|
+
}, this.yytext += m[0], this.match += m[0], this.matches = m, 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(m[0].length), this.matched += m[0], x = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
|
|
392
|
+
return x;
|
|
393
393
|
if (this._backtrack) {
|
|
394
|
-
for (var o in
|
|
395
|
-
this[o] =
|
|
394
|
+
for (var o in E)
|
|
395
|
+
this[o] = E[o];
|
|
396
396
|
return !1;
|
|
397
397
|
}
|
|
398
398
|
return !1;
|
|
399
399
|
}, "test_match"),
|
|
400
400
|
// return next match in input
|
|
401
|
-
next: /* @__PURE__ */
|
|
401
|
+
next: /* @__PURE__ */ g(function() {
|
|
402
402
|
if (this.done)
|
|
403
403
|
return this.EOF;
|
|
404
404
|
this._input || (this.done = !0);
|
|
405
|
-
var
|
|
405
|
+
var m, f, x, L;
|
|
406
406
|
this._more || (this.yytext = "", this.match = "");
|
|
407
|
-
for (var
|
|
408
|
-
if (
|
|
409
|
-
if (
|
|
410
|
-
if (
|
|
411
|
-
return
|
|
407
|
+
for (var E = this._currentRules(), o = 0; o < E.length; o++)
|
|
408
|
+
if (x = this._input.match(this.rules[E[o]]), x && (!f || x[0].length > f[0].length)) {
|
|
409
|
+
if (f = x, L = o, this.options.backtrack_lexer) {
|
|
410
|
+
if (m = this.test_match(x, E[o]), m !== !1)
|
|
411
|
+
return m;
|
|
412
412
|
if (this._backtrack) {
|
|
413
|
-
|
|
413
|
+
f = !1;
|
|
414
414
|
continue;
|
|
415
415
|
} else
|
|
416
416
|
return !1;
|
|
417
417
|
} else if (!this.options.flex)
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
|
-
return
|
|
420
|
+
return f ? (m = this.test_match(f, E[L]), m !== !1 ? m : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
421
421
|
` + this.showPosition(), {
|
|
422
422
|
text: "",
|
|
423
423
|
token: null,
|
|
@@ -425,56 +425,56 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
425
425
|
});
|
|
426
426
|
}, "next"),
|
|
427
427
|
// return next match that has a token
|
|
428
|
-
lex: /* @__PURE__ */
|
|
429
|
-
var
|
|
430
|
-
return
|
|
428
|
+
lex: /* @__PURE__ */ g(function() {
|
|
429
|
+
var f = this.next();
|
|
430
|
+
return f || this.lex();
|
|
431
431
|
}, "lex"),
|
|
432
432
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
433
|
-
begin: /* @__PURE__ */
|
|
434
|
-
this.conditionStack.push(
|
|
433
|
+
begin: /* @__PURE__ */ g(function(f) {
|
|
434
|
+
this.conditionStack.push(f);
|
|
435
435
|
}, "begin"),
|
|
436
436
|
// pop the previously active lexer condition state off the condition stack
|
|
437
|
-
popState: /* @__PURE__ */
|
|
438
|
-
var
|
|
439
|
-
return
|
|
437
|
+
popState: /* @__PURE__ */ g(function() {
|
|
438
|
+
var f = this.conditionStack.length - 1;
|
|
439
|
+
return f > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
440
440
|
}, "popState"),
|
|
441
441
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
442
|
-
_currentRules: /* @__PURE__ */
|
|
442
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
443
443
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
444
444
|
}, "_currentRules"),
|
|
445
445
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
446
|
-
topState: /* @__PURE__ */
|
|
447
|
-
return
|
|
446
|
+
topState: /* @__PURE__ */ g(function(f) {
|
|
447
|
+
return f = this.conditionStack.length - 1 - Math.abs(f || 0), f >= 0 ? this.conditionStack[f] : "INITIAL";
|
|
448
448
|
}, "topState"),
|
|
449
449
|
// alias for begin(condition)
|
|
450
|
-
pushState: /* @__PURE__ */
|
|
451
|
-
this.begin(
|
|
450
|
+
pushState: /* @__PURE__ */ g(function(f) {
|
|
451
|
+
this.begin(f);
|
|
452
452
|
}, "pushState"),
|
|
453
453
|
// return the number of states currently on the stack
|
|
454
|
-
stateStackSize: /* @__PURE__ */
|
|
454
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
455
455
|
return this.conditionStack.length;
|
|
456
456
|
}, "stateStackSize"),
|
|
457
457
|
options: {},
|
|
458
|
-
performAction: /* @__PURE__ */
|
|
459
|
-
switch (
|
|
458
|
+
performAction: /* @__PURE__ */ g(function(f, x, L, E) {
|
|
459
|
+
switch (L) {
|
|
460
460
|
case 0:
|
|
461
|
-
return
|
|
461
|
+
return f.getLogger().debug("Found block-beta"), 10;
|
|
462
462
|
case 1:
|
|
463
|
-
return
|
|
463
|
+
return f.getLogger().debug("Found id-block"), 29;
|
|
464
464
|
case 2:
|
|
465
|
-
return
|
|
465
|
+
return f.getLogger().debug("Found block"), 10;
|
|
466
466
|
case 3:
|
|
467
|
-
|
|
467
|
+
f.getLogger().debug(".", x.yytext);
|
|
468
468
|
break;
|
|
469
469
|
case 4:
|
|
470
|
-
|
|
470
|
+
f.getLogger().debug("_", x.yytext);
|
|
471
471
|
break;
|
|
472
472
|
case 5:
|
|
473
473
|
return 5;
|
|
474
474
|
case 6:
|
|
475
|
-
return
|
|
475
|
+
return x.yytext = -1, 28;
|
|
476
476
|
case 7:
|
|
477
|
-
return
|
|
477
|
+
return x.yytext = x.yytext.replace(/columns\s+/, ""), f.getLogger().debug("COLUMNS (LEX)", x.yytext), 28;
|
|
478
478
|
case 8:
|
|
479
479
|
this.pushState("md_string");
|
|
480
480
|
break;
|
|
@@ -487,14 +487,14 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
487
487
|
this.pushState("string");
|
|
488
488
|
break;
|
|
489
489
|
case 12:
|
|
490
|
-
|
|
490
|
+
f.getLogger().debug("LEX: POPPING STR:", x.yytext), this.popState();
|
|
491
491
|
break;
|
|
492
492
|
case 13:
|
|
493
|
-
return
|
|
493
|
+
return f.getLogger().debug("LEX: STR end:", x.yytext), "STR";
|
|
494
494
|
case 14:
|
|
495
|
-
return
|
|
495
|
+
return x.yytext = x.yytext.replace(/space\:/, ""), f.getLogger().debug("SPACE NUM (LEX)", x.yytext), 21;
|
|
496
496
|
case 15:
|
|
497
|
-
return
|
|
497
|
+
return x.yytext = "1", f.getLogger().debug("COLUMNS (LEX)", x.yytext), 21;
|
|
498
498
|
case 16:
|
|
499
499
|
return 42;
|
|
500
500
|
case 17:
|
|
@@ -540,61 +540,61 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
540
540
|
case 36:
|
|
541
541
|
return 30;
|
|
542
542
|
case 37:
|
|
543
|
-
return this.popState(),
|
|
543
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
544
544
|
case 38:
|
|
545
|
-
return this.popState(),
|
|
545
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
546
546
|
case 39:
|
|
547
|
-
return this.popState(),
|
|
547
|
+
return this.popState(), f.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
548
548
|
case 40:
|
|
549
|
-
return this.popState(),
|
|
549
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
550
550
|
case 41:
|
|
551
|
-
return this.popState(),
|
|
551
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
552
552
|
case 42:
|
|
553
|
-
return this.popState(),
|
|
553
|
+
return this.popState(), f.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
554
554
|
case 43:
|
|
555
|
-
return this.popState(),
|
|
555
|
+
return this.popState(), f.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
556
556
|
case 44:
|
|
557
|
-
return this.popState(),
|
|
557
|
+
return this.popState(), f.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
558
558
|
case 45:
|
|
559
|
-
return this.popState(),
|
|
559
|
+
return this.popState(), f.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
560
560
|
case 46:
|
|
561
|
-
return this.popState(),
|
|
561
|
+
return this.popState(), f.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
562
562
|
case 47:
|
|
563
|
-
return this.popState(),
|
|
563
|
+
return this.popState(), f.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
564
564
|
case 48:
|
|
565
|
-
return this.popState(),
|
|
565
|
+
return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
566
566
|
case 49:
|
|
567
|
-
return this.popState(),
|
|
567
|
+
return this.popState(), f.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
568
568
|
case 50:
|
|
569
|
-
return this.popState(),
|
|
569
|
+
return this.popState(), f.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
570
570
|
case 51:
|
|
571
|
-
return this.popState(),
|
|
571
|
+
return this.popState(), f.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
572
572
|
case 52:
|
|
573
|
-
return this.popState(),
|
|
573
|
+
return this.popState(), f.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
574
574
|
case 53:
|
|
575
|
-
return this.popState(),
|
|
575
|
+
return this.popState(), f.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
576
576
|
case 54:
|
|
577
|
-
return
|
|
577
|
+
return f.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
578
578
|
case 55:
|
|
579
|
-
return
|
|
579
|
+
return f.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
580
580
|
case 56:
|
|
581
|
-
return
|
|
581
|
+
return f.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
582
582
|
case 57:
|
|
583
|
-
return
|
|
583
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
584
584
|
case 58:
|
|
585
|
-
return
|
|
585
|
+
return f.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
586
586
|
case 59:
|
|
587
|
-
return
|
|
587
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
588
588
|
case 60:
|
|
589
|
-
return
|
|
589
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
590
590
|
case 61:
|
|
591
|
-
return
|
|
591
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
592
592
|
case 62:
|
|
593
|
-
return
|
|
593
|
+
return f.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
594
594
|
case 63:
|
|
595
|
-
return
|
|
595
|
+
return f.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
596
596
|
case 64:
|
|
597
|
-
return
|
|
597
|
+
return f.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
598
598
|
case 65:
|
|
599
599
|
return this.pushState("NODE"), 35;
|
|
600
600
|
case 66:
|
|
@@ -610,13 +610,13 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
610
610
|
case 71:
|
|
611
611
|
return this.pushState("NODE"), 35;
|
|
612
612
|
case 72:
|
|
613
|
-
return
|
|
613
|
+
return f.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
614
614
|
case 73:
|
|
615
|
-
return this.pushState("BLOCK_ARROW"),
|
|
615
|
+
return this.pushState("BLOCK_ARROW"), f.getLogger().debug("LEX ARR START"), 37;
|
|
616
616
|
case 74:
|
|
617
|
-
return
|
|
617
|
+
return f.getLogger().debug("Lex: NODE_ID", x.yytext), 31;
|
|
618
618
|
case 75:
|
|
619
|
-
return
|
|
619
|
+
return f.getLogger().debug("Lex: EOF", x.yytext), 8;
|
|
620
620
|
case 76:
|
|
621
621
|
this.pushState("md_string");
|
|
622
622
|
break;
|
|
@@ -629,140 +629,140 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[H] || H) + "'" : yt =
|
|
|
629
629
|
this.popState();
|
|
630
630
|
break;
|
|
631
631
|
case 80:
|
|
632
|
-
|
|
632
|
+
f.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
633
633
|
break;
|
|
634
634
|
case 81:
|
|
635
|
-
|
|
635
|
+
f.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
636
636
|
break;
|
|
637
637
|
case 82:
|
|
638
|
-
return
|
|
638
|
+
return f.getLogger().debug("LEX: NODE_DESCR:", x.yytext), "NODE_DESCR";
|
|
639
639
|
case 83:
|
|
640
|
-
|
|
640
|
+
f.getLogger().debug("LEX POPPING"), this.popState();
|
|
641
641
|
break;
|
|
642
642
|
case 84:
|
|
643
|
-
|
|
643
|
+
f.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
644
644
|
break;
|
|
645
645
|
case 85:
|
|
646
|
-
return
|
|
646
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (right): dir:", x.yytext), "DIR";
|
|
647
647
|
case 86:
|
|
648
|
-
return
|
|
648
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (left):", x.yytext), "DIR";
|
|
649
649
|
case 87:
|
|
650
|
-
return
|
|
650
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (x):", x.yytext), "DIR";
|
|
651
651
|
case 88:
|
|
652
|
-
return
|
|
652
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (y):", x.yytext), "DIR";
|
|
653
653
|
case 89:
|
|
654
|
-
return
|
|
654
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (up):", x.yytext), "DIR";
|
|
655
655
|
case 90:
|
|
656
|
-
return
|
|
656
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), f.getLogger().debug("Lex (down):", x.yytext), "DIR";
|
|
657
657
|
case 91:
|
|
658
|
-
return
|
|
658
|
+
return x.yytext = "]>", f.getLogger().debug("Lex (ARROW_DIR end):", x.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
659
659
|
case 92:
|
|
660
|
-
return
|
|
660
|
+
return f.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
|
|
661
661
|
case 93:
|
|
662
|
-
return
|
|
662
|
+
return f.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
663
663
|
case 94:
|
|
664
|
-
return
|
|
664
|
+
return f.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
665
665
|
case 95:
|
|
666
|
-
return
|
|
666
|
+
return f.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
667
667
|
case 96:
|
|
668
|
-
return
|
|
668
|
+
return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
669
669
|
case 97:
|
|
670
|
-
return
|
|
670
|
+
return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
671
671
|
case 98:
|
|
672
|
-
return
|
|
672
|
+
return f.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
673
673
|
case 99:
|
|
674
674
|
this.pushState("md_string");
|
|
675
675
|
break;
|
|
676
676
|
case 100:
|
|
677
|
-
return
|
|
677
|
+
return f.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
678
678
|
case 101:
|
|
679
|
-
return this.popState(),
|
|
679
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
|
|
680
680
|
case 102:
|
|
681
|
-
return this.popState(),
|
|
681
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
682
682
|
case 103:
|
|
683
|
-
return this.popState(),
|
|
683
|
+
return this.popState(), f.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
684
684
|
case 104:
|
|
685
|
-
return
|
|
685
|
+
return f.getLogger().debug("Lex: COLON", x.yytext), x.yytext = x.yytext.slice(1), 27;
|
|
686
686
|
}
|
|
687
687
|
}, "anonymous"),
|
|
688
688
|
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
689
689
|
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
|
|
690
690
|
};
|
|
691
|
-
return
|
|
691
|
+
return T;
|
|
692
692
|
})();
|
|
693
|
-
|
|
694
|
-
function
|
|
693
|
+
S.lexer = N;
|
|
694
|
+
function _() {
|
|
695
695
|
this.yy = {};
|
|
696
696
|
}
|
|
697
|
-
return
|
|
697
|
+
return g(_, "Parser"), _.prototype = S, S.Parser = _, new _();
|
|
698
698
|
})();
|
|
699
|
-
|
|
700
|
-
var ar =
|
|
701
|
-
let a =
|
|
702
|
-
a || (a = { id: e, styles: [], textStyles: [] },
|
|
699
|
+
bt.parser = bt;
|
|
700
|
+
var ar = bt, U = /* @__PURE__ */ new Map(), vt = [], wt = /* @__PURE__ */ new Map(), Rt = "color", At = "fill", sr = "bgFill", Ut = ",", ct = /* @__PURE__ */ new Map(), Et = "", ir = /* @__PURE__ */ g((e) => Ve.sanitizeText(e, R()), "sanitizeText"), nr = /* @__PURE__ */ g(function(e, t = "") {
|
|
701
|
+
let a = ct.get(e);
|
|
702
|
+
a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t?.split(Ut).forEach((s) => {
|
|
703
703
|
const i = s.replace(/([^;]*);/, "$1").trim();
|
|
704
|
-
if (RegExp(
|
|
705
|
-
const r = i.replace(
|
|
704
|
+
if (RegExp(Rt).exec(s)) {
|
|
705
|
+
const r = i.replace(At, sr).replace(Rt, At);
|
|
706
706
|
a.textStyles.push(r);
|
|
707
707
|
}
|
|
708
708
|
a.styles.push(i);
|
|
709
709
|
});
|
|
710
|
-
}, "addStyleClass"), cr = /* @__PURE__ */
|
|
711
|
-
const a =
|
|
712
|
-
t != null && (a.styles = t.split(
|
|
713
|
-
}, "addStyle2Node"), lr = /* @__PURE__ */
|
|
710
|
+
}, "addStyleClass"), cr = /* @__PURE__ */ g(function(e, t = "") {
|
|
711
|
+
const a = U.get(e);
|
|
712
|
+
t != null && (a.styles = t.split(Ut));
|
|
713
|
+
}, "addStyle2Node"), lr = /* @__PURE__ */ g(function(e, t) {
|
|
714
714
|
e.split(",").forEach(function(a) {
|
|
715
|
-
let s =
|
|
715
|
+
let s = U.get(a);
|
|
716
716
|
if (s === void 0) {
|
|
717
717
|
const i = a.trim();
|
|
718
|
-
s = { id: i, type: "na", children: [] },
|
|
718
|
+
s = { id: i, type: "na", children: [] }, U.set(i, s);
|
|
719
719
|
}
|
|
720
720
|
s.classes || (s.classes = []), s.classes.push(t);
|
|
721
721
|
});
|
|
722
|
-
}, "setCssClass"),
|
|
723
|
-
const a = e.flat(), s = [],
|
|
722
|
+
}, "setCssClass"), Xt = /* @__PURE__ */ g((e, t) => {
|
|
723
|
+
const a = e.flat(), s = [], c = a.find((r) => r?.type === "column-setting")?.columns ?? -1;
|
|
724
724
|
for (const r of a) {
|
|
725
|
-
if (typeof c == "number" && c > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > c &&
|
|
725
|
+
if (typeof c == "number" && c > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > c && k.warn(
|
|
726
726
|
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`
|
|
727
727
|
), r.label && (r.label = ir(r.label)), r.type === "classDef") {
|
|
728
728
|
nr(r.id, r.css);
|
|
729
729
|
continue;
|
|
730
730
|
}
|
|
731
731
|
if (r.type === "applyClass") {
|
|
732
|
-
lr(r.id,
|
|
732
|
+
lr(r.id, r?.styleClass ?? "");
|
|
733
733
|
continue;
|
|
734
734
|
}
|
|
735
735
|
if (r.type === "applyStyles") {
|
|
736
|
-
r
|
|
736
|
+
r?.stylesStr && cr(r.id, r?.stylesStr);
|
|
737
737
|
continue;
|
|
738
738
|
}
|
|
739
739
|
if (r.type === "column-setting")
|
|
740
740
|
t.columns = r.columns ?? -1;
|
|
741
741
|
else if (r.type === "edge") {
|
|
742
|
-
const n = (
|
|
743
|
-
|
|
742
|
+
const n = (wt.get(r.id) ?? 0) + 1;
|
|
743
|
+
wt.set(r.id, n), r.id = n + "-" + r.id, vt.push(r);
|
|
744
744
|
} else {
|
|
745
745
|
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
746
|
-
const n =
|
|
747
|
-
if (n === void 0 ?
|
|
746
|
+
const n = U.get(r.id);
|
|
747
|
+
if (n === void 0 ? U.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Xt(r.children, r), r.type === "space") {
|
|
748
748
|
const l = r.width ?? 1;
|
|
749
|
-
for (let
|
|
749
|
+
for (let u = 0; u < l; u++) {
|
|
750
750
|
const h = Qe(r);
|
|
751
|
-
h.id = h.id + "-" +
|
|
751
|
+
h.id = h.id + "-" + u, U.set(h.id, h), s.push(h);
|
|
752
752
|
}
|
|
753
753
|
} else n === void 0 && s.push(r);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
t.children = s;
|
|
757
|
-
}, "populateBlockDatabase"),
|
|
758
|
-
|
|
757
|
+
}, "populateBlockDatabase"), _t = [], et = { id: "root", type: "composite", children: [], columns: -1 }, or = /* @__PURE__ */ g(() => {
|
|
758
|
+
k.debug("Clear called"), Fe(), et = { id: "root", type: "composite", children: [], columns: -1 }, U = /* @__PURE__ */ new Map([["root", et]]), _t = [], ct = /* @__PURE__ */ new Map(), vt = [], wt = /* @__PURE__ */ new Map(), Et = "";
|
|
759
759
|
}, "clear");
|
|
760
|
-
function
|
|
761
|
-
switch (
|
|
760
|
+
function Vt(e) {
|
|
761
|
+
switch (k.debug("typeStr2Type", e), e) {
|
|
762
762
|
case "[]":
|
|
763
763
|
return "square";
|
|
764
764
|
case "()":
|
|
765
|
-
return
|
|
765
|
+
return k.debug("we have a round"), "round";
|
|
766
766
|
case "(())":
|
|
767
767
|
return "circle";
|
|
768
768
|
case ">]":
|
|
@@ -793,17 +793,17 @@ function jt(e) {
|
|
|
793
793
|
return "na";
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
|
|
797
|
-
function
|
|
798
|
-
switch (
|
|
796
|
+
g(Vt, "typeStr2Type");
|
|
797
|
+
function jt(e) {
|
|
798
|
+
switch (k.debug("typeStr2Type", e), e) {
|
|
799
799
|
case "==":
|
|
800
800
|
return "thick";
|
|
801
801
|
default:
|
|
802
802
|
return "normal";
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
|
|
806
|
-
function
|
|
805
|
+
g(jt, "edgeTypeStr2Type");
|
|
806
|
+
function Gt(e) {
|
|
807
807
|
switch (e.trim().slice(-1)) {
|
|
808
808
|
case "x":
|
|
809
809
|
return "arrow_cross";
|
|
@@ -815,8 +815,8 @@ function Zt(e) {
|
|
|
815
815
|
return "";
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
|
|
819
|
-
function
|
|
818
|
+
g(Gt, "edgeStrToEdgeData");
|
|
819
|
+
function Zt(e) {
|
|
820
820
|
switch (e.trim().charAt(0)) {
|
|
821
821
|
case "x":
|
|
822
822
|
return "arrow_cross";
|
|
@@ -828,51 +828,51 @@ function qt(e) {
|
|
|
828
828
|
return "arrow_open";
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
|
-
|
|
832
|
-
function
|
|
831
|
+
g(Zt, "edgeStrToEdgeStartData");
|
|
832
|
+
function qt(e) {
|
|
833
833
|
return e.includes("==") ? "thick" : "normal";
|
|
834
834
|
}
|
|
835
|
-
|
|
836
|
-
function
|
|
835
|
+
g(qt, "edgeStrToThickness");
|
|
836
|
+
function Jt(e) {
|
|
837
837
|
return e.includes(".-") ? "dotted" : "solid";
|
|
838
838
|
}
|
|
839
|
-
|
|
840
|
-
var
|
|
841
|
-
|
|
842
|
-
}, "setHierarchy"), ur = /* @__PURE__ */
|
|
843
|
-
const t =
|
|
839
|
+
g(Jt, "edgeStrToPattern");
|
|
840
|
+
var zt = 0, hr = /* @__PURE__ */ g(() => (zt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + zt), "generateId"), gr = /* @__PURE__ */ g((e) => {
|
|
841
|
+
et.children = e, Xt(e, et), _t = et.children;
|
|
842
|
+
}, "setHierarchy"), ur = /* @__PURE__ */ g((e) => {
|
|
843
|
+
const t = U.get(e);
|
|
844
844
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
845
|
-
}, "getColumns"), dr = /* @__PURE__ */
|
|
846
|
-
|
|
847
|
-
}, "setBlock"), br = /* @__PURE__ */
|
|
848
|
-
|
|
849
|
-
}, "setDiagramId"), wr = /* @__PURE__ */
|
|
850
|
-
return
|
|
845
|
+
}, "getColumns"), dr = /* @__PURE__ */ g(() => [...U.values()], "getBlocksFlat"), fr = /* @__PURE__ */ g(() => _t || [], "getBlocks"), pr = /* @__PURE__ */ g(() => vt, "getEdges"), xr = /* @__PURE__ */ g((e) => U.get(e), "getBlock"), yr = /* @__PURE__ */ g((e) => {
|
|
846
|
+
U.set(e.id, e);
|
|
847
|
+
}, "setBlock"), br = /* @__PURE__ */ g((e) => {
|
|
848
|
+
Et = e;
|
|
849
|
+
}, "setDiagramId"), wr = /* @__PURE__ */ g(() => Et, "getDiagramId"), mr = /* @__PURE__ */ g(() => k, "getLogger"), Sr = /* @__PURE__ */ g(function() {
|
|
850
|
+
return ct;
|
|
851
851
|
}, "getClasses"), Lr = {
|
|
852
|
-
getConfig: /* @__PURE__ */
|
|
853
|
-
typeStr2Type:
|
|
854
|
-
edgeTypeStr2Type:
|
|
855
|
-
edgeStrToEdgeData:
|
|
856
|
-
edgeStrToEdgeStartData:
|
|
857
|
-
edgeStrToThickness:
|
|
858
|
-
edgeStrToPattern:
|
|
852
|
+
getConfig: /* @__PURE__ */ g(() => rt().block, "getConfig"),
|
|
853
|
+
typeStr2Type: Vt,
|
|
854
|
+
edgeTypeStr2Type: jt,
|
|
855
|
+
edgeStrToEdgeData: Gt,
|
|
856
|
+
edgeStrToEdgeStartData: Zt,
|
|
857
|
+
edgeStrToThickness: qt,
|
|
858
|
+
edgeStrToPattern: Jt,
|
|
859
859
|
getLogger: mr,
|
|
860
860
|
getBlocksFlat: dr,
|
|
861
861
|
getBlocks: fr,
|
|
862
862
|
getEdges: pr,
|
|
863
863
|
setHierarchy: gr,
|
|
864
|
-
getBlock:
|
|
865
|
-
setBlock:
|
|
864
|
+
getBlock: xr,
|
|
865
|
+
setBlock: yr,
|
|
866
866
|
getColumns: ur,
|
|
867
867
|
getClasses: Sr,
|
|
868
868
|
clear: or,
|
|
869
869
|
generateId: hr,
|
|
870
870
|
setDiagramId: br,
|
|
871
871
|
getDiagramId: wr
|
|
872
|
-
},
|
|
872
|
+
}, kr = Lr, yt = /* @__PURE__ */ g((e, t) => {
|
|
873
873
|
const a = qe, s = a(e, "r"), i = a(e, "g"), c = a(e, "b");
|
|
874
874
|
return We(s, i, c, t);
|
|
875
|
-
}, "fade"),
|
|
875
|
+
}, "fade"), vr = /* @__PURE__ */ g((e) => `.label {
|
|
876
876
|
font-family: ${e.fontFamily};
|
|
877
877
|
color: ${e.nodeTextColor || e.textColor};
|
|
878
878
|
}
|
|
@@ -957,9 +957,9 @@ var Mt = 0, hr = /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(3
|
|
|
957
957
|
}
|
|
958
958
|
|
|
959
959
|
.node .cluster {
|
|
960
|
-
// fill: ${
|
|
961
|
-
fill: ${
|
|
962
|
-
stroke: ${
|
|
960
|
+
// fill: ${yt(e.mainBkg, 0.5)};
|
|
961
|
+
fill: ${yt(e.clusterBkg, 0.5)};
|
|
962
|
+
stroke: ${yt(e.clusterBorder, 0.2)};
|
|
963
963
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
964
964
|
stroke-width: 1px;
|
|
965
965
|
}
|
|
@@ -995,40 +995,40 @@ var Mt = 0, hr = /* @__PURE__ */ u(() => (Mt++, "id-" + Math.random().toString(3
|
|
|
995
995
|
fill: ${e.textColor};
|
|
996
996
|
}
|
|
997
997
|
${de()}
|
|
998
|
-
`, "getStyles"),
|
|
998
|
+
`, "getStyles"), Er = vr, _r = /* @__PURE__ */ g((e, t, a, s) => {
|
|
999
999
|
t.forEach((i) => {
|
|
1000
1000
|
zr[i](e, a, s);
|
|
1001
1001
|
});
|
|
1002
|
-
}, "insertMarkers"), Tr = /* @__PURE__ */
|
|
1003
|
-
|
|
1004
|
-
}, "extension"), Dr = /* @__PURE__ */
|
|
1002
|
+
}, "insertMarkers"), Tr = /* @__PURE__ */ g((e, t, a) => {
|
|
1003
|
+
k.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
1004
|
+
}, "extension"), Dr = /* @__PURE__ */ g((e, t, a) => {
|
|
1005
1005
|
e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1006
|
-
}, "composition"),
|
|
1006
|
+
}, "composition"), Br = /* @__PURE__ */ g((e, t, a) => {
|
|
1007
1007
|
e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1008
|
-
}, "aggregation"),
|
|
1008
|
+
}, "aggregation"), Nr = /* @__PURE__ */ g((e, t, a) => {
|
|
1009
1009
|
e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1010
|
-
}, "dependency"),
|
|
1010
|
+
}, "dependency"), Ir = /* @__PURE__ */ g((e, t, a) => {
|
|
1011
1011
|
e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
1012
|
-
}, "lollipop"),
|
|
1012
|
+
}, "lollipop"), Cr = /* @__PURE__ */ g((e, t, a) => {
|
|
1013
1013
|
e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1014
|
-
}, "point"), Or = /* @__PURE__ */
|
|
1014
|
+
}, "point"), Or = /* @__PURE__ */ g((e, t, a) => {
|
|
1015
1015
|
e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1016
|
-
}, "circle"), Rr = /* @__PURE__ */
|
|
1016
|
+
}, "circle"), Rr = /* @__PURE__ */ g((e, t, a) => {
|
|
1017
1017
|
e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
1018
|
-
}, "cross"), Ar = /* @__PURE__ */
|
|
1018
|
+
}, "cross"), Ar = /* @__PURE__ */ g((e, t, a) => {
|
|
1019
1019
|
e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
1020
1020
|
}, "barb"), zr = {
|
|
1021
1021
|
extension: Tr,
|
|
1022
1022
|
composition: Dr,
|
|
1023
|
-
aggregation:
|
|
1024
|
-
dependency:
|
|
1025
|
-
lollipop:
|
|
1026
|
-
point:
|
|
1023
|
+
aggregation: Br,
|
|
1024
|
+
dependency: Nr,
|
|
1025
|
+
lollipop: Ir,
|
|
1026
|
+
point: Cr,
|
|
1027
1027
|
circle: Or,
|
|
1028
1028
|
cross: Rr,
|
|
1029
1029
|
barb: Ar
|
|
1030
|
-
}, Mr =
|
|
1031
|
-
function
|
|
1030
|
+
}, Mr = _r;
|
|
1031
|
+
function mt(e, t) {
|
|
1032
1032
|
if (e === 0 || !Number.isInteger(e))
|
|
1033
1033
|
throw new Error("Columns must be an integer !== 0.");
|
|
1034
1034
|
if (t < 0 || !Number.isInteger(t))
|
|
@@ -1040,12 +1040,12 @@ function St(e, t) {
|
|
|
1040
1040
|
const a = t % e, s = Math.floor(t / e);
|
|
1041
1041
|
return { px: a, py: s };
|
|
1042
1042
|
}
|
|
1043
|
-
|
|
1044
|
-
var Pr = /* @__PURE__ */
|
|
1043
|
+
g(mt, "calculateBlockPosition");
|
|
1044
|
+
var Pr = /* @__PURE__ */ g((e) => {
|
|
1045
1045
|
let t = 0, a = 0;
|
|
1046
1046
|
for (const s of e.children) {
|
|
1047
1047
|
const { width: i, height: c, x: r, y: n } = s.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
1048
|
-
if (
|
|
1048
|
+
if (k.debug(
|
|
1049
1049
|
"getMaxChildSize abc95 child:",
|
|
1050
1050
|
s.id,
|
|
1051
1051
|
"width:",
|
|
@@ -1064,168 +1064,165 @@ var Pr = /* @__PURE__ */ u((e) => {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
return { width: t, height: a };
|
|
1066
1066
|
}, "getMaxChildSize");
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
v.debug(
|
|
1067
|
+
function lt(e, t, a = 0, s = 0, i = 8) {
|
|
1068
|
+
k.debug(
|
|
1070
1069
|
"setBlockSizes abc95 (start)",
|
|
1071
1070
|
e.id,
|
|
1072
|
-
|
|
1071
|
+
e?.size?.x,
|
|
1073
1072
|
"block width =",
|
|
1074
|
-
e
|
|
1073
|
+
e?.size,
|
|
1075
1074
|
"siblingWidth",
|
|
1076
1075
|
a
|
|
1077
|
-
),
|
|
1076
|
+
), e?.size?.width || (e.size = {
|
|
1078
1077
|
width: a,
|
|
1079
1078
|
height: s,
|
|
1080
1079
|
x: 0,
|
|
1081
1080
|
y: 0
|
|
1082
1081
|
});
|
|
1083
1082
|
let c = 0, r = 0;
|
|
1084
|
-
if (
|
|
1085
|
-
for (const
|
|
1086
|
-
|
|
1087
|
-
const
|
|
1088
|
-
c =
|
|
1089
|
-
for (const
|
|
1090
|
-
|
|
1091
|
-
`abc95 Setting size of children of ${e.id} id=${
|
|
1092
|
-
),
|
|
1093
|
-
`abc95 updating size of ${e.id} children child:${
|
|
1083
|
+
if (e.children?.length > 0) {
|
|
1084
|
+
for (const y of e.children)
|
|
1085
|
+
lt(y, t, 0, 0, i);
|
|
1086
|
+
const n = Pr(e);
|
|
1087
|
+
c = n.width, r = n.height, k.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", c, r);
|
|
1088
|
+
for (const y of e.children)
|
|
1089
|
+
y.size && (k.debug(
|
|
1090
|
+
`abc95 Setting size of children of ${e.id} id=${y.id} ${c} ${r} ${JSON.stringify(y.size)}`
|
|
1091
|
+
), y.size.width = c * (y.widthInColumns ?? 1) + i * ((y.widthInColumns ?? 1) - 1), y.size.height = r, y.size.x = 0, y.size.y = 0, k.debug(
|
|
1092
|
+
`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${c} maxHeight:${r}`
|
|
1094
1093
|
));
|
|
1095
|
-
for (const
|
|
1096
|
-
|
|
1097
|
-
const
|
|
1098
|
-
let
|
|
1099
|
-
for (const
|
|
1100
|
-
|
|
1101
|
-
let
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
let
|
|
1105
|
-
if (
|
|
1106
|
-
|
|
1107
|
-
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${
|
|
1108
|
-
),
|
|
1109
|
-
const
|
|
1110
|
-
|
|
1111
|
-
for (const
|
|
1112
|
-
|
|
1094
|
+
for (const y of e.children)
|
|
1095
|
+
lt(y, t, c, r, i);
|
|
1096
|
+
const l = e.columns ?? -1;
|
|
1097
|
+
let u = 0;
|
|
1098
|
+
for (const y of e.children)
|
|
1099
|
+
u += y.widthInColumns ?? 1;
|
|
1100
|
+
let h = e.children.length;
|
|
1101
|
+
l > 0 && l < u && (h = l);
|
|
1102
|
+
const d = Math.ceil(u / h);
|
|
1103
|
+
let b = h * (c + i) + i, w = d * (r + i) + i;
|
|
1104
|
+
if (b < a) {
|
|
1105
|
+
k.debug(
|
|
1106
|
+
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${b}`
|
|
1107
|
+
), b = a, w = s;
|
|
1108
|
+
const y = (a - h * i - i) / h, v = (s - d * i - i) / d;
|
|
1109
|
+
k.debug("Size indata abc88", e.id, "childWidth", y, "maxWidth", c), k.debug("Size indata abc88", e.id, "childHeight", v, "maxHeight", r), k.debug("Size indata abc88 xSize", h, "padding", i);
|
|
1110
|
+
for (const S of e.children)
|
|
1111
|
+
S.size && (S.size.width = y, S.size.height = v, S.size.x = 0, S.size.y = 0);
|
|
1113
1112
|
}
|
|
1114
|
-
if (
|
|
1115
|
-
`abc95 (finale calc) ${e.id} xSize ${
|
|
1116
|
-
),
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
for (const
|
|
1123
|
-
|
|
1113
|
+
if (k.debug(
|
|
1114
|
+
`abc95 (finale calc) ${e.id} xSize ${h} ySize ${d} columns ${l}${e.children.length} width=${Math.max(b, e.size?.width || 0)}`
|
|
1115
|
+
), b < (e?.size?.width || 0)) {
|
|
1116
|
+
b = e?.size?.width || 0;
|
|
1117
|
+
const y = l > 0 ? Math.min(e.children.length, l) : e.children.length;
|
|
1118
|
+
if (y > 0) {
|
|
1119
|
+
const v = (b - y * i - i) / y;
|
|
1120
|
+
k.debug("abc95 (growing to fit) width", e.id, b, e.size?.width, v);
|
|
1121
|
+
for (const S of e.children)
|
|
1122
|
+
S.size && (S.size.width = v);
|
|
1124
1123
|
}
|
|
1125
1124
|
}
|
|
1126
1125
|
e.size = {
|
|
1127
|
-
width:
|
|
1128
|
-
height:
|
|
1126
|
+
width: b,
|
|
1127
|
+
height: w,
|
|
1129
1128
|
x: 0,
|
|
1130
1129
|
y: 0
|
|
1131
1130
|
};
|
|
1132
1131
|
}
|
|
1133
|
-
|
|
1132
|
+
k.debug(
|
|
1134
1133
|
"setBlockSizes abc94 (done)",
|
|
1135
1134
|
e.id,
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1135
|
+
e?.size?.x,
|
|
1136
|
+
e?.size?.width,
|
|
1137
|
+
e?.size?.y,
|
|
1138
|
+
e?.size?.height
|
|
1140
1139
|
);
|
|
1141
1140
|
}
|
|
1142
|
-
|
|
1143
|
-
function
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.x} y: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.y} width: ${(r = e == null ? void 0 : e.size) == null ? void 0 : r.width}`
|
|
1141
|
+
g(lt, "setBlockSizes");
|
|
1142
|
+
function Tt(e, t, a = 8) {
|
|
1143
|
+
k.debug(
|
|
1144
|
+
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1147
1145
|
);
|
|
1148
1146
|
const s = e.columns ?? -1;
|
|
1149
|
-
if (
|
|
1147
|
+
if (k.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
|
|
1150
1148
|
e.children.length > 0) {
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1153
|
-
const
|
|
1149
|
+
const i = e?.children[0]?.size?.width ?? 0, c = e.children.length * i + (e.children.length - 1) * a;
|
|
1150
|
+
k.debug("widthOfChildren 88", c, "posX");
|
|
1151
|
+
const r = /* @__PURE__ */ new Map();
|
|
1154
1152
|
{
|
|
1155
|
-
let
|
|
1156
|
-
for (const
|
|
1157
|
-
if (!
|
|
1153
|
+
let d = 0;
|
|
1154
|
+
for (const b of e.children) {
|
|
1155
|
+
if (!b.size)
|
|
1158
1156
|
continue;
|
|
1159
|
-
const { py:
|
|
1160
|
-
|
|
1161
|
-
let
|
|
1162
|
-
s > 0 && (
|
|
1157
|
+
const { py: w } = mt(s, d), y = r.get(w) ?? 0;
|
|
1158
|
+
b.size.height > y && r.set(w, b.size.height);
|
|
1159
|
+
let v = b?.widthInColumns ?? 1;
|
|
1160
|
+
s > 0 && (v = Math.min(v, s - d % s)), d += v;
|
|
1163
1161
|
}
|
|
1164
1162
|
}
|
|
1165
|
-
const
|
|
1163
|
+
const n = /* @__PURE__ */ new Map();
|
|
1166
1164
|
{
|
|
1167
|
-
let
|
|
1168
|
-
const
|
|
1169
|
-
for (const
|
|
1170
|
-
|
|
1165
|
+
let d = 0;
|
|
1166
|
+
const b = [...r.keys()].sort((w, y) => w - y);
|
|
1167
|
+
for (const w of b)
|
|
1168
|
+
n.set(w, d), d += (r.get(w) ?? 0) + a;
|
|
1171
1169
|
}
|
|
1172
|
-
let
|
|
1173
|
-
|
|
1174
|
-
let
|
|
1175
|
-
for (const
|
|
1176
|
-
const
|
|
1177
|
-
if (!
|
|
1170
|
+
let l = 0;
|
|
1171
|
+
k.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1172
|
+
let u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -a, h = 0;
|
|
1173
|
+
for (const d of e.children) {
|
|
1174
|
+
const b = e;
|
|
1175
|
+
if (!d.size)
|
|
1178
1176
|
continue;
|
|
1179
|
-
const { width:
|
|
1180
|
-
if (
|
|
1181
|
-
`abc89 layout blocks (child) id: ${
|
|
1182
|
-
),
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
`abc91 layout blocks (calc) px, pyid:${
|
|
1186
|
-
),
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
`abc88 layout blocks (calc) px, pyid:${
|
|
1177
|
+
const { width: w, height: y } = d.size, { px: v, py: S } = mt(s, l);
|
|
1178
|
+
if (S != h && (h = S, u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -a, k.debug("New row in layout for block", e.id, " and child ", d.id, h)), k.debug(
|
|
1179
|
+
`abc89 layout blocks (child) id: ${d.id} Pos: ${l} (px, py) ${v},${S} (${b?.size?.x},${b?.size?.y}) parent: ${b.id} width: ${w}${a}`
|
|
1180
|
+
), b.size) {
|
|
1181
|
+
const _ = w / 2;
|
|
1182
|
+
d.size.x = u + a + _, k.debug(
|
|
1183
|
+
`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${u} new startingPosX${d.size.x} ${_} padding=${a} width=${w} halfWidth=${_} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${w * (d?.widthInColumns ?? 1) / 2}`
|
|
1184
|
+
), u = d.size.x + _;
|
|
1185
|
+
const T = n.get(S) ?? 0, m = r.get(S) ?? y;
|
|
1186
|
+
d.size.y = b.size.y - b.size.height / 2 + T + m / 2 + a, k.debug(
|
|
1187
|
+
`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${u}${a}${_}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${w * (d?.widthInColumns ?? 1) / 2}`
|
|
1190
1188
|
);
|
|
1191
1189
|
}
|
|
1192
|
-
|
|
1193
|
-
let
|
|
1194
|
-
s > 0 && (
|
|
1190
|
+
d.children && Tt(d, t, a);
|
|
1191
|
+
let N = d?.widthInColumns ?? 1;
|
|
1192
|
+
s > 0 && (N = Math.min(N, s - l % s)), l += N, k.debug("abc88 columnsPos", d, l);
|
|
1195
1193
|
}
|
|
1196
1194
|
}
|
|
1197
|
-
|
|
1198
|
-
`layout blocks (<==layoutBlocks) ${e.id} x: ${
|
|
1195
|
+
k.debug(
|
|
1196
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1199
1197
|
);
|
|
1200
1198
|
}
|
|
1201
|
-
|
|
1202
|
-
function
|
|
1199
|
+
g(Tt, "layoutBlocks");
|
|
1200
|
+
function Dt(e, { minX: t, minY: a, maxX: s, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1203
1201
|
if (e.size && e.id !== "root") {
|
|
1204
1202
|
const { x: c, y: r, width: n, height: l } = e.size;
|
|
1205
1203
|
c - n / 2 < t && (t = c - n / 2), r - l / 2 < a && (a = r - l / 2), c + n / 2 > s && (s = c + n / 2), r + l / 2 > i && (i = r + l / 2);
|
|
1206
1204
|
}
|
|
1207
1205
|
if (e.children)
|
|
1208
1206
|
for (const c of e.children)
|
|
1209
|
-
({ minX: t, minY: a, maxX: s, maxY: i } =
|
|
1207
|
+
({ minX: t, minY: a, maxX: s, maxY: i } = Dt(c, { minX: t, minY: a, maxX: s, maxY: i }));
|
|
1210
1208
|
return { minX: t, minY: a, maxX: s, maxY: i };
|
|
1211
1209
|
}
|
|
1212
|
-
|
|
1213
|
-
function
|
|
1214
|
-
var g, h;
|
|
1210
|
+
g(Dt, "findBounds");
|
|
1211
|
+
function Qt(e) {
|
|
1215
1212
|
const t = e.getBlock("root");
|
|
1216
1213
|
if (!t)
|
|
1217
1214
|
return;
|
|
1218
|
-
const a = (
|
|
1219
|
-
|
|
1220
|
-
const { minX: s, minY: i, maxX: c, maxY: r } =
|
|
1215
|
+
const a = R()?.block?.padding ?? 8;
|
|
1216
|
+
lt(t, e, 0, 0, a), Tt(t, e, a), k.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1217
|
+
const { minX: s, minY: i, maxX: c, maxY: r } = Dt(t), n = r - i, l = c - s;
|
|
1221
1218
|
return { x: s, y: i, width: l, height: n };
|
|
1222
1219
|
}
|
|
1223
|
-
|
|
1224
|
-
var Fr = /* @__PURE__ */
|
|
1220
|
+
g(Qt, "layout");
|
|
1221
|
+
var Fr = /* @__PURE__ */ g(async (e, t, a, s = !1, i = !1) => {
|
|
1225
1222
|
let c = t || "";
|
|
1226
1223
|
typeof c == "object" && (c = c[0]);
|
|
1227
|
-
const r =
|
|
1228
|
-
return await
|
|
1224
|
+
const r = R(), n = M(r);
|
|
1225
|
+
return await kt(
|
|
1229
1226
|
e,
|
|
1230
1227
|
c,
|
|
1231
1228
|
{
|
|
@@ -1238,8 +1235,8 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
|
|
|
1238
1235
|
},
|
|
1239
1236
|
r
|
|
1240
1237
|
);
|
|
1241
|
-
}, "createLabel"),
|
|
1242
|
-
t.arrowTypeStart &&
|
|
1238
|
+
}, "createLabel"), K = Fr, Wr = /* @__PURE__ */ g((e, t, a, s, i) => {
|
|
1239
|
+
t.arrowTypeStart && Mt(e, "start", t.arrowTypeStart, a, s, i), t.arrowTypeEnd && Mt(e, "end", t.arrowTypeEnd, a, s, i);
|
|
1243
1240
|
}, "addEdgeMarkers"), Yr = {
|
|
1244
1241
|
arrow_cross: "cross",
|
|
1245
1242
|
arrow_point: "point",
|
|
@@ -1250,16 +1247,16 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
|
|
|
1250
1247
|
composition: "composition",
|
|
1251
1248
|
dependency: "dependency",
|
|
1252
1249
|
lollipop: "lollipop"
|
|
1253
|
-
},
|
|
1250
|
+
}, Mt = /* @__PURE__ */ g((e, t, a, s, i, c) => {
|
|
1254
1251
|
const r = Yr[a];
|
|
1255
1252
|
if (!r) {
|
|
1256
|
-
|
|
1253
|
+
k.warn(`Unknown arrow type: ${a}`);
|
|
1257
1254
|
return;
|
|
1258
1255
|
}
|
|
1259
1256
|
const n = t === "start" ? "Start" : "End";
|
|
1260
1257
|
e.attr(`marker-${t}`, `url(${s}#${i}_${c}-${r}${n})`);
|
|
1261
|
-
}, "addEdgeMarker"),
|
|
1262
|
-
const a =
|
|
1258
|
+
}, "addEdgeMarker"), St = {}, z = {}, Hr = /* @__PURE__ */ g(async (e, t) => {
|
|
1259
|
+
const a = R(), s = M(a), i = e.insert("g").attr("class", "edgeLabel"), c = i.insert("g").attr("class", "label"), r = t.labelType === "markdown", n = await kt(
|
|
1263
1260
|
e,
|
|
1264
1261
|
t.label,
|
|
1265
1262
|
{
|
|
@@ -1276,76 +1273,76 @@ var Fr = /* @__PURE__ */ u(async (e, t, a, s = !1, i = !1) => {
|
|
|
1276
1273
|
a
|
|
1277
1274
|
);
|
|
1278
1275
|
c.node().appendChild(n);
|
|
1279
|
-
let l = n.getBBox(),
|
|
1276
|
+
let l = n.getBBox(), u = l;
|
|
1280
1277
|
if (s) {
|
|
1281
|
-
const
|
|
1282
|
-
l =
|
|
1278
|
+
const d = n.children[0], b = D(n);
|
|
1279
|
+
l = d.getBoundingClientRect(), u = l, b.attr("width", l.width), b.attr("height", l.height);
|
|
1283
1280
|
} else {
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1281
|
+
const d = D(n).select("text").node();
|
|
1282
|
+
d && typeof d.getBBox == "function" && (u = d.getBBox());
|
|
1286
1283
|
}
|
|
1287
|
-
c.attr("transform",
|
|
1284
|
+
c.attr("transform", Q(u, s)), St[t.id] = i, t.width = l.width, t.height = l.height;
|
|
1288
1285
|
let h;
|
|
1289
1286
|
if (t.startLabelLeft) {
|
|
1290
|
-
const
|
|
1291
|
-
h =
|
|
1292
|
-
let
|
|
1287
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelLeft, t.labelStyle);
|
|
1288
|
+
h = w;
|
|
1289
|
+
let y = w.getBBox();
|
|
1293
1290
|
if (s) {
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1291
|
+
const v = w.children[0], S = D(w);
|
|
1292
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1296
1293
|
}
|
|
1297
|
-
|
|
1294
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startLeft = d, tt(h, t.startLabelLeft);
|
|
1298
1295
|
}
|
|
1299
1296
|
if (t.startLabelRight) {
|
|
1300
|
-
const
|
|
1301
|
-
h =
|
|
1302
|
-
let
|
|
1297
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelRight, t.labelStyle);
|
|
1298
|
+
h = w;
|
|
1299
|
+
let y = w.getBBox();
|
|
1303
1300
|
if (s) {
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1301
|
+
const v = w.children[0], S = D(w);
|
|
1302
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1306
1303
|
}
|
|
1307
|
-
|
|
1304
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startRight = d, tt(h, t.startLabelRight);
|
|
1308
1305
|
}
|
|
1309
1306
|
if (t.endLabelLeft) {
|
|
1310
|
-
const
|
|
1311
|
-
h =
|
|
1312
|
-
let
|
|
1307
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(d, t.endLabelLeft, t.labelStyle);
|
|
1308
|
+
h = w;
|
|
1309
|
+
let y = w.getBBox();
|
|
1313
1310
|
if (s) {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1311
|
+
const v = w.children[0], S = D(w);
|
|
1312
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1316
1313
|
}
|
|
1317
|
-
|
|
1314
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endLeft = d, tt(h, t.endLabelLeft);
|
|
1318
1315
|
}
|
|
1319
1316
|
if (t.endLabelRight) {
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1317
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(
|
|
1318
|
+
d,
|
|
1322
1319
|
t.endLabelRight,
|
|
1323
1320
|
t.labelStyle
|
|
1324
1321
|
);
|
|
1325
|
-
h =
|
|
1326
|
-
let
|
|
1322
|
+
h = w;
|
|
1323
|
+
let y = w.getBBox();
|
|
1327
1324
|
if (s) {
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1325
|
+
const v = w.children[0], S = D(w);
|
|
1326
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1330
1327
|
}
|
|
1331
|
-
|
|
1328
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endRight = d, tt(h, t.endLabelRight);
|
|
1332
1329
|
}
|
|
1333
1330
|
return n;
|
|
1334
1331
|
}, "insertEdgeLabel");
|
|
1335
|
-
function
|
|
1336
|
-
|
|
1332
|
+
function tt(e, t) {
|
|
1333
|
+
M(R()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1337
1334
|
}
|
|
1338
|
-
|
|
1339
|
-
var Kr = /* @__PURE__ */
|
|
1340
|
-
|
|
1335
|
+
g(tt, "setTerminalWidth");
|
|
1336
|
+
var Kr = /* @__PURE__ */ g((e, t) => {
|
|
1337
|
+
k.debug("Moving label abc88 ", e.id, e.label, St[e.id], t);
|
|
1341
1338
|
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1342
|
-
const s =
|
|
1339
|
+
const s = R(), { subGraphTitleTotalMargin: i } = Xe(s);
|
|
1343
1340
|
if (e.label) {
|
|
1344
|
-
const c =
|
|
1341
|
+
const c = St[e.id];
|
|
1345
1342
|
let r = e.x, n = e.y;
|
|
1346
1343
|
if (a) {
|
|
1347
|
-
const l =
|
|
1348
|
-
|
|
1344
|
+
const l = $.calcLabelPosition(a);
|
|
1345
|
+
k.debug(
|
|
1349
1346
|
"Moving label " + e.label + " from (",
|
|
1350
1347
|
r,
|
|
1351
1348
|
",",
|
|
@@ -1360,19 +1357,19 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1360
1357
|
c.attr("transform", `translate(${r}, ${n + i / 2})`);
|
|
1361
1358
|
}
|
|
1362
1359
|
if (e.startLabelLeft) {
|
|
1363
|
-
const c =
|
|
1360
|
+
const c = z[e.id].startLeft;
|
|
1364
1361
|
let r = e.x, n = e.y;
|
|
1365
1362
|
if (a) {
|
|
1366
|
-
const l =
|
|
1363
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
1367
1364
|
r = l.x, n = l.y;
|
|
1368
1365
|
}
|
|
1369
1366
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1370
1367
|
}
|
|
1371
1368
|
if (e.startLabelRight) {
|
|
1372
|
-
const c =
|
|
1369
|
+
const c = z[e.id].startRight;
|
|
1373
1370
|
let r = e.x, n = e.y;
|
|
1374
1371
|
if (a) {
|
|
1375
|
-
const l =
|
|
1372
|
+
const l = $.calcTerminalLabelPosition(
|
|
1376
1373
|
e.arrowTypeStart ? 10 : 0,
|
|
1377
1374
|
"start_right",
|
|
1378
1375
|
a
|
|
@@ -1382,49 +1379,49 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1382
1379
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1383
1380
|
}
|
|
1384
1381
|
if (e.endLabelLeft) {
|
|
1385
|
-
const c =
|
|
1382
|
+
const c = z[e.id].endLeft;
|
|
1386
1383
|
let r = e.x, n = e.y;
|
|
1387
1384
|
if (a) {
|
|
1388
|
-
const l =
|
|
1385
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
1389
1386
|
r = l.x, n = l.y;
|
|
1390
1387
|
}
|
|
1391
1388
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1392
1389
|
}
|
|
1393
1390
|
if (e.endLabelRight) {
|
|
1394
|
-
const c =
|
|
1391
|
+
const c = z[e.id].endRight;
|
|
1395
1392
|
let r = e.x, n = e.y;
|
|
1396
1393
|
if (a) {
|
|
1397
|
-
const l =
|
|
1394
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
1398
1395
|
r = l.x, n = l.y;
|
|
1399
1396
|
}
|
|
1400
1397
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1401
1398
|
}
|
|
1402
|
-
}, "positionEdgeLabel"), Ur = /* @__PURE__ */
|
|
1399
|
+
}, "positionEdgeLabel"), Ur = /* @__PURE__ */ g((e, t) => {
|
|
1403
1400
|
const a = e.x, s = e.y, i = Math.abs(t.x - a), c = Math.abs(t.y - s), r = e.width / 2, n = e.height / 2;
|
|
1404
1401
|
return i >= r || c >= n;
|
|
1405
|
-
}, "outsideNode"), Xr = /* @__PURE__ */
|
|
1406
|
-
|
|
1402
|
+
}, "outsideNode"), Xr = /* @__PURE__ */ g((e, t, a) => {
|
|
1403
|
+
k.debug(`intersection calc abc89:
|
|
1407
1404
|
outsidePoint: ${JSON.stringify(t)}
|
|
1408
1405
|
insidePoint : ${JSON.stringify(a)}
|
|
1409
1406
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1410
1407
|
const s = e.x, i = e.y, c = Math.abs(s - a.x), r = e.width / 2;
|
|
1411
1408
|
let n = a.x < t.x ? r - c : r + c;
|
|
1412
|
-
const l = e.height / 2,
|
|
1409
|
+
const l = e.height / 2, u = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
|
|
1413
1410
|
if (Math.abs(i - t.y) * r > Math.abs(s - t.x) * l) {
|
|
1414
|
-
let
|
|
1415
|
-
n = h *
|
|
1416
|
-
const
|
|
1411
|
+
let d = a.y < t.y ? t.y - l - i : i - l - t.y;
|
|
1412
|
+
n = h * d / u;
|
|
1413
|
+
const b = {
|
|
1417
1414
|
x: a.x < t.x ? a.x + n : a.x - h + n,
|
|
1418
|
-
y: a.y < t.y ? a.y +
|
|
1415
|
+
y: a.y < t.y ? a.y + u - d : a.y - u + d
|
|
1419
1416
|
};
|
|
1420
|
-
return n === 0 && (
|
|
1417
|
+
return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), u === 0 && (b.y = t.y), k.debug(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${n}`, b), b;
|
|
1421
1418
|
} else {
|
|
1422
1419
|
a.x < t.x ? n = t.x - r - s : n = s - r - t.x;
|
|
1423
|
-
let
|
|
1424
|
-
return
|
|
1420
|
+
let d = u * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, w = a.y < t.y ? a.y + d : a.y - d;
|
|
1421
|
+
return k.debug(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${n}`, { _x: b, _y: w }), n === 0 && (b = t.x, w = t.y), h === 0 && (b = t.x), u === 0 && (w = t.y), { x: b, y: w };
|
|
1425
1422
|
}
|
|
1426
|
-
}, "intersection"),
|
|
1427
|
-
|
|
1423
|
+
}, "intersection"), Pt = /* @__PURE__ */ g((e, t) => {
|
|
1424
|
+
k.debug("abc88 cutPathAtIntersect", e, t);
|
|
1428
1425
|
let a = [], s = e[0], i = !1;
|
|
1429
1426
|
return e.forEach((c) => {
|
|
1430
1427
|
if (!Ur(t, c) && !i) {
|
|
@@ -1436,48 +1433,48 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1436
1433
|
} else
|
|
1437
1434
|
s = c, i || a.push(c);
|
|
1438
1435
|
}), a;
|
|
1439
|
-
}, "cutPathAtIntersect"), Vr = /* @__PURE__ */
|
|
1436
|
+
}, "cutPathAtIntersect"), Vr = /* @__PURE__ */ g(function(e, t, a, s, i, c, r) {
|
|
1440
1437
|
let n = a.points;
|
|
1441
|
-
|
|
1438
|
+
k.debug("abc88 InsertEdge: edge=", a, "e=", t);
|
|
1442
1439
|
let l = !1;
|
|
1443
|
-
const
|
|
1440
|
+
const u = c.node(t.v);
|
|
1444
1441
|
var h = c.node(t.w);
|
|
1445
|
-
h
|
|
1446
|
-
const
|
|
1447
|
-
let
|
|
1448
|
-
a.curve && (i === "graph" || i === "flowchart") && (
|
|
1449
|
-
const { x, y
|
|
1450
|
-
let
|
|
1442
|
+
h?.intersect && u?.intersect && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (k.debug("to cluster abc88", s[a.toCluster]), n = Pt(a.points, s[a.toCluster].node), l = !0), a.fromCluster && (k.debug("from cluster abc88", s[a.fromCluster]), n = Pt(n.reverse(), s[a.fromCluster].node).reverse(), l = !0);
|
|
1443
|
+
const d = n.filter((m) => !Number.isNaN(m.y));
|
|
1444
|
+
let b = Ke;
|
|
1445
|
+
a.curve && (i === "graph" || i === "flowchart") && (b = a.curve);
|
|
1446
|
+
const { x: w, y } = Ye(a), v = He().x(w).y(y).curve(b);
|
|
1447
|
+
let S;
|
|
1451
1448
|
switch (a.thickness) {
|
|
1452
1449
|
case "normal":
|
|
1453
|
-
|
|
1450
|
+
S = "edge-thickness-normal";
|
|
1454
1451
|
break;
|
|
1455
1452
|
case "thick":
|
|
1456
|
-
|
|
1453
|
+
S = "edge-thickness-thick";
|
|
1457
1454
|
break;
|
|
1458
1455
|
case "invisible":
|
|
1459
|
-
|
|
1456
|
+
S = "edge-thickness-thick";
|
|
1460
1457
|
break;
|
|
1461
1458
|
default:
|
|
1462
|
-
|
|
1459
|
+
S = "";
|
|
1463
1460
|
}
|
|
1464
1461
|
switch (a.pattern) {
|
|
1465
1462
|
case "solid":
|
|
1466
|
-
|
|
1463
|
+
S += " edge-pattern-solid";
|
|
1467
1464
|
break;
|
|
1468
1465
|
case "dotted":
|
|
1469
|
-
|
|
1466
|
+
S += " edge-pattern-dotted";
|
|
1470
1467
|
break;
|
|
1471
1468
|
case "dashed":
|
|
1472
|
-
|
|
1469
|
+
S += " edge-pattern-dashed";
|
|
1473
1470
|
break;
|
|
1474
1471
|
}
|
|
1475
|
-
const
|
|
1476
|
-
let
|
|
1477
|
-
(
|
|
1478
|
-
let
|
|
1479
|
-
return l && (
|
|
1480
|
-
}, "insertEdge"), jr = /* @__PURE__ */
|
|
1472
|
+
const N = e.append("path").attr("d", v(d)).attr("id", a.id).attr("class", " " + S + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
1473
|
+
let _ = "";
|
|
1474
|
+
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = Ue(!0)), Wr(N, a, _, r, i);
|
|
1475
|
+
let T = {};
|
|
1476
|
+
return l && (T.updatedPath = n), T.originalPath = a.points, T;
|
|
1477
|
+
}, "insertEdge"), jr = /* @__PURE__ */ g((e) => {
|
|
1481
1478
|
const t = /* @__PURE__ */ new Set();
|
|
1482
1479
|
for (const a of e)
|
|
1483
1480
|
switch (a) {
|
|
@@ -1492,28 +1489,28 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1492
1489
|
break;
|
|
1493
1490
|
}
|
|
1494
1491
|
return t;
|
|
1495
|
-
}, "expandAndDeduplicateDirections"), Gr = /* @__PURE__ */
|
|
1496
|
-
const i = jr(e), c = 2, r = t.height + 2 * a.padding, n = r / c, l = s ?? t.width + 2 * n + a.padding,
|
|
1492
|
+
}, "expandAndDeduplicateDirections"), Gr = /* @__PURE__ */ g((e, t, a, s) => {
|
|
1493
|
+
const i = jr(e), c = 2, r = t.height + 2 * a.padding, n = r / c, l = s ?? t.width + 2 * n + a.padding, u = a.padding / 2;
|
|
1497
1494
|
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1498
1495
|
// Bottom
|
|
1499
1496
|
{ x: 0, y: 0 },
|
|
1500
1497
|
{ x: n, y: 0 },
|
|
1501
|
-
{ x: l / 2, y: 2 *
|
|
1498
|
+
{ x: l / 2, y: 2 * u },
|
|
1502
1499
|
{ x: l - n, y: 0 },
|
|
1503
1500
|
{ x: l, y: 0 },
|
|
1504
1501
|
// Right
|
|
1505
1502
|
{ x: l, y: -r / 3 },
|
|
1506
|
-
{ x: l + 2 *
|
|
1503
|
+
{ x: l + 2 * u, y: -r / 2 },
|
|
1507
1504
|
{ x: l, y: -2 * r / 3 },
|
|
1508
1505
|
{ x: l, y: -r },
|
|
1509
1506
|
// Top
|
|
1510
1507
|
{ x: l - n, y: -r },
|
|
1511
|
-
{ x: l / 2, y: -r - 2 *
|
|
1508
|
+
{ x: l / 2, y: -r - 2 * u },
|
|
1512
1509
|
{ x: n, y: -r },
|
|
1513
1510
|
// Left
|
|
1514
1511
|
{ x: 0, y: -r },
|
|
1515
1512
|
{ x: 0, y: -2 * r / 3 },
|
|
1516
|
-
{ x: -2 *
|
|
1513
|
+
{ x: -2 * u, y: -r / 2 },
|
|
1517
1514
|
{ x: 0, y: -r / 3 }
|
|
1518
1515
|
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
1519
1516
|
{ x: n, y: 0 },
|
|
@@ -1539,31 +1536,31 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1539
1536
|
{ x: l, y: -r }
|
|
1540
1537
|
] : i.has("right") && i.has("left") ? [
|
|
1541
1538
|
{ x: n, y: 0 },
|
|
1542
|
-
{ x: n, y: -
|
|
1543
|
-
{ x: l - n, y: -
|
|
1539
|
+
{ x: n, y: -u },
|
|
1540
|
+
{ x: l - n, y: -u },
|
|
1544
1541
|
{ x: l - n, y: 0 },
|
|
1545
1542
|
{ x: l, y: -r / 2 },
|
|
1546
1543
|
{ x: l - n, y: -r },
|
|
1547
|
-
{ x: l - n, y: -r +
|
|
1548
|
-
{ x: n, y: -r +
|
|
1544
|
+
{ x: l - n, y: -r + u },
|
|
1545
|
+
{ x: n, y: -r + u },
|
|
1549
1546
|
{ x: n, y: -r },
|
|
1550
1547
|
{ x: 0, y: -r / 2 }
|
|
1551
1548
|
] : i.has("up") && i.has("down") ? [
|
|
1552
1549
|
// Bottom center
|
|
1553
1550
|
{ x: l / 2, y: 0 },
|
|
1554
1551
|
// Left point of bottom arrow
|
|
1555
|
-
{ x: 0, y: -
|
|
1556
|
-
{ x: n, y: -
|
|
1552
|
+
{ x: 0, y: -u },
|
|
1553
|
+
{ x: n, y: -u },
|
|
1557
1554
|
// Left top over vertical section
|
|
1558
|
-
{ x: n, y: -r +
|
|
1559
|
-
{ x: 0, y: -r +
|
|
1555
|
+
{ x: n, y: -r + u },
|
|
1556
|
+
{ x: 0, y: -r + u },
|
|
1560
1557
|
// Top of arrow
|
|
1561
1558
|
{ x: l / 2, y: -r },
|
|
1562
|
-
{ x: l, y: -r +
|
|
1559
|
+
{ x: l, y: -r + u },
|
|
1563
1560
|
// Top of right vertical bar
|
|
1564
|
-
{ x: l - n, y: -r +
|
|
1565
|
-
{ x: l - n, y: -
|
|
1566
|
-
{ x: l, y: -
|
|
1561
|
+
{ x: l - n, y: -r + u },
|
|
1562
|
+
{ x: l - n, y: -u },
|
|
1563
|
+
{ x: l, y: -u }
|
|
1567
1564
|
] : i.has("right") && i.has("up") ? [
|
|
1568
1565
|
{ x: 0, y: 0 },
|
|
1569
1566
|
{ x: l, y: -n },
|
|
@@ -1581,145 +1578,145 @@ var Kr = /* @__PURE__ */ u((e, t) => {
|
|
|
1581
1578
|
{ x: 0, y: 0 },
|
|
1582
1579
|
{ x: l, y: -r }
|
|
1583
1580
|
] : i.has("right") ? [
|
|
1584
|
-
{ x: n, y: -
|
|
1585
|
-
{ x: n, y: -
|
|
1586
|
-
{ x: l - n, y: -
|
|
1581
|
+
{ x: n, y: -u },
|
|
1582
|
+
{ x: n, y: -u },
|
|
1583
|
+
{ x: l - n, y: -u },
|
|
1587
1584
|
{ x: l - n, y: 0 },
|
|
1588
1585
|
{ x: l, y: -r / 2 },
|
|
1589
1586
|
{ x: l - n, y: -r },
|
|
1590
|
-
{ x: l - n, y: -r +
|
|
1587
|
+
{ x: l - n, y: -r + u },
|
|
1591
1588
|
// top left corner of arrow
|
|
1592
|
-
{ x: n, y: -r +
|
|
1593
|
-
{ x: n, y: -r +
|
|
1589
|
+
{ x: n, y: -r + u },
|
|
1590
|
+
{ x: n, y: -r + u }
|
|
1594
1591
|
] : i.has("left") ? [
|
|
1595
1592
|
{ x: n, y: 0 },
|
|
1596
|
-
{ x: n, y: -
|
|
1593
|
+
{ x: n, y: -u },
|
|
1597
1594
|
// Two points, the right corners
|
|
1598
|
-
{ x: l - n, y: -
|
|
1599
|
-
{ x: l - n, y: -r +
|
|
1600
|
-
{ x: n, y: -r +
|
|
1595
|
+
{ x: l - n, y: -u },
|
|
1596
|
+
{ x: l - n, y: -r + u },
|
|
1597
|
+
{ x: n, y: -r + u },
|
|
1601
1598
|
{ x: n, y: -r },
|
|
1602
1599
|
{ x: 0, y: -r / 2 }
|
|
1603
1600
|
] : i.has("up") ? [
|
|
1604
1601
|
// Bottom center
|
|
1605
|
-
{ x: n, y: -
|
|
1602
|
+
{ x: n, y: -u },
|
|
1606
1603
|
// Left top over vertical section
|
|
1607
|
-
{ x: n, y: -r +
|
|
1608
|
-
{ x: 0, y: -r +
|
|
1604
|
+
{ x: n, y: -r + u },
|
|
1605
|
+
{ x: 0, y: -r + u },
|
|
1609
1606
|
// Top of arrow
|
|
1610
1607
|
{ x: l / 2, y: -r },
|
|
1611
|
-
{ x: l, y: -r +
|
|
1608
|
+
{ x: l, y: -r + u },
|
|
1612
1609
|
// Top of right vertical bar
|
|
1613
|
-
{ x: l - n, y: -r +
|
|
1614
|
-
{ x: l - n, y: -
|
|
1610
|
+
{ x: l - n, y: -r + u },
|
|
1611
|
+
{ x: l - n, y: -u }
|
|
1615
1612
|
] : i.has("down") ? [
|
|
1616
1613
|
// Bottom center
|
|
1617
1614
|
{ x: l / 2, y: 0 },
|
|
1618
1615
|
// Left point of bottom arrow
|
|
1619
|
-
{ x: 0, y: -
|
|
1620
|
-
{ x: n, y: -
|
|
1616
|
+
{ x: 0, y: -u },
|
|
1617
|
+
{ x: n, y: -u },
|
|
1621
1618
|
// Left top over vertical section
|
|
1622
|
-
{ x: n, y: -r +
|
|
1623
|
-
{ x: l - n, y: -r +
|
|
1624
|
-
{ x: l - n, y: -
|
|
1625
|
-
{ x: l, y: -
|
|
1619
|
+
{ x: n, y: -r + u },
|
|
1620
|
+
{ x: l - n, y: -r + u },
|
|
1621
|
+
{ x: l - n, y: -u },
|
|
1622
|
+
{ x: l, y: -u }
|
|
1626
1623
|
] : [{ x: 0, y: 0 }];
|
|
1627
1624
|
}, "getArrowPoints");
|
|
1628
|
-
function
|
|
1625
|
+
function $t(e, t) {
|
|
1629
1626
|
return e.intersect(t);
|
|
1630
1627
|
}
|
|
1631
|
-
|
|
1632
|
-
var Zr =
|
|
1633
|
-
function
|
|
1634
|
-
var i = e.x, c = e.y, r = i - s.x, n = c - s.y, l = Math.sqrt(t * t * n * n + a * a * r * r),
|
|
1635
|
-
s.x < i && (
|
|
1628
|
+
g($t, "intersectNode");
|
|
1629
|
+
var Zr = $t;
|
|
1630
|
+
function te(e, t, a, s) {
|
|
1631
|
+
var i = e.x, c = e.y, r = i - s.x, n = c - s.y, l = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / l);
|
|
1632
|
+
s.x < i && (u = -u);
|
|
1636
1633
|
var h = Math.abs(t * a * n / l);
|
|
1637
|
-
return s.y < c && (h = -h), { x: i +
|
|
1634
|
+
return s.y < c && (h = -h), { x: i + u, y: c + h };
|
|
1638
1635
|
}
|
|
1639
|
-
|
|
1640
|
-
var
|
|
1641
|
-
function
|
|
1642
|
-
return
|
|
1636
|
+
g(te, "intersectEllipse");
|
|
1637
|
+
var ee = te;
|
|
1638
|
+
function re(e, t, a) {
|
|
1639
|
+
return ee(e, t, t, a);
|
|
1643
1640
|
}
|
|
1644
|
-
|
|
1645
|
-
var qr =
|
|
1646
|
-
function
|
|
1647
|
-
var i, c, r, n, l,
|
|
1648
|
-
if (i = t.y - e.y, r = e.x - t.x, l = t.x * e.y - e.x * t.y,
|
|
1649
|
-
return
|
|
1641
|
+
g(re, "intersectCircle");
|
|
1642
|
+
var qr = re;
|
|
1643
|
+
function ae(e, t, a, s) {
|
|
1644
|
+
var i, c, r, n, l, u, h, d, b, w, y, v, S, N, _;
|
|
1645
|
+
if (i = t.y - e.y, r = e.x - t.x, l = t.x * e.y - e.x * t.y, b = i * a.x + r * a.y + l, w = i * s.x + r * s.y + l, !(b !== 0 && w !== 0 && Lt(b, w)) && (c = s.y - a.y, n = a.x - s.x, u = s.x * a.y - a.x * s.y, h = c * e.x + n * e.y + u, d = c * t.x + n * t.y + u, !(h !== 0 && d !== 0 && Lt(h, d)) && (y = i * n - c * r, y !== 0)))
|
|
1646
|
+
return v = Math.abs(y / 2), S = r * u - n * l, N = S < 0 ? (S - v) / y : (S + v) / y, S = c * l - i * u, _ = S < 0 ? (S - v) / y : (S + v) / y, { x: N, y: _ };
|
|
1650
1647
|
}
|
|
1651
|
-
|
|
1652
|
-
function
|
|
1648
|
+
g(ae, "intersectLine");
|
|
1649
|
+
function Lt(e, t) {
|
|
1653
1650
|
return e * t > 0;
|
|
1654
1651
|
}
|
|
1655
|
-
|
|
1656
|
-
var Jr =
|
|
1657
|
-
function
|
|
1652
|
+
g(Lt, "sameSign");
|
|
1653
|
+
var Jr = ae, Qr = se;
|
|
1654
|
+
function se(e, t, a) {
|
|
1658
1655
|
var s = e.x, i = e.y, c = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1659
|
-
typeof t.forEach == "function" ? t.forEach(function(
|
|
1660
|
-
r = Math.min(r,
|
|
1656
|
+
typeof t.forEach == "function" ? t.forEach(function(y) {
|
|
1657
|
+
r = Math.min(r, y.x), n = Math.min(n, y.y);
|
|
1661
1658
|
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1662
|
-
for (var l = s - e.width / 2 - r,
|
|
1663
|
-
var
|
|
1659
|
+
for (var l = s - e.width / 2 - r, u = i - e.height / 2 - n, h = 0; h < t.length; h++) {
|
|
1660
|
+
var d = t[h], b = t[h < t.length - 1 ? h + 1 : 0], w = Jr(
|
|
1664
1661
|
e,
|
|
1665
1662
|
a,
|
|
1666
|
-
{ x: l +
|
|
1667
|
-
{ x: l +
|
|
1663
|
+
{ x: l + d.x, y: u + d.y },
|
|
1664
|
+
{ x: l + b.x, y: u + b.y }
|
|
1668
1665
|
);
|
|
1669
|
-
|
|
1666
|
+
w && c.push(w);
|
|
1670
1667
|
}
|
|
1671
|
-
return c.length ? (c.length > 1 && c.sort(function(
|
|
1672
|
-
var
|
|
1673
|
-
return
|
|
1668
|
+
return c.length ? (c.length > 1 && c.sort(function(y, v) {
|
|
1669
|
+
var S = y.x - a.x, N = y.y - a.y, _ = Math.sqrt(S * S + N * N), T = v.x - a.x, m = v.y - a.y, f = Math.sqrt(T * T + m * m);
|
|
1670
|
+
return _ < f ? -1 : _ === f ? 0 : 1;
|
|
1674
1671
|
}), c[0]) : e;
|
|
1675
1672
|
}
|
|
1676
|
-
|
|
1677
|
-
var $r = /* @__PURE__ */
|
|
1678
|
-
var a = e.x, s = e.y, i = t.x - a, c = t.y - s, r = e.width / 2, n = e.height / 2, l,
|
|
1679
|
-
return Math.abs(c) * r > Math.abs(i) * n ? (c < 0 && (n = -n), l = c === 0 ? 0 : n * i / c,
|
|
1680
|
-
}, "intersectRect"), ta = $r,
|
|
1673
|
+
g(se, "intersectPolygon");
|
|
1674
|
+
var $r = /* @__PURE__ */ g((e, t) => {
|
|
1675
|
+
var a = e.x, s = e.y, i = t.x - a, c = t.y - s, r = e.width / 2, n = e.height / 2, l, u;
|
|
1676
|
+
return Math.abs(c) * r > Math.abs(i) * n ? (c < 0 && (n = -n), l = c === 0 ? 0 : n * i / c, u = n) : (i < 0 && (r = -r), l = r, u = i === 0 ? 0 : r * c / i), { x: a + l, y: s + u };
|
|
1677
|
+
}, "intersectRect"), ta = $r, B = {
|
|
1681
1678
|
node: Zr,
|
|
1682
1679
|
circle: qr,
|
|
1683
|
-
ellipse:
|
|
1680
|
+
ellipse: ee,
|
|
1684
1681
|
polygon: Qr,
|
|
1685
1682
|
rect: ta
|
|
1686
|
-
},
|
|
1687
|
-
const i =
|
|
1683
|
+
}, A = /* @__PURE__ */ g(async (e, t, a, s) => {
|
|
1684
|
+
const i = R();
|
|
1688
1685
|
let c;
|
|
1689
|
-
const r = t.useHtmlLabels ||
|
|
1686
|
+
const r = t.useHtmlLabels || M(i);
|
|
1690
1687
|
a ? c = a : c = "node default";
|
|
1691
1688
|
const n = e.insert("g").attr("class", c).attr("id", t.domId || t.id), l = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1692
|
-
let
|
|
1693
|
-
t.labelText === void 0 ?
|
|
1689
|
+
let u;
|
|
1690
|
+
t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1694
1691
|
let h;
|
|
1695
|
-
t.labelType === "markdown" ? h =
|
|
1692
|
+
t.labelType === "markdown" ? h = kt(
|
|
1696
1693
|
l,
|
|
1697
|
-
Ot(
|
|
1694
|
+
Ct(Ot(u), i),
|
|
1698
1695
|
{
|
|
1699
1696
|
useHtmlLabels: r,
|
|
1700
1697
|
width: t.width || i.flowchart.wrappingWidth,
|
|
1701
1698
|
classes: "markdown-node-label"
|
|
1702
1699
|
},
|
|
1703
1700
|
i
|
|
1704
|
-
) : h = await
|
|
1701
|
+
) : h = await K(
|
|
1705
1702
|
l,
|
|
1706
|
-
Ot(
|
|
1703
|
+
Ct(Ot(u), i),
|
|
1707
1704
|
t.labelStyle,
|
|
1708
1705
|
!1,
|
|
1709
1706
|
s
|
|
1710
1707
|
);
|
|
1711
|
-
let
|
|
1712
|
-
const
|
|
1713
|
-
if (
|
|
1714
|
-
const
|
|
1715
|
-
await Ge(
|
|
1716
|
-
}
|
|
1717
|
-
return r ? l.attr("transform", "translate(" + -
|
|
1718
|
-
}, "labelHelper"),
|
|
1708
|
+
let d = h.getBBox();
|
|
1709
|
+
const b = t.padding / 2;
|
|
1710
|
+
if (M(i)) {
|
|
1711
|
+
const w = h.children[0], y = D(h);
|
|
1712
|
+
await Ge(w, u), d = w.getBoundingClientRect(), y.attr("width", d.width), y.attr("height", d.height);
|
|
1713
|
+
}
|
|
1714
|
+
return r ? l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")") : l.attr("transform", "translate(0, " + -d.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -d.width / 2 + ", " + -d.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: n, bbox: d, halfPadding: b, label: l };
|
|
1715
|
+
}, "labelHelper"), I = /* @__PURE__ */ g((e, t) => {
|
|
1719
1716
|
const a = t.node().getBBox();
|
|
1720
1717
|
e.width = a.width, e.height = a.height;
|
|
1721
1718
|
}, "updateNodeBounds");
|
|
1722
|
-
function
|
|
1719
|
+
function X(e, t, a, s) {
|
|
1723
1720
|
return e.insert("polygon", ":first-child").attr(
|
|
1724
1721
|
"points",
|
|
1725
1722
|
s.map(function(i) {
|
|
@@ -1727,27 +1724,27 @@ function Z(e, t, a, s) {
|
|
|
1727
1724
|
}).join(" ")
|
|
1728
1725
|
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
1729
1726
|
}
|
|
1730
|
-
|
|
1731
|
-
var ea = /* @__PURE__ */
|
|
1732
|
-
t.useHtmlLabels ||
|
|
1733
|
-
const { shapeSvg: s, bbox: i, halfPadding: c } = await
|
|
1727
|
+
g(X, "insertPolygonShape");
|
|
1728
|
+
var ea = /* @__PURE__ */ g(async (e, t) => {
|
|
1729
|
+
t.useHtmlLabels || M(R()) || (t.centerLabel = !0);
|
|
1730
|
+
const { shapeSvg: s, bbox: i, halfPadding: c } = await A(
|
|
1734
1731
|
e,
|
|
1735
1732
|
t,
|
|
1736
1733
|
"node " + t.classes,
|
|
1737
1734
|
!0
|
|
1738
1735
|
);
|
|
1739
|
-
|
|
1736
|
+
k.info("Classes = ", t.classes);
|
|
1740
1737
|
const r = s.insert("rect", ":first-child");
|
|
1741
|
-
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - c).attr("y", -i.height / 2 - c).attr("width", i.width + t.padding).attr("height", i.height + t.padding),
|
|
1742
|
-
return
|
|
1738
|
+
return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - c).attr("y", -i.height / 2 - c).attr("width", i.width + t.padding).attr("height", i.height + t.padding), I(t, r), t.intersect = function(n) {
|
|
1739
|
+
return B.rect(t, n);
|
|
1743
1740
|
}, s;
|
|
1744
|
-
}, "note"), ra = ea,
|
|
1741
|
+
}, "note"), ra = ea, Ft = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Ft(e.classes)} ${Ft(
|
|
1745
1742
|
e.class
|
|
1746
|
-
)}`, "getClassesFromNode"),
|
|
1747
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1743
|
+
)}`, "getClassesFromNode"), Wt = /* @__PURE__ */ g(async (e, t) => {
|
|
1744
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1748
1745
|
e,
|
|
1749
1746
|
t,
|
|
1750
|
-
|
|
1747
|
+
Y(t, void 0),
|
|
1751
1748
|
!0
|
|
1752
1749
|
), i = s.width + t.padding, c = s.height + t.padding, r = i + c, n = [
|
|
1753
1750
|
{ x: r / 2, y: 0 },
|
|
@@ -1755,12 +1752,12 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
|
|
|
1755
1752
|
{ x: r / 2, y: -r },
|
|
1756
1753
|
{ x: 0, y: -r / 2 }
|
|
1757
1754
|
];
|
|
1758
|
-
|
|
1759
|
-
const l =
|
|
1760
|
-
return l.attr("style", t.style),
|
|
1761
|
-
return
|
|
1755
|
+
k.info("Question main (Circle)");
|
|
1756
|
+
const l = X(a, r, r, n);
|
|
1757
|
+
return l.attr("style", t.style), I(t, l), t.intersect = function(u) {
|
|
1758
|
+
return k.warn("Intersect called"), B.polygon(t, n, u);
|
|
1762
1759
|
}, a;
|
|
1763
|
-
}, "question"), aa = /* @__PURE__ */
|
|
1760
|
+
}, "question"), aa = /* @__PURE__ */ g((e, t) => {
|
|
1764
1761
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = 28, i = [
|
|
1765
1762
|
{ x: 0, y: s / 2 },
|
|
1766
1763
|
{ x: s / 2, y: 0 },
|
|
@@ -1773,13 +1770,13 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
|
|
|
1773
1770
|
return r.x + "," + r.y;
|
|
1774
1771
|
}).join(" ")
|
|
1775
1772
|
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
|
|
1776
|
-
return
|
|
1773
|
+
return B.circle(t, 14, r);
|
|
1777
1774
|
}, a;
|
|
1778
|
-
}, "choice"), sa = /* @__PURE__ */
|
|
1779
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1775
|
+
}, "choice"), sa = /* @__PURE__ */ g(async (e, t) => {
|
|
1776
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1780
1777
|
e,
|
|
1781
1778
|
t,
|
|
1782
|
-
|
|
1779
|
+
Y(t, void 0),
|
|
1783
1780
|
!0
|
|
1784
1781
|
), i = 4, c = t.positioned ? t.height : s.height + t.padding, r = c / i, n = t.positioned ? t.width : s.width + 2 * r + t.padding, l = [
|
|
1785
1782
|
{ x: r, y: 0 },
|
|
@@ -1788,20 +1785,20 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
|
|
|
1788
1785
|
{ x: n - r, y: -c },
|
|
1789
1786
|
{ x: r, y: -c },
|
|
1790
1787
|
{ x: 0, y: -c / 2 }
|
|
1791
|
-
],
|
|
1792
|
-
return
|
|
1793
|
-
return
|
|
1788
|
+
], u = X(a, n, c, l);
|
|
1789
|
+
return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
|
|
1790
|
+
return B.polygon(t, l, h);
|
|
1794
1791
|
}, a;
|
|
1795
|
-
}, "hexagon"), ia = /* @__PURE__ */
|
|
1796
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1797
|
-
return
|
|
1798
|
-
return
|
|
1792
|
+
}, "hexagon"), ia = /* @__PURE__ */ g(async (e, t) => {
|
|
1793
|
+
const { shapeSvg: a, bbox: s } = await A(e, t, void 0, !0), i = 2, c = s.height + 2 * t.padding, r = c / i, n = s.width + 2 * r + t.padding, u = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > n ? t.width : n, h = Gr(t.directions, s, t, u), d = X(a, u, c, h);
|
|
1794
|
+
return d.attr("style", t.style), I(t, d), t.intersect = function(b) {
|
|
1795
|
+
return B.polygon(t, h, b);
|
|
1799
1796
|
}, a;
|
|
1800
|
-
}, "block_arrow"), na = /* @__PURE__ */
|
|
1801
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1797
|
+
}, "block_arrow"), na = /* @__PURE__ */ g(async (e, t) => {
|
|
1798
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1802
1799
|
e,
|
|
1803
1800
|
t,
|
|
1804
|
-
|
|
1801
|
+
Y(t, void 0),
|
|
1805
1802
|
!0
|
|
1806
1803
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1807
1804
|
{ x: -c / 2, y: 0 },
|
|
@@ -1810,69 +1807,69 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
|
|
|
1810
1807
|
{ x: -c / 2, y: -c },
|
|
1811
1808
|
{ x: 0, y: -c / 2 }
|
|
1812
1809
|
];
|
|
1813
|
-
return
|
|
1814
|
-
return
|
|
1810
|
+
return X(a, i, c, r).attr("style", t.style), t.width = i + c, t.height = c, t.intersect = function(l) {
|
|
1811
|
+
return B.polygon(t, r, l);
|
|
1815
1812
|
}, a;
|
|
1816
|
-
}, "rect_left_inv_arrow"), ca = /* @__PURE__ */
|
|
1817
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1813
|
+
}, "rect_left_inv_arrow"), ca = /* @__PURE__ */ g(async (e, t) => {
|
|
1814
|
+
const { shapeSvg: a, bbox: s } = await A(e, t, Y(t), !0), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1818
1815
|
{ x: -2 * c / 6, y: 0 },
|
|
1819
1816
|
{ x: i - c / 6, y: 0 },
|
|
1820
1817
|
{ x: i + 2 * c / 6, y: -c },
|
|
1821
1818
|
{ x: c / 6, y: -c }
|
|
1822
|
-
], n =
|
|
1823
|
-
return n.attr("style", t.style),
|
|
1824
|
-
return
|
|
1819
|
+
], n = X(a, i, c, r);
|
|
1820
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1821
|
+
return B.polygon(t, r, l);
|
|
1825
1822
|
}, a;
|
|
1826
|
-
}, "lean_right"), la = /* @__PURE__ */
|
|
1827
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1823
|
+
}, "lean_right"), la = /* @__PURE__ */ g(async (e, t) => {
|
|
1824
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1828
1825
|
e,
|
|
1829
1826
|
t,
|
|
1830
|
-
|
|
1827
|
+
Y(t, void 0),
|
|
1831
1828
|
!0
|
|
1832
1829
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1833
1830
|
{ x: 2 * c / 6, y: 0 },
|
|
1834
1831
|
{ x: i + c / 6, y: 0 },
|
|
1835
1832
|
{ x: i - 2 * c / 6, y: -c },
|
|
1836
1833
|
{ x: -c / 6, y: -c }
|
|
1837
|
-
], n =
|
|
1838
|
-
return n.attr("style", t.style),
|
|
1839
|
-
return
|
|
1834
|
+
], n = X(a, i, c, r);
|
|
1835
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1836
|
+
return B.polygon(t, r, l);
|
|
1840
1837
|
}, a;
|
|
1841
|
-
}, "lean_left"), oa = /* @__PURE__ */
|
|
1842
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1838
|
+
}, "lean_left"), oa = /* @__PURE__ */ g(async (e, t) => {
|
|
1839
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1843
1840
|
e,
|
|
1844
1841
|
t,
|
|
1845
|
-
|
|
1842
|
+
Y(t, void 0),
|
|
1846
1843
|
!0
|
|
1847
1844
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1848
1845
|
{ x: -2 * c / 6, y: 0 },
|
|
1849
1846
|
{ x: i + 2 * c / 6, y: 0 },
|
|
1850
1847
|
{ x: i - c / 6, y: -c },
|
|
1851
1848
|
{ x: c / 6, y: -c }
|
|
1852
|
-
], n =
|
|
1853
|
-
return n.attr("style", t.style),
|
|
1854
|
-
return
|
|
1849
|
+
], n = X(a, i, c, r);
|
|
1850
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1851
|
+
return B.polygon(t, r, l);
|
|
1855
1852
|
}, a;
|
|
1856
|
-
}, "trapezoid"), ha = /* @__PURE__ */
|
|
1857
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1853
|
+
}, "trapezoid"), ha = /* @__PURE__ */ g(async (e, t) => {
|
|
1854
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1858
1855
|
e,
|
|
1859
1856
|
t,
|
|
1860
|
-
|
|
1857
|
+
Y(t, void 0),
|
|
1861
1858
|
!0
|
|
1862
1859
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1863
1860
|
{ x: c / 6, y: 0 },
|
|
1864
1861
|
{ x: i - c / 6, y: 0 },
|
|
1865
1862
|
{ x: i + 2 * c / 6, y: -c },
|
|
1866
1863
|
{ x: -2 * c / 6, y: -c }
|
|
1867
|
-
], n =
|
|
1868
|
-
return n.attr("style", t.style),
|
|
1869
|
-
return
|
|
1864
|
+
], n = X(a, i, c, r);
|
|
1865
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1866
|
+
return B.polygon(t, r, l);
|
|
1870
1867
|
}, a;
|
|
1871
|
-
}, "inv_trapezoid"), ga = /* @__PURE__ */
|
|
1872
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1868
|
+
}, "inv_trapezoid"), ga = /* @__PURE__ */ g(async (e, t) => {
|
|
1869
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1873
1870
|
e,
|
|
1874
1871
|
t,
|
|
1875
|
-
|
|
1872
|
+
Y(t, void 0),
|
|
1876
1873
|
!0
|
|
1877
1874
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1878
1875
|
{ x: 0, y: 0 },
|
|
@@ -1880,156 +1877,156 @@ var ea = /* @__PURE__ */ u(async (e, t) => {
|
|
|
1880
1877
|
{ x: i, y: -c / 2 },
|
|
1881
1878
|
{ x: i + c / 2, y: -c },
|
|
1882
1879
|
{ x: 0, y: -c }
|
|
1883
|
-
], n =
|
|
1884
|
-
return n.attr("style", t.style),
|
|
1885
|
-
return
|
|
1880
|
+
], n = X(a, i, c, r);
|
|
1881
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1882
|
+
return B.polygon(t, r, l);
|
|
1886
1883
|
}, a;
|
|
1887
|
-
}, "rect_right_inv_arrow"), ua = /* @__PURE__ */
|
|
1888
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1884
|
+
}, "rect_right_inv_arrow"), ua = /* @__PURE__ */ g(async (e, t) => {
|
|
1885
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1889
1886
|
e,
|
|
1890
1887
|
t,
|
|
1891
|
-
|
|
1888
|
+
Y(t, void 0),
|
|
1892
1889
|
!0
|
|
1893
|
-
), i = s.width + t.padding, c = i / 2, r = c / (2.5 + i / 50), n = s.height + r + t.padding, l = "M 0," + r + " a " + c + "," + r + " 0,0,0 " + i + " 0 a " + c + "," + r + " 0,0,0 " + -i + " 0 l 0," + n + " a " + c + "," + r + " 0,0,0 " + i + " 0 l 0," + -n,
|
|
1894
|
-
return
|
|
1895
|
-
const
|
|
1896
|
-
if (c != 0 && (Math.abs(
|
|
1897
|
-
let
|
|
1898
|
-
|
|
1890
|
+
), i = s.width + t.padding, c = i / 2, r = c / (2.5 + i / 50), n = s.height + r + t.padding, l = "M 0," + r + " a " + c + "," + r + " 0,0,0 " + i + " 0 a " + c + "," + r + " 0,0,0 " + -i + " 0 l 0," + n + " a " + c + "," + r + " 0,0,0 " + i + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", l).attr("transform", "translate(" + -i / 2 + "," + -(n / 2 + r) + ")");
|
|
1891
|
+
return I(t, u), t.intersect = function(h) {
|
|
1892
|
+
const d = B.rect(t, h), b = d.x - t.x;
|
|
1893
|
+
if (c != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(d.y - t.y) > t.height / 2 - r)) {
|
|
1894
|
+
let w = r * r * (1 - b * b / (c * c));
|
|
1895
|
+
w != 0 && (w = Math.sqrt(w)), w = r - w, h.y - t.y > 0 && (w = -w), d.y += w;
|
|
1899
1896
|
}
|
|
1900
|
-
return
|
|
1897
|
+
return d;
|
|
1901
1898
|
}, a;
|
|
1902
|
-
}, "cylinder"), da = /* @__PURE__ */
|
|
1903
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
1899
|
+
}, "cylinder"), da = /* @__PURE__ */ g(async (e, t) => {
|
|
1900
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
1904
1901
|
e,
|
|
1905
1902
|
t,
|
|
1906
1903
|
"node " + t.classes + " " + t.class,
|
|
1907
1904
|
!0
|
|
1908
|
-
), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i,
|
|
1909
|
-
if (c.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y",
|
|
1905
|
+
), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, u = t.positioned ? -n / 2 : -s.height / 2 - i;
|
|
1906
|
+
if (c.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1910
1907
|
const h = new Set(Object.keys(t.props));
|
|
1911
|
-
t.props.borders && (
|
|
1912
|
-
|
|
1908
|
+
t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
|
|
1909
|
+
k.warn(`Unknown node property ${d}`);
|
|
1913
1910
|
});
|
|
1914
1911
|
}
|
|
1915
|
-
return
|
|
1916
|
-
return
|
|
1912
|
+
return I(t, c), t.intersect = function(h) {
|
|
1913
|
+
return B.rect(t, h);
|
|
1917
1914
|
}, a;
|
|
1918
|
-
}, "rect"), fa = /* @__PURE__ */
|
|
1919
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
1915
|
+
}, "rect"), fa = /* @__PURE__ */ g(async (e, t) => {
|
|
1916
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
1920
1917
|
e,
|
|
1921
1918
|
t,
|
|
1922
1919
|
"node " + t.classes,
|
|
1923
1920
|
!0
|
|
1924
|
-
), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i,
|
|
1925
|
-
if (c.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y",
|
|
1921
|
+
), c = a.insert("rect", ":first-child"), r = t.positioned ? t.width : s.width + t.padding, n = t.positioned ? t.height : s.height + t.padding, l = t.positioned ? -r / 2 : -s.width / 2 - i, u = t.positioned ? -n / 2 : -s.height / 2 - i;
|
|
1922
|
+
if (c.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1926
1923
|
const h = new Set(Object.keys(t.props));
|
|
1927
|
-
t.props.borders && (
|
|
1928
|
-
|
|
1924
|
+
t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
|
|
1925
|
+
k.warn(`Unknown node property ${d}`);
|
|
1929
1926
|
});
|
|
1930
1927
|
}
|
|
1931
|
-
return
|
|
1932
|
-
return
|
|
1928
|
+
return I(t, c), t.intersect = function(h) {
|
|
1929
|
+
return B.rect(t, h);
|
|
1933
1930
|
}, a;
|
|
1934
|
-
}, "composite"), pa = /* @__PURE__ */
|
|
1935
|
-
const { shapeSvg: a } = await
|
|
1936
|
-
|
|
1931
|
+
}, "composite"), pa = /* @__PURE__ */ g(async (e, t) => {
|
|
1932
|
+
const { shapeSvg: a } = await A(e, t, "label", !0);
|
|
1933
|
+
k.trace("Classes = ", t.class);
|
|
1937
1934
|
const s = a.insert("rect", ":first-child"), i = 0, c = 0;
|
|
1938
1935
|
if (s.attr("width", i).attr("height", c), a.attr("class", "label edgeLabel"), t.props) {
|
|
1939
1936
|
const r = new Set(Object.keys(t.props));
|
|
1940
|
-
t.props.borders && (
|
|
1941
|
-
|
|
1937
|
+
t.props.borders && (ot(s, t.props.borders, i, c), r.delete("borders")), r.forEach((n) => {
|
|
1938
|
+
k.warn(`Unknown node property ${n}`);
|
|
1942
1939
|
});
|
|
1943
1940
|
}
|
|
1944
|
-
return
|
|
1945
|
-
return
|
|
1941
|
+
return I(t, s), t.intersect = function(r) {
|
|
1942
|
+
return B.rect(t, r);
|
|
1946
1943
|
}, a;
|
|
1947
1944
|
}, "labelRect");
|
|
1948
|
-
function
|
|
1949
|
-
const i = [], c = /* @__PURE__ */
|
|
1945
|
+
function ot(e, t, a, s) {
|
|
1946
|
+
const i = [], c = /* @__PURE__ */ g((n) => {
|
|
1950
1947
|
i.push(n, 0);
|
|
1951
|
-
}, "addBorder"), r = /* @__PURE__ */
|
|
1948
|
+
}, "addBorder"), r = /* @__PURE__ */ g((n) => {
|
|
1952
1949
|
i.push(0, n);
|
|
1953
1950
|
}, "skipBorder");
|
|
1954
|
-
t.includes("t") ? (
|
|
1951
|
+
t.includes("t") ? (k.debug("add top border"), c(a)) : r(a), t.includes("r") ? (k.debug("add right border"), c(s)) : r(s), t.includes("b") ? (k.debug("add bottom border"), c(a)) : r(a), t.includes("l") ? (k.debug("add left border"), c(s)) : r(s), e.attr("stroke-dasharray", i.join(" "));
|
|
1955
1952
|
}
|
|
1956
|
-
|
|
1957
|
-
var
|
|
1953
|
+
g(ot, "applyNodePropertyBorders");
|
|
1954
|
+
var xa = /* @__PURE__ */ g(async (e, t) => {
|
|
1958
1955
|
let a;
|
|
1959
1956
|
t.classes ? a = "node " + t.classes : a = "node default";
|
|
1960
1957
|
const s = e.insert("g").attr("class", a).attr("id", t.domId || t.id), i = s.insert("rect", ":first-child"), c = s.insert("line"), r = s.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1961
1958
|
let l = "";
|
|
1962
|
-
typeof n == "object" ? l = n[0] : l = n,
|
|
1963
|
-
const
|
|
1959
|
+
typeof n == "object" ? l = n[0] : l = n, k.info("Label text abc79", l, n, typeof n == "object");
|
|
1960
|
+
const u = await K(r, l, t.labelStyle, !0, !0);
|
|
1964
1961
|
let h = { width: 0, height: 0 };
|
|
1965
|
-
if (
|
|
1966
|
-
const
|
|
1967
|
-
h =
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
const
|
|
1971
|
-
let
|
|
1972
|
-
const
|
|
1962
|
+
if (M(R())) {
|
|
1963
|
+
const v = u.children[0], S = D(u);
|
|
1964
|
+
h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
|
|
1965
|
+
}
|
|
1966
|
+
k.info("Text 2", n);
|
|
1967
|
+
const d = n.slice(1, n.length);
|
|
1968
|
+
let b = u.getBBox();
|
|
1969
|
+
const w = await K(
|
|
1973
1970
|
r,
|
|
1974
|
-
|
|
1971
|
+
d.join ? d.join("<br/>") : d,
|
|
1975
1972
|
t.labelStyle,
|
|
1976
1973
|
!0,
|
|
1977
1974
|
!0
|
|
1978
1975
|
);
|
|
1979
|
-
if (
|
|
1980
|
-
const
|
|
1981
|
-
h =
|
|
1976
|
+
if (M(R())) {
|
|
1977
|
+
const v = w.children[0], S = D(w);
|
|
1978
|
+
h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
|
|
1982
1979
|
}
|
|
1983
|
-
const
|
|
1984
|
-
return
|
|
1980
|
+
const y = t.padding / 2;
|
|
1981
|
+
return D(w).attr(
|
|
1985
1982
|
"transform",
|
|
1986
1983
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1987
|
-
(h.width >
|
|
1988
|
-
),
|
|
1984
|
+
(h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + y + 5) + ")"
|
|
1985
|
+
), D(u).attr(
|
|
1989
1986
|
"transform",
|
|
1990
1987
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1991
|
-
(h.width <
|
|
1988
|
+
(h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
|
|
1992
1989
|
), h = r.node().getBBox(), r.attr(
|
|
1993
1990
|
"transform",
|
|
1994
|
-
"translate(" + -h.width / 2 + ", " + (-h.height / 2 -
|
|
1995
|
-
), i.attr("class", "outer title-state").attr("x", -h.width / 2 -
|
|
1996
|
-
return
|
|
1991
|
+
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - y + 3) + ")"
|
|
1992
|
+
), i.attr("class", "outer title-state").attr("x", -h.width / 2 - y).attr("y", -h.height / 2 - y).attr("width", h.width + t.padding).attr("height", h.height + t.padding), c.attr("class", "divider").attr("x1", -h.width / 2 - y).attr("x2", h.width / 2 + y).attr("y1", -h.height / 2 - y + b.height + y).attr("y2", -h.height / 2 - y + b.height + y), I(t, i), t.intersect = function(v) {
|
|
1993
|
+
return B.rect(t, v);
|
|
1997
1994
|
}, s;
|
|
1998
|
-
}, "rectWithTitle"),
|
|
1999
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1995
|
+
}, "rectWithTitle"), ya = /* @__PURE__ */ g(async (e, t) => {
|
|
1996
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
2000
1997
|
e,
|
|
2001
1998
|
t,
|
|
2002
|
-
|
|
1999
|
+
Y(t, void 0),
|
|
2003
2000
|
!0
|
|
2004
2001
|
), i = s.height + t.padding, c = s.width + i / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -c / 2).attr("y", -i / 2).attr("width", c).attr("height", i);
|
|
2005
|
-
return
|
|
2006
|
-
return
|
|
2002
|
+
return I(t, r), t.intersect = function(n) {
|
|
2003
|
+
return B.rect(t, n);
|
|
2007
2004
|
}, a;
|
|
2008
|
-
}, "stadium"), ba = /* @__PURE__ */
|
|
2009
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
2005
|
+
}, "stadium"), ba = /* @__PURE__ */ g(async (e, t) => {
|
|
2006
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
2010
2007
|
e,
|
|
2011
2008
|
t,
|
|
2012
|
-
|
|
2009
|
+
Y(t, void 0),
|
|
2013
2010
|
!0
|
|
2014
2011
|
), c = a.insert("circle", ":first-child");
|
|
2015
|
-
return c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding),
|
|
2016
|
-
return
|
|
2012
|
+
return c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), k.info("Circle main"), I(t, c), t.intersect = function(r) {
|
|
2013
|
+
return k.info("Circle intersect", t, s.width / 2 + i, r), B.circle(t, s.width / 2 + i, r);
|
|
2017
2014
|
}, a;
|
|
2018
|
-
}, "circle"), wa = /* @__PURE__ */
|
|
2019
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
2015
|
+
}, "circle"), wa = /* @__PURE__ */ g(async (e, t) => {
|
|
2016
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
2020
2017
|
e,
|
|
2021
2018
|
t,
|
|
2022
|
-
|
|
2019
|
+
Y(t, void 0),
|
|
2023
2020
|
!0
|
|
2024
2021
|
), c = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), l = r.insert("circle");
|
|
2025
|
-
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i + c).attr("width", s.width + t.padding + c * 2).attr("height", s.height + t.padding + c * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding),
|
|
2026
|
-
return
|
|
2022
|
+
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i + c).attr("width", s.width + t.padding + c * 2).attr("height", s.height + t.padding + c * 2), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + i).attr("width", s.width + t.padding).attr("height", s.height + t.padding), k.info("DoubleCircle main"), I(t, n), t.intersect = function(u) {
|
|
2023
|
+
return k.info("DoubleCircle intersect", t, s.width / 2 + i + c, u), B.circle(t, s.width / 2 + i + c, u);
|
|
2027
2024
|
}, a;
|
|
2028
|
-
}, "doublecircle"), ma = /* @__PURE__ */
|
|
2029
|
-
const { shapeSvg: a, bbox: s } = await
|
|
2025
|
+
}, "doublecircle"), ma = /* @__PURE__ */ g(async (e, t) => {
|
|
2026
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
2030
2027
|
e,
|
|
2031
2028
|
t,
|
|
2032
|
-
|
|
2029
|
+
Y(t, void 0),
|
|
2033
2030
|
!0
|
|
2034
2031
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
2035
2032
|
{ x: 0, y: 0 },
|
|
@@ -2042,142 +2039,141 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
|
|
|
2042
2039
|
{ x: i + 8, y: -c },
|
|
2043
2040
|
{ x: -8, y: -c },
|
|
2044
2041
|
{ x: -8, y: 0 }
|
|
2045
|
-
], n =
|
|
2046
|
-
return n.attr("style", t.style),
|
|
2047
|
-
return
|
|
2042
|
+
], n = X(a, i, c, r);
|
|
2043
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
2044
|
+
return B.polygon(t, r, l);
|
|
2048
2045
|
}, a;
|
|
2049
|
-
}, "subroutine"), Sa = /* @__PURE__ */
|
|
2046
|
+
}, "subroutine"), Sa = /* @__PURE__ */ g((e, t) => {
|
|
2050
2047
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child");
|
|
2051
|
-
return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14),
|
|
2052
|
-
return
|
|
2048
|
+
return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, s), t.intersect = function(i) {
|
|
2049
|
+
return B.circle(t, 7, i);
|
|
2053
2050
|
}, a;
|
|
2054
|
-
}, "start"),
|
|
2051
|
+
}, "start"), Yt = /* @__PURE__ */ g((e, t, a) => {
|
|
2055
2052
|
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2056
2053
|
let i = 70, c = 10;
|
|
2057
2054
|
a === "LR" && (i = 10, c = 70);
|
|
2058
2055
|
const r = s.append("rect").attr("x", -1 * i / 2).attr("y", -1 * c / 2).attr("width", i).attr("height", c).attr("class", "fork-join");
|
|
2059
|
-
return
|
|
2060
|
-
return
|
|
2056
|
+
return I(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
2057
|
+
return B.rect(t, n);
|
|
2061
2058
|
}, s;
|
|
2062
|
-
}, "forkJoin"), La = /* @__PURE__ */
|
|
2059
|
+
}, "forkJoin"), La = /* @__PURE__ */ g((e, t) => {
|
|
2063
2060
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child"), i = a.insert("circle", ":first-child");
|
|
2064
|
-
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), s.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10),
|
|
2065
|
-
return
|
|
2061
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), s.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), I(t, i), t.intersect = function(c) {
|
|
2062
|
+
return B.circle(t, 7, c);
|
|
2066
2063
|
}, a;
|
|
2067
|
-
}, "end"),
|
|
2068
|
-
var D;
|
|
2064
|
+
}, "end"), ka = /* @__PURE__ */ g(async (e, t) => {
|
|
2069
2065
|
const a = t.padding / 2, s = 4, i = 8;
|
|
2070
2066
|
let c;
|
|
2071
2067
|
t.classes ? c = "node " + t.classes : c = "node default";
|
|
2072
|
-
const r = e.insert("g").attr("class", c).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), l = r.insert("line"),
|
|
2073
|
-
let h = 0,
|
|
2074
|
-
const
|
|
2075
|
-
let
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2078
|
-
|
|
2068
|
+
const r = e.insert("g").attr("class", c).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), l = r.insert("line"), u = r.insert("line");
|
|
2069
|
+
let h = 0, d = s;
|
|
2070
|
+
const b = r.insert("g").attr("class", "label");
|
|
2071
|
+
let w = 0;
|
|
2072
|
+
const y = t.classData.annotations?.[0], v = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", S = await K(
|
|
2073
|
+
b,
|
|
2074
|
+
v,
|
|
2079
2075
|
t.labelStyle,
|
|
2080
2076
|
!0,
|
|
2081
2077
|
!0
|
|
2082
2078
|
);
|
|
2083
|
-
let
|
|
2084
|
-
if (
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
}
|
|
2088
|
-
t.classData.annotations[0] && (
|
|
2089
|
-
let
|
|
2090
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2093
|
-
|
|
2079
|
+
let N = S.getBBox();
|
|
2080
|
+
if (M(R())) {
|
|
2081
|
+
const E = S.children[0], o = D(S);
|
|
2082
|
+
N = E.getBoundingClientRect(), o.attr("width", N.width), o.attr("height", N.height);
|
|
2083
|
+
}
|
|
2084
|
+
t.classData.annotations[0] && (d += N.height + s, h += N.width);
|
|
2085
|
+
let _ = t.classData.label;
|
|
2086
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (M(R()) ? _ += "<" + t.classData.type + ">" : _ += "<" + t.classData.type + ">");
|
|
2087
|
+
const T = await K(
|
|
2088
|
+
b,
|
|
2089
|
+
_,
|
|
2094
2090
|
t.labelStyle,
|
|
2095
2091
|
!0,
|
|
2096
2092
|
!0
|
|
2097
2093
|
);
|
|
2098
|
-
|
|
2099
|
-
let
|
|
2100
|
-
if (
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
const
|
|
2106
|
-
t.classData.members.forEach(async (
|
|
2107
|
-
const
|
|
2108
|
-
let
|
|
2109
|
-
|
|
2110
|
-
const
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2094
|
+
D(T).attr("class", "classTitle");
|
|
2095
|
+
let m = T.getBBox();
|
|
2096
|
+
if (M(R())) {
|
|
2097
|
+
const E = T.children[0], o = D(T);
|
|
2098
|
+
m = E.getBoundingClientRect(), o.attr("width", m.width), o.attr("height", m.height);
|
|
2099
|
+
}
|
|
2100
|
+
d += m.height + s, m.width > h && (h = m.width);
|
|
2101
|
+
const f = [];
|
|
2102
|
+
t.classData.members.forEach(async (E) => {
|
|
2103
|
+
const o = E.getDisplayDetails();
|
|
2104
|
+
let F = o.displayText;
|
|
2105
|
+
M(R()) && (F = F.replace(/</g, "<").replace(/>/g, ">"));
|
|
2106
|
+
const p = await K(
|
|
2107
|
+
b,
|
|
2108
|
+
F,
|
|
2109
|
+
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
2114
2110
|
!0,
|
|
2115
2111
|
!0
|
|
2116
2112
|
);
|
|
2117
|
-
let
|
|
2118
|
-
if (
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2113
|
+
let C = p.getBBox();
|
|
2114
|
+
if (M(R())) {
|
|
2115
|
+
const Z = p.children[0], V = D(p);
|
|
2116
|
+
C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
|
|
2121
2117
|
}
|
|
2122
|
-
|
|
2123
|
-
}),
|
|
2124
|
-
const
|
|
2125
|
-
if (t.classData.methods.forEach(async (
|
|
2126
|
-
const
|
|
2127
|
-
let
|
|
2128
|
-
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2118
|
+
C.width > h && (h = C.width), d += C.height + s, f.push(p);
|
|
2119
|
+
}), d += i;
|
|
2120
|
+
const x = [];
|
|
2121
|
+
if (t.classData.methods.forEach(async (E) => {
|
|
2122
|
+
const o = E.getDisplayDetails();
|
|
2123
|
+
let F = o.displayText;
|
|
2124
|
+
M(R()) && (F = F.replace(/</g, "<").replace(/>/g, ">"));
|
|
2125
|
+
const p = await K(
|
|
2126
|
+
b,
|
|
2127
|
+
F,
|
|
2128
|
+
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
2133
2129
|
!0,
|
|
2134
2130
|
!0
|
|
2135
2131
|
);
|
|
2136
|
-
let
|
|
2137
|
-
if (
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2132
|
+
let C = p.getBBox();
|
|
2133
|
+
if (M(R())) {
|
|
2134
|
+
const Z = p.children[0], V = D(p);
|
|
2135
|
+
C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
|
|
2140
2136
|
}
|
|
2141
|
-
|
|
2142
|
-
}),
|
|
2143
|
-
let
|
|
2144
|
-
|
|
2137
|
+
C.width > h && (h = C.width), d += C.height + s, x.push(p);
|
|
2138
|
+
}), d += i, y) {
|
|
2139
|
+
let E = (h - N.width) / 2;
|
|
2140
|
+
D(S).attr(
|
|
2145
2141
|
"transform",
|
|
2146
|
-
"translate( " + (-1 * h / 2 +
|
|
2147
|
-
),
|
|
2142
|
+
"translate( " + (-1 * h / 2 + E) + ", " + -1 * d / 2 + ")"
|
|
2143
|
+
), w = N.height + s;
|
|
2148
2144
|
}
|
|
2149
|
-
let
|
|
2150
|
-
return
|
|
2145
|
+
let L = (h - m.width) / 2;
|
|
2146
|
+
return D(T).attr(
|
|
2151
2147
|
"transform",
|
|
2152
|
-
"translate( " + (-1 * h / 2 +
|
|
2153
|
-
),
|
|
2154
|
-
|
|
2148
|
+
"translate( " + (-1 * h / 2 + L) + ", " + (-1 * d / 2 + w) + ")"
|
|
2149
|
+
), w += m.height + s, l.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -d / 2 - a + i + w).attr("y2", -d / 2 - a + i + w), w += i, f.forEach((E) => {
|
|
2150
|
+
D(E).attr(
|
|
2155
2151
|
"transform",
|
|
2156
|
-
"translate( " + -h / 2 + ", " + (-1 *
|
|
2152
|
+
"translate( " + -h / 2 + ", " + (-1 * d / 2 + w + i / 2) + ")"
|
|
2157
2153
|
);
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
}),
|
|
2161
|
-
|
|
2154
|
+
const o = E?.getBBox();
|
|
2155
|
+
w += (o?.height ?? 0) + s;
|
|
2156
|
+
}), w += i, u.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -d / 2 - a + i + w).attr("y2", -d / 2 - a + i + w), w += i, x.forEach((E) => {
|
|
2157
|
+
D(E).attr(
|
|
2162
2158
|
"transform",
|
|
2163
|
-
"translate( " + -h / 2 + ", " + (-1 *
|
|
2159
|
+
"translate( " + -h / 2 + ", " + (-1 * d / 2 + w) + ")"
|
|
2164
2160
|
);
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2167
|
-
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(
|
|
2168
|
-
return
|
|
2161
|
+
const o = E?.getBBox();
|
|
2162
|
+
w += (o?.height ?? 0) + s;
|
|
2163
|
+
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(d / 2) - a).attr("width", h + t.padding).attr("height", d + t.padding), I(t, n), t.intersect = function(E) {
|
|
2164
|
+
return B.rect(t, E);
|
|
2169
2165
|
}, r;
|
|
2170
|
-
}, "class_box"),
|
|
2171
|
-
rhombus:
|
|
2166
|
+
}, "class_box"), Ht = {
|
|
2167
|
+
rhombus: Wt,
|
|
2172
2168
|
composite: fa,
|
|
2173
|
-
question:
|
|
2169
|
+
question: Wt,
|
|
2174
2170
|
rect: da,
|
|
2175
2171
|
labelRect: pa,
|
|
2176
|
-
rectWithTitle:
|
|
2172
|
+
rectWithTitle: xa,
|
|
2177
2173
|
choice: aa,
|
|
2178
2174
|
circle: ba,
|
|
2179
2175
|
doublecircle: wa,
|
|
2180
|
-
stadium:
|
|
2176
|
+
stadium: ya,
|
|
2181
2177
|
hexagon: sa,
|
|
2182
2178
|
block_arrow: ia,
|
|
2183
2179
|
rect_left_inv_arrow: na,
|
|
@@ -2191,20 +2187,20 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
|
|
|
2191
2187
|
end: La,
|
|
2192
2188
|
note: ra,
|
|
2193
2189
|
subroutine: ma,
|
|
2194
|
-
fork:
|
|
2195
|
-
join:
|
|
2196
|
-
class_box:
|
|
2197
|
-
},
|
|
2190
|
+
fork: Yt,
|
|
2191
|
+
join: Yt,
|
|
2192
|
+
class_box: ka
|
|
2193
|
+
}, nt = {}, ie = /* @__PURE__ */ g(async (e, t, a) => {
|
|
2198
2194
|
let s, i;
|
|
2199
2195
|
if (t.link) {
|
|
2200
2196
|
let c;
|
|
2201
|
-
|
|
2197
|
+
R().securityLevel === "sandbox" ? c = "_top" : t.linkTarget && (c = t.linkTarget || "_blank"), s = e.insert("svg:a").attr("xlink:href", t.link).attr("target", c), i = await Ht[t.shape](s, t, a);
|
|
2202
2198
|
} else
|
|
2203
|
-
i = await
|
|
2204
|
-
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class),
|
|
2205
|
-
}, "insertNode"),
|
|
2206
|
-
const t =
|
|
2207
|
-
|
|
2199
|
+
i = await Ht[t.shape](e, t, a), s = i;
|
|
2200
|
+
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), nt[t.id] = s, t.haveCallback && nt[t.id].attr("class", nt[t.id].attr("class") + " clickable"), s;
|
|
2201
|
+
}, "insertNode"), va = /* @__PURE__ */ g((e) => {
|
|
2202
|
+
const t = nt[e.id];
|
|
2203
|
+
k.trace(
|
|
2208
2204
|
"Transforming node",
|
|
2209
2205
|
e.diff,
|
|
2210
2206
|
e,
|
|
@@ -2216,11 +2212,10 @@ var ya = /* @__PURE__ */ u(async (e, t) => {
|
|
|
2216
2212
|
"translate(" + (e.x + s - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
|
|
2217
2213
|
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), s;
|
|
2218
2214
|
}, "positionNode");
|
|
2219
|
-
function
|
|
2220
|
-
var x, S, _;
|
|
2215
|
+
function Bt(e, t, a = !1) {
|
|
2221
2216
|
const s = e;
|
|
2222
2217
|
let i = "default";
|
|
2223
|
-
(
|
|
2218
|
+
(s?.classes?.length || 0) > 0 && (i = (s?.classes ?? []).join(" ")), i = i + " flowchart-label";
|
|
2224
2219
|
let c = 0, r = "", n;
|
|
2225
2220
|
switch (s.type) {
|
|
2226
2221
|
case "round":
|
|
@@ -2283,17 +2278,17 @@ function It(e, t, a = !1) {
|
|
|
2283
2278
|
default:
|
|
2284
2279
|
r = "rect";
|
|
2285
2280
|
}
|
|
2286
|
-
const l = je(
|
|
2281
|
+
const l = je(s?.styles ?? []), u = s.label, h = s.size ?? { width: 0, height: 0, x: 0, y: 0 }, d = t.getDiagramId();
|
|
2287
2282
|
return {
|
|
2288
2283
|
labelStyle: l.labelStyle,
|
|
2289
2284
|
shape: r,
|
|
2290
|
-
labelText:
|
|
2285
|
+
labelText: u,
|
|
2291
2286
|
rx: c,
|
|
2292
2287
|
ry: c,
|
|
2293
2288
|
class: i,
|
|
2294
2289
|
style: l.style,
|
|
2295
2290
|
id: s.id,
|
|
2296
|
-
domId:
|
|
2291
|
+
domId: d ? `${d}-${s.id}` : s.id,
|
|
2297
2292
|
directions: s.directions,
|
|
2298
2293
|
width: h.width,
|
|
2299
2294
|
height: h.height,
|
|
@@ -2302,41 +2297,41 @@ function It(e, t, a = !1) {
|
|
|
2302
2297
|
positioned: a,
|
|
2303
2298
|
intersect: void 0,
|
|
2304
2299
|
type: s.type,
|
|
2305
|
-
padding: n ?? (
|
|
2300
|
+
padding: n ?? rt()?.block?.padding ?? 0,
|
|
2306
2301
|
widthInColumns: s.widthInColumns ?? 1
|
|
2307
2302
|
};
|
|
2308
2303
|
}
|
|
2309
|
-
|
|
2310
|
-
async function
|
|
2311
|
-
const s =
|
|
2304
|
+
g(Bt, "getNodeFromBlock");
|
|
2305
|
+
async function ne(e, t, a) {
|
|
2306
|
+
const s = Bt(t, a, !1);
|
|
2312
2307
|
if (s.type === "group")
|
|
2313
2308
|
return;
|
|
2314
|
-
const i =
|
|
2309
|
+
const i = rt(), c = await ie(e, s, { config: i }), r = c.node().getBBox(), n = a.getBlock(s.id);
|
|
2315
2310
|
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: c }, a.setBlock(n), c.remove();
|
|
2316
2311
|
}
|
|
2317
|
-
|
|
2318
|
-
async function
|
|
2319
|
-
const s =
|
|
2312
|
+
g(ne, "calculateBlockSize");
|
|
2313
|
+
async function ce(e, t, a) {
|
|
2314
|
+
const s = Bt(t, a, !0);
|
|
2320
2315
|
if (a.getBlock(s.id).type !== "space") {
|
|
2321
|
-
const c =
|
|
2322
|
-
await
|
|
2316
|
+
const c = rt();
|
|
2317
|
+
await ie(e, s, { config: c }), t.intersect = s?.intersect, va(s);
|
|
2323
2318
|
}
|
|
2324
2319
|
}
|
|
2325
|
-
|
|
2326
|
-
async function
|
|
2320
|
+
g(ce, "insertBlockPositioned");
|
|
2321
|
+
async function ht(e, t, a, s) {
|
|
2327
2322
|
for (const i of t)
|
|
2328
|
-
await s(e, i, a), i.children && await
|
|
2323
|
+
await s(e, i, a), i.children && await ht(e, i.children, a, s);
|
|
2329
2324
|
}
|
|
2330
|
-
|
|
2331
|
-
async function
|
|
2332
|
-
await
|
|
2325
|
+
g(ht, "performOperations");
|
|
2326
|
+
async function le(e, t, a) {
|
|
2327
|
+
await ht(e, t, a, ne);
|
|
2333
2328
|
}
|
|
2334
|
-
|
|
2335
|
-
async function
|
|
2336
|
-
await
|
|
2329
|
+
g(le, "calculateBlockSizes");
|
|
2330
|
+
async function oe(e, t, a) {
|
|
2331
|
+
await ht(e, t, a, ce);
|
|
2337
2332
|
}
|
|
2338
|
-
|
|
2339
|
-
async function
|
|
2333
|
+
g(oe, "insertBlocks");
|
|
2334
|
+
async function he(e, t, a, s, i) {
|
|
2340
2335
|
const c = new Ze({
|
|
2341
2336
|
multigraph: !0,
|
|
2342
2337
|
compound: !0
|
|
@@ -2357,22 +2352,22 @@ async function ge(e, t, a, s, i) {
|
|
|
2357
2352
|
for (const r of t)
|
|
2358
2353
|
if (r.start && r.end) {
|
|
2359
2354
|
const n = s.getBlock(r.start), l = s.getBlock(r.end);
|
|
2360
|
-
if (n
|
|
2361
|
-
const
|
|
2362
|
-
{ x:
|
|
2363
|
-
{ x:
|
|
2355
|
+
if (n?.size && l?.size) {
|
|
2356
|
+
const u = n.size, h = l.size, d = [
|
|
2357
|
+
{ x: u.x, y: u.y },
|
|
2358
|
+
{ x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
|
|
2364
2359
|
{ x: h.x, y: h.y }
|
|
2365
|
-
],
|
|
2360
|
+
], b = i ? `${i}-${r.id}` : r.id, w = r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal", y = r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid", v = `${w} ${y} flowchart-link LS-a1 LE-b1`;
|
|
2366
2361
|
Vr(
|
|
2367
2362
|
e,
|
|
2368
|
-
{ v: r.start, w: r.end, name:
|
|
2363
|
+
{ v: r.start, w: r.end, name: b },
|
|
2369
2364
|
{
|
|
2370
2365
|
...r,
|
|
2371
|
-
id:
|
|
2366
|
+
id: b,
|
|
2372
2367
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2373
2368
|
arrowTypeStart: r.arrowTypeStart,
|
|
2374
|
-
points:
|
|
2375
|
-
classes:
|
|
2369
|
+
points: d,
|
|
2370
|
+
classes: v
|
|
2376
2371
|
},
|
|
2377
2372
|
void 0,
|
|
2378
2373
|
"block",
|
|
@@ -2384,46 +2379,46 @@ async function ge(e, t, a, s, i) {
|
|
|
2384
2379
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2385
2380
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2386
2381
|
arrowTypeStart: r.arrowTypeStart,
|
|
2387
|
-
points:
|
|
2388
|
-
classes:
|
|
2382
|
+
points: d,
|
|
2383
|
+
classes: v
|
|
2389
2384
|
}), Kr(
|
|
2390
|
-
{ ...r, x:
|
|
2385
|
+
{ ...r, x: d[1].x, y: d[1].y },
|
|
2391
2386
|
{
|
|
2392
|
-
originalPath:
|
|
2387
|
+
originalPath: d
|
|
2393
2388
|
}
|
|
2394
2389
|
));
|
|
2395
2390
|
}
|
|
2396
2391
|
}
|
|
2397
2392
|
}
|
|
2398
|
-
|
|
2399
|
-
var
|
|
2393
|
+
g(he, "insertEdges");
|
|
2394
|
+
var Ea = /* @__PURE__ */ g(function(e, t) {
|
|
2400
2395
|
return t.db.getClasses();
|
|
2401
|
-
}, "getClasses"),
|
|
2402
|
-
const { securityLevel: i, block: c } =
|
|
2396
|
+
}, "getClasses"), _a = /* @__PURE__ */ g(async function(e, t, a, s) {
|
|
2397
|
+
const { securityLevel: i, block: c } = rt(), r = s.db;
|
|
2403
2398
|
r.setDiagramId(t);
|
|
2404
2399
|
let n;
|
|
2405
|
-
i === "sandbox" && (n =
|
|
2406
|
-
const l = i === "sandbox" ?
|
|
2407
|
-
Mr(
|
|
2408
|
-
const
|
|
2409
|
-
await
|
|
2410
|
-
const
|
|
2411
|
-
if (await
|
|
2412
|
-
const
|
|
2413
|
-
Pe(
|
|
2400
|
+
i === "sandbox" && (n = D("#i" + t));
|
|
2401
|
+
const l = i === "sandbox" ? D(n.nodes()[0].contentDocument.body) : D("body"), u = i === "sandbox" ? l.select(`[id="${t}"]`) : D(`[id="${t}"]`);
|
|
2402
|
+
Mr(u, ["point", "circle", "cross"], s.type, t);
|
|
2403
|
+
const d = r.getBlocks(), b = r.getBlocksFlat(), w = r.getEdges(), y = u.insert("g").attr("class", "block");
|
|
2404
|
+
await le(y, d, r);
|
|
2405
|
+
const v = Qt(r);
|
|
2406
|
+
if (await oe(y, d, r), await he(y, w, b, r, t), v) {
|
|
2407
|
+
const S = v, N = Math.max(1, Math.round(0.125 * (S.width / S.height))), _ = S.height + N + 10, T = S.width + 10, { useMaxWidth: m } = c;
|
|
2408
|
+
Pe(u, _, T, !!m), k.debug("Here Bounds", v, S), u.attr(
|
|
2414
2409
|
"viewBox",
|
|
2415
|
-
`${
|
|
2410
|
+
`${S.x - 5} ${S.y - 5} ${S.width + 10} ${S.height + 10}`
|
|
2416
2411
|
);
|
|
2417
2412
|
}
|
|
2418
2413
|
}, "draw"), Ta = {
|
|
2419
|
-
draw:
|
|
2420
|
-
getClasses:
|
|
2421
|
-
},
|
|
2414
|
+
draw: _a,
|
|
2415
|
+
getClasses: Ea
|
|
2416
|
+
}, Ca = {
|
|
2422
2417
|
parser: ar,
|
|
2423
|
-
db:
|
|
2418
|
+
db: kr,
|
|
2424
2419
|
renderer: Ta,
|
|
2425
|
-
styles:
|
|
2420
|
+
styles: Er
|
|
2426
2421
|
};
|
|
2427
2422
|
export {
|
|
2428
|
-
|
|
2423
|
+
Ca as diagram
|
|
2429
2424
|
};
|