@belonguniverseai/react-sdk 0.6.2 → 0.6.4
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/api/agent-grants.d.ts +23 -8
- package/dist/api/client.d.ts +53 -4
- package/dist/api/queries.d.ts +2 -0
- package/dist/app/call-summary.d.ts +30 -0
- package/dist/component/abnfDiagram-N423BO3Z-DR3fMT7g.js +90 -0
- package/dist/component/arc-DJkYOSuJ.js +86 -0
- package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-BIp4IBPk.js} +1872 -1785
- package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-BqryGqC6.js} +895 -894
- package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-GktlF-Di.js} +3 -3
- package/dist/component/{channel-CYFijF_t.js → channel-3CusDaXb.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-DMTs6j_c.js} +5 -5
- package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-CIU34hPH.js} +2 -2
- package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-Ds3vF1Mv.js} +399 -378
- package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-DGxDkIm6.js} +2 -2
- package/dist/component/chunk-6Q2QTUOP-BI8oZt98.js +673 -0
- package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-D-36xUd5.js} +244 -239
- package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-8N_wQ762.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-ChxxpkWc.js} +2 -2
- package/dist/component/chunk-RYQCIY6F-CSY-95OP.js +316 -0
- package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-BQd9yyE1.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-BOq63iUL.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-BOq63iUL.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-B9x8cp5w.js} +2 -2
- package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
- package/dist/component/cynefinDiagram-MW4NZA55-OF6l99SS.js +302 -0
- package/dist/component/dagre-VZM6K2ZE-CELO1hFb.js +343 -0
- package/dist/component/diagram-7IWD3JNH-COzvm6E2.js +353 -0
- package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DR9KMRGw.js} +24 -24
- package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-D47Zqm-k.js} +23 -23
- package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-Key1bw_Y.js} +197 -197
- package/dist/component/diagram-UB23O5K3-Cxf-sZnK.js +222 -0
- package/dist/component/ebnfDiagram-BXEA7PRR-C8uURt_x.js +112 -0
- package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-CpCxe8Ib.js} +142 -131
- package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-urFG2I71.js} +268 -258
- package/dist/component/ganttDiagram-PKOTCBZU-8nA9faYf.js +2714 -0
- package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-u4cbNW8o.js} +33 -33
- package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
- package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-Bo-15uvJ.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-ZAv4gZpA.js} +4 -4
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-CvB6evSz.js} +27 -27
- package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-M5BRYuPr.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-LL6GkmVe.js} +35 -35
- package/dist/component/layout-Br2UjHRU.js +1522 -0
- package/dist/component/{linear-BT4blD8s.js → linear-DVg61V66.js} +13 -13
- package/dist/component/map-CdwokNh2.js +227 -0
- package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-C2L7fCIM.js} +29577 -29128
- package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-BBZzsLh7.js} +26 -26
- package/dist/component/pegDiagram-VL7TDLO6-BEG86cY8.js +98 -0
- package/dist/component/pieDiagram-7S7Q4E2Y-BTkrNjAi.js +210 -0
- package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-BsjBAd4w.js} +14 -15
- package/dist/component/railroadDiagram-AXF67PYL-DuE0ZFxj.js +80 -0
- package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-CcshEEMy.js} +15 -15
- package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-CFn011ig.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-DmMZNJDw.js} +960 -963
- package/dist/component/sizeCapture-X5ZJPWSS-Ce4PhIAO.js +49 -0
- package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DDVzQKaO.js} +5 -5
- package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DeeW8PDA.js} +3 -3
- package/dist/component/swimlanes-SLNWSIFB-CZh2_vzg.js +5335 -0
- package/dist/component/swimlanesDiagram-ULZ7WXOC-Wb0Ri7qR.js +16 -0
- package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-rfiLwdTR.js} +15 -15
- package/dist/component/vennDiagram-T6HMQDX7-D8l7hqNb.js +1581 -0
- package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-7YqmpmtC.js} +15 -15
- package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-Dx2ECqt8.js} +464 -418
- package/dist/embed/voice/line-slots.d.ts +37 -2
- package/dist/embed/voice-call.d.ts +12 -0
- package/dist/i18n/messages/en.d.ts +1 -2
- package/dist/lib/web-storage.d.ts +8 -0
- package/dist/stream/belong-chat-transport.d.ts +1 -0
- package/dist/stream/belong-data-parts.d.ts +2 -0
- package/dist/stream/stream-state-store.d.ts +13 -0
- package/dist/types/public.d.ts +3 -0
- package/package.json +1 -1
- package/dist/component/arc-TLcl3N8_.js +0 -86
- package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
- package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
- package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
- package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
- package/dist/component/layout-Bu6nRdWm.js +0 -1731
- package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
- package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-BqryGqC6.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import {
|
|
3
|
-
import { G as
|
|
4
|
-
import { c as
|
|
1
|
+
import { g as de } from "./chunk-5VM5RSS4-DGxDkIm6.js";
|
|
2
|
+
import { aD as pe, aE as Kt, aF as fe, aG as xe, aH as ye, aI as be, aJ as we, aK as me, aL as Se, aM as Le, aN as ke, aO as ve, aP as Ee, aQ as _e, aR as Te, aS as De, aT as Be, aU as Ne, aV as Ie, aW as Ce, aX as Oe, aY as Re, aZ as Ae, a_ as ze, a$ 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, b0 as Ye, aa as He, ab as Ke, a6 as Ue, b1 as M, b2 as kt, b3 as Q, av as Xe, y as $, k as Ve, b4 as je, i as Ct, b5 as Ot, b6 as Ge } from "./mermaid-GHXKKRXX-C2L7fCIM.js";
|
|
3
|
+
import { G as Ze } from "./graph-CWpEkm4G.js";
|
|
4
|
+
import { c as qe } from "./channel-3CusDaXb.js";
|
|
5
5
|
globalThis.process = globalThis.process || { env: {} };
|
|
6
6
|
globalThis.global = globalThis.global || globalThis;
|
|
7
|
-
function
|
|
7
|
+
function Je(e) {
|
|
8
8
|
return Array.isArray(e);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
const t =
|
|
13
|
-
if (
|
|
14
|
-
if (
|
|
10
|
+
function Qe(e) {
|
|
11
|
+
if (pe(e)) return e;
|
|
12
|
+
const t = Kt(e);
|
|
13
|
+
if (!$e(e)) return {};
|
|
14
|
+
if (Je(e)) {
|
|
15
15
|
const s = Array.from(e);
|
|
16
16
|
return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (s.index = e.index, s.input = e.input), s;
|
|
17
17
|
}
|
|
18
|
-
if (
|
|
18
|
+
if (fe(e)) {
|
|
19
19
|
const s = e, i = s.constructor;
|
|
20
20
|
return new i(s.buffer, s.byteOffset, s.length);
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@ function $e(e) {
|
|
|
26
26
|
}
|
|
27
27
|
if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
|
|
28
28
|
const s = e.constructor, i = new s(e.valueOf());
|
|
29
|
-
return t === "[object String]" ?
|
|
29
|
+
return t === "[object String]" ? er(i, e) : xt(i, e), i;
|
|
30
30
|
}
|
|
31
31
|
if (t === "[object Date]") return new Date(Number(e));
|
|
32
32
|
if (t === "[object RegExp]") {
|
|
@@ -48,14 +48,13 @@ function $e(e) {
|
|
|
48
48
|
}
|
|
49
49
|
if (t === "[object Arguments]") {
|
|
50
50
|
const s = e, i = {};
|
|
51
|
-
return
|
|
51
|
+
return xt(i, s), i.length = s.length, i[Symbol.iterator] = s[Symbol.iterator], i;
|
|
52
52
|
}
|
|
53
53
|
const a = {};
|
|
54
|
-
return
|
|
54
|
+
return rr(a, e), xt(a, e), tr(a, e), a;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
switch (
|
|
58
|
-
case Pe:
|
|
56
|
+
function $e(e) {
|
|
57
|
+
switch (Kt(e)) {
|
|
59
58
|
case Me:
|
|
60
59
|
case ze:
|
|
61
60
|
case Ae:
|
|
@@ -77,42 +76,43 @@ function tr(e) {
|
|
|
77
76
|
case we:
|
|
78
77
|
case be:
|
|
79
78
|
case ye:
|
|
79
|
+
case xe:
|
|
80
80
|
return !0;
|
|
81
81
|
default:
|
|
82
82
|
return !1;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function xt(e, t) {
|
|
86
86
|
for (const a in t) Object.hasOwn(t, a) && (e[a] = t[a]);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function tr(e, t) {
|
|
89
89
|
const a = Object.getOwnPropertySymbols(t);
|
|
90
90
|
for (let s = 0; s < a.length; s++) {
|
|
91
91
|
const i = a[s];
|
|
92
92
|
Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function er(e, t) {
|
|
96
96
|
const a = t.valueOf().length;
|
|
97
97
|
for (const s in t) Object.hasOwn(t, s) && (Number.isNaN(Number(s)) || Number(s) >= a) && (e[s] = t[s]);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function rr(e, t) {
|
|
100
100
|
const a = Object.getPrototypeOf(t);
|
|
101
101
|
a !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, a);
|
|
102
102
|
}
|
|
103
|
-
var
|
|
104
|
-
var e = /* @__PURE__ */
|
|
105
|
-
for (
|
|
106
|
-
return
|
|
107
|
-
}, "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],
|
|
108
|
-
trace: /* @__PURE__ */
|
|
103
|
+
var bt = (function() {
|
|
104
|
+
var e = /* @__PURE__ */ g(function(T, m, p, x) {
|
|
105
|
+
for (p = p || {}, x = T.length; x--; p[T[x]] = m) ;
|
|
106
|
+
return p;
|
|
107
|
+
}, "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 = {
|
|
108
|
+
trace: /* @__PURE__ */ g(function() {
|
|
109
109
|
}, "trace"),
|
|
110
110
|
yy: {},
|
|
111
111
|
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 },
|
|
112
112
|
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" },
|
|
113
113
|
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]],
|
|
114
|
-
performAction: /* @__PURE__ */
|
|
115
|
-
var f =
|
|
114
|
+
performAction: /* @__PURE__ */ g(function(m, p, x, L, E, o, F) {
|
|
115
|
+
var f = o.length - 1;
|
|
116
116
|
switch (E) {
|
|
117
117
|
case 4:
|
|
118
118
|
L.getLogger().debug("Rule: separator (NL) ");
|
|
@@ -124,7 +124,7 @@ var wt = (function() {
|
|
|
124
124
|
L.getLogger().debug("Rule: separator (EOF) ");
|
|
125
125
|
break;
|
|
126
126
|
case 7:
|
|
127
|
-
L.getLogger().debug("Rule: hierarchy: ",
|
|
127
|
+
L.getLogger().debug("Rule: hierarchy: ", o[f - 1]), L.setHierarchy(o[f - 1]);
|
|
128
128
|
break;
|
|
129
129
|
case 8:
|
|
130
130
|
L.getLogger().debug("Stop NL ");
|
|
@@ -139,147 +139,147 @@ var wt = (function() {
|
|
|
139
139
|
L.getLogger().debug("Stop EOF2 ");
|
|
140
140
|
break;
|
|
141
141
|
case 12:
|
|
142
|
-
L.getLogger().debug("Rule: statement: ",
|
|
142
|
+
L.getLogger().debug("Rule: statement: ", o[f]), typeof o[f].length == "number" ? this.$ = o[f] : this.$ = [o[f]];
|
|
143
143
|
break;
|
|
144
144
|
case 13:
|
|
145
|
-
L.getLogger().debug("Rule: statement #2: ",
|
|
145
|
+
L.getLogger().debug("Rule: statement #2: ", o[f - 1]), this.$ = [o[f - 1]].concat(o[f]);
|
|
146
146
|
break;
|
|
147
147
|
case 14:
|
|
148
|
-
L.getLogger().debug("Rule: link: ",
|
|
148
|
+
L.getLogger().debug("Rule: link: ", o[f], m), this.$ = { edgeTypeStr: o[f], label: "" };
|
|
149
149
|
break;
|
|
150
150
|
case 15:
|
|
151
|
-
L.getLogger().debug("Rule: LABEL link: ",
|
|
151
|
+
L.getLogger().debug("Rule: LABEL link: ", o[f - 3], o[f - 1], o[f]), this.$ = { edgeTypeStr: o[f], label: o[f - 1] };
|
|
152
152
|
break;
|
|
153
153
|
case 18:
|
|
154
|
-
const
|
|
155
|
-
this.$ = { id:
|
|
154
|
+
const C = parseInt(o[f]), Z = L.generateId();
|
|
155
|
+
this.$ = { id: Z, type: "space", label: "", width: C, children: [] };
|
|
156
156
|
break;
|
|
157
157
|
case 23:
|
|
158
|
-
L.getLogger().debug("Rule: (nodeStatement link node) ",
|
|
159
|
-
const
|
|
158
|
+
L.getLogger().debug("Rule: (nodeStatement link node) ", o[f - 2], o[f - 1], o[f], " typestr: ", o[f - 1].edgeTypeStr);
|
|
159
|
+
const V = L.edgeStrToEdgeData(o[f - 1].edgeTypeStr), at = L.edgeStrToEdgeStartData(o[f - 1].edgeTypeStr), gt = L.edgeStrToThickness(o[f - 1].edgeTypeStr), O = L.edgeStrToPattern(o[f - 1].edgeTypeStr);
|
|
160
160
|
this.$ = [
|
|
161
|
-
{ id:
|
|
162
|
-
{ id:
|
|
163
|
-
{ id:
|
|
161
|
+
{ id: o[f - 2].id, label: o[f - 2].label, type: o[f - 2].type, directions: o[f - 2].directions },
|
|
162
|
+
{ id: o[f - 2].id + "-" + o[f].id, start: o[f - 2].id, end: o[f].id, label: o[f - 1].label, type: "edge", thickness: gt, pattern: O, directions: o[f].directions, arrowTypeEnd: V, arrowTypeStart: at },
|
|
163
|
+
{ id: o[f].id, label: o[f].label, type: L.typeStr2Type(o[f].typeStr), directions: o[f].directions }
|
|
164
164
|
];
|
|
165
165
|
break;
|
|
166
166
|
case 24:
|
|
167
|
-
L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",
|
|
167
|
+
L.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[f - 1], o[f]), this.$ = { id: o[f - 1].id, label: o[f - 1].label, type: L.typeStr2Type(o[f - 1].typeStr), directions: o[f - 1].directions, widthInColumns: parseInt(o[f], 10) };
|
|
168
168
|
break;
|
|
169
169
|
case 25:
|
|
170
|
-
L.getLogger().debug("Rule: nodeStatement (node) ",
|
|
170
|
+
L.getLogger().debug("Rule: nodeStatement (node) ", o[f]), this.$ = { id: o[f].id, label: o[f].label, type: L.typeStr2Type(o[f].typeStr), directions: o[f].directions, widthInColumns: 1 };
|
|
171
171
|
break;
|
|
172
172
|
case 26:
|
|
173
|
-
L.getLogger().debug("APA123", this ? this : "na"), L.getLogger().debug("COLUMNS: ",
|
|
173
|
+
L.getLogger().debug("APA123", this ? this : "na"), L.getLogger().debug("COLUMNS: ", o[f]), this.$ = { type: "column-setting", columns: o[f] === "auto" ? -1 : parseInt(o[f]) };
|
|
174
174
|
break;
|
|
175
175
|
case 27:
|
|
176
|
-
L.getLogger().debug("Rule: id-block statement : ",
|
|
176
|
+
L.getLogger().debug("Rule: id-block statement : ", o[f - 2], o[f - 1]), L.generateId(), this.$ = { ...o[f - 2], type: "composite", children: o[f - 1] };
|
|
177
177
|
break;
|
|
178
178
|
case 28:
|
|
179
|
-
L.getLogger().debug("Rule: blockStatement : ",
|
|
180
|
-
const
|
|
181
|
-
this.$ = { id:
|
|
179
|
+
L.getLogger().debug("Rule: blockStatement : ", o[f - 2], o[f - 1], o[f]);
|
|
180
|
+
const j = L.generateId();
|
|
181
|
+
this.$ = { id: j, type: "composite", label: "", children: o[f - 1] };
|
|
182
182
|
break;
|
|
183
183
|
case 29:
|
|
184
|
-
L.getLogger().debug("Rule: node (NODE_ID separator): ",
|
|
184
|
+
L.getLogger().debug("Rule: node (NODE_ID separator): ", o[f]), this.$ = { id: o[f] };
|
|
185
185
|
break;
|
|
186
186
|
case 30:
|
|
187
|
-
L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",
|
|
187
|
+
L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[f - 1], o[f]), this.$ = { id: o[f - 1], label: o[f].label, typeStr: o[f].typeStr, directions: o[f].directions };
|
|
188
188
|
break;
|
|
189
189
|
case 31:
|
|
190
|
-
L.getLogger().debug("Rule: dirList: ",
|
|
190
|
+
L.getLogger().debug("Rule: dirList: ", o[f]), this.$ = [o[f]];
|
|
191
191
|
break;
|
|
192
192
|
case 32:
|
|
193
|
-
L.getLogger().debug("Rule: dirList: ",
|
|
193
|
+
L.getLogger().debug("Rule: dirList: ", o[f - 1], o[f]), this.$ = [o[f - 1]].concat(o[f]);
|
|
194
194
|
break;
|
|
195
195
|
case 33:
|
|
196
|
-
L.getLogger().debug("Rule: nodeShapeNLabel: ",
|
|
196
|
+
L.getLogger().debug("Rule: nodeShapeNLabel: ", o[f - 2], o[f - 1], o[f]), this.$ = { typeStr: o[f - 2] + o[f], label: o[f - 1] };
|
|
197
197
|
break;
|
|
198
198
|
case 34:
|
|
199
|
-
L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",
|
|
199
|
+
L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[f - 3], o[f - 2], " #3:", o[f - 1], o[f]), this.$ = { typeStr: o[f - 3] + o[f], label: o[f - 2], directions: o[f - 1] };
|
|
200
200
|
break;
|
|
201
201
|
case 35:
|
|
202
202
|
case 36:
|
|
203
|
-
this.$ = { type: "classDef", id:
|
|
203
|
+
this.$ = { type: "classDef", id: o[f - 1].trim(), css: o[f].trim() };
|
|
204
204
|
break;
|
|
205
205
|
case 37:
|
|
206
|
-
this.$ = { type: "applyClass", id:
|
|
206
|
+
this.$ = { type: "applyClass", id: o[f - 1].trim(), styleClass: o[f].trim() };
|
|
207
207
|
break;
|
|
208
208
|
case 38:
|
|
209
|
-
this.$ = { type: "applyStyles", id:
|
|
209
|
+
this.$ = { type: "applyStyles", id: o[f - 1].trim(), stylesStr: o[f].trim() };
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
212
|
}, "anonymous"),
|
|
213
|
-
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(
|
|
213
|
+
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] }],
|
|
214
214
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
215
|
-
parseError: /* @__PURE__ */
|
|
216
|
-
if (
|
|
215
|
+
parseError: /* @__PURE__ */ g(function(m, p) {
|
|
216
|
+
if (p.recoverable)
|
|
217
217
|
this.trace(m);
|
|
218
218
|
else {
|
|
219
|
-
var
|
|
220
|
-
throw
|
|
219
|
+
var x = new Error(m);
|
|
220
|
+
throw x.hash = p, x;
|
|
221
221
|
}
|
|
222
222
|
}, "parseError"),
|
|
223
|
-
parse: /* @__PURE__ */
|
|
224
|
-
var
|
|
223
|
+
parse: /* @__PURE__ */ g(function(m) {
|
|
224
|
+
var p = this, x = [0], L = [], E = [null], o = [], F = this.table, f = "", C = 0, Z = 0, V = 2, at = 1, gt = o.slice.call(arguments, 1), O = Object.create(this.lexer), j = { yy: {} };
|
|
225
225
|
for (var ut in this.yy)
|
|
226
|
-
Object.prototype.hasOwnProperty.call(this.yy, ut) && (
|
|
227
|
-
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
var
|
|
231
|
-
typeof
|
|
232
|
-
function ue(
|
|
233
|
-
|
|
226
|
+
Object.prototype.hasOwnProperty.call(this.yy, ut) && (j.yy[ut] = this.yy[ut]);
|
|
227
|
+
O.setInput(m, j.yy), j.yy.lexer = O, j.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
|
|
228
|
+
var dt = O.yylloc;
|
|
229
|
+
o.push(dt);
|
|
230
|
+
var ge = O.options && O.options.ranges;
|
|
231
|
+
typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
232
|
+
function ue(W) {
|
|
233
|
+
x.length = x.length - 2 * W, E.length = E.length - W, o.length = o.length - W;
|
|
234
234
|
}
|
|
235
|
-
|
|
236
|
-
function
|
|
237
|
-
var
|
|
238
|
-
return
|
|
235
|
+
g(ue, "popStack");
|
|
236
|
+
function Nt() {
|
|
237
|
+
var W;
|
|
238
|
+
return W = L.pop() || O.lex() || at, typeof W != "number" && (W instanceof Array && (L = W, W = L.pop()), W = p.symbols_[W] || W), W;
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
for (var
|
|
242
|
-
if (
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
for (
|
|
246
|
-
this.terminals_[
|
|
247
|
-
|
|
248
|
-
` +
|
|
249
|
-
Expecting ` +
|
|
250
|
-
text:
|
|
251
|
-
token: this.terminals_[
|
|
252
|
-
line:
|
|
253
|
-
loc:
|
|
254
|
-
expected:
|
|
240
|
+
g(Nt, "lex");
|
|
241
|
+
for (var P, q, H, pt, J = {}, st, G, It, it; ; ) {
|
|
242
|
+
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]) {
|
|
243
|
+
var ft = "";
|
|
244
|
+
it = [];
|
|
245
|
+
for (st in F[q])
|
|
246
|
+
this.terminals_[st] && st > V && it.push("'" + this.terminals_[st] + "'");
|
|
247
|
+
O.showPosition ? ft = "Parse error on line " + (C + 1) + `:
|
|
248
|
+
` + O.showPosition() + `
|
|
249
|
+
Expecting ` + it.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : ft = "Parse error on line " + (C + 1) + ": Unexpected " + (P == at ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(ft, {
|
|
250
|
+
text: O.match,
|
|
251
|
+
token: this.terminals_[P] || P,
|
|
252
|
+
line: O.yylineno,
|
|
253
|
+
loc: dt,
|
|
254
|
+
expected: it
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
if (
|
|
258
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
259
|
-
switch (
|
|
257
|
+
if (H[0] instanceof Array && H.length > 1)
|
|
258
|
+
throw new Error("Parse Error: multiple actions possible at state: " + q + ", token: " + P);
|
|
259
|
+
switch (H[0]) {
|
|
260
260
|
case 1:
|
|
261
|
-
|
|
261
|
+
x.push(P), E.push(O.yytext), o.push(O.yylloc), x.push(H[1]), P = null, Z = O.yyleng, f = O.yytext, C = O.yylineno, dt = O.yylloc;
|
|
262
262
|
break;
|
|
263
263
|
case 2:
|
|
264
|
-
if (
|
|
265
|
-
first_line:
|
|
266
|
-
last_line:
|
|
267
|
-
first_column:
|
|
268
|
-
last_column:
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
]),
|
|
264
|
+
if (G = this.productions_[H[1]][1], J.$ = E[E.length - G], J._$ = {
|
|
265
|
+
first_line: o[o.length - (G || 1)].first_line,
|
|
266
|
+
last_line: o[o.length - 1].last_line,
|
|
267
|
+
first_column: o[o.length - (G || 1)].first_column,
|
|
268
|
+
last_column: o[o.length - 1].last_column
|
|
269
|
+
}, ge && (J._$.range = [
|
|
270
|
+
o[o.length - (G || 1)].range[0],
|
|
271
|
+
o[o.length - 1].range[1]
|
|
272
|
+
]), pt = this.performAction.apply(J, [
|
|
273
273
|
f,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
Z,
|
|
275
|
+
C,
|
|
276
|
+
j.yy,
|
|
277
|
+
H[1],
|
|
278
278
|
E,
|
|
279
|
-
|
|
280
|
-
].concat(
|
|
281
|
-
return
|
|
282
|
-
|
|
279
|
+
o
|
|
280
|
+
].concat(gt)), typeof pt < "u")
|
|
281
|
+
return pt;
|
|
282
|
+
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);
|
|
283
283
|
break;
|
|
284
284
|
case 3:
|
|
285
285
|
return !0;
|
|
@@ -287,18 +287,18 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
287
287
|
}
|
|
288
288
|
return !0;
|
|
289
289
|
}, "parse")
|
|
290
|
-
},
|
|
290
|
+
}, N = /* @__PURE__ */ (function() {
|
|
291
291
|
var T = {
|
|
292
292
|
EOF: 1,
|
|
293
|
-
parseError: /* @__PURE__ */
|
|
293
|
+
parseError: /* @__PURE__ */ g(function(p, x) {
|
|
294
294
|
if (this.yy.parser)
|
|
295
|
-
this.yy.parser.parseError(
|
|
295
|
+
this.yy.parser.parseError(p, x);
|
|
296
296
|
else
|
|
297
|
-
throw new Error(
|
|
297
|
+
throw new Error(p);
|
|
298
298
|
}, "parseError"),
|
|
299
299
|
// resets the lexer, sets new input
|
|
300
|
-
setInput: /* @__PURE__ */
|
|
301
|
-
return this.yy =
|
|
300
|
+
setInput: /* @__PURE__ */ g(function(m, p) {
|
|
301
|
+
return this.yy = p || 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 = {
|
|
302
302
|
first_line: 1,
|
|
303
303
|
first_column: 0,
|
|
304
304
|
last_line: 1,
|
|
@@ -306,32 +306,32 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
306
306
|
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
307
307
|
}, "setInput"),
|
|
308
308
|
// consumes and returns one char from the input
|
|
309
|
-
input: /* @__PURE__ */
|
|
309
|
+
input: /* @__PURE__ */ g(function() {
|
|
310
310
|
var m = this._input[0];
|
|
311
311
|
this.yytext += m, this.yyleng++, this.offset++, this.match += m, this.matched += m;
|
|
312
|
-
var
|
|
313
|
-
return
|
|
312
|
+
var p = m.match(/(?:\r\n?|\n).*/g);
|
|
313
|
+
return p ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), m;
|
|
314
314
|
}, "input"),
|
|
315
315
|
// unshifts one char (or a string) into the input
|
|
316
|
-
unput: /* @__PURE__ */
|
|
317
|
-
var
|
|
318
|
-
this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
316
|
+
unput: /* @__PURE__ */ g(function(m) {
|
|
317
|
+
var p = m.length, x = m.split(/(?:\r\n?|\n)/g);
|
|
318
|
+
this._input = m + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - p), this.offset -= p;
|
|
319
319
|
var L = this.match.split(/(?:\r\n?|\n)/g);
|
|
320
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1),
|
|
320
|
+
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);
|
|
321
321
|
var E = this.yylloc.range;
|
|
322
322
|
return this.yylloc = {
|
|
323
323
|
first_line: this.yylloc.first_line,
|
|
324
324
|
last_line: this.yylineno + 1,
|
|
325
325
|
first_column: this.yylloc.first_column,
|
|
326
|
-
last_column:
|
|
327
|
-
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng -
|
|
326
|
+
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 - p
|
|
327
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - p]), this.yyleng = this.yytext.length, this;
|
|
328
328
|
}, "unput"),
|
|
329
329
|
// When called from action, caches matched text and appends it on next action
|
|
330
|
-
more: /* @__PURE__ */
|
|
330
|
+
more: /* @__PURE__ */ g(function() {
|
|
331
331
|
return this._more = !0, this;
|
|
332
332
|
}, "more"),
|
|
333
333
|
// 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.
|
|
334
|
-
reject: /* @__PURE__ */
|
|
334
|
+
reject: /* @__PURE__ */ g(function() {
|
|
335
335
|
if (this.options.backtrack_lexer)
|
|
336
336
|
this._backtrack = !0;
|
|
337
337
|
else
|
|
@@ -344,28 +344,28 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
344
344
|
return this;
|
|
345
345
|
}, "reject"),
|
|
346
346
|
// retain first n characters of the match
|
|
347
|
-
less: /* @__PURE__ */
|
|
347
|
+
less: /* @__PURE__ */ g(function(m) {
|
|
348
348
|
this.unput(this.match.slice(m));
|
|
349
349
|
}, "less"),
|
|
350
350
|
// displays already matched input, i.e. for error messages
|
|
351
|
-
pastInput: /* @__PURE__ */
|
|
351
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
352
352
|
var m = this.matched.substr(0, this.matched.length - this.match.length);
|
|
353
353
|
return (m.length > 20 ? "..." : "") + m.substr(-20).replace(/\n/g, "");
|
|
354
354
|
}, "pastInput"),
|
|
355
355
|
// displays upcoming input, i.e. for error messages
|
|
356
|
-
upcomingInput: /* @__PURE__ */
|
|
356
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
357
357
|
var m = this.match;
|
|
358
358
|
return m.length < 20 && (m += this._input.substr(0, 20 - m.length)), (m.substr(0, 20) + (m.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
359
359
|
}, "upcomingInput"),
|
|
360
360
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
361
|
-
showPosition: /* @__PURE__ */
|
|
362
|
-
var m = this.pastInput(),
|
|
361
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
362
|
+
var m = this.pastInput(), p = new Array(m.length + 1).join("-");
|
|
363
363
|
return m + this.upcomingInput() + `
|
|
364
|
-
` +
|
|
364
|
+
` + p + "^";
|
|
365
365
|
}, "showPosition"),
|
|
366
366
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
367
|
-
test_match: /* @__PURE__ */
|
|
368
|
-
var
|
|
367
|
+
test_match: /* @__PURE__ */ g(function(m, p) {
|
|
368
|
+
var x, L, E;
|
|
369
369
|
if (this.options.backtrack_lexer && (E = {
|
|
370
370
|
yylineno: this.yylineno,
|
|
371
371
|
yylloc: {
|
|
@@ -390,36 +390,36 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
390
390
|
last_line: this.yylineno + 1,
|
|
391
391
|
first_column: this.yylloc.last_column,
|
|
392
392
|
last_column: L ? L[L.length - 1].length - L[L.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + m[0].length
|
|
393
|
-
}, 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],
|
|
394
|
-
return
|
|
393
|
+
}, 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, p, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), x)
|
|
394
|
+
return x;
|
|
395
395
|
if (this._backtrack) {
|
|
396
|
-
for (var
|
|
397
|
-
this[
|
|
396
|
+
for (var o in E)
|
|
397
|
+
this[o] = E[o];
|
|
398
398
|
return !1;
|
|
399
399
|
}
|
|
400
400
|
return !1;
|
|
401
401
|
}, "test_match"),
|
|
402
402
|
// return next match in input
|
|
403
|
-
next: /* @__PURE__ */
|
|
403
|
+
next: /* @__PURE__ */ g(function() {
|
|
404
404
|
if (this.done)
|
|
405
405
|
return this.EOF;
|
|
406
406
|
this._input || (this.done = !0);
|
|
407
|
-
var m,
|
|
407
|
+
var m, p, x, L;
|
|
408
408
|
this._more || (this.yytext = "", this.match = "");
|
|
409
|
-
for (var E = this._currentRules(),
|
|
410
|
-
if (
|
|
411
|
-
if (
|
|
412
|
-
if (m = this.test_match(
|
|
409
|
+
for (var E = this._currentRules(), o = 0; o < E.length; o++)
|
|
410
|
+
if (x = this._input.match(this.rules[E[o]]), x && (!p || x[0].length > p[0].length)) {
|
|
411
|
+
if (p = x, L = o, this.options.backtrack_lexer) {
|
|
412
|
+
if (m = this.test_match(x, E[o]), m !== !1)
|
|
413
413
|
return m;
|
|
414
414
|
if (this._backtrack) {
|
|
415
|
-
|
|
415
|
+
p = !1;
|
|
416
416
|
continue;
|
|
417
417
|
} else
|
|
418
418
|
return !1;
|
|
419
419
|
} else if (!this.options.flex)
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
|
-
return
|
|
422
|
+
return p ? (m = this.test_match(p, E[L]), m !== !1 ? m : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
423
423
|
` + this.showPosition(), {
|
|
424
424
|
text: "",
|
|
425
425
|
token: null,
|
|
@@ -427,56 +427,56 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
427
427
|
});
|
|
428
428
|
}, "next"),
|
|
429
429
|
// return next match that has a token
|
|
430
|
-
lex: /* @__PURE__ */
|
|
431
|
-
var
|
|
432
|
-
return
|
|
430
|
+
lex: /* @__PURE__ */ g(function() {
|
|
431
|
+
var p = this.next();
|
|
432
|
+
return p || this.lex();
|
|
433
433
|
}, "lex"),
|
|
434
434
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
435
|
-
begin: /* @__PURE__ */
|
|
436
|
-
this.conditionStack.push(
|
|
435
|
+
begin: /* @__PURE__ */ g(function(p) {
|
|
436
|
+
this.conditionStack.push(p);
|
|
437
437
|
}, "begin"),
|
|
438
438
|
// pop the previously active lexer condition state off the condition stack
|
|
439
|
-
popState: /* @__PURE__ */
|
|
440
|
-
var
|
|
441
|
-
return
|
|
439
|
+
popState: /* @__PURE__ */ g(function() {
|
|
440
|
+
var p = this.conditionStack.length - 1;
|
|
441
|
+
return p > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
442
442
|
}, "popState"),
|
|
443
443
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
444
|
-
_currentRules: /* @__PURE__ */
|
|
444
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
445
445
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
446
446
|
}, "_currentRules"),
|
|
447
447
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
448
|
-
topState: /* @__PURE__ */
|
|
449
|
-
return
|
|
448
|
+
topState: /* @__PURE__ */ g(function(p) {
|
|
449
|
+
return p = this.conditionStack.length - 1 - Math.abs(p || 0), p >= 0 ? this.conditionStack[p] : "INITIAL";
|
|
450
450
|
}, "topState"),
|
|
451
451
|
// alias for begin(condition)
|
|
452
|
-
pushState: /* @__PURE__ */
|
|
453
|
-
this.begin(
|
|
452
|
+
pushState: /* @__PURE__ */ g(function(p) {
|
|
453
|
+
this.begin(p);
|
|
454
454
|
}, "pushState"),
|
|
455
455
|
// return the number of states currently on the stack
|
|
456
|
-
stateStackSize: /* @__PURE__ */
|
|
456
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
457
457
|
return this.conditionStack.length;
|
|
458
458
|
}, "stateStackSize"),
|
|
459
459
|
options: {},
|
|
460
|
-
performAction: /* @__PURE__ */
|
|
460
|
+
performAction: /* @__PURE__ */ g(function(p, x, L, E) {
|
|
461
461
|
switch (L) {
|
|
462
462
|
case 0:
|
|
463
|
-
return
|
|
463
|
+
return p.getLogger().debug("Found block-beta"), 10;
|
|
464
464
|
case 1:
|
|
465
|
-
return
|
|
465
|
+
return p.getLogger().debug("Found id-block"), 29;
|
|
466
466
|
case 2:
|
|
467
|
-
return
|
|
467
|
+
return p.getLogger().debug("Found block"), 10;
|
|
468
468
|
case 3:
|
|
469
|
-
|
|
469
|
+
p.getLogger().debug(".", x.yytext);
|
|
470
470
|
break;
|
|
471
471
|
case 4:
|
|
472
|
-
|
|
472
|
+
p.getLogger().debug("_", x.yytext);
|
|
473
473
|
break;
|
|
474
474
|
case 5:
|
|
475
475
|
return 5;
|
|
476
476
|
case 6:
|
|
477
|
-
return
|
|
477
|
+
return x.yytext = -1, 28;
|
|
478
478
|
case 7:
|
|
479
|
-
return
|
|
479
|
+
return x.yytext = x.yytext.replace(/columns\s+/, ""), p.getLogger().debug("COLUMNS (LEX)", x.yytext), 28;
|
|
480
480
|
case 8:
|
|
481
481
|
this.pushState("md_string");
|
|
482
482
|
break;
|
|
@@ -489,14 +489,14 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
489
489
|
this.pushState("string");
|
|
490
490
|
break;
|
|
491
491
|
case 12:
|
|
492
|
-
|
|
492
|
+
p.getLogger().debug("LEX: POPPING STR:", x.yytext), this.popState();
|
|
493
493
|
break;
|
|
494
494
|
case 13:
|
|
495
|
-
return
|
|
495
|
+
return p.getLogger().debug("LEX: STR end:", x.yytext), "STR";
|
|
496
496
|
case 14:
|
|
497
|
-
return
|
|
497
|
+
return x.yytext = x.yytext.replace(/space\:/, ""), p.getLogger().debug("SPACE NUM (LEX)", x.yytext), 21;
|
|
498
498
|
case 15:
|
|
499
|
-
return
|
|
499
|
+
return x.yytext = "1", p.getLogger().debug("COLUMNS (LEX)", x.yytext), 21;
|
|
500
500
|
case 16:
|
|
501
501
|
return 42;
|
|
502
502
|
case 17:
|
|
@@ -542,61 +542,61 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
542
542
|
case 36:
|
|
543
543
|
return 30;
|
|
544
544
|
case 37:
|
|
545
|
-
return this.popState(),
|
|
545
|
+
return this.popState(), p.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
546
546
|
case 38:
|
|
547
|
-
return this.popState(),
|
|
547
|
+
return this.popState(), p.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
548
548
|
case 39:
|
|
549
|
-
return this.popState(),
|
|
549
|
+
return this.popState(), p.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
550
550
|
case 40:
|
|
551
|
-
return this.popState(),
|
|
551
|
+
return this.popState(), p.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
552
552
|
case 41:
|
|
553
|
-
return this.popState(),
|
|
553
|
+
return this.popState(), p.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
554
554
|
case 42:
|
|
555
|
-
return this.popState(),
|
|
555
|
+
return this.popState(), p.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
556
556
|
case 43:
|
|
557
|
-
return this.popState(),
|
|
557
|
+
return this.popState(), p.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
558
558
|
case 44:
|
|
559
|
-
return this.popState(),
|
|
559
|
+
return this.popState(), p.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
560
560
|
case 45:
|
|
561
|
-
return this.popState(),
|
|
561
|
+
return this.popState(), p.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
562
562
|
case 46:
|
|
563
|
-
return this.popState(),
|
|
563
|
+
return this.popState(), p.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
564
564
|
case 47:
|
|
565
|
-
return this.popState(),
|
|
565
|
+
return this.popState(), p.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
566
566
|
case 48:
|
|
567
|
-
return this.popState(),
|
|
567
|
+
return this.popState(), p.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
568
568
|
case 49:
|
|
569
|
-
return this.popState(),
|
|
569
|
+
return this.popState(), p.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
570
570
|
case 50:
|
|
571
|
-
return this.popState(),
|
|
571
|
+
return this.popState(), p.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
572
572
|
case 51:
|
|
573
|
-
return this.popState(),
|
|
573
|
+
return this.popState(), p.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
574
574
|
case 52:
|
|
575
|
-
return this.popState(),
|
|
575
|
+
return this.popState(), p.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
576
576
|
case 53:
|
|
577
|
-
return this.popState(),
|
|
577
|
+
return this.popState(), p.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
578
578
|
case 54:
|
|
579
|
-
return
|
|
579
|
+
return p.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
580
580
|
case 55:
|
|
581
|
-
return
|
|
581
|
+
return p.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
582
582
|
case 56:
|
|
583
|
-
return
|
|
583
|
+
return p.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
584
584
|
case 57:
|
|
585
|
-
return
|
|
585
|
+
return p.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
586
586
|
case 58:
|
|
587
|
-
return
|
|
587
|
+
return p.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
588
588
|
case 59:
|
|
589
|
-
return
|
|
589
|
+
return p.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
590
590
|
case 60:
|
|
591
|
-
return
|
|
591
|
+
return p.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
592
592
|
case 61:
|
|
593
|
-
return
|
|
593
|
+
return p.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
594
594
|
case 62:
|
|
595
|
-
return
|
|
595
|
+
return p.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
596
596
|
case 63:
|
|
597
|
-
return
|
|
597
|
+
return p.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
598
598
|
case 64:
|
|
599
|
-
return
|
|
599
|
+
return p.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
600
600
|
case 65:
|
|
601
601
|
return this.pushState("NODE"), 35;
|
|
602
602
|
case 66:
|
|
@@ -612,13 +612,13 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
612
612
|
case 71:
|
|
613
613
|
return this.pushState("NODE"), 35;
|
|
614
614
|
case 72:
|
|
615
|
-
return
|
|
615
|
+
return p.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
616
616
|
case 73:
|
|
617
|
-
return this.pushState("BLOCK_ARROW"),
|
|
617
|
+
return this.pushState("BLOCK_ARROW"), p.getLogger().debug("LEX ARR START"), 37;
|
|
618
618
|
case 74:
|
|
619
|
-
return
|
|
619
|
+
return p.getLogger().debug("Lex: NODE_ID", x.yytext), 31;
|
|
620
620
|
case 75:
|
|
621
|
-
return
|
|
621
|
+
return p.getLogger().debug("Lex: EOF", x.yytext), 8;
|
|
622
622
|
case 76:
|
|
623
623
|
this.pushState("md_string");
|
|
624
624
|
break;
|
|
@@ -631,60 +631,60 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
631
631
|
this.popState();
|
|
632
632
|
break;
|
|
633
633
|
case 80:
|
|
634
|
-
|
|
634
|
+
p.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
635
635
|
break;
|
|
636
636
|
case 81:
|
|
637
|
-
|
|
637
|
+
p.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
638
638
|
break;
|
|
639
639
|
case 82:
|
|
640
|
-
return
|
|
640
|
+
return p.getLogger().debug("LEX: NODE_DESCR:", x.yytext), "NODE_DESCR";
|
|
641
641
|
case 83:
|
|
642
|
-
|
|
642
|
+
p.getLogger().debug("LEX POPPING"), this.popState();
|
|
643
643
|
break;
|
|
644
644
|
case 84:
|
|
645
|
-
|
|
645
|
+
p.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
646
646
|
break;
|
|
647
647
|
case 85:
|
|
648
|
-
return
|
|
648
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (right): dir:", x.yytext), "DIR";
|
|
649
649
|
case 86:
|
|
650
|
-
return
|
|
650
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (left):", x.yytext), "DIR";
|
|
651
651
|
case 87:
|
|
652
|
-
return
|
|
652
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (x):", x.yytext), "DIR";
|
|
653
653
|
case 88:
|
|
654
|
-
return
|
|
654
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (y):", x.yytext), "DIR";
|
|
655
655
|
case 89:
|
|
656
|
-
return
|
|
656
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (up):", x.yytext), "DIR";
|
|
657
657
|
case 90:
|
|
658
|
-
return
|
|
658
|
+
return x.yytext = x.yytext.replace(/^,\s*/, ""), p.getLogger().debug("Lex (down):", x.yytext), "DIR";
|
|
659
659
|
case 91:
|
|
660
|
-
return
|
|
660
|
+
return x.yytext = "]>", p.getLogger().debug("Lex (ARROW_DIR end):", x.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
661
661
|
case 92:
|
|
662
|
-
return
|
|
662
|
+
return p.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
|
|
663
663
|
case 93:
|
|
664
|
-
return
|
|
664
|
+
return p.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
665
665
|
case 94:
|
|
666
|
-
return
|
|
666
|
+
return p.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
667
667
|
case 95:
|
|
668
|
-
return
|
|
668
|
+
return p.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
669
669
|
case 96:
|
|
670
|
-
return
|
|
670
|
+
return p.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
671
671
|
case 97:
|
|
672
|
-
return
|
|
672
|
+
return p.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
673
673
|
case 98:
|
|
674
|
-
return
|
|
674
|
+
return p.getLogger().debug("Lex: START_LINK", x.yytext), this.pushState("LLABEL"), 16;
|
|
675
675
|
case 99:
|
|
676
676
|
this.pushState("md_string");
|
|
677
677
|
break;
|
|
678
678
|
case 100:
|
|
679
|
-
return
|
|
679
|
+
return p.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
680
680
|
case 101:
|
|
681
|
-
return this.popState(),
|
|
681
|
+
return this.popState(), p.getLogger().debug("Lex: LINK", "#" + x.yytext + "#"), 15;
|
|
682
682
|
case 102:
|
|
683
|
-
return this.popState(),
|
|
683
|
+
return this.popState(), p.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
684
684
|
case 103:
|
|
685
|
-
return this.popState(),
|
|
685
|
+
return this.popState(), p.getLogger().debug("Lex: LINK", x.yytext), 15;
|
|
686
686
|
case 104:
|
|
687
|
-
return
|
|
687
|
+
return p.getLogger().debug("Lex: COLON", x.yytext), x.yytext = x.yytext.slice(1), 27;
|
|
688
688
|
}
|
|
689
689
|
}, "anonymous"),
|
|
690
690
|
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+)/],
|
|
@@ -692,74 +692,74 @@ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : xt =
|
|
|
692
692
|
};
|
|
693
693
|
return T;
|
|
694
694
|
})();
|
|
695
|
-
S.lexer =
|
|
696
|
-
function
|
|
695
|
+
S.lexer = N;
|
|
696
|
+
function _() {
|
|
697
697
|
this.yy = {};
|
|
698
698
|
}
|
|
699
|
-
return
|
|
699
|
+
return g(_, "Parser"), _.prototype = S, S.Parser = _, new _();
|
|
700
700
|
})();
|
|
701
|
-
|
|
702
|
-
var
|
|
703
|
-
let a =
|
|
704
|
-
a || (a = { id: e, styles: [], textStyles: [] },
|
|
701
|
+
bt.parser = bt;
|
|
702
|
+
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 = "") {
|
|
703
|
+
let a = ct.get(e);
|
|
704
|
+
a || (a = { id: e, styles: [], textStyles: [] }, ct.set(e, a)), t?.split(Ut).forEach((s) => {
|
|
705
705
|
const i = s.replace(/([^;]*);/, "$1").trim();
|
|
706
|
-
if (RegExp(
|
|
707
|
-
const r = i.replace(
|
|
706
|
+
if (RegExp(Rt).exec(s)) {
|
|
707
|
+
const r = i.replace(At, sr).replace(Rt, At);
|
|
708
708
|
a.textStyles.push(r);
|
|
709
709
|
}
|
|
710
710
|
a.styles.push(i);
|
|
711
711
|
});
|
|
712
|
-
}, "addStyleClass"),
|
|
713
|
-
const a =
|
|
714
|
-
t != null && (a.styles = t.split(
|
|
715
|
-
}, "addStyle2Node"),
|
|
712
|
+
}, "addStyleClass"), cr = /* @__PURE__ */ g(function(e, t = "") {
|
|
713
|
+
const a = U.get(e);
|
|
714
|
+
t != null && (a.styles = t.split(Ut));
|
|
715
|
+
}, "addStyle2Node"), lr = /* @__PURE__ */ g(function(e, t) {
|
|
716
716
|
e.split(",").forEach(function(a) {
|
|
717
|
-
let s =
|
|
717
|
+
let s = U.get(a);
|
|
718
718
|
if (s === void 0) {
|
|
719
719
|
const i = a.trim();
|
|
720
|
-
s = { id: i, type: "na", children: [] },
|
|
720
|
+
s = { id: i, type: "na", children: [] }, U.set(i, s);
|
|
721
721
|
}
|
|
722
722
|
s.classes || (s.classes = []), s.classes.push(t);
|
|
723
723
|
});
|
|
724
|
-
}, "setCssClass"),
|
|
724
|
+
}, "setCssClass"), Xt = /* @__PURE__ */ g((e, t) => {
|
|
725
725
|
const a = e.flat(), s = [], c = a.find((r) => r?.type === "column-setting")?.columns ?? -1;
|
|
726
726
|
for (const r of a) {
|
|
727
727
|
if (typeof c == "number" && c > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > c && k.warn(
|
|
728
728
|
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`
|
|
729
|
-
), r.label && (r.label =
|
|
730
|
-
|
|
729
|
+
), r.label && (r.label = ir(r.label)), r.type === "classDef") {
|
|
730
|
+
nr(r.id, r.css);
|
|
731
731
|
continue;
|
|
732
732
|
}
|
|
733
733
|
if (r.type === "applyClass") {
|
|
734
|
-
|
|
734
|
+
lr(r.id, r?.styleClass ?? "");
|
|
735
735
|
continue;
|
|
736
736
|
}
|
|
737
737
|
if (r.type === "applyStyles") {
|
|
738
|
-
r?.stylesStr &&
|
|
738
|
+
r?.stylesStr && cr(r.id, r?.stylesStr);
|
|
739
739
|
continue;
|
|
740
740
|
}
|
|
741
741
|
if (r.type === "column-setting")
|
|
742
742
|
t.columns = r.columns ?? -1;
|
|
743
743
|
else if (r.type === "edge") {
|
|
744
|
-
const n = (
|
|
745
|
-
|
|
744
|
+
const n = (wt.get(r.id) ?? 0) + 1;
|
|
745
|
+
wt.set(r.id, n), r.id = n + "-" + r.id, vt.push(r);
|
|
746
746
|
} else {
|
|
747
747
|
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
748
|
-
const n =
|
|
749
|
-
if (n === void 0 ?
|
|
748
|
+
const n = U.get(r.id);
|
|
749
|
+
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") {
|
|
750
750
|
const l = r.width ?? 1;
|
|
751
|
-
for (let
|
|
752
|
-
const
|
|
753
|
-
|
|
751
|
+
for (let u = 0; u < l; u++) {
|
|
752
|
+
const h = Qe(r);
|
|
753
|
+
h.id = h.id + "-" + u, U.set(h.id, h), s.push(h);
|
|
754
754
|
}
|
|
755
755
|
} else n === void 0 && s.push(r);
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
t.children = s;
|
|
759
|
-
}, "populateBlockDatabase"),
|
|
760
|
-
k.debug("Clear called"),
|
|
759
|
+
}, "populateBlockDatabase"), _t = [], et = { id: "root", type: "composite", children: [], columns: -1 }, or = /* @__PURE__ */ g(() => {
|
|
760
|
+
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 = "";
|
|
761
761
|
}, "clear");
|
|
762
|
-
function
|
|
762
|
+
function Vt(e) {
|
|
763
763
|
switch (k.debug("typeStr2Type", e), e) {
|
|
764
764
|
case "[]":
|
|
765
765
|
return "square";
|
|
@@ -795,12 +795,12 @@ function jt(e) {
|
|
|
795
795
|
return "na";
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
|
|
799
|
-
function
|
|
798
|
+
g(Vt, "typeStr2Type");
|
|
799
|
+
function jt(e) {
|
|
800
800
|
return k.debug("typeStr2Type", e), e === "==" ? "thick" : "normal";
|
|
801
801
|
}
|
|
802
|
-
|
|
803
|
-
function
|
|
802
|
+
g(jt, "edgeTypeStr2Type");
|
|
803
|
+
function Gt(e) {
|
|
804
804
|
switch (e.trim().slice(-1)) {
|
|
805
805
|
case "x":
|
|
806
806
|
return "arrow_cross";
|
|
@@ -812,8 +812,8 @@ function Zt(e) {
|
|
|
812
812
|
return "";
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
|
|
816
|
-
function
|
|
815
|
+
g(Gt, "edgeStrToEdgeData");
|
|
816
|
+
function Zt(e) {
|
|
817
817
|
switch (e.trim().charAt(0)) {
|
|
818
818
|
case "x":
|
|
819
819
|
return "arrow_cross";
|
|
@@ -825,51 +825,51 @@ function qt(e) {
|
|
|
825
825
|
return "arrow_open";
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
|
|
829
|
-
function
|
|
828
|
+
g(Zt, "edgeStrToEdgeStartData");
|
|
829
|
+
function qt(e) {
|
|
830
830
|
return e.includes("==") ? "thick" : "normal";
|
|
831
831
|
}
|
|
832
|
-
|
|
833
|
-
function
|
|
832
|
+
g(qt, "edgeStrToThickness");
|
|
833
|
+
function Jt(e) {
|
|
834
834
|
return e.includes(".-") ? "dotted" : "solid";
|
|
835
835
|
}
|
|
836
|
-
|
|
837
|
-
var
|
|
838
|
-
|
|
839
|
-
}, "setHierarchy"),
|
|
840
|
-
const t =
|
|
836
|
+
g(Jt, "edgeStrToPattern");
|
|
837
|
+
var zt = 0, hr = /* @__PURE__ */ g(() => (zt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + zt), "generateId"), gr = /* @__PURE__ */ g((e) => {
|
|
838
|
+
et.children = e, Xt(e, et), _t = et.children;
|
|
839
|
+
}, "setHierarchy"), ur = /* @__PURE__ */ g((e) => {
|
|
840
|
+
const t = U.get(e);
|
|
841
841
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
842
|
-
}, "getColumns"),
|
|
843
|
-
|
|
844
|
-
}, "setBlock"),
|
|
845
|
-
|
|
846
|
-
}, "setDiagramId"),
|
|
847
|
-
return
|
|
848
|
-
}, "getClasses"),
|
|
849
|
-
getConfig: /* @__PURE__ */
|
|
850
|
-
typeStr2Type:
|
|
851
|
-
edgeTypeStr2Type:
|
|
852
|
-
edgeStrToEdgeData:
|
|
853
|
-
edgeStrToEdgeStartData:
|
|
854
|
-
edgeStrToThickness:
|
|
855
|
-
edgeStrToPattern:
|
|
856
|
-
getLogger:
|
|
857
|
-
getBlocksFlat:
|
|
858
|
-
getBlocks:
|
|
859
|
-
getEdges:
|
|
860
|
-
setHierarchy:
|
|
861
|
-
getBlock:
|
|
862
|
-
setBlock:
|
|
863
|
-
getColumns:
|
|
864
|
-
getClasses:
|
|
865
|
-
clear:
|
|
866
|
-
generateId:
|
|
867
|
-
setDiagramId:
|
|
868
|
-
getDiagramId:
|
|
869
|
-
},
|
|
870
|
-
const a =
|
|
871
|
-
return
|
|
872
|
-
}, "fade"),
|
|
842
|
+
}, "getColumns"), dr = /* @__PURE__ */ g(() => [...U.values()], "getBlocksFlat"), pr = /* @__PURE__ */ g(() => _t || [], "getBlocks"), fr = /* @__PURE__ */ g(() => vt, "getEdges"), xr = /* @__PURE__ */ g((e) => U.get(e), "getBlock"), yr = /* @__PURE__ */ g((e) => {
|
|
843
|
+
U.set(e.id, e);
|
|
844
|
+
}, "setBlock"), br = /* @__PURE__ */ g((e) => {
|
|
845
|
+
Et = e;
|
|
846
|
+
}, "setDiagramId"), wr = /* @__PURE__ */ g(() => Et, "getDiagramId"), mr = /* @__PURE__ */ g(() => k, "getLogger"), Sr = /* @__PURE__ */ g(function() {
|
|
847
|
+
return ct;
|
|
848
|
+
}, "getClasses"), Lr = {
|
|
849
|
+
getConfig: /* @__PURE__ */ g(() => rt().block, "getConfig"),
|
|
850
|
+
typeStr2Type: Vt,
|
|
851
|
+
edgeTypeStr2Type: jt,
|
|
852
|
+
edgeStrToEdgeData: Gt,
|
|
853
|
+
edgeStrToEdgeStartData: Zt,
|
|
854
|
+
edgeStrToThickness: qt,
|
|
855
|
+
edgeStrToPattern: Jt,
|
|
856
|
+
getLogger: mr,
|
|
857
|
+
getBlocksFlat: dr,
|
|
858
|
+
getBlocks: pr,
|
|
859
|
+
getEdges: fr,
|
|
860
|
+
setHierarchy: gr,
|
|
861
|
+
getBlock: xr,
|
|
862
|
+
setBlock: yr,
|
|
863
|
+
getColumns: ur,
|
|
864
|
+
getClasses: Sr,
|
|
865
|
+
clear: or,
|
|
866
|
+
generateId: hr,
|
|
867
|
+
setDiagramId: br,
|
|
868
|
+
getDiagramId: wr
|
|
869
|
+
}, kr = Lr, yt = /* @__PURE__ */ g((e, t) => {
|
|
870
|
+
const a = qe, s = a(e, "r"), i = a(e, "g"), c = a(e, "b");
|
|
871
|
+
return We(s, i, c, t);
|
|
872
|
+
}, "fade"), vr = /* @__PURE__ */ g((e) => `.label {
|
|
873
873
|
font-family: ${e.fontFamily};
|
|
874
874
|
color: ${e.nodeTextColor || e.textColor};
|
|
875
875
|
}
|
|
@@ -954,9 +954,9 @@ var Mt = 0, dr = /* @__PURE__ */ d(() => (Mt++, "id-" + Math.random().toString(3
|
|
|
954
954
|
}
|
|
955
955
|
|
|
956
956
|
.node .cluster {
|
|
957
|
-
// fill: ${
|
|
958
|
-
fill: ${
|
|
959
|
-
stroke: ${
|
|
957
|
+
// fill: ${yt(e.mainBkg, 0.5)};
|
|
958
|
+
fill: ${yt(e.clusterBkg, 0.5)};
|
|
959
|
+
stroke: ${yt(e.clusterBorder, 0.2)};
|
|
960
960
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
961
961
|
stroke-width: 1px;
|
|
962
962
|
}
|
|
@@ -991,41 +991,41 @@ var Mt = 0, dr = /* @__PURE__ */ d(() => (Mt++, "id-" + Math.random().toString(3
|
|
|
991
991
|
font-size: 18px;
|
|
992
992
|
fill: ${e.textColor};
|
|
993
993
|
}
|
|
994
|
-
${
|
|
995
|
-
`, "getStyles"),
|
|
994
|
+
${de()}
|
|
995
|
+
`, "getStyles"), Er = vr, _r = /* @__PURE__ */ g((e, t, a, s) => {
|
|
996
996
|
t.forEach((i) => {
|
|
997
|
-
|
|
997
|
+
zr[i](e, a, s);
|
|
998
998
|
});
|
|
999
|
-
}, "insertMarkers"),
|
|
999
|
+
}, "insertMarkers"), Tr = /* @__PURE__ */ g((e, t, a) => {
|
|
1000
1000
|
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");
|
|
1001
|
-
}, "extension"),
|
|
1001
|
+
}, "extension"), Dr = /* @__PURE__ */ g((e, t, a) => {
|
|
1002
1002
|
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");
|
|
1003
|
-
}, "composition"),
|
|
1003
|
+
}, "composition"), Br = /* @__PURE__ */ g((e, t, a) => {
|
|
1004
1004
|
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");
|
|
1005
|
-
}, "aggregation"),
|
|
1005
|
+
}, "aggregation"), Nr = /* @__PURE__ */ g((e, t, a) => {
|
|
1006
1006
|
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");
|
|
1007
|
-
}, "dependency"),
|
|
1007
|
+
}, "dependency"), Ir = /* @__PURE__ */ g((e, t, a) => {
|
|
1008
1008
|
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);
|
|
1009
|
-
}, "lollipop"),
|
|
1009
|
+
}, "lollipop"), Cr = /* @__PURE__ */ g((e, t, a) => {
|
|
1010
1010
|
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");
|
|
1011
|
-
}, "point"),
|
|
1011
|
+
}, "point"), Or = /* @__PURE__ */ g((e, t, a) => {
|
|
1012
1012
|
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");
|
|
1013
|
-
}, "circle"),
|
|
1013
|
+
}, "circle"), Rr = /* @__PURE__ */ g((e, t, a) => {
|
|
1014
1014
|
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");
|
|
1015
|
-
}, "cross"),
|
|
1015
|
+
}, "cross"), Ar = /* @__PURE__ */ g((e, t, a) => {
|
|
1016
1016
|
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");
|
|
1017
|
-
}, "barb"),
|
|
1018
|
-
extension:
|
|
1019
|
-
composition:
|
|
1020
|
-
aggregation:
|
|
1021
|
-
dependency:
|
|
1022
|
-
lollipop:
|
|
1023
|
-
point:
|
|
1024
|
-
circle:
|
|
1025
|
-
cross:
|
|
1026
|
-
barb:
|
|
1027
|
-
},
|
|
1028
|
-
function
|
|
1017
|
+
}, "barb"), zr = {
|
|
1018
|
+
extension: Tr,
|
|
1019
|
+
composition: Dr,
|
|
1020
|
+
aggregation: Br,
|
|
1021
|
+
dependency: Nr,
|
|
1022
|
+
lollipop: Ir,
|
|
1023
|
+
point: Cr,
|
|
1024
|
+
circle: Or,
|
|
1025
|
+
cross: Rr,
|
|
1026
|
+
barb: Ar
|
|
1027
|
+
}, Mr = _r;
|
|
1028
|
+
function mt(e, t) {
|
|
1029
1029
|
if (e === 0 || !Number.isInteger(e))
|
|
1030
1030
|
throw new Error("Columns must be an integer !== 0.");
|
|
1031
1031
|
if (t < 0 || !Number.isInteger(t))
|
|
@@ -1037,8 +1037,8 @@ function St(e, t) {
|
|
|
1037
1037
|
const a = t % e, s = Math.floor(t / e);
|
|
1038
1038
|
return { px: a, py: s };
|
|
1039
1039
|
}
|
|
1040
|
-
|
|
1041
|
-
var
|
|
1040
|
+
g(mt, "calculateBlockPosition");
|
|
1041
|
+
var Pr = /* @__PURE__ */ g((e) => {
|
|
1042
1042
|
let t = 0, a = 0;
|
|
1043
1043
|
for (const s of e.children) {
|
|
1044
1044
|
const { width: i, height: c, x: r, y: n } = s.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
@@ -1061,7 +1061,7 @@ var Wr = /* @__PURE__ */ d((e) => {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
return { width: t, height: a };
|
|
1063
1063
|
}, "getMaxChildSize");
|
|
1064
|
-
function
|
|
1064
|
+
function lt(e, t, a = 0, s = 0, i = 8) {
|
|
1065
1065
|
k.debug(
|
|
1066
1066
|
"setBlockSizes abc95 (start)",
|
|
1067
1067
|
e.id,
|
|
@@ -1076,52 +1076,52 @@ function ot(e, t, a = 0, s = 0) {
|
|
|
1076
1076
|
x: 0,
|
|
1077
1077
|
y: 0
|
|
1078
1078
|
});
|
|
1079
|
-
let
|
|
1079
|
+
let c = 0, r = 0;
|
|
1080
1080
|
if (e.children?.length > 0) {
|
|
1081
|
-
for (const
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
for (const
|
|
1086
|
-
|
|
1087
|
-
`abc95 Setting size of children of ${e.id} id=${
|
|
1088
|
-
),
|
|
1089
|
-
`abc95 updating size of ${e.id} children child:${
|
|
1081
|
+
for (const y of e.children)
|
|
1082
|
+
lt(y, t, 0, 0, i);
|
|
1083
|
+
const n = Pr(e);
|
|
1084
|
+
c = n.width, r = n.height, k.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", c, r);
|
|
1085
|
+
for (const y of e.children)
|
|
1086
|
+
y.size && (k.debug(
|
|
1087
|
+
`abc95 Setting size of children of ${e.id} id=${y.id} ${c} ${r} ${JSON.stringify(y.size)}`
|
|
1088
|
+
), 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(
|
|
1089
|
+
`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${c} maxHeight:${r}`
|
|
1090
1090
|
));
|
|
1091
|
-
for (const
|
|
1092
|
-
|
|
1093
|
-
const
|
|
1094
|
-
let
|
|
1095
|
-
for (const
|
|
1096
|
-
|
|
1097
|
-
let
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
let
|
|
1101
|
-
if (
|
|
1091
|
+
for (const y of e.children)
|
|
1092
|
+
lt(y, t, c, r, i);
|
|
1093
|
+
const l = e.columns ?? -1;
|
|
1094
|
+
let u = 0;
|
|
1095
|
+
for (const y of e.children)
|
|
1096
|
+
u += y.widthInColumns ?? 1;
|
|
1097
|
+
let h = e.children.length;
|
|
1098
|
+
l > 0 && l < u && (h = l);
|
|
1099
|
+
const d = Math.ceil(u / h);
|
|
1100
|
+
let b = h * (c + i) + i, w = d * (r + i) + i;
|
|
1101
|
+
if (b < a) {
|
|
1102
1102
|
k.debug(
|
|
1103
|
-
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${
|
|
1104
|
-
),
|
|
1105
|
-
const
|
|
1106
|
-
k.debug("Size indata abc88", e.id, "childWidth",
|
|
1107
|
-
for (const
|
|
1108
|
-
|
|
1103
|
+
`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${b}`
|
|
1104
|
+
), b = a, w = s;
|
|
1105
|
+
const y = (a - h * i - i) / h, v = (s - d * i - i) / d;
|
|
1106
|
+
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);
|
|
1107
|
+
for (const S of e.children)
|
|
1108
|
+
S.size && (S.size.width = y, S.size.height = v, S.size.x = 0, S.size.y = 0);
|
|
1109
1109
|
}
|
|
1110
1110
|
if (k.debug(
|
|
1111
|
-
`abc95 (finale calc) ${e.id} xSize ${
|
|
1112
|
-
),
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
if (
|
|
1116
|
-
const
|
|
1117
|
-
k.debug("abc95 (growing to fit) width", e.id,
|
|
1118
|
-
for (const
|
|
1119
|
-
|
|
1111
|
+
`abc95 (finale calc) ${e.id} xSize ${h} ySize ${d} columns ${l}${e.children.length} width=${Math.max(b, e.size?.width || 0)}`
|
|
1112
|
+
), b < (e?.size?.width || 0)) {
|
|
1113
|
+
b = e?.size?.width || 0;
|
|
1114
|
+
const y = l > 0 ? Math.min(e.children.length, l) : e.children.length;
|
|
1115
|
+
if (y > 0) {
|
|
1116
|
+
const v = (b - y * i - i) / y;
|
|
1117
|
+
k.debug("abc95 (growing to fit) width", e.id, b, e.size?.width, v);
|
|
1118
|
+
for (const S of e.children)
|
|
1119
|
+
S.size && (S.size.width = v);
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
1122
|
e.size = {
|
|
1123
|
-
width:
|
|
1124
|
-
height:
|
|
1123
|
+
width: b,
|
|
1124
|
+
height: w,
|
|
1125
1125
|
x: 0,
|
|
1126
1126
|
y: 0
|
|
1127
1127
|
};
|
|
@@ -1135,90 +1135,91 @@ function ot(e, t, a = 0, s = 0) {
|
|
|
1135
1135
|
e?.size?.height
|
|
1136
1136
|
);
|
|
1137
1137
|
}
|
|
1138
|
-
|
|
1139
|
-
function
|
|
1138
|
+
g(lt, "setBlockSizes");
|
|
1139
|
+
function Tt(e, t, a = 8) {
|
|
1140
1140
|
k.debug(
|
|
1141
1141
|
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1142
1142
|
);
|
|
1143
|
-
const
|
|
1144
|
-
if (k.debug("layoutBlocks columns abc95", e.id, "=>",
|
|
1143
|
+
const s = e.columns ?? -1;
|
|
1144
|
+
if (k.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
|
|
1145
1145
|
e.children.length > 0) {
|
|
1146
|
-
const
|
|
1147
|
-
k.debug("widthOfChildren 88",
|
|
1148
|
-
const
|
|
1146
|
+
const i = e?.children[0]?.size?.width ?? 0, c = e.children.length * i + (e.children.length - 1) * a;
|
|
1147
|
+
k.debug("widthOfChildren 88", c, "posX");
|
|
1148
|
+
const r = /* @__PURE__ */ new Map();
|
|
1149
1149
|
{
|
|
1150
|
-
let
|
|
1151
|
-
for (const
|
|
1152
|
-
if (!
|
|
1150
|
+
let d = 0;
|
|
1151
|
+
for (const b of e.children) {
|
|
1152
|
+
if (!b.size)
|
|
1153
1153
|
continue;
|
|
1154
|
-
const { py:
|
|
1155
|
-
|
|
1156
|
-
let
|
|
1157
|
-
|
|
1154
|
+
const { py: w } = mt(s, d), y = r.get(w) ?? 0;
|
|
1155
|
+
b.size.height > y && r.set(w, b.size.height);
|
|
1156
|
+
let v = b?.widthInColumns ?? 1;
|
|
1157
|
+
s > 0 && (v = Math.min(v, s - d % s)), d += v;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
const
|
|
1160
|
+
const n = /* @__PURE__ */ new Map();
|
|
1161
1161
|
{
|
|
1162
|
-
let
|
|
1163
|
-
const
|
|
1164
|
-
for (const
|
|
1165
|
-
|
|
1162
|
+
let d = 0;
|
|
1163
|
+
const b = [...r.keys()].sort((w, y) => w - y);
|
|
1164
|
+
for (const w of b)
|
|
1165
|
+
n.set(w, d), d += (r.get(w) ?? 0) + a;
|
|
1166
1166
|
}
|
|
1167
|
-
let
|
|
1167
|
+
let l = 0;
|
|
1168
1168
|
k.debug("abc91 block?.size?.x", e.id, e?.size?.x);
|
|
1169
|
-
let
|
|
1170
|
-
for (const
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1169
|
+
let u = e?.size?.x ? e?.size?.x + (-e?.size?.width / 2 || 0) : -a, h = 0;
|
|
1170
|
+
for (const d of e.children) {
|
|
1171
|
+
const b = e;
|
|
1172
|
+
if (!d.size)
|
|
1173
1173
|
continue;
|
|
1174
|
-
const { width:
|
|
1175
|
-
if (
|
|
1176
|
-
`abc89 layout blocks (child) id: ${
|
|
1177
|
-
),
|
|
1178
|
-
const _ =
|
|
1179
|
-
|
|
1180
|
-
`abc91 layout blocks (calc) px, pyid:${
|
|
1181
|
-
),
|
|
1182
|
-
const
|
|
1183
|
-
|
|
1184
|
-
`abc88 layout blocks (calc) px, pyid:${
|
|
1174
|
+
const { width: w, height: y } = d.size, { px: v, py: S } = mt(s, l);
|
|
1175
|
+
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(
|
|
1176
|
+
`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}`
|
|
1177
|
+
), b.size) {
|
|
1178
|
+
const _ = w / 2;
|
|
1179
|
+
d.size.x = u + a + _, k.debug(
|
|
1180
|
+
`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}`
|
|
1181
|
+
), u = d.size.x + _;
|
|
1182
|
+
const T = n.get(S) ?? 0, m = r.get(S) ?? y;
|
|
1183
|
+
d.size.y = b.size.y - b.size.height / 2 + T + m / 2 + a, k.debug(
|
|
1184
|
+
`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}`
|
|
1185
1185
|
);
|
|
1186
1186
|
}
|
|
1187
|
-
|
|
1188
|
-
let
|
|
1189
|
-
|
|
1187
|
+
d.children && Tt(d, t, a);
|
|
1188
|
+
let N = d?.widthInColumns ?? 1;
|
|
1189
|
+
s > 0 && (N = Math.min(N, s - l % s)), l += N, k.debug("abc88 columnsPos", d, l);
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
k.debug(
|
|
1193
1193
|
`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`
|
|
1194
1194
|
);
|
|
1195
1195
|
}
|
|
1196
|
-
|
|
1197
|
-
function
|
|
1196
|
+
g(Tt, "layoutBlocks");
|
|
1197
|
+
function Dt(e, { minX: t, minY: a, maxX: s, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1198
1198
|
if (e.size && e.id !== "root") {
|
|
1199
1199
|
const { x: c, y: r, width: n, height: l } = e.size;
|
|
1200
1200
|
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);
|
|
1201
1201
|
}
|
|
1202
1202
|
if (e.children)
|
|
1203
1203
|
for (const c of e.children)
|
|
1204
|
-
({ minX: t, minY: a, maxX: s, maxY: i } =
|
|
1204
|
+
({ minX: t, minY: a, maxX: s, maxY: i } = Dt(c, { minX: t, minY: a, maxX: s, maxY: i }));
|
|
1205
1205
|
return { minX: t, minY: a, maxX: s, maxY: i };
|
|
1206
1206
|
}
|
|
1207
|
-
|
|
1208
|
-
function
|
|
1207
|
+
g(Dt, "findBounds");
|
|
1208
|
+
function Qt(e) {
|
|
1209
1209
|
const t = e.getBlock("root");
|
|
1210
1210
|
if (!t)
|
|
1211
1211
|
return;
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1212
|
+
const a = R()?.block?.padding ?? 8;
|
|
1213
|
+
lt(t, e, 0, 0, a), Tt(t, e, a), k.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1214
|
+
const { minX: s, minY: i, maxX: c, maxY: r } = Dt(t), n = r - i, l = c - s;
|
|
1215
|
+
return { x: s, y: i, width: l, height: n };
|
|
1215
1216
|
}
|
|
1216
|
-
|
|
1217
|
-
var
|
|
1217
|
+
g(Qt, "layout");
|
|
1218
|
+
var Fr = /* @__PURE__ */ g(async (e, t, a, s = !1, i = !1) => {
|
|
1218
1219
|
let c = t || "";
|
|
1219
1220
|
typeof c == "object" && (c = c[0]);
|
|
1220
|
-
const r =
|
|
1221
|
-
return await
|
|
1221
|
+
const r = R(), n = M(r);
|
|
1222
|
+
return await kt(
|
|
1222
1223
|
e,
|
|
1223
1224
|
c,
|
|
1224
1225
|
{
|
|
@@ -1231,9 +1232,9 @@ var Yr = /* @__PURE__ */ d(async (e, t, a, s = !1, i = !1) => {
|
|
|
1231
1232
|
},
|
|
1232
1233
|
r
|
|
1233
1234
|
);
|
|
1234
|
-
}, "createLabel"),
|
|
1235
|
-
t.arrowTypeStart &&
|
|
1236
|
-
}, "addEdgeMarkers"),
|
|
1235
|
+
}, "createLabel"), K = Fr, Wr = /* @__PURE__ */ g((e, t, a, s, i) => {
|
|
1236
|
+
t.arrowTypeStart && Mt(e, "start", t.arrowTypeStart, a, s, i), t.arrowTypeEnd && Mt(e, "end", t.arrowTypeEnd, a, s, i);
|
|
1237
|
+
}, "addEdgeMarkers"), Yr = {
|
|
1237
1238
|
arrow_cross: "cross",
|
|
1238
1239
|
arrow_point: "point",
|
|
1239
1240
|
arrow_barb: "barb",
|
|
@@ -1243,16 +1244,16 @@ var Yr = /* @__PURE__ */ d(async (e, t, a, s = !1, i = !1) => {
|
|
|
1243
1244
|
composition: "composition",
|
|
1244
1245
|
dependency: "dependency",
|
|
1245
1246
|
lollipop: "lollipop"
|
|
1246
|
-
},
|
|
1247
|
-
const r =
|
|
1247
|
+
}, Mt = /* @__PURE__ */ g((e, t, a, s, i, c) => {
|
|
1248
|
+
const r = Yr[a];
|
|
1248
1249
|
if (!r) {
|
|
1249
1250
|
k.warn(`Unknown arrow type: ${a}`);
|
|
1250
1251
|
return;
|
|
1251
1252
|
}
|
|
1252
1253
|
const n = t === "start" ? "Start" : "End";
|
|
1253
1254
|
e.attr(`marker-${t}`, `url(${s}#${i}_${c}-${r}${n})`);
|
|
1254
|
-
}, "addEdgeMarker"),
|
|
1255
|
-
const a =
|
|
1255
|
+
}, "addEdgeMarker"), St = {}, z = {}, Hr = /* @__PURE__ */ g(async (e, t) => {
|
|
1256
|
+
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(
|
|
1256
1257
|
e,
|
|
1257
1258
|
t.label,
|
|
1258
1259
|
{
|
|
@@ -1269,75 +1270,75 @@ var Yr = /* @__PURE__ */ d(async (e, t, a, s = !1, i = !1) => {
|
|
|
1269
1270
|
a
|
|
1270
1271
|
);
|
|
1271
1272
|
c.node().appendChild(n);
|
|
1272
|
-
let l = n.getBBox(),
|
|
1273
|
+
let l = n.getBBox(), u = l;
|
|
1273
1274
|
if (s) {
|
|
1274
|
-
const
|
|
1275
|
-
l =
|
|
1275
|
+
const d = n.children[0], b = D(n);
|
|
1276
|
+
l = d.getBoundingClientRect(), u = l, b.attr("width", l.width), b.attr("height", l.height);
|
|
1276
1277
|
} else {
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1278
|
+
const d = D(n).select("text").node();
|
|
1279
|
+
d && typeof d.getBBox == "function" && (u = d.getBBox());
|
|
1279
1280
|
}
|
|
1280
|
-
c.attr("transform",
|
|
1281
|
-
let
|
|
1281
|
+
c.attr("transform", Q(u, s)), St[t.id] = i, t.width = l.width, t.height = l.height;
|
|
1282
|
+
let h;
|
|
1282
1283
|
if (t.startLabelLeft) {
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
let
|
|
1284
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelLeft, t.labelStyle);
|
|
1285
|
+
h = w;
|
|
1286
|
+
let y = w.getBBox();
|
|
1286
1287
|
if (s) {
|
|
1287
|
-
const v =
|
|
1288
|
-
|
|
1288
|
+
const v = w.children[0], S = D(w);
|
|
1289
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1289
1290
|
}
|
|
1290
|
-
b.attr("transform",
|
|
1291
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startLeft = d, tt(h, t.startLabelLeft);
|
|
1291
1292
|
}
|
|
1292
1293
|
if (t.startLabelRight) {
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
let
|
|
1294
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(b, t.startLabelRight, t.labelStyle);
|
|
1295
|
+
h = w;
|
|
1296
|
+
let y = w.getBBox();
|
|
1296
1297
|
if (s) {
|
|
1297
|
-
const v =
|
|
1298
|
-
|
|
1298
|
+
const v = w.children[0], S = D(w);
|
|
1299
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1299
1300
|
}
|
|
1300
|
-
b.attr("transform",
|
|
1301
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].startRight = d, tt(h, t.startLabelRight);
|
|
1301
1302
|
}
|
|
1302
1303
|
if (t.endLabelLeft) {
|
|
1303
|
-
const
|
|
1304
|
-
|
|
1305
|
-
let
|
|
1304
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(d, t.endLabelLeft, t.labelStyle);
|
|
1305
|
+
h = w;
|
|
1306
|
+
let y = w.getBBox();
|
|
1306
1307
|
if (s) {
|
|
1307
|
-
const v =
|
|
1308
|
-
|
|
1308
|
+
const v = w.children[0], S = D(w);
|
|
1309
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1309
1310
|
}
|
|
1310
|
-
b.attr("transform",
|
|
1311
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endLeft = d, tt(h, t.endLabelLeft);
|
|
1311
1312
|
}
|
|
1312
1313
|
if (t.endLabelRight) {
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1314
|
+
const d = e.insert("g").attr("class", "edgeTerminals"), b = d.insert("g").attr("class", "inner"), w = await K(
|
|
1315
|
+
d,
|
|
1315
1316
|
t.endLabelRight,
|
|
1316
1317
|
t.labelStyle
|
|
1317
1318
|
);
|
|
1318
|
-
|
|
1319
|
-
let
|
|
1319
|
+
h = w;
|
|
1320
|
+
let y = w.getBBox();
|
|
1320
1321
|
if (s) {
|
|
1321
|
-
const v =
|
|
1322
|
-
|
|
1322
|
+
const v = w.children[0], S = D(w);
|
|
1323
|
+
y = v.getBoundingClientRect(), S.attr("width", y.width), S.attr("height", y.height);
|
|
1323
1324
|
}
|
|
1324
|
-
b.attr("transform",
|
|
1325
|
+
b.attr("transform", Q(y, s)), z[t.id] || (z[t.id] = {}), z[t.id].endRight = d, tt(h, t.endLabelRight);
|
|
1325
1326
|
}
|
|
1326
1327
|
return n;
|
|
1327
1328
|
}, "insertEdgeLabel");
|
|
1328
|
-
function
|
|
1329
|
-
|
|
1329
|
+
function tt(e, t) {
|
|
1330
|
+
M(R()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1330
1331
|
}
|
|
1331
|
-
|
|
1332
|
-
var
|
|
1333
|
-
k.debug("Moving label abc88 ", e.id, e.label,
|
|
1332
|
+
g(tt, "setTerminalWidth");
|
|
1333
|
+
var Kr = /* @__PURE__ */ g((e, t) => {
|
|
1334
|
+
k.debug("Moving label abc88 ", e.id, e.label, St[e.id], t);
|
|
1334
1335
|
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1335
|
-
const s =
|
|
1336
|
+
const s = R(), { subGraphTitleTotalMargin: i } = Xe(s);
|
|
1336
1337
|
if (e.label) {
|
|
1337
|
-
const c =
|
|
1338
|
+
const c = St[e.id];
|
|
1338
1339
|
let r = e.x, n = e.y;
|
|
1339
1340
|
if (a) {
|
|
1340
|
-
const l =
|
|
1341
|
+
const l = $.calcLabelPosition(a);
|
|
1341
1342
|
k.debug(
|
|
1342
1343
|
"Moving label " + e.label + " from (",
|
|
1343
1344
|
r,
|
|
@@ -1353,19 +1354,19 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1353
1354
|
c.attr("transform", `translate(${r}, ${n + i / 2})`);
|
|
1354
1355
|
}
|
|
1355
1356
|
if (e.startLabelLeft) {
|
|
1356
|
-
const c =
|
|
1357
|
+
const c = z[e.id].startLeft;
|
|
1357
1358
|
let r = e.x, n = e.y;
|
|
1358
1359
|
if (a) {
|
|
1359
|
-
const l =
|
|
1360
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
1360
1361
|
r = l.x, n = l.y;
|
|
1361
1362
|
}
|
|
1362
1363
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1363
1364
|
}
|
|
1364
1365
|
if (e.startLabelRight) {
|
|
1365
|
-
const c =
|
|
1366
|
+
const c = z[e.id].startRight;
|
|
1366
1367
|
let r = e.x, n = e.y;
|
|
1367
1368
|
if (a) {
|
|
1368
|
-
const l =
|
|
1369
|
+
const l = $.calcTerminalLabelPosition(
|
|
1369
1370
|
e.arrowTypeStart ? 10 : 0,
|
|
1370
1371
|
"start_right",
|
|
1371
1372
|
a
|
|
@@ -1375,53 +1376,53 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1375
1376
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1376
1377
|
}
|
|
1377
1378
|
if (e.endLabelLeft) {
|
|
1378
|
-
const c =
|
|
1379
|
+
const c = z[e.id].endLeft;
|
|
1379
1380
|
let r = e.x, n = e.y;
|
|
1380
1381
|
if (a) {
|
|
1381
|
-
const l =
|
|
1382
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
1382
1383
|
r = l.x, n = l.y;
|
|
1383
1384
|
}
|
|
1384
1385
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1385
1386
|
}
|
|
1386
1387
|
if (e.endLabelRight) {
|
|
1387
|
-
const c =
|
|
1388
|
+
const c = z[e.id].endRight;
|
|
1388
1389
|
let r = e.x, n = e.y;
|
|
1389
1390
|
if (a) {
|
|
1390
|
-
const l =
|
|
1391
|
+
const l = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
1391
1392
|
r = l.x, n = l.y;
|
|
1392
1393
|
}
|
|
1393
1394
|
c.attr("transform", `translate(${r}, ${n})`);
|
|
1394
1395
|
}
|
|
1395
|
-
}, "positionEdgeLabel"),
|
|
1396
|
+
}, "positionEdgeLabel"), Ur = /* @__PURE__ */ g((e, t) => {
|
|
1396
1397
|
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;
|
|
1397
1398
|
return i >= r || c >= n;
|
|
1398
|
-
}, "outsideNode"),
|
|
1399
|
+
}, "outsideNode"), Xr = /* @__PURE__ */ g((e, t, a) => {
|
|
1399
1400
|
k.debug(`intersection calc abc89:
|
|
1400
1401
|
outsidePoint: ${JSON.stringify(t)}
|
|
1401
1402
|
insidePoint : ${JSON.stringify(a)}
|
|
1402
1403
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1403
1404
|
const s = e.x, i = e.y, c = Math.abs(s - a.x), r = e.width / 2;
|
|
1404
1405
|
let n = a.x < t.x ? r - c : r + c;
|
|
1405
|
-
const l = e.height / 2,
|
|
1406
|
+
const l = e.height / 2, u = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
|
|
1406
1407
|
if (Math.abs(i - t.y) * r > Math.abs(s - t.x) * l) {
|
|
1407
|
-
let
|
|
1408
|
-
n =
|
|
1408
|
+
let d = a.y < t.y ? t.y - l - i : i - l - t.y;
|
|
1409
|
+
n = h * d / u;
|
|
1409
1410
|
const b = {
|
|
1410
|
-
x: a.x < t.x ? a.x + n : a.x -
|
|
1411
|
-
y: a.y < t.y ? a.y +
|
|
1411
|
+
x: a.x < t.x ? a.x + n : a.x - h + n,
|
|
1412
|
+
y: a.y < t.y ? a.y + u - d : a.y - u + d
|
|
1412
1413
|
};
|
|
1413
|
-
return n === 0 && (b.x = t.x, b.y = t.y),
|
|
1414
|
+
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;
|
|
1414
1415
|
} else {
|
|
1415
1416
|
a.x < t.x ? n = t.x - r - s : n = s - r - t.x;
|
|
1416
|
-
let
|
|
1417
|
-
return k.debug(`sides calc abc89, Q ${
|
|
1417
|
+
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;
|
|
1418
|
+
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 };
|
|
1418
1419
|
}
|
|
1419
|
-
}, "intersection"),
|
|
1420
|
+
}, "intersection"), Pt = /* @__PURE__ */ g((e, t) => {
|
|
1420
1421
|
k.debug("abc88 cutPathAtIntersect", e, t);
|
|
1421
1422
|
let a = [], s = e[0], i = !1;
|
|
1422
1423
|
return e.forEach((c) => {
|
|
1423
|
-
if (!
|
|
1424
|
-
const r =
|
|
1424
|
+
if (!Ur(t, c) && !i) {
|
|
1425
|
+
const r = Xr(t, s, c);
|
|
1425
1426
|
let n = !1;
|
|
1426
1427
|
a.forEach((l) => {
|
|
1427
1428
|
n = n || l.x === r.x && l.y === r.y;
|
|
@@ -1429,17 +1430,17 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1429
1430
|
} else
|
|
1430
1431
|
s = c, i || a.push(c);
|
|
1431
1432
|
}), a;
|
|
1432
|
-
}, "cutPathAtIntersect"),
|
|
1433
|
+
}, "cutPathAtIntersect"), Vr = /* @__PURE__ */ g(function(e, t, a, s, i, c, r) {
|
|
1433
1434
|
let n = a.points;
|
|
1434
1435
|
k.debug("abc88 InsertEdge: edge=", a, "e=", t);
|
|
1435
1436
|
let l = !1;
|
|
1436
|
-
const
|
|
1437
|
-
var
|
|
1438
|
-
|
|
1439
|
-
const
|
|
1440
|
-
let b =
|
|
1437
|
+
const u = c.node(t.v);
|
|
1438
|
+
var h = c.node(t.w);
|
|
1439
|
+
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);
|
|
1440
|
+
const d = n.filter((m) => !Number.isNaN(m.y));
|
|
1441
|
+
let b = Ke;
|
|
1441
1442
|
a.curve && (i === "graph" || i === "flowchart") && (b = a.curve);
|
|
1442
|
-
const { x, y
|
|
1443
|
+
const { x: w, y } = Ye(a), v = He().x(w).y(y).curve(b);
|
|
1443
1444
|
let S;
|
|
1444
1445
|
switch (a.thickness) {
|
|
1445
1446
|
case "normal":
|
|
@@ -1465,12 +1466,12 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1465
1466
|
S += " edge-pattern-dashed";
|
|
1466
1467
|
break;
|
|
1467
1468
|
}
|
|
1468
|
-
const
|
|
1469
|
-
let
|
|
1470
|
-
(
|
|
1469
|
+
const N = e.append("path").attr("d", v(d)).attr("id", a.id).attr("class", " " + S + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
1470
|
+
let _ = "";
|
|
1471
|
+
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = Ue(!0)), Wr(N, a, _, r, i);
|
|
1471
1472
|
let T = {};
|
|
1472
1473
|
return l && (T.updatedPath = n), T.originalPath = a.points, T;
|
|
1473
|
-
}, "insertEdge"),
|
|
1474
|
+
}, "insertEdge"), jr = /* @__PURE__ */ g((e) => {
|
|
1474
1475
|
const t = /* @__PURE__ */ new Set();
|
|
1475
1476
|
for (const a of e)
|
|
1476
1477
|
switch (a) {
|
|
@@ -1485,28 +1486,28 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1485
1486
|
break;
|
|
1486
1487
|
}
|
|
1487
1488
|
return t;
|
|
1488
|
-
}, "expandAndDeduplicateDirections"),
|
|
1489
|
-
const i =
|
|
1489
|
+
}, "expandAndDeduplicateDirections"), Gr = /* @__PURE__ */ g((e, t, a, s) => {
|
|
1490
|
+
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;
|
|
1490
1491
|
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1491
1492
|
// Bottom
|
|
1492
1493
|
{ x: 0, y: 0 },
|
|
1493
1494
|
{ x: n, y: 0 },
|
|
1494
|
-
{ x: l / 2, y: 2 *
|
|
1495
|
+
{ x: l / 2, y: 2 * u },
|
|
1495
1496
|
{ x: l - n, y: 0 },
|
|
1496
1497
|
{ x: l, y: 0 },
|
|
1497
1498
|
// Right
|
|
1498
1499
|
{ x: l, y: -r / 3 },
|
|
1499
|
-
{ x: l + 2 *
|
|
1500
|
+
{ x: l + 2 * u, y: -r / 2 },
|
|
1500
1501
|
{ x: l, y: -2 * r / 3 },
|
|
1501
1502
|
{ x: l, y: -r },
|
|
1502
1503
|
// Top
|
|
1503
1504
|
{ x: l - n, y: -r },
|
|
1504
|
-
{ x: l / 2, y: -r - 2 *
|
|
1505
|
+
{ x: l / 2, y: -r - 2 * u },
|
|
1505
1506
|
{ x: n, y: -r },
|
|
1506
1507
|
// Left
|
|
1507
1508
|
{ x: 0, y: -r },
|
|
1508
1509
|
{ x: 0, y: -2 * r / 3 },
|
|
1509
|
-
{ x: -2 *
|
|
1510
|
+
{ x: -2 * u, y: -r / 2 },
|
|
1510
1511
|
{ x: 0, y: -r / 3 }
|
|
1511
1512
|
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
1512
1513
|
{ x: n, y: 0 },
|
|
@@ -1532,31 +1533,31 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1532
1533
|
{ x: l, y: -r }
|
|
1533
1534
|
] : i.has("right") && i.has("left") ? [
|
|
1534
1535
|
{ x: n, y: 0 },
|
|
1535
|
-
{ x: n, y: -
|
|
1536
|
-
{ x: l - n, y: -
|
|
1536
|
+
{ x: n, y: -u },
|
|
1537
|
+
{ x: l - n, y: -u },
|
|
1537
1538
|
{ x: l - n, y: 0 },
|
|
1538
1539
|
{ x: l, y: -r / 2 },
|
|
1539
1540
|
{ x: l - n, y: -r },
|
|
1540
|
-
{ x: l - n, y: -r +
|
|
1541
|
-
{ x: n, y: -r +
|
|
1541
|
+
{ x: l - n, y: -r + u },
|
|
1542
|
+
{ x: n, y: -r + u },
|
|
1542
1543
|
{ x: n, y: -r },
|
|
1543
1544
|
{ x: 0, y: -r / 2 }
|
|
1544
1545
|
] : i.has("up") && i.has("down") ? [
|
|
1545
1546
|
// Bottom center
|
|
1546
1547
|
{ x: l / 2, y: 0 },
|
|
1547
|
-
// Left
|
|
1548
|
-
{ x: 0, y: -
|
|
1549
|
-
{ x: n, y: -
|
|
1548
|
+
// Left point of bottom arrow
|
|
1549
|
+
{ x: 0, y: -u },
|
|
1550
|
+
{ x: n, y: -u },
|
|
1550
1551
|
// Left top over vertical section
|
|
1551
|
-
{ x: n, y: -r +
|
|
1552
|
-
{ x: 0, y: -r +
|
|
1552
|
+
{ x: n, y: -r + u },
|
|
1553
|
+
{ x: 0, y: -r + u },
|
|
1553
1554
|
// Top of arrow
|
|
1554
1555
|
{ x: l / 2, y: -r },
|
|
1555
|
-
{ x: l, y: -r +
|
|
1556
|
+
{ x: l, y: -r + u },
|
|
1556
1557
|
// Top of right vertical bar
|
|
1557
|
-
{ x: l - n, y: -r +
|
|
1558
|
-
{ x: l - n, y: -
|
|
1559
|
-
{ x: l, y: -
|
|
1558
|
+
{ x: l - n, y: -r + u },
|
|
1559
|
+
{ x: l - n, y: -u },
|
|
1560
|
+
{ x: l, y: -u }
|
|
1560
1561
|
] : i.has("right") && i.has("up") ? [
|
|
1561
1562
|
{ x: 0, y: 0 },
|
|
1562
1563
|
{ x: l, y: -n },
|
|
@@ -1574,145 +1575,145 @@ var Xr = /* @__PURE__ */ d((e, t) => {
|
|
|
1574
1575
|
{ x: 0, y: 0 },
|
|
1575
1576
|
{ x: l, y: -r }
|
|
1576
1577
|
] : i.has("right") ? [
|
|
1577
|
-
{ x: n, y: -
|
|
1578
|
-
{ x: n, y: -
|
|
1579
|
-
{ x: l - n, y: -
|
|
1578
|
+
{ x: n, y: -u },
|
|
1579
|
+
{ x: n, y: -u },
|
|
1580
|
+
{ x: l - n, y: -u },
|
|
1580
1581
|
{ x: l - n, y: 0 },
|
|
1581
1582
|
{ x: l, y: -r / 2 },
|
|
1582
1583
|
{ x: l - n, y: -r },
|
|
1583
|
-
{ x: l - n, y: -r +
|
|
1584
|
+
{ x: l - n, y: -r + u },
|
|
1584
1585
|
// top left corner of arrow
|
|
1585
|
-
{ x: n, y: -r +
|
|
1586
|
-
{ x: n, y: -r +
|
|
1586
|
+
{ x: n, y: -r + u },
|
|
1587
|
+
{ x: n, y: -r + u }
|
|
1587
1588
|
] : i.has("left") ? [
|
|
1588
1589
|
{ x: n, y: 0 },
|
|
1589
|
-
{ x: n, y: -
|
|
1590
|
+
{ x: n, y: -u },
|
|
1590
1591
|
// Two points, the right corners
|
|
1591
|
-
{ x: l - n, y: -
|
|
1592
|
-
{ x: l - n, y: -r +
|
|
1593
|
-
{ x: n, y: -r +
|
|
1592
|
+
{ x: l - n, y: -u },
|
|
1593
|
+
{ x: l - n, y: -r + u },
|
|
1594
|
+
{ x: n, y: -r + u },
|
|
1594
1595
|
{ x: n, y: -r },
|
|
1595
1596
|
{ x: 0, y: -r / 2 }
|
|
1596
1597
|
] : i.has("up") ? [
|
|
1597
1598
|
// Bottom center
|
|
1598
|
-
{ x: n, y: -
|
|
1599
|
+
{ x: n, y: -u },
|
|
1599
1600
|
// Left top over vertical section
|
|
1600
|
-
{ x: n, y: -r +
|
|
1601
|
-
{ x: 0, y: -r +
|
|
1601
|
+
{ x: n, y: -r + u },
|
|
1602
|
+
{ x: 0, y: -r + u },
|
|
1602
1603
|
// Top of arrow
|
|
1603
1604
|
{ x: l / 2, y: -r },
|
|
1604
|
-
{ x: l, y: -r +
|
|
1605
|
+
{ x: l, y: -r + u },
|
|
1605
1606
|
// Top of right vertical bar
|
|
1606
|
-
{ x: l - n, y: -r +
|
|
1607
|
-
{ x: l - n, y: -
|
|
1607
|
+
{ x: l - n, y: -r + u },
|
|
1608
|
+
{ x: l - n, y: -u }
|
|
1608
1609
|
] : i.has("down") ? [
|
|
1609
1610
|
// Bottom center
|
|
1610
1611
|
{ x: l / 2, y: 0 },
|
|
1611
|
-
// Left
|
|
1612
|
-
{ x: 0, y: -
|
|
1613
|
-
{ x: n, y: -
|
|
1612
|
+
// Left point of bottom arrow
|
|
1613
|
+
{ x: 0, y: -u },
|
|
1614
|
+
{ x: n, y: -u },
|
|
1614
1615
|
// Left top over vertical section
|
|
1615
|
-
{ x: n, y: -r +
|
|
1616
|
-
{ x: l - n, y: -r +
|
|
1617
|
-
{ x: l - n, y: -
|
|
1618
|
-
{ x: l, y: -
|
|
1616
|
+
{ x: n, y: -r + u },
|
|
1617
|
+
{ x: l - n, y: -r + u },
|
|
1618
|
+
{ x: l - n, y: -u },
|
|
1619
|
+
{ x: l, y: -u }
|
|
1619
1620
|
] : [{ x: 0, y: 0 }];
|
|
1620
1621
|
}, "getArrowPoints");
|
|
1621
|
-
function
|
|
1622
|
+
function $t(e, t) {
|
|
1622
1623
|
return e.intersect(t);
|
|
1623
1624
|
}
|
|
1624
|
-
|
|
1625
|
-
var
|
|
1626
|
-
function
|
|
1627
|
-
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),
|
|
1628
|
-
s.x < i && (
|
|
1629
|
-
var
|
|
1630
|
-
return s.y < c && (
|
|
1625
|
+
g($t, "intersectNode");
|
|
1626
|
+
var Zr = $t;
|
|
1627
|
+
function te(e, t, a, s) {
|
|
1628
|
+
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);
|
|
1629
|
+
s.x < i && (u = -u);
|
|
1630
|
+
var h = Math.abs(t * a * n / l);
|
|
1631
|
+
return s.y < c && (h = -h), { x: i + u, y: c + h };
|
|
1631
1632
|
}
|
|
1632
|
-
|
|
1633
|
-
var
|
|
1634
|
-
function
|
|
1635
|
-
return
|
|
1633
|
+
g(te, "intersectEllipse");
|
|
1634
|
+
var ee = te;
|
|
1635
|
+
function re(e, t, a) {
|
|
1636
|
+
return ee(e, t, t, a);
|
|
1636
1637
|
}
|
|
1637
|
-
|
|
1638
|
-
var
|
|
1639
|
-
function
|
|
1640
|
-
var i, c, r, n, l,
|
|
1641
|
-
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,
|
|
1642
|
-
return v = Math.abs(
|
|
1638
|
+
g(re, "intersectCircle");
|
|
1639
|
+
var qr = re;
|
|
1640
|
+
function ae(e, t, a, s) {
|
|
1641
|
+
var i, c, r, n, l, u, h, d, b, w, y, v, S, N, _;
|
|
1642
|
+
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)))
|
|
1643
|
+
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: _ };
|
|
1643
1644
|
}
|
|
1644
|
-
|
|
1645
|
-
function
|
|
1645
|
+
g(ae, "intersectLine");
|
|
1646
|
+
function Lt(e, t) {
|
|
1646
1647
|
return e * t > 0;
|
|
1647
1648
|
}
|
|
1648
|
-
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
1649
|
+
g(Lt, "sameSign");
|
|
1650
|
+
var Jr = ae, Qr = se;
|
|
1651
|
+
function se(e, t, a) {
|
|
1651
1652
|
var s = e.x, i = e.y, c = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1652
|
-
typeof t.forEach == "function" ? t.forEach(function(
|
|
1653
|
-
r = Math.min(r,
|
|
1653
|
+
typeof t.forEach == "function" ? t.forEach(function(y) {
|
|
1654
|
+
r = Math.min(r, y.x), n = Math.min(n, y.y);
|
|
1654
1655
|
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1655
|
-
for (var l = s - e.width / 2 - r,
|
|
1656
|
-
var
|
|
1656
|
+
for (var l = s - e.width / 2 - r, u = i - e.height / 2 - n, h = 0; h < t.length; h++) {
|
|
1657
|
+
var d = t[h], b = t[h < t.length - 1 ? h + 1 : 0], w = Jr(
|
|
1657
1658
|
e,
|
|
1658
1659
|
a,
|
|
1659
|
-
{ x: l +
|
|
1660
|
-
{ x: l + b.x, y:
|
|
1660
|
+
{ x: l + d.x, y: u + d.y },
|
|
1661
|
+
{ x: l + b.x, y: u + b.y }
|
|
1661
1662
|
);
|
|
1662
|
-
|
|
1663
|
+
w && c.push(w);
|
|
1663
1664
|
}
|
|
1664
|
-
return c.length ? (c.length > 1 && c.sort(function(
|
|
1665
|
-
var S =
|
|
1666
|
-
return
|
|
1665
|
+
return c.length ? (c.length > 1 && c.sort(function(y, v) {
|
|
1666
|
+
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, p = Math.sqrt(T * T + m * m);
|
|
1667
|
+
return _ < p ? -1 : _ === p ? 0 : 1;
|
|
1667
1668
|
}), c[0]) : e;
|
|
1668
1669
|
}
|
|
1669
|
-
|
|
1670
|
-
var
|
|
1671
|
-
var a = e.x, s = e.y, i = t.x - a, c = t.y - s, r = e.width / 2, n = e.height / 2, l,
|
|
1672
|
-
return Math.abs(c) * r > Math.abs(i) * n ? (c < 0 && (n = -n), l = c === 0 ? 0 : n * i / c,
|
|
1673
|
-
}, "intersectRect"),
|
|
1674
|
-
node:
|
|
1675
|
-
circle:
|
|
1676
|
-
ellipse:
|
|
1677
|
-
polygon:
|
|
1678
|
-
rect:
|
|
1679
|
-
},
|
|
1680
|
-
const i =
|
|
1670
|
+
g(se, "intersectPolygon");
|
|
1671
|
+
var $r = /* @__PURE__ */ g((e, t) => {
|
|
1672
|
+
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;
|
|
1673
|
+
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 };
|
|
1674
|
+
}, "intersectRect"), ta = $r, B = {
|
|
1675
|
+
node: Zr,
|
|
1676
|
+
circle: qr,
|
|
1677
|
+
ellipse: ee,
|
|
1678
|
+
polygon: Qr,
|
|
1679
|
+
rect: ta
|
|
1680
|
+
}, A = /* @__PURE__ */ g(async (e, t, a, s) => {
|
|
1681
|
+
const i = R();
|
|
1681
1682
|
let c;
|
|
1682
|
-
const r = t.useHtmlLabels ||
|
|
1683
|
+
const r = t.useHtmlLabels || M(i);
|
|
1683
1684
|
a ? c = a : c = "node default";
|
|
1684
1685
|
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);
|
|
1685
|
-
let
|
|
1686
|
-
t.labelText === void 0 ?
|
|
1687
|
-
let
|
|
1688
|
-
t.labelType === "markdown" ?
|
|
1686
|
+
let u;
|
|
1687
|
+
t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1688
|
+
let h;
|
|
1689
|
+
t.labelType === "markdown" ? h = kt(
|
|
1689
1690
|
l,
|
|
1690
|
-
Ot(
|
|
1691
|
+
Ct(Ot(u), i),
|
|
1691
1692
|
{
|
|
1692
1693
|
useHtmlLabels: r,
|
|
1693
1694
|
width: t.width || i.flowchart.wrappingWidth,
|
|
1694
1695
|
classes: "markdown-node-label"
|
|
1695
1696
|
},
|
|
1696
1697
|
i
|
|
1697
|
-
) :
|
|
1698
|
+
) : h = await K(
|
|
1698
1699
|
l,
|
|
1699
|
-
Ot(
|
|
1700
|
+
Ct(Ot(u), i),
|
|
1700
1701
|
t.labelStyle,
|
|
1701
1702
|
!1,
|
|
1702
1703
|
s
|
|
1703
1704
|
);
|
|
1704
|
-
let
|
|
1705
|
+
let d = h.getBBox();
|
|
1705
1706
|
const b = t.padding / 2;
|
|
1706
|
-
if (
|
|
1707
|
-
const
|
|
1708
|
-
await
|
|
1707
|
+
if (M(i)) {
|
|
1708
|
+
const w = h.children[0], y = D(h);
|
|
1709
|
+
await Ge(w, u), d = w.getBoundingClientRect(), y.attr("width", d.width), y.attr("height", d.height);
|
|
1709
1710
|
}
|
|
1710
|
-
return r ? l.attr("transform", "translate(" + -
|
|
1711
|
-
}, "labelHelper"),
|
|
1711
|
+
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 };
|
|
1712
|
+
}, "labelHelper"), I = /* @__PURE__ */ g((e, t) => {
|
|
1712
1713
|
const a = t.node().getBBox();
|
|
1713
1714
|
e.width = a.width, e.height = a.height;
|
|
1714
1715
|
}, "updateNodeBounds");
|
|
1715
|
-
function
|
|
1716
|
+
function X(e, t, a, s) {
|
|
1716
1717
|
return e.insert("polygon", ":first-child").attr(
|
|
1717
1718
|
"points",
|
|
1718
1719
|
s.map(function(i) {
|
|
@@ -1720,10 +1721,10 @@ function V(e, t, a, s) {
|
|
|
1720
1721
|
}).join(" ")
|
|
1721
1722
|
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
1722
1723
|
}
|
|
1723
|
-
|
|
1724
|
-
var
|
|
1725
|
-
t.useHtmlLabels ||
|
|
1726
|
-
const { shapeSvg: s, bbox: i, halfPadding: c } = await
|
|
1724
|
+
g(X, "insertPolygonShape");
|
|
1725
|
+
var ea = /* @__PURE__ */ g(async (e, t) => {
|
|
1726
|
+
t.useHtmlLabels || M(R()) || (t.centerLabel = !0);
|
|
1727
|
+
const { shapeSvg: s, bbox: i, halfPadding: c } = await A(
|
|
1727
1728
|
e,
|
|
1728
1729
|
t,
|
|
1729
1730
|
"node " + t.classes,
|
|
@@ -1731,16 +1732,16 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1731
1732
|
);
|
|
1732
1733
|
k.info("Classes = ", t.classes);
|
|
1733
1734
|
const r = s.insert("rect", ":first-child");
|
|
1734
|
-
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),
|
|
1735
|
+
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) {
|
|
1735
1736
|
return B.rect(t, n);
|
|
1736
1737
|
}, s;
|
|
1737
|
-
}, "note"),
|
|
1738
|
+
}, "note"), ra = ea, Ft = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Ft(e.classes)} ${Ft(
|
|
1738
1739
|
e.class
|
|
1739
|
-
)}`, "getClassesFromNode"),
|
|
1740
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1740
|
+
)}`, "getClassesFromNode"), Wt = /* @__PURE__ */ g(async (e, t) => {
|
|
1741
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1741
1742
|
e,
|
|
1742
1743
|
t,
|
|
1743
|
-
|
|
1744
|
+
Y(t, void 0),
|
|
1744
1745
|
!0
|
|
1745
1746
|
), i = s.width + t.padding, c = s.height + t.padding, r = i + c, n = [
|
|
1746
1747
|
{ x: r / 2, y: 0 },
|
|
@@ -1749,11 +1750,11 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1749
1750
|
{ x: 0, y: -r / 2 }
|
|
1750
1751
|
];
|
|
1751
1752
|
k.info("Question main (Circle)");
|
|
1752
|
-
const l =
|
|
1753
|
-
return l.attr("style", t.style),
|
|
1754
|
-
return k.warn("Intersect called"), B.polygon(t, n,
|
|
1753
|
+
const l = X(a, r, r, n);
|
|
1754
|
+
return l.attr("style", t.style), I(t, l), t.intersect = function(u) {
|
|
1755
|
+
return k.warn("Intersect called"), B.polygon(t, n, u);
|
|
1755
1756
|
}, a;
|
|
1756
|
-
}, "question"),
|
|
1757
|
+
}, "question"), aa = /* @__PURE__ */ g((e, t) => {
|
|
1757
1758
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = 28, i = [
|
|
1758
1759
|
{ x: 0, y: s / 2 },
|
|
1759
1760
|
{ x: s / 2, y: 0 },
|
|
@@ -1768,11 +1769,11 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1768
1769
|
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
|
|
1769
1770
|
return B.circle(t, 14, r);
|
|
1770
1771
|
}, a;
|
|
1771
|
-
}, "choice"),
|
|
1772
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1772
|
+
}, "choice"), sa = /* @__PURE__ */ g(async (e, t) => {
|
|
1773
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1773
1774
|
e,
|
|
1774
1775
|
t,
|
|
1775
|
-
|
|
1776
|
+
Y(t, void 0),
|
|
1776
1777
|
!0
|
|
1777
1778
|
), 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 = [
|
|
1778
1779
|
{ x: r, y: 0 },
|
|
@@ -1781,20 +1782,20 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1781
1782
|
{ x: n - r, y: -c },
|
|
1782
1783
|
{ x: r, y: -c },
|
|
1783
1784
|
{ x: 0, y: -c / 2 }
|
|
1784
|
-
],
|
|
1785
|
-
return
|
|
1786
|
-
return B.polygon(t, l,
|
|
1785
|
+
], u = X(a, n, c, l);
|
|
1786
|
+
return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
|
|
1787
|
+
return B.polygon(t, l, h);
|
|
1787
1788
|
}, a;
|
|
1788
|
-
}, "hexagon"),
|
|
1789
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1790
|
-
return
|
|
1791
|
-
return B.polygon(t,
|
|
1789
|
+
}, "hexagon"), ia = /* @__PURE__ */ g(async (e, t) => {
|
|
1790
|
+
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);
|
|
1791
|
+
return d.attr("style", t.style), I(t, d), t.intersect = function(b) {
|
|
1792
|
+
return B.polygon(t, h, b);
|
|
1792
1793
|
}, a;
|
|
1793
|
-
}, "block_arrow"),
|
|
1794
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1794
|
+
}, "block_arrow"), na = /* @__PURE__ */ g(async (e, t) => {
|
|
1795
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1795
1796
|
e,
|
|
1796
1797
|
t,
|
|
1797
|
-
|
|
1798
|
+
Y(t, void 0),
|
|
1798
1799
|
!0
|
|
1799
1800
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1800
1801
|
{ x: -c / 2, y: 0 },
|
|
@@ -1803,69 +1804,69 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1803
1804
|
{ x: -c / 2, y: -c },
|
|
1804
1805
|
{ x: 0, y: -c / 2 }
|
|
1805
1806
|
];
|
|
1806
|
-
return
|
|
1807
|
+
return X(a, i, c, r).attr("style", t.style), t.width = i + c, t.height = c, t.intersect = function(l) {
|
|
1807
1808
|
return B.polygon(t, r, l);
|
|
1808
1809
|
}, a;
|
|
1809
|
-
}, "rect_left_inv_arrow"),
|
|
1810
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1810
|
+
}, "rect_left_inv_arrow"), ca = /* @__PURE__ */ g(async (e, t) => {
|
|
1811
|
+
const { shapeSvg: a, bbox: s } = await A(e, t, Y(t), !0), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1811
1812
|
{ x: -2 * c / 6, y: 0 },
|
|
1812
1813
|
{ x: i - c / 6, y: 0 },
|
|
1813
1814
|
{ x: i + 2 * c / 6, y: -c },
|
|
1814
1815
|
{ x: c / 6, y: -c }
|
|
1815
|
-
], n =
|
|
1816
|
-
return n.attr("style", t.style),
|
|
1816
|
+
], n = X(a, i, c, r);
|
|
1817
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1817
1818
|
return B.polygon(t, r, l);
|
|
1818
1819
|
}, a;
|
|
1819
|
-
}, "lean_right"),
|
|
1820
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1820
|
+
}, "lean_right"), la = /* @__PURE__ */ g(async (e, t) => {
|
|
1821
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1821
1822
|
e,
|
|
1822
1823
|
t,
|
|
1823
|
-
|
|
1824
|
+
Y(t, void 0),
|
|
1824
1825
|
!0
|
|
1825
1826
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1826
1827
|
{ x: 2 * c / 6, y: 0 },
|
|
1827
1828
|
{ x: i + c / 6, y: 0 },
|
|
1828
1829
|
{ x: i - 2 * c / 6, y: -c },
|
|
1829
1830
|
{ x: -c / 6, y: -c }
|
|
1830
|
-
], n =
|
|
1831
|
-
return n.attr("style", t.style),
|
|
1831
|
+
], n = X(a, i, c, r);
|
|
1832
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1832
1833
|
return B.polygon(t, r, l);
|
|
1833
1834
|
}, a;
|
|
1834
|
-
}, "lean_left"),
|
|
1835
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1835
|
+
}, "lean_left"), oa = /* @__PURE__ */ g(async (e, t) => {
|
|
1836
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1836
1837
|
e,
|
|
1837
1838
|
t,
|
|
1838
|
-
|
|
1839
|
+
Y(t, void 0),
|
|
1839
1840
|
!0
|
|
1840
1841
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1841
1842
|
{ x: -2 * c / 6, y: 0 },
|
|
1842
1843
|
{ x: i + 2 * c / 6, y: 0 },
|
|
1843
1844
|
{ x: i - c / 6, y: -c },
|
|
1844
1845
|
{ x: c / 6, y: -c }
|
|
1845
|
-
], n =
|
|
1846
|
-
return n.attr("style", t.style),
|
|
1846
|
+
], n = X(a, i, c, r);
|
|
1847
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1847
1848
|
return B.polygon(t, r, l);
|
|
1848
1849
|
}, a;
|
|
1849
|
-
}, "trapezoid"),
|
|
1850
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1850
|
+
}, "trapezoid"), ha = /* @__PURE__ */ g(async (e, t) => {
|
|
1851
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1851
1852
|
e,
|
|
1852
1853
|
t,
|
|
1853
|
-
|
|
1854
|
+
Y(t, void 0),
|
|
1854
1855
|
!0
|
|
1855
1856
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1856
1857
|
{ x: c / 6, y: 0 },
|
|
1857
1858
|
{ x: i - c / 6, y: 0 },
|
|
1858
1859
|
{ x: i + 2 * c / 6, y: -c },
|
|
1859
1860
|
{ x: -2 * c / 6, y: -c }
|
|
1860
|
-
], n =
|
|
1861
|
-
return n.attr("style", t.style),
|
|
1861
|
+
], n = X(a, i, c, r);
|
|
1862
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1862
1863
|
return B.polygon(t, r, l);
|
|
1863
1864
|
}, a;
|
|
1864
|
-
}, "inv_trapezoid"),
|
|
1865
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1865
|
+
}, "inv_trapezoid"), ga = /* @__PURE__ */ g(async (e, t) => {
|
|
1866
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1866
1867
|
e,
|
|
1867
1868
|
t,
|
|
1868
|
-
|
|
1869
|
+
Y(t, void 0),
|
|
1869
1870
|
!0
|
|
1870
1871
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
1871
1872
|
{ x: 0, y: 0 },
|
|
@@ -1873,156 +1874,156 @@ var aa = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1873
1874
|
{ x: i, y: -c / 2 },
|
|
1874
1875
|
{ x: i + c / 2, y: -c },
|
|
1875
1876
|
{ x: 0, y: -c }
|
|
1876
|
-
], n =
|
|
1877
|
-
return n.attr("style", t.style),
|
|
1877
|
+
], n = X(a, i, c, r);
|
|
1878
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
1878
1879
|
return B.polygon(t, r, l);
|
|
1879
1880
|
}, a;
|
|
1880
|
-
}, "rect_right_inv_arrow"),
|
|
1881
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1881
|
+
}, "rect_right_inv_arrow"), ua = /* @__PURE__ */ g(async (e, t) => {
|
|
1882
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1882
1883
|
e,
|
|
1883
1884
|
t,
|
|
1884
|
-
|
|
1885
|
+
Y(t, void 0),
|
|
1885
1886
|
!0
|
|
1886
|
-
), 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,
|
|
1887
|
-
return
|
|
1888
|
-
const
|
|
1889
|
-
if (c != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(
|
|
1890
|
-
let
|
|
1891
|
-
|
|
1887
|
+
), 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) + ")");
|
|
1888
|
+
return I(t, u), t.intersect = function(h) {
|
|
1889
|
+
const d = B.rect(t, h), b = d.x - t.x;
|
|
1890
|
+
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)) {
|
|
1891
|
+
let w = r * r * (1 - b * b / (c * c));
|
|
1892
|
+
w != 0 && (w = Math.sqrt(w)), w = r - w, h.y - t.y > 0 && (w = -w), d.y += w;
|
|
1892
1893
|
}
|
|
1893
|
-
return
|
|
1894
|
+
return d;
|
|
1894
1895
|
}, a;
|
|
1895
|
-
}, "cylinder"),
|
|
1896
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
1896
|
+
}, "cylinder"), da = /* @__PURE__ */ g(async (e, t) => {
|
|
1897
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
1897
1898
|
e,
|
|
1898
1899
|
t,
|
|
1899
1900
|
"node " + t.classes + " " + t.class,
|
|
1900
1901
|
!0
|
|
1901
|
-
), 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,
|
|
1902
|
-
if (c.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y",
|
|
1903
|
-
const
|
|
1904
|
-
t.props.borders && (
|
|
1905
|
-
k.warn(`Unknown node property ${
|
|
1902
|
+
), 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;
|
|
1903
|
+
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) {
|
|
1904
|
+
const h = new Set(Object.keys(t.props));
|
|
1905
|
+
t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
|
|
1906
|
+
k.warn(`Unknown node property ${d}`);
|
|
1906
1907
|
});
|
|
1907
1908
|
}
|
|
1908
|
-
return
|
|
1909
|
-
return B.rect(t,
|
|
1909
|
+
return I(t, c), t.intersect = function(h) {
|
|
1910
|
+
return B.rect(t, h);
|
|
1910
1911
|
}, a;
|
|
1911
|
-
}, "rect"),
|
|
1912
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
1912
|
+
}, "rect"), pa = /* @__PURE__ */ g(async (e, t) => {
|
|
1913
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
1913
1914
|
e,
|
|
1914
1915
|
t,
|
|
1915
1916
|
"node " + t.classes,
|
|
1916
1917
|
!0
|
|
1917
|
-
), 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,
|
|
1918
|
-
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",
|
|
1919
|
-
const
|
|
1920
|
-
t.props.borders && (
|
|
1921
|
-
k.warn(`Unknown node property ${
|
|
1918
|
+
), 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;
|
|
1919
|
+
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) {
|
|
1920
|
+
const h = new Set(Object.keys(t.props));
|
|
1921
|
+
t.props.borders && (ot(c, t.props.borders, r, n), h.delete("borders")), h.forEach((d) => {
|
|
1922
|
+
k.warn(`Unknown node property ${d}`);
|
|
1922
1923
|
});
|
|
1923
1924
|
}
|
|
1924
|
-
return
|
|
1925
|
-
return B.rect(t,
|
|
1925
|
+
return I(t, c), t.intersect = function(h) {
|
|
1926
|
+
return B.rect(t, h);
|
|
1926
1927
|
}, a;
|
|
1927
|
-
}, "composite"),
|
|
1928
|
-
const { shapeSvg: a } = await
|
|
1928
|
+
}, "composite"), fa = /* @__PURE__ */ g(async (e, t) => {
|
|
1929
|
+
const { shapeSvg: a } = await A(e, t, "label", !0);
|
|
1929
1930
|
k.trace("Classes = ", t.class);
|
|
1930
1931
|
const s = a.insert("rect", ":first-child"), i = 0, c = 0;
|
|
1931
1932
|
if (s.attr("width", i).attr("height", c), a.attr("class", "label edgeLabel"), t.props) {
|
|
1932
1933
|
const r = new Set(Object.keys(t.props));
|
|
1933
|
-
t.props.borders && (
|
|
1934
|
+
t.props.borders && (ot(s, t.props.borders, i, c), r.delete("borders")), r.forEach((n) => {
|
|
1934
1935
|
k.warn(`Unknown node property ${n}`);
|
|
1935
1936
|
});
|
|
1936
1937
|
}
|
|
1937
|
-
return
|
|
1938
|
+
return I(t, s), t.intersect = function(r) {
|
|
1938
1939
|
return B.rect(t, r);
|
|
1939
1940
|
}, a;
|
|
1940
1941
|
}, "labelRect");
|
|
1941
|
-
function
|
|
1942
|
-
const i = [], c = /* @__PURE__ */
|
|
1942
|
+
function ot(e, t, a, s) {
|
|
1943
|
+
const i = [], c = /* @__PURE__ */ g((n) => {
|
|
1943
1944
|
i.push(n, 0);
|
|
1944
|
-
}, "addBorder"), r = /* @__PURE__ */
|
|
1945
|
+
}, "addBorder"), r = /* @__PURE__ */ g((n) => {
|
|
1945
1946
|
i.push(0, n);
|
|
1946
1947
|
}, "skipBorder");
|
|
1947
1948
|
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(" "));
|
|
1948
1949
|
}
|
|
1949
|
-
|
|
1950
|
-
var
|
|
1950
|
+
g(ot, "applyNodePropertyBorders");
|
|
1951
|
+
var xa = /* @__PURE__ */ g(async (e, t) => {
|
|
1951
1952
|
let a;
|
|
1952
1953
|
t.classes ? a = "node " + t.classes : a = "node default";
|
|
1953
1954
|
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;
|
|
1954
1955
|
let l = "";
|
|
1955
1956
|
typeof n == "object" ? l = n[0] : l = n, k.info("Label text abc79", l, n, typeof n == "object");
|
|
1956
|
-
const
|
|
1957
|
-
let
|
|
1958
|
-
if (
|
|
1959
|
-
const v =
|
|
1960
|
-
|
|
1957
|
+
const u = await K(r, l, t.labelStyle, !0, !0);
|
|
1958
|
+
let h = { width: 0, height: 0 };
|
|
1959
|
+
if (M(R())) {
|
|
1960
|
+
const v = u.children[0], S = D(u);
|
|
1961
|
+
h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
|
|
1961
1962
|
}
|
|
1962
1963
|
k.info("Text 2", n);
|
|
1963
|
-
const
|
|
1964
|
-
let b =
|
|
1965
|
-
const
|
|
1964
|
+
const d = n.slice(1, n.length);
|
|
1965
|
+
let b = u.getBBox();
|
|
1966
|
+
const w = await K(
|
|
1966
1967
|
r,
|
|
1967
|
-
|
|
1968
|
+
d.join ? d.join("<br/>") : d,
|
|
1968
1969
|
t.labelStyle,
|
|
1969
1970
|
!0,
|
|
1970
1971
|
!0
|
|
1971
1972
|
);
|
|
1972
|
-
if (
|
|
1973
|
-
const v =
|
|
1974
|
-
|
|
1973
|
+
if (M(R())) {
|
|
1974
|
+
const v = w.children[0], S = D(w);
|
|
1975
|
+
h = v.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
|
|
1975
1976
|
}
|
|
1976
|
-
const
|
|
1977
|
-
return D(
|
|
1977
|
+
const y = t.padding / 2;
|
|
1978
|
+
return D(w).attr(
|
|
1978
1979
|
"transform",
|
|
1979
1980
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1980
|
-
(
|
|
1981
|
-
), D(
|
|
1981
|
+
(h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + y + 5) + ")"
|
|
1982
|
+
), D(u).attr(
|
|
1982
1983
|
"transform",
|
|
1983
1984
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1984
|
-
(
|
|
1985
|
-
),
|
|
1985
|
+
(h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
|
|
1986
|
+
), h = r.node().getBBox(), r.attr(
|
|
1986
1987
|
"transform",
|
|
1987
|
-
"translate(" + -
|
|
1988
|
-
), i.attr("class", "outer title-state").attr("x", -
|
|
1988
|
+
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - y + 3) + ")"
|
|
1989
|
+
), 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) {
|
|
1989
1990
|
return B.rect(t, v);
|
|
1990
1991
|
}, s;
|
|
1991
|
-
}, "rectWithTitle"),
|
|
1992
|
-
const { shapeSvg: a, bbox: s } = await
|
|
1992
|
+
}, "rectWithTitle"), ya = /* @__PURE__ */ g(async (e, t) => {
|
|
1993
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
1993
1994
|
e,
|
|
1994
1995
|
t,
|
|
1995
|
-
|
|
1996
|
+
Y(t, void 0),
|
|
1996
1997
|
!0
|
|
1997
1998
|
), 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);
|
|
1998
|
-
return
|
|
1999
|
+
return I(t, r), t.intersect = function(n) {
|
|
1999
2000
|
return B.rect(t, n);
|
|
2000
2001
|
}, a;
|
|
2001
|
-
}, "stadium"),
|
|
2002
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
2002
|
+
}, "stadium"), ba = /* @__PURE__ */ g(async (e, t) => {
|
|
2003
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
2003
2004
|
e,
|
|
2004
2005
|
t,
|
|
2005
|
-
|
|
2006
|
+
Y(t, void 0),
|
|
2006
2007
|
!0
|
|
2007
2008
|
), c = a.insert("circle", ":first-child");
|
|
2008
|
-
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"),
|
|
2009
|
+
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) {
|
|
2009
2010
|
return k.info("Circle intersect", t, s.width / 2 + i, r), B.circle(t, s.width / 2 + i, r);
|
|
2010
2011
|
}, a;
|
|
2011
|
-
}, "circle"),
|
|
2012
|
-
const { shapeSvg: a, bbox: s, halfPadding: i } = await
|
|
2012
|
+
}, "circle"), wa = /* @__PURE__ */ g(async (e, t) => {
|
|
2013
|
+
const { shapeSvg: a, bbox: s, halfPadding: i } = await A(
|
|
2013
2014
|
e,
|
|
2014
2015
|
t,
|
|
2015
|
-
|
|
2016
|
+
Y(t, void 0),
|
|
2016
2017
|
!0
|
|
2017
2018
|
), c = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), l = r.insert("circle");
|
|
2018
|
-
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"),
|
|
2019
|
-
return k.info("DoubleCircle intersect", t, s.width / 2 + i + c,
|
|
2019
|
+
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) {
|
|
2020
|
+
return k.info("DoubleCircle intersect", t, s.width / 2 + i + c, u), B.circle(t, s.width / 2 + i + c, u);
|
|
2020
2021
|
}, a;
|
|
2021
|
-
}, "doublecircle"),
|
|
2022
|
-
const { shapeSvg: a, bbox: s } = await
|
|
2022
|
+
}, "doublecircle"), ma = /* @__PURE__ */ g(async (e, t) => {
|
|
2023
|
+
const { shapeSvg: a, bbox: s } = await A(
|
|
2023
2024
|
e,
|
|
2024
2025
|
t,
|
|
2025
|
-
|
|
2026
|
+
Y(t, void 0),
|
|
2026
2027
|
!0
|
|
2027
2028
|
), i = s.width + t.padding, c = s.height + t.padding, r = [
|
|
2028
2029
|
{ x: 0, y: 0 },
|
|
@@ -2035,167 +2036,167 @@ var ba = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2035
2036
|
{ x: i + 8, y: -c },
|
|
2036
2037
|
{ x: -8, y: -c },
|
|
2037
2038
|
{ x: -8, y: 0 }
|
|
2038
|
-
], n =
|
|
2039
|
-
return n.attr("style", t.style),
|
|
2039
|
+
], n = X(a, i, c, r);
|
|
2040
|
+
return n.attr("style", t.style), I(t, n), t.intersect = function(l) {
|
|
2040
2041
|
return B.polygon(t, r, l);
|
|
2041
2042
|
}, a;
|
|
2042
|
-
}, "subroutine"),
|
|
2043
|
+
}, "subroutine"), Sa = /* @__PURE__ */ g((e, t) => {
|
|
2043
2044
|
const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child");
|
|
2044
|
-
return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14),
|
|
2045
|
+
return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, s), t.intersect = function(i) {
|
|
2045
2046
|
return B.circle(t, 7, i);
|
|
2046
2047
|
}, a;
|
|
2047
|
-
}, "start"),
|
|
2048
|
+
}, "start"), Yt = /* @__PURE__ */ g((e, t, a) => {
|
|
2048
2049
|
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2049
2050
|
let i = 70, c = 10;
|
|
2050
2051
|
a === "LR" && (i = 10, c = 70);
|
|
2051
2052
|
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");
|
|
2052
|
-
return
|
|
2053
|
+
return I(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
2053
2054
|
return B.rect(t, n);
|
|
2054
2055
|
}, s;
|
|
2055
|
-
}, "forkJoin"),
|
|
2056
|
+
}, "forkJoin"), La = /* @__PURE__ */ g((e, t) => {
|
|
2056
2057
|
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");
|
|
2057
|
-
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),
|
|
2058
|
+
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) {
|
|
2058
2059
|
return B.circle(t, 7, c);
|
|
2059
2060
|
}, a;
|
|
2060
|
-
}, "end"),
|
|
2061
|
+
}, "end"), ka = /* @__PURE__ */ g(async (e, t) => {
|
|
2061
2062
|
const a = t.padding / 2, s = 4, i = 8;
|
|
2062
2063
|
let c;
|
|
2063
2064
|
t.classes ? c = "node " + t.classes : c = "node default";
|
|
2064
|
-
const r = e.insert("g").attr("class", c).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), l = r.insert("line"),
|
|
2065
|
-
let
|
|
2065
|
+
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");
|
|
2066
|
+
let h = 0, d = s;
|
|
2066
2067
|
const b = r.insert("g").attr("class", "label");
|
|
2067
|
-
let
|
|
2068
|
-
const
|
|
2068
|
+
let w = 0;
|
|
2069
|
+
const y = t.classData.annotations?.[0], v = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", S = await K(
|
|
2069
2070
|
b,
|
|
2070
2071
|
v,
|
|
2071
2072
|
t.labelStyle,
|
|
2072
2073
|
!0,
|
|
2073
2074
|
!0
|
|
2074
2075
|
);
|
|
2075
|
-
let
|
|
2076
|
-
if (
|
|
2077
|
-
const E = S.children[0],
|
|
2078
|
-
|
|
2079
|
-
}
|
|
2080
|
-
t.classData.annotations[0] && (
|
|
2081
|
-
let
|
|
2082
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (
|
|
2083
|
-
const T = await
|
|
2076
|
+
let N = S.getBBox();
|
|
2077
|
+
if (M(R())) {
|
|
2078
|
+
const E = S.children[0], o = D(S);
|
|
2079
|
+
N = E.getBoundingClientRect(), o.attr("width", N.width), o.attr("height", N.height);
|
|
2080
|
+
}
|
|
2081
|
+
t.classData.annotations[0] && (d += N.height + s, h += N.width);
|
|
2082
|
+
let _ = t.classData.label;
|
|
2083
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (M(R()) ? _ += "<" + t.classData.type + ">" : _ += "<" + t.classData.type + ">");
|
|
2084
|
+
const T = await K(
|
|
2084
2085
|
b,
|
|
2085
|
-
|
|
2086
|
+
_,
|
|
2086
2087
|
t.labelStyle,
|
|
2087
2088
|
!0,
|
|
2088
2089
|
!0
|
|
2089
2090
|
);
|
|
2090
2091
|
D(T).attr("class", "classTitle");
|
|
2091
2092
|
let m = T.getBBox();
|
|
2092
|
-
if (
|
|
2093
|
-
const E = T.children[0],
|
|
2094
|
-
m = E.getBoundingClientRect(),
|
|
2093
|
+
if (M(R())) {
|
|
2094
|
+
const E = T.children[0], o = D(T);
|
|
2095
|
+
m = E.getBoundingClientRect(), o.attr("width", m.width), o.attr("height", m.height);
|
|
2095
2096
|
}
|
|
2096
|
-
|
|
2097
|
-
const
|
|
2097
|
+
d += m.height + s, m.width > h && (h = m.width);
|
|
2098
|
+
const p = [];
|
|
2098
2099
|
t.classData.members.forEach(async (E) => {
|
|
2099
|
-
const
|
|
2100
|
-
let
|
|
2101
|
-
|
|
2102
|
-
const f = await
|
|
2100
|
+
const o = E.getDisplayDetails();
|
|
2101
|
+
let F = o.displayText;
|
|
2102
|
+
M(R()) && (F = F.replace(/</g, "<").replace(/>/g, ">"));
|
|
2103
|
+
const f = await K(
|
|
2103
2104
|
b,
|
|
2104
|
-
|
|
2105
|
-
|
|
2105
|
+
F,
|
|
2106
|
+
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
2106
2107
|
!0,
|
|
2107
2108
|
!0
|
|
2108
2109
|
);
|
|
2109
|
-
let
|
|
2110
|
-
if (
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2110
|
+
let C = f.getBBox();
|
|
2111
|
+
if (M(R())) {
|
|
2112
|
+
const Z = f.children[0], V = D(f);
|
|
2113
|
+
C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
|
|
2113
2114
|
}
|
|
2114
|
-
|
|
2115
|
-
}),
|
|
2116
|
-
const
|
|
2115
|
+
C.width > h && (h = C.width), d += C.height + s, p.push(f);
|
|
2116
|
+
}), d += i;
|
|
2117
|
+
const x = [];
|
|
2117
2118
|
if (t.classData.methods.forEach(async (E) => {
|
|
2118
|
-
const
|
|
2119
|
-
let
|
|
2120
|
-
|
|
2121
|
-
const f = await
|
|
2119
|
+
const o = E.getDisplayDetails();
|
|
2120
|
+
let F = o.displayText;
|
|
2121
|
+
M(R()) && (F = F.replace(/</g, "<").replace(/>/g, ">"));
|
|
2122
|
+
const f = await K(
|
|
2122
2123
|
b,
|
|
2123
|
-
|
|
2124
|
-
|
|
2124
|
+
F,
|
|
2125
|
+
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
2125
2126
|
!0,
|
|
2126
2127
|
!0
|
|
2127
2128
|
);
|
|
2128
|
-
let
|
|
2129
|
-
if (
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2129
|
+
let C = f.getBBox();
|
|
2130
|
+
if (M(R())) {
|
|
2131
|
+
const Z = f.children[0], V = D(f);
|
|
2132
|
+
C = Z.getBoundingClientRect(), V.attr("width", C.width), V.attr("height", C.height);
|
|
2132
2133
|
}
|
|
2133
|
-
|
|
2134
|
-
}),
|
|
2135
|
-
let E = (
|
|
2134
|
+
C.width > h && (h = C.width), d += C.height + s, x.push(f);
|
|
2135
|
+
}), d += i, y) {
|
|
2136
|
+
let E = (h - N.width) / 2;
|
|
2136
2137
|
D(S).attr(
|
|
2137
2138
|
"transform",
|
|
2138
|
-
"translate( " + (-1 *
|
|
2139
|
-
),
|
|
2139
|
+
"translate( " + (-1 * h / 2 + E) + ", " + -1 * d / 2 + ")"
|
|
2140
|
+
), w = N.height + s;
|
|
2140
2141
|
}
|
|
2141
|
-
let L = (
|
|
2142
|
+
let L = (h - m.width) / 2;
|
|
2142
2143
|
return D(T).attr(
|
|
2143
2144
|
"transform",
|
|
2144
|
-
"translate( " + (-1 *
|
|
2145
|
-
),
|
|
2145
|
+
"translate( " + (-1 * h / 2 + L) + ", " + (-1 * d / 2 + w) + ")"
|
|
2146
|
+
), 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, p.forEach((E) => {
|
|
2146
2147
|
D(E).attr(
|
|
2147
2148
|
"transform",
|
|
2148
|
-
"translate( " + -
|
|
2149
|
+
"translate( " + -h / 2 + ", " + (-1 * d / 2 + w + i / 2) + ")"
|
|
2149
2150
|
);
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2152
|
-
}),
|
|
2151
|
+
const o = E?.getBBox();
|
|
2152
|
+
w += (o?.height ?? 0) + s;
|
|
2153
|
+
}), 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) => {
|
|
2153
2154
|
D(E).attr(
|
|
2154
2155
|
"transform",
|
|
2155
|
-
"translate( " + -
|
|
2156
|
+
"translate( " + -h / 2 + ", " + (-1 * d / 2 + w) + ")"
|
|
2156
2157
|
);
|
|
2157
|
-
const
|
|
2158
|
-
|
|
2159
|
-
}), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -
|
|
2158
|
+
const o = E?.getBBox();
|
|
2159
|
+
w += (o?.height ?? 0) + s;
|
|
2160
|
+
}), 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) {
|
|
2160
2161
|
return B.rect(t, E);
|
|
2161
2162
|
}, r;
|
|
2162
|
-
}, "class_box"),
|
|
2163
|
-
rhombus:
|
|
2164
|
-
composite:
|
|
2165
|
-
question:
|
|
2166
|
-
rect:
|
|
2167
|
-
labelRect:
|
|
2168
|
-
rectWithTitle:
|
|
2169
|
-
choice:
|
|
2170
|
-
circle:
|
|
2171
|
-
doublecircle:
|
|
2172
|
-
stadium:
|
|
2173
|
-
hexagon:
|
|
2174
|
-
block_arrow:
|
|
2175
|
-
rect_left_inv_arrow:
|
|
2176
|
-
lean_right:
|
|
2177
|
-
lean_left:
|
|
2178
|
-
trapezoid:
|
|
2179
|
-
inv_trapezoid:
|
|
2180
|
-
rect_right_inv_arrow:
|
|
2181
|
-
cylinder:
|
|
2182
|
-
start:
|
|
2183
|
-
end:
|
|
2184
|
-
note:
|
|
2185
|
-
subroutine:
|
|
2186
|
-
fork:
|
|
2187
|
-
join:
|
|
2188
|
-
class_box:
|
|
2189
|
-
},
|
|
2163
|
+
}, "class_box"), Ht = {
|
|
2164
|
+
rhombus: Wt,
|
|
2165
|
+
composite: pa,
|
|
2166
|
+
question: Wt,
|
|
2167
|
+
rect: da,
|
|
2168
|
+
labelRect: fa,
|
|
2169
|
+
rectWithTitle: xa,
|
|
2170
|
+
choice: aa,
|
|
2171
|
+
circle: ba,
|
|
2172
|
+
doublecircle: wa,
|
|
2173
|
+
stadium: ya,
|
|
2174
|
+
hexagon: sa,
|
|
2175
|
+
block_arrow: ia,
|
|
2176
|
+
rect_left_inv_arrow: na,
|
|
2177
|
+
lean_right: ca,
|
|
2178
|
+
lean_left: la,
|
|
2179
|
+
trapezoid: oa,
|
|
2180
|
+
inv_trapezoid: ha,
|
|
2181
|
+
rect_right_inv_arrow: ga,
|
|
2182
|
+
cylinder: ua,
|
|
2183
|
+
start: Sa,
|
|
2184
|
+
end: La,
|
|
2185
|
+
note: ra,
|
|
2186
|
+
subroutine: ma,
|
|
2187
|
+
fork: Yt,
|
|
2188
|
+
join: Yt,
|
|
2189
|
+
class_box: ka
|
|
2190
|
+
}, nt = {}, ie = /* @__PURE__ */ g(async (e, t, a) => {
|
|
2190
2191
|
let s, i;
|
|
2191
2192
|
if (t.link) {
|
|
2192
2193
|
let c;
|
|
2193
|
-
|
|
2194
|
+
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);
|
|
2194
2195
|
} else
|
|
2195
|
-
i = await
|
|
2196
|
-
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class),
|
|
2197
|
-
}, "insertNode"),
|
|
2198
|
-
const t =
|
|
2196
|
+
i = await Ht[t.shape](e, t, a), s = i;
|
|
2197
|
+
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;
|
|
2198
|
+
}, "insertNode"), va = /* @__PURE__ */ g((e) => {
|
|
2199
|
+
const t = nt[e.id];
|
|
2199
2200
|
k.trace(
|
|
2200
2201
|
"Transforming node",
|
|
2201
2202
|
e.diff,
|
|
@@ -2208,7 +2209,7 @@ var ba = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2208
2209
|
"translate(" + (e.x + s - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
|
|
2209
2210
|
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), s;
|
|
2210
2211
|
}, "positionNode");
|
|
2211
|
-
function
|
|
2212
|
+
function Bt(e, t, a = !1) {
|
|
2212
2213
|
const s = e;
|
|
2213
2214
|
let i = "default";
|
|
2214
2215
|
(s?.classes?.length || 0) > 0 && (i = (s?.classes ?? []).join(" ")), i = i + " flowchart-label";
|
|
@@ -2274,61 +2275,61 @@ function Nt(e, t, a = !1) {
|
|
|
2274
2275
|
default:
|
|
2275
2276
|
r = "rect";
|
|
2276
2277
|
}
|
|
2277
|
-
const l =
|
|
2278
|
+
const l = je(s?.styles ?? []), u = s.label, h = s.size ?? { width: 0, height: 0, x: 0, y: 0 }, d = t.getDiagramId();
|
|
2278
2279
|
return {
|
|
2279
2280
|
labelStyle: l.labelStyle,
|
|
2280
2281
|
shape: r,
|
|
2281
|
-
labelText:
|
|
2282
|
+
labelText: u,
|
|
2282
2283
|
rx: c,
|
|
2283
2284
|
ry: c,
|
|
2284
2285
|
class: i,
|
|
2285
2286
|
style: l.style,
|
|
2286
2287
|
id: s.id,
|
|
2287
|
-
domId:
|
|
2288
|
+
domId: d ? `${d}-${s.id}` : s.id,
|
|
2288
2289
|
directions: s.directions,
|
|
2289
|
-
width:
|
|
2290
|
-
height:
|
|
2291
|
-
x:
|
|
2292
|
-
y:
|
|
2290
|
+
width: h.width,
|
|
2291
|
+
height: h.height,
|
|
2292
|
+
x: h.x,
|
|
2293
|
+
y: h.y,
|
|
2293
2294
|
positioned: a,
|
|
2294
2295
|
intersect: void 0,
|
|
2295
2296
|
type: s.type,
|
|
2296
|
-
padding: n ??
|
|
2297
|
+
padding: n ?? rt()?.block?.padding ?? 0,
|
|
2297
2298
|
widthInColumns: s.widthInColumns ?? 1
|
|
2298
2299
|
};
|
|
2299
2300
|
}
|
|
2300
|
-
|
|
2301
|
-
async function
|
|
2302
|
-
const s =
|
|
2301
|
+
g(Bt, "getNodeFromBlock");
|
|
2302
|
+
async function ne(e, t, a) {
|
|
2303
|
+
const s = Bt(t, a, !1);
|
|
2303
2304
|
if (s.type === "group")
|
|
2304
2305
|
return;
|
|
2305
|
-
const i =
|
|
2306
|
+
const i = rt(), c = await ie(e, s, { config: i }), r = c.node().getBBox(), n = a.getBlock(s.id);
|
|
2306
2307
|
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: c }, a.setBlock(n), c.remove();
|
|
2307
2308
|
}
|
|
2308
|
-
|
|
2309
|
-
async function
|
|
2310
|
-
const s =
|
|
2309
|
+
g(ne, "calculateBlockSize");
|
|
2310
|
+
async function ce(e, t, a) {
|
|
2311
|
+
const s = Bt(t, a, !0);
|
|
2311
2312
|
if (a.getBlock(s.id).type !== "space") {
|
|
2312
|
-
const c =
|
|
2313
|
-
await
|
|
2313
|
+
const c = rt();
|
|
2314
|
+
await ie(e, s, { config: c }), t.intersect = s?.intersect, va(s);
|
|
2314
2315
|
}
|
|
2315
2316
|
}
|
|
2316
|
-
|
|
2317
|
-
async function
|
|
2317
|
+
g(ce, "insertBlockPositioned");
|
|
2318
|
+
async function ht(e, t, a, s) {
|
|
2318
2319
|
for (const i of t)
|
|
2319
|
-
await s(e, i, a), i.children && await
|
|
2320
|
+
await s(e, i, a), i.children && await ht(e, i.children, a, s);
|
|
2320
2321
|
}
|
|
2321
|
-
|
|
2322
|
-
async function
|
|
2323
|
-
await
|
|
2322
|
+
g(ht, "performOperations");
|
|
2323
|
+
async function le(e, t, a) {
|
|
2324
|
+
await ht(e, t, a, ne);
|
|
2324
2325
|
}
|
|
2325
|
-
|
|
2326
|
-
async function
|
|
2327
|
-
await
|
|
2326
|
+
g(le, "calculateBlockSizes");
|
|
2327
|
+
async function oe(e, t, a) {
|
|
2328
|
+
await ht(e, t, a, ce);
|
|
2328
2329
|
}
|
|
2329
|
-
|
|
2330
|
-
async function
|
|
2331
|
-
const c = new
|
|
2330
|
+
g(oe, "insertBlocks");
|
|
2331
|
+
async function he(e, t, a, s, i) {
|
|
2332
|
+
const c = new Ze({
|
|
2332
2333
|
multigraph: !0,
|
|
2333
2334
|
compound: !0
|
|
2334
2335
|
});
|
|
@@ -2349,12 +2350,12 @@ async function ge(e, t, a, s, i) {
|
|
|
2349
2350
|
if (r.start && r.end) {
|
|
2350
2351
|
const n = s.getBlock(r.start), l = s.getBlock(r.end);
|
|
2351
2352
|
if (n?.size && l?.size) {
|
|
2352
|
-
const
|
|
2353
|
-
{ x:
|
|
2354
|
-
{ x:
|
|
2355
|
-
{ x:
|
|
2356
|
-
], b = i ? `${i}-${r.id}` : r.id,
|
|
2357
|
-
|
|
2353
|
+
const u = n.size, h = l.size, d = [
|
|
2354
|
+
{ x: u.x, y: u.y },
|
|
2355
|
+
{ x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
|
|
2356
|
+
{ x: h.x, y: h.y }
|
|
2357
|
+
], 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`;
|
|
2358
|
+
Vr(
|
|
2358
2359
|
e,
|
|
2359
2360
|
{ v: r.start, w: r.end, name: b },
|
|
2360
2361
|
{
|
|
@@ -2362,60 +2363,60 @@ async function ge(e, t, a, s, i) {
|
|
|
2362
2363
|
id: b,
|
|
2363
2364
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2364
2365
|
arrowTypeStart: r.arrowTypeStart,
|
|
2365
|
-
points:
|
|
2366
|
+
points: d,
|
|
2366
2367
|
classes: v
|
|
2367
2368
|
},
|
|
2368
2369
|
void 0,
|
|
2369
2370
|
"block",
|
|
2370
2371
|
c,
|
|
2371
2372
|
i
|
|
2372
|
-
), r.label && (await
|
|
2373
|
+
), r.label && (await Hr(e, {
|
|
2373
2374
|
...r,
|
|
2374
2375
|
label: r.label,
|
|
2375
2376
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2376
2377
|
arrowTypeEnd: r.arrowTypeEnd,
|
|
2377
2378
|
arrowTypeStart: r.arrowTypeStart,
|
|
2378
|
-
points:
|
|
2379
|
+
points: d,
|
|
2379
2380
|
classes: v
|
|
2380
|
-
}),
|
|
2381
|
-
{ ...r, x:
|
|
2381
|
+
}), Kr(
|
|
2382
|
+
{ ...r, x: d[1].x, y: d[1].y },
|
|
2382
2383
|
{
|
|
2383
|
-
originalPath:
|
|
2384
|
+
originalPath: d
|
|
2384
2385
|
}
|
|
2385
2386
|
));
|
|
2386
2387
|
}
|
|
2387
2388
|
}
|
|
2388
2389
|
}
|
|
2389
|
-
|
|
2390
|
-
var
|
|
2390
|
+
g(he, "insertEdges");
|
|
2391
|
+
var Ea = /* @__PURE__ */ g(function(e, t) {
|
|
2391
2392
|
return t.db.getClasses();
|
|
2392
|
-
}, "getClasses"),
|
|
2393
|
-
const { securityLevel: i, block: c } =
|
|
2393
|
+
}, "getClasses"), _a = /* @__PURE__ */ g(async function(e, t, a, s) {
|
|
2394
|
+
const { securityLevel: i, block: c } = rt(), r = s.db;
|
|
2394
2395
|
r.setDiagramId(t);
|
|
2395
2396
|
let n;
|
|
2396
2397
|
i === "sandbox" && (n = D("#i" + t));
|
|
2397
|
-
const l = i === "sandbox" ? D(n.nodes()[0].contentDocument.body) : D("body"),
|
|
2398
|
-
|
|
2399
|
-
const
|
|
2400
|
-
await
|
|
2401
|
-
const v =
|
|
2402
|
-
if (await
|
|
2403
|
-
const S = v,
|
|
2404
|
-
|
|
2398
|
+
const l = i === "sandbox" ? D(n.nodes()[0].contentDocument.body) : D("body"), u = i === "sandbox" ? l.select(`[id="${t}"]`) : D(`[id="${t}"]`);
|
|
2399
|
+
Mr(u, ["point", "circle", "cross"], s.type, t);
|
|
2400
|
+
const d = r.getBlocks(), b = r.getBlocksFlat(), w = r.getEdges(), y = u.insert("g").attr("class", "block");
|
|
2401
|
+
await le(y, d, r);
|
|
2402
|
+
const v = Qt(r);
|
|
2403
|
+
if (await oe(y, d, r), await he(y, w, b, r, t), v) {
|
|
2404
|
+
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;
|
|
2405
|
+
Pe(u, _, T, !!m), k.debug("Here Bounds", v, S), u.attr(
|
|
2405
2406
|
"viewBox",
|
|
2406
2407
|
`${S.x - 5} ${S.y - 5} ${S.width + 10} ${S.height + 10}`
|
|
2407
2408
|
);
|
|
2408
2409
|
}
|
|
2409
|
-
}, "draw"),
|
|
2410
|
-
draw:
|
|
2411
|
-
getClasses:
|
|
2412
|
-
},
|
|
2413
|
-
parser:
|
|
2414
|
-
db:
|
|
2415
|
-
renderer:
|
|
2416
|
-
styles:
|
|
2410
|
+
}, "draw"), Ta = {
|
|
2411
|
+
draw: _a,
|
|
2412
|
+
getClasses: Ea
|
|
2413
|
+
}, Ca = {
|
|
2414
|
+
parser: ar,
|
|
2415
|
+
db: kr,
|
|
2416
|
+
renderer: Ta,
|
|
2417
|
+
styles: Er
|
|
2417
2418
|
};
|
|
2418
2419
|
export {
|
|
2419
|
-
|
|
2420
|
+
Ca as diagram
|
|
2420
2421
|
};
|
|
2421
|
-
//# sourceMappingURL=blockDiagram-
|
|
2422
|
+
//# sourceMappingURL=blockDiagram-VBNYF7ZC-BqryGqC6.js.map
|