@kong-ui-public/documentation 1.5.77 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{arc-DZdQjcG8-C_2Dx6GQ.js → arc-DZdQjcG8-CduayE88.js} +2 -2
  2. package/dist/{architectureDiagram-3BPJPVTR-By_DXDyu-DTj86bUZ.js → architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js} +1506 -1513
  3. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
  4. package/dist/{c4Diagram-AAUBKEIU-ftdwlfdB-CYiERTWJ.js → c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js} +11 -12
  5. package/dist/{channel-DM9j7IFL-CjNPz4Hd.js → channel-DM9j7IFL-DxqBUxfY.js} +1 -1
  6. package/dist/{chunk-2J33WTMH-CBbjVzWb-BAAd-TK5.js → chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js} +7 -8
  7. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
  8. package/dist/{chunk-55IACEB6-DZn1aNO0-_bs5ibIB.js → chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js} +1 -1
  9. package/dist/{chunk-727SXJPM-B2_6_WLv-CzbzsbtK.js → chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js} +548 -549
  10. package/dist/{chunk-AQP2D5EJ-DEAEiJjW-BPr5JvkB.js → chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js} +446 -458
  11. package/dist/{chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js → chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js} +1 -1
  12. package/dist/{chunk-ND2GUHAM-Duw3k8MU-Dr8SD23L.js → chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js} +1 -1
  13. package/dist/{chunk-QZHKN3VN-DN6nBdn0-DxWE5zsM.js → chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js} +1 -1
  14. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
  15. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
  16. package/dist/{cose-bilkent-S5V4N54A-0ZumbVgj-BKcFQWbE.js → cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js} +465 -465
  17. package/dist/{cytoscape.esm-BDIiOYYO-BbddfVIJ.js → cytoscape.esm-BDIiOYYO-C1jMBhD8.js} +356 -371
  18. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
  19. package/dist/{dagre-DJxg_nfI-BzVw7cNP.js → dagre-DJxg_nfI-hVOVexz-.js} +9 -9
  20. package/dist/{diagram-2AECGRRQ-B2gF_dHe-DCRSlKG-.js → diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js} +10 -14
  21. package/dist/{diagram-5GNKFQAL-DJ9WwRrD-DtSWJY6-.js → diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js} +4 -4
  22. package/dist/{diagram-KO2AKTUF-RfkqD-VW-ZR9mxccc.js → diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js} +153 -156
  23. package/dist/{diagram-LMA3HP47-Ct7s9hIt-DXtPBRn4.js → diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js} +21 -22
  24. package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js} +79 -81
  25. package/dist/documentation.es.js +1 -1
  26. package/dist/documentation.umd.js +374 -374
  27. package/dist/{erDiagram-TEJ5UH35-BudwiSYX-BPA5-1u6.js → erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js} +134 -135
  28. package/dist/{flowDiagram-I6XJVG4X-B23Smlxp-Cb24VZnb.js → flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js} +842 -849
  29. package/dist/{ganttDiagram-6RSMTGT7-C-i89z_P-DEdTFlTH.js → ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js} +46 -46
  30. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
  31. package/dist/{graphlib-D2YdGpuK-CM8PX5pf.js → graphlib-D2YdGpuK-CnQPmzkS.js} +17 -17
  32. package/dist/{index-Dpyqhws4.js → index-DfVKdDwj.js} +16258 -16515
  33. package/dist/{infoDiagram-5YYISTIA-CDUwzFql-BsbTK2Me.js → infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js} +2 -2
  34. package/dist/{ishikawaDiagram-YF4QCWOH-MfYdx0rK-DsWP0O6d.js → ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js} +137 -138
  35. package/dist/{journeyDiagram-JHISSGLW-C_udOPtJ-BkIf9B4Q.js → journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js} +13 -13
  36. package/dist/{kanban-definition-UN3LZRKU-C1Su-UOY-6sw-wDwK.js → kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js} +334 -336
  37. package/dist/{katex-D7tFlpqA-B7yKriH4.js → katex-D7tFlpqA-BOSQxXe1.js} +254 -256
  38. package/dist/{linear-1MXhYum8-CfR5ywK4.js → linear-1MXhYum8-9C1jno9G.js} +5 -5
  39. package/dist/{mindmap-definition-RKZ34NQL-MuSV765K-Cv2rDIFS.js → mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js} +94 -97
  40. package/dist/{ordinal-D9ksOc8y-CrGveXkB.js → ordinal-D9ksOc8y-2hZwLyEk.js} +1 -1
  41. package/dist/{pieDiagram-4H26LBE5-TgFp7J6_-C8m2xJbj.js → pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js} +43 -44
  42. package/dist/{quadrantDiagram-W4KKPZXB-DKPne3o_-D0Tfl8NQ.js → quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js} +351 -353
  43. package/dist/{requirementDiagram-4Y6WPE33-vh8uUAp_-C5zLx-_o.js → requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js} +384 -386
  44. package/dist/{sankeyDiagram-5OEKKPKP-Cgs6W_El-DBrv4QL_.js → sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js} +178 -178
  45. package/dist/{sequenceDiagram-3UESZ5HK-C5F57Dkt-D6DqZiJP.js → sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js} +643 -653
  46. package/dist/{stateDiagram-AJRCARHV-09dUKG6Y-9QhAIhCk.js → stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js} +5 -5
  47. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
  48. package/dist/style.css +1 -1
  49. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
  50. package/dist/{vennDiagram-CIIHVFJN-DQfKxM3L-086u82L3.js → vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js} +596 -603
  51. package/dist/{wardley-L42UT6IY-BjAkE_cs-li1xYed9.js → wardley-L42UT6IY-BjAkE_cs-C-giFqos.js} +5760 -5809
  52. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
  53. package/dist/{xychartDiagram-2RQKCTM6-ChNH3q1U--vbcTXH5.js → xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js} +10 -10
  54. package/package.json +4 -4
  55. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CSQRWfog.js +0 -3278
  56. package/dist/chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js +0 -9
  57. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-DLmqgbj1.js +0 -17
  58. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-DLmqgbj1.js +0 -17
  59. package/dist/dagre-BM42HDAG-qMWMsyLb-BzK2-5zM.js +0 -291
  60. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-BtfdBLxW.js +0 -747
  61. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-Br5eF-5b.js +0 -16
  62. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-CkhwKYjQ.js +0 -1106
  63. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-CCMCDU5F.js +0 -647
@@ -1,3278 +0,0 @@
1
- import { p as h, o as nt, q as B, A as xe, g as k, H as be, k as fe, aB as me, aj as we, ap as Se, Z as z, am as ke, aC as Y, aD as $t, aE as rt, aF as Le, N as at, a as _e, aG as Ee, aH as Ut, aI as $e, aJ as De, aK as ve, aL as Ne, aM as Te, aN as Ie, aO as Oe, aP as Be, aQ as Ce, aR as Re, aS as ze, aT as Ae, aU as Me, aV as Pe, aW as Ye, aX as We, aY as Xe, aZ as Fe, a_ as je, a$ as He, b0 as Ke, b1 as Ue, b2 as qe, b3 as Ze, c as Ct, b4 as Rt, b5 as Ge } from "./index-Dpyqhws4.js";
2
- import { n as Je } from "./channel-DM9j7IFL-CjNPz4Hd.js";
3
- import { t as Ve } from "./chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js";
4
- import { y as Qe } from "./graphlib-D2YdGpuK-CM8PX5pf.js";
5
- function tr(e) {
6
- return Array.isArray(e);
7
- }
8
- function er(e) {
9
- if (Ee(e)) return e;
10
- let t = Ut(e);
11
- if (!rr(e)) return {};
12
- if (tr(e)) {
13
- let n = Array.from(e);
14
- return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (n.index = e.index, n.input = e.input), n;
15
- }
16
- if ($e(e)) {
17
- let n = e, i = n.constructor;
18
- return new i(n.buffer, n.byteOffset, n.length);
19
- }
20
- if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
21
- if (t === "[object DataView]") {
22
- let n = e, i = n.buffer, s = n.byteOffset, r = n.byteLength, l = new ArrayBuffer(r), o = new Uint8Array(i, s, r);
23
- return new Uint8Array(l).set(o), new DataView(l);
24
- }
25
- if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
26
- let n = e.constructor, i = new n(e.valueOf());
27
- return t === "[object String]" ? ir(i, e) : bt(i, e), i;
28
- }
29
- if (t === "[object Date]") return new Date(Number(e));
30
- if (t === "[object RegExp]") {
31
- let n = e, i = new RegExp(n.source, n.flags);
32
- return i.lastIndex = n.lastIndex, i;
33
- }
34
- if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
35
- if (t === "[object Map]") {
36
- let n = e, i = /* @__PURE__ */ new Map();
37
- return n.forEach((s, r) => {
38
- i.set(r, s);
39
- }), i;
40
- }
41
- if (t === "[object Set]") {
42
- let n = e, i = /* @__PURE__ */ new Set();
43
- return n.forEach((s) => {
44
- i.add(s);
45
- }), i;
46
- }
47
- if (t === "[object Arguments]") {
48
- let n = e, i = {};
49
- return bt(i, n), i.length = n.length, i[Symbol.iterator] = n[Symbol.iterator], i;
50
- }
51
- let a = {};
52
- return sr(a, e), bt(a, e), ar(a, e), a;
53
- }
54
- function rr(e) {
55
- switch (Ut(e)) {
56
- case qe:
57
- case Ue:
58
- case Ke:
59
- case He:
60
- case je:
61
- case Fe:
62
- case Xe:
63
- case We:
64
- case Ye:
65
- case Pe:
66
- case Me:
67
- case Ae:
68
- case ze:
69
- case Re:
70
- case Ce:
71
- case Be:
72
- case Oe:
73
- case Ie:
74
- case Te:
75
- case Ne:
76
- case ve:
77
- case De:
78
- return !0;
79
- default:
80
- return !1;
81
- }
82
- }
83
- function bt(e, t) {
84
- for (let a in t) Object.hasOwn(t, a) && (e[a] = t[a]);
85
- }
86
- function ar(e, t) {
87
- let a = Object.getOwnPropertySymbols(t);
88
- for (let n = 0; n < a.length; n++) {
89
- let i = a[n];
90
- Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
91
- }
92
- }
93
- function ir(e, t) {
94
- let a = t.valueOf().length;
95
- for (let n in t) Object.hasOwn(t, n) && (Number.isNaN(Number(n)) || Number(n) >= a) && (e[n] = t[n]);
96
- }
97
- function sr(e, t) {
98
- let a = Object.getPrototypeOf(t);
99
- a !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, a);
100
- }
101
- var mt = function() {
102
- var e = /* @__PURE__ */ h(function(d, p, L, f) {
103
- for (L || (L = {}), f = d.length; f--; L[d[f]] = p) ;
104
- return L;
105
- }, "o"), t = [1, 15], a = [1, 7], n = [1, 13], i = [1, 14], s = [1, 19], r = [1, 16], l = [1, 17], o = [1, 18], y = [8, 30], g = [
106
- 8,
107
- 10,
108
- 21,
109
- 28,
110
- 29,
111
- 30,
112
- 31,
113
- 39,
114
- 43,
115
- 46
116
- ], x = [1, 23], m = [1, 24], w = [
117
- 8,
118
- 10,
119
- 15,
120
- 16,
121
- 21,
122
- 28,
123
- 29,
124
- 30,
125
- 31,
126
- 39,
127
- 43,
128
- 46
129
- ], b = [
130
- 8,
131
- 10,
132
- 15,
133
- 16,
134
- 21,
135
- 27,
136
- 28,
137
- 29,
138
- 30,
139
- 31,
140
- 39,
141
- 43,
142
- 46
143
- ], E = [1, 49], _ = {
144
- trace: /* @__PURE__ */ h(function() {
145
- }, "trace"),
146
- yy: {},
147
- symbols_: {
148
- error: 2,
149
- spaceLines: 3,
150
- SPACELINE: 4,
151
- NL: 5,
152
- separator: 6,
153
- SPACE: 7,
154
- EOF: 8,
155
- start: 9,
156
- BLOCK_DIAGRAM_KEY: 10,
157
- document: 11,
158
- stop: 12,
159
- statement: 13,
160
- link: 14,
161
- LINK: 15,
162
- START_LINK: 16,
163
- LINK_LABEL: 17,
164
- STR: 18,
165
- nodeStatement: 19,
166
- columnsStatement: 20,
167
- SPACE_BLOCK: 21,
168
- blockStatement: 22,
169
- classDefStatement: 23,
170
- cssClassStatement: 24,
171
- styleStatement: 25,
172
- node: 26,
173
- SIZE: 27,
174
- COLUMNS: 28,
175
- "id-block": 29,
176
- end: 30,
177
- NODE_ID: 31,
178
- nodeShapeNLabel: 32,
179
- dirList: 33,
180
- DIR: 34,
181
- NODE_DSTART: 35,
182
- NODE_DEND: 36,
183
- BLOCK_ARROW_START: 37,
184
- BLOCK_ARROW_END: 38,
185
- classDef: 39,
186
- CLASSDEF_ID: 40,
187
- CLASSDEF_STYLEOPTS: 41,
188
- DEFAULT: 42,
189
- class: 43,
190
- CLASSENTITY_IDS: 44,
191
- STYLECLASS: 45,
192
- style: 46,
193
- STYLE_ENTITY_IDS: 47,
194
- STYLE_DEFINITION_DATA: 48,
195
- $accept: 0,
196
- $end: 1
197
- },
198
- terminals_: {
199
- 2: "error",
200
- 4: "SPACELINE",
201
- 5: "NL",
202
- 7: "SPACE",
203
- 8: "EOF",
204
- 10: "BLOCK_DIAGRAM_KEY",
205
- 15: "LINK",
206
- 16: "START_LINK",
207
- 17: "LINK_LABEL",
208
- 18: "STR",
209
- 21: "SPACE_BLOCK",
210
- 27: "SIZE",
211
- 28: "COLUMNS",
212
- 29: "id-block",
213
- 30: "end",
214
- 31: "NODE_ID",
215
- 34: "DIR",
216
- 35: "NODE_DSTART",
217
- 36: "NODE_DEND",
218
- 37: "BLOCK_ARROW_START",
219
- 38: "BLOCK_ARROW_END",
220
- 39: "classDef",
221
- 40: "CLASSDEF_ID",
222
- 41: "CLASSDEF_STYLEOPTS",
223
- 42: "DEFAULT",
224
- 43: "class",
225
- 44: "CLASSENTITY_IDS",
226
- 45: "STYLECLASS",
227
- 46: "style",
228
- 47: "STYLE_ENTITY_IDS",
229
- 48: "STYLE_DEFINITION_DATA"
230
- },
231
- productions_: [
232
- 0,
233
- [3, 1],
234
- [3, 2],
235
- [3, 2],
236
- [6, 1],
237
- [6, 1],
238
- [6, 1],
239
- [9, 3],
240
- [12, 1],
241
- [12, 1],
242
- [12, 2],
243
- [12, 2],
244
- [11, 1],
245
- [11, 2],
246
- [14, 1],
247
- [14, 4],
248
- [13, 1],
249
- [13, 1],
250
- [13, 1],
251
- [13, 1],
252
- [13, 1],
253
- [13, 1],
254
- [13, 1],
255
- [19, 3],
256
- [19, 2],
257
- [19, 1],
258
- [20, 1],
259
- [22, 4],
260
- [22, 3],
261
- [26, 1],
262
- [26, 2],
263
- [33, 1],
264
- [33, 2],
265
- [32, 3],
266
- [32, 4],
267
- [23, 3],
268
- [23, 3],
269
- [24, 3],
270
- [25, 3]
271
- ],
272
- performAction: /* @__PURE__ */ h(function(d, p, L, f, S, c, D) {
273
- var u = c.length - 1;
274
- switch (S) {
275
- case 4:
276
- f.getLogger().debug("Rule: separator (NL) ");
277
- break;
278
- case 5:
279
- f.getLogger().debug("Rule: separator (Space) ");
280
- break;
281
- case 6:
282
- f.getLogger().debug("Rule: separator (EOF) ");
283
- break;
284
- case 7:
285
- f.getLogger().debug("Rule: hierarchy: ", c[u - 1]), f.setHierarchy(c[u - 1]);
286
- break;
287
- case 8:
288
- f.getLogger().debug("Stop NL ");
289
- break;
290
- case 9:
291
- f.getLogger().debug("Stop EOF ");
292
- break;
293
- case 10:
294
- f.getLogger().debug("Stop NL2 ");
295
- break;
296
- case 11:
297
- f.getLogger().debug("Stop EOF2 ");
298
- break;
299
- case 12:
300
- f.getLogger().debug("Rule: statement: ", c[u]), typeof c[u].length == "number" ? this.$ = c[u] : this.$ = [c[u]];
301
- break;
302
- case 13:
303
- f.getLogger().debug("Rule: statement #2: ", c[u - 1]), this.$ = [c[u - 1]].concat(c[u]);
304
- break;
305
- case 14:
306
- f.getLogger().debug("Rule: link: ", c[u], d), this.$ = {
307
- edgeTypeStr: c[u],
308
- label: ""
309
- };
310
- break;
311
- case 15:
312
- f.getLogger().debug("Rule: LABEL link: ", c[u - 3], c[u - 1], c[u]), this.$ = {
313
- edgeTypeStr: c[u],
314
- label: c[u - 1]
315
- };
316
- break;
317
- case 18:
318
- let v = parseInt(c[u]), $ = f.generateId();
319
- this.$ = {
320
- id: $,
321
- type: "space",
322
- label: "",
323
- width: v,
324
- children: []
325
- };
326
- break;
327
- case 23:
328
- f.getLogger().debug("Rule: (nodeStatement link node) ", c[u - 2], c[u - 1], c[u], " typestr: ", c[u - 1].edgeTypeStr);
329
- let T = f.edgeStrToEdgeData(c[u - 1].edgeTypeStr), M = f.edgeStrToEdgeStartData(c[u - 1].edgeTypeStr), Z = f.edgeStrToThickness(c[u - 1].edgeTypeStr), G = f.edgeStrToPattern(c[u - 1].edgeTypeStr);
330
- this.$ = [
331
- {
332
- id: c[u - 2].id,
333
- label: c[u - 2].label,
334
- type: c[u - 2].type,
335
- directions: c[u - 2].directions
336
- },
337
- {
338
- id: c[u - 2].id + "-" + c[u].id,
339
- start: c[u - 2].id,
340
- end: c[u].id,
341
- label: c[u - 1].label,
342
- type: "edge",
343
- thickness: Z,
344
- pattern: G,
345
- directions: c[u].directions,
346
- arrowTypeEnd: T,
347
- arrowTypeStart: M
348
- },
349
- {
350
- id: c[u].id,
351
- label: c[u].label,
352
- type: f.typeStr2Type(c[u].typeStr),
353
- directions: c[u].directions
354
- }
355
- ];
356
- break;
357
- case 24:
358
- f.getLogger().debug("Rule: nodeStatement (abc88 node size) ", c[u - 1], c[u]), this.$ = {
359
- id: c[u - 1].id,
360
- label: c[u - 1].label,
361
- type: f.typeStr2Type(c[u - 1].typeStr),
362
- directions: c[u - 1].directions,
363
- widthInColumns: parseInt(c[u], 10)
364
- };
365
- break;
366
- case 25:
367
- f.getLogger().debug("Rule: nodeStatement (node) ", c[u]), this.$ = {
368
- id: c[u].id,
369
- label: c[u].label,
370
- type: f.typeStr2Type(c[u].typeStr),
371
- directions: c[u].directions,
372
- widthInColumns: 1
373
- };
374
- break;
375
- case 26:
376
- f.getLogger().debug("APA123", this ? this : "na"), f.getLogger().debug("COLUMNS: ", c[u]), this.$ = {
377
- type: "column-setting",
378
- columns: c[u] === "auto" ? -1 : parseInt(c[u])
379
- };
380
- break;
381
- case 27:
382
- f.getLogger().debug("Rule: id-block statement : ", c[u - 2], c[u - 1]), f.generateId(), this.$ = {
383
- ...c[u - 2],
384
- type: "composite",
385
- children: c[u - 1]
386
- };
387
- break;
388
- case 28:
389
- f.getLogger().debug("Rule: blockStatement : ", c[u - 2], c[u - 1], c[u]);
390
- let I = f.generateId();
391
- this.$ = {
392
- id: I,
393
- type: "composite",
394
- label: "",
395
- children: c[u - 1]
396
- };
397
- break;
398
- case 29:
399
- f.getLogger().debug("Rule: node (NODE_ID separator): ", c[u]), this.$ = { id: c[u] };
400
- break;
401
- case 30:
402
- f.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", c[u - 1], c[u]), this.$ = {
403
- id: c[u - 1],
404
- label: c[u].label,
405
- typeStr: c[u].typeStr,
406
- directions: c[u].directions
407
- };
408
- break;
409
- case 31:
410
- f.getLogger().debug("Rule: dirList: ", c[u]), this.$ = [c[u]];
411
- break;
412
- case 32:
413
- f.getLogger().debug("Rule: dirList: ", c[u - 1], c[u]), this.$ = [c[u - 1]].concat(c[u]);
414
- break;
415
- case 33:
416
- f.getLogger().debug("Rule: nodeShapeNLabel: ", c[u - 2], c[u - 1], c[u]), this.$ = {
417
- typeStr: c[u - 2] + c[u],
418
- label: c[u - 1]
419
- };
420
- break;
421
- case 34:
422
- f.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", c[u - 3], c[u - 2], " #3:", c[u - 1], c[u]), this.$ = {
423
- typeStr: c[u - 3] + c[u],
424
- label: c[u - 2],
425
- directions: c[u - 1]
426
- };
427
- break;
428
- case 35:
429
- case 36:
430
- this.$ = {
431
- type: "classDef",
432
- id: c[u - 1].trim(),
433
- css: c[u].trim()
434
- };
435
- break;
436
- case 37:
437
- this.$ = {
438
- type: "applyClass",
439
- id: c[u - 1].trim(),
440
- styleClass: c[u].trim()
441
- };
442
- break;
443
- case 38:
444
- this.$ = {
445
- type: "applyStyles",
446
- id: c[u - 1].trim(),
447
- stylesStr: c[u].trim()
448
- };
449
- break;
450
- }
451
- }, "anonymous"),
452
- table: [
453
- {
454
- 9: 1,
455
- 10: [1, 2]
456
- },
457
- { 1: [3] },
458
- {
459
- 10: t,
460
- 11: 3,
461
- 13: 4,
462
- 19: 5,
463
- 20: 6,
464
- 21: a,
465
- 22: 8,
466
- 23: 9,
467
- 24: 10,
468
- 25: 11,
469
- 26: 12,
470
- 28: n,
471
- 29: i,
472
- 31: s,
473
- 39: r,
474
- 43: l,
475
- 46: o
476
- },
477
- { 8: [1, 20] },
478
- e(y, [2, 12], {
479
- 13: 4,
480
- 19: 5,
481
- 20: 6,
482
- 22: 8,
483
- 23: 9,
484
- 24: 10,
485
- 25: 11,
486
- 26: 12,
487
- 11: 21,
488
- 10: t,
489
- 21: a,
490
- 28: n,
491
- 29: i,
492
- 31: s,
493
- 39: r,
494
- 43: l,
495
- 46: o
496
- }),
497
- e(g, [2, 16], {
498
- 14: 22,
499
- 15: x,
500
- 16: m
501
- }),
502
- e(g, [2, 17]),
503
- e(g, [2, 18]),
504
- e(g, [2, 19]),
505
- e(g, [2, 20]),
506
- e(g, [2, 21]),
507
- e(g, [2, 22]),
508
- e(w, [2, 25], { 27: [1, 25] }),
509
- e(g, [2, 26]),
510
- {
511
- 19: 26,
512
- 26: 12,
513
- 31: s
514
- },
515
- {
516
- 10: t,
517
- 11: 27,
518
- 13: 4,
519
- 19: 5,
520
- 20: 6,
521
- 21: a,
522
- 22: 8,
523
- 23: 9,
524
- 24: 10,
525
- 25: 11,
526
- 26: 12,
527
- 28: n,
528
- 29: i,
529
- 31: s,
530
- 39: r,
531
- 43: l,
532
- 46: o
533
- },
534
- {
535
- 40: [1, 28],
536
- 42: [1, 29]
537
- },
538
- { 44: [1, 30] },
539
- { 47: [1, 31] },
540
- e(b, [2, 29], {
541
- 32: 32,
542
- 35: [1, 33],
543
- 37: [1, 34]
544
- }),
545
- { 1: [2, 7] },
546
- e(y, [2, 13]),
547
- {
548
- 26: 35,
549
- 31: s
550
- },
551
- { 31: [2, 14] },
552
- { 17: [1, 36] },
553
- e(w, [2, 24]),
554
- {
555
- 10: t,
556
- 11: 37,
557
- 13: 4,
558
- 14: 22,
559
- 15: x,
560
- 16: m,
561
- 19: 5,
562
- 20: 6,
563
- 21: a,
564
- 22: 8,
565
- 23: 9,
566
- 24: 10,
567
- 25: 11,
568
- 26: 12,
569
- 28: n,
570
- 29: i,
571
- 31: s,
572
- 39: r,
573
- 43: l,
574
- 46: o
575
- },
576
- { 30: [1, 38] },
577
- { 41: [1, 39] },
578
- { 41: [1, 40] },
579
- { 45: [1, 41] },
580
- { 48: [1, 42] },
581
- e(b, [2, 30]),
582
- { 18: [1, 43] },
583
- { 18: [1, 44] },
584
- e(w, [2, 23]),
585
- { 18: [1, 45] },
586
- { 30: [1, 46] },
587
- e(g, [2, 28]),
588
- e(g, [2, 35]),
589
- e(g, [2, 36]),
590
- e(g, [2, 37]),
591
- e(g, [2, 38]),
592
- { 36: [1, 47] },
593
- {
594
- 33: 48,
595
- 34: E
596
- },
597
- { 15: [1, 50] },
598
- e(g, [2, 27]),
599
- e(b, [2, 33]),
600
- { 38: [1, 51] },
601
- {
602
- 33: 52,
603
- 34: E,
604
- 38: [2, 31]
605
- },
606
- { 31: [2, 15] },
607
- e(b, [2, 34]),
608
- { 38: [2, 32] }
609
- ],
610
- defaultActions: {
611
- 20: [2, 7],
612
- 23: [2, 14],
613
- 50: [2, 15],
614
- 52: [2, 32]
615
- },
616
- parseError: /* @__PURE__ */ h(function(d, p) {
617
- if (p.recoverable) this.trace(d);
618
- else {
619
- var L = Error(d);
620
- throw L.hash = p, L;
621
- }
622
- }, "parseError"),
623
- parse: /* @__PURE__ */ h(function(d) {
624
- var p = this, L = [0], f = [], S = [null], c = [], D = this.table, u = "", v = 0, $ = 0, T = 0, M = 2, Z = 1, G = c.slice.call(arguments, 1), I = Object.create(this.lexer), H = { yy: {} };
625
- for (var J in this.yy) Object.prototype.hasOwnProperty.call(this.yy, J) && (H.yy[J] = this.yy[J]);
626
- I.setInput(d, H.yy), H.yy.lexer = I, H.yy.parser = this, I.yylloc === void 0 && (I.yylloc = {});
627
- var et = I.yylloc;
628
- c.push(et);
629
- var yt = I.options && I.options.ranges;
630
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
631
- function pe(j) {
632
- L.length -= 2 * j, S.length -= j, c.length -= j;
633
- }
634
- h(pe, "popStack");
635
- function It() {
636
- var j = f.pop() || I.lex() || Z;
637
- return typeof j != "number" && (j instanceof Array && (f = j, j = f.pop()), j = p.symbols_[j] || j), j;
638
- }
639
- h(It, "lex");
640
- for (var W, pt, Q, F, xt, tt = {}, lt, V, Ot, ot; ; ) {
641
- if (Q = L[L.length - 1], this.defaultActions[Q] ? F = this.defaultActions[Q] : (W ?? (W = It()), F = D[Q] && D[Q][W]), F === void 0 || !F.length || !F[0]) {
642
- var Bt = "";
643
- for (lt in ot = [], D[Q]) this.terminals_[lt] && lt > M && ot.push("'" + this.terminals_[lt] + "'");
644
- Bt = I.showPosition ? "Parse error on line " + (v + 1) + `:
645
- ` + I.showPosition() + `
646
- Expecting ` + ot.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : "Parse error on line " + (v + 1) + ": Unexpected " + (W == Z ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(Bt, {
647
- text: I.match,
648
- token: this.terminals_[W] || W,
649
- line: I.yylineno,
650
- loc: et,
651
- expected: ot
652
- });
653
- }
654
- if (F[0] instanceof Array && F.length > 1) throw Error("Parse Error: multiple actions possible at state: " + Q + ", token: " + W);
655
- switch (F[0]) {
656
- case 1:
657
- L.push(W), S.push(I.yytext), c.push(I.yylloc), L.push(F[1]), W = null, pt ? (W = pt, pt = null) : ($ = I.yyleng, u = I.yytext, v = I.yylineno, et = I.yylloc, T > 0);
658
- break;
659
- case 2:
660
- if (V = this.productions_[F[1]][1], tt.$ = S[S.length - V], tt._$ = {
661
- first_line: c[c.length - (V || 1)].first_line,
662
- last_line: c[c.length - 1].last_line,
663
- first_column: c[c.length - (V || 1)].first_column,
664
- last_column: c[c.length - 1].last_column
665
- }, yt && (tt._$.range = [c[c.length - (V || 1)].range[0], c[c.length - 1].range[1]]), xt = this.performAction.apply(tt, [
666
- u,
667
- $,
668
- v,
669
- H.yy,
670
- F[1],
671
- S,
672
- c
673
- ].concat(G)), xt !== void 0) return xt;
674
- V && (L = L.slice(0, -1 * V * 2), S = S.slice(0, -1 * V), c = c.slice(0, -1 * V)), L.push(this.productions_[F[1]][0]), S.push(tt.$), c.push(tt._$), Ot = D[L[L.length - 2]][L[L.length - 1]], L.push(Ot);
675
- break;
676
- case 3:
677
- return !0;
678
- }
679
- }
680
- return !0;
681
- }, "parse")
682
- };
683
- _.lexer = /* @__PURE__ */ function() {
684
- return {
685
- EOF: 1,
686
- parseError: /* @__PURE__ */ h(function(d, p) {
687
- if (this.yy.parser) this.yy.parser.parseError(d, p);
688
- else throw Error(d);
689
- }, "parseError"),
690
- setInput: /* @__PURE__ */ h(function(d, p) {
691
- return this.yy = p || this.yy || {}, this._input = d, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
692
- first_line: 1,
693
- first_column: 0,
694
- last_line: 1,
695
- last_column: 0
696
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
697
- }, "setInput"),
698
- input: /* @__PURE__ */ h(function() {
699
- var d = this._input[0];
700
- return this.yytext += d, this.yyleng++, this.offset++, this.match += d, this.matched += d, d.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), d;
701
- }, "input"),
702
- unput: /* @__PURE__ */ h(function(d) {
703
- var p = d.length, L = d.split(/(?:\r\n?|\n)/g);
704
- this._input = d + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - p), this.offset -= p;
705
- var f = this.match.split(/(?:\r\n?|\n)/g);
706
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), L.length - 1 && (this.yylineno -= L.length - 1);
707
- var S = this.yylloc.range;
708
- return this.yylloc = {
709
- first_line: this.yylloc.first_line,
710
- last_line: this.yylineno + 1,
711
- first_column: this.yylloc.first_column,
712
- last_column: L ? (L.length === f.length ? this.yylloc.first_column : 0) + f[f.length - L.length].length - L[0].length : this.yylloc.first_column - p
713
- }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - p]), this.yyleng = this.yytext.length, this;
714
- }, "unput"),
715
- more: /* @__PURE__ */ h(function() {
716
- return this._more = !0, this;
717
- }, "more"),
718
- reject: /* @__PURE__ */ h(function() {
719
- if (this.options.backtrack_lexer) this._backtrack = !0;
720
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
721
- ` + this.showPosition(), {
722
- text: "",
723
- token: null,
724
- line: this.yylineno
725
- });
726
- return this;
727
- }, "reject"),
728
- less: /* @__PURE__ */ h(function(d) {
729
- this.unput(this.match.slice(d));
730
- }, "less"),
731
- pastInput: /* @__PURE__ */ h(function() {
732
- var d = this.matched.substr(0, this.matched.length - this.match.length);
733
- return (d.length > 20 ? "..." : "") + d.substr(-20).replace(/\n/g, "");
734
- }, "pastInput"),
735
- upcomingInput: /* @__PURE__ */ h(function() {
736
- var d = this.match;
737
- return d.length < 20 && (d += this._input.substr(0, 20 - d.length)), (d.substr(0, 20) + (d.length > 20 ? "..." : "")).replace(/\n/g, "");
738
- }, "upcomingInput"),
739
- showPosition: /* @__PURE__ */ h(function() {
740
- var d = this.pastInput(), p = Array(d.length + 1).join("-");
741
- return d + this.upcomingInput() + `
742
- ` + p + "^";
743
- }, "showPosition"),
744
- test_match: /* @__PURE__ */ h(function(d, p) {
745
- var L, f, S;
746
- if (this.options.backtrack_lexer && (S = {
747
- yylineno: this.yylineno,
748
- yylloc: {
749
- first_line: this.yylloc.first_line,
750
- last_line: this.last_line,
751
- first_column: this.yylloc.first_column,
752
- last_column: this.yylloc.last_column
753
- },
754
- yytext: this.yytext,
755
- match: this.match,
756
- matches: this.matches,
757
- matched: this.matched,
758
- yyleng: this.yyleng,
759
- offset: this.offset,
760
- _more: this._more,
761
- _input: this._input,
762
- yy: this.yy,
763
- conditionStack: this.conditionStack.slice(0),
764
- done: this.done
765
- }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), f = d[0].match(/(?:\r\n?|\n).*/g), f && (this.yylineno += f.length), this.yylloc = {
766
- first_line: this.yylloc.last_line,
767
- last_line: this.yylineno + 1,
768
- first_column: this.yylloc.last_column,
769
- last_column: f ? f[f.length - 1].length - f[f.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + d[0].length
770
- }, this.yytext += d[0], this.match += d[0], this.matches = d, 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(d[0].length), this.matched += d[0], L = this.performAction.call(this, this.yy, this, p, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), L) return L;
771
- if (this._backtrack) {
772
- for (var c in S) this[c] = S[c];
773
- return !1;
774
- }
775
- return !1;
776
- }, "test_match"),
777
- next: /* @__PURE__ */ h(function() {
778
- if (this.done) return this.EOF;
779
- this._input || (this.done = !0);
780
- var d, p, L, f;
781
- this._more || (this.yytext = "", this.match = "");
782
- for (var S = this._currentRules(), c = 0; c < S.length; c++) if (L = this._input.match(this.rules[S[c]]), L && (!p || L[0].length > p[0].length)) {
783
- if (p = L, f = c, this.options.backtrack_lexer) {
784
- if (d = this.test_match(L, S[c]), d !== !1) return d;
785
- if (this._backtrack) {
786
- p = !1;
787
- continue;
788
- } else return !1;
789
- } else if (!this.options.flex) break;
790
- }
791
- return p ? (d = this.test_match(p, S[f]), d === !1 ? !1 : d) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
792
- ` + this.showPosition(), {
793
- text: "",
794
- token: null,
795
- line: this.yylineno
796
- });
797
- }, "next"),
798
- lex: /* @__PURE__ */ h(function() {
799
- return this.next() || this.lex();
800
- }, "lex"),
801
- begin: /* @__PURE__ */ h(function(d) {
802
- this.conditionStack.push(d);
803
- }, "begin"),
804
- popState: /* @__PURE__ */ h(function() {
805
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
806
- }, "popState"),
807
- _currentRules: /* @__PURE__ */ h(function() {
808
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
809
- }, "_currentRules"),
810
- topState: /* @__PURE__ */ h(function(d) {
811
- return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
812
- }, "topState"),
813
- pushState: /* @__PURE__ */ h(function(d) {
814
- this.begin(d);
815
- }, "pushState"),
816
- stateStackSize: /* @__PURE__ */ h(function() {
817
- return this.conditionStack.length;
818
- }, "stateStackSize"),
819
- options: {},
820
- performAction: /* @__PURE__ */ h(function(d, p, L, f) {
821
- switch (L) {
822
- case 0:
823
- return d.getLogger().debug("Found block-beta"), 10;
824
- case 1:
825
- return d.getLogger().debug("Found id-block"), 29;
826
- case 2:
827
- return d.getLogger().debug("Found block"), 10;
828
- case 3:
829
- d.getLogger().debug(".", p.yytext);
830
- break;
831
- case 4:
832
- d.getLogger().debug("_", p.yytext);
833
- break;
834
- case 5:
835
- return 5;
836
- case 6:
837
- return p.yytext = -1, 28;
838
- case 7:
839
- return p.yytext = p.yytext.replace(/columns\s+/, ""), d.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
840
- case 8:
841
- this.pushState("md_string");
842
- break;
843
- case 9:
844
- return "MD_STR";
845
- case 10:
846
- this.popState();
847
- break;
848
- case 11:
849
- this.pushState("string");
850
- break;
851
- case 12:
852
- d.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
853
- break;
854
- case 13:
855
- return d.getLogger().debug("LEX: STR end:", p.yytext), "STR";
856
- case 14:
857
- return p.yytext = p.yytext.replace(/space\:/, ""), d.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
858
- case 15:
859
- return p.yytext = "1", d.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
860
- case 16:
861
- return 42;
862
- case 17:
863
- return "LINKSTYLE";
864
- case 18:
865
- return "INTERPOLATE";
866
- case 19:
867
- return this.pushState("CLASSDEF"), 39;
868
- case 20:
869
- return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
870
- case 21:
871
- return this.popState(), this.pushState("CLASSDEFID"), 40;
872
- case 22:
873
- return this.popState(), 41;
874
- case 23:
875
- return this.pushState("CLASS"), 43;
876
- case 24:
877
- return this.popState(), this.pushState("CLASS_STYLE"), 44;
878
- case 25:
879
- return this.popState(), 45;
880
- case 26:
881
- return this.pushState("STYLE_STMNT"), 46;
882
- case 27:
883
- return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
884
- case 28:
885
- return this.popState(), 48;
886
- case 29:
887
- return this.pushState("acc_title"), "acc_title";
888
- case 30:
889
- return this.popState(), "acc_title_value";
890
- case 31:
891
- return this.pushState("acc_descr"), "acc_descr";
892
- case 32:
893
- return this.popState(), "acc_descr_value";
894
- case 33:
895
- this.pushState("acc_descr_multiline");
896
- break;
897
- case 34:
898
- this.popState();
899
- break;
900
- case 35:
901
- return "acc_descr_multiline_value";
902
- case 36:
903
- return 30;
904
- case 37:
905
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
906
- case 38:
907
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
908
- case 39:
909
- return this.popState(), d.getLogger().debug("Lex: ))"), "NODE_DEND";
910
- case 40:
911
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
912
- case 41:
913
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
914
- case 42:
915
- return this.popState(), d.getLogger().debug("Lex: (-"), "NODE_DEND";
916
- case 43:
917
- return this.popState(), d.getLogger().debug("Lex: -)"), "NODE_DEND";
918
- case 44:
919
- return this.popState(), d.getLogger().debug("Lex: (("), "NODE_DEND";
920
- case 45:
921
- return this.popState(), d.getLogger().debug("Lex: ]]"), "NODE_DEND";
922
- case 46:
923
- return this.popState(), d.getLogger().debug("Lex: ("), "NODE_DEND";
924
- case 47:
925
- return this.popState(), d.getLogger().debug("Lex: ])"), "NODE_DEND";
926
- case 48:
927
- return this.popState(), d.getLogger().debug("Lex: /]"), "NODE_DEND";
928
- case 49:
929
- return this.popState(), d.getLogger().debug("Lex: /]"), "NODE_DEND";
930
- case 50:
931
- return this.popState(), d.getLogger().debug("Lex: )]"), "NODE_DEND";
932
- case 51:
933
- return this.popState(), d.getLogger().debug("Lex: )"), "NODE_DEND";
934
- case 52:
935
- return this.popState(), d.getLogger().debug("Lex: ]>"), "NODE_DEND";
936
- case 53:
937
- return this.popState(), d.getLogger().debug("Lex: ]"), "NODE_DEND";
938
- case 54:
939
- return d.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
940
- case 55:
941
- return d.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
942
- case 56:
943
- return d.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
944
- case 57:
945
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
946
- case 58:
947
- return d.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
948
- case 59:
949
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
950
- case 60:
951
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
952
- case 61:
953
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
954
- case 62:
955
- return d.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
956
- case 63:
957
- return d.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
958
- case 64:
959
- return d.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
960
- case 65:
961
- return this.pushState("NODE"), 35;
962
- case 66:
963
- return this.pushState("NODE"), 35;
964
- case 67:
965
- return this.pushState("NODE"), 35;
966
- case 68:
967
- return this.pushState("NODE"), 35;
968
- case 69:
969
- return this.pushState("NODE"), 35;
970
- case 70:
971
- return this.pushState("NODE"), 35;
972
- case 71:
973
- return this.pushState("NODE"), 35;
974
- case 72:
975
- return d.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
976
- case 73:
977
- return this.pushState("BLOCK_ARROW"), d.getLogger().debug("LEX ARR START"), 37;
978
- case 74:
979
- return d.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
980
- case 75:
981
- return d.getLogger().debug("Lex: EOF", p.yytext), 8;
982
- case 76:
983
- this.pushState("md_string");
984
- break;
985
- case 77:
986
- this.pushState("md_string");
987
- break;
988
- case 78:
989
- return "NODE_DESCR";
990
- case 79:
991
- this.popState();
992
- break;
993
- case 80:
994
- d.getLogger().debug("Lex: Starting string"), this.pushState("string");
995
- break;
996
- case 81:
997
- d.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
998
- break;
999
- case 82:
1000
- return d.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
1001
- case 83:
1002
- d.getLogger().debug("LEX POPPING"), this.popState();
1003
- break;
1004
- case 84:
1005
- d.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
1006
- break;
1007
- case 85:
1008
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
1009
- case 86:
1010
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (left):", p.yytext), "DIR";
1011
- case 87:
1012
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (x):", p.yytext), "DIR";
1013
- case 88:
1014
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (y):", p.yytext), "DIR";
1015
- case 89:
1016
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (up):", p.yytext), "DIR";
1017
- case 90:
1018
- return p.yytext = p.yytext.replace(/^,\s*/, ""), d.getLogger().debug("Lex (down):", p.yytext), "DIR";
1019
- case 91:
1020
- return p.yytext = "]>", d.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
1021
- case 92:
1022
- return d.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
1023
- case 93:
1024
- return d.getLogger().debug("Lex: LINK", p.yytext), 15;
1025
- case 94:
1026
- return d.getLogger().debug("Lex: LINK", p.yytext), 15;
1027
- case 95:
1028
- return d.getLogger().debug("Lex: LINK", p.yytext), 15;
1029
- case 96:
1030
- return d.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
1031
- case 97:
1032
- return d.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
1033
- case 98:
1034
- return d.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
1035
- case 99:
1036
- this.pushState("md_string");
1037
- break;
1038
- case 100:
1039
- return d.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
1040
- case 101:
1041
- return this.popState(), d.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
1042
- case 102:
1043
- return this.popState(), d.getLogger().debug("Lex: LINK", p.yytext), 15;
1044
- case 103:
1045
- return this.popState(), d.getLogger().debug("Lex: LINK", p.yytext), 15;
1046
- case 104:
1047
- return d.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
1048
- }
1049
- }, "anonymous"),
1050
- rules: [
1051
- /^(?:block-beta\b)/,
1052
- /^(?:block:)/,
1053
- /^(?:block\b)/,
1054
- /^(?:[\s]+)/,
1055
- /^(?:[\n]+)/,
1056
- /^(?:((\u000D\u000A)|(\u000A)))/,
1057
- /^(?:columns\s+auto\b)/,
1058
- /^(?:columns\s+[\d]+)/,
1059
- /^(?:["][`])/,
1060
- /^(?:[^`"]+)/,
1061
- /^(?:[`]["])/,
1062
- /^(?:["])/,
1063
- /^(?:["])/,
1064
- /^(?:[^"]*)/,
1065
- /^(?:space[:]\d+)/,
1066
- /^(?:space\b)/,
1067
- /^(?:default\b)/,
1068
- /^(?:linkStyle\b)/,
1069
- /^(?:interpolate\b)/,
1070
- /^(?:classDef\s+)/,
1071
- /^(?:DEFAULT\s+)/,
1072
- /^(?:\w+\s+)/,
1073
- /^(?:[^\n]*)/,
1074
- /^(?:class\s+)/,
1075
- /^(?:(\w+)+((,\s*\w+)*))/,
1076
- /^(?:[^\n]*)/,
1077
- /^(?:style\s+)/,
1078
- /^(?:(\w+)+((,\s*\w+)*))/,
1079
- /^(?:[^\n]*)/,
1080
- /^(?:accTitle\s*:\s*)/,
1081
- /^(?:(?!\n||)*[^\n]*)/,
1082
- /^(?:accDescr\s*:\s*)/,
1083
- /^(?:(?!\n||)*[^\n]*)/,
1084
- /^(?:accDescr\s*\{\s*)/,
1085
- /^(?:[\}])/,
1086
- /^(?:[^\}]*)/,
1087
- /^(?:end\b\s*)/,
1088
- /^(?:\(\(\()/,
1089
- /^(?:\)\)\))/,
1090
- /^(?:[\)]\))/,
1091
- /^(?:\}\})/,
1092
- /^(?:\})/,
1093
- /^(?:\(-)/,
1094
- /^(?:-\))/,
1095
- /^(?:\(\()/,
1096
- /^(?:\]\])/,
1097
- /^(?:\()/,
1098
- /^(?:\]\))/,
1099
- /^(?:\\\])/,
1100
- /^(?:\/\])/,
1101
- /^(?:\)\])/,
1102
- /^(?:[\)])/,
1103
- /^(?:\]>)/,
1104
- /^(?:[\]])/,
1105
- /^(?:-\))/,
1106
- /^(?:\(-)/,
1107
- /^(?:\)\))/,
1108
- /^(?:\))/,
1109
- /^(?:\(\(\()/,
1110
- /^(?:\(\()/,
1111
- /^(?:\{\{)/,
1112
- /^(?:\{)/,
1113
- /^(?:>)/,
1114
- /^(?:\(\[)/,
1115
- /^(?:\()/,
1116
- /^(?:\[\[)/,
1117
- /^(?:\[\|)/,
1118
- /^(?:\[\()/,
1119
- /^(?:\)\)\))/,
1120
- /^(?:\[\\)/,
1121
- /^(?:\[\/)/,
1122
- /^(?:\[\\)/,
1123
- /^(?:\[)/,
1124
- /^(?:<\[)/,
1125
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1126
- /^(?:$)/,
1127
- /^(?:["][`])/,
1128
- /^(?:["][`])/,
1129
- /^(?:[^`"]+)/,
1130
- /^(?:[`]["])/,
1131
- /^(?:["])/,
1132
- /^(?:["])/,
1133
- /^(?:[^"]+)/,
1134
- /^(?:["])/,
1135
- /^(?:\]>\s*\()/,
1136
- /^(?:,?\s*right\s*)/,
1137
- /^(?:,?\s*left\s*)/,
1138
- /^(?:,?\s*x\s*)/,
1139
- /^(?:,?\s*y\s*)/,
1140
- /^(?:,?\s*up\s*)/,
1141
- /^(?:,?\s*down\s*)/,
1142
- /^(?:\)\s*)/,
1143
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1144
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1145
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1146
- /^(?:\s*~~[\~]+\s*)/,
1147
- /^(?:\s*[xo<]?--\s*)/,
1148
- /^(?:\s*[xo<]?==\s*)/,
1149
- /^(?:\s*[xo<]?-\.\s*)/,
1150
- /^(?:["][`])/,
1151
- /^(?:["])/,
1152
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1153
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1154
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1155
- /^(?::\d+)/
1156
- ],
1157
- conditions: {
1158
- STYLE_DEFINITION: {
1159
- rules: [28],
1160
- inclusive: !1
1161
- },
1162
- STYLE_STMNT: {
1163
- rules: [27],
1164
- inclusive: !1
1165
- },
1166
- CLASSDEFID: {
1167
- rules: [22],
1168
- inclusive: !1
1169
- },
1170
- CLASSDEF: {
1171
- rules: [20, 21],
1172
- inclusive: !1
1173
- },
1174
- CLASS_STYLE: {
1175
- rules: [25],
1176
- inclusive: !1
1177
- },
1178
- CLASS: {
1179
- rules: [24],
1180
- inclusive: !1
1181
- },
1182
- LLABEL: {
1183
- rules: [
1184
- 99,
1185
- 100,
1186
- 101,
1187
- 102,
1188
- 103
1189
- ],
1190
- inclusive: !1
1191
- },
1192
- ARROW_DIR: {
1193
- rules: [
1194
- 85,
1195
- 86,
1196
- 87,
1197
- 88,
1198
- 89,
1199
- 90,
1200
- 91
1201
- ],
1202
- inclusive: !1
1203
- },
1204
- BLOCK_ARROW: {
1205
- rules: [
1206
- 76,
1207
- 81,
1208
- 84
1209
- ],
1210
- inclusive: !1
1211
- },
1212
- NODE: {
1213
- rules: [
1214
- 37,
1215
- 38,
1216
- 39,
1217
- 40,
1218
- 41,
1219
- 42,
1220
- 43,
1221
- 44,
1222
- 45,
1223
- 46,
1224
- 47,
1225
- 48,
1226
- 49,
1227
- 50,
1228
- 51,
1229
- 52,
1230
- 53,
1231
- 77,
1232
- 80
1233
- ],
1234
- inclusive: !1
1235
- },
1236
- md_string: {
1237
- rules: [
1238
- 9,
1239
- 10,
1240
- 78,
1241
- 79
1242
- ],
1243
- inclusive: !1
1244
- },
1245
- space: {
1246
- rules: [],
1247
- inclusive: !1
1248
- },
1249
- string: {
1250
- rules: [
1251
- 12,
1252
- 13,
1253
- 82,
1254
- 83
1255
- ],
1256
- inclusive: !1
1257
- },
1258
- acc_descr_multiline: {
1259
- rules: [34, 35],
1260
- inclusive: !1
1261
- },
1262
- acc_descr: {
1263
- rules: [32],
1264
- inclusive: !1
1265
- },
1266
- acc_title: {
1267
- rules: [30],
1268
- inclusive: !1
1269
- },
1270
- INITIAL: {
1271
- rules: [
1272
- 0,
1273
- 1,
1274
- 2,
1275
- 3,
1276
- 4,
1277
- 5,
1278
- 6,
1279
- 7,
1280
- 8,
1281
- 11,
1282
- 14,
1283
- 15,
1284
- 16,
1285
- 17,
1286
- 18,
1287
- 19,
1288
- 23,
1289
- 26,
1290
- 29,
1291
- 31,
1292
- 33,
1293
- 36,
1294
- 54,
1295
- 55,
1296
- 56,
1297
- 57,
1298
- 58,
1299
- 59,
1300
- 60,
1301
- 61,
1302
- 62,
1303
- 63,
1304
- 64,
1305
- 65,
1306
- 66,
1307
- 67,
1308
- 68,
1309
- 69,
1310
- 70,
1311
- 71,
1312
- 72,
1313
- 73,
1314
- 74,
1315
- 75,
1316
- 92,
1317
- 93,
1318
- 94,
1319
- 95,
1320
- 96,
1321
- 97,
1322
- 98,
1323
- 104
1324
- ],
1325
- inclusive: !0
1326
- }
1327
- }
1328
- };
1329
- }();
1330
- function N() {
1331
- this.yy = {};
1332
- }
1333
- return h(N, "Parser"), N.prototype = _, _.Parser = N, new N();
1334
- }();
1335
- mt.parser = mt;
1336
- var nr = mt, K = /* @__PURE__ */ new Map(), Dt = [], wt = /* @__PURE__ */ new Map(), zt = "color", At = "fill", lr = "bgFill", qt = ",", or = z(), dt = /* @__PURE__ */ new Map(), St = "", cr = /* @__PURE__ */ h((e) => _e.sanitizeText(e, or), "sanitizeText"), dr = /* @__PURE__ */ h(function(e, t = "") {
1337
- let a = dt.get(e);
1338
- a || (a = {
1339
- id: e,
1340
- styles: [],
1341
- textStyles: []
1342
- }, dt.set(e, a)), t == null || t.split(qt).forEach((n) => {
1343
- let i = n.replace(/([^;]*);/, "$1").trim();
1344
- if (RegExp(zt).exec(n)) {
1345
- let s = i.replace(At, lr).replace(zt, At);
1346
- a.textStyles.push(s);
1347
- }
1348
- a.styles.push(i);
1349
- });
1350
- }, "addStyleClass"), hr = /* @__PURE__ */ h(function(e, t = "") {
1351
- let a = K.get(e);
1352
- t != null && (a.styles = t.split(qt));
1353
- }, "addStyle2Node"), gr = /* @__PURE__ */ h(function(e, t) {
1354
- e.split(",").forEach(function(a) {
1355
- let n = K.get(a);
1356
- if (n === void 0) {
1357
- let i = a.trim();
1358
- n = {
1359
- id: i,
1360
- type: "na",
1361
- children: []
1362
- }, K.set(i, n);
1363
- }
1364
- n.classes || (n.classes = []), n.classes.push(t);
1365
- });
1366
- }, "setCssClass"), Zt = /* @__PURE__ */ h((e, t) => {
1367
- var s;
1368
- let a = e.flat(), n = [], i = ((s = a.find((r) => (r == null ? void 0 : r.type) === "column-setting")) == null ? void 0 : s.columns) ?? -1;
1369
- for (let r of a) {
1370
- if (typeof i == "number" && i > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > i && k.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${i}`), r.label && (r.label = cr(r.label)), r.type === "classDef") {
1371
- dr(r.id, r.css);
1372
- continue;
1373
- }
1374
- if (r.type === "applyClass") {
1375
- gr(r.id, (r == null ? void 0 : r.styleClass) ?? "");
1376
- continue;
1377
- }
1378
- if (r.type === "applyStyles") {
1379
- r != null && r.stylesStr && hr(r.id, r == null ? void 0 : r.stylesStr);
1380
- continue;
1381
- }
1382
- if (r.type === "column-setting") t.columns = r.columns ?? -1;
1383
- else if (r.type === "edge") {
1384
- let l = (wt.get(r.id) ?? 0) + 1;
1385
- wt.set(r.id, l), r.id = l + "-" + r.id, Dt.push(r);
1386
- } else {
1387
- r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
1388
- let l = K.get(r.id);
1389
- if (l === void 0 ? K.set(r.id, r) : (r.type !== "na" && (l.type = r.type), r.label !== r.id && (l.label = r.label)), r.children && Zt(r.children, r), r.type === "space") {
1390
- let o = r.width ?? 1;
1391
- for (let y = 0; y < o; y++) {
1392
- let g = er(r);
1393
- g.id = g.id + "-" + y, K.set(g.id, g), n.push(g);
1394
- }
1395
- } else l === void 0 && n.push(r);
1396
- }
1397
- }
1398
- t.children = n;
1399
- }, "populateBlockDatabase"), kt = [], st = {
1400
- id: "root",
1401
- type: "composite",
1402
- children: [],
1403
- columns: -1
1404
- }, ur = /* @__PURE__ */ h(() => {
1405
- k.debug("Clear called"), be(), st = {
1406
- id: "root",
1407
- type: "composite",
1408
- children: [],
1409
- columns: -1
1410
- }, K = /* @__PURE__ */ new Map([["root", st]]), kt = [], dt = /* @__PURE__ */ new Map(), Dt = [], wt = /* @__PURE__ */ new Map(), St = "";
1411
- }, "clear");
1412
- function Gt(e) {
1413
- switch (k.debug("typeStr2Type", e), e) {
1414
- case "[]":
1415
- return "square";
1416
- case "()":
1417
- return k.debug("we have a round"), "round";
1418
- case "(())":
1419
- return "circle";
1420
- case ">]":
1421
- return "rect_left_inv_arrow";
1422
- case "{}":
1423
- return "diamond";
1424
- case "{{}}":
1425
- return "hexagon";
1426
- case "([])":
1427
- return "stadium";
1428
- case "[[]]":
1429
- return "subroutine";
1430
- case "[()]":
1431
- return "cylinder";
1432
- case "((()))":
1433
- return "doublecircle";
1434
- case "[//]":
1435
- return "lean_right";
1436
- case "[\\\\]":
1437
- return "lean_left";
1438
- case "[/\\]":
1439
- return "trapezoid";
1440
- case "[\\/]":
1441
- return "inv_trapezoid";
1442
- case "<[]>":
1443
- return "block_arrow";
1444
- default:
1445
- return "na";
1446
- }
1447
- }
1448
- h(Gt, "typeStr2Type");
1449
- function Jt(e) {
1450
- switch (k.debug("typeStr2Type", e), e) {
1451
- case "==":
1452
- return "thick";
1453
- default:
1454
- return "normal";
1455
- }
1456
- }
1457
- h(Jt, "edgeTypeStr2Type");
1458
- function Vt(e) {
1459
- switch (e.trim().slice(-1)) {
1460
- case "x":
1461
- return "arrow_cross";
1462
- case "o":
1463
- return "arrow_circle";
1464
- case ">":
1465
- return "arrow_point";
1466
- default:
1467
- return "";
1468
- }
1469
- }
1470
- h(Vt, "edgeStrToEdgeData");
1471
- function Qt(e) {
1472
- switch (e.trim().charAt(0)) {
1473
- case "x":
1474
- return "arrow_cross";
1475
- case "o":
1476
- return "arrow_circle";
1477
- case "<":
1478
- return "arrow_point";
1479
- default:
1480
- return "arrow_open";
1481
- }
1482
- }
1483
- h(Qt, "edgeStrToEdgeStartData");
1484
- function te(e) {
1485
- return e.includes("==") ? "thick" : "normal";
1486
- }
1487
- h(te, "edgeStrToThickness");
1488
- function ee(e) {
1489
- return e.includes(".-") ? "dotted" : "solid";
1490
- }
1491
- h(ee, "edgeStrToPattern");
1492
- var Mt = 0, yr = {
1493
- getConfig: /* @__PURE__ */ h(() => nt().block, "getConfig"),
1494
- typeStr2Type: Gt,
1495
- edgeTypeStr2Type: Jt,
1496
- edgeStrToEdgeData: Vt,
1497
- edgeStrToEdgeStartData: Qt,
1498
- edgeStrToThickness: te,
1499
- edgeStrToPattern: ee,
1500
- getLogger: /* @__PURE__ */ h(() => k, "getLogger"),
1501
- getBlocksFlat: /* @__PURE__ */ h(() => [...K.values()], "getBlocksFlat"),
1502
- getBlocks: /* @__PURE__ */ h(() => kt || [], "getBlocks"),
1503
- getEdges: /* @__PURE__ */ h(() => Dt, "getEdges"),
1504
- setHierarchy: /* @__PURE__ */ h((e) => {
1505
- st.children = e, Zt(e, st), kt = st.children;
1506
- }, "setHierarchy"),
1507
- getBlock: /* @__PURE__ */ h((e) => K.get(e), "getBlock"),
1508
- setBlock: /* @__PURE__ */ h((e) => {
1509
- K.set(e.id, e);
1510
- }, "setBlock"),
1511
- getColumns: /* @__PURE__ */ h((e) => {
1512
- let t = K.get(e);
1513
- return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1514
- }, "getColumns"),
1515
- getClasses: /* @__PURE__ */ h(function() {
1516
- return dt;
1517
- }, "getClasses"),
1518
- clear: ur,
1519
- generateId: /* @__PURE__ */ h(() => (Mt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Mt), "generateId"),
1520
- setDiagramId: /* @__PURE__ */ h((e) => {
1521
- St = e;
1522
- }, "setDiagramId"),
1523
- getDiagramId: /* @__PURE__ */ h(() => St, "getDiagramId")
1524
- }, ft = /* @__PURE__ */ h((e, t) => {
1525
- let a = Je;
1526
- return fe(a(e, "r"), a(e, "g"), a(e, "b"), t);
1527
- }, "fade"), pr = /* @__PURE__ */ h((e) => `.label {
1528
- font-family: ${e.fontFamily};
1529
- color: ${e.nodeTextColor || e.textColor};
1530
- }
1531
- .cluster-label text {
1532
- fill: ${e.titleColor};
1533
- }
1534
- .cluster-label span,p {
1535
- color: ${e.titleColor};
1536
- }
1537
-
1538
-
1539
-
1540
- .label text,span,p {
1541
- fill: ${e.nodeTextColor || e.textColor};
1542
- color: ${e.nodeTextColor || e.textColor};
1543
- }
1544
-
1545
- .node rect,
1546
- .node circle,
1547
- .node ellipse,
1548
- .node polygon,
1549
- .node path {
1550
- fill: ${e.mainBkg};
1551
- stroke: ${e.nodeBorder};
1552
- stroke-width: 1px;
1553
- }
1554
- .flowchart-label text {
1555
- text-anchor: middle;
1556
- }
1557
- // .flowchart-label .text-outer-tspan {
1558
- // text-anchor: middle;
1559
- // }
1560
- // .flowchart-label .text-inner-tspan {
1561
- // text-anchor: start;
1562
- // }
1563
-
1564
- .node .label {
1565
- text-align: center;
1566
- }
1567
- .node.clickable {
1568
- cursor: pointer;
1569
- }
1570
-
1571
- .arrowheadPath {
1572
- fill: ${e.arrowheadColor};
1573
- }
1574
-
1575
- .edgePath .path {
1576
- stroke: ${e.lineColor};
1577
- stroke-width: 2.0px;
1578
- }
1579
-
1580
- .flowchart-link {
1581
- stroke: ${e.lineColor};
1582
- fill: none;
1583
- }
1584
-
1585
- .edgeLabel {
1586
- background-color: ${e.edgeLabelBackground};
1587
- /*
1588
- * This is for backward compatibility with existing code that didn't
1589
- * add a \`<p>\` around edge labels.
1590
- *
1591
- * TODO: We should probably remove this in a future release.
1592
- */
1593
- p {
1594
- margin: 0;
1595
- padding: 0;
1596
- display: inline;
1597
- }
1598
- rect {
1599
- opacity: 0.5;
1600
- background-color: ${e.edgeLabelBackground};
1601
- fill: ${e.edgeLabelBackground};
1602
- }
1603
- text-align: center;
1604
- }
1605
-
1606
- /* For html labels only */
1607
- .labelBkg {
1608
- background-color: ${e.edgeLabelBackground};
1609
- }
1610
-
1611
- .node .cluster {
1612
- // fill: ${ft(e.mainBkg, 0.5)};
1613
- fill: ${ft(e.clusterBkg, 0.5)};
1614
- stroke: ${ft(e.clusterBorder, 0.2)};
1615
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1616
- stroke-width: 1px;
1617
- }
1618
-
1619
- .cluster text {
1620
- fill: ${e.titleColor};
1621
- }
1622
-
1623
- .cluster span,p {
1624
- color: ${e.titleColor};
1625
- }
1626
- /* .cluster div {
1627
- color: ${e.titleColor};
1628
- } */
1629
-
1630
- div.mermaidTooltip {
1631
- position: absolute;
1632
- text-align: center;
1633
- max-width: 200px;
1634
- padding: 2px;
1635
- font-family: ${e.fontFamily};
1636
- font-size: 12px;
1637
- background: ${e.tertiaryColor};
1638
- border: 1px solid ${e.border2};
1639
- border-radius: 2px;
1640
- pointer-events: none;
1641
- z-index: 100;
1642
- }
1643
-
1644
- .flowchartTitleText {
1645
- text-anchor: middle;
1646
- font-size: 18px;
1647
- fill: ${e.textColor};
1648
- }
1649
- ${Ve()}
1650
- `, "getStyles"), xr = /* @__PURE__ */ h((e, t, a, n) => {
1651
- t.forEach((i) => {
1652
- br[i](e, a, n);
1653
- });
1654
- }, "insertMarkers"), br = {
1655
- extension: /* @__PURE__ */ h((e, t, a) => {
1656
- 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");
1657
- }, "extension"),
1658
- composition: /* @__PURE__ */ h((e, t, a) => {
1659
- 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");
1660
- }, "composition"),
1661
- aggregation: /* @__PURE__ */ h((e, t, a) => {
1662
- 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");
1663
- }, "aggregation"),
1664
- dependency: /* @__PURE__ */ h((e, t, a) => {
1665
- 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");
1666
- }, "dependency"),
1667
- lollipop: /* @__PURE__ */ h((e, t, a) => {
1668
- 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);
1669
- }, "lollipop"),
1670
- point: /* @__PURE__ */ h((e, t, a) => {
1671
- 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");
1672
- }, "point"),
1673
- circle: /* @__PURE__ */ h((e, t, a) => {
1674
- 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");
1675
- }, "circle"),
1676
- cross: /* @__PURE__ */ h((e, t, a) => {
1677
- 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");
1678
- }, "cross"),
1679
- barb: /* @__PURE__ */ h((e, t, a) => {
1680
- 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");
1681
- }, "barb")
1682
- }, fr = xr, Ht, Kt, R = ((Kt = (Ht = z()) == null ? void 0 : Ht.block) == null ? void 0 : Kt.padding) ?? 8;
1683
- function Lt(e, t) {
1684
- if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1685
- if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1686
- return e < 0 ? {
1687
- px: t,
1688
- py: 0
1689
- } : e === 1 ? {
1690
- px: 0,
1691
- py: t
1692
- } : {
1693
- px: t % e,
1694
- py: Math.floor(t / e)
1695
- };
1696
- }
1697
- h(Lt, "calculateBlockPosition");
1698
- var mr = /* @__PURE__ */ h((e) => {
1699
- let t = 0, a = 0;
1700
- for (let n of e.children) {
1701
- let { width: i, height: s, x: r, y: l } = n.size ?? {
1702
- width: 0,
1703
- height: 0,
1704
- x: 0,
1705
- y: 0
1706
- };
1707
- if (k.debug("getMaxChildSize abc95 child:", n.id, "width:", i, "height:", s, "x:", r, "y:", l, n.type), n.type === "space") continue;
1708
- let o = i / (n.widthInColumns ?? 1);
1709
- o > t && (t = o), s > a && (a = s);
1710
- }
1711
- return {
1712
- width: t,
1713
- height: a
1714
- };
1715
- }, "getMaxChildSize");
1716
- function ht(e, t, a = 0, n = 0) {
1717
- var r, l, o, y, g, x, m, w, b, E, _;
1718
- k.debug("setBlockSizes abc95 (start)", e.id, (r = e == null ? void 0 : e.size) == null ? void 0 : r.x, "block width =", e == null ? void 0 : e.size, "siblingWidth", a), (l = e == null ? void 0 : e.size) != null && l.width || (e.size = {
1719
- width: a,
1720
- height: n,
1721
- x: 0,
1722
- y: 0
1723
- });
1724
- let i = 0, s = 0;
1725
- if (((o = e.children) == null ? void 0 : o.length) > 0) {
1726
- for (let D of e.children) ht(D, t);
1727
- let N = mr(e);
1728
- i = N.width, s = N.height, k.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, s);
1729
- for (let D of e.children) D.size && (k.debug(`abc95 Setting size of children of ${e.id} id=${D.id} ${i} ${s} ${JSON.stringify(D.size)}`), D.size.width = i * (D.widthInColumns ?? 1) + R * ((D.widthInColumns ?? 1) - 1), D.size.height = s, D.size.x = 0, D.size.y = 0, k.debug(`abc95 updating size of ${e.id} children child:${D.id} maxWidth:${i} maxHeight:${s}`));
1730
- for (let D of e.children) ht(D, t, i, s);
1731
- let d = e.columns ?? -1, p = 0;
1732
- for (let D of e.children) p += D.widthInColumns ?? 1;
1733
- let L = e.children.length;
1734
- d > 0 && d < p && (L = d);
1735
- let f = Math.ceil(p / L), S = L * (i + R) + R, c = f * (s + R) + R;
1736
- if (S < a) {
1737
- k.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${n} width ${S}`), S = a, c = n;
1738
- let D = (a - L * R - R) / L, u = (n - f * R - R) / f;
1739
- k.debug("Size indata abc88", e.id, "childWidth", D, "maxWidth", i), k.debug("Size indata abc88", e.id, "childHeight", u, "maxHeight", s), k.debug("Size indata abc88 xSize", L, "padding", R);
1740
- for (let v of e.children) v.size && (v.size.width = D, v.size.height = u, v.size.x = 0, v.size.y = 0);
1741
- }
1742
- if (k.debug(`abc95 (finale calc) ${e.id} xSize ${L} ySize ${f} columns ${d}${e.children.length} width=${Math.max(S, ((y = e.size) == null ? void 0 : y.width) || 0)}`), S < (((g = e == null ? void 0 : e.size) == null ? void 0 : g.width) || 0)) {
1743
- S = ((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) || 0;
1744
- let D = d > 0 ? Math.min(e.children.length, d) : e.children.length;
1745
- if (D > 0) {
1746
- let u = (S - D * R - R) / D;
1747
- k.debug("abc95 (growing to fit) width", e.id, S, (m = e.size) == null ? void 0 : m.width, u);
1748
- for (let v of e.children) v.size && (v.size.width = u);
1749
- }
1750
- }
1751
- e.size = {
1752
- width: S,
1753
- height: c,
1754
- x: 0,
1755
- y: 0
1756
- };
1757
- }
1758
- k.debug("setBlockSizes abc94 (done)", e.id, (w = e == null ? void 0 : e.size) == null ? void 0 : w.x, (b = e == null ? void 0 : e.size) == null ? void 0 : b.width, (E = e == null ? void 0 : e.size) == null ? void 0 : E.y, (_ = e == null ? void 0 : e.size) == null ? void 0 : _.height);
1759
- }
1760
- h(ht, "setBlockSizes");
1761
- function vt(e, t) {
1762
- var n, i, s, r, l, o, y, g, x, m, w, b, E, _, N, d, p;
1763
- k.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n = e == null ? void 0 : e.size) == null ? void 0 : n.x} y: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.y} width: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.width}`);
1764
- let a = e.columns ?? -1;
1765
- if (k.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && e.children.length > 0) {
1766
- let L = ((l = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : l.width) ?? 0, f = e.children.length * L + (e.children.length - 1) * R;
1767
- k.debug("widthOfChildren 88", f, "posX");
1768
- let S = /* @__PURE__ */ new Map();
1769
- {
1770
- let $ = 0;
1771
- for (let T of e.children) {
1772
- if (!T.size) continue;
1773
- let { py: M } = Lt(a, $), Z = S.get(M) ?? 0;
1774
- T.size.height > Z && S.set(M, T.size.height);
1775
- let G = (T == null ? void 0 : T.widthInColumns) ?? 1;
1776
- a > 0 && (G = Math.min(G, a - $ % a)), $ += G;
1777
- }
1778
- }
1779
- let c = /* @__PURE__ */ new Map();
1780
- {
1781
- let $ = 0, T = [...S.keys()].sort((M, Z) => M - Z);
1782
- for (let M of T) c.set(M, $), $ += (S.get(M) ?? 0) + R;
1783
- }
1784
- let D = 0;
1785
- k.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
1786
- let u = (y = e == null ? void 0 : e.size) != null && y.x ? ((g = e == null ? void 0 : e.size) == null ? void 0 : g.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -R, v = 0;
1787
- for (let $ of e.children) {
1788
- let T = e;
1789
- if (!$.size) continue;
1790
- let { width: M, height: Z } = $.size, { px: G, py: I } = Lt(a, D);
1791
- if (I != v && (v = I, u = (m = e == null ? void 0 : e.size) != null && m.x ? ((w = e == null ? void 0 : e.size) == null ? void 0 : w.x) + (-((b = e == null ? void 0 : e.size) == null ? void 0 : b.width) / 2 || 0) : -R, k.debug("New row in layout for block", e.id, " and child ", $.id, v)), k.debug(`abc89 layout blocks (child) id: ${$.id} Pos: ${D} (px, py) ${G},${I} (${(E = T == null ? void 0 : T.size) == null ? void 0 : E.x},${(_ = T == null ? void 0 : T.size) == null ? void 0 : _.y}) parent: ${T.id} width: ${M}${R}`), T.size) {
1792
- let J = M / 2;
1793
- $.size.x = u + R + J, k.debug(`abc91 layout blocks (calc) px, pyid:${$.id} startingPos=X${u} new startingPosX${$.size.x} ${J} padding=${R} width=${M} halfWidth=${J} => x:${$.size.x} y:${$.size.y} ${$.widthInColumns} (width * (child?.w || 1)) / 2 ${M * (($ == null ? void 0 : $.widthInColumns) ?? 1) / 2}`), u = $.size.x + J;
1794
- let et = c.get(I) ?? 0, yt = S.get(I) ?? Z;
1795
- $.size.y = T.size.y - T.size.height / 2 + et + yt / 2 + R, k.debug(`abc88 layout blocks (calc) px, pyid:${$.id}startingPosX${u}${R}${J}=>x:${$.size.x}y:${$.size.y}${$.widthInColumns}(width * (child?.w || 1)) / 2${M * (($ == null ? void 0 : $.widthInColumns) ?? 1) / 2}`);
1796
- }
1797
- $.children && vt($);
1798
- let H = ($ == null ? void 0 : $.widthInColumns) ?? 1;
1799
- a > 0 && (H = Math.min(H, a - D % a)), D += H, k.debug("abc88 columnsPos", $, D);
1800
- }
1801
- }
1802
- k.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.x} y: ${(d = e == null ? void 0 : e.size) == null ? void 0 : d.y} width: ${(p = e == null ? void 0 : e.size) == null ? void 0 : p.width}`);
1803
- }
1804
- h(vt, "layoutBlocks");
1805
- function Nt(e, { minX: t, minY: a, maxX: n, maxY: i } = {
1806
- minX: 0,
1807
- minY: 0,
1808
- maxX: 0,
1809
- maxY: 0
1810
- }) {
1811
- if (e.size && e.id !== "root") {
1812
- let { x: s, y: r, width: l, height: o } = e.size;
1813
- s - l / 2 < t && (t = s - l / 2), r - o / 2 < a && (a = r - o / 2), s + l / 2 > n && (n = s + l / 2), r + o / 2 > i && (i = r + o / 2);
1814
- }
1815
- if (e.children) for (let s of e.children) ({ minX: t, minY: a, maxX: n, maxY: i } = Nt(s, {
1816
- minX: t,
1817
- minY: a,
1818
- maxX: n,
1819
- maxY: i
1820
- }));
1821
- return {
1822
- minX: t,
1823
- minY: a,
1824
- maxX: n,
1825
- maxY: i
1826
- };
1827
- }
1828
- h(Nt, "findBounds");
1829
- function re(e) {
1830
- let t = e.getBlock("root");
1831
- if (!t) return;
1832
- ht(t, e, 0, 0), vt(t), k.debug("getBlocks", JSON.stringify(t, null, 2));
1833
- let { minX: a, minY: n, maxX: i, maxY: s } = Nt(t), r = s - n;
1834
- return {
1835
- x: a,
1836
- y: n,
1837
- width: i - a,
1838
- height: r
1839
- };
1840
- }
1841
- h(re, "layout");
1842
- var U = /* @__PURE__ */ h(async (e, t, a, n = !1, i = !1) => {
1843
- let s = t || "";
1844
- typeof s == "object" && (s = s[0]);
1845
- let r = z(), l = Y(r);
1846
- return await $t(e, s, {
1847
- style: a,
1848
- isTitle: n,
1849
- useHtmlLabels: l,
1850
- markdown: !1,
1851
- isNode: i,
1852
- width: 1 / 0
1853
- }, r);
1854
- }, "createLabel"), wr = /* @__PURE__ */ h((e, t, a, n, i) => {
1855
- t.arrowTypeStart && Pt(e, "start", t.arrowTypeStart, a, n, i), t.arrowTypeEnd && Pt(e, "end", t.arrowTypeEnd, a, n, i);
1856
- }, "addEdgeMarkers"), Sr = {
1857
- arrow_cross: "cross",
1858
- arrow_point: "point",
1859
- arrow_barb: "barb",
1860
- arrow_circle: "circle",
1861
- aggregation: "aggregation",
1862
- extension: "extension",
1863
- composition: "composition",
1864
- dependency: "dependency",
1865
- lollipop: "lollipop"
1866
- }, Pt = /* @__PURE__ */ h((e, t, a, n, i, s) => {
1867
- let r = Sr[a];
1868
- if (!r) {
1869
- k.warn(`Unknown arrow type: ${a}`);
1870
- return;
1871
- }
1872
- let l = t === "start" ? "Start" : "End";
1873
- e.attr(`marker-${t}`, `url(${n}#${i}_${s}-${r}${l})`);
1874
- }, "addEdgeMarker"), _t = {}, P = {}, kr = /* @__PURE__ */ h(async (e, t) => {
1875
- let a = z(), n = Y(a), i = e.insert("g").attr("class", "edgeLabel"), s = i.insert("g").attr("class", "label"), r = t.labelType === "markdown", l = await $t(e, t.label, {
1876
- style: t.labelStyle,
1877
- useHtmlLabels: n,
1878
- addSvgBackground: r,
1879
- isNode: !1,
1880
- markdown: r,
1881
- width: r ? void 0 : 1 / 0
1882
- }, a);
1883
- s.node().appendChild(l);
1884
- let o = l.getBBox(), y = o;
1885
- if (n) {
1886
- let x = l.children[0], m = B(l);
1887
- o = x.getBoundingClientRect(), y = o, m.attr("width", o.width), m.attr("height", o.height);
1888
- } else {
1889
- let x = B(l).select("text").node();
1890
- x && typeof x.getBBox == "function" && (y = x.getBBox());
1891
- }
1892
- s.attr("transform", rt(y, n)), _t[t.id] = i, t.width = o.width, t.height = o.height;
1893
- let g;
1894
- if (t.startLabelLeft) {
1895
- let x = e.insert("g").attr("class", "edgeTerminals"), m = x.insert("g").attr("class", "inner"), w = await U(m, t.startLabelLeft, t.labelStyle);
1896
- g = w;
1897
- let b = w.getBBox();
1898
- if (n) {
1899
- let E = w.children[0], _ = B(w);
1900
- b = E.getBoundingClientRect(), _.attr("width", b.width), _.attr("height", b.height);
1901
- }
1902
- m.attr("transform", rt(b, n)), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = x, it(g, t.startLabelLeft);
1903
- }
1904
- if (t.startLabelRight) {
1905
- let x = e.insert("g").attr("class", "edgeTerminals"), m = x.insert("g").attr("class", "inner"), w = await U(m, t.startLabelRight, t.labelStyle);
1906
- g = w;
1907
- let b = w.getBBox();
1908
- if (n) {
1909
- let E = w.children[0], _ = B(w);
1910
- b = E.getBoundingClientRect(), _.attr("width", b.width), _.attr("height", b.height);
1911
- }
1912
- m.attr("transform", rt(b, n)), P[t.id] || (P[t.id] = {}), P[t.id].startRight = x, it(g, t.startLabelRight);
1913
- }
1914
- if (t.endLabelLeft) {
1915
- let x = e.insert("g").attr("class", "edgeTerminals"), m = x.insert("g").attr("class", "inner"), w = await U(x, t.endLabelLeft, t.labelStyle);
1916
- g = w;
1917
- let b = w.getBBox();
1918
- if (n) {
1919
- let E = w.children[0], _ = B(w);
1920
- b = E.getBoundingClientRect(), _.attr("width", b.width), _.attr("height", b.height);
1921
- }
1922
- m.attr("transform", rt(b, n)), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = x, it(g, t.endLabelLeft);
1923
- }
1924
- if (t.endLabelRight) {
1925
- let x = e.insert("g").attr("class", "edgeTerminals"), m = x.insert("g").attr("class", "inner"), w = await U(x, t.endLabelRight, t.labelStyle);
1926
- g = w;
1927
- let b = w.getBBox();
1928
- if (n) {
1929
- let E = w.children[0], _ = B(w);
1930
- b = E.getBoundingClientRect(), _.attr("width", b.width), _.attr("height", b.height);
1931
- }
1932
- m.attr("transform", rt(b, n)), P[t.id] || (P[t.id] = {}), P[t.id].endRight = x, it(g, t.endLabelRight);
1933
- }
1934
- return l;
1935
- }, "insertEdgeLabel");
1936
- function it(e, t) {
1937
- Y(z()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1938
- }
1939
- h(it, "setTerminalWidth");
1940
- var Lr = /* @__PURE__ */ h((e, t) => {
1941
- k.debug("Moving label abc88 ", e.id, e.label, _t[e.id], t);
1942
- let a = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: n } = Le(z());
1943
- if (e.label) {
1944
- let i = _t[e.id], s = e.x, r = e.y;
1945
- if (a) {
1946
- let l = at.calcLabelPosition(a);
1947
- k.debug("Moving label " + e.label + " from (", s, ",", r, ") to (", l.x, ",", l.y, ") abc88"), t.updatedPath && (s = l.x, r = l.y);
1948
- }
1949
- i.attr("transform", `translate(${s}, ${r + n / 2})`);
1950
- }
1951
- if (e.startLabelLeft) {
1952
- let i = P[e.id].startLeft, s = e.x, r = e.y;
1953
- if (a) {
1954
- let l = at.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1955
- s = l.x, r = l.y;
1956
- }
1957
- i.attr("transform", `translate(${s}, ${r})`);
1958
- }
1959
- if (e.startLabelRight) {
1960
- let i = P[e.id].startRight, s = e.x, r = e.y;
1961
- if (a) {
1962
- let l = at.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", a);
1963
- s = l.x, r = l.y;
1964
- }
1965
- i.attr("transform", `translate(${s}, ${r})`);
1966
- }
1967
- if (e.endLabelLeft) {
1968
- let i = P[e.id].endLeft, s = e.x, r = e.y;
1969
- if (a) {
1970
- let l = at.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1971
- s = l.x, r = l.y;
1972
- }
1973
- i.attr("transform", `translate(${s}, ${r})`);
1974
- }
1975
- if (e.endLabelRight) {
1976
- let i = P[e.id].endRight, s = e.x, r = e.y;
1977
- if (a) {
1978
- let l = at.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1979
- s = l.x, r = l.y;
1980
- }
1981
- i.attr("transform", `translate(${s}, ${r})`);
1982
- }
1983
- }, "positionEdgeLabel"), _r = /* @__PURE__ */ h((e, t) => {
1984
- let a = e.x, n = e.y, i = Math.abs(t.x - a), s = Math.abs(t.y - n), r = e.width / 2, l = e.height / 2;
1985
- return i >= r || s >= l;
1986
- }, "outsideNode"), Er = /* @__PURE__ */ h((e, t, a) => {
1987
- k.debug(`intersection calc abc89:
1988
- outsidePoint: ${JSON.stringify(t)}
1989
- insidePoint : ${JSON.stringify(a)}
1990
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1991
- let n = e.x, i = e.y, s = Math.abs(n - a.x), r = e.width / 2, l = a.x < t.x ? r - s : r + s, o = e.height / 2, y = Math.abs(t.y - a.y), g = Math.abs(t.x - a.x);
1992
- if (Math.abs(i - t.y) * r > Math.abs(n - t.x) * o) {
1993
- let x = a.y < t.y ? t.y - o - i : i - o - t.y;
1994
- l = g * x / y;
1995
- let m = {
1996
- x: a.x < t.x ? a.x + l : a.x - g + l,
1997
- y: a.y < t.y ? a.y + y - x : a.y - y + x
1998
- };
1999
- return l === 0 && (m.x = t.x, m.y = t.y), g === 0 && (m.x = t.x), y === 0 && (m.y = t.y), k.debug(`abc89 topp/bott calc, Q ${y}, q ${x}, R ${g}, r ${l}`, m), m;
2000
- } else {
2001
- l = a.x < t.x ? t.x - r - n : n - r - t.x;
2002
- let x = y * l / g, m = a.x < t.x ? a.x + g - l : a.x - g + l, w = a.y < t.y ? a.y + x : a.y - x;
2003
- return k.debug(`sides calc abc89, Q ${y}, q ${x}, R ${g}, r ${l}`, {
2004
- _x: m,
2005
- _y: w
2006
- }), l === 0 && (m = t.x, w = t.y), g === 0 && (m = t.x), y === 0 && (w = t.y), {
2007
- x: m,
2008
- y: w
2009
- };
2010
- }
2011
- }, "intersection"), Yt = /* @__PURE__ */ h((e, t) => {
2012
- k.debug("abc88 cutPathAtIntersect", e, t);
2013
- let a = [], n = e[0], i = !1;
2014
- return e.forEach((s) => {
2015
- if (!_r(t, s) && !i) {
2016
- let r = Er(t, n, s), l = !1;
2017
- a.forEach((o) => {
2018
- l || (l = o.x === r.x && o.y === r.y);
2019
- }), a.some((o) => o.x === r.x && o.y === r.y) || a.push(r), i = !0;
2020
- } else n = s, i || a.push(s);
2021
- }), a;
2022
- }, "cutPathAtIntersect"), $r = /* @__PURE__ */ h(function(e, t, a, n, i, s, r) {
2023
- let l = a.points;
2024
- k.debug("abc88 InsertEdge: edge=", a, "e=", t);
2025
- let o = !1, y = s.node(t.v);
2026
- var g = s.node(t.w);
2027
- g != null && g.intersect && (y != null && y.intersect) && (l = l.slice(1, a.points.length - 1), l.unshift(y.intersect(l[0])), l.push(g.intersect(l[l.length - 1]))), a.toCluster && (k.debug("to cluster abc88", n[a.toCluster]), l = Yt(a.points, n[a.toCluster].node), o = !0), a.fromCluster && (k.debug("from cluster abc88", n[a.fromCluster]), l = Yt(l.reverse(), n[a.fromCluster].node).reverse(), o = !0);
2028
- let x = l.filter((L) => !Number.isNaN(L.y)), m = Se;
2029
- a.curve && (i === "graph" || i === "flowchart") && (m = a.curve);
2030
- let { x: w, y: b } = me(a), E = we().x(w).y(b).curve(m), _;
2031
- switch (a.thickness) {
2032
- case "normal":
2033
- _ = "edge-thickness-normal";
2034
- break;
2035
- case "thick":
2036
- _ = "edge-thickness-thick";
2037
- break;
2038
- case "invisible":
2039
- _ = "edge-thickness-thick";
2040
- break;
2041
- default:
2042
- _ = "";
2043
- }
2044
- switch (a.pattern) {
2045
- case "solid":
2046
- _ += " edge-pattern-solid";
2047
- break;
2048
- case "dotted":
2049
- _ += " edge-pattern-dotted";
2050
- break;
2051
- case "dashed":
2052
- _ += " edge-pattern-dashed";
2053
- break;
2054
- }
2055
- let N = e.append("path").attr("d", E(x)).attr("id", a.id).attr("class", " " + _ + (a.classes ? " " + a.classes : "")).attr("style", a.style), d = "";
2056
- (z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (d = ke(!0)), wr(N, a, d, r, i);
2057
- let p = {};
2058
- return o && (p.updatedPath = l), p.originalPath = a.points, p;
2059
- }, "insertEdge"), Dr = /* @__PURE__ */ h((e) => {
2060
- let t = /* @__PURE__ */ new Set();
2061
- for (let a of e) switch (a) {
2062
- case "x":
2063
- t.add("right"), t.add("left");
2064
- break;
2065
- case "y":
2066
- t.add("up"), t.add("down");
2067
- break;
2068
- default:
2069
- t.add(a);
2070
- break;
2071
- }
2072
- return t;
2073
- }, "expandAndDeduplicateDirections"), vr = /* @__PURE__ */ h((e, t, a, n) => {
2074
- let i = Dr(e), s = t.height + 2 * a.padding, r = s / 2, l = n ?? t.width + 2 * r + a.padding, o = a.padding / 2;
2075
- return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
2076
- {
2077
- x: 0,
2078
- y: 0
2079
- },
2080
- {
2081
- x: r,
2082
- y: 0
2083
- },
2084
- {
2085
- x: l / 2,
2086
- y: 2 * o
2087
- },
2088
- {
2089
- x: l - r,
2090
- y: 0
2091
- },
2092
- {
2093
- x: l,
2094
- y: 0
2095
- },
2096
- {
2097
- x: l,
2098
- y: -s / 3
2099
- },
2100
- {
2101
- x: l + 2 * o,
2102
- y: -s / 2
2103
- },
2104
- {
2105
- x: l,
2106
- y: -2 * s / 3
2107
- },
2108
- {
2109
- x: l,
2110
- y: -s
2111
- },
2112
- {
2113
- x: l - r,
2114
- y: -s
2115
- },
2116
- {
2117
- x: l / 2,
2118
- y: -s - 2 * o
2119
- },
2120
- {
2121
- x: r,
2122
- y: -s
2123
- },
2124
- {
2125
- x: 0,
2126
- y: -s
2127
- },
2128
- {
2129
- x: 0,
2130
- y: -2 * s / 3
2131
- },
2132
- {
2133
- x: -2 * o,
2134
- y: -s / 2
2135
- },
2136
- {
2137
- x: 0,
2138
- y: -s / 3
2139
- }
2140
- ] : i.has("right") && i.has("left") && i.has("up") ? [
2141
- {
2142
- x: r,
2143
- y: 0
2144
- },
2145
- {
2146
- x: l - r,
2147
- y: 0
2148
- },
2149
- {
2150
- x: l,
2151
- y: -s / 2
2152
- },
2153
- {
2154
- x: l - r,
2155
- y: -s
2156
- },
2157
- {
2158
- x: r,
2159
- y: -s
2160
- },
2161
- {
2162
- x: 0,
2163
- y: -s / 2
2164
- }
2165
- ] : i.has("right") && i.has("left") && i.has("down") ? [
2166
- {
2167
- x: 0,
2168
- y: 0
2169
- },
2170
- {
2171
- x: r,
2172
- y: -s
2173
- },
2174
- {
2175
- x: l - r,
2176
- y: -s
2177
- },
2178
- {
2179
- x: l,
2180
- y: 0
2181
- }
2182
- ] : i.has("right") && i.has("up") && i.has("down") ? [
2183
- {
2184
- x: 0,
2185
- y: 0
2186
- },
2187
- {
2188
- x: l,
2189
- y: -r
2190
- },
2191
- {
2192
- x: l,
2193
- y: -s + r
2194
- },
2195
- {
2196
- x: 0,
2197
- y: -s
2198
- }
2199
- ] : i.has("left") && i.has("up") && i.has("down") ? [
2200
- {
2201
- x: l,
2202
- y: 0
2203
- },
2204
- {
2205
- x: 0,
2206
- y: -r
2207
- },
2208
- {
2209
- x: 0,
2210
- y: -s + r
2211
- },
2212
- {
2213
- x: l,
2214
- y: -s
2215
- }
2216
- ] : i.has("right") && i.has("left") ? [
2217
- {
2218
- x: r,
2219
- y: 0
2220
- },
2221
- {
2222
- x: r,
2223
- y: -o
2224
- },
2225
- {
2226
- x: l - r,
2227
- y: -o
2228
- },
2229
- {
2230
- x: l - r,
2231
- y: 0
2232
- },
2233
- {
2234
- x: l,
2235
- y: -s / 2
2236
- },
2237
- {
2238
- x: l - r,
2239
- y: -s
2240
- },
2241
- {
2242
- x: l - r,
2243
- y: -s + o
2244
- },
2245
- {
2246
- x: r,
2247
- y: -s + o
2248
- },
2249
- {
2250
- x: r,
2251
- y: -s
2252
- },
2253
- {
2254
- x: 0,
2255
- y: -s / 2
2256
- }
2257
- ] : i.has("up") && i.has("down") ? [
2258
- {
2259
- x: l / 2,
2260
- y: 0
2261
- },
2262
- {
2263
- x: 0,
2264
- y: -o
2265
- },
2266
- {
2267
- x: r,
2268
- y: -o
2269
- },
2270
- {
2271
- x: r,
2272
- y: -s + o
2273
- },
2274
- {
2275
- x: 0,
2276
- y: -s + o
2277
- },
2278
- {
2279
- x: l / 2,
2280
- y: -s
2281
- },
2282
- {
2283
- x: l,
2284
- y: -s + o
2285
- },
2286
- {
2287
- x: l - r,
2288
- y: -s + o
2289
- },
2290
- {
2291
- x: l - r,
2292
- y: -o
2293
- },
2294
- {
2295
- x: l,
2296
- y: -o
2297
- }
2298
- ] : i.has("right") && i.has("up") ? [
2299
- {
2300
- x: 0,
2301
- y: 0
2302
- },
2303
- {
2304
- x: l,
2305
- y: -r
2306
- },
2307
- {
2308
- x: 0,
2309
- y: -s
2310
- }
2311
- ] : i.has("right") && i.has("down") ? [
2312
- {
2313
- x: 0,
2314
- y: 0
2315
- },
2316
- {
2317
- x: l,
2318
- y: 0
2319
- },
2320
- {
2321
- x: 0,
2322
- y: -s
2323
- }
2324
- ] : i.has("left") && i.has("up") ? [
2325
- {
2326
- x: l,
2327
- y: 0
2328
- },
2329
- {
2330
- x: 0,
2331
- y: -r
2332
- },
2333
- {
2334
- x: l,
2335
- y: -s
2336
- }
2337
- ] : i.has("left") && i.has("down") ? [
2338
- {
2339
- x: l,
2340
- y: 0
2341
- },
2342
- {
2343
- x: 0,
2344
- y: 0
2345
- },
2346
- {
2347
- x: l,
2348
- y: -s
2349
- }
2350
- ] : i.has("right") ? [
2351
- {
2352
- x: r,
2353
- y: -o
2354
- },
2355
- {
2356
- x: r,
2357
- y: -o
2358
- },
2359
- {
2360
- x: l - r,
2361
- y: -o
2362
- },
2363
- {
2364
- x: l - r,
2365
- y: 0
2366
- },
2367
- {
2368
- x: l,
2369
- y: -s / 2
2370
- },
2371
- {
2372
- x: l - r,
2373
- y: -s
2374
- },
2375
- {
2376
- x: l - r,
2377
- y: -s + o
2378
- },
2379
- {
2380
- x: r,
2381
- y: -s + o
2382
- },
2383
- {
2384
- x: r,
2385
- y: -s + o
2386
- }
2387
- ] : i.has("left") ? [
2388
- {
2389
- x: r,
2390
- y: 0
2391
- },
2392
- {
2393
- x: r,
2394
- y: -o
2395
- },
2396
- {
2397
- x: l - r,
2398
- y: -o
2399
- },
2400
- {
2401
- x: l - r,
2402
- y: -s + o
2403
- },
2404
- {
2405
- x: r,
2406
- y: -s + o
2407
- },
2408
- {
2409
- x: r,
2410
- y: -s
2411
- },
2412
- {
2413
- x: 0,
2414
- y: -s / 2
2415
- }
2416
- ] : i.has("up") ? [
2417
- {
2418
- x: r,
2419
- y: -o
2420
- },
2421
- {
2422
- x: r,
2423
- y: -s + o
2424
- },
2425
- {
2426
- x: 0,
2427
- y: -s + o
2428
- },
2429
- {
2430
- x: l / 2,
2431
- y: -s
2432
- },
2433
- {
2434
- x: l,
2435
- y: -s + o
2436
- },
2437
- {
2438
- x: l - r,
2439
- y: -s + o
2440
- },
2441
- {
2442
- x: l - r,
2443
- y: -o
2444
- }
2445
- ] : i.has("down") ? [
2446
- {
2447
- x: l / 2,
2448
- y: 0
2449
- },
2450
- {
2451
- x: 0,
2452
- y: -o
2453
- },
2454
- {
2455
- x: r,
2456
- y: -o
2457
- },
2458
- {
2459
- x: r,
2460
- y: -s + o
2461
- },
2462
- {
2463
- x: l - r,
2464
- y: -s + o
2465
- },
2466
- {
2467
- x: l - r,
2468
- y: -o
2469
- },
2470
- {
2471
- x: l,
2472
- y: -o
2473
- }
2474
- ] : [{
2475
- x: 0,
2476
- y: 0
2477
- }];
2478
- }, "getArrowPoints");
2479
- function ae(e, t) {
2480
- return e.intersect(t);
2481
- }
2482
- h(ae, "intersectNode");
2483
- var Nr = ae;
2484
- function ie(e, t, a, n) {
2485
- var i = e.x, s = e.y, r = i - n.x, l = s - n.y, o = Math.sqrt(t * t * l * l + a * a * r * r), y = Math.abs(t * a * r / o);
2486
- n.x < i && (y = -y);
2487
- var g = Math.abs(t * a * l / o);
2488
- return n.y < s && (g = -g), {
2489
- x: i + y,
2490
- y: s + g
2491
- };
2492
- }
2493
- h(ie, "intersectEllipse");
2494
- var se = ie;
2495
- function ne(e, t, a) {
2496
- return se(e, t, t, a);
2497
- }
2498
- h(ne, "intersectCircle");
2499
- var Tr = ne;
2500
- function le(e, t, a, n) {
2501
- var i = t.y - e.y, s, r = e.x - t.x, l, o = t.x * e.y - e.x * t.y, y, g, x, m = i * a.x + r * a.y + o, w = i * n.x + r * n.y + o, b, E, _, N, d;
2502
- if (!(m !== 0 && w !== 0 && Et(m, w)) && (s = n.y - a.y, l = a.x - n.x, y = n.x * a.y - a.x * n.y, g = s * e.x + l * e.y + y, x = s * t.x + l * t.y + y, !(g !== 0 && x !== 0 && Et(g, x)) && (b = i * l - s * r, b !== 0))) return E = Math.abs(b / 2), _ = r * y - l * o, N = _ < 0 ? (_ - E) / b : (_ + E) / b, _ = s * o - i * y, d = _ < 0 ? (_ - E) / b : (_ + E) / b, {
2503
- x: N,
2504
- y: d
2505
- };
2506
- }
2507
- h(le, "intersectLine");
2508
- function Et(e, t) {
2509
- return e * t > 0;
2510
- }
2511
- h(Et, "sameSign");
2512
- var Ir = le, Or = oe;
2513
- function oe(e, t, a) {
2514
- var n = e.x, i = e.y, s = [], r = 1 / 0, l = 1 / 0;
2515
- typeof t.forEach == "function" ? t.forEach(function(b) {
2516
- r = Math.min(r, b.x), l = Math.min(l, b.y);
2517
- }) : (r = Math.min(r, t.x), l = Math.min(l, t.y));
2518
- for (var o = n - e.width / 2 - r, y = i - e.height / 2 - l, g = 0; g < t.length; g++) {
2519
- var x = t[g], m = t[g < t.length - 1 ? g + 1 : 0], w = Ir(e, a, {
2520
- x: o + x.x,
2521
- y: y + x.y
2522
- }, {
2523
- x: o + m.x,
2524
- y: y + m.y
2525
- });
2526
- w && s.push(w);
2527
- }
2528
- return s.length ? (s.length > 1 && s.sort(function(b, E) {
2529
- var _ = b.x - a.x, N = b.y - a.y, d = Math.sqrt(_ * _ + N * N), p = E.x - a.x, L = E.y - a.y, f = Math.sqrt(p * p + L * L);
2530
- return d < f ? -1 : d === f ? 0 : 1;
2531
- }), s[0]) : e;
2532
- }
2533
- h(oe, "intersectPolygon");
2534
- var O = {
2535
- node: Nr,
2536
- circle: Tr,
2537
- ellipse: se,
2538
- polygon: Or,
2539
- rect: /* @__PURE__ */ h((e, t) => {
2540
- var a = e.x, n = e.y, i = t.x - a, s = t.y - n, r = e.width / 2, l = e.height / 2, o, y;
2541
- return Math.abs(s) * r > Math.abs(i) * l ? (s < 0 && (l = -l), o = s === 0 ? 0 : l * i / s, y = l) : (i < 0 && (r = -r), o = r, y = i === 0 ? 0 : r * s / i), {
2542
- x: a + o,
2543
- y: n + y
2544
- };
2545
- }, "intersectRect")
2546
- }, A = /* @__PURE__ */ h(async (e, t, a, n) => {
2547
- let i = z(), s, r = t.useHtmlLabels || Y(i);
2548
- s = a || "node default";
2549
- let l = e.insert("g").attr("class", s).attr("id", t.domId || t.id), o = l.insert("g").attr("class", "label").attr("style", t.labelStyle), y;
2550
- y = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
2551
- let g;
2552
- g = t.labelType === "markdown" ? $t(o, Ct(Rt(y), i), {
2553
- useHtmlLabels: r,
2554
- width: t.width || i.flowchart.wrappingWidth,
2555
- classes: "markdown-node-label"
2556
- }, i) : await U(o, Ct(Rt(y), i), t.labelStyle, !1, n);
2557
- let x = g.getBBox(), m = t.padding / 2;
2558
- if (Y(i)) {
2559
- let w = g.children[0], b = B(g);
2560
- await Ge(w, y), x = w.getBoundingClientRect(), b.attr("width", x.width), b.attr("height", x.height);
2561
- }
2562
- return r ? o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")") : o.attr("transform", "translate(0, " + -x.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), o.insert("rect", ":first-child"), {
2563
- shapeSvg: l,
2564
- bbox: x,
2565
- halfPadding: m,
2566
- label: o
2567
- };
2568
- }, "labelHelper"), C = /* @__PURE__ */ h((e, t) => {
2569
- let a = t.node().getBBox();
2570
- e.width = a.width, e.height = a.height;
2571
- }, "updateNodeBounds");
2572
- function q(e, t, a, n) {
2573
- return e.insert("polygon", ":first-child").attr("points", n.map(function(i) {
2574
- return i.x + "," + i.y;
2575
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
2576
- }
2577
- h(q, "insertPolygonShape");
2578
- var Br = /* @__PURE__ */ h(async (e, t) => {
2579
- t.useHtmlLabels || Y(z()) || (t.centerLabel = !0);
2580
- let { shapeSvg: a, bbox: n, halfPadding: i } = await A(e, t, "node " + t.classes, !0);
2581
- k.info("Classes = ", t.classes);
2582
- let s = a.insert("rect", ":first-child");
2583
- return s.attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - i).attr("y", -n.height / 2 - i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), C(t, s), t.intersect = function(r) {
2584
- return O.rect(t, r);
2585
- }, a;
2586
- }, "note"), Wt = /* @__PURE__ */ h((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ h((e, t) => `${t || "node default"}${Wt(e.classes)} ${Wt(e.class)}`, "getClassesFromNode"), Xt = /* @__PURE__ */ h(async (e, t) => {
2587
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding + (n.height + t.padding), s = [
2588
- {
2589
- x: i / 2,
2590
- y: 0
2591
- },
2592
- {
2593
- x: i,
2594
- y: -i / 2
2595
- },
2596
- {
2597
- x: i / 2,
2598
- y: -i
2599
- },
2600
- {
2601
- x: 0,
2602
- y: -i / 2
2603
- }
2604
- ];
2605
- k.info("Question main (Circle)");
2606
- let r = q(a, i, i, s);
2607
- return r.attr("style", t.style), C(t, r), t.intersect = function(l) {
2608
- return k.warn("Intersect called"), O.polygon(t, s, l);
2609
- }, a;
2610
- }, "question"), Cr = /* @__PURE__ */ h((e, t) => {
2611
- let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2612
- return a.insert("polygon", ":first-child").attr("points", [
2613
- {
2614
- x: 0,
2615
- y: 28 / 2
2616
- },
2617
- {
2618
- x: 28 / 2,
2619
- y: 0
2620
- },
2621
- {
2622
- x: 0,
2623
- y: -28 / 2
2624
- },
2625
- {
2626
- x: -28 / 2,
2627
- y: 0
2628
- }
2629
- ].map(function(n) {
2630
- return n.x + "," + n.y;
2631
- }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(n) {
2632
- return O.circle(t, 14, n);
2633
- }, a;
2634
- }, "choice"), Rr = /* @__PURE__ */ h(async (e, t) => {
2635
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = t.positioned ? t.height : n.height + t.padding, s = i / 4, r = t.positioned ? t.width : n.width + 2 * s + t.padding, l = [
2636
- {
2637
- x: s,
2638
- y: 0
2639
- },
2640
- {
2641
- x: r - s,
2642
- y: 0
2643
- },
2644
- {
2645
- x: r,
2646
- y: -i / 2
2647
- },
2648
- {
2649
- x: r - s,
2650
- y: -i
2651
- },
2652
- {
2653
- x: s,
2654
- y: -i
2655
- },
2656
- {
2657
- x: 0,
2658
- y: -i / 2
2659
- }
2660
- ], o = q(a, r, i, l);
2661
- return o.attr("style", t.style), C(t, o), t.intersect = function(y) {
2662
- return O.polygon(t, l, y);
2663
- }, a;
2664
- }, "hexagon"), zr = /* @__PURE__ */ h(async (e, t) => {
2665
- let { shapeSvg: a, bbox: n } = await A(e, t, void 0, !0), i = n.height + 2 * t.padding, s = i / 2, r = n.width + 2 * s + t.padding, l = t.positioned && (t.widthInColumns ?? 1) > 1 && t.width > r ? t.width : r, o = vr(t.directions, n, t, l), y = q(a, l, i, o);
2666
- return y.attr("style", t.style), C(t, y), t.intersect = function(g) {
2667
- return O.polygon(t, o, g);
2668
- }, a;
2669
- }, "block_arrow"), Ar = /* @__PURE__ */ h(async (e, t) => {
2670
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2671
- {
2672
- x: -s / 2,
2673
- y: 0
2674
- },
2675
- {
2676
- x: i,
2677
- y: 0
2678
- },
2679
- {
2680
- x: i,
2681
- y: -s
2682
- },
2683
- {
2684
- x: -s / 2,
2685
- y: -s
2686
- },
2687
- {
2688
- x: 0,
2689
- y: -s / 2
2690
- }
2691
- ];
2692
- return q(a, i, s, r).attr("style", t.style), t.width = i + s, t.height = s, t.intersect = function(l) {
2693
- return O.polygon(t, r, l);
2694
- }, a;
2695
- }, "rect_left_inv_arrow"), Mr = /* @__PURE__ */ h(async (e, t) => {
2696
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2697
- {
2698
- x: -2 * s / 6,
2699
- y: 0
2700
- },
2701
- {
2702
- x: i - s / 6,
2703
- y: 0
2704
- },
2705
- {
2706
- x: i + 2 * s / 6,
2707
- y: -s
2708
- },
2709
- {
2710
- x: s / 6,
2711
- y: -s
2712
- }
2713
- ], l = q(a, i, s, r);
2714
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2715
- return O.polygon(t, r, o);
2716
- }, a;
2717
- }, "lean_right"), Pr = /* @__PURE__ */ h(async (e, t) => {
2718
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2719
- {
2720
- x: 2 * s / 6,
2721
- y: 0
2722
- },
2723
- {
2724
- x: i + s / 6,
2725
- y: 0
2726
- },
2727
- {
2728
- x: i - 2 * s / 6,
2729
- y: -s
2730
- },
2731
- {
2732
- x: -s / 6,
2733
- y: -s
2734
- }
2735
- ], l = q(a, i, s, r);
2736
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2737
- return O.polygon(t, r, o);
2738
- }, a;
2739
- }, "lean_left"), Yr = /* @__PURE__ */ h(async (e, t) => {
2740
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2741
- {
2742
- x: -2 * s / 6,
2743
- y: 0
2744
- },
2745
- {
2746
- x: i + 2 * s / 6,
2747
- y: 0
2748
- },
2749
- {
2750
- x: i - s / 6,
2751
- y: -s
2752
- },
2753
- {
2754
- x: s / 6,
2755
- y: -s
2756
- }
2757
- ], l = q(a, i, s, r);
2758
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2759
- return O.polygon(t, r, o);
2760
- }, a;
2761
- }, "trapezoid"), Wr = /* @__PURE__ */ h(async (e, t) => {
2762
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2763
- {
2764
- x: s / 6,
2765
- y: 0
2766
- },
2767
- {
2768
- x: i - s / 6,
2769
- y: 0
2770
- },
2771
- {
2772
- x: i + 2 * s / 6,
2773
- y: -s
2774
- },
2775
- {
2776
- x: -2 * s / 6,
2777
- y: -s
2778
- }
2779
- ], l = q(a, i, s, r);
2780
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2781
- return O.polygon(t, r, o);
2782
- }, a;
2783
- }, "inv_trapezoid"), Xr = /* @__PURE__ */ h(async (e, t) => {
2784
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2785
- {
2786
- x: 0,
2787
- y: 0
2788
- },
2789
- {
2790
- x: i + s / 2,
2791
- y: 0
2792
- },
2793
- {
2794
- x: i,
2795
- y: -s / 2
2796
- },
2797
- {
2798
- x: i + s / 2,
2799
- y: -s
2800
- },
2801
- {
2802
- x: 0,
2803
- y: -s
2804
- }
2805
- ], l = q(a, i, s, r);
2806
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2807
- return O.polygon(t, r, o);
2808
- }, a;
2809
- }, "rect_right_inv_arrow"), Fr = /* @__PURE__ */ h(async (e, t) => {
2810
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = i / 2, r = s / (2.5 + i / 50), l = n.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + i + " 0 a " + s + "," + r + " 0,0,0 " + -i + " 0 l 0," + l + " a " + s + "," + r + " 0,0,0 " + i + " 0 l 0," + -l;
2811
- return C(t, a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + r) + ")")), t.intersect = function(y) {
2812
- let g = O.rect(t, y), x = g.x - t.x;
2813
- if (s != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(g.y - t.y) > t.height / 2 - r)) {
2814
- let m = r * r * (1 - x * x / (s * s));
2815
- m != 0 && (m = Math.sqrt(m)), m = r - m, y.y - t.y > 0 && (m = -m), g.y += m;
2816
- }
2817
- return g;
2818
- }, a;
2819
- }, "cylinder"), jr = /* @__PURE__ */ h(async (e, t) => {
2820
- let { shapeSvg: a, bbox: n, halfPadding: i } = await A(e, t, "node " + t.classes + " " + t.class, !0), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, o = t.positioned ? -r / 2 : -n.width / 2 - i, y = t.positioned ? -l / 2 : -n.height / 2 - i;
2821
- if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", y).attr("width", r).attr("height", l), t.props) {
2822
- let g = new Set(Object.keys(t.props));
2823
- t.props.borders && (gt(s, t.props.borders, r, l), g.delete("borders")), g.forEach((x) => {
2824
- k.warn(`Unknown node property ${x}`);
2825
- });
2826
- }
2827
- return C(t, s), t.intersect = function(g) {
2828
- return O.rect(t, g);
2829
- }, a;
2830
- }, "rect"), Hr = /* @__PURE__ */ h(async (e, t) => {
2831
- let { shapeSvg: a, bbox: n, halfPadding: i } = await A(e, t, "node " + t.classes, !0), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, o = t.positioned ? -r / 2 : -n.width / 2 - i, y = t.positioned ? -l / 2 : -n.height / 2 - i;
2832
- if (s.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", y).attr("width", r).attr("height", l), t.props) {
2833
- let g = new Set(Object.keys(t.props));
2834
- t.props.borders && (gt(s, t.props.borders, r, l), g.delete("borders")), g.forEach((x) => {
2835
- k.warn(`Unknown node property ${x}`);
2836
- });
2837
- }
2838
- return C(t, s), t.intersect = function(g) {
2839
- return O.rect(t, g);
2840
- }, a;
2841
- }, "composite"), Kr = /* @__PURE__ */ h(async (e, t) => {
2842
- let { shapeSvg: a } = await A(e, t, "label", !0);
2843
- k.trace("Classes = ", t.class);
2844
- let n = a.insert("rect", ":first-child");
2845
- if (n.attr("width", 0).attr("height", 0), a.attr("class", "label edgeLabel"), t.props) {
2846
- let i = new Set(Object.keys(t.props));
2847
- t.props.borders && (gt(n, t.props.borders, 0, 0), i.delete("borders")), i.forEach((s) => {
2848
- k.warn(`Unknown node property ${s}`);
2849
- });
2850
- }
2851
- return C(t, n), t.intersect = function(i) {
2852
- return O.rect(t, i);
2853
- }, a;
2854
- }, "labelRect");
2855
- function gt(e, t, a, n) {
2856
- let i = [], s = /* @__PURE__ */ h((l) => {
2857
- i.push(l, 0);
2858
- }, "addBorder"), r = /* @__PURE__ */ h((l) => {
2859
- i.push(0, l);
2860
- }, "skipBorder");
2861
- t.includes("t") ? (k.debug("add top border"), s(a)) : r(a), t.includes("r") ? (k.debug("add right border"), s(n)) : r(n), t.includes("b") ? (k.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (k.debug("add left border"), s(n)) : r(n), e.attr("stroke-dasharray", i.join(" "));
2862
- }
2863
- h(gt, "applyNodePropertyBorders");
2864
- var Ur = /* @__PURE__ */ h(async (e, t) => {
2865
- let a;
2866
- a = t.classes ? "node " + t.classes : "node default";
2867
- let n = e.insert("g").attr("class", a).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), s = n.insert("line"), r = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText, o = "";
2868
- o = typeof l == "object" ? l[0] : l, k.info("Label text abc79", o, l, typeof l == "object");
2869
- let y = await U(r, o, t.labelStyle, !0, !0), g = {
2870
- width: 0,
2871
- height: 0
2872
- };
2873
- if (Y(z())) {
2874
- let E = y.children[0], _ = B(y);
2875
- g = E.getBoundingClientRect(), _.attr("width", g.width), _.attr("height", g.height);
2876
- }
2877
- k.info("Text 2", l);
2878
- let x = l.slice(1, l.length), m = y.getBBox(), w = await U(r, x.join ? x.join("<br/>") : x, t.labelStyle, !0, !0);
2879
- if (Y(z())) {
2880
- let E = w.children[0], _ = B(w);
2881
- g = E.getBoundingClientRect(), _.attr("width", g.width), _.attr("height", g.height);
2882
- }
2883
- let b = t.padding / 2;
2884
- return B(w).attr("transform", "translate( " + (g.width > m.width ? 0 : (m.width - g.width) / 2) + ", " + (m.height + b + 5) + ")"), B(y).attr("transform", "translate( " + (g.width < m.width ? 0 : -(m.width - g.width) / 2) + ", 0)"), g = r.node().getBBox(), r.attr("transform", "translate(" + -g.width / 2 + ", " + (-g.height / 2 - b + 3) + ")"), i.attr("class", "outer title-state").attr("x", -g.width / 2 - b).attr("y", -g.height / 2 - b).attr("width", g.width + t.padding).attr("height", g.height + t.padding), s.attr("class", "divider").attr("x1", -g.width / 2 - b).attr("x2", g.width / 2 + b).attr("y1", -g.height / 2 - b + m.height + b).attr("y2", -g.height / 2 - b + m.height + b), C(t, i), t.intersect = function(E) {
2885
- return O.rect(t, E);
2886
- }, n;
2887
- }, "rectWithTitle"), qr = /* @__PURE__ */ h(async (e, t) => {
2888
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.height + t.padding, s = n.width + i / 4 + t.padding;
2889
- return C(t, a.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -s / 2).attr("y", -i / 2).attr("width", s).attr("height", i)), t.intersect = function(r) {
2890
- return O.rect(t, r);
2891
- }, a;
2892
- }, "stadium"), Zr = /* @__PURE__ */ h(async (e, t) => {
2893
- let { shapeSvg: a, bbox: n, halfPadding: i } = await A(e, t, X(t, void 0), !0), s = a.insert("circle", ":first-child");
2894
- return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), k.info("Circle main"), C(t, s), t.intersect = function(r) {
2895
- return k.info("Circle intersect", t, n.width / 2 + i, r), O.circle(t, n.width / 2 + i, r);
2896
- }, a;
2897
- }, "circle"), Gr = /* @__PURE__ */ h(async (e, t) => {
2898
- let { shapeSvg: a, bbox: n, halfPadding: i } = await A(e, t, X(t, void 0), !0), s = a.insert("g", ":first-child"), r = s.insert("circle"), l = s.insert("circle");
2899
- return s.attr("class", t.class), r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + 5).attr("width", n.width + t.padding + 10).attr("height", n.height + t.padding + 10), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), k.info("DoubleCircle main"), C(t, r), t.intersect = function(o) {
2900
- return k.info("DoubleCircle intersect", t, n.width / 2 + i + 5, o), O.circle(t, n.width / 2 + i + 5, o);
2901
- }, a;
2902
- }, "doublecircle"), Jr = /* @__PURE__ */ h(async (e, t) => {
2903
- let { shapeSvg: a, bbox: n } = await A(e, t, X(t, void 0), !0), i = n.width + t.padding, s = n.height + t.padding, r = [
2904
- {
2905
- x: 0,
2906
- y: 0
2907
- },
2908
- {
2909
- x: i,
2910
- y: 0
2911
- },
2912
- {
2913
- x: i,
2914
- y: -s
2915
- },
2916
- {
2917
- x: 0,
2918
- y: -s
2919
- },
2920
- {
2921
- x: 0,
2922
- y: 0
2923
- },
2924
- {
2925
- x: -8,
2926
- y: 0
2927
- },
2928
- {
2929
- x: i + 8,
2930
- y: 0
2931
- },
2932
- {
2933
- x: i + 8,
2934
- y: -s
2935
- },
2936
- {
2937
- x: -8,
2938
- y: -s
2939
- },
2940
- {
2941
- x: -8,
2942
- y: 0
2943
- }
2944
- ], l = q(a, i, s, r);
2945
- return l.attr("style", t.style), C(t, l), t.intersect = function(o) {
2946
- return O.polygon(t, r, o);
2947
- }, a;
2948
- }, "subroutine"), Vr = /* @__PURE__ */ h((e, t) => {
2949
- let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child");
2950
- return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), C(t, n), t.intersect = function(i) {
2951
- return O.circle(t, 7, i);
2952
- }, a;
2953
- }, "start"), Ft = /* @__PURE__ */ h((e, t, a) => {
2954
- let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, s = 10;
2955
- return a === "LR" && (i = 10, s = 70), C(t, n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * s / 2).attr("width", i).attr("height", s).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(r) {
2956
- return O.rect(t, r);
2957
- }, n;
2958
- }, "forkJoin"), jt = {
2959
- rhombus: Xt,
2960
- composite: Hr,
2961
- question: Xt,
2962
- rect: jr,
2963
- labelRect: Kr,
2964
- rectWithTitle: Ur,
2965
- choice: Cr,
2966
- circle: Zr,
2967
- doublecircle: Gr,
2968
- stadium: qr,
2969
- hexagon: Rr,
2970
- block_arrow: zr,
2971
- rect_left_inv_arrow: Ar,
2972
- lean_right: Mr,
2973
- lean_left: Pr,
2974
- trapezoid: Yr,
2975
- inv_trapezoid: Wr,
2976
- rect_right_inv_arrow: Xr,
2977
- cylinder: Fr,
2978
- start: Vr,
2979
- end: /* @__PURE__ */ h((e, t) => {
2980
- let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child"), i = a.insert("circle", ":first-child");
2981
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), C(t, i), t.intersect = function(s) {
2982
- return O.circle(t, 7, s);
2983
- }, a;
2984
- }, "end"),
2985
- note: Br,
2986
- subroutine: Jr,
2987
- fork: Ft,
2988
- join: Ft,
2989
- class_box: /* @__PURE__ */ h(async (e, t) => {
2990
- var f;
2991
- let a = t.padding / 2, n;
2992
- n = t.classes ? "node " + t.classes : "node default";
2993
- let i = e.insert("g").attr("class", n).attr("id", t.domId || t.id), s = i.insert("rect", ":first-child"), r = i.insert("line"), l = i.insert("line"), o = 0, y = 4, g = i.insert("g").attr("class", "label"), x = 0, m = (f = t.classData.annotations) == null ? void 0 : f[0], w = await U(g, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), b = w.getBBox();
2994
- if (Y(z())) {
2995
- let S = w.children[0], c = B(w);
2996
- b = S.getBoundingClientRect(), c.attr("width", b.width), c.attr("height", b.height);
2997
- }
2998
- t.classData.annotations[0] && (y += b.height + 4, o += b.width);
2999
- let E = t.classData.label;
3000
- t.classData.type !== void 0 && t.classData.type !== "" && (Y(z()) ? E += "&lt;" + t.classData.type + "&gt;" : E += "<" + t.classData.type + ">");
3001
- let _ = await U(g, E, t.labelStyle, !0, !0);
3002
- B(_).attr("class", "classTitle");
3003
- let N = _.getBBox();
3004
- if (Y(z())) {
3005
- let S = _.children[0], c = B(_);
3006
- N = S.getBoundingClientRect(), c.attr("width", N.width), c.attr("height", N.height);
3007
- }
3008
- y += N.height + 4, N.width > o && (o = N.width);
3009
- let d = [];
3010
- t.classData.members.forEach(async (S) => {
3011
- let c = S.getDisplayDetails(), D = c.displayText;
3012
- Y(z()) && (D = D.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
3013
- let u = await U(g, D, c.cssStyle ? c.cssStyle : t.labelStyle, !0, !0), v = u.getBBox();
3014
- if (Y(z())) {
3015
- let $ = u.children[0], T = B(u);
3016
- v = $.getBoundingClientRect(), T.attr("width", v.width), T.attr("height", v.height);
3017
- }
3018
- v.width > o && (o = v.width), y += v.height + 4, d.push(u);
3019
- }), y += 8;
3020
- let p = [];
3021
- if (t.classData.methods.forEach(async (S) => {
3022
- let c = S.getDisplayDetails(), D = c.displayText;
3023
- Y(z()) && (D = D.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
3024
- let u = await U(g, D, c.cssStyle ? c.cssStyle : t.labelStyle, !0, !0), v = u.getBBox();
3025
- if (Y(z())) {
3026
- let $ = u.children[0], T = B(u);
3027
- v = $.getBoundingClientRect(), T.attr("width", v.width), T.attr("height", v.height);
3028
- }
3029
- v.width > o && (o = v.width), y += v.height + 4, p.push(u);
3030
- }), y += 8, m) {
3031
- let S = (o - b.width) / 2;
3032
- B(w).attr("transform", "translate( " + (-1 * o / 2 + S) + ", " + -1 * y / 2 + ")"), x = b.height + 4;
3033
- }
3034
- let L = (o - N.width) / 2;
3035
- return B(_).attr("transform", "translate( " + (-1 * o / 2 + L) + ", " + (-1 * y / 2 + x) + ")"), x += N.height + 4, r.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -y / 2 - a + 8 + x).attr("y2", -y / 2 - a + 8 + x), x += 8, d.forEach((S) => {
3036
- B(S).attr("transform", "translate( " + -o / 2 + ", " + (-1 * y / 2 + x + 8 / 2) + ")");
3037
- let c = S == null ? void 0 : S.getBBox();
3038
- x += ((c == null ? void 0 : c.height) ?? 0) + 4;
3039
- }), x += 8, l.attr("class", "divider").attr("x1", -o / 2 - a).attr("x2", o / 2 + a).attr("y1", -y / 2 - a + 8 + x).attr("y2", -y / 2 - a + 8 + x), x += 8, p.forEach((S) => {
3040
- B(S).attr("transform", "translate( " + -o / 2 + ", " + (-1 * y / 2 + x) + ")");
3041
- let c = S == null ? void 0 : S.getBBox();
3042
- x += ((c == null ? void 0 : c.height) ?? 0) + 4;
3043
- }), s.attr("style", t.style).attr("class", "outer title-state").attr("x", -o / 2 - a).attr("y", -(y / 2) - a).attr("width", o + t.padding).attr("height", y + t.padding), C(t, s), t.intersect = function(S) {
3044
- return O.rect(t, S);
3045
- }, i;
3046
- }, "class_box")
3047
- }, ct = {}, ce = /* @__PURE__ */ h(async (e, t, a) => {
3048
- let n, i;
3049
- if (t.link) {
3050
- let s;
3051
- z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), i = await jt[t.shape](n, t, a);
3052
- } else i = await jt[t.shape](e, t, a), n = i;
3053
- return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), ct[t.id] = n, t.haveCallback && ct[t.id].attr("class", ct[t.id].attr("class") + " clickable"), n;
3054
- }, "insertNode"), Qr = /* @__PURE__ */ h((e) => {
3055
- let t = ct[e.id];
3056
- k.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3057
- let a = e.diff || 0;
3058
- return e.clusterNode ? t.attr("transform", "translate(" + (e.x + a - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), a;
3059
- }, "positionNode");
3060
- function Tt(e, t, a = !1) {
3061
- var m, w, b;
3062
- let n = e, i = "default";
3063
- (((m = n == null ? void 0 : n.classes) == null ? void 0 : m.length) || 0) > 0 && (i = ((n == null ? void 0 : n.classes) ?? []).join(" ")), i += " flowchart-label";
3064
- let s = 0, r = "", l;
3065
- switch (n.type) {
3066
- case "round":
3067
- s = 5, r = "rect";
3068
- break;
3069
- case "composite":
3070
- s = 0, r = "composite", l = 0;
3071
- break;
3072
- case "square":
3073
- r = "rect";
3074
- break;
3075
- case "diamond":
3076
- r = "question";
3077
- break;
3078
- case "hexagon":
3079
- r = "hexagon";
3080
- break;
3081
- case "block_arrow":
3082
- r = "block_arrow";
3083
- break;
3084
- case "odd":
3085
- r = "rect_left_inv_arrow";
3086
- break;
3087
- case "lean_right":
3088
- r = "lean_right";
3089
- break;
3090
- case "lean_left":
3091
- r = "lean_left";
3092
- break;
3093
- case "trapezoid":
3094
- r = "trapezoid";
3095
- break;
3096
- case "inv_trapezoid":
3097
- r = "inv_trapezoid";
3098
- break;
3099
- case "rect_left_inv_arrow":
3100
- r = "rect_left_inv_arrow";
3101
- break;
3102
- case "circle":
3103
- r = "circle";
3104
- break;
3105
- case "ellipse":
3106
- r = "ellipse";
3107
- break;
3108
- case "stadium":
3109
- r = "stadium";
3110
- break;
3111
- case "subroutine":
3112
- r = "subroutine";
3113
- break;
3114
- case "cylinder":
3115
- r = "cylinder";
3116
- break;
3117
- case "group":
3118
- r = "rect";
3119
- break;
3120
- case "doublecircle":
3121
- r = "doublecircle";
3122
- break;
3123
- default:
3124
- r = "rect";
3125
- }
3126
- let o = Ze((n == null ? void 0 : n.styles) ?? []), y = n.label, g = n.size ?? {
3127
- width: 0,
3128
- height: 0,
3129
- x: 0,
3130
- y: 0
3131
- }, x = t.getDiagramId();
3132
- return {
3133
- labelStyle: o.labelStyle,
3134
- shape: r,
3135
- labelText: y,
3136
- rx: s,
3137
- ry: s,
3138
- class: i,
3139
- style: o.style,
3140
- id: n.id,
3141
- domId: x ? `${x}-${n.id}` : n.id,
3142
- directions: n.directions,
3143
- width: g.width,
3144
- height: g.height,
3145
- x: g.x,
3146
- y: g.y,
3147
- positioned: a,
3148
- intersect: void 0,
3149
- type: n.type,
3150
- padding: l ?? ((b = (w = nt()) == null ? void 0 : w.block) == null ? void 0 : b.padding) ?? 0,
3151
- widthInColumns: n.widthInColumns ?? 1
3152
- };
3153
- }
3154
- h(Tt, "getNodeFromBlock");
3155
- async function de(e, t, a) {
3156
- let n = Tt(t, a, !1);
3157
- if (n.type === "group") return;
3158
- let i = await ce(e, n, { config: nt() }), s = i.node().getBBox(), r = a.getBlock(n.id);
3159
- r.size = {
3160
- width: s.width,
3161
- height: s.height,
3162
- x: 0,
3163
- y: 0,
3164
- node: i
3165
- }, a.setBlock(r), i.remove();
3166
- }
3167
- h(de, "calculateBlockSize");
3168
- async function he(e, t, a) {
3169
- let n = Tt(t, a, !0);
3170
- a.getBlock(n.id).type !== "space" && (await ce(e, n, { config: nt() }), t.intersect = n == null ? void 0 : n.intersect, Qr(n));
3171
- }
3172
- h(he, "insertBlockPositioned");
3173
- async function ut(e, t, a, n) {
3174
- for (let i of t) await n(e, i, a), i.children && await ut(e, i.children, a, n);
3175
- }
3176
- h(ut, "performOperations");
3177
- async function ge(e, t, a) {
3178
- await ut(e, t, a, de);
3179
- }
3180
- h(ge, "calculateBlockSizes");
3181
- async function ue(e, t, a) {
3182
- await ut(e, t, a, he);
3183
- }
3184
- h(ue, "insertBlocks");
3185
- async function ye(e, t, a, n, i) {
3186
- let s = new Qe({
3187
- multigraph: !0,
3188
- compound: !0
3189
- });
3190
- s.setGraph({
3191
- rankdir: "TB",
3192
- nodesep: 10,
3193
- ranksep: 10,
3194
- marginx: 8,
3195
- marginy: 8
3196
- });
3197
- for (let r of a) r.size && s.setNode(r.id, {
3198
- width: r.size.width,
3199
- height: r.size.height,
3200
- intersect: r.intersect
3201
- });
3202
- for (let r of t) if (r.start && r.end) {
3203
- let l = n.getBlock(r.start), o = n.getBlock(r.end);
3204
- if (l != null && l.size && (o != null && o.size)) {
3205
- let y = l.size, g = o.size, x = [
3206
- {
3207
- x: y.x,
3208
- y: y.y
3209
- },
3210
- {
3211
- x: y.x + (g.x - y.x) / 2,
3212
- y: y.y + (g.y - y.y) / 2
3213
- },
3214
- {
3215
- x: g.x,
3216
- y: g.y
3217
- }
3218
- ], m = i ? `${i}-${r.id}` : r.id, w = `${r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
3219
- $r(e, {
3220
- v: r.start,
3221
- w: r.end,
3222
- name: m
3223
- }, {
3224
- ...r,
3225
- id: m,
3226
- arrowTypeEnd: r.arrowTypeEnd,
3227
- arrowTypeStart: r.arrowTypeStart,
3228
- points: x,
3229
- classes: w
3230
- }, void 0, "block", s, i), r.label && (await kr(e, {
3231
- ...r,
3232
- label: r.label,
3233
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
3234
- arrowTypeEnd: r.arrowTypeEnd,
3235
- arrowTypeStart: r.arrowTypeStart,
3236
- points: x,
3237
- classes: w
3238
- }), Lr({
3239
- ...r,
3240
- x: x[1].x,
3241
- y: x[1].y
3242
- }, { originalPath: x }));
3243
- }
3244
- }
3245
- }
3246
- h(ye, "insertEdges");
3247
- var ia = {
3248
- parser: nr,
3249
- db: yr,
3250
- renderer: {
3251
- draw: /* @__PURE__ */ h(async function(e, t, a, n) {
3252
- let { securityLevel: i, block: s } = nt(), r = n.db;
3253
- r.setDiagramId(t);
3254
- let l;
3255
- i === "sandbox" && (l = B("#i" + t));
3256
- let o = B(i === "sandbox" ? l.nodes()[0].contentDocument.body : "body"), y = i === "sandbox" ? o.select(`[id="${t}"]`) : B(`[id="${t}"]`);
3257
- fr(y, [
3258
- "point",
3259
- "circle",
3260
- "cross"
3261
- ], n.type, t);
3262
- let g = r.getBlocks(), x = r.getBlocksFlat(), m = r.getEdges(), w = y.insert("g").attr("class", "block");
3263
- await ge(w, g, r);
3264
- let b = re(r);
3265
- if (await ue(w, g, r), await ye(w, m, x, r, t), b) {
3266
- let E = b, _ = Math.max(1, Math.round(0.125 * (E.width / E.height))), N = E.height + _ + 10, d = E.width + 10, { useMaxWidth: p } = s;
3267
- xe(y, N, d, !!p), k.debug("Here Bounds", b, E), y.attr("viewBox", `${E.x - 5} ${E.y - 5} ${E.width + 10} ${E.height + 10}`);
3268
- }
3269
- }, "draw"),
3270
- getClasses: /* @__PURE__ */ h(function(e, t) {
3271
- return t.db.getClasses();
3272
- }, "getClasses")
3273
- },
3274
- styles: pr
3275
- };
3276
- export {
3277
- ia as diagram
3278
- };