@schmitech/chatbot-widget 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
  2. package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
  3. package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
  4. package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
  5. package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
  6. package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
  7. package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
  8. package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +4473 -1556
  10. package/dist/chatbot-widget.css +1 -1
  11. package/dist/chatbot-widget.es.js +12 -63659
  12. package/dist/chatbot-widget.umd.js +4472 -1555
  13. package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
  14. package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
  15. package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
  16. package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
  17. package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
  18. package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
  19. package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
  20. package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
  21. package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
  22. package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
  23. package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
  24. package/dist/config/index.d.ts +4 -2
  25. package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
  26. package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
  27. package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
  28. package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
  29. package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
  30. package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
  31. package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
  32. package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
  33. package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
  34. package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
  35. package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
  36. package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
  37. package/dist/index-B5s_uaP2.js +124168 -0
  38. package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
  39. package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
  40. package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
  43. package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
  44. package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
  45. package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
  46. package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
  47. package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
  49. package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
  50. package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
  51. package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
  52. package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
  53. package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
  54. package/dist/shared/styles.d.ts +1 -1
  55. package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
  57. package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
  58. package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
  59. package/dist/ui/Message.d.ts +1 -5
  60. package/dist/ui/MessagesList.d.ts +1 -5
  61. package/dist/utils/contentFiltering.d.ts +12 -0
  62. package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
  63. package/package.json +3 -3
  64. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,810 @@
1
+ import { x as p, w as xt, z as kt, h as vt, B as bt, u as wt, g as St, p as lt, M as Et, f as Y, ao as Lt, aS as Mt, L as At, n as Tt } from "./index-B5s_uaP2.js";
2
+ typeof window < "u" && (window.global = window);
3
+ function Nt(t) {
4
+ for (var n = t.length / 6 | 0, r = new Array(n), a = 0; a < n; ) r[a] = "#" + t.slice(a * 6, ++a * 6);
5
+ return r;
6
+ }
7
+ const Ot = Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
8
+ function ct(t, n) {
9
+ let r;
10
+ if (n === void 0)
11
+ for (const a of t)
12
+ a != null && (r < a || r === void 0 && a >= a) && (r = a);
13
+ else {
14
+ let a = -1;
15
+ for (let c of t)
16
+ (c = n(c, ++a, t)) != null && (r < c || r === void 0 && c >= c) && (r = c);
17
+ }
18
+ return r;
19
+ }
20
+ function pt(t, n) {
21
+ let r;
22
+ if (n === void 0)
23
+ for (const a of t)
24
+ a != null && (r > a || r === void 0 && a >= a) && (r = a);
25
+ else {
26
+ let a = -1;
27
+ for (let c of t)
28
+ (c = n(c, ++a, t)) != null && (r > c || r === void 0 && c >= c) && (r = c);
29
+ }
30
+ return r;
31
+ }
32
+ function tt(t, n) {
33
+ let r = 0;
34
+ if (n === void 0)
35
+ for (let a of t)
36
+ (a = +a) && (r += a);
37
+ else {
38
+ let a = -1;
39
+ for (let c of t)
40
+ (c = +n(c, ++a, t)) && (r += c);
41
+ }
42
+ return r;
43
+ }
44
+ function Pt(t) {
45
+ return t.target.depth;
46
+ }
47
+ function Ct(t) {
48
+ return t.depth;
49
+ }
50
+ function It(t, n) {
51
+ return n - 1 - t.height;
52
+ }
53
+ function _t(t, n) {
54
+ return t.sourceLinks.length ? t.depth : n - 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 B(t) {
60
+ return function() {
61
+ return t;
62
+ };
63
+ }
64
+ function ut(t, n) {
65
+ return Q(t.source, n.source) || t.index - n.index;
66
+ }
67
+ function ht(t, n) {
68
+ return Q(t.target, n.target) || t.index - n.index;
69
+ }
70
+ function Q(t, n) {
71
+ return t.y0 - n.y0;
72
+ }
73
+ function et(t) {
74
+ return t.value;
75
+ }
76
+ function $t(t) {
77
+ return t.index;
78
+ }
79
+ function jt(t) {
80
+ return t.nodes;
81
+ }
82
+ function zt(t) {
83
+ return t.links;
84
+ }
85
+ function ft(t, n) {
86
+ const r = t.get(n);
87
+ if (!r) throw new Error("missing: " + n);
88
+ return r;
89
+ }
90
+ function yt({ nodes: t }) {
91
+ for (const n of t) {
92
+ let r = n.y0, a = r;
93
+ for (const c of n.sourceLinks)
94
+ c.y0 = r + c.width / 2, r += c.width;
95
+ for (const c of n.targetLinks)
96
+ c.y1 = a + c.width / 2, a += c.width;
97
+ }
98
+ }
99
+ function Ft() {
100
+ let t = 0, n = 0, r = 1, a = 1, c = 24, k = 8, _, m = $t, i = _t, o, f, g = jt, y = zt, w = 6;
101
+ function v() {
102
+ const e = { nodes: g.apply(null, arguments), links: y.apply(null, arguments) };
103
+ return O(e), A(e), T(e), I(e), P(e), yt(e), e;
104
+ }
105
+ v.update = function(e) {
106
+ return yt(e), e;
107
+ }, v.nodeId = function(e) {
108
+ return arguments.length ? (m = typeof e == "function" ? e : B(e), v) : m;
109
+ }, v.nodeAlign = function(e) {
110
+ return arguments.length ? (i = typeof e == "function" ? e : B(e), v) : i;
111
+ }, v.nodeSort = function(e) {
112
+ return arguments.length ? (o = e, v) : o;
113
+ }, v.nodeWidth = function(e) {
114
+ return arguments.length ? (c = +e, v) : c;
115
+ }, v.nodePadding = function(e) {
116
+ return arguments.length ? (k = _ = +e, v) : k;
117
+ }, v.nodes = function(e) {
118
+ return arguments.length ? (g = typeof e == "function" ? e : B(e), v) : g;
119
+ }, v.links = function(e) {
120
+ return arguments.length ? (y = typeof e == "function" ? e : B(e), v) : y;
121
+ }, v.linkSort = function(e) {
122
+ return arguments.length ? (f = e, v) : f;
123
+ }, v.size = function(e) {
124
+ return arguments.length ? (t = n = 0, r = +e[0], a = +e[1], v) : [r - t, a - n];
125
+ }, v.extent = function(e) {
126
+ return arguments.length ? (t = +e[0][0], r = +e[1][0], n = +e[0][1], a = +e[1][1], v) : [[t, n], [r, a]];
127
+ }, v.iterations = function(e) {
128
+ return arguments.length ? (w = +e, v) : w;
129
+ };
130
+ function O({ nodes: e, links: h }) {
131
+ for (const [u, s] of e.entries())
132
+ s.index = u, s.sourceLinks = [], s.targetLinks = [];
133
+ const l = new Map(e.map((u, s) => [m(u, s, e), u]));
134
+ for (const [u, s] of h.entries()) {
135
+ s.index = u;
136
+ let { source: x, target: b } = s;
137
+ typeof x != "object" && (x = s.source = ft(l, x)), typeof b != "object" && (b = s.target = ft(l, b)), x.sourceLinks.push(s), b.targetLinks.push(s);
138
+ }
139
+ if (f != null)
140
+ for (const { sourceLinks: u, targetLinks: s } of e)
141
+ u.sort(f), s.sort(f);
142
+ }
143
+ function A({ nodes: e }) {
144
+ for (const h of e)
145
+ h.value = h.fixedValue === void 0 ? Math.max(tt(h.sourceLinks, et), tt(h.targetLinks, et)) : h.fixedValue;
146
+ }
147
+ function T({ nodes: e }) {
148
+ const h = e.length;
149
+ let l = new Set(e), u = /* @__PURE__ */ new Set(), s = 0;
150
+ for (; l.size; ) {
151
+ for (const x of l) {
152
+ x.depth = s;
153
+ for (const { target: b } of x.sourceLinks)
154
+ u.add(b);
155
+ }
156
+ if (++s > h) throw new Error("circular link");
157
+ l = u, u = /* @__PURE__ */ new Set();
158
+ }
159
+ }
160
+ function I({ nodes: e }) {
161
+ const h = e.length;
162
+ let l = new Set(e), u = /* @__PURE__ */ new Set(), s = 0;
163
+ for (; l.size; ) {
164
+ for (const x of l) {
165
+ x.height = s;
166
+ for (const { source: b } of x.targetLinks)
167
+ u.add(b);
168
+ }
169
+ if (++s > h) throw new Error("circular link");
170
+ l = u, u = /* @__PURE__ */ new Set();
171
+ }
172
+ }
173
+ function N({ nodes: e }) {
174
+ const h = ct(e, (s) => s.depth) + 1, l = (r - t - c) / (h - 1), u = new Array(h);
175
+ for (const s of e) {
176
+ const x = Math.max(0, Math.min(h - 1, Math.floor(i.call(null, s, h))));
177
+ s.layer = x, s.x0 = t + x * l, s.x1 = s.x0 + c, u[x] ? u[x].push(s) : u[x] = [s];
178
+ }
179
+ if (o) for (const s of u)
180
+ s.sort(o);
181
+ return u;
182
+ }
183
+ function S(e) {
184
+ const h = pt(e, (l) => (a - n - (l.length - 1) * _) / tt(l, et));
185
+ for (const l of e) {
186
+ let u = n;
187
+ for (const s of l) {
188
+ s.y0 = u, s.y1 = u + s.value * h, u = s.y1 + _;
189
+ for (const x of s.sourceLinks)
190
+ x.width = x.value * h;
191
+ }
192
+ u = (a - u + _) / (l.length + 1);
193
+ for (let s = 0; s < l.length; ++s) {
194
+ const x = l[s];
195
+ x.y0 += u * (s + 1), x.y1 += u * (s + 1);
196
+ }
197
+ $(l);
198
+ }
199
+ }
200
+ function P(e) {
201
+ const h = N(e);
202
+ _ = Math.min(k, (a - n) / (ct(h, (l) => l.length) - 1)), S(h);
203
+ for (let l = 0; l < w; ++l) {
204
+ const u = Math.pow(0.99, l), s = Math.max(1 - u, (l + 1) / w);
205
+ C(h, u, s), D(h, u, s);
206
+ }
207
+ }
208
+ function D(e, h, l) {
209
+ for (let u = 1, s = e.length; u < s; ++u) {
210
+ const x = e[u];
211
+ for (const b of x) {
212
+ let W = 0, j = 0;
213
+ for (const { source: V, value: H } of b.targetLinks) {
214
+ let X = H * (b.layer - V.layer);
215
+ W += M(V, b) * X, j += X;
216
+ }
217
+ if (!(j > 0)) continue;
218
+ let q = (W / j - b.y0) * h;
219
+ b.y0 += q, b.y1 += q, E(b);
220
+ }
221
+ o === void 0 && x.sort(Q), d(x, l);
222
+ }
223
+ }
224
+ function C(e, h, l) {
225
+ for (let u = e.length, s = u - 2; s >= 0; --s) {
226
+ const x = e[s];
227
+ for (const b of x) {
228
+ let W = 0, j = 0;
229
+ for (const { target: V, value: H } of b.sourceLinks) {
230
+ let X = H * (V.layer - b.layer);
231
+ W += G(b, V) * X, j += X;
232
+ }
233
+ if (!(j > 0)) continue;
234
+ let q = (W / j - b.y0) * h;
235
+ b.y0 += q, b.y1 += q, E(b);
236
+ }
237
+ o === void 0 && x.sort(Q), d(x, l);
238
+ }
239
+ }
240
+ function d(e, h) {
241
+ const l = e.length >> 1, u = e[l];
242
+ U(e, u.y0 - _, l - 1, h), L(e, u.y1 + _, l + 1, h), U(e, a, e.length - 1, h), L(e, n, 0, h);
243
+ }
244
+ function L(e, h, l, u) {
245
+ for (; l < e.length; ++l) {
246
+ const s = e[l], x = (h - s.y0) * u;
247
+ x > 1e-6 && (s.y0 += x, s.y1 += x), h = s.y1 + _;
248
+ }
249
+ }
250
+ function U(e, h, l, u) {
251
+ for (; l >= 0; --l) {
252
+ const s = e[l], x = (s.y1 - h) * u;
253
+ x > 1e-6 && (s.y0 -= x, s.y1 -= x), h = s.y0 - _;
254
+ }
255
+ }
256
+ function E({ sourceLinks: e, targetLinks: h }) {
257
+ if (f === void 0) {
258
+ for (const { source: { sourceLinks: l } } of h)
259
+ l.sort(ht);
260
+ for (const { target: { targetLinks: l } } of e)
261
+ l.sort(ut);
262
+ }
263
+ }
264
+ function $(e) {
265
+ if (f === void 0)
266
+ for (const { sourceLinks: h, targetLinks: l } of e)
267
+ h.sort(ht), l.sort(ut);
268
+ }
269
+ function M(e, h) {
270
+ let l = e.y0 - (e.sourceLinks.length - 1) * _ / 2;
271
+ for (const { target: u, width: s } of e.sourceLinks) {
272
+ if (u === h) break;
273
+ l += s + _;
274
+ }
275
+ for (const { source: u, width: s } of h.targetLinks) {
276
+ if (u === e) break;
277
+ l -= s;
278
+ }
279
+ return l;
280
+ }
281
+ function G(e, h) {
282
+ let l = h.y0 - (h.targetLinks.length - 1) * _ / 2;
283
+ for (const { source: u, width: s } of h.targetLinks) {
284
+ if (u === e) break;
285
+ l += s + _;
286
+ }
287
+ for (const { target: u, width: s } of e.sourceLinks) {
288
+ if (u === h) break;
289
+ l -= s;
290
+ }
291
+ return l;
292
+ }
293
+ return v;
294
+ }
295
+ var rt = Math.PI, st = 2 * rt, z = 1e-6, Ut = st - z;
296
+ function ot() {
297
+ this._x0 = this._y0 = // start of current subpath
298
+ this._x1 = this._y1 = null, this._ = "";
299
+ }
300
+ function mt() {
301
+ return new ot();
302
+ }
303
+ ot.prototype = mt.prototype = {
304
+ constructor: ot,
305
+ moveTo: function(t, n) {
306
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n);
307
+ },
308
+ closePath: function() {
309
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
310
+ },
311
+ lineTo: function(t, n) {
312
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +n);
313
+ },
314
+ quadraticCurveTo: function(t, n, r, a) {
315
+ this._ += "Q" + +t + "," + +n + "," + (this._x1 = +r) + "," + (this._y1 = +a);
316
+ },
317
+ bezierCurveTo: function(t, n, r, a, c, k) {
318
+ this._ += "C" + +t + "," + +n + "," + +r + "," + +a + "," + (this._x1 = +c) + "," + (this._y1 = +k);
319
+ },
320
+ arcTo: function(t, n, r, a, c) {
321
+ t = +t, n = +n, r = +r, a = +a, c = +c;
322
+ var k = this._x1, _ = this._y1, m = r - t, i = a - n, o = k - t, f = _ - n, g = o * o + f * f;
323
+ if (c < 0) throw new Error("negative radius: " + c);
324
+ if (this._x1 === null)
325
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = n);
326
+ else if (g > z) if (!(Math.abs(f * m - i * o) > z) || !c)
327
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = n);
328
+ else {
329
+ var y = r - k, w = a - _, v = m * m + i * i, O = y * y + w * w, A = Math.sqrt(v), T = Math.sqrt(g), I = c * Math.tan((rt - Math.acos((v + g - O) / (2 * A * T))) / 2), N = I / T, S = I / A;
330
+ Math.abs(N - 1) > z && (this._ += "L" + (t + N * o) + "," + (n + N * f)), this._ += "A" + c + "," + c + ",0,0," + +(f * y > o * w) + "," + (this._x1 = t + S * m) + "," + (this._y1 = n + S * i);
331
+ }
332
+ },
333
+ arc: function(t, n, r, a, c, k) {
334
+ t = +t, n = +n, r = +r, k = !!k;
335
+ var _ = r * Math.cos(a), m = r * Math.sin(a), i = t + _, o = n + m, f = 1 ^ k, g = k ? a - c : c - a;
336
+ if (r < 0) throw new Error("negative radius: " + r);
337
+ this._x1 === null ? this._ += "M" + i + "," + o : (Math.abs(this._x1 - i) > z || Math.abs(this._y1 - o) > z) && (this._ += "L" + i + "," + o), r && (g < 0 && (g = g % st + st), g > Ut ? this._ += "A" + r + "," + r + ",0,1," + f + "," + (t - _) + "," + (n - m) + "A" + r + "," + r + ",0,1," + f + "," + (this._x1 = i) + "," + (this._y1 = o) : g > z && (this._ += "A" + r + "," + r + ",0," + +(g >= rt) + "," + f + "," + (this._x1 = t + r * Math.cos(c)) + "," + (this._y1 = n + r * Math.sin(c))));
338
+ },
339
+ rect: function(t, n, r, a) {
340
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +n) + "h" + +r + "v" + +a + "h" + -r + "Z";
341
+ },
342
+ toString: function() {
343
+ return this._;
344
+ }
345
+ };
346
+ function dt(t) {
347
+ return function() {
348
+ return t;
349
+ };
350
+ }
351
+ function Gt(t) {
352
+ return t[0];
353
+ }
354
+ function Wt(t) {
355
+ return t[1];
356
+ }
357
+ var qt = Array.prototype.slice;
358
+ function Vt(t) {
359
+ return t.source;
360
+ }
361
+ function Xt(t) {
362
+ return t.target;
363
+ }
364
+ function Yt(t) {
365
+ var n = Vt, r = Xt, a = Gt, c = Wt, k = null;
366
+ function _() {
367
+ var m, i = qt.call(arguments), o = n.apply(this, i), f = r.apply(this, i);
368
+ if (k || (k = m = mt()), t(k, +a.apply(this, (i[0] = o, i)), +c.apply(this, i), +a.apply(this, (i[0] = f, i)), +c.apply(this, i)), m) return k = null, m + "" || null;
369
+ }
370
+ return _.source = function(m) {
371
+ return arguments.length ? (n = m, _) : n;
372
+ }, _.target = function(m) {
373
+ return arguments.length ? (r = m, _) : r;
374
+ }, _.x = function(m) {
375
+ return arguments.length ? (a = typeof m == "function" ? m : dt(+m), _) : a;
376
+ }, _.y = function(m) {
377
+ return arguments.length ? (c = typeof m == "function" ? m : dt(+m), _) : c;
378
+ }, _.context = function(m) {
379
+ return arguments.length ? (k = m ?? null, _) : k;
380
+ }, _;
381
+ }
382
+ function Bt(t, n, r, a, c) {
383
+ t.moveTo(n, r), t.bezierCurveTo(n = (n + a) / 2, r, n, c, a, c);
384
+ }
385
+ function Qt() {
386
+ return Yt(Bt);
387
+ }
388
+ function Rt(t) {
389
+ return [t.source.x1, t.y0];
390
+ }
391
+ function Kt(t) {
392
+ return [t.target.x0, t.y1];
393
+ }
394
+ function Zt() {
395
+ return Qt().source(Rt).target(Kt);
396
+ }
397
+ var at = function() {
398
+ var t = /* @__PURE__ */ p(function(m, i, o, f) {
399
+ for (o = o || {}, f = m.length; f--; o[m[f]] = i) ;
400
+ return o;
401
+ }, "o"), n = [1, 9], r = [1, 10], a = [1, 5, 10, 12], c = {
402
+ trace: /* @__PURE__ */ p(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__ */ p(function(m, i, o, f, g, y, w) {
409
+ var v = y.length - 1;
410
+ switch (g) {
411
+ case 7:
412
+ const O = f.findOrCreateNode(y[v - 4].trim().replaceAll('""', '"')), A = f.findOrCreateNode(y[v - 2].trim().replaceAll('""', '"')), T = parseFloat(y[v].trim());
413
+ f.addLink(O, A, T);
414
+ break;
415
+ case 8:
416
+ case 9:
417
+ case 11:
418
+ this.$ = y[v];
419
+ break;
420
+ case 10:
421
+ this.$ = y[v - 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: n, 20: r }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(r, [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(r, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: n, 20: r }, { 15: 18, 16: 7, 17: 8, 18: n, 20: r }, { 18: [1, 19] }, t(r, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: n, 20: r }, t([1, 5, 10], [2, 7])],
426
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
427
+ parseError: /* @__PURE__ */ p(function(m, i) {
428
+ if (i.recoverable)
429
+ this.trace(m);
430
+ else {
431
+ var o = new Error(m);
432
+ throw o.hash = i, o;
433
+ }
434
+ }, "parseError"),
435
+ parse: /* @__PURE__ */ p(function(m) {
436
+ var i = this, o = [0], f = [], g = [null], y = [], w = this.table, v = "", O = 0, A = 0, T = 2, I = 1, N = y.slice.call(arguments, 1), S = Object.create(this.lexer), P = { yy: {} };
437
+ for (var D in this.yy)
438
+ Object.prototype.hasOwnProperty.call(this.yy, D) && (P.yy[D] = this.yy[D]);
439
+ S.setInput(m, P.yy), P.yy.lexer = S, P.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
440
+ var C = S.yylloc;
441
+ y.push(C);
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 L(b) {
445
+ o.length = o.length - 2 * b, g.length = g.length - b, y.length = y.length - b;
446
+ }
447
+ p(L, "popStack");
448
+ function U() {
449
+ var b;
450
+ return b = f.pop() || S.lex() || I, typeof b != "number" && (b instanceof Array && (f = b, b = f.pop()), b = i.symbols_[b] || b), b;
451
+ }
452
+ p(U, "lex");
453
+ for (var E, $, M, G, e = {}, h, l, u, s; ; ) {
454
+ if ($ = o[o.length - 1], this.defaultActions[$] ? M = this.defaultActions[$] : ((E === null || typeof E > "u") && (E = U()), M = w[$] && w[$][E]), typeof M > "u" || !M.length || !M[0]) {
455
+ var x = "";
456
+ s = [];
457
+ for (h in w[$])
458
+ this.terminals_[h] && h > T && s.push("'" + this.terminals_[h] + "'");
459
+ S.showPosition ? x = "Parse error on line " + (O + 1) + `:
460
+ ` + S.showPosition() + `
461
+ Expecting ` + s.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : x = "Parse error on line " + (O + 1) + ": Unexpected " + (E == I ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(x, {
462
+ text: S.match,
463
+ token: this.terminals_[E] || E,
464
+ line: S.yylineno,
465
+ loc: C,
466
+ expected: s
467
+ });
468
+ }
469
+ if (M[0] instanceof Array && M.length > 1)
470
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + E);
471
+ switch (M[0]) {
472
+ case 1:
473
+ o.push(E), g.push(S.yytext), y.push(S.yylloc), o.push(M[1]), E = null, A = S.yyleng, v = S.yytext, O = S.yylineno, C = S.yylloc;
474
+ break;
475
+ case 2:
476
+ if (l = this.productions_[M[1]][1], e.$ = g[g.length - l], e._$ = {
477
+ first_line: y[y.length - (l || 1)].first_line,
478
+ last_line: y[y.length - 1].last_line,
479
+ first_column: y[y.length - (l || 1)].first_column,
480
+ last_column: y[y.length - 1].last_column
481
+ }, d && (e._$.range = [
482
+ y[y.length - (l || 1)].range[0],
483
+ y[y.length - 1].range[1]
484
+ ]), G = this.performAction.apply(e, [
485
+ v,
486
+ A,
487
+ O,
488
+ P.yy,
489
+ M[1],
490
+ g,
491
+ y
492
+ ].concat(N)), typeof G < "u")
493
+ return G;
494
+ l && (o = o.slice(0, -1 * l * 2), g = g.slice(0, -1 * l), y = y.slice(0, -1 * l)), o.push(this.productions_[M[1]][0]), g.push(e.$), y.push(e._$), u = w[o[o.length - 2]][o[o.length - 1]], o.push(u);
495
+ break;
496
+ case 3:
497
+ return !0;
498
+ }
499
+ }
500
+ return !0;
501
+ }, "parse")
502
+ }, k = /* @__PURE__ */ function() {
503
+ var m = {
504
+ EOF: 1,
505
+ parseError: /* @__PURE__ */ p(function(i, o) {
506
+ if (this.yy.parser)
507
+ this.yy.parser.parseError(i, o);
508
+ else
509
+ throw new Error(i);
510
+ }, "parseError"),
511
+ // resets the lexer, sets new input
512
+ setInput: /* @__PURE__ */ p(function(i, o) {
513
+ return this.yy = o || this.yy || {}, this._input = i, 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__ */ p(function() {
522
+ var i = this._input[0];
523
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
524
+ var o = i.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), i;
526
+ }, "input"),
527
+ // unshifts one char (or a string) into the input
528
+ unput: /* @__PURE__ */ p(function(i) {
529
+ var o = i.length, f = i.split(/(?:\r\n?|\n)/g);
530
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
531
+ var g = 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), f.length - 1 && (this.yylineno -= f.length - 1);
533
+ var y = 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: f ? (f.length === g.length ? this.yylloc.first_column : 0) + g[g.length - f.length].length - f[0].length : this.yylloc.first_column - o
539
+ }, this.options.ranges && (this.yylloc.range = [y[0], y[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__ */ p(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__ */ p(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__ */ p(function(i) {
560
+ this.unput(this.match.slice(i));
561
+ }, "less"),
562
+ // displays already matched input, i.e. for error messages
563
+ pastInput: /* @__PURE__ */ p(function() {
564
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
565
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
566
+ }, "pastInput"),
567
+ // displays upcoming input, i.e. for error messages
568
+ upcomingInput: /* @__PURE__ */ p(function() {
569
+ var i = this.match;
570
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.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__ */ p(function() {
574
+ var i = this.pastInput(), o = new Array(i.length + 1).join("-");
575
+ return i + this.upcomingInput() + `
576
+ ` + o + "^";
577
+ }, "showPosition"),
578
+ // test the lexed token: return FALSE when not a match, otherwise return token
579
+ test_match: /* @__PURE__ */ p(function(i, o) {
580
+ var f, g, y;
581
+ if (this.options.backtrack_lexer && (y = {
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 && (y.yylloc.range = this.yylloc.range.slice(0))), g = i[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.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: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
605
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], f = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
606
+ return f;
607
+ if (this._backtrack) {
608
+ for (var w in y)
609
+ this[w] = y[w];
610
+ return !1;
611
+ }
612
+ return !1;
613
+ }, "test_match"),
614
+ // return next match in input
615
+ next: /* @__PURE__ */ p(function() {
616
+ if (this.done)
617
+ return this.EOF;
618
+ this._input || (this.done = !0);
619
+ var i, o, f, g;
620
+ this._more || (this.yytext = "", this.match = "");
621
+ for (var y = this._currentRules(), w = 0; w < y.length; w++)
622
+ if (f = this._input.match(this.rules[y[w]]), f && (!o || f[0].length > o[0].length)) {
623
+ if (o = f, g = w, this.options.backtrack_lexer) {
624
+ if (i = this.test_match(f, y[w]), i !== !1)
625
+ return i;
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 ? (i = this.test_match(o, y[g]), i !== !1 ? i : !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__ */ p(function() {
643
+ var i = this.next();
644
+ return i || this.lex();
645
+ }, "lex"),
646
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
647
+ begin: /* @__PURE__ */ p(function(i) {
648
+ this.conditionStack.push(i);
649
+ }, "begin"),
650
+ // pop the previously active lexer condition state off the condition stack
651
+ popState: /* @__PURE__ */ p(function() {
652
+ var i = this.conditionStack.length - 1;
653
+ return i > 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__ */ p(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__ */ p(function(i) {
661
+ return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
662
+ }, "topState"),
663
+ // alias for begin(condition)
664
+ pushState: /* @__PURE__ */ p(function(i) {
665
+ this.begin(i);
666
+ }, "pushState"),
667
+ // return the number of states currently on the stack
668
+ stateStackSize: /* @__PURE__ */ p(function() {
669
+ return this.conditionStack.length;
670
+ }, "stateStackSize"),
671
+ options: { "case-insensitive": !0 },
672
+ performAction: /* @__PURE__ */ p(function(i, o, f, g) {
673
+ switch (f) {
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 m;
698
+ }();
699
+ c.lexer = k;
700
+ function _() {
701
+ this.yy = {};
702
+ }
703
+ return p(_, "Parser"), _.prototype = c, c.Parser = _, new _();
704
+ }();
705
+ at.parser = at;
706
+ var R = at, Z = [], J = [], K = /* @__PURE__ */ new Map(), Jt = /* @__PURE__ */ p(() => {
707
+ Z = [], J = [], K = /* @__PURE__ */ new Map(), At();
708
+ }, "clear"), nt, Ht = (nt = class {
709
+ constructor(t, n, r = 0) {
710
+ this.source = t, this.target = n, this.value = r;
711
+ }
712
+ }, p(nt, "SankeyLink"), nt), te = /* @__PURE__ */ p((t, n, r) => {
713
+ Z.push(new Ht(t, n, r));
714
+ }, "addLink"), it, ee = (it = class {
715
+ constructor(t) {
716
+ this.ID = t;
717
+ }
718
+ }, p(it, "SankeyNode"), it), ne = /* @__PURE__ */ p((t) => {
719
+ t = Tt.sanitizeText(t, lt());
720
+ let n = K.get(t);
721
+ return n === void 0 && (n = new ee(t), K.set(t, n), J.push(n)), n;
722
+ }, "findOrCreateNode"), ie = /* @__PURE__ */ p(() => J, "getNodes"), re = /* @__PURE__ */ p(() => Z, "getLinks"), se = /* @__PURE__ */ p(() => ({
723
+ nodes: J.map((t) => ({ id: t.ID })),
724
+ links: Z.map((t) => ({
725
+ source: t.source.ID,
726
+ target: t.target.ID,
727
+ value: t.value
728
+ }))
729
+ }), "getGraph"), oe = {
730
+ nodesMap: K,
731
+ getConfig: /* @__PURE__ */ p(() => 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: kt,
742
+ setDiagramTitle: xt,
743
+ clear: Jt
744
+ }, F, gt = (F = class {
745
+ static next(t) {
746
+ return new F(t + ++F.count);
747
+ }
748
+ constructor(t) {
749
+ this.id = t, this.href = `#${t}`;
750
+ }
751
+ toString() {
752
+ return "url(" + this.href + ")";
753
+ }
754
+ }, p(F, "Uid"), F.count = 0, F), ae = {
755
+ left: Ct,
756
+ right: It,
757
+ center: Dt,
758
+ justify: _t
759
+ }, le = /* @__PURE__ */ p(function(t, n, r, a) {
760
+ const { securityLevel: c, sankey: k } = lt(), _ = Et.sankey;
761
+ let m;
762
+ c === "sandbox" && (m = Y("#i" + n));
763
+ const i = c === "sandbox" ? Y(m.nodes()[0].contentDocument.body) : Y("body"), o = c === "sandbox" ? i.select(`[id="${n}"]`) : Y(`[id="${n}"]`), f = (k == null ? void 0 : k.width) ?? _.width, g = (k == null ? void 0 : k.height) ?? _.width, y = (k == null ? void 0 : k.useMaxWidth) ?? _.useMaxWidth, w = (k == null ? void 0 : k.nodeAlignment) ?? _.nodeAlignment, v = (k == null ? void 0 : k.prefix) ?? _.prefix, O = (k == null ? void 0 : k.suffix) ?? _.suffix, A = (k == null ? void 0 : k.showValues) ?? _.showValues, T = a.db.getGraph(), I = ae[w];
764
+ Ft().nodeId((d) => d.id).nodeWidth(10).nodePadding(10 + (A ? 15 : 0)).nodeAlign(I).extent([
765
+ [0, 0],
766
+ [f, g]
767
+ ])(T);
768
+ const N = Lt(Ot);
769
+ o.append("g").attr("class", "nodes").selectAll(".node").data(T.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) => N(d.id));
772
+ const S = /* @__PURE__ */ p(({ id: d, value: L }) => A ? `${d}
773
+ ${v}${Math.round(L * 100) / 100}${O}` : d, "getText");
774
+ o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(T.nodes).join("text").attr("x", (d) => d.x0 < f / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${A ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < f / 2 ? "start" : "end").text(S);
775
+ const P = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(T.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), D = (k == null ? void 0 : k.linkColor) ?? "gradient";
776
+ if (D === "gradient") {
777
+ const d = P.append("linearGradient").attr("id", (L) => (L.uid = gt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (L) => L.source.x1).attr("x2", (L) => L.target.x0);
778
+ d.append("stop").attr("offset", "0%").attr("stop-color", (L) => N(L.source.id)), d.append("stop").attr("offset", "100%").attr("stop-color", (L) => N(L.target.id));
779
+ }
780
+ let C;
781
+ switch (D) {
782
+ case "gradient":
783
+ C = /* @__PURE__ */ p((d) => d.uid, "coloring");
784
+ break;
785
+ case "source":
786
+ C = /* @__PURE__ */ p((d) => N(d.source.id), "coloring");
787
+ break;
788
+ case "target":
789
+ C = /* @__PURE__ */ p((d) => N(d.target.id), "coloring");
790
+ break;
791
+ default:
792
+ C = D;
793
+ }
794
+ P.append("path").attr("d", Zt()).attr("stroke", C).attr("stroke-width", (d) => Math.max(1, d.width)), Mt(void 0, o, 0, y);
795
+ }, "draw"), ce = {
796
+ draw: le
797
+ }, ue = /* @__PURE__ */ p((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
798
+ `).trim(), "prepareTextForParsing"), he = /* @__PURE__ */ p((t) => `.label {
799
+ font-family: ${t.fontFamily};
800
+ }`, "getStyles"), fe = he, ye = R.parse.bind(R);
801
+ R.parse = (t) => ye(ue(t));
802
+ var ge = {
803
+ styles: fe,
804
+ parser: R,
805
+ db: oe,
806
+ renderer: ce
807
+ };
808
+ export {
809
+ ge as diagram
810
+ };