@belonguniverseai/react-sdk 0.6.2 → 0.6.4

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