@foris/ai-agent 0.7.0 → 0.7.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/_baseUniq-Bo-J_G8t.js +479 -0
  2. package/dist/ai-agent.es.js +1 -1
  3. package/dist/ai-agent.umd.js +504 -504
  4. package/dist/ai-chat-panel/ChatPanel.d.ts +3 -2
  5. package/dist/{arc-D25sVj89.js → arc-D6vW-5z7.js} +1 -1
  6. package/dist/architecture-U656AL7Q-CPDaOg6H.js +11 -0
  7. package/dist/{architectureDiagram-VXUJARFQ-Cgk-YoAJ.js → architectureDiagram-VXUJARFQ-aNTRrbg8.js} +8 -6
  8. package/dist/{blockDiagram-VD42YOAC-DEl6OtG0.js → blockDiagram-VD42YOAC-D__rdg-y.js} +801 -937
  9. package/dist/{c4Diagram-YG6GDRKO-C_brDMc_.js → c4Diagram-YG6GDRKO-Ad-zGtIo.js} +3 -3
  10. package/dist/{channel-BP0bUxGp.js → channel-CJ6nZxxi.js} +1 -1
  11. package/dist/{chunk-4BX2VUAB-C5fELlqE.js → chunk-4BX2VUAB-sv6CSdNg.js} +1 -1
  12. package/dist/{chunk-55IACEB6-DaHkCIMI.js → chunk-55IACEB6-tWLXzb2x.js} +1 -1
  13. package/dist/{chunk-B4BG7PRW-C2Vtaq9f.js → chunk-B4BG7PRW-wp7Bc04i.js} +4 -4
  14. package/dist/{chunk-DI55MBZ5-DmM1ZmJ9.js → chunk-DI55MBZ5-BAXA-Ihc.js} +3 -3
  15. package/dist/{chunk-FMBD7UC4-MWLCTT_V.js → chunk-FMBD7UC4-CqgCvnFf.js} +1 -1
  16. package/dist/{chunk-QN33PNHL-BFfd-KsX.js → chunk-QN33PNHL-Xr4FEi7o.js} +1 -1
  17. package/dist/{chunk-QZHKN3VN-DvYwzcYM.js → chunk-QZHKN3VN-CW0xSatw.js} +1 -1
  18. package/dist/{chunk-TZMSLE5B-B_VLLszl.js → chunk-TZMSLE5B-CG4p6VwM.js} +1 -1
  19. package/dist/{classDiagram-2ON5EDUG-CEjscqbc.js → classDiagram-2ON5EDUG-BwMk_mJR.js} +6 -6
  20. package/dist/{classDiagram-v2-WZHVMYZB-CEjscqbc.js → classDiagram-v2-WZHVMYZB-BwMk_mJR.js} +6 -6
  21. package/dist/clone-42WwOfNY.js +8 -0
  22. package/dist/{code-block-QI2IAROF-MPMUtVbZ.js → code-block-QI2IAROF-Dmk5lA1i.js} +1 -1
  23. package/dist/{cose-bilkent-S5V4N54A-DNnmrjSK.js → cose-bilkent-S5V4N54A-CQVvTQey.js} +2 -2
  24. package/dist/{dagre-6UL2VRFP-c7TGz1C2.js → dagre-6UL2VRFP-CZLotLZh.js} +54 -55
  25. package/dist/{diagram-PSM6KHXK-CyVHRF5H.js → diagram-PSM6KHXK-99LoQEL6.js} +9 -7
  26. package/dist/{diagram-QEK2KX5R-BQj43c4D.js → diagram-QEK2KX5R-Bcf8pK3Z.js} +8 -6
  27. package/dist/{diagram-S2PKOQOG-Dp2Zxf6h.js → diagram-S2PKOQOG-Bc7Lic_C.js} +12 -10
  28. package/dist/{erDiagram-Q2GNP2WA-UU_sJ3Nk.js → erDiagram-Q2GNP2WA-Bdr3nWHa.js} +5 -5
  29. package/dist/{flowDiagram-NV44I4VS-DmHh0Mw6.js → flowDiagram-NV44I4VS-By1cH5Mx.js} +6 -6
  30. package/dist/{ganttDiagram-JELNMOA3-B2DD6FxH.js → ganttDiagram-JELNMOA3-DBUWvf88.js} +3 -3
  31. package/dist/gitGraph-F6HP7TQM-DyZaN85C.js +11 -0
  32. package/dist/{gitGraphDiagram-NY62KEGX-BIUvS6sD.js → gitGraphDiagram-NY62KEGX-D201ZDzD.js} +71 -69
  33. package/dist/graph-vxIytVZ1.js +381 -0
  34. package/dist/{index-DWpc-Mxs.js → index-2q9HQ6jv.js} +4157 -4170
  35. package/dist/info-NVLQJR56-Bk44kkrd.js +11 -0
  36. package/dist/infoDiagram-WHAUD3N6-CQvG7eEX.js +29 -0
  37. package/dist/{journeyDiagram-XKPGCS4Q-Dia_QTZe.js → journeyDiagram-XKPGCS4Q-BO4UASto.js} +5 -5
  38. package/dist/{kanban-definition-3W4ZIXB7-ClIKCv5J.js → kanban-definition-3W4ZIXB7-zTTXrQZo.js} +3 -3
  39. package/dist/layout-CFP0NQPV.js +1443 -0
  40. package/dist/{linear-ZyP8gWvJ.js → linear-DQjYFf2K.js} +25 -25
  41. package/dist/{mermaid-NA5CF7SZ-BbXrnAMx.js → mermaid-NA5CF7SZ-Dxy04QGl.js} +1 -1
  42. package/dist/{treemap-KMMF4GRG-D_L55G0b.js → mermaid-parser.core-3bjcG0rb.js} +5934 -5793
  43. package/dist/{mermaid.core-Ce2qm3MW.js → mermaid.core-D77TS0_l.js} +112 -88
  44. package/dist/min-D8aWZ538.js +38 -0
  45. package/dist/{mindmap-definition-VGOIOE7T-CUj7ttm7.js → mindmap-definition-VGOIOE7T-C4eFUgdU.js} +15 -15
  46. package/dist/packet-BFZMPI3H-BXyr1-Ur.js +11 -0
  47. package/dist/pie-7BOR55EZ-BdDEpKOx.js +11 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cagn8I7E.js +168 -0
  49. package/dist/{quadrantDiagram-AYHSOK5B-C4-Gx7bz.js → quadrantDiagram-AYHSOK5B-CBbS2k6R.js} +3 -3
  50. package/dist/radar-NHE76QYJ-rrlsBycr.js +11 -0
  51. package/dist/{requirementDiagram-UZGBJVZJ-Cr3_wZVs.js → requirementDiagram-UZGBJVZJ-BubvO9b2.js} +4 -4
  52. package/dist/{sankeyDiagram-TZEHDZUN-DqXQCv8A.js → sankeyDiagram-TZEHDZUN-2TYAQPq1.js} +2 -2
  53. package/dist/{sequenceDiagram-WL72ISMW-DFW243PP.js → sequenceDiagram-WL72ISMW-C5LXKyO6.js} +4 -4
  54. package/dist/{stateDiagram-FKZM4ZOC-C7xue1N-.js → stateDiagram-FKZM4ZOC-tqWNEvX8.js} +11 -9
  55. package/dist/{stateDiagram-v2-4FDKWEC3-CxbMhTx0.js → stateDiagram-v2-4FDKWEC3-DwNtkzmN.js} +5 -5
  56. package/dist/style.css +1 -1
  57. package/dist/{timeline-definition-IT6M3QCI-HXVoEY4s.js → timeline-definition-IT6M3QCI-DsDBzGHV.js} +3 -3
  58. package/dist/treemap-KMMF4GRG-BNrkQfZw.js +11 -0
  59. package/dist/{xychartDiagram-PRI3JC2R-7Isc60Pi.js → xychartDiagram-PRI3JC2R-C96721pe.js} +3 -3
  60. package/package.json +1 -1
  61. package/dist/graph-DB2UxkYH.js +0 -1190
  62. package/dist/infoDiagram-WHAUD3N6-Cz5rmERs.js +0 -27
  63. package/dist/layout-Q6wQN5dr.js +0 -1730
  64. package/dist/pieDiagram-ADFJNKIX-w5KEkOWO.js +0 -166
@@ -1,163 +1,27 @@
1
- import { g as Ce } from "./chunk-FMBD7UC4-MWLCTT_V.js";
2
- import { aG as Ie, aH as Be, aI as Oe, aJ as Jt, aK as Qt, aL as Rt, aM as Ae, aN as Re, aO as te, aP as Tt, aQ as gt, aR as ee, aS as ze, aT as Me, aU as je, aV as Fe, aW as Pe, aX as We, aY as Ye, _ as g, d as z, l as L, j as R, i as mt, aZ as Ke, G as it, a_ as Z, az as re, ar as Ue, u as rt, a$ as He, a9 as Xe, a4 as Ve, k as Ge, v as $e, B as Ze, aa as qe, b0 as Je, b1 as Lt, e as Qe } from "./mermaid.core-Ce2qm3MW.js";
3
- import { G as tr } from "./graph-DB2UxkYH.js";
4
- import { c as er } from "./channel-BP0bUxGp.js";
5
- import "./index-DWpc-Mxs.js";
1
+ import { g as de } from "./chunk-FMBD7UC4-CqgCvnFf.js";
2
+ import { _ as d, d as z, l as m, j as R, i as yt, ak as ge, G as st, al as Z, am as Ht, an as ue, u as et, ao as pe, a9 as fe, a4 as xe, k as ye, v as be, B as we, aa as me, ap as Le, aq as bt, e as Se } from "./mermaid.core-D77TS0_l.js";
3
+ import { c as ve } from "./clone-42WwOfNY.js";
4
+ import { G as Ee } from "./graph-vxIytVZ1.js";
5
+ import { c as _e } from "./channel-CJ6nZxxi.js";
6
+ import "./index-2q9HQ6jv.js";
6
7
  import "react";
7
8
  import "react-dom";
8
- function rr(e, t) {
9
- for (var a = -1, i = e == null ? 0 : e.length; ++a < i && t(e[a], a, e) !== !1; )
10
- ;
11
- return e;
12
- }
13
- function ae(e) {
14
- return Ie(e) ? Be(e) : Oe(e);
15
- }
16
- function ar(e, t) {
17
- return e && Jt(t, ae(t), e);
18
- }
19
- function sr(e, t) {
20
- for (var a = -1, i = e == null ? 0 : e.length, l = 0, s = []; ++a < i; ) {
21
- var r = e[a];
22
- t(r, a, e) && (s[l++] = r);
23
- }
24
- return s;
25
- }
26
- function ir() {
27
- return [];
28
- }
29
- var nr = Object.prototype, lr = nr.propertyIsEnumerable, zt = Object.getOwnPropertySymbols, se = zt ? function(e) {
30
- return e == null ? [] : (e = Object(e), sr(zt(e), function(t) {
31
- return lr.call(e, t);
32
- }));
33
- } : ir;
34
- function cr(e, t) {
35
- return Jt(e, se(e), t);
36
- }
37
- function or(e, t) {
38
- for (var a = -1, i = t.length, l = e.length; ++a < i; )
39
- e[l + a] = t[a];
40
- return e;
41
- }
42
- function hr(e, t, a) {
43
- var i = t(e);
44
- return Qt(e) ? i : or(i, a(e));
45
- }
46
- function gr(e) {
47
- return hr(e, ae, se);
48
- }
49
- var ur = Object.prototype, dr = ur.hasOwnProperty;
50
- function pr(e) {
51
- var t = e.length, a = new e.constructor(t);
52
- return t && typeof e[0] == "string" && dr.call(e, "index") && (a.index = e.index, a.input = e.input), a;
53
- }
54
- function fr(e, t) {
55
- var a = e.buffer;
56
- return new e.constructor(a, e.byteOffset, e.byteLength);
57
- }
58
- var yr = /\w*$/;
59
- function xr(e) {
60
- var t = new e.constructor(e.source, yr.exec(e));
61
- return t.lastIndex = e.lastIndex, t;
62
- }
63
- var Mt = Rt ? Rt.prototype : void 0, jt = Mt ? Mt.valueOf : void 0;
64
- function br(e) {
65
- return jt ? Object(jt.call(e)) : {};
66
- }
67
- var wr = "[object Boolean]", mr = "[object Date]", Lr = "[object Map]", Sr = "[object Number]", vr = "[object RegExp]", Er = "[object Set]", _r = "[object String]", kr = "[object Symbol]", Tr = "[object ArrayBuffer]", Dr = "[object DataView]", Nr = "[object Float32Array]", Cr = "[object Float64Array]", Ir = "[object Int8Array]", Br = "[object Int16Array]", Or = "[object Int32Array]", Ar = "[object Uint8Array]", Rr = "[object Uint8ClampedArray]", zr = "[object Uint16Array]", Mr = "[object Uint32Array]";
68
- function jr(e, t, a) {
69
- var i = e.constructor;
70
- switch (t) {
71
- case Tr:
72
- return Re(e);
73
- case wr:
74
- case mr:
75
- return new i(+e);
76
- case Dr:
77
- return fr(e);
78
- case Nr:
79
- case Cr:
80
- case Ir:
81
- case Br:
82
- case Or:
83
- case Ar:
84
- case Rr:
85
- case zr:
86
- case Mr:
87
- return Ae(e, a);
88
- case Lr:
89
- return new i();
90
- case Sr:
91
- case _r:
92
- return new i(e);
93
- case vr:
94
- return xr(e);
95
- case Er:
96
- return new i();
97
- case kr:
98
- return br(e);
99
- }
100
- }
101
- var Fr = "[object Map]";
102
- function Pr(e) {
103
- return te(e) && Tt(e) == Fr;
104
- }
105
- var Ft = gt && gt.isMap, Wr = Ft ? ee(Ft) : Pr, Yr = "[object Set]";
106
- function Kr(e) {
107
- return te(e) && Tt(e) == Yr;
108
- }
109
- var Pt = gt && gt.isSet, Ur = Pt ? ee(Pt) : Kr, Hr = 1, ie = "[object Arguments]", Xr = "[object Array]", Vr = "[object Boolean]", Gr = "[object Date]", $r = "[object Error]", ne = "[object Function]", Zr = "[object GeneratorFunction]", qr = "[object Map]", Jr = "[object Number]", le = "[object Object]", Qr = "[object RegExp]", ta = "[object Set]", ea = "[object String]", ra = "[object Symbol]", aa = "[object WeakMap]", sa = "[object ArrayBuffer]", ia = "[object DataView]", na = "[object Float32Array]", la = "[object Float64Array]", ca = "[object Int8Array]", oa = "[object Int16Array]", ha = "[object Int32Array]", ga = "[object Uint8Array]", ua = "[object Uint8ClampedArray]", da = "[object Uint16Array]", pa = "[object Uint32Array]", C = {};
110
- C[ie] = C[Xr] = C[sa] = C[ia] = C[Vr] = C[Gr] = C[na] = C[la] = C[ca] = C[oa] = C[ha] = C[qr] = C[Jr] = C[le] = C[Qr] = C[ta] = C[ea] = C[ra] = C[ga] = C[ua] = C[da] = C[pa] = !0;
111
- C[$r] = C[ne] = C[aa] = !1;
112
- function ot(e, t, a, i, l, s) {
113
- var r, n = t & Hr;
114
- if (r !== void 0)
115
- return r;
116
- if (!ze(e))
117
- return e;
118
- var o = Qt(e);
119
- if (o)
120
- return r = pr(e), Me(e, r);
121
- var d = Tt(e), h = d == ne || d == Zr;
122
- if (je(e))
123
- return Fe(e, n);
124
- if (d == le || d == ie || h && !l)
125
- return r = h ? {} : Pe(e), cr(e, ar(r, e));
126
- if (!C[d])
127
- return l ? e : {};
128
- r = jr(e, d, n), s || (s = new We());
129
- var x = s.get(e);
130
- if (x)
131
- return x;
132
- s.set(e, r), Ur(e) ? e.forEach(function(S) {
133
- r.add(ot(S, t, a, S, e, s));
134
- }) : Wr(e) && e.forEach(function(S, k) {
135
- r.set(k, ot(S, t, a, k, e, s));
136
- });
137
- var b = gr, m = o ? void 0 : b(e);
138
- return rr(m || e, function(S, k) {
139
- m && (k = S, S = e[k]), Ye(r, k, ot(S, t, a, k, e, s));
140
- }), r;
141
- }
142
- var fa = 4;
143
- function ya(e) {
144
- return ot(e, fa);
145
- }
146
- var St = function() {
147
- var e = /* @__PURE__ */ g(function(D, y, u, p) {
148
- for (u = u || {}, p = D.length; p--; u[D[p]] = y)
9
+ import "./_baseUniq-Bo-J_G8t.js";
10
+ var wt = function() {
11
+ var e = /* @__PURE__ */ d(function(N, x, g, p) {
12
+ for (g = g || {}, p = N.length; p--; g[N[p]] = x)
149
13
  ;
150
- return u;
151
- }, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18], d = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], x = [1, 23], b = [1, 24], m = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], S = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], k = [1, 49], E = {
152
- trace: /* @__PURE__ */ g(function() {
14
+ return g;
15
+ }, "o"), t = [1, 15], a = [1, 7], i = [1, 13], l = [1, 14], s = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18], u = [8, 30], h = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], y = [1, 23], b = [1, 24], L = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], E = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], D = [1, 49], v = {
16
+ trace: /* @__PURE__ */ d(function() {
153
17
  }, "trace"),
154
18
  yy: {},
155
19
  symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
156
20
  terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
157
21
  productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
158
- performAction: /* @__PURE__ */ g(function(y, u, p, w, v, c, _) {
22
+ performAction: /* @__PURE__ */ d(function(x, g, p, w, S, c, _) {
159
23
  var f = c.length - 1;
160
- switch (v) {
24
+ switch (S) {
161
25
  case 4:
162
26
  w.getLogger().debug("Rule: separator (NL) ");
163
27
  break;
@@ -189,21 +53,21 @@ var St = function() {
189
53
  w.getLogger().debug("Rule: statement #2: ", c[f - 1]), this.$ = [c[f - 1]].concat(c[f]);
190
54
  break;
191
55
  case 14:
192
- w.getLogger().debug("Rule: link: ", c[f], y), this.$ = { edgeTypeStr: c[f], label: "" };
56
+ w.getLogger().debug("Rule: link: ", c[f], x), this.$ = { edgeTypeStr: c[f], label: "" };
193
57
  break;
194
58
  case 15:
195
59
  w.getLogger().debug("Rule: LABEL link: ", c[f - 3], c[f - 1], c[f]), this.$ = { edgeTypeStr: c[f], label: c[f - 1] };
196
60
  break;
197
61
  case 18:
198
- const M = parseInt(c[f]), A = w.generateId();
199
- this.$ = { id: A, type: "space", label: "", width: M, children: [] };
62
+ const A = parseInt(c[f]), O = w.generateId();
63
+ this.$ = { id: O, type: "space", label: "", width: A, children: [] };
200
64
  break;
201
65
  case 23:
202
66
  w.getLogger().debug("Rule: (nodeStatement link node) ", c[f - 2], c[f - 1], c[f], " typestr: ", c[f - 1].edgeTypeStr);
203
- const H = w.edgeStrToEdgeData(c[f - 1].edgeTypeStr);
67
+ const X = w.edgeStrToEdgeData(c[f - 1].edgeTypeStr);
204
68
  this.$ = [
205
69
  { id: c[f - 2].id, label: c[f - 2].label, type: c[f - 2].type, directions: c[f - 2].directions },
206
- { id: c[f - 2].id + "-" + c[f].id, start: c[f - 2].id, end: c[f].id, label: c[f - 1].label, type: "edge", directions: c[f].directions, arrowTypeEnd: H, arrowTypeStart: "arrow_open" },
70
+ { id: c[f - 2].id + "-" + c[f].id, start: c[f - 2].id, end: c[f].id, label: c[f - 1].label, type: "edge", directions: c[f].directions, arrowTypeEnd: X, arrowTypeStart: "arrow_open" },
207
71
  { id: c[f].id, label: c[f].label, type: w.typeStr2Type(c[f].typeStr), directions: c[f].directions }
208
72
  ];
209
73
  break;
@@ -221,8 +85,8 @@ var St = function() {
221
85
  break;
222
86
  case 28:
223
87
  w.getLogger().debug("Rule: blockStatement : ", c[f - 2], c[f - 1], c[f]);
224
- const W = w.generateId();
225
- this.$ = { id: W, type: "composite", label: "", children: c[f - 1] };
88
+ const P = w.generateId();
89
+ this.$ = { id: P, type: "composite", label: "", children: c[f - 1] };
226
90
  break;
227
91
  case 29:
228
92
  w.getLogger().debug("Rule: node (NODE_ID separator): ", c[f]), this.$ = { id: c[f] };
@@ -254,76 +118,76 @@ var St = function() {
254
118
  break;
255
119
  }
256
120
  }, "anonymous"),
257
- table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(d, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }), e(h, [2, 16], { 14: 22, 15: x, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(m, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(S, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(d, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(m, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: x, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(m, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: k }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: k, 38: [2, 31] }, { 31: [2, 15] }, e(S, [2, 34]), { 38: [2, 32] }],
121
+ table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: a, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }), e(h, [2, 16], { 14: 22, 15: y, 16: b }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(L, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 31: s }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(E, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: s }, { 31: [2, 14] }, { 17: [1, 36] }, e(L, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: y, 16: b, 19: 5, 20: 6, 21: a, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: s, 39: r, 43: n, 46: o }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(E, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(L, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: D }, { 15: [1, 50] }, e(h, [2, 27]), e(E, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: D, 38: [2, 31] }, { 31: [2, 15] }, e(E, [2, 34]), { 38: [2, 32] }],
258
122
  defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
259
- parseError: /* @__PURE__ */ g(function(y, u) {
260
- if (u.recoverable)
261
- this.trace(y);
123
+ parseError: /* @__PURE__ */ d(function(x, g) {
124
+ if (g.recoverable)
125
+ this.trace(x);
262
126
  else {
263
- var p = new Error(y);
264
- throw p.hash = u, p;
127
+ var p = new Error(x);
128
+ throw p.hash = g, p;
265
129
  }
266
130
  }, "parseError"),
267
- parse: /* @__PURE__ */ g(function(y) {
268
- var u = this, p = [0], w = [], v = [null], c = [], _ = this.table, f = "", M = 0, A = 0, H = 2, W = 1, J = c.slice.call(arguments, 1), j = Object.create(this.lexer), Q = { yy: {} };
269
- for (var yt in this.yy)
270
- Object.prototype.hasOwnProperty.call(this.yy, yt) && (Q.yy[yt] = this.yy[yt]);
271
- j.setInput(y, Q.yy), Q.yy.lexer = j, Q.yy.parser = this, typeof j.yylloc > "u" && (j.yylloc = {});
272
- var xt = j.yylloc;
273
- c.push(xt);
274
- var De = j.options && j.options.ranges;
131
+ parse: /* @__PURE__ */ d(function(x) {
132
+ var g = this, p = [0], w = [], S = [null], c = [], _ = this.table, f = "", A = 0, O = 0, X = 2, P = 1, J = c.slice.call(arguments, 1), M = Object.create(this.lexer), Q = { yy: {} };
133
+ for (var ut in this.yy)
134
+ Object.prototype.hasOwnProperty.call(this.yy, ut) && (Q.yy[ut] = this.yy[ut]);
135
+ M.setInput(x, Q.yy), Q.yy.lexer = M, Q.yy.parser = this, typeof M.yylloc > "u" && (M.yylloc = {});
136
+ var pt = M.yylloc;
137
+ c.push(pt);
138
+ var oe = M.options && M.options.ranges;
275
139
  typeof Q.yy.parseError == "function" ? this.parseError = Q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
276
- function Ne(K) {
277
- p.length = p.length - 2 * K, v.length = v.length - K, c.length = c.length - K;
140
+ function he(H) {
141
+ p.length = p.length - 2 * H, S.length = S.length - H, c.length = c.length - H;
278
142
  }
279
- g(Ne, "popStack");
280
- function Ot() {
281
- var K;
282
- return K = w.pop() || j.lex() || W, typeof K != "number" && (K instanceof Array && (w = K, K = w.pop()), K = u.symbols_[K] || K), K;
143
+ d(he, "popStack");
144
+ function Tt() {
145
+ var H;
146
+ return H = w.pop() || M.lex() || P, typeof H != "number" && (H instanceof Array && (w = H, H = w.pop()), H = g.symbols_[H] || H), H;
283
147
  }
284
- g(Ot, "lex");
285
- for (var Y, tt, X, bt, et = {}, nt, q, At, lt; ; ) {
286
- if (tt = p[p.length - 1], this.defaultActions[tt] ? X = this.defaultActions[tt] : ((Y === null || typeof Y > "u") && (Y = Ot()), X = _[tt] && _[tt][Y]), typeof X > "u" || !X.length || !X[0]) {
287
- var wt = "";
288
- lt = [];
289
- for (nt in _[tt])
290
- this.terminals_[nt] && nt > H && lt.push("'" + this.terminals_[nt] + "'");
291
- j.showPosition ? wt = "Parse error on line " + (M + 1) + `:
292
- ` + j.showPosition() + `
293
- Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt = "Parse error on line " + (M + 1) + ": Unexpected " + (Y == W ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(wt, {
294
- text: j.match,
148
+ d(Tt, "lex");
149
+ for (var Y, $, U, ft, tt = {}, it, q, Ct, nt; ; ) {
150
+ if ($ = p[p.length - 1], this.defaultActions[$] ? U = this.defaultActions[$] : ((Y === null || typeof Y > "u") && (Y = Tt()), U = _[$] && _[$][Y]), typeof U > "u" || !U.length || !U[0]) {
151
+ var xt = "";
152
+ nt = [];
153
+ for (it in _[$])
154
+ this.terminals_[it] && it > X && nt.push("'" + this.terminals_[it] + "'");
155
+ M.showPosition ? xt = "Parse error on line " + (A + 1) + `:
156
+ ` + M.showPosition() + `
157
+ Expecting ` + nt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : xt = "Parse error on line " + (A + 1) + ": Unexpected " + (Y == P ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(xt, {
158
+ text: M.match,
295
159
  token: this.terminals_[Y] || Y,
296
- line: j.yylineno,
297
- loc: xt,
298
- expected: lt
160
+ line: M.yylineno,
161
+ loc: pt,
162
+ expected: nt
299
163
  });
300
164
  }
301
- if (X[0] instanceof Array && X.length > 1)
302
- throw new Error("Parse Error: multiple actions possible at state: " + tt + ", token: " + Y);
303
- switch (X[0]) {
165
+ if (U[0] instanceof Array && U.length > 1)
166
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + Y);
167
+ switch (U[0]) {
304
168
  case 1:
305
- p.push(Y), v.push(j.yytext), c.push(j.yylloc), p.push(X[1]), Y = null, A = j.yyleng, f = j.yytext, M = j.yylineno, xt = j.yylloc;
169
+ p.push(Y), S.push(M.yytext), c.push(M.yylloc), p.push(U[1]), Y = null, O = M.yyleng, f = M.yytext, A = M.yylineno, pt = M.yylloc;
306
170
  break;
307
171
  case 2:
308
- if (q = this.productions_[X[1]][1], et.$ = v[v.length - q], et._$ = {
172
+ if (q = this.productions_[U[1]][1], tt.$ = S[S.length - q], tt._$ = {
309
173
  first_line: c[c.length - (q || 1)].first_line,
310
174
  last_line: c[c.length - 1].last_line,
311
175
  first_column: c[c.length - (q || 1)].first_column,
312
176
  last_column: c[c.length - 1].last_column
313
- }, De && (et._$.range = [
177
+ }, oe && (tt._$.range = [
314
178
  c[c.length - (q || 1)].range[0],
315
179
  c[c.length - 1].range[1]
316
- ]), bt = this.performAction.apply(et, [
180
+ ]), ft = this.performAction.apply(tt, [
317
181
  f,
182
+ O,
318
183
  A,
319
- M,
320
184
  Q.yy,
321
- X[1],
322
- v,
185
+ U[1],
186
+ S,
323
187
  c
324
- ].concat(J)), typeof bt < "u")
325
- return bt;
326
- q && (p = p.slice(0, -1 * q * 2), v = v.slice(0, -1 * q), c = c.slice(0, -1 * q)), p.push(this.productions_[X[1]][0]), v.push(et.$), c.push(et._$), At = _[p[p.length - 2]][p[p.length - 1]], p.push(At);
188
+ ].concat(J)), typeof ft < "u")
189
+ return ft;
190
+ q && (p = p.slice(0, -1 * q * 2), S = S.slice(0, -1 * q), c = c.slice(0, -1 * q)), p.push(this.productions_[U[1]][0]), S.push(tt.$), c.push(tt._$), Ct = _[p[p.length - 2]][p[p.length - 1]], p.push(Ct);
327
191
  break;
328
192
  case 3:
329
193
  return !0;
@@ -331,18 +195,18 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
331
195
  }
332
196
  return !0;
333
197
  }, "parse")
334
- }, N = /* @__PURE__ */ function() {
335
- var D = {
198
+ }, T = /* @__PURE__ */ function() {
199
+ var N = {
336
200
  EOF: 1,
337
- parseError: /* @__PURE__ */ g(function(u, p) {
201
+ parseError: /* @__PURE__ */ d(function(g, p) {
338
202
  if (this.yy.parser)
339
- this.yy.parser.parseError(u, p);
203
+ this.yy.parser.parseError(g, p);
340
204
  else
341
- throw new Error(u);
205
+ throw new Error(g);
342
206
  }, "parseError"),
343
207
  // resets the lexer, sets new input
344
- setInput: /* @__PURE__ */ g(function(y, u) {
345
- return this.yy = u || this.yy || {}, this._input = y, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
208
+ setInput: /* @__PURE__ */ d(function(x, g) {
209
+ return this.yy = g || this.yy || {}, this._input = x, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
346
210
  first_line: 1,
347
211
  first_column: 0,
348
212
  last_line: 1,
@@ -350,32 +214,32 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
350
214
  }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
351
215
  }, "setInput"),
352
216
  // consumes and returns one char from the input
353
- input: /* @__PURE__ */ g(function() {
354
- var y = this._input[0];
355
- this.yytext += y, this.yyleng++, this.offset++, this.match += y, this.matched += y;
356
- var u = y.match(/(?:\r\n?|\n).*/g);
357
- return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), y;
217
+ input: /* @__PURE__ */ d(function() {
218
+ var x = this._input[0];
219
+ this.yytext += x, this.yyleng++, this.offset++, this.match += x, this.matched += x;
220
+ var g = x.match(/(?:\r\n?|\n).*/g);
221
+ return g ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), x;
358
222
  }, "input"),
359
223
  // unshifts one char (or a string) into the input
360
- unput: /* @__PURE__ */ g(function(y) {
361
- var u = y.length, p = y.split(/(?:\r\n?|\n)/g);
362
- this._input = y + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
224
+ unput: /* @__PURE__ */ d(function(x) {
225
+ var g = x.length, p = x.split(/(?:\r\n?|\n)/g);
226
+ this._input = x + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
363
227
  var w = this.match.split(/(?:\r\n?|\n)/g);
364
228
  this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
365
- var v = this.yylloc.range;
229
+ var S = this.yylloc.range;
366
230
  return this.yylloc = {
367
231
  first_line: this.yylloc.first_line,
368
232
  last_line: this.yylineno + 1,
369
233
  first_column: this.yylloc.first_column,
370
- last_column: p ? (p.length === w.length ? this.yylloc.first_column : 0) + w[w.length - p.length].length - p[0].length : this.yylloc.first_column - u
371
- }, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
234
+ last_column: p ? (p.length === w.length ? this.yylloc.first_column : 0) + w[w.length - p.length].length - p[0].length : this.yylloc.first_column - g
235
+ }, this.options.ranges && (this.yylloc.range = [S[0], S[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
372
236
  }, "unput"),
373
237
  // When called from action, caches matched text and appends it on next action
374
- more: /* @__PURE__ */ g(function() {
238
+ more: /* @__PURE__ */ d(function() {
375
239
  return this._more = !0, this;
376
240
  }, "more"),
377
241
  // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
378
- reject: /* @__PURE__ */ g(function() {
242
+ reject: /* @__PURE__ */ d(function() {
379
243
  if (this.options.backtrack_lexer)
380
244
  this._backtrack = !0;
381
245
  else
@@ -388,29 +252,29 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
388
252
  return this;
389
253
  }, "reject"),
390
254
  // retain first n characters of the match
391
- less: /* @__PURE__ */ g(function(y) {
392
- this.unput(this.match.slice(y));
255
+ less: /* @__PURE__ */ d(function(x) {
256
+ this.unput(this.match.slice(x));
393
257
  }, "less"),
394
258
  // displays already matched input, i.e. for error messages
395
- pastInput: /* @__PURE__ */ g(function() {
396
- var y = this.matched.substr(0, this.matched.length - this.match.length);
397
- return (y.length > 20 ? "..." : "") + y.substr(-20).replace(/\n/g, "");
259
+ pastInput: /* @__PURE__ */ d(function() {
260
+ var x = this.matched.substr(0, this.matched.length - this.match.length);
261
+ return (x.length > 20 ? "..." : "") + x.substr(-20).replace(/\n/g, "");
398
262
  }, "pastInput"),
399
263
  // displays upcoming input, i.e. for error messages
400
- upcomingInput: /* @__PURE__ */ g(function() {
401
- var y = this.match;
402
- return y.length < 20 && (y += this._input.substr(0, 20 - y.length)), (y.substr(0, 20) + (y.length > 20 ? "..." : "")).replace(/\n/g, "");
264
+ upcomingInput: /* @__PURE__ */ d(function() {
265
+ var x = this.match;
266
+ return x.length < 20 && (x += this._input.substr(0, 20 - x.length)), (x.substr(0, 20) + (x.length > 20 ? "..." : "")).replace(/\n/g, "");
403
267
  }, "upcomingInput"),
404
268
  // displays the character position where the lexing error occurred, i.e. for error messages
405
- showPosition: /* @__PURE__ */ g(function() {
406
- var y = this.pastInput(), u = new Array(y.length + 1).join("-");
407
- return y + this.upcomingInput() + `
408
- ` + u + "^";
269
+ showPosition: /* @__PURE__ */ d(function() {
270
+ var x = this.pastInput(), g = new Array(x.length + 1).join("-");
271
+ return x + this.upcomingInput() + `
272
+ ` + g + "^";
409
273
  }, "showPosition"),
410
274
  // test the lexed token: return FALSE when not a match, otherwise return token
411
- test_match: /* @__PURE__ */ g(function(y, u) {
412
- var p, w, v;
413
- if (this.options.backtrack_lexer && (v = {
275
+ test_match: /* @__PURE__ */ d(function(x, g) {
276
+ var p, w, S;
277
+ if (this.options.backtrack_lexer && (S = {
414
278
  yylineno: this.yylineno,
415
279
  yylloc: {
416
280
  first_line: this.yylloc.first_line,
@@ -429,41 +293,41 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
429
293
  yy: this.yy,
430
294
  conditionStack: this.conditionStack.slice(0),
431
295
  done: this.done
432
- }, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), w = y[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
296
+ }, this.options.ranges && (S.yylloc.range = this.yylloc.range.slice(0))), w = x[0].match(/(?:\r\n?|\n).*/g), w && (this.yylineno += w.length), this.yylloc = {
433
297
  first_line: this.yylloc.last_line,
434
298
  last_line: this.yylineno + 1,
435
299
  first_column: this.yylloc.last_column,
436
- last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + y[0].length
437
- }, this.yytext += y[0], this.match += y[0], this.matches = y, 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(y[0].length), this.matched += y[0], p = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
300
+ last_column: w ? w[w.length - 1].length - w[w.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + x[0].length
301
+ }, this.yytext += x[0], this.match += x[0], this.matches = x, 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(x[0].length), this.matched += x[0], p = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
438
302
  return p;
439
303
  if (this._backtrack) {
440
- for (var c in v)
441
- this[c] = v[c];
304
+ for (var c in S)
305
+ this[c] = S[c];
442
306
  return !1;
443
307
  }
444
308
  return !1;
445
309
  }, "test_match"),
446
310
  // return next match in input
447
- next: /* @__PURE__ */ g(function() {
311
+ next: /* @__PURE__ */ d(function() {
448
312
  if (this.done)
449
313
  return this.EOF;
450
314
  this._input || (this.done = !0);
451
- var y, u, p, w;
315
+ var x, g, p, w;
452
316
  this._more || (this.yytext = "", this.match = "");
453
- for (var v = this._currentRules(), c = 0; c < v.length; c++)
454
- if (p = this._input.match(this.rules[v[c]]), p && (!u || p[0].length > u[0].length)) {
455
- if (u = p, w = c, this.options.backtrack_lexer) {
456
- if (y = this.test_match(p, v[c]), y !== !1)
457
- return y;
317
+ for (var S = this._currentRules(), c = 0; c < S.length; c++)
318
+ if (p = this._input.match(this.rules[S[c]]), p && (!g || p[0].length > g[0].length)) {
319
+ if (g = p, w = c, this.options.backtrack_lexer) {
320
+ if (x = this.test_match(p, S[c]), x !== !1)
321
+ return x;
458
322
  if (this._backtrack) {
459
- u = !1;
323
+ g = !1;
460
324
  continue;
461
325
  } else
462
326
  return !1;
463
327
  } else if (!this.options.flex)
464
328
  break;
465
329
  }
466
- return u ? (y = this.test_match(u, v[w]), y !== !1 ? y : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
330
+ return g ? (x = this.test_match(g, S[w]), x !== !1 ? x : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
467
331
  ` + this.showPosition(), {
468
332
  text: "",
469
333
  token: null,
@@ -471,56 +335,56 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
471
335
  });
472
336
  }, "next"),
473
337
  // return next match that has a token
474
- lex: /* @__PURE__ */ g(function() {
475
- var u = this.next();
476
- return u || this.lex();
338
+ lex: /* @__PURE__ */ d(function() {
339
+ var g = this.next();
340
+ return g || this.lex();
477
341
  }, "lex"),
478
342
  // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
479
- begin: /* @__PURE__ */ g(function(u) {
480
- this.conditionStack.push(u);
343
+ begin: /* @__PURE__ */ d(function(g) {
344
+ this.conditionStack.push(g);
481
345
  }, "begin"),
482
346
  // pop the previously active lexer condition state off the condition stack
483
- popState: /* @__PURE__ */ g(function() {
484
- var u = this.conditionStack.length - 1;
485
- return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
347
+ popState: /* @__PURE__ */ d(function() {
348
+ var g = this.conditionStack.length - 1;
349
+ return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
486
350
  }, "popState"),
487
351
  // produce the lexer rule set which is active for the currently active lexer condition state
488
- _currentRules: /* @__PURE__ */ g(function() {
352
+ _currentRules: /* @__PURE__ */ d(function() {
489
353
  return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
490
354
  }, "_currentRules"),
491
355
  // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
492
- topState: /* @__PURE__ */ g(function(u) {
493
- return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
356
+ topState: /* @__PURE__ */ d(function(g) {
357
+ return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
494
358
  }, "topState"),
495
359
  // alias for begin(condition)
496
- pushState: /* @__PURE__ */ g(function(u) {
497
- this.begin(u);
360
+ pushState: /* @__PURE__ */ d(function(g) {
361
+ this.begin(g);
498
362
  }, "pushState"),
499
363
  // return the number of states currently on the stack
500
- stateStackSize: /* @__PURE__ */ g(function() {
364
+ stateStackSize: /* @__PURE__ */ d(function() {
501
365
  return this.conditionStack.length;
502
366
  }, "stateStackSize"),
503
367
  options: {},
504
- performAction: /* @__PURE__ */ g(function(u, p, w, v) {
368
+ performAction: /* @__PURE__ */ d(function(g, p, w, S) {
505
369
  switch (w) {
506
370
  case 0:
507
- return u.getLogger().debug("Found block-beta"), 10;
371
+ return g.getLogger().debug("Found block-beta"), 10;
508
372
  case 1:
509
- return u.getLogger().debug("Found id-block"), 29;
373
+ return g.getLogger().debug("Found id-block"), 29;
510
374
  case 2:
511
- return u.getLogger().debug("Found block"), 10;
375
+ return g.getLogger().debug("Found block"), 10;
512
376
  case 3:
513
- u.getLogger().debug(".", p.yytext);
377
+ g.getLogger().debug(".", p.yytext);
514
378
  break;
515
379
  case 4:
516
- u.getLogger().debug("_", p.yytext);
380
+ g.getLogger().debug("_", p.yytext);
517
381
  break;
518
382
  case 5:
519
383
  return 5;
520
384
  case 6:
521
385
  return p.yytext = -1, 28;
522
386
  case 7:
523
- return p.yytext = p.yytext.replace(/columns\s+/, ""), u.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
387
+ return p.yytext = p.yytext.replace(/columns\s+/, ""), g.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
524
388
  case 8:
525
389
  this.pushState("md_string");
526
390
  break;
@@ -533,14 +397,14 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
533
397
  this.pushState("string");
534
398
  break;
535
399
  case 12:
536
- u.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
400
+ g.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
537
401
  break;
538
402
  case 13:
539
- return u.getLogger().debug("LEX: STR end:", p.yytext), "STR";
403
+ return g.getLogger().debug("LEX: STR end:", p.yytext), "STR";
540
404
  case 14:
541
- return p.yytext = p.yytext.replace(/space\:/, ""), u.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
405
+ return p.yytext = p.yytext.replace(/space\:/, ""), g.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
542
406
  case 15:
543
- return p.yytext = "1", u.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
407
+ return p.yytext = "1", g.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
544
408
  case 16:
545
409
  return 42;
546
410
  case 17:
@@ -586,61 +450,61 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
586
450
  case 36:
587
451
  return 30;
588
452
  case 37:
589
- return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
453
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
590
454
  case 38:
591
- return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
455
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
592
456
  case 39:
593
- return this.popState(), u.getLogger().debug("Lex: ))"), "NODE_DEND";
457
+ return this.popState(), g.getLogger().debug("Lex: ))"), "NODE_DEND";
594
458
  case 40:
595
- return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
459
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
596
460
  case 41:
597
- return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
461
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
598
462
  case 42:
599
- return this.popState(), u.getLogger().debug("Lex: (-"), "NODE_DEND";
463
+ return this.popState(), g.getLogger().debug("Lex: (-"), "NODE_DEND";
600
464
  case 43:
601
- return this.popState(), u.getLogger().debug("Lex: -)"), "NODE_DEND";
465
+ return this.popState(), g.getLogger().debug("Lex: -)"), "NODE_DEND";
602
466
  case 44:
603
- return this.popState(), u.getLogger().debug("Lex: (("), "NODE_DEND";
467
+ return this.popState(), g.getLogger().debug("Lex: (("), "NODE_DEND";
604
468
  case 45:
605
- return this.popState(), u.getLogger().debug("Lex: ]]"), "NODE_DEND";
469
+ return this.popState(), g.getLogger().debug("Lex: ]]"), "NODE_DEND";
606
470
  case 46:
607
- return this.popState(), u.getLogger().debug("Lex: ("), "NODE_DEND";
471
+ return this.popState(), g.getLogger().debug("Lex: ("), "NODE_DEND";
608
472
  case 47:
609
- return this.popState(), u.getLogger().debug("Lex: ])"), "NODE_DEND";
473
+ return this.popState(), g.getLogger().debug("Lex: ])"), "NODE_DEND";
610
474
  case 48:
611
- return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
475
+ return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
612
476
  case 49:
613
- return this.popState(), u.getLogger().debug("Lex: /]"), "NODE_DEND";
477
+ return this.popState(), g.getLogger().debug("Lex: /]"), "NODE_DEND";
614
478
  case 50:
615
- return this.popState(), u.getLogger().debug("Lex: )]"), "NODE_DEND";
479
+ return this.popState(), g.getLogger().debug("Lex: )]"), "NODE_DEND";
616
480
  case 51:
617
- return this.popState(), u.getLogger().debug("Lex: )"), "NODE_DEND";
481
+ return this.popState(), g.getLogger().debug("Lex: )"), "NODE_DEND";
618
482
  case 52:
619
- return this.popState(), u.getLogger().debug("Lex: ]>"), "NODE_DEND";
483
+ return this.popState(), g.getLogger().debug("Lex: ]>"), "NODE_DEND";
620
484
  case 53:
621
- return this.popState(), u.getLogger().debug("Lex: ]"), "NODE_DEND";
485
+ return this.popState(), g.getLogger().debug("Lex: ]"), "NODE_DEND";
622
486
  case 54:
623
- return u.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
487
+ return g.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
624
488
  case 55:
625
- return u.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
489
+ return g.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
626
490
  case 56:
627
- return u.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
491
+ return g.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
628
492
  case 57:
629
- return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
493
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
630
494
  case 58:
631
- return u.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
495
+ return g.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
632
496
  case 59:
633
- return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
497
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
634
498
  case 60:
635
- return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
499
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
636
500
  case 61:
637
- return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
501
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
638
502
  case 62:
639
- return u.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
503
+ return g.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
640
504
  case 63:
641
- return u.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
505
+ return g.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
642
506
  case 64:
643
- return u.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
507
+ return g.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
644
508
  case 65:
645
509
  return this.pushState("NODE"), 35;
646
510
  case 66:
@@ -656,13 +520,13 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
656
520
  case 71:
657
521
  return this.pushState("NODE"), 35;
658
522
  case 72:
659
- return u.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
523
+ return g.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
660
524
  case 73:
661
- return this.pushState("BLOCK_ARROW"), u.getLogger().debug("LEX ARR START"), 37;
525
+ return this.pushState("BLOCK_ARROW"), g.getLogger().debug("LEX ARR START"), 37;
662
526
  case 74:
663
- return u.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
527
+ return g.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
664
528
  case 75:
665
- return u.getLogger().debug("Lex: EOF", p.yytext), 8;
529
+ return g.getLogger().debug("Lex: EOF", p.yytext), 8;
666
530
  case 76:
667
531
  this.pushState("md_string");
668
532
  break;
@@ -675,141 +539,141 @@ Expecting ` + lt.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : wt =
675
539
  this.popState();
676
540
  break;
677
541
  case 80:
678
- u.getLogger().debug("Lex: Starting string"), this.pushState("string");
542
+ g.getLogger().debug("Lex: Starting string"), this.pushState("string");
679
543
  break;
680
544
  case 81:
681
- u.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
545
+ g.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
682
546
  break;
683
547
  case 82:
684
- return u.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
548
+ return g.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
685
549
  case 83:
686
- u.getLogger().debug("LEX POPPING"), this.popState();
550
+ g.getLogger().debug("LEX POPPING"), this.popState();
687
551
  break;
688
552
  case 84:
689
- u.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
553
+ g.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
690
554
  break;
691
555
  case 85:
692
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
556
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
693
557
  case 86:
694
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (left):", p.yytext), "DIR";
558
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (left):", p.yytext), "DIR";
695
559
  case 87:
696
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (x):", p.yytext), "DIR";
560
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (x):", p.yytext), "DIR";
697
561
  case 88:
698
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (y):", p.yytext), "DIR";
562
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (y):", p.yytext), "DIR";
699
563
  case 89:
700
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (up):", p.yytext), "DIR";
564
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (up):", p.yytext), "DIR";
701
565
  case 90:
702
- return p.yytext = p.yytext.replace(/^,\s*/, ""), u.getLogger().debug("Lex (down):", p.yytext), "DIR";
566
+ return p.yytext = p.yytext.replace(/^,\s*/, ""), g.getLogger().debug("Lex (down):", p.yytext), "DIR";
703
567
  case 91:
704
- return p.yytext = "]>", u.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
568
+ return p.yytext = "]>", g.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
705
569
  case 92:
706
- return u.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
570
+ return g.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
707
571
  case 93:
708
- return u.getLogger().debug("Lex: LINK", p.yytext), 15;
572
+ return g.getLogger().debug("Lex: LINK", p.yytext), 15;
709
573
  case 94:
710
- return u.getLogger().debug("Lex: LINK", p.yytext), 15;
574
+ return g.getLogger().debug("Lex: LINK", p.yytext), 15;
711
575
  case 95:
712
- return u.getLogger().debug("Lex: LINK", p.yytext), 15;
576
+ return g.getLogger().debug("Lex: LINK", p.yytext), 15;
713
577
  case 96:
714
- return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
578
+ return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
715
579
  case 97:
716
- return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
580
+ return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
717
581
  case 98:
718
- return u.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
582
+ return g.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
719
583
  case 99:
720
584
  this.pushState("md_string");
721
585
  break;
722
586
  case 100:
723
- return u.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
587
+ return g.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
724
588
  case 101:
725
- return this.popState(), u.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
589
+ return this.popState(), g.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
726
590
  case 102:
727
- return this.popState(), u.getLogger().debug("Lex: LINK", p.yytext), 15;
591
+ return this.popState(), g.getLogger().debug("Lex: LINK", p.yytext), 15;
728
592
  case 103:
729
- return this.popState(), u.getLogger().debug("Lex: LINK", p.yytext), 15;
593
+ return this.popState(), g.getLogger().debug("Lex: LINK", p.yytext), 15;
730
594
  case 104:
731
- return u.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
595
+ return g.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
732
596
  }
733
597
  }, "anonymous"),
734
598
  rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
735
599
  conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
736
600
  };
737
- return D;
601
+ return N;
738
602
  }();
739
- E.lexer = N;
740
- function T() {
603
+ v.lexer = T;
604
+ function k() {
741
605
  this.yy = {};
742
606
  }
743
- return g(T, "Parser"), T.prototype = E, E.Parser = T, new T();
607
+ return d(k, "Parser"), k.prototype = v, v.Parser = k, new k();
744
608
  }();
745
- St.parser = St;
746
- var xa = St, G = /* @__PURE__ */ new Map(), Dt = [], vt = /* @__PURE__ */ new Map(), Wt = "color", Yt = "fill", ba = "bgFill", ce = ",", wa = z(), ut = /* @__PURE__ */ new Map(), ma = /* @__PURE__ */ g((e) => Qe.sanitizeText(e, wa), "sanitizeText"), La = /* @__PURE__ */ g(function(e, t = "") {
747
- let a = ut.get(e);
748
- a || (a = { id: e, styles: [], textStyles: [] }, ut.set(e, a)), t != null && t.split(ce).forEach((i) => {
609
+ wt.parser = wt;
610
+ var ke = wt, V = /* @__PURE__ */ new Map(), Et = [], mt = /* @__PURE__ */ new Map(), It = "color", Bt = "fill", De = "bgFill", Kt = ",", Ne = z(), ot = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ d((e) => Se.sanitizeText(e, Ne), "sanitizeText"), Ce = /* @__PURE__ */ d(function(e, t = "") {
611
+ let a = ot.get(e);
612
+ a || (a = { id: e, styles: [], textStyles: [] }, ot.set(e, a)), t != null && t.split(Kt).forEach((i) => {
749
613
  const l = i.replace(/([^;]*);/, "$1").trim();
750
- if (RegExp(Wt).exec(i)) {
751
- const r = l.replace(Yt, ba).replace(Wt, Yt);
614
+ if (RegExp(It).exec(i)) {
615
+ const r = l.replace(Bt, De).replace(It, Bt);
752
616
  a.textStyles.push(r);
753
617
  }
754
618
  a.styles.push(l);
755
619
  });
756
- }, "addStyleClass"), Sa = /* @__PURE__ */ g(function(e, t = "") {
757
- const a = G.get(e);
758
- t != null && (a.styles = t.split(ce));
759
- }, "addStyle2Node"), va = /* @__PURE__ */ g(function(e, t) {
620
+ }, "addStyleClass"), Ie = /* @__PURE__ */ d(function(e, t = "") {
621
+ const a = V.get(e);
622
+ t != null && (a.styles = t.split(Kt));
623
+ }, "addStyle2Node"), Be = /* @__PURE__ */ d(function(e, t) {
760
624
  e.split(",").forEach(function(a) {
761
- let i = G.get(a);
625
+ let i = V.get(a);
762
626
  if (i === void 0) {
763
627
  const l = a.trim();
764
- i = { id: l, type: "na", children: [] }, G.set(l, i);
628
+ i = { id: l, type: "na", children: [] }, V.set(l, i);
765
629
  }
766
630
  i.classes || (i.classes = []), i.classes.push(t);
767
631
  });
768
- }, "setCssClass"), oe = /* @__PURE__ */ g((e, t) => {
632
+ }, "setCssClass"), Xt = /* @__PURE__ */ d((e, t) => {
769
633
  const a = e.flat(), i = [], l = a.find((r) => (r == null ? void 0 : r.type) === "column-setting"), s = (l == null ? void 0 : l.columns) ?? -1;
770
634
  for (const r of a) {
771
- if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && L.warn(
635
+ if (typeof s == "number" && s > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > s && m.warn(
772
636
  `Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`
773
- ), r.label && (r.label = ma(r.label)), r.type === "classDef") {
774
- La(r.id, r.css);
637
+ ), r.label && (r.label = Te(r.label)), r.type === "classDef") {
638
+ Ce(r.id, r.css);
775
639
  continue;
776
640
  }
777
641
  if (r.type === "applyClass") {
778
- va(r.id, (r == null ? void 0 : r.styleClass) ?? "");
642
+ Be(r.id, (r == null ? void 0 : r.styleClass) ?? "");
779
643
  continue;
780
644
  }
781
645
  if (r.type === "applyStyles") {
782
- r != null && r.stylesStr && Sa(r.id, r == null ? void 0 : r.stylesStr);
646
+ r != null && r.stylesStr && Ie(r.id, r == null ? void 0 : r.stylesStr);
783
647
  continue;
784
648
  }
785
649
  if (r.type === "column-setting")
786
650
  t.columns = r.columns ?? -1;
787
651
  else if (r.type === "edge") {
788
- const n = (vt.get(r.id) ?? 0) + 1;
789
- vt.set(r.id, n), r.id = n + "-" + r.id, Dt.push(r);
652
+ const n = (mt.get(r.id) ?? 0) + 1;
653
+ mt.set(r.id, n), r.id = n + "-" + r.id, Et.push(r);
790
654
  } else {
791
655
  r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
792
- const n = G.get(r.id);
793
- if (n === void 0 ? G.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && oe(r.children, r), r.type === "space") {
656
+ const n = V.get(r.id);
657
+ if (n === void 0 ? V.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Xt(r.children, r), r.type === "space") {
794
658
  const o = r.width ?? 1;
795
- for (let d = 0; d < o; d++) {
796
- const h = ya(r);
797
- h.id = h.id + "-" + d, G.set(h.id, h), i.push(h);
659
+ for (let u = 0; u < o; u++) {
660
+ const h = ve(r);
661
+ h.id = h.id + "-" + u, V.set(h.id, h), i.push(h);
798
662
  }
799
663
  } else
800
664
  n === void 0 && i.push(r);
801
665
  }
802
666
  }
803
667
  t.children = i;
804
- }, "populateBlockDatabase"), Nt = [], st = { id: "root", type: "composite", children: [], columns: -1 }, Ea = /* @__PURE__ */ g(() => {
805
- L.debug("Clear called"), $e(), st = { id: "root", type: "composite", children: [], columns: -1 }, G = /* @__PURE__ */ new Map([["root", st]]), Nt = [], ut = /* @__PURE__ */ new Map(), Dt = [], vt = /* @__PURE__ */ new Map();
668
+ }, "populateBlockDatabase"), _t = [], at = { id: "root", type: "composite", children: [], columns: -1 }, Oe = /* @__PURE__ */ d(() => {
669
+ m.debug("Clear called"), be(), at = { id: "root", type: "composite", children: [], columns: -1 }, V = /* @__PURE__ */ new Map([["root", at]]), _t = [], ot = /* @__PURE__ */ new Map(), Et = [], mt = /* @__PURE__ */ new Map();
806
670
  }, "clear");
807
- function he(e) {
808
- switch (L.debug("typeStr2Type", e), e) {
671
+ function Ut(e) {
672
+ switch (m.debug("typeStr2Type", e), e) {
809
673
  case "[]":
810
674
  return "square";
811
675
  case "()":
812
- return L.debug("we have a round"), "round";
676
+ return m.debug("we have a round"), "round";
813
677
  case "(())":
814
678
  return "circle";
815
679
  case ">]":
@@ -840,17 +704,17 @@ function he(e) {
840
704
  return "na";
841
705
  }
842
706
  }
843
- g(he, "typeStr2Type");
844
- function ge(e) {
845
- switch (L.debug("typeStr2Type", e), e) {
707
+ d(Ut, "typeStr2Type");
708
+ function jt(e) {
709
+ switch (m.debug("typeStr2Type", e), e) {
846
710
  case "==":
847
711
  return "thick";
848
712
  default:
849
713
  return "normal";
850
714
  }
851
715
  }
852
- g(ge, "edgeTypeStr2Type");
853
- function ue(e) {
716
+ d(jt, "edgeTypeStr2Type");
717
+ function Vt(e) {
854
718
  switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
855
719
  case "x":
856
720
  return "arrow_cross";
@@ -862,36 +726,36 @@ function ue(e) {
862
726
  return "";
863
727
  }
864
728
  }
865
- g(ue, "edgeStrToEdgeData");
866
- var Kt = 0, _a = /* @__PURE__ */ g(() => (Kt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Kt), "generateId"), ka = /* @__PURE__ */ g((e) => {
867
- st.children = e, oe(e, st), Nt = st.children;
868
- }, "setHierarchy"), Ta = /* @__PURE__ */ g((e) => {
869
- const t = G.get(e);
729
+ d(Vt, "edgeStrToEdgeData");
730
+ var Ot = 0, Re = /* @__PURE__ */ d(() => (Ot++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Ot), "generateId"), ze = /* @__PURE__ */ d((e) => {
731
+ at.children = e, Xt(e, at), _t = at.children;
732
+ }, "setHierarchy"), Ae = /* @__PURE__ */ d((e) => {
733
+ const t = V.get(e);
870
734
  return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
871
- }, "getColumns"), Da = /* @__PURE__ */ g(() => [...G.values()], "getBlocksFlat"), Na = /* @__PURE__ */ g(() => Nt || [], "getBlocks"), Ca = /* @__PURE__ */ g(() => Dt, "getEdges"), Ia = /* @__PURE__ */ g((e) => G.get(e), "getBlock"), Ba = /* @__PURE__ */ g((e) => {
872
- G.set(e.id, e);
873
- }, "setBlock"), Oa = /* @__PURE__ */ g(() => L, "getLogger"), Aa = /* @__PURE__ */ g(function() {
874
- return ut;
875
- }, "getClasses"), Ra = {
876
- getConfig: /* @__PURE__ */ g(() => it().block, "getConfig"),
877
- typeStr2Type: he,
878
- edgeTypeStr2Type: ge,
879
- edgeStrToEdgeData: ue,
880
- getLogger: Oa,
881
- getBlocksFlat: Da,
882
- getBlocks: Na,
883
- getEdges: Ca,
884
- setHierarchy: ka,
885
- getBlock: Ia,
886
- setBlock: Ba,
887
- getColumns: Ta,
888
- getClasses: Aa,
889
- clear: Ea,
890
- generateId: _a
891
- }, za = Ra, ct = /* @__PURE__ */ g((e, t) => {
892
- const a = er, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
893
- return Ze(i, l, s, t);
894
- }, "fade"), Ma = /* @__PURE__ */ g((e) => `.label {
735
+ }, "getColumns"), Me = /* @__PURE__ */ d(() => [...V.values()], "getBlocksFlat"), Fe = /* @__PURE__ */ d(() => _t || [], "getBlocks"), We = /* @__PURE__ */ d(() => Et, "getEdges"), Pe = /* @__PURE__ */ d((e) => V.get(e), "getBlock"), Ye = /* @__PURE__ */ d((e) => {
736
+ V.set(e.id, e);
737
+ }, "setBlock"), He = /* @__PURE__ */ d(() => m, "getLogger"), Ke = /* @__PURE__ */ d(function() {
738
+ return ot;
739
+ }, "getClasses"), Xe = {
740
+ getConfig: /* @__PURE__ */ d(() => st().block, "getConfig"),
741
+ typeStr2Type: Ut,
742
+ edgeTypeStr2Type: jt,
743
+ edgeStrToEdgeData: Vt,
744
+ getLogger: He,
745
+ getBlocksFlat: Me,
746
+ getBlocks: Fe,
747
+ getEdges: We,
748
+ setHierarchy: ze,
749
+ getBlock: Pe,
750
+ setBlock: Ye,
751
+ getColumns: Ae,
752
+ getClasses: Ke,
753
+ clear: Oe,
754
+ generateId: Re
755
+ }, Ue = Xe, lt = /* @__PURE__ */ d((e, t) => {
756
+ const a = _e, i = a(e, "r"), l = a(e, "g"), s = a(e, "b");
757
+ return we(i, l, s, t);
758
+ }, "fade"), je = /* @__PURE__ */ d((e) => `.label {
895
759
  font-family: ${e.fontFamily};
896
760
  color: ${e.nodeTextColor || e.textColor};
897
761
  }
@@ -961,14 +825,14 @@ var Kt = 0, _a = /* @__PURE__ */ g(() => (Kt++, "id-" + Math.random().toString(3
961
825
 
962
826
  /* For html labels only */
963
827
  .labelBkg {
964
- background-color: ${ct(e.edgeLabelBackground, 0.5)};
828
+ background-color: ${lt(e.edgeLabelBackground, 0.5)};
965
829
  // background-color:
966
830
  }
967
831
 
968
832
  .node .cluster {
969
- // fill: ${ct(e.mainBkg, 0.5)};
970
- fill: ${ct(e.clusterBkg, 0.5)};
971
- stroke: ${ct(e.clusterBorder, 0.2)};
833
+ // fill: ${lt(e.mainBkg, 0.5)};
834
+ fill: ${lt(e.clusterBkg, 0.5)};
835
+ stroke: ${lt(e.clusterBorder, 0.2)};
972
836
  box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
973
837
  stroke-width: 1px;
974
838
  }
@@ -1003,41 +867,41 @@ var Kt = 0, _a = /* @__PURE__ */ g(() => (Kt++, "id-" + Math.random().toString(3
1003
867
  font-size: 18px;
1004
868
  fill: ${e.textColor};
1005
869
  }
1006
- ${Ce()}
1007
- `, "getStyles"), ja = Ma, Fa = /* @__PURE__ */ g((e, t, a, i) => {
870
+ ${de()}
871
+ `, "getStyles"), Ve = je, Ge = /* @__PURE__ */ d((e, t, a, i) => {
1008
872
  t.forEach((l) => {
1009
- $a[l](e, a, i);
873
+ sr[l](e, a, i);
1010
874
  });
1011
- }, "insertMarkers"), Pa = /* @__PURE__ */ g((e, t, a) => {
1012
- L.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");
1013
- }, "extension"), Wa = /* @__PURE__ */ g((e, t, a) => {
875
+ }, "insertMarkers"), Ze = /* @__PURE__ */ d((e, t, a) => {
876
+ m.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");
877
+ }, "extension"), qe = /* @__PURE__ */ d((e, t, a) => {
1014
878
  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");
1015
- }, "composition"), Ya = /* @__PURE__ */ g((e, t, a) => {
879
+ }, "composition"), Je = /* @__PURE__ */ d((e, t, a) => {
1016
880
  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");
1017
- }, "aggregation"), Ka = /* @__PURE__ */ g((e, t, a) => {
881
+ }, "aggregation"), Qe = /* @__PURE__ */ d((e, t, a) => {
1018
882
  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");
1019
- }, "dependency"), Ua = /* @__PURE__ */ g((e, t, a) => {
883
+ }, "dependency"), $e = /* @__PURE__ */ d((e, t, a) => {
1020
884
  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);
1021
- }, "lollipop"), Ha = /* @__PURE__ */ g((e, t, a) => {
885
+ }, "lollipop"), tr = /* @__PURE__ */ d((e, t, a) => {
1022
886
  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");
1023
- }, "point"), Xa = /* @__PURE__ */ g((e, t, a) => {
887
+ }, "point"), er = /* @__PURE__ */ d((e, t, a) => {
1024
888
  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");
1025
- }, "circle"), Va = /* @__PURE__ */ g((e, t, a) => {
889
+ }, "circle"), rr = /* @__PURE__ */ d((e, t, a) => {
1026
890
  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");
1027
- }, "cross"), Ga = /* @__PURE__ */ g((e, t, a) => {
891
+ }, "cross"), ar = /* @__PURE__ */ d((e, t, a) => {
1028
892
  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");
1029
- }, "barb"), $a = {
1030
- extension: Pa,
1031
- composition: Wa,
1032
- aggregation: Ya,
1033
- dependency: Ka,
1034
- lollipop: Ua,
1035
- point: Ha,
1036
- circle: Xa,
1037
- cross: Va,
1038
- barb: Ga
1039
- }, Za = Fa, Zt, qt, O = ((qt = (Zt = z()) == null ? void 0 : Zt.block) == null ? void 0 : qt.padding) ?? 8;
1040
- function de(e, t) {
893
+ }, "barb"), sr = {
894
+ extension: Ze,
895
+ composition: qe,
896
+ aggregation: Je,
897
+ dependency: Qe,
898
+ lollipop: $e,
899
+ point: tr,
900
+ circle: er,
901
+ cross: rr,
902
+ barb: ar
903
+ }, ir = Ge, Pt, Yt, B = ((Yt = (Pt = z()) == null ? void 0 : Pt.block) == null ? void 0 : Yt.padding) ?? 8;
904
+ function Gt(e, t) {
1041
905
  if (e === 0 || !Number.isInteger(e))
1042
906
  throw new Error("Columns must be an integer !== 0.");
1043
907
  if (t < 0 || !Number.isInteger(t))
@@ -1049,12 +913,12 @@ function de(e, t) {
1049
913
  const a = t % e, i = Math.floor(t / e);
1050
914
  return { px: a, py: i };
1051
915
  }
1052
- g(de, "calculateBlockPosition");
1053
- var qa = /* @__PURE__ */ g((e) => {
916
+ d(Gt, "calculateBlockPosition");
917
+ var nr = /* @__PURE__ */ d((e) => {
1054
918
  let t = 0, a = 0;
1055
919
  for (const i of e.children) {
1056
920
  const { width: l, height: s, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
1057
- L.debug(
921
+ m.debug(
1058
922
  "getMaxChildSize abc95 child:",
1059
923
  i.id,
1060
924
  "width:",
@@ -1070,9 +934,9 @@ var qa = /* @__PURE__ */ g((e) => {
1070
934
  }
1071
935
  return { width: t, height: a };
1072
936
  }, "getMaxChildSize");
1073
- function dt(e, t, a = 0, i = 0) {
1074
- var r, n, o, d, h, x, b, m, S, k, E;
1075
- L.debug(
937
+ function ht(e, t, a = 0, i = 0) {
938
+ var r, n, o, u, h, y, b, L, E, D, v;
939
+ m.debug(
1076
940
  "setBlockSizes abc95 (start)",
1077
941
  e.id,
1078
942
  (r = e == null ? void 0 : e.size) == null ? void 0 : r.x,
@@ -1088,43 +952,43 @@ function dt(e, t, a = 0, i = 0) {
1088
952
  });
1089
953
  let l = 0, s = 0;
1090
954
  if (((o = e.children) == null ? void 0 : o.length) > 0) {
1091
- for (const v of e.children)
1092
- dt(v, t);
1093
- const N = qa(e);
1094
- l = N.width, s = N.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
1095
- for (const v of e.children)
1096
- v.size && (L.debug(
1097
- `abc95 Setting size of children of ${e.id} id=${v.id} ${l} ${s} ${JSON.stringify(v.size)}`
1098
- ), v.size.width = l * (v.widthInColumns ?? 1) + O * ((v.widthInColumns ?? 1) - 1), v.size.height = s, v.size.x = 0, v.size.y = 0, L.debug(
1099
- `abc95 updating size of ${e.id} children child:${v.id} maxWidth:${l} maxHeight:${s}`
955
+ for (const S of e.children)
956
+ ht(S, t);
957
+ const T = nr(e);
958
+ l = T.width, s = T.height, m.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", l, s);
959
+ for (const S of e.children)
960
+ S.size && (m.debug(
961
+ `abc95 Setting size of children of ${e.id} id=${S.id} ${l} ${s} ${JSON.stringify(S.size)}`
962
+ ), S.size.width = l * (S.widthInColumns ?? 1) + B * ((S.widthInColumns ?? 1) - 1), S.size.height = s, S.size.x = 0, S.size.y = 0, m.debug(
963
+ `abc95 updating size of ${e.id} children child:${S.id} maxWidth:${l} maxHeight:${s}`
1100
964
  ));
1101
- for (const v of e.children)
1102
- dt(v, t, l, s);
1103
- const T = e.columns ?? -1;
1104
- let D = 0;
1105
- for (const v of e.children)
1106
- D += v.widthInColumns ?? 1;
1107
- let y = e.children.length;
1108
- T > 0 && T < D && (y = T);
1109
- const u = Math.ceil(D / y);
1110
- let p = y * (l + O) + O, w = u * (s + O) + O;
965
+ for (const S of e.children)
966
+ ht(S, t, l, s);
967
+ const k = e.columns ?? -1;
968
+ let N = 0;
969
+ for (const S of e.children)
970
+ N += S.widthInColumns ?? 1;
971
+ let x = e.children.length;
972
+ k > 0 && k < N && (x = k);
973
+ const g = Math.ceil(N / x);
974
+ let p = x * (l + B) + B, w = g * (s + B) + B;
1111
975
  if (p < a) {
1112
- L.debug(
976
+ m.debug(
1113
977
  `Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${i} width ${p}`
1114
978
  ), p = a, w = i;
1115
- const v = (a - y * O - O) / y, c = (i - u * O - O) / u;
1116
- L.debug("Size indata abc88", e.id, "childWidth", v, "maxWidth", l), L.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), L.debug("Size indata abc88 xSize", y, "padding", O);
979
+ const S = (a - x * B - B) / x, c = (i - g * B - B) / g;
980
+ m.debug("Size indata abc88", e.id, "childWidth", S, "maxWidth", l), m.debug("Size indata abc88", e.id, "childHeight", c, "maxHeight", s), m.debug("Size indata abc88 xSize", x, "padding", B);
1117
981
  for (const _ of e.children)
1118
- _.size && (_.size.width = v, _.size.height = c, _.size.x = 0, _.size.y = 0);
982
+ _.size && (_.size.width = S, _.size.height = c, _.size.x = 0, _.size.y = 0);
1119
983
  }
1120
- if (L.debug(
1121
- `abc95 (finale calc) ${e.id} xSize ${y} ySize ${u} columns ${T}${e.children.length} width=${Math.max(p, ((d = e.size) == null ? void 0 : d.width) || 0)}`
984
+ if (m.debug(
985
+ `abc95 (finale calc) ${e.id} xSize ${x} ySize ${g} columns ${k}${e.children.length} width=${Math.max(p, ((u = e.size) == null ? void 0 : u.width) || 0)}`
1122
986
  ), p < (((h = e == null ? void 0 : e.size) == null ? void 0 : h.width) || 0)) {
1123
- p = ((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) || 0;
1124
- const v = T > 0 ? Math.min(e.children.length, T) : e.children.length;
1125
- if (v > 0) {
1126
- const c = (p - v * O - O) / v;
1127
- L.debug("abc95 (growing to fit) width", e.id, p, (b = e.size) == null ? void 0 : b.width, c);
987
+ p = ((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) || 0;
988
+ const S = k > 0 ? Math.min(e.children.length, k) : e.children.length;
989
+ if (S > 0) {
990
+ const c = (p - S * B - B) / S;
991
+ m.debug("abc95 (growing to fit) width", e.id, p, (b = e.size) == null ? void 0 : b.width, c);
1128
992
  for (const _ of e.children)
1129
993
  _.size && (_.size.width = c);
1130
994
  }
@@ -1136,109 +1000,109 @@ function dt(e, t, a = 0, i = 0) {
1136
1000
  y: 0
1137
1001
  };
1138
1002
  }
1139
- L.debug(
1003
+ m.debug(
1140
1004
  "setBlockSizes abc94 (done)",
1141
1005
  e.id,
1142
- (m = e == null ? void 0 : e.size) == null ? void 0 : m.x,
1143
- (S = e == null ? void 0 : e.size) == null ? void 0 : S.width,
1144
- (k = e == null ? void 0 : e.size) == null ? void 0 : k.y,
1145
- (E = e == null ? void 0 : e.size) == null ? void 0 : E.height
1006
+ (L = e == null ? void 0 : e.size) == null ? void 0 : L.x,
1007
+ (E = e == null ? void 0 : e.size) == null ? void 0 : E.width,
1008
+ (D = e == null ? void 0 : e.size) == null ? void 0 : D.y,
1009
+ (v = e == null ? void 0 : e.size) == null ? void 0 : v.height
1146
1010
  );
1147
1011
  }
1148
- g(dt, "setBlockSizes");
1149
- function Ct(e, t) {
1150
- var i, l, s, r, n, o, d, h, x, b, m, S, k, E, N, T, D;
1151
- L.debug(
1012
+ d(ht, "setBlockSizes");
1013
+ function kt(e, t) {
1014
+ var i, l, s, r, n, o, u, h, y, b, L, E, D, v, T, k, N;
1015
+ m.debug(
1152
1016
  `abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.x} y: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.y} width: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.width}`
1153
1017
  );
1154
1018
  const a = e.columns ?? -1;
1155
- if (L.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
1019
+ if (m.debug("layoutBlocks columns abc95", e.id, "=>", a, e), e.children && // find max width of children
1156
1020
  e.children.length > 0) {
1157
- const y = ((n = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : n.width) ?? 0, u = e.children.length * y + (e.children.length - 1) * O;
1158
- L.debug("widthOfChildren 88", u, "posX");
1021
+ const x = ((n = (r = e == null ? void 0 : e.children[0]) == null ? void 0 : r.size) == null ? void 0 : n.width) ?? 0, g = e.children.length * x + (e.children.length - 1) * B;
1022
+ m.debug("widthOfChildren 88", g, "posX");
1159
1023
  let p = 0;
1160
- L.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
1161
- let w = (d = e == null ? void 0 : e.size) != null && d.x ? ((h = e == null ? void 0 : e.size) == null ? void 0 : h.x) + (-((x = e == null ? void 0 : e.size) == null ? void 0 : x.width) / 2 || 0) : -O, v = 0;
1024
+ m.debug("abc91 block?.size?.x", e.id, (o = e == null ? void 0 : e.size) == null ? void 0 : o.x);
1025
+ let w = (u = e == null ? void 0 : e.size) != null && u.x ? ((h = e == null ? void 0 : e.size) == null ? void 0 : h.x) + (-((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) / 2 || 0) : -B, S = 0;
1162
1026
  for (const c of e.children) {
1163
1027
  const _ = e;
1164
1028
  if (!c.size)
1165
1029
  continue;
1166
- const { width: f, height: M } = c.size, { px: A, py: H } = de(a, p);
1167
- if (H != v && (v = H, w = (b = e == null ? void 0 : e.size) != null && b.x ? ((m = e == null ? void 0 : e.size) == null ? void 0 : m.x) + (-((S = e == null ? void 0 : e.size) == null ? void 0 : S.width) / 2 || 0) : -O, L.debug("New row in layout for block", e.id, " and child ", c.id, v)), L.debug(
1168
- `abc89 layout blocks (child) id: ${c.id} Pos: ${p} (px, py) ${A},${H} (${(k = _ == null ? void 0 : _.size) == null ? void 0 : k.x},${(E = _ == null ? void 0 : _.size) == null ? void 0 : E.y}) parent: ${_.id} width: ${f}${O}`
1030
+ const { width: f, height: A } = c.size, { px: O, py: X } = Gt(a, p);
1031
+ if (X != S && (S = X, w = (b = e == null ? void 0 : e.size) != null && b.x ? ((L = e == null ? void 0 : e.size) == null ? void 0 : L.x) + (-((E = e == null ? void 0 : e.size) == null ? void 0 : E.width) / 2 || 0) : -B, m.debug("New row in layout for block", e.id, " and child ", c.id, S)), m.debug(
1032
+ `abc89 layout blocks (child) id: ${c.id} Pos: ${p} (px, py) ${O},${X} (${(D = _ == null ? void 0 : _.size) == null ? void 0 : D.x},${(v = _ == null ? void 0 : _.size) == null ? void 0 : v.y}) parent: ${_.id} width: ${f}${B}`
1169
1033
  ), _.size) {
1170
1034
  const J = f / 2;
1171
- c.size.x = w + O + J, L.debug(
1172
- `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${J} padding=${O} width=${f} halfWidth=${J} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1173
- ), w = c.size.x + J, c.size.y = _.size.y - _.size.height / 2 + H * (M + O) + M / 2 + O, L.debug(
1174
- `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${O}${J}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1035
+ c.size.x = w + B + J, m.debug(
1036
+ `abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${J} padding=${B} width=${f} halfWidth=${J} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1037
+ ), w = c.size.x + J, c.size.y = _.size.y - _.size.height / 2 + X * (A + B) + A / 2 + B, m.debug(
1038
+ `abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${B}${J}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${f * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
1175
1039
  );
1176
1040
  }
1177
- c.children && Ct(c);
1178
- let W = (c == null ? void 0 : c.widthInColumns) ?? 1;
1179
- a > 0 && (W = Math.min(W, a - p % a)), p += W, L.debug("abc88 columnsPos", c, p);
1041
+ c.children && kt(c);
1042
+ let P = (c == null ? void 0 : c.widthInColumns) ?? 1;
1043
+ a > 0 && (P = Math.min(P, a - p % a)), p += P, m.debug("abc88 columnsPos", c, p);
1180
1044
  }
1181
1045
  }
1182
- L.debug(
1183
- `layout blocks (<==layoutBlocks) ${e.id} x: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.x} y: ${(T = e == null ? void 0 : e.size) == null ? void 0 : T.y} width: ${(D = e == null ? void 0 : e.size) == null ? void 0 : D.width}`
1046
+ m.debug(
1047
+ `layout blocks (<==layoutBlocks) ${e.id} x: ${(T = e == null ? void 0 : e.size) == null ? void 0 : T.x} y: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.y} width: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.width}`
1184
1048
  );
1185
1049
  }
1186
- g(Ct, "layoutBlocks");
1187
- function It(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1050
+ d(kt, "layoutBlocks");
1051
+ function Dt(e, { minX: t, minY: a, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
1188
1052
  if (e.size && e.id !== "root") {
1189
1053
  const { x: s, y: r, width: n, height: o } = e.size;
1190
1054
  s - n / 2 < t && (t = s - n / 2), r - o / 2 < a && (a = r - o / 2), s + n / 2 > i && (i = s + n / 2), r + o / 2 > l && (l = r + o / 2);
1191
1055
  }
1192
1056
  if (e.children)
1193
1057
  for (const s of e.children)
1194
- ({ minX: t, minY: a, maxX: i, maxY: l } = It(s, { minX: t, minY: a, maxX: i, maxY: l }));
1058
+ ({ minX: t, minY: a, maxX: i, maxY: l } = Dt(s, { minX: t, minY: a, maxX: i, maxY: l }));
1195
1059
  return { minX: t, minY: a, maxX: i, maxY: l };
1196
1060
  }
1197
- g(It, "findBounds");
1198
- function pe(e) {
1061
+ d(Dt, "findBounds");
1062
+ function Zt(e) {
1199
1063
  const t = e.getBlock("root");
1200
1064
  if (!t)
1201
1065
  return;
1202
- dt(t, e, 0, 0), Ct(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
1203
- const { minX: a, minY: i, maxX: l, maxY: s } = It(t), r = s - i, n = l - a;
1066
+ ht(t, e, 0, 0), kt(t), m.debug("getBlocks", JSON.stringify(t, null, 2));
1067
+ const { minX: a, minY: i, maxX: l, maxY: s } = Dt(t), r = s - i, n = l - a;
1204
1068
  return { x: a, y: i, width: n, height: r };
1205
1069
  }
1206
- g(pe, "layout");
1207
- function Et(e, t) {
1070
+ d(Zt, "layout");
1071
+ function Lt(e, t) {
1208
1072
  t && e.attr("style", t);
1209
1073
  }
1210
- g(Et, "applyStyle");
1211
- function fe(e, t) {
1074
+ d(Lt, "applyStyle");
1075
+ function qt(e, t) {
1212
1076
  const a = R(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = a.append("xhtml:div"), l = e.label, s = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
1213
- return r.html(mt(l, t)), Et(r, e.labelStyle), r.attr("class", s), Et(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
1077
+ return r.html(yt(l, t)), Lt(r, e.labelStyle), r.attr("class", s), Lt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), a.node();
1214
1078
  }
1215
- g(fe, "addHtmlLabel");
1216
- var Ja = /* @__PURE__ */ g(async (e, t, a, i) => {
1079
+ d(qt, "addHtmlLabel");
1080
+ var lr = /* @__PURE__ */ d(async (e, t, a, i) => {
1217
1081
  let l = e || "";
1218
1082
  typeof l == "object" && (l = l[0]);
1219
1083
  const s = z();
1220
1084
  if (Z(s.flowchart.htmlLabels)) {
1221
- l = l.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + l);
1222
- const r = await Je(Lt(l)), n = {
1085
+ l = l.replace(/\\n|\n/g, "<br />"), m.debug("vertexText" + l);
1086
+ const r = await Le(bt(l)), n = {
1223
1087
  isNode: i,
1224
1088
  label: r,
1225
1089
  labelStyle: t.replace("fill:", "color:")
1226
1090
  };
1227
- return fe(n, s);
1091
+ return qt(n, s);
1228
1092
  } else {
1229
1093
  const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
1230
1094
  r.setAttribute("style", t.replace("color:", "fill:"));
1231
1095
  let n = [];
1232
1096
  typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
1233
1097
  for (const o of n) {
1234
- const d = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1235
- d.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), d.setAttribute("dy", "1em"), d.setAttribute("x", "0"), a ? d.setAttribute("class", "title-row") : d.setAttribute("class", "row"), d.textContent = o.trim(), r.appendChild(d);
1098
+ const u = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1099
+ u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), a ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = o.trim(), r.appendChild(u);
1236
1100
  }
1237
1101
  return r;
1238
1102
  }
1239
- }, "createLabel"), V = Ja, Qa = /* @__PURE__ */ g((e, t, a, i, l) => {
1240
- t.arrowTypeStart && Ut(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Ut(e, "end", t.arrowTypeEnd, a, i, l);
1241
- }, "addEdgeMarkers"), ts = {
1103
+ }, "createLabel"), j = lr, cr = /* @__PURE__ */ d((e, t, a, i, l) => {
1104
+ t.arrowTypeStart && Rt(e, "start", t.arrowTypeStart, a, i, l), t.arrowTypeEnd && Rt(e, "end", t.arrowTypeEnd, a, i, l);
1105
+ }, "addEdgeMarkers"), or = {
1242
1106
  arrow_cross: "cross",
1243
1107
  arrow_point: "point",
1244
1108
  arrow_barb: "barb",
@@ -1248,16 +1112,16 @@ var Ja = /* @__PURE__ */ g(async (e, t, a, i) => {
1248
1112
  composition: "composition",
1249
1113
  dependency: "dependency",
1250
1114
  lollipop: "lollipop"
1251
- }, Ut = /* @__PURE__ */ g((e, t, a, i, l, s) => {
1252
- const r = ts[a];
1115
+ }, Rt = /* @__PURE__ */ d((e, t, a, i, l, s) => {
1116
+ const r = or[a];
1253
1117
  if (!r) {
1254
- L.warn(`Unknown arrow type: ${a}`);
1118
+ m.warn(`Unknown arrow type: ${a}`);
1255
1119
  return;
1256
1120
  }
1257
1121
  const n = t === "start" ? "Start" : "End";
1258
1122
  e.attr(`marker-${t}`, `url(${i}#${l}_${s}-${r}${n})`);
1259
- }, "addEdgeMarker"), _t = {}, P = {}, es = /* @__PURE__ */ g(async (e, t) => {
1260
- const a = z(), i = Z(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? re(
1123
+ }, "addEdgeMarker"), St = {}, W = {}, hr = /* @__PURE__ */ d(async (e, t) => {
1124
+ const a = z(), i = Z(a.flowchart.htmlLabels), l = t.labelType === "markdown" ? Ht(
1261
1125
  e,
1262
1126
  t.label,
1263
1127
  {
@@ -1266,55 +1130,55 @@ var Ja = /* @__PURE__ */ g(async (e, t, a, i) => {
1266
1130
  addSvgBackground: !0
1267
1131
  },
1268
1132
  a
1269
- ) : await V(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
1133
+ ) : await j(t.label, t.labelStyle), s = e.insert("g").attr("class", "edgeLabel"), r = s.insert("g").attr("class", "label");
1270
1134
  r.node().appendChild(l);
1271
1135
  let n = l.getBBox();
1272
1136
  if (i) {
1273
- const d = l.children[0], h = R(l);
1274
- n = d.getBoundingClientRect(), h.attr("width", n.width), h.attr("height", n.height);
1137
+ const u = l.children[0], h = R(l);
1138
+ n = u.getBoundingClientRect(), h.attr("width", n.width), h.attr("height", n.height);
1275
1139
  }
1276
- r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), _t[t.id] = s, t.width = n.width, t.height = n.height;
1140
+ r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), St[t.id] = s, t.width = n.width, t.height = n.height;
1277
1141
  let o;
1278
1142
  if (t.startLabelLeft) {
1279
- const d = await V(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1280
- o = x.node().appendChild(d);
1281
- const b = d.getBBox();
1282
- x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = h, at(o, t.startLabelLeft);
1143
+ const u = await j(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1144
+ o = y.node().appendChild(u);
1145
+ const b = u.getBBox();
1146
+ y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = h, rt(o, t.startLabelLeft);
1283
1147
  }
1284
1148
  if (t.startLabelRight) {
1285
- const d = await V(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1286
- o = h.node().appendChild(d), x.node().appendChild(d);
1287
- const b = d.getBBox();
1288
- x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startRight = h, at(o, t.startLabelRight);
1149
+ const u = await j(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1150
+ o = h.node().appendChild(u), y.node().appendChild(u);
1151
+ const b = u.getBBox();
1152
+ y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), W[t.id] || (W[t.id] = {}), W[t.id].startRight = h, rt(o, t.startLabelRight);
1289
1153
  }
1290
1154
  if (t.endLabelLeft) {
1291
- const d = await V(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1292
- o = x.node().appendChild(d);
1293
- const b = d.getBBox();
1294
- x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(d), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = h, at(o, t.endLabelLeft);
1155
+ const u = await j(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1156
+ o = y.node().appendChild(u);
1157
+ const b = u.getBBox();
1158
+ y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(u), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = h, rt(o, t.endLabelLeft);
1295
1159
  }
1296
1160
  if (t.endLabelRight) {
1297
- const d = await V(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
1298
- o = x.node().appendChild(d);
1299
- const b = d.getBBox();
1300
- x.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(d), P[t.id] || (P[t.id] = {}), P[t.id].endRight = h, at(o, t.endLabelRight);
1161
+ const u = await j(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), y = h.insert("g").attr("class", "inner");
1162
+ o = y.node().appendChild(u);
1163
+ const b = u.getBBox();
1164
+ y.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), h.node().appendChild(u), W[t.id] || (W[t.id] = {}), W[t.id].endRight = h, rt(o, t.endLabelRight);
1301
1165
  }
1302
1166
  return l;
1303
1167
  }, "insertEdgeLabel");
1304
- function at(e, t) {
1168
+ function rt(e, t) {
1305
1169
  z().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1306
1170
  }
1307
- g(at, "setTerminalWidth");
1308
- var rs = /* @__PURE__ */ g((e, t) => {
1309
- L.debug("Moving label abc88 ", e.id, e.label, _t[e.id], t);
1171
+ d(rt, "setTerminalWidth");
1172
+ var dr = /* @__PURE__ */ d((e, t) => {
1173
+ m.debug("Moving label abc88 ", e.id, e.label, St[e.id], t);
1310
1174
  let a = t.updatedPath ? t.updatedPath : t.originalPath;
1311
- const i = z(), { subGraphTitleTotalMargin: l } = Ue(i);
1175
+ const i = z(), { subGraphTitleTotalMargin: l } = ue(i);
1312
1176
  if (e.label) {
1313
- const s = _t[e.id];
1177
+ const s = St[e.id];
1314
1178
  let r = e.x, n = e.y;
1315
1179
  if (a) {
1316
- const o = rt.calcLabelPosition(a);
1317
- L.debug(
1180
+ const o = et.calcLabelPosition(a);
1181
+ m.debug(
1318
1182
  "Moving label " + e.label + " from (",
1319
1183
  r,
1320
1184
  ",",
@@ -1329,19 +1193,19 @@ var rs = /* @__PURE__ */ g((e, t) => {
1329
1193
  s.attr("transform", `translate(${r}, ${n + l / 2})`);
1330
1194
  }
1331
1195
  if (e.startLabelLeft) {
1332
- const s = P[e.id].startLeft;
1196
+ const s = W[e.id].startLeft;
1333
1197
  let r = e.x, n = e.y;
1334
1198
  if (a) {
1335
- const o = rt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1199
+ const o = et.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
1336
1200
  r = o.x, n = o.y;
1337
1201
  }
1338
1202
  s.attr("transform", `translate(${r}, ${n})`);
1339
1203
  }
1340
1204
  if (e.startLabelRight) {
1341
- const s = P[e.id].startRight;
1205
+ const s = W[e.id].startRight;
1342
1206
  let r = e.x, n = e.y;
1343
1207
  if (a) {
1344
- const o = rt.calcTerminalLabelPosition(
1208
+ const o = et.calcTerminalLabelPosition(
1345
1209
  e.arrowTypeStart ? 10 : 0,
1346
1210
  "start_right",
1347
1211
  a
@@ -1351,53 +1215,53 @@ var rs = /* @__PURE__ */ g((e, t) => {
1351
1215
  s.attr("transform", `translate(${r}, ${n})`);
1352
1216
  }
1353
1217
  if (e.endLabelLeft) {
1354
- const s = P[e.id].endLeft;
1218
+ const s = W[e.id].endLeft;
1355
1219
  let r = e.x, n = e.y;
1356
1220
  if (a) {
1357
- const o = rt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1221
+ const o = et.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
1358
1222
  r = o.x, n = o.y;
1359
1223
  }
1360
1224
  s.attr("transform", `translate(${r}, ${n})`);
1361
1225
  }
1362
1226
  if (e.endLabelRight) {
1363
- const s = P[e.id].endRight;
1227
+ const s = W[e.id].endRight;
1364
1228
  let r = e.x, n = e.y;
1365
1229
  if (a) {
1366
- const o = rt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1230
+ const o = et.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
1367
1231
  r = o.x, n = o.y;
1368
1232
  }
1369
1233
  s.attr("transform", `translate(${r}, ${n})`);
1370
1234
  }
1371
- }, "positionEdgeLabel"), as = /* @__PURE__ */ g((e, t) => {
1235
+ }, "positionEdgeLabel"), gr = /* @__PURE__ */ d((e, t) => {
1372
1236
  const a = e.x, i = e.y, l = Math.abs(t.x - a), s = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
1373
1237
  return l >= r || s >= n;
1374
- }, "outsideNode"), ss = /* @__PURE__ */ g((e, t, a) => {
1375
- L.debug(`intersection calc abc89:
1238
+ }, "outsideNode"), ur = /* @__PURE__ */ d((e, t, a) => {
1239
+ m.debug(`intersection calc abc89:
1376
1240
  outsidePoint: ${JSON.stringify(t)}
1377
1241
  insidePoint : ${JSON.stringify(a)}
1378
1242
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1379
1243
  const i = e.x, l = e.y, s = Math.abs(i - a.x), r = e.width / 2;
1380
1244
  let n = a.x < t.x ? r - s : r + s;
1381
- const o = e.height / 2, d = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1245
+ const o = e.height / 2, u = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
1382
1246
  if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * o) {
1383
- let x = a.y < t.y ? t.y - o - l : l - o - t.y;
1384
- n = h * x / d;
1247
+ let y = a.y < t.y ? t.y - o - l : l - o - t.y;
1248
+ n = h * y / u;
1385
1249
  const b = {
1386
1250
  x: a.x < t.x ? a.x + n : a.x - h + n,
1387
- y: a.y < t.y ? a.y + d - x : a.y - d + x
1251
+ y: a.y < t.y ? a.y + u - y : a.y - u + y
1388
1252
  };
1389
- return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), d === 0 && (b.y = t.y), L.debug(`abc89 topp/bott calc, Q ${d}, q ${x}, R ${h}, r ${n}`, b), b;
1253
+ return n === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), u === 0 && (b.y = t.y), m.debug(`abc89 topp/bott calc, Q ${u}, q ${y}, R ${h}, r ${n}`, b), b;
1390
1254
  } else {
1391
1255
  a.x < t.x ? n = t.x - r - i : n = i - r - t.x;
1392
- let x = d * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, m = a.y < t.y ? a.y + x : a.y - x;
1393
- return L.debug(`sides calc abc89, Q ${d}, q ${x}, R ${h}, r ${n}`, { _x: b, _y: m }), n === 0 && (b = t.x, m = t.y), h === 0 && (b = t.x), d === 0 && (m = t.y), { x: b, y: m };
1256
+ let y = u * n / h, b = a.x < t.x ? a.x + h - n : a.x - h + n, L = a.y < t.y ? a.y + y : a.y - y;
1257
+ return m.debug(`sides calc abc89, Q ${u}, q ${y}, R ${h}, r ${n}`, { _x: b, _y: L }), n === 0 && (b = t.x, L = t.y), h === 0 && (b = t.x), u === 0 && (L = t.y), { x: b, y: L };
1394
1258
  }
1395
- }, "intersection"), Ht = /* @__PURE__ */ g((e, t) => {
1396
- L.debug("abc88 cutPathAtIntersect", e, t);
1259
+ }, "intersection"), zt = /* @__PURE__ */ d((e, t) => {
1260
+ m.debug("abc88 cutPathAtIntersect", e, t);
1397
1261
  let a = [], i = e[0], l = !1;
1398
1262
  return e.forEach((s) => {
1399
- if (!as(t, s) && !l) {
1400
- const r = ss(t, i, s);
1263
+ if (!gr(t, s) && !l) {
1264
+ const r = ur(t, i, s);
1401
1265
  let n = !1;
1402
1266
  a.forEach((o) => {
1403
1267
  n = n || o.x === r.x && o.y === r.y;
@@ -1405,48 +1269,48 @@ var rs = /* @__PURE__ */ g((e, t) => {
1405
1269
  } else
1406
1270
  i = s, l || a.push(s);
1407
1271
  }), a;
1408
- }, "cutPathAtIntersect"), is = /* @__PURE__ */ g(function(e, t, a, i, l, s, r) {
1272
+ }, "cutPathAtIntersect"), pr = /* @__PURE__ */ d(function(e, t, a, i, l, s, r) {
1409
1273
  let n = a.points;
1410
- L.debug("abc88 InsertEdge: edge=", a, "e=", t);
1274
+ m.debug("abc88 InsertEdge: edge=", a, "e=", t);
1411
1275
  let o = !1;
1412
- const d = s.node(t.v);
1276
+ const u = s.node(t.v);
1413
1277
  var h = s.node(t.w);
1414
- h != null && h.intersect && (d != null && d.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(d.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (L.debug("to cluster abc88", i[a.toCluster]), n = Ht(a.points, i[a.toCluster].node), o = !0), a.fromCluster && (L.debug("from cluster abc88", i[a.fromCluster]), n = Ht(n.reverse(), i[a.fromCluster].node).reverse(), o = !0);
1415
- const x = n.filter((y) => !Number.isNaN(y.y));
1416
- let b = qe;
1278
+ h != null && h.intersect && (u != null && u.intersect) && (n = n.slice(1, a.points.length - 1), n.unshift(u.intersect(n[0])), n.push(h.intersect(n[n.length - 1]))), a.toCluster && (m.debug("to cluster abc88", i[a.toCluster]), n = zt(a.points, i[a.toCluster].node), o = !0), a.fromCluster && (m.debug("from cluster abc88", i[a.fromCluster]), n = zt(n.reverse(), i[a.fromCluster].node).reverse(), o = !0);
1279
+ const y = n.filter((x) => !Number.isNaN(x.y));
1280
+ let b = me;
1417
1281
  a.curve && (l === "graph" || l === "flowchart") && (b = a.curve);
1418
- const { x: m, y: S } = He(a), k = Xe().x(m).y(S).curve(b);
1419
- let E;
1282
+ const { x: L, y: E } = pe(a), D = fe().x(L).y(E).curve(b);
1283
+ let v;
1420
1284
  switch (a.thickness) {
1421
1285
  case "normal":
1422
- E = "edge-thickness-normal";
1286
+ v = "edge-thickness-normal";
1423
1287
  break;
1424
1288
  case "thick":
1425
- E = "edge-thickness-thick";
1289
+ v = "edge-thickness-thick";
1426
1290
  break;
1427
1291
  case "invisible":
1428
- E = "edge-thickness-thick";
1292
+ v = "edge-thickness-thick";
1429
1293
  break;
1430
1294
  default:
1431
- E = "";
1295
+ v = "";
1432
1296
  }
1433
1297
  switch (a.pattern) {
1434
1298
  case "solid":
1435
- E += " edge-pattern-solid";
1299
+ v += " edge-pattern-solid";
1436
1300
  break;
1437
1301
  case "dotted":
1438
- E += " edge-pattern-dotted";
1302
+ v += " edge-pattern-dotted";
1439
1303
  break;
1440
1304
  case "dashed":
1441
- E += " edge-pattern-dashed";
1305
+ v += " edge-pattern-dashed";
1442
1306
  break;
1443
1307
  }
1444
- const N = e.append("path").attr("d", k(x)).attr("id", a.id).attr("class", " " + E + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1445
- let T = "";
1446
- (z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (T = Ve(!0)), Qa(N, a, T, r, l);
1447
- let D = {};
1448
- return o && (D.updatedPath = n), D.originalPath = a.points, D;
1449
- }, "insertEdge"), ns = /* @__PURE__ */ g((e) => {
1308
+ const T = e.append("path").attr("d", D(y)).attr("id", a.id).attr("class", " " + v + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1309
+ let k = "";
1310
+ (z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (k = xe(!0)), cr(T, a, k, r, l);
1311
+ let N = {};
1312
+ return o && (N.updatedPath = n), N.originalPath = a.points, N;
1313
+ }, "insertEdge"), fr = /* @__PURE__ */ d((e) => {
1450
1314
  const t = /* @__PURE__ */ new Set();
1451
1315
  for (const a of e)
1452
1316
  switch (a) {
@@ -1461,8 +1325,8 @@ var rs = /* @__PURE__ */ g((e, t) => {
1461
1325
  break;
1462
1326
  }
1463
1327
  return t;
1464
- }, "expandAndDeduplicateDirections"), ls = /* @__PURE__ */ g((e, t, a) => {
1465
- const i = ns(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, o = a.padding / 2;
1328
+ }, "expandAndDeduplicateDirections"), xr = /* @__PURE__ */ d((e, t, a) => {
1329
+ const i = fr(e), l = 2, s = t.height + 2 * a.padding, r = s / l, n = t.width + 2 * r + a.padding, o = a.padding / 2;
1466
1330
  return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1467
1331
  // Bottom
1468
1332
  { x: 0, y: 0 },
@@ -1594,123 +1458,123 @@ var rs = /* @__PURE__ */ g((e, t) => {
1594
1458
  { x: n, y: -o }
1595
1459
  ] : [{ x: 0, y: 0 }];
1596
1460
  }, "getArrowPoints");
1597
- function ye(e, t) {
1461
+ function Jt(e, t) {
1598
1462
  return e.intersect(t);
1599
1463
  }
1600
- g(ye, "intersectNode");
1601
- var cs = ye;
1602
- function xe(e, t, a, i) {
1603
- var l = e.x, s = e.y, r = l - i.x, n = s - i.y, o = Math.sqrt(t * t * n * n + a * a * r * r), d = Math.abs(t * a * r / o);
1604
- i.x < l && (d = -d);
1464
+ d(Jt, "intersectNode");
1465
+ var yr = Jt;
1466
+ function Qt(e, t, a, i) {
1467
+ var l = e.x, s = e.y, r = l - i.x, n = s - i.y, o = Math.sqrt(t * t * n * n + a * a * r * r), u = Math.abs(t * a * r / o);
1468
+ i.x < l && (u = -u);
1605
1469
  var h = Math.abs(t * a * n / o);
1606
- return i.y < s && (h = -h), { x: l + d, y: s + h };
1470
+ return i.y < s && (h = -h), { x: l + u, y: s + h };
1607
1471
  }
1608
- g(xe, "intersectEllipse");
1609
- var be = xe;
1610
- function we(e, t, a) {
1611
- return be(e, t, t, a);
1472
+ d(Qt, "intersectEllipse");
1473
+ var $t = Qt;
1474
+ function te(e, t, a) {
1475
+ return $t(e, t, t, a);
1612
1476
  }
1613
- g(we, "intersectCircle");
1614
- var os = we;
1615
- function me(e, t, a, i) {
1616
- var l, s, r, n, o, d, h, x, b, m, S, k, E, N, T;
1617
- if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, b = l * a.x + r * a.y + o, m = l * i.x + r * i.y + o, !(b !== 0 && m !== 0 && kt(b, m)) && (s = i.y - a.y, n = a.x - i.x, d = i.x * a.y - a.x * i.y, h = s * e.x + n * e.y + d, x = s * t.x + n * t.y + d, !(h !== 0 && x !== 0 && kt(h, x)) && (S = l * n - s * r, S !== 0)))
1618
- return k = Math.abs(S / 2), E = r * d - n * o, N = E < 0 ? (E - k) / S : (E + k) / S, E = s * o - l * d, T = E < 0 ? (E - k) / S : (E + k) / S, { x: N, y: T };
1477
+ d(te, "intersectCircle");
1478
+ var br = te;
1479
+ function ee(e, t, a, i) {
1480
+ var l, s, r, n, o, u, h, y, b, L, E, D, v, T, k;
1481
+ if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, b = l * a.x + r * a.y + o, L = l * i.x + r * i.y + o, !(b !== 0 && L !== 0 && vt(b, L)) && (s = i.y - a.y, n = a.x - i.x, u = i.x * a.y - a.x * i.y, h = s * e.x + n * e.y + u, y = s * t.x + n * t.y + u, !(h !== 0 && y !== 0 && vt(h, y)) && (E = l * n - s * r, E !== 0)))
1482
+ return D = Math.abs(E / 2), v = r * u - n * o, T = v < 0 ? (v - D) / E : (v + D) / E, v = s * o - l * u, k = v < 0 ? (v - D) / E : (v + D) / E, { x: T, y: k };
1619
1483
  }
1620
- g(me, "intersectLine");
1621
- function kt(e, t) {
1484
+ d(ee, "intersectLine");
1485
+ function vt(e, t) {
1622
1486
  return e * t > 0;
1623
1487
  }
1624
- g(kt, "sameSign");
1625
- var hs = me, gs = Le;
1626
- function Le(e, t, a) {
1488
+ d(vt, "sameSign");
1489
+ var wr = ee, mr = re;
1490
+ function re(e, t, a) {
1627
1491
  var i = e.x, l = e.y, s = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
1628
- typeof t.forEach == "function" ? t.forEach(function(S) {
1629
- r = Math.min(r, S.x), n = Math.min(n, S.y);
1492
+ typeof t.forEach == "function" ? t.forEach(function(E) {
1493
+ r = Math.min(r, E.x), n = Math.min(n, E.y);
1630
1494
  }) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
1631
- for (var o = i - e.width / 2 - r, d = l - e.height / 2 - n, h = 0; h < t.length; h++) {
1632
- var x = t[h], b = t[h < t.length - 1 ? h + 1 : 0], m = hs(
1495
+ for (var o = i - e.width / 2 - r, u = l - e.height / 2 - n, h = 0; h < t.length; h++) {
1496
+ var y = t[h], b = t[h < t.length - 1 ? h + 1 : 0], L = wr(
1633
1497
  e,
1634
1498
  a,
1635
- { x: o + x.x, y: d + x.y },
1636
- { x: o + b.x, y: d + b.y }
1499
+ { x: o + y.x, y: u + y.y },
1500
+ { x: o + b.x, y: u + b.y }
1637
1501
  );
1638
- m && s.push(m);
1502
+ L && s.push(L);
1639
1503
  }
1640
- return s.length ? (s.length > 1 && s.sort(function(S, k) {
1641
- var E = S.x - a.x, N = S.y - a.y, T = Math.sqrt(E * E + N * N), D = k.x - a.x, y = k.y - a.y, u = Math.sqrt(D * D + y * y);
1642
- return T < u ? -1 : T === u ? 0 : 1;
1504
+ return s.length ? (s.length > 1 && s.sort(function(E, D) {
1505
+ var v = E.x - a.x, T = E.y - a.y, k = Math.sqrt(v * v + T * T), N = D.x - a.x, x = D.y - a.y, g = Math.sqrt(N * N + x * x);
1506
+ return k < g ? -1 : k === g ? 0 : 1;
1643
1507
  }), s[0]) : e;
1644
1508
  }
1645
- g(Le, "intersectPolygon");
1646
- var us = /* @__PURE__ */ g((e, t) => {
1647
- var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, o, d;
1648
- return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), o = s === 0 ? 0 : n * l / s, d = n) : (l < 0 && (r = -r), o = r, d = l === 0 ? 0 : r * s / l), { x: a + o, y: i + d };
1649
- }, "intersectRect"), ds = us, I = {
1650
- node: cs,
1651
- circle: os,
1652
- ellipse: be,
1653
- polygon: gs,
1654
- rect: ds
1655
- }, F = /* @__PURE__ */ g(async (e, t, a, i) => {
1509
+ d(re, "intersectPolygon");
1510
+ var Lr = /* @__PURE__ */ d((e, t) => {
1511
+ var a = e.x, i = e.y, l = t.x - a, s = t.y - i, r = e.width / 2, n = e.height / 2, o, u;
1512
+ return Math.abs(s) * r > Math.abs(l) * n ? (s < 0 && (n = -n), o = s === 0 ? 0 : n * l / s, u = n) : (l < 0 && (r = -r), o = r, u = l === 0 ? 0 : r * s / l), { x: a + o, y: i + u };
1513
+ }, "intersectRect"), Sr = Lr, C = {
1514
+ node: yr,
1515
+ circle: br,
1516
+ ellipse: $t,
1517
+ polygon: mr,
1518
+ rect: Sr
1519
+ }, F = /* @__PURE__ */ d(async (e, t, a, i) => {
1656
1520
  const l = z();
1657
1521
  let s;
1658
1522
  const r = t.useHtmlLabels || Z(l.flowchart.htmlLabels);
1659
1523
  a ? s = a : s = "node default";
1660
1524
  const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), o = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
1661
- let d;
1662
- t.labelText === void 0 ? d = "" : d = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1525
+ let u;
1526
+ t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
1663
1527
  const h = o.node();
1664
- let x;
1665
- t.labelType === "markdown" ? x = re(
1528
+ let y;
1529
+ t.labelType === "markdown" ? y = Ht(
1666
1530
  o,
1667
- mt(Lt(d), l),
1531
+ yt(bt(u), l),
1668
1532
  {
1669
1533
  useHtmlLabels: r,
1670
1534
  width: t.width || l.flowchart.wrappingWidth,
1671
1535
  classes: "markdown-node-label"
1672
1536
  },
1673
1537
  l
1674
- ) : x = h.appendChild(
1675
- await V(
1676
- mt(Lt(d), l),
1538
+ ) : y = h.appendChild(
1539
+ await j(
1540
+ yt(bt(u), l),
1677
1541
  t.labelStyle,
1678
1542
  !1,
1679
1543
  i
1680
1544
  )
1681
1545
  );
1682
- let b = x.getBBox();
1683
- const m = t.padding / 2;
1546
+ let b = y.getBBox();
1547
+ const L = t.padding / 2;
1684
1548
  if (Z(l.flowchart.htmlLabels)) {
1685
- const S = x.children[0], k = R(x), E = S.getElementsByTagName("img");
1686
- if (E) {
1687
- const N = d.replace(/<img[^>]*>/g, "").trim() === "";
1549
+ const E = y.children[0], D = R(y), v = E.getElementsByTagName("img");
1550
+ if (v) {
1551
+ const T = u.replace(/<img[^>]*>/g, "").trim() === "";
1688
1552
  await Promise.all(
1689
- [...E].map(
1690
- (T) => new Promise((D) => {
1691
- function y() {
1692
- if (T.style.display = "flex", T.style.flexDirection = "column", N) {
1693
- const u = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, w = parseInt(u, 10) * 5 + "px";
1694
- T.style.minWidth = w, T.style.maxWidth = w;
1553
+ [...v].map(
1554
+ (k) => new Promise((N) => {
1555
+ function x() {
1556
+ if (k.style.display = "flex", k.style.flexDirection = "column", T) {
1557
+ const g = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, w = parseInt(g, 10) * 5 + "px";
1558
+ k.style.minWidth = w, k.style.maxWidth = w;
1695
1559
  } else
1696
- T.style.width = "100%";
1697
- D(T);
1560
+ k.style.width = "100%";
1561
+ N(k);
1698
1562
  }
1699
- g(y, "setupImage"), setTimeout(() => {
1700
- T.complete && y();
1701
- }), T.addEventListener("error", y), T.addEventListener("load", y);
1563
+ d(x, "setupImage"), setTimeout(() => {
1564
+ k.complete && x();
1565
+ }), k.addEventListener("error", x), k.addEventListener("load", x);
1702
1566
  })
1703
1567
  )
1704
1568
  );
1705
1569
  }
1706
- b = S.getBoundingClientRect(), k.attr("width", b.width), k.attr("height", b.height);
1570
+ b = E.getBoundingClientRect(), D.attr("width", b.width), D.attr("height", b.height);
1707
1571
  }
1708
- return r ? o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")") : o.attr("transform", "translate(0, " + -b.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: b, halfPadding: m, label: o };
1709
- }, "labelHelper"), B = /* @__PURE__ */ g((e, t) => {
1572
+ return r ? o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")") : o.attr("transform", "translate(0, " + -b.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -b.width / 2 + ", " + -b.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: b, halfPadding: L, label: o };
1573
+ }, "labelHelper"), I = /* @__PURE__ */ d((e, t) => {
1710
1574
  const a = t.node().getBBox();
1711
1575
  e.width = a.width, e.height = a.height;
1712
1576
  }, "updateNodeBounds");
1713
- function $(e, t, a, i) {
1577
+ function G(e, t, a, i) {
1714
1578
  return e.insert("polygon", ":first-child").attr(
1715
1579
  "points",
1716
1580
  i.map(function(l) {
@@ -1718,8 +1582,8 @@ function $(e, t, a, i) {
1718
1582
  }).join(" ")
1719
1583
  ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
1720
1584
  }
1721
- g($, "insertPolygonShape");
1722
- var ps = /* @__PURE__ */ g(async (e, t) => {
1585
+ d(G, "insertPolygonShape");
1586
+ var vr = /* @__PURE__ */ d(async (e, t) => {
1723
1587
  t.useHtmlLabels || z().flowchart.htmlLabels || (t.centerLabel = !0);
1724
1588
  const { shapeSvg: i, bbox: l, halfPadding: s } = await F(
1725
1589
  e,
@@ -1727,18 +1591,18 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1727
1591
  "node " + t.classes,
1728
1592
  !0
1729
1593
  );
1730
- L.info("Classes = ", t.classes);
1594
+ m.info("Classes = ", t.classes);
1731
1595
  const r = i.insert("rect", ":first-child");
1732
- return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), B(t, r), t.intersect = function(n) {
1733
- return I.rect(t, n);
1596
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -l.width / 2 - s).attr("y", -l.height / 2 - s).attr("width", l.width + t.padding).attr("height", l.height + t.padding), I(t, r), t.intersect = function(n) {
1597
+ return C.rect(t, n);
1734
1598
  }, i;
1735
- }, "note"), fs = ps, Xt = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), U = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Xt(e.classes)} ${Xt(
1599
+ }, "note"), Er = vr, At = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), K = /* @__PURE__ */ d((e, t) => `${t || "node default"}${At(e.classes)} ${At(
1736
1600
  e.class
1737
- )}`, "getClassesFromNode"), Vt = /* @__PURE__ */ g(async (e, t) => {
1601
+ )}`, "getClassesFromNode"), Mt = /* @__PURE__ */ d(async (e, t) => {
1738
1602
  const { shapeSvg: a, bbox: i } = await F(
1739
1603
  e,
1740
1604
  t,
1741
- U(t, void 0),
1605
+ K(t, void 0),
1742
1606
  !0
1743
1607
  ), l = i.width + t.padding, s = i.height + t.padding, r = l + s, n = [
1744
1608
  { x: r / 2, y: 0 },
@@ -1746,12 +1610,12 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1746
1610
  { x: r / 2, y: -r },
1747
1611
  { x: 0, y: -r / 2 }
1748
1612
  ];
1749
- L.info("Question main (Circle)");
1750
- const o = $(a, r, r, n);
1751
- return o.attr("style", t.style), B(t, o), t.intersect = function(d) {
1752
- return L.warn("Intersect called"), I.polygon(t, n, d);
1613
+ m.info("Question main (Circle)");
1614
+ const o = G(a, r, r, n);
1615
+ return o.attr("style", t.style), I(t, o), t.intersect = function(u) {
1616
+ return m.warn("Intersect called"), C.polygon(t, n, u);
1753
1617
  }, a;
1754
- }, "question"), ys = /* @__PURE__ */ g((e, t) => {
1618
+ }, "question"), _r = /* @__PURE__ */ d((e, t) => {
1755
1619
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
1756
1620
  { x: 0, y: i / 2 },
1757
1621
  { x: i / 2, y: 0 },
@@ -1764,13 +1628,13 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1764
1628
  return r.x + "," + r.y;
1765
1629
  }).join(" ")
1766
1630
  ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
1767
- return I.circle(t, 14, r);
1631
+ return C.circle(t, 14, r);
1768
1632
  }, a;
1769
- }, "choice"), xs = /* @__PURE__ */ g(async (e, t) => {
1633
+ }, "choice"), kr = /* @__PURE__ */ d(async (e, t) => {
1770
1634
  const { shapeSvg: a, bbox: i } = await F(
1771
1635
  e,
1772
1636
  t,
1773
- U(t, void 0),
1637
+ K(t, void 0),
1774
1638
  !0
1775
1639
  ), l = 4, s = i.height + t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = [
1776
1640
  { x: r, y: 0 },
@@ -1779,20 +1643,20 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1779
1643
  { x: n - r, y: -s },
1780
1644
  { x: r, y: -s },
1781
1645
  { x: 0, y: -s / 2 }
1782
- ], d = $(a, n, s, o);
1783
- return d.attr("style", t.style), B(t, d), t.intersect = function(h) {
1784
- return I.polygon(t, o, h);
1646
+ ], u = G(a, n, s, o);
1647
+ return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
1648
+ return C.polygon(t, o, h);
1785
1649
  }, a;
1786
- }, "hexagon"), bs = /* @__PURE__ */ g(async (e, t) => {
1787
- const { shapeSvg: a, bbox: i } = await F(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = ls(t.directions, i, t), d = $(a, n, s, o);
1788
- return d.attr("style", t.style), B(t, d), t.intersect = function(h) {
1789
- return I.polygon(t, o, h);
1650
+ }, "hexagon"), Dr = /* @__PURE__ */ d(async (e, t) => {
1651
+ const { shapeSvg: a, bbox: i } = await F(e, t, void 0, !0), l = 2, s = i.height + 2 * t.padding, r = s / l, n = i.width + 2 * r + t.padding, o = xr(t.directions, i, t), u = G(a, n, s, o);
1652
+ return u.attr("style", t.style), I(t, u), t.intersect = function(h) {
1653
+ return C.polygon(t, o, h);
1790
1654
  }, a;
1791
- }, "block_arrow"), ws = /* @__PURE__ */ g(async (e, t) => {
1655
+ }, "block_arrow"), Nr = /* @__PURE__ */ d(async (e, t) => {
1792
1656
  const { shapeSvg: a, bbox: i } = await F(
1793
1657
  e,
1794
1658
  t,
1795
- U(t, void 0),
1659
+ K(t, void 0),
1796
1660
  !0
1797
1661
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1798
1662
  { x: -s / 2, y: 0 },
@@ -1801,69 +1665,69 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1801
1665
  { x: -s / 2, y: -s },
1802
1666
  { x: 0, y: -s / 2 }
1803
1667
  ];
1804
- return $(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(o) {
1805
- return I.polygon(t, r, o);
1668
+ return G(a, l, s, r).attr("style", t.style), t.width = l + s, t.height = s, t.intersect = function(o) {
1669
+ return C.polygon(t, r, o);
1806
1670
  }, a;
1807
- }, "rect_left_inv_arrow"), ms = /* @__PURE__ */ g(async (e, t) => {
1808
- const { shapeSvg: a, bbox: i } = await F(e, t, U(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
1671
+ }, "rect_left_inv_arrow"), Tr = /* @__PURE__ */ d(async (e, t) => {
1672
+ const { shapeSvg: a, bbox: i } = await F(e, t, K(t), !0), l = i.width + t.padding, s = i.height + t.padding, r = [
1809
1673
  { x: -2 * s / 6, y: 0 },
1810
1674
  { x: l - s / 6, y: 0 },
1811
1675
  { x: l + 2 * s / 6, y: -s },
1812
1676
  { x: s / 6, y: -s }
1813
- ], n = $(a, l, s, r);
1814
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
1815
- return I.polygon(t, r, o);
1677
+ ], n = G(a, l, s, r);
1678
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1679
+ return C.polygon(t, r, o);
1816
1680
  }, a;
1817
- }, "lean_right"), Ls = /* @__PURE__ */ g(async (e, t) => {
1681
+ }, "lean_right"), Cr = /* @__PURE__ */ d(async (e, t) => {
1818
1682
  const { shapeSvg: a, bbox: i } = await F(
1819
1683
  e,
1820
1684
  t,
1821
- U(t, void 0),
1685
+ K(t, void 0),
1822
1686
  !0
1823
1687
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1824
1688
  { x: 2 * s / 6, y: 0 },
1825
1689
  { x: l + s / 6, y: 0 },
1826
1690
  { x: l - 2 * s / 6, y: -s },
1827
1691
  { x: -s / 6, y: -s }
1828
- ], n = $(a, l, s, r);
1829
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
1830
- return I.polygon(t, r, o);
1692
+ ], n = G(a, l, s, r);
1693
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1694
+ return C.polygon(t, r, o);
1831
1695
  }, a;
1832
- }, "lean_left"), Ss = /* @__PURE__ */ g(async (e, t) => {
1696
+ }, "lean_left"), Ir = /* @__PURE__ */ d(async (e, t) => {
1833
1697
  const { shapeSvg: a, bbox: i } = await F(
1834
1698
  e,
1835
1699
  t,
1836
- U(t, void 0),
1700
+ K(t, void 0),
1837
1701
  !0
1838
1702
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1839
1703
  { x: -2 * s / 6, y: 0 },
1840
1704
  { x: l + 2 * s / 6, y: 0 },
1841
1705
  { x: l - s / 6, y: -s },
1842
1706
  { x: s / 6, y: -s }
1843
- ], n = $(a, l, s, r);
1844
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
1845
- return I.polygon(t, r, o);
1707
+ ], n = G(a, l, s, r);
1708
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1709
+ return C.polygon(t, r, o);
1846
1710
  }, a;
1847
- }, "trapezoid"), vs = /* @__PURE__ */ g(async (e, t) => {
1711
+ }, "trapezoid"), Br = /* @__PURE__ */ d(async (e, t) => {
1848
1712
  const { shapeSvg: a, bbox: i } = await F(
1849
1713
  e,
1850
1714
  t,
1851
- U(t, void 0),
1715
+ K(t, void 0),
1852
1716
  !0
1853
1717
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1854
1718
  { x: s / 6, y: 0 },
1855
1719
  { x: l - s / 6, y: 0 },
1856
1720
  { x: l + 2 * s / 6, y: -s },
1857
1721
  { x: -2 * s / 6, y: -s }
1858
- ], n = $(a, l, s, r);
1859
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
1860
- return I.polygon(t, r, o);
1722
+ ], n = G(a, l, s, r);
1723
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1724
+ return C.polygon(t, r, o);
1861
1725
  }, a;
1862
- }, "inv_trapezoid"), Es = /* @__PURE__ */ g(async (e, t) => {
1726
+ }, "inv_trapezoid"), Or = /* @__PURE__ */ d(async (e, t) => {
1863
1727
  const { shapeSvg: a, bbox: i } = await F(
1864
1728
  e,
1865
1729
  t,
1866
- U(t, void 0),
1730
+ K(t, void 0),
1867
1731
  !0
1868
1732
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
1869
1733
  { x: 0, y: 0 },
@@ -1871,157 +1735,157 @@ var ps = /* @__PURE__ */ g(async (e, t) => {
1871
1735
  { x: l, y: -s / 2 },
1872
1736
  { x: l + s / 2, y: -s },
1873
1737
  { x: 0, y: -s }
1874
- ], n = $(a, l, s, r);
1875
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
1876
- return I.polygon(t, r, o);
1738
+ ], n = G(a, l, s, r);
1739
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1740
+ return C.polygon(t, r, o);
1877
1741
  }, a;
1878
- }, "rect_right_inv_arrow"), _s = /* @__PURE__ */ g(async (e, t) => {
1742
+ }, "rect_right_inv_arrow"), Rr = /* @__PURE__ */ d(async (e, t) => {
1879
1743
  const { shapeSvg: a, bbox: i } = await F(
1880
1744
  e,
1881
1745
  t,
1882
- U(t, void 0),
1746
+ K(t, void 0),
1883
1747
  !0
1884
- ), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, d = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
1885
- return B(t, d), t.intersect = function(h) {
1886
- const x = I.rect(t, h), b = x.x - t.x;
1887
- if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - r)) {
1888
- let m = r * r * (1 - b * b / (s * s));
1889
- m != 0 && (m = Math.sqrt(m)), m = r - m, h.y - t.y > 0 && (m = -m), x.y += m;
1748
+ ), l = i.width + t.padding, s = l / 2, r = s / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + s + "," + r + " 0,0,0 " + l + " 0 a " + s + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + s + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = a.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
1749
+ return I(t, u), t.intersect = function(h) {
1750
+ const y = C.rect(t, h), b = y.x - t.x;
1751
+ if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(y.y - t.y) > t.height / 2 - r)) {
1752
+ let L = r * r * (1 - b * b / (s * s));
1753
+ L != 0 && (L = Math.sqrt(L)), L = r - L, h.y - t.y > 0 && (L = -L), y.y += L;
1890
1754
  }
1891
- return x;
1755
+ return y;
1892
1756
  }, a;
1893
- }, "cylinder"), ks = /* @__PURE__ */ g(async (e, t) => {
1757
+ }, "cylinder"), zr = /* @__PURE__ */ d(async (e, t) => {
1894
1758
  const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1895
1759
  e,
1896
1760
  t,
1897
1761
  "node " + t.classes + " " + t.class,
1898
1762
  !0
1899
- ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
1900
- if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", d).attr("width", r).attr("height", n), t.props) {
1763
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1764
+ if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", u).attr("width", r).attr("height", n), t.props) {
1901
1765
  const h = new Set(Object.keys(t.props));
1902
- t.props.borders && (pt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((x) => {
1903
- L.warn(`Unknown node property ${x}`);
1766
+ t.props.borders && (dt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((y) => {
1767
+ m.warn(`Unknown node property ${y}`);
1904
1768
  });
1905
1769
  }
1906
- return B(t, s), t.intersect = function(h) {
1907
- return I.rect(t, h);
1770
+ return I(t, s), t.intersect = function(h) {
1771
+ return C.rect(t, h);
1908
1772
  }, a;
1909
- }, "rect"), Ts = /* @__PURE__ */ g(async (e, t) => {
1773
+ }, "rect"), Ar = /* @__PURE__ */ d(async (e, t) => {
1910
1774
  const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
1911
1775
  e,
1912
1776
  t,
1913
1777
  "node " + t.classes,
1914
1778
  !0
1915
- ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, d = t.positioned ? -n / 2 : -i.height / 2 - l;
1916
- 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", d).attr("width", r).attr("height", n), t.props) {
1779
+ ), s = a.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
1780
+ 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", u).attr("width", r).attr("height", n), t.props) {
1917
1781
  const h = new Set(Object.keys(t.props));
1918
- t.props.borders && (pt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((x) => {
1919
- L.warn(`Unknown node property ${x}`);
1782
+ t.props.borders && (dt(s, t.props.borders, r, n), h.delete("borders")), h.forEach((y) => {
1783
+ m.warn(`Unknown node property ${y}`);
1920
1784
  });
1921
1785
  }
1922
- return B(t, s), t.intersect = function(h) {
1923
- return I.rect(t, h);
1786
+ return I(t, s), t.intersect = function(h) {
1787
+ return C.rect(t, h);
1924
1788
  }, a;
1925
- }, "composite"), Ds = /* @__PURE__ */ g(async (e, t) => {
1789
+ }, "composite"), Mr = /* @__PURE__ */ d(async (e, t) => {
1926
1790
  const { shapeSvg: a } = await F(e, t, "label", !0);
1927
- L.trace("Classes = ", t.class);
1791
+ m.trace("Classes = ", t.class);
1928
1792
  const i = a.insert("rect", ":first-child"), l = 0, s = 0;
1929
1793
  if (i.attr("width", l).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
1930
1794
  const r = new Set(Object.keys(t.props));
1931
- t.props.borders && (pt(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
1932
- L.warn(`Unknown node property ${n}`);
1795
+ t.props.borders && (dt(i, t.props.borders, l, s), r.delete("borders")), r.forEach((n) => {
1796
+ m.warn(`Unknown node property ${n}`);
1933
1797
  });
1934
1798
  }
1935
- return B(t, i), t.intersect = function(r) {
1936
- return I.rect(t, r);
1799
+ return I(t, i), t.intersect = function(r) {
1800
+ return C.rect(t, r);
1937
1801
  }, a;
1938
1802
  }, "labelRect");
1939
- function pt(e, t, a, i) {
1940
- const l = [], s = /* @__PURE__ */ g((n) => {
1803
+ function dt(e, t, a, i) {
1804
+ const l = [], s = /* @__PURE__ */ d((n) => {
1941
1805
  l.push(n, 0);
1942
- }, "addBorder"), r = /* @__PURE__ */ g((n) => {
1806
+ }, "addBorder"), r = /* @__PURE__ */ d((n) => {
1943
1807
  l.push(0, n);
1944
1808
  }, "skipBorder");
1945
- t.includes("t") ? (L.debug("add top border"), s(a)) : r(a), t.includes("r") ? (L.debug("add right border"), s(i)) : r(i), t.includes("b") ? (L.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (L.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
1809
+ t.includes("t") ? (m.debug("add top border"), s(a)) : r(a), t.includes("r") ? (m.debug("add right border"), s(i)) : r(i), t.includes("b") ? (m.debug("add bottom border"), s(a)) : r(a), t.includes("l") ? (m.debug("add left border"), s(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
1946
1810
  }
1947
- g(pt, "applyNodePropertyBorders");
1948
- var Ns = /* @__PURE__ */ g(async (e, t) => {
1811
+ d(dt, "applyNodePropertyBorders");
1812
+ var Fr = /* @__PURE__ */ d(async (e, t) => {
1949
1813
  let a;
1950
1814
  t.classes ? a = "node " + t.classes : a = "node default";
1951
1815
  const i = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), s = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
1952
1816
  let o = "";
1953
- typeof n == "object" ? o = n[0] : o = n, L.info("Label text abc79", o, n, typeof n == "object");
1954
- const d = r.node().appendChild(await V(o, t.labelStyle, !0, !0));
1817
+ typeof n == "object" ? o = n[0] : o = n, m.info("Label text abc79", o, n, typeof n == "object");
1818
+ const u = r.node().appendChild(await j(o, t.labelStyle, !0, !0));
1955
1819
  let h = { width: 0, height: 0 };
1956
1820
  if (Z(z().flowchart.htmlLabels)) {
1957
- const k = d.children[0], E = R(d);
1958
- h = k.getBoundingClientRect(), E.attr("width", h.width), E.attr("height", h.height);
1821
+ const D = u.children[0], v = R(u);
1822
+ h = D.getBoundingClientRect(), v.attr("width", h.width), v.attr("height", h.height);
1959
1823
  }
1960
- L.info("Text 2", n);
1961
- const x = n.slice(1, n.length);
1962
- let b = d.getBBox();
1963
- const m = r.node().appendChild(
1964
- await V(
1965
- x.join ? x.join("<br/>") : x,
1824
+ m.info("Text 2", n);
1825
+ const y = n.slice(1, n.length);
1826
+ let b = u.getBBox();
1827
+ const L = r.node().appendChild(
1828
+ await j(
1829
+ y.join ? y.join("<br/>") : y,
1966
1830
  t.labelStyle,
1967
1831
  !0,
1968
1832
  !0
1969
1833
  )
1970
1834
  );
1971
1835
  if (Z(z().flowchart.htmlLabels)) {
1972
- const k = m.children[0], E = R(m);
1973
- h = k.getBoundingClientRect(), E.attr("width", h.width), E.attr("height", h.height);
1836
+ const D = L.children[0], v = R(L);
1837
+ h = D.getBoundingClientRect(), v.attr("width", h.width), v.attr("height", h.height);
1974
1838
  }
1975
- const S = t.padding / 2;
1976
- return R(m).attr(
1839
+ const E = t.padding / 2;
1840
+ return R(L).attr(
1977
1841
  "transform",
1978
1842
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1979
- (h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + S + 5) + ")"
1980
- ), R(d).attr(
1843
+ (h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + E + 5) + ")"
1844
+ ), R(u).attr(
1981
1845
  "transform",
1982
1846
  "translate( " + // (titleBox.width - bbox.width) / 2 +
1983
1847
  (h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
1984
1848
  ), h = r.node().getBBox(), r.attr(
1985
1849
  "transform",
1986
- "translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
1987
- ), l.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + b.height + S).attr("y2", -h.height / 2 - S + b.height + S), B(t, l), t.intersect = function(k) {
1988
- return I.rect(t, k);
1850
+ "translate(" + -h.width / 2 + ", " + (-h.height / 2 - E + 3) + ")"
1851
+ ), l.attr("class", "outer title-state").attr("x", -h.width / 2 - E).attr("y", -h.height / 2 - E).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - E).attr("x2", h.width / 2 + E).attr("y1", -h.height / 2 - E + b.height + E).attr("y2", -h.height / 2 - E + b.height + E), I(t, l), t.intersect = function(D) {
1852
+ return C.rect(t, D);
1989
1853
  }, i;
1990
- }, "rectWithTitle"), Cs = /* @__PURE__ */ g(async (e, t) => {
1854
+ }, "rectWithTitle"), Wr = /* @__PURE__ */ d(async (e, t) => {
1991
1855
  const { shapeSvg: a, bbox: i } = await F(
1992
1856
  e,
1993
1857
  t,
1994
- U(t, void 0),
1858
+ K(t, void 0),
1995
1859
  !0
1996
1860
  ), l = i.height + t.padding, s = i.width + l / 4 + t.padding, r = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -s / 2).attr("y", -l / 2).attr("width", s).attr("height", l);
1997
- return B(t, r), t.intersect = function(n) {
1998
- return I.rect(t, n);
1861
+ return I(t, r), t.intersect = function(n) {
1862
+ return C.rect(t, n);
1999
1863
  }, a;
2000
- }, "stadium"), Is = /* @__PURE__ */ g(async (e, t) => {
1864
+ }, "stadium"), Pr = /* @__PURE__ */ d(async (e, t) => {
2001
1865
  const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
2002
1866
  e,
2003
1867
  t,
2004
- U(t, void 0),
1868
+ K(t, void 0),
2005
1869
  !0
2006
1870
  ), s = a.insert("circle", ":first-child");
2007
- return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("Circle main"), B(t, s), t.intersect = function(r) {
2008
- return L.info("Circle intersect", t, i.width / 2 + l, r), I.circle(t, i.width / 2 + l, r);
1871
+ return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), m.info("Circle main"), I(t, s), t.intersect = function(r) {
1872
+ return m.info("Circle intersect", t, i.width / 2 + l, r), C.circle(t, i.width / 2 + l, r);
2009
1873
  }, a;
2010
- }, "circle"), Bs = /* @__PURE__ */ g(async (e, t) => {
1874
+ }, "circle"), Yr = /* @__PURE__ */ d(async (e, t) => {
2011
1875
  const { shapeSvg: a, bbox: i, halfPadding: l } = await F(
2012
1876
  e,
2013
1877
  t,
2014
- U(t, void 0),
1878
+ K(t, void 0),
2015
1879
  !0
2016
1880
  ), s = 5, r = a.insert("g", ":first-child"), n = r.insert("circle"), o = r.insert("circle");
2017
- return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), L.info("DoubleCircle main"), B(t, n), t.intersect = function(d) {
2018
- return L.info("DoubleCircle intersect", t, i.width / 2 + l + s, d), I.circle(t, i.width / 2 + l + s, d);
1881
+ return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + s).attr("width", i.width + t.padding + s * 2).attr("height", i.height + t.padding + s * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), m.info("DoubleCircle main"), I(t, n), t.intersect = function(u) {
1882
+ return m.info("DoubleCircle intersect", t, i.width / 2 + l + s, u), C.circle(t, i.width / 2 + l + s, u);
2019
1883
  }, a;
2020
- }, "doublecircle"), Os = /* @__PURE__ */ g(async (e, t) => {
1884
+ }, "doublecircle"), Hr = /* @__PURE__ */ d(async (e, t) => {
2021
1885
  const { shapeSvg: a, bbox: i } = await F(
2022
1886
  e,
2023
1887
  t,
2024
- U(t, void 0),
1888
+ K(t, void 0),
2025
1889
  !0
2026
1890
  ), l = i.width + t.padding, s = i.height + t.padding, r = [
2027
1891
  { x: 0, y: 0 },
@@ -2034,159 +1898,159 @@ var Ns = /* @__PURE__ */ g(async (e, t) => {
2034
1898
  { x: l + 8, y: -s },
2035
1899
  { x: -8, y: -s },
2036
1900
  { x: -8, y: 0 }
2037
- ], n = $(a, l, s, r);
2038
- return n.attr("style", t.style), B(t, n), t.intersect = function(o) {
2039
- return I.polygon(t, r, o);
1901
+ ], n = G(a, l, s, r);
1902
+ return n.attr("style", t.style), I(t, n), t.intersect = function(o) {
1903
+ return C.polygon(t, r, o);
2040
1904
  }, a;
2041
- }, "subroutine"), As = /* @__PURE__ */ g((e, t) => {
1905
+ }, "subroutine"), Kr = /* @__PURE__ */ d((e, t) => {
2042
1906
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child");
2043
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), B(t, i), t.intersect = function(l) {
2044
- return I.circle(t, 7, l);
1907
+ return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), I(t, i), t.intersect = function(l) {
1908
+ return C.circle(t, 7, l);
2045
1909
  }, a;
2046
- }, "start"), Gt = /* @__PURE__ */ g((e, t, a) => {
1910
+ }, "start"), Ft = /* @__PURE__ */ d((e, t, a) => {
2047
1911
  const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2048
1912
  let l = 70, s = 10;
2049
1913
  a === "LR" && (l = 10, s = 70);
2050
1914
  const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * s / 2).attr("width", l).attr("height", s).attr("class", "fork-join");
2051
- return B(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
2052
- return I.rect(t, n);
1915
+ return I(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
1916
+ return C.rect(t, n);
2053
1917
  }, i;
2054
- }, "forkJoin"), Rs = /* @__PURE__ */ g((e, t) => {
1918
+ }, "forkJoin"), Xr = /* @__PURE__ */ d((e, t) => {
2055
1919
  const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
2056
- return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), B(t, l), t.intersect = function(s) {
2057
- return I.circle(t, 7, s);
1920
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), I(t, l), t.intersect = function(s) {
1921
+ return C.circle(t, 7, s);
2058
1922
  }, a;
2059
- }, "end"), zs = /* @__PURE__ */ g(async (e, t) => {
2060
- var v;
1923
+ }, "end"), Ur = /* @__PURE__ */ d(async (e, t) => {
1924
+ var S;
2061
1925
  const a = t.padding / 2, i = 4, l = 8;
2062
1926
  let s;
2063
1927
  t.classes ? s = "node " + t.classes : s = "node default";
2064
- const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), o = r.insert("line"), d = r.insert("line");
2065
- let h = 0, x = i;
1928
+ const r = e.insert("g").attr("class", s).attr("id", t.domId || t.id), n = r.insert("rect", ":first-child"), o = r.insert("line"), u = r.insert("line");
1929
+ let h = 0, y = i;
2066
1930
  const b = r.insert("g").attr("class", "label");
2067
- let m = 0;
2068
- const S = (v = t.classData.annotations) == null ? void 0 : v[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", E = b.node().appendChild(await V(k, t.labelStyle, !0, !0));
2069
- let N = E.getBBox();
1931
+ let L = 0;
1932
+ const E = (S = t.classData.annotations) == null ? void 0 : S[0], D = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", v = b.node().appendChild(await j(D, t.labelStyle, !0, !0));
1933
+ let T = v.getBBox();
2070
1934
  if (Z(z().flowchart.htmlLabels)) {
2071
- const c = E.children[0], _ = R(E);
2072
- N = c.getBoundingClientRect(), _.attr("width", N.width), _.attr("height", N.height);
1935
+ const c = v.children[0], _ = R(v);
1936
+ T = c.getBoundingClientRect(), _.attr("width", T.width), _.attr("height", T.height);
2073
1937
  }
2074
- t.classData.annotations[0] && (x += N.height + i, h += N.width);
2075
- let T = t.classData.label;
2076
- t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ? T += "&lt;" + t.classData.type + "&gt;" : T += "<" + t.classData.type + ">");
2077
- const D = b.node().appendChild(await V(T, t.labelStyle, !0, !0));
2078
- R(D).attr("class", "classTitle");
2079
- let y = D.getBBox();
1938
+ t.classData.annotations[0] && (y += T.height + i, h += T.width);
1939
+ let k = t.classData.label;
1940
+ t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ? k += "&lt;" + t.classData.type + "&gt;" : k += "<" + t.classData.type + ">");
1941
+ const N = b.node().appendChild(await j(k, t.labelStyle, !0, !0));
1942
+ R(N).attr("class", "classTitle");
1943
+ let x = N.getBBox();
2080
1944
  if (Z(z().flowchart.htmlLabels)) {
2081
- const c = D.children[0], _ = R(D);
2082
- y = c.getBoundingClientRect(), _.attr("width", y.width), _.attr("height", y.height);
1945
+ const c = N.children[0], _ = R(N);
1946
+ x = c.getBoundingClientRect(), _.attr("width", x.width), _.attr("height", x.height);
2083
1947
  }
2084
- x += y.height + i, y.width > h && (h = y.width);
2085
- const u = [];
1948
+ y += x.height + i, x.width > h && (h = x.width);
1949
+ const g = [];
2086
1950
  t.classData.members.forEach(async (c) => {
2087
1951
  const _ = c.getDisplayDetails();
2088
1952
  let f = _.displayText;
2089
1953
  z().flowchart.htmlLabels && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2090
- const M = b.node().appendChild(
2091
- await V(
1954
+ const A = b.node().appendChild(
1955
+ await j(
2092
1956
  f,
2093
1957
  _.cssStyle ? _.cssStyle : t.labelStyle,
2094
1958
  !0,
2095
1959
  !0
2096
1960
  )
2097
1961
  );
2098
- let A = M.getBBox();
1962
+ let O = A.getBBox();
2099
1963
  if (Z(z().flowchart.htmlLabels)) {
2100
- const H = M.children[0], W = R(M);
2101
- A = H.getBoundingClientRect(), W.attr("width", A.width), W.attr("height", A.height);
1964
+ const X = A.children[0], P = R(A);
1965
+ O = X.getBoundingClientRect(), P.attr("width", O.width), P.attr("height", O.height);
2102
1966
  }
2103
- A.width > h && (h = A.width), x += A.height + i, u.push(M);
2104
- }), x += l;
1967
+ O.width > h && (h = O.width), y += O.height + i, g.push(A);
1968
+ }), y += l;
2105
1969
  const p = [];
2106
1970
  if (t.classData.methods.forEach(async (c) => {
2107
1971
  const _ = c.getDisplayDetails();
2108
1972
  let f = _.displayText;
2109
1973
  z().flowchart.htmlLabels && (f = f.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
2110
- const M = b.node().appendChild(
2111
- await V(
1974
+ const A = b.node().appendChild(
1975
+ await j(
2112
1976
  f,
2113
1977
  _.cssStyle ? _.cssStyle : t.labelStyle,
2114
1978
  !0,
2115
1979
  !0
2116
1980
  )
2117
1981
  );
2118
- let A = M.getBBox();
1982
+ let O = A.getBBox();
2119
1983
  if (Z(z().flowchart.htmlLabels)) {
2120
- const H = M.children[0], W = R(M);
2121
- A = H.getBoundingClientRect(), W.attr("width", A.width), W.attr("height", A.height);
1984
+ const X = A.children[0], P = R(A);
1985
+ O = X.getBoundingClientRect(), P.attr("width", O.width), P.attr("height", O.height);
2122
1986
  }
2123
- A.width > h && (h = A.width), x += A.height + i, p.push(M);
2124
- }), x += l, S) {
2125
- let c = (h - N.width) / 2;
2126
- R(E).attr(
1987
+ O.width > h && (h = O.width), y += O.height + i, p.push(A);
1988
+ }), y += l, E) {
1989
+ let c = (h - T.width) / 2;
1990
+ R(v).attr(
2127
1991
  "transform",
2128
- "translate( " + (-1 * h / 2 + c) + ", " + -1 * x / 2 + ")"
2129
- ), m = N.height + i;
1992
+ "translate( " + (-1 * h / 2 + c) + ", " + -1 * y / 2 + ")"
1993
+ ), L = T.height + i;
2130
1994
  }
2131
- let w = (h - y.width) / 2;
2132
- return R(D).attr(
1995
+ let w = (h - x.width) / 2;
1996
+ return R(N).attr(
2133
1997
  "transform",
2134
- "translate( " + (-1 * h / 2 + w) + ", " + (-1 * x / 2 + m) + ")"
2135
- ), m += y.height + i, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -x / 2 - a + l + m).attr("y2", -x / 2 - a + l + m), m += l, u.forEach((c) => {
1998
+ "translate( " + (-1 * h / 2 + w) + ", " + (-1 * y / 2 + L) + ")"
1999
+ ), L += x.height + i, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + L).attr("y2", -y / 2 - a + l + L), L += l, g.forEach((c) => {
2136
2000
  R(c).attr(
2137
2001
  "transform",
2138
- "translate( " + -h / 2 + ", " + (-1 * x / 2 + m + l / 2) + ")"
2002
+ "translate( " + -h / 2 + ", " + (-1 * y / 2 + L + l / 2) + ")"
2139
2003
  );
2140
2004
  const _ = c == null ? void 0 : c.getBBox();
2141
- m += ((_ == null ? void 0 : _.height) ?? 0) + i;
2142
- }), m += l, d.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -x / 2 - a + l + m).attr("y2", -x / 2 - a + l + m), m += l, p.forEach((c) => {
2005
+ L += ((_ == null ? void 0 : _.height) ?? 0) + i;
2006
+ }), L += l, u.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -y / 2 - a + l + L).attr("y2", -y / 2 - a + l + L), L += l, p.forEach((c) => {
2143
2007
  R(c).attr(
2144
2008
  "transform",
2145
- "translate( " + -h / 2 + ", " + (-1 * x / 2 + m) + ")"
2009
+ "translate( " + -h / 2 + ", " + (-1 * y / 2 + L) + ")"
2146
2010
  );
2147
2011
  const _ = c == null ? void 0 : c.getBBox();
2148
- m += ((_ == null ? void 0 : _.height) ?? 0) + i;
2149
- }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(x / 2) - a).attr("width", h + t.padding).attr("height", x + t.padding), B(t, n), t.intersect = function(c) {
2150
- return I.rect(t, c);
2012
+ L += ((_ == null ? void 0 : _.height) ?? 0) + i;
2013
+ }), n.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(y / 2) - a).attr("width", h + t.padding).attr("height", y + t.padding), I(t, n), t.intersect = function(c) {
2014
+ return C.rect(t, c);
2151
2015
  }, r;
2152
- }, "class_box"), $t = {
2153
- rhombus: Vt,
2154
- composite: Ts,
2155
- question: Vt,
2156
- rect: ks,
2157
- labelRect: Ds,
2158
- rectWithTitle: Ns,
2159
- choice: ys,
2160
- circle: Is,
2161
- doublecircle: Bs,
2162
- stadium: Cs,
2163
- hexagon: xs,
2164
- block_arrow: bs,
2165
- rect_left_inv_arrow: ws,
2166
- lean_right: ms,
2167
- lean_left: Ls,
2168
- trapezoid: Ss,
2169
- inv_trapezoid: vs,
2170
- rect_right_inv_arrow: Es,
2171
- cylinder: _s,
2172
- start: As,
2173
- end: Rs,
2174
- note: fs,
2175
- subroutine: Os,
2176
- fork: Gt,
2177
- join: Gt,
2178
- class_box: zs
2179
- }, ht = {}, Se = /* @__PURE__ */ g(async (e, t, a) => {
2016
+ }, "class_box"), Wt = {
2017
+ rhombus: Mt,
2018
+ composite: Ar,
2019
+ question: Mt,
2020
+ rect: zr,
2021
+ labelRect: Mr,
2022
+ rectWithTitle: Fr,
2023
+ choice: _r,
2024
+ circle: Pr,
2025
+ doublecircle: Yr,
2026
+ stadium: Wr,
2027
+ hexagon: kr,
2028
+ block_arrow: Dr,
2029
+ rect_left_inv_arrow: Nr,
2030
+ lean_right: Tr,
2031
+ lean_left: Cr,
2032
+ trapezoid: Ir,
2033
+ inv_trapezoid: Br,
2034
+ rect_right_inv_arrow: Or,
2035
+ cylinder: Rr,
2036
+ start: Kr,
2037
+ end: Xr,
2038
+ note: Er,
2039
+ subroutine: Hr,
2040
+ fork: Ft,
2041
+ join: Ft,
2042
+ class_box: Ur
2043
+ }, ct = {}, ae = /* @__PURE__ */ d(async (e, t, a) => {
2180
2044
  let i, l;
2181
2045
  if (t.link) {
2182
2046
  let s;
2183
- z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await $t[t.shape](i, t, a);
2047
+ z().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", s), l = await Wt[t.shape](i, t, a);
2184
2048
  } else
2185
- l = await $t[t.shape](e, t, a), i = l;
2186
- return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), ht[t.id] = i, t.haveCallback && ht[t.id].attr("class", ht[t.id].attr("class") + " clickable"), i;
2187
- }, "insertNode"), Ms = /* @__PURE__ */ g((e) => {
2188
- const t = ht[e.id];
2189
- L.trace(
2049
+ l = await Wt[t.shape](e, t, a), i = l;
2050
+ return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), ct[t.id] = i, t.haveCallback && ct[t.id].attr("class", ct[t.id].attr("class") + " clickable"), i;
2051
+ }, "insertNode"), jr = /* @__PURE__ */ d((e) => {
2052
+ const t = ct[e.id];
2053
+ m.trace(
2190
2054
  "Transforming node",
2191
2055
  e.diff,
2192
2056
  e,
@@ -2198,8 +2062,8 @@ var Ns = /* @__PURE__ */ g(async (e, t) => {
2198
2062
  "translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
2199
2063
  ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
2200
2064
  }, "positionNode");
2201
- function Bt(e, t, a = !1) {
2202
- var b, m, S;
2065
+ function Nt(e, t, a = !1) {
2066
+ var b, L, E;
2203
2067
  const i = e;
2204
2068
  let l = "default";
2205
2069
  (((b = i == null ? void 0 : i.classes) == null ? void 0 : b.length) || 0) > 0 && (l = ((i == null ? void 0 : i.classes) ?? []).join(" ")), l = l + " flowchart-label";
@@ -2265,11 +2129,11 @@ function Bt(e, t, a = !1) {
2265
2129
  default:
2266
2130
  r = "rect";
2267
2131
  }
2268
- const o = Ke((i == null ? void 0 : i.styles) ?? []), d = i.label, h = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2132
+ const o = ge((i == null ? void 0 : i.styles) ?? []), u = i.label, h = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
2269
2133
  return {
2270
2134
  labelStyle: o.labelStyle,
2271
2135
  shape: r,
2272
- labelText: d,
2136
+ labelText: u,
2273
2137
  rx: s,
2274
2138
  ry: s,
2275
2139
  class: l,
@@ -2283,41 +2147,41 @@ function Bt(e, t, a = !1) {
2283
2147
  positioned: a,
2284
2148
  intersect: void 0,
2285
2149
  type: i.type,
2286
- padding: n ?? ((S = (m = it()) == null ? void 0 : m.block) == null ? void 0 : S.padding) ?? 0
2150
+ padding: n ?? ((E = (L = st()) == null ? void 0 : L.block) == null ? void 0 : E.padding) ?? 0
2287
2151
  };
2288
2152
  }
2289
- g(Bt, "getNodeFromBlock");
2290
- async function ve(e, t, a) {
2291
- const i = Bt(t, a, !1);
2153
+ d(Nt, "getNodeFromBlock");
2154
+ async function se(e, t, a) {
2155
+ const i = Nt(t, a, !1);
2292
2156
  if (i.type === "group")
2293
2157
  return;
2294
- const l = it(), s = await Se(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
2158
+ const l = st(), s = await ae(e, i, { config: l }), r = s.node().getBBox(), n = a.getBlock(i.id);
2295
2159
  n.size = { width: r.width, height: r.height, x: 0, y: 0, node: s }, a.setBlock(n), s.remove();
2296
2160
  }
2297
- g(ve, "calculateBlockSize");
2298
- async function Ee(e, t, a) {
2299
- const i = Bt(t, a, !0);
2161
+ d(se, "calculateBlockSize");
2162
+ async function ie(e, t, a) {
2163
+ const i = Nt(t, a, !0);
2300
2164
  if (a.getBlock(i.id).type !== "space") {
2301
- const s = it();
2302
- await Se(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, Ms(i);
2165
+ const s = st();
2166
+ await ae(e, i, { config: s }), t.intersect = i == null ? void 0 : i.intersect, jr(i);
2303
2167
  }
2304
2168
  }
2305
- g(Ee, "insertBlockPositioned");
2306
- async function ft(e, t, a, i) {
2169
+ d(ie, "insertBlockPositioned");
2170
+ async function gt(e, t, a, i) {
2307
2171
  for (const l of t)
2308
- await i(e, l, a), l.children && await ft(e, l.children, a, i);
2172
+ await i(e, l, a), l.children && await gt(e, l.children, a, i);
2309
2173
  }
2310
- g(ft, "performOperations");
2311
- async function _e(e, t, a) {
2312
- await ft(e, t, a, ve);
2174
+ d(gt, "performOperations");
2175
+ async function ne(e, t, a) {
2176
+ await gt(e, t, a, se);
2313
2177
  }
2314
- g(_e, "calculateBlockSizes");
2315
- async function ke(e, t, a) {
2316
- await ft(e, t, a, Ee);
2178
+ d(ne, "calculateBlockSizes");
2179
+ async function le(e, t, a) {
2180
+ await gt(e, t, a, ie);
2317
2181
  }
2318
- g(ke, "insertBlocks");
2319
- async function Te(e, t, a, i, l) {
2320
- const s = new tr({
2182
+ d(le, "insertBlocks");
2183
+ async function ce(e, t, a, i, l) {
2184
+ const s = new Ee({
2321
2185
  multigraph: !0,
2322
2186
  compound: !0
2323
2187
  });
@@ -2338,70 +2202,70 @@ async function Te(e, t, a, i, l) {
2338
2202
  if (r.start && r.end) {
2339
2203
  const n = i.getBlock(r.start), o = i.getBlock(r.end);
2340
2204
  if (n != null && n.size && (o != null && o.size)) {
2341
- const d = n.size, h = o.size, x = [
2342
- { x: d.x, y: d.y },
2343
- { x: d.x + (h.x - d.x) / 2, y: d.y + (h.y - d.y) / 2 },
2205
+ const u = n.size, h = o.size, y = [
2206
+ { x: u.x, y: u.y },
2207
+ { x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
2344
2208
  { x: h.x, y: h.y }
2345
2209
  ];
2346
- is(
2210
+ pr(
2347
2211
  e,
2348
2212
  { v: r.start, w: r.end, name: r.id },
2349
2213
  {
2350
2214
  ...r,
2351
2215
  arrowTypeEnd: r.arrowTypeEnd,
2352
2216
  arrowTypeStart: r.arrowTypeStart,
2353
- points: x,
2217
+ points: y,
2354
2218
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2355
2219
  },
2356
2220
  void 0,
2357
2221
  "block",
2358
2222
  s,
2359
2223
  l
2360
- ), r.label && (await es(e, {
2224
+ ), r.label && (await hr(e, {
2361
2225
  ...r,
2362
2226
  label: r.label,
2363
2227
  labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
2364
2228
  arrowTypeEnd: r.arrowTypeEnd,
2365
2229
  arrowTypeStart: r.arrowTypeStart,
2366
- points: x,
2230
+ points: y,
2367
2231
  classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
2368
- }), rs(
2369
- { ...r, x: x[1].x, y: x[1].y },
2232
+ }), dr(
2233
+ { ...r, x: y[1].x, y: y[1].y },
2370
2234
  {
2371
- originalPath: x
2235
+ originalPath: y
2372
2236
  }
2373
2237
  ));
2374
2238
  }
2375
2239
  }
2376
2240
  }
2377
- g(Te, "insertEdges");
2378
- var js = /* @__PURE__ */ g(function(e, t) {
2241
+ d(ce, "insertEdges");
2242
+ var Vr = /* @__PURE__ */ d(function(e, t) {
2379
2243
  return t.db.getClasses();
2380
- }, "getClasses"), Fs = /* @__PURE__ */ g(async function(e, t, a, i) {
2381
- const { securityLevel: l, block: s } = it(), r = i.db;
2244
+ }, "getClasses"), Gr = /* @__PURE__ */ d(async function(e, t, a, i) {
2245
+ const { securityLevel: l, block: s } = st(), r = i.db;
2382
2246
  let n;
2383
2247
  l === "sandbox" && (n = R("#i" + t));
2384
- const o = l === "sandbox" ? R(n.nodes()[0].contentDocument.body) : R("body"), d = l === "sandbox" ? o.select(`[id="${t}"]`) : R(`[id="${t}"]`);
2385
- Za(d, ["point", "circle", "cross"], i.type, t);
2386
- const x = r.getBlocks(), b = r.getBlocksFlat(), m = r.getEdges(), S = d.insert("g").attr("class", "block");
2387
- await _e(S, x, r);
2388
- const k = pe(r);
2389
- if (await ke(S, x, r), await Te(S, m, b, r, t), k) {
2390
- const E = k, N = Math.max(1, Math.round(0.125 * (E.width / E.height))), T = E.height + N + 10, D = E.width + 10, { useMaxWidth: y } = s;
2391
- Ge(d, T, D, !!y), L.debug("Here Bounds", k, E), d.attr(
2248
+ const o = l === "sandbox" ? R(n.nodes()[0].contentDocument.body) : R("body"), u = l === "sandbox" ? o.select(`[id="${t}"]`) : R(`[id="${t}"]`);
2249
+ ir(u, ["point", "circle", "cross"], i.type, t);
2250
+ const y = r.getBlocks(), b = r.getBlocksFlat(), L = r.getEdges(), E = u.insert("g").attr("class", "block");
2251
+ await ne(E, y, r);
2252
+ const D = Zt(r);
2253
+ if (await le(E, y, r), await ce(E, L, b, r, t), D) {
2254
+ const v = D, T = Math.max(1, Math.round(0.125 * (v.width / v.height))), k = v.height + T + 10, N = v.width + 10, { useMaxWidth: x } = s;
2255
+ ye(u, k, N, !!x), m.debug("Here Bounds", D, v), u.attr(
2392
2256
  "viewBox",
2393
- `${E.x - 5} ${E.y - 5} ${E.width + 10} ${E.height + 10}`
2257
+ `${v.x - 5} ${v.y - 5} ${v.width + 10} ${v.height + 10}`
2394
2258
  );
2395
2259
  }
2396
- }, "draw"), Ps = {
2397
- draw: Fs,
2398
- getClasses: js
2399
- }, Gs = {
2400
- parser: xa,
2401
- db: za,
2402
- renderer: Ps,
2403
- styles: ja
2260
+ }, "draw"), Zr = {
2261
+ draw: Gr,
2262
+ getClasses: Vr
2263
+ }, ia = {
2264
+ parser: ke,
2265
+ db: Ue,
2266
+ renderer: Zr,
2267
+ styles: Ve
2404
2268
  };
2405
2269
  export {
2406
- Gs as diagram
2270
+ ia as diagram
2407
2271
  };