@zombie-mermaid/svg-renderer 4.2.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +15 -1
  2. package/dist/index.cjs +52 -52
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +23 -4
  5. package/dist/index.d.ts +23 -4
  6. package/dist/index.js +897 -849
  7. package/dist/index.js.map +1 -1
  8. package/package.json +14 -5
  9. package/src/__tests__/c4-label-clearance-1290.test.ts +0 -112
  10. package/src/__tests__/c4-line-ends-1208.test.ts +0 -52
  11. package/src/__tests__/c4-mermaid-reference.test.ts +0 -124
  12. package/src/__tests__/c4-svg.test.ts +0 -337
  13. package/src/__tests__/c4-text-width-1210.test.ts +0 -43
  14. package/src/__tests__/class-component-order-1249.test.ts +0 -40
  15. package/src/__tests__/class-diamond-markers-1232.test.ts +0 -59
  16. package/src/__tests__/class-member-right-padding-1238.test.ts +0 -43
  17. package/src/__tests__/class-namespace-1196.test.ts +0 -165
  18. package/src/__tests__/class-namespace-sparse-elk-1196.test.ts +0 -96
  19. package/src/__tests__/class-visibility-markers-1237.test.ts +0 -27
  20. package/src/__tests__/edge-jog-straightening-1388.test.ts +0 -57
  21. package/src/__tests__/elk-adapter-utils.test.ts +0 -166
  22. package/src/__tests__/er-attribute-right-padding-1262.test.ts +0 -47
  23. package/src/__tests__/er-cardinality-markers-1233.test.ts +0 -35
  24. package/src/__tests__/er-default-direction-1250.test.ts +0 -69
  25. package/src/__tests__/er-edge-label-contrast-1244.test.ts +0 -58
  26. package/src/__tests__/fixtures/c4-mermaid-reference.json +0 -626
  27. package/src/__tests__/flowchart-parallel-edge-lanes-1308.test.ts +0 -168
  28. package/src/__tests__/pie-layout.test.ts +0 -215
  29. package/src/__tests__/pie-svg.test.ts +0 -194
  30. package/src/__tests__/render-mermaid-svg.test.ts +0 -64
  31. package/src/__tests__/sequence-label-clearance-1242.test.ts +0 -162
  32. package/src/__tests__/sequence-nested-activation-1241.test.ts +0 -37
  33. package/src/__tests__/svg-edge-to-own-cluster-1310.test.ts +0 -32
  34. package/src/__tests__/xychart-smooth-curve.test.ts +0 -42
  35. package/src/__tests__/xychart-x-label-overlap-1243.test.ts +0 -62
  36. package/src/c4/arial-widths.ts +0 -59
  37. package/src/c4/layout.ts +0 -680
  38. package/src/c4/metrics.ts +0 -261
  39. package/src/c4/renderer.ts +0 -366
  40. package/src/class/layout.ts +0 -525
  41. package/src/class/renderer.ts +0 -669
  42. package/src/edge-curves.ts +0 -205
  43. package/src/elk-instance.ts +0 -292
  44. package/src/er/layout.ts +0 -216
  45. package/src/er/renderer.ts +0 -516
  46. package/src/generated/mono-font-subset.ts +0 -32
  47. package/src/index.ts +0 -277
  48. package/src/layout-engine/back-edges.ts +0 -73
  49. package/src/layout-engine/compound-flat.ts +0 -916
  50. package/src/layout-engine/constants.ts +0 -19
  51. package/src/layout-engine/edge-bundling.ts +0 -458
  52. package/src/layout-engine/elk-adapter-utils.ts +0 -81
  53. package/src/layout-engine/elk-graph-builder.ts +0 -245
  54. package/src/layout-engine/from-elk.ts +0 -767
  55. package/src/layout-engine/inner-edges.ts +0 -329
  56. package/src/layout-engine/jog-straightening.ts +0 -52
  57. package/src/layout-engine/layer-alignment.ts +0 -174
  58. package/src/layout-engine/layout-hints.ts +0 -27
  59. package/src/layout-engine/to-elk.ts +0 -855
  60. package/src/layout-engine.ts +0 -115
  61. package/src/pie/layout.ts +0 -234
  62. package/src/pie/renderer.ts +0 -161
  63. package/src/registry.ts +0 -441
  64. package/src/renderer.ts +0 -1510
  65. package/src/resolve-colors.ts +0 -339
  66. package/src/sequence/layout.ts +0 -766
  67. package/src/sequence/renderer.ts +0 -687
  68. package/src/shape-clipping.ts +0 -197
  69. package/src/styles.ts +0 -145
  70. package/src/title-gaps.ts +0 -161
  71. package/src/xychart/layout.ts +0 -727
  72. package/src/xychart/renderer.ts +0 -676
package/dist/index.js CHANGED
@@ -1,24 +1,23 @@
1
1
  import { DEFAULTS as e, buildStyleBlock as t, detectDiagramType as n, escapeAttr as r, escapeXml as i, f as a, formatCssColor as o, getReadableTextColor as s, isMonospaceFont as c, measureMultilineText as l, measureTextWidth as u, mixSrgb as d, parseCssColor as f, renderMultilineText as p, renderMultilineTextWithBackground as m, resolveNodeStyle as h, safeHref as g, sanitizeClassName as _, setMonospaceMetrics as v, splitStatements as y, styleOpenTag as b, svgOpenTag as x, themeStyleDeclarations as S, withDirectionOverride as C, withoutOwnClusterEdges as w } from "@zombie-mermaid/core";
2
- import T from "elkjs/lib/elk.bundled.js";
3
- import { CHART_ACCENT_FALLBACK as E, architectureToGraph as D, c4BoundaryTypeLine as O, c4RelLabelLines as k, c4TypeLine as A, formatClassMember as ee, getSeriesColor as j, parseArchitecture as M, parseC4Diagram as N, parseClassDiagram as P, parseErDiagram as te, parseMermaid as ne, parsePieChart as re, parseSequenceDiagram as ie, parseXYChart as ae } from "@zombie-mermaid/mermaid-parser";
4
- import { decodeXML as oe } from "entities";
2
+ import { CHART_ACCENT_FALLBACK as T, architectureToGraph as E, c4BoundaryTypeLine as D, c4RelLabelLines as O, c4TypeLine as k, formatClassMember as A, getSeriesColor as j, parseArchitecture as ee, parseC4Diagram as M, parseClassDiagram as N, parseErDiagram as P, parseMermaid as te, parsePieChart as ne, parseSequenceDiagram as re, parseXYChart as ie } from "@zombie-mermaid/mermaid-parser";
3
+ import { decodeXML as ae } from "entities";
5
4
  //#region packages/svg-renderer/src/edge-curves.ts
6
- function se(e) {
5
+ function oe(e) {
7
6
  return a`M ${e.x} ${e.y}`;
8
7
  }
9
- function ce(e) {
10
- return se(e[0]) + e.slice(1).map((e) => a` L ${e.x} ${e.y}`).join("");
8
+ function se(e) {
9
+ return oe(e[0]) + e.slice(1).map((e) => a` L ${e.x} ${e.y}`).join("");
11
10
  }
12
- function le(e) {
13
- if (e.length < 3) return ce(e);
14
- let t = e[e.length - 1], n = [se(e[0])], r = (e, t, n) => a` C ${(2 * e.x + t.x) / 3} ${(2 * e.y + t.y) / 3},` + a` ${(e.x + 2 * t.x) / 3} ${(e.y + 2 * t.y) / 3},` + a` ${(e.x + 4 * t.x + n.x) / 6} ${(e.y + 4 * t.y + n.y) / 6}`;
11
+ function ce(e) {
12
+ if (e.length < 3) return se(e);
13
+ let t = e[e.length - 1], n = [oe(e[0])], r = (e, t, n) => a` C ${(2 * e.x + t.x) / 3} ${(2 * e.y + t.y) / 3},` + a` ${(e.x + 2 * t.x) / 3} ${(e.y + 2 * t.y) / 3},` + a` ${(e.x + 4 * t.x + n.x) / 6} ${(e.y + 4 * t.y + n.y) / 6}`;
15
14
  n.push(a` L ${(5 * e[0].x + e[1].x) / 6}` + a` ${(5 * e[0].y + e[1].y) / 6}`);
16
15
  for (let t = 2; t < e.length; t++) n.push(r(e[t - 2], e[t - 1], e[t]));
17
16
  return n.push(r(e[e.length - 2], t, t)), n.push(a` L ${t.x} ${t.y}`), n.join("");
18
17
  }
19
- function ue(e) {
20
- if (e.length < 3) return ce(e);
21
- let t = [se(e[0])];
18
+ function le(e) {
19
+ if (e.length < 3) return se(e);
20
+ let t = [oe(e[0])];
22
21
  for (let n = 1; n < e.length - 1; n++) {
23
22
  let r = e[n - 1], i = e[n], o = e[n + 1], s = Math.hypot(i.x - r.x, i.y - r.y), c = Math.hypot(o.x - i.x, o.y - i.y);
24
23
  if (s === 0 || c === 0) {
@@ -31,8 +30,8 @@ function ue(e) {
31
30
  let n = e[e.length - 1];
32
31
  return t.push(a` L ${n.x} ${n.y}`), t.join("");
33
32
  }
34
- function de(e, t) {
35
- let n = [se(e[0])], r = e.length - 1;
33
+ function ue(e, t) {
34
+ let n = [oe(e[0])], r = e.length - 1;
36
35
  for (let i = 0; i < r; i++) {
37
36
  let o = e[i], s = e[i + 1];
38
37
  if (i === r - 1) {
@@ -48,51 +47,92 @@ function de(e, t) {
48
47
  }
49
48
  return n.join("");
50
49
  }
51
- function fe(e, t = "linear") {
50
+ function de(e, t = "linear") {
52
51
  if (e.length === 0) return "";
53
- if (e.length === 1) return se(e[0]);
52
+ if (e.length === 1) return oe(e[0]);
54
53
  switch (t) {
55
- case "basis": return le(e);
56
- case "natural": return ue(e);
57
- case "step": return de(e, "mid");
58
- case "stepBefore": return de(e, "before");
59
- case "stepAfter": return de(e, "after");
60
- default: return ce(e);
54
+ case "basis": return ce(e);
55
+ case "natural": return le(e);
56
+ case "step": return ue(e, "mid");
57
+ case "stepBefore": return ue(e, "before");
58
+ case "stepAfter": return ue(e, "after");
59
+ default: return se(e);
61
60
  }
62
61
  }
63
62
  //#endregion
64
63
  //#region packages/svg-renderer/src/elk-instance.ts
65
- var pe = null, me = null, he = 20;
66
- function ge(e = he) {
64
+ function fe(e) {
65
+ let t = e?.worker?.worker;
66
+ return typeof t == "object" && !!t && "dispatcher" in t;
67
+ }
68
+ var pe = null, me = null, he = null, ge = class extends Error {
69
+ constructor() {
70
+ super("zombie-mermaid: rendering a flowchart, state, class, ER or architecture diagram needs the optional peer dependency \"elkjs\". Install it (npm i elkjs) and call registerElk(ELK) once at startup with `import ELK from 'elkjs/lib/elk.bundled.js'`. Sequence, pie, xychart, C4 and ASCII output do not need it."), this.name = "ElkNotRegisteredError";
71
+ }
72
+ };
73
+ function _e(e) {
74
+ pe = e, me = null, he = null;
75
+ }
76
+ function ve() {
77
+ let e = globalThis.process;
78
+ if (!e?.versions?.node || typeof e.getBuiltinModule != "function") return null;
79
+ let t = e.getBuiltinModule("node:module");
80
+ if (!t) return null;
81
+ let n = [
82
+ "elkjs",
83
+ "lib",
84
+ "elk.bundled.js"
85
+ ].join("/"), r = [typeof __filename == "string" ? __filename : import.meta.url, new URL(`file://${ye(e)}/`).href];
86
+ for (let e of r) try {
87
+ let r = t.createRequire(e)(n), i = typeof r == "function" ? r : r.default;
88
+ if (typeof i == "function") return i;
89
+ } catch {}
90
+ return null;
91
+ }
92
+ function ye(e) {
93
+ let t = e.cwd;
94
+ return typeof t == "function" ? t.call(e) : "/";
95
+ }
96
+ var be = 20;
97
+ function xe(e = be) {
67
98
  if (!Number.isInteger(e) || e < 1) throw Error(`createLayoutCache: maxSize must be a positive integer, got ${e}`);
68
99
  return {
69
100
  map: /* @__PURE__ */ new Map(),
70
101
  maxSize: e
71
102
  };
72
103
  }
73
- function _e(e) {
74
- if (Array.isArray(e)) return `[${e.map(_e).join(",")}]`;
104
+ function Se(e) {
105
+ if (Array.isArray(e)) return `[${e.map(Se).join(",")}]`;
75
106
  if (typeof e == "object" && e) {
76
107
  let t = e;
77
- return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${_e(t[e])}`).join(",")}}`;
108
+ return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${Se(t[e])}`).join(",")}}`;
78
109
  }
79
110
  return JSON.stringify(e);
80
111
  }
81
- function ve() {
82
- if (pe && me) return me;
83
- let e = [], t = globalThis.setTimeout;
84
- globalThis.setTimeout = (n, r) => r === 0 ? (e.push(n), 0) : t(n, r);
85
- let n = globalThis, r = "self" in n, i = n.self;
86
- if (r && n.document === void 0 && delete n.self, pe = new T(), !pe) throw Error("ELKBundled construction unexpectedly produced no instance");
87
- return r && (n.self = i), globalThis.setTimeout = t, e.forEach((e) => e()), me = pe.worker.worker, me;
88
- }
89
- function ye(e, t) {
90
- let n = t, r = n ? _e(e) : void 0;
112
+ function Ce() {
113
+ if (me && he) return he;
114
+ let e = pe ??= ve();
115
+ if (!e) throw new ge();
116
+ let t = [], n = globalThis.setTimeout;
117
+ globalThis.setTimeout = (e, r) => r === 0 ? (t.push(e), 0) : n(e, r);
118
+ let r = globalThis, i = "self" in r, a = r.self;
119
+ i && r.document === void 0 && delete r.self;
120
+ let o;
121
+ try {
122
+ o = new e();
123
+ } finally {
124
+ i && (r.self = a), globalThis.setTimeout = n;
125
+ }
126
+ if (!fe(o)) throw Error("zombie-mermaid: registerElk() needs the ELK class from 'elkjs/lib/elk.bundled.js' (or 'elkjs/lib/main.js'), whose synchronous worker this renderer drives directly.");
127
+ return me = o, t.forEach((e) => e()), he = me.worker.worker, he;
128
+ }
129
+ function we(e, t) {
130
+ let n = t, r = n ? Se(e) : void 0;
91
131
  if (n && r !== void 0) {
92
132
  let e = n.map.get(r);
93
133
  if (e) return n.map.delete(r), n.map.set(r, e), e;
94
134
  }
95
- let i = ve(), a, o, s = i.onmessage;
135
+ let i = Ce(), a, o, s = i.onmessage;
96
136
  if (i.onmessage = (e) => {
97
137
  e.data.error ? o = e.data.error : a = e.data.data;
98
138
  }, i.dispatcher.saveDispatch({ data: {
@@ -109,21 +149,21 @@ function ye(e, t) {
109
149
  }
110
150
  //#endregion
111
151
  //#region packages/svg-renderer/src/generated/mono-font-subset.ts
112
- var be = "JetBrains Mono NL", xe = "@font-face {\n font-family: 'JetBrains Mono NL';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(data:font/woff2;base64,d09GMgABAAAAABvAAAwAAAAAPWAAABtwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkAGYACDNhEICuRsz2ELgyYAATYCJAOGPgQgBYREByAbWjAjEcHGARCEduZRlMfRhcj+eWAbMx8MXsFY1AMYgxQLh2GYMVuWSbQZOjzvQhHrXnbH28KzVPg3QpJZomrI6lliLI+KSSeVPYryGIWmPDYrgaI8OLLE8fIV9/c6y/e+ZNB7khbIPiKu+INtefkIygBJXcZuFw+Bd3fmquSqTJ+0GZ7fZg+wWJs7K0AUEQHJD5//iQ+S309/SlLBBtTtTnc7t3bhLlxduEx3nbtd9Lz0omqTc5mf7DQLP00WgKwmeiAKtX1uOXD1m1fn56okB8lB6wJO7Z8Opg7bqe/enmXs3EmWrFiWq4A+OTnKTz74OFCwi3by/3t2iVFFoK29qd2IthumsRuv5Xn6e1P/ycxLsdVgFa8K29qdH9DYWoB6t0RxwVKIsolbF+tMMrFCOoWXa82cBTkvrXqlGUCkBSmWlle2L8Cg7fNXktAIFKNoUCxjQbGaHYUWR7FZBsVRWY/ipJrCrkymZYO6nIcBR5tZcoafBSsL9MHZOmiHe0D1qMY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kqKSEJA9LMBh3SJ2dhwkGI6TaiT0iKU0xKWoJ+/TX4Wgm0aQd5/oyMuJAREoP/k7YyIT/LKJ5WEk20zy7GIRQ9qrAm7YWa3K7Jt6YmrPHcNFCBHAifTVS3pYbykNWHyxO69bhj8Ql/ILLsb4nYhF0o41JgJS/ZEQkc9ZPuegalpIlkRNaQt3MZLq5uCap+ZWlYq0h0VP24evYJ1/16E5rXbdc24AMC) format('woff2');\n unicode-range: U+0020-007E, U+00A0-00FF;\n}";
152
+ var Te = "JetBrains Mono NL", Ee = "@font-face {\n font-family: 'JetBrains Mono NL';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(data:font/woff2;base64,d09GMgABAAAAABvAAAwAAAAAPWAAABtwAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGkAGYACDNhEICuRsz2ELgyYAATYCJAOGPgQgBYREByAbWjAjEcHGARCEduZRlMfRhcj+eWAbMx8MXsFY1AMYgxQLh2GYMVuWSbQZOjzvQhHrXnbH28KzVPg3QpJZomrI6lliLI+KSSeVPYryGIWmPDYrgaI8OLLE8fIV9/c6y/e+ZNB7khbIPiKu+INtefkIygBJXcZuFw+Bd3fmquSqTJ+0GZ7fZg+wWJs7K0AUEQHJD5//iQ+S309/SlLBBtTtTnc7t3bhLlxduEx3nbtd9Lz0omqTc5mf7DQLP00WgKwmeiAKtX1uOXD1m1fn56okB8lB6wJO7Z8Opg7bqe/enmXs3EmWrFiWq4A+OTnKTz74OFCwi3by/3t2iVFFoK29qd2IthumsRuv5Xn6e1P/ycxLsdVgFa8K29qdH9DYWoB6t0RxwVKIsolbF+tMMrFCOoWXa82cBTkvrXqlGUCkBSmWlle2L8Cg7fNXktAIFKNoUCxjQbGaHYUWR7FZBsVRWY/ipJrCrkymZYO6nIcBR5tZcoafBSsL9MHZOmiHe0D1qMY169//GZD7sGUAoFx/yQfatPi2mSk5ooSsSbQx17Jy+Db1SxKE8aTWuFYD7VPayMwe5T74XysImHYWcGebWTc76pJ7H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y7GIRQ9qrAm7YWa3K7Jt6YmrPHcNFCBHAifTVS3pYbykNWHyxO69bhj8Ql/ILLsb4nYhF0o41JgJS/ZEQkc9ZPuegalpIlkRNaQt3MZLq5uCap+ZWlYq0h0VP24evYJ1/16E5rXbdc24AMC) format('woff2');\n unicode-range: U+0020-007E, U+00A0-00FF;\n}";
113
153
  //#endregion
114
154
  //#region packages/svg-renderer/src/styles.ts
115
155
  function F(e, t, n) {
116
156
  return u(e, t, n);
117
157
  }
118
- function Se(e, t) {
158
+ function De(e, t) {
119
159
  return e.length * t * .6;
120
160
  }
121
- var Ce = "'JetBrains Mono'", we = `${Ce}, 'SF Mono', 'Fira Code', ui-monospace, monospace`, I = {
161
+ var Oe = "'JetBrains Mono'", ke = `${Oe}, 'SF Mono', 'Fira Code', ui-monospace, monospace`, I = {
122
162
  nodeLabel: 13,
123
163
  edgeLabel: 11,
124
164
  groupHeader: 12
125
165
  };
126
- function Te(e) {
166
+ function Ae(e) {
127
167
  return {
128
168
  nodeLabel: e?.nodeLabel ?? I.nodeLabel,
129
169
  edgeLabel: e?.edgeLabel ?? I.edgeLabel,
@@ -134,7 +174,7 @@ var L = {
134
174
  nodeLabel: 500,
135
175
  edgeLabel: 400,
136
176
  groupHeader: 600
137
- }, Ee = 12, De = {
177
+ }, je = 12, Me = {
138
178
  horizontal: 20,
139
179
  vertical: 10,
140
180
  diamondExtra: 24
@@ -142,14 +182,14 @@ var L = {
142
182
  outerBox: 1,
143
183
  innerBox: .75,
144
184
  connector: 1
145
- }, z = "0.35em", Oe = {
185
+ }, z = "0.35em", Ne = {
146
186
  width: 8,
147
187
  height: 5
148
188
  };
149
- function ke(e, n, r) {
189
+ function Pe(e, n, r) {
150
190
  return t(e, n ? {
151
- family: be,
152
- faceCss: xe
191
+ family: Te,
192
+ faceCss: Ee
153
193
  } : !1, r);
154
194
  }
155
195
  //#endregion
@@ -165,7 +205,7 @@ var B = {
165
205
  };
166
206
  //#endregion
167
207
  //#region packages/svg-renderer/src/layout-engine/back-edges.ts
168
- function Ae(e, t) {
208
+ function Fe(e, t) {
169
209
  let n = /* @__PURE__ */ new Map();
170
210
  e.edges.forEach((e, t) => {
171
211
  if (e.source === e.target) return;
@@ -196,14 +236,14 @@ function Ae(e, t) {
196
236
  }
197
237
  //#endregion
198
238
  //#region packages/svg-renderer/src/layout-engine/elk-graph-builder.ts
199
- var je = {
239
+ var Ie = {
200
240
  flowchart: "DOWN",
201
241
  state: "DOWN",
202
242
  class: "DOWN",
203
243
  er: "DOWN",
204
244
  c4: "DOWN"
205
245
  };
206
- function Me(e, t) {
246
+ function Le(e, t) {
207
247
  switch (e) {
208
248
  case "LR": return "RIGHT";
209
249
  case "RL": return "LEFT";
@@ -213,7 +253,7 @@ function Me(e, t) {
213
253
  default: return t;
214
254
  }
215
255
  }
216
- function Ne(e) {
256
+ function Re(e) {
217
257
  let t = typeof e == "number" ? {
218
258
  top: e,
219
259
  left: e,
@@ -222,17 +262,17 @@ function Ne(e) {
222
262
  } : e;
223
263
  return `[top=${t.top},left=${t.left},bottom=${t.bottom},right=${t.right}]`;
224
264
  }
225
- function Pe(e) {
265
+ function ze(e) {
226
266
  return {
227
267
  "elk.algorithm": "layered",
228
268
  "elk.direction": e.direction,
229
269
  "elk.spacing.nodeNode": String(e.nodeSpacing),
230
270
  "elk.layered.spacing.nodeNodeBetweenLayers": String(e.layerSpacing),
231
- "elk.padding": Ne(e.padding),
271
+ "elk.padding": Re(e.padding),
232
272
  "elk.edgeRouting": "ORTHOGONAL"
233
273
  };
234
274
  }
235
- function Fe(e, t, n) {
275
+ function Be(e, t, n) {
236
276
  let r = {
237
277
  id: e,
238
278
  width: t.width,
@@ -240,11 +280,11 @@ function Fe(e, t, n) {
240
280
  };
241
281
  return n !== void 0 && (r.labels = [{ text: n }]), r;
242
282
  }
243
- var Ie = {
283
+ var Ve = {
244
284
  "elk.edgeLabels.inline": "true",
245
285
  "elk.edgeLabels.placement": "CENTER"
246
286
  };
247
- function Le(e, t) {
287
+ function He(e, t) {
248
288
  let n = l(e, t.fontSize, L.edgeLabel), r = {
249
289
  text: e,
250
290
  width: n.width + 8,
@@ -252,47 +292,47 @@ function Le(e, t) {
252
292
  };
253
293
  return t.layoutOptions && (r.layoutOptions = { ...t.layoutOptions }), r;
254
294
  }
255
- function Re(e) {
295
+ function Ue(e) {
256
296
  let t = {
257
297
  id: e.id,
258
298
  sources: [e.source],
259
299
  targets: [e.target]
260
300
  };
261
- return e.label && (t.labels = [Le(e.label, e.labelStyle)]), t;
301
+ return e.label && (t.labels = [He(e.label, e.labelStyle)]), t;
262
302
  }
263
303
  //#endregion
264
304
  //#region packages/svg-renderer/src/layout-engine/to-elk.ts
265
- var ze = { "state-start": "FIRST" }, Be = {
305
+ var We = { "state-start": "FIRST" }, Ge = {
266
306
  "elk.layered.cycleBreaking.strategy": "MODEL_ORDER",
267
307
  "elk.layered.compaction.postCompaction.strategy": "NONE"
268
308
  };
269
- function Ve(e) {
309
+ function Ke(e) {
270
310
  for (let t of e.nodes.values()) if (t.shape === "state-start" || t.shape === "state-end") return !0;
271
311
  return !1;
272
312
  }
273
- var He = {
313
+ var qe = {
274
314
  top: 44,
275
315
  left: 16,
276
316
  bottom: 16,
277
317
  right: 16
278
- }, Ue = /* @__PURE__ */ new WeakMap();
279
- function We(e, t) {
280
- let n = Ue.get(e);
281
- return n || (n = Ve(e) || Ze(e.subgraphs) ? /* @__PURE__ */ new Set() : Ae(e, t?.walkOrder), Ue.set(e, n)), n;
318
+ }, Je = /* @__PURE__ */ new WeakMap();
319
+ function Ye(e, t) {
320
+ let n = Je.get(e);
321
+ return n || (n = Ke(e) || nt(e.subgraphs) ? /* @__PURE__ */ new Set() : Fe(e, t?.walkOrder), Je.set(e, n)), n;
282
322
  }
283
- function Ge(e, t) {
323
+ function Xe(e, t) {
284
324
  for (let n = 0; n < e.edges.length; n++) {
285
325
  let r = e.edges[n];
286
326
  if (t.has(r.source) || t.has(r.target)) return n;
287
327
  }
288
328
  return Infinity;
289
329
  }
290
- function Ke(e) {
291
- return Me(e, je.flowchart);
330
+ function Ze(e) {
331
+ return Le(e, Ie.flowchart);
292
332
  }
293
- function qe(e) {
333
+ function Qe(e) {
294
334
  return {
295
- ...Pe(e),
335
+ ...ze(e),
296
336
  "elk.spacing.edgeEdge": "12",
297
337
  "elk.layered.spacing.edgeEdgeBetweenLayers": "12",
298
338
  "elk.layered.spacing.edgeNodeBetweenLayers": "12",
@@ -300,23 +340,23 @@ function qe(e) {
300
340
  "elk.contentAlignment": "H_CENTER V_CENTER"
301
341
  };
302
342
  }
303
- function Je(e) {
343
+ function $e(e) {
304
344
  return {
305
345
  fontSize: e.fontSizes.edgeLabel,
306
- layoutOptions: Ie
346
+ layoutOptions: Ve
307
347
  };
308
348
  }
309
- function Ye(e, t, n, r) {
310
- let i = l(t, r, L.nodeLabel), a = i.width + De.horizontal * 2, o = i.height + De.vertical * 2;
349
+ function et(e, t, n, r) {
350
+ let i = l(t, r, L.nodeLabel), a = i.width + Me.horizontal * 2, o = i.height + Me.vertical * 2;
311
351
  if (n === "diamond") {
312
- let e = Math.max(a, o) + De.diamondExtra;
352
+ let e = Math.max(a, o) + Me.diamondExtra;
313
353
  a = e, o = e;
314
354
  }
315
355
  if (n === "circle" || n === "doublecircle") {
316
356
  let e = Math.ceil(Math.sqrt(a * a + o * o)) + 8;
317
357
  a = n === "doublecircle" ? e + 12 : e, o = a;
318
358
  }
319
- return n === "hexagon" && (a += De.horizontal), (n === "trapezoid" || n === "trapezoid-alt" || n === "parallelogram" || n === "parallelogram-alt") && (a += De.horizontal), n === "asymmetric" && (a += 12), n === "cylinder" && (o += 14), n === "state-start" || n === "state-end" ? {
359
+ return n === "hexagon" && (a += Me.horizontal), (n === "trapezoid" || n === "trapezoid-alt" || n === "parallelogram" || n === "parallelogram-alt") && (a += Me.horizontal), n === "asymmetric" && (a += 12), n === "cylinder" && (o += 14), n === "state-start" || n === "state-end" ? {
320
360
  width: 28,
321
361
  height: 28
322
362
  } : (a = Math.max(a, 60), o = Math.max(o, 36), {
@@ -324,22 +364,22 @@ function Ye(e, t, n, r) {
324
364
  height: o
325
365
  });
326
366
  }
327
- var Xe = " root";
328
- function Ze(e) {
329
- for (let t of e) if (t.direction !== void 0 || Ze(t.children)) return !0;
367
+ var tt = " root";
368
+ function nt(e) {
369
+ for (let t of e) if (t.direction !== void 0 || nt(t.children)) return !0;
330
370
  return !1;
331
371
  }
332
- function Qe(e, t) {
372
+ function rt(e, t) {
333
373
  for (let n of e.nodeIds) t.add(n);
334
- for (let n of e.children) Qe(n, t);
374
+ for (let n of e.children) rt(n, t);
335
375
  }
336
- function $e(e, t) {
376
+ function it(e, t) {
337
377
  let n = /* @__PURE__ */ new Set();
338
- if (Qe(e, n), n.size === 0) return !0;
378
+ if (rt(e, n), n.size === 0) return !0;
339
379
  let r = (t) => n.has(t) || t === e.id;
340
380
  return !t.edges.some((e) => r(e.source) !== r(e.target));
341
381
  }
342
- function et(e) {
382
+ function at(e) {
343
383
  let t = /* @__PURE__ */ new Map();
344
384
  function n(e, r) {
345
385
  let i = [...r, e.id];
@@ -349,15 +389,15 @@ function et(e) {
349
389
  for (let t of e) n(t, []);
350
390
  return t;
351
391
  }
352
- function tt(e, t) {
392
+ function ot(e, t) {
353
393
  let n = 0;
354
394
  for (; n < e.length && n < t.length && e[n] === t[n];) n++;
355
395
  return n;
356
396
  }
357
- function nt(e, t, n) {
397
+ function st(e, t, n) {
358
398
  let r = t, i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
359
- for (let t of e.subgraphs) a.add(t.id), it(t, i, a);
360
- let o = at(e.subgraphs), s = et(e.subgraphs), c = (e) => e ? s.get(e) ?? [] : [], l = /* @__PURE__ */ new Map();
399
+ for (let t of e.subgraphs) a.add(t.id), lt(t, i, a);
400
+ let o = ut(e.subgraphs), s = at(e.subgraphs), c = (e) => e ? s.get(e) ?? [] : [], l = /* @__PURE__ */ new Map();
361
401
  l.set(null, []);
362
402
  let u = [];
363
403
  for (let t = 0; t < e.edges.length; t++) {
@@ -378,9 +418,9 @@ function nt(e, t, n) {
378
418
  tgtChain: c(i)
379
419
  });
380
420
  }
381
- let d = Ze(e.subgraphs), f = [], p = [], m = {
382
- ...qe({
383
- direction: Ke(e.direction),
421
+ let d = nt(e.subgraphs), f = [], p = [], m = {
422
+ ...Qe({
423
+ direction: Ze(e.direction),
384
424
  nodeSpacing: r.nodeSpacing,
385
425
  layerSpacing: r.layerSpacing,
386
426
  padding: r.padding
@@ -391,7 +431,7 @@ function nt(e, t, n) {
391
431
  "elk.layered.compaction.postCompaction.strategy": "LEFT_RIGHT_CONSTRAINT_LOCKING",
392
432
  "elk.layered.considerModelOrder.strategy": "NODES_AND_EDGES",
393
433
  ...n?.forceNodeOrder ? { "elk.layered.crossingMinimization.forceNodeModelOrder": "true" } : {},
394
- ...Ve(e) ? Be : {},
434
+ ...Ke(e) ? Ge : {},
395
435
  "elk.layered.wrapping.strategy": "OFF",
396
436
  "elk.hierarchyHandling": d ? "SEPARATE" : "INCLUDE_CHILDREN"
397
437
  }, h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
@@ -404,7 +444,7 @@ function nt(e, t, n) {
404
444
  g.set(e, n), n.push(t);
405
445
  }
406
446
  if (d) for (let { index: e, edge: t, srcChain: n, tgtChain: i } of u) {
407
- let a = tt(n, i), o = t.source;
447
+ let a = ot(n, i), o = t.source;
408
448
  if (n.length > a) {
409
449
  for (let r = n.length - 1; r >= a; r--) {
410
450
  let i = n[r], a = `${i}_out_${e}`;
@@ -432,54 +472,54 @@ function nt(e, t, n) {
432
472
  }
433
473
  s = `${i[a]}_in_${e}`;
434
474
  }
435
- v(a > 0 ? n[a - 1] : Xe, Re({
475
+ v(a > 0 ? n[a - 1] : tt, Ue({
436
476
  id: `e${e}`,
437
477
  source: o,
438
478
  target: s,
439
479
  label: t.label,
440
- labelStyle: Je(r)
480
+ labelStyle: $e(r)
441
481
  }));
442
482
  }
443
483
  for (let [t, o] of e.nodes) if (!i.has(t) && !a.has(t)) {
444
- let i = Ye(t, o.label, o.shape, r.fontSizes.nodeLabel), a = n?.fixedWidths?.get(t);
484
+ let i = et(t, o.label, o.shape, r.fontSizes.nodeLabel), a = n?.fixedWidths?.get(t);
445
485
  a !== void 0 && (i.width = a);
446
- let s = Fe(t, i, o.label), c = Ve(e) ? ze[o.shape] : void 0;
486
+ let s = Be(t, i, o.label), c = Ke(e) ? We[o.shape] : void 0;
447
487
  c !== void 0 && (s.layoutOptions = { "elk.layered.layering.layerConstraint": c }), f.push(s);
448
488
  }
449
- let y = Ve(e), b = f.length, x = y ? e.subgraphs : [...e.subgraphs].reverse();
450
- for (let t of x) f.push(rt(t, e, r, l, h, g, e.direction));
489
+ let y = Ke(e), b = f.length, x = y ? e.subgraphs : [...e.subgraphs].reverse();
490
+ for (let t of x) f.push(ct(t, e, r, l, h, g, e.direction));
451
491
  if (y && e.subgraphs.length > 0) {
452
492
  let t = f.map((t, n) => {
453
- if (n < b) return Ge(e, /* @__PURE__ */ new Set([t.id]));
454
- let r = e.subgraphs[n - b], i = Ge(e, /* @__PURE__ */ new Set([r.id]));
493
+ if (n < b) return Xe(e, /* @__PURE__ */ new Set([t.id]));
494
+ let r = e.subgraphs[n - b], i = Xe(e, /* @__PURE__ */ new Set([r.id]));
455
495
  if (i !== Infinity) return i;
456
496
  let a = /* @__PURE__ */ new Set();
457
- return Qe(r, a), Ge(e, a);
497
+ return rt(r, a), Xe(e, a);
458
498
  }), n = f.map((e, t) => t).sort((e, n) => t[e] - t[n] || e - n).map((e) => f[e]);
459
499
  f.splice(0, f.length, ...n);
460
500
  }
461
- let S = We(e, n);
501
+ let S = Ye(e, n);
462
502
  for (let { index: e, edge: t } of l.get(null)) {
463
503
  if (t.source === t.target || n?.detachedEdges?.has(e)) continue;
464
- let i = Re({
504
+ let i = Ue({
465
505
  id: `e${e}`,
466
506
  source: S.has(e) ? t.target : t.source,
467
507
  target: S.has(e) ? t.source : t.target,
468
508
  label: t.label,
469
- labelStyle: Je(r)
509
+ labelStyle: $e(r)
470
510
  });
471
511
  n?.looseEdges?.has(e) && (i.layoutOptions = {
472
512
  ...i.layoutOptions,
473
513
  "elk.layered.priority.straightness": "0"
474
514
  }), p.push(i);
475
515
  }
476
- if (d) for (let e of g.get(Xe) ?? []) p.push(e);
477
- else for (let { index: e, edge: t } of u) p.push(Re({
516
+ if (d) for (let e of g.get(tt) ?? []) p.push(e);
517
+ else for (let { index: e, edge: t } of u) p.push(Ue({
478
518
  id: `e${e}`,
479
519
  source: S.has(e) ? t.target : t.source,
480
520
  target: S.has(e) ? t.source : t.target,
481
521
  label: t.label,
482
- labelStyle: Je(r)
522
+ labelStyle: $e(r)
483
523
  }));
484
524
  return {
485
525
  id: "root",
@@ -488,30 +528,30 @@ function nt(e, t, n) {
488
528
  edges: p
489
529
  };
490
530
  }
491
- function rt(e, t, n, r, i, a, o) {
492
- let s = e.direction !== void 0 && $e(e, t) ? e.direction : o, c = qe({
493
- direction: Ke(s),
531
+ function ct(e, t, n, r, i, a, o) {
532
+ let s = e.direction !== void 0 && it(e, t) ? e.direction : o, c = Qe({
533
+ direction: Ze(s),
494
534
  nodeSpacing: n.nodeSpacing,
495
535
  layerSpacing: n.layerSpacing,
496
- padding: He
536
+ padding: qe
497
537
  }), l, u = i.get(e.id);
498
538
  u && u.size > 0 && (l = [...u].map((e) => ({ id: e })));
499
539
  let d = [];
500
540
  for (let r of e.nodeIds) {
501
541
  let e = t.nodes.get(r);
502
542
  if (e) {
503
- let t = Ye(r, e.label, e.shape, n.fontSizes.nodeLabel);
504
- d.push(Fe(r, t, e.label));
543
+ let t = et(r, e.label, e.shape, n.fontSizes.nodeLabel);
544
+ d.push(Be(r, t, e.label));
505
545
  }
506
546
  }
507
- for (let o of [...e.children].reverse()) d.push(rt(o, t, n, r, i, a, s));
508
- let f = [], p = r.get(e.id) ?? [], m = We(t);
509
- for (let { index: e, edge: t } of p) t.source !== t.target && f.push(Re({
547
+ for (let o of [...e.children].reverse()) d.push(ct(o, t, n, r, i, a, s));
548
+ let f = [], p = r.get(e.id) ?? [], m = Ye(t);
549
+ for (let { index: e, edge: t } of p) t.source !== t.target && f.push(Ue({
510
550
  id: `e${e}`,
511
551
  source: m.has(e) ? t.target : t.source,
512
552
  target: m.has(e) ? t.source : t.target,
513
553
  label: t.label,
514
- labelStyle: Je(n)
554
+ labelStyle: $e(n)
515
555
  }));
516
556
  for (let t of a.get(e.id) ?? []) f.push(t);
517
557
  return {
@@ -523,11 +563,11 @@ function rt(e, t, n, r, i, a, o) {
523
563
  edges: f
524
564
  };
525
565
  }
526
- function it(e, t, n) {
566
+ function lt(e, t, n) {
527
567
  for (let n of e.nodeIds) t.add(n);
528
- for (let r of e.children) n.add(r.id), it(r, t, n);
568
+ for (let r of e.children) n.add(r.id), lt(r, t, n);
529
569
  }
530
- function at(e) {
570
+ function ut(e) {
531
571
  let t = /* @__PURE__ */ new Map();
532
572
  function n(e) {
533
573
  for (let n of e.nodeIds) t.set(n, e.id);
@@ -538,19 +578,19 @@ function at(e) {
538
578
  }
539
579
  //#endregion
540
580
  //#region packages/svg-renderer/src/shape-clipping.ts
541
- function ot(e, t, n) {
581
+ function dt(e, t, n) {
542
582
  if (e.length < 2 || t.shape === "rectangle" || t.shape === "rounded" || t.shape === "stadium") return e;
543
583
  let r = [...e];
544
584
  if (t.shape === "diamond") {
545
- if (n) r[0] = st(e[0], e[1], t);
585
+ if (n) r[0] = ft(e[0], e[1], t);
546
586
  else {
547
587
  let n = e.length - 1;
548
- r[n] = st(e[n], e[n - 1], t);
588
+ r[n] = ft(e[n], e[n - 1], t);
549
589
  }
550
590
  }
551
591
  return r;
552
592
  }
553
- function st(e, t, n) {
593
+ function ft(e, t, n) {
554
594
  let r = n.x + n.width / 2, i = n.y + n.height / 2, a = {
555
595
  x: r,
556
596
  y: n.y
@@ -566,14 +606,14 @@ function st(e, t, n) {
566
606
  }, l = e.x - t.x, u = e.y - t.y;
567
607
  if (Math.abs(l) < Math.abs(u)) {
568
608
  let t = e.x;
569
- return u > 0 ? t <= r ? lt(t, c, a) ?? a : lt(t, a, o) ?? a : t <= r ? lt(t, s, c) ?? s : lt(t, o, s) ?? s;
609
+ return u > 0 ? t <= r ? mt(t, c, a) ?? a : mt(t, a, o) ?? a : t <= r ? mt(t, s, c) ?? s : mt(t, o, s) ?? s;
570
610
  }
571
611
  {
572
612
  let t = e.y;
573
- return l > 0 ? t <= i ? ct(t, a, c) ?? c : ct(t, c, s) ?? c : t <= i ? ct(t, a, o) ?? o : ct(t, o, s) ?? o;
613
+ return l > 0 ? t <= i ? pt(t, a, c) ?? c : pt(t, c, s) ?? c : t <= i ? pt(t, a, o) ?? o : pt(t, o, s) ?? o;
574
614
  }
575
615
  }
576
- function ct(e, t, n) {
616
+ function pt(e, t, n) {
577
617
  let r = n.y - t.y;
578
618
  if (Math.abs(r) < .001) return null;
579
619
  let i = (e - t.y) / r;
@@ -582,7 +622,7 @@ function ct(e, t, n) {
582
622
  y: e
583
623
  };
584
624
  }
585
- function lt(e, t, n) {
625
+ function mt(e, t, n) {
586
626
  let r = n.x - t.x;
587
627
  if (Math.abs(r) < .001) return null;
588
628
  let i = (e - t.x) / r;
@@ -593,7 +633,7 @@ function lt(e, t, n) {
593
633
  }
594
634
  //#endregion
595
635
  //#region packages/svg-renderer/src/layout-engine/layer-alignment.ts
596
- function ut(e, t, n) {
636
+ function ht(e, t, n) {
597
637
  if (e.length === 0) return;
598
638
  let r = n === "LR" || n === "RL", i = /* @__PURE__ */ new Set();
599
639
  for (let e of t) i.add(`${e.source}:${e.target}`), i.add(`${e.target}:${e.source}`);
@@ -637,37 +677,37 @@ function ut(e, t, n) {
637
677
  }
638
678
  //#endregion
639
679
  //#region packages/svg-renderer/src/layout-engine/edge-bundling.ts
640
- var dt = .5;
641
- function ft(e, t, n) {
680
+ var gt = .5;
681
+ function _t(e, t, n) {
642
682
  for (let r = 0; r < e.length - 1; r++) {
643
683
  let i = e[r], a = e[r + 1], o = Math.min(i.x, a.x), s = Math.max(i.x, a.x), c = Math.min(i.y, a.y), l = Math.max(i.y, a.y);
644
684
  for (let e of t) {
645
685
  if (n.has(e.id)) continue;
646
- let t = e.x + dt, r = e.x + e.width - dt, i = e.y + dt, a = e.y + e.height - dt;
686
+ let t = e.x + gt, r = e.x + e.width - gt, i = e.y + gt, a = e.y + e.height - gt;
647
687
  if (!(t >= r || i >= a) && o < r && s > t && c < a && l > i) return !1;
648
688
  }
649
689
  }
650
690
  return !0;
651
691
  }
652
- function pt(e, t, n) {
692
+ function vt(e, t, n) {
653
693
  let r = [];
654
- for (let i of n) e >= i.x && e <= i.x + i.width && t >= i.y && t <= i.y + i.height && (r.push(i), r.push(...pt(e, t, i.children)));
694
+ for (let i of n) e >= i.x && e <= i.x + i.width && t >= i.y && t <= i.y + i.height && (r.push(i), r.push(...vt(e, t, i.children)));
655
695
  return r;
656
696
  }
657
- function mt(e, t, n, r, i) {
658
- let a = i === "LR", o = i === "RL", s = i === "BT", c = a || o, l = new Set(pt(t, n, r).map((e) => e.id)), u = pt(c ? e : t, c ? n : e, r).find((e) => !l.has(e.id));
697
+ function yt(e, t, n, r, i) {
698
+ let a = i === "LR", o = i === "RL", s = i === "BT", c = a || o, l = new Set(vt(t, n, r).map((e) => e.id)), u = vt(c ? e : t, c ? n : e, r).find((e) => !l.has(e.id));
659
699
  return u ? a ? u.x - 12 : o ? u.x + u.width + 12 : s ? u.y + u.height + 12 : u.y - 12 : e;
660
700
  }
661
- var ht = 2;
662
- function gt(e, t, n, r, i) {
701
+ var bt = 2;
702
+ function xt(e, t, n, r, i) {
663
703
  for (let a of e) {
664
704
  if (t.has(a) || a.source === a.target) continue;
665
705
  let e = a.source === n ? a.points[0] : a.target === n ? a.points[a.points.length - 1] : void 0;
666
- if (e && Math.abs((i ? e.x : e.y) - r) <= ht) return !0;
706
+ if (e && Math.abs((i ? e.x : e.y) - r) <= bt) return !0;
667
707
  }
668
708
  return !1;
669
709
  }
670
- function _t(e, t, n, r) {
710
+ function St(e, t, n, r) {
671
711
  let i = new Map(t.map((e) => [e.id, e])), a = /* @__PURE__ */ new Set(), o = r === "LR", s = r === "RL", c = r === "BT", l = o || s, u = /* @__PURE__ */ new Map();
672
712
  for (let t of e) {
673
713
  if (t.source === t.target) continue;
@@ -692,9 +732,9 @@ function _t(e, t, n, r) {
692
732
  let h = p.x + p.width / 2, g = p.y + p.height / 2;
693
733
  if (l) {
694
734
  let i = o ? p.x + p.width : p.x, s = g;
695
- if (gt(e, new Set(m.map((e) => e.edge)), d, i, !0)) continue;
735
+ if (xt(e, new Set(m.map((e) => e.edge)), d, i, !0)) continue;
696
736
  let c = i + ((o ? Math.min(...m.map((e) => e.node.x)) : Math.max(...m.map((e) => e.node.x + e.node.width))) - i) / 2;
697
- c = mt(c, h, g, n, r);
737
+ c = yt(c, h, g, n, r);
698
738
  let l = [];
699
739
  for (let { edge: e, node: n } of m) {
700
740
  let r = o ? n.x : n.x + n.width, a = n.y + n.height / 2, u = [
@@ -715,7 +755,7 @@ function _t(e, t, n, r) {
715
755
  y: a
716
756
  }
717
757
  ];
718
- ft(u, t, /* @__PURE__ */ new Set([d, n.id])) && l.push({
758
+ _t(u, t, /* @__PURE__ */ new Set([d, n.id])) && l.push({
719
759
  edge: e,
720
760
  points: u
721
761
  });
@@ -724,9 +764,9 @@ function _t(e, t, n, r) {
724
764
  for (let { edge: e, points: t } of l) e.points = t, a.add(e);
725
765
  } else {
726
766
  let i = h, o = c ? p.y : p.y + p.height;
727
- if (gt(e, new Set(m.map((e) => e.edge)), d, o, !1)) continue;
767
+ if (xt(e, new Set(m.map((e) => e.edge)), d, o, !1)) continue;
728
768
  let s = o + ((c ? Math.max(...m.map((e) => e.node.y + e.node.height)) : Math.min(...m.map((e) => e.node.y))) - o) / 2;
729
- s = mt(s, h, g, n, r);
769
+ s = yt(s, h, g, n, r);
730
770
  let l = [];
731
771
  for (let { edge: e, node: n } of m) {
732
772
  let r = n.x + n.width / 2, a = c ? n.y + n.height : n.y, u = [
@@ -747,7 +787,7 @@ function _t(e, t, n, r) {
747
787
  y: a
748
788
  }
749
789
  ];
750
- ft(u, t, /* @__PURE__ */ new Set([d, n.id])) && l.push({
790
+ _t(u, t, /* @__PURE__ */ new Set([d, n.id])) && l.push({
751
791
  edge: e,
752
792
  points: u
753
793
  });
@@ -780,9 +820,9 @@ function _t(e, t, n, r) {
780
820
  let m = f.x + f.width / 2, h = f.y + f.height / 2;
781
821
  if (l) {
782
822
  let i = o ? f.x : f.x + f.width, s = h;
783
- if (gt(e, new Set(p.map((e) => e.edge)), a, i, !0)) continue;
823
+ if (xt(e, new Set(p.map((e) => e.edge)), a, i, !0)) continue;
784
824
  let c = o ? Math.max(...p.map((e) => e.node.x + e.node.width)) : Math.min(...p.map((e) => e.node.x)), l = c + (i - c) / 2;
785
- l = mt(l, m, h, n, r);
825
+ l = yt(l, m, h, n, r);
786
826
  let u = [];
787
827
  for (let { edge: e, node: n } of p) {
788
828
  let r = o ? n.x + n.width : n.x, c = n.y + n.height / 2, d = [
@@ -803,7 +843,7 @@ function _t(e, t, n, r) {
803
843
  y: s
804
844
  }
805
845
  ];
806
- ft(d, t, /* @__PURE__ */ new Set([n.id, a])) && u.push({
846
+ _t(d, t, /* @__PURE__ */ new Set([n.id, a])) && u.push({
807
847
  edge: e,
808
848
  points: d
809
849
  });
@@ -812,9 +852,9 @@ function _t(e, t, n, r) {
812
852
  for (let { edge: e, points: t } of u) e.points = t;
813
853
  } else {
814
854
  let i = m, o = c ? f.y + f.height : f.y;
815
- if (gt(e, new Set(p.map((e) => e.edge)), a, o, !1)) continue;
855
+ if (xt(e, new Set(p.map((e) => e.edge)), a, o, !1)) continue;
816
856
  let s = c ? Math.min(...p.map((e) => e.node.y)) : Math.max(...p.map((e) => e.node.y + e.node.height)), l = s + (o - s) / 2;
817
- l = mt(l, m, h, n, r);
857
+ l = yt(l, m, h, n, r);
818
858
  let u = [];
819
859
  for (let { edge: e, node: n } of p) {
820
860
  let r = n.x + n.width / 2, s = [
@@ -835,7 +875,7 @@ function _t(e, t, n, r) {
835
875
  y: o
836
876
  }
837
877
  ];
838
- ft(s, t, /* @__PURE__ */ new Set([n.id, a])) && u.push({
878
+ _t(s, t, /* @__PURE__ */ new Set([n.id, a])) && u.push({
839
879
  edge: e,
840
880
  points: s
841
881
  });
@@ -847,8 +887,8 @@ function _t(e, t, n, r) {
847
887
  }
848
888
  //#endregion
849
889
  //#region packages/svg-renderer/src/layout-engine/jog-straightening.ts
850
- var vt = 1.5, yt = .01;
851
- function bt(e) {
890
+ var Ct = 1.5, wt = .01;
891
+ function Tt(e) {
852
892
  let t = e.map((e) => ({ ...e })), n = 0;
853
893
  for (; n + 3 < t.length;) {
854
894
  let [e, r, i, a] = [
@@ -856,7 +896,7 @@ function bt(e) {
856
896
  t[n + 1],
857
897
  t[n + 2],
858
898
  t[n + 3]
859
- ], o = Math.abs(e.x - r.x) < yt && Math.abs(i.x - a.x) < yt && Math.abs(r.y - i.y) < yt && Math.abs(r.x - i.x) <= vt && Math.abs(r.x - i.x) >= yt, s = Math.abs(e.y - r.y) < yt && Math.abs(i.y - a.y) < yt && Math.abs(r.x - i.x) < yt && Math.abs(r.y - i.y) <= vt && Math.abs(r.y - i.y) >= yt;
899
+ ], o = Math.abs(e.x - r.x) < wt && Math.abs(i.x - a.x) < wt && Math.abs(r.y - i.y) < wt && Math.abs(r.x - i.x) <= Ct && Math.abs(r.x - i.x) >= wt, s = Math.abs(e.y - r.y) < wt && Math.abs(i.y - a.y) < wt && Math.abs(r.x - i.x) < wt && Math.abs(r.y - i.y) <= Ct && Math.abs(r.y - i.y) >= wt;
860
900
  if (o) {
861
901
  let r = (e.x + a.x) / 2;
862
902
  t.splice(n, 4, {
@@ -881,7 +921,7 @@ function bt(e) {
881
921
  }
882
922
  //#endregion
883
923
  //#region packages/svg-renderer/src/layout-engine/elk-adapter-utils.ts
884
- function xt(e, t = 0, n = 0) {
924
+ function Et(e, t = 0, n = 0) {
885
925
  let r = [];
886
926
  if (!e.sections || e.sections.length === 0) return r;
887
927
  let i = e.sections[0];
@@ -897,7 +937,7 @@ function xt(e, t = 0, n = 0) {
897
937
  y: i.endPoint.y + n
898
938
  }), r;
899
939
  }
900
- function St(e, t = 0, n = 0) {
940
+ function Dt(e, t = 0, n = 0) {
901
941
  if (!e.labels || e.labels.length === 0) return;
902
942
  let r = e.labels[0];
903
943
  if (r.x != null && r.y != null) return {
@@ -907,11 +947,11 @@ function St(e, t = 0, n = 0) {
907
947
  }
908
948
  //#endregion
909
949
  //#region packages/svg-renderer/src/layout-engine/from-elk.ts
910
- var Ct = 16, wt = 28, Tt = 18, Et = 28, Dt = 10;
911
- function Ot(e, t) {
912
- let n = e.x + e.width, r = e.y + e.height / 2, i = Math.min(Et, e.height * .6) / 2, a = wt + t * Tt, o = [];
913
- for (let e = 0; e <= Ct; e++) {
914
- let t = Math.PI * e / Ct;
950
+ var Ot = 16, kt = 28, At = 18, jt = 28, Mt = 10;
951
+ function Nt(e, t) {
952
+ let n = e.x + e.width, r = e.y + e.height / 2, i = Math.min(jt, e.height * .6) / 2, a = kt + t * At, o = [];
953
+ for (let e = 0; e <= Ot; e++) {
954
+ let t = Math.PI * e / Ot;
915
955
  o.push({
916
956
  x: n + a * Math.sin(t),
917
957
  y: r - i * Math.cos(t)
@@ -920,12 +960,12 @@ function Ot(e, t) {
920
960
  return {
921
961
  points: o,
922
962
  labelPosition: {
923
- x: n + a + Dt,
963
+ x: n + a + Mt,
924
964
  y: r
925
965
  }
926
966
  };
927
967
  }
928
- function kt(e, t, n) {
968
+ function Pt(e, t, n) {
929
969
  let r = /* @__PURE__ */ new Map();
930
970
  for (let i = 0; i < e.edges.length; i++) {
931
971
  let a = e.edges[i];
@@ -934,7 +974,7 @@ function kt(e, t, n) {
934
974
  if (!o) continue;
935
975
  let s = r.get(o.id) ?? 0;
936
976
  r.set(o.id, s + 1);
937
- let { points: c, labelPosition: l } = Ot(o, s);
977
+ let { points: c, labelPosition: l } = Nt(o, s);
938
978
  n.push({
939
979
  source: a.source,
940
980
  target: a.target,
@@ -944,39 +984,39 @@ function kt(e, t, n) {
944
984
  hasArrowEnd: a.hasArrowEnd,
945
985
  points: c,
946
986
  labelPosition: a.label ? l : void 0,
947
- inlineStyle: Vt(i, e),
987
+ inlineStyle: Kt(i, e),
948
988
  id: a.id,
949
989
  animate: a.animate
950
990
  });
951
991
  }
952
992
  }
953
- function At(e) {
993
+ function Ft(e) {
954
994
  let t = [];
955
995
  for (let n of e) t.push({
956
996
  x: n.x,
957
997
  y: n.y,
958
998
  right: n.x + n.width,
959
999
  bottom: n.y + n.height
960
- }), t.push(...At(n.children));
1000
+ }), t.push(...Ft(n.children));
961
1001
  return t;
962
1002
  }
963
- function jt(e, t, n = !1) {
1003
+ function It(e, t, n = !1) {
964
1004
  let r = [], i = [], a = [], o = /* @__PURE__ */ new Set();
965
- for (let e of t.subgraphs) Bt(e, o);
966
- Mt(e, t, o, r, a, 0, 0);
967
- let s = At(a);
968
- Ft(e, t, i, 0, 0, s.length > 0 ? {
1005
+ for (let e of t.subgraphs) Gt(e, o);
1006
+ Lt(e, t, o, r, a, 0, 0);
1007
+ let s = Ft(a);
1008
+ Bt(e, t, i, 0, 0, s.length > 0 ? {
969
1009
  leftX: Math.min(...s.map((e) => e.x)) - 20,
970
1010
  rightX: Math.max(...s.map((e) => e.right)) + 20
971
- } : void 0), ut(r, i, t.direction);
1011
+ } : void 0), ht(r, i, t.direction);
972
1012
  let c = new Map(r.map((e) => [e.id, e]));
973
- kt(t, c, i), n && _t(i, r, a, t.direction);
1013
+ Pt(t, c, i), n && St(i, r, a, t.direction);
974
1014
  for (let e of i) {
975
- e.points = bt(e.points);
1015
+ e.points = Tt(e.points);
976
1016
  let t = c.get(e.source), n = c.get(e.target);
977
- t && (e.points = ot(e.points, t, !0)), n && (e.points = ot(e.points, n, !1));
1017
+ t && (e.points = dt(e.points, t, !0)), n && (e.points = dt(e.points, n, !1));
978
1018
  }
979
- let l = e.width ?? 800, u = e.height ?? 600, d = Oe.width, f = B.padding;
1019
+ let l = e.width ?? 800, u = e.height ?? 600, d = Ne.width, f = B.padding;
980
1020
  for (let e of i) {
981
1021
  for (let t of e.points) l = Math.max(l, t.x + d + f), u = Math.max(u, t.y + d + f);
982
1022
  e.labelPosition && (l = Math.max(l, e.labelPosition.x + 60 + f), u = Math.max(u, e.labelPosition.y + 20 + f));
@@ -989,13 +1029,13 @@ function jt(e, t, n = !1) {
989
1029
  groups: a
990
1030
  };
991
1031
  }
992
- function Mt(e, t, n, r, i, a, o) {
1032
+ function Lt(e, t, n, r, i, a, o) {
993
1033
  if (e.children) for (let s of e.children) {
994
1034
  let e = (s.x ?? 0) + a, c = (s.y ?? 0) + o, l = s.width ?? 0, u = s.height ?? 0;
995
1035
  if (n.has(s.id)) {
996
1036
  let a = [];
997
- Mt(s, t, n, r, a, e, c);
998
- let o = zt(t.subgraphs, s.id);
1037
+ Lt(s, t, n, r, a, e, c);
1038
+ let o = Wt(t.subgraphs, s.id);
999
1039
  i.push({
1000
1040
  id: s.id,
1001
1041
  label: o?.label ?? "",
@@ -1022,11 +1062,11 @@ function Mt(e, t, n, r, i, a, o) {
1022
1062
  interaction: t.interactions.get(s.id)
1023
1063
  });
1024
1064
  }
1025
- s.children && s.children.length > 0 && Mt(s, t, n, r, i, e, c);
1065
+ s.children && s.children.length > 0 && Lt(s, t, n, r, i, e, c);
1026
1066
  }
1027
1067
  }
1028
1068
  }
1029
- function Nt(e) {
1069
+ function Rt(e) {
1030
1070
  let t = /^e(\d+)$/.exec(e);
1031
1071
  if (t) return {
1032
1072
  edgeIndex: parseInt(t[1], 10),
@@ -1039,7 +1079,7 @@ function Nt(e) {
1039
1079
  level: parseInt(n[3], 10)
1040
1080
  };
1041
1081
  }
1042
- function Pt(e) {
1082
+ function zt(e) {
1043
1083
  if (e.length === 0) return {
1044
1084
  x: 0,
1045
1085
  y: 0
@@ -1064,11 +1104,11 @@ function Pt(e) {
1064
1104
  }
1065
1105
  return e[e.length - 1];
1066
1106
  }
1067
- function Ft(e, t, n, r, i, a) {
1107
+ function Bt(e, t, n, r, i, a) {
1068
1108
  let o = /* @__PURE__ */ new Map();
1069
- It(e, o, 0, 0);
1109
+ Vt(e, o, 0, 0);
1070
1110
  let s = /* @__PURE__ */ new Map();
1071
- Rt(e, s, 0, 0, o);
1111
+ Ut(e, s, 0, 0, o);
1072
1112
  let c = 0;
1073
1113
  for (let [e, r] of s) {
1074
1114
  let i = t.edges[e];
@@ -1081,24 +1121,24 @@ function Ft(e, t, n, r, i, a) {
1081
1121
  let u = [...r.targetHops.keys()].sort((e, t) => e - t);
1082
1122
  for (let e of u) s(r.targetHops.get(e));
1083
1123
  let d;
1084
- i.label && o.length >= 2 && (d = r.bridge?.labelPosition ?? Pt(o));
1085
- let f = Lt(o, a, c);
1086
- f !== o && c++, i.label && f !== o && f.length >= 2 && (d = Pt(f)), n.push({
1124
+ i.label && o.length >= 2 && (d = r.bridge?.labelPosition ?? zt(o));
1125
+ let f = Ht(o, a, c);
1126
+ f !== o && c++, i.label && f !== o && f.length >= 2 && (d = zt(f)), n.push({
1087
1127
  source: i.source,
1088
1128
  target: i.target,
1089
1129
  label: i.label,
1090
1130
  style: i.style,
1091
1131
  hasArrowStart: i.hasArrowStart,
1092
1132
  hasArrowEnd: i.hasArrowEnd,
1093
- points: We(t).has(e) ? [...f].reverse() : f,
1133
+ points: Ye(t).has(e) ? [...f].reverse() : f,
1094
1134
  labelPosition: d,
1095
- inlineStyle: Vt(e, t),
1135
+ inlineStyle: Kt(e, t),
1096
1136
  id: i.id,
1097
1137
  animate: i.animate
1098
1138
  });
1099
1139
  }
1100
1140
  }
1101
- function It(e, t, n, r) {
1141
+ function Vt(e, t, n, r) {
1102
1142
  t.set(e.id, {
1103
1143
  x: n,
1104
1144
  y: r
@@ -1106,10 +1146,10 @@ function It(e, t, n, r) {
1106
1146
  for (let i of e.children ?? []) {
1107
1147
  /* v8 ignore next */
1108
1148
  let e = i.x ?? 0, a = i.y ?? 0;
1109
- It(i, t, n + e, r + a);
1149
+ Vt(i, t, n + e, r + a);
1110
1150
  }
1111
1151
  }
1112
- function Lt(e, t, n = 0) {
1152
+ function Ht(e, t, n = 0) {
1113
1153
  if (e.length < 2) return e;
1114
1154
  let r = !1;
1115
1155
  for (let t = 1; t < e.length; t++) {
@@ -1148,11 +1188,11 @@ function Lt(e, t, n = 0) {
1148
1188
  }
1149
1189
  return i;
1150
1190
  }
1151
- function Rt(e, t, n, r, i) {
1191
+ function Ut(e, t, n, r, i) {
1152
1192
  if (e.edges) for (let a of e.edges) {
1153
- let e = Nt(a.id);
1193
+ let e = Rt(a.id);
1154
1194
  if (!e) continue;
1155
- let { edgeIndex: o } = e, s = a.container, c = s ? i.get(s) : void 0, l = c?.x ?? n, u = c?.y ?? r, d = xt(a, l, u), f = St(a, l, u), p = t.get(o) ?? {
1195
+ let { edgeIndex: o } = e, s = a.container, c = s ? i.get(s) : void 0, l = c?.x ?? n, u = c?.y ?? r, d = Et(a, l, u), f = Dt(a, l, u), p = t.get(o) ?? {
1156
1196
  sourceHops: /* @__PURE__ */ new Map(),
1157
1197
  targetHops: /* @__PURE__ */ new Map()
1158
1198
  };
@@ -1164,20 +1204,20 @@ function Rt(e, t, n, r, i) {
1164
1204
  };
1165
1205
  e.role === "bridge" ? p.bridge = m : e.role === "source" ? p.sourceHops.set(e.level, m) : p.targetHops.set(e.level, m);
1166
1206
  }
1167
- if (e.children) for (let a of e.children) Rt(a, t, n + (a.x ?? 0), r + (a.y ?? 0), i);
1207
+ if (e.children) for (let a of e.children) Ut(a, t, n + (a.x ?? 0), r + (a.y ?? 0), i);
1168
1208
  }
1169
- function zt(e, t) {
1209
+ function Wt(e, t) {
1170
1210
  for (let n of e) {
1171
1211
  if (n.id === t) return n;
1172
- let e = zt(n.children, t);
1212
+ let e = Wt(n.children, t);
1173
1213
  if (e) return e;
1174
1214
  }
1175
1215
  }
1176
- function Bt(e, t) {
1216
+ function Gt(e, t) {
1177
1217
  t.add(e.id);
1178
- for (let n of e.children) Bt(n, t);
1218
+ for (let n of e.children) Gt(n, t);
1179
1219
  }
1180
- function Vt(e, t) {
1220
+ function Kt(e, t) {
1181
1221
  let n, r = t.linkStyles.get("default");
1182
1222
  r && (n = { ...r });
1183
1223
  let i = t.linkStyles.get(e);
@@ -1188,12 +1228,12 @@ function Vt(e, t) {
1188
1228
  }
1189
1229
  //#endregion
1190
1230
  //#region packages/svg-renderer/src/layout-engine/inner-edges.ts
1191
- var Ht = 10, Ut = 14, Wt = 14, Gt = 10, Kt = 24, qt = 400, Jt = /* @__PURE__ */ new Set([
1231
+ var qt = 10, Jt = 14, Yt = 14, Xt = 10, Zt = 24, Qt = 400, $t = /* @__PURE__ */ new Set([
1192
1232
  "rectangle",
1193
1233
  "rounded",
1194
1234
  "subroutine"
1195
1235
  ]);
1196
- function Yt(e) {
1236
+ function en(e) {
1197
1237
  let t = e === "TD" || e === "TB" || e === "BT", n = e === "BT" || e === "RL" ? -1 : 1;
1198
1238
  return {
1199
1239
  span: (e) => {
@@ -1214,17 +1254,17 @@ function Yt(e) {
1214
1254
  }
1215
1255
  };
1216
1256
  }
1217
- function Xt(e, t, n) {
1257
+ function tn(e, t, n) {
1218
1258
  let r = Math.min(e.a, t.a), i = Math.max(e.a, t.a), a = Math.min(e.c, t.c), o = Math.max(e.c, t.c);
1219
1259
  return i > n.a0 && r < n.a1 && o > n.c0 && a < n.c1;
1220
1260
  }
1221
- var Zt = (e, t) => ({
1261
+ var nn = (e, t) => ({
1222
1262
  a0: e.a0 - t,
1223
1263
  a1: e.a1 + t,
1224
1264
  c0: e.c0 - t,
1225
1265
  c1: e.c1 + t
1226
1266
  });
1227
- function Qt(e, t) {
1267
+ function rn(e, t) {
1228
1268
  let n = e.span({
1229
1269
  x: t.x,
1230
1270
  y: t.y,
@@ -1236,23 +1276,23 @@ function Qt(e, t) {
1236
1276
  c: n.c0
1237
1277
  };
1238
1278
  }
1239
- function $t(e, t, n) {
1279
+ function an(e, t, n) {
1240
1280
  let r = e.c === t.c;
1241
1281
  for (let i = 1; i < n.length; i++) {
1242
1282
  let a = n[i - 1], o = n[i];
1243
1283
  if (a.c === o.c === r) {
1244
1284
  if (r) {
1245
1285
  let n = Math.abs(e.c - a.c), r = Math.min(Math.max(e.a, t.a), Math.max(a.a, o.a)) - Math.max(Math.min(e.a, t.a), Math.min(a.a, o.a));
1246
- if (n < Ut && r > 0) return !0;
1286
+ if (n < Jt && r > 0) return !0;
1247
1287
  } else {
1248
1288
  let n = Math.abs(e.a - a.a), r = Math.min(Math.max(e.c, t.c), Math.max(a.c, o.c)) - Math.max(Math.min(e.c, t.c), Math.min(a.c, o.c));
1249
- if (n < Ut && r > 0) return !0;
1289
+ if (n < Jt && r > 0) return !0;
1250
1290
  }
1251
1291
  }
1252
1292
  }
1253
1293
  return !1;
1254
1294
  }
1255
- function en(e) {
1295
+ function on(e) {
1256
1296
  let t = [];
1257
1297
  for (let n of e) {
1258
1298
  let e = t[t.length - 1];
@@ -1264,24 +1304,24 @@ function en(e) {
1264
1304
  }
1265
1305
  return t;
1266
1306
  }
1267
- var tn = (e) => {
1307
+ var sn = (e) => {
1268
1308
  let t = 0;
1269
1309
  for (let n = 1; n < e.length; n++) t += Math.abs(e[n].a - e[n - 1].a) + Math.abs(e[n].c - e[n - 1].c);
1270
1310
  return t;
1271
1311
  };
1272
- function nn(e, t, n, r, i, a = []) {
1273
- let o = Yt(i), s = o.span(e), c = o.span(t), l = s.a1 <= c.a0, u = c.a1 <= s.a0;
1312
+ function cn(e, t, n, r, i, a = []) {
1313
+ let o = en(i), s = o.span(e), c = o.span(t), l = s.a1 <= c.a0, u = c.a1 <= s.a0;
1274
1314
  if (!l && !u) return;
1275
1315
  let d = o.span(r), f = {
1276
- a0: d.a0 + Gt,
1277
- a1: d.a1 - Gt,
1278
- c0: d.c0 + Gt,
1279
- c1: d.c1 - Gt
1280
- }, p = a.map((e) => e.map((e) => Qt(o, e))), m = n.map((e) => Zt(o.span(e), Ht)), h = (e) => (e.c0 + e.c1) / 2, g = (e) => (e.a0 + e.a1) / 2, _ = (e) => Jt.has(e.shape), v = (e) => {
1316
+ a0: d.a0 + Xt,
1317
+ a1: d.a1 - Xt,
1318
+ c0: d.c0 + Xt,
1319
+ c1: d.c1 - Xt
1320
+ }, p = a.map((e) => e.map((e) => rn(o, e))), m = n.map((e) => nn(o.span(e), qt)), h = (e) => (e.c0 + e.c1) / 2, g = (e) => (e.a0 + e.a1) / 2, _ = (e) => $t.has(e.shape), v = (e) => {
1281
1321
  for (let t of e) if (t.a < f.a0 || t.a > f.a1 || t.c < f.c0 || t.c > f.c1) return !1;
1282
1322
  for (let t = 1; t < e.length; t++) {
1283
1323
  let n = e[t - 1], r = e[t];
1284
- if (n.a !== r.a && n.c !== r.c || m.some((e) => Xt(n, r, e)) || Xt(n, r, s) || Xt(n, r, c) || p.some((e) => $t(n, r, e))) return !1;
1324
+ if (n.a !== r.a && n.c !== r.c || m.some((e) => tn(n, r, e)) || tn(n, r, s) || tn(n, r, c) || p.some((e) => an(n, r, e))) return !1;
1285
1325
  }
1286
1326
  return !0;
1287
1327
  }, y = /* @__PURE__ */ new Set([
@@ -1291,10 +1331,10 @@ function nn(e, t, n, r, i, a = []) {
1291
1331
  f.c1
1292
1332
  ]);
1293
1333
  for (let e of m) y.add(e.c0 - 1), y.add(e.c1 + 1);
1294
- for (let e of [s, c]) y.add(e.c0 - Ht), y.add(e.c1 + Ht);
1334
+ for (let e of [s, c]) y.add(e.c0 - qt), y.add(e.c1 + qt);
1295
1335
  let b = (e, t, n) => _(e) ? n >= t.c0 + 4 && n <= t.c1 - 4 : Math.abs(n - h(t)) < .5, x = [];
1296
1336
  if (l) {
1297
- let n = (c.a0 - s.a1) / 2, r = s.a1 + Math.min(Wt, n), i = c.a0 - Math.min(Wt, n);
1337
+ let n = (c.a0 - s.a1) / 2, r = s.a1 + Math.min(Yt, n), i = c.a0 - Math.min(Yt, n);
1298
1338
  for (let n of y) {
1299
1339
  b(e, s, n) && b(t, c, n) && x.push([{
1300
1340
  a: s.a1,
@@ -1433,14 +1473,14 @@ function nn(e, t, n, r, i, a = []) {
1433
1473
  }
1434
1474
  let S, C = Infinity;
1435
1475
  for (let t of x) {
1436
- let n = en(t);
1476
+ let n = on(t);
1437
1477
  if (n.length < 2 || !v(n)) continue;
1438
- let r = e.shape === "diamond" && n[0].a === s.a1 ? qt : 0, i = tn(n) + Kt * (n.length - 2) + r;
1478
+ let r = e.shape === "diamond" && n[0].a === s.a1 ? Qt : 0, i = sn(n) + Zt * (n.length - 2) + r;
1439
1479
  i < C && (S = n, C = i);
1440
1480
  }
1441
1481
  return S?.map(o.toPoint);
1442
1482
  }
1443
- function rn(e) {
1483
+ function ln(e) {
1444
1484
  let t = {
1445
1485
  x: e[0].x,
1446
1486
  y: e[0].y
@@ -1456,24 +1496,24 @@ function rn(e) {
1456
1496
  }
1457
1497
  //#endregion
1458
1498
  //#region packages/svg-renderer/src/layout-engine/compound-flat.ts
1459
- var an = "__zm_spine__", on = 8, sn = 6, cn = 12, ln = 4, un = 4, dn = .25, fn = .02, pn = 40, mn = (e) => e === "TD" || e === "TB" || e === "BT", hn = (e) => e.startsWith(an);
1460
- function gn(e) {
1461
- return e.flatMap((e) => [e, ...gn(e.children)]);
1499
+ var un = "__zm_spine__", dn = 8, fn = 6, pn = 12, mn = 4, hn = 4, gn = .25, _n = .02, vn = 40, yn = (e) => e === "TD" || e === "TB" || e === "BT", bn = (e) => e.startsWith(un);
1500
+ function xn(e) {
1501
+ return e.flatMap((e) => [e, ...xn(e.children)]);
1462
1502
  }
1463
1503
  function V(e) {
1464
1504
  let t = new Set(e.nodeIds);
1465
1505
  for (let n of e.children) for (let e of V(n)) t.add(e);
1466
1506
  return t;
1467
1507
  }
1468
- function _n(e) {
1469
- if (e.subgraphs.length === 0 || Ve(e) || Ze(e.subgraphs)) return !1;
1470
- for (let t of e.nodes.keys()) if (hn(t)) return !1;
1508
+ function Sn(e) {
1509
+ if (e.subgraphs.length === 0 || Ke(e) || nt(e.subgraphs)) return !1;
1510
+ for (let t of e.nodes.keys()) if (bn(t)) return !1;
1471
1511
  for (let t of e.edges) if (!e.nodes.has(t.source) || !e.nodes.has(t.target)) return !1;
1472
- let t = gn(e.subgraphs);
1512
+ let t = xn(e.subgraphs);
1473
1513
  return !t.some((t) => e.nodes.has(t.id)) && t.every((t) => [...V(t)].some((t) => e.nodes.has(t)));
1474
1514
  }
1475
- function vn(e, t) {
1476
- let n = mn(t), r = (e) => n ? [e.y, e.y + e.height] : [e.x, e.x + e.width], i = [...e].sort((e, t) => {
1515
+ function Cn(e, t) {
1516
+ let n = yn(t), r = (e) => n ? [e.y, e.y + e.height] : [e.x, e.x + e.width], i = [...e].sort((e, t) => {
1477
1517
  let [n, i] = r(e), [a, o] = r(t);
1478
1518
  return (n + i) / 2 - (a + o) / 2;
1479
1519
  }), a = [];
@@ -1488,7 +1528,7 @@ function vn(e, t) {
1488
1528
  let o = /* @__PURE__ */ new Map();
1489
1529
  return a.forEach((e, t) => e.ids.forEach((e) => o.set(e, t))), o;
1490
1530
  }
1491
- function yn(e, t, n) {
1531
+ function wn(e, t, n) {
1492
1532
  let r = {
1493
1533
  ghosts: [],
1494
1534
  edges: []
@@ -1501,7 +1541,7 @@ function yn(e, t, n) {
1501
1541
  let o = e.filter((e) => t.get(e) === a).sort((e, t) => n(e) - n(t));
1502
1542
  if (o.length > 0) c.set(a, o[0]);
1503
1543
  else {
1504
- let e = `${an}${i.id}__${a}`;
1544
+ let e = `${un}${i.id}__${a}`;
1505
1545
  r.ghosts.push({
1506
1546
  id: e,
1507
1547
  subgraph: i.id
@@ -1510,7 +1550,7 @@ function yn(e, t, n) {
1510
1550
  }
1511
1551
  for (let e = o; e < s; e++) {
1512
1552
  let t = c.get(e), n = c.get(e + 1);
1513
- !hn(t) && !hn(n) || r.edges.push({
1553
+ !bn(t) && !bn(n) || r.edges.push({
1514
1554
  source: t,
1515
1555
  target: n,
1516
1556
  style: "invisible",
@@ -1521,7 +1561,7 @@ function yn(e, t, n) {
1521
1561
  }
1522
1562
  return r;
1523
1563
  }
1524
- function bn(e, t, n, r = () => !1) {
1564
+ function Tn(e, t, n, r = () => !1) {
1525
1565
  let i = (e) => {
1526
1566
  let n = [...V(e)].filter((e) => t.has(e)).map((e) => t.get(e));
1527
1567
  return n.length > 0 ? [Math.min(...n), Math.max(...n)] : void 0;
@@ -1543,9 +1583,9 @@ function bn(e, t, n, r = () => !1) {
1543
1583
  for (let r of V(e)) n.has(r) && n.set(r, n.get(r) + s[t]);
1544
1584
  });
1545
1585
  }
1546
- for (let i of e) bn(i.children, t, n, r);
1586
+ for (let i of e) Tn(i.children, t, n, r);
1547
1587
  }
1548
- function xn(e, t, n, r, i) {
1588
+ function En(e, t, n, r, i) {
1549
1589
  let a = new Map(t);
1550
1590
  for (let t of r) {
1551
1591
  let r = V(t);
@@ -1554,7 +1594,7 @@ function xn(e, t, n, r, i) {
1554
1594
  if (s.length === 0) continue;
1555
1595
  let c = Math.min(...s.map((e) => n.get(e))), l = Math.max(...s.map((e) => n.get(e))), u = o.map((e) => a.get(e)), d = Math.min(...u), f = Math.max(...u), p = (d + f) / 2, m = 0;
1556
1596
  for (let t of e) {
1557
- if (r.has(t) || hn(t)) continue;
1597
+ if (r.has(t) || bn(t)) continue;
1558
1598
  let e = n.get(t);
1559
1599
  if (e === void 0 || e < c || e > l) continue;
1560
1600
  m++;
@@ -1565,13 +1605,13 @@ function xn(e, t, n, r, i) {
1565
1605
  let o = new Map(e.map((e, t) => [e, t]));
1566
1606
  return [...e].sort((e, t) => a.get(e) - a.get(t) || o.get(e) - o.get(t));
1567
1607
  }
1568
- var Sn = (e, t) => t >= Math.min(...e) && t <= Math.max(...e);
1569
- function Cn(e, t, n) {
1608
+ var Dn = (e, t) => t >= Math.min(...e) && t <= Math.max(...e);
1609
+ function On(e, t, n) {
1570
1610
  let r = (e) => {
1571
1611
  let i = e.children.map(r), a = [...[...V(e)].flatMap((e) => {
1572
1612
  let n = t.get(e);
1573
1613
  return n ? [n] : [];
1574
- }), ...i], o = Math.min(...a.map((e) => e.x)) - He.left, s = Math.min(...a.map((e) => e.y)) - He.top, c = Math.max(...a.map((e) => e.x + e.width)) + He.right, u = Math.max(...a.map((e) => e.y + e.height)) + He.bottom, d = l(e.label, n.groupHeader, L.groupHeader).width + 24;
1614
+ }), ...i], o = Math.min(...a.map((e) => e.x)) - qe.left, s = Math.min(...a.map((e) => e.y)) - qe.top, c = Math.max(...a.map((e) => e.x + e.width)) + qe.right, u = Math.max(...a.map((e) => e.y + e.height)) + qe.bottom, d = l(e.label, n.groupHeader, L.groupHeader).width + 24;
1575
1615
  return {
1576
1616
  id: e.id,
1577
1617
  label: e.label,
@@ -1584,14 +1624,14 @@ function Cn(e, t, n) {
1584
1624
  };
1585
1625
  return e.map(r);
1586
1626
  }
1587
- var wn = (e) => e.flatMap((e) => [e, ...wn(e.children)]);
1588
- function Tn(e, t, n, r, i, a) {
1589
- let o = mn(r), s = new Map(gn(t).map((e) => [e.id, V(e)])), c = /* @__PURE__ */ new Map(), l = !1, u = [], d = (e) => o ? [e.x, e.x + e.width] : [e.y, e.y + e.height], f = (e) => o ? [e.y, e.y + e.height] : [e.x, e.x + e.width], p = ([e, t], [n, r]) => Math.max(0, Math.min(t, r) - Math.max(e, n)), m = (e) => ({
1590
- x: e.x - pn,
1591
- y: e.y - pn,
1627
+ var kn = (e) => e.flatMap((e) => [e, ...kn(e.children)]);
1628
+ function An(e, t, n, r, i, a) {
1629
+ let o = yn(r), s = new Map(xn(t).map((e) => [e.id, V(e)])), c = /* @__PURE__ */ new Map(), l = !1, u = [], d = (e) => o ? [e.x, e.x + e.width] : [e.y, e.y + e.height], f = (e) => o ? [e.y, e.y + e.height] : [e.x, e.x + e.width], p = ([e, t], [n, r]) => Math.max(0, Math.min(t, r) - Math.max(e, n)), m = (e) => ({
1630
+ x: e.x - vn,
1631
+ y: e.y - vn,
1592
1632
  width: e.width + 80,
1593
1633
  height: e.height + 80
1594
- }), h = (e, t) => p(f(e), f(t)) > 0 ? p(d(e), d(t)) : 0, g = wn(e), _ = new Map(g.map((e) => [e, m(e)])), v = (e, t, n, r) => {
1634
+ }), h = (e, t) => p(f(e), f(t)) > 0 ? p(d(e), d(t)) : 0, g = kn(e), _ = new Map(g.map((e) => [e, m(e)])), v = (e, t, n, r) => {
1595
1635
  let i = p(d(e), d(t)), a = p(f(e), f(t));
1596
1636
  if (i <= 0 || a <= 0) return;
1597
1637
  let s = i <= a, c = s === o, l = (e) => c ? e.x : e.y, m = (e) => c ? e.x + e.width : e.y + e.height, h = (e) => (l(e) + m(e)) / 2, g = h(n) <= h(r) ? n : r;
@@ -1605,7 +1645,7 @@ function Tn(e, t, n, r, i, a) {
1605
1645
  let t = s.get(e.id), r = [...t].filter((e) => a.has(e)).map((e) => a.get(e)), o = new Set(r);
1606
1646
  for (let [s, u] of n) {
1607
1647
  if (t.has(s)) continue;
1608
- if (o.has(a.get(s)) || !Sn(r, a.get(s))) {
1648
+ if (o.has(a.get(s)) || !Dn(r, a.get(s))) {
1609
1649
  v(_.get(e), u, e, u);
1610
1650
  continue;
1611
1651
  }
@@ -1613,7 +1653,7 @@ function Tn(e, t, n, r, i, a) {
1613
1653
  n <= 0 || (i.has(e.id) ? c.set(e.id, Math.max(c.get(e.id) ?? 0, n)) : l = !0);
1614
1654
  }
1615
1655
  }
1616
- let y = (e, t) => wn(e.children).includes(t);
1656
+ let y = (e, t) => kn(e.children).includes(t);
1617
1657
  for (let e = 0; e < g.length; e++) for (let t = e + 1; t < g.length; t++) {
1618
1658
  let n = g[e], r = g[t];
1619
1659
  y(n, r) || y(r, n) || v(_.get(n), r, n, r);
@@ -1624,17 +1664,17 @@ function Tn(e, t, n, r, i, a) {
1624
1664
  requests: u
1625
1665
  };
1626
1666
  }
1627
- function En(e, t, n) {
1667
+ function jn(e, t, n) {
1628
1668
  let r = [...e.nodes.keys()], i = {
1629
1669
  ...e,
1630
1670
  subgraphs: []
1631
- }, a = t(i), o = vn(a.nodes, e.direction), s = mn(e.direction), c = new Map(a.nodes.map((e) => [e.id, e])), l = (e) => {
1671
+ }, a = t(i), o = Cn(a.nodes, e.direction), s = yn(e.direction), c = new Map(a.nodes.map((e) => [e.id, e])), l = (e) => {
1632
1672
  let t = c.get(e);
1633
1673
  return s ? t.x : t.y;
1634
- }, u = gn(e.subgraphs), d = yn(u, o, l), f = /* @__PURE__ */ new Map();
1674
+ }, u = xn(e.subgraphs), d = wn(u, o, l), f = /* @__PURE__ */ new Map();
1635
1675
  for (let e of d.ghosts) f.set(e.subgraph, [...f.get(e.subgraph) ?? [], e.id]);
1636
1676
  let p = new Map(a.nodes.map((e) => [e.id, l(e.id)]));
1637
- bn(e.subgraphs, o, p, (t, n) => {
1677
+ Tn(e.subgraphs, o, p, (t, n) => {
1638
1678
  let r = V(t), i = V(n), a = (t, n) => e.edges.some((e) => t.has(e.source) && n.has(e.target));
1639
1679
  return a(r, i) && a(i, r);
1640
1680
  });
@@ -1648,42 +1688,42 @@ function En(e, t, n) {
1648
1688
  label: " ",
1649
1689
  shape: "rectangle"
1650
1690
  });
1651
- let h = xn([...m.keys()], p, o, u, f), g = {
1691
+ let h = En([...m.keys()], p, o, u, f), g = {
1652
1692
  ...i,
1653
1693
  nodes: new Map(h.map((e) => [e, m.get(e)])),
1654
1694
  edges: [...e.edges, ...d.edges]
1655
1695
  }, _ = new Set(d.edges.map((t, n) => e.edges.length + n)), v = (i) => {
1656
1696
  let a = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1657
1697
  for (let c = 0;; c++) {
1658
- let l = new Map(d.ghosts.map((e) => [e.id, on + (a.get(e.subgraph) ?? 0)])), p = t(g, {
1698
+ let l = new Map(d.ghosts.map((e) => [e.id, dn + (a.get(e.subgraph) ?? 0)])), p = t(g, {
1659
1699
  fixedWidths: l,
1660
1700
  looseEdges: _,
1661
1701
  detachedEdges: i,
1662
1702
  walkOrder: r,
1663
1703
  forceNodeOrder: !0
1664
- }), m = new Map(p.nodes.filter((e) => !hn(e.id)).map((e) => [e.id, e])), h = Cn(e.subgraphs, m, n), v = Tn(h, e.subgraphs, m, e.direction, new Set(f.keys()), o), { penetration: y, stuck: b } = v;
1704
+ }), m = new Map(p.nodes.filter((e) => !bn(e.id)).map((e) => [e.id, e])), h = On(e.subgraphs, m, n), v = An(h, e.subgraphs, m, e.direction, new Set(f.keys()), o), { penetration: y, stuck: b } = v;
1665
1705
  if (b) return;
1666
1706
  if (y.size === 0) {
1667
1707
  for (let t = 0; v.requests.length > 0; t++) {
1668
- if (t === cn) return;
1669
- kn(v.requests.reduce((e, t) => t.amount > e.amount ? t : e), [...m.values()], p.edges), h = Cn(e.subgraphs, m, n), v = Tn(h, e.subgraphs, m, e.direction, new Set(f.keys()), o);
1708
+ if (t === pn) return;
1709
+ Pn(v.requests.reduce((e, t) => t.amount > e.amount ? t : e), [...m.values()], p.edges), h = On(e.subgraphs, m, n), v = An(h, e.subgraphs, m, e.direction, new Set(f.keys()), o);
1670
1710
  }
1671
- let t = On(e, i, m, h, u);
1672
- return t && An(p, [...m.values()], h, t);
1711
+ let t = Nn(e, i, m, h, u);
1712
+ return t && Fn(p, [...m.values()], h, t);
1673
1713
  }
1674
- if (c === sn) return;
1714
+ if (c === fn) return;
1675
1715
  for (let [e, t] of y) {
1676
- let n = a.get(e) ?? 0, r = s.get(e), i = r ? (r.overlap - t) / (n - r.width) : 0, o = i > fn ? i : dn;
1716
+ let n = a.get(e) ?? 0, r = s.get(e), i = r ? (r.overlap - t) / (n - r.width) : 0, o = i > _n ? i : gn;
1677
1717
  s.set(e, {
1678
1718
  width: n,
1679
1719
  overlap: t
1680
- }), a.set(e, n + t / o + un);
1720
+ }), a.set(e, n + t / o + hn);
1681
1721
  }
1682
1722
  }
1683
- }, y = Dn(e, d, o, u);
1723
+ }, y = Mn(e, d, o, u);
1684
1724
  return (y.size > 0 ? v(y) : void 0) ?? v(/* @__PURE__ */ new Set());
1685
1725
  }
1686
- function Dn(e, t, n, r) {
1726
+ function Mn(e, t, n, r) {
1687
1727
  let i = r.map((e) => {
1688
1728
  let t = V(e);
1689
1729
  return {
@@ -1709,15 +1749,15 @@ function Dn(e, t, n, r) {
1709
1749
  }
1710
1750
  return o;
1711
1751
  }
1712
- function On(e, t, n, r, i) {
1713
- let a = new Map(wn(r).map((e) => [e.id, e])), o = [];
1752
+ function Nn(e, t, n, r, i) {
1753
+ let a = new Map(kn(r).map((e) => [e.id, e])), o = [];
1714
1754
  for (let r of t) {
1715
1755
  let t = e.edges[r], s = n.get(t.source), c = n.get(t.target), l = i.filter((e) => {
1716
1756
  let n = V(e);
1717
1757
  return n.has(t.source) && n.has(t.target);
1718
1758
  }).sort((e, t) => V(e).size - V(t).size)[0], u = l && a.get(l.id);
1719
1759
  if (!s || !c || !u) return;
1720
- let d = nn(s, c, [...n.values()].filter((e) => e !== s && e !== c), u, e.direction, o.map((e) => e.points));
1760
+ let d = cn(s, c, [...n.values()].filter((e) => e !== s && e !== c), u, e.direction, o.map((e) => e.points));
1721
1761
  if (!d) return;
1722
1762
  o.push({
1723
1763
  source: t.source,
@@ -1727,24 +1767,24 @@ function On(e, t, n, r, i) {
1727
1767
  hasArrowStart: t.hasArrowStart,
1728
1768
  hasArrowEnd: t.hasArrowEnd,
1729
1769
  points: d,
1730
- labelPosition: t.label ? rn(d) : void 0,
1731
- inlineStyle: Vt(r, e),
1770
+ labelPosition: t.label ? ln(d) : void 0,
1771
+ inlineStyle: Kt(r, e),
1732
1772
  id: t.id,
1733
1773
  animate: t.animate
1734
1774
  });
1735
1775
  }
1736
1776
  return o;
1737
1777
  }
1738
- function kn(e, t, n) {
1739
- let { axis: r, amount: i, after: a } = e, o = i + ln, s = t.filter((e) => e[r] >= a), c = Math.min(...s.map((e) => e[r]));
1778
+ function Pn(e, t, n) {
1779
+ let { axis: r, amount: i, after: a } = e, o = i + mn, s = t.filter((e) => e[r] >= a), c = Math.min(...s.map((e) => e[r]));
1740
1780
  for (let e of s) e[r] += o;
1741
1781
  let l = (e) => {
1742
1782
  e[r] >= c && (e[r] += o);
1743
1783
  };
1744
1784
  for (let e of n) e.points.forEach(l), e.labelPosition && l(e.labelPosition);
1745
1785
  }
1746
- function An(e, t, n, r) {
1747
- let i = [...e.edges.filter((e) => !hn(e.source) && !hn(e.target)), ...r], a = wn(n), o = [
1786
+ function Fn(e, t, n, r) {
1787
+ let i = [...e.edges.filter((e) => !bn(e.source) && !bn(e.target)), ...r], a = kn(n), o = [
1748
1788
  ...t.map((e) => e.x),
1749
1789
  ...a.map((e) => e.x),
1750
1790
  ...i.flatMap((e) => e.points.map((e) => e.x))
@@ -1763,7 +1803,7 @@ function An(e, t, n, r) {
1763
1803
  for (let e of t) u = Math.max(u, e.x + e.width + B.padding), d = Math.max(d, e.y + e.height + B.padding);
1764
1804
  for (let e of a) u = Math.max(u, e.x + e.width + B.padding), d = Math.max(d, e.y + e.height + B.padding);
1765
1805
  for (let e of i) {
1766
- for (let t of e.points) u = Math.max(u, t.x + Oe.width + B.padding), d = Math.max(d, t.y + Oe.width + B.padding);
1806
+ for (let t of e.points) u = Math.max(u, t.x + Ne.width + B.padding), d = Math.max(d, t.y + Ne.width + B.padding);
1767
1807
  e.labelPosition && (u = Math.max(u, e.labelPosition.x + 60 + B.padding), d = Math.max(d, e.labelPosition.y + 20 + B.padding));
1768
1808
  }
1769
1809
  return {
@@ -1777,51 +1817,51 @@ function An(e, t, n, r) {
1777
1817
  }
1778
1818
  //#endregion
1779
1819
  //#region packages/svg-renderer/src/layout-engine.ts
1780
- function jn(e, t = {}) {
1781
- return Mn(e, t);
1820
+ function In(e, t = {}) {
1821
+ return Ln(e, t);
1782
1822
  }
1783
- function Mn(e, t, n) {
1823
+ function Ln(e, t, n) {
1784
1824
  let r = {
1785
1825
  ...B,
1786
1826
  ...t,
1787
- fontSizes: Te(t.fontSizes)
1827
+ fontSizes: Ae(t.fontSizes)
1788
1828
  };
1789
- return jt(ye(nt(e, r, n), t.layoutCache), e, r.mergeEdges);
1829
+ return It(we(st(e, r, n), t.layoutCache), e, r.mergeEdges);
1790
1830
  }
1791
- function Nn(e, t = {}) {
1831
+ function Rn(e, t = {}) {
1792
1832
  let n = w(e);
1793
- if (_n(n)) {
1794
- let e = En(n, (e, n) => Mn(e, t, n), Te(t.fontSizes));
1833
+ if (Sn(n)) {
1834
+ let e = jn(n, (e, n) => Ln(e, t, n), Ae(t.fontSizes));
1795
1835
  if (e) return e;
1796
1836
  }
1797
- return jn(n, t);
1837
+ return In(n, t);
1798
1838
  }
1799
- function Pn(e, t = {}) {
1800
- return nt(e, {
1839
+ function zn(e, t = {}) {
1840
+ return st(e, {
1801
1841
  ...B,
1802
1842
  ...t,
1803
- fontSizes: Te(t.fontSizes)
1843
+ fontSizes: Ae(t.fontSizes)
1804
1844
  });
1805
1845
  }
1806
1846
  //#endregion
1807
1847
  //#region packages/svg-renderer/src/title-gaps.ts
1808
- var Fn = 12, In = 2;
1809
- function Ln(e) {
1810
- return e.flatMap((e) => [e, ...Ln(e.children)]);
1848
+ var Bn = 12, Vn = 2;
1849
+ function Hn(e) {
1850
+ return e.flatMap((e) => [e, ...Hn(e.children)]);
1811
1851
  }
1812
- function Rn(e, t) {
1852
+ function Un(e, t) {
1813
1853
  let n = t.groupHeader + 16;
1814
- return Ln(e).filter((e) => e.label !== "").map((e) => {
1854
+ return Hn(e).filter((e) => e.label !== "").map((e) => {
1815
1855
  let r = l(e.label, t.groupHeader, L.groupHeader);
1816
1856
  return {
1817
- x: e.x + Fn - In,
1818
- y: e.y + n / 2 - r.height / 2 - In,
1857
+ x: e.x + Bn - Vn,
1858
+ y: e.y + n / 2 - r.height / 2 - Vn,
1819
1859
  width: r.width + 4,
1820
1860
  height: r.height + 4
1821
1861
  };
1822
1862
  });
1823
1863
  }
1824
- function zn(e, t, n) {
1864
+ function Wn(e, t, n) {
1825
1865
  let r = t.x - e.x, i = t.y - e.y, a = [
1826
1866
  -r,
1827
1867
  r,
@@ -1844,26 +1884,26 @@ function zn(e, t, n) {
1844
1884
  }
1845
1885
  return !0;
1846
1886
  }
1847
- function Bn(e) {
1887
+ function Gn(e) {
1848
1888
  return {
1849
- x: e.x + In,
1850
- y: e.y + In,
1889
+ x: e.x + Vn,
1890
+ y: e.y + Vn,
1851
1891
  width: e.width - 4,
1852
1892
  height: e.height - 4
1853
1893
  };
1854
1894
  }
1855
- function Vn(e, t) {
1856
- let n = e.points, r = t.map(Bn);
1857
- for (let e = 0; e + 1 < n.length; e++) if (r.some((t) => zn(n[e], n[e + 1], t))) return !0;
1895
+ function Kn(e, t) {
1896
+ let n = e.points, r = t.map(Gn);
1897
+ for (let e = 0; e + 1 < n.length; e++) if (r.some((t) => Wn(n[e], n[e + 1], t))) return !0;
1858
1898
  return !1;
1859
1899
  }
1860
- function Hn(e) {
1900
+ function qn(e) {
1861
1901
  let t = 2166136261;
1862
1902
  for (let n of e.map((e) => `${e.x},${e.y},${e.width},${e.height}`).join(";")) t = Math.imul(t ^ n.charCodeAt(0), 16777619);
1863
1903
  return (t >>> 0).toString(36);
1864
1904
  }
1865
- function Un(e, t, n) {
1866
- let r = `zm-title-gap-${Hn(e)}`;
1905
+ function Jn(e, t, n) {
1906
+ let r = `zm-title-gap-${qn(e)}`;
1867
1907
  return {
1868
1908
  id: r,
1869
1909
  markup: ` <mask id="${r}" maskUnits="userSpaceOnUse" x="0" y="0" width="${t}" height="${n}">\n <rect x="0" y="0" width="${t}" height="${n}" fill="#fff" />\n${e.map((e) => ` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" fill="#000" />`).join("\n")}\n </mask>`
@@ -1871,25 +1911,25 @@ function Un(e, t, n) {
1871
1911
  }
1872
1912
  //#endregion
1873
1913
  //#region packages/svg-renderer/src/renderer.ts
1874
- function Wn(e, n, r = "Inter", i = !1, a = I, o = "linear", s, c = !0, l = !0, u, d, f = {}) {
1914
+ function Yn(e, n, r = "Inter", i = !1, a = I, o = "linear", s, c = !0, l = !0, u, d, f = {}) {
1875
1915
  let p = [], m = l && e.nodes.some((e) => !!g(e.interaction?.href));
1876
- p.push(Br(x(e.width, e.height, n, i, u, d, m, f.styleAttribute), s)), p.push(t(r, !1, f.nonce)), c && e.edges.some((e) => e.animate) && p.push(Gn(f.nonce)), p.push("<defs>"), p.push(Kn());
1916
+ p.push(Gr(x(e.width, e.height, n, i, u, d, m, f.styleAttribute), s)), p.push(t(r, !1, f.nonce)), c && e.edges.some((e) => e.animate) && p.push(Xn(f.nonce)), p.push("<defs>"), p.push(Zn());
1877
1917
  let h = /* @__PURE__ */ new Set();
1878
1918
  for (let t of e.edges) t.inlineStyle?.stroke && h.add(t.inlineStyle.stroke);
1879
- for (let e of h) p.push(qn(e));
1880
- let _ = Rn(e.groups, a), v = new Set(e.edges.filter((e) => Vn(e, _))), y;
1919
+ for (let e of h) p.push(Qn(e));
1920
+ let _ = Un(e.groups, a), v = new Set(e.edges.filter((e) => Kn(e, _))), y;
1881
1921
  if (v.size > 0) {
1882
- let t = Un(_, e.width, e.height);
1922
+ let t = Jn(_, e.width, e.height);
1883
1923
  y = t.id, p.push(t.markup);
1884
1924
  }
1885
1925
  p.push("</defs>");
1886
- for (let t of e.groups) p.push(Xn(t, r, a));
1887
- for (let t of e.edges) p.push(Zn(t, o, c, v.has(t) ? y : void 0));
1888
- for (let t of e.edges) t.label && p.push($n(t, r, a));
1889
- for (let t of e.nodes) p.push(rr(t, r, a, l));
1926
+ for (let t of e.groups) p.push(tr(t, r, a));
1927
+ for (let t of e.edges) p.push(nr(t, o, c, v.has(t) ? y : void 0));
1928
+ for (let t of e.edges) t.label && p.push(ir(t, r, a));
1929
+ for (let t of e.nodes) p.push(cr(t, r, a, l));
1890
1930
  return p.push("</svg>"), p.join("\n");
1891
1931
  }
1892
- function Gn(e) {
1932
+ function Xn(e) {
1893
1933
  return [
1894
1934
  b(e),
1895
1935
  " @keyframes zm-edge-dash { to { stroke-dashoffset: -28; } }",
@@ -1900,28 +1940,28 @@ function Gn(e) {
1900
1940
  "</style>"
1901
1941
  ].join("\n");
1902
1942
  }
1903
- function Kn() {
1904
- return Jn("var(--_arrow)", "");
1943
+ function Zn() {
1944
+ return $n("var(--_arrow)", "");
1905
1945
  }
1906
- function qn(e) {
1907
- return Jn(r(e), a`-${Yn(e)}`);
1946
+ function Qn(e) {
1947
+ return $n(r(e), a`-${er(e)}`);
1908
1948
  }
1909
- function Jn(e, t) {
1910
- let n = Oe.width, r = Oe.height, i = n - 1, o = a`fill="${e}" stroke="${e}" stroke-width="0.75" stroke-linejoin="round"`, s = a`<polygon points="0 0, ${n} ${r / 2}, 0 ${r}" ${o} />`, c = (e, t) => a` <marker id="${e}" markerWidth="${n}" markerHeight="${r}" refX="${i}" refY="${r / 2}" orient="${t}">` + a`\n ${s}` + "\n </marker>";
1949
+ function $n(e, t) {
1950
+ let n = Ne.width, r = Ne.height, i = n - 1, o = a`fill="${e}" stroke="${e}" stroke-width="0.75" stroke-linejoin="round"`, s = a`<polygon points="0 0, ${n} ${r / 2}, 0 ${r}" ${o} />`, c = (e, t) => a` <marker id="${e}" markerWidth="${n}" markerHeight="${r}" refX="${i}" refY="${r / 2}" orient="${t}">` + a`\n ${s}` + "\n </marker>";
1911
1951
  return c(a`arrowhead${t}`, "auto") + "\n" + c(a`arrowhead-start${t}`, "auto-start-reverse");
1912
1952
  }
1913
- function Yn(e) {
1953
+ function er(e) {
1914
1954
  return e.replace(/[^a-zA-Z0-9]/g, (e) => e.charCodeAt(0).toString(16));
1915
1955
  }
1916
- function Xn(e, t, n) {
1956
+ function tr(e, t, n) {
1917
1957
  let i = n.groupHeader + 16, o = [];
1918
1958
  o.push(a`<g class="subgraph" data-id="${r(e.id)}" data-label="${r(e.label)}">`), o.push(a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" ` + a`rx="0" ry="0" fill="var(--_group-fill)" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`), o.push(a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${i}" ` + a`rx="0" ry="0" fill="var(--_group-hdr)" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`), o.push(" " + p(e.label, e.x + 12, e.y + i / 2, n.groupHeader, a`font-size="${n.groupHeader}" font-weight="${L.groupHeader}" fill="var(--_text-sec)"`));
1919
- for (let r of e.children) o.push(Xn(r, t, n));
1959
+ for (let r of e.children) o.push(tr(r, t, n));
1920
1960
  return o.push("</g>"), o.join("\n");
1921
1961
  }
1922
- function Zn(e, t, n = !0, i) {
1962
+ function nr(e, t, n = !0, i) {
1923
1963
  if (e.points.length < 2) return "";
1924
- let o = n && (e.animate ?? !1), s = t !== "linear", c = e.style === "invisible", l = e.style === "dotted" ? " stroke-dasharray=\"4 4\"" : "", u = e.style === "thick" ? R.connector * 2 : R.connector, d = c ? "none" : r(e.inlineStyle?.stroke ?? "var(--_line)"), f = r(e.inlineStyle?.["stroke-width"] ?? String(u)), p = e.inlineStyle?.stroke ? a`-${Yn(e.inlineStyle.stroke)}` : "", m = "";
1964
+ let o = n && (e.animate ?? !1), s = t !== "linear", c = e.style === "invisible", l = e.style === "dotted" ? " stroke-dasharray=\"4 4\"" : "", u = e.style === "thick" ? R.connector * 2 : R.connector, d = c ? "none" : r(e.inlineStyle?.stroke ?? "var(--_line)"), f = r(e.inlineStyle?.["stroke-width"] ?? String(u)), p = e.inlineStyle?.stroke ? a`-${er(e.inlineStyle.stroke)}` : "", m = "";
1925
1965
  c || (e.hasArrowEnd && (m += a` marker-end="url(#arrowhead${p})"`), e.hasArrowStart && (m += a` marker-start="url(#arrowhead-start${p})"`));
1926
1966
  let h = [
1927
1967
  a`class="edge${o ? " edge-animated" : ""}"`,
@@ -1932,35 +1972,35 @@ function Zn(e, t, n = !0, i) {
1932
1972
  a`data-arrow-end="${e.hasArrowEnd}"`
1933
1973
  ];
1934
1974
  e.label && h.push(a`data-label="${r(e.label)}"`), e.id && h.push(a`data-id="${r(e.id)}"`);
1935
- let g = o && !l ? " stroke-dasharray=\"8 6\"" : "", _ = s ? a`d="${fe(e.points, t)}"` : a`points="${Qn(e.points)}"`;
1975
+ let g = o && !l ? " stroke-dasharray=\"8 6\"" : "", _ = s ? a`d="${de(e.points, t)}"` : a`points="${rr(e.points)}"`;
1936
1976
  return a`<${s ? "path" : "polyline"} ${h.join(" ")} ${_} ` + a`fill="none" stroke="${d}" ` + a`stroke-width="${f}"${l}${g}${m}` + (i ? a` mask="url(#${i})"` : "") + " />";
1937
1977
  }
1938
- function Qn(e) {
1978
+ function rr(e) {
1939
1979
  return e.map((e) => a`${e.x},${e.y}`).join(" ");
1940
1980
  }
1941
- function $n(e, t, n) {
1981
+ function ir(e, t, n) {
1942
1982
  if (!e.label) return "";
1943
- let i = e.label, o = e.labelPosition ?? tr(e.points), s = l(i, n.edgeLabel, L.edgeLabel), c = m(i, o.x, o.y, s.width, s.height, n.edgeLabel, 8, a`text-anchor="middle" font-size="${n.edgeLabel}" font-weight="${L.edgeLabel}" fill="var(--_text-sec)"`, "rx=\"2\" ry=\"2\" fill=\"var(--bg)\" stroke=\"var(--_inner-stroke)\" stroke-width=\"1\"");
1983
+ let i = e.label, o = e.labelPosition ?? or(e.points), s = l(i, n.edgeLabel, L.edgeLabel), c = m(i, o.x, o.y, s.width, s.height, n.edgeLabel, 8, a`text-anchor="middle" font-size="${n.edgeLabel}" font-weight="${L.edgeLabel}" fill="var(--_text-sec)"`, "rx=\"2\" ry=\"2\" fill=\"var(--bg)\" stroke=\"var(--_inner-stroke)\" stroke-width=\"1\"");
1944
1984
  return a`<g class="edge-label" data-from="${r(e.source)}" data-to="${r(e.target)}" data-label="${r(i)}">\n` + a` ${c.replace(/\n/g, "\n ")}\n` + "</g>";
1945
1985
  }
1946
- function er(e, t) {
1986
+ function ar(e, t) {
1947
1987
  let n = e[t];
1948
1988
  if (!n)
1949
1989
  /* v8 ignore next */
1950
1990
  throw Error(a`edgeMidpoint: missing point at index ${t}`);
1951
1991
  return n;
1952
1992
  }
1953
- function tr(e) {
1993
+ function or(e) {
1954
1994
  if (e.length === 0) return {
1955
1995
  x: 0,
1956
1996
  y: 0
1957
1997
  };
1958
1998
  if (e.length === 1) return e[0];
1959
1999
  let t = 0;
1960
- for (let n = 1; n < e.length; n++) t += nr(er(e, n - 1), er(e, n));
2000
+ for (let n = 1; n < e.length; n++) t += sr(ar(e, n - 1), ar(e, n));
1961
2001
  let n = t / 2;
1962
2002
  for (let t = 1; t < e.length; t++) {
1963
- let r = er(e, t - 1), i = er(e, t), a = nr(r, i);
2003
+ let r = ar(e, t - 1), i = ar(e, t), a = sr(r, i);
1964
2004
  if (n <= a) {
1965
2005
  let e = n / a;
1966
2006
  return {
@@ -1972,11 +2012,11 @@ function tr(e) {
1972
2012
  }
1973
2013
  return e[e.length - 1];
1974
2014
  }
1975
- function nr(e, t) {
2015
+ function sr(e, t) {
1976
2016
  return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2);
1977
2017
  }
1978
- function rr(e, t, n, o = !0) {
1979
- let s = ir(e), c = Rr(e, t, n), l = [], u = _(e.className), d = u ? a`node ${u}` : "node", f = e.interaction, p = [
2018
+ function cr(e, t, n, o = !0) {
2019
+ let s = lr(e), c = Ur(e, t, n), l = [], u = _(e.className), d = u ? a`node ${u}` : "node", f = e.interaction, p = [
1980
2020
  a`class="${d}"`,
1981
2021
  a`data-id="${r(e.id)}"`,
1982
2022
  a`data-label="${r(e.label)}"`,
@@ -1990,65 +2030,65 @@ function rr(e, t, n, o = !0) {
1990
2030
  }
1991
2031
  return o && f?.tooltip && l.push(a`${h}<title>${i(f.tooltip)}</title>`), l.push(a`${h}${s.replace(/\n/g, a`\n${h}`)}`), c && l.push(a`${h}${c.replace(/\n/g, a`\n${h}`)}`), m && l.push(" </a>"), l.push("</g>"), l.join("\n");
1992
2032
  }
1993
- function ir(e) {
2033
+ function lr(e) {
1994
2034
  let { x: t, y: n, width: i, height: a, shape: o, inlineStyle: s } = e, c = r(s?.fill ?? "var(--_node-fill)"), l = r(s?.stroke ?? "var(--_node-stroke)"), u = r(s?.["stroke-width"] ?? String(R.innerBox));
1995
2035
  switch (o) {
1996
- case "diamond": return lr(t, n, i, a, c, l, u);
1997
- case "rounded": return or(t, n, i, a, c, l, u);
1998
- case "stadium": return sr(t, n, i, a, c, l, u);
1999
- case "circle": return cr(t, n, i, a, c, l, u);
2000
- case "subroutine": return ur(t, n, i, a, c, l, u);
2001
- case "doublecircle": return dr(t, n, i, a, c, l, u);
2002
- case "hexagon": return fr(t, n, i, a, c, l, u);
2003
- case "cylinder": return pr(t, n, i, a, c, l, u);
2004
- case "asymmetric": return mr(t, n, i, a, c, l, u);
2005
- case "trapezoid": return hr(t, n, i, a, c, l, u);
2006
- case "trapezoid-alt": return gr(t, n, i, a, c, l, u);
2007
- case "parallelogram": return _r(t, n, i, a, c, l, u);
2008
- case "parallelogram-alt": return vr(t, n, i, a, c, l, u);
2009
- case "state-start": return Ir(t, n, i, a);
2010
- case "state-end": return Lr(t, n, i, a);
2011
- case "document": return yr(t, n, i, a, c, l, u);
2012
- case "stacked-document": return br(t, n, i, a, c, l, u, !0);
2013
- case "stacked-process": return br(t, n, i, a, c, l, u, !1);
2014
- case "card": return xr(t, n, i, a, c, l, u);
2015
- case "lined-process": return Sr(t, n, i, a, c, l, u);
2016
- case "divided-process": return Cr(t, n, i, a, c, l, u);
2017
- case "window-pane": return wr(t, n, i, a, c, l, u);
2018
- case "triangle": return Tr(t, n, i, a, c, l, u, !1);
2019
- case "flipped-triangle": return Tr(t, n, i, a, c, l, u, !0);
2020
- case "filled-circle": return Er(t, n, i, a, l);
2021
- case "crossed-circle": return Dr(t, n, i, a, c, l, u);
2022
- case "fork-join": return Or(t, n, i, a, l);
2023
- case "notched-pentagon": return kr(t, n, i, a, c, l, u);
2024
- case "sloped-rectangle": return Ar(t, n, i, a, c, l, u);
2025
- case "flag": return jr(t, n, i, a, c, l, u);
2026
- case "bow-tie-rectangle": return Mr(t, n, i, a, c, l, u);
2027
- case "half-rounded-rectangle": return Nr(t, n, i, a, c, l, u);
2028
- case "brace": return Pr(t, n, i, a, c, l, u, "left");
2029
- case "brace-right": return Pr(t, n, i, a, c, l, u, "right");
2030
- case "braces": return Pr(t, n, i, a, c, l, u, "both");
2031
- case "bolt": return Fr(t, n, i, a, c, l, u);
2036
+ case "diamond": return mr(t, n, i, a, c, l, u);
2037
+ case "rounded": return dr(t, n, i, a, c, l, u);
2038
+ case "stadium": return fr(t, n, i, a, c, l, u);
2039
+ case "circle": return pr(t, n, i, a, c, l, u);
2040
+ case "subroutine": return hr(t, n, i, a, c, l, u);
2041
+ case "doublecircle": return gr(t, n, i, a, c, l, u);
2042
+ case "hexagon": return _r(t, n, i, a, c, l, u);
2043
+ case "cylinder": return vr(t, n, i, a, c, l, u);
2044
+ case "asymmetric": return yr(t, n, i, a, c, l, u);
2045
+ case "trapezoid": return br(t, n, i, a, c, l, u);
2046
+ case "trapezoid-alt": return xr(t, n, i, a, c, l, u);
2047
+ case "parallelogram": return Sr(t, n, i, a, c, l, u);
2048
+ case "parallelogram-alt": return Cr(t, n, i, a, c, l, u);
2049
+ case "state-start": return Vr(t, n, i, a);
2050
+ case "state-end": return Hr(t, n, i, a);
2051
+ case "document": return wr(t, n, i, a, c, l, u);
2052
+ case "stacked-document": return Tr(t, n, i, a, c, l, u, !0);
2053
+ case "stacked-process": return Tr(t, n, i, a, c, l, u, !1);
2054
+ case "card": return Er(t, n, i, a, c, l, u);
2055
+ case "lined-process": return Dr(t, n, i, a, c, l, u);
2056
+ case "divided-process": return Or(t, n, i, a, c, l, u);
2057
+ case "window-pane": return kr(t, n, i, a, c, l, u);
2058
+ case "triangle": return Ar(t, n, i, a, c, l, u, !1);
2059
+ case "flipped-triangle": return Ar(t, n, i, a, c, l, u, !0);
2060
+ case "filled-circle": return jr(t, n, i, a, l);
2061
+ case "crossed-circle": return Mr(t, n, i, a, c, l, u);
2062
+ case "fork-join": return Nr(t, n, i, a, l);
2063
+ case "notched-pentagon": return Pr(t, n, i, a, c, l, u);
2064
+ case "sloped-rectangle": return Fr(t, n, i, a, c, l, u);
2065
+ case "flag": return Ir(t, n, i, a, c, l, u);
2066
+ case "bow-tie-rectangle": return Lr(t, n, i, a, c, l, u);
2067
+ case "half-rounded-rectangle": return Rr(t, n, i, a, c, l, u);
2068
+ case "brace": return zr(t, n, i, a, c, l, u, "left");
2069
+ case "brace-right": return zr(t, n, i, a, c, l, u, "right");
2070
+ case "braces": return zr(t, n, i, a, c, l, u, "both");
2071
+ case "bolt": return Br(t, n, i, a, c, l, u);
2032
2072
  case "text":
2033
2073
  case "anchor": return "";
2034
- default: return ar(t, n, i, a, c, l, u);
2074
+ default: return ur(t, n, i, a, c, l, u);
2035
2075
  }
2036
2076
  }
2037
- function ar(e, t, n, r, i, o, s) {
2077
+ function ur(e, t, n, r, i, o, s) {
2038
2078
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ` + a`rx="0" ry="0" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2039
2079
  }
2040
- function or(e, t, n, r, i, o, s) {
2080
+ function dr(e, t, n, r, i, o, s) {
2041
2081
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ` + a`rx="6" ry="6" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2042
2082
  }
2043
- function sr(e, t, n, r, i, o, s) {
2083
+ function fr(e, t, n, r, i, o, s) {
2044
2084
  let c = r / 2;
2045
2085
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ` + a`rx="${c}" ry="${c}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2046
2086
  }
2047
- function cr(e, t, n, r, i, o, s) {
2087
+ function pr(e, t, n, r, i, o, s) {
2048
2088
  let c = e + n / 2, l = t + r / 2, u = Math.min(n, r) / 2;
2049
2089
  return a`<circle cx="${c}" cy="${l}" r="${u}" ` + a`fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2050
2090
  }
2051
- function lr(e, t, n, r, i, o, s) {
2091
+ function mr(e, t, n, r, i, o, s) {
2052
2092
  let c = e + n / 2, l = t + r / 2, u = n / 2, d = r / 2, f = [
2053
2093
  a`${c},${l - d}`,
2054
2094
  a`${c + u},${l}`,
@@ -2057,14 +2097,14 @@ function lr(e, t, n, r, i, o, s) {
2057
2097
  ].join(" ");
2058
2098
  return a`<polygon points="${f}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2059
2099
  }
2060
- function ur(e, t, n, r, i, o, s) {
2100
+ function hr(e, t, n, r, i, o, s) {
2061
2101
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ` + a`rx="0" ry="0" fill="${i}" stroke="${o}" stroke-width="${s}" />` + a`\n<line x1="${e + 8}" y1="${t}" x2="${e + 8}" y2="${t + r}" ` + a`stroke="${o}" stroke-width="${s}" />` + a`\n<line x1="${e + n - 8}" y1="${t}" x2="${e + n - 8}" y2="${t + r}" ` + a`stroke="${o}" stroke-width="${s}" />`;
2062
2102
  }
2063
- function dr(e, t, n, r, i, o, s) {
2103
+ function gr(e, t, n, r, i, o, s) {
2064
2104
  let c = e + n / 2, l = t + r / 2, u = Math.min(n, r) / 2, d = u - 5;
2065
2105
  return a`<circle cx="${c}" cy="${l}" r="${u}" ` + a`fill="${i}" stroke="${o}" stroke-width="${s}" />` + a`\n<circle cx="${c}" cy="${l}" r="${d}" ` + a`fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2066
2106
  }
2067
- function fr(e, t, n, r, i, o, s) {
2107
+ function _r(e, t, n, r, i, o, s) {
2068
2108
  let c = r / 4, l = [
2069
2109
  a`${e + c},${t}`,
2070
2110
  a`${e + n - c},${t}`,
@@ -2075,11 +2115,11 @@ function fr(e, t, n, r, i, o, s) {
2075
2115
  ].join(" ");
2076
2116
  return a`<polygon points="${l}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2077
2117
  }
2078
- function pr(e, t, n, r, i, o, s) {
2118
+ function vr(e, t, n, r, i, o, s) {
2079
2119
  let c = e + n / 2, l = t + 7, u = r - 14;
2080
2120
  return a`<rect x="${e}" y="${l}" width="${n}" height="${u}" ` + a`fill="${i}" stroke="none" />` + a`\n<line x1="${e}" y1="${l}" x2="${e}" y2="${l + u}" stroke="${o}" stroke-width="${s}" />` + a`\n<line x1="${e + n}" y1="${l}" x2="${e + n}" y2="${l + u}" stroke="${o}" stroke-width="${s}" />` + a`\n<ellipse cx="${c}" cy="${t + r - 7}" rx="${n / 2}" ry="${7}" ` + a`fill="${i}" stroke="${o}" stroke-width="${s}" />` + a`\n<ellipse cx="${c}" cy="${l}" rx="${n / 2}" ry="${7}" ` + a`fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2081
2121
  }
2082
- function mr(e, t, n, r, i, o, s) {
2122
+ function yr(e, t, n, r, i, o, s) {
2083
2123
  let c = [
2084
2124
  a`${e + 12},${t}`,
2085
2125
  a`${e + n},${t}`,
@@ -2089,7 +2129,7 @@ function mr(e, t, n, r, i, o, s) {
2089
2129
  ].join(" ");
2090
2130
  return a`<polygon points="${c}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2091
2131
  }
2092
- function hr(e, t, n, r, i, o, s) {
2132
+ function br(e, t, n, r, i, o, s) {
2093
2133
  let c = n * .15, l = [
2094
2134
  a`${e + c},${t}`,
2095
2135
  a`${e + n - c},${t}`,
@@ -2098,7 +2138,7 @@ function hr(e, t, n, r, i, o, s) {
2098
2138
  ].join(" ");
2099
2139
  return a`<polygon points="${l}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2100
2140
  }
2101
- function gr(e, t, n, r, i, o, s) {
2141
+ function xr(e, t, n, r, i, o, s) {
2102
2142
  let c = n * .15, l = [
2103
2143
  a`${e},${t}`,
2104
2144
  a`${e + n},${t}`,
@@ -2107,7 +2147,7 @@ function gr(e, t, n, r, i, o, s) {
2107
2147
  ].join(" ");
2108
2148
  return a`<polygon points="${l}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2109
2149
  }
2110
- function _r(e, t, n, r, i, o, s) {
2150
+ function Sr(e, t, n, r, i, o, s) {
2111
2151
  let c = n * .15, l = [
2112
2152
  a`${e + c},${t}`,
2113
2153
  a`${e + n},${t}`,
@@ -2116,7 +2156,7 @@ function _r(e, t, n, r, i, o, s) {
2116
2156
  ].join(" ");
2117
2157
  return a`<polygon points="${l}" fill="${i}" stroke="${o}" stroke-width="${s}" />`;
2118
2158
  }
2119
- function vr(e, t, n, r, i, o, s) {
2159
+ function Cr(e, t, n, r, i, o, s) {
2120
2160
  let c = n * .15, l = [
2121
2161
  a`${e},${t}`,
2122
2162
  a`${e + n - c},${t}`,
@@ -2128,16 +2168,16 @@ function vr(e, t, n, r, i, o, s) {
2128
2168
  function H(e, t, n) {
2129
2169
  return a`fill="${e}" stroke="${t}" stroke-width="${n}"`;
2130
2170
  }
2131
- function yr(e, t, n, r, i, o, s) {
2171
+ function wr(e, t, n, r, i, o, s) {
2132
2172
  let c = Math.min(10, r * .16), l = t + r - c, u = a`M ${e} ${t} L ${e + n} ${t} L ${e + n} ${l} ` + a`C ${e + n * .75} ${l + c * 1.8} ${e + n * .25} ${l - c * .8} ${e} ${l} Z`;
2133
2173
  return a`<path d="${u}" ${H(i, o, s)} />`;
2134
2174
  }
2135
- function br(e, t, n, r, i, o, s, c) {
2175
+ function Tr(e, t, n, r, i, o, s, c) {
2136
2176
  let l = n - 10, u = r - 10, d = [];
2137
2177
  for (let n = 2; n >= 1; n--) d.push(a`<rect x="${e + 5 * n}" y="${t + 5 * (2 - n)}" width="${l}" height="${u}" ` + a`${H(i, o, s)} />`);
2138
- return d.push(c ? yr(e, t + 10, l, u, i, o, s) : a`<rect x="${e}" y="${t + 10}" width="${l}" height="${u}" ${H(i, o, s)} />`), d.join("\n");
2178
+ return d.push(c ? wr(e, t + 10, l, u, i, o, s) : a`<rect x="${e}" y="${t + 10}" width="${l}" height="${u}" ${H(i, o, s)} />`), d.join("\n");
2139
2179
  }
2140
- function xr(e, t, n, r, i, o, s) {
2180
+ function Er(e, t, n, r, i, o, s) {
2141
2181
  let c = Math.min(14, n * .12, r * .3), l = [
2142
2182
  a`${e + c},${t}`,
2143
2183
  a`${e + n},${t}`,
@@ -2147,19 +2187,19 @@ function xr(e, t, n, r, i, o, s) {
2147
2187
  ].join(" ");
2148
2188
  return a`<polygon points="${l}" ${H(i, o, s)} />`;
2149
2189
  }
2150
- function Sr(e, t, n, r, i, o, s) {
2190
+ function Dr(e, t, n, r, i, o, s) {
2151
2191
  let c = Math.min(12, n * .12);
2152
2192
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ${H(i, o, s)} />\n` + a`<line x1="${e + c}" y1="${t}" x2="${e + c}" y2="${t + r}" stroke="${o}" stroke-width="${s}" />`;
2153
2193
  }
2154
- function Cr(e, t, n, r, i, o, s) {
2194
+ function Or(e, t, n, r, i, o, s) {
2155
2195
  let c = t + Math.min(16, r * .3);
2156
2196
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ${H(i, o, s)} />\n` + a`<line x1="${e}" y1="${c}" x2="${e + n}" y2="${c}" stroke="${o}" stroke-width="${s}" />`;
2157
2197
  }
2158
- function wr(e, t, n, r, i, o, s) {
2198
+ function kr(e, t, n, r, i, o, s) {
2159
2199
  let c = e + Math.min(16, n * .16), l = t + Math.min(14, r * .28);
2160
2200
  return a`<rect x="${e}" y="${t}" width="${n}" height="${r}" ${H(i, o, s)} />\n` + a`<line x1="${c}" y1="${t}" x2="${c}" y2="${t + r}" stroke="${o}" stroke-width="${s}" />\n` + a`<line x1="${e}" y1="${l}" x2="${e + n}" y2="${l}" stroke="${o}" stroke-width="${s}" />`;
2161
2201
  }
2162
- function Tr(e, t, n, r, i, o, s, c) {
2202
+ function Ar(e, t, n, r, i, o, s, c) {
2163
2203
  let l = c ? [
2164
2204
  a`${e},${t}`,
2165
2205
  a`${e + n},${t}`,
@@ -2171,19 +2211,19 @@ function Tr(e, t, n, r, i, o, s, c) {
2171
2211
  ];
2172
2212
  return a`<polygon points="${l.join(" ")}" ${H(i, o, s)} />`;
2173
2213
  }
2174
- function Er(e, t, n, r, i) {
2214
+ function jr(e, t, n, r, i) {
2175
2215
  let o = Math.min(n, r) / 2 - 2;
2176
2216
  return a`<circle cx="${e + n / 2}" cy="${t + r / 2}" r="${o}" fill="${i}" stroke="${i}" />`;
2177
2217
  }
2178
- function Dr(e, t, n, r, i, o, s) {
2218
+ function Mr(e, t, n, r, i, o, s) {
2179
2219
  let c = e + n / 2, l = t + r / 2, u = Math.min(n, r) / 2 - 2, d = u / Math.SQRT2;
2180
2220
  return a`<circle cx="${c}" cy="${l}" r="${u}" ${H(i, o, s)} />\n` + a`<line x1="${c - d}" y1="${l - d}" x2="${c + d}" y2="${l + d}" stroke="${o}" stroke-width="${s}" />\n` + a`<line x1="${c + d}" y1="${l - d}" x2="${c - d}" y2="${l + d}" stroke="${o}" stroke-width="${s}" />`;
2181
2221
  }
2182
- function Or(e, t, n, r, i) {
2222
+ function Nr(e, t, n, r, i) {
2183
2223
  let o = Math.min(8, r);
2184
2224
  return a`<rect x="${e}" y="${t + (r - o) / 2}" width="${n}" height="${o}" fill="${i}" stroke="${i}" />`;
2185
2225
  }
2186
- function kr(e, t, n, r, i, o, s) {
2226
+ function Pr(e, t, n, r, i, o, s) {
2187
2227
  let c = Math.min(14, n * .12, r * .3), l = [
2188
2228
  a`${e + c},${t}`,
2189
2229
  a`${e + n - c},${t}`,
@@ -2194,7 +2234,7 @@ function kr(e, t, n, r, i, o, s) {
2194
2234
  ].join(" ");
2195
2235
  return a`<polygon points="${l}" ${H(i, o, s)} />`;
2196
2236
  }
2197
- function Ar(e, t, n, r, i, o, s) {
2237
+ function Fr(e, t, n, r, i, o, s) {
2198
2238
  let c = Math.min(12, r * .3), l = [
2199
2239
  a`${e},${t + c}`,
2200
2240
  a`${e + n},${t}`,
@@ -2203,23 +2243,23 @@ function Ar(e, t, n, r, i, o, s) {
2203
2243
  ].join(" ");
2204
2244
  return a`<polygon points="${l}" ${H(i, o, s)} />`;
2205
2245
  }
2206
- function jr(e, t, n, r, i, o, s) {
2246
+ function Ir(e, t, n, r, i, o, s) {
2207
2247
  let c = Math.min(8, r * .14), l = a`M ${e} ${t + c} ` + a`C ${e + n * .25} ${t - c} ${e + n * .75} ${t + c * 2} ${e + n} ${t + c} ` + a`L ${e + n} ${t + r - c} ` + a`C ${e + n * .75} ${t + r + c} ${e + n * .25} ${t + r - c * 2} ${e} ${t + r - c} Z`;
2208
2248
  return a`<path d="${l}" ${H(i, o, s)} />`;
2209
2249
  }
2210
- function Mr(e, t, n, r, i, o, s) {
2250
+ function Lr(e, t, n, r, i, o, s) {
2211
2251
  let c = Math.min(14, n * .12), l = a`M ${e + c} ${t} L ${e + n} ${t} ` + a`Q ${e + n - c * 1.4} ${t + r / 2} ${e + n} ${t + r} ` + a`L ${e + c} ${t + r} ` + a`Q ${e + c * 1.4} ${t + r / 2} ${e + c} ${t} Z`;
2212
2252
  return a`<path d="${l}" ${H(i, o, s)} />`;
2213
2253
  }
2214
- function Nr(e, t, n, r, i, o, s) {
2254
+ function Rr(e, t, n, r, i, o, s) {
2215
2255
  let c = r / 2, l = Math.max(0, n - c), u = a`M ${e} ${t} L ${e + l} ${t} ` + a`A ${c} ${c} 0 0 1 ${e + l} ${t + r} ` + a`L ${e} ${t + r} Z`;
2216
2256
  return a`<path d="${u}" ${H(i, o, s)} />`;
2217
2257
  }
2218
- function Pr(e, t, n, r, i, o, s, c) {
2258
+ function zr(e, t, n, r, i, o, s, c) {
2219
2259
  let l = Math.min(10, n * .12), u = [a`<rect x="${e}" y="${t}" width="${n}" height="${r}" fill="none" stroke="none" />`], d = a`M ${e + l} ${t} Q ${e} ${t} ${e} ${t + r * .25} ` + a`Q ${e} ${t + r / 2} ${e - l * .4} ${t + r / 2} ` + a`Q ${e} ${t + r / 2} ${e} ${t + r * .75} ` + a`Q ${e} ${t + r} ${e + l} ${t + r}`, f = a`M ${e + n - l} ${t} Q ${e + n} ${t} ${e + n} ${t + r * .25} ` + a`Q ${e + n} ${t + r / 2} ${e + n + l * .4} ${t + r / 2} ` + a`Q ${e + n} ${t + r / 2} ${e + n} ${t + r * .75} ` + a`Q ${e + n} ${t + r} ${e + n - l} ${t + r}`;
2220
2260
  return (c === "left" || c === "both") && u.push(a`<path d="${d}" fill="none" stroke="${o}" stroke-width="${s}" />`), (c === "right" || c === "both") && u.push(a`<path d="${f}" fill="none" stroke="${o}" stroke-width="${s}" />`), u.join("\n");
2221
2261
  }
2222
- function Fr(e, t, n, r, i, o, s) {
2262
+ function Br(e, t, n, r, i, o, s) {
2223
2263
  let c = [
2224
2264
  a`${e + n * .42},${t}`,
2225
2265
  a`${e + n},${t}`,
@@ -2231,28 +2271,28 @@ function Fr(e, t, n, r, i, o, s) {
2231
2271
  ].join(" ");
2232
2272
  return a`<polygon points="${c}" ${H(i, o, s)} />`;
2233
2273
  }
2234
- function Ir(e, t, n, r) {
2274
+ function Vr(e, t, n, r) {
2235
2275
  let i = e + n / 2, o = t + r / 2, s = Math.min(n, r) / 2 - 2;
2236
2276
  return a`<circle cx="${i}" cy="${o}" r="${s}" fill="var(--_text)" stroke="none" />`;
2237
2277
  }
2238
- function Lr(e, t, n, r) {
2278
+ function Hr(e, t, n, r) {
2239
2279
  let i = e + n / 2, o = t + r / 2, s = Math.min(n, r) / 2 - 2, c = s - 4;
2240
2280
  return a`<circle cx="${i}" cy="${o}" r="${s}" ` + a`fill="none" stroke="var(--_text)" stroke-width="${R.innerBox * 2}" />` + a`\n<circle cx="${i}" cy="${o}" r="${c}" fill="var(--_text)" stroke="none" />`;
2241
2281
  }
2242
- function Rr(e, t, n) {
2282
+ function Ur(e, t, n) {
2243
2283
  if ((e.shape === "state-start" || e.shape === "state-end") && !e.label) return "";
2244
2284
  let i = e.x + e.width / 2, o = e.y + e.height / 2, c = r(e.inlineStyle?.color ?? s(e.inlineStyle?.fill, "var(--_text)")), l = a`text-anchor="middle" font-size="${n.nodeLabel}" font-weight="${L.nodeLabel}" fill="${c}"`, u = e.inlineStyle?.["font-family"];
2245
2285
  return u && (l += a` style="font-family: ${r(u)};"`), p(e.label, i, o, n.nodeLabel, l);
2246
2286
  }
2247
- function zr(e) {
2287
+ function Wr(e) {
2248
2288
  return r(e).replace(/\r/g, "&#13;").replace(/\n/g, "&#10;").replace(/\t/g, "&#9;");
2249
2289
  }
2250
- function Br(e, t) {
2251
- return t === void 0 ? e : e.replace("<svg ", a`<svg data-src="${zr(t)}" `);
2290
+ function Gr(e, t) {
2291
+ return t === void 0 ? e : e.replace("<svg ", a`<svg data-src="${Wr(t)}" `);
2252
2292
  }
2253
2293
  //#endregion
2254
2294
  //#region packages/svg-renderer/src/resolve-colors.ts
2255
- var Vr = class {
2295
+ var Kr = class {
2256
2296
  raw = /* @__PURE__ */ new Map();
2257
2297
  resolved = /* @__PURE__ */ new Map();
2258
2298
  inProgress = /* @__PURE__ */ new Set();
@@ -2264,13 +2304,13 @@ var Vr = class {
2264
2304
  let t = this.raw.get(e);
2265
2305
  if (t === void 0 || this.inProgress.has(e)) return;
2266
2306
  this.inProgress.add(e);
2267
- let n = Jr(t, this).trim();
2307
+ let n = $r(t, this).trim();
2268
2308
  this.inProgress.delete(e);
2269
2309
  let r = !/\bvar\(|\bcolor-mix\(/.test(n);
2270
2310
  return this.resolved.set(e, r ? n : void 0), r ? n : void 0;
2271
2311
  }
2272
2312
  };
2273
- function Hr(e, t) {
2313
+ function qr(e, t) {
2274
2314
  let n = 0;
2275
2315
  for (let r = t; r < e.length; r++) {
2276
2316
  let t = e[r];
@@ -2279,7 +2319,7 @@ function Hr(e, t) {
2279
2319
  }
2280
2320
  return -1;
2281
2321
  }
2282
- function Ur(e) {
2322
+ function Jr(e) {
2283
2323
  let t = [], n = 0, r = 0;
2284
2324
  for (let i = 0; i < e.length; i++) {
2285
2325
  let a = e[i];
@@ -2287,12 +2327,12 @@ function Ur(e) {
2287
2327
  }
2288
2328
  return t.push(e.slice(r)), t;
2289
2329
  }
2290
- var Wr = "(?<![\\w-])(var|color-mix)\\(";
2291
- function Gr(e, t) {
2292
- let [n, ...r] = Ur(e), i = (n ?? "").trim(), a = t.lookup(i);
2330
+ var Yr = "(?<![\\w-])(var|color-mix)\\(";
2331
+ function Xr(e, t) {
2332
+ let [n, ...r] = Jr(e), i = (n ?? "").trim(), a = t.lookup(i);
2293
2333
  return a === void 0 ? r.length > 0 ? r.join(",").trim() : null : a;
2294
2334
  }
2295
- function Kr(e) {
2335
+ function Zr(e) {
2296
2336
  let t = e.trim().split(/\s+/), n, r;
2297
2337
  for (let e of t) if (/^[\d.]+%$/.test(e)) {
2298
2338
  if (r !== void 0) return null;
@@ -2306,61 +2346,61 @@ function Kr(e) {
2306
2346
  pct: r
2307
2347
  };
2308
2348
  }
2309
- function qr(e) {
2310
- let t = Ur(e);
2349
+ function Qr(e) {
2350
+ let t = Jr(e);
2311
2351
  if (t.length !== 3) return null;
2312
2352
  let [n, r, i] = t;
2313
2353
  if (n === void 0 || r === void 0 || i === void 0 || !/^\s*in\s+srgb\s*$/i.test(n)) return null;
2314
- let a = Kr(r), s = Kr(i);
2354
+ let a = Zr(r), s = Zr(i);
2315
2355
  if (!a || !s) return null;
2316
2356
  let c = f(a.color), l = f(s.color);
2317
2357
  if (!c || !l) return null;
2318
2358
  let u = d(c, l, a.pct, s.pct);
2319
2359
  return u ? o(u) : null;
2320
2360
  }
2321
- function Jr(e, t) {
2322
- let n = "", r = 0, i = new RegExp(Wr, "g"), a;
2361
+ function $r(e, t) {
2362
+ let n = "", r = 0, i = new RegExp(Yr, "g"), a;
2323
2363
  for (; (a = i.exec(e)) !== null;) {
2324
2364
  let o = a[1];
2325
2365
  if (o === void 0) continue;
2326
- let s = a.index, c = s + o.length, l = Hr(e, c);
2366
+ let s = a.index, c = s + o.length, l = qr(e, c);
2327
2367
  if (l === -1) break;
2328
- let u = Jr(e.slice(c + 1, l), t), d = o === "var" ? Gr(u, t) : qr(u);
2368
+ let u = $r(e.slice(c + 1, l), t), d = o === "var" ? Xr(u, t) : Qr(u);
2329
2369
  n += e.slice(r, s), n += d ?? `${o}(${u})`, r = l + 1, i.lastIndex = r;
2330
2370
  }
2331
2371
  return n + e.slice(r);
2332
2372
  }
2333
- function Yr(e, t) {
2334
- let n = new Vr();
2373
+ function ei(e, t) {
2374
+ let n = new Kr();
2335
2375
  for (let [e, r] of Object.entries(t)) n.declare(e, r);
2336
- return Jr(e, n);
2376
+ return $r(e, n);
2337
2377
  }
2338
- var Xr = /(--[\w-]+)\s*:\s*([^;{}]+)/g, Zr = /(\s)([\w:.-]+)(=)("[^"]*"|'[^']*')/g, Qr = /* @__PURE__ */ new Set(["data-src"]);
2339
- function $r(e, t) {
2340
- Xr.lastIndex = 0;
2378
+ var ti = /(--[\w-]+)\s*:\s*([^;{}]+)/g, ni = /(\s)([\w:.-]+)(=)("[^"]*"|'[^']*')/g, ri = /* @__PURE__ */ new Set(["data-src"]);
2379
+ function ii(e, t) {
2380
+ ti.lastIndex = 0;
2341
2381
  let n;
2342
- for (; (n = Xr.exec(e)) !== null;) {
2382
+ for (; (n = ti.exec(e)) !== null;) {
2343
2383
  let [, e, r] = n;
2344
2384
  e !== void 0 && r !== void 0 && t.declare(e, r.trim());
2345
2385
  }
2346
2386
  }
2347
- function ei(e, t) {
2348
- return e.replace(Zr, (e, n, r, i, a) => {
2349
- if (Qr.has(r)) return e;
2387
+ function ai(e, t) {
2388
+ return e.replace(ni, (e, n, r, i, a) => {
2389
+ if (ri.has(r)) return e;
2350
2390
  let o = a[0] ?? "\"";
2351
- return `${n}${r}${i}${o}${Jr(a.slice(1, -1), t)}${o}`;
2391
+ return `${n}${r}${i}${o}${$r(a.slice(1, -1), t)}${o}`;
2352
2392
  });
2353
2393
  }
2354
- function ti(e, t) {
2355
- let n = new Vr();
2394
+ function oi(e, t) {
2395
+ let n = new Kr();
2356
2396
  n.declare("--bg", t.bg), n.declare("--fg", t.fg), t.line && n.declare("--line", t.line), t.accent && n.declare("--accent", t.accent), t.muted && n.declare("--muted", t.muted), t.surface && n.declare("--surface", t.surface), t.border && n.declare("--border", t.border);
2357
2397
  for (let t of e.matchAll(/<style[^>]*>([\s\S]*?)<\/style>/g)) {
2358
2398
  let e = t[1];
2359
- e !== void 0 && $r(e, n);
2399
+ e !== void 0 && ii(e, n);
2360
2400
  }
2361
2401
  for (let t of e.matchAll(/\sstyle=("[^"]*"|'[^']*')/g)) {
2362
2402
  let e = t[1];
2363
- e !== void 0 && $r(e.slice(1, -1), n);
2403
+ e !== void 0 && ii(e.slice(1, -1), n);
2364
2404
  }
2365
2405
  let r = "", i = 0;
2366
2406
  for (; i < e.length;) {
@@ -2369,7 +2409,7 @@ function ti(e, t) {
2369
2409
  if (r += e.slice(i, t), e.startsWith("<style", t)) {
2370
2410
  let a = e.indexOf(">", t), o = e.indexOf("</style>", t);
2371
2411
  if (a === -1 || o === -1) break;
2372
- r += e.slice(t, a + 1), r += Jr(e.slice(a + 1, o), n), r += "</style>", i = o + 8;
2412
+ r += e.slice(t, a + 1), r += $r(e.slice(a + 1, o), n), r += "</style>", i = o + 8;
2373
2413
  continue;
2374
2414
  }
2375
2415
  let a = -1, o = null;
@@ -2384,7 +2424,7 @@ function ti(e, t) {
2384
2424
  }
2385
2425
  if (a === -1) break;
2386
2426
  let s = e.slice(t, a + 1);
2387
- r += s.startsWith("<!") || s.startsWith("<?") || s.startsWith("</") ? s : ei(s, n), i = a + 1;
2427
+ r += s.startsWith("<!") || s.startsWith("<?") || s.startsWith("</") ? s : ai(s, n), i = a + 1;
2388
2428
  }
2389
2429
  return r + e.slice(i);
2390
2430
  }
@@ -2409,32 +2449,32 @@ var U = {
2409
2449
  namespacePad: 16,
2410
2450
  namespaceTitleFontSize: 12
2411
2451
  };
2412
- function ni(e) {
2452
+ function si(e) {
2413
2453
  return `note ${e}`;
2414
2454
  }
2415
- function ri(e) {
2455
+ function ci(e) {
2416
2456
  return `${e} link`;
2417
2457
  }
2418
- function ii(e) {
2458
+ function li(e) {
2419
2459
  return `namespace ${e}`;
2420
2460
  }
2421
- function ai(e) {
2461
+ function ui(e) {
2422
2462
  let t = new Set(e.classes.map((e) => e.id)), n = /* @__PURE__ */ new Set(), r = [];
2423
2463
  for (let [i, a] of e.namespaces.entries()) {
2424
2464
  let e = [];
2425
2465
  for (let r of a.classIds) !t.has(r) || n.has(r) || (n.add(r), e.push(r));
2426
2466
  e.length > 0 && r.push({
2427
- id: ii(i),
2467
+ id: li(i),
2428
2468
  name: a.name,
2429
2469
  classIds: e
2430
2470
  });
2431
2471
  }
2432
2472
  return r;
2433
2473
  }
2434
- function oi(e, t) {
2435
- let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = Te(t.fontSizes);
2474
+ function di(e, t) {
2475
+ let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = Ae(t.fontSizes);
2436
2476
  for (let t of e.classes) {
2437
- let e = t.annotation ? U.headerBaseHeight + U.annotationHeight : U.headerBaseHeight, r = t.attributes.length > 0 ? t.attributes.length * U.memberRowHeight + U.sectionPadY : U.emptySectionHeight, a = t.methods.length > 0 ? t.methods.length * U.memberRowHeight + U.sectionPadY : U.emptySectionHeight, o = F(t.label, i.nodeLabel, L.nodeLabel), s = ui(t.attributes), c = ui(t.methods), l = Math.max(U.minWidth, o + U.boxPadX * 2, s + U.boxPadX * 2, c + U.boxPadX * 2), u = e + r + a;
2477
+ let e = t.annotation ? U.headerBaseHeight + U.annotationHeight : U.headerBaseHeight, r = t.attributes.length > 0 ? t.attributes.length * U.memberRowHeight + U.sectionPadY : U.emptySectionHeight, a = t.methods.length > 0 ? t.methods.length * U.memberRowHeight + U.sectionPadY : U.emptySectionHeight, o = F(t.label, i.nodeLabel, L.nodeLabel), s = hi(t.attributes), c = hi(t.methods), l = Math.max(U.minWidth, o + U.boxPadX * 2, s + U.boxPadX * 2, c + U.boxPadX * 2), u = e + r + a;
2438
2478
  n.set(t.id, {
2439
2479
  width: l,
2440
2480
  height: u,
@@ -2443,7 +2483,7 @@ function oi(e, t) {
2443
2483
  methodHeight: a
2444
2484
  });
2445
2485
  }
2446
- let a = ai(e), o = /* @__PURE__ */ new Map();
2486
+ let a = ui(e), o = /* @__PURE__ */ new Map();
2447
2487
  for (let e of a) for (let t of e.classIds) o.set(t, e.id);
2448
2488
  let s = /* @__PURE__ */ new Map(), c = [];
2449
2489
  for (let e of a) {
@@ -2451,7 +2491,7 @@ function oi(e, t) {
2451
2491
  id: e.id,
2452
2492
  children: [],
2453
2493
  layoutOptions: {
2454
- "elk.padding": Ne({
2494
+ "elk.padding": Re({
2455
2495
  top: U.namespaceTitleHeight + U.namespacePad / 2,
2456
2496
  left: U.namespacePad,
2457
2497
  bottom: U.namespacePad,
@@ -2464,11 +2504,11 @@ function oi(e, t) {
2464
2504
  s.set(e.id, n), c.push(n);
2465
2505
  }
2466
2506
  for (let [e, t] of n) {
2467
- let n = Fe(e, t), r = s.get(o.get(e) ?? "");
2507
+ let n = Be(e, t), r = s.get(o.get(e) ?? "");
2468
2508
  r?.children ? r.children.push(n) : c.push(n);
2469
2509
  }
2470
2510
  let u = { fontSize: i.edgeLabel }, d = [];
2471
- for (let [t, n] of e.relationships.entries()) d.push(Re({
2511
+ for (let [t, n] of e.relationships.entries()) d.push(Ue({
2472
2512
  id: `e${t}`,
2473
2513
  source: n.from,
2474
2514
  target: n.to,
@@ -2477,12 +2517,12 @@ function oi(e, t) {
2477
2517
  }));
2478
2518
  let f = new Set(n.keys());
2479
2519
  for (let [t, n] of e.notes.entries()) {
2480
- let e = ni(t), a = l(n.text, i.edgeLabel, L.edgeLabel), o = {
2520
+ let e = si(t), a = l(n.text, i.edgeLabel, L.edgeLabel), o = {
2481
2521
  width: a.width + U.notePadX * 2,
2482
2522
  height: a.height + U.notePadY * 2
2483
2523
  };
2484
- r.set(e, o), c.push(Fe(e, o)), n.forClass !== void 0 && f.has(n.forClass) && d.push(Re({
2485
- id: ri(e),
2524
+ r.set(e, o), c.push(Be(e, o)), n.forClass !== void 0 && f.has(n.forClass) && d.push(Ue({
2525
+ id: ci(e),
2486
2526
  source: e,
2487
2527
  target: n.forClass,
2488
2528
  labelStyle: u
@@ -2492,8 +2532,8 @@ function oi(e, t) {
2492
2532
  elkGraph: {
2493
2533
  id: "root",
2494
2534
  layoutOptions: {
2495
- ...Pe({
2496
- direction: Me(void 0, je.class),
2535
+ ...ze({
2536
+ direction: Le(void 0, Ie.class),
2497
2537
  nodeSpacing: U.nodeSpacing,
2498
2538
  layerSpacing: U.layerSpacing,
2499
2539
  padding: U.padding
@@ -2511,7 +2551,7 @@ function oi(e, t) {
2511
2551
  namespaces: a
2512
2552
  };
2513
2553
  }
2514
- function si(e, t, n, r, i) {
2554
+ function fi(e, t, n, r, i) {
2515
2555
  let a = /* @__PURE__ */ new Map();
2516
2556
  for (let e of t.classes) a.set(e.id, e);
2517
2557
  let o = new Set(i.map((e) => e.id)), s = /* @__PURE__ */ new Map(), c = [];
@@ -2578,7 +2618,7 @@ function si(e, t, n, r, i) {
2578
2618
  if (!t)
2579
2619
  /* v8 ignore next */
2580
2620
  throw Error(`Missing ELK edge for relationship ${e}`);
2581
- let r = l(t), i = xt(t, r.x, r.y), a = St(t, r.x, r.y);
2621
+ let r = l(t), i = Et(t, r.x, r.y), a = Dt(t, r.x, r.y);
2582
2622
  f.push({
2583
2623
  from: n.from,
2584
2624
  to: n.to,
@@ -2597,11 +2637,11 @@ function si(e, t, n, r, i) {
2597
2637
  for (let e of c) g.set(e.id, e);
2598
2638
  let _ = [];
2599
2639
  for (let [e, n] of t.notes.entries()) {
2600
- let t = ni(e), i = g.get(t), a = r.get(t);
2640
+ let t = si(e), i = g.get(t), a = r.get(t);
2601
2641
  if (!i || !a)
2602
2642
  /* v8 ignore next */
2603
2643
  throw Error(`Missing layout for note ${e}`);
2604
- let o = m.get(ri(t));
2644
+ let o = m.get(ci(t));
2605
2645
  _.push({
2606
2646
  id: t,
2607
2647
  text: n.text,
@@ -2610,7 +2650,7 @@ function si(e, t, n, r, i) {
2610
2650
  y: i.y ?? 0,
2611
2651
  width: i.width ?? a.width,
2612
2652
  height: i.height ?? a.height,
2613
- ...o ? { linkPoints: xt(o, l(o).x, l(o).y) } : {}
2653
+ ...o ? { linkPoints: Et(o, l(o).x, l(o).y) } : {}
2614
2654
  });
2615
2655
  }
2616
2656
  return {
@@ -2622,7 +2662,7 @@ function si(e, t, n, r, i) {
2622
2662
  namespaces: u
2623
2663
  };
2624
2664
  }
2625
- function ci(e, t = {}) {
2665
+ function pi(e, t = {}) {
2626
2666
  if (e.classes.length === 0 && e.notes.length === 0) return {
2627
2667
  width: 0,
2628
2668
  height: 0,
@@ -2631,54 +2671,54 @@ function ci(e, t = {}) {
2631
2671
  notes: [],
2632
2672
  namespaces: []
2633
2673
  };
2634
- let { elkGraph: n, classSizes: r, noteSizes: i, namespaces: a } = oi(e, t);
2635
- return si(ye(n, t.layoutCache), e, r, i, a);
2674
+ let { elkGraph: n, classSizes: r, noteSizes: i, namespaces: a } = di(e, t);
2675
+ return fi(we(n, t.layoutCache), e, r, i, a);
2636
2676
  }
2637
- function li(e) {
2638
- return e.length * Math.ceil(Se("M", U.memberFontSize));
2677
+ function mi(e) {
2678
+ return e.length * Math.ceil(De("M", U.memberFontSize));
2639
2679
  }
2640
- function ui(e) {
2680
+ function hi(e) {
2641
2681
  if (e.length === 0) return 0;
2642
2682
  let t = 0;
2643
2683
  for (let n of e) {
2644
- let e = li(ee(n));
2684
+ let e = mi(A(n));
2645
2685
  e > t && (t = e);
2646
2686
  }
2647
2687
  return t;
2648
2688
  }
2649
2689
  //#endregion
2650
2690
  //#region packages/svg-renderer/src/class/renderer.ts
2651
- var di = {
2691
+ var gi = {
2652
2692
  memberSize: 11,
2653
2693
  memberWeight: 400,
2654
2694
  annotationSize: 10,
2655
2695
  annotationWeight: 500
2656
2696
  };
2657
- function fi(e, t, n = "Inter", r = !1, i = I, a, o, s, c = !0, l = {}) {
2697
+ function _i(e, t, n = "Inter", r = !1, i = I, a, o, s, c = !0, l = {}) {
2658
2698
  let u = [], d = c && e.classes.some((e) => !!g(e.interaction?.href));
2659
- u.push(Br(x(e.width, e.height, t, r, o, s, d, l.styleAttribute), a)), u.push(ke(n, !0, l.nonce)), u.push("<defs>"), u.push(mi()), u.push("</defs>");
2660
- for (let t of e.namespaces) u.push(pi(t));
2661
- for (let t of e.relationships) u.push(xi(t));
2662
- for (let t of e.notes) u.push(bi(t));
2663
- for (let t of e.classes) u.push(hi(t, i, c));
2664
- for (let t of e.notes) u.push(yi(t, i));
2665
- for (let t of e.relationships) u.push(wi(t, i));
2699
+ u.push(Gr(x(e.width, e.height, t, r, o, s, d, l.styleAttribute), a)), u.push(Pe(n, !0, l.nonce)), u.push("<defs>"), u.push(yi()), u.push("</defs>");
2700
+ for (let t of e.namespaces) u.push(vi(t));
2701
+ for (let t of e.relationships) u.push(Ei(t));
2702
+ for (let t of e.notes) u.push(Ti(t));
2703
+ for (let t of e.classes) u.push(bi(t, i, c));
2704
+ for (let t of e.notes) u.push(wi(t, i));
2705
+ for (let t of e.relationships) u.push(ki(t, i));
2666
2706
  return u.push("</svg>"), u.join("\n");
2667
2707
  }
2668
- function pi(e) {
2708
+ function vi(e) {
2669
2709
  let { x: t, y: n, width: i, height: o } = e, s = U.namespaceTitleHeight, c = R.outerBox;
2670
2710
  return [
2671
2711
  a`<g class="class-namespace" data-id="${r(e.name)}" data-label="${r(e.name)}">`,
2672
2712
  a` <rect x="${t}" y="${n}" width="${i}" height="${o}" rx="0" ry="0" fill="var(--_group-fill)" stroke="var(--_node-stroke)" stroke-width="${c}" />`,
2673
2713
  a` <rect x="${t}" y="${n}" width="${i}" height="${s}" rx="0" ry="0" fill="var(--_group-hdr)" stroke="var(--_node-stroke)" stroke-width="${c}" />`,
2674
- a` <text x="${t + U.namespacePad}" y="${n + s / 2}" dy="${z}" font-size="${U.namespaceTitleFontSize}" font-weight="${L.groupHeader}" fill="var(--_text-sec)">${Di(e.name)}</text>`,
2714
+ a` <text x="${t + U.namespacePad}" y="${n + s / 2}" dy="${z}" font-size="${U.namespaceTitleFontSize}" font-weight="${L.groupHeader}" fill="var(--_text-sec)">${Mi(e.name)}</text>`,
2675
2715
  "</g>"
2676
2716
  ].join("\n");
2677
2717
  }
2678
- function mi() {
2718
+ function yi() {
2679
2719
  return " <marker id=\"cls-inherit\" markerWidth=\"12\" markerHeight=\"10\" refX=\"12\" refY=\"5\" orient=\"auto-start-reverse\">\n <polygon points=\"0 0, 12 5, 0 10\" fill=\"var(--bg)\" stroke=\"var(--_arrow)\" stroke-width=\"1.5\" />\n </marker>\n <marker id=\"cls-composition\" markerWidth=\"18\" markerHeight=\"14\" refX=\"16.5\" refY=\"7\" orient=\"auto-start-reverse\">\n <polygon points=\"9 1.5, 16.5 7, 9 12.5, 1.5 7\" fill=\"var(--_arrow)\" stroke=\"var(--_arrow)\" stroke-width=\"1\" />\n </marker>\n <marker id=\"cls-aggregation\" markerWidth=\"18\" markerHeight=\"14\" refX=\"16.5\" refY=\"7\" orient=\"auto-start-reverse\">\n <polygon points=\"9 1.5, 16.5 7, 9 12.5, 1.5 7\" fill=\"var(--bg)\" stroke=\"var(--_arrow)\" stroke-width=\"1.5\" />\n </marker>\n <marker id=\"cls-arrow\" markerWidth=\"8\" markerHeight=\"6\" refX=\"8\" refY=\"3\" orient=\"auto-start-reverse\">\n <polyline points=\"0 0, 8 3, 0 6\" fill=\"none\" stroke=\"var(--_arrow)\" stroke-width=\"1.5\" />\n </marker>";
2680
2720
  }
2681
- function hi(e, t, n = !0) {
2721
+ function bi(e, t, n = !0) {
2682
2722
  let { x: i, y: o, width: c, height: l, headerHeight: u, attrHeight: d, inlineStyle: f } = e, m = [], h = e.interaction, v = r(f?.fill ?? "var(--_node-fill)"), y = r(f?.stroke ?? "var(--_node-stroke)"), b = r(f?.["stroke-width"] ?? String(R.outerBox)), x = f?.fill ? v : "var(--_group-hdr)", S = f?.color ? r(f.color) : f?.fill ? r(s(f.fill, "var(--_text)")) : void 0, C = e.annotation ? a` data-annotation="${r(e.annotation)}"` : "", w = _(e.className), T = [
2683
2723
  a`class="${w ? a`class-node ${w}` : "class-node"}"`,
2684
2724
  a`data-id="${r(e.id)}"`,
@@ -2690,53 +2730,53 @@ function hi(e, t, n = !0) {
2690
2730
  let e = h?.target ? a` target="${r(h.target)}"` : "";
2691
2731
  m.push(a` <a href="${r(E)}"${e}>`);
2692
2732
  }
2693
- n && h?.tooltip && m.push(a` <title>${Di(h.tooltip)}</title>`), m.push(a` <rect x="${i}" y="${o}" width="${c}" height="${l}" ` + a`rx="0" ry="0" fill="${v}" stroke="${y}" stroke-width="${b}" />`), m.push(a` <rect x="${i}" y="${o}" width="${c}" height="${u}" ` + a`rx="0" ry="0" fill="${x}" stroke="${y}" stroke-width="${b}" />`);
2733
+ n && h?.tooltip && m.push(a` <title>${Mi(h.tooltip)}</title>`), m.push(a` <rect x="${i}" y="${o}" width="${c}" height="${l}" ` + a`rx="0" ry="0" fill="${v}" stroke="${y}" stroke-width="${b}" />`), m.push(a` <rect x="${i}" y="${o}" width="${c}" height="${u}" ` + a`rx="0" ry="0" fill="${x}" stroke="${y}" stroke-width="${b}" />`);
2694
2734
  let D = o + u / 2;
2695
2735
  if (e.annotation) {
2696
2736
  let t = o + 12;
2697
- m.push(a` <text x="${i + c / 2}" y="${t}" text-anchor="middle" dy="${z}" ` + a`font-size="${di.annotationSize}" font-weight="${di.annotationWeight}" ` + a`font-style="italic" fill="${S ?? "var(--_text-muted)"}">&lt;&lt;${Di(e.annotation)}&gt;&gt;</text>`), D = o + u / 2 + 6;
2737
+ m.push(a` <text x="${i + c / 2}" y="${t}" text-anchor="middle" dy="${z}" ` + a`font-size="${gi.annotationSize}" font-weight="${gi.annotationWeight}" ` + a`font-style="italic" fill="${S ?? "var(--_text-muted)"}">&lt;&lt;${Mi(e.annotation)}&gt;&gt;</text>`), D = o + u / 2 + 6;
2698
2738
  }
2699
2739
  m.push(" " + p(e.label, i + c / 2, D, t.nodeLabel, a`text-anchor="middle" font-size="${t.nodeLabel}" font-weight="700" fill="${S ?? "var(--_text)"}"`));
2700
2740
  let O = o + u;
2701
2741
  m.push(a` <line x1="${i}" y1="${O}" x2="${i + c}" y2="${O}" ` + a`stroke="${y}" stroke-width="${R.innerBox}" />`);
2702
2742
  for (let t = 0; t < e.attributes.length; t++) {
2703
2743
  let n = e.attributes[t], r = O + 4 + t * 20 + 10;
2704
- m.push(" " + _i(n, i + U.boxPadX, r, S));
2744
+ m.push(" " + Si(n, i + U.boxPadX, r, S));
2705
2745
  }
2706
2746
  let k = O + d;
2707
2747
  m.push(a` <line x1="${i}" y1="${k}" x2="${i + c}" y2="${k}" ` + a`stroke="${y}" stroke-width="${R.innerBox}" />`);
2708
2748
  for (let t = 0; t < e.methods.length; t++) {
2709
2749
  let n = e.methods[t], r = k + 4 + t * 20 + 10;
2710
- m.push(" " + _i(n, i + U.boxPadX, r, S));
2750
+ m.push(" " + Si(n, i + U.boxPadX, r, S));
2711
2751
  }
2712
2752
  return E && m.push(" </a>"), m.push("</g>"), m.join("\n");
2713
2753
  }
2714
- var gi = 700;
2715
- function _i(e, t, n, r) {
2754
+ var xi = 700;
2755
+ function Si(e, t, n, r) {
2716
2756
  let i = e.isAbstract ? " font-style=\"italic\"" : "", o = e.isStatic ? " text-decoration=\"underline\"" : "", s = r ?? "var(--_text-faint)", c = r ?? "var(--_text-sec)", l = r ?? "var(--_text-muted)", u = [];
2717
- e.visibility && u.push(a`<tspan fill="${c}" font-weight="${gi}">${Di(e.visibility)}</tspan><tspan fill="${s}"> </tspan>`);
2757
+ e.visibility && u.push(a`<tspan fill="${c}" font-weight="${xi}">${Mi(e.visibility)}</tspan><tspan fill="${s}"> </tspan>`);
2718
2758
  let d = e.isMethod ? a`${e.name}(${e.params || ""})` : e.name;
2719
- return u.push(a`<tspan fill="${c}">${Di(d)}</tspan>`), e.type && (u.push(a`<tspan fill="${s}">: </tspan>`), u.push(a`<tspan fill="${l}">${Di(e.type)}</tspan>`)), a`<text x="${t}" y="${n}" class="mono" dy="${z}" ` + a`font-size="${di.memberSize}" font-weight="${di.memberWeight}"${i}${o}>` + a`${u.join("")}</text>`;
2759
+ return u.push(a`<tspan fill="${c}">${Mi(d)}</tspan>`), e.type && (u.push(a`<tspan fill="${s}">: </tspan>`), u.push(a`<tspan fill="${l}">${Mi(e.type)}</tspan>`)), a`<text x="${t}" y="${n}" class="mono" dy="${z}" ` + a`font-size="${gi.memberSize}" font-weight="${gi.memberWeight}"${i}${o}>` + a`${u.join("")}</text>`;
2720
2760
  }
2721
- var vi = 6;
2722
- function yi(e, t) {
2761
+ var Ci = 6;
2762
+ function wi(e, t) {
2723
2763
  let { x: n, y: i, width: o, height: s } = e, c = e.forClass === void 0 ? "" : a` data-for="${r(e.forClass)}"`, l = [
2724
2764
  a`${n},${i}`,
2725
- a`${n + o - vi},${i}`,
2726
- a`${n + o},${i + vi}`,
2765
+ a`${n + o - Ci},${i}`,
2766
+ a`${n + o},${i + Ci}`,
2727
2767
  a`${n + o},${i + s}`,
2728
2768
  a`${n},${i + s}`
2729
- ].join(" "), u = a`${n + o - vi},${i} ${n + o},${i + vi} ` + a`${n + o - vi},${i + vi}`;
2769
+ ].join(" "), u = a`${n + o - Ci},${i} ${n + o},${i + Ci} ` + a`${n + o - Ci},${i + Ci}`;
2730
2770
  return a`<g class="class-note"${c}>` + a`\n <polygon points="${l}" ` + a`fill="var(--bg)" stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />` + a`\n <polygon points="${u}" ` + a`fill="var(--_inner-stroke)" stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />` + a`\n ${p(e.text, n + o / 2, i + s / 2, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`)}` + "\n</g>";
2731
2771
  }
2732
- function bi(e) {
2772
+ function Ti(e) {
2733
2773
  if (!e.linkPoints || e.linkPoints.length < 2) return "";
2734
2774
  let t = e.linkPoints.map((e) => a`${e.x},${e.y}`).join(" "), n = e.forClass === void 0 ? "" : a` data-for="${r(e.forClass)}"`;
2735
2775
  return a`<polyline class="class-note-link"${n} points="${t}" ` + a`fill="none" stroke="var(--_line)" stroke-width="${R.connector}" stroke-dasharray="2 3" />`;
2736
2776
  }
2737
- function xi(e) {
2777
+ function Ei(e) {
2738
2778
  if (e.points.length < 2) return "";
2739
- let t = e.points.map((e) => a`${e.x},${e.y}`).join(" "), n = e.type === "dependency" || e.type === "realization" ? " stroke-dasharray=\"6 4\"" : "", i = Si(e.type, e.markerAt), o = [
2779
+ let t = e.points.map((e) => a`${e.x},${e.y}`).join(" "), n = e.type === "dependency" || e.type === "realization" ? " stroke-dasharray=\"6 4\"" : "", i = Di(e.type, e.markerAt), o = [
2740
2780
  "class=\"class-relationship\"",
2741
2781
  a`data-from="${r(e.from)}"`,
2742
2782
  a`data-to="${r(e.to)}"`,
@@ -2745,11 +2785,11 @@ function xi(e) {
2745
2785
  ];
2746
2786
  return e.label && o.push(a`data-label="${r(e.label)}"`), e.fromCardinality && o.push(a`data-from-cardinality="${r(e.fromCardinality)}"`), e.toCardinality && o.push(a`data-to-cardinality="${r(e.toCardinality)}"`), a`<polyline ${o.join(" ")} points="${t}" fill="none" stroke="var(--_line)" ` + a`stroke-width="${R.connector}"${n}${i} />`;
2747
2787
  }
2748
- function Si(e, t) {
2749
- let n = Ci(e);
2788
+ function Di(e, t) {
2789
+ let n = Oi(e);
2750
2790
  return n ? t === "from" ? a` marker-start="url(#${n})"` : a` marker-end="url(#${n})"` : "";
2751
2791
  }
2752
- function Ci(e) {
2792
+ function Oi(e) {
2753
2793
  switch (e) {
2754
2794
  case "inheritance":
2755
2795
  case "realization": return "cls-inherit";
@@ -2760,30 +2800,30 @@ function Ci(e) {
2760
2800
  default: return null;
2761
2801
  }
2762
2802
  }
2763
- function wi(e, t) {
2803
+ function ki(e, t) {
2764
2804
  if (!e.label && !e.fromCardinality && !e.toCardinality || e.points.length < 2) return "";
2765
2805
  let n = [];
2766
2806
  if (e.label) {
2767
- let r = e.labelPosition ?? Ti(e.points);
2807
+ let r = e.labelPosition ?? Ai(e.points);
2768
2808
  n.push(p(e.label, r.x, r.y - 8, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
2769
2809
  }
2770
2810
  if (e.fromCardinality && e.points.length >= 2) {
2771
- let r = e.points[0], i = e.points[1], o = Ei(r, i);
2811
+ let r = e.points[0], i = e.points[1], o = ji(r, i);
2772
2812
  n.push(p(e.fromCardinality, r.x + o.x, r.y + o.y, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
2773
2813
  }
2774
2814
  if (e.toCardinality && e.points.length >= 2) {
2775
- let r = e.points[e.points.length - 1], i = e.points[e.points.length - 2], o = Ei(r, i);
2815
+ let r = e.points[e.points.length - 1], i = e.points[e.points.length - 2], o = ji(r, i);
2776
2816
  n.push(p(e.toCardinality, r.x + o.x, r.y + o.y, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
2777
2817
  }
2778
2818
  return n.join("\n");
2779
2819
  }
2780
- function Ti(e) {
2820
+ function Ai(e) {
2781
2821
  return e.length === 0 ? {
2782
2822
  x: 0,
2783
2823
  y: 0
2784
2824
  } : e[Math.floor(e.length / 2)];
2785
2825
  }
2786
- function Ei(e, t) {
2826
+ function ji(e, t) {
2787
2827
  let n = t.x - e.x, r = t.y - e.y;
2788
2828
  return Math.abs(n) > Math.abs(r) ? {
2789
2829
  x: n > 0 ? 14 : -14,
@@ -2793,7 +2833,7 @@ function Ei(e, t) {
2793
2833
  y: r > 0 ? 14 : -14
2794
2834
  };
2795
2835
  }
2796
- var Di = i, W = {
2836
+ var Mi = i, W = {
2797
2837
  padding: 40,
2798
2838
  boxPadX: 14,
2799
2839
  headerHeight: 34,
@@ -2804,15 +2844,15 @@ var Di = i, W = {
2804
2844
  nodeSpacing: 70,
2805
2845
  layerSpacing: 90
2806
2846
  };
2807
- function Oi(e) {
2808
- return e.length * Math.ceil(Se("M", W.attrFontSize));
2847
+ function Ni(e) {
2848
+ return e.length * Math.ceil(De("M", W.attrFontSize));
2809
2849
  }
2810
- function ki(e, t) {
2811
- let n = /* @__PURE__ */ new Map(), r = Te(t.fontSizes);
2850
+ function Pi(e, t) {
2851
+ let n = /* @__PURE__ */ new Map(), r = Ae(t.fontSizes);
2812
2852
  for (let t of e.entities) {
2813
2853
  let e = F(t.label, r.nodeLabel, L.nodeLabel), i = 0;
2814
2854
  for (let e of t.attributes) {
2815
- let t = Oi(`${e.type} ${e.name}${e.keys.length > 0 ? " " + e.keys.join(",") : ""}`);
2855
+ let t = Ni(`${e.type} ${e.name}${e.keys.length > 0 ? " " + e.keys.join(",") : ""}`);
2816
2856
  t > i && (i = t);
2817
2857
  }
2818
2858
  let a = Math.max(W.minWidth, e + W.boxPadX * 2, i + W.boxPadX * 2), o = W.headerHeight + Math.max(t.attributes.length, 1) * W.rowHeight;
@@ -2822,9 +2862,9 @@ function ki(e, t) {
2822
2862
  });
2823
2863
  }
2824
2864
  let i = [];
2825
- for (let [e, t] of n) i.push(Fe(e, t));
2865
+ for (let [e, t] of n) i.push(Be(e, t));
2826
2866
  let a = { fontSize: r.edgeLabel }, o = [];
2827
- for (let [t, n] of e.relationships.entries()) o.push(Re({
2867
+ for (let [t, n] of e.relationships.entries()) o.push(Ue({
2828
2868
  id: `e${t}`,
2829
2869
  source: n.entity1,
2830
2870
  target: n.entity2,
@@ -2835,8 +2875,8 @@ function ki(e, t) {
2835
2875
  elkGraph: {
2836
2876
  id: "root",
2837
2877
  layoutOptions: {
2838
- ...Pe({
2839
- direction: Me(e.direction, je.er),
2878
+ ...ze({
2879
+ direction: Le(e.direction, Ie.er),
2840
2880
  nodeSpacing: W.nodeSpacing,
2841
2881
  layerSpacing: W.layerSpacing,
2842
2882
  padding: W.padding
@@ -2851,7 +2891,7 @@ function ki(e, t) {
2851
2891
  entitySizes: n
2852
2892
  };
2853
2893
  }
2854
- function Ai(e, t, n) {
2894
+ function Fi(e, t, n) {
2855
2895
  let r = /* @__PURE__ */ new Map();
2856
2896
  for (let e of t.entities) r.set(e.id, e);
2857
2897
  let i = [];
@@ -2877,7 +2917,7 @@ function Ai(e, t, n) {
2877
2917
  }
2878
2918
  let a = [];
2879
2919
  for (let [n, r] of (e.edges ?? []).entries()) {
2880
- let e = t.relationships[n], i = xt(r);
2920
+ let e = t.relationships[n], i = Et(r);
2881
2921
  a.push({
2882
2922
  entity1: e.entity1,
2883
2923
  entity2: e.entity2,
@@ -2895,58 +2935,58 @@ function Ai(e, t, n) {
2895
2935
  relationships: a
2896
2936
  };
2897
2937
  }
2898
- function ji(e, t = {}) {
2938
+ function Ii(e, t = {}) {
2899
2939
  if (e.entities.length === 0) return {
2900
2940
  width: 0,
2901
2941
  height: 0,
2902
2942
  entities: [],
2903
2943
  relationships: []
2904
2944
  };
2905
- let { elkGraph: n, entitySizes: r } = ki(e, t);
2906
- return Ai(ye(n, t.layoutCache), e, r);
2945
+ let { elkGraph: n, entitySizes: r } = Pi(e, t);
2946
+ return Fi(we(n, t.layoutCache), e, r);
2907
2947
  }
2908
2948
  //#endregion
2909
2949
  //#region packages/svg-renderer/src/er/renderer.ts
2910
- var Mi = 70, Ni = {
2950
+ var Li = 70, Ri = {
2911
2951
  attrSize: 11,
2912
2952
  attrWeight: 400,
2913
2953
  keySize: 9,
2914
2954
  keyWeight: 600
2915
2955
  };
2916
- function Pi(e, t, n = "Inter", r = !1, i = I, a, o, s, c = {}) {
2956
+ function zi(e, t, n = "Inter", r = !1, i = I, a, o, s, c = {}) {
2917
2957
  let l = [];
2918
- l.push(Br(x(e.width, e.height, t, r, o, s, void 0, c.styleAttribute), a)), l.push(ke(n, !0, c.nonce)), l.push("<defs>"), l.push("</defs>");
2919
- for (let t of e.relationships) l.push(Li(t));
2920
- for (let t of e.entities) l.push(Fi(t, i));
2921
- for (let t of e.relationships) l.push(zi(t));
2922
- for (let t of e.relationships) l.push(Ri(t, i));
2958
+ l.push(Gr(x(e.width, e.height, t, r, o, s, void 0, c.styleAttribute), a)), l.push(Pe(n, !0, c.nonce)), l.push("<defs>"), l.push("</defs>");
2959
+ for (let t of e.relationships) l.push(Hi(t));
2960
+ for (let t of e.entities) l.push(Bi(t, i));
2961
+ for (let t of e.relationships) l.push(Wi(t));
2962
+ for (let t of e.relationships) l.push(Ui(t, i));
2923
2963
  return l.push("</svg>"), l.join("\n");
2924
2964
  }
2925
- function Fi(e, t) {
2965
+ function Bi(e, t) {
2926
2966
  let { id: n, x: i, y: o, width: s, height: c, headerHeight: l, rowHeight: u, label: d, attributes: f } = e, m = [];
2927
2967
  m.push(a`<g class="entity" data-id="${r(n)}" data-label="${r(d)}">`), m.push(a` <rect x="${i}" y="${o}" width="${s}" height="${c}" ` + a`rx="0" ry="0" fill="var(--_node-fill)" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`), m.push(a` <rect x="${i}" y="${o}" width="${s}" height="${l}" ` + a`rx="0" ry="0" fill="var(--_group-hdr)" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`), m.push(" " + p(d, i + s / 2, o + l / 2, t.nodeLabel, a`text-anchor="middle" font-size="${t.nodeLabel}" font-weight="700" fill="var(--_text)"`));
2928
2968
  let h = o + l;
2929
2969
  m.push(a` <line x1="${i}" y1="${h}" x2="${i + s}" y2="${h}" ` + a`stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />`);
2930
2970
  for (let e = 0; e < f.length; e++) {
2931
2971
  let t = f[e], n = h + e * u + u / 2;
2932
- m.push(" " + Ii(t, i, n, s).replace(/\n/g, "\n "));
2972
+ m.push(" " + Vi(t, i, n, s).replace(/\n/g, "\n "));
2933
2973
  }
2934
- return f.length === 0 && m.push(a` <text x="${i + s / 2}" y="${h + u / 2}" text-anchor="middle" dy="${z}" ` + a`font-size="${Ni.attrSize}" fill="var(--_text-faint)" font-style="italic">(no attributes)</text>`), m.push("</g>"), m.join("\n");
2974
+ return f.length === 0 && m.push(a` <text x="${i + s / 2}" y="${h + u / 2}" text-anchor="middle" dy="${z}" ` + a`font-size="${Ri.attrSize}" fill="var(--_text-faint)" font-style="italic">(no attributes)</text>`), m.push("</g>"), m.join("\n");
2935
2975
  }
2936
- function Ii(e, t, n, r) {
2976
+ function Vi(e, t, n, r) {
2937
2977
  let i = [], o = e.comment && e.comment.length > 0;
2938
2978
  if (e.comment && e.comment.length > 0) {
2939
2979
  let t = e.comment.replace(/<br\s*\/?>/gi, "\n");
2940
- i.push(a`<g><title>${Hi(t)}</title>`);
2980
+ i.push(a`<g><title>${qi(t)}</title>`);
2941
2981
  }
2942
2982
  let s = 0;
2943
- e.keys.length > 0 && (s = F(e.keys.join(","), Ni.keySize, Ni.keyWeight) + 8, i.push(a`<rect x="${t + 6}" y="${n - 7}" width="${s}" height="14" rx="2" ry="2" ` + "fill=\"var(--_key-badge)\" />"), i.push(a`<text x="${t + 6 + s / 2}" y="${n}" text-anchor="middle" dy="${z}" ` + a`font-size="${Ni.keySize}" font-weight="${Ni.keyWeight}" fill="var(--_text-sec)">${e.keys.join(",")}</text>`));
2983
+ e.keys.length > 0 && (s = F(e.keys.join(","), Ri.keySize, Ri.keyWeight) + 8, i.push(a`<rect x="${t + 6}" y="${n - 7}" width="${s}" height="14" rx="2" ry="2" ` + "fill=\"var(--_key-badge)\" />"), i.push(a`<text x="${t + 6 + s / 2}" y="${n}" text-anchor="middle" dy="${z}" ` + a`font-size="${Ri.keySize}" font-weight="${Ri.keyWeight}" fill="var(--_text-sec)">${e.keys.join(",")}</text>`));
2944
2984
  let c = t + 8 + (s > 0 ? s + 6 : 0);
2945
- i.push(a`<text x="${c}" y="${n}" class="mono" dy="${z}" ` + a`font-size="${Ni.attrSize}" font-weight="${Ni.attrWeight}">` + a`<tspan fill="var(--_text-muted)">${Hi(e.type)}</tspan></text>`);
2985
+ i.push(a`<text x="${c}" y="${n}" class="mono" dy="${z}" ` + a`font-size="${Ri.attrSize}" font-weight="${Ri.attrWeight}">` + a`<tspan fill="var(--_text-muted)">${qi(e.type)}</tspan></text>`);
2946
2986
  let l = t + r - 8;
2947
- return i.push(a`<text x="${l}" y="${n}" class="mono" text-anchor="end" dy="${z}" ` + a`font-size="${Ni.attrSize}" font-weight="${Ni.attrWeight}">` + a`<tspan fill="var(--_text-sec)">${Hi(e.name)}</tspan></text>`), o && i.push("</g>"), i.join("\n");
2987
+ return i.push(a`<text x="${l}" y="${n}" class="mono" text-anchor="end" dy="${z}" ` + a`font-size="${Ri.attrSize}" font-weight="${Ri.attrWeight}">` + a`<tspan fill="var(--_text-sec)">${qi(e.name)}</tspan></text>`), o && i.push("</g>"), i.join("\n");
2948
2988
  }
2949
- function Li(e) {
2989
+ function Hi(e) {
2950
2990
  if (e.points.length < 2) return "";
2951
2991
  let t = e.points.map((e) => a`${e.x},${e.y}`).join(" "), n = e.identifying ? "" : " stroke-dasharray=\"6 4\"", i = e.label ? a` data-label="${r(e.label)}"` : "", o = [
2952
2992
  "class=\"er-relationship\"",
@@ -2958,19 +2998,19 @@ function Li(e) {
2958
2998
  ];
2959
2999
  return a`<polyline ${o.join(" ")}${i} points="${t}" fill="none" stroke="var(--_line)" ` + a`stroke-width="${R.connector}"${n} />`;
2960
3000
  }
2961
- function Ri(e, t) {
3001
+ function Ui(e, t) {
2962
3002
  if (!e.label || e.points.length < 2) return "";
2963
- let n = Vi(e.points), r = l(e.label, t.edgeLabel, L.edgeLabel), i = r.width + 8, o = r.height + 6;
2964
- return a`<rect x="${n.x - i / 2}" y="${n.y - o / 2}" width="${i}" height="${o}" rx="2" ry="2" ` + "fill=\"var(--bg)\" stroke=\"var(--_inner-stroke)\" stroke-width=\"0.5\" />" + a`\n${p(e.label, n.x, n.y, t.edgeLabel, a`text-anchor="middle" font-size="${t.edgeLabel}" font-weight="${L.edgeLabel}" fill="color-mix(in srgb, var(--fg) ${Mi}%, var(--bg))"`)}`;
3003
+ let n = Ki(e.points), r = l(e.label, t.edgeLabel, L.edgeLabel), i = r.width + 8, o = r.height + 6;
3004
+ return a`<rect x="${n.x - i / 2}" y="${n.y - o / 2}" width="${i}" height="${o}" rx="2" ry="2" ` + "fill=\"var(--bg)\" stroke=\"var(--_inner-stroke)\" stroke-width=\"0.5\" />" + a`\n${p(e.label, n.x, n.y, t.edgeLabel, a`text-anchor="middle" font-size="${t.edgeLabel}" font-weight="${L.edgeLabel}" fill="color-mix(in srgb, var(--fg) ${Li}%, var(--bg))"`)}`;
2965
3005
  }
2966
- function zi(e) {
3006
+ function Wi(e) {
2967
3007
  if (e.points.length < 2) return "";
2968
3008
  let t = [], n = e.points[0], r = e.points[1];
2969
- t.push(Bi(n, r, e.cardinality1));
3009
+ t.push(Gi(n, r, e.cardinality1));
2970
3010
  let i = e.points[e.points.length - 1], a = e.points[e.points.length - 2];
2971
- return t.push(Bi(i, a, e.cardinality2)), t.join("\n");
3011
+ return t.push(Gi(i, a, e.cardinality2)), t.join("\n");
2972
3012
  }
2973
- function Bi(e, t, n) {
3013
+ function Gi(e, t, n) {
2974
3014
  let r = [], i = R.connector + .25, o = e.x - t.x, s = e.y - t.y, c = Math.sqrt(o * o + s * s);
2975
3015
  if (c === 0) return "";
2976
3016
  let l = o / c, u = s / c, d = -u, f = l, p = e.x - l * 4, m = e.y - u * 4, h = e.x - l * 16, g = e.y - u * 16, _ = n === "one" || n === "zero-one", v = n === "many" || n === "zero-many", y = n === "zero-one" || n === "zero-many";
@@ -2993,7 +3033,7 @@ function Bi(e, t, n) {
2993
3033
  }
2994
3034
  return r.join("\n");
2995
3035
  }
2996
- function Vi(e) {
3036
+ function Ki(e) {
2997
3037
  if (e.length === 0) return {
2998
3038
  x: 0,
2999
3039
  y: 0
@@ -3019,7 +3059,7 @@ function Vi(e) {
3019
3059
  }
3020
3060
  return e[e.length - 1];
3021
3061
  }
3022
- var Hi = i, Ui = {
3062
+ var qi = i, Ji = {
3023
3063
  padding: 30,
3024
3064
  actorGap: 140,
3025
3065
  actorHeight: 40,
@@ -3041,24 +3081,24 @@ var Hi = i, Ui = {
3041
3081
  noteStackGap: 4,
3042
3082
  boxPad: 10
3043
3083
  };
3044
- function Wi(e) {
3084
+ function Yi(e) {
3045
3085
  return e + 8;
3046
3086
  }
3047
- var Gi = 14, Ki = 4;
3048
- function qi(e, t, n) {
3087
+ var Xi = 14, Zi = 4;
3088
+ function Qi(e, t, n) {
3049
3089
  return 14 + l(e, t, n).height / 2;
3050
3090
  }
3051
- function Ji(e) {
3091
+ function $i(e) {
3052
3092
  return {
3053
- ...Ui,
3054
- actorHeight: e?.actorHeight ?? Ui.actorHeight,
3055
- headerGap: e?.headerGap ?? Ui.headerGap,
3056
- messageRowHeight: e?.messageRowHeight ?? Ui.messageRowHeight,
3057
- noteOffsetAfterMessage: e?.noteOffsetAfterMessage ?? Ui.noteOffsetAfterMessage,
3058
- noteStackGap: e?.noteStackGap ?? Ui.noteStackGap
3093
+ ...Ji,
3094
+ actorHeight: e?.actorHeight ?? Ji.actorHeight,
3095
+ headerGap: e?.headerGap ?? Ji.headerGap,
3096
+ messageRowHeight: e?.messageRowHeight ?? Ji.messageRowHeight,
3097
+ noteOffsetAfterMessage: e?.noteOffsetAfterMessage ?? Ji.noteOffsetAfterMessage,
3098
+ noteStackGap: e?.noteStackGap ?? Ji.noteStackGap
3059
3099
  };
3060
3100
  }
3061
- function Yi(e, t = {}) {
3101
+ function ea(e, t = {}) {
3062
3102
  if (e.actors.length === 0) return {
3063
3103
  width: 0,
3064
3104
  height: 0,
@@ -3070,7 +3110,7 @@ function Yi(e, t = {}) {
3070
3110
  notes: [],
3071
3111
  boxes: []
3072
3112
  };
3073
- let n = Ji(t.sequence), r = Te(t.fontSizes), i = e.actors.map((e) => {
3113
+ let n = $i(t.sequence), r = Ae(t.fontSizes), i = e.actors.map((e) => {
3074
3114
  let t = F(e.label, r.nodeLabel, L.nodeLabel);
3075
3115
  return Math.max(t + n.actorPadX * 2, 80);
3076
3116
  }), a = [], o = n.padding + i[0] / 2;
@@ -3083,7 +3123,7 @@ function Yi(e, t = {}) {
3083
3123
  }
3084
3124
  let s = /* @__PURE__ */ new Map();
3085
3125
  for (let t = 0; t < e.actors.length; t++) s.set(e.actors[t].id, t);
3086
- let c = e.boxes.filter((e) => e.actorIds.length > 0), l = c.some((e) => e.label !== ""), u = c.length === 0 ? 0 : n.boxPad + (l ? Wi(r.edgeLabel) : 0), d = n.padding + u, f = e.actors.map((e, t) => ({
3126
+ let c = e.boxes.filter((e) => e.actorIds.length > 0), l = c.some((e) => e.label !== ""), u = c.length === 0 ? 0 : n.boxPad + (l ? Yi(r.edgeLabel) : 0), d = n.padding + u, f = e.actors.map((e, t) => ({
3087
3127
  id: e.id,
3088
3128
  label: e.label,
3089
3129
  type: e.type,
@@ -3100,7 +3140,7 @@ function Yi(e, t = {}) {
3100
3140
  height: 0
3101
3141
  };
3102
3142
  return e.color !== void 0 && (u.color = e.color), u;
3103
- }), m = e.actors.map((e) => e.type === "actor" ? qi(e.label, r.nodeLabel, L.nodeLabel) : 0), h = Math.max(0, ...e.actors.map((e, t) => e.createdAt === void 0 ? m[t] : 0)), g = r.edgeLabel + 12, _ = d + n.actorHeight + Math.max(n.headerGap, h > 0 ? h + Ki + g : 0), v = [], y = /* @__PURE__ */ new Map();
3143
+ }), m = e.actors.map((e) => e.type === "actor" ? Qi(e.label, r.nodeLabel, L.nodeLabel) : 0), h = Math.max(0, ...e.actors.map((e, t) => e.createdAt === void 0 ? m[t] : 0)), g = r.edgeLabel + 12, _ = d + n.actorHeight + Math.max(n.headerGap, h > 0 ? h + Zi + g : 0), v = [], y = /* @__PURE__ */ new Map();
3104
3144
  for (let t of e.blocks) {
3105
3145
  let e = y.get(t.startIndex) ?? 0;
3106
3146
  y.set(t.startIndex, Math.max(e, n.blockHeaderExtra));
@@ -3253,10 +3293,10 @@ function Yi(e, t = {}) {
3253
3293
  height: u - l,
3254
3294
  dividers: g
3255
3295
  };
3256
- }), ee = x, j = _ + n.padding, M = n.padding, N = 0;
3296
+ }), j = x, ee = _ + n.padding, M = n.padding, N = 0;
3257
3297
  for (let e of f) M = Math.min(M, e.x - e.width / 2), N = Math.max(N, e.x + e.width / 2);
3258
3298
  for (let e of A) M = Math.min(M, e.x), N = Math.max(N, e.x + e.width);
3259
- for (let e of ee) M = Math.min(M, e.x), N = Math.max(N, e.x + e.width);
3299
+ for (let e of j) M = Math.min(M, e.x), N = Math.max(N, e.x + e.width);
3260
3300
  for (let e of p) M = Math.min(M, e.x), N = Math.max(N, e.x + e.width);
3261
3301
  for (let e of v) if (e.isSelf && e.label) {
3262
3302
  let t = e.x1 + 30 + 8, n = F(e.label, r.edgeLabel, L.edgeLabel);
@@ -3268,7 +3308,7 @@ function Yi(e, t = {}) {
3268
3308
  for (let e of v) e.x1 += P, e.x2 += P;
3269
3309
  for (let e of w) e.x += P;
3270
3310
  for (let e of A) e.x += P;
3271
- for (let e of ee) e.x += P;
3311
+ for (let e of j) e.x += P;
3272
3312
  for (let e of p) e.x += P;
3273
3313
  for (let e = 0; e < a.length; e++) a[e] += P;
3274
3314
  }
@@ -3280,45 +3320,45 @@ function Yi(e, t = {}) {
3280
3320
  let r = e.destroyedAt, i = {
3281
3321
  actorId: e.id,
3282
3322
  x: a[t],
3283
- topY: f[t].y + n.actorHeight + (m[t] > 0 ? m[t] + Ki : 0),
3284
- bottomY: r === void 0 ? j - n.padding : v[r]?.y ?? _
3323
+ topY: f[t].y + n.actorHeight + (m[t] > 0 ? m[t] + Zi : 0),
3324
+ bottomY: r === void 0 ? ee - n.padding : v[r]?.y ?? _
3285
3325
  };
3286
3326
  return r !== void 0 && (i.destroyed = !0), i;
3287
3327
  });
3288
- for (let e of p) e.height = j - n.padding + n.boxPad - e.y;
3328
+ for (let e of p) e.height = ee - n.padding + n.boxPad - e.y;
3289
3329
  let ne = N + P + n.padding;
3290
3330
  return {
3291
3331
  width: Math.max(ne, 200),
3292
- height: Math.max(j, 100),
3332
+ height: Math.max(ee, 100),
3293
3333
  actors: f,
3294
3334
  lifelines: te,
3295
3335
  messages: v,
3296
3336
  activations: w,
3297
3337
  blocks: A,
3298
- notes: ee,
3338
+ notes: j,
3299
3339
  boxes: p
3300
3340
  };
3301
3341
  }
3302
3342
  //#endregion
3303
3343
  //#region packages/svg-renderer/src/sequence/renderer.ts
3304
- function Xi(e, n, r = "Inter", i = !1, a = I, o, s, c, l = {}) {
3344
+ function ta(e, n, r = "Inter", i = !1, a = I, o, s, c, l = {}) {
3305
3345
  let u = [];
3306
- u.push(Br(x(e.width, e.height, n, i, s, c, void 0, l.styleAttribute), o)), u.push(t(r, !1, l.nonce)), u.push("<defs>"), u.push(Zi()), u.push("</defs>");
3307
- for (let t of e.boxes) u.push(ha(t, a));
3308
- for (let t of e.blocks) u.push(ga(t, a));
3309
- let d = sa(e, a);
3310
- for (let t of e.lifelines) u.push(la(t, d));
3311
- for (let t of e.activations) u.push(da(t));
3312
- for (let t of e.messages) u.push(fa(t, a));
3313
- for (let t of e.notes) u.push(_a(t, a));
3314
- for (let t of e.actors) u.push(Qi(t, a));
3346
+ u.push(Gr(x(e.width, e.height, n, i, s, c, void 0, l.styleAttribute), o)), u.push(t(r, !1, l.nonce)), u.push("<defs>"), u.push(na()), u.push("</defs>");
3347
+ for (let t of e.boxes) u.push(ba(t, a));
3348
+ for (let t of e.blocks) u.push(xa(t, a));
3349
+ let d = fa(e, a);
3350
+ for (let t of e.lifelines) u.push(ma(t, d));
3351
+ for (let t of e.activations) u.push(ga(t));
3352
+ for (let t of e.messages) u.push(_a(t, a));
3353
+ for (let t of e.notes) u.push(Sa(t, a));
3354
+ for (let t of e.actors) u.push(ra(t, a));
3315
3355
  return u.push("</svg>"), u.join("\n");
3316
3356
  }
3317
- function Zi() {
3318
- let e = Oe.width, t = Oe.height;
3357
+ function na() {
3358
+ let e = Ne.width, t = Ne.height;
3319
3359
  return a` <marker id="seq-arrow" markerWidth="${e}" markerHeight="${t}" refX="${e}" refY="${t / 2}" orient="auto-start-reverse">` + a`\n <polygon points="0 0, ${e} ${t / 2}, 0 ${t}" fill="var(--_arrow)" />` + "\n </marker>" + a`\n <marker id="seq-arrow-open" markerWidth="${e}" markerHeight="${t}" refX="${e}" refY="${t / 2}" orient="auto-start-reverse">` + a`\n <polyline points="0 0, ${e} ${t / 2}, 0 ${t}" fill="none" stroke="var(--_arrow)" stroke-width="1" />` + "\n </marker>";
3320
3360
  }
3321
- function Qi(e, t) {
3361
+ function ra(e, t) {
3322
3362
  let { id: n, x: i, y: o, width: s, height: c, label: l, type: u } = e, d = [];
3323
3363
  if (d.push(a`<g class="actor" data-id="${r(n)}" data-label="${r(l)}" data-type="${u}">`), u === "actor") {
3324
3364
  let e = c / 24 * .9, n = i - 12 * e, r = o + (c - 24 * e) / 2, s = R.outerBox / e, u = "var(--_line)";
@@ -3329,8 +3369,8 @@ function Qi(e, t) {
3329
3369
  }
3330
3370
  return d.push("</g>"), d.join("\n");
3331
3371
  }
3332
- var $i = 30, ea = 20, ta = 8, na = 10, ra = 18, ia = 3, aa = 2, oa = 3;
3333
- function sa(e, t) {
3372
+ var ia = 30, aa = 20, oa = 8, sa = 10, ca = 18, la = 3, ua = 2, da = 3;
3373
+ function fa(e, t) {
3334
3374
  let n = [], r = (e) => l(e, t.edgeLabel, L.edgeLabel), i = (e, t, i) => {
3335
3375
  let a = r(e);
3336
3376
  n.push({
@@ -3348,64 +3388,64 @@ function sa(e, t) {
3348
3388
  y1: i + a.height / 2
3349
3389
  });
3350
3390
  };
3351
- for (let t of e.messages) t.label && (t.isSelf ? a(t.label, t.x1 + $i + ta, t.y + ea / 2) : i(t.label, (t.x1 + t.x2) / 2, t.y - na));
3391
+ for (let t of e.messages) t.label && (t.isSelf ? a(t.label, t.x1 + ia + oa, t.y + aa / 2) : i(t.label, (t.x1 + t.x2) / 2, t.y - sa));
3352
3392
  for (let r of e.blocks) {
3353
3393
  let e = F(`${r.type}${r.label ? ` [${r.label}]` : ""}`.split("\n")[0] ?? "", t.edgeLabel, L.groupHeader) + 16;
3354
3394
  n.push({
3355
3395
  x0: r.x,
3356
3396
  x1: r.x + e,
3357
3397
  y0: r.y,
3358
- y1: r.y + ra
3398
+ y1: r.y + ca
3359
3399
  });
3360
3400
  for (let e of r.dividers) e.label && a(`[${e.label}]`, r.x + 8, e.y + 14);
3361
3401
  }
3362
3402
  return n;
3363
3403
  }
3364
- function ca(e, t) {
3365
- let n = t.filter((t) => e.x > t.x0 - ia && e.x < t.x1 + ia && t.y1 + aa > e.topY && t.y0 - aa < e.bottomY).map((e) => [e.y0 - aa, e.y1 + aa]).sort((e, t) => e[0] - t[0]), r = [], i = e.topY;
3366
- for (let [e, t] of n) e - i >= oa && r.push([i, e]), i = Math.max(i, t);
3367
- return e.bottomY - i >= oa && r.push([i, e.bottomY]), r.length > 0 ? r : [[e.topY, e.bottomY]];
3404
+ function pa(e, t) {
3405
+ let n = t.filter((t) => e.x > t.x0 - la && e.x < t.x1 + la && t.y1 + ua > e.topY && t.y0 - ua < e.bottomY).map((e) => [e.y0 - ua, e.y1 + ua]).sort((e, t) => e[0] - t[0]), r = [], i = e.topY;
3406
+ for (let [e, t] of n) e - i >= da && r.push([i, e]), i = Math.max(i, t);
3407
+ return e.bottomY - i >= da && r.push([i, e.bottomY]), r.length > 0 ? r : [[e.topY, e.bottomY]];
3368
3408
  }
3369
- function la(e, t) {
3370
- let n = ca(e, t).map(([t, n]) => a`<line class="lifeline" data-actor="${r(e.actorId)}" ` + a`x1="${e.x}" y1="${t}" x2="${e.x}" y2="${n}" ` + "stroke=\"var(--_line)\" stroke-width=\"0.75\" stroke-dasharray=\"6 4\" />").join("\n");
3409
+ function ma(e, t) {
3410
+ let n = pa(e, t).map(([t, n]) => a`<line class="lifeline" data-actor="${r(e.actorId)}" ` + a`x1="${e.x}" y1="${t}" x2="${e.x}" y2="${n}" ` + "stroke=\"var(--_line)\" stroke-width=\"0.75\" stroke-dasharray=\"6 4\" />").join("\n");
3371
3411
  if (!e.destroyed) return n;
3372
- let { x: i, bottomY: o } = e, s = ua;
3412
+ let { x: i, bottomY: o } = e, s = ha;
3373
3413
  return n + a`\n<path class="destroy" data-actor="${r(e.actorId)}" ` + a`d="M${i - s} ${o - s} L${i + s} ${o + s} M${i + s} ${o - s} L${i - s} ${o + s}" ` + a`fill="none" stroke="var(--_line)" stroke-width="${R.outerBox}" stroke-linecap="round" />`;
3374
3414
  }
3375
- var ua = 8;
3376
- function da(e) {
3415
+ var ha = 8;
3416
+ function ga(e) {
3377
3417
  return a`<rect class="activation" data-actor="${r(e.actorId)}" ` + a`x="${e.x}" y="${e.topY}" width="${e.width}" height="${e.bottomY - e.topY}" ` + a`fill="var(--_node-fill)" stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />`;
3378
3418
  }
3379
- function fa(e, t) {
3419
+ function _a(e, t) {
3380
3420
  let n = [], i = e.lineStyle === "dashed" ? " stroke-dasharray=\"6 4\"" : "", o = e.arrowHead === "filled" ? "seq-arrow" : "seq-arrow-open", s = e.bidirectional ? a` marker-start="url(#${o})"` : "";
3381
3421
  if (n.push(a`<g class="message" data-from="${r(e.from)}" data-to="${r(e.to)}" ` + a`data-label="${r(e.label)}" data-line-style="${e.lineStyle}" ` + a`data-arrow-head="${e.arrowHead}" data-self="${e.isSelf}" data-bidirectional="${e.bidirectional}">`), e.isSelf) {
3382
- let r = $i, c = ea, l = ta;
3422
+ let r = ia, c = aa, l = oa;
3383
3423
  n.push(a` <polyline points="${e.x1},${e.y} ${e.x1 + r},${e.y} ${e.x1 + r},${e.y + c} ${e.x2},${e.y + c}" ` + a`fill="none" stroke="var(--_line)" stroke-width="${R.connector}"${i} marker-end="url(#${o})"${s} />`), n.push(" " + p(e.label, e.x1 + r + l, e.y + c / 2, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="start" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
3384
3424
  } else {
3385
3425
  n.push(a` <line x1="${e.x1}" y1="${e.y}" x2="${e.x2}" y2="${e.y}" ` + a`stroke="var(--_line)" stroke-width="${R.connector}"${i} marker-end="url(#${o})"${s} />`);
3386
3426
  let r = (e.x1 + e.x2) / 2;
3387
- n.push(" " + p(e.label, r, e.y - na, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
3427
+ n.push(" " + p(e.label, r, e.y - sa, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
3388
3428
  }
3389
- return e.seqNumber !== void 0 && n.push(" " + pa(e, t)), n.push("</g>"), n.join("\n");
3429
+ return e.seqNumber !== void 0 && n.push(" " + va(e, t)), n.push("</g>"), n.join("\n");
3390
3430
  }
3391
- function pa(e, t) {
3392
- let n = Math.max(t.edgeLabel - 2, 8), r = e.bidirectional ? e.x1 + Math.sign(e.x2 - e.x1) * (8 + Oe.width) : e.x1;
3431
+ function va(e, t) {
3432
+ let n = Math.max(t.edgeLabel - 2, 8), r = e.bidirectional ? e.x1 + Math.sign(e.x2 - e.x1) * (8 + Ne.width) : e.x1;
3393
3433
  return "<g class=\"seq-number\">" + a`<circle cx="${r}" cy="${e.y}" r="${8}" fill="var(--bg)" stroke="var(--_arrow)" stroke-width="${R.innerBox}" />` + p(String(e.seqNumber), r, e.y, n, a`font-size="${n}" text-anchor="middle" font-weight="${L.edgeLabel}" fill="var(--_arrow)"`) + "</g>";
3394
3434
  }
3395
- var ma = 35;
3396
- function ha(e, t) {
3397
- let n = e.label ? a` data-label="${r(e.label)}"` : "", i = e.color === void 0 ? "" : a` data-color="${r(e.color)}"`, o = e.color === void 0 ? "none" : a`color-mix(in srgb, ${r(e.color)} ${ma}%, var(--bg))`, s = [a`<g class="participant-box"${n}${i}>`, a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="4" ry="4" ` + a`fill="${o}" stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />`];
3398
- return e.label && s.push(" " + p(e.label, e.x + e.width / 2, e.y + Wi(t.edgeLabel) / 2, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.groupHeader}" fill="var(--_text-sec)"`)), s.push("</g>"), s.join("\n");
3435
+ var ya = 35;
3436
+ function ba(e, t) {
3437
+ let n = e.label ? a` data-label="${r(e.label)}"` : "", i = e.color === void 0 ? "" : a` data-color="${r(e.color)}"`, o = e.color === void 0 ? "none" : a`color-mix(in srgb, ${r(e.color)} ${ya}%, var(--bg))`, s = [a`<g class="participant-box"${n}${i}>`, a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="4" ry="4" ` + a`fill="${o}" stroke="var(--_node-stroke)" stroke-width="${R.innerBox}" />`];
3438
+ return e.label && s.push(" " + p(e.label, e.x + e.width / 2, e.y + Yi(t.edgeLabel) / 2, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="middle" font-weight="${L.groupHeader}" fill="var(--_text-sec)"`)), s.push("</g>"), s.join("\n");
3399
3439
  }
3400
- function ga(e, t) {
3440
+ function xa(e, t) {
3401
3441
  let n = [], i = e.label ? a` data-label="${r(e.label)}"` : "";
3402
3442
  n.push(a`<g class="block" data-type="${r(e.type)}"${i}>`), n.push(a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" ` + a`rx="0" ry="0" fill="none" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`);
3403
- let o = a`${e.type}${e.label ? a` [${e.label}]` : ""}`, s = o.split("\n")[0], c = F(s, t.edgeLabel, L.groupHeader) + 16, l = ra;
3443
+ let o = a`${e.type}${e.label ? a` [${e.label}]` : ""}`, s = o.split("\n")[0], c = F(s, t.edgeLabel, L.groupHeader) + 16, l = ca;
3404
3444
  n.push(a` <rect x="${e.x}" y="${e.y}" width="${c}" height="${l}" ` + a`fill="var(--_group-hdr)" stroke="var(--_node-stroke)" stroke-width="${R.outerBox}" />`), n.push(" " + p(o, e.x + 6, e.y + l / 2, t.edgeLabel, a`font-size="${t.edgeLabel}" font-weight="${L.groupHeader}" fill="var(--_text-sec)"`));
3405
3445
  for (let r of e.dividers) n.push(a` <line x1="${e.x}" y1="${r.y}" x2="${e.x + e.width}" y2="${r.y}" ` + "stroke=\"var(--_line)\" stroke-width=\"0.75\" stroke-dasharray=\"6 4\" />"), r.label && n.push(" " + p(a`[${r.label}]`, e.x + 8, r.y + 14, t.edgeLabel, a`font-size="${t.edgeLabel}" text-anchor="start" font-weight="${L.edgeLabel}" fill="var(--_text-muted)"`));
3406
3446
  return n.push("</g>"), n.join("\n");
3407
3447
  }
3408
- function _a(e, t) {
3448
+ function Sa(e, t) {
3409
3449
  let { x: n, y: i, width: o, height: s } = e, c = e.actors && e.actors.length > 0 ? a` data-actors="${e.actors.map(r).join(",")}"` : "", l = e.position ? a` data-position="${r(e.position)}"` : "", u = [
3410
3450
  a`${n},${i}`,
3411
3451
  a`${n + o - 6},${i}`,
@@ -3444,23 +3484,23 @@ var G = {
3444
3484
  legendGap: 6,
3445
3485
  legendItemGap: 16
3446
3486
  };
3447
- function va(e, t = {}) {
3448
- return e.horizontal ? ba(e) : ya(e);
3487
+ function Ca(e, t = {}) {
3488
+ return e.horizontal ? Ta(e) : wa(e);
3449
3489
  }
3450
- function ya(e) {
3490
+ function wa(e) {
3451
3491
  let t = !!e.title, n = !!e.xAxis.title, r = !!e.yAxis.title, i = e.series.length > 1, a = e.yAxis.range;
3452
3492
  if (!a)
3453
3493
  /* v8 ignore next */
3454
3494
  throw Error("XY chart: y-axis range was not set by the parser");
3455
- let o = Oa(a.min, a.max), s = ka(o), c = Math.max(...s.map((e) => F(e, G.axisLabelFontSize, G.axisLabelFontWeight)), G.yLabelWidth), l = G.padding + (t ? G.titleHeight : 0) + (i ? G.legendHeight : 0), u = G.padding + G.xLabelHeight + (n ? G.axisTitlePad : 0), d = G.padding + c + G.yLabelGap + (r ? G.axisTitlePad : 0), f = G.padding, p = G.plotWidth, m = G.plotHeight, h = d + p + f, g = l + m + u, _ = {
3495
+ let o = Na(a.min, a.max), s = Pa(o), c = Math.max(...s.map((e) => F(e, G.axisLabelFontSize, G.axisLabelFontWeight)), G.yLabelWidth), l = G.padding + (t ? G.titleHeight : 0) + (i ? G.legendHeight : 0), u = G.padding + G.xLabelHeight + (n ? G.axisTitlePad : 0), d = G.padding + c + G.yLabelGap + (r ? G.axisTitlePad : 0), f = G.padding, p = G.plotWidth, m = G.plotHeight, h = d + p + f, g = l + m + u, _ = {
3456
3496
  x: d,
3457
3497
  y: l,
3458
3498
  width: p,
3459
3499
  height: m
3460
- }, v = xa(e), y = (e) => d + (e + .5) * (p / v), b = p / v, x = (e) => {
3500
+ }, v = Ea(e), y = (e) => d + (e + .5) * (p / v), b = p / v, x = (e) => {
3461
3501
  let t = (e - a.min) / (a.max - a.min || 1);
3462
3502
  return l + m - t * m;
3463
- }, S = Ta(e, y, l + m, b), C = o.map((e, t) => ({
3503
+ }, S = Aa(e, y, l + m, b), C = o.map((e, t) => ({
3464
3504
  label: s[t],
3465
3505
  x: d,
3466
3506
  y: x(e),
@@ -3474,19 +3514,19 @@ function ya(e) {
3474
3514
  y1: x(e),
3475
3515
  x2: d + p,
3476
3516
  y2: x(e)
3477
- })), T = Sa(e, v), E = e.series.map((e, t) => t), D = Ea(e, y, x, b, a.min, T, E), O = Da(e, y, x, T, E), k = G.padding + (t ? G.titleHeight : 0) + G.legendHeight / 2, A = i ? ja(e, h / 2, k, E) : [], ee = {
3517
+ })), T = Da(e, v), E = e.series.map((e, t) => t), D = ja(e, y, x, b, a.min, T, E), O = Ma(e, y, x, T, E), k = G.padding + (t ? G.titleHeight : 0) + G.legendHeight / 2, A = i ? Ia(e, h / 2, k, E) : [], j = {
3478
3518
  x1: d,
3479
3519
  y1: l + m,
3480
3520
  x2: d + p,
3481
3521
  y2: l + m
3482
- }, j = {
3522
+ }, ee = {
3483
3523
  x1: d,
3484
3524
  y1: l,
3485
3525
  x2: d,
3486
3526
  y2: l + m
3487
3527
  }, M = {
3488
3528
  ticks: S,
3489
- line: ee,
3529
+ line: j,
3490
3530
  ...e.xAxis.title ? { title: {
3491
3531
  text: e.xAxis.title,
3492
3532
  x: d + p / 2,
@@ -3494,7 +3534,7 @@ function ya(e) {
3494
3534
  } } : {}
3495
3535
  }, N = {
3496
3536
  ticks: C,
3497
- line: j,
3537
+ line: ee,
3498
3538
  ...e.yAxis.title ? { title: {
3499
3539
  text: e.yAxis.title,
3500
3540
  x: G.padding + 4,
@@ -3519,12 +3559,12 @@ function ya(e) {
3519
3559
  legend: A
3520
3560
  };
3521
3561
  }
3522
- function ba(e) {
3562
+ function Ta(e) {
3523
3563
  let t = !!e.title, n = !!e.xAxis.title, r = !!e.yAxis.title, i = e.series.length > 1, a = e.yAxis.range;
3524
3564
  if (!a)
3525
3565
  /* v8 ignore next */
3526
3566
  throw Error("XY chart: y-axis range was not set by the parser");
3527
- let o = Oa(a.min, a.max), s = ka(o), c = xa(e), l = Sa(e, c), u = Math.max(...l.map((e) => F(e, G.axisLabelFontSize, G.axisLabelFontWeight)), 40), d = G.padding + (t ? G.titleHeight : 0) + (i ? G.legendHeight : 0), f = G.padding + G.xLabelHeight + (r ? G.axisTitlePad : 0), p = G.padding + u + G.yLabelGap + (n ? G.axisTitlePad : 0), m = G.padding, h = G.plotWidth, g = G.plotHeight, _ = p + h + m, v = d + g + f, y = {
3567
+ let o = Na(a.min, a.max), s = Pa(o), c = Ea(e), l = Da(e, c), u = Math.max(...l.map((e) => F(e, G.axisLabelFontSize, G.axisLabelFontWeight)), 40), d = G.padding + (t ? G.titleHeight : 0) + (i ? G.legendHeight : 0), f = G.padding + G.xLabelHeight + (r ? G.axisTitlePad : 0), p = G.padding + u + G.yLabelGap + (n ? G.axisTitlePad : 0), m = G.padding, h = G.plotWidth, g = G.plotHeight, _ = p + h + m, v = d + g + f, y = {
3528
3568
  x: p,
3529
3569
  y: d,
3530
3570
  width: h,
@@ -3579,10 +3619,10 @@ function ba(e) {
3579
3619
  o++, s++;
3580
3620
  }
3581
3621
  }
3582
- let k = [], A = 0, ee = 0;
3622
+ let k = [], A = 0, j = 0;
3583
3623
  for (let t of e.series) {
3584
3624
  if (t.type !== "line") {
3585
- ee++;
3625
+ j++;
3586
3626
  continue;
3587
3627
  }
3588
3628
  let e = t.data.map((e, t) => ({
@@ -3594,10 +3634,10 @@ function ba(e) {
3594
3634
  k.push({
3595
3635
  points: e,
3596
3636
  seriesIndex: A,
3597
- colorIndex: E[ee]
3598
- }), A++, ee++;
3637
+ colorIndex: E[j]
3638
+ }), A++, j++;
3599
3639
  }
3600
- let j = {
3640
+ let ee = {
3601
3641
  x1: p,
3602
3642
  y1: d + g,
3603
3643
  x2: p + h,
@@ -3609,7 +3649,7 @@ function ba(e) {
3609
3649
  y2: d + g
3610
3650
  }, N = {
3611
3651
  ticks: C,
3612
- line: j,
3652
+ line: ee,
3613
3653
  ...e.yAxis.title ? { title: {
3614
3654
  text: e.yAxis.title,
3615
3655
  x: p + h / 2,
@@ -3640,28 +3680,28 @@ function ba(e) {
3640
3680
  bars: O,
3641
3681
  lines: k,
3642
3682
  gridLines: T,
3643
- legend: i ? ja(e, _ / 2, ne, E) : []
3683
+ legend: i ? Ia(e, _ / 2, ne, E) : []
3644
3684
  };
3645
3685
  }
3646
- function xa(e) {
3686
+ function Ea(e) {
3647
3687
  if (e.xAxis.categories) return e.xAxis.categories.length;
3648
3688
  for (let t of e.series) if (t.data.length > 0) return t.data.length;
3649
3689
  return 1;
3650
3690
  }
3651
- function Sa(e, t) {
3691
+ function Da(e, t) {
3652
3692
  if (e.xAxis.categories) return e.xAxis.categories;
3653
3693
  if (e.xAxis.range) {
3654
3694
  let { min: n, max: r } = e.xAxis.range, i = t > 1 ? (r - n) / (t - 1) : 0;
3655
- return Array.from({ length: t }, (e, t) => Aa(n + i * t));
3695
+ return Array.from({ length: t }, (e, t) => Fa(n + i * t));
3656
3696
  }
3657
3697
  return Array.from({ length: t }, (e, t) => String(t + 1));
3658
3698
  }
3659
- var Ca = 8;
3660
- function wa(e, t) {
3699
+ var Oa = 8;
3700
+ function ka(e, t) {
3661
3701
  let n = e.map((e) => F(e, G.axisLabelFontSize, G.axisLabelFontWeight));
3662
3702
  for (let r = 1; r < e.length; r++) {
3663
3703
  let i = !0;
3664
- for (let a = 0; a + r < e.length; a += r) if (r * t - (n[a] + n[a + r]) / 2 < Ca) {
3704
+ for (let a = 0; a + r < e.length; a += r) if (r * t - (n[a] + n[a + r]) / 2 < Oa) {
3665
3705
  i = !1;
3666
3706
  break;
3667
3707
  }
@@ -3669,8 +3709,8 @@ function wa(e, t) {
3669
3709
  }
3670
3710
  return Math.max(1, e.length);
3671
3711
  }
3672
- function Ta(e, t, n, r) {
3673
- let i = Sa(e, xa(e)), a = wa(i, r);
3712
+ function Aa(e, t, n, r) {
3713
+ let i = Da(e, Ea(e)), a = ka(i, r);
3674
3714
  return i.map((e, r) => ({
3675
3715
  label: r % a === 0 ? e : "",
3676
3716
  x: t(r),
@@ -3682,7 +3722,7 @@ function Ta(e, t, n, r) {
3682
3722
  textAnchor: "middle"
3683
3723
  }));
3684
3724
  }
3685
- function Ea(e, t, n, r, i, a, o) {
3725
+ function ja(e, t, n, r, i, a, o) {
3686
3726
  let s = e.series.filter((e) => e.type === "bar").length;
3687
3727
  if (s === 0) return [];
3688
3728
  let c = r * (1 - G.barPadRatio), l = s > 1 ? (c - (s - 1) * G.barGroupGap) / s : c, u = Math.min(l, G.maxBarWidth), d = s > 1 ? u * s + G.barGroupGap * (s - 1) : u, f = [], p = 0, m = 0;
@@ -3708,7 +3748,7 @@ function Ea(e, t, n, r, i, a, o) {
3708
3748
  }
3709
3749
  return f;
3710
3750
  }
3711
- function Da(e, t, n, r, i) {
3751
+ function Ma(e, t, n, r, i) {
3712
3752
  let a = [], o = 0, s = 0;
3713
3753
  for (let c of e.series) {
3714
3754
  if (c.type !== "line") {
@@ -3729,7 +3769,7 @@ function Da(e, t, n, r, i) {
3729
3769
  }
3730
3770
  return a;
3731
3771
  }
3732
- function Oa(e, t) {
3772
+ function Na(e, t) {
3733
3773
  let n = t - e;
3734
3774
  if (n <= 0) return [e];
3735
3775
  let r = n / 6, i = 10 ** Math.floor(Math.log10(r)), a = r / i, o;
@@ -3738,14 +3778,14 @@ function Oa(e, t) {
3738
3778
  for (let e = s; e <= t + o * .001; e += o) c.push(Math.round(e * 1e10) / 1e10);
3739
3779
  return c;
3740
3780
  }
3741
- function ka(e) {
3781
+ function Pa(e) {
3742
3782
  let t = e.length > 1 ? Math.abs(e[1] - e[0]) : 0, n = t > 0 && t < 1 ? Math.ceil(-Math.log10(t) - 1e-9) : 0;
3743
3783
  return e.map((e) => String(Number.isInteger(e) && n === 0 ? e : Number(e.toFixed(n))));
3744
3784
  }
3745
- function Aa(e) {
3785
+ function Fa(e) {
3746
3786
  return Number.isInteger(e) ? String(e) : e.toFixed(+(Math.abs(e) < 10));
3747
3787
  }
3748
- function ja(e, t, n, r) {
3788
+ function Ia(e, t, n, r) {
3749
3789
  let i = [], a = 0, o = 0;
3750
3790
  for (let t = 0; t < e.series.length; t++) {
3751
3791
  let s = e.series[t], c = s.type === "bar" ? `Bar ${a + 1}` : `Line ${o + 1}`;
@@ -3789,24 +3829,24 @@ var K = {
3789
3829
  minY: 4,
3790
3830
  pointerSize: 6
3791
3831
  };
3792
- function Ma(e, n, r = "Inter", i = !1, a = !1, o, s, c, l = {}) {
3793
- let u = [], d = Math.max(0, ...e.bars.map((e) => e.colorIndex), ...e.lines.map((e) => e.colorIndex)), f = Br(x(e.width, e.height, n, i, s, c, void 0, l.styleAttribute).replace("<svg ", `<svg data-xychart-colors="${d}" `), o);
3832
+ function La(e, n, r = "Inter", i = !1, a = !1, o, s, c, l = {}) {
3833
+ let u = [], d = Math.max(0, ...e.bars.map((e) => e.colorIndex), ...e.lines.map((e) => e.colorIndex)), f = Gr(x(e.width, e.height, n, i, s, c, void 0, l.styleAttribute).replace("<svg ", `<svg data-xychart-colors="${d}" `), o);
3794
3834
  u.push(f), u.push(t(r, !1, l.nonce));
3795
- let p = Math.max(...e.lines.map((e) => e.points.length), 0), m = p > 0 && p <= 12, { style: h, defs: g } = Na(e, a, m, n.accent, n.bg, l.nonce);
3835
+ let p = Math.max(...e.lines.map((e) => e.points.length), 0), m = p > 0 && p <= 12, { style: h, defs: g } = Ra(e, a, m, n.accent, n.bg, l.nonce);
3796
3836
  u.push(h), g && u.push(g);
3797
3837
  let { plotArea: _ } = e, v = e.xAxis.ticks.map((e) => e.x), y = e.horizontal ? e.yAxis.ticks.map((e) => e.y) : e.gridLines.map((e) => e.y1), b = v.length > 1 ? Math.abs(v[1] - v[0]) : _.width / 6, S = y.length > 1 ? Math.abs(y[1] - y[0]) : _.height / 6, C = b / Math.max(1, Math.round(b / 20)), w = S / Math.max(1, Math.round(S / 20)), T = v[0] ?? _.x, E = y[0] ?? _.y, D = T - Math.ceil((T - _.x) / C) * C, O = E - Math.ceil((E - _.y) / w) * w;
3798
3838
  for (let e = O; e <= _.y + _.height + .5; e += w) for (let t = D; t <= _.x + _.width + .5; t += C) u.push(`<circle cx="${J(t)}" cy="${J(e)}" r="1.5" class="xychart-grid"/>`);
3799
3839
  let k = [];
3800
3840
  for (let t of e.bars) {
3801
- let n = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`, r = e.horizontal ? Fa(t.x, t.y, t.width, t.height, K.barRadius) : Pa(t.x, t.y, t.width, t.height, K.barRadius);
3841
+ let n = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`, r = e.horizontal ? Ba(t.x, t.y, t.width, t.height, K.barRadius) : za(t.x, t.y, t.width, t.height, K.barRadius);
3802
3842
  if (u.push(`<path d="${r}" class="xychart-bar xychart-color-${t.colorIndex}"${n}/>`), a) {
3803
- let e = za(t.value), n = t.label ? `${t.label}: ${e}` : e, r = Ra(t.x + t.width / 2, t.y, e);
3843
+ let e = Wa(t.value), n = t.label ? `${t.label}: ${e}` : e, r = Ua(t.x + t.width / 2, t.y, e);
3804
3844
  k.push(`<g class="xychart-bar-group"><rect x="${J(t.x)}" y="${J(t.y)}" width="${J(t.width)}" height="${J(t.height)}" fill="transparent"/><title>${Y(n)}</title>` + r + "</g>");
3805
3845
  }
3806
3846
  }
3807
3847
  for (let t of e.lines) {
3808
3848
  if (t.points.length === 0) continue;
3809
- let e = Ia(t.points);
3849
+ let e = Va(t.points);
3810
3850
  u.push(`<path d="${e}" class="xychart-line-shadow xychart-color-${t.colorIndex}" transform="translate(0,2)"/>`), u.push(`<path d="${e}" class="xychart-line xychart-color-${t.colorIndex}"/>`);
3811
3851
  }
3812
3852
  let A = [];
@@ -3829,16 +3869,16 @@ function Ma(e, n, r = "Inter", i = !1, a = !1, o, s, c, l = {}) {
3829
3869
  let n = e[0].x, r = e[0].label || "";
3830
3870
  if (a && e.length > 1) {
3831
3871
  let i = Math.min(...e.map((e) => e.y)), a = Math.max(...e.map((e) => e.y)), o = K.dotRadius * 3, s = `<rect x="${J(n - o)}" y="${J(i - o)}" width="${J(o * 2)}" height="${J(a - i + o * 2)}" fill="transparent" class="xychart-hit"/>`, c = e.map((e) => ({
3832
- text: za(e.value),
3872
+ text: Wa(e.value),
3833
3873
  legendLabel: t.get(e.seriesIndex) || `Line ${e.seriesIndex + 1}`
3834
- })), l = La(n, i - K.dotRadius, r, c), u = c.map((e) => e.text), d = r ? `${r}: ${u.join(" · ")}` : u.join(" · "), f = `<g class="xychart-dot-group">${s}`;
3874
+ })), l = Ha(n, i - K.dotRadius, r, c), u = c.map((e) => e.text), d = r ? `${r}: ${u.join(" · ")}` : u.join(" · "), f = `<g class="xychart-dot-group">${s}`;
3835
3875
  for (let t of e) {
3836
3876
  let e = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`;
3837
3877
  f += `<circle cx="${J(t.x)}" cy="${J(t.y)}" r="${K.dotRadius}" class="xychart-dot xychart-color-${t.colorIndex}"${e}/>`;
3838
3878
  }
3839
3879
  f += `<title>${Y(d)}</title>${l}</g>`, A.push(f);
3840
3880
  } else if (a) {
3841
- let t = e[0], r = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`, i = za(t.value), a = t.label ? `${t.label}: ${i}` : i, o = Ra(n, t.y - K.dotRadius, i), s = m ? `<circle cx="${J(n)}" cy="${J(t.y)}" r="${K.dotRadius * 3}" fill="transparent" class="xychart-hit"/>` : "";
3881
+ let t = e[0], r = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`, i = Wa(t.value), a = t.label ? `${t.label}: ${i}` : i, o = Ua(n, t.y - K.dotRadius, i), s = m ? `<circle cx="${J(n)}" cy="${J(t.y)}" r="${K.dotRadius * 3}" fill="transparent" class="xychart-hit"/>` : "";
3842
3882
  A.push(`<g class="xychart-dot-group">${s}<circle cx="${J(t.x)}" cy="${J(t.y)}" r="${K.dotRadius}" class="xychart-dot xychart-color-${t.colorIndex}"${r}/><title>${Y(a)}</title>${o}</g>`);
3843
3883
  } else for (let t of e) {
3844
3884
  let e = ` data-value="${t.value}"${t.label ? ` data-label="${Y(t.label)}"` : ""}`;
@@ -3869,13 +3909,13 @@ function Ma(e, n, r = "Inter", i = !1, a = !1, o, s, c, l = {}) {
3869
3909
  for (let e of A) u.push(e);
3870
3910
  return u.push("</svg>"), u.join("\n");
3871
3911
  }
3872
- function Na(e, t, n, r, i, a) {
3873
- let o = r ?? E, s = /* @__PURE__ */ new Set();
3912
+ function Ra(e, t, n, r, i, a) {
3913
+ let o = r ?? T, s = /* @__PURE__ */ new Set();
3874
3914
  for (let t of e.bars) s.add(t.colorIndex);
3875
3915
  for (let t of e.lines) s.add(t.colorIndex);
3876
3916
  let c = [];
3877
3917
  for (let e of [...s].sort((e, t) => e - t)) {
3878
- let t = e === 0 ? `var(--accent, ${E})` : j(e, o, i);
3918
+ let t = e === 0 ? `var(--accent, ${T})` : j(e, o, i);
3879
3919
  c.push(` --xychart-color-${e}: ${t};`), c.push(` --xychart-bar-fill-${e}: color-mix(in srgb, var(--bg) 75%, var(--xychart-color-${e}) 25%);`);
3880
3920
  }
3881
3921
  let l = [];
@@ -3905,7 +3945,7 @@ ${l.join("\n")}${u}
3905
3945
  defs: ""
3906
3946
  };
3907
3947
  }
3908
- function Pa(e, t, n, r, i) {
3948
+ function za(e, t, n, r, i) {
3909
3949
  let a = Math.min(i, n / 2, r / 2);
3910
3950
  return a <= 0 ? `M${J(e)},${J(t)} h${J(n)} v${J(r)} h${J(-n)} Z` : [
3911
3951
  `M${J(e)},${J(t + a)}`,
@@ -3919,7 +3959,7 @@ function Pa(e, t, n, r, i) {
3919
3959
  "Z"
3920
3960
  ].join(" ");
3921
3961
  }
3922
- function Fa(e, t, n, r, i) {
3962
+ function Ba(e, t, n, r, i) {
3923
3963
  let a = Math.min(i, n / 2, r / 2);
3924
3964
  return a <= 0 ? `M${J(e)},${J(t)} h${J(n)} v${J(r)} h${J(-n)} Z` : [
3925
3965
  `M${J(e + a)},${J(t)}`,
@@ -3934,7 +3974,7 @@ function Fa(e, t, n, r, i) {
3934
3974
  "Z"
3935
3975
  ].join(" ");
3936
3976
  }
3937
- function Ia(e) {
3977
+ function Va(e) {
3938
3978
  if (e.length === 0) return "";
3939
3979
  if (e.length === 1) return `M${J(e[0].x)},${J(e[0].y)}`;
3940
3980
  if (e.length === 2) return `M${J(e[0].x)},${J(e[0].y)} L${J(e[1].x)},${J(e[1].y)}`;
@@ -3959,7 +3999,7 @@ function Ia(e) {
3959
3999
  }
3960
4000
  return o;
3961
4001
  }
3962
- function La(e, t, n, r) {
4002
+ function Ha(e, t, n, r) {
3963
4003
  let i = F(n, q.fontSize, 600), a = Math.max(...r.map((e) => {
3964
4004
  let t = F(e.legendLabel, q.fontSize, q.fontWeight), n = F(e.text, q.fontSize, q.fontWeight);
3965
4005
  return t + 10 + n;
@@ -3971,11 +4011,11 @@ function La(e, t, n, r) {
3971
4011
  for (let e of r) h += 20, m += `<text x="${J(g)}" y="${J(h)}" text-anchor="start" font-size="${q.fontSize}" font-weight="${q.fontWeight}" dy="${z}" class="xychart-tip xychart-tip-text">${Y(e.legendLabel)}</text>`, m += `<text x="${J(_)}" y="${J(h)}" text-anchor="end" font-size="${q.fontSize}" font-weight="${q.fontWeight}" dy="${z}" class="xychart-tip xychart-tip-text">${Y(e.text)}</text>`;
3972
4012
  return m;
3973
4013
  }
3974
- function Ra(e, t, n) {
4014
+ function Ua(e, t, n) {
3975
4015
  let r = F(n, q.fontSize, q.fontWeight) + q.padX * 2, i = q.height, a = Math.max(q.minY, t - q.offsetY - i - q.pointerSize), o = e - r / 2, s = e, c = a + i / 2, l = e, u = a + i, d = q.pointerSize, f = `<polygon points="${J(l - d)},${J(u)} ${J(l + d)},${J(u)} ${J(l)},${J(u + d)}" class="xychart-tip xychart-tip-ptr"/>`;
3976
4016
  return `<rect x="${J(o)}" y="${J(a)}" width="${J(r)}" height="${i}" rx="${q.rx}" class="xychart-tip xychart-tip-bg"/>` + f + `<text x="${J(s)}" y="${J(c)}" text-anchor="middle" dy="${z}" class="xychart-tip xychart-tip-text">${Y(n)}</text>`;
3977
4017
  }
3978
- function za(e) {
4018
+ function Wa(e) {
3979
4019
  return Number.isInteger(e) ? e.toLocaleString("en-US") : e.toFixed(+(Math.abs(e) < 10));
3980
4020
  }
3981
4021
  function J(e) {
@@ -3999,40 +4039,40 @@ var X = {
3999
4039
  fontWeight: 400,
4000
4040
  paletteSize: 12,
4001
4041
  minPercent: 1
4002
- }, Ba = Math.PI * 2;
4042
+ }, Ga = Math.PI * 2;
4003
4043
  function Z(e) {
4004
4044
  return String(Math.round(e * 100) / 100);
4005
4045
  }
4006
- function Va(e, t, n, r) {
4046
+ function Ka(e, t, n, r) {
4007
4047
  return {
4008
4048
  x: e + n * Math.sin(r),
4009
4049
  y: t - n * Math.cos(r)
4010
4050
  };
4011
4051
  }
4012
- function Ha(e, t, n, r, i) {
4013
- if (i - r >= Ba - 1e-9) return `M${Z(e)},${Z(t - n)}A${Z(n)},${Z(n)},0,1,1,${Z(e)},${Z(t + n)}A${Z(n)},${Z(n)},0,1,1,${Z(e)},${Z(t - n)}Z`;
4014
- let a = Va(e, t, n, r), o = Va(e, t, n, i), s = +(i - r > Math.PI);
4052
+ function qa(e, t, n, r, i) {
4053
+ if (i - r >= Ga - 1e-9) return `M${Z(e)},${Z(t - n)}A${Z(n)},${Z(n)},0,1,1,${Z(e)},${Z(t + n)}A${Z(n)},${Z(n)},0,1,1,${Z(e)},${Z(t - n)}Z`;
4054
+ let a = Ka(e, t, n, r), o = Ka(e, t, n, i), s = +(i - r > Math.PI);
4015
4055
  return `M${Z(a.x)},${Z(a.y)}A${Z(n)},${Z(n)},0,${s},1,${Z(o.x)},${Z(o.y)}L${Z(e)},${Z(t)}Z`;
4016
4056
  }
4017
- function Ua(e, t, n) {
4057
+ function Ja(e, t, n) {
4018
4058
  return n ? `${e} [${String(t)}]` : e;
4019
4059
  }
4020
- function Wa(e, t = {}) {
4060
+ function Ya(e, t = {}) {
4021
4061
  let n = X.height, r = n, i = Math.min(r, n) / 2 - X.margin, a = r / 2, o = n / 2, s = e.slices.reduce((e, t) => e + t.value, 0), c = e.slices.map((e, t) => ({
4022
4062
  slice: e,
4023
4063
  colorIndex: t % X.paletteSize
4024
- })).filter(({ slice: e }) => e.value / s * 100 >= X.minPercent), l = c.reduce((e, t) => e + t.slice.value, 0), u = X.legendRectSize + X.legendSpacing, d = e.slices.length, f = u * d / 2, p = a + 12 * X.legendRectSize, m = e.slices.map((t) => Ua(t.label, t.value, e.showData)), h = Math.max(0, ...m.map((e) => F(e, X.legendFontSize, X.fontWeight))), g = d > 0 ? r + X.margin + X.legendRectSize + X.legendSpacing + h : r + X.margin, _ = e.title ?? "", v = _.length > 0 ? F(_, X.titleFontSize, X.fontWeight) : 0, y = a - v / 2, b = a + v / 2, x = Math.min(0, y), S = Math.max(g, b), C = o - f, w = o + (d - 1) * u - f + X.legendRectSize, T = d > 0 ? Math.min(0, C) : 0, E = d > 0 ? Math.max(n, w) : n, D = -x, O = -T, k = a + D, A = o + O, ee = [], j = 0, M = i * X.textPosition;
4064
+ })).filter(({ slice: e }) => e.value / s * 100 >= X.minPercent), l = c.reduce((e, t) => e + t.slice.value, 0), u = X.legendRectSize + X.legendSpacing, d = e.slices.length, f = u * d / 2, p = a + 12 * X.legendRectSize, m = e.slices.map((t) => Ja(t.label, t.value, e.showData)), h = Math.max(0, ...m.map((e) => F(e, X.legendFontSize, X.fontWeight))), g = d > 0 ? r + X.margin + X.legendRectSize + X.legendSpacing + h : r + X.margin, _ = e.title ?? "", v = _.length > 0 ? F(_, X.titleFontSize, X.fontWeight) : 0, y = a - v / 2, b = a + v / 2, x = Math.min(0, y), S = Math.max(g, b), C = o - f, w = o + (d - 1) * u - f + X.legendRectSize, T = d > 0 ? Math.min(0, C) : 0, E = d > 0 ? Math.max(n, w) : n, D = -x, O = -T, k = a + D, A = o + O, j = [], ee = 0, M = i * X.textPosition;
4025
4065
  for (let { slice: e, colorIndex: t } of c) {
4026
- let n = j, r = j + e.value / l * Ba;
4027
- j = r;
4028
- let a = Va(k, A, M, (n + r) / 2);
4029
- ee.push({
4066
+ let n = ee, r = ee + e.value / l * Ga;
4067
+ ee = r;
4068
+ let a = Ka(k, A, M, (n + r) / 2);
4069
+ j.push({
4030
4070
  label: e.label,
4031
4071
  value: e.value,
4032
4072
  colorIndex: t,
4033
4073
  startAngle: n,
4034
4074
  endAngle: r,
4035
- path: Ha(k, A, i, n, r),
4075
+ path: qa(k, A, i, n, r),
4036
4076
  percentText: `${(e.value / s * 100).toFixed(0)}%`,
4037
4077
  labelX: a.x,
4038
4078
  labelY: a.y
@@ -4062,7 +4102,7 @@ function Wa(e, t = {}) {
4062
4102
  x: k,
4063
4103
  y: A - (n - 50) / 2
4064
4104
  } : void 0,
4065
- slices: ee,
4105
+ slices: j,
4066
4106
  legend: N,
4067
4107
  accTitle: e.accTitle,
4068
4108
  accDescr: e.accDescr
@@ -4073,14 +4113,14 @@ function Wa(e, t = {}) {
4073
4113
  function Q(e) {
4074
4114
  return String(Math.round(e * 100) / 100);
4075
4115
  }
4076
- function Ga(e, t, n) {
4077
- return e === 0 ? `var(--accent, ${E})` : j(e, t ?? E, n);
4116
+ function Xa(e, t, n) {
4117
+ return e === 0 ? `var(--accent, ${T})` : j(e, t ?? T, n);
4078
4118
  }
4079
- function Ka(e, t, n) {
4119
+ function Za(e, t, n) {
4080
4120
  let r = /* @__PURE__ */ new Set();
4081
4121
  for (let t of e.slices) r.add(t.colorIndex);
4082
4122
  for (let t of e.legend) r.add(t.colorIndex);
4083
- let i = [...r].sort((e, t) => e - t), a = i.map((e) => ` --pie-color-${e}: ${Ga(e, t.accent, t.bg)};`), o = i.map((e) => ` .pie-color-${e} { fill: var(--pie-color-${e}); }\n rect.pie-color-${e} { stroke: var(--pie-color-${e}); }`), s = a.length > 0 ? `\n svg {\n${a.join("\n")}\n }` : "";
4123
+ let i = [...r].sort((e, t) => e - t), a = i.map((e) => ` --pie-color-${e}: ${Xa(e, t.accent, t.bg)};`), o = i.map((e) => ` .pie-color-${e} { fill: var(--pie-color-${e}); }\n rect.pie-color-${e} { stroke: var(--pie-color-${e}); }`), s = a.length > 0 ? `\n svg {\n${a.join("\n")}\n }` : "";
4084
4124
  return `${b(n)}
4085
4125
  .pie-outer { fill: none; stroke: var(--fg); stroke-width: ${X.outerStrokeWidth}px; }
4086
4126
  .pie-slice { stroke: var(--fg); stroke-width: 2px; opacity: 0.7; }
@@ -4090,9 +4130,9 @@ function Ka(e, t, n) {
4090
4130
  ${o.join("\n")}
4091
4131
  </style>`;
4092
4132
  }
4093
- function qa(e, n, a = "Inter", o = !1, s, c, l, u = {}) {
4133
+ function Qa(e, n, a = "Inter", o = !1, s, c, l, u = {}) {
4094
4134
  let d = [];
4095
- d.push(Br(x(e.width, e.height, n, o, c ?? e.accTitle, l, void 0, u.styleAttribute, e.accDescr), s)), d.push(t(a, !1, u.nonce)), d.push(Ka(e, n, u.nonce)), d.push(`<circle cx="${Q(e.cx)}" cy="${Q(e.cy)}" r="${Q(e.outerRadius)}" class="pie-outer"/>`);
4135
+ d.push(Gr(x(e.width, e.height, n, o, c ?? e.accTitle, l, void 0, u.styleAttribute, e.accDescr), s)), d.push(t(a, !1, u.nonce)), d.push(Za(e, n, u.nonce)), d.push(`<circle cx="${Q(e.cx)}" cy="${Q(e.cy)}" r="${Q(e.outerRadius)}" class="pie-outer"/>`);
4096
4136
  for (let t of e.slices) d.push(`<path d="${t.path}" class="pie-slice pie-color-${t.colorIndex}" data-label="${r(t.label)}" data-value="${t.value}"/>`);
4097
4137
  for (let t of e.slices) d.push(`<text x="${Q(t.labelX)}" y="${Q(t.labelY)}" text-anchor="middle" class="pie-slice-label">${i(t.percentText)}</text>`);
4098
4138
  e.title && d.push(`<text x="${Q(e.title.x)}" y="${Q(e.title.y)}" text-anchor="middle" class="pie-title">${i(e.title.text)}</text>`);
@@ -4101,7 +4141,7 @@ function qa(e, n, a = "Inter", o = !1, s, c, l, u = {}) {
4101
4141
  }
4102
4142
  //#endregion
4103
4143
  //#region packages/svg-renderer/src/c4/arial-widths.ts
4104
- var Ja = 2048, Ya = [
4144
+ var $a = 2048, eo = [
4105
4145
  569,
4106
4146
  569,
4107
4147
  727,
@@ -4197,7 +4237,7 @@ var Ja = 2048, Ya = [
4197
4237
  532,
4198
4238
  684,
4199
4239
  1196
4200
- ], Xa = [
4240
+ ], to = [
4201
4241
  569,
4202
4242
  682,
4203
4243
  971,
@@ -4294,9 +4334,9 @@ var Ja = 2048, Ya = [
4294
4334
  801,
4295
4335
  1196
4296
4336
  ];
4297
- function Za(e, t) {
4337
+ function no(e, t) {
4298
4338
  let n = e.codePointAt(0);
4299
- if (!(n < 32 || n > 126)) return (t ? Xa : Ya)[n - 32] / Ja;
4339
+ if (!(n < 32 || n > 126)) return (t ? to : eo)[n - 32] / $a;
4300
4340
  }
4301
4341
  //#endregion
4302
4342
  //#region packages/svg-renderer/src/c4/metrics.ts
@@ -4335,20 +4375,20 @@ var $ = {
4335
4375
  personHeadOverlap: .27,
4336
4376
  dbTrim: 3.91,
4337
4377
  queueExtra: 10
4338
- }, Qa = $.width - 2 * $.shapePadding;
4339
- function $a(e, t, n) {
4378
+ }, ro = $.width - 2 * $.shapePadding;
4379
+ function io(e, t, n) {
4340
4380
  let r = [];
4341
4381
  for (let i of e.split("\n")) {
4342
4382
  let e = "";
4343
4383
  for (let a of i.split(/\s+/).filter(Boolean)) {
4344
4384
  let i = e ? `${e} ${a}` : a;
4345
- e && ao(i, n, 400) > t ? (r.push(e), e = a) : e = i;
4385
+ e && uo(i, n, 400) > t ? (r.push(e), e = a) : e = i;
4346
4386
  }
4347
4387
  r.push(e);
4348
4388
  }
4349
4389
  return r;
4350
4390
  }
4351
- function eo(e, t) {
4391
+ function ao(e, t) {
4352
4392
  let n = Math.min(Math.max(e * $.personHeadRatio, $.personHeadMin), $.personHeadMax), r = n * (2 - $.personHeadOverlap), i = t === void 0 ? Infinity : t - r;
4353
4393
  return {
4354
4394
  rx: Math.min(e * $.personRx, i * $.personRxMaxOfHeight),
@@ -4356,43 +4396,43 @@ function eo(e, t) {
4356
4396
  pillTop: r
4357
4397
  };
4358
4398
  }
4359
- function to(e, t) {
4360
- return e * $.nameLine + $.typeLine + no(t);
4399
+ function oo(e, t) {
4400
+ return e * $.nameLine + $.typeLine + so(t);
4361
4401
  }
4362
- function no(e) {
4402
+ function so(e) {
4363
4403
  return e === 0 ? 0 : $.descrLine + (e - 1) * $.descrExtraLine;
4364
4404
  }
4365
- function ro(e) {
4405
+ function co(e) {
4366
4406
  let t = e / 2;
4367
4407
  return {
4368
4408
  rx: t,
4369
4409
  ry: t / (2.5 + e / 50)
4370
4410
  };
4371
4411
  }
4372
- function io(e) {
4412
+ function lo(e) {
4373
4413
  let t = e / 2;
4374
4414
  return {
4375
4415
  rx: t / (2.5 + e / 50),
4376
4416
  ry: t
4377
4417
  };
4378
4418
  }
4379
- function ao(e, t, n) {
4419
+ function uo(e, t, n) {
4380
4420
  let r = 0;
4381
4421
  for (let i of e) {
4382
- let e = Za(i, n >= 600);
4422
+ let e = no(i, n >= 600);
4383
4423
  r += e === void 0 ? F(i, t, n) * $.textScale : e * t;
4384
4424
  }
4385
4425
  return r;
4386
4426
  }
4387
- function oo(e, t, n, r) {
4388
- let i = to(t, n), a = i + 2 * $.shapePadding, o = Math.max($.width, r + 2 * $.shapePadding);
4427
+ function fo(e, t, n, r) {
4428
+ let i = oo(t, n), a = i + 2 * $.shapePadding, o = Math.max($.width, r + 2 * $.shapePadding);
4389
4429
  if (e.kind === "person") return {
4390
4430
  width: o,
4391
- height: eo(o).pillTop + a,
4431
+ height: ao(o).pillTop + a,
4392
4432
  textHeight: i
4393
4433
  };
4394
4434
  if (e.shape === "db") {
4395
- let { ry: e } = ro(o);
4435
+ let { ry: e } = co(o);
4396
4436
  return {
4397
4437
  width: o,
4398
4438
  height: a + 2 * e - $.dbTrim,
@@ -4400,7 +4440,7 @@ function oo(e, t, n, r) {
4400
4440
  };
4401
4441
  }
4402
4442
  if (e.shape === "queue") {
4403
- let e = i + $.queueExtra, { rx: t } = io(e);
4443
+ let e = i + $.queueExtra, { rx: t } = lo(e);
4404
4444
  return {
4405
4445
  width: o + 3 * t,
4406
4446
  height: e,
@@ -4413,7 +4453,7 @@ function oo(e, t, n, r) {
4413
4453
  textHeight: i
4414
4454
  };
4415
4455
  }
4416
- function so(e) {
4456
+ function po(e) {
4417
4457
  let t = "#ffffff";
4418
4458
  if (e.external) switch (e.kind) {
4419
4459
  case "person": return {
@@ -4462,33 +4502,33 @@ function so(e) {
4462
4502
  }
4463
4503
  //#endregion
4464
4504
  //#region packages/svg-renderer/src/c4/layout.ts
4465
- function co() {
4505
+ function mo() {
4466
4506
  return { next: { cnt: 0 } };
4467
4507
  }
4468
- function lo(e, t, n, r, i) {
4508
+ function ho(e, t, n, r, i) {
4469
4509
  e.next.startx = e.startx = t, e.next.stopx = e.stopx = n, e.next.starty = e.starty = r, e.next.stopy = e.stopy = i;
4470
4510
  }
4471
- function uo(e, t, n, r) {
4511
+ function go(e, t, n, r) {
4472
4512
  let i = e[t];
4473
4513
  e[t] = i === void 0 ? n : r(n, i);
4474
4514
  }
4475
- function fo(e, t) {
4515
+ function _o(e, t) {
4476
4516
  e.next.cnt += 1;
4477
4517
  let n = $.shapeMargin, r = e.next.startx === e.next.stopx ? e.next.stopx + n : e.next.stopx + n * 2, i = r + t.width, a = e.next.starty + n * 2, o = a + t.height;
4478
- (r >= e.widthLimit || i >= e.widthLimit || e.next.cnt > $.shapeInRow) && (r = e.next.startx + n + $.nextLinePaddingX, a = e.next.stopy + n * 2, e.next.stopx = i = r + t.width, e.next.starty = e.next.stopy, e.next.stopy = o = a + t.height, e.next.cnt = 1), t.x = r, t.y = a, uo(e, "startx", r, Math.min), uo(e, "starty", a, Math.min), uo(e, "stopx", i, Math.max), uo(e, "stopy", o, Math.max), uo(e.next, "startx", r, Math.min), uo(e.next, "starty", a, Math.min), uo(e.next, "stopx", i, Math.max), uo(e.next, "stopy", o, Math.max);
4518
+ (r >= e.widthLimit || i >= e.widthLimit || e.next.cnt > $.shapeInRow) && (r = e.next.startx + n + $.nextLinePaddingX, a = e.next.stopy + n * 2, e.next.stopx = i = r + t.width, e.next.starty = e.next.stopy, e.next.stopy = o = a + t.height, e.next.cnt = 1), t.x = r, t.y = a, go(e, "startx", r, Math.min), go(e, "starty", a, Math.min), go(e, "stopx", i, Math.max), go(e, "stopy", o, Math.max), go(e.next, "startx", r, Math.min), go(e.next, "starty", a, Math.min), go(e.next, "stopx", i, Math.max), go(e.next, "stopy", o, Math.max);
4479
4519
  }
4480
- function po(e) {
4481
- let t = $a(e.label, Qa, $.nameSize), n = e.description ? $a(e.description, Qa, $.descrSize) : [], r = Math.max(...t.map((e) => ao(e, $.nameSize, 700)), ao(A(e), $.typeSize, 400), ...n.map((e) => ao(e, $.descrSize, 400)));
4520
+ function vo(e) {
4521
+ let t = io(e.label, ro, $.nameSize), n = e.description ? io(e.description, ro, $.descrSize) : [], r = Math.max(...t.map((e) => uo(e, $.nameSize, 700)), uo(k(e), $.typeSize, 400), ...n.map((e) => uo(e, $.descrSize, 400)));
4482
4522
  return {
4483
4523
  el: e,
4484
4524
  nameLines: t,
4485
4525
  descriptionLines: n,
4486
4526
  x: 0,
4487
4527
  y: 0,
4488
- ...oo(e, t.length, n.length, r)
4528
+ ...fo(e, t.length, n.length, r)
4489
4529
  };
4490
4530
  }
4491
- function mo(e) {
4531
+ function yo(e) {
4492
4532
  let t = /* @__PURE__ */ new Set(), n = new Map(e.elements.map((e) => [e.alias, e])), r = (e) => {
4493
4533
  let i = e.elementAliases.flatMap((e) => {
4494
4534
  t.add(e);
@@ -4508,28 +4548,28 @@ function mo(e) {
4508
4548
  children: i
4509
4549
  };
4510
4550
  }
4511
- function ho(e) {
4551
+ function bo(e) {
4512
4552
  let t = /* @__PURE__ */ new Map(), n = [], r = $.diagramMarginX, i = $.diagramMarginY, a = (e, n) => {
4513
4553
  for (let r of n) {
4514
- let n = po(r);
4515
- t.set(r.alias, n), fo(e, n);
4554
+ let n = vo(r);
4555
+ t.set(r.alias, n), _o(e, n);
4516
4556
  }
4517
4557
  e.stopx += $.shapeMargin, e.stopy += $.shapeMargin;
4518
4558
  }, o = (e, t, s) => {
4519
- let c = co();
4559
+ let c = mo();
4520
4560
  c.widthLimit = e.widthLimit / Math.min($.boundaryInRow, t.length);
4521
4561
  for (let [l, u] of t.entries()) {
4522
4562
  let t = u.boundary, d = 0, f = d + 8;
4523
4563
  d = f + $.boundaryLabelHeight;
4524
4564
  let p;
4525
- t && O(t) && (p = d + 5, d = p + $.boundaryTypeHeight);
4565
+ t && D(t) && (p = d + 5, d = p + $.boundaryTypeHeight);
4526
4566
  let m;
4527
4567
  if (t?.description && (m = d + 20, d = m + $.boundaryDescrHeight), t || (d = $.rootHeadingHeight), l === 0 || l % $.boundaryInRow === 0) {
4528
4568
  let t = e.startx + $.diagramMarginX, n = e.stopy + $.diagramMarginY + d;
4529
- lo(c, t, t, n, n);
4569
+ ho(c, t, t, n, n);
4530
4570
  } else {
4531
4571
  let e = c.stopx === c.startx ? c.startx : c.stopx + $.diagramMarginX;
4532
- lo(c, e, e, c.starty, c.starty);
4572
+ ho(c, e, e, c.starty, c.starty);
4533
4573
  }
4534
4574
  if (u.elements.length > 0 && a(c, u.elements), u.children.length > 0 && o(c, u.children, s + 1), t) {
4535
4575
  let e = c.stopx - c.startx, r = c.stopy - c.starty;
@@ -4550,15 +4590,15 @@ function ho(e) {
4550
4590
  }
4551
4591
  e.stopy = Math.max(c.stopy + $.shapeMargin, e.stopy), e.stopx = Math.max(c.stopx + $.shapeMargin, e.stopx), r = Math.max(r, e.stopx), i = Math.max(i, e.stopy);
4552
4592
  }
4553
- }, s = co();
4554
- return lo(s, $.diagramMarginX, $.diagramMarginX, $.diagramMarginY, $.diagramMarginY), s.widthLimit = $.screenWidth, o(s, [e], -1), {
4593
+ }, s = mo();
4594
+ return ho(s, $.diagramMarginX, $.diagramMarginX, $.diagramMarginY, $.diagramMarginY), s.widthLimit = $.screenWidth, o(s, [e], -1), {
4555
4595
  elements: t,
4556
4596
  boundaries: n,
4557
4597
  maxX: r,
4558
4598
  maxY: i
4559
4599
  };
4560
4600
  }
4561
- function go(e, t) {
4601
+ function xo(e, t) {
4562
4602
  let n = e.x + e.width / 2, r = e.y + e.height / 2, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
4563
4603
  if (i === 0 && a === 0) return {
4564
4604
  x: n,
@@ -4577,8 +4617,8 @@ function go(e, t) {
4577
4617
  y: r + l
4578
4618
  };
4579
4619
  }
4580
- function _o(e, t) {
4581
- let n = eo(e.width, e.height), r = e.x + e.width / 2, i = e.y + e.height / 2, a = e.width, o = e.height, s = -o / 2 + n.headRadius, c = -o / 2 + n.pillTop, l = n.rx, u = (e, t, n, r, i, a) => Array.from({ length: r }, (o, s) => {
4620
+ function So(e, t) {
4621
+ let n = ao(e.width, e.height), r = e.x + e.width / 2, i = e.y + e.height / 2, a = e.width, o = e.height, s = -o / 2 + n.headRadius, c = -o / 2 + n.pillTop, l = n.rx, u = (e, t, n, r, i, a) => Array.from({ length: r }, (o, s) => {
4582
4622
  let c = (i + s * (a - i) / (r - 1)) * Math.PI / 180;
4583
4623
  return {
4584
4624
  x: e - n * Math.cos(c),
@@ -4591,7 +4631,7 @@ function _o(e, t) {
4591
4631
  ...u(a / 2 - l, o / 2 - l, l, 12, 270, 180),
4592
4632
  ...u(a / 2 - l, c + l, l, 12, 180, 90)
4593
4633
  ];
4594
- return yo({
4634
+ return wo({
4595
4635
  x: r,
4596
4636
  y: i
4597
4637
  }, t, f.map((e) => ({
@@ -4599,7 +4639,7 @@ function _o(e, t) {
4599
4639
  y: i + e.y
4600
4640
  })));
4601
4641
  }
4602
- function vo(e, t, n, r) {
4642
+ function Co(e, t, n, r) {
4603
4643
  let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o;
4604
4644
  if (s !== 0 && c !== 0 && s * c > 0) return;
4605
4645
  let l = r.y - n.y, u = n.x - r.x, d = r.x * n.y - n.x * r.y, f = l * e.x + u * e.y + d, p = l * t.x + u * t.y + d;
@@ -4612,18 +4652,18 @@ function vo(e, t, n, r) {
4612
4652
  y: g < 0 ? (g - h) / m : (g + h) / m
4613
4653
  };
4614
4654
  }
4615
- function yo(e, t, n) {
4655
+ function wo(e, t, n) {
4616
4656
  let r, i = Infinity;
4617
4657
  return n.forEach((a, o) => {
4618
- let s = vo(e, t, a, n[(o + 1) % n.length]);
4658
+ let s = Co(e, t, a, n[(o + 1) % n.length]);
4619
4659
  if (!s) return;
4620
4660
  let c = Math.hypot(s.x - t.x, s.y - t.y);
4621
4661
  c < i && (r = s, i = c);
4622
4662
  }), r ?? e;
4623
4663
  }
4624
- var bo = 1e-6;
4625
- function xo(e, t) {
4626
- let n = go(e, t), r = e.x + e.width / 2, i = e.y + e.height / 2, { rx: a, ry: o } = ro(e.width), s = n.x - r, c = Math.abs(s) < e.width / 2 - bo || Math.abs(Math.abs(s) - e.width / 2) <= bo && Math.abs(n.y - i) > e.height / 2 - o;
4664
+ var To = 1e-6;
4665
+ function Eo(e, t) {
4666
+ let n = xo(e, t), r = e.x + e.width / 2, i = e.y + e.height / 2, { rx: a, ry: o } = co(e.width), s = n.x - r, c = Math.abs(s) < e.width / 2 - To || Math.abs(Math.abs(s) - e.width / 2) <= To && Math.abs(n.y - i) > e.height / 2 - o;
4627
4667
  if (a === 0 || !c) return n;
4628
4668
  let l = o * o * (1 - s * s / (a * a)), u = o - (l > 0 ? Math.sqrt(l) : l);
4629
4669
  return t.y - i > 0 && (u = -u), {
@@ -4631,8 +4671,8 @@ function xo(e, t) {
4631
4671
  y: n.y + u
4632
4672
  };
4633
4673
  }
4634
- function So(e, t) {
4635
- let n = go(e, t), r = e.x + e.width / 2, i = e.y + e.height / 2, { rx: a, ry: o } = io(e.height), s = n.y - i, c = Math.abs(s) < e.height / 2 - bo || Math.abs(Math.abs(s) - e.height / 2) <= bo && Math.abs(n.x - r) > e.width / 2 - a;
4674
+ function Do(e, t) {
4675
+ let n = xo(e, t), r = e.x + e.width / 2, i = e.y + e.height / 2, { rx: a, ry: o } = lo(e.height), s = n.y - i, c = Math.abs(s) < e.height / 2 - To || Math.abs(Math.abs(s) - e.height / 2) <= To && Math.abs(n.x - r) > e.width / 2 - a;
4636
4676
  if (o === 0 || !c) return n;
4637
4677
  let l = a * a * (1 - s * s / (o * o)), u = a - Math.sqrt(Math.abs(l));
4638
4678
  return t.x - r > 0 && (u = -u), {
@@ -4640,16 +4680,16 @@ function So(e, t) {
4640
4680
  y: n.y
4641
4681
  };
4642
4682
  }
4643
- function Co(e, t) {
4683
+ function Oo(e, t) {
4644
4684
  let n = e.el;
4645
- return n?.kind === "person" ? _o(e, t) : n?.shape === "db" ? xo(e, t) : n?.shape === "queue" ? So(e, t) : go(e, t);
4685
+ return n?.kind === "person" ? So(e, t) : n?.shape === "db" ? Eo(e, t) : n?.shape === "queue" ? Do(e, t) : xo(e, t);
4646
4686
  }
4647
- var wo = (e) => ({
4687
+ var ko = (e) => ({
4648
4688
  x: e.x + e.width / 2,
4649
4689
  y: e.y + e.height / 2
4650
4690
  });
4651
- function To(e, t, n, r) {
4652
- let i = n.get(e.from), a = n.get(e.to), o = Co(i, wo(a)), s = Co(a, wo(i)), c = s.x - o.x, l = s.y - o.y, u = (e) => ({
4691
+ function Ao(e, t, n, r) {
4692
+ let i = n.get(e.from), a = n.get(e.to), o = Oo(i, ko(a)), s = Oo(a, ko(i)), c = s.x - o.x, l = s.y - o.y, u = (e) => ({
4653
4693
  x: e.x,
4654
4694
  y: e.y + r
4655
4695
  }), d = {
@@ -4659,45 +4699,45 @@ function To(e, t, n, r) {
4659
4699
  if (t > 0 && (d.curve = u({
4660
4700
  x: o.x + c / 2 - c / 4,
4661
4701
  y: o.y + l / 2
4662
- })), k(e).length > 0) {
4702
+ })), O(e).length > 0) {
4663
4703
  let t = {
4664
4704
  x: Math.min(o.x, s.x) + Math.abs(c) / 2,
4665
4705
  y: Math.min(o.y, s.y) + Math.abs(l) / 2
4666
- }, n = k(e)[0], r = e.label !== "" || e.index !== void 0 ? ao(n ?? "", $.messageSize, 400) : 0;
4706
+ }, n = O(e)[0], r = e.label !== "" || e.index !== void 0 ? uo(n ?? "", $.messageSize, 400) : 0;
4667
4707
  if (d.labelPosition = u({
4668
4708
  x: t.x + r / 2,
4669
4709
  y: t.y
4670
4710
  }), e.technology) {
4671
- let n = ao(`[${e.technology}]`, $.messageSize, 400);
4711
+ let n = uo(`[${e.technology}]`, $.messageSize, 400);
4672
4712
  d.technologyX = t.x + Math.max(r, n) / 2;
4673
4713
  }
4674
4714
  }
4675
4715
  return d;
4676
4716
  }
4677
- var Eo = 2, Do = 2;
4678
- function Oo(e, t) {
4717
+ var jo = 2, Mo = 2;
4718
+ function No(e, t) {
4679
4719
  let n = e.labelPosition;
4680
- return n ? k(e).map((r, i, a) => ({
4720
+ return n ? O(e).map((r, i, a) => ({
4681
4721
  cx: (e.technology !== void 0 && i === a.length - 1 && e.technologyX !== void 0 ? e.technologyX : n.x) + t,
4682
4722
  cy: n.y + (i === 0 ? 0 : $.messageSize + 5),
4683
- w: ao(r, $.messageSize, 400),
4723
+ w: uo(r, $.messageSize, 400),
4684
4724
  h: $.messageSize
4685
4725
  })) : [];
4686
4726
  }
4687
- var ko = (e, t) => Math.abs(e.cx - t.cx) < (e.w + t.w) / 2 + Eo && Math.abs(e.cy - t.cy) < (e.h + t.h) / 2 + Eo;
4688
- function Ao(e, t, n) {
4727
+ var Po = (e, t) => Math.abs(e.cx - t.cx) < (e.w + t.w) / 2 + jo && Math.abs(e.cy - t.cy) < (e.h + t.h) / 2 + jo;
4728
+ function Fo(e, t, n) {
4689
4729
  let r = e.points[0], i = e.points[e.points.length - 1];
4690
4730
  if (!e.labelPosition || !r || !i) return;
4691
4731
  let a = i.x - r.x, o = i.y - r.y, s = Math.hypot(a, o);
4692
4732
  if (s === 0) return;
4693
4733
  let c = a / s, l = o / s, u = (r) => {
4694
- let i = Oo(e, r * c).map((e) => ({
4734
+ let i = No(e, r * c).map((e) => ({
4695
4735
  ...e,
4696
4736
  cy: e.cy + r * l
4697
4737
  }));
4698
- return i.some((e) => [...t, ...n].some((t) => ko(e, t))) ? void 0 : i;
4738
+ return i.some((e) => [...t, ...n].some((t) => Po(e, t))) ? void 0 : i;
4699
4739
  };
4700
- for (let t = 0; t <= s / 2; t += Do) for (let r of t === 0 ? [1] : [1, -1]) {
4740
+ for (let t = 0; t <= s / 2; t += Mo) for (let r of t === 0 ? [1] : [1, -1]) {
4701
4741
  let i = u(r * t);
4702
4742
  if (i) {
4703
4743
  t !== 0 && (e.labelPosition = {
@@ -4707,9 +4747,9 @@ function Ao(e, t, n) {
4707
4747
  return;
4708
4748
  }
4709
4749
  }
4710
- n.push(...Oo(e, 0));
4750
+ n.push(...No(e, 0));
4711
4751
  }
4712
- function jo(e, t = {}) {
4752
+ function Io(e, t = {}) {
4713
4753
  if (e.elements.length === 0 && e.boundaries.length === 0) {
4714
4754
  let t = {
4715
4755
  variant: e.variant,
@@ -4721,7 +4761,7 @@ function jo(e, t = {}) {
4721
4761
  };
4722
4762
  return e.title && (t.title = e.title), t;
4723
4763
  }
4724
- let n = ho(mo(e)), r = e.title ? $.titleExtra : 0, i = $.diagramMarginY + r, a = e.elements.flatMap((e) => {
4764
+ let n = bo(yo(e)), r = e.title ? $.titleExtra : 0, i = $.diagramMarginY + r, a = e.elements.flatMap((e) => {
4725
4765
  let t = n.elements.get(e.alias);
4726
4766
  return t ? [{
4727
4767
  ...e,
@@ -4738,13 +4778,13 @@ function jo(e, t = {}) {
4738
4778
  })), s = /* @__PURE__ */ new Map();
4739
4779
  for (let e of n.elements.values()) s.set(e.el.alias, e);
4740
4780
  for (let e of n.boundaries) s.set(e.alias, e);
4741
- let c = e.relationships.map((e, t) => To(e, t, s, i)), l = a.map((e) => ({
4781
+ let c = e.relationships.map((e, t) => Ao(e, t, s, i)), l = a.map((e) => ({
4742
4782
  cx: e.x + e.width / 2,
4743
4783
  cy: e.y + e.height / 2,
4744
4784
  w: e.width + 12,
4745
4785
  h: e.height + 12
4746
4786
  })), u = [];
4747
- for (let e of c) Ao(e, l, u);
4787
+ for (let e of c) Fo(e, l, u);
4748
4788
  let d = n.maxX + $.diagramMarginX, f = n.maxY + $.diagramMarginY + r, p = {
4749
4789
  variant: e.variant,
4750
4790
  width: d,
@@ -4760,70 +4800,70 @@ function jo(e, t = {}) {
4760
4800
  }
4761
4801
  //#endregion
4762
4802
  //#region packages/svg-renderer/src/c4/renderer.ts
4763
- function Mo(e, n, r = "Inter", o = !1, s = I, c, l, u, d = {}) {
4803
+ function Lo(e, n, r = "Inter", o = !1, s = I, c, l, u, d = {}) {
4764
4804
  let f = [];
4765
- f.push(Br(x(e.width, e.height, n, o, l ?? e.title, u, void 0, d.styleAttribute), c)), f.push(t(r, !1, d.nonce)), e.title && e.titlePosition && f.push(a`<text class="c4-title" x="${e.titlePosition.x}" y="${e.titlePosition.y}" dy="${z}" ` + a`font-size="16" fill="var(--_text)">${i(e.title)}</text>`);
4766
- for (let t of e.boundaries) f.push(Po(t));
4767
- for (let t of e.elements) f.push(Fo(t));
4768
- for (let t of e.relationships) f.push(Bo(t)), f.push(Vo(t));
4805
+ f.push(Gr(x(e.width, e.height, n, o, l ?? e.title, u, void 0, d.styleAttribute), c)), f.push(t(r, !1, d.nonce)), e.title && e.titlePosition && f.push(a`<text class="c4-title" x="${e.titlePosition.x}" y="${e.titlePosition.y}" dy="${z}" ` + a`font-size="16" fill="var(--_text)">${i(e.title)}</text>`);
4806
+ for (let t of e.boundaries) f.push(zo(t));
4807
+ for (let t of e.elements) f.push(Bo(t));
4808
+ for (let t of e.relationships) f.push(Go(t)), f.push(Ko(t));
4769
4809
  return f.push("</svg>"), f.filter(Boolean).join("\n");
4770
4810
  }
4771
- function No(e, t, n, r, o) {
4811
+ function Ro(e, t, n, r, o) {
4772
4812
  return a` <text x="${t}" y="${n}" text-anchor="middle" dy="${z}" font-size="${r}" ` + a`${o}>${i(e)}</text>`;
4773
4813
  }
4774
- function Po(e) {
4814
+ function zo(e) {
4775
4815
  let t = [];
4776
4816
  t.push(a`<g class="c4-boundary" data-id="${r(e.alias)}" data-label="${r(e.label)}" data-depth="${e.depth}">`), t.push(a` <rect x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="2.5" ry="2.5" ` + "fill=\"none\" stroke=\"var(--_text)\" stroke-width=\"1\" stroke-dasharray=\"7,7\" />");
4777
4817
  let n = e.x + e.width / 2;
4778
- t.push(No(e.label, n, e.y + (e.labelY ?? 8), $.boundarySize + 2, "font-weight=\"700\" fill=\"var(--_text)\""));
4779
- let i = O({
4818
+ t.push(Ro(e.label, n, e.y + (e.labelY ?? 8), $.boundarySize + 2, "font-weight=\"700\" fill=\"var(--_text)\""));
4819
+ let i = D({
4780
4820
  alias: e.alias,
4781
4821
  label: e.label,
4782
4822
  ...e.type ? { type: e.type } : {},
4783
4823
  elementAliases: [],
4784
4824
  children: []
4785
4825
  });
4786
- return i && e.typeY !== void 0 && t.push(No(i, n, e.y + e.typeY, $.boundarySize, "fill=\"var(--_text)\"")), e.description && e.descrY !== void 0 && t.push(No(e.description, n, e.y + e.descrY, $.boundarySize - 2, "fill=\"var(--_text)\"")), t.push("</g>"), t.join("\n");
4826
+ return i && e.typeY !== void 0 && t.push(Ro(i, n, e.y + e.typeY, $.boundarySize, "fill=\"var(--_text)\"")), e.description && e.descrY !== void 0 && t.push(Ro(e.description, n, e.y + e.descrY, $.boundarySize - 2, "fill=\"var(--_text)\"")), t.push("</g>"), t.join("\n");
4787
4827
  }
4788
- function Fo(e) {
4789
- let t = so(e), { x: n, y: i, width: o, height: s } = e, c = n + o / 2, l = to(e.nameLines.length, e.descriptionLines.length), u = [];
4828
+ function Bo(e) {
4829
+ let t = po(e), { x: n, y: i, width: o, height: s } = e, c = n + o / 2, l = oo(e.nameLines.length, e.descriptionLines.length), u = [];
4790
4830
  u.push(a`<g class="c4-element" data-id="${r(e.alias)}" data-kind="${e.kind}" data-shape="${e.shape}" ` + a`data-external="${e.external}" data-label="${r(e.label)}">`);
4791
4831
  let d, f = c;
4792
- if (e.kind === "person") u.push(...Io(e, t)), d = i + eo(o).pillTop + $.shapePadding;
4832
+ if (e.kind === "person") u.push(...Vo(e, t)), d = i + ao(o).pillTop + $.shapePadding;
4793
4833
  else if (e.shape === "db") {
4794
- u.push(...Lo(e, t));
4795
- let { ry: n } = ro(o);
4834
+ u.push(...Ho(e, t));
4835
+ let { ry: n } = co(o);
4796
4836
  d = i + (2 * n + s) / 2 - l / 2;
4797
4837
  } else if (e.shape === "queue") {
4798
- u.push(...Ro(e, t));
4799
- let { rx: n } = io(s);
4838
+ u.push(...Uo(e, t));
4839
+ let { rx: n } = lo(s);
4800
4840
  f = c - n, d = i + s / 2 - l / 2;
4801
4841
  } else u.push(a` <rect x="${n}" y="${i}" width="${o}" height="${s}" rx="${$.cornerRadius}" ry="${$.cornerRadius}" ` + a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}" />`), d = i + $.shapePadding;
4802
4842
  let p = d;
4803
- for (let n of e.nameLines) u.push(No(n, f, p + $.nameLine / 2, $.nameSize, a`font-weight="700" fill="${t.text}"`)), p += $.nameLine;
4804
- return u.push(No(A(e), f, p + $.typeLine / 2, $.typeSize, a`fill="${t.text}"`)), p += $.typeLine, e.descriptionLines.forEach((e, n) => {
4805
- u.push(No(e, f, p + $.descrLine / 2 + n * $.descrExtraLine, $.descrSize, a`fill="${t.text}"`));
4806
- }), p += no(e.descriptionLines.length), u.push("</g>"), u.join("\n");
4843
+ for (let n of e.nameLines) u.push(Ro(n, f, p + $.nameLine / 2, $.nameSize, a`font-weight="700" fill="${t.text}"`)), p += $.nameLine;
4844
+ return u.push(Ro(k(e), f, p + $.typeLine / 2, $.typeSize, a`fill="${t.text}"`)), p += $.typeLine, e.descriptionLines.forEach((e, n) => {
4845
+ u.push(Ro(e, f, p + $.descrLine / 2 + n * $.descrExtraLine, $.descrSize, a`fill="${t.text}"`));
4846
+ }), p += so(e.descriptionLines.length), u.push("</g>"), u.join("\n");
4807
4847
  }
4808
- function Io(e, t) {
4809
- let { x: n, width: r } = e, { rx: i, headRadius: o, pillTop: s } = eo(r, e.height), c = e.y, l = n + r / 2, u = c + s, d = e.y + e.height - u, f = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4848
+ function Vo(e, t) {
4849
+ let { x: n, width: r } = e, { rx: i, headRadius: o, pillTop: s } = ao(r, e.height), c = e.y, l = n + r / 2, u = c + s, d = e.y + e.height - u, f = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4810
4850
  return [a` <rect x="${n}" y="${u}" width="${r}" height="${d}" rx="${i}" ry="${i}" ${f} />`, a` <circle cx="${l}" cy="${c + o}" r="${o}" ${f} />`];
4811
4851
  }
4812
- function Lo(e, t) {
4813
- let { x: n, y: r, width: i, height: o } = e, { rx: s, ry: c } = ro(i), l = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4852
+ function Ho(e, t) {
4853
+ let { x: n, y: r, width: i, height: o } = e, { rx: s, ry: c } = co(i), l = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4814
4854
  return [a` <path d="M ${n} ${r + c} L ${n} ${r + o - c} A ${s} ${c} 0 0 0 ${n + i} ${r + o - c} L ${n + i} ${r + c} Z" ${l} />`, a` <ellipse cx="${n + s}" cy="${r + c}" rx="${s}" ry="${c}" ${l} />`];
4815
4855
  }
4816
- function Ro(e, t) {
4817
- let { x: n, y: r, width: i, height: o } = e, { rx: s, ry: c } = io(o), l = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4856
+ function Uo(e, t) {
4857
+ let { x: n, y: r, width: i, height: o } = e, { rx: s, ry: c } = lo(o), l = a`fill="${t.fill}" stroke="${t.stroke}" stroke-width="${$.strokeWidth}"`;
4818
4858
  return [a` <path d="M ${n + i - s} ${r} H ${n + s} A ${s} ${c} 0 0 0 ${n + s} ${r + o} H ${n + i - s} Z" ${l} />`, a` <ellipse cx="${n + i - s}" cy="${r + c}" rx="${s}" ry="${c}" ${l} />`];
4819
4859
  }
4820
- function zo(e, t) {
4860
+ function Wo(e, t) {
4821
4861
  let n = e.x - t.x, r = e.y - t.y, i = Math.hypot(n, r);
4822
4862
  if (i === 0) return "";
4823
4863
  let o = n / i, s = r / i, c = e.x - o * 10, l = e.y - s * 10;
4824
4864
  return a`<polygon class="c4-arrowhead" points="${e.x},${e.y} ${c - s * 5},${l + o * 5} ${c + s * 5},${l - o * 5}" ` + "fill=\"var(--_text)\" />";
4825
4865
  }
4826
- function Bo(e) {
4866
+ function Go(e) {
4827
4867
  let [t, n] = [e.points[0], e.points[e.points.length - 1]];
4828
4868
  if (!t || !n || t === n) return "";
4829
4869
  let i = [
@@ -4832,109 +4872,109 @@ function Bo(e) {
4832
4872
  a`data-to="${r(e.to)}"`
4833
4873
  ];
4834
4874
  e.label && i.push(a`data-label="${r(e.label)}"`), e.technology && i.push(a`data-technology="${r(e.technology)}"`);
4835
- let o = e.curve ? a`M ${t.x},${t.y} Q ${e.curve.x},${e.curve.y} ${n.x},${n.y}` : a`M ${t.x},${t.y} L ${n.x},${n.y}`, s = a`<path ${i.join(" ")} d="${o}" fill="none" stroke="var(--_text)" stroke-width="1" />`, c = e.curve ?? t, l = e.curve ?? n, u = zo(n, c), d = zo(t, l);
4875
+ let o = e.curve ? a`M ${t.x},${t.y} Q ${e.curve.x},${e.curve.y} ${n.x},${n.y}` : a`M ${t.x},${t.y} L ${n.x},${n.y}`, s = a`<path ${i.join(" ")} d="${o}" fill="none" stroke="var(--_text)" stroke-width="1" />`, c = e.curve ?? t, l = e.curve ?? n, u = Wo(n, c), d = Wo(t, l);
4836
4876
  return [s, ...e.bidirectional ? [u, d] : [e.reversed ? d : u]].filter(Boolean).join("\n");
4837
4877
  }
4838
- function Vo(e) {
4839
- let t = k(e);
4878
+ function Ko(e) {
4879
+ let t = O(e);
4840
4880
  if (t.length === 0 || !e.labelPosition) return "";
4841
4881
  let { x: n, y: i } = e.labelPosition, o = [a`<g class="c4-relationship-label" data-from="${r(e.from)}" data-to="${r(e.to)}">`];
4842
4882
  return t.forEach((r, a) => {
4843
4883
  let s = e.technology !== void 0 && a === t.length - 1, c = i + (a === 0 ? 0 : $.messageSize + 5);
4844
- o.push(No(r, s && e.technologyX !== void 0 ? e.technologyX : n, c, $.messageSize, s ? "font-style=\"italic\" fill=\"var(--_text)\"" : "fill=\"var(--_text)\""));
4884
+ o.push(Ro(r, s && e.technologyX !== void 0 ? e.technologyX : n, c, $.messageSize, s ? "font-style=\"italic\" fill=\"var(--_text)\"" : "fill=\"var(--_text)\""));
4845
4885
  }), o.push("</g>"), o.join("\n");
4846
4886
  }
4847
4887
  //#endregion
4848
4888
  //#region packages/svg-renderer/src/registry.ts
4849
- var Ho = {
4889
+ var qo = {
4850
4890
  type: "xychart",
4851
- parse: ae,
4852
- layoutForSvg: va,
4891
+ parse: ie,
4892
+ layoutForSvg: Ca,
4853
4893
  renderSvg(e, t, n) {
4854
4894
  let r = n.interactivity === void 0 ? n.interactive ?? !1 : n.interactivity === "full";
4855
- return Ma(e, t.colors, t.font, t.transparent, r, t.embedSource, t.title, t.decorative, t.emit);
4895
+ return La(e, t.colors, t.font, t.transparent, r, t.embedSource, t.title, t.decorative, t.emit);
4856
4896
  }
4857
- }, Uo = {
4897
+ }, Jo = {
4858
4898
  type: "sequence",
4859
- parse: ie,
4860
- layoutForSvg: Yi,
4899
+ parse: re,
4900
+ layoutForSvg: ea,
4861
4901
  renderSvg(e, t) {
4862
- return Xi(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4902
+ return ta(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4863
4903
  }
4864
4904
  };
4865
- function Wo(e) {
4905
+ function Yo(e) {
4866
4906
  return (e.interactivity ?? "static") !== "none";
4867
4907
  }
4868
- function Go(e) {
4908
+ function Xo(e) {
4869
4909
  return (e.interactivity ?? "static") === "full";
4870
4910
  }
4871
- var Ko = {
4911
+ var Zo = {
4872
4912
  type: "class",
4873
- parse: P,
4874
- layoutForSvg: ci,
4913
+ parse: N,
4914
+ layoutForSvg: pi,
4875
4915
  renderSvg(e, t, n) {
4876
- return fi(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, Wo(n), t.emit);
4916
+ return _i(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, Yo(n), t.emit);
4877
4917
  }
4878
- }, qo = {
4918
+ }, Qo = {
4879
4919
  type: "er",
4880
- parse: te,
4920
+ parse: P,
4881
4921
  layoutForSvg(e, t) {
4882
- return ji(C(e, t.direction), t);
4922
+ return Ii(C(e, t.direction), t);
4883
4923
  },
4884
4924
  renderSvg(e, t) {
4885
- return Pi(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4925
+ return zi(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4886
4926
  }
4887
- }, Jo = {
4927
+ }, $o = {
4888
4928
  type: "flowchart",
4889
- parse: (e, t) => ne(t),
4929
+ parse: (e, t) => te(t),
4890
4930
  layoutForSvg(e, t) {
4891
4931
  return {
4892
- graph: Nn(C(e, t.direction), t),
4932
+ graph: Rn(C(e, t.direction), t),
4893
4933
  curve: t.curve ?? e.initConfig?.curve ?? "linear"
4894
4934
  };
4895
4935
  },
4896
4936
  renderSvg(e, t, n) {
4897
- return Wn(e.graph, t.colors, t.font, t.transparent, t.fontSizes, e.curve, t.embedSource, Go(n), Wo(n), t.title, t.decorative, t.emit);
4937
+ return Yn(e.graph, t.colors, t.font, t.transparent, t.fontSizes, e.curve, t.embedSource, Xo(n), Yo(n), t.title, t.decorative, t.emit);
4898
4938
  }
4899
- }, Yo = {
4939
+ }, es = {
4900
4940
  type: "c4",
4901
- parse: N,
4941
+ parse: M,
4902
4942
  layoutForSvg(e, t) {
4903
- return jo(e, t);
4943
+ return Io(e, t);
4904
4944
  },
4905
4945
  renderSvg(e, t) {
4906
- return Mo(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4907
- }
4908
- }, Xo = {
4909
- xychart: Ho,
4910
- er: qo,
4911
- sequence: Uo,
4912
- class: Ko,
4913
- flowchart: Jo,
4946
+ return Lo(e, t.colors, t.font, t.transparent, t.fontSizes, t.embedSource, t.title, t.decorative, t.emit);
4947
+ }
4948
+ }, ts = {
4949
+ xychart: qo,
4950
+ er: Qo,
4951
+ sequence: Jo,
4952
+ class: Zo,
4953
+ flowchart: $o,
4914
4954
  architecture: {
4915
4955
  type: "architecture",
4916
- parse: M,
4956
+ parse: ee,
4917
4957
  layoutForSvg(e, t) {
4918
4958
  return {
4919
- graph: jn(C(D(e), t.direction), t),
4959
+ graph: In(C(E(e), t.direction), t),
4920
4960
  curve: t.curve ?? "linear"
4921
4961
  };
4922
4962
  },
4923
- renderSvg: Jo.renderSvg
4963
+ renderSvg: $o.renderSvg
4924
4964
  },
4925
- c4: Yo,
4965
+ c4: es,
4926
4966
  pie: {
4927
4967
  type: "pie",
4928
- parse: (e, t) => re(t),
4929
- layoutForSvg: Wa,
4968
+ parse: (e, t) => ne(t),
4969
+ layoutForSvg: Ya,
4930
4970
  renderSvg(e, t) {
4931
- return qa(e, t.colors, t.font, t.transparent, t.embedSource, t.title, t.decorative, t.emit);
4971
+ return Qa(e, t.colors, t.font, t.transparent, t.embedSource, t.title, t.decorative, t.emit);
4932
4972
  }
4933
4973
  }
4934
4974
  };
4935
4975
  //#endregion
4936
4976
  //#region packages/svg-renderer/src/index.ts
4937
- function Zo(t) {
4977
+ function ns(t) {
4938
4978
  return {
4939
4979
  bg: t.bg ?? e.bg,
4940
4980
  fg: t.fg ?? e.fg,
@@ -4945,23 +4985,31 @@ function Zo(t) {
4945
4985
  border: t.border
4946
4986
  };
4947
4987
  }
4948
- function Qo(e = {}) {
4949
- return S(Zo(e), e.transparent);
4988
+ function rs(e = {}) {
4989
+ return S(ns(e), e.transparent);
4950
4990
  }
4951
- function $o(e) {
4991
+ function is(e) {
4952
4992
  return {
4953
4993
  nonce: e.nonce,
4954
4994
  styleAttribute: e.styleAttribute
4955
4995
  };
4956
4996
  }
4957
- function es(e, t = {}) {
4958
- let n = ts(e, t);
4959
- return t.resolveColors ? ti(n, Zo(t)) : n;
4997
+ function as(e, t = {}) {
4998
+ let n = os(ss(e, t));
4999
+ return t.resolveColors ? oi(n, ns(t)) : n;
5000
+ }
5001
+ function os(e) {
5002
+ let t = new Set(Array.from(e.matchAll(/\sid="([^"]+)"/g), (e) => e[1] ?? ""));
5003
+ if (t.size === 0) return e;
5004
+ let n = 2166136261;
5005
+ for (let t = 0; t < e.length; t++) n = Math.imul(n ^ e.charCodeAt(t), 16777619);
5006
+ let r = `zm${(n >>> 0).toString(36)}-`, i = (e) => t.has(e) && !e.startsWith("zm-") ? r + e : e;
5007
+ return e.replace(/(\sid=")([^"]+)"/g, (e, t, n) => `${t}${i(n)}"`).replace(/url\(#([^)]+)\)/g, (e, t) => `url(#${i(t)})`).replace(/(href=")#([^"]+)"/g, (e, t, n) => `${t}#${i(n)}"`);
4960
5008
  }
4961
- function ts(e, t) {
4962
- let r = oe(e), i = Zo(t), a = t.font ?? "Inter";
5009
+ function ss(e, t) {
5010
+ let r = ae(e), i = ns(t), a = t.font ?? "Inter";
4963
5011
  v(c(a));
4964
- let o = t.transparent ?? !1, s = Te(t.fontSizes), l = n(r), u = t.embedSource ? e : void 0, d = t.title, f = t.decorative, p = $o(t), m = y(r), h = Xo[l], g = h.parse(m, r), _ = h.layoutForSvg(g, t), b = {
5012
+ let o = t.transparent ?? !1, s = Ae(t.fontSizes), l = n(r), u = t.embedSource ? e : void 0, d = t.title, f = t.decorative, p = is(t), m = y(r), h = ts[l], g = h.parse(m, r), _ = h.layoutForSvg(g, t), b = {
4965
5013
  colors: i,
4966
5014
  font: a,
4967
5015
  transparent: o,
@@ -4973,11 +5021,11 @@ function ts(e, t) {
4973
5021
  };
4974
5022
  return h.renderSvg(_, b, t);
4975
5023
  }
4976
- async function ns(e, t = {}) {
4977
- return es(e, t);
5024
+ async function cs(e, t = {}) {
5025
+ return as(e, t);
4978
5026
  }
4979
- var rs = es, is = ns;
5027
+ var ls = as, us = cs;
4980
5028
  //#endregion
4981
- export { Gi as ACTOR_LABEL_OFFSET, Oe as ARROW_HEAD, U as CLS, je as ELK_DIRECTION_FALLBACK, I as FONT_SIZES, L as FONT_WEIGHTS, Ee as GROUP_HEADER_CONTENT_PAD, Ie as INLINE_CENTERED_EDGE_LABEL, Ce as MONO_FONT, we as MONO_FONT_STACK, De as NODE_PADDING, X as PIE, R as STROKE_WIDTHS, z as TEXT_BASELINE_SHIFT, Pe as baseElkLayoutOptions, Wi as boxLabelHeight, Re as buildElkEdge, Le as buildElkEdgeLabel, Fe as buildElkLeafNode, ke as buildSvgStyleBlock, ni as classNoteId, ot as clipEdgeToShape, Pn as convertToElkFormat, ge as createLayoutCache, Me as directionToElk, ye as elkLayoutSync, Ne as elkPadding, Se as estimateMonoTextWidth, F as estimateTextWidth, Yr as evaluateCssColorValue, St as extractEdgeLabelPosition, xt as extractEdgePoints, ka as formatTickLabels, ci as layoutClassDiagramSync, ji as layoutErDiagramSync, Nn as layoutFlowchartSync, jn as layoutGraphSync, Wa as layoutPieChart, Yi as layoutSequenceDiagram, va as layoutXYChart, Oa as niceTickValues, Ga as pieColorValue, fe as pointsToPath, fi as renderClassSvg, Pi as renderErSvg, is as renderMermaid, es as renderMermaidSVG, ns as renderMermaidSVGAsync, rs as renderMermaidSync, qa as renderPieSvg, Xi as renderSequenceSvg, Wn as renderSvg, Ma as renderXYChartSvg, ti as resolveCssColors, Te as resolveFontSizes, Ia as smoothCurvePath, Qo as themeCssVariables, Br as withDataSrc, wa as xLabelStep };
5029
+ export { Xi as ACTOR_LABEL_OFFSET, Ne as ARROW_HEAD, U as CLS, Ie as ELK_DIRECTION_FALLBACK, ge as ElkNotRegisteredError, I as FONT_SIZES, L as FONT_WEIGHTS, je as GROUP_HEADER_CONTENT_PAD, Ve as INLINE_CENTERED_EDGE_LABEL, Oe as MONO_FONT, ke as MONO_FONT_STACK, Me as NODE_PADDING, X as PIE, R as STROKE_WIDTHS, z as TEXT_BASELINE_SHIFT, ze as baseElkLayoutOptions, Yi as boxLabelHeight, Ue as buildElkEdge, He as buildElkEdgeLabel, Be as buildElkLeafNode, Pe as buildSvgStyleBlock, si as classNoteId, dt as clipEdgeToShape, zn as convertToElkFormat, xe as createLayoutCache, Le as directionToElk, we as elkLayoutSync, Re as elkPadding, De as estimateMonoTextWidth, F as estimateTextWidth, ei as evaluateCssColorValue, Dt as extractEdgeLabelPosition, Et as extractEdgePoints, Pa as formatTickLabels, pi as layoutClassDiagramSync, Ii as layoutErDiagramSync, Rn as layoutFlowchartSync, In as layoutGraphSync, Ya as layoutPieChart, ea as layoutSequenceDiagram, Ca as layoutXYChart, Na as niceTickValues, Xa as pieColorValue, de as pointsToPath, _e as registerElk, _i as renderClassSvg, zi as renderErSvg, us as renderMermaid, as as renderMermaidSVG, cs as renderMermaidSVGAsync, ls as renderMermaidSync, Qa as renderPieSvg, ta as renderSequenceSvg, Yn as renderSvg, La as renderXYChartSvg, oi as resolveCssColors, Ae as resolveFontSizes, Va as smoothCurvePath, rs as themeCssVariables, Gr as withDataSrc, ka as xLabelStep };
4982
5030
 
4983
5031
  //# sourceMappingURL=index.js.map