@versini/sassysaint 8.107.3 → 8.108.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 (91) hide show
  1. package/dist/chunks/{AboutChangelog.BmMVyf-Q.js → AboutChangelog.55tIwnGe.js} +2 -2
  2. package/dist/chunks/{AboutEntry.wD5hG0ON.js → AboutEntry.D1zAHjel.js} +7 -7
  3. package/dist/chunks/{App.FyINLNSp.js → App.Br7HE-y0.js} +1746 -1908
  4. package/dist/chunks/{Bubble.Ci-pu6NI.js → Bubble.Ic_8FEhH.js} +47 -74
  5. package/dist/chunks/{Table.Dzy9ts3i.js → ButtonIconDelete.DRBd_G40.js} +125 -104
  6. package/dist/chunks/{Chart.DYVf2gst.js → Chart.CwIVbBYb.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.CD6bVvcQ.js → ChatBubbleAssistant.DHlLzqdc.js} +199 -208
  8. package/dist/chunks/{ChatBubbleUser.Cre3cX04.js → ChatBubbleUser.D7ksCr76.js} +27 -36
  9. package/dist/chunks/{ChatHistoryTable.D_kOkWN9.js → ChatHistoryTable.DhUDW7QO.js} +108 -121
  10. package/dist/chunks/{HistoryEntry.BFNME4Z8.js → HistoryEntry.BxnMfiXN.js} +6 -6
  11. package/dist/chunks/{LoginEntry.SW7wyEpU.js → LoginEntry.XF9rPWdB.js} +4 -4
  12. package/dist/chunks/{LogoEntry.BAKpdJEy.js → LogoEntry.CnTI8jpv.js} +304 -385
  13. package/dist/chunks/{MemoriesEntry.Ztyx_8Wm.js → MemoriesEntry.BjNXrPW2.js} +164 -169
  14. package/dist/chunks/{ProfileEntry.CjzAusYw.js → ProfileEntry.S6XO2uMT.js} +4 -4
  15. package/dist/chunks/{SettingsEntry.D4IKmfYP.js → SettingsEntry.C5jHUJzu.js} +5 -5
  16. package/dist/chunks/{UsageEntry.D7sTPflE.js → UsageEntry.CQTLPweE.js} +5 -5
  17. package/dist/chunks/_basePickBy.Dj6LWOd3.js +151 -0
  18. package/dist/chunks/_baseUniq.DfiF6jap.js +614 -0
  19. package/dist/chunks/arc.CLrqhM1J.js +83 -0
  20. package/dist/chunks/architecture-U656AL7Q.CuF-GD1P.js +36 -0
  21. package/dist/chunks/architectureDiagram-VXUJARFQ.BGPIWweD.js +4653 -0
  22. package/dist/chunks/blockDiagram-VD42YOAC.cLfUaXxm.js +2254 -0
  23. package/dist/chunks/browser.B8WuOmYx.js +260 -0
  24. package/dist/chunks/c4Diagram-YG6GDRKO.Cc4f8G62.js +1579 -0
  25. package/dist/chunks/channel.D7pUQPat.js +5 -0
  26. package/dist/chunks/chunk-4BX2VUAB.C5gP6CzO.js +8 -0
  27. package/dist/chunks/chunk-55IACEB6.CMTOMhuf.js +8 -0
  28. package/dist/chunks/chunk-B4BG7PRW.CQz5CpXp.js +1375 -0
  29. package/dist/chunks/chunk-DI55MBZ5.C4SOgQau.js +1370 -0
  30. package/dist/chunks/chunk-FMBD7UC4.5tYrPDWZ.js +19 -0
  31. package/dist/chunks/chunk-QN33PNHL.P3o9PZBW.js +19 -0
  32. package/dist/chunks/chunk-QZHKN3VN.COvsjomn.js +15 -0
  33. package/dist/chunks/chunk-TZMSLE5B.C5QPHQlj.js +64 -0
  34. package/dist/chunks/classDiagram-2ON5EDUG.DrIfmpHo.js +16 -0
  35. package/dist/chunks/classDiagram-v2-WZHVMYZB.DrIfmpHo.js +16 -0
  36. package/dist/chunks/clone.47X4nGV4.js +8 -0
  37. package/dist/chunks/cose-bilkent-S5V4N54A.B1umrZne.js +2600 -0
  38. package/dist/chunks/cytoscape.esm.DmRZGnqW.js +18700 -0
  39. package/dist/chunks/dagre-6UL2VRFP.Ce4VSTky.js +444 -0
  40. package/dist/chunks/defaultLocale.CPJLP5jg.js +171 -0
  41. package/dist/chunks/diagram-PSM6KHXK.B1yvSG9p.js +531 -0
  42. package/dist/chunks/diagram-QEK2KX5R.CYDnnLB3.js +217 -0
  43. package/dist/chunks/diagram-S2PKOQOG.BI6w7TZJ.js +142 -0
  44. package/dist/chunks/erDiagram-Q2GNP2WA.D7mTQJ6P.js +841 -0
  45. package/dist/chunks/flowDiagram-NV44I4VS.Col8_E_0.js +1620 -0
  46. package/dist/chunks/ganttDiagram-JELNMOA3.GAUSoSKL.js +2647 -0
  47. package/dist/chunks/gitGraph-F6HP7TQM.3I_jmRrt.js +27 -0
  48. package/dist/chunks/gitGraphDiagram-NY62KEGX.DZQ_LVDe.js +699 -0
  49. package/dist/chunks/graph.BmJVbvPo.js +247 -0
  50. package/dist/chunks/index.Bi0z4EE1.js +90 -0
  51. package/dist/chunks/{index.QiLu2wkI.js → index.C0El17wt.js} +2 -2
  52. package/dist/chunks/{index.DBovegdE.js → index.CUn5zNJg.js} +1 -1
  53. package/dist/chunks/index.CbEVdl_N.js +279 -0
  54. package/dist/chunks/{index.BT3Do9Po.js → index.CoZgV6rn.js} +34 -43
  55. package/dist/chunks/{index.16gcBvke.js → index.DCqTKdor.js} +60 -69
  56. package/dist/chunks/index.DctDXsYU.js +67 -0
  57. package/dist/chunks/{index.BfTDtoYy.js → index.Df-tNwfZ.js} +1 -1
  58. package/dist/chunks/{index.BI1_ccPN.js → index.DxGkXGdu.js} +3 -3
  59. package/dist/chunks/{index.uILjvEfo.js → index.z2e7pMwp.js} +1 -1
  60. package/dist/chunks/info-NVLQJR56.D9ao7_Su.js +27 -0
  61. package/dist/chunks/infoDiagram-WHAUD3N6.DmFB-CXk.js +24 -0
  62. package/dist/chunks/init.DAGnb5BH.js +16 -0
  63. package/dist/chunks/journeyDiagram-XKPGCS4Q.C9FISQxf.js +834 -0
  64. package/dist/chunks/kanban-definition-3W4ZIXB7.ChmJnTyd.js +719 -0
  65. package/dist/chunks/{index.DJlv39cv.js → katex.D0sQThIv.js} +1638 -1943
  66. package/dist/chunks/layout.DtZQLIyC.js +1332 -0
  67. package/dist/chunks/linear.CIDfImUo.js +625 -0
  68. package/dist/chunks/mermaid-parser.core.CO83pegl.js +12724 -0
  69. package/dist/chunks/mindmap-definition-VGOIOE7T.B3dfWebK.js +759 -0
  70. package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
  71. package/dist/chunks/packet-BFZMPI3H.q9qJMgm9.js +27 -0
  72. package/dist/chunks/pie-7BOR55EZ.BTnKDmrp.js +32 -0
  73. package/dist/chunks/pieDiagram-ADFJNKIX.B23eDSnQ.js +161 -0
  74. package/dist/chunks/quadrantDiagram-AYHSOK5B.B3ZIlLhO.js +1022 -0
  75. package/dist/chunks/radar-NHE76QYJ.BeKykujs.js +27 -0
  76. package/dist/chunks/rehype-mermaid.DkS2NcIa.js +14283 -0
  77. package/dist/chunks/requirementDiagram-UZGBJVZJ.0vOl9IL2.js +850 -0
  78. package/dist/chunks/sankeyDiagram-TZEHDZUN.DxwTK65F.js +810 -0
  79. package/dist/chunks/sequenceDiagram-WL72ISMW.BmOg83Gx.js +2511 -0
  80. package/dist/chunks/stateDiagram-FKZM4ZOC.DBiU28Wu.js +263 -0
  81. package/dist/chunks/stateDiagram-v2-4FDKWEC3.B6t8_4cH.js +16 -0
  82. package/dist/chunks/timeline-definition-IT6M3QCI.DpWxwytE.js +795 -0
  83. package/dist/chunks/treemap-KMMF4GRG.KqgFrxbV.js +81 -0
  84. package/dist/chunks/{useMarkdown.BberHabr.js → useMarkdown.CxuK_DLo.js} +2078 -2072
  85. package/dist/chunks/xychartDiagram-PRI3JC2R.CBaIBQ89.js +1340 -0
  86. package/dist/components/SassySaint/SassySaint.js +1 -1
  87. package/dist/index.js +3 -3
  88. package/dist/style.css +1 -1
  89. package/package.json +5 -5
  90. package/dist/chunks/index.BjnVQ4X3.js +0 -99
  91. package/dist/chunks/index.uVDYkuxz.js +0 -297
@@ -0,0 +1,810 @@
1
+ import { __name as g, setDiagramTitle as _t, getDiagramTitle as xt, setAccDescription as vt, getAccDescription as bt, setAccTitle as wt, getAccTitle as St, getConfig2 as lt, select as X, defaultConfig2 as Lt, setupGraphViewbox as Et, clear as At, common_default as Tt } from "./rehype-mermaid.DkS2NcIa.js";
2
+ import { ordinal as Mt } from "./ordinal.EWT-qnu7.js";
3
+ function Nt(t) {
4
+ for (var e = t.length / 6 | 0, i = new Array(e), a = 0; a < e; ) i[a] = "#" + t.slice(a * 6, ++a * 6);
5
+ return i;
6
+ }
7
+ const It = Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
8
+ function ct(t, e) {
9
+ let i;
10
+ if (e === void 0)
11
+ for (const a of t)
12
+ a != null && (i < a || i === void 0 && a >= a) && (i = a);
13
+ else {
14
+ let a = -1;
15
+ for (let h of t)
16
+ (h = e(h, ++a, t)) != null && (i < h || i === void 0 && h >= h) && (i = h);
17
+ }
18
+ return i;
19
+ }
20
+ function pt(t, e) {
21
+ let i;
22
+ if (e === void 0)
23
+ for (const a of t)
24
+ a != null && (i > a || i === void 0 && a >= a) && (i = a);
25
+ else {
26
+ let a = -1;
27
+ for (let h of t)
28
+ (h = e(h, ++a, t)) != null && (i > h || i === void 0 && h >= h) && (i = h);
29
+ }
30
+ return i;
31
+ }
32
+ function nt(t, e) {
33
+ let i = 0;
34
+ if (e === void 0)
35
+ for (let a of t)
36
+ (a = +a) && (i += a);
37
+ else {
38
+ let a = -1;
39
+ for (let h of t)
40
+ (h = +e(h, ++a, t)) && (i += h);
41
+ }
42
+ return i;
43
+ }
44
+ function Pt(t) {
45
+ return t.target.depth;
46
+ }
47
+ function Ct(t) {
48
+ return t.depth;
49
+ }
50
+ function Ot(t, e) {
51
+ return e - 1 - t.height;
52
+ }
53
+ function mt(t, e) {
54
+ return t.sourceLinks.length ? t.depth : e - 1;
55
+ }
56
+ function Dt(t) {
57
+ return t.targetLinks.length ? t.depth : t.sourceLinks.length ? pt(t.sourceLinks, Pt) - 1 : 0;
58
+ }
59
+ function q(t) {
60
+ return function() {
61
+ return t;
62
+ };
63
+ }
64
+ function ut(t, e) {
65
+ return Q(t.source, e.source) || t.index - e.index;
66
+ }
67
+ function ht(t, e) {
68
+ return Q(t.target, e.target) || t.index - e.index;
69
+ }
70
+ function Q(t, e) {
71
+ return t.y0 - e.y0;
72
+ }
73
+ function it(t) {
74
+ return t.value;
75
+ }
76
+ function $t(t) {
77
+ return t.index;
78
+ }
79
+ function zt(t) {
80
+ return t.nodes;
81
+ }
82
+ function jt(t) {
83
+ return t.links;
84
+ }
85
+ function ft(t, e) {
86
+ const i = t.get(e);
87
+ if (!i) throw new Error("missing: " + e);
88
+ return i;
89
+ }
90
+ function yt({ nodes: t }) {
91
+ for (const e of t) {
92
+ let i = e.y0, a = i;
93
+ for (const h of e.sourceLinks)
94
+ h.y0 = i + h.width / 2, i += h.width;
95
+ for (const h of e.targetLinks)
96
+ h.y1 = a + h.width / 2, a += h.width;
97
+ }
98
+ }
99
+ function Bt() {
100
+ let t = 0, e = 0, i = 1, a = 1, h = 24, b = 8, p, k = $t, r = mt, o, l, _ = zt, x = jt, y = 6;
101
+ function v() {
102
+ const n = { nodes: _.apply(null, arguments), links: x.apply(null, arguments) };
103
+ return M(n), T(n), N(n), C(n), S(n), yt(n), n;
104
+ }
105
+ v.update = function(n) {
106
+ return yt(n), n;
107
+ }, v.nodeId = function(n) {
108
+ return arguments.length ? (k = typeof n == "function" ? n : q(n), v) : k;
109
+ }, v.nodeAlign = function(n) {
110
+ return arguments.length ? (r = typeof n == "function" ? n : q(n), v) : r;
111
+ }, v.nodeSort = function(n) {
112
+ return arguments.length ? (o = n, v) : o;
113
+ }, v.nodeWidth = function(n) {
114
+ return arguments.length ? (h = +n, v) : h;
115
+ }, v.nodePadding = function(n) {
116
+ return arguments.length ? (b = p = +n, v) : b;
117
+ }, v.nodes = function(n) {
118
+ return arguments.length ? (_ = typeof n == "function" ? n : q(n), v) : _;
119
+ }, v.links = function(n) {
120
+ return arguments.length ? (x = typeof n == "function" ? n : q(n), v) : x;
121
+ }, v.linkSort = function(n) {
122
+ return arguments.length ? (l = n, v) : l;
123
+ }, v.size = function(n) {
124
+ return arguments.length ? (t = e = 0, i = +n[0], a = +n[1], v) : [i - t, a - e];
125
+ }, v.extent = function(n) {
126
+ return arguments.length ? (t = +n[0][0], i = +n[1][0], e = +n[0][1], a = +n[1][1], v) : [[t, e], [i, a]];
127
+ }, v.iterations = function(n) {
128
+ return arguments.length ? (y = +n, v) : y;
129
+ };
130
+ function M({ nodes: n, links: f }) {
131
+ for (const [c, s] of n.entries())
132
+ s.index = c, s.sourceLinks = [], s.targetLinks = [];
133
+ const u = new Map(n.map((c, s) => [k(c, s, n), c]));
134
+ for (const [c, s] of f.entries()) {
135
+ s.index = c;
136
+ let { source: m, target: w } = s;
137
+ typeof m != "object" && (m = s.source = ft(u, m)), typeof w != "object" && (w = s.target = ft(u, w)), m.sourceLinks.push(s), w.targetLinks.push(s);
138
+ }
139
+ if (l != null)
140
+ for (const { sourceLinks: c, targetLinks: s } of n)
141
+ c.sort(l), s.sort(l);
142
+ }
143
+ function T({ nodes: n }) {
144
+ for (const f of n)
145
+ f.value = f.fixedValue === void 0 ? Math.max(nt(f.sourceLinks, it), nt(f.targetLinks, it)) : f.fixedValue;
146
+ }
147
+ function N({ nodes: n }) {
148
+ const f = n.length;
149
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), s = 0;
150
+ for (; u.size; ) {
151
+ for (const m of u) {
152
+ m.depth = s;
153
+ for (const { target: w } of m.sourceLinks)
154
+ c.add(w);
155
+ }
156
+ if (++s > f) throw new Error("circular link");
157
+ u = c, c = /* @__PURE__ */ new Set();
158
+ }
159
+ }
160
+ function C({ nodes: n }) {
161
+ const f = n.length;
162
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), s = 0;
163
+ for (; u.size; ) {
164
+ for (const m of u) {
165
+ m.height = s;
166
+ for (const { source: w } of m.targetLinks)
167
+ c.add(w);
168
+ }
169
+ if (++s > f) throw new Error("circular link");
170
+ u = c, c = /* @__PURE__ */ new Set();
171
+ }
172
+ }
173
+ function $({ nodes: n }) {
174
+ const f = ct(n, (s) => s.depth) + 1, u = (i - t - h) / (f - 1), c = new Array(f);
175
+ for (const s of n) {
176
+ const m = Math.max(0, Math.min(f - 1, Math.floor(r.call(null, s, f))));
177
+ s.layer = m, s.x0 = t + m * u, s.x1 = s.x0 + h, c[m] ? c[m].push(s) : c[m] = [s];
178
+ }
179
+ if (o) for (const s of c)
180
+ s.sort(o);
181
+ return c;
182
+ }
183
+ function R(n) {
184
+ const f = pt(n, (u) => (a - e - (u.length - 1) * p) / nt(u, it));
185
+ for (const u of n) {
186
+ let c = e;
187
+ for (const s of u) {
188
+ s.y0 = c, s.y1 = c + s.value * f, c = s.y1 + p;
189
+ for (const m of s.sourceLinks)
190
+ m.width = m.value * f;
191
+ }
192
+ c = (a - c + p) / (u.length + 1);
193
+ for (let s = 0; s < u.length; ++s) {
194
+ const m = u[s];
195
+ m.y0 += c * (s + 1), m.y1 += c * (s + 1);
196
+ }
197
+ A(u);
198
+ }
199
+ }
200
+ function S(n) {
201
+ const f = $(n);
202
+ p = Math.min(b, (a - e) / (ct(f, (u) => u.length) - 1)), R(f);
203
+ for (let u = 0; u < y; ++u) {
204
+ const c = Math.pow(0.99, u), s = Math.max(1 - c, (u + 1) / y);
205
+ B(f, c, s), P(f, c, s);
206
+ }
207
+ }
208
+ function P(n, f, u) {
209
+ for (let c = 1, s = n.length; c < s; ++c) {
210
+ const m = n[c];
211
+ for (const w of m) {
212
+ let L = 0, F = 0;
213
+ for (const { source: Y, value: et } of w.targetLinks) {
214
+ let H = et * (w.layer - Y.layer);
215
+ L += z(Y, w) * H, F += H;
216
+ }
217
+ if (!(F > 0)) continue;
218
+ let G = (L / F - w.y0) * f;
219
+ w.y0 += G, w.y1 += G, E(w);
220
+ }
221
+ o === void 0 && m.sort(Q), O(m, u);
222
+ }
223
+ }
224
+ function B(n, f, u) {
225
+ for (let c = n.length, s = c - 2; s >= 0; --s) {
226
+ const m = n[s];
227
+ for (const w of m) {
228
+ let L = 0, F = 0;
229
+ for (const { target: Y, value: et } of w.sourceLinks) {
230
+ let H = et * (Y.layer - w.layer);
231
+ L += I(w, Y) * H, F += H;
232
+ }
233
+ if (!(F > 0)) continue;
234
+ let G = (L / F - w.y0) * f;
235
+ w.y0 += G, w.y1 += G, E(w);
236
+ }
237
+ o === void 0 && m.sort(Q), O(m, u);
238
+ }
239
+ }
240
+ function O(n, f) {
241
+ const u = n.length >> 1, c = n[u];
242
+ d(n, c.y0 - p, u - 1, f), D(n, c.y1 + p, u + 1, f), d(n, a, n.length - 1, f), D(n, e, 0, f);
243
+ }
244
+ function D(n, f, u, c) {
245
+ for (; u < n.length; ++u) {
246
+ const s = n[u], m = (f - s.y0) * c;
247
+ m > 1e-6 && (s.y0 += m, s.y1 += m), f = s.y1 + p;
248
+ }
249
+ }
250
+ function d(n, f, u, c) {
251
+ for (; u >= 0; --u) {
252
+ const s = n[u], m = (s.y1 - f) * c;
253
+ m > 1e-6 && (s.y0 -= m, s.y1 -= m), f = s.y0 - p;
254
+ }
255
+ }
256
+ function E({ sourceLinks: n, targetLinks: f }) {
257
+ if (l === void 0) {
258
+ for (const { source: { sourceLinks: u } } of f)
259
+ u.sort(ht);
260
+ for (const { target: { targetLinks: u } } of n)
261
+ u.sort(ut);
262
+ }
263
+ }
264
+ function A(n) {
265
+ if (l === void 0)
266
+ for (const { sourceLinks: f, targetLinks: u } of n)
267
+ f.sort(ht), u.sort(ut);
268
+ }
269
+ function z(n, f) {
270
+ let u = n.y0 - (n.sourceLinks.length - 1) * p / 2;
271
+ for (const { target: c, width: s } of n.sourceLinks) {
272
+ if (c === f) break;
273
+ u += s + p;
274
+ }
275
+ for (const { source: c, width: s } of f.targetLinks) {
276
+ if (c === n) break;
277
+ u -= s;
278
+ }
279
+ return u;
280
+ }
281
+ function I(n, f) {
282
+ let u = f.y0 - (f.targetLinks.length - 1) * p / 2;
283
+ for (const { source: c, width: s } of f.targetLinks) {
284
+ if (c === n) break;
285
+ u += s + p;
286
+ }
287
+ for (const { target: c, width: s } of n.sourceLinks) {
288
+ if (c === f) break;
289
+ u -= s;
290
+ }
291
+ return u;
292
+ }
293
+ return v;
294
+ }
295
+ var rt = Math.PI, st = 2 * rt, V = 1e-6, Rt = st - V;
296
+ function ot() {
297
+ this._x0 = this._y0 = // start of current subpath
298
+ this._x1 = this._y1 = null, this._ = "";
299
+ }
300
+ function kt() {
301
+ return new ot();
302
+ }
303
+ ot.prototype = kt.prototype = {
304
+ constructor: ot,
305
+ moveTo: function(t, e) {
306
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
307
+ },
308
+ closePath: function() {
309
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
310
+ },
311
+ lineTo: function(t, e) {
312
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
313
+ },
314
+ quadraticCurveTo: function(t, e, i, a) {
315
+ this._ += "Q" + +t + "," + +e + "," + (this._x1 = +i) + "," + (this._y1 = +a);
316
+ },
317
+ bezierCurveTo: function(t, e, i, a, h, b) {
318
+ this._ += "C" + +t + "," + +e + "," + +i + "," + +a + "," + (this._x1 = +h) + "," + (this._y1 = +b);
319
+ },
320
+ arcTo: function(t, e, i, a, h) {
321
+ t = +t, e = +e, i = +i, a = +a, h = +h;
322
+ var b = this._x1, p = this._y1, k = i - t, r = a - e, o = b - t, l = p - e, _ = o * o + l * l;
323
+ if (h < 0) throw new Error("negative radius: " + h);
324
+ if (this._x1 === null)
325
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
326
+ else if (_ > V) if (!(Math.abs(l * k - r * o) > V) || !h)
327
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
328
+ else {
329
+ var x = i - b, y = a - p, v = k * k + r * r, M = x * x + y * y, T = Math.sqrt(v), N = Math.sqrt(_), C = h * Math.tan((rt - Math.acos((v + _ - M) / (2 * T * N))) / 2), $ = C / N, R = C / T;
330
+ Math.abs($ - 1) > V && (this._ += "L" + (t + $ * o) + "," + (e + $ * l)), this._ += "A" + h + "," + h + ",0,0," + +(l * x > o * y) + "," + (this._x1 = t + R * k) + "," + (this._y1 = e + R * r);
331
+ }
332
+ },
333
+ arc: function(t, e, i, a, h, b) {
334
+ t = +t, e = +e, i = +i, b = !!b;
335
+ var p = i * Math.cos(a), k = i * Math.sin(a), r = t + p, o = e + k, l = 1 ^ b, _ = b ? a - h : h - a;
336
+ if (i < 0) throw new Error("negative radius: " + i);
337
+ this._x1 === null ? this._ += "M" + r + "," + o : (Math.abs(this._x1 - r) > V || Math.abs(this._y1 - o) > V) && (this._ += "L" + r + "," + o), i && (_ < 0 && (_ = _ % st + st), _ > Rt ? this._ += "A" + i + "," + i + ",0,1," + l + "," + (t - p) + "," + (e - k) + "A" + i + "," + i + ",0,1," + l + "," + (this._x1 = r) + "," + (this._y1 = o) : _ > V && (this._ += "A" + i + "," + i + ",0," + +(_ >= rt) + "," + l + "," + (this._x1 = t + i * Math.cos(h)) + "," + (this._y1 = e + i * Math.sin(h))));
338
+ },
339
+ rect: function(t, e, i, a) {
340
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +i + "v" + +a + "h" + -i + "Z";
341
+ },
342
+ toString: function() {
343
+ return this._;
344
+ }
345
+ };
346
+ function dt(t) {
347
+ return function() {
348
+ return t;
349
+ };
350
+ }
351
+ function Ft(t) {
352
+ return t[0];
353
+ }
354
+ function Vt(t) {
355
+ return t[1];
356
+ }
357
+ var Wt = Array.prototype.slice;
358
+ function Ut(t) {
359
+ return t.source;
360
+ }
361
+ function Gt(t) {
362
+ return t.target;
363
+ }
364
+ function Yt(t) {
365
+ var e = Ut, i = Gt, a = Ft, h = Vt, b = null;
366
+ function p() {
367
+ var k, r = Wt.call(arguments), o = e.apply(this, r), l = i.apply(this, r);
368
+ if (b || (b = k = kt()), t(b, +a.apply(this, (r[0] = o, r)), +h.apply(this, r), +a.apply(this, (r[0] = l, r)), +h.apply(this, r)), k) return b = null, k + "" || null;
369
+ }
370
+ return p.source = function(k) {
371
+ return arguments.length ? (e = k, p) : e;
372
+ }, p.target = function(k) {
373
+ return arguments.length ? (i = k, p) : i;
374
+ }, p.x = function(k) {
375
+ return arguments.length ? (a = typeof k == "function" ? k : dt(+k), p) : a;
376
+ }, p.y = function(k) {
377
+ return arguments.length ? (h = typeof k == "function" ? k : dt(+k), p) : h;
378
+ }, p.context = function(k) {
379
+ return arguments.length ? (b = k ?? null, p) : b;
380
+ }, p;
381
+ }
382
+ function Ht(t, e, i, a, h) {
383
+ t.moveTo(e, i), t.bezierCurveTo(e = (e + a) / 2, i, e, h, a, h);
384
+ }
385
+ function Xt() {
386
+ return Yt(Ht);
387
+ }
388
+ function qt(t) {
389
+ return [t.source.x1, t.y0];
390
+ }
391
+ function Qt(t) {
392
+ return [t.target.x0, t.y1];
393
+ }
394
+ function Kt() {
395
+ return Xt().source(qt).target(Qt);
396
+ }
397
+ var at = (function() {
398
+ var t = /* @__PURE__ */ g(function(k, r, o, l) {
399
+ for (o = o || {}, l = k.length; l--; o[k[l]] = r) ;
400
+ return o;
401
+ }, "o"), e = [1, 9], i = [1, 10], a = [1, 5, 10, 12], h = {
402
+ trace: /* @__PURE__ */ g(function() {
403
+ }, "trace"),
404
+ yy: {},
405
+ symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
406
+ terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
407
+ productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
408
+ performAction: /* @__PURE__ */ g(function(r, o, l, _, x, y, v) {
409
+ var M = y.length - 1;
410
+ switch (x) {
411
+ case 7:
412
+ const T = _.findOrCreateNode(y[M - 4].trim().replaceAll('""', '"')), N = _.findOrCreateNode(y[M - 2].trim().replaceAll('""', '"')), C = parseFloat(y[M].trim());
413
+ _.addLink(T, N, C);
414
+ break;
415
+ case 8:
416
+ case 9:
417
+ case 11:
418
+ this.$ = y[M];
419
+ break;
420
+ case 10:
421
+ this.$ = y[M - 1];
422
+ break;
423
+ }
424
+ }, "anonymous"),
425
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(i, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(i, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 15: 18, 16: 7, 17: 8, 18: e, 20: i }, { 18: [1, 19] }, t(i, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: e, 20: i }, t([1, 5, 10], [2, 7])],
426
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
427
+ parseError: /* @__PURE__ */ g(function(r, o) {
428
+ if (o.recoverable)
429
+ this.trace(r);
430
+ else {
431
+ var l = new Error(r);
432
+ throw l.hash = o, l;
433
+ }
434
+ }, "parseError"),
435
+ parse: /* @__PURE__ */ g(function(r) {
436
+ var o = this, l = [0], _ = [], x = [null], y = [], v = this.table, M = "", T = 0, N = 0, C = 2, $ = 1, R = y.slice.call(arguments, 1), S = Object.create(this.lexer), P = { yy: {} };
437
+ for (var B in this.yy)
438
+ Object.prototype.hasOwnProperty.call(this.yy, B) && (P.yy[B] = this.yy[B]);
439
+ S.setInput(r, P.yy), P.yy.lexer = S, P.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
440
+ var O = S.yylloc;
441
+ y.push(O);
442
+ var D = S.options && S.options.ranges;
443
+ typeof P.yy.parseError == "function" ? this.parseError = P.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
444
+ function d(L) {
445
+ l.length = l.length - 2 * L, x.length = x.length - L, y.length = y.length - L;
446
+ }
447
+ g(d, "popStack");
448
+ function E() {
449
+ var L;
450
+ return L = _.pop() || S.lex() || $, typeof L != "number" && (L instanceof Array && (_ = L, L = _.pop()), L = o.symbols_[L] || L), L;
451
+ }
452
+ g(E, "lex");
453
+ for (var A, z, I, n, f = {}, u, c, s, m; ; ) {
454
+ if (z = l[l.length - 1], this.defaultActions[z] ? I = this.defaultActions[z] : ((A === null || typeof A > "u") && (A = E()), I = v[z] && v[z][A]), typeof I > "u" || !I.length || !I[0]) {
455
+ var w = "";
456
+ m = [];
457
+ for (u in v[z])
458
+ this.terminals_[u] && u > C && m.push("'" + this.terminals_[u] + "'");
459
+ S.showPosition ? w = "Parse error on line " + (T + 1) + `:
460
+ ` + S.showPosition() + `
461
+ Expecting ` + m.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : w = "Parse error on line " + (T + 1) + ": Unexpected " + (A == $ ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(w, {
462
+ text: S.match,
463
+ token: this.terminals_[A] || A,
464
+ line: S.yylineno,
465
+ loc: O,
466
+ expected: m
467
+ });
468
+ }
469
+ if (I[0] instanceof Array && I.length > 1)
470
+ throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + A);
471
+ switch (I[0]) {
472
+ case 1:
473
+ l.push(A), x.push(S.yytext), y.push(S.yylloc), l.push(I[1]), A = null, N = S.yyleng, M = S.yytext, T = S.yylineno, O = S.yylloc;
474
+ break;
475
+ case 2:
476
+ if (c = this.productions_[I[1]][1], f.$ = x[x.length - c], f._$ = {
477
+ first_line: y[y.length - (c || 1)].first_line,
478
+ last_line: y[y.length - 1].last_line,
479
+ first_column: y[y.length - (c || 1)].first_column,
480
+ last_column: y[y.length - 1].last_column
481
+ }, D && (f._$.range = [
482
+ y[y.length - (c || 1)].range[0],
483
+ y[y.length - 1].range[1]
484
+ ]), n = this.performAction.apply(f, [
485
+ M,
486
+ N,
487
+ T,
488
+ P.yy,
489
+ I[1],
490
+ x,
491
+ y
492
+ ].concat(R)), typeof n < "u")
493
+ return n;
494
+ c && (l = l.slice(0, -1 * c * 2), x = x.slice(0, -1 * c), y = y.slice(0, -1 * c)), l.push(this.productions_[I[1]][0]), x.push(f.$), y.push(f._$), s = v[l[l.length - 2]][l[l.length - 1]], l.push(s);
495
+ break;
496
+ case 3:
497
+ return !0;
498
+ }
499
+ }
500
+ return !0;
501
+ }, "parse")
502
+ }, b = /* @__PURE__ */ (function() {
503
+ var k = {
504
+ EOF: 1,
505
+ parseError: /* @__PURE__ */ g(function(o, l) {
506
+ if (this.yy.parser)
507
+ this.yy.parser.parseError(o, l);
508
+ else
509
+ throw new Error(o);
510
+ }, "parseError"),
511
+ // resets the lexer, sets new input
512
+ setInput: /* @__PURE__ */ g(function(r, o) {
513
+ return this.yy = o || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
514
+ first_line: 1,
515
+ first_column: 0,
516
+ last_line: 1,
517
+ last_column: 0
518
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
519
+ }, "setInput"),
520
+ // consumes and returns one char from the input
521
+ input: /* @__PURE__ */ g(function() {
522
+ var r = this._input[0];
523
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
524
+ var o = r.match(/(?:\r\n?|\n).*/g);
525
+ return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
526
+ }, "input"),
527
+ // unshifts one char (or a string) into the input
528
+ unput: /* @__PURE__ */ g(function(r) {
529
+ var o = r.length, l = r.split(/(?:\r\n?|\n)/g);
530
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
531
+ var _ = this.match.split(/(?:\r\n?|\n)/g);
532
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
533
+ var x = this.yylloc.range;
534
+ return this.yylloc = {
535
+ first_line: this.yylloc.first_line,
536
+ last_line: this.yylineno + 1,
537
+ first_column: this.yylloc.first_column,
538
+ last_column: l ? (l.length === _.length ? this.yylloc.first_column : 0) + _[_.length - l.length].length - l[0].length : this.yylloc.first_column - o
539
+ }, this.options.ranges && (this.yylloc.range = [x[0], x[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
540
+ }, "unput"),
541
+ // When called from action, caches matched text and appends it on next action
542
+ more: /* @__PURE__ */ g(function() {
543
+ return this._more = !0, this;
544
+ }, "more"),
545
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
546
+ reject: /* @__PURE__ */ g(function() {
547
+ if (this.options.backtrack_lexer)
548
+ this._backtrack = !0;
549
+ else
550
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
551
+ ` + this.showPosition(), {
552
+ text: "",
553
+ token: null,
554
+ line: this.yylineno
555
+ });
556
+ return this;
557
+ }, "reject"),
558
+ // retain first n characters of the match
559
+ less: /* @__PURE__ */ g(function(r) {
560
+ this.unput(this.match.slice(r));
561
+ }, "less"),
562
+ // displays already matched input, i.e. for error messages
563
+ pastInput: /* @__PURE__ */ g(function() {
564
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
565
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
566
+ }, "pastInput"),
567
+ // displays upcoming input, i.e. for error messages
568
+ upcomingInput: /* @__PURE__ */ g(function() {
569
+ var r = this.match;
570
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
571
+ }, "upcomingInput"),
572
+ // displays the character position where the lexing error occurred, i.e. for error messages
573
+ showPosition: /* @__PURE__ */ g(function() {
574
+ var r = this.pastInput(), o = new Array(r.length + 1).join("-");
575
+ return r + this.upcomingInput() + `
576
+ ` + o + "^";
577
+ }, "showPosition"),
578
+ // test the lexed token: return FALSE when not a match, otherwise return token
579
+ test_match: /* @__PURE__ */ g(function(r, o) {
580
+ var l, _, x;
581
+ if (this.options.backtrack_lexer && (x = {
582
+ yylineno: this.yylineno,
583
+ yylloc: {
584
+ first_line: this.yylloc.first_line,
585
+ last_line: this.last_line,
586
+ first_column: this.yylloc.first_column,
587
+ last_column: this.yylloc.last_column
588
+ },
589
+ yytext: this.yytext,
590
+ match: this.match,
591
+ matches: this.matches,
592
+ matched: this.matched,
593
+ yyleng: this.yyleng,
594
+ offset: this.offset,
595
+ _more: this._more,
596
+ _input: this._input,
597
+ yy: this.yy,
598
+ conditionStack: this.conditionStack.slice(0),
599
+ done: this.done
600
+ }, this.options.ranges && (x.yylloc.range = this.yylloc.range.slice(0))), _ = r[0].match(/(?:\r\n?|\n).*/g), _ && (this.yylineno += _.length), this.yylloc = {
601
+ first_line: this.yylloc.last_line,
602
+ last_line: this.yylineno + 1,
603
+ first_column: this.yylloc.last_column,
604
+ last_column: _ ? _[_.length - 1].length - _[_.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
605
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
606
+ return l;
607
+ if (this._backtrack) {
608
+ for (var y in x)
609
+ this[y] = x[y];
610
+ return !1;
611
+ }
612
+ return !1;
613
+ }, "test_match"),
614
+ // return next match in input
615
+ next: /* @__PURE__ */ g(function() {
616
+ if (this.done)
617
+ return this.EOF;
618
+ this._input || (this.done = !0);
619
+ var r, o, l, _;
620
+ this._more || (this.yytext = "", this.match = "");
621
+ for (var x = this._currentRules(), y = 0; y < x.length; y++)
622
+ if (l = this._input.match(this.rules[x[y]]), l && (!o || l[0].length > o[0].length)) {
623
+ if (o = l, _ = y, this.options.backtrack_lexer) {
624
+ if (r = this.test_match(l, x[y]), r !== !1)
625
+ return r;
626
+ if (this._backtrack) {
627
+ o = !1;
628
+ continue;
629
+ } else
630
+ return !1;
631
+ } else if (!this.options.flex)
632
+ break;
633
+ }
634
+ return o ? (r = this.test_match(o, x[_]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
635
+ ` + this.showPosition(), {
636
+ text: "",
637
+ token: null,
638
+ line: this.yylineno
639
+ });
640
+ }, "next"),
641
+ // return next match that has a token
642
+ lex: /* @__PURE__ */ g(function() {
643
+ var o = this.next();
644
+ return o || this.lex();
645
+ }, "lex"),
646
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
647
+ begin: /* @__PURE__ */ g(function(o) {
648
+ this.conditionStack.push(o);
649
+ }, "begin"),
650
+ // pop the previously active lexer condition state off the condition stack
651
+ popState: /* @__PURE__ */ g(function() {
652
+ var o = this.conditionStack.length - 1;
653
+ return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
654
+ }, "popState"),
655
+ // produce the lexer rule set which is active for the currently active lexer condition state
656
+ _currentRules: /* @__PURE__ */ g(function() {
657
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
658
+ }, "_currentRules"),
659
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
660
+ topState: /* @__PURE__ */ g(function(o) {
661
+ return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
662
+ }, "topState"),
663
+ // alias for begin(condition)
664
+ pushState: /* @__PURE__ */ g(function(o) {
665
+ this.begin(o);
666
+ }, "pushState"),
667
+ // return the number of states currently on the stack
668
+ stateStackSize: /* @__PURE__ */ g(function() {
669
+ return this.conditionStack.length;
670
+ }, "stateStackSize"),
671
+ options: { "case-insensitive": !0 },
672
+ performAction: /* @__PURE__ */ g(function(o, l, _, x) {
673
+ switch (_) {
674
+ case 0:
675
+ return this.pushState("csv"), 4;
676
+ case 1:
677
+ return this.pushState("csv"), 4;
678
+ case 2:
679
+ return 10;
680
+ case 3:
681
+ return 5;
682
+ case 4:
683
+ return 12;
684
+ case 5:
685
+ return this.pushState("escaped_text"), 18;
686
+ case 6:
687
+ return 20;
688
+ case 7:
689
+ return this.popState("escaped_text"), 18;
690
+ case 8:
691
+ return 19;
692
+ }
693
+ }, "anonymous"),
694
+ rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
695
+ conditions: { csv: { rules: [2, 3, 4, 5, 6, 7, 8], inclusive: !1 }, escaped_text: { rules: [7, 8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8], inclusive: !0 } }
696
+ };
697
+ return k;
698
+ })();
699
+ h.lexer = b;
700
+ function p() {
701
+ this.yy = {};
702
+ }
703
+ return g(p, "Parser"), p.prototype = h, h.Parser = p, new p();
704
+ })();
705
+ at.parser = at;
706
+ var K = at, J = [], tt = [], Z = /* @__PURE__ */ new Map(), Zt = /* @__PURE__ */ g(() => {
707
+ J = [], tt = [], Z = /* @__PURE__ */ new Map(), At();
708
+ }, "clear"), W, Jt = (W = class {
709
+ constructor(e, i, a = 0) {
710
+ this.source = e, this.target = i, this.value = a;
711
+ }
712
+ }, g(W, "SankeyLink"), W), te = /* @__PURE__ */ g((t, e, i) => {
713
+ J.push(new Jt(t, e, i));
714
+ }, "addLink"), U, ee = (U = class {
715
+ constructor(e) {
716
+ this.ID = e;
717
+ }
718
+ }, g(U, "SankeyNode"), U), ne = /* @__PURE__ */ g((t) => {
719
+ t = Tt.sanitizeText(t, lt());
720
+ let e = Z.get(t);
721
+ return e === void 0 && (e = new ee(t), Z.set(t, e), tt.push(e)), e;
722
+ }, "findOrCreateNode"), ie = /* @__PURE__ */ g(() => tt, "getNodes"), re = /* @__PURE__ */ g(() => J, "getLinks"), se = /* @__PURE__ */ g(() => ({
723
+ nodes: tt.map((t) => ({ id: t.ID })),
724
+ links: J.map((t) => ({
725
+ source: t.source.ID,
726
+ target: t.target.ID,
727
+ value: t.value
728
+ }))
729
+ }), "getGraph"), oe = {
730
+ nodesMap: Z,
731
+ getConfig: /* @__PURE__ */ g(() => lt().sankey, "getConfig"),
732
+ getNodes: ie,
733
+ getLinks: re,
734
+ getGraph: se,
735
+ addLink: te,
736
+ findOrCreateNode: ne,
737
+ getAccTitle: St,
738
+ setAccTitle: wt,
739
+ getAccDescription: bt,
740
+ setAccDescription: vt,
741
+ getDiagramTitle: xt,
742
+ setDiagramTitle: _t,
743
+ clear: Zt
744
+ }, j, gt = (j = class {
745
+ static next(e) {
746
+ return new j(e + ++j.count);
747
+ }
748
+ constructor(e) {
749
+ this.id = e, this.href = `#${e}`;
750
+ }
751
+ toString() {
752
+ return "url(" + this.href + ")";
753
+ }
754
+ }, g(j, "Uid"), j.count = 0, j), ae = {
755
+ left: Ct,
756
+ right: Ot,
757
+ center: Dt,
758
+ justify: mt
759
+ }, le = /* @__PURE__ */ g(function(t, e, i, a) {
760
+ const { securityLevel: h, sankey: b } = lt(), p = Lt.sankey;
761
+ let k;
762
+ h === "sandbox" && (k = X("#i" + e));
763
+ const r = h === "sandbox" ? X(k.nodes()[0].contentDocument.body) : X("body"), o = h === "sandbox" ? r.select(`[id="${e}"]`) : X(`[id="${e}"]`), l = b?.width ?? p.width, _ = b?.height ?? p.width, x = b?.useMaxWidth ?? p.useMaxWidth, y = b?.nodeAlignment ?? p.nodeAlignment, v = b?.prefix ?? p.prefix, M = b?.suffix ?? p.suffix, T = b?.showValues ?? p.showValues, N = a.db.getGraph(), C = ae[y];
764
+ Bt().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (T ? 15 : 0)).nodeAlign(C).extent([
765
+ [0, 0],
766
+ [l, _]
767
+ ])(N);
768
+ const S = Mt(It);
769
+ o.append("g").attr("class", "nodes").selectAll(".node").data(N.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = gt.next("node-")).id).attr("transform", function(d) {
770
+ return "translate(" + d.x0 + "," + d.y0 + ")";
771
+ }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => d.y1 - d.y0).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => S(d.id));
772
+ const P = /* @__PURE__ */ g(({ id: d, value: E }) => T ? `${d}
773
+ ${v}${Math.round(E * 100) / 100}${M}` : d, "getText");
774
+ o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(N.nodes).join("text").attr("x", (d) => d.x0 < l / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${T ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < l / 2 ? "start" : "end").text(P);
775
+ const B = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(N.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), O = b?.linkColor ?? "gradient";
776
+ if (O === "gradient") {
777
+ const d = B.append("linearGradient").attr("id", (E) => (E.uid = gt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (E) => E.source.x1).attr("x2", (E) => E.target.x0);
778
+ d.append("stop").attr("offset", "0%").attr("stop-color", (E) => S(E.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (E) => S(E.target.id));
779
+ }
780
+ let D;
781
+ switch (O) {
782
+ case "gradient":
783
+ D = /* @__PURE__ */ g((d) => d.uid, "coloring");
784
+ break;
785
+ case "source":
786
+ D = /* @__PURE__ */ g((d) => S(d.source.id), "coloring");
787
+ break;
788
+ case "target":
789
+ D = /* @__PURE__ */ g((d) => S(d.target.id), "coloring");
790
+ break;
791
+ default:
792
+ D = O;
793
+ }
794
+ B.append("path").attr("d", Kt()).attr("stroke", D).attr("stroke-width", (d) => Math.max(1, d.width)), Et(void 0, o, 0, x);
795
+ }, "draw"), ce = {
796
+ draw: le
797
+ }, ue = /* @__PURE__ */ g((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
798
+ `).trim(), "prepareTextForParsing"), he = /* @__PURE__ */ g((t) => `.label {
799
+ font-family: ${t.fontFamily};
800
+ }`, "getStyles"), fe = he, ye = K.parse.bind(K);
801
+ K.parse = (t) => ye(ue(t));
802
+ var pe = {
803
+ styles: fe,
804
+ parser: K,
805
+ db: oe,
806
+ renderer: ce
807
+ };
808
+ export {
809
+ pe as diagram
810
+ };