@umami/shiso 1.12.0 → 1.13.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 (121) hide show
  1. package/dist/chunks/App.js +76 -49
  2. package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
  3. package/dist/chunks/arc.js +130 -0
  4. package/dist/chunks/architecture-7GRP2DOG.js +4 -0
  5. package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
  6. package/dist/chunks/array.js +8 -0
  7. package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
  8. package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
  9. package/dist/chunks/channel.js +9 -0
  10. package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
  11. package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
  12. package/dist/chunks/chunk-5VM5RSS4.js +21 -0
  13. package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
  14. package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
  15. package/dist/chunks/chunk-F27PBJKO.js +95 -0
  16. package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
  17. package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
  18. package/dist/chunks/chunk-GVQU2GXP.js +58 -0
  19. package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
  20. package/dist/chunks/chunk-JWPE2WC7.js +12 -0
  21. package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
  22. package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
  23. package/dist/chunks/chunk-P2QGCYS3.js +95 -0
  24. package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
  25. package/dist/chunks/chunk-PWAF6VOD.js +467 -0
  26. package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
  27. package/dist/chunks/chunk-SVP7TREG.js +686 -0
  28. package/dist/chunks/chunk-TICWLB2K.js +3800 -0
  29. package/dist/chunks/chunk-XXDRQBXY.js +12 -0
  30. package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
  31. package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
  32. package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
  33. package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
  34. package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
  35. package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
  36. package/dist/chunks/cytoscape.esm.js +28282 -0
  37. package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
  38. package/dist/chunks/dagre.js +4235 -0
  39. package/dist/chunks/defaultLocale.js +246 -0
  40. package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
  41. package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
  42. package/dist/chunks/diagram-VSXAHHWV.js +553 -0
  43. package/dist/chunks/diagram-VX7I27RA.js +798 -0
  44. package/dist/chunks/diagram-Z3DM3KII.js +186 -0
  45. package/dist/chunks/dist.js +92 -0
  46. package/dist/chunks/docs.js +987 -91
  47. package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
  48. package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
  49. package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
  50. package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
  51. package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
  52. package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
  53. package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
  54. package/dist/chunks/graphlib.js +4194 -0
  55. package/dist/chunks/info-A6RAGUB7.js +4 -0
  56. package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
  57. package/dist/chunks/init.js +14 -0
  58. package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
  59. package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
  60. package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
  61. package/dist/chunks/katex.js +26463 -0
  62. package/dist/chunks/line.js +48 -0
  63. package/dist/chunks/linear.js +391 -0
  64. package/dist/chunks/mermaid-parser.core.js +754 -0
  65. package/dist/chunks/mermaid.core.js +4898 -0
  66. package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
  67. package/dist/chunks/ordinal.js +84 -0
  68. package/dist/chunks/packet-AYTQ26CC.js +4 -0
  69. package/dist/chunks/path.js +106 -0
  70. package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
  71. package/dist/chunks/pie-WAS4IAKB.js +4 -0
  72. package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
  73. package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
  74. package/dist/chunks/radar-RG4KPBEZ.js +4 -0
  75. package/dist/chunks/railroad-74A4TZTK.js +4 -0
  76. package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
  77. package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
  78. package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
  79. package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
  80. package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
  81. package/dist/chunks/rough.esm.js +1396 -0
  82. package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
  83. package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
  84. package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
  85. package/dist/chunks/src.js +2653 -0
  86. package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
  87. package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
  88. package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
  89. package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
  90. package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
  91. package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
  92. package/dist/chunks/treemap-WGGIJYW6.js +4 -0
  93. package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
  94. package/dist/chunks/wardley-WFR3VGLG.js +4 -0
  95. package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
  96. package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
  97. package/dist/components.js +2 -2
  98. package/dist/entry-client.js +1 -1
  99. package/dist/entry-server.js +1 -1
  100. package/docs.schema.json +1 -1
  101. package/package.json +2 -1
  102. package/scripts/expand-navigation-globs.mjs +77 -8
  103. package/src/components/CodeBlock.tsx +36 -0
  104. package/src/components/Docs.tsx +44 -21
  105. package/src/components/OpenApiOperation.tsx +28 -20
  106. package/src/components/SideNav.tsx +8 -3
  107. package/src/components/docs/Changelog.tsx +163 -0
  108. package/src/components/docs/Mermaid.tsx +164 -0
  109. package/src/components/docs/Panel.tsx +23 -0
  110. package/src/components/docs/ParamField.tsx +17 -5
  111. package/src/components/docs/PropertiesTable.tsx +2 -2
  112. package/src/components/docs/ResponseField.tsx +17 -5
  113. package/src/components/docs/Tiles.tsx +59 -0
  114. package/src/components/docs/Tree.tsx +359 -0
  115. package/src/components/docs/Update.tsx +72 -0
  116. package/src/components/docs/index.ts +7 -0
  117. package/src/components/docs/panel-context.tsx +25 -0
  118. package/src/components/docs/styles.ts +49 -0
  119. package/src/components/icons/index.ts +4 -0
  120. package/src/lib/rehype-shiki.ts +18 -1
  121. package/types/components.d.ts +79 -0
@@ -0,0 +1,2185 @@
1
+ import { n as __name } from "./chunk-Y2CYZVJY.js";
2
+ import { m as log, p as select_default } from "./src.js";
3
+ import { R as sanitizeDirective, h as directiveRegex, p as detectType, r as assignWithDepth_default, s as common_default } from "./chunk-DU6HZSFF.js";
4
+ import { s as epsilon, t as require_dist } from "./dist.js";
5
+
6
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js
7
+ function Linear(context) {
8
+ this._context = context;
9
+ }
10
+ Linear.prototype = {
11
+ areaStart: function() {
12
+ this._line = 0;
13
+ },
14
+ areaEnd: function() {
15
+ this._line = NaN;
16
+ },
17
+ lineStart: function() {
18
+ this._point = 0;
19
+ },
20
+ lineEnd: function() {
21
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
22
+ this._line = 1 - this._line;
23
+ },
24
+ point: function(x, y) {
25
+ x = +x, y = +y;
26
+ switch (this._point) {
27
+ case 0:
28
+ this._point = 1;
29
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
30
+ break;
31
+ case 1: this._point = 2;
32
+ default: this._context.lineTo(x, y);
33
+ }
34
+ }
35
+ };
36
+ function linear_default(context) {
37
+ return new Linear(context);
38
+ }
39
+
40
+ //#endregion
41
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.js
42
+ var Bump = class {
43
+ constructor(context, x) {
44
+ this._context = context;
45
+ this._x = x;
46
+ }
47
+ areaStart() {
48
+ this._line = 0;
49
+ }
50
+ areaEnd() {
51
+ this._line = NaN;
52
+ }
53
+ lineStart() {
54
+ this._point = 0;
55
+ }
56
+ lineEnd() {
57
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
58
+ this._line = 1 - this._line;
59
+ }
60
+ point(x, y) {
61
+ x = +x, y = +y;
62
+ switch (this._point) {
63
+ case 0:
64
+ this._point = 1;
65
+ if (this._line) this._context.lineTo(x, y);
66
+ else this._context.moveTo(x, y);
67
+ break;
68
+ case 1: this._point = 2;
69
+ default: if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);
70
+ else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);
71
+ }
72
+ this._x0 = x, this._y0 = y;
73
+ }
74
+ };
75
+ function bumpX(context) {
76
+ return new Bump(context, true);
77
+ }
78
+ function bumpY(context) {
79
+ return new Bump(context, false);
80
+ }
81
+
82
+ //#endregion
83
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/noop.js
84
+ function noop_default() {}
85
+
86
+ //#endregion
87
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basis.js
88
+ function point$3(that, x, y) {
89
+ that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
90
+ }
91
+ function Basis(context) {
92
+ this._context = context;
93
+ }
94
+ Basis.prototype = {
95
+ areaStart: function() {
96
+ this._line = 0;
97
+ },
98
+ areaEnd: function() {
99
+ this._line = NaN;
100
+ },
101
+ lineStart: function() {
102
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
103
+ this._point = 0;
104
+ },
105
+ lineEnd: function() {
106
+ switch (this._point) {
107
+ case 3: point$3(this, this._x1, this._y1);
108
+ case 2: this._context.lineTo(this._x1, this._y1);
109
+ }
110
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
111
+ this._line = 1 - this._line;
112
+ },
113
+ point: function(x, y) {
114
+ x = +x, y = +y;
115
+ switch (this._point) {
116
+ case 0:
117
+ this._point = 1;
118
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
119
+ break;
120
+ case 1:
121
+ this._point = 2;
122
+ break;
123
+ case 2:
124
+ this._point = 3;
125
+ this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
126
+ default: point$3(this, x, y);
127
+ }
128
+ this._x0 = this._x1, this._x1 = x;
129
+ this._y0 = this._y1, this._y1 = y;
130
+ }
131
+ };
132
+ function basis_default(context) {
133
+ return new Basis(context);
134
+ }
135
+
136
+ //#endregion
137
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisClosed.js
138
+ function BasisClosed(context) {
139
+ this._context = context;
140
+ }
141
+ BasisClosed.prototype = {
142
+ areaStart: noop_default,
143
+ areaEnd: noop_default,
144
+ lineStart: function() {
145
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
146
+ this._point = 0;
147
+ },
148
+ lineEnd: function() {
149
+ switch (this._point) {
150
+ case 1:
151
+ this._context.moveTo(this._x2, this._y2);
152
+ this._context.closePath();
153
+ break;
154
+ case 2:
155
+ this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
156
+ this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
157
+ this._context.closePath();
158
+ break;
159
+ case 3:
160
+ this.point(this._x2, this._y2);
161
+ this.point(this._x3, this._y3);
162
+ this.point(this._x4, this._y4);
163
+ }
164
+ },
165
+ point: function(x, y) {
166
+ x = +x, y = +y;
167
+ switch (this._point) {
168
+ case 0:
169
+ this._point = 1;
170
+ this._x2 = x, this._y2 = y;
171
+ break;
172
+ case 1:
173
+ this._point = 2;
174
+ this._x3 = x, this._y3 = y;
175
+ break;
176
+ case 2:
177
+ this._point = 3;
178
+ this._x4 = x, this._y4 = y;
179
+ this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
180
+ break;
181
+ default: point$3(this, x, y);
182
+ }
183
+ this._x0 = this._x1, this._x1 = x;
184
+ this._y0 = this._y1, this._y1 = y;
185
+ }
186
+ };
187
+ function basisClosed_default(context) {
188
+ return new BasisClosed(context);
189
+ }
190
+
191
+ //#endregion
192
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisOpen.js
193
+ function BasisOpen(context) {
194
+ this._context = context;
195
+ }
196
+ BasisOpen.prototype = {
197
+ areaStart: function() {
198
+ this._line = 0;
199
+ },
200
+ areaEnd: function() {
201
+ this._line = NaN;
202
+ },
203
+ lineStart: function() {
204
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN;
205
+ this._point = 0;
206
+ },
207
+ lineEnd: function() {
208
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
209
+ this._line = 1 - this._line;
210
+ },
211
+ point: function(x, y) {
212
+ x = +x, y = +y;
213
+ switch (this._point) {
214
+ case 0:
215
+ this._point = 1;
216
+ break;
217
+ case 1:
218
+ this._point = 2;
219
+ break;
220
+ case 2:
221
+ this._point = 3;
222
+ var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6;
223
+ this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);
224
+ break;
225
+ case 3: this._point = 4;
226
+ default: point$3(this, x, y);
227
+ }
228
+ this._x0 = this._x1, this._x1 = x;
229
+ this._y0 = this._y1, this._y1 = y;
230
+ }
231
+ };
232
+ function basisOpen_default(context) {
233
+ return new BasisOpen(context);
234
+ }
235
+
236
+ //#endregion
237
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bundle.js
238
+ function Bundle(context, beta) {
239
+ this._basis = new Basis(context);
240
+ this._beta = beta;
241
+ }
242
+ Bundle.prototype = {
243
+ lineStart: function() {
244
+ this._x = [];
245
+ this._y = [];
246
+ this._basis.lineStart();
247
+ },
248
+ lineEnd: function() {
249
+ var x = this._x, y = this._y, j = x.length - 1;
250
+ if (j > 0) {
251
+ var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t;
252
+ while (++i <= j) {
253
+ t = i / j;
254
+ this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));
255
+ }
256
+ }
257
+ this._x = this._y = null;
258
+ this._basis.lineEnd();
259
+ },
260
+ point: function(x, y) {
261
+ this._x.push(+x);
262
+ this._y.push(+y);
263
+ }
264
+ };
265
+ var bundle_default = (function custom(beta) {
266
+ function bundle(context) {
267
+ return beta === 1 ? new Basis(context) : new Bundle(context, beta);
268
+ }
269
+ bundle.beta = function(beta) {
270
+ return custom(+beta);
271
+ };
272
+ return bundle;
273
+ })(.85);
274
+
275
+ //#endregion
276
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinal.js
277
+ function point$2(that, x, y) {
278
+ that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
279
+ }
280
+ function Cardinal(context, tension) {
281
+ this._context = context;
282
+ this._k = (1 - tension) / 6;
283
+ }
284
+ Cardinal.prototype = {
285
+ areaStart: function() {
286
+ this._line = 0;
287
+ },
288
+ areaEnd: function() {
289
+ this._line = NaN;
290
+ },
291
+ lineStart: function() {
292
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
293
+ this._point = 0;
294
+ },
295
+ lineEnd: function() {
296
+ switch (this._point) {
297
+ case 2:
298
+ this._context.lineTo(this._x2, this._y2);
299
+ break;
300
+ case 3: point$2(this, this._x1, this._y1);
301
+ }
302
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
303
+ this._line = 1 - this._line;
304
+ },
305
+ point: function(x, y) {
306
+ x = +x, y = +y;
307
+ switch (this._point) {
308
+ case 0:
309
+ this._point = 1;
310
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
311
+ break;
312
+ case 1:
313
+ this._point = 2;
314
+ this._x1 = x, this._y1 = y;
315
+ break;
316
+ case 2: this._point = 3;
317
+ default: point$2(this, x, y);
318
+ }
319
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
320
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
321
+ }
322
+ };
323
+ var cardinal_default = (function custom(tension) {
324
+ function cardinal(context) {
325
+ return new Cardinal(context, tension);
326
+ }
327
+ cardinal.tension = function(tension) {
328
+ return custom(+tension);
329
+ };
330
+ return cardinal;
331
+ })(0);
332
+
333
+ //#endregion
334
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalClosed.js
335
+ function CardinalClosed(context, tension) {
336
+ this._context = context;
337
+ this._k = (1 - tension) / 6;
338
+ }
339
+ CardinalClosed.prototype = {
340
+ areaStart: noop_default,
341
+ areaEnd: noop_default,
342
+ lineStart: function() {
343
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
344
+ this._point = 0;
345
+ },
346
+ lineEnd: function() {
347
+ switch (this._point) {
348
+ case 1:
349
+ this._context.moveTo(this._x3, this._y3);
350
+ this._context.closePath();
351
+ break;
352
+ case 2:
353
+ this._context.lineTo(this._x3, this._y3);
354
+ this._context.closePath();
355
+ break;
356
+ case 3:
357
+ this.point(this._x3, this._y3);
358
+ this.point(this._x4, this._y4);
359
+ this.point(this._x5, this._y5);
360
+ }
361
+ },
362
+ point: function(x, y) {
363
+ x = +x, y = +y;
364
+ switch (this._point) {
365
+ case 0:
366
+ this._point = 1;
367
+ this._x3 = x, this._y3 = y;
368
+ break;
369
+ case 1:
370
+ this._point = 2;
371
+ this._context.moveTo(this._x4 = x, this._y4 = y);
372
+ break;
373
+ case 2:
374
+ this._point = 3;
375
+ this._x5 = x, this._y5 = y;
376
+ break;
377
+ default: point$2(this, x, y);
378
+ }
379
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
380
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
381
+ }
382
+ };
383
+ var cardinalClosed_default = (function custom(tension) {
384
+ function cardinal(context) {
385
+ return new CardinalClosed(context, tension);
386
+ }
387
+ cardinal.tension = function(tension) {
388
+ return custom(+tension);
389
+ };
390
+ return cardinal;
391
+ })(0);
392
+
393
+ //#endregion
394
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalOpen.js
395
+ function CardinalOpen(context, tension) {
396
+ this._context = context;
397
+ this._k = (1 - tension) / 6;
398
+ }
399
+ CardinalOpen.prototype = {
400
+ areaStart: function() {
401
+ this._line = 0;
402
+ },
403
+ areaEnd: function() {
404
+ this._line = NaN;
405
+ },
406
+ lineStart: function() {
407
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
408
+ this._point = 0;
409
+ },
410
+ lineEnd: function() {
411
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
412
+ this._line = 1 - this._line;
413
+ },
414
+ point: function(x, y) {
415
+ x = +x, y = +y;
416
+ switch (this._point) {
417
+ case 0:
418
+ this._point = 1;
419
+ break;
420
+ case 1:
421
+ this._point = 2;
422
+ break;
423
+ case 2:
424
+ this._point = 3;
425
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
426
+ break;
427
+ case 3: this._point = 4;
428
+ default: point$2(this, x, y);
429
+ }
430
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
431
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
432
+ }
433
+ };
434
+ var cardinalOpen_default = (function custom(tension) {
435
+ function cardinal(context) {
436
+ return new CardinalOpen(context, tension);
437
+ }
438
+ cardinal.tension = function(tension) {
439
+ return custom(+tension);
440
+ };
441
+ return cardinal;
442
+ })(0);
443
+
444
+ //#endregion
445
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRom.js
446
+ function point$1(that, x, y) {
447
+ var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2;
448
+ if (that._l01_a > 1e-12) {
449
+ var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a);
450
+ x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
451
+ y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
452
+ }
453
+ if (that._l23_a > 1e-12) {
454
+ var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a);
455
+ x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
456
+ y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
457
+ }
458
+ that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
459
+ }
460
+ function CatmullRom(context, alpha) {
461
+ this._context = context;
462
+ this._alpha = alpha;
463
+ }
464
+ CatmullRom.prototype = {
465
+ areaStart: function() {
466
+ this._line = 0;
467
+ },
468
+ areaEnd: function() {
469
+ this._line = NaN;
470
+ },
471
+ lineStart: function() {
472
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
473
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
474
+ },
475
+ lineEnd: function() {
476
+ switch (this._point) {
477
+ case 2:
478
+ this._context.lineTo(this._x2, this._y2);
479
+ break;
480
+ case 3: this.point(this._x2, this._y2);
481
+ }
482
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
483
+ this._line = 1 - this._line;
484
+ },
485
+ point: function(x, y) {
486
+ x = +x, y = +y;
487
+ if (this._point) {
488
+ var x23 = this._x2 - x, y23 = this._y2 - y;
489
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
490
+ }
491
+ switch (this._point) {
492
+ case 0:
493
+ this._point = 1;
494
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
495
+ break;
496
+ case 1:
497
+ this._point = 2;
498
+ break;
499
+ case 2: this._point = 3;
500
+ default: point$1(this, x, y);
501
+ }
502
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
503
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
504
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
505
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
506
+ }
507
+ };
508
+ var catmullRom_default = (function custom(alpha) {
509
+ function catmullRom(context) {
510
+ return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
511
+ }
512
+ catmullRom.alpha = function(alpha) {
513
+ return custom(+alpha);
514
+ };
515
+ return catmullRom;
516
+ })(.5);
517
+
518
+ //#endregion
519
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomClosed.js
520
+ function CatmullRomClosed(context, alpha) {
521
+ this._context = context;
522
+ this._alpha = alpha;
523
+ }
524
+ CatmullRomClosed.prototype = {
525
+ areaStart: noop_default,
526
+ areaEnd: noop_default,
527
+ lineStart: function() {
528
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
529
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
530
+ },
531
+ lineEnd: function() {
532
+ switch (this._point) {
533
+ case 1:
534
+ this._context.moveTo(this._x3, this._y3);
535
+ this._context.closePath();
536
+ break;
537
+ case 2:
538
+ this._context.lineTo(this._x3, this._y3);
539
+ this._context.closePath();
540
+ break;
541
+ case 3:
542
+ this.point(this._x3, this._y3);
543
+ this.point(this._x4, this._y4);
544
+ this.point(this._x5, this._y5);
545
+ }
546
+ },
547
+ point: function(x, y) {
548
+ x = +x, y = +y;
549
+ if (this._point) {
550
+ var x23 = this._x2 - x, y23 = this._y2 - y;
551
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
552
+ }
553
+ switch (this._point) {
554
+ case 0:
555
+ this._point = 1;
556
+ this._x3 = x, this._y3 = y;
557
+ break;
558
+ case 1:
559
+ this._point = 2;
560
+ this._context.moveTo(this._x4 = x, this._y4 = y);
561
+ break;
562
+ case 2:
563
+ this._point = 3;
564
+ this._x5 = x, this._y5 = y;
565
+ break;
566
+ default: point$1(this, x, y);
567
+ }
568
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
569
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
570
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
571
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
572
+ }
573
+ };
574
+ var catmullRomClosed_default = (function custom(alpha) {
575
+ function catmullRom(context) {
576
+ return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
577
+ }
578
+ catmullRom.alpha = function(alpha) {
579
+ return custom(+alpha);
580
+ };
581
+ return catmullRom;
582
+ })(.5);
583
+
584
+ //#endregion
585
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomOpen.js
586
+ function CatmullRomOpen(context, alpha) {
587
+ this._context = context;
588
+ this._alpha = alpha;
589
+ }
590
+ CatmullRomOpen.prototype = {
591
+ areaStart: function() {
592
+ this._line = 0;
593
+ },
594
+ areaEnd: function() {
595
+ this._line = NaN;
596
+ },
597
+ lineStart: function() {
598
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
599
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
600
+ },
601
+ lineEnd: function() {
602
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
603
+ this._line = 1 - this._line;
604
+ },
605
+ point: function(x, y) {
606
+ x = +x, y = +y;
607
+ if (this._point) {
608
+ var x23 = this._x2 - x, y23 = this._y2 - y;
609
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
610
+ }
611
+ switch (this._point) {
612
+ case 0:
613
+ this._point = 1;
614
+ break;
615
+ case 1:
616
+ this._point = 2;
617
+ break;
618
+ case 2:
619
+ this._point = 3;
620
+ this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
621
+ break;
622
+ case 3: this._point = 4;
623
+ default: point$1(this, x, y);
624
+ }
625
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
626
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
627
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
628
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
629
+ }
630
+ };
631
+ var catmullRomOpen_default = (function custom(alpha) {
632
+ function catmullRom(context) {
633
+ return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
634
+ }
635
+ catmullRom.alpha = function(alpha) {
636
+ return custom(+alpha);
637
+ };
638
+ return catmullRom;
639
+ })(.5);
640
+
641
+ //#endregion
642
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linearClosed.js
643
+ function LinearClosed(context) {
644
+ this._context = context;
645
+ }
646
+ LinearClosed.prototype = {
647
+ areaStart: noop_default,
648
+ areaEnd: noop_default,
649
+ lineStart: function() {
650
+ this._point = 0;
651
+ },
652
+ lineEnd: function() {
653
+ if (this._point) this._context.closePath();
654
+ },
655
+ point: function(x, y) {
656
+ x = +x, y = +y;
657
+ if (this._point) this._context.lineTo(x, y);
658
+ else this._point = 1, this._context.moveTo(x, y);
659
+ }
660
+ };
661
+ function linearClosed_default(context) {
662
+ return new LinearClosed(context);
663
+ }
664
+
665
+ //#endregion
666
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js
667
+ function sign(x) {
668
+ return x < 0 ? -1 : 1;
669
+ }
670
+ function slope3(that, x2, y2) {
671
+ var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
672
+ return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), .5 * Math.abs(p)) || 0;
673
+ }
674
+ function slope2(that, t) {
675
+ var h = that._x1 - that._x0;
676
+ return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
677
+ }
678
+ function point(that, t0, t1) {
679
+ var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3;
680
+ that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
681
+ }
682
+ function MonotoneX(context) {
683
+ this._context = context;
684
+ }
685
+ MonotoneX.prototype = {
686
+ areaStart: function() {
687
+ this._line = 0;
688
+ },
689
+ areaEnd: function() {
690
+ this._line = NaN;
691
+ },
692
+ lineStart: function() {
693
+ this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
694
+ this._point = 0;
695
+ },
696
+ lineEnd: function() {
697
+ switch (this._point) {
698
+ case 2:
699
+ this._context.lineTo(this._x1, this._y1);
700
+ break;
701
+ case 3: point(this, this._t0, slope2(this, this._t0));
702
+ }
703
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
704
+ this._line = 1 - this._line;
705
+ },
706
+ point: function(x, y) {
707
+ var t1 = NaN;
708
+ x = +x, y = +y;
709
+ if (x === this._x1 && y === this._y1) return;
710
+ switch (this._point) {
711
+ case 0:
712
+ this._point = 1;
713
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
714
+ break;
715
+ case 1:
716
+ this._point = 2;
717
+ break;
718
+ case 2:
719
+ this._point = 3;
720
+ point(this, slope2(this, t1 = slope3(this, x, y)), t1);
721
+ break;
722
+ default: point(this, this._t0, t1 = slope3(this, x, y));
723
+ }
724
+ this._x0 = this._x1, this._x1 = x;
725
+ this._y0 = this._y1, this._y1 = y;
726
+ this._t0 = t1;
727
+ }
728
+ };
729
+ function MonotoneY(context) {
730
+ this._context = new ReflectContext(context);
731
+ }
732
+ (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
733
+ MonotoneX.prototype.point.call(this, y, x);
734
+ };
735
+ function ReflectContext(context) {
736
+ this._context = context;
737
+ }
738
+ ReflectContext.prototype = {
739
+ moveTo: function(x, y) {
740
+ this._context.moveTo(y, x);
741
+ },
742
+ closePath: function() {
743
+ this._context.closePath();
744
+ },
745
+ lineTo: function(x, y) {
746
+ this._context.lineTo(y, x);
747
+ },
748
+ bezierCurveTo: function(x1, y1, x2, y2, x, y) {
749
+ this._context.bezierCurveTo(y1, x1, y2, x2, y, x);
750
+ }
751
+ };
752
+ function monotoneX(context) {
753
+ return new MonotoneX(context);
754
+ }
755
+ function monotoneY(context) {
756
+ return new MonotoneY(context);
757
+ }
758
+
759
+ //#endregion
760
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/natural.js
761
+ function Natural(context) {
762
+ this._context = context;
763
+ }
764
+ Natural.prototype = {
765
+ areaStart: function() {
766
+ this._line = 0;
767
+ },
768
+ areaEnd: function() {
769
+ this._line = NaN;
770
+ },
771
+ lineStart: function() {
772
+ this._x = [];
773
+ this._y = [];
774
+ },
775
+ lineEnd: function() {
776
+ var x = this._x, y = this._y, n = x.length;
777
+ if (n) {
778
+ this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
779
+ if (n === 2) this._context.lineTo(x[1], y[1]);
780
+ else {
781
+ var px = controlPoints(x), py = controlPoints(y);
782
+ for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
783
+ }
784
+ }
785
+ if (this._line || this._line !== 0 && n === 1) this._context.closePath();
786
+ this._line = 1 - this._line;
787
+ this._x = this._y = null;
788
+ },
789
+ point: function(x, y) {
790
+ this._x.push(+x);
791
+ this._y.push(+y);
792
+ }
793
+ };
794
+ function controlPoints(x) {
795
+ var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n);
796
+ a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
797
+ for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
798
+ a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
799
+ for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
800
+ a[n - 1] = r[n - 1] / b[n - 1];
801
+ for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
802
+ b[n - 1] = (x[n] + a[n - 1]) / 2;
803
+ for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
804
+ return [a, b];
805
+ }
806
+ function natural_default(context) {
807
+ return new Natural(context);
808
+ }
809
+
810
+ //#endregion
811
+ //#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/step.js
812
+ function Step(context, t) {
813
+ this._context = context;
814
+ this._t = t;
815
+ }
816
+ Step.prototype = {
817
+ areaStart: function() {
818
+ this._line = 0;
819
+ },
820
+ areaEnd: function() {
821
+ this._line = NaN;
822
+ },
823
+ lineStart: function() {
824
+ this._x = this._y = NaN;
825
+ this._point = 0;
826
+ },
827
+ lineEnd: function() {
828
+ if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
829
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
830
+ if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
831
+ },
832
+ point: function(x, y) {
833
+ x = +x, y = +y;
834
+ switch (this._point) {
835
+ case 0:
836
+ this._point = 1;
837
+ this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
838
+ break;
839
+ case 1: this._point = 2;
840
+ default: if (this._t <= 0) {
841
+ this._context.lineTo(this._x, y);
842
+ this._context.lineTo(x, y);
843
+ } else {
844
+ var x1 = this._x * (1 - this._t) + x * this._t;
845
+ this._context.lineTo(x1, this._y);
846
+ this._context.lineTo(x1, y);
847
+ }
848
+ }
849
+ this._x = x, this._y = y;
850
+ }
851
+ };
852
+ function step_default(context) {
853
+ return new Step(context, .5);
854
+ }
855
+ function stepBefore(context) {
856
+ return new Step(context, 0);
857
+ }
858
+ function stepAfter(context) {
859
+ return new Step(context, 1);
860
+ }
861
+
862
+ //#endregion
863
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
864
+ /**
865
+ * Checks if a given value is a plain object.
866
+ *
867
+ * A plain object is an object created by the `{}` literal, `new Object()`, or
868
+ * `Object.create(null)`.
869
+ *
870
+ * This function also handles objects with custom
871
+ * `Symbol.toStringTag` properties.
872
+ *
873
+ * `Symbol.toStringTag` is a built-in symbol that a constructor can use to customize the
874
+ * default string description of objects.
875
+ *
876
+ * @param [object] - The value to check.
877
+ * @returns True if the value is a plain object, otherwise false.
878
+ *
879
+ * @example
880
+ * console.log(isPlainObject({})); // true
881
+ * console.log(isPlainObject([])); // false
882
+ * console.log(isPlainObject(null)); // false
883
+ * console.log(isPlainObject(Object.create(null))); // true
884
+ * console.log(isPlainObject(new Map())); // false
885
+ */
886
+ function isPlainObject(object) {
887
+ if (typeof object !== "object") return false;
888
+ if (object == null) return false;
889
+ if (Object.getPrototypeOf(object) === null) return true;
890
+ if (Object.prototype.toString.call(object) !== "[object Object]") {
891
+ const tag = object[Symbol.toStringTag];
892
+ if (tag == null) return false;
893
+ if (!Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)?.writable) return false;
894
+ return object.toString() === `[object ${tag}]`;
895
+ }
896
+ let proto = object;
897
+ while (Object.getPrototypeOf(proto) !== null) proto = Object.getPrototypeOf(proto);
898
+ return Object.getPrototypeOf(object) === proto;
899
+ }
900
+
901
+ //#endregion
902
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/function/noop.mjs
903
+ /**
904
+ * A no-operation function that does nothing.
905
+ * This can be used as a placeholder or default function.
906
+ *
907
+ * @example
908
+ * noop(); // Does nothing
909
+ *
910
+ * @returns This function does not return anything.
911
+ */
912
+ function noop() {}
913
+
914
+ //#endregion
915
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
916
+ function getSymbols(object) {
917
+ return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
918
+ }
919
+
920
+ //#endregion
921
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
922
+ /**
923
+ * Gets the `toStringTag` of `value`.
924
+ *
925
+ * @private
926
+ * @param {T} value The value to query.
927
+ * @returns {string} Returns the `Object.prototype.toString.call` result.
928
+ */
929
+ function getTag(value) {
930
+ if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
931
+ return Object.prototype.toString.call(value);
932
+ }
933
+
934
+ //#endregion
935
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
936
+ const regexpTag = "[object RegExp]";
937
+ const stringTag = "[object String]";
938
+ const numberTag = "[object Number]";
939
+ const booleanTag = "[object Boolean]";
940
+ const argumentsTag = "[object Arguments]";
941
+ const symbolTag = "[object Symbol]";
942
+ const dateTag = "[object Date]";
943
+ const mapTag = "[object Map]";
944
+ const setTag = "[object Set]";
945
+ const arrayTag = "[object Array]";
946
+ const arrayBufferTag = "[object ArrayBuffer]";
947
+ const objectTag = "[object Object]";
948
+ const dataViewTag = "[object DataView]";
949
+ const uint8ArrayTag = "[object Uint8Array]";
950
+ const uint8ClampedArrayTag = "[object Uint8ClampedArray]";
951
+ const uint16ArrayTag = "[object Uint16Array]";
952
+ const uint32ArrayTag = "[object Uint32Array]";
953
+ const int8ArrayTag = "[object Int8Array]";
954
+ const int16ArrayTag = "[object Int16Array]";
955
+ const int32ArrayTag = "[object Int32Array]";
956
+ const float32ArrayTag = "[object Float32Array]";
957
+ const float64ArrayTag = "[object Float64Array]";
958
+
959
+ //#endregion
960
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/_internal/globalThis.mjs
961
+ const globalThis_ = typeof globalThis === "object" && globalThis || typeof window === "object" && window || typeof self === "object" && self || typeof global === "object" && global || (function() {
962
+ return this;
963
+ })();
964
+
965
+ //#endregion
966
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
967
+ /**
968
+ * Checks if the given value is a Buffer instance.
969
+ *
970
+ * This function tests whether the provided value is an instance of Buffer.
971
+ * It returns `true` if the value is a Buffer, and `false` otherwise.
972
+ *
973
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `Buffer`.
974
+ *
975
+ * @param x - The value to check if it is a Buffer.
976
+ * @returns Returns `true` if `x` is a Buffer, else `false`.
977
+ *
978
+ * @example
979
+ * const buffer = Buffer.from("test");
980
+ * console.log(isBuffer(buffer)); // true
981
+ *
982
+ * const notBuffer = "not a buffer";
983
+ * console.log(isBuffer(notBuffer)); // false
984
+ */
985
+ function isBuffer(x) {
986
+ return typeof globalThis_.Buffer !== "undefined" && globalThis_.Buffer.isBuffer(x);
987
+ }
988
+
989
+ //#endregion
990
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
991
+ /**
992
+ * Checks if a given value is a valid length.
993
+ *
994
+ * A valid length is of type `number`, is a non-negative integer, and is less than or equal to
995
+ * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).
996
+ * It returns `true` if the value is a valid length, and `false` otherwise.
997
+ *
998
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the
999
+ * argument to a valid length (`number`).
1000
+ *
1001
+ * @param value The value to check.
1002
+ * @returns Returns `true` if `value` is a valid length, else `false`.
1003
+ *
1004
+ * @example
1005
+ * isLength(0); // true
1006
+ * isLength(42); // true
1007
+ * isLength(-1); // false
1008
+ * isLength(1.5); // false
1009
+ * isLength(Number.MAX_SAFE_INTEGER); // true
1010
+ * isLength(Number.MAX_SAFE_INTEGER + 1); // false
1011
+ */
1012
+ function isLength(value) {
1013
+ return Number.isSafeInteger(value) && value >= 0;
1014
+ }
1015
+
1016
+ //#endregion
1017
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1018
+ /**
1019
+ * Checks if `value` is array-like.
1020
+ *
1021
+ * @param value The value to check.
1022
+ * @returns Returns `true` if `value` is array-like, else `false`.
1023
+ *
1024
+ * @example
1025
+ * isArrayLike([1, 2, 3]); // true
1026
+ * isArrayLike('abc'); // true
1027
+ * isArrayLike({ 0: 'a', length: 1 }); // true
1028
+ * isArrayLike({}); // false
1029
+ * isArrayLike(null); // false
1030
+ * isArrayLike(undefined); // false
1031
+ */
1032
+ function isArrayLike(value) {
1033
+ return value != null && typeof value !== "function" && isLength(value.length);
1034
+ }
1035
+
1036
+ //#endregion
1037
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1038
+ /**
1039
+ * Checks if a property key is unsafe to access or copy directly.
1040
+ *
1041
+ * This function is used in functions like `get`, `unset`, and `merge` to prevent
1042
+ * prototype pollution attacks by identifying `__proto__`, which modifies the object's
1043
+ * prototype chain. `constructor` and `prototype` stay accessible here because lodash
1044
+ * keeps reads of them unrestricted; write paths use `isUnsafeToWriteProperty` instead,
1045
+ * which also blocks those keys.
1046
+ *
1047
+ * @param key - The property key to check
1048
+ * @returns `true` if the property is unsafe to access directly, `false` otherwise
1049
+ * @internal
1050
+ */
1051
+ function isUnsafeProperty(key) {
1052
+ return key === "__proto__";
1053
+ }
1054
+
1055
+ //#endregion
1056
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1057
+ /**
1058
+ * Checks whether a value is a JavaScript primitive.
1059
+ * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
1060
+ *
1061
+ * @param value The value to check.
1062
+ * @returns Returns true if `value` is a primitive, false otherwise.
1063
+ *
1064
+ * @example
1065
+ * isPrimitive(null); // true
1066
+ * isPrimitive(undefined); // true
1067
+ * isPrimitive('123'); // true
1068
+ * isPrimitive(false); // true
1069
+ * isPrimitive(true); // true
1070
+ * isPrimitive(Symbol('a')); // true
1071
+ * isPrimitive(123n); // true
1072
+ * isPrimitive({}); // false
1073
+ * isPrimitive(new Date()); // false
1074
+ * isPrimitive(new Map()); // false
1075
+ * isPrimitive(new Set()); // false
1076
+ * isPrimitive([1, 2, 3]); // false
1077
+ */
1078
+ function isPrimitive(value) {
1079
+ return value == null || typeof value !== "object" && typeof value !== "function";
1080
+ }
1081
+
1082
+ //#endregion
1083
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
1084
+ /**
1085
+ * Checks if a value is a TypedArray.
1086
+ * @param x The value to check.
1087
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
1088
+ *
1089
+ * @example
1090
+ * const arr = new Uint8Array([1, 2, 3]);
1091
+ * isTypedArray(arr); // true
1092
+ *
1093
+ * const regularArray = [1, 2, 3];
1094
+ * isTypedArray(regularArray); // false
1095
+ *
1096
+ * const buffer = new ArrayBuffer(16);
1097
+ * isTypedArray(buffer); // false
1098
+ */
1099
+ function isTypedArray$1(x) {
1100
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
1101
+ }
1102
+
1103
+ //#endregion
1104
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
1105
+ /**
1106
+ * Deeply clones the given object.
1107
+ *
1108
+ * You can customize the deep cloning process using the `cloneValue` function.
1109
+ * The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
1110
+ * If the function returns a value, that value is used;
1111
+ * if it returns `undefined`, the default cloning method is used.
1112
+ *
1113
+ * @template T - The type of the object.
1114
+ * @param obj - The object to clone.
1115
+ * @param [cloneValue] - A function to customize the cloning process.
1116
+ * @returns A deep clone of the given object.
1117
+ *
1118
+ * @example
1119
+ * // Clone a primitive value
1120
+ * const num = 29;
1121
+ * const clonedNum = cloneDeepWith(num);
1122
+ * console.log(clonedNum); // 29
1123
+ * console.log(clonedNum === num); // true
1124
+ *
1125
+ * @example
1126
+ * // Clone an object with a customizer
1127
+ * const obj = { a: 1, b: 2 };
1128
+ * const clonedObj = cloneDeepWith(obj, (value) => {
1129
+ * if (typeof value === 'number') {
1130
+ * return value * 2; // Double the number
1131
+ * }
1132
+ * });
1133
+ * console.log(clonedObj); // { a: 2, b: 4 }
1134
+ * console.log(clonedObj === obj); // false
1135
+ *
1136
+ * @example
1137
+ * // Clone an array with a customizer
1138
+ * const arr = [1, 2, 3];
1139
+ * const clonedArr = cloneDeepWith(arr, (value) => {
1140
+ * if (typeof value === 'number') {
1141
+ * return value + 1; // Increment each number
1142
+ * }
1143
+ * });
1144
+ * console.log(clonedArr); // [2, 3, 4]
1145
+ * console.log(clonedArr === arr); // false
1146
+ */
1147
+ function cloneDeepWith$1(obj, cloneValue) {
1148
+ return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
1149
+ }
1150
+ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
1151
+ const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
1152
+ if (cloned !== void 0) return cloned;
1153
+ if (isPrimitive(valueToClone)) return valueToClone;
1154
+ if (stack.has(valueToClone)) return stack.get(valueToClone);
1155
+ if (Array.isArray(valueToClone)) {
1156
+ const result = new Array(valueToClone.length);
1157
+ stack.set(valueToClone, result);
1158
+ for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1159
+ if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
1160
+ if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
1161
+ return result;
1162
+ }
1163
+ if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
1164
+ if (valueToClone instanceof RegExp) {
1165
+ const result = new RegExp(valueToClone.source, valueToClone.flags);
1166
+ result.lastIndex = valueToClone.lastIndex;
1167
+ return result;
1168
+ }
1169
+ if (valueToClone instanceof Map) {
1170
+ const result = /* @__PURE__ */ new Map();
1171
+ stack.set(valueToClone, result);
1172
+ for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
1173
+ return result;
1174
+ }
1175
+ if (valueToClone instanceof Set) {
1176
+ const result = /* @__PURE__ */ new Set();
1177
+ stack.set(valueToClone, result);
1178
+ for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
1179
+ return result;
1180
+ }
1181
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
1182
+ if (isTypedArray$1(valueToClone)) {
1183
+ const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
1184
+ stack.set(valueToClone, result);
1185
+ for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1186
+ return result;
1187
+ }
1188
+ if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
1189
+ if (valueToClone instanceof DataView) {
1190
+ const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
1191
+ stack.set(valueToClone, result);
1192
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1193
+ return result;
1194
+ }
1195
+ if (typeof File !== "undefined" && valueToClone instanceof File) {
1196
+ const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
1197
+ stack.set(valueToClone, result);
1198
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1199
+ return result;
1200
+ }
1201
+ if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
1202
+ const result = new Blob([valueToClone], { type: valueToClone.type });
1203
+ stack.set(valueToClone, result);
1204
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1205
+ return result;
1206
+ }
1207
+ if (valueToClone instanceof Error) {
1208
+ const result = structuredClone(valueToClone);
1209
+ stack.set(valueToClone, result);
1210
+ result.message = valueToClone.message;
1211
+ result.name = valueToClone.name;
1212
+ result.stack = valueToClone.stack;
1213
+ result.cause = valueToClone.cause;
1214
+ result.constructor = valueToClone.constructor;
1215
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1216
+ return result;
1217
+ }
1218
+ if (valueToClone instanceof Boolean) {
1219
+ const result = new Boolean(valueToClone.valueOf());
1220
+ stack.set(valueToClone, result);
1221
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1222
+ return result;
1223
+ }
1224
+ if (valueToClone instanceof Number) {
1225
+ const result = new Number(valueToClone.valueOf());
1226
+ stack.set(valueToClone, result);
1227
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1228
+ return result;
1229
+ }
1230
+ if (valueToClone instanceof String) {
1231
+ const result = new String(valueToClone.valueOf());
1232
+ stack.set(valueToClone, result);
1233
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1234
+ return result;
1235
+ }
1236
+ if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
1237
+ const result = Object.create(Object.getPrototypeOf(valueToClone));
1238
+ stack.set(valueToClone, result);
1239
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1240
+ return result;
1241
+ }
1242
+ return valueToClone;
1243
+ }
1244
+ function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
1245
+ const keys = [...Object.keys(source), ...getSymbols(source)];
1246
+ for (let i = 0; i < keys.length; i++) {
1247
+ const key = keys[i];
1248
+ const descriptor = Object.getOwnPropertyDescriptor(target, key);
1249
+ if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
1250
+ }
1251
+ }
1252
+ function isCloneableObject(object) {
1253
+ switch (getTag(object)) {
1254
+ case argumentsTag:
1255
+ case arrayTag:
1256
+ case arrayBufferTag:
1257
+ case dataViewTag:
1258
+ case booleanTag:
1259
+ case dateTag:
1260
+ case float32ArrayTag:
1261
+ case float64ArrayTag:
1262
+ case int8ArrayTag:
1263
+ case int16ArrayTag:
1264
+ case int32ArrayTag:
1265
+ case mapTag:
1266
+ case numberTag:
1267
+ case objectTag:
1268
+ case regexpTag:
1269
+ case setTag:
1270
+ case stringTag:
1271
+ case symbolTag:
1272
+ case uint8ArrayTag:
1273
+ case uint8ClampedArrayTag:
1274
+ case uint16ArrayTag:
1275
+ case uint32ArrayTag: return true;
1276
+ default: return false;
1277
+ }
1278
+ }
1279
+
1280
+ //#endregion
1281
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
1282
+ /**
1283
+ * Creates a deep clone of the given object using a customizer function.
1284
+ *
1285
+ * @template T - The type of the object.
1286
+ * @param obj - The object to clone.
1287
+ * @param [cloneValue] - A function to customize the cloning process.
1288
+ * @returns A deep clone of the given object.
1289
+ *
1290
+ * @example
1291
+ * // Clone a primitive value
1292
+ * const num = 29;
1293
+ * const clonedNum = cloneDeepWith(num);
1294
+ * console.log(clonedNum); // 29
1295
+ * console.log(clonedNum === num); // true
1296
+ *
1297
+ * @example
1298
+ * // Clone an object with a customizer
1299
+ * const obj = { a: 1, b: 2 };
1300
+ * const clonedObj = cloneDeepWith(obj, (value) => {
1301
+ * if (typeof value === 'number') {
1302
+ * return value * 2; // Double the number
1303
+ * }
1304
+ * });
1305
+ * console.log(clonedObj); // { a: 2, b: 4 }
1306
+ * console.log(clonedObj === obj); // false
1307
+ *
1308
+ * @example
1309
+ * // Clone an array with a customizer
1310
+ * const arr = [1, 2, 3];
1311
+ * const clonedArr = cloneDeepWith(arr, (value) => {
1312
+ * if (typeof value === 'number') {
1313
+ * return value + 1; // Increment each number
1314
+ * }
1315
+ * });
1316
+ * console.log(clonedArr); // [2, 3, 4]
1317
+ * console.log(clonedArr === arr); // false
1318
+ */
1319
+ function cloneDeepWith(obj, customizer) {
1320
+ return cloneDeepWith$1(obj, (value, key, object, stack) => {
1321
+ const cloned = customizer?.(value, key, object, stack);
1322
+ if (cloned !== void 0) return cloned;
1323
+ if (typeof obj !== "object") return;
1324
+ if (getTag(obj) === "[object Object]" && typeof obj.constructor !== "function") {
1325
+ const result = {};
1326
+ stack.set(obj, result);
1327
+ copyProperties(result, obj, object, stack);
1328
+ return result;
1329
+ }
1330
+ switch (Object.prototype.toString.call(obj)) {
1331
+ case numberTag:
1332
+ case stringTag:
1333
+ case booleanTag: {
1334
+ const result = new obj.constructor(obj?.valueOf());
1335
+ copyProperties(result, obj);
1336
+ return result;
1337
+ }
1338
+ case argumentsTag: {
1339
+ const result = {};
1340
+ copyProperties(result, obj);
1341
+ result.length = obj.length;
1342
+ result[Symbol.iterator] = obj[Symbol.iterator];
1343
+ return result;
1344
+ }
1345
+ default: return;
1346
+ }
1347
+ });
1348
+ }
1349
+
1350
+ //#endregion
1351
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
1352
+ /**
1353
+ * Creates a deep clone of the given object.
1354
+ *
1355
+ * @template T - The type of the object.
1356
+ * @param obj - The object to clone.
1357
+ * @returns A deep clone of the given object.
1358
+ *
1359
+ * @example
1360
+ * // Clone a primitive value
1361
+ * const num = 29;
1362
+ * const clonedNum = clone(num);
1363
+ * console.log(clonedNum); // 29
1364
+ * console.log(clonedNum === num); // true
1365
+ *
1366
+ * @example
1367
+ * // Clone an array
1368
+ * const arr = [1, 2, 3];
1369
+ * const clonedArr = cloneDeep(arr);
1370
+ * console.log(clonedArr); // [1, 2, 3]
1371
+ * console.log(clonedArr === arr); // false
1372
+ *
1373
+ * @example
1374
+ * // Clone an array with nested objects
1375
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
1376
+ * const clonedArr = cloneDeep(arr);
1377
+ * arr[1].a = 2;
1378
+ * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
1379
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
1380
+ * console.log(clonedArr === arr); // false
1381
+ *
1382
+ * @example
1383
+ * // Clone an object
1384
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
1385
+ * const clonedObj = cloneDeep(obj);
1386
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
1387
+ * console.log(clonedObj === obj); // false
1388
+ *
1389
+ * @example
1390
+ * // Clone an object with nested objects
1391
+ * const obj = { a: 1, b: { c: 1 } };
1392
+ * const clonedObj = cloneDeep(obj);
1393
+ * obj.b.c = 2;
1394
+ * console.log(obj); // { a: 1, b: { c: 2 } }
1395
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
1396
+ * console.log(clonedObj === obj); // false
1397
+ */
1398
+ function cloneDeep(obj) {
1399
+ return cloneDeepWith(obj);
1400
+ }
1401
+
1402
+ //#endregion
1403
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1404
+ /**
1405
+ * Checks if the given value is an arguments object.
1406
+ *
1407
+ * This function tests whether the provided value is an arguments object or not.
1408
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
1409
+ *
1410
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
1411
+ *
1412
+ * @param value - The value to test if it is an arguments object.
1413
+ * @returns `true` if the value is an arguments, `false` otherwise.
1414
+ *
1415
+ * @example
1416
+ * const args = (function() { return arguments; })();
1417
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
1418
+ * const value = [1, 2, 3];
1419
+ *
1420
+ * console.log(isArguments(args)); // true
1421
+ * console.log(isArguments(strictArgs)); // true
1422
+ * console.log(isArguments(value)); // false
1423
+ */
1424
+ function isArguments(value) {
1425
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1426
+ }
1427
+
1428
+ //#endregion
1429
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs
1430
+ /**
1431
+ * Checks if the given value is object-like.
1432
+ *
1433
+ * A value is object-like if its type is object and it is not null.
1434
+ *
1435
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object-like value.
1436
+ *
1437
+ * @param value - The value to test if it is an object-like.
1438
+ * @returns `true` if the value is an object-like, `false` otherwise.
1439
+ *
1440
+ * @example
1441
+ * const value1 = { a: 1 };
1442
+ * const value2 = [1, 2, 3];
1443
+ * const value3 = 'abc';
1444
+ * const value4 = () => {};
1445
+ * const value5 = null;
1446
+ *
1447
+ * console.log(isObjectLike(value1)); // true
1448
+ * console.log(isObjectLike(value2)); // true
1449
+ * console.log(isObjectLike(value3)); // false
1450
+ * console.log(isObjectLike(value4)); // false
1451
+ * console.log(isObjectLike(value5)); // false
1452
+ */
1453
+ function isObjectLike(value) {
1454
+ return typeof value === "object" && value !== null;
1455
+ }
1456
+
1457
+ //#endregion
1458
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.mjs
1459
+ /**
1460
+ * Checks if the given value is a non-primitive, array-like object.
1461
+ *
1462
+ * @param value The value to check.
1463
+ * @returns `true` if the value is a non-primitive, array-like object, `false` otherwise.
1464
+ *
1465
+ * @example
1466
+ * isArrayLikeObject([1, 2, 3]); // true
1467
+ * isArrayLikeObject({ 0: 'a', length: 1 }); // true
1468
+ * isArrayLikeObject('abc'); // false
1469
+ * isArrayLikeObject(()=>{}); // false
1470
+ */
1471
+ function isArrayLikeObject(value) {
1472
+ return isObjectLike(value) && isArrayLike(value);
1473
+ }
1474
+
1475
+ //#endregion
1476
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.mjs
1477
+ /**
1478
+ * Checks if a value is a TypedArray.
1479
+ * @param x The value to check.
1480
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
1481
+ *
1482
+ * @example
1483
+ * const arr = new Uint8Array([1, 2, 3]);
1484
+ * isTypedArray(arr); // true
1485
+ *
1486
+ * const regularArray = [1, 2, 3];
1487
+ * isTypedArray(regularArray); // false
1488
+ *
1489
+ * const buffer = new ArrayBuffer(16);
1490
+ * isTypedArray(buffer); // false
1491
+ */
1492
+ function isTypedArray(x) {
1493
+ return isTypedArray$1(x);
1494
+ }
1495
+
1496
+ //#endregion
1497
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/function/memoize.mjs
1498
+ /**
1499
+ * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for
1500
+ * storing the result based on the arguments provided to the memoized function. By default, the first argument
1501
+ * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with
1502
+ * the this binding of the memoized function.
1503
+ *
1504
+ * @template T - The type of the original function being memoized
1505
+ * @param func The function to have its output memoized.
1506
+ * @param [resolver] The function to resolve the cache key.
1507
+ * @return {MemoizedFunction<T>} Returns the new memoizing function.
1508
+ */
1509
+ function memoize(func, resolver) {
1510
+ if (typeof func !== "function" || resolver != null && typeof resolver !== "function") throw new TypeError("Expected a function");
1511
+ const memoized = function(...args) {
1512
+ const key = resolver ? resolver.apply(this, args) : args[0];
1513
+ const cache = memoized.cache;
1514
+ if (cache.has(key)) return cache.get(key);
1515
+ const result = func.apply(this, args);
1516
+ memoized.cache = cache.set(key, result) || cache;
1517
+ return result;
1518
+ };
1519
+ memoized.cache = new (memoize.Cache || Map)();
1520
+ return memoized;
1521
+ }
1522
+ memoize.Cache = Map;
1523
+
1524
+ //#endregion
1525
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/object/clone.mjs
1526
+ /**
1527
+ * Creates a shallow clone of the given object.
1528
+ *
1529
+ * @template T - The type of the object.
1530
+ * @param obj - The object to clone.
1531
+ * @returns A shallow clone of the given object.
1532
+ *
1533
+ * @example
1534
+ * // Clone a primitive value
1535
+ * const num = 29;
1536
+ * const clonedNum = clone(num);
1537
+ * console.log(clonedNum); // 29
1538
+ * console.log(clonedNum === num); // true
1539
+ *
1540
+ * @example
1541
+ * // Clone an array
1542
+ * const arr = [1, 2, 3];
1543
+ * const clonedArr = clone(arr);
1544
+ * console.log(clonedArr); // [1, 2, 3]
1545
+ * console.log(clonedArr === arr); // false
1546
+ *
1547
+ * @example
1548
+ * // Clone an object
1549
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
1550
+ * const clonedObj = clone(obj);
1551
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
1552
+ * console.log(clonedObj === obj); // false
1553
+ */
1554
+ function clone(obj) {
1555
+ if (isPrimitive(obj)) return obj;
1556
+ if (Array.isArray(obj) || isTypedArray$1(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
1557
+ const prototype = Object.getPrototypeOf(obj);
1558
+ if (prototype == null) return Object.assign(Object.create(prototype), obj);
1559
+ const Constructor = prototype.constructor;
1560
+ if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
1561
+ if (obj instanceof RegExp) {
1562
+ const newRegExp = new Constructor(obj);
1563
+ newRegExp.lastIndex = obj.lastIndex;
1564
+ return newRegExp;
1565
+ }
1566
+ if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
1567
+ if (obj instanceof Error) {
1568
+ let newError;
1569
+ if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
1570
+ else newError = new Constructor(obj.message, { cause: obj.cause });
1571
+ newError.stack = obj.stack;
1572
+ Object.assign(newError, obj);
1573
+ return newError;
1574
+ }
1575
+ if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
1576
+ type: obj.type,
1577
+ lastModified: obj.lastModified
1578
+ });
1579
+ if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
1580
+ return obj;
1581
+ }
1582
+
1583
+ //#endregion
1584
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/object/mergeWith.mjs
1585
+ /**
1586
+ * Merges the properties of one or more source objects into the target object using a customizer function.
1587
+ *
1588
+ * This function performs a deep merge, recursively merging nested objects and arrays.
1589
+ * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
1590
+ * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.
1591
+ *
1592
+ * You can provide a custom `merge` function to control how properties are merged. The `merge` function is called for each property that is being merged and receives the following arguments:
1593
+ *
1594
+ * - `targetValue`: The current value of the property in the target object.
1595
+ * - `sourceValue`: The value of the property in the source object.
1596
+ * - `key`: The key of the property being merged.
1597
+ * - `target`: The target object.
1598
+ * - `source`: The source object.
1599
+ * - `stack`: A `Map` used to keep track of objects that have already been processed to handle circular references.
1600
+ *
1601
+ * The `merge` function should return the value to be set in the target object. If it returns `undefined`, a default deep merge will be applied for arrays and objects.
1602
+ *
1603
+ * The function can handle multiple source objects and will merge them all into the target object.
1604
+ *
1605
+ * @param object - The target object into which the source object properties will be merged. This object is modified in place.
1606
+ * @param otherArgs - Additional source objects to merge into the target object, including the custom `merge` function.
1607
+ * @returns The updated target object with properties from the source object(s) merged in.
1608
+ *
1609
+ * @example
1610
+ * const target = { a: 1, b: 2 };
1611
+ * const source = { b: 3, c: 4 };
1612
+ *
1613
+ * mergeWith(target, source, (targetValue, sourceValue) => {
1614
+ * if (typeof targetValue === 'number' && typeof sourceValue === 'number') {
1615
+ * return targetValue + sourceValue;
1616
+ * }
1617
+ * });
1618
+ * // Returns { a: 1, b: 5, c: 4 }
1619
+ * @example
1620
+ * const target = { a: [1], b: [2] };
1621
+ * const source = { a: [3], b: [4] };
1622
+ *
1623
+ * const result = mergeWith(target, source, (objValue, srcValue) => {
1624
+ * if (Array.isArray(objValue)) {
1625
+ * return objValue.concat(srcValue);
1626
+ * }
1627
+ * });
1628
+ *
1629
+ * expect(result).toEqual({ a: [1, 3], b: [2, 4] });
1630
+ */
1631
+ function mergeWith(object, ...otherArgs) {
1632
+ const sources = otherArgs.slice(0, -1);
1633
+ const merge = otherArgs[otherArgs.length - 1];
1634
+ let result = object;
1635
+ for (let i = 0; i < sources.length; i++) {
1636
+ const source = sources[i];
1637
+ result = mergeWithDeep(result, source, merge, /* @__PURE__ */ new Map());
1638
+ }
1639
+ return result;
1640
+ }
1641
+ function mergeWithDeep(target, source, merge, stack) {
1642
+ if (isPrimitive(target)) target = Object(target);
1643
+ if (source == null || typeof source !== "object") return target;
1644
+ if (stack.has(source)) return clone(stack.get(source));
1645
+ stack.set(source, target);
1646
+ if (Array.isArray(source)) {
1647
+ source = source.slice();
1648
+ for (let i = 0; i < source.length; i++) if (!(i in source)) source[i] = void 0;
1649
+ }
1650
+ const sourceKeys = [...Object.keys(source), ...getSymbols(source)];
1651
+ for (let i = 0; i < sourceKeys.length; i++) {
1652
+ const key = sourceKeys[i];
1653
+ if (isUnsafeProperty(key)) continue;
1654
+ let sourceValue = source[key];
1655
+ let targetValue = target[key];
1656
+ if (isArguments(sourceValue)) sourceValue = { ...sourceValue };
1657
+ if (isArguments(targetValue)) targetValue = { ...targetValue };
1658
+ if (isBuffer(sourceValue)) sourceValue = cloneDeep(sourceValue);
1659
+ if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) {
1660
+ const cloned = [];
1661
+ const targetKeys = Reflect.ownKeys(targetValue);
1662
+ for (let i = 0; i < targetKeys.length; i++) {
1663
+ const targetKey = targetKeys[i];
1664
+ cloned[targetKey] = targetValue[targetKey];
1665
+ }
1666
+ targetValue = cloned;
1667
+ } else if (isArrayLikeObject(targetValue)) {
1668
+ const cloned = [];
1669
+ for (let i = 0; i < targetValue.length; i++) cloned[i] = targetValue[i];
1670
+ targetValue = cloned;
1671
+ } else targetValue = [];
1672
+ const merged = merge(targetValue, sourceValue, key, target, source, stack);
1673
+ if (merged !== void 0) target[key] = merged;
1674
+ else if (Array.isArray(sourceValue)) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
1675
+ else if (isObjectLike(targetValue) && isObjectLike(sourceValue) && (isPlainObject(targetValue) || isPlainObject(sourceValue) || isTypedArray(targetValue) || isTypedArray(sourceValue))) target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
1676
+ else if (targetValue == null && isPlainObject(sourceValue)) target[key] = mergeWithDeep({}, sourceValue, merge, stack);
1677
+ else if (targetValue == null && isTypedArray(sourceValue)) target[key] = cloneDeep(sourceValue);
1678
+ else if (targetValue === void 0 || sourceValue !== void 0) target[key] = sourceValue;
1679
+ }
1680
+ return target;
1681
+ }
1682
+
1683
+ //#endregion
1684
+ //#region ../../node_modules/.pnpm/es-toolkit@1.52.0/node_modules/es-toolkit/dist/compat/object/merge.mjs
1685
+ /**
1686
+ * Merges the properties of one or more source objects into the target object.
1687
+ *
1688
+ * This function performs a deep merge, recursively merging nested objects and arrays.
1689
+ * If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
1690
+ * If a property in the source object is `undefined`, it will not overwrite a defined property in the target object.
1691
+ *
1692
+ * The function can handle multiple source objects and will merge them all into the target object.
1693
+ *
1694
+ * @param object - The target object into which the source object properties will be merged. This object is modified in place.
1695
+ * @param sources - The source objects whose properties will be merged into the target object.
1696
+ * @returns The updated target object with properties from the source object(s) merged in.
1697
+ *
1698
+ * @example
1699
+ * const target = { a: 1, b: { x: 1, y: 2 } };
1700
+ * const source = { b: { y: 3, z: 4 }, c: 5 };
1701
+ *
1702
+ * const result = merge(target, source);
1703
+ * console.log(result);
1704
+ * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
1705
+ *
1706
+ * @example
1707
+ * const target = { a: [1, 2], b: { x: 1 } };
1708
+ * const source = { a: [3], b: { y: 2 } };
1709
+ *
1710
+ * const result = merge(target, source);
1711
+ * console.log(result);
1712
+ * // Output: { a: [3], b: { x: 1, y: 2 } }
1713
+ *
1714
+ * @example
1715
+ * const target = { a: null };
1716
+ * const source = { a: [1, 2, 3] };
1717
+ *
1718
+ * const result = merge(target, source);
1719
+ * console.log(result);
1720
+ * // Output: { a: [1, 2, 3] }
1721
+ */
1722
+ function merge(object, ...sources) {
1723
+ return mergeWith(object, ...sources, noop);
1724
+ }
1725
+
1726
+ //#endregion
1727
+ //#region ../../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/chunk-75Z2AOVW.mjs
1728
+ var import_dist = require_dist();
1729
+ var ZERO_WIDTH_SPACE = "​";
1730
+ var d3CurveTypes = {
1731
+ curveBasis: basis_default,
1732
+ curveBasisClosed: basisClosed_default,
1733
+ curveBasisOpen: basisOpen_default,
1734
+ curveBumpX: bumpX,
1735
+ curveBumpY: bumpY,
1736
+ curveBundle: bundle_default,
1737
+ curveCardinalClosed: cardinalClosed_default,
1738
+ curveCardinalOpen: cardinalOpen_default,
1739
+ curveCardinal: cardinal_default,
1740
+ curveCatmullRomClosed: catmullRomClosed_default,
1741
+ curveCatmullRomOpen: catmullRomOpen_default,
1742
+ curveCatmullRom: catmullRom_default,
1743
+ curveLinear: linear_default,
1744
+ curveLinearClosed: linearClosed_default,
1745
+ curveMonotoneX: monotoneX,
1746
+ curveMonotoneY: monotoneY,
1747
+ curveNatural: natural_default,
1748
+ curveStep: step_default,
1749
+ curveStepAfter: stepAfter,
1750
+ curveStepBefore: stepBefore
1751
+ };
1752
+ var directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
1753
+ var detectInit = /* @__PURE__ */ __name(function(text, config) {
1754
+ const inits = detectDirective(text, /(?:init\b)|(?:initialize\b)/);
1755
+ let results = {};
1756
+ if (Array.isArray(inits)) {
1757
+ const args = inits.map((init) => init.args);
1758
+ sanitizeDirective(args);
1759
+ results = assignWithDepth_default(results, [...args]);
1760
+ } else results = inits.args;
1761
+ if (!results) return;
1762
+ let type = detectType(text, config);
1763
+ const prop = "config";
1764
+ if (results[prop] !== void 0) {
1765
+ if (type === "flowchart-v2") type = "flowchart";
1766
+ results[type] = results[prop];
1767
+ delete results[prop];
1768
+ }
1769
+ return results;
1770
+ }, "detectInit");
1771
+ var detectDirective = /* @__PURE__ */ __name(function(text, type = null) {
1772
+ try {
1773
+ const commentWithoutDirectives = new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
1774
+ `, "ig");
1775
+ text = text.trim().replace(commentWithoutDirectives, "").replace(/'/gm, "\"");
1776
+ log.debug(`Detecting diagram directive${type !== null ? " type:" + type : ""} based on the text:${text}`);
1777
+ let match;
1778
+ const result = [];
1779
+ while ((match = directiveRegex.exec(text)) !== null) {
1780
+ if (match.index === directiveRegex.lastIndex) directiveRegex.lastIndex++;
1781
+ if (match && !type || type && match[1]?.match(type) || type && match[2]?.match(type)) {
1782
+ const type2 = match[1] ? match[1] : match[2];
1783
+ const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;
1784
+ result.push({
1785
+ type: type2,
1786
+ args
1787
+ });
1788
+ }
1789
+ }
1790
+ if (result.length === 0) return {
1791
+ type: text,
1792
+ args: null
1793
+ };
1794
+ return result.length === 1 ? result[0] : result;
1795
+ } catch (error) {
1796
+ log.error(`ERROR: ${error.message} - Unable to parse directive type: '${type}' based on the text: '${text}'`);
1797
+ return {
1798
+ type: void 0,
1799
+ args: null
1800
+ };
1801
+ }
1802
+ }, "detectDirective");
1803
+ var removeDirectives = /* @__PURE__ */ __name(function(text) {
1804
+ return text.replace(directiveRegex, "");
1805
+ }, "removeDirectives");
1806
+ var isSubstringInArray = /* @__PURE__ */ __name(function(str, arr) {
1807
+ for (const [i, element] of arr.entries()) if (element.match(str)) return i;
1808
+ return -1;
1809
+ }, "isSubstringInArray");
1810
+ function interpolateToCurve(interpolate, defaultCurve) {
1811
+ if (!interpolate) return defaultCurve;
1812
+ return d3CurveTypes[`curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`] ?? defaultCurve;
1813
+ }
1814
+ __name(interpolateToCurve, "interpolateToCurve");
1815
+ function formatUrl(linkStr, config) {
1816
+ const url = linkStr.trim();
1817
+ if (!url) return;
1818
+ if (config.securityLevel !== "loose") return (0, import_dist.sanitizeUrl)(url);
1819
+ return url;
1820
+ }
1821
+ __name(formatUrl, "formatUrl");
1822
+ var runFunc = /* @__PURE__ */ __name((functionName, ...params) => {
1823
+ const arrPaths = functionName.split(".");
1824
+ const len = arrPaths.length - 1;
1825
+ const fnName = arrPaths[len];
1826
+ let obj = window;
1827
+ for (let i = 0; i < len; i++) {
1828
+ obj = obj[arrPaths[i]];
1829
+ if (!obj) {
1830
+ log.error(`Function name: ${functionName} not found in window`);
1831
+ return;
1832
+ }
1833
+ }
1834
+ obj[fnName](...params);
1835
+ }, "runFunc");
1836
+ function distance(p1, p2) {
1837
+ if (!p1 || !p2) return 0;
1838
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
1839
+ }
1840
+ __name(distance, "distance");
1841
+ function traverseEdge(points) {
1842
+ let prevPoint;
1843
+ let totalDistance = 0;
1844
+ points.forEach((point) => {
1845
+ totalDistance += distance(point, prevPoint);
1846
+ prevPoint = point;
1847
+ });
1848
+ return calculatePoint(points, totalDistance / 2);
1849
+ }
1850
+ __name(traverseEdge, "traverseEdge");
1851
+ function calcLabelPosition(points) {
1852
+ if (points.length === 1) return points[0];
1853
+ return traverseEdge(points);
1854
+ }
1855
+ __name(calcLabelPosition, "calcLabelPosition");
1856
+ var roundNumber = /* @__PURE__ */ __name((num, precision = 2) => {
1857
+ const factor = Math.pow(10, precision);
1858
+ return Math.round(num * factor) / factor;
1859
+ }, "roundNumber");
1860
+ var calculatePoint = /* @__PURE__ */ __name((points, distanceToTraverse) => {
1861
+ let prevPoint = void 0;
1862
+ let remainingDistance = distanceToTraverse;
1863
+ for (const point of points) {
1864
+ if (prevPoint) {
1865
+ const vectorDistance = distance(point, prevPoint);
1866
+ if (vectorDistance === 0) return prevPoint;
1867
+ if (vectorDistance < remainingDistance) remainingDistance -= vectorDistance;
1868
+ else {
1869
+ const distanceRatio = remainingDistance / vectorDistance;
1870
+ if (distanceRatio <= 0) return prevPoint;
1871
+ if (distanceRatio >= 1) return {
1872
+ x: point.x,
1873
+ y: point.y
1874
+ };
1875
+ if (distanceRatio > 0 && distanceRatio < 1) return {
1876
+ x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5),
1877
+ y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5)
1878
+ };
1879
+ }
1880
+ }
1881
+ prevPoint = point;
1882
+ }
1883
+ throw new Error("Could not find a suitable point for the given distance");
1884
+ }, "calculatePoint");
1885
+ var calcCardinalityPosition = /* @__PURE__ */ __name((isRelationTypePresent, points, initialPosition) => {
1886
+ log.info(`our points ${JSON.stringify(points)}`);
1887
+ if (points[0] !== initialPosition) points = points.reverse();
1888
+ const center = calculatePoint(points, 25);
1889
+ const d = isRelationTypePresent ? 10 : 5;
1890
+ const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);
1891
+ const cardinalityPosition = {
1892
+ x: 0,
1893
+ y: 0
1894
+ };
1895
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;
1896
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;
1897
+ return cardinalityPosition;
1898
+ }, "calcCardinalityPosition");
1899
+ function calcTerminalLabelPosition(terminalMarkerSize, position, _points) {
1900
+ const points = structuredClone(_points);
1901
+ log.info("our points", points);
1902
+ if (position !== "start_left" && position !== "start_right") points.reverse();
1903
+ const center = calculatePoint(points, 25 + terminalMarkerSize);
1904
+ const d = 10 + terminalMarkerSize * .5;
1905
+ const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);
1906
+ const cardinalityPosition = {
1907
+ x: 0,
1908
+ y: 0
1909
+ };
1910
+ if (position === "start_left") {
1911
+ cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;
1912
+ cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;
1913
+ } else if (position === "end_right") {
1914
+ cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;
1915
+ cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;
1916
+ } else if (position === "end_left") {
1917
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;
1918
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;
1919
+ } else {
1920
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;
1921
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;
1922
+ }
1923
+ return cardinalityPosition;
1924
+ }
1925
+ __name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
1926
+ function getStylesFromArray(arr) {
1927
+ let style = "";
1928
+ let labelStyle = "";
1929
+ for (const element of arr) if (element !== void 0) if (element.startsWith("color:") || element.startsWith("text-align:")) labelStyle = labelStyle + element + ";";
1930
+ else style = style + element + ";";
1931
+ return {
1932
+ style,
1933
+ labelStyle
1934
+ };
1935
+ }
1936
+ __name(getStylesFromArray, "getStylesFromArray");
1937
+ var cnt = 0;
1938
+ var generateId = /* @__PURE__ */ __name(() => {
1939
+ cnt++;
1940
+ return "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt;
1941
+ }, "generateId");
1942
+ function makeRandomHex(length) {
1943
+ let result = "";
1944
+ const characters = "0123456789abcdef";
1945
+ const charactersLength = 16;
1946
+ for (let i = 0; i < length; i++) result += characters.charAt(Math.floor(Math.random() * charactersLength));
1947
+ return result;
1948
+ }
1949
+ __name(makeRandomHex, "makeRandomHex");
1950
+ var random = /* @__PURE__ */ __name((options) => {
1951
+ return makeRandomHex(options.length);
1952
+ }, "random");
1953
+ var getTextObj = /* @__PURE__ */ __name(function() {
1954
+ return {
1955
+ x: 0,
1956
+ y: 0,
1957
+ fill: void 0,
1958
+ anchor: "start",
1959
+ style: "#666",
1960
+ width: 100,
1961
+ height: 100,
1962
+ textMargin: 0,
1963
+ rx: 0,
1964
+ ry: 0,
1965
+ valign: void 0,
1966
+ text: ""
1967
+ };
1968
+ }, "getTextObj");
1969
+ var drawSimpleText = /* @__PURE__ */ __name(function(elem, textData) {
1970
+ const nText = textData.text.replace(common_default.lineBreakRegex, " ");
1971
+ const [, _fontSizePx] = parseFontSize(textData.fontSize);
1972
+ const textElem = elem.append("text");
1973
+ textElem.attr("x", textData.x);
1974
+ textElem.attr("y", textData.y);
1975
+ textElem.style("text-anchor", textData.anchor);
1976
+ textElem.style("font-family", textData.fontFamily);
1977
+ textElem.style("font-size", _fontSizePx);
1978
+ textElem.style("font-weight", textData.fontWeight);
1979
+ textElem.attr("fill", textData.fill);
1980
+ if (textData.class !== void 0) textElem.attr("class", textData.class);
1981
+ const span = textElem.append("tspan");
1982
+ span.attr("x", textData.x + textData.textMargin * 2);
1983
+ span.attr("fill", textData.fill);
1984
+ span.text(nText);
1985
+ return textElem;
1986
+ }, "drawSimpleText");
1987
+ var wrapLabel = memoize((label, maxWidth, config) => {
1988
+ if (!label) return label;
1989
+ config = Object.assign({
1990
+ fontSize: 12,
1991
+ fontWeight: 400,
1992
+ fontFamily: "Arial",
1993
+ joinWith: "<br/>"
1994
+ }, config);
1995
+ if (common_default.lineBreakRegex.test(label)) return label;
1996
+ const words = label.split(" ").filter(Boolean);
1997
+ const completedLines = [];
1998
+ let nextLine = "";
1999
+ words.forEach((word, index) => {
2000
+ const wordLength = calculateTextWidth(`${word} `, config);
2001
+ const nextLineLength = calculateTextWidth(nextLine, config);
2002
+ if (wordLength > maxWidth) {
2003
+ const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config);
2004
+ completedLines.push(nextLine, ...hyphenatedStrings);
2005
+ nextLine = remainingWord;
2006
+ } else if (nextLineLength + wordLength >= maxWidth) {
2007
+ completedLines.push(nextLine);
2008
+ nextLine = word;
2009
+ } else nextLine = [nextLine, word].filter(Boolean).join(" ");
2010
+ if (index + 1 === words.length) completedLines.push(nextLine);
2011
+ });
2012
+ return completedLines.filter((line) => line !== "").join(config.joinWith);
2013
+ }, (label, maxWidth, config) => `${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`);
2014
+ var breakString = memoize((word, maxWidth, hyphenCharacter = "-", config) => {
2015
+ config = Object.assign({
2016
+ fontSize: 12,
2017
+ fontWeight: 400,
2018
+ fontFamily: "Arial",
2019
+ margin: 0
2020
+ }, config);
2021
+ const characters = [...word];
2022
+ const lines = [];
2023
+ let currentLine = "";
2024
+ characters.forEach((character, index) => {
2025
+ const nextLine = `${currentLine}${character}`;
2026
+ if (calculateTextWidth(nextLine, config) >= maxWidth) {
2027
+ const currentCharacter = index + 1;
2028
+ const isLastLine = characters.length === currentCharacter;
2029
+ const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;
2030
+ lines.push(isLastLine ? nextLine : hyphenatedNextLine);
2031
+ currentLine = "";
2032
+ } else currentLine = nextLine;
2033
+ });
2034
+ return {
2035
+ hyphenatedStrings: lines,
2036
+ remainingWord: currentLine
2037
+ };
2038
+ }, (word, maxWidth, hyphenCharacter = "-", config) => `${word}${maxWidth}${hyphenCharacter}${config.fontSize}${config.fontWeight}${config.fontFamily}`);
2039
+ function calculateTextHeight(text, config) {
2040
+ return calculateTextDimensions(text, config).height;
2041
+ }
2042
+ __name(calculateTextHeight, "calculateTextHeight");
2043
+ function calculateTextWidth(text, config) {
2044
+ return calculateTextDimensions(text, config).width;
2045
+ }
2046
+ __name(calculateTextWidth, "calculateTextWidth");
2047
+ var calculateTextDimensions = memoize((text, config) => {
2048
+ const { fontSize = 12, fontFamily = "Arial", fontWeight = 400 } = config;
2049
+ if (!text) return {
2050
+ width: 0,
2051
+ height: 0
2052
+ };
2053
+ const [, _fontSizePx] = parseFontSize(fontSize);
2054
+ const fontFamilies = ["sans-serif", fontFamily];
2055
+ const lines = text.split(common_default.lineBreakRegex);
2056
+ const dims = [];
2057
+ const body = select_default("body");
2058
+ if (!body.remove) return {
2059
+ width: 0,
2060
+ height: 0,
2061
+ lineHeight: 0
2062
+ };
2063
+ const g = body.append("svg");
2064
+ for (const fontFamily2 of fontFamilies) {
2065
+ let cHeight = 0;
2066
+ const dim = {
2067
+ width: 0,
2068
+ height: 0,
2069
+ lineHeight: 0
2070
+ };
2071
+ for (const line of lines) {
2072
+ const textObj = getTextObj();
2073
+ textObj.text = line || "​";
2074
+ const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2);
2075
+ const bBox = (textElem._groups || textElem)[0][0].getBBox();
2076
+ if (bBox.width === 0 && bBox.height === 0) throw new Error("svg element not in render tree");
2077
+ dim.width = Math.round(Math.max(dim.width, bBox.width));
2078
+ cHeight = Math.round(bBox.height);
2079
+ dim.height += cHeight;
2080
+ dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight));
2081
+ }
2082
+ dims.push(dim);
2083
+ }
2084
+ g.remove();
2085
+ return dims[isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1];
2086
+ }, (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}`);
2087
+ var InitIDGenerator = class {
2088
+ constructor(deterministic = false, seed) {
2089
+ this.count = 0;
2090
+ this.count = seed ? seed.length : 0;
2091
+ this.next = deterministic ? () => this.count++ : () => Date.now();
2092
+ }
2093
+ static {
2094
+ __name(this, "InitIDGenerator");
2095
+ }
2096
+ };
2097
+ var decoder;
2098
+ var entityDecode = /* @__PURE__ */ __name(function(html) {
2099
+ decoder = decoder || document.createElement("div");
2100
+ html = escape(html).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";");
2101
+ decoder.innerHTML = html;
2102
+ return unescape(decoder.textContent);
2103
+ }, "entityDecode");
2104
+ function isDetailedError(error) {
2105
+ return "str" in error;
2106
+ }
2107
+ __name(isDetailedError, "isDetailedError");
2108
+ var insertTitle = /* @__PURE__ */ __name((parent, cssClass, titleTopMargin, title) => {
2109
+ if (!title) return;
2110
+ const bounds = parent.node()?.getBBox();
2111
+ if (!bounds) return;
2112
+ parent.append("text").text(title).attr("text-anchor", "middle").attr("x", bounds.x + bounds.width / 2).attr("y", -titleTopMargin).attr("class", cssClass);
2113
+ }, "insertTitle");
2114
+ var parseFontSize = /* @__PURE__ */ __name((fontSize) => {
2115
+ if (typeof fontSize === "number") return [fontSize, fontSize + "px"];
2116
+ const fontSizeNumber = parseInt(fontSize ?? "", 10);
2117
+ if (Number.isNaN(fontSizeNumber)) return [void 0, void 0];
2118
+ else if (fontSize === String(fontSizeNumber)) return [fontSizeNumber, fontSize + "px"];
2119
+ else return [fontSizeNumber, fontSize];
2120
+ }, "parseFontSize");
2121
+ function cleanAndMerge(defaultData, data) {
2122
+ return merge({}, defaultData, data);
2123
+ }
2124
+ __name(cleanAndMerge, "cleanAndMerge");
2125
+ var utils_default = {
2126
+ assignWithDepth: assignWithDepth_default,
2127
+ wrapLabel,
2128
+ calculateTextHeight,
2129
+ calculateTextWidth,
2130
+ calculateTextDimensions,
2131
+ cleanAndMerge,
2132
+ detectInit,
2133
+ detectDirective,
2134
+ isSubstringInArray,
2135
+ interpolateToCurve,
2136
+ calcLabelPosition,
2137
+ calcCardinalityPosition,
2138
+ calcTerminalLabelPosition,
2139
+ formatUrl,
2140
+ getStylesFromArray,
2141
+ generateId,
2142
+ random,
2143
+ runFunc,
2144
+ entityDecode,
2145
+ insertTitle,
2146
+ isLabelCoordinateInPath,
2147
+ parseFontSize,
2148
+ InitIDGenerator
2149
+ };
2150
+ var encodeEntities = /* @__PURE__ */ __name(function(text) {
2151
+ let txt = text;
2152
+ txt = txt.replace(/style.*:\S*#.*;/g, function(s) {
2153
+ return s.substring(0, s.length - 1);
2154
+ });
2155
+ txt = txt.replace(/classDef.*:\S*#.*;/g, function(s) {
2156
+ return s.substring(0, s.length - 1);
2157
+ });
2158
+ txt = txt.replace(/#\w+;/g, function(s) {
2159
+ const innerTxt = s.substring(1, s.length - 1);
2160
+ if (/^\+?\d+$/.test(innerTxt)) return "fl°°" + innerTxt + "¶ß";
2161
+ else return "fl°" + innerTxt + "¶ß";
2162
+ });
2163
+ return txt;
2164
+ }, "encodeEntities");
2165
+ var decodeEntities = /* @__PURE__ */ __name(function(text) {
2166
+ return text.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
2167
+ }, "decodeEntities");
2168
+ var getEdgeId = /* @__PURE__ */ __name((from, to, { counter = 0, prefix, suffix }, id) => {
2169
+ if (id) return id;
2170
+ return `${prefix ? `${prefix}_` : ""}${from}_${to}_${counter}${suffix ? `_${suffix}` : ""}`;
2171
+ }, "getEdgeId");
2172
+ function handleUndefinedAttr(attrValue) {
2173
+ return attrValue ?? null;
2174
+ }
2175
+ __name(handleUndefinedAttr, "handleUndefinedAttr");
2176
+ function isLabelCoordinateInPath(point, dAttr) {
2177
+ const roundedX = Math.round(point.x);
2178
+ const roundedY = Math.round(point.y);
2179
+ const sanitizedD = dAttr.replace(/(\d+\.\d+)/g, (match) => Math.round(parseFloat(match)).toString());
2180
+ return sanitizedD.includes(roundedX.toString()) || sanitizedD.includes(roundedY.toString());
2181
+ }
2182
+ __name(isLabelCoordinateInPath, "isLabelCoordinateInPath");
2183
+
2184
+ //#endregion
2185
+ export { cardinal_default as $, float64ArrayTag as A, symbolTag as B, argumentsTag as C, dataViewTag as D, booleanTag as E, numberTag as F, getTag as G, uint32ArrayTag as H, objectTag as I, step_default as J, stepAfter as K, regexpTag as L, int32ArrayTag as M, int8ArrayTag as N, dateTag as O, mapTag as P, catmullRom_default as Q, setTag as R, isBuffer as S, arrayTag as T, uint8ArrayTag as U, uint16ArrayTag as V, uint8ClampedArrayTag as W, monotoneX as X, natural_default as Y, monotoneY as Z, wrapLabel as _, decodeEntities as a, isPrimitive as b, getEdgeId as c, interpolateToCurve as d, basis_default as et, isDetailedError as f, utils_default as g, removeDirectives as h, cleanAndMerge as i, int16ArrayTag as j, float32ArrayTag as k, getStylesFromArray as l, random as m, calculateTextHeight as n, bumpY as nt, encodeEntities as o, parseFontSize as p, stepBefore as q, calculateTextWidth as r, linear_default as rt, generateId as s, calculateTextDimensions as t, bumpX as tt, handleUndefinedAttr as u, isTypedArray as v, arrayBufferTag as w, isArrayLike as x, isArguments as y, stringTag as z };