@carbon/charts 1.21.4 → 1.22.3

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 (35) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -2
  3. package/dist/{angle-utils-CGNI01fr.mjs → angle-utils-RQSA_x-9.mjs} +29 -29
  4. package/dist/{angle-utils-CGNI01fr.mjs.map → angle-utils-RQSA_x-9.mjs.map} +1 -1
  5. package/dist/{array-D7iT_STy.mjs → array-DUMAG1_w.mjs} +2 -2
  6. package/dist/{array-D7iT_STy.mjs.map → array-DUMAG1_w.mjs.map} +1 -1
  7. package/dist/{choropleth-CeqRIFeN.mjs → choropleth-C1BTZZfm.mjs} +954 -919
  8. package/dist/choropleth-C1BTZZfm.mjs.map +1 -0
  9. package/dist/{color-scale-utils-f3PWy_Op.mjs → color-scale-utils-CKd_DujW.mjs} +1380 -1375
  10. package/dist/color-scale-utils-CKd_DujW.mjs.map +1 -0
  11. package/dist/components/component.d.ts +3 -1
  12. package/dist/components/index.mjs +1 -1
  13. package/dist/{index-DFubnvsv.mjs → index-CiAo-vQV.mjs} +558 -534
  14. package/dist/index-CiAo-vQV.mjs.map +1 -0
  15. package/dist/index.mjs +35 -35
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/interfaces/charts.d.ts +3 -0
  18. package/dist/model/index.mjs +4 -4
  19. package/dist/model/index.mjs.map +1 -1
  20. package/dist/services/index.mjs +3 -3
  21. package/dist/styles.css +294 -288
  22. package/dist/styles.css.map +1 -1
  23. package/dist/styles.min.css +1 -1
  24. package/dist/styles.min.css.map +1 -1
  25. package/dist/umd/bundle.umd.cjs +17 -22
  26. package/dist/umd/bundle.umd.cjs.map +1 -1
  27. package/dist/umd/bundle.umd.js +17 -22
  28. package/package.json +23 -23
  29. package/scss/components/_axis.scss +8 -0
  30. package/styles.css +294 -288
  31. package/styles.min.css +1 -1
  32. package/telemetry.yml +1 -1
  33. package/dist/choropleth-CeqRIFeN.mjs.map +0 -1
  34. package/dist/color-scale-utils-f3PWy_Op.mjs.map +0 -1
  35. package/dist/index-DFubnvsv.mjs.map +0 -1
@@ -1,131 +1,131 @@
1
- import { a3 as Bt, aC as Lt, aD as Nt, aE as Ct, aF as ft, aG as It, aH as Zt, aI as Ft, a2 as zt, aJ as Vt, aK as Yt, aL as Ht, aM as Xt, _ as Gt, W as $t, ax as j, aN as Ut, aO as Kt, n as W, g as c, F as J, aP as x, aQ as P, aR as qt, aS as mt, aT as dt, h as Q, ar as jt, ao as Wt, ad as pt, ai as Jt, H as Qt } from "./color-scale-utils-f3PWy_Op.mjs";
2
- import { z as ti, A as O, g as tt, S as A, D as ii, s as ni, v as ei, x as si, u as oi, y as ai } from "./angle-utils-CGNI01fr.mjs";
3
- import { $ as E, e as _, i as N, S as m } from "./axis-scales-CPuwbFQf.mjs";
4
- function xt(i) {
1
+ import { a3 as Lt, aC as Nt, aD as Ct, aE as It, aF as ut, aG as Zt, aH as Ft, aI as zt, a1 as Vt, aJ as Ht, aK as Yt, aL as Xt, ax as q, aM as Gt, aN as $t, aO as Ut, _ as Kt, W as qt, n as j, g as c, F as W, aP as T, aQ as M, aR as E, aS as jt, aT as ft, aU as mt, h as J, ar as Wt, ao as Jt, ad as dt, ai as Qt, H as ti } from "./color-scale-utils-CKd_DujW.mjs";
2
+ import { z as ii, A as O, e as Q, S as A, D as ei, s as ni, v as si, x as oi, y as ai, u as ri } from "./angle-utils-RQSA_x-9.mjs";
3
+ import { $ as w, e as _, i as C, S as m } from "./axis-scales-CPuwbFQf.mjs";
4
+ function pt(i) {
5
5
  var t = i == null ? 0 : i.length;
6
- return t ? Bt(i, 1) : [];
6
+ return t ? Lt(i, 1) : [];
7
7
  }
8
- function ri(i) {
9
- return Lt(Nt(i, void 0, xt), i + "");
8
+ function hi(i) {
9
+ return Nt(Ct(i, void 0, pt), i + "");
10
10
  }
11
- function hi(i, t, n) {
12
- var e = -1, s = i.length;
13
- t < 0 && (t = -t > s ? 0 : s + t), n = n > s ? s : n, n < 0 && (n += s), s = t > n ? 0 : n - t >>> 0, t >>>= 0;
14
- for (var o = Array(s); ++e < s; )
15
- o[e] = i[e + t];
11
+ function ci(i, t, e) {
12
+ var n = -1, s = i.length;
13
+ t < 0 && (t = -t > s ? 0 : s + t), e = e > s ? s : e, e < 0 && (e += s), s = t > e ? 0 : e - t >>> 0, t >>>= 0;
14
+ for (var o = Array(s); ++n < s; )
15
+ o[n] = i[n + t];
16
16
  return o;
17
17
  }
18
- function ci(i, t) {
19
- return t.length < 2 ? i : Ct(i, hi(t, 0, -1));
20
- }
21
18
  function li(i, t) {
22
- return t = ft(t, i), i = ci(i, t), i == null || delete i[It(Zt(t))];
19
+ return t.length < 2 ? i : It(i, ci(t, 0, -1));
20
+ }
21
+ function _i(i, t) {
22
+ return t = ut(t, i), i = li(i, t), i == null || delete i[Zt(Ft(t))];
23
23
  }
24
- function _i(i) {
25
- return Ft(i) ? void 0 : i;
24
+ function ui(i) {
25
+ return zt(i) ? void 0 : i;
26
26
  }
27
- var ui = 1, fi = 2, mi = 4, di = ri(function(i, t) {
28
- var n = {};
27
+ var fi = 1, mi = 2, di = 4, pi = hi(function(i, t) {
28
+ var e = {};
29
29
  if (i == null)
30
- return n;
31
- var e = !1;
32
- t = zt(t, function(o) {
33
- return o = ft(o, i), e || (e = o.length > 1), o;
34
- }), Vt(i, Yt(i), n), e && (n = Ht(n, ui | fi | mi, _i));
30
+ return e;
31
+ var n = !1;
32
+ t = Vt(t, function(o) {
33
+ return o = ut(o, i), n || (n = o.length > 1), o;
34
+ }), Ht(i, Yt(i), e), n && (e = Xt(e, fi | mi | di, ui));
35
35
  for (var s = t.length; s--; )
36
- li(n, t[s]);
37
- return n;
36
+ _i(e, t[s]);
37
+ return e;
38
38
  });
39
- function it(i) {
39
+ function tt(i) {
40
40
  return Math.log(i);
41
41
  }
42
- function nt(i) {
42
+ function it(i) {
43
43
  return Math.exp(i);
44
44
  }
45
- function pi(i) {
46
- return -Math.log(-i);
47
- }
48
45
  function xi(i) {
49
- return -Math.exp(-i);
46
+ return -Math.log(-i);
50
47
  }
51
48
  function gi(i) {
52
- return isFinite(i) ? +("1e" + i) : i < 0 ? 0 : i;
49
+ return -Math.exp(-i);
53
50
  }
54
51
  function yi(i) {
55
- return i === 10 ? gi : i === Math.E ? Math.exp : (t) => Math.pow(i, t);
52
+ return isFinite(i) ? +("1e" + i) : i < 0 ? 0 : i;
56
53
  }
57
54
  function vi(i) {
55
+ return i === 10 ? yi : i === Math.E ? Math.exp : (t) => Math.pow(i, t);
56
+ }
57
+ function Ti(i) {
58
58
  return i === Math.E ? Math.log : i === 10 && Math.log10 || i === 2 && Math.log2 || (i = Math.log(i), (t) => Math.log(t) / i);
59
59
  }
60
60
  function et(i) {
61
- return (t, n) => -i(-t, n);
61
+ return (t, e) => -i(-t, e);
62
62
  }
63
- function Ti(i) {
64
- const t = i(it, nt), n = t.domain;
65
- let e = 10, s, o;
63
+ function Di(i) {
64
+ const t = i(tt, it), e = t.domain;
65
+ let n = 10, s, o;
66
66
  function a() {
67
- return s = vi(e), o = yi(e), n()[0] < 0 ? (s = et(s), o = et(o), i(pi, xi)) : i(it, nt), t;
67
+ return s = Ti(n), o = vi(n), e()[0] < 0 ? (s = et(s), o = et(o), i(xi, gi)) : i(tt, it), t;
68
68
  }
69
69
  return t.base = function(r) {
70
- return arguments.length ? (e = +r, a()) : e;
70
+ return arguments.length ? (n = +r, a()) : n;
71
71
  }, t.domain = function(r) {
72
- return arguments.length ? (n(r), a()) : n();
72
+ return arguments.length ? (e(r), a()) : e();
73
73
  }, t.ticks = (r) => {
74
- const h = n();
74
+ const h = e();
75
75
  let l = h[0], f = h[h.length - 1];
76
- const v = f < l;
77
- v && ([l, f] = [f, l]);
78
- let p = s(l), T = s(f), y, d;
76
+ const y = f < l;
77
+ y && ([l, f] = [f, l]);
78
+ let p = s(l), v = s(f), g, d;
79
79
  const D = r == null ? 10 : +r;
80
80
  let u = [];
81
- if (!(e % 1) && T - p < D) {
82
- if (p = Math.floor(p), T = Math.ceil(T), l > 0) {
83
- for (; p <= T; ++p)
84
- for (y = 1; y < e; ++y)
85
- if (d = p < 0 ? y / o(-p) : y * o(p), !(d < l)) {
81
+ if (!(n % 1) && v - p < D) {
82
+ if (p = Math.floor(p), v = Math.ceil(v), l > 0) {
83
+ for (; p <= v; ++p)
84
+ for (g = 1; g < n; ++g)
85
+ if (d = p < 0 ? g / o(-p) : g * o(p), !(d < l)) {
86
86
  if (d > f) break;
87
87
  u.push(d);
88
88
  }
89
- } else for (; p <= T; ++p)
90
- for (y = e - 1; y >= 1; --y)
91
- if (d = p > 0 ? y / o(-p) : y * o(p), !(d < l)) {
89
+ } else for (; p <= v; ++p)
90
+ for (g = n - 1; g >= 1; --g)
91
+ if (d = p > 0 ? g / o(-p) : g * o(p), !(d < l)) {
92
92
  if (d > f) break;
93
93
  u.push(d);
94
94
  }
95
- u.length * 2 < D && (u = j(l, f, D));
95
+ u.length * 2 < D && (u = q(l, f, D));
96
96
  } else
97
- u = j(p, T, Math.min(T - p, D)).map(o);
98
- return v ? u.reverse() : u;
97
+ u = q(p, v, Math.min(v - p, D)).map(o);
98
+ return y ? u.reverse() : u;
99
99
  }, t.tickFormat = (r, h) => {
100
- if (r == null && (r = 10), h == null && (h = e === 10 ? "s" : ","), typeof h != "function" && (!(e % 1) && (h = Ut(h)).precision == null && (h.trim = !0), h = Kt(h)), r === 1 / 0) return h;
101
- const l = Math.max(1, e * r / t.ticks().length);
100
+ if (r == null && (r = 10), h == null && (h = n === 10 ? "s" : ","), typeof h != "function" && (!(n % 1) && (h = Gt(h)).precision == null && (h.trim = !0), h = $t(h)), r === 1 / 0) return h;
101
+ const l = Math.max(1, n * r / t.ticks().length);
102
102
  return (f) => {
103
- let v = f / o(Math.round(s(f)));
104
- return v * e < e - 0.5 && (v *= e), v <= l ? h(f) : "";
103
+ let y = f / o(Math.round(s(f)));
104
+ return y * n < n - 0.5 && (y *= n), y <= l ? h(f) : "";
105
105
  };
106
- }, t.nice = () => n(ti(n(), {
106
+ }, t.nice = () => e(ii(e(), {
107
107
  floor: (r) => o(Math.floor(s(r))),
108
108
  ceil: (r) => o(Math.ceil(s(r)))
109
109
  })), t;
110
110
  }
111
- function gt() {
112
- const i = Ti(Xt()).domain([1, 10]);
113
- return i.copy = () => Gt(i, gt()).base(i.base()), $t.apply(i, arguments), i;
111
+ function xt() {
112
+ const i = Di(Ut()).domain([1, 10]);
113
+ return i.copy = () => Kt(i, xt()).base(i.base()), qt.apply(i, arguments), i;
114
114
  }
115
- function w(i, t, n) {
115
+ function k(i, t, e) {
116
116
  i._context.bezierCurveTo(
117
117
  (2 * i._x0 + i._x1) / 3,
118
118
  (2 * i._y0 + i._y1) / 3,
119
119
  (i._x0 + 2 * i._x1) / 3,
120
120
  (i._y0 + 2 * i._y1) / 3,
121
121
  (i._x0 + 4 * i._x1 + t) / 6,
122
- (i._y0 + 4 * i._y1 + n) / 6
122
+ (i._y0 + 4 * i._y1 + e) / 6
123
123
  );
124
124
  }
125
- function B(i) {
125
+ function L(i) {
126
126
  this._context = i;
127
127
  }
128
- B.prototype = {
128
+ L.prototype = {
129
129
  areaStart: function() {
130
130
  this._line = 0;
131
131
  },
@@ -138,7 +138,7 @@ B.prototype = {
138
138
  lineEnd: function() {
139
139
  switch (this._point) {
140
140
  case 3:
141
- w(this, this._x1, this._y1);
141
+ k(this, this._x1, this._y1);
142
142
  case 2:
143
143
  this._context.lineTo(this._x1, this._y1);
144
144
  break;
@@ -156,19 +156,19 @@ B.prototype = {
156
156
  case 2:
157
157
  this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
158
158
  default:
159
- w(this, i, t);
159
+ k(this, i, t);
160
160
  break;
161
161
  }
162
162
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
163
163
  }
164
164
  };
165
- function Di(i) {
166
- return new B(i);
165
+ function Ai(i) {
166
+ return new L(i);
167
167
  }
168
- function yt(i) {
168
+ function gt(i) {
169
169
  this._context = i;
170
170
  }
171
- yt.prototype = {
171
+ gt.prototype = {
172
172
  areaStart: O,
173
173
  areaEnd: O,
174
174
  lineStart: function() {
@@ -202,19 +202,19 @@ yt.prototype = {
202
202
  this._point = 3, this._x4 = i, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + i) / 6, (this._y0 + 4 * this._y1 + t) / 6);
203
203
  break;
204
204
  default:
205
- w(this, i, t);
205
+ k(this, i, t);
206
206
  break;
207
207
  }
208
208
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
209
209
  }
210
210
  };
211
- function Ai(i) {
212
- return new yt(i);
211
+ function Oi(i) {
212
+ return new gt(i);
213
213
  }
214
- function vt(i) {
214
+ function yt(i) {
215
215
  this._context = i;
216
216
  }
217
- vt.prototype = {
217
+ yt.prototype = {
218
218
  areaStart: function() {
219
219
  this._line = 0;
220
220
  },
@@ -237,34 +237,34 @@ vt.prototype = {
237
237
  break;
238
238
  case 2:
239
239
  this._point = 3;
240
- var n = (this._x0 + 4 * this._x1 + i) / 6, e = (this._y0 + 4 * this._y1 + t) / 6;
241
- this._line ? this._context.lineTo(n, e) : this._context.moveTo(n, e);
240
+ var e = (this._x0 + 4 * this._x1 + i) / 6, n = (this._y0 + 4 * this._y1 + t) / 6;
241
+ this._line ? this._context.lineTo(e, n) : this._context.moveTo(e, n);
242
242
  break;
243
243
  case 3:
244
244
  this._point = 4;
245
245
  default:
246
- w(this, i, t);
246
+ k(this, i, t);
247
247
  break;
248
248
  }
249
249
  this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t;
250
250
  }
251
251
  };
252
- function Oi(i) {
253
- return new vt(i);
252
+ function Mi(i) {
253
+ return new yt(i);
254
254
  }
255
- function Tt(i, t) {
256
- this._basis = new B(i), this._beta = t;
255
+ function vt(i, t) {
256
+ this._basis = new L(i), this._beta = t;
257
257
  }
258
- Tt.prototype = {
258
+ vt.prototype = {
259
259
  lineStart: function() {
260
260
  this._x = [], this._y = [], this._basis.lineStart();
261
261
  },
262
262
  lineEnd: function() {
263
- var i = this._x, t = this._y, n = i.length - 1;
264
- if (n > 0)
265
- for (var e = i[0], s = t[0], o = i[n] - e, a = t[n] - s, r = -1, h; ++r <= n; )
266
- h = r / n, this._basis.point(
267
- this._beta * i[r] + (1 - this._beta) * (e + h * o),
263
+ var i = this._x, t = this._y, e = i.length - 1;
264
+ if (e > 0)
265
+ for (var n = i[0], s = t[0], o = i[e] - n, a = t[e] - s, r = -1, h; ++r <= e; )
266
+ h = r / e, this._basis.point(
267
+ this._beta * i[r] + (1 - this._beta) * (n + h * o),
268
268
  this._beta * t[r] + (1 - this._beta) * (s + h * a)
269
269
  );
270
270
  this._x = this._y = null, this._basis.lineEnd();
@@ -273,28 +273,28 @@ Tt.prototype = {
273
273
  this._x.push(+i), this._y.push(+t);
274
274
  }
275
275
  };
276
- const Mi = function i(t) {
277
- function n(e) {
278
- return t === 1 ? new B(e) : new Tt(e, t);
276
+ const bi = function i(t) {
277
+ function e(n) {
278
+ return t === 1 ? new L(n) : new vt(n, t);
279
279
  }
280
- return n.beta = function(e) {
281
- return i(+e);
282
- }, n;
280
+ return e.beta = function(n) {
281
+ return i(+n);
282
+ }, e;
283
283
  }(0.85);
284
- function k(i, t, n) {
284
+ function R(i, t, e) {
285
285
  i._context.bezierCurveTo(
286
286
  i._x1 + i._k * (i._x2 - i._x0),
287
287
  i._y1 + i._k * (i._y2 - i._y0),
288
288
  i._x2 + i._k * (i._x1 - t),
289
- i._y2 + i._k * (i._y1 - n),
289
+ i._y2 + i._k * (i._y1 - e),
290
290
  i._x2,
291
291
  i._y2
292
292
  );
293
293
  }
294
- function F(i, t) {
294
+ function z(i, t) {
295
295
  this._context = i, this._k = (1 - t) / 6;
296
296
  }
297
- F.prototype = {
297
+ z.prototype = {
298
298
  areaStart: function() {
299
299
  this._line = 0;
300
300
  },
@@ -310,7 +310,7 @@ F.prototype = {
310
310
  this._context.lineTo(this._x2, this._y2);
311
311
  break;
312
312
  case 3:
313
- k(this, this._x1, this._y1);
313
+ R(this, this._x1, this._y1);
314
314
  break;
315
315
  }
316
316
  (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
@@ -326,24 +326,24 @@ F.prototype = {
326
326
  case 2:
327
327
  this._point = 3;
328
328
  default:
329
- k(this, i, t);
329
+ R(this, i, t);
330
330
  break;
331
331
  }
332
332
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
333
333
  }
334
334
  };
335
- const bi = function i(t) {
336
- function n(e) {
337
- return new F(e, t);
335
+ const Si = function i(t) {
336
+ function e(n) {
337
+ return new z(n, t);
338
338
  }
339
- return n.tension = function(e) {
340
- return i(+e);
341
- }, n;
339
+ return e.tension = function(n) {
340
+ return i(+n);
341
+ }, e;
342
342
  }(0);
343
- function z(i, t) {
343
+ function V(i, t) {
344
344
  this._context = i, this._k = (1 - t) / 6;
345
345
  }
346
- z.prototype = {
346
+ V.prototype = {
347
347
  areaStart: O,
348
348
  areaEnd: O,
349
349
  lineStart: function() {
@@ -377,24 +377,24 @@ z.prototype = {
377
377
  this._point = 3, this._x5 = i, this._y5 = t;
378
378
  break;
379
379
  default:
380
- k(this, i, t);
380
+ R(this, i, t);
381
381
  break;
382
382
  }
383
383
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
384
384
  }
385
385
  };
386
- const Si = function i(t) {
387
- function n(e) {
388
- return new z(e, t);
386
+ const Pi = function i(t) {
387
+ function e(n) {
388
+ return new V(n, t);
389
389
  }
390
- return n.tension = function(e) {
391
- return i(+e);
392
- }, n;
390
+ return e.tension = function(n) {
391
+ return i(+n);
392
+ }, e;
393
393
  }(0);
394
- function V(i, t) {
394
+ function H(i, t) {
395
395
  this._context = i, this._k = (1 - t) / 6;
396
396
  }
397
- V.prototype = {
397
+ H.prototype = {
398
398
  areaStart: function() {
399
399
  this._line = 0;
400
400
  },
@@ -421,36 +421,36 @@ V.prototype = {
421
421
  case 3:
422
422
  this._point = 4;
423
423
  default:
424
- k(this, i, t);
424
+ R(this, i, t);
425
425
  break;
426
426
  }
427
427
  this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
428
428
  }
429
429
  };
430
- const Pi = function i(t) {
431
- function n(e) {
432
- return new V(e, t);
430
+ const Ei = function i(t) {
431
+ function e(n) {
432
+ return new H(n, t);
433
433
  }
434
- return n.tension = function(e) {
435
- return i(+e);
436
- }, n;
434
+ return e.tension = function(n) {
435
+ return i(+n);
436
+ }, e;
437
437
  }(0);
438
- function Y(i, t, n) {
439
- var e = i._x1, s = i._y1, o = i._x2, a = i._y2;
440
- if (i._l01_a > tt) {
438
+ function Y(i, t, e) {
439
+ var n = i._x1, s = i._y1, o = i._x2, a = i._y2;
440
+ if (i._l01_a > Q) {
441
441
  var r = 2 * i._l01_2a + 3 * i._l01_a * i._l12_a + i._l12_2a, h = 3 * i._l01_a * (i._l01_a + i._l12_a);
442
- e = (e * r - i._x0 * i._l12_2a + i._x2 * i._l01_2a) / h, s = (s * r - i._y0 * i._l12_2a + i._y2 * i._l01_2a) / h;
442
+ n = (n * r - i._x0 * i._l12_2a + i._x2 * i._l01_2a) / h, s = (s * r - i._y0 * i._l12_2a + i._y2 * i._l01_2a) / h;
443
443
  }
444
- if (i._l23_a > tt) {
444
+ if (i._l23_a > Q) {
445
445
  var l = 2 * i._l23_2a + 3 * i._l23_a * i._l12_a + i._l12_2a, f = 3 * i._l23_a * (i._l23_a + i._l12_a);
446
- o = (o * l + i._x1 * i._l23_2a - t * i._l12_2a) / f, a = (a * l + i._y1 * i._l23_2a - n * i._l12_2a) / f;
446
+ o = (o * l + i._x1 * i._l23_2a - t * i._l12_2a) / f, a = (a * l + i._y1 * i._l23_2a - e * i._l12_2a) / f;
447
447
  }
448
- i._context.bezierCurveTo(e, s, o, a, i._x2, i._y2);
448
+ i._context.bezierCurveTo(n, s, o, a, i._x2, i._y2);
449
449
  }
450
- function Dt(i, t) {
450
+ function Tt(i, t) {
451
451
  this._context = i, this._alpha = t;
452
452
  }
453
- Dt.prototype = {
453
+ Tt.prototype = {
454
454
  areaStart: function() {
455
455
  this._line = 0;
456
456
  },
@@ -473,8 +473,8 @@ Dt.prototype = {
473
473
  },
474
474
  point: function(i, t) {
475
475
  if (i = +i, t = +t, this._point) {
476
- var n = this._x2 - i, e = this._y2 - t;
477
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + e * e, this._alpha));
476
+ var e = this._x2 - i, n = this._y2 - t;
477
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
478
478
  }
479
479
  switch (this._point) {
480
480
  case 0:
@@ -492,18 +492,18 @@ Dt.prototype = {
492
492
  this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
493
493
  }
494
494
  };
495
- const Ei = function i(t) {
496
- function n(e) {
497
- return t ? new Dt(e, t) : new F(e, 0);
495
+ const wi = function i(t) {
496
+ function e(n) {
497
+ return t ? new Tt(n, t) : new z(n, 0);
498
498
  }
499
- return n.alpha = function(e) {
500
- return i(+e);
501
- }, n;
499
+ return e.alpha = function(n) {
500
+ return i(+n);
501
+ }, e;
502
502
  }(0.5);
503
- function At(i, t) {
503
+ function Dt(i, t) {
504
504
  this._context = i, this._alpha = t;
505
505
  }
506
- At.prototype = {
506
+ Dt.prototype = {
507
507
  areaStart: O,
508
508
  areaEnd: O,
509
509
  lineStart: function() {
@@ -527,8 +527,8 @@ At.prototype = {
527
527
  },
528
528
  point: function(i, t) {
529
529
  if (i = +i, t = +t, this._point) {
530
- var n = this._x2 - i, e = this._y2 - t;
531
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + e * e, this._alpha));
530
+ var e = this._x2 - i, n = this._y2 - t;
531
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
532
532
  }
533
533
  switch (this._point) {
534
534
  case 0:
@@ -547,18 +547,18 @@ At.prototype = {
547
547
  this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
548
548
  }
549
549
  };
550
- const wi = function i(t) {
551
- function n(e) {
552
- return t ? new At(e, t) : new z(e, 0);
550
+ const ki = function i(t) {
551
+ function e(n) {
552
+ return t ? new Dt(n, t) : new V(n, 0);
553
553
  }
554
- return n.alpha = function(e) {
555
- return i(+e);
556
- }, n;
554
+ return e.alpha = function(n) {
555
+ return i(+n);
556
+ }, e;
557
557
  }(0.5);
558
- function Ot(i, t) {
558
+ function At(i, t) {
559
559
  this._context = i, this._alpha = t;
560
560
  }
561
- Ot.prototype = {
561
+ At.prototype = {
562
562
  areaStart: function() {
563
563
  this._line = 0;
564
564
  },
@@ -573,8 +573,8 @@ Ot.prototype = {
573
573
  },
574
574
  point: function(i, t) {
575
575
  if (i = +i, t = +t, this._point) {
576
- var n = this._x2 - i, e = this._y2 - t;
577
- this._l23_a = Math.sqrt(this._l23_2a = Math.pow(n * n + e * e, this._alpha));
576
+ var e = this._x2 - i, n = this._y2 - t;
577
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(e * e + n * n, this._alpha));
578
578
  }
579
579
  switch (this._point) {
580
580
  case 0:
@@ -595,33 +595,33 @@ Ot.prototype = {
595
595
  this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = i, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
596
596
  }
597
597
  };
598
- const ki = function i(t) {
599
- function n(e) {
600
- return t ? new Ot(e, t) : new V(e, 0);
598
+ const Ri = function i(t) {
599
+ function e(n) {
600
+ return t ? new At(n, t) : new H(n, 0);
601
601
  }
602
- return n.alpha = function(e) {
603
- return i(+e);
604
- }, n;
602
+ return e.alpha = function(n) {
603
+ return i(+n);
604
+ }, e;
605
605
  }(0.5);
606
- function st(i) {
606
+ function nt(i) {
607
607
  return i < 0 ? -1 : 1;
608
608
  }
609
- function ot(i, t, n) {
610
- var e = i._x1 - i._x0, s = t - i._x1, o = (i._y1 - i._y0) / (e || s < 0 && -0), a = (n - i._y1) / (s || e < 0 && -0), r = (o * s + a * e) / (e + s);
611
- return (st(o) + st(a)) * Math.min(Math.abs(o), Math.abs(a), 0.5 * Math.abs(r)) || 0;
609
+ function st(i, t, e) {
610
+ var n = i._x1 - i._x0, s = t - i._x1, o = (i._y1 - i._y0) / (n || s < 0 && -0), a = (e - i._y1) / (s || n < 0 && -0), r = (o * s + a * n) / (n + s);
611
+ return (nt(o) + nt(a)) * Math.min(Math.abs(o), Math.abs(a), 0.5 * Math.abs(r)) || 0;
612
612
  }
613
- function at(i, t) {
614
- var n = i._x1 - i._x0;
615
- return n ? (3 * (i._y1 - i._y0) / n - t) / 2 : t;
613
+ function ot(i, t) {
614
+ var e = i._x1 - i._x0;
615
+ return e ? (3 * (i._y1 - i._y0) / e - t) / 2 : t;
616
616
  }
617
- function C(i, t, n) {
618
- var e = i._x0, s = i._y0, o = i._x1, a = i._y1, r = (o - e) / 3;
619
- i._context.bezierCurveTo(e + r, s + r * t, o - r, a - r * n, o, a);
617
+ function I(i, t, e) {
618
+ var n = i._x0, s = i._y0, o = i._x1, a = i._y1, r = (o - n) / 3;
619
+ i._context.bezierCurveTo(n + r, s + r * t, o - r, a - r * e, o, a);
620
620
  }
621
- function R(i) {
621
+ function B(i) {
622
622
  this._context = i;
623
623
  }
624
- R.prototype = {
624
+ B.prototype = {
625
625
  areaStart: function() {
626
626
  this._line = 0;
627
627
  },
@@ -637,13 +637,13 @@ R.prototype = {
637
637
  this._context.lineTo(this._x1, this._y1);
638
638
  break;
639
639
  case 3:
640
- C(this, this._t0, at(this, this._t0));
640
+ I(this, this._t0, ot(this, this._t0));
641
641
  break;
642
642
  }
643
643
  (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
644
644
  },
645
645
  point: function(i, t) {
646
- var n = NaN;
646
+ var e = NaN;
647
647
  if (i = +i, t = +t, !(i === this._x1 && t === this._y1)) {
648
648
  switch (this._point) {
649
649
  case 0:
@@ -653,26 +653,26 @@ R.prototype = {
653
653
  this._point = 2;
654
654
  break;
655
655
  case 2:
656
- this._point = 3, C(this, at(this, n = ot(this, i, t)), n);
656
+ this._point = 3, I(this, ot(this, e = st(this, i, t)), e);
657
657
  break;
658
658
  default:
659
- C(this, this._t0, n = ot(this, i, t));
659
+ I(this, this._t0, e = st(this, i, t));
660
660
  break;
661
661
  }
662
- this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t, this._t0 = n;
662
+ this._x0 = this._x1, this._x1 = i, this._y0 = this._y1, this._y1 = t, this._t0 = e;
663
663
  }
664
664
  }
665
665
  };
666
- function Mt(i) {
667
- this._context = new bt(i);
666
+ function Ot(i) {
667
+ this._context = new Mt(i);
668
668
  }
669
- (Mt.prototype = Object.create(R.prototype)).point = function(i, t) {
670
- R.prototype.point.call(this, t, i);
669
+ (Ot.prototype = Object.create(B.prototype)).point = function(i, t) {
670
+ B.prototype.point.call(this, t, i);
671
671
  };
672
- function bt(i) {
672
+ function Mt(i) {
673
673
  this._context = i;
674
674
  }
675
- bt.prototype = {
675
+ Mt.prototype = {
676
676
  moveTo: function(i, t) {
677
677
  this._context.moveTo(t, i);
678
678
  },
@@ -682,20 +682,20 @@ bt.prototype = {
682
682
  lineTo: function(i, t) {
683
683
  this._context.lineTo(t, i);
684
684
  },
685
- bezierCurveTo: function(i, t, n, e, s, o) {
686
- this._context.bezierCurveTo(t, i, e, n, o, s);
685
+ bezierCurveTo: function(i, t, e, n, s, o) {
686
+ this._context.bezierCurveTo(t, i, n, e, o, s);
687
687
  }
688
688
  };
689
- function Ri(i) {
690
- return new R(i);
691
- }
692
689
  function Bi(i) {
693
- return new Mt(i);
690
+ return new B(i);
694
691
  }
695
- function St(i) {
692
+ function Li(i) {
693
+ return new Ot(i);
694
+ }
695
+ function bt(i) {
696
696
  this._context = i;
697
697
  }
698
- St.prototype = {
698
+ bt.prototype = {
699
699
  areaStart: function() {
700
700
  this._line = 0;
701
701
  },
@@ -706,34 +706,34 @@ St.prototype = {
706
706
  this._x = [], this._y = [];
707
707
  },
708
708
  lineEnd: function() {
709
- var i = this._x, t = this._y, n = i.length;
710
- if (n)
711
- if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]), n === 2)
709
+ var i = this._x, t = this._y, e = i.length;
710
+ if (e)
711
+ if (this._line ? this._context.lineTo(i[0], t[0]) : this._context.moveTo(i[0], t[0]), e === 2)
712
712
  this._context.lineTo(i[1], t[1]);
713
713
  else
714
- for (var e = rt(i), s = rt(t), o = 0, a = 1; a < n; ++o, ++a)
715
- this._context.bezierCurveTo(e[0][o], s[0][o], e[1][o], s[1][o], i[a], t[a]);
716
- (this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
714
+ for (var n = at(i), s = at(t), o = 0, a = 1; a < e; ++o, ++a)
715
+ this._context.bezierCurveTo(n[0][o], s[0][o], n[1][o], s[1][o], i[a], t[a]);
716
+ (this._line || this._line !== 0 && e === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
717
717
  },
718
718
  point: function(i, t) {
719
719
  this._x.push(+i), this._y.push(+t);
720
720
  }
721
721
  };
722
- function rt(i) {
723
- var t, n = i.length - 1, e, s = new Array(n), o = new Array(n), a = new Array(n);
724
- for (s[0] = 0, o[0] = 2, a[0] = i[0] + 2 * i[1], t = 1; t < n - 1; ++t) s[t] = 1, o[t] = 4, a[t] = 4 * i[t] + 2 * i[t + 1];
725
- for (s[n - 1] = 2, o[n - 1] = 7, a[n - 1] = 8 * i[n - 1] + i[n], t = 1; t < n; ++t) e = s[t] / o[t - 1], o[t] -= e, a[t] -= e * a[t - 1];
726
- for (s[n - 1] = a[n - 1] / o[n - 1], t = n - 2; t >= 0; --t) s[t] = (a[t] - s[t + 1]) / o[t];
727
- for (o[n - 1] = (i[n] + s[n - 1]) / 2, t = 0; t < n - 1; ++t) o[t] = 2 * i[t + 1] - s[t + 1];
722
+ function at(i) {
723
+ var t, e = i.length - 1, n, s = new Array(e), o = new Array(e), a = new Array(e);
724
+ for (s[0] = 0, o[0] = 2, a[0] = i[0] + 2 * i[1], t = 1; t < e - 1; ++t) s[t] = 1, o[t] = 4, a[t] = 4 * i[t] + 2 * i[t + 1];
725
+ for (s[e - 1] = 2, o[e - 1] = 7, a[e - 1] = 8 * i[e - 1] + i[e], t = 1; t < e; ++t) n = s[t] / o[t - 1], o[t] -= n, a[t] -= n * a[t - 1];
726
+ for (s[e - 1] = a[e - 1] / o[e - 1], t = e - 2; t >= 0; --t) s[t] = (a[t] - s[t + 1]) / o[t];
727
+ for (o[e - 1] = (i[e] + s[e - 1]) / 2, t = 0; t < e - 1; ++t) o[t] = 2 * i[t + 1] - s[t + 1];
728
728
  return [s, o];
729
729
  }
730
- function Li(i) {
731
- return new St(i);
730
+ function Ni(i) {
731
+ return new bt(i);
732
732
  }
733
- function L(i, t) {
733
+ function N(i, t) {
734
734
  this._context = i, this._t = t;
735
735
  }
736
- L.prototype = {
736
+ N.prototype = {
737
737
  areaStart: function() {
738
738
  this._line = 0;
739
739
  },
@@ -757,8 +757,8 @@ L.prototype = {
757
757
  if (this._t <= 0)
758
758
  this._context.lineTo(this._x, t), this._context.lineTo(i, t);
759
759
  else {
760
- var n = this._x * (1 - this._t) + i * this._t;
761
- this._context.lineTo(n, this._y), this._context.lineTo(n, t);
760
+ var e = this._x * (1 - this._t) + i * this._t;
761
+ this._context.lineTo(e, this._y), this._context.lineTo(e, t);
762
762
  }
763
763
  break;
764
764
  }
@@ -766,234 +766,258 @@ L.prototype = {
766
766
  this._x = i, this._y = t;
767
767
  }
768
768
  };
769
- function Ni(i) {
770
- return new L(i, 0.5);
771
- }
772
769
  function Ci(i) {
773
- return new L(i, 0);
770
+ return new N(i, 0.5);
774
771
  }
775
772
  function Ii(i) {
776
- return new L(i, 1);
773
+ return new N(i, 0);
777
774
  }
778
- class en extends A {
775
+ function Zi(i) {
776
+ return new N(i, 1);
777
+ }
778
+ class ne extends A {
779
779
  /**
780
780
  * focal: object to zoom into
781
781
  * canvasElements: all the elements to translate and zoom on the chart area
782
782
  * zoomSettings: object containing duration, easing and zoomlevel for the zoom behaviours
783
783
  * */
784
- zoomIn(t, n, e) {
784
+ zoomIn(t, e, n) {
785
785
  let s, o, a;
786
- const r = e || W;
786
+ const r = n || j;
787
787
  t && (s = t.x, o = t.y, a = 2);
788
- const { width: h, height: l } = ii.getSVGElementSize(this.services.domUtils.getHolder(), {
788
+ const { width: h, height: l } = ei.getSVGElementSize(this.services.domUtils.getHolder(), {
789
789
  useClientDimensions: !0
790
790
  });
791
- n.transition().duration(r.duration).ease(r.ease).attr(
791
+ e.transition().duration(r.duration).ease(r.ease).attr(
792
792
  "transform",
793
793
  `translate(${h / 2}, ${l / 2}) scale(${a}) translate(${-s},${-o})`
794
- ), this.services.events.dispatchEvent(E.CanvasZoom.CANVAS_ZOOM_IN, {
794
+ ), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_IN, {
795
795
  element: ni(t)
796
796
  });
797
797
  }
798
- zoomOut(t, n) {
799
- const e = n || W;
800
- t.transition().duration(e.duration).ease(e.ease).attr("transform", ""), this.services.events.dispatchEvent(E.CanvasZoom.CANVAS_ZOOM_OUT);
798
+ zoomOut(t, e) {
799
+ const n = e || j;
800
+ t.transition().duration(n.duration).ease(n.ease).attr("transform", ""), this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_OUT);
801
801
  }
802
802
  }
803
- class sn extends A {
803
+ class se extends A {
804
804
  init() {
805
805
  this.documentFragment = document.createDocumentFragment();
806
806
  }
807
- addEventListener(t, n) {
808
- this.documentFragment.addEventListener(t, n);
807
+ addEventListener(t, e) {
808
+ this.documentFragment.addEventListener(t, e);
809
809
  }
810
- removeEventListener(t, n) {
811
- this.documentFragment.removeEventListener(t, n);
810
+ removeEventListener(t, e) {
811
+ this.documentFragment.removeEventListener(t, e);
812
812
  }
813
- dispatchEvent(t, n) {
814
- let e;
815
- n ? e = new CustomEvent(t, {
816
- detail: n
817
- }) : (e = document.createEvent("Event"), e.initEvent(t, !1, !0)), this.documentFragment.dispatchEvent(e);
813
+ dispatchEvent(t, e) {
814
+ let n;
815
+ e ? n = new CustomEvent(t, {
816
+ detail: e
817
+ }) : (n = document.createEvent("Event"), n.initEvent(t, !1, !0)), this.documentFragment.dispatchEvent(n);
818
818
  }
819
819
  }
820
- class on extends A {
821
- constructor(t, n) {
822
- super(t, n);
820
+ class oe extends A {
821
+ constructor(t, e) {
822
+ super(t, e);
823
823
  }
824
- downloadCSV(t, n) {
825
- const e = document.createElement("a"), s = "text/csv;encoding:utf-8";
824
+ downloadCSV(t, e) {
825
+ const n = document.createElement("a"), s = "text/csv;encoding:utf-8";
826
826
  if (navigator.msSaveBlob)
827
827
  navigator.msSaveBlob(
828
828
  new Blob([t], {
829
829
  type: s
830
830
  }),
831
- n
831
+ e
832
832
  );
833
- else if (URL && "download" in e) {
833
+ else if (URL && "download" in n) {
834
834
  const o = URL.createObjectURL(
835
835
  new Blob([t], {
836
836
  type: s
837
837
  })
838
838
  );
839
- e.href = o, e.setAttribute("download", n), document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(o);
839
+ n.href = o, n.setAttribute("download", e), document.body.appendChild(n), n.click(), document.body.removeChild(n), URL.revokeObjectURL(o);
840
840
  } else
841
841
  location.href = `data:application/octet-stream,${encodeURIComponent(t)}`;
842
842
  }
843
- downloadImage(t, n) {
844
- const e = document.createElement("a");
845
- e.download = n, e.href = t, document.body.appendChild(e), e.click(), document.body.removeChild(e);
843
+ downloadImage(t, e) {
844
+ const n = document.createElement("a");
845
+ n.download = e, n.href = t, document.body.appendChild(n), n.click(), document.body.removeChild(n);
846
846
  }
847
847
  }
848
- class an extends A {
848
+ class ae extends A {
849
849
  constructor() {
850
850
  super(...arguments), this.pendingTransitions = {};
851
851
  }
852
852
  init() {
853
853
  var t;
854
- (t = this.services.events) == null || t.addEventListener(E.Model.UPDATE, () => {
854
+ (t = this.services.events) == null || t.addEventListener(w.Model.UPDATE, () => {
855
855
  this.pendingTransitions = {};
856
856
  });
857
857
  }
858
- setupTransition({ transition: t, name: n, animate: e }) {
858
+ setupTransition({ transition: t, name: e, animate: n }) {
859
859
  return this.pendingTransitions[t._id] = t, t.on("end interrupt cancel", () => {
860
860
  delete this.pendingTransitions[t._id];
861
- }), this.model.getOptions().animations === !1 || e === !1 ? t.duration(0) : t.duration(
862
- c(J, n, "duration") || J.default.duration
861
+ }), this.model.getOptions().animations === !1 || n === !1 ? t.duration(0) : t.duration(
862
+ c(W, e, "duration") || W.default.duration
863
863
  );
864
864
  }
865
865
  getPendingTransitions() {
866
866
  return this.pendingTransitions;
867
867
  }
868
868
  }
869
- function b(i, t) {
870
- const n = x(i), e = x(t), s = n.getTime() - e.getTime();
871
- return s < 0 ? -1 : s > 0 ? 1 : s;
872
- }
873
- function Zi(i, t) {
874
- const n = x(i), e = x(t);
875
- return n.getFullYear() - e.getFullYear();
869
+ function S(i, t) {
870
+ const e = +T(i) - +T(t);
871
+ return e < 0 ? -1 : e > 0 ? 1 : e;
876
872
  }
877
- function Fi(i, t) {
878
- const n = x(i), e = x(t), s = b(n, e), o = Math.abs(Zi(n, e));
879
- n.setFullYear(1584), e.setFullYear(1584);
880
- const a = b(n, e) === -s, r = s * (o - +a);
881
- return r === 0 ? 0 : r;
882
- }
883
- function H(i, t) {
884
- const n = x(i);
885
- if (isNaN(t)) return P(i, NaN);
873
+ function Fi(i, t, e) {
874
+ const [n, s] = M(
875
+ e == null ? void 0 : e.in,
876
+ i,
877
+ t
878
+ );
879
+ return n.getFullYear() - s.getFullYear();
880
+ }
881
+ function zi(i, t, e) {
882
+ const [n, s] = M(
883
+ e == null ? void 0 : e.in,
884
+ i,
885
+ t
886
+ ), o = S(n, s), a = Math.abs(Fi(n, s));
887
+ n.setFullYear(1584), s.setFullYear(1584);
888
+ const r = S(n, s) === -o, h = o * (a - +r);
889
+ return h === 0 ? 0 : h;
890
+ }
891
+ function X(i, t, e) {
892
+ const n = T(i, e == null ? void 0 : e.in);
893
+ if (isNaN(t)) return E(i, NaN);
886
894
  if (!t)
887
895
  return n;
888
- const e = n.getDate(), s = P(i, n.getTime());
889
- s.setMonth(n.getMonth() + t + 1, 0);
890
- const o = s.getDate();
891
- return e >= o ? s : (n.setFullYear(
892
- s.getFullYear(),
893
- s.getMonth(),
894
- e
896
+ const s = n.getDate(), o = E(i, n.getTime());
897
+ o.setMonth(n.getMonth() + t + 1, 0);
898
+ const a = o.getDate();
899
+ return s >= a ? o : (n.setFullYear(
900
+ o.getFullYear(),
901
+ o.getMonth(),
902
+ s
895
903
  ), n);
896
904
  }
897
- function Pt(i, t) {
898
- return H(i, t * 12);
899
- }
900
- function zi(i, t) {
901
- return Pt(i, -t);
905
+ function St(i, t, e) {
906
+ return X(i, t * 12, e);
902
907
  }
903
- function Vi(i, t) {
904
- const n = x(i), e = x(t), s = n.getFullYear() - e.getFullYear(), o = n.getMonth() - e.getMonth();
905
- return s * 12 + o;
908
+ function Vi(i, t, e) {
909
+ return St(i, -t, e);
906
910
  }
907
- function Yi(i) {
908
- const t = x(i);
909
- return t.setHours(23, 59, 59, 999), t;
911
+ function Hi(i, t, e) {
912
+ const [n, s] = M(
913
+ e == null ? void 0 : e.in,
914
+ i,
915
+ t
916
+ ), o = n.getFullYear() - s.getFullYear(), a = n.getMonth() - s.getMonth();
917
+ return o * 12 + a;
910
918
  }
911
- function Hi(i) {
912
- const t = x(i), n = t.getMonth();
913
- return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
919
+ function Yi(i, t) {
920
+ const e = T(i, t == null ? void 0 : t.in);
921
+ return e.setHours(23, 59, 59, 999), e;
914
922
  }
915
- function Xi(i) {
916
- const t = x(i);
917
- return +Yi(t) == +Hi(t);
923
+ function Xi(i, t) {
924
+ const e = T(i, t == null ? void 0 : t.in), n = e.getMonth();
925
+ return e.setFullYear(e.getFullYear(), n + 1, 0), e.setHours(23, 59, 59, 999), e;
918
926
  }
919
927
  function Gi(i, t) {
920
- const n = x(i), e = x(t), s = b(n, e), o = Math.abs(
921
- Vi(n, e)
928
+ const e = T(i, t == null ? void 0 : t.in);
929
+ return +Yi(e, t) == +Xi(e, t);
930
+ }
931
+ function $i(i, t, e) {
932
+ const [n, s, o] = M(
933
+ e == null ? void 0 : e.in,
934
+ i,
935
+ i,
936
+ t
937
+ ), a = S(s, o), r = Math.abs(
938
+ Hi(s, o)
922
939
  );
923
- let a;
924
- if (o < 1)
925
- a = 0;
926
- else {
927
- n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - s * o);
928
- let r = b(n, e) === -s;
929
- Xi(x(i)) && o === 1 && b(i, e) === 1 && (r = !1), a = s * (o - Number(r));
930
- }
931
- return a === 0 ? 0 : a;
932
- }
933
- function $i(i, t) {
934
- return H(i, -t);
935
- }
936
- function Ui(i, t) {
937
- const n = x(i), e = x(t), s = ht(n, e), o = Math.abs(qt(n, e));
938
- n.setDate(n.getDate() - s * o);
939
- const a = +(ht(n, e) === -s), r = s * (o - a);
940
- return r === 0 ? 0 : r;
940
+ if (r < 1) return 0;
941
+ s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - a * r);
942
+ let h = S(s, o) === -a;
943
+ Gi(n) && r === 1 && S(n, o) === 1 && (h = !1);
944
+ const l = a * (r - +h);
945
+ return l === 0 ? 0 : l;
946
+ }
947
+ function Ui(i, t, e) {
948
+ return X(i, -t, e);
949
+ }
950
+ function Ki(i, t, e) {
951
+ const [n, s] = M(
952
+ e == null ? void 0 : e.in,
953
+ i,
954
+ t
955
+ ), o = rt(n, s), a = Math.abs(
956
+ jt(n, s)
957
+ );
958
+ n.setDate(n.getDate() - o * a);
959
+ const r = +(rt(n, s) === -o), h = o * (a - r);
960
+ return h === 0 ? 0 : h;
941
961
  }
942
- function ht(i, t) {
943
- const n = i.getFullYear() - t.getFullYear() || i.getMonth() - t.getMonth() || i.getDate() - t.getDate() || i.getHours() - t.getHours() || i.getMinutes() - t.getMinutes() || i.getSeconds() - t.getSeconds() || i.getMilliseconds() - t.getMilliseconds();
944
- return n < 0 ? -1 : n > 0 ? 1 : n;
962
+ function rt(i, t) {
963
+ const e = i.getFullYear() - t.getFullYear() || i.getMonth() - t.getMonth() || i.getDate() - t.getDate() || i.getHours() - t.getHours() || i.getMinutes() - t.getMinutes() || i.getSeconds() - t.getSeconds() || i.getMilliseconds() - t.getMilliseconds();
964
+ return e < 0 ? -1 : e > 0 ? 1 : e;
945
965
  }
946
- function Et(i, t) {
947
- const n = x(i);
948
- return isNaN(t) ? P(i, NaN) : (t && n.setDate(n.getDate() + t), n);
966
+ function Pt(i, t, e) {
967
+ const n = T(i, e == null ? void 0 : e.in);
968
+ return isNaN(t) ? E(i, NaN) : (t && n.setDate(n.getDate() + t), n);
949
969
  }
950
- function Ki(i, t) {
951
- return Et(i, -t);
970
+ function qi(i, t, e) {
971
+ return Pt(i, -t, e);
952
972
  }
953
- function X(i) {
973
+ function G(i) {
954
974
  return (t) => {
955
- const e = (i ? Math[i] : Math.trunc)(t);
956
- return e === 0 ? 0 : e;
975
+ const n = (i ? Math[i] : Math.trunc)(t);
976
+ return n === 0 ? 0 : n;
957
977
  };
958
978
  }
959
- function G(i, t) {
960
- return +x(i) - +x(t);
979
+ function ji(i, t, e) {
980
+ const [n, s] = M(
981
+ e == null ? void 0 : e.in,
982
+ i,
983
+ t
984
+ ), o = (+n - +s) / ft;
985
+ return G(e == null ? void 0 : e.roundingMethod)(o);
961
986
  }
962
- function qi(i, t, n) {
963
- const e = G(i, t) / mt;
964
- return X(n == null ? void 0 : n.roundingMethod)(e);
987
+ function Et(i, t, e) {
988
+ return E(i, +T(i) + t);
965
989
  }
966
- function $(i, t) {
967
- const n = +x(i);
968
- return P(i, n + t);
990
+ function wt(i, t, e) {
991
+ return Et(i, t * ft);
969
992
  }
970
- function wt(i, t) {
971
- return $(i, t * mt);
972
- }
973
- function ji(i, t) {
993
+ function Wi(i, t, e) {
974
994
  return wt(i, -t);
975
995
  }
976
- function ct(i, t, n) {
977
- const e = G(i, t) / dt;
978
- return X(n == null ? void 0 : n.roundingMethod)(e);
996
+ function kt(i, t) {
997
+ return +T(i) - +T(t);
998
+ }
999
+ function ht(i, t, e) {
1000
+ const n = kt(i, t) / mt;
1001
+ return G(e == null ? void 0 : e.roundingMethod)(n);
979
1002
  }
980
- function I(i, t) {
981
- return $(i, t * dt);
1003
+ function Z(i, t, e) {
1004
+ const n = T(i, e == null ? void 0 : e.in);
1005
+ return n.setTime(n.getTime() + t * mt), n;
982
1006
  }
983
- function lt(i, t) {
984
- return I(i, -t);
1007
+ function ct(i, t, e) {
1008
+ return Z(i, -t, e);
985
1009
  }
986
- function _t(i, t, n) {
987
- const e = G(i, t) / 1e3;
988
- return X(n == null ? void 0 : n.roundingMethod)(e);
1010
+ function lt(i, t, e) {
1011
+ const n = kt(i, t) / 1e3;
1012
+ return G(e == null ? void 0 : e.roundingMethod)(n);
989
1013
  }
990
- function Z(i, t) {
991
- return $(i, t * 1e3);
1014
+ function F(i, t, e) {
1015
+ return Et(i, t * 1e3);
992
1016
  }
993
- function ut(i, t) {
994
- return Z(i, -t);
1017
+ function _t(i, t, e) {
1018
+ return F(i, -t);
995
1019
  }
996
- class rn extends A {
1020
+ class re extends A {
997
1021
  constructor() {
998
1022
  super(...arguments), this.scaleTypes = {
999
1023
  top: null,
@@ -1010,17 +1034,17 @@ class rn extends A {
1010
1034
  }
1011
1035
  getDomainAxisPosition({ datum: t = null } = {}) {
1012
1036
  if (this.dualAxes && t) {
1013
- const n = this.model.getOptions(), { groupMapsTo: e } = n.data, s = c(n, "axes", this.secondaryDomainAxisPosition), o = t[e];
1037
+ const e = this.model.getOptions(), { groupMapsTo: n } = e.data, s = c(e, "axes", this.secondaryDomainAxisPosition), o = t[n];
1014
1038
  if (s != null && s.correspondingDatasets && s.correspondingDatasets.includes(o))
1015
1039
  return this.secondaryDomainAxisPosition;
1016
1040
  }
1017
1041
  return this.domainAxisPosition;
1018
1042
  }
1019
- getRangeAxisPosition({ datum: t = null, groups: n = null } = {}) {
1043
+ getRangeAxisPosition({ datum: t = null, groups: e = null } = {}) {
1020
1044
  if (this.dualAxes) {
1021
- const e = this.model.getOptions(), { groupMapsTo: s } = e.data, o = c(e, "axes", this.secondaryRangeAxisPosition);
1045
+ const n = this.model.getOptions(), { groupMapsTo: s } = n.data, o = c(n, "axes", this.secondaryRangeAxisPosition);
1022
1046
  let a;
1023
- if (t !== null ? a = t[s] : n && n.length > 0 && (a = n[0]), o != null && o.correspondingDatasets && o.correspondingDatasets.includes(a))
1047
+ if (t !== null ? a = t[s] : e && e.length > 0 && (a = e[0]), o != null && o.correspondingDatasets && o.correspondingDatasets.includes(a))
1024
1048
  return this.secondaryRangeAxisPosition;
1025
1049
  }
1026
1050
  return this.rangeAxisPosition;
@@ -1037,8 +1061,8 @@ class rn extends A {
1037
1061
  return this.getAxisOptions(t);
1038
1062
  }
1039
1063
  getScaleLabel(t) {
1040
- const e = this.getAxisOptions(t).title;
1041
- return e || (t === _.BOTTOM || t === _.TOP ? "x-value" : "y-value");
1064
+ const n = this.getAxisOptions(t).title;
1065
+ return n || (t === _.BOTTOM || t === _.TOP ? "x-value" : "y-value");
1042
1066
  }
1043
1067
  getDomainLabel() {
1044
1068
  return this.getScaleLabel(this.getDomainAxisPosition());
@@ -1048,20 +1072,20 @@ class rn extends A {
1048
1072
  }
1049
1073
  update() {
1050
1074
  this.determineAxisDuality(), this.findDomainAndRangeAxes(), this.determineOrientation(), Object.keys(_).map(
1051
- (n) => _[n]
1052
- ).forEach((n) => {
1053
- this.scales[n] = this.createScale(n);
1075
+ (e) => _[e]
1076
+ ).forEach((e) => {
1077
+ this.scales[e] = this.createScale(e);
1054
1078
  });
1055
1079
  }
1056
1080
  findDomainAndRangeAxes() {
1057
- const t = this.findVerticalAxesPositions(), n = this.findHorizontalAxesPositions(), e = this.findDomainAndRangeAxesPositions(
1081
+ const t = this.findVerticalAxesPositions(), e = this.findHorizontalAxesPositions(), n = this.findDomainAndRangeAxesPositions(
1058
1082
  t,
1059
- n
1083
+ e
1060
1084
  );
1061
- this.domainAxisPosition = e.primaryDomainAxisPosition, this.rangeAxisPosition = e.primaryRangeAxisPosition, this.isDualAxes() && (this.secondaryDomainAxisPosition = e.secondaryDomainAxisPosition, this.secondaryRangeAxisPosition = e.secondaryRangeAxisPosition);
1085
+ this.domainAxisPosition = n.primaryDomainAxisPosition, this.rangeAxisPosition = n.primaryRangeAxisPosition, this.isDualAxes() && (this.secondaryDomainAxisPosition = n.secondaryDomainAxisPosition, this.secondaryRangeAxisPosition = n.secondaryRangeAxisPosition);
1062
1086
  }
1063
1087
  determineOrientation() {
1064
- (this.rangeAxisPosition === _.LEFT || this.rangeAxisPosition === _.RIGHT) && (this.domainAxisPosition === _.BOTTOM || this.domainAxisPosition === _.TOP) ? this.orientation = N.VERTICAL : this.orientation = N.HORIZONTAL;
1088
+ (this.rangeAxisPosition === _.LEFT || this.rangeAxisPosition === _.RIGHT) && (this.domainAxisPosition === _.BOTTOM || this.domainAxisPosition === _.TOP) ? this.orientation = C.VERTICAL : this.orientation = C.HORIZONTAL;
1065
1089
  }
1066
1090
  isDualAxes() {
1067
1091
  return this.dualAxes;
@@ -1069,19 +1093,19 @@ class rn extends A {
1069
1093
  // if any of the axes objects have correspondingDatasets [] asserted we flag the chart as dual axes
1070
1094
  // it does not count as dual axes if it just has another axis turned on but is not actually using it to map a dataset
1071
1095
  determineAxisDuality() {
1072
- var e, s, o, a;
1073
- const t = this.model.getOptions(), n = c(t, "axes");
1074
- ((e = n[_.LEFT]) != null && e.correspondingDatasets && n[_.RIGHT] || (s = n[_.RIGHT]) != null && s.correspondingDatasets && n[_.LEFT] || (o = n[_.TOP]) != null && o.correspondingDatasets && n[_.BOTTOM] || (a = n[_.BOTTOM]) != null && a.correspondingDatasets && n[_.TOP]) && (this.dualAxes = !0);
1096
+ var n, s, o, a;
1097
+ const t = this.model.getOptions(), e = c(t, "axes");
1098
+ ((n = e[_.LEFT]) != null && n.correspondingDatasets && e[_.RIGHT] || (s = e[_.RIGHT]) != null && s.correspondingDatasets && e[_.LEFT] || (o = e[_.TOP]) != null && o.correspondingDatasets && e[_.BOTTOM] || (a = e[_.BOTTOM]) != null && a.correspondingDatasets && e[_.TOP]) && (this.dualAxes = !0);
1075
1099
  }
1076
1100
  getCustomDomainValuesByposition(t) {
1077
- const n = c(this.model.getOptions(), "axes", t, "domain");
1078
- if (n && !Array.isArray(n))
1101
+ const e = c(this.model.getOptions(), "axes", t, "domain");
1102
+ if (e && !Array.isArray(e))
1079
1103
  throw new Error(`Domain in ${t} axis is not a valid array`);
1080
- if (Array.isArray(n) && (this.scaleTypes[t] === m.LINEAR || this.scaleTypes[t] === m.TIME) && n.length !== 2)
1104
+ if (Array.isArray(e) && (this.scaleTypes[t] === m.LINEAR || this.scaleTypes[t] === m.TIME) && e.length !== 2)
1081
1105
  throw new Error(
1082
1106
  `There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`
1083
1107
  );
1084
- return n;
1108
+ return e;
1085
1109
  }
1086
1110
  getOrientation() {
1087
1111
  return this.orientation;
@@ -1110,14 +1134,14 @@ class rn extends A {
1110
1134
  getMainXAxisPosition() {
1111
1135
  const t = [_.BOTTOM, _.TOP];
1112
1136
  return [this.domainAxisPosition, this.rangeAxisPosition].find(
1113
- (n) => t.indexOf(n) > -1
1137
+ (e) => t.indexOf(e) > -1
1114
1138
  );
1115
1139
  }
1116
1140
  // Find the main y-axis out of the 2 y-axis on the chart (when 2D axis is used)
1117
1141
  getMainYAxisPosition() {
1118
1142
  const t = [_.LEFT, _.RIGHT];
1119
1143
  return [this.domainAxisPosition, this.rangeAxisPosition].find(
1120
- (n) => t.indexOf(n) > -1
1144
+ (e) => t.indexOf(e) > -1
1121
1145
  );
1122
1146
  }
1123
1147
  getMainXScale() {
@@ -1126,10 +1150,10 @@ class rn extends A {
1126
1150
  getMainYScale() {
1127
1151
  return this.scales[this.getMainYAxisPosition()];
1128
1152
  }
1129
- getValueFromScale(t, n, e, s) {
1130
- const o = this.model.getOptions(), r = c(o, "axes")[e], { mapsTo: h } = r, l = c(s, h) !== null ? s[h] : s;
1153
+ getValueFromScale(t, e, n, s) {
1154
+ const o = this.model.getOptions(), r = c(o, "axes")[n], { mapsTo: h } = r, l = c(s, h) !== null ? s[h] : s;
1131
1155
  let f;
1132
- switch (n) {
1156
+ switch (e) {
1133
1157
  case m.LABELS:
1134
1158
  f = t(l) + t.step() / 2;
1135
1159
  break;
@@ -1142,27 +1166,27 @@ class rn extends A {
1142
1166
  return f;
1143
1167
  }
1144
1168
  getBoundedScaledValues(t) {
1145
- const { bounds: n } = this.model.getOptions(), e = this.getRangeAxisPosition({ datum: t }), s = this.scales[e], o = this.model.getOptions(), r = c(o, "axes")[e], { mapsTo: h } = r, l = t[h] !== void 0 ? t[h] : t;
1169
+ const { bounds: e } = this.model.getOptions(), n = this.getRangeAxisPosition({ datum: t }), s = this.scales[n], o = this.model.getOptions(), r = c(o, "axes")[n], { mapsTo: h } = r, l = t[h] !== void 0 ? t[h] : t;
1146
1170
  return [
1147
1171
  s(
1148
- c(t, n.upperBoundMapsTo) !== null ? t[n.upperBoundMapsTo] : l
1172
+ c(t, e.upperBoundMapsTo) !== null ? t[e.upperBoundMapsTo] : l
1149
1173
  ),
1150
1174
  s(
1151
- c(t, n.lowerBoundMapsTo) !== null ? t[n.lowerBoundMapsTo] : l
1175
+ c(t, e.lowerBoundMapsTo) !== null ? t[e.lowerBoundMapsTo] : l
1152
1176
  )
1153
1177
  ];
1154
1178
  }
1155
- getValueThroughAxisPosition(t, n) {
1156
- const e = this.scaleTypes[t], s = this.scales[t];
1157
- return this.getValueFromScale(s, e, t, n);
1179
+ getValueThroughAxisPosition(t, e) {
1180
+ const n = this.scaleTypes[t], s = this.scales[t];
1181
+ return this.getValueFromScale(s, n, t, e);
1158
1182
  }
1159
1183
  getDomainValue(t) {
1160
- const n = this.getDomainAxisPosition({ datum: t });
1161
- return this.getValueThroughAxisPosition(n, t);
1184
+ const e = this.getDomainAxisPosition({ datum: t });
1185
+ return this.getValueThroughAxisPosition(e, t);
1162
1186
  }
1163
1187
  getRangeValue(t) {
1164
- const n = this.getRangeAxisPosition({ datum: t });
1165
- return this.getValueThroughAxisPosition(n, t);
1188
+ const e = this.getRangeAxisPosition({ datum: t });
1189
+ return this.getValueThroughAxisPosition(e, t);
1166
1190
  }
1167
1191
  getMainXScaleType() {
1168
1192
  return this.getScaleTypeByPosition(this.getMainXAxisPosition());
@@ -1171,201 +1195,201 @@ class rn extends A {
1171
1195
  return this.getScaleTypeByPosition(this.getMainYAxisPosition());
1172
1196
  }
1173
1197
  getDomainIdentifier(t) {
1174
- const n = this.model.getOptions();
1175
- return c(n, "axes", this.getDomainAxisPosition({ datum: t }), "mapsTo");
1198
+ const e = this.model.getOptions();
1199
+ return c(e, "axes", this.getDomainAxisPosition({ datum: t }), "mapsTo");
1176
1200
  }
1177
1201
  getRangeIdentifier(t) {
1178
- const n = this.model.getOptions();
1179
- return c(n, "axes", this.getRangeAxisPosition({ datum: t }), "mapsTo");
1202
+ const e = this.model.getOptions();
1203
+ return c(e, "axes", this.getRangeAxisPosition({ datum: t }), "mapsTo");
1180
1204
  }
1181
- extendsDomain(t, n) {
1182
- const e = this.model.getOptions(), s = c(e, "axes", t);
1205
+ extendsDomain(t, e) {
1206
+ const n = this.model.getOptions(), s = c(n, "axes", t);
1183
1207
  if (s.scaleType === m.TIME) {
1184
- const o = c(e, "timeScale", "addSpaceOnEdges");
1185
- return Wi(n, o);
1208
+ const o = c(n, "timeScale", "addSpaceOnEdges");
1209
+ return Ji(e, o);
1186
1210
  } else
1187
- return Ji(n, Q.paddingRatio, s.scaleType);
1211
+ return Qi(e, J.paddingRatio, s.scaleType);
1188
1212
  }
1189
1213
  findVerticalAxesPositions() {
1190
- const t = this.model.getOptions(), n = c(t, "axes"), e = this.isDualAxes();
1191
- return c(n, _.LEFT) === null && c(n, _.RIGHT) !== null || c(n, _.RIGHT, "main") === !0 || e && c(n, _.LEFT, "correspondingDatasets") ? {
1214
+ const t = this.model.getOptions(), e = c(t, "axes"), n = this.isDualAxes();
1215
+ return c(e, _.LEFT) === null && c(e, _.RIGHT) !== null || c(e, _.RIGHT, "main") === !0 || n && c(e, _.LEFT, "correspondingDatasets") ? {
1192
1216
  primary: _.RIGHT,
1193
1217
  secondary: _.LEFT
1194
1218
  } : { primary: _.LEFT, secondary: _.RIGHT };
1195
1219
  }
1196
1220
  findHorizontalAxesPositions() {
1197
- const t = this.model.getOptions(), n = c(t, "axes"), e = this.isDualAxes();
1198
- return c(n, _.BOTTOM) === null && c(n, _.TOP) !== null || c(n, _.TOP, "main") === !0 || e && c(n, _.BOTTOM, "correspondingDatasets") ? {
1221
+ const t = this.model.getOptions(), e = c(t, "axes"), n = this.isDualAxes();
1222
+ return c(e, _.BOTTOM) === null && c(e, _.TOP) !== null || c(e, _.TOP, "main") === !0 || n && c(e, _.BOTTOM, "correspondingDatasets") ? {
1199
1223
  primary: _.TOP,
1200
1224
  secondary: _.BOTTOM
1201
1225
  } : { primary: _.BOTTOM, secondary: _.TOP };
1202
1226
  }
1203
- findDomainAndRangeAxesPositions(t, n) {
1204
- const e = this.model.getOptions(), s = c(e, "axes", t.primary), o = c(e, "axes", n.primary), a = s.scaleType || m.LINEAR, r = o.scaleType || m.LINEAR, h = {
1227
+ findDomainAndRangeAxesPositions(t, e) {
1228
+ const n = this.model.getOptions(), s = c(n, "axes", t.primary), o = c(n, "axes", e.primary), a = s.scaleType || m.LINEAR, r = o.scaleType || m.LINEAR, h = {
1205
1229
  primaryDomainAxisPosition: null,
1206
1230
  secondaryDomainAxisPosition: null,
1207
1231
  primaryRangeAxisPosition: null,
1208
1232
  secondaryRangeAxisPosition: null
1209
1233
  };
1210
- return h.primaryDomainAxisPosition = n.primary, h.primaryRangeAxisPosition = t.primary, h.secondaryDomainAxisPosition = n.secondary, h.secondaryRangeAxisPosition = t.secondary, (!(r === m.LABELS || r === m.TIME) && a === m.LABELS || a === m.TIME) && (h.primaryDomainAxisPosition = t.primary, h.primaryRangeAxisPosition = n.primary, h.secondaryDomainAxisPosition = t.secondary, h.secondaryRangeAxisPosition = n.secondary), h;
1234
+ return h.primaryDomainAxisPosition = e.primary, h.primaryRangeAxisPosition = t.primary, h.secondaryDomainAxisPosition = e.secondary, h.secondaryRangeAxisPosition = t.secondary, (!(r === m.LABELS || r === m.TIME) && a === m.LABELS || a === m.TIME) && (h.primaryDomainAxisPosition = t.primary, h.primaryRangeAxisPosition = e.primary, h.secondaryDomainAxisPosition = t.secondary, h.secondaryRangeAxisPosition = e.secondary), h;
1211
1235
  }
1212
1236
  getScaleDomain(t) {
1213
- const n = this.model.getOptions(), e = c(n, "axes", t), s = c(n, "bounds"), { includeZero: o } = e, a = c(e, "scaleType") || m.LINEAR;
1237
+ const e = this.model.getOptions(), n = c(e, "axes", t), s = c(e, "bounds"), { includeZero: o } = n, a = c(n, "scaleType") || m.LINEAR;
1214
1238
  if (this.model.isDataEmpty())
1215
1239
  return [];
1216
- if (e.binned) {
1240
+ if (n.binned) {
1217
1241
  const { bins: u } = this.model.getBinConfigurations();
1218
- return [0, jt(u, (g) => g.length)];
1219
- } else if (e.limitDomainToBins) {
1220
- const { bins: u } = this.model.getBinConfigurations(), g = this.model.getStackKeys({ bins: u });
1221
- return [g[0].split(":")[0], g[g.length - 1].split(":")[1]];
1242
+ return [0, Wt(u, (x) => x.length)];
1243
+ } else if (n.limitDomainToBins) {
1244
+ const { bins: u } = this.model.getBinConfigurations(), x = this.model.getStackKeys({ bins: u });
1245
+ return [x[0].split(":")[0], x[x.length - 1].split(":")[1]];
1222
1246
  }
1223
- const r = this.model.getDisplayData(), { extendLinearDomainBy: h, mapsTo: l, percentage: f, thresholds: v } = e, { reference: p, compareTo: T } = Q.ratio;
1224
- if (e.domain)
1225
- return a === m.LABELS ? e.domain : (a === m.TIME && (e.domain = e.domain.map(
1247
+ const r = this.model.getDisplayData(), { extendLinearDomainBy: h, mapsTo: l, percentage: f, thresholds: y } = n, { reference: p, compareTo: v } = J.ratio;
1248
+ if (n.domain)
1249
+ return a === m.LABELS ? n.domain : (a === m.TIME && (n.domain = n.domain.map(
1226
1250
  (u) => u.getTime === void 0 ? new Date(u) : u
1227
- )), this.extendsDomain(t, e.domain));
1251
+ )), this.extendsDomain(t, n.domain));
1228
1252
  if (f)
1229
1253
  return [0, 100];
1230
- if (e && a === m.LABELS)
1231
- return Wt(r.map((u) => u[l]));
1232
- let y, d;
1254
+ if (n && a === m.LABELS)
1255
+ return Jt(r.map((u) => u[l]));
1256
+ let g, d;
1233
1257
  const D = this.model.getDataGroupNames();
1234
1258
  if (a === m.LABELS_RATIO)
1235
- return r.map((u) => `${u[p]}/${u[T]}`);
1259
+ return r.map((u) => `${u[p]}/${u[v]}`);
1236
1260
  if (a === m.TIME)
1237
1261
  d = r.map((u) => +new Date(u[l]));
1238
- else if (s && n.axes)
1262
+ else if (s && e.axes)
1239
1263
  d = [], r.forEach((u) => {
1240
1264
  d.push(u[l]), u[s.upperBoundMapsTo] && d.push(u[s.upperBoundMapsTo]), u[s.lowerBoundMapsTo] && d.push(u[s.lowerBoundMapsTo]);
1241
1265
  });
1242
- else if (e.stacked === !0 && D && t === this.getRangeAxisPosition()) {
1243
- const { groupMapsTo: u } = n.data, g = this.model.getDataValuesGroupedByKeys({
1266
+ else if (n.stacked === !0 && D && t === this.getRangeAxisPosition()) {
1267
+ const { groupMapsTo: u } = e.data, x = this.model.getDataValuesGroupedByKeys({
1244
1268
  groups: D
1245
- }), kt = r.filter(
1246
- (M) => !D.includes(M[u])
1247
- ), U = [];
1248
- g.forEach((M) => {
1249
- const { ...Rt } = M;
1250
- let K = 0, q = 0;
1251
- Object.values(di(Rt, "sharedStackKey")).forEach((S) => {
1252
- isNaN(S) || (S < 0 ? q += S : K += S);
1253
- }), U.push([q, K]);
1269
+ }), Rt = r.filter(
1270
+ (b) => !D.includes(b[u])
1271
+ ), $ = [];
1272
+ x.forEach((b) => {
1273
+ const { ...Bt } = b;
1274
+ let U = 0, K = 0;
1275
+ Object.values(pi(Bt, "sharedStackKey")).forEach((P) => {
1276
+ isNaN(P) || (P < 0 ? K += P : U += P);
1277
+ }), $.push([K, U]);
1254
1278
  }), d = [
1255
- ...xt(U),
1256
- ...kt.map((M) => M[l])
1279
+ ...pt($),
1280
+ ...Rt.map((b) => b[l])
1257
1281
  ];
1258
1282
  } else
1259
1283
  d = [], r.forEach((u) => {
1260
- const g = u[l];
1261
- Array.isArray(g) && g.length === 2 ? (d.push(g[0]), d.push(g[1])) : (h && d.push(Math.max(u[l], u[h])), d.push(g));
1284
+ const x = u[l];
1285
+ Array.isArray(x) && x.length === 2 ? (d.push(x[0]), d.push(x[1])) : (h && d.push(Math.max(u[l], u[h])), d.push(x));
1262
1286
  });
1263
- return a !== m.TIME && a !== m.LOG && o && d.push(0), v && v.length > 0 && v.forEach((u) => {
1264
- const g = c(u, "value");
1265
- g !== null && d.push(g);
1266
- }), y = pt(d), y = this.extendsDomain(t, y), y;
1287
+ return a !== m.TIME && a !== m.LOG && o && d.push(0), y && y.length > 0 && y.forEach((u) => {
1288
+ const x = c(u, "value");
1289
+ x !== null && d.push(x);
1290
+ }), g = dt(d), g = this.extendsDomain(t, g), g;
1267
1291
  }
1268
1292
  createScale(t) {
1269
- const n = this.model.getOptions(), e = c(n, "axes", t);
1270
- if (!e)
1293
+ const e = this.model.getOptions(), n = c(e, "axes", t);
1294
+ if (!n)
1271
1295
  return null;
1272
- const s = c(e, "scaleType") || m.LINEAR;
1296
+ const s = c(n, "scaleType") || m.LINEAR;
1273
1297
  this.scaleTypes[t] = s;
1274
1298
  let o;
1275
- return s === m.TIME ? o = ei() : s === m.LOG ? o = gt().base(e.base || 10) : s === m.LABELS || s === m.LABELS_RATIO ? o = si() : o = Jt(), o.domain(this.getScaleDomain(t)), o;
1299
+ return s === m.TIME ? o = si() : s === m.LOG ? o = xt().base(n.base || 10) : s === m.LABELS || s === m.LABELS_RATIO ? o = oi() : o = Qt(), o.domain(this.getScaleDomain(t)), o;
1276
1300
  }
1277
1301
  getDomainLowerBound(t) {
1278
- let n, e = 0;
1279
- return this.getOrientation() === N.VERTICAL ? n = this.getMainYScale().domain() : n = this.getMainXScale().domain(), c(this.model.getOptions(), "axes", t, "includeZero") === !1 && n[0] > 0 && n[1] > 0 && (e = n[0]), e;
1302
+ let e, n = 0;
1303
+ return this.getOrientation() === C.VERTICAL ? e = this.getMainYScale().domain() : e = this.getMainXScale().domain(), c(this.model.getOptions(), "axes", t, "includeZero") === !1 && e[0] > 0 && e[1] > 0 && (n = e[0]), n;
1280
1304
  }
1281
1305
  getHighestDomainThreshold() {
1282
- const t = c(this.model.getOptions(), "axes"), n = this.getDomainAxisPosition(), { thresholds: e } = t[n];
1283
- if (!Array.isArray(e) || Array.isArray(e) && !e.length)
1306
+ const t = c(this.model.getOptions(), "axes"), e = this.getDomainAxisPosition(), { thresholds: n } = t[e];
1307
+ if (!Array.isArray(n) || Array.isArray(n) && !n.length)
1284
1308
  return null;
1285
- const s = this.getDomainScale(), o = e.sort((r, h) => h.value - r.value)[0];
1286
- return this.getScaleTypeByPosition(n) === m.TIME && (typeof o.value == "string" || o.value.getTime === void 0) && (o.value = new Date(o.value)), {
1309
+ const s = this.getDomainScale(), o = n.sort((r, h) => h.value - r.value)[0];
1310
+ return this.getScaleTypeByPosition(e) === m.TIME && (typeof o.value == "string" || o.value.getTime === void 0) && (o.value = new Date(o.value)), {
1287
1311
  threshold: o,
1288
1312
  scaleValue: s(o.value)
1289
1313
  };
1290
1314
  }
1291
1315
  getHighestRangeThreshold() {
1292
- const t = c(this.model.getOptions(), "axes"), n = this.getRangeAxisPosition(), { thresholds: e } = t[n];
1293
- if (!Array.isArray(e) || Array.isArray(e) && !e.length)
1316
+ const t = c(this.model.getOptions(), "axes"), e = this.getRangeAxisPosition(), { thresholds: n } = t[e];
1317
+ if (!Array.isArray(n) || Array.isArray(n) && !n.length)
1294
1318
  return null;
1295
- const s = this.getRangeScale(), o = e.sort((a, r) => r.value - a.value)[0];
1319
+ const s = this.getRangeScale(), o = n.sort((a, r) => r.value - a.value)[0];
1296
1320
  return {
1297
1321
  threshold: o,
1298
1322
  scaleValue: s(o.value)
1299
1323
  };
1300
1324
  }
1301
1325
  }
1302
- function Wi(i, t) {
1303
- const n = new Date(i[0]), e = new Date(i[1]);
1304
- return Fi(e, n) > 1 ? [zi(n, t), Pt(e, t)] : Gi(e, n) > 1 ? [$i(n, t), H(e, t)] : Ui(e, n) > 1 ? [Ki(n, t), Et(e, t)] : qi(e, n) > 1 ? [ji(n, t), wt(e, t)] : ct(e, n) > 30 ? [
1305
- lt(n, t * 30),
1306
- I(e, t * 30)
1307
- ] : ct(e, n) > 1 ? [lt(n, t), I(e, t)] : _t(e, n) > 15 ? [
1308
- ut(n, t * 15),
1309
- Z(e, t * 15)
1310
- ] : _t(e, n) > 1 ? [ut(n, t), Z(e, t)] : [n, e];
1326
+ function Ji(i, t) {
1327
+ const e = new Date(i[0]), n = new Date(i[1]);
1328
+ return zi(n, e) > 1 ? [Vi(e, t), St(n, t)] : $i(n, e) > 1 ? [Ui(e, t), X(n, t)] : Ki(n, e) > 1 ? [qi(e, t), Pt(n, t)] : ji(n, e) > 1 ? [Wi(e, t), wt(n, t)] : ht(n, e) > 30 ? [
1329
+ ct(e, t * 30),
1330
+ Z(n, t * 30)
1331
+ ] : ht(n, e) > 1 ? [ct(e, t), Z(n, t)] : lt(n, e) > 15 ? [
1332
+ _t(e, t * 15),
1333
+ F(n, t * 15)
1334
+ ] : lt(n, e) > 1 ? [_t(e, t), F(n, t)] : [e, n];
1311
1335
  }
1312
- function Ji([i, t], n, e) {
1313
- const o = (t - i) * n, a = t <= 0 && t + o > 0 ? 0 : t + o;
1336
+ function Qi([i, t], e, n) {
1337
+ const o = (t - i) * e, a = t <= 0 && t + o > 0 ? 0 : t + o;
1314
1338
  let r = i >= 0 && i - o < 0 ? 0 : i - o;
1315
- if (e === m.LOG && r <= 0) {
1339
+ if (n === m.LOG && r <= 0) {
1316
1340
  if (i <= 0)
1317
1341
  throw Error("Data must have values greater than 0 if log scale type is used.");
1318
1342
  r = i;
1319
1343
  }
1320
1344
  return [r, a];
1321
1345
  }
1322
- class hn extends A {
1346
+ class he extends A {
1323
1347
  constructor() {
1324
1348
  super(...arguments), this.curveTypes = {
1325
- curveLinear: oi,
1349
+ curveLinear: ri,
1326
1350
  curveLinearClosed: ai,
1327
- curveBasis: Di,
1328
- curveBasisClosed: Ai,
1329
- curveBasisOpen: Oi,
1330
- curveBundle: Mi,
1331
- curveCardinal: bi,
1332
- curveCardinalClosed: Si,
1333
- curveCardinalOpen: Pi,
1334
- curveCatmullRom: Ei,
1335
- curveCatmullRomClosed: wi,
1336
- curveCatmullRomOpen: ki,
1337
- curveMonotoneX: Ri,
1338
- curveMonotoneY: Bi,
1339
- curveNatural: Li,
1340
- curveStep: Ni,
1341
- curveStepAfter: Ii,
1342
- curveStepBefore: Ci
1351
+ curveBasis: Ai,
1352
+ curveBasisClosed: Oi,
1353
+ curveBasisOpen: Mi,
1354
+ curveBundle: bi,
1355
+ curveCardinal: Si,
1356
+ curveCardinalClosed: Pi,
1357
+ curveCardinalOpen: Ei,
1358
+ curveCatmullRom: wi,
1359
+ curveCatmullRomClosed: ki,
1360
+ curveCatmullRomOpen: Ri,
1361
+ curveMonotoneX: Bi,
1362
+ curveMonotoneY: Li,
1363
+ curveNatural: Ni,
1364
+ curveStep: Ci,
1365
+ curveStepAfter: Zi,
1366
+ curveStepBefore: Ii
1343
1367
  };
1344
1368
  }
1345
1369
  getD3Curve() {
1346
1370
  let t = "curveLinear";
1347
- const n = this.model.getOptions().curve;
1348
- if (n && (typeof n == "string" ? t = n : t = n.name), this.curveTypes[t]) {
1349
- let e = this.curveTypes[t];
1350
- return n && Object.keys(n).forEach((s) => {
1351
- e[s] && (e = e[s](n[s]));
1352
- }), e;
1371
+ const e = this.model.getOptions().curve;
1372
+ if (e && (typeof e == "string" ? t = e : t = e.name), this.curveTypes[t]) {
1373
+ let n = this.curveTypes[t];
1374
+ return e && Object.keys(e).forEach((s) => {
1375
+ n[s] && (n = n[s](e[s]));
1376
+ }), n;
1353
1377
  }
1354
1378
  return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`), this.curveTypes.curveLinear;
1355
1379
  }
1356
1380
  }
1357
- class cn extends A {
1381
+ class ce extends A {
1358
1382
  isZoomBarEnabled() {
1359
1383
  if (!this.services.cartesianScales || !c(this.model.getOptions(), "zoomBar", "top", "enabled"))
1360
1384
  return !1;
1361
1385
  this.services.cartesianScales.findDomainAndRangeAxes();
1362
- const t = this.services.cartesianScales.getMainXAxisPosition(), n = c(
1386
+ const t = this.services.cartesianScales.getMainXAxisPosition(), e = c(
1363
1387
  this.model.getOptions(),
1364
1388
  "axes",
1365
1389
  t,
1366
1390
  "scaleType"
1367
1391
  );
1368
- return t === _.BOTTOM && n === m.TIME;
1392
+ return t === _.BOTTOM && e === m.TIME;
1369
1393
  }
1370
1394
  // get display data for zoom bar
1371
1395
  // basically it's sum of value grouped by time
@@ -1375,20 +1399,20 @@ class cn extends A {
1375
1399
  }
1376
1400
  getDefaultZoomBarDomain(t) {
1377
1401
  if (!this.services.zoom) throw new Error("Services zoom not defined");
1378
- const n = t || this.services.zoom.getZoomBarData(), { cartesianScales: e } = this.services;
1379
- if (!e) throw new Error("Services cartesianScales undefined");
1380
- const s = e.getMainXAxisPosition(), o = e.getDomainIdentifier(), a = c(this.model.getOptions(), "axes", s, "domain");
1402
+ const e = t || this.services.zoom.getZoomBarData(), { cartesianScales: n } = this.services;
1403
+ if (!n) throw new Error("Services cartesianScales undefined");
1404
+ const s = n.getMainXAxisPosition(), o = n.getDomainIdentifier(), a = c(this.model.getOptions(), "axes", s, "domain");
1381
1405
  if (Array.isArray(a) && a.length === 2)
1382
1406
  return a;
1383
1407
  if (!s) throw new Error("Not defined: mainXAxisPosition");
1384
- return e.extendsDomain(
1408
+ return n.extendsDomain(
1385
1409
  s,
1386
- pt(n, (r) => r[o])
1410
+ dt(e, (r) => r[o])
1387
1411
  );
1388
1412
  }
1389
- handleDomainChange(t, n = { dispatchEvent: !0 }) {
1390
- var e;
1391
- this.model.set({ zoomDomain: t }, { animate: !1 }), n.dispatchEvent && ((e = this.services.events) == null || e.dispatchEvent(E.ZoomDomain.CHANGE, {
1413
+ handleDomainChange(t, e = { dispatchEvent: !0 }) {
1414
+ var n;
1415
+ this.model.set({ zoomDomain: t }, { animate: !1 }), e.dispatchEvent && ((n = this.services.events) == null || n.dispatchEvent(w.ZoomDomain.CHANGE, {
1392
1416
  newDomain: t
1393
1417
  }));
1394
1418
  }
@@ -1397,16 +1421,16 @@ class cn extends A {
1397
1421
  }
1398
1422
  // filter out data not inside zoom domain
1399
1423
  // to get better range value for axis label
1400
- filterDataForRangeAxis(t, n) {
1424
+ filterDataForRangeAxis(t, e) {
1401
1425
  var a;
1402
- const e = this.model.get("zoomDomain"), s = Object.assign(
1426
+ const n = this.model.get("zoomDomain"), s = Object.assign(
1403
1427
  { stacked: !1 },
1404
1428
  // default configs
1405
- n
1429
+ e
1406
1430
  ), o = c(this.model.getOptions(), "zoomBar", "updateRangeAxis");
1407
- if (this.isZoomBarEnabled() && o && e) {
1431
+ if (this.isZoomBarEnabled() && o && n) {
1408
1432
  const r = s.stacked ? "sharedStackKey" : (a = this.services.cartesianScales) == null ? void 0 : a.getDomainIdentifier(), h = t.filter(
1409
- (l) => new Date(l[r]) >= e[0] && new Date(l[r]) <= e[1]
1433
+ (l) => new Date(l[r]) >= n[0] && new Date(l[r]) <= n[1]
1410
1434
  );
1411
1435
  if (h.length > 0)
1412
1436
  return h;
@@ -1414,44 +1438,44 @@ class cn extends A {
1414
1438
  return t;
1415
1439
  }
1416
1440
  zoomIn(t = this.getZoomRatio()) {
1417
- var T;
1418
- const n = this.model.get("zoomDomain"), e = Qt.handleWidth, s = (T = this.services.cartesianScales) == null ? void 0 : T.getMainXScale().copy();
1441
+ var v;
1442
+ const e = this.model.get("zoomDomain"), n = ti.handleWidth, s = (v = this.services.cartesianScales) == null ? void 0 : v.getMainXScale().copy();
1419
1443
  s.domain(this.getDefaultZoomBarDomain());
1420
- const o = s(n[0]), a = s(n[1]);
1421
- if (a - o < e + 1)
1444
+ const o = s(e[0]), a = s(e[1]);
1445
+ if (a - o < n + 1)
1422
1446
  return;
1423
1447
  const r = s.range(), h = a - o, l = Math.min((r[1] - r[0]) / 2 * (t / 2), h / 2);
1424
- let f = o + l, v = a - l;
1425
- f >= v && (f = o + h / 2 - e / 2, v = a - h / 2 + e / 2);
1426
- const p = [s.invert(f), s.invert(v)];
1427
- (n[0].valueOf() !== p[0].valueOf() || n[1].valueOf() !== p[1].valueOf()) && this.handleDomainChange(p);
1448
+ let f = o + l, y = a - l;
1449
+ f >= y && (f = o + h / 2 - n / 2, y = a - h / 2 + n / 2);
1450
+ const p = [s.invert(f), s.invert(y)];
1451
+ (e[0].valueOf() !== p[0].valueOf() || e[1].valueOf() !== p[1].valueOf()) && this.handleDomainChange(p);
1428
1452
  }
1429
1453
  zoomOut(t = this.getZoomRatio()) {
1430
- const n = this.model.get("zoomDomain");
1454
+ const e = this.model.get("zoomDomain");
1431
1455
  if (!this.services.cartesianScales) throw new Error("Services cartesianScales undefined");
1432
- const e = this.services.cartesianScales.getMainXScale().copy();
1433
- e.domain(this.getDefaultZoomBarDomain());
1434
- const s = e(n[0]), o = e(n[1]), a = e.range(), r = (a[1] - a[0]) / 2 * (t / 2), h = Math.max(s - r, a[0]), l = Math.min(o + r, a[1]), f = [e.invert(h), e.invert(l)];
1435
- (n[0].valueOf() !== f[0].valueOf() || n[1].valueOf() !== f[1].valueOf()) && this.handleDomainChange(f);
1456
+ const n = this.services.cartesianScales.getMainXScale().copy();
1457
+ n.domain(this.getDefaultZoomBarDomain());
1458
+ const s = n(e[0]), o = n(e[1]), a = n.range(), r = (a[1] - a[0]) / 2 * (t / 2), h = Math.max(s - r, a[0]), l = Math.min(o + r, a[1]), f = [n.invert(h), n.invert(l)];
1459
+ (e[0].valueOf() !== f[0].valueOf() || e[1].valueOf() !== f[1].valueOf()) && this.handleDomainChange(f);
1436
1460
  }
1437
1461
  resetZoomDomain() {
1438
- const t = this.model.get("zoomDomain"), n = this.getDefaultZoomBarDomain();
1439
- (t[0].valueOf() !== n[0].valueOf() || t[1].valueOf() !== n[1].valueOf()) && this.handleDomainChange(n);
1462
+ const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
1463
+ (t[0].valueOf() !== e[0].valueOf() || t[1].valueOf() !== e[1].valueOf()) && this.handleDomainChange(e);
1440
1464
  }
1441
1465
  // check if current zoom domain is already the min zoom domain
1442
1466
  // when toolbar is rendered, we don't render chart yet
1443
1467
  // don't depend on scale range
1444
1468
  isMinZoomDomain() {
1445
- const t = this.model.get("zoomDomain"), n = this.getDefaultZoomBarDomain();
1446
- if (!t || !n)
1469
+ const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
1470
+ if (!t || !e)
1447
1471
  return !1;
1448
- const e = t[1].valueOf() - t[0].valueOf(), s = n[1].valueOf() - n[0].valueOf(), o = c(this.model.getOptions(), "zoomBar", "minZoomRatio");
1449
- return e / s < o;
1472
+ const n = t[1].valueOf() - t[0].valueOf(), s = e[1].valueOf() - e[0].valueOf(), o = c(this.model.getOptions(), "zoomBar", "minZoomRatio");
1473
+ return n / s < o;
1450
1474
  }
1451
1475
  // check if current zoom domain is already the max zoom domain
1452
1476
  isMaxZoomDomain() {
1453
- const t = this.model.get("zoomDomain"), n = this.getDefaultZoomBarDomain();
1454
- return !!(t && n && t[0].valueOf() === n[0].valueOf() && t[1].valueOf() === n[1].valueOf());
1477
+ const t = this.model.get("zoomDomain"), e = this.getDefaultZoomBarDomain();
1478
+ return !!(t && e && t[0].valueOf() === e[0].valueOf() && t[1].valueOf() === e[1].valueOf());
1455
1479
  }
1456
1480
  isEmptyState() {
1457
1481
  return this.getZoomBarData().length === 0;
@@ -1464,14 +1488,14 @@ class cn extends A {
1464
1488
  }
1465
1489
  }
1466
1490
  export {
1467
- en as C,
1468
- sn as E,
1469
- on as F,
1470
- an as T,
1471
- cn as Z,
1472
- rn as a,
1473
- hi as b,
1474
- hn as c,
1475
- xt as f
1491
+ ne as C,
1492
+ se as E,
1493
+ oe as F,
1494
+ ae as T,
1495
+ ce as Z,
1496
+ he as a,
1497
+ ci as b,
1498
+ re as c,
1499
+ pt as f
1476
1500
  };
1477
- //# sourceMappingURL=index-DFubnvsv.mjs.map
1501
+ //# sourceMappingURL=index-CiAo-vQV.mjs.map