lowcoder-comps 2.4.13 → 2.4.15
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/{0fa873f8.js → 0bb0c92e.js} +4 -4
- package/{1d0578cc.js → 0cc36377.js} +919 -969
- package/{4ee1107f.js → 0fa86771.js} +411 -451
- package/{7ceb1a86.js → 19a2ee87.js} +1067 -1085
- package/{62a4e802.js → 1b41afb7.js} +6 -6
- package/{140d1965.js → 1e5b4466.js} +1 -1
- package/21ce624b.js +433 -0
- package/247d363c.js +797 -0
- package/{66d40f47.js → 2dc10e5c.js} +96 -99
- package/{48262065.js → 3a91cb5c.js} +8 -8
- package/{bfff0c9e.js → 3ebe8123.js} +26 -27
- package/{e60eb1d6.js → 3f2bde45.js} +1 -1
- package/{08ce8965.js → 4046c39a.js} +247 -258
- package/{256b619e.js → 428ebac9.js} +14 -15
- package/{f85b9955.js → 4b8936b0.js} +68 -69
- package/{722d14f3.js → 4d48e6df.js} +6 -6
- package/{93e77b54.js → 558e8ee5.js} +4 -4
- package/{d2b89014.js → 56f6e990.js} +92 -92
- package/{6c5168e9.js → 5a31cef7.js} +2 -2
- package/{7873457c.js → 5d41cf38.js} +6 -6
- package/{5d259708.js → 5fd9a898.js} +4 -5
- package/{2c7a98c7.js → 63a771ab.js} +8 -8
- package/6a32f1c1.js +206 -0
- package/{e7717e30.js → 7035666f.js} +7 -7
- package/{c840f94c.js → 74ef17ae.js} +140 -141
- package/{eeeac330.js → 7cc252e4.js} +65540 -59868
- package/81d6ce63.js +817 -0
- package/{c8211b18.js → 832e744b.js} +1 -1
- package/{81a0d6f1.js → 8718dc59.js} +12 -12
- package/{7a22ada0.js → 88953f96.js} +18 -18
- package/a8d4a50e.js +373 -0
- package/aa88392e.js +190 -0
- package/b0862b2f.js +1083 -0
- package/{62c4dc6e.js → c1b710aa.js} +5 -5
- package/{4cf9b6b3.js → d72b57c8.js} +12713 -12735
- package/{629dfdca.js → e441921a.js} +4 -4
- package/{47848c42.js → e5b014a9.js} +5 -5
- package/{b7fefb34.js → eb3bf879.js} +2 -2
- package/{febae45b.js → eb5cf40c.js} +2 -2
- package/{ddee0e99.js → edc74d11.js} +3 -3
- package/f0f41787.js +1264 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/1de1a3c9.js +0 -1102
- package/2510669f.js +0 -237
- package/68ee7280.js +0 -1276
- package/89baa2e6.js +0 -391
- package/9dc6adcd.js +0 -819
- package/ab55adad.js +0 -818
- package/c459c043.js +0 -208
- package/e47dc9ca.js +0 -455
|
@@ -1,141 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Oe.call(a, l) && he(e, l, a[l]);
|
|
11
|
-
return e;
|
|
12
|
-
}, U = (e, a) => Ne(e, ke(a));
|
|
13
|
-
var K = (e, a, l) => new Promise((u, n) => {
|
|
14
|
-
var p = (f) => {
|
|
15
|
-
try {
|
|
16
|
-
b(l.next(f));
|
|
17
|
-
} catch (g) {
|
|
18
|
-
n(g);
|
|
19
|
-
}
|
|
20
|
-
}, o = (f) => {
|
|
21
|
-
try {
|
|
22
|
-
b(l.throw(f));
|
|
23
|
-
} catch (g) {
|
|
24
|
-
n(g);
|
|
25
|
-
}
|
|
26
|
-
}, b = (f) => f.done ? u(f.value) : Promise.resolve(f.value).then(p, o);
|
|
27
|
-
b((l = l.apply(e, a)).next());
|
|
28
|
-
});
|
|
29
|
-
import { e as Te, _ as ne, j as J, k as ze, l as S, H as Ce, D as Ae, q as Re } from "./eeeac330.js";
|
|
30
|
-
import { c as Be } from "./c8211b18.js";
|
|
31
|
-
import { i as Pe, c as Fe, b as Ke, d as Me, a as xe, p as Ye } from "./1de1a3c9.js";
|
|
32
|
-
import { G as We } from "./b7fefb34.js";
|
|
33
|
-
import { o as je } from "./92e85b65.js";
|
|
34
|
-
import { s as Ve } from "./2ff7471d.js";
|
|
35
|
-
import { c as Ue } from "./140d1965.js";
|
|
36
|
-
import "./5d259708.js";
|
|
37
|
-
import "./6c5168e9.js";
|
|
1
|
+
import { e as _e, _ as se, j as H, k as ye, l as S, H as Ee, D as we, q as De } from "./7cc252e4.js";
|
|
2
|
+
import { c as ve } from "./832e744b.js";
|
|
3
|
+
import { i as Ne, c as ke, b as Ie, d as Oe, a as he, p as Te } from "./b0862b2f.js";
|
|
4
|
+
import { G as ze } from "./eb3bf879.js";
|
|
5
|
+
import { o as Ce } from "./92e85b65.js";
|
|
6
|
+
import { s as Ae } from "./2ff7471d.js";
|
|
7
|
+
import { c as Re } from "./1e5b4466.js";
|
|
8
|
+
import "./5fd9a898.js";
|
|
9
|
+
import "./5a31cef7.js";
|
|
38
10
|
import "./2ff2c7a6.js";
|
|
39
|
-
import "./
|
|
11
|
+
import "./428ebac9.js";
|
|
40
12
|
import "./f9637058.js";
|
|
41
|
-
var
|
|
42
|
-
var e = function(D,
|
|
43
|
-
for (s = s || {}, i = D.length; i--; s[D[i]] =
|
|
13
|
+
var le, oe, ee = function() {
|
|
14
|
+
var e = function(D, o, s, i) {
|
|
15
|
+
for (s = s || {}, i = D.length; i--; s[D[i]] = o)
|
|
44
16
|
;
|
|
45
17
|
return s;
|
|
46
|
-
}, a = [1, 7],
|
|
18
|
+
}, a = [1, 7], d = [1, 13], c = [1, 14], n = [1, 15], g = [1, 19], l = [1, 16], f = [1, 17], b = [1, 18], p = [8, 30], x = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], y = [1, 23], T = [1, 24], v = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], N = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], L = {
|
|
47
19
|
trace: function() {
|
|
48
20
|
},
|
|
49
21
|
yy: {},
|
|
50
22
|
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, block: 31, NODE_ID: 32, nodeShapeNLabel: 33, dirList: 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: 49, $accept: 0, $end: 1 },
|
|
51
23
|
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: "block", 32: "NODE_ID", 35: "DIR", 36: "NODE_DSTART", 37: "NODE_DEND", 38: "BLOCK_ARROW_START", 39: "BLOCK_ARROW_END", 40: "classDef", 41: "CLASSDEF_ID", 42: "CLASSDEF_STYLEOPTS", 43: "DEFAULT", 44: "class", 45: "CLASSENTITY_IDS", 46: "STYLECLASS", 47: "style", 48: "STYLE_ENTITY_IDS", 49: "STYLE_DEFINITION_DATA" },
|
|
52
24
|
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], [34, 1], [34, 2], [33, 3], [33, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
53
|
-
performAction: function(
|
|
25
|
+
performAction: function(o, s, i, u, h, t, m) {
|
|
54
26
|
var r = t.length - 1;
|
|
55
|
-
switch (
|
|
27
|
+
switch (h) {
|
|
56
28
|
case 4:
|
|
57
|
-
|
|
29
|
+
u.getLogger().debug("Rule: separator (NL) ");
|
|
58
30
|
break;
|
|
59
31
|
case 5:
|
|
60
|
-
|
|
32
|
+
u.getLogger().debug("Rule: separator (Space) ");
|
|
61
33
|
break;
|
|
62
34
|
case 6:
|
|
63
|
-
|
|
35
|
+
u.getLogger().debug("Rule: separator (EOF) ");
|
|
64
36
|
break;
|
|
65
37
|
case 7:
|
|
66
|
-
|
|
38
|
+
u.getLogger().debug("Rule: hierarchy: ", t[r - 1]), u.setHierarchy(t[r - 1]);
|
|
67
39
|
break;
|
|
68
40
|
case 8:
|
|
69
|
-
|
|
41
|
+
u.getLogger().debug("Stop NL ");
|
|
70
42
|
break;
|
|
71
43
|
case 9:
|
|
72
|
-
|
|
44
|
+
u.getLogger().debug("Stop EOF ");
|
|
73
45
|
break;
|
|
74
46
|
case 10:
|
|
75
|
-
|
|
47
|
+
u.getLogger().debug("Stop NL2 ");
|
|
76
48
|
break;
|
|
77
49
|
case 11:
|
|
78
|
-
|
|
50
|
+
u.getLogger().debug("Stop EOF2 ");
|
|
79
51
|
break;
|
|
80
52
|
case 12:
|
|
81
|
-
|
|
53
|
+
u.getLogger().debug("Rule: statement: ", t[r]), typeof t[r].length == "number" ? this.$ = t[r] : this.$ = [t[r]];
|
|
82
54
|
break;
|
|
83
55
|
case 13:
|
|
84
|
-
|
|
56
|
+
u.getLogger().debug("Rule: statement #2: ", t[r - 1]), this.$ = [t[r - 1]].concat(t[r]);
|
|
85
57
|
break;
|
|
86
58
|
case 14:
|
|
87
|
-
|
|
59
|
+
u.getLogger().debug("Rule: link: ", t[r], o), this.$ = { edgeTypeStr: t[r], label: "" };
|
|
88
60
|
break;
|
|
89
61
|
case 15:
|
|
90
|
-
|
|
62
|
+
u.getLogger().debug("Rule: LABEL link: ", t[r - 3], t[r - 1], t[r]), this.$ = { edgeTypeStr: t[r], label: t[r - 1] };
|
|
91
63
|
break;
|
|
92
64
|
case 18:
|
|
93
|
-
const R = parseInt(t[r]),
|
|
94
|
-
this.$ = { id:
|
|
65
|
+
const R = parseInt(t[r]), Y = u.generateId();
|
|
66
|
+
this.$ = { id: Y, type: "space", label: "", width: R, children: [] };
|
|
95
67
|
break;
|
|
96
68
|
case 23:
|
|
97
|
-
|
|
98
|
-
const F =
|
|
69
|
+
u.getLogger().debug("Rule: (nodeStatement link node) ", t[r - 2], t[r - 1], t[r], " typestr: ", t[r - 1].edgeTypeStr);
|
|
70
|
+
const F = u.edgeStrToEdgeData(t[r - 1].edgeTypeStr);
|
|
99
71
|
this.$ = [
|
|
100
72
|
{ id: t[r - 2].id, label: t[r - 2].label, type: t[r - 2].type, directions: t[r - 2].directions },
|
|
101
73
|
{ id: t[r - 2].id + "-" + t[r].id, start: t[r - 2].id, end: t[r].id, label: t[r - 1].label, type: "edge", directions: t[r].directions, arrowTypeEnd: F, arrowTypeStart: "arrow_open" },
|
|
102
|
-
{ id: t[r].id, label: t[r].label, type:
|
|
74
|
+
{ id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions }
|
|
103
75
|
];
|
|
104
76
|
break;
|
|
105
77
|
case 24:
|
|
106
|
-
|
|
78
|
+
u.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[r - 1], t[r]), this.$ = { id: t[r - 1].id, label: t[r - 1].label, type: u.typeStr2Type(t[r - 1].typeStr), directions: t[r - 1].directions, widthInColumns: parseInt(t[r], 10) };
|
|
107
79
|
break;
|
|
108
80
|
case 25:
|
|
109
|
-
|
|
81
|
+
u.getLogger().debug("Rule: nodeStatement (node) ", t[r]), this.$ = { id: t[r].id, label: t[r].label, type: u.typeStr2Type(t[r].typeStr), directions: t[r].directions, widthInColumns: 1 };
|
|
110
82
|
break;
|
|
111
83
|
case 26:
|
|
112
|
-
|
|
84
|
+
u.getLogger().debug("APA123", this ? this : "na"), u.getLogger().debug("COLUMNS: ", t[r]), this.$ = { type: "column-setting", columns: t[r] === "auto" ? -1 : parseInt(t[r]) };
|
|
113
85
|
break;
|
|
114
86
|
case 27:
|
|
115
|
-
|
|
87
|
+
u.getLogger().debug("Rule: id-block statement : ", t[r - 2], t[r - 1]), u.generateId(), this.$ = { ...t[r - 2], type: "composite", children: t[r - 1] };
|
|
116
88
|
break;
|
|
117
89
|
case 28:
|
|
118
|
-
|
|
119
|
-
const C =
|
|
90
|
+
u.getLogger().debug("Rule: blockStatement : ", t[r - 2], t[r - 1], t[r]);
|
|
91
|
+
const C = u.generateId();
|
|
120
92
|
this.$ = { id: C, type: "composite", label: "", children: t[r - 1] };
|
|
121
93
|
break;
|
|
122
94
|
case 29:
|
|
123
|
-
|
|
95
|
+
u.getLogger().debug("Rule: node (NODE_ID separator): ", t[r]), this.$ = { id: t[r] };
|
|
124
96
|
break;
|
|
125
97
|
case 30:
|
|
126
|
-
|
|
98
|
+
u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[r - 1], t[r]), this.$ = { id: t[r - 1], label: t[r].label, typeStr: t[r].typeStr, directions: t[r].directions };
|
|
127
99
|
break;
|
|
128
100
|
case 31:
|
|
129
|
-
|
|
101
|
+
u.getLogger().debug("Rule: dirList: ", t[r]), this.$ = [t[r]];
|
|
130
102
|
break;
|
|
131
103
|
case 32:
|
|
132
|
-
|
|
104
|
+
u.getLogger().debug("Rule: dirList: ", t[r - 1], t[r]), this.$ = [t[r - 1]].concat(t[r]);
|
|
133
105
|
break;
|
|
134
106
|
case 33:
|
|
135
|
-
|
|
107
|
+
u.getLogger().debug("Rule: nodeShapeNLabel: ", t[r - 2], t[r - 1], t[r]), this.$ = { typeStr: t[r - 2] + t[r], label: t[r - 1] };
|
|
136
108
|
break;
|
|
137
109
|
case 34:
|
|
138
|
-
|
|
110
|
+
u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[r - 3], t[r - 2], " #3:", t[r - 1], t[r]), this.$ = { typeStr: t[r - 3] + t[r], label: t[r - 2], directions: t[r - 1] };
|
|
139
111
|
break;
|
|
140
112
|
case 35:
|
|
141
113
|
case 36:
|
|
@@ -149,71 +121,71 @@ var de, ge, ie = function() {
|
|
|
149
121
|
break;
|
|
150
122
|
}
|
|
151
123
|
},
|
|
152
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28:
|
|
124
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 8: [1, 20] }, e(p, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: a, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }), e(x, [2, 16], { 14: 22, 15: y, 16: T }), e(x, [2, 17]), e(x, [2, 18]), e(x, [2, 19]), e(x, [2, 20]), e(x, [2, 21]), e(x, [2, 22]), e(v, [2, 25], { 27: [1, 25] }), e(x, [2, 26]), { 19: 26, 26: 12, 32: g }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(N, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(p, [2, 13]), { 26: 35, 32: g }, { 32: [2, 14] }, { 17: [1, 36] }, e(v, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: y, 16: T, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: d, 29: c, 31: n, 32: g, 40: l, 44: f, 47: b }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(N, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(v, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(x, [2, 28]), e(x, [2, 35]), e(x, [2, 36]), e(x, [2, 37]), e(x, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(x, [2, 27]), e(N, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(N, [2, 34]), { 39: [2, 32] }],
|
|
153
125
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
154
|
-
parseError: function(
|
|
126
|
+
parseError: function(o, s) {
|
|
155
127
|
if (s.recoverable)
|
|
156
|
-
this.trace(
|
|
128
|
+
this.trace(o);
|
|
157
129
|
else {
|
|
158
|
-
var i = new Error(
|
|
130
|
+
var i = new Error(o);
|
|
159
131
|
throw i.hash = s, i;
|
|
160
132
|
}
|
|
161
133
|
},
|
|
162
|
-
parse: function(
|
|
163
|
-
var s = this, i = [0],
|
|
164
|
-
for (var
|
|
165
|
-
Object.prototype.hasOwnProperty.call(this.yy,
|
|
166
|
-
w.setInput(
|
|
167
|
-
var
|
|
168
|
-
t.push(
|
|
169
|
-
var
|
|
170
|
-
typeof
|
|
171
|
-
function
|
|
134
|
+
parse: function(o) {
|
|
135
|
+
var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1, Se = t.slice.call(arguments, 1), w = Object.create(this.lexer), K = { yy: {} };
|
|
136
|
+
for (var Z in this.yy)
|
|
137
|
+
Object.prototype.hasOwnProperty.call(this.yy, Z) && (K.yy[Z] = this.yy[Z]);
|
|
138
|
+
w.setInput(o, K.yy), K.yy.lexer = w, K.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
|
|
139
|
+
var J = w.yylloc;
|
|
140
|
+
t.push(J);
|
|
141
|
+
var Le = w.options && w.options.ranges;
|
|
142
|
+
typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
143
|
+
function me() {
|
|
172
144
|
var P;
|
|
173
|
-
return P =
|
|
145
|
+
return P = u.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = s.symbols_[P] || P), P;
|
|
174
146
|
}
|
|
175
|
-
for (var I,
|
|
176
|
-
if (
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
for (
|
|
180
|
-
this.terminals_[
|
|
181
|
-
w.showPosition ?
|
|
147
|
+
for (var I, M, z, Q, W = {}, X, B, ae, G; ; ) {
|
|
148
|
+
if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = me()), z = m[M] && m[M][I]), typeof z > "u" || !z.length || !z[0]) {
|
|
149
|
+
var $ = "";
|
|
150
|
+
G = [];
|
|
151
|
+
for (X in m[M])
|
|
152
|
+
this.terminals_[X] && X > F && G.push("'" + this.terminals_[X] + "'");
|
|
153
|
+
w.showPosition ? $ = "Parse error on line " + (R + 1) + `:
|
|
182
154
|
` + w.showPosition() + `
|
|
183
|
-
Expecting ` +
|
|
155
|
+
Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "Parse error on line " + (R + 1) + ": Unexpected " + (I == C ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError($, {
|
|
184
156
|
text: w.match,
|
|
185
157
|
token: this.terminals_[I] || I,
|
|
186
158
|
line: w.yylineno,
|
|
187
|
-
loc:
|
|
188
|
-
expected:
|
|
159
|
+
loc: J,
|
|
160
|
+
expected: G
|
|
189
161
|
});
|
|
190
162
|
}
|
|
191
163
|
if (z[0] instanceof Array && z.length > 1)
|
|
192
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
164
|
+
throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + I);
|
|
193
165
|
switch (z[0]) {
|
|
194
166
|
case 1:
|
|
195
|
-
i.push(I),
|
|
167
|
+
i.push(I), h.push(w.yytext), t.push(w.yylloc), i.push(z[1]), I = null, Y = w.yyleng, r = w.yytext, R = w.yylineno, J = w.yylloc;
|
|
196
168
|
break;
|
|
197
169
|
case 2:
|
|
198
|
-
if (B = this.productions_[z[1]][1],
|
|
170
|
+
if (B = this.productions_[z[1]][1], W.$ = h[h.length - B], W._$ = {
|
|
199
171
|
first_line: t[t.length - (B || 1)].first_line,
|
|
200
172
|
last_line: t[t.length - 1].last_line,
|
|
201
173
|
first_column: t[t.length - (B || 1)].first_column,
|
|
202
174
|
last_column: t[t.length - 1].last_column
|
|
203
|
-
},
|
|
175
|
+
}, Le && (W._$.range = [
|
|
204
176
|
t[t.length - (B || 1)].range[0],
|
|
205
177
|
t[t.length - 1].range[1]
|
|
206
|
-
]),
|
|
178
|
+
]), Q = this.performAction.apply(W, [
|
|
207
179
|
r,
|
|
208
|
-
|
|
180
|
+
Y,
|
|
209
181
|
R,
|
|
210
|
-
|
|
182
|
+
K.yy,
|
|
211
183
|
z[1],
|
|
212
|
-
|
|
184
|
+
h,
|
|
213
185
|
t
|
|
214
|
-
].concat(
|
|
215
|
-
return
|
|
216
|
-
B && (i = i.slice(0, -1 * B * 2),
|
|
186
|
+
].concat(Se)), typeof Q < "u")
|
|
187
|
+
return Q;
|
|
188
|
+
B && (i = i.slice(0, -1 * B * 2), h = h.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ae = m[i[i.length - 2]][i[i.length - 1]], i.push(ae);
|
|
217
189
|
break;
|
|
218
190
|
case 3:
|
|
219
191
|
return !0;
|
|
@@ -231,8 +203,8 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
231
203
|
throw new Error(s);
|
|
232
204
|
},
|
|
233
205
|
// resets the lexer, sets new input
|
|
234
|
-
setInput: function(
|
|
235
|
-
return this.yy = s || this.yy || {}, this._input =
|
|
206
|
+
setInput: function(o, s) {
|
|
207
|
+
return this.yy = s || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
236
208
|
first_line: 1,
|
|
237
209
|
first_column: 0,
|
|
238
210
|
last_line: 1,
|
|
@@ -241,24 +213,24 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
241
213
|
},
|
|
242
214
|
// consumes and returns one char from the input
|
|
243
215
|
input: function() {
|
|
244
|
-
var
|
|
245
|
-
this.yytext +=
|
|
246
|
-
var s =
|
|
247
|
-
return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1),
|
|
216
|
+
var o = this._input[0];
|
|
217
|
+
this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
|
|
218
|
+
var s = o.match(/(?:\r\n?|\n).*/g);
|
|
219
|
+
return s ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
|
|
248
220
|
},
|
|
249
221
|
// unshifts one char (or a string) into the input
|
|
250
|
-
unput: function(
|
|
251
|
-
var s =
|
|
252
|
-
this._input =
|
|
253
|
-
var
|
|
222
|
+
unput: function(o) {
|
|
223
|
+
var s = o.length, i = o.split(/(?:\r\n?|\n)/g);
|
|
224
|
+
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - s), this.offset -= s;
|
|
225
|
+
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
254
226
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), i.length - 1 && (this.yylineno -= i.length - 1);
|
|
255
|
-
var
|
|
227
|
+
var h = this.yylloc.range;
|
|
256
228
|
return this.yylloc = {
|
|
257
229
|
first_line: this.yylloc.first_line,
|
|
258
230
|
last_line: this.yylineno + 1,
|
|
259
231
|
first_column: this.yylloc.first_column,
|
|
260
|
-
last_column: i ? (i.length ===
|
|
261
|
-
}, this.options.ranges && (this.yylloc.range = [
|
|
232
|
+
last_column: i ? (i.length === u.length ? this.yylloc.first_column : 0) + u[u.length - i.length].length - i[0].length : this.yylloc.first_column - s
|
|
233
|
+
}, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - s]), this.yyleng = this.yytext.length, this;
|
|
262
234
|
},
|
|
263
235
|
// When called from action, caches matched text and appends it on next action
|
|
264
236
|
more: function() {
|
|
@@ -278,29 +250,29 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
278
250
|
return this;
|
|
279
251
|
},
|
|
280
252
|
// retain first n characters of the match
|
|
281
|
-
less: function(
|
|
282
|
-
this.unput(this.match.slice(
|
|
253
|
+
less: function(o) {
|
|
254
|
+
this.unput(this.match.slice(o));
|
|
283
255
|
},
|
|
284
256
|
// displays already matched input, i.e. for error messages
|
|
285
257
|
pastInput: function() {
|
|
286
|
-
var
|
|
287
|
-
return (
|
|
258
|
+
var o = this.matched.substr(0, this.matched.length - this.match.length);
|
|
259
|
+
return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
|
|
288
260
|
},
|
|
289
261
|
// displays upcoming input, i.e. for error messages
|
|
290
262
|
upcomingInput: function() {
|
|
291
|
-
var
|
|
292
|
-
return
|
|
263
|
+
var o = this.match;
|
|
264
|
+
return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
293
265
|
},
|
|
294
266
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
295
267
|
showPosition: function() {
|
|
296
|
-
var
|
|
297
|
-
return
|
|
268
|
+
var o = this.pastInput(), s = new Array(o.length + 1).join("-");
|
|
269
|
+
return o + this.upcomingInput() + `
|
|
298
270
|
` + s + "^";
|
|
299
271
|
},
|
|
300
272
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
301
|
-
test_match: function(
|
|
302
|
-
var i,
|
|
303
|
-
if (this.options.backtrack_lexer && (
|
|
273
|
+
test_match: function(o, s) {
|
|
274
|
+
var i, u, h;
|
|
275
|
+
if (this.options.backtrack_lexer && (h = {
|
|
304
276
|
yylineno: this.yylineno,
|
|
305
277
|
yylloc: {
|
|
306
278
|
first_line: this.yylloc.first_line,
|
|
@@ -319,16 +291,16 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
319
291
|
yy: this.yy,
|
|
320
292
|
conditionStack: this.conditionStack.slice(0),
|
|
321
293
|
done: this.done
|
|
322
|
-
}, this.options.ranges && (
|
|
294
|
+
}, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), u = o[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
|
|
323
295
|
first_line: this.yylloc.last_line,
|
|
324
296
|
last_line: this.yylineno + 1,
|
|
325
297
|
first_column: this.yylloc.last_column,
|
|
326
|
-
last_column:
|
|
327
|
-
}, this.yytext +=
|
|
298
|
+
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
|
|
299
|
+
}, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], i = this.performAction.call(this, this.yy, this, s, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), i)
|
|
328
300
|
return i;
|
|
329
301
|
if (this._backtrack) {
|
|
330
|
-
for (var t in
|
|
331
|
-
this[t] =
|
|
302
|
+
for (var t in h)
|
|
303
|
+
this[t] = h[t];
|
|
332
304
|
return !1;
|
|
333
305
|
}
|
|
334
306
|
return !1;
|
|
@@ -338,13 +310,13 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
338
310
|
if (this.done)
|
|
339
311
|
return this.EOF;
|
|
340
312
|
this._input || (this.done = !0);
|
|
341
|
-
var
|
|
313
|
+
var o, s, i, u;
|
|
342
314
|
this._more || (this.yytext = "", this.match = "");
|
|
343
|
-
for (var
|
|
344
|
-
if (i = this._input.match(this.rules[
|
|
345
|
-
if (s = i,
|
|
346
|
-
if (
|
|
347
|
-
return
|
|
315
|
+
for (var h = this._currentRules(), t = 0; t < h.length; t++)
|
|
316
|
+
if (i = this._input.match(this.rules[h[t]]), i && (!s || i[0].length > s[0].length)) {
|
|
317
|
+
if (s = i, u = t, this.options.backtrack_lexer) {
|
|
318
|
+
if (o = this.test_match(i, h[t]), o !== !1)
|
|
319
|
+
return o;
|
|
348
320
|
if (this._backtrack) {
|
|
349
321
|
s = !1;
|
|
350
322
|
continue;
|
|
@@ -353,7 +325,7 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
353
325
|
} else if (!this.options.flex)
|
|
354
326
|
break;
|
|
355
327
|
}
|
|
356
|
-
return s ? (
|
|
328
|
+
return s ? (o = this.test_match(s, h[u]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
357
329
|
` + this.showPosition(), {
|
|
358
330
|
text: "",
|
|
359
331
|
token: null,
|
|
@@ -391,8 +363,8 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
391
363
|
return this.conditionStack.length;
|
|
392
364
|
},
|
|
393
365
|
options: {},
|
|
394
|
-
performAction: function(s, i,
|
|
395
|
-
switch (
|
|
366
|
+
performAction: function(s, i, u, h) {
|
|
367
|
+
switch (u) {
|
|
396
368
|
case 0:
|
|
397
369
|
return 10;
|
|
398
370
|
case 1:
|
|
@@ -634,73 +606,73 @@ Expecting ` + Z.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : se =
|
|
|
634
606
|
}
|
|
635
607
|
return k.prototype = L, L.Parser = k, new k();
|
|
636
608
|
}();
|
|
637
|
-
|
|
638
|
-
const
|
|
639
|
-
let O = {},
|
|
640
|
-
const
|
|
641
|
-
let
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
a
|
|
646
|
-
const n =
|
|
647
|
-
if (
|
|
648
|
-
const
|
|
649
|
-
|
|
609
|
+
ee.parser = ee;
|
|
610
|
+
const Be = ee;
|
|
611
|
+
let O = {}, ie = [], j = {};
|
|
612
|
+
const ce = "color", ue = "fill", Pe = "bgFill", ge = ",";
|
|
613
|
+
let V = {};
|
|
614
|
+
const Fe = function(e, a = "") {
|
|
615
|
+
V[e] === void 0 && (V[e] = { id: e, styles: [], textStyles: [] });
|
|
616
|
+
const d = V[e];
|
|
617
|
+
a?.split(ge).forEach((c) => {
|
|
618
|
+
const n = c.replace(/([^;]*);/, "$1").trim();
|
|
619
|
+
if (c.match(ce)) {
|
|
620
|
+
const l = n.replace(ue, Pe).replace(ce, ue);
|
|
621
|
+
d.textStyles.push(l);
|
|
650
622
|
}
|
|
651
|
-
|
|
623
|
+
d.styles.push(n);
|
|
652
624
|
});
|
|
653
|
-
},
|
|
654
|
-
const
|
|
655
|
-
a != null && (
|
|
656
|
-
},
|
|
657
|
-
e.split(",").forEach(function(
|
|
658
|
-
let
|
|
659
|
-
if (
|
|
660
|
-
const n =
|
|
661
|
-
O[n] = { id: n, type: "na", children: [] },
|
|
625
|
+
}, Ke = function(e, a = "") {
|
|
626
|
+
const d = O[e];
|
|
627
|
+
a != null && (d.styles = a.split(ge));
|
|
628
|
+
}, Me = function(e, a) {
|
|
629
|
+
e.split(",").forEach(function(d) {
|
|
630
|
+
let c = O[d];
|
|
631
|
+
if (c === void 0) {
|
|
632
|
+
const n = d.trim();
|
|
633
|
+
O[n] = { id: n, type: "na", children: [] }, c = O[n];
|
|
662
634
|
}
|
|
663
|
-
|
|
635
|
+
c.classes || (c.classes = []), c.classes.push(a);
|
|
664
636
|
});
|
|
665
|
-
},
|
|
666
|
-
const
|
|
667
|
-
for (const n of
|
|
637
|
+
}, pe = (e, a) => {
|
|
638
|
+
const d = e.flat(), c = [];
|
|
639
|
+
for (const n of d) {
|
|
668
640
|
if (n.type === "classDef") {
|
|
669
|
-
|
|
641
|
+
Fe(n.id, n.css);
|
|
670
642
|
continue;
|
|
671
643
|
}
|
|
672
644
|
if (n.type === "applyClass") {
|
|
673
|
-
|
|
645
|
+
Me(n.id, n?.styleClass || "");
|
|
674
646
|
continue;
|
|
675
647
|
}
|
|
676
648
|
if (n.type === "applyStyles") {
|
|
677
|
-
n
|
|
649
|
+
n?.stylesStr && Ke(n.id, n?.stylesStr);
|
|
678
650
|
continue;
|
|
679
651
|
}
|
|
680
652
|
if (n.type === "column-setting")
|
|
681
653
|
a.columns = n.columns || -1;
|
|
682
654
|
else if (n.type === "edge")
|
|
683
|
-
|
|
655
|
+
j[n.id] ? j[n.id]++ : j[n.id] = 1, n.id = j[n.id] + "-" + n.id, ie.push(n);
|
|
684
656
|
else {
|
|
685
657
|
n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
const
|
|
689
|
-
for (let
|
|
690
|
-
const
|
|
691
|
-
|
|
658
|
+
const g = !O[n.id];
|
|
659
|
+
if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && pe(n.children, n), n.type === "space") {
|
|
660
|
+
const l = n.width || 1;
|
|
661
|
+
for (let f = 0; f < l; f++) {
|
|
662
|
+
const b = ve(n);
|
|
663
|
+
b.id = b.id + "-" + f, O[b.id] = b, c.push(b);
|
|
692
664
|
}
|
|
693
665
|
} else
|
|
694
|
-
|
|
666
|
+
g && c.push(n);
|
|
695
667
|
}
|
|
696
668
|
}
|
|
697
|
-
a.children =
|
|
669
|
+
a.children = c;
|
|
698
670
|
};
|
|
699
|
-
let
|
|
700
|
-
const
|
|
701
|
-
S.debug("Clear called"),
|
|
671
|
+
let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
|
|
672
|
+
const Ye = () => {
|
|
673
|
+
S.debug("Clear called"), Ee(), U = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: U }, re = [], V = {}, ie = [], j = {};
|
|
702
674
|
};
|
|
703
|
-
function
|
|
675
|
+
function We(e) {
|
|
704
676
|
switch (S.debug("typeStr2Type", e), e) {
|
|
705
677
|
case "[]":
|
|
706
678
|
return "square";
|
|
@@ -736,7 +708,7 @@ function Qe(e) {
|
|
|
736
708
|
return "na";
|
|
737
709
|
}
|
|
738
710
|
}
|
|
739
|
-
function
|
|
711
|
+
function je(e) {
|
|
740
712
|
switch (S.debug("typeStr2Type", e), e) {
|
|
741
713
|
case "==":
|
|
742
714
|
return "thick";
|
|
@@ -744,7 +716,7 @@ function $e(e) {
|
|
|
744
716
|
return "normal";
|
|
745
717
|
}
|
|
746
718
|
}
|
|
747
|
-
function
|
|
719
|
+
function Ve(e) {
|
|
748
720
|
switch (e.trim()) {
|
|
749
721
|
case "--x":
|
|
750
722
|
return "arrow_cross";
|
|
@@ -754,36 +726,36 @@ function et(e) {
|
|
|
754
726
|
return "arrow_point";
|
|
755
727
|
}
|
|
756
728
|
}
|
|
757
|
-
let
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
},
|
|
729
|
+
let de = 0;
|
|
730
|
+
const Ue = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), Xe = (e) => {
|
|
731
|
+
U.children = e, pe(e, U), re = U.children;
|
|
732
|
+
}, Ge = (e) => {
|
|
761
733
|
const a = O[e];
|
|
762
734
|
return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
|
|
763
|
-
},
|
|
735
|
+
}, He = () => [...Object.values(O)], qe = () => re || [], Ze = () => ie, Je = (e) => O[e], Qe = (e) => {
|
|
764
736
|
O[e.id] = e;
|
|
765
|
-
},
|
|
766
|
-
return
|
|
767
|
-
},
|
|
768
|
-
getConfig: () =>
|
|
769
|
-
typeStr2Type:
|
|
770
|
-
edgeTypeStr2Type:
|
|
771
|
-
edgeStrToEdgeData:
|
|
772
|
-
getLogger:
|
|
773
|
-
getBlocksFlat:
|
|
774
|
-
getBlocks:
|
|
775
|
-
getEdges:
|
|
776
|
-
setHierarchy:
|
|
777
|
-
getBlock:
|
|
778
|
-
setBlock:
|
|
779
|
-
getColumns:
|
|
780
|
-
getClasses:
|
|
781
|
-
clear:
|
|
782
|
-
generateId:
|
|
783
|
-
},
|
|
784
|
-
const
|
|
785
|
-
return
|
|
786
|
-
},
|
|
737
|
+
}, $e = () => console, et = function() {
|
|
738
|
+
return V;
|
|
739
|
+
}, tt = {
|
|
740
|
+
getConfig: () => se().block,
|
|
741
|
+
typeStr2Type: We,
|
|
742
|
+
edgeTypeStr2Type: je,
|
|
743
|
+
edgeStrToEdgeData: Ve,
|
|
744
|
+
getLogger: $e,
|
|
745
|
+
getBlocksFlat: He,
|
|
746
|
+
getBlocks: qe,
|
|
747
|
+
getEdges: Ze,
|
|
748
|
+
setHierarchy: Xe,
|
|
749
|
+
getBlock: Je,
|
|
750
|
+
setBlock: Qe,
|
|
751
|
+
getColumns: Ge,
|
|
752
|
+
getClasses: et,
|
|
753
|
+
clear: Ye,
|
|
754
|
+
generateId: Ue
|
|
755
|
+
}, st = tt, q = (e, a) => {
|
|
756
|
+
const d = Re, c = d(e, "r"), n = d(e, "g"), g = d(e, "b");
|
|
757
|
+
return we(c, n, g, a);
|
|
758
|
+
}, it = (e) => `.label {
|
|
787
759
|
font-family: ${e.fontFamily};
|
|
788
760
|
color: ${e.nodeTextColor || e.textColor};
|
|
789
761
|
}
|
|
@@ -853,14 +825,14 @@ const tt = () => (be++, "id-" + Math.random().toString(36).substr(2, 12) + "-" +
|
|
|
853
825
|
|
|
854
826
|
/* For html labels only */
|
|
855
827
|
.labelBkg {
|
|
856
|
-
background-color: ${
|
|
828
|
+
background-color: ${q(e.edgeLabelBackground, 0.5)};
|
|
857
829
|
// background-color:
|
|
858
830
|
}
|
|
859
831
|
|
|
860
832
|
.node .cluster {
|
|
861
|
-
// fill: ${
|
|
862
|
-
fill: ${
|
|
863
|
-
stroke: ${
|
|
833
|
+
// fill: ${q(e.mainBkg, 0.5)};
|
|
834
|
+
fill: ${q(e.clusterBkg, 0.5)};
|
|
835
|
+
stroke: ${q(e.clusterBorder, 0.2)};
|
|
864
836
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
865
837
|
stroke-width: 1px;
|
|
866
838
|
}
|
|
@@ -895,186 +867,176 @@ const tt = () => (be++, "id-" + Math.random().toString(36).substr(2, 12) + "-" +
|
|
|
895
867
|
font-size: 18px;
|
|
896
868
|
fill: ${e.textColor};
|
|
897
869
|
}
|
|
898
|
-
`,
|
|
899
|
-
function
|
|
900
|
-
var
|
|
901
|
-
const
|
|
902
|
-
let
|
|
903
|
-
(((
|
|
904
|
-
let
|
|
905
|
-
switch (
|
|
870
|
+
`, rt = it;
|
|
871
|
+
function fe(e, a, d = !1) {
|
|
872
|
+
var c, n, g;
|
|
873
|
+
const l = e;
|
|
874
|
+
let f = "default";
|
|
875
|
+
(((c = l?.classes) == null ? void 0 : c.length) || 0) > 0 && (f = (l?.classes || []).join(" ")), f = f + " flowchart-label";
|
|
876
|
+
let b = 0, p = "", x;
|
|
877
|
+
switch (l.type) {
|
|
906
878
|
case "round":
|
|
907
|
-
|
|
879
|
+
b = 5, p = "rect";
|
|
908
880
|
break;
|
|
909
881
|
case "composite":
|
|
910
|
-
|
|
882
|
+
b = 0, p = "composite", x = 0;
|
|
911
883
|
break;
|
|
912
884
|
case "square":
|
|
913
|
-
|
|
885
|
+
p = "rect";
|
|
914
886
|
break;
|
|
915
887
|
case "diamond":
|
|
916
|
-
|
|
888
|
+
p = "question";
|
|
917
889
|
break;
|
|
918
890
|
case "hexagon":
|
|
919
|
-
|
|
891
|
+
p = "hexagon";
|
|
920
892
|
break;
|
|
921
893
|
case "block_arrow":
|
|
922
|
-
|
|
894
|
+
p = "block_arrow";
|
|
923
895
|
break;
|
|
924
896
|
case "odd":
|
|
925
|
-
|
|
897
|
+
p = "rect_left_inv_arrow";
|
|
926
898
|
break;
|
|
927
899
|
case "lean_right":
|
|
928
|
-
|
|
900
|
+
p = "lean_right";
|
|
929
901
|
break;
|
|
930
902
|
case "lean_left":
|
|
931
|
-
|
|
903
|
+
p = "lean_left";
|
|
932
904
|
break;
|
|
933
905
|
case "trapezoid":
|
|
934
|
-
|
|
906
|
+
p = "trapezoid";
|
|
935
907
|
break;
|
|
936
908
|
case "inv_trapezoid":
|
|
937
|
-
|
|
909
|
+
p = "inv_trapezoid";
|
|
938
910
|
break;
|
|
939
911
|
case "rect_left_inv_arrow":
|
|
940
|
-
|
|
912
|
+
p = "rect_left_inv_arrow";
|
|
941
913
|
break;
|
|
942
914
|
case "circle":
|
|
943
|
-
|
|
915
|
+
p = "circle";
|
|
944
916
|
break;
|
|
945
917
|
case "ellipse":
|
|
946
|
-
|
|
918
|
+
p = "ellipse";
|
|
947
919
|
break;
|
|
948
920
|
case "stadium":
|
|
949
|
-
|
|
921
|
+
p = "stadium";
|
|
950
922
|
break;
|
|
951
923
|
case "subroutine":
|
|
952
|
-
|
|
924
|
+
p = "subroutine";
|
|
953
925
|
break;
|
|
954
926
|
case "cylinder":
|
|
955
|
-
|
|
927
|
+
p = "cylinder";
|
|
956
928
|
break;
|
|
957
929
|
case "group":
|
|
958
|
-
|
|
930
|
+
p = "rect";
|
|
959
931
|
break;
|
|
960
932
|
case "doublecircle":
|
|
961
|
-
|
|
933
|
+
p = "doublecircle";
|
|
962
934
|
break;
|
|
963
935
|
default:
|
|
964
|
-
|
|
936
|
+
p = "rect";
|
|
965
937
|
}
|
|
966
|
-
const y =
|
|
938
|
+
const y = De(l?.styles || []), T = l.label, v = l.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
967
939
|
return {
|
|
968
940
|
labelStyle: y.labelStyle,
|
|
969
|
-
shape:
|
|
941
|
+
shape: p,
|
|
970
942
|
labelText: T,
|
|
971
|
-
rx:
|
|
972
|
-
ry:
|
|
973
|
-
class:
|
|
943
|
+
rx: b,
|
|
944
|
+
ry: b,
|
|
945
|
+
class: f,
|
|
974
946
|
style: y.style,
|
|
975
|
-
id:
|
|
976
|
-
directions:
|
|
947
|
+
id: l.id,
|
|
948
|
+
directions: l.directions,
|
|
977
949
|
width: v.width,
|
|
978
950
|
height: v.height,
|
|
979
951
|
x: v.x,
|
|
980
952
|
y: v.y,
|
|
981
|
-
positioned:
|
|
953
|
+
positioned: d,
|
|
982
954
|
intersect: void 0,
|
|
983
|
-
type:
|
|
984
|
-
padding: x
|
|
955
|
+
type: l.type,
|
|
956
|
+
padding: x ?? (((g = (n = se()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
|
|
985
957
|
};
|
|
986
958
|
}
|
|
987
|
-
function
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
o.size = { width: p.width, height: p.height, x: 0, y: 0, node: n }, l.setBlock(o), n.remove();
|
|
994
|
-
});
|
|
959
|
+
async function nt(e, a, d) {
|
|
960
|
+
const c = fe(a, d, !1);
|
|
961
|
+
if (c.type === "group")
|
|
962
|
+
return;
|
|
963
|
+
const n = await he(e, c), g = n.node().getBBox(), l = d.getBlock(c.id);
|
|
964
|
+
l.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, d.setBlock(l), n.remove();
|
|
995
965
|
}
|
|
996
|
-
function
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
l.getBlock(u.id).type !== "space" && (yield xe(e, u), a.intersect = u == null ? void 0 : u.intersect, Ye(u));
|
|
1000
|
-
});
|
|
966
|
+
async function at(e, a, d) {
|
|
967
|
+
const c = fe(a, d, !0);
|
|
968
|
+
d.getBlock(c.id).type !== "space" && (await he(e, c), a.intersect = c?.intersect, Te(c));
|
|
1001
969
|
}
|
|
1002
|
-
function
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
yield u(e, n, l), n.children && (yield oe(e, n.children, l, u));
|
|
1006
|
-
});
|
|
970
|
+
async function ne(e, a, d, c) {
|
|
971
|
+
for (const n of a)
|
|
972
|
+
await c(e, n, d), n.children && await ne(e, n.children, d, c);
|
|
1007
973
|
}
|
|
1008
|
-
function
|
|
1009
|
-
|
|
1010
|
-
yield oe(e, a, l, ft);
|
|
1011
|
-
});
|
|
974
|
+
async function lt(e, a, d) {
|
|
975
|
+
await ne(e, a, d, nt);
|
|
1012
976
|
}
|
|
1013
|
-
function
|
|
1014
|
-
|
|
1015
|
-
yield oe(e, a, l, bt);
|
|
1016
|
-
});
|
|
977
|
+
async function ot(e, a, d) {
|
|
978
|
+
await ne(e, a, d, at);
|
|
1017
979
|
}
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
980
|
+
async function ct(e, a, d, c, n) {
|
|
981
|
+
const g = new ze({
|
|
982
|
+
multigraph: !0,
|
|
983
|
+
compound: !0
|
|
984
|
+
});
|
|
985
|
+
g.setGraph({
|
|
986
|
+
rankdir: "TB",
|
|
987
|
+
nodesep: 10,
|
|
988
|
+
ranksep: 10,
|
|
989
|
+
marginx: 8,
|
|
990
|
+
marginy: 8
|
|
991
|
+
});
|
|
992
|
+
for (const l of d)
|
|
993
|
+
l.size && g.setNode(l.id, {
|
|
994
|
+
width: l.size.width,
|
|
995
|
+
height: l.size.height,
|
|
996
|
+
intersect: l.intersect
|
|
1030
997
|
});
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
e,
|
|
1048
|
-
{ v: o.start, w: o.end, name: o.id },
|
|
1049
|
-
U(V({}, o), {
|
|
1050
|
-
arrowTypeEnd: o.arrowTypeEnd,
|
|
1051
|
-
arrowTypeStart: o.arrowTypeStart,
|
|
1052
|
-
points: y,
|
|
1053
|
-
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
1054
|
-
}),
|
|
1055
|
-
void 0,
|
|
1056
|
-
"block",
|
|
1057
|
-
p,
|
|
1058
|
-
n
|
|
1059
|
-
), o.label && (yield Ke(e, U(V({}, o), {
|
|
1060
|
-
label: o.label,
|
|
1061
|
-
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
1062
|
-
arrowTypeEnd: o.arrowTypeEnd,
|
|
1063
|
-
arrowTypeStart: o.arrowTypeStart,
|
|
998
|
+
for (const l of a)
|
|
999
|
+
if (l.start && l.end) {
|
|
1000
|
+
const f = c.getBlock(l.start), b = c.getBlock(l.end);
|
|
1001
|
+
if (f?.size && b?.size) {
|
|
1002
|
+
const p = f.size, x = b.size, y = [
|
|
1003
|
+
{ x: p.x, y: p.y },
|
|
1004
|
+
{ x: p.x + (x.x - p.x) / 2, y: p.y + (x.y - p.y) / 2 },
|
|
1005
|
+
{ x: x.x, y: x.y }
|
|
1006
|
+
];
|
|
1007
|
+
await ke(
|
|
1008
|
+
e,
|
|
1009
|
+
{ v: l.start, w: l.end, name: l.id },
|
|
1010
|
+
{
|
|
1011
|
+
...l,
|
|
1012
|
+
arrowTypeEnd: l.arrowTypeEnd,
|
|
1013
|
+
arrowTypeStart: l.arrowTypeStart,
|
|
1064
1014
|
points: y,
|
|
1065
1015
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1016
|
+
},
|
|
1017
|
+
void 0,
|
|
1018
|
+
"block",
|
|
1019
|
+
g,
|
|
1020
|
+
n
|
|
1021
|
+
), l.label && (await Ie(e, {
|
|
1022
|
+
...l,
|
|
1023
|
+
label: l.label,
|
|
1024
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
1025
|
+
arrowTypeEnd: l.arrowTypeEnd,
|
|
1026
|
+
arrowTypeStart: l.arrowTypeStart,
|
|
1027
|
+
points: y,
|
|
1028
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
1029
|
+
}), await Oe(
|
|
1030
|
+
{ ...l, x: y[1].x, y: y[1].y },
|
|
1031
|
+
{
|
|
1032
|
+
originalPath: y
|
|
1033
|
+
}
|
|
1034
|
+
));
|
|
1073
1035
|
}
|
|
1074
|
-
|
|
1036
|
+
}
|
|
1075
1037
|
}
|
|
1076
|
-
const _ = ((
|
|
1077
|
-
function
|
|
1038
|
+
const _ = ((oe = (le = _e()) == null ? void 0 : le.block) == null ? void 0 : oe.padding) || 8;
|
|
1039
|
+
function ut(e, a) {
|
|
1078
1040
|
if (e === 0 || !Number.isInteger(e))
|
|
1079
1041
|
throw new Error("Columns must be an integer !== 0.");
|
|
1080
1042
|
if (a < 0 || !Number.isInteger(a))
|
|
@@ -1083,83 +1045,83 @@ function mt(e, a) {
|
|
|
1083
1045
|
return { px: a, py: 0 };
|
|
1084
1046
|
if (e === 1)
|
|
1085
1047
|
return { px: 0, py: a };
|
|
1086
|
-
const
|
|
1087
|
-
return { px:
|
|
1048
|
+
const d = a % e, c = Math.floor(a / e);
|
|
1049
|
+
return { px: d, py: c };
|
|
1088
1050
|
}
|
|
1089
|
-
const
|
|
1090
|
-
let a = 0,
|
|
1091
|
-
for (const
|
|
1092
|
-
const { width: n, height:
|
|
1051
|
+
const dt = (e) => {
|
|
1052
|
+
let a = 0, d = 0;
|
|
1053
|
+
for (const c of e.children) {
|
|
1054
|
+
const { width: n, height: g, x: l, y: f } = c.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
1093
1055
|
S.debug(
|
|
1094
1056
|
"getMaxChildSize abc95 child:",
|
|
1095
|
-
|
|
1057
|
+
c.id,
|
|
1096
1058
|
"width:",
|
|
1097
1059
|
n,
|
|
1098
1060
|
"height:",
|
|
1099
|
-
|
|
1061
|
+
g,
|
|
1100
1062
|
"x:",
|
|
1101
|
-
|
|
1063
|
+
l,
|
|
1102
1064
|
"y:",
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
),
|
|
1065
|
+
f,
|
|
1066
|
+
c.type
|
|
1067
|
+
), c.type !== "space" && (n > a && (a = n / (e.widthInColumns || 1)), g > d && (d = g));
|
|
1106
1068
|
}
|
|
1107
|
-
return { width: a, height:
|
|
1069
|
+
return { width: a, height: d };
|
|
1108
1070
|
};
|
|
1109
|
-
function
|
|
1110
|
-
var n,
|
|
1071
|
+
function te(e, a, d = 0, c = 0) {
|
|
1072
|
+
var n, g, l, f, b, p, x, y, T, v, N;
|
|
1111
1073
|
S.debug(
|
|
1112
1074
|
"setBlockSizes abc95 (start)",
|
|
1113
1075
|
e.id,
|
|
1114
|
-
(n = e
|
|
1076
|
+
(n = e?.size) == null ? void 0 : n.x,
|
|
1115
1077
|
"block width =",
|
|
1116
|
-
e
|
|
1078
|
+
e?.size,
|
|
1117
1079
|
"sieblingWidth",
|
|
1118
|
-
|
|
1119
|
-
), (
|
|
1120
|
-
width:
|
|
1121
|
-
height:
|
|
1080
|
+
d
|
|
1081
|
+
), (g = e?.size) != null && g.width || (e.size = {
|
|
1082
|
+
width: d,
|
|
1083
|
+
height: c,
|
|
1122
1084
|
x: 0,
|
|
1123
1085
|
y: 0
|
|
1124
1086
|
});
|
|
1125
1087
|
let E = 0, L = 0;
|
|
1126
|
-
if (((
|
|
1127
|
-
for (const
|
|
1128
|
-
|
|
1129
|
-
const A =
|
|
1088
|
+
if (((l = e.children) == null ? void 0 : l.length) > 0) {
|
|
1089
|
+
for (const h of e.children)
|
|
1090
|
+
te(h, a);
|
|
1091
|
+
const A = dt(e);
|
|
1130
1092
|
E = A.width, L = A.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", E, L);
|
|
1131
|
-
for (const
|
|
1132
|
-
|
|
1133
|
-
`abc95 Setting size of children of ${e.id} id=${
|
|
1134
|
-
),
|
|
1135
|
-
`abc95 updating size of ${e.id} children child:${
|
|
1093
|
+
for (const h of e.children)
|
|
1094
|
+
h.size && (S.debug(
|
|
1095
|
+
`abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`
|
|
1096
|
+
), h.size.width = E * (h.widthInColumns || 1) + _ * ((h.widthInColumns || 1) - 1), h.size.height = L, h.size.x = 0, h.size.y = 0, S.debug(
|
|
1097
|
+
`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`
|
|
1136
1098
|
));
|
|
1137
|
-
for (const
|
|
1138
|
-
|
|
1099
|
+
for (const h of e.children)
|
|
1100
|
+
te(h, a, E, L);
|
|
1139
1101
|
const k = e.columns || -1;
|
|
1140
1102
|
let D = 0;
|
|
1141
|
-
for (const
|
|
1142
|
-
D +=
|
|
1143
|
-
let
|
|
1144
|
-
k > 0 && k < D && (
|
|
1145
|
-
const s = Math.ceil(D /
|
|
1146
|
-
let i =
|
|
1147
|
-
if (i <
|
|
1103
|
+
for (const h of e.children)
|
|
1104
|
+
D += h.widthInColumns || 1;
|
|
1105
|
+
let o = e.children.length;
|
|
1106
|
+
k > 0 && k < D && (o = k), e.widthInColumns;
|
|
1107
|
+
const s = Math.ceil(D / o);
|
|
1108
|
+
let i = o * (E + _) + _, u = s * (L + _) + _;
|
|
1109
|
+
if (i < d) {
|
|
1148
1110
|
S.debug(
|
|
1149
|
-
`Detected to small siebling: abc95 ${e.id} sieblingWidth ${
|
|
1150
|
-
), i =
|
|
1151
|
-
const
|
|
1152
|
-
S.debug("Size indata abc88", e.id, "childWidth",
|
|
1111
|
+
`Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`
|
|
1112
|
+
), i = d, u = c;
|
|
1113
|
+
const h = (d - o * _ - _) / o, t = (c - s * _ - _) / s;
|
|
1114
|
+
S.debug("Size indata abc88", e.id, "childWidth", h, "maxWidth", E), S.debug("Size indata abc88", e.id, "childHeight", t, "maxHeight", L), S.debug("Size indata abc88 xSize", o, "padding", _);
|
|
1153
1115
|
for (const m of e.children)
|
|
1154
|
-
m.size && (m.size.width =
|
|
1116
|
+
m.size && (m.size.width = h, m.size.height = t, m.size.x = 0, m.size.y = 0);
|
|
1155
1117
|
}
|
|
1156
1118
|
if (S.debug(
|
|
1157
|
-
`abc95 (finale calc) ${e.id} xSize ${
|
|
1158
|
-
), i < (((
|
|
1159
|
-
i = ((
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1162
|
-
const t = (i -
|
|
1119
|
+
`abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i, ((f = e.size) == null ? void 0 : f.width) || 0)}`
|
|
1120
|
+
), i < (((b = e?.size) == null ? void 0 : b.width) || 0)) {
|
|
1121
|
+
i = ((p = e?.size) == null ? void 0 : p.width) || 0;
|
|
1122
|
+
const h = k > 0 ? Math.min(e.children.length, k) : e.children.length;
|
|
1123
|
+
if (h > 0) {
|
|
1124
|
+
const t = (i - h * _ - _) / h;
|
|
1163
1125
|
S.debug("abc95 (growing to fit) width", e.id, i, (x = e.size) == null ? void 0 : x.width, t);
|
|
1164
1126
|
for (const m of e.children)
|
|
1165
1127
|
m.size && (m.size.width = t);
|
|
@@ -1167,7 +1129,7 @@ function re(e, a, l = 0, u = 0) {
|
|
|
1167
1129
|
}
|
|
1168
1130
|
e.size = {
|
|
1169
1131
|
width: i,
|
|
1170
|
-
height:
|
|
1132
|
+
height: u,
|
|
1171
1133
|
x: 0,
|
|
1172
1134
|
y: 0
|
|
1173
1135
|
};
|
|
@@ -1175,95 +1137,93 @@ function re(e, a, l = 0, u = 0) {
|
|
|
1175
1137
|
S.debug(
|
|
1176
1138
|
"setBlockSizes abc94 (done)",
|
|
1177
1139
|
e.id,
|
|
1178
|
-
(y = e
|
|
1179
|
-
(T = e
|
|
1180
|
-
(v = e
|
|
1181
|
-
(N = e
|
|
1140
|
+
(y = e?.size) == null ? void 0 : y.x,
|
|
1141
|
+
(T = e?.size) == null ? void 0 : T.width,
|
|
1142
|
+
(v = e?.size) == null ? void 0 : v.y,
|
|
1143
|
+
(N = e?.size) == null ? void 0 : N.height
|
|
1182
1144
|
);
|
|
1183
1145
|
}
|
|
1184
|
-
function
|
|
1185
|
-
var
|
|
1146
|
+
function be(e, a) {
|
|
1147
|
+
var d, c, n, g, l, f, b, p, x, y, T, v, N, E, L, A, k;
|
|
1186
1148
|
S.debug(
|
|
1187
|
-
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(
|
|
1149
|
+
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d = e?.size) == null ? void 0 : d.x} y: ${(c = e?.size) == null ? void 0 : c.y} width: ${(n = e?.size) == null ? void 0 : n.width}`
|
|
1188
1150
|
);
|
|
1189
1151
|
const D = e.columns || -1;
|
|
1190
1152
|
if (S.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
|
|
1191
1153
|
e.children.length > 0) {
|
|
1192
|
-
const
|
|
1154
|
+
const o = ((l = (g = e?.children[0]) == null ? void 0 : g.size) == null ? void 0 : l.width) || 0, s = e.children.length * o + (e.children.length - 1) * _;
|
|
1193
1155
|
S.debug("widthOfChildren 88", s, "posX");
|
|
1194
1156
|
let i = 0;
|
|
1195
|
-
S.debug("abc91 block?.size?.x", e.id, (
|
|
1196
|
-
let
|
|
1157
|
+
S.debug("abc91 block?.size?.x", e.id, (f = e?.size) == null ? void 0 : f.x);
|
|
1158
|
+
let u = (b = e?.size) != null && b.x ? ((p = e?.size) == null ? void 0 : p.x) + (-((x = e?.size) == null ? void 0 : x.width) / 2 || 0) : -_, h = 0;
|
|
1197
1159
|
for (const t of e.children) {
|
|
1198
1160
|
const m = e;
|
|
1199
1161
|
if (!t.size)
|
|
1200
1162
|
continue;
|
|
1201
|
-
const { width: r, height: R } = t.size, { px:
|
|
1202
|
-
if (F !=
|
|
1203
|
-
`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${
|
|
1163
|
+
const { width: r, height: R } = t.size, { px: Y, py: F } = ut(D, i);
|
|
1164
|
+
if (F != h && (h = F, u = (y = e?.size) != null && y.x ? ((T = e?.size) == null ? void 0 : T.x) + (-((v = e?.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, h)), S.debug(
|
|
1165
|
+
`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(N = m?.size) == null ? void 0 : N.x},${(E = m?.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
|
|
1204
1166
|
), m.size) {
|
|
1205
1167
|
const C = r / 2;
|
|
1206
|
-
t.size.x =
|
|
1207
|
-
`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${
|
|
1208
|
-
),
|
|
1209
|
-
`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${
|
|
1168
|
+
t.size.x = u + _ + C, S.debug(
|
|
1169
|
+
`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${_} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r * (t?.widthInColumns || 1) / 2}`
|
|
1170
|
+
), u = t.size.x + C, t.size.y = m.size.y - m.size.height / 2 + F * (R + _) + R / 2 + _, S.debug(
|
|
1171
|
+
`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * (t?.widthInColumns || 1) / 2}`
|
|
1210
1172
|
);
|
|
1211
1173
|
}
|
|
1212
|
-
t.children &&
|
|
1174
|
+
t.children && be(t), i += t?.widthInColumns || 1, S.debug("abc88 columnsPos", t, i);
|
|
1213
1175
|
}
|
|
1214
1176
|
}
|
|
1215
1177
|
S.debug(
|
|
1216
|
-
`layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e
|
|
1178
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e?.size) == null ? void 0 : L.x} y: ${(A = e?.size) == null ? void 0 : A.y} width: ${(k = e?.size) == null ? void 0 : k.width}`
|
|
1217
1179
|
);
|
|
1218
1180
|
}
|
|
1219
|
-
function
|
|
1181
|
+
function xe(e, { minX: a, minY: d, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1220
1182
|
if (e.size && e.id !== "root") {
|
|
1221
|
-
const { x:
|
|
1222
|
-
|
|
1183
|
+
const { x: g, y: l, width: f, height: b } = e.size;
|
|
1184
|
+
g - f / 2 < a && (a = g - f / 2), l - b / 2 < d && (d = l - b / 2), g + f / 2 > c && (c = g + f / 2), l + b / 2 > n && (n = l + b / 2);
|
|
1223
1185
|
}
|
|
1224
1186
|
if (e.children)
|
|
1225
|
-
for (const
|
|
1226
|
-
({ minX: a, minY:
|
|
1227
|
-
return { minX: a, minY:
|
|
1187
|
+
for (const g of e.children)
|
|
1188
|
+
({ minX: a, minY: d, maxX: c, maxY: n } = xe(g, { minX: a, minY: d, maxX: c, maxY: n }));
|
|
1189
|
+
return { minX: a, minY: d, maxX: c, maxY: n };
|
|
1228
1190
|
}
|
|
1229
|
-
function
|
|
1191
|
+
function ht(e) {
|
|
1230
1192
|
const a = e.getBlock("root");
|
|
1231
1193
|
if (!a)
|
|
1232
1194
|
return;
|
|
1233
|
-
|
|
1234
|
-
const { minX:
|
|
1235
|
-
return { x:
|
|
1195
|
+
te(a, e, 0, 0), be(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
|
|
1196
|
+
const { minX: d, minY: c, maxX: n, maxY: g } = xe(a), l = g - c, f = n - d;
|
|
1197
|
+
return { x: d, y: c, width: f, height: l };
|
|
1236
1198
|
}
|
|
1237
|
-
const
|
|
1199
|
+
const gt = function(e, a) {
|
|
1238
1200
|
return a.db.getClasses();
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
renderer: Dt,
|
|
1265
|
-
styles: pt
|
|
1201
|
+
}, pt = async function(e, a, d, c) {
|
|
1202
|
+
const { securityLevel: n, block: g } = se(), l = c.db;
|
|
1203
|
+
let f;
|
|
1204
|
+
n === "sandbox" && (f = H("#i" + a));
|
|
1205
|
+
const b = n === "sandbox" ? H(f.nodes()[0].contentDocument.body) : H("body"), p = n === "sandbox" ? b.select(`[id="${a}"]`) : H(`[id="${a}"]`);
|
|
1206
|
+
Ne(p, ["point", "circle", "cross"], c.type, a);
|
|
1207
|
+
const y = l.getBlocks(), T = l.getBlocksFlat(), v = l.getEdges(), N = p.insert("g").attr("class", "block");
|
|
1208
|
+
await lt(N, y, l);
|
|
1209
|
+
const E = ht(l);
|
|
1210
|
+
if (await ot(N, y, l), await ct(N, v, T, l, a), E) {
|
|
1211
|
+
const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: o } = g;
|
|
1212
|
+
ye(p, k, D, !!o), S.debug("Here Bounds", E, L), p.attr(
|
|
1213
|
+
"viewBox",
|
|
1214
|
+
`${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
Ce(Ae);
|
|
1218
|
+
}, ft = {
|
|
1219
|
+
draw: pt,
|
|
1220
|
+
getClasses: gt
|
|
1221
|
+
}, kt = {
|
|
1222
|
+
parser: Be,
|
|
1223
|
+
db: st,
|
|
1224
|
+
renderer: ft,
|
|
1225
|
+
styles: rt
|
|
1266
1226
|
};
|
|
1267
1227
|
export {
|
|
1268
|
-
|
|
1228
|
+
kt as diagram
|
|
1269
1229
|
};
|