@carbon/charts 1.22.18 → 1.22.19

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.
@@ -0,0 +1,1682 @@
1
+ import { P as qt, Q as be, R as Nt, S as Pe, U as Gt, V as jt, W as at, X as Zt, Y as We, Z as Xt, _ as Qt, g as ne, p as ke } from "./color-scale-utils-ycwO-Ibq.mjs";
2
+ import { $ as ye, o as V, T as z } from "./axis-scales-CPuwbFQf.mjs";
3
+ var Jt = /\s/;
4
+ function Kt(e) {
5
+ for (var t = e.length; t-- && Jt.test(e.charAt(t)); )
6
+ ;
7
+ return t;
8
+ }
9
+ var en = /^\s+/;
10
+ function tn(e) {
11
+ return e && e.slice(0, Kt(e) + 1).replace(en, "");
12
+ }
13
+ var $e = NaN, nn = /^[-+]0x[0-9a-f]+$/i, rn = /^0b[01]+$/i, on = /^0o[0-7]+$/i, sn = parseInt;
14
+ function Ye(e) {
15
+ if (typeof e == "number")
16
+ return e;
17
+ if (qt(e))
18
+ return $e;
19
+ if (be(e)) {
20
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
21
+ e = be(t) ? t + "" : t;
22
+ }
23
+ if (typeof e != "string")
24
+ return e === 0 ? e : +e;
25
+ e = tn(e);
26
+ var n = rn.test(e);
27
+ return n || on.test(e) ? sn(e.slice(2), n ? 2 : 8) : nn.test(e) ? $e : +e;
28
+ }
29
+ var pe = function() {
30
+ return Nt.Date.now();
31
+ }, an = "Expected a function", un = Math.max, cn = Math.min;
32
+ function ln(e, t, n) {
33
+ var r, i, o, s, a, c, g = 0, m = !1, d = !1, h = !0;
34
+ if (typeof e != "function")
35
+ throw new TypeError(an);
36
+ t = Ye(t) || 0, be(n) && (m = !!n.leading, d = "maxWait" in n, o = d ? un(Ye(n.maxWait) || 0, t) : o, h = "trailing" in n ? !!n.trailing : h);
37
+ function T(f) {
38
+ var S = r, W = i;
39
+ return r = i = void 0, g = f, s = e.apply(W, S), s;
40
+ }
41
+ function M(f) {
42
+ return g = f, a = setTimeout(P, t), m ? T(f) : s;
43
+ }
44
+ function E(f) {
45
+ var S = f - c, W = f - g, ae = t - S;
46
+ return d ? cn(ae, o - W) : ae;
47
+ }
48
+ function H(f) {
49
+ var S = f - c, W = f - g;
50
+ return c === void 0 || S >= t || S < 0 || d && W >= o;
51
+ }
52
+ function P() {
53
+ var f = pe();
54
+ if (H(f))
55
+ return Q(f);
56
+ a = setTimeout(P, E(f));
57
+ }
58
+ function Q(f) {
59
+ return a = void 0, h && r ? T(f) : (r = i = void 0, s);
60
+ }
61
+ function A() {
62
+ a !== void 0 && clearTimeout(a), g = 0, r = c = i = a = void 0;
63
+ }
64
+ function O() {
65
+ return a === void 0 ? s : Q(pe());
66
+ }
67
+ function N() {
68
+ var f = pe(), S = H(f);
69
+ if (r = arguments, i = this, c = f, S) {
70
+ if (a === void 0)
71
+ return M(c);
72
+ if (d)
73
+ return clearTimeout(a), a = setTimeout(P, t), T(c);
74
+ }
75
+ return a === void 0 && (a = setTimeout(P, t)), s;
76
+ }
77
+ return N.cancel = A, N.flush = O, N;
78
+ }
79
+ function fn(e, t, n) {
80
+ e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
81
+ for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, o = new Array(i); ++r < i; )
82
+ o[r] = e + r * n;
83
+ return o;
84
+ }
85
+ function D(e) {
86
+ return typeof e == "string" ? new Pe([[document.querySelector(e)]], [document.documentElement]) : new Pe([[e]], Gt);
87
+ }
88
+ function hn() {
89
+ var e = jt().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, o, s, a = !1, c = 0, g = 0, m = 0.5;
90
+ delete e.unknown;
91
+ function d() {
92
+ var h = t().length, T = i < r, M = T ? i : r, E = T ? r : i;
93
+ o = (E - M) / Math.max(1, h - c + g * 2), a && (o = Math.floor(o)), M += (E - M - o * (h - c)) * m, s = o * (1 - c), a && (M = Math.round(M), s = Math.round(s));
94
+ var H = fn(h).map(function(P) {
95
+ return M + o * P;
96
+ });
97
+ return n(T ? H.reverse() : H);
98
+ }
99
+ return e.domain = function(h) {
100
+ return arguments.length ? (t(h), d()) : t();
101
+ }, e.range = function(h) {
102
+ return arguments.length ? ([r, i] = h, r = +r, i = +i, d()) : [r, i];
103
+ }, e.rangeRound = function(h) {
104
+ return [r, i] = h, r = +r, i = +i, a = !0, d();
105
+ }, e.bandwidth = function() {
106
+ return s;
107
+ }, e.step = function() {
108
+ return o;
109
+ }, e.round = function(h) {
110
+ return arguments.length ? (a = !!h, d()) : a;
111
+ }, e.padding = function(h) {
112
+ return arguments.length ? (c = Math.min(1, g = +h), d()) : c;
113
+ }, e.paddingInner = function(h) {
114
+ return arguments.length ? (c = Math.min(1, h), d()) : c;
115
+ }, e.paddingOuter = function(h) {
116
+ return arguments.length ? (g = +h, d()) : g;
117
+ }, e.align = function(h) {
118
+ return arguments.length ? (m = Math.max(0, Math.min(1, h)), d()) : m;
119
+ }, e.copy = function() {
120
+ return hn(t(), [r, i]).round(a).paddingInner(c).paddingOuter(g).align(m);
121
+ }, at.apply(d(), arguments);
122
+ }
123
+ function gn(e, t) {
124
+ e = e.slice();
125
+ var n = 0, r = e.length - 1, i = e[n], o = e[r], s;
126
+ return o < i && (s = n, n = r, r = s, s = i, i = o, o = s), e[n] = t.floor(i), e[r] = t.ceil(o), e;
127
+ }
128
+ const we = /* @__PURE__ */ new Date(), Te = /* @__PURE__ */ new Date();
129
+ function x(e, t, n, r) {
130
+ function i(o) {
131
+ return e(o = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+o)), o;
132
+ }
133
+ return i.floor = (o) => (e(o = /* @__PURE__ */ new Date(+o)), o), i.ceil = (o) => (e(o = new Date(o - 1)), t(o, 1), e(o), o), i.round = (o) => {
134
+ const s = i(o), a = i.ceil(o);
135
+ return o - s < a - o ? s : a;
136
+ }, i.offset = (o, s) => (t(o = /* @__PURE__ */ new Date(+o), s == null ? 1 : Math.floor(s)), o), i.range = (o, s, a) => {
137
+ const c = [];
138
+ if (o = i.ceil(o), a = a == null ? 1 : Math.floor(a), !(o < s) || !(a > 0)) return c;
139
+ let g;
140
+ do
141
+ c.push(g = /* @__PURE__ */ new Date(+o)), t(o, a), e(o);
142
+ while (g < o && o < s);
143
+ return c;
144
+ }, i.filter = (o) => x((s) => {
145
+ if (s >= s) for (; e(s), !o(s); ) s.setTime(s - 1);
146
+ }, (s, a) => {
147
+ if (s >= s)
148
+ if (a < 0) for (; ++a <= 0; )
149
+ for (; t(s, -1), !o(s); )
150
+ ;
151
+ else for (; --a >= 0; )
152
+ for (; t(s, 1), !o(s); )
153
+ ;
154
+ }), n && (i.count = (o, s) => (we.setTime(+o), Te.setTime(+s), e(we), e(Te), Math.floor(n(we, Te))), i.every = (o) => (o = Math.floor(o), !isFinite(o) || !(o > 0) ? null : o > 1 ? i.filter(r ? (s) => r(s) % o === 0 : (s) => i.count(0, s) % o === 0) : i)), i;
155
+ }
156
+ const ce = x(() => {
157
+ }, (e, t) => {
158
+ e.setTime(+e + t);
159
+ }, (e, t) => t - e);
160
+ ce.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? x((t) => {
161
+ t.setTime(Math.floor(t / e) * e);
162
+ }, (t, n) => {
163
+ t.setTime(+t + n * e);
164
+ }, (t, n) => (n - t) / e) : ce);
165
+ ce.range;
166
+ const k = 1e3, I = k * 60, $ = I * 60, _ = $ * 24, Ue = _ * 7, _e = _ * 30, Ce = _ * 365, K = x((e) => {
167
+ e.setTime(e - e.getMilliseconds());
168
+ }, (e, t) => {
169
+ e.setTime(+e + t * k);
170
+ }, (e, t) => (t - e) / k, (e) => e.getUTCSeconds());
171
+ K.range;
172
+ const Ee = x((e) => {
173
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * k);
174
+ }, (e, t) => {
175
+ e.setTime(+e + t * I);
176
+ }, (e, t) => (t - e) / I, (e) => e.getMinutes());
177
+ Ee.range;
178
+ const mn = x((e) => {
179
+ e.setUTCSeconds(0, 0);
180
+ }, (e, t) => {
181
+ e.setTime(+e + t * I);
182
+ }, (e, t) => (t - e) / I, (e) => e.getUTCMinutes());
183
+ mn.range;
184
+ const Fe = x((e) => {
185
+ e.setTime(e - e.getMilliseconds() - e.getSeconds() * k - e.getMinutes() * I);
186
+ }, (e, t) => {
187
+ e.setTime(+e + t * $);
188
+ }, (e, t) => (t - e) / $, (e) => e.getHours());
189
+ Fe.range;
190
+ const dn = x((e) => {
191
+ e.setUTCMinutes(0, 0, 0);
192
+ }, (e, t) => {
193
+ e.setTime(+e + t * $);
194
+ }, (e, t) => (t - e) / $, (e) => e.getUTCHours());
195
+ dn.range;
196
+ const se = x(
197
+ (e) => e.setHours(0, 0, 0, 0),
198
+ (e, t) => e.setDate(e.getDate() + t),
199
+ (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * I) / _,
200
+ (e) => e.getDate() - 1
201
+ );
202
+ se.range;
203
+ const Re = x((e) => {
204
+ e.setUTCHours(0, 0, 0, 0);
205
+ }, (e, t) => {
206
+ e.setUTCDate(e.getUTCDate() + t);
207
+ }, (e, t) => (t - e) / _, (e) => e.getUTCDate() - 1);
208
+ Re.range;
209
+ const yn = x((e) => {
210
+ e.setUTCHours(0, 0, 0, 0);
211
+ }, (e, t) => {
212
+ e.setUTCDate(e.getUTCDate() + t);
213
+ }, (e, t) => (t - e) / _, (e) => Math.floor(e / _));
214
+ yn.range;
215
+ function Z(e) {
216
+ return x((t) => {
217
+ t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
218
+ }, (t, n) => {
219
+ t.setDate(t.getDate() + n * 7);
220
+ }, (t, n) => (n - t - (n.getTimezoneOffset() - t.getTimezoneOffset()) * I) / Ue);
221
+ }
222
+ const me = Z(0), le = Z(1), pn = Z(2), wn = Z(3), ee = Z(4), Tn = Z(5), Cn = Z(6);
223
+ me.range;
224
+ le.range;
225
+ pn.range;
226
+ wn.range;
227
+ ee.range;
228
+ Tn.range;
229
+ Cn.range;
230
+ function X(e) {
231
+ return x((t) => {
232
+ t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
233
+ }, (t, n) => {
234
+ t.setUTCDate(t.getUTCDate() + n * 7);
235
+ }, (t, n) => (n - t) / Ue);
236
+ }
237
+ const ut = X(0), fe = X(1), Sn = X(2), Mn = X(3), te = X(4), xn = X(5), bn = X(6);
238
+ ut.range;
239
+ fe.range;
240
+ Sn.range;
241
+ Mn.range;
242
+ te.range;
243
+ xn.range;
244
+ bn.range;
245
+ const Le = x((e) => {
246
+ e.setDate(1), e.setHours(0, 0, 0, 0);
247
+ }, (e, t) => {
248
+ e.setMonth(e.getMonth() + t);
249
+ }, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, (e) => e.getMonth());
250
+ Le.range;
251
+ const Dn = x((e) => {
252
+ e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
253
+ }, (e, t) => {
254
+ e.setUTCMonth(e.getUTCMonth() + t);
255
+ }, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, (e) => e.getUTCMonth());
256
+ Dn.range;
257
+ const B = x((e) => {
258
+ e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
259
+ }, (e, t) => {
260
+ e.setFullYear(e.getFullYear() + t);
261
+ }, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
262
+ B.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
263
+ t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
264
+ }, (t, n) => {
265
+ t.setFullYear(t.getFullYear() + n * e);
266
+ });
267
+ B.range;
268
+ const j = x((e) => {
269
+ e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
270
+ }, (e, t) => {
271
+ e.setUTCFullYear(e.getUTCFullYear() + t);
272
+ }, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
273
+ j.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : x((t) => {
274
+ t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
275
+ }, (t, n) => {
276
+ t.setUTCFullYear(t.getUTCFullYear() + n * e);
277
+ });
278
+ j.range;
279
+ function vn(e, t, n, r, i, o) {
280
+ const s = [
281
+ [K, 1, k],
282
+ [K, 5, 5 * k],
283
+ [K, 15, 15 * k],
284
+ [K, 30, 30 * k],
285
+ [o, 1, I],
286
+ [o, 5, 5 * I],
287
+ [o, 15, 15 * I],
288
+ [o, 30, 30 * I],
289
+ [i, 1, $],
290
+ [i, 3, 3 * $],
291
+ [i, 6, 6 * $],
292
+ [i, 12, 12 * $],
293
+ [r, 1, _],
294
+ [r, 2, 2 * _],
295
+ [n, 1, Ue],
296
+ [t, 1, _e],
297
+ [t, 3, 3 * _e],
298
+ [e, 1, Ce]
299
+ ];
300
+ function a(g, m, d) {
301
+ const h = m < g;
302
+ h && ([g, m] = [m, g]);
303
+ const T = d && typeof d.range == "function" ? d : c(g, m, d), M = T ? T.range(g, +m + 1) : [];
304
+ return h ? M.reverse() : M;
305
+ }
306
+ function c(g, m, d) {
307
+ const h = Math.abs(m - g) / d, T = Zt(([, , H]) => H).right(s, h);
308
+ if (T === s.length) return e.every(We(g / Ce, m / Ce, d));
309
+ if (T === 0) return ce.every(Math.max(We(g, m, d), 1));
310
+ const [M, E] = s[h / s[T - 1][2] < s[T][2] / h ? T - 1 : T];
311
+ return M.every(E);
312
+ }
313
+ return [a, c];
314
+ }
315
+ const [Un, En] = vn(B, Le, me, se, Fe, Ee);
316
+ function Se(e) {
317
+ if (0 <= e.y && e.y < 100) {
318
+ var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
319
+ return t.setFullYear(e.y), t;
320
+ }
321
+ return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
322
+ }
323
+ function Me(e) {
324
+ if (0 <= e.y && e.y < 100) {
325
+ var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
326
+ return t.setUTCFullYear(e.y), t;
327
+ }
328
+ return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
329
+ }
330
+ function re(e, t, n) {
331
+ return { y: e, m: t, d: n, H: 0, M: 0, S: 0, L: 0 };
332
+ }
333
+ function Fn(e) {
334
+ var t = e.dateTime, n = e.date, r = e.time, i = e.periods, o = e.days, s = e.shortDays, a = e.months, c = e.shortMonths, g = ie(i), m = oe(i), d = ie(o), h = oe(o), T = ie(s), M = oe(s), E = ie(a), H = oe(a), P = ie(c), Q = oe(c), A = {
335
+ a: Ht,
336
+ A: At,
337
+ b: Ot,
338
+ B: Pt,
339
+ c: null,
340
+ d: Ge,
341
+ e: Ge,
342
+ f: Jn,
343
+ g: ur,
344
+ G: lr,
345
+ H: Zn,
346
+ I: Xn,
347
+ j: Qn,
348
+ L: ct,
349
+ m: Kn,
350
+ M: er,
351
+ p: Wt,
352
+ q: kt,
353
+ Q: Xe,
354
+ s: Qe,
355
+ S: tr,
356
+ u: nr,
357
+ U: rr,
358
+ V: ir,
359
+ w: or,
360
+ W: sr,
361
+ x: null,
362
+ X: null,
363
+ y: ar,
364
+ Y: cr,
365
+ Z: fr,
366
+ "%": Ze
367
+ }, O = {
368
+ a: $t,
369
+ A: Yt,
370
+ b: _t,
371
+ B: Bt,
372
+ c: null,
373
+ d: je,
374
+ e: je,
375
+ f: dr,
376
+ g: Dr,
377
+ G: Ur,
378
+ H: hr,
379
+ I: gr,
380
+ j: mr,
381
+ L: ft,
382
+ m: yr,
383
+ M: pr,
384
+ p: Vt,
385
+ q: zt,
386
+ Q: Xe,
387
+ s: Qe,
388
+ S: wr,
389
+ u: Tr,
390
+ U: Cr,
391
+ V: Sr,
392
+ w: Mr,
393
+ W: xr,
394
+ x: null,
395
+ X: null,
396
+ y: br,
397
+ Y: vr,
398
+ Z: Er,
399
+ "%": Ze
400
+ }, N = {
401
+ a: vt,
402
+ A: Ut,
403
+ b: Et,
404
+ B: Ft,
405
+ c: Rt,
406
+ d: qe,
407
+ e: qe,
408
+ f: qn,
409
+ g: ze,
410
+ G: Ve,
411
+ H: Ne,
412
+ I: Ne,
413
+ j: _n,
414
+ L: zn,
415
+ m: Yn,
416
+ M: Bn,
417
+ p: ae,
418
+ q: $n,
419
+ Q: Gn,
420
+ s: jn,
421
+ S: Vn,
422
+ u: An,
423
+ U: On,
424
+ V: Pn,
425
+ w: Hn,
426
+ W: Wn,
427
+ x: Lt,
428
+ X: It,
429
+ y: ze,
430
+ Y: Ve,
431
+ Z: kn,
432
+ "%": Nn
433
+ };
434
+ A.x = f(n, A), A.X = f(r, A), A.c = f(t, A), O.x = f(n, O), O.X = f(r, O), O.c = f(t, O);
435
+ function f(l, y) {
436
+ return function(p) {
437
+ var u = [], v = -1, C = 0, F = l.length, R, G, Oe;
438
+ for (p instanceof Date || (p = /* @__PURE__ */ new Date(+p)); ++v < F; )
439
+ l.charCodeAt(v) === 37 && (u.push(l.slice(C, v)), (G = Be[R = l.charAt(++v)]) != null ? R = l.charAt(++v) : G = R === "e" ? " " : "0", (Oe = y[R]) && (R = Oe(p, G)), u.push(R), C = v + 1);
440
+ return u.push(l.slice(C, v)), u.join("");
441
+ };
442
+ }
443
+ function S(l, y) {
444
+ return function(p) {
445
+ var u = re(1900, void 0, 1), v = W(u, l, p += "", 0), C, F;
446
+ if (v != p.length) return null;
447
+ if ("Q" in u) return new Date(u.Q);
448
+ if ("s" in u) return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
449
+ if (y && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
450
+ if (u.V < 1 || u.V > 53) return null;
451
+ "w" in u || (u.w = 1), "Z" in u ? (C = Me(re(u.y, 0, 1)), F = C.getUTCDay(), C = F > 4 || F === 0 ? fe.ceil(C) : fe(C), C = Re.offset(C, (u.V - 1) * 7), u.y = C.getUTCFullYear(), u.m = C.getUTCMonth(), u.d = C.getUTCDate() + (u.w + 6) % 7) : (C = Se(re(u.y, 0, 1)), F = C.getDay(), C = F > 4 || F === 0 ? le.ceil(C) : le(C), C = se.offset(C, (u.V - 1) * 7), u.y = C.getFullYear(), u.m = C.getMonth(), u.d = C.getDate() + (u.w + 6) % 7);
452
+ } else ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), F = "Z" in u ? Me(re(u.y, 0, 1)).getUTCDay() : Se(re(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (F + 5) % 7 : u.w + u.U * 7 - (F + 6) % 7);
453
+ return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, Me(u)) : Se(u);
454
+ };
455
+ }
456
+ function W(l, y, p, u) {
457
+ for (var v = 0, C = y.length, F = p.length, R, G; v < C; ) {
458
+ if (u >= F) return -1;
459
+ if (R = y.charCodeAt(v++), R === 37) {
460
+ if (R = y.charAt(v++), G = N[R in Be ? y.charAt(v++) : R], !G || (u = G(l, p, u)) < 0) return -1;
461
+ } else if (R != p.charCodeAt(u++))
462
+ return -1;
463
+ }
464
+ return u;
465
+ }
466
+ function ae(l, y, p) {
467
+ var u = g.exec(y.slice(p));
468
+ return u ? (l.p = m.get(u[0].toLowerCase()), p + u[0].length) : -1;
469
+ }
470
+ function vt(l, y, p) {
471
+ var u = T.exec(y.slice(p));
472
+ return u ? (l.w = M.get(u[0].toLowerCase()), p + u[0].length) : -1;
473
+ }
474
+ function Ut(l, y, p) {
475
+ var u = d.exec(y.slice(p));
476
+ return u ? (l.w = h.get(u[0].toLowerCase()), p + u[0].length) : -1;
477
+ }
478
+ function Et(l, y, p) {
479
+ var u = P.exec(y.slice(p));
480
+ return u ? (l.m = Q.get(u[0].toLowerCase()), p + u[0].length) : -1;
481
+ }
482
+ function Ft(l, y, p) {
483
+ var u = E.exec(y.slice(p));
484
+ return u ? (l.m = H.get(u[0].toLowerCase()), p + u[0].length) : -1;
485
+ }
486
+ function Rt(l, y, p) {
487
+ return W(l, t, y, p);
488
+ }
489
+ function Lt(l, y, p) {
490
+ return W(l, n, y, p);
491
+ }
492
+ function It(l, y, p) {
493
+ return W(l, r, y, p);
494
+ }
495
+ function Ht(l) {
496
+ return s[l.getDay()];
497
+ }
498
+ function At(l) {
499
+ return o[l.getDay()];
500
+ }
501
+ function Ot(l) {
502
+ return c[l.getMonth()];
503
+ }
504
+ function Pt(l) {
505
+ return a[l.getMonth()];
506
+ }
507
+ function Wt(l) {
508
+ return i[+(l.getHours() >= 12)];
509
+ }
510
+ function kt(l) {
511
+ return 1 + ~~(l.getMonth() / 3);
512
+ }
513
+ function $t(l) {
514
+ return s[l.getUTCDay()];
515
+ }
516
+ function Yt(l) {
517
+ return o[l.getUTCDay()];
518
+ }
519
+ function _t(l) {
520
+ return c[l.getUTCMonth()];
521
+ }
522
+ function Bt(l) {
523
+ return a[l.getUTCMonth()];
524
+ }
525
+ function Vt(l) {
526
+ return i[+(l.getUTCHours() >= 12)];
527
+ }
528
+ function zt(l) {
529
+ return 1 + ~~(l.getUTCMonth() / 3);
530
+ }
531
+ return {
532
+ format: function(l) {
533
+ var y = f(l += "", A);
534
+ return y.toString = function() {
535
+ return l;
536
+ }, y;
537
+ },
538
+ parse: function(l) {
539
+ var y = S(l += "", !1);
540
+ return y.toString = function() {
541
+ return l;
542
+ }, y;
543
+ },
544
+ utcFormat: function(l) {
545
+ var y = f(l += "", O);
546
+ return y.toString = function() {
547
+ return l;
548
+ }, y;
549
+ },
550
+ utcParse: function(l) {
551
+ var y = S(l += "", !0);
552
+ return y.toString = function() {
553
+ return l;
554
+ }, y;
555
+ }
556
+ };
557
+ }
558
+ var Be = { "-": "", _: " ", 0: "0" }, b = /^\s*\d+/, Rn = /^%/, Ln = /[\\^$*+?|[\]().{}]/g;
559
+ function w(e, t, n) {
560
+ var r = e < 0 ? "-" : "", i = (r ? -e : e) + "", o = i.length;
561
+ return r + (o < n ? new Array(n - o + 1).join(t) + i : i);
562
+ }
563
+ function In(e) {
564
+ return e.replace(Ln, "\\$&");
565
+ }
566
+ function ie(e) {
567
+ return new RegExp("^(?:" + e.map(In).join("|") + ")", "i");
568
+ }
569
+ function oe(e) {
570
+ return new Map(e.map((t, n) => [t.toLowerCase(), n]));
571
+ }
572
+ function Hn(e, t, n) {
573
+ var r = b.exec(t.slice(n, n + 1));
574
+ return r ? (e.w = +r[0], n + r[0].length) : -1;
575
+ }
576
+ function An(e, t, n) {
577
+ var r = b.exec(t.slice(n, n + 1));
578
+ return r ? (e.u = +r[0], n + r[0].length) : -1;
579
+ }
580
+ function On(e, t, n) {
581
+ var r = b.exec(t.slice(n, n + 2));
582
+ return r ? (e.U = +r[0], n + r[0].length) : -1;
583
+ }
584
+ function Pn(e, t, n) {
585
+ var r = b.exec(t.slice(n, n + 2));
586
+ return r ? (e.V = +r[0], n + r[0].length) : -1;
587
+ }
588
+ function Wn(e, t, n) {
589
+ var r = b.exec(t.slice(n, n + 2));
590
+ return r ? (e.W = +r[0], n + r[0].length) : -1;
591
+ }
592
+ function Ve(e, t, n) {
593
+ var r = b.exec(t.slice(n, n + 4));
594
+ return r ? (e.y = +r[0], n + r[0].length) : -1;
595
+ }
596
+ function ze(e, t, n) {
597
+ var r = b.exec(t.slice(n, n + 2));
598
+ return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
599
+ }
600
+ function kn(e, t, n) {
601
+ var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
602
+ return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
603
+ }
604
+ function $n(e, t, n) {
605
+ var r = b.exec(t.slice(n, n + 1));
606
+ return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
607
+ }
608
+ function Yn(e, t, n) {
609
+ var r = b.exec(t.slice(n, n + 2));
610
+ return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
611
+ }
612
+ function qe(e, t, n) {
613
+ var r = b.exec(t.slice(n, n + 2));
614
+ return r ? (e.d = +r[0], n + r[0].length) : -1;
615
+ }
616
+ function _n(e, t, n) {
617
+ var r = b.exec(t.slice(n, n + 3));
618
+ return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
619
+ }
620
+ function Ne(e, t, n) {
621
+ var r = b.exec(t.slice(n, n + 2));
622
+ return r ? (e.H = +r[0], n + r[0].length) : -1;
623
+ }
624
+ function Bn(e, t, n) {
625
+ var r = b.exec(t.slice(n, n + 2));
626
+ return r ? (e.M = +r[0], n + r[0].length) : -1;
627
+ }
628
+ function Vn(e, t, n) {
629
+ var r = b.exec(t.slice(n, n + 2));
630
+ return r ? (e.S = +r[0], n + r[0].length) : -1;
631
+ }
632
+ function zn(e, t, n) {
633
+ var r = b.exec(t.slice(n, n + 3));
634
+ return r ? (e.L = +r[0], n + r[0].length) : -1;
635
+ }
636
+ function qn(e, t, n) {
637
+ var r = b.exec(t.slice(n, n + 6));
638
+ return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
639
+ }
640
+ function Nn(e, t, n) {
641
+ var r = Rn.exec(t.slice(n, n + 1));
642
+ return r ? n + r[0].length : -1;
643
+ }
644
+ function Gn(e, t, n) {
645
+ var r = b.exec(t.slice(n));
646
+ return r ? (e.Q = +r[0], n + r[0].length) : -1;
647
+ }
648
+ function jn(e, t, n) {
649
+ var r = b.exec(t.slice(n));
650
+ return r ? (e.s = +r[0], n + r[0].length) : -1;
651
+ }
652
+ function Ge(e, t) {
653
+ return w(e.getDate(), t, 2);
654
+ }
655
+ function Zn(e, t) {
656
+ return w(e.getHours(), t, 2);
657
+ }
658
+ function Xn(e, t) {
659
+ return w(e.getHours() % 12 || 12, t, 2);
660
+ }
661
+ function Qn(e, t) {
662
+ return w(1 + se.count(B(e), e), t, 3);
663
+ }
664
+ function ct(e, t) {
665
+ return w(e.getMilliseconds(), t, 3);
666
+ }
667
+ function Jn(e, t) {
668
+ return ct(e, t) + "000";
669
+ }
670
+ function Kn(e, t) {
671
+ return w(e.getMonth() + 1, t, 2);
672
+ }
673
+ function er(e, t) {
674
+ return w(e.getMinutes(), t, 2);
675
+ }
676
+ function tr(e, t) {
677
+ return w(e.getSeconds(), t, 2);
678
+ }
679
+ function nr(e) {
680
+ var t = e.getDay();
681
+ return t === 0 ? 7 : t;
682
+ }
683
+ function rr(e, t) {
684
+ return w(me.count(B(e) - 1, e), t, 2);
685
+ }
686
+ function lt(e) {
687
+ var t = e.getDay();
688
+ return t >= 4 || t === 0 ? ee(e) : ee.ceil(e);
689
+ }
690
+ function ir(e, t) {
691
+ return e = lt(e), w(ee.count(B(e), e) + (B(e).getDay() === 4), t, 2);
692
+ }
693
+ function or(e) {
694
+ return e.getDay();
695
+ }
696
+ function sr(e, t) {
697
+ return w(le.count(B(e) - 1, e), t, 2);
698
+ }
699
+ function ar(e, t) {
700
+ return w(e.getFullYear() % 100, t, 2);
701
+ }
702
+ function ur(e, t) {
703
+ return e = lt(e), w(e.getFullYear() % 100, t, 2);
704
+ }
705
+ function cr(e, t) {
706
+ return w(e.getFullYear() % 1e4, t, 4);
707
+ }
708
+ function lr(e, t) {
709
+ var n = e.getDay();
710
+ return e = n >= 4 || n === 0 ? ee(e) : ee.ceil(e), w(e.getFullYear() % 1e4, t, 4);
711
+ }
712
+ function fr(e) {
713
+ var t = e.getTimezoneOffset();
714
+ return (t > 0 ? "-" : (t *= -1, "+")) + w(t / 60 | 0, "0", 2) + w(t % 60, "0", 2);
715
+ }
716
+ function je(e, t) {
717
+ return w(e.getUTCDate(), t, 2);
718
+ }
719
+ function hr(e, t) {
720
+ return w(e.getUTCHours(), t, 2);
721
+ }
722
+ function gr(e, t) {
723
+ return w(e.getUTCHours() % 12 || 12, t, 2);
724
+ }
725
+ function mr(e, t) {
726
+ return w(1 + Re.count(j(e), e), t, 3);
727
+ }
728
+ function ft(e, t) {
729
+ return w(e.getUTCMilliseconds(), t, 3);
730
+ }
731
+ function dr(e, t) {
732
+ return ft(e, t) + "000";
733
+ }
734
+ function yr(e, t) {
735
+ return w(e.getUTCMonth() + 1, t, 2);
736
+ }
737
+ function pr(e, t) {
738
+ return w(e.getUTCMinutes(), t, 2);
739
+ }
740
+ function wr(e, t) {
741
+ return w(e.getUTCSeconds(), t, 2);
742
+ }
743
+ function Tr(e) {
744
+ var t = e.getUTCDay();
745
+ return t === 0 ? 7 : t;
746
+ }
747
+ function Cr(e, t) {
748
+ return w(ut.count(j(e) - 1, e), t, 2);
749
+ }
750
+ function ht(e) {
751
+ var t = e.getUTCDay();
752
+ return t >= 4 || t === 0 ? te(e) : te.ceil(e);
753
+ }
754
+ function Sr(e, t) {
755
+ return e = ht(e), w(te.count(j(e), e) + (j(e).getUTCDay() === 4), t, 2);
756
+ }
757
+ function Mr(e) {
758
+ return e.getUTCDay();
759
+ }
760
+ function xr(e, t) {
761
+ return w(fe.count(j(e) - 1, e), t, 2);
762
+ }
763
+ function br(e, t) {
764
+ return w(e.getUTCFullYear() % 100, t, 2);
765
+ }
766
+ function Dr(e, t) {
767
+ return e = ht(e), w(e.getUTCFullYear() % 100, t, 2);
768
+ }
769
+ function vr(e, t) {
770
+ return w(e.getUTCFullYear() % 1e4, t, 4);
771
+ }
772
+ function Ur(e, t) {
773
+ var n = e.getUTCDay();
774
+ return e = n >= 4 || n === 0 ? te(e) : te.ceil(e), w(e.getUTCFullYear() % 1e4, t, 4);
775
+ }
776
+ function Er() {
777
+ return "+0000";
778
+ }
779
+ function Ze() {
780
+ return "%";
781
+ }
782
+ function Xe(e) {
783
+ return +e;
784
+ }
785
+ function Qe(e) {
786
+ return Math.floor(+e / 1e3);
787
+ }
788
+ var J, gt;
789
+ Fr({
790
+ dateTime: "%x, %X",
791
+ date: "%-m/%-d/%Y",
792
+ time: "%-I:%M:%S %p",
793
+ periods: ["AM", "PM"],
794
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
795
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
796
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
797
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
798
+ });
799
+ function Fr(e) {
800
+ return J = Fn(e), gt = J.format, J.parse, J.utcFormat, J.utcParse, J;
801
+ }
802
+ function Rr(e) {
803
+ return new Date(e);
804
+ }
805
+ function Lr(e) {
806
+ return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
807
+ }
808
+ function mt(e, t, n, r, i, o, s, a, c, g) {
809
+ var m = Xt(), d = m.invert, h = m.domain, T = g(".%L"), M = g(":%S"), E = g("%I:%M"), H = g("%I %p"), P = g("%a %d"), Q = g("%b %d"), A = g("%B"), O = g("%Y");
810
+ function N(f) {
811
+ return (c(f) < f ? T : a(f) < f ? M : s(f) < f ? E : o(f) < f ? H : r(f) < f ? i(f) < f ? P : Q : n(f) < f ? A : O)(f);
812
+ }
813
+ return m.invert = function(f) {
814
+ return new Date(d(f));
815
+ }, m.domain = function(f) {
816
+ return arguments.length ? h(Array.from(f, Lr)) : h().map(Rr);
817
+ }, m.ticks = function(f) {
818
+ var S = h();
819
+ return e(S[0], S[S.length - 1], f ?? 10);
820
+ }, m.tickFormat = function(f, S) {
821
+ return S == null ? N : g(S);
822
+ }, m.nice = function(f) {
823
+ var S = h();
824
+ return (!f || typeof f.range != "function") && (f = t(S[0], S[S.length - 1], f ?? 10)), f ? h(gn(S, f)) : m;
825
+ }, m.copy = function() {
826
+ return Qt(m, mt(e, t, n, r, i, o, s, a, c, g));
827
+ }, m;
828
+ }
829
+ function Fi() {
830
+ return at.apply(mt(Un, En, B, Le, me, se, Fe, Ee, K, gt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
831
+ }
832
+ const Ri = Math.abs, Li = Math.atan2, Ii = Math.cos, Hi = Math.max, Ai = Math.min, Oi = Math.sin, Pi = Math.sqrt, Wi = 1e-12, Ie = Math.PI, Je = Ie / 2, ki = 2 * Ie;
833
+ function $i(e) {
834
+ return e > 1 ? 0 : e < -1 ? Ie : Math.acos(e);
835
+ }
836
+ function Yi(e) {
837
+ return e >= 1 ? Je : e <= -1 ? -Je : Math.asin(e);
838
+ }
839
+ function dt(e) {
840
+ this._context = e;
841
+ }
842
+ dt.prototype = {
843
+ areaStart: function() {
844
+ this._line = 0;
845
+ },
846
+ areaEnd: function() {
847
+ this._line = NaN;
848
+ },
849
+ lineStart: function() {
850
+ this._point = 0;
851
+ },
852
+ lineEnd: function() {
853
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
854
+ },
855
+ point: function(e, t) {
856
+ switch (e = +e, t = +t, this._point) {
857
+ case 0:
858
+ this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
859
+ break;
860
+ case 1:
861
+ this._point = 2;
862
+ // falls through
863
+ default:
864
+ this._context.lineTo(e, t);
865
+ break;
866
+ }
867
+ }
868
+ };
869
+ function _i(e) {
870
+ return new dt(e);
871
+ }
872
+ function Ke() {
873
+ }
874
+ function yt(e) {
875
+ this._context = e;
876
+ }
877
+ yt.prototype = {
878
+ areaStart: Ke,
879
+ areaEnd: Ke,
880
+ lineStart: function() {
881
+ this._point = 0;
882
+ },
883
+ lineEnd: function() {
884
+ this._point && this._context.closePath();
885
+ },
886
+ point: function(e, t) {
887
+ e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
888
+ }
889
+ };
890
+ function Bi(e) {
891
+ return new yt(e);
892
+ }
893
+ function Ir(e, t) {
894
+ if (e.match(/^[a-z]+:\/\//i))
895
+ return e;
896
+ if (e.match(/^\/\//))
897
+ return window.location.protocol + e;
898
+ if (e.match(/^[a-z]+:/i))
899
+ return e;
900
+ const n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
901
+ return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
902
+ }
903
+ const Hr = /* @__PURE__ */ (() => {
904
+ let e = 0;
905
+ const t = () => (
906
+ // eslint-disable-next-line no-bitwise
907
+ `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
908
+ );
909
+ return () => (e += 1, `u${t()}${e}`);
910
+ })();
911
+ function Y(e) {
912
+ const t = [];
913
+ for (let n = 0, r = e.length; n < r; n++)
914
+ t.push(e[n]);
915
+ return t;
916
+ }
917
+ function he(e, t) {
918
+ const r = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
919
+ return r ? parseFloat(r.replace("px", "")) : 0;
920
+ }
921
+ function Ar(e) {
922
+ const t = he(e, "border-left-width"), n = he(e, "border-right-width");
923
+ return e.clientWidth + t + n;
924
+ }
925
+ function Or(e) {
926
+ const t = he(e, "border-top-width"), n = he(e, "border-bottom-width");
927
+ return e.clientHeight + t + n;
928
+ }
929
+ function pt(e, t = {}) {
930
+ const n = t.width || Ar(e), r = t.height || Or(e);
931
+ return { width: n, height: r };
932
+ }
933
+ function Pr() {
934
+ let e, t;
935
+ try {
936
+ t = process;
937
+ } catch {
938
+ }
939
+ const n = t && t.env ? t.env.devicePixelRatio : null;
940
+ return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
941
+ }
942
+ const L = 16384;
943
+ function Wr(e) {
944
+ (e.width > L || e.height > L) && (e.width > L && e.height > L ? e.width > e.height ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L) : e.width > L ? (e.height *= L / e.width, e.width = L) : (e.width *= L / e.height, e.height = L));
945
+ }
946
+ function ge(e) {
947
+ return new Promise((t, n) => {
948
+ const r = new Image();
949
+ r.decode = () => t(r), r.onload = () => t(r), r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
950
+ });
951
+ }
952
+ async function kr(e) {
953
+ return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
954
+ }
955
+ async function $r(e, t, n) {
956
+ const r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), o = document.createElementNS(r, "foreignObject");
957
+ return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), o.setAttribute("width", "100%"), o.setAttribute("height", "100%"), o.setAttribute("x", "0"), o.setAttribute("y", "0"), o.setAttribute("externalResourcesRequired", "true"), i.appendChild(o), o.appendChild(e), kr(i);
958
+ }
959
+ const U = (e, t) => {
960
+ if (e instanceof t)
961
+ return !0;
962
+ const n = Object.getPrototypeOf(e);
963
+ return n === null ? !1 : n.constructor.name === t.name || U(n, t);
964
+ };
965
+ function Yr(e) {
966
+ const t = e.getPropertyValue("content");
967
+ return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
968
+ }
969
+ function _r(e) {
970
+ return Y(e).map((t) => {
971
+ const n = e.getPropertyValue(t), r = e.getPropertyPriority(t);
972
+ return `${t}: ${n}${r ? " !important" : ""};`;
973
+ }).join(" ");
974
+ }
975
+ function Br(e, t, n) {
976
+ const r = `.${e}:${t}`, i = n.cssText ? Yr(n) : _r(n);
977
+ return document.createTextNode(`${r}{${i}}`);
978
+ }
979
+ function et(e, t, n) {
980
+ const r = window.getComputedStyle(e, n), i = r.getPropertyValue("content");
981
+ if (i === "" || i === "none")
982
+ return;
983
+ const o = Hr();
984
+ try {
985
+ t.className = `${t.className} ${o}`;
986
+ } catch {
987
+ return;
988
+ }
989
+ const s = document.createElement("style");
990
+ s.appendChild(Br(o, n, r)), t.appendChild(s);
991
+ }
992
+ function Vr(e, t) {
993
+ et(e, t, ":before"), et(e, t, ":after");
994
+ }
995
+ const tt = "application/font-woff", nt = "image/jpeg", zr = {
996
+ woff: tt,
997
+ woff2: tt,
998
+ ttf: "application/font-truetype",
999
+ eot: "application/vnd.ms-fontobject",
1000
+ png: "image/png",
1001
+ jpg: nt,
1002
+ jpeg: nt,
1003
+ gif: "image/gif",
1004
+ tiff: "image/tiff",
1005
+ svg: "image/svg+xml",
1006
+ webp: "image/webp"
1007
+ };
1008
+ function qr(e) {
1009
+ const t = /\.([^./]*?)$/g.exec(e);
1010
+ return t ? t[1] : "";
1011
+ }
1012
+ function He(e) {
1013
+ const t = qr(e).toLowerCase();
1014
+ return zr[t] || "";
1015
+ }
1016
+ function Nr(e) {
1017
+ return e.split(/,/)[1];
1018
+ }
1019
+ function De(e) {
1020
+ return e.search(/^(data:)/) !== -1;
1021
+ }
1022
+ function Gr(e, t) {
1023
+ return `data:${t};base64,${e}`;
1024
+ }
1025
+ async function wt(e, t, n) {
1026
+ const r = await fetch(e, t);
1027
+ if (r.status === 404)
1028
+ throw new Error(`Resource "${r.url}" not found`);
1029
+ const i = await r.blob();
1030
+ return new Promise((o, s) => {
1031
+ const a = new FileReader();
1032
+ a.onerror = s, a.onloadend = () => {
1033
+ try {
1034
+ o(n({ res: r, result: a.result }));
1035
+ } catch (c) {
1036
+ s(c);
1037
+ }
1038
+ }, a.readAsDataURL(i);
1039
+ });
1040
+ }
1041
+ const xe = {};
1042
+ function jr(e, t, n) {
1043
+ let r = e.replace(/\?.*/, "");
1044
+ return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
1045
+ }
1046
+ async function Ae(e, t, n) {
1047
+ const r = jr(e, t, n.includeQueryParams);
1048
+ if (xe[r] != null)
1049
+ return xe[r];
1050
+ n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
1051
+ let i;
1052
+ try {
1053
+ const o = await wt(e, n.fetchRequestInit, ({ res: s, result: a }) => (t || (t = s.headers.get("Content-Type") || ""), Nr(a)));
1054
+ i = Gr(o, t);
1055
+ } catch (o) {
1056
+ i = n.imagePlaceholder || "";
1057
+ let s = `Failed to fetch resource: ${e}`;
1058
+ o && (s = typeof o == "string" ? o : o.message), s && console.warn(s);
1059
+ }
1060
+ return xe[r] = i, i;
1061
+ }
1062
+ async function Zr(e) {
1063
+ const t = e.toDataURL();
1064
+ return t === "data:," ? e.cloneNode(!1) : ge(t);
1065
+ }
1066
+ async function Xr(e, t) {
1067
+ if (e.currentSrc) {
1068
+ const o = document.createElement("canvas"), s = o.getContext("2d");
1069
+ o.width = e.clientWidth, o.height = e.clientHeight, s == null || s.drawImage(e, 0, 0, o.width, o.height);
1070
+ const a = o.toDataURL();
1071
+ return ge(a);
1072
+ }
1073
+ const n = e.poster, r = He(n), i = await Ae(n, r, t);
1074
+ return ge(i);
1075
+ }
1076
+ async function Qr(e) {
1077
+ var t;
1078
+ try {
1079
+ if (!((t = e == null ? void 0 : e.contentDocument) === null || t === void 0) && t.body)
1080
+ return await de(e.contentDocument.body, {}, !0);
1081
+ } catch {
1082
+ }
1083
+ return e.cloneNode(!1);
1084
+ }
1085
+ async function Jr(e, t) {
1086
+ return U(e, HTMLCanvasElement) ? Zr(e) : U(e, HTMLVideoElement) ? Xr(e, t) : U(e, HTMLIFrameElement) ? Qr(e) : e.cloneNode(!1);
1087
+ }
1088
+ const Kr = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT";
1089
+ async function ei(e, t, n) {
1090
+ var r, i;
1091
+ let o = [];
1092
+ return Kr(e) && e.assignedNodes ? o = Y(e.assignedNodes()) : U(e, HTMLIFrameElement) && (!((r = e.contentDocument) === null || r === void 0) && r.body) ? o = Y(e.contentDocument.body.childNodes) : o = Y(((i = e.shadowRoot) !== null && i !== void 0 ? i : e).childNodes), o.length === 0 || U(e, HTMLVideoElement) || await o.reduce((s, a) => s.then(() => de(a, n)).then((c) => {
1093
+ c && t.appendChild(c);
1094
+ }), Promise.resolve()), t;
1095
+ }
1096
+ function ti(e, t) {
1097
+ const n = t.style;
1098
+ if (!n)
1099
+ return;
1100
+ const r = window.getComputedStyle(e);
1101
+ r.cssText ? (n.cssText = r.cssText, n.transformOrigin = r.transformOrigin) : Y(r).forEach((i) => {
1102
+ let o = r.getPropertyValue(i);
1103
+ i === "font-size" && o.endsWith("px") && (o = `${Math.floor(parseFloat(o.substring(0, o.length - 2))) - 0.1}px`), U(e, HTMLIFrameElement) && i === "display" && o === "inline" && (o = "block"), i === "d" && t.getAttribute("d") && (o = `path(${t.getAttribute("d")})`), n.setProperty(i, o, r.getPropertyPriority(i));
1104
+ });
1105
+ }
1106
+ function ni(e, t) {
1107
+ U(e, HTMLTextAreaElement) && (t.innerHTML = e.value), U(e, HTMLInputElement) && t.setAttribute("value", e.value);
1108
+ }
1109
+ function ri(e, t) {
1110
+ if (U(e, HTMLSelectElement)) {
1111
+ const n = t, r = Array.from(n.children).find((i) => e.value === i.getAttribute("value"));
1112
+ r && r.setAttribute("selected", "");
1113
+ }
1114
+ }
1115
+ function ii(e, t) {
1116
+ return U(t, Element) && (ti(e, t), Vr(e, t), ni(e, t), ri(e, t)), t;
1117
+ }
1118
+ async function oi(e, t) {
1119
+ const n = e.querySelectorAll ? e.querySelectorAll("use") : [];
1120
+ if (n.length === 0)
1121
+ return e;
1122
+ const r = {};
1123
+ for (let o = 0; o < n.length; o++) {
1124
+ const a = n[o].getAttribute("xlink:href");
1125
+ if (a) {
1126
+ const c = e.querySelector(a), g = document.querySelector(a);
1127
+ !c && g && !r[a] && (r[a] = await de(g, t, !0));
1128
+ }
1129
+ }
1130
+ const i = Object.values(r);
1131
+ if (i.length) {
1132
+ const o = "http://www.w3.org/1999/xhtml", s = document.createElementNS(o, "svg");
1133
+ s.setAttribute("xmlns", o), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
1134
+ const a = document.createElementNS(o, "defs");
1135
+ s.appendChild(a);
1136
+ for (let c = 0; c < i.length; c++)
1137
+ a.appendChild(i[c]);
1138
+ e.appendChild(s);
1139
+ }
1140
+ return e;
1141
+ }
1142
+ async function de(e, t, n) {
1143
+ return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((r) => Jr(r, t)).then((r) => ei(e, r, t)).then((r) => ii(e, r)).then((r) => oi(r, t));
1144
+ }
1145
+ const Tt = /url\((['"]?)([^'"]+?)\1\)/g, si = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, ai = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
1146
+ function ui(e) {
1147
+ const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
1148
+ return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
1149
+ }
1150
+ function ci(e) {
1151
+ const t = [];
1152
+ return e.replace(Tt, (n, r, i) => (t.push(i), n)), t.filter((n) => !De(n));
1153
+ }
1154
+ async function li(e, t, n, r, i) {
1155
+ try {
1156
+ const o = n ? Ir(t, n) : t, s = He(t);
1157
+ let a;
1158
+ return i || (a = await Ae(o, s, r)), e.replace(ui(t), `$1${a}$3`);
1159
+ } catch {
1160
+ }
1161
+ return e;
1162
+ }
1163
+ function fi(e, { preferredFontFormat: t }) {
1164
+ return t ? e.replace(ai, (n) => {
1165
+ for (; ; ) {
1166
+ const [r, , i] = si.exec(n) || [];
1167
+ if (!i)
1168
+ return "";
1169
+ if (i === t)
1170
+ return `src: ${r};`;
1171
+ }
1172
+ }) : e;
1173
+ }
1174
+ function Ct(e) {
1175
+ return e.search(Tt) !== -1;
1176
+ }
1177
+ async function St(e, t, n) {
1178
+ if (!Ct(e))
1179
+ return e;
1180
+ const r = fi(e, n);
1181
+ return ci(r).reduce((o, s) => o.then((a) => li(a, s, t, n)), Promise.resolve(r));
1182
+ }
1183
+ async function ue(e, t, n) {
1184
+ var r;
1185
+ const i = (r = t.style) === null || r === void 0 ? void 0 : r.getPropertyValue(e);
1186
+ if (i) {
1187
+ const o = await St(i, null, n);
1188
+ return t.style.setProperty(e, o, t.style.getPropertyPriority(e)), !0;
1189
+ }
1190
+ return !1;
1191
+ }
1192
+ async function hi(e, t) {
1193
+ await ue("background", e, t) || await ue("background-image", e, t), await ue("mask", e, t) || await ue("mask-image", e, t);
1194
+ }
1195
+ async function gi(e, t) {
1196
+ const n = U(e, HTMLImageElement);
1197
+ if (!(n && !De(e.src)) && !(U(e, SVGImageElement) && !De(e.href.baseVal)))
1198
+ return;
1199
+ const r = n ? e.src : e.href.baseVal, i = await Ae(r, He(r), t);
1200
+ await new Promise((o, s) => {
1201
+ e.onload = o, e.onerror = s;
1202
+ const a = e;
1203
+ a.decode && (a.decode = o), a.loading === "lazy" && (a.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
1204
+ });
1205
+ }
1206
+ async function mi(e, t) {
1207
+ const r = Y(e.childNodes).map((i) => Mt(i, t));
1208
+ await Promise.all(r).then(() => e);
1209
+ }
1210
+ async function Mt(e, t) {
1211
+ U(e, Element) && (await hi(e, t), await gi(e, t), await mi(e, t));
1212
+ }
1213
+ function di(e, t) {
1214
+ const { style: n } = e;
1215
+ t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
1216
+ const r = t.style;
1217
+ return r != null && Object.keys(r).forEach((i) => {
1218
+ n[i] = r[i];
1219
+ }), e;
1220
+ }
1221
+ const rt = {};
1222
+ async function it(e) {
1223
+ let t = rt[e];
1224
+ if (t != null)
1225
+ return t;
1226
+ const r = await (await fetch(e)).text();
1227
+ return t = { url: e, cssText: r }, rt[e] = t, t;
1228
+ }
1229
+ async function ot(e, t) {
1230
+ let n = e.cssText;
1231
+ const r = /url\(["']?([^"')]+)["']?\)/g, o = (n.match(/url\([^)]+\)/g) || []).map(async (s) => {
1232
+ let a = s.replace(r, "$1");
1233
+ return a.startsWith("https://") || (a = new URL(a, e.url).href), wt(a, t.fetchRequestInit, ({ result: c }) => (n = n.replace(s, `url(${c})`), [s, c]));
1234
+ });
1235
+ return Promise.all(o).then(() => n);
1236
+ }
1237
+ function st(e) {
1238
+ if (e == null)
1239
+ return [];
1240
+ const t = [], n = /(\/\*[\s\S]*?\*\/)/gi;
1241
+ let r = e.replace(n, "");
1242
+ const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
1243
+ for (; ; ) {
1244
+ const c = i.exec(r);
1245
+ if (c === null)
1246
+ break;
1247
+ t.push(c[0]);
1248
+ }
1249
+ r = r.replace(i, "");
1250
+ const o = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", a = new RegExp(s, "gi");
1251
+ for (; ; ) {
1252
+ let c = o.exec(r);
1253
+ if (c === null) {
1254
+ if (c = a.exec(r), c === null)
1255
+ break;
1256
+ o.lastIndex = a.lastIndex;
1257
+ } else
1258
+ a.lastIndex = o.lastIndex;
1259
+ t.push(c[0]);
1260
+ }
1261
+ return t;
1262
+ }
1263
+ async function yi(e, t) {
1264
+ const n = [], r = [];
1265
+ return e.forEach((i) => {
1266
+ if ("cssRules" in i)
1267
+ try {
1268
+ Y(i.cssRules || []).forEach((o, s) => {
1269
+ if (o.type === CSSRule.IMPORT_RULE) {
1270
+ let a = s + 1;
1271
+ const c = o.href, g = it(c).then((m) => ot(m, t)).then((m) => st(m).forEach((d) => {
1272
+ try {
1273
+ i.insertRule(d, d.startsWith("@import") ? a += 1 : i.cssRules.length);
1274
+ } catch (h) {
1275
+ console.error("Error inserting rule from remote css", {
1276
+ rule: d,
1277
+ error: h
1278
+ });
1279
+ }
1280
+ })).catch((m) => {
1281
+ console.error("Error loading remote css", m.toString());
1282
+ });
1283
+ r.push(g);
1284
+ }
1285
+ });
1286
+ } catch (o) {
1287
+ const s = e.find((a) => a.href == null) || document.styleSheets[0];
1288
+ i.href != null && r.push(it(i.href).then((a) => ot(a, t)).then((a) => st(a).forEach((c) => {
1289
+ s.insertRule(c, i.cssRules.length);
1290
+ })).catch((a) => {
1291
+ console.error("Error loading remote stylesheet", a);
1292
+ })), console.error("Error inlining remote css file", o);
1293
+ }
1294
+ }), Promise.all(r).then(() => (e.forEach((i) => {
1295
+ if ("cssRules" in i)
1296
+ try {
1297
+ Y(i.cssRules || []).forEach((o) => {
1298
+ n.push(o);
1299
+ });
1300
+ } catch (o) {
1301
+ console.error(`Error while reading CSS rules from ${i.href}`, o);
1302
+ }
1303
+ }), n));
1304
+ }
1305
+ function pi(e) {
1306
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => Ct(t.style.getPropertyValue("src")));
1307
+ }
1308
+ async function wi(e, t) {
1309
+ if (e.ownerDocument == null)
1310
+ throw new Error("Provided element is not within a Document");
1311
+ const n = Y(e.ownerDocument.styleSheets), r = await yi(n, t);
1312
+ return pi(r);
1313
+ }
1314
+ async function Ti(e, t) {
1315
+ const n = await wi(e, t);
1316
+ return (await Promise.all(n.map((i) => {
1317
+ const o = i.parentStyleSheet ? i.parentStyleSheet.href : null;
1318
+ return St(i.cssText, o, t);
1319
+ }))).join(`
1320
+ `);
1321
+ }
1322
+ async function Ci(e, t) {
1323
+ const n = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Ti(e, t);
1324
+ if (n) {
1325
+ const r = document.createElement("style"), i = document.createTextNode(n);
1326
+ r.appendChild(i), e.firstChild ? e.insertBefore(r, e.firstChild) : e.appendChild(r);
1327
+ }
1328
+ }
1329
+ async function Si(e, t = {}) {
1330
+ const { width: n, height: r } = pt(e, t), i = await de(e, t, !0);
1331
+ return await Ci(i, t), await Mt(i, t), di(i, t), await $r(i, n, r);
1332
+ }
1333
+ async function xt(e, t = {}) {
1334
+ const { width: n, height: r } = pt(e, t), i = await Si(e, t), o = await ge(i), s = document.createElement("canvas"), a = s.getContext("2d"), c = t.pixelRatio || Pr(), g = t.canvasWidth || n, m = t.canvasHeight || r;
1335
+ return s.width = g * c, s.height = m * c, t.skipAutoScale || Wr(s), s.style.width = `${g}`, s.style.height = `${m}`, t.backgroundColor && (a.fillStyle = t.backgroundColor, a.fillRect(0, 0, s.width, s.height)), a.drawImage(o, 0, 0, s.width, s.height), s;
1336
+ }
1337
+ async function Mi(e, t = {}) {
1338
+ return (await xt(e, t)).toDataURL();
1339
+ }
1340
+ async function xi(e, t = {}) {
1341
+ return (await xt(e, t)).toDataURL("image/jpeg", t.quality || 1);
1342
+ }
1343
+ class bt {
1344
+ constructor(t, n) {
1345
+ this.model = t, this.services = n, this.init();
1346
+ }
1347
+ init() {
1348
+ }
1349
+ update() {
1350
+ }
1351
+ // Used to pass down information to the components
1352
+ setModel(t) {
1353
+ this.model = t;
1354
+ }
1355
+ // Used to pass down services to the components
1356
+ setServices(t) {
1357
+ this.services = t;
1358
+ }
1359
+ }
1360
+ const bi = "DONT_STYLE_ME_css_styles_verifier";
1361
+ class ve extends bt {
1362
+ // initialized in initializeID() called by init()
1363
+ constructor(t, n) {
1364
+ super(t, n);
1365
+ }
1366
+ static getHTMLElementSize(t) {
1367
+ return {
1368
+ width: t.clientWidth,
1369
+ height: t.clientHeight
1370
+ };
1371
+ }
1372
+ static getSVGElementSize(t, n = {
1373
+ useAttrs: !1,
1374
+ useClientDimensions: !1,
1375
+ useBBox: !1,
1376
+ useBoundingRect: !1
1377
+ }) {
1378
+ t.attr || (t = D(t));
1379
+ const r = {
1380
+ width: 0,
1381
+ height: 0
1382
+ }, i = (h) => {
1383
+ h && Object.keys(r).forEach((T) => {
1384
+ if (h[T]) {
1385
+ const M = h[T], E = parseFloat(M);
1386
+ M && E > r[T] && ("" + M).indexOf("%") === -1 && (r[T] = E);
1387
+ }
1388
+ });
1389
+ }, o = {
1390
+ width: t.attr("width"),
1391
+ height: t.attr("height")
1392
+ }, s = t.node();
1393
+ let a, c, g, m;
1394
+ try {
1395
+ typeof s.getBBox == "function" && (a = s.getBBox(), c = {
1396
+ width: a.width,
1397
+ height: a.height
1398
+ });
1399
+ } catch (h) {
1400
+ console.error(h);
1401
+ }
1402
+ try {
1403
+ typeof (s == null ? void 0 : s.getBoundingClientRect) == "function" && (g = s.getBoundingClientRect(), m = {
1404
+ width: g.width,
1405
+ height: g.height
1406
+ });
1407
+ } catch (h) {
1408
+ console.error(h);
1409
+ }
1410
+ let d;
1411
+ if (s instanceof SVGSVGElement && (d = {
1412
+ width: s.clientWidth,
1413
+ height: s.clientHeight
1414
+ }), n) {
1415
+ if (n.useAttrs && (i(o), r.width > 0 && r.height > 0))
1416
+ return r;
1417
+ if (n.useClientDimensions && (i(d), r.width > 0 && r.height > 0))
1418
+ return d;
1419
+ if (n.useBBox && (i(c), r.width > 0 && r.height > 0))
1420
+ return c;
1421
+ if (n.useBoundingRect && (i(m), r.width > 0 && r.height > 0))
1422
+ return m;
1423
+ }
1424
+ try {
1425
+ const h = {
1426
+ width: ne(t.node(), "width", "baseVal", "value"),
1427
+ height: ne(t.node(), "height", "baseVal", "value")
1428
+ };
1429
+ i(h);
1430
+ } catch {
1431
+ i(d), i(c), i(o);
1432
+ }
1433
+ return r;
1434
+ }
1435
+ static appendOrSelect(t, n) {
1436
+ const r = t.select(`${n}`);
1437
+ if (r.empty()) {
1438
+ let i = n.split("#"), o, s;
1439
+ return i.length === 2 ? (o = i[0], i = i[1].split("."), s = i[0]) : (i = n.split("."), o = i[0]), t.append(o).attr("id", s).attr("class", i.slice(1).join(" "));
1440
+ }
1441
+ return r;
1442
+ }
1443
+ init() {
1444
+ this.initializeID(), this.styleHolderElement(), this.addMainContainer(), this.model.getOptions().resizable && this.addResizeListener(), this.addHolderListeners(), this.handleFullscreenChange();
1445
+ }
1446
+ getChartID() {
1447
+ return this.chartID;
1448
+ }
1449
+ getElementOffset(t, n = !1) {
1450
+ const r = { left: 0, top: 0 }, i = t.getBoundingClientRect(), o = n ? { left: 0, top: 0 } : this.getHolder().getBoundingClientRect();
1451
+ try {
1452
+ r.left = i.left - o.left, r.top = i.top - o.top;
1453
+ } catch (s) {
1454
+ console.error(s);
1455
+ }
1456
+ return r;
1457
+ }
1458
+ generateElementIDString(t) {
1459
+ return `chart-${this.chartID}-${t}`;
1460
+ }
1461
+ initializeID() {
1462
+ this.chartID = Math.floor((1 + Math.random()) * 281474976710656).toString(16);
1463
+ }
1464
+ addMainContainer() {
1465
+ const t = this.model.getOptions(), n = ne(t, "style", "prefix"), r = D(this.getHolder()).append("div").classed(`${ke}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
1466
+ r.append("g").attr("class", bi), this.mainContainer = r.node();
1467
+ }
1468
+ update() {
1469
+ this.styleHolderElement();
1470
+ }
1471
+ styleHolderElement() {
1472
+ const t = this.getHolder(), { width: n, height: r, theme: i } = this.model.getOptions();
1473
+ n !== this.width && (t.style.width = n, this.width = n), r !== this.height && (t.style.height = r, this.height = r), D(this.getHolder()).classed(`${ke}--chart-holder`, !0).attr("data-carbon-theme", i);
1474
+ }
1475
+ getHolder() {
1476
+ return this.model.get("holder");
1477
+ }
1478
+ exportToJPG() {
1479
+ const t = this, n = this.model.getOptions(), r = this.getHolder(), i = D(r);
1480
+ i.classed("filled", !0), xi(this.getMainContainer(), {
1481
+ quality: 1,
1482
+ // Remove toolbar
1483
+ filter: (o) => !(o.classList && o.classList.contains("cds--cc--toolbar"))
1484
+ }).then(function(o) {
1485
+ var c;
1486
+ let s = "myChart";
1487
+ const a = ne(n, "fileDownload", "fileName");
1488
+ typeof a == "function" ? s = a("jpg") : typeof a == "string" && (s = a), (c = t.services.files) == null || c.downloadImage(o, `${s}.jpg`), i.classed("filled", !1);
1489
+ });
1490
+ }
1491
+ exportToPNG() {
1492
+ const t = this, n = this.model.getOptions(), r = this.getHolder(), i = D(r);
1493
+ i.classed("filled", !0), Mi(this.getMainContainer(), {
1494
+ quality: 1,
1495
+ // Remove toolbar
1496
+ filter: (o) => !(o.classList && o.classList.contains("cds--cc--toolbar"))
1497
+ }).then(function(o) {
1498
+ var c;
1499
+ let s = "myChart";
1500
+ const a = ne(n, "fileDownload", "fileName");
1501
+ typeof a == "function" ? s = a("png") : typeof a == "string" && (s = a), (c = t.services.files) == null || c.downloadImage(o, `${s}.png`), i.classed("filled", !1);
1502
+ }).catch(function(o) {
1503
+ console.error("oops, something went wrong!", o);
1504
+ });
1505
+ }
1506
+ isFullScreenMode() {
1507
+ return D(this.getHolder()).classed("fullscreen");
1508
+ }
1509
+ toggleFullscreen() {
1510
+ const t = this.getHolder();
1511
+ D(t).classed("fullscreen") && (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) ? document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen() : t.requestFullscreen ? t.requestFullscreen() : t.webkitRequestFullscreen ? t.webkitRequestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.msRequestFullscreen && t.msRequestFullscreen();
1512
+ }
1513
+ handleFullscreenChange() {
1514
+ document.addEventListener("fullscreenchange", () => {
1515
+ const t = D(this.getHolder()), n = t.classed("fullscreen");
1516
+ t.classed("fullscreen", !n);
1517
+ });
1518
+ }
1519
+ setSVGMaxHeight() {
1520
+ if (!this.model.getOptions().height) {
1521
+ const { height: t } = ve.getSVGElementSize(
1522
+ D(this.mainContainer),
1523
+ {
1524
+ useBBox: !0
1525
+ }
1526
+ ), n = D(this.mainContainer).attr("class"), r = D(this.mainContainer).selectAll(`.${n} > svg`);
1527
+ let i = 0;
1528
+ r.nodes().forEach(function(o) {
1529
+ i += Number(
1530
+ ve.getSVGElementSize(D(o), {
1531
+ useBBox: !0
1532
+ }).height
1533
+ );
1534
+ }), i <= t ? D(this.mainContainer).attr("height", i) : D(this.mainContainer).attr("height", "100%");
1535
+ }
1536
+ }
1537
+ getMainContainer() {
1538
+ return this.mainContainer;
1539
+ }
1540
+ addHolderListeners() {
1541
+ const t = this.getHolder();
1542
+ t && D(t).on("mouseover", () => {
1543
+ var n;
1544
+ (n = this.services.events) == null || n.dispatchEvent(ye.Chart.MOUSEOVER);
1545
+ }).on("mouseout", () => {
1546
+ var n;
1547
+ (n = this.services.events) == null || n.dispatchEvent(ye.Chart.MOUSEOUT);
1548
+ });
1549
+ }
1550
+ addResizeListener() {
1551
+ const t = this.getHolder();
1552
+ if (!t)
1553
+ return;
1554
+ let n = t.clientWidth, r = t.clientHeight;
1555
+ const i = ln(() => {
1556
+ var s;
1557
+ t && (Math.abs(n - t.clientWidth) > 1 || Math.abs(r - t.clientHeight) > 1) && (n = t.clientWidth, r = t.clientHeight, (s = this.services.events) == null || s.dispatchEvent(ye.Chart.RESIZE));
1558
+ }, 12.5);
1559
+ new ResizeObserver(i).observe(t);
1560
+ }
1561
+ }
1562
+ class Dt extends bt {
1563
+ static appendOrUpdateLinearGradient(t) {
1564
+ let n = t.svg.select(`defs linearGradient#${t.id}`);
1565
+ n.empty() && (n = t.svg.append("defs").append("linearGradient").attr("id", t.id).attr("x1", t.x1).attr("x2", t.x2).attr("y1", t.y1).attr("y2", t.y2)), n.selectAll("stop").remove(), n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset", (r) => r.offset).style("stop-color", (r) => r.color).style("stop-opacity", (r) => r.opacity);
1566
+ }
1567
+ static getOffsetRatio(t) {
1568
+ return (Math.abs(t[1]) * 100 / Math.abs(t[0] - t[1])).toFixed(2) + "%";
1569
+ }
1570
+ static getStops(t, n) {
1571
+ const r = t[0] < 0 && t[1] > 0;
1572
+ let i = [
1573
+ {
1574
+ offset: "0%",
1575
+ color: n,
1576
+ opacity: "0.6"
1577
+ },
1578
+ {
1579
+ offset: "80%",
1580
+ color: n,
1581
+ opacity: "0"
1582
+ }
1583
+ ];
1584
+ return r && (i = [
1585
+ {
1586
+ offset: "0%",
1587
+ color: n,
1588
+ opacity: "0.6"
1589
+ },
1590
+ {
1591
+ offset: Dt.getOffsetRatio(t),
1592
+ color: n,
1593
+ opacity: "0"
1594
+ },
1595
+ {
1596
+ offset: "100%",
1597
+ color: n,
1598
+ opacity: "0.6"
1599
+ }
1600
+ ]), i;
1601
+ }
1602
+ }
1603
+ function Vi(e) {
1604
+ const t = Di(vi(e), 360);
1605
+ return q(t, [0, 10]) || q(t, [350, 0]) ? {
1606
+ textAnchor: z.START,
1607
+ dominantBaseline: V.MIDDLE
1608
+ } : q(t, [10, 80]) ? {
1609
+ textAnchor: z.START,
1610
+ dominantBaseline: V.HANGING
1611
+ } : q(t, [80, 100]) ? {
1612
+ textAnchor: z.MIDDLE,
1613
+ dominantBaseline: V.HANGING
1614
+ } : q(t, [100, 170]) ? {
1615
+ textAnchor: z.END,
1616
+ dominantBaseline: V.HANGING
1617
+ } : q(t, [170, 190]) ? {
1618
+ textAnchor: z.END,
1619
+ dominantBaseline: V.MIDDLE
1620
+ } : q(t, [190, 260]) ? {
1621
+ textAnchor: z.END,
1622
+ dominantBaseline: V.BASELINE
1623
+ } : q(t, [260, 280]) ? {
1624
+ textAnchor: z.MIDDLE,
1625
+ dominantBaseline: V.BASELINE
1626
+ } : {
1627
+ textAnchor: z.START,
1628
+ dominantBaseline: V.BASELINE
1629
+ };
1630
+ }
1631
+ function Di(e, t) {
1632
+ return (e % t + t) % t;
1633
+ }
1634
+ function q(e, [t, n]) {
1635
+ return e >= t && e <= n;
1636
+ }
1637
+ function vi(e) {
1638
+ return e * (180 / Math.PI);
1639
+ }
1640
+ function zi(e) {
1641
+ return e * (Math.PI / 180);
1642
+ }
1643
+ function qi(e, t, n = { x: 0, y: 0 }) {
1644
+ const r = t * Math.cos(e) + n.x, i = t * Math.sin(e) + n.y;
1645
+ return { x: isNaN(r) ? 0 : r, y: isNaN(i) ? 0 : i };
1646
+ }
1647
+ function Ni(e, t) {
1648
+ return t * Math.sin(e - Math.PI / 2);
1649
+ }
1650
+ export {
1651
+ Ke as A,
1652
+ ve as D,
1653
+ Dt as G,
1654
+ bt as S,
1655
+ Ni as a,
1656
+ vi as b,
1657
+ ki as c,
1658
+ zi as d,
1659
+ Wi as e,
1660
+ Ii as f,
1661
+ Oi as g,
1662
+ Je as h,
1663
+ Ri as i,
1664
+ Ie as j,
1665
+ Pi as k,
1666
+ Li as l,
1667
+ Ai as m,
1668
+ Yi as n,
1669
+ $i as o,
1670
+ qi as p,
1671
+ Hi as q,
1672
+ Vi as r,
1673
+ D as s,
1674
+ Ye as t,
1675
+ _i as u,
1676
+ Fi as v,
1677
+ ln as w,
1678
+ hn as x,
1679
+ Bi as y,
1680
+ gn as z
1681
+ };
1682
+ //# sourceMappingURL=angle-utils-CqlSifly.mjs.map