@kong-ui-public/analytics-chart 6.1.4 → 6.1.6

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.
@@ -1398,8 +1398,8 @@ function Go(n, t, e, i) {
1398
1398
  }
1399
1399
  function Dh(n, t, e, i, s) {
1400
1400
  let r, a, o, l, c, u, d, h;
1401
- const f = t.pointStyle, p = t.rotation, y = t.radius;
1402
- let x = (p || 0) * Il;
1401
+ const f = t.pointStyle, g = t.rotation, y = t.radius;
1402
+ let x = (g || 0) * Il;
1403
1403
  if (f && typeof f == "object" && (r = f.toString(), r === "[object HTMLImageElement]" || r === "[object HTMLCanvasElement]")) {
1404
1404
  n.save(), n.translate(e, i), n.rotate(x), n.drawImage(f, -f.width / 2, -f.height / 2, f.width, f.height), n.restore();
1405
1405
  return;
@@ -1416,7 +1416,7 @@ function Dh(n, t, e, i, s) {
1416
1416
  c = y * 0.516, l = y - c, a = Math.cos(x + Ue) * l, d = Math.cos(x + Ue) * (s ? s / 2 - c : l), o = Math.sin(x + Ue) * l, h = Math.sin(x + Ue) * (s ? s / 2 - c : l), n.arc(e - d, i - o, c, x - gt, x - It), n.arc(e + h, i - a, c, x - It, x), n.arc(e + d, i + o, c, x, x + It), n.arc(e - h, i + a, c, x + It, x + gt), n.closePath();
1417
1417
  break;
1418
1418
  case "rect":
1419
- if (!p) {
1419
+ if (!g) {
1420
1420
  l = Math.SQRT1_2 * y, u = s ? s / 2 : l, n.rect(e - u, i - l, 2 * u, 2 * l);
1421
1421
  break;
1422
1422
  }
@@ -1933,10 +1933,10 @@ function Hn(n, t) {
1933
1933
  if ("native" in n)
1934
1934
  return n;
1935
1935
  const { canvas: e, currentDevicePixelRatio: i } = t, s = va(e), r = s.boxSizing === "border-box", a = hi(s, "padding"), o = hi(s, "border", "width"), { x: l, y: c, box: u } = Tm(n, e), d = a.left + (u && o.left), h = a.top + (u && o.top);
1936
- let { width: f, height: p } = t;
1937
- return r && (f -= a.width + o.width, p -= a.height + o.height), {
1936
+ let { width: f, height: g } = t;
1937
+ return r && (f -= a.width + o.width, g -= a.height + o.height), {
1938
1938
  x: Math.round((l - d) / f * e.width / i),
1939
- y: Math.round((c - h) / p * e.height / i)
1939
+ y: Math.round((c - h) / g * e.height / i)
1940
1940
  };
1941
1941
  }
1942
1942
  function Cm(n, t, e) {
@@ -2103,24 +2103,24 @@ function Nh(n, t, e) {
2103
2103
  return [
2104
2104
  n
2105
2105
  ];
2106
- const { property: i, start: s, end: r } = e, a = t.length, { compare: o, between: l, normalize: c } = Ih(i), { start: u, end: d, loop: h, style: f } = Im(n, t, e), p = [];
2106
+ const { property: i, start: s, end: r } = e, a = t.length, { compare: o, between: l, normalize: c } = Ih(i), { start: u, end: d, loop: h, style: f } = Im(n, t, e), g = [];
2107
2107
  let y = !1, x = null, w, M, D;
2108
- const S = () => l(s, D, w) && o(s, D) !== 0, k = () => o(r, w) === 0 || l(r, D, w), E = () => y || S(), P = () => !y || k();
2109
- for (let g = u, b = u; g <= d; ++g)
2110
- M = t[g % a], !M.skip && (w = c(M[i]), w !== D && (y = l(w, s, r), x === null && E() && (x = o(w, s) === 0 ? g : b), x !== null && P() && (p.push(Wc({
2108
+ const S = () => l(s, D, w) && o(s, D) !== 0, T = () => o(r, w) === 0 || l(r, D, w), A = () => y || S(), P = () => !y || T();
2109
+ for (let p = u, b = u; p <= d; ++p)
2110
+ M = t[p % a], !M.skip && (w = c(M[i]), w !== D && (y = l(w, s, r), x === null && A() && (x = o(w, s) === 0 ? p : b), x !== null && P() && (g.push(Wc({
2111
2111
  start: x,
2112
- end: g,
2112
+ end: p,
2113
2113
  loop: h,
2114
2114
  count: a,
2115
2115
  style: f
2116
- })), x = null), b = g, D = w));
2117
- return x !== null && p.push(Wc({
2116
+ })), x = null), b = p, D = w));
2117
+ return x !== null && g.push(Wc({
2118
2118
  start: x,
2119
2119
  end: d,
2120
2120
  loop: h,
2121
2121
  count: a,
2122
2122
  style: f
2123
- })), p;
2123
+ })), g;
2124
2124
  }
2125
2125
  function Fh(n, t) {
2126
2126
  const e = [], i = n.segments;
@@ -2183,25 +2183,25 @@ function Bc(n, t, e, i) {
2183
2183
  function Hm(n, t, e, i) {
2184
2184
  const s = n._chart.getContext(), r = Yc(n.options), { _datasetIndex: a, options: { spanGaps: o } } = n, l = e.length, c = [];
2185
2185
  let u = r, d = t[0].start, h = d;
2186
- function f(p, y, x, w) {
2186
+ function f(g, y, x, w) {
2187
2187
  const M = o ? -1 : 1;
2188
- if (p !== y) {
2189
- for (p += l; e[p % l].skip; )
2190
- p -= M;
2188
+ if (g !== y) {
2189
+ for (g += l; e[g % l].skip; )
2190
+ g -= M;
2191
2191
  for (; e[y % l].skip; )
2192
2192
  y += M;
2193
- p % l !== y % l && (c.push({
2194
- start: p % l,
2193
+ g % l !== y % l && (c.push({
2194
+ start: g % l,
2195
2195
  end: y % l,
2196
2196
  loop: x,
2197
2197
  style: w
2198
2198
  }), u = w, d = y % l);
2199
2199
  }
2200
2200
  }
2201
- for (const p of t) {
2202
- d = o ? d : p.start;
2201
+ for (const g of t) {
2202
+ d = o ? d : g.start;
2203
2203
  let y = e[d % l], x;
2204
- for (h = d + 1; h <= p.end; h++) {
2204
+ for (h = d + 1; h <= g.end; h++) {
2205
2205
  const w = e[h % l];
2206
2206
  x = Yc(i.setContext(Jn(s, {
2207
2207
  type: "segment",
@@ -2210,9 +2210,9 @@ function Hm(n, t, e, i) {
2210
2210
  p0DataIndex: (h - 1) % l,
2211
2211
  p1DataIndex: h % l,
2212
2212
  datasetIndex: a
2213
- }))), Wm(x, u) && f(d, h - 1, p.loop, u), y = w, u = x;
2213
+ }))), Wm(x, u) && f(d, h - 1, g.loop, u), y = w, u = x;
2214
2214
  }
2215
- d < h - 1 && f(d, h - 1, p.loop, u);
2215
+ d < h - 1 && f(d, h - 1, g.loop, u);
2216
2216
  }
2217
2217
  return c;
2218
2218
  }
@@ -2577,7 +2577,7 @@ function Vc(n, t) {
2577
2577
  const { chart: e, _cachedMeta: i } = n, s = e._stacks || (e._stacks = {}), { iScale: r, vScale: a, index: o } = i, l = r.axis, c = a.axis, u = Gm(r, a, i), d = t.length;
2578
2578
  let h;
2579
2579
  for (let f = 0; f < d; ++f) {
2580
- const p = t[f], { [l]: y, [c]: x } = p, w = p._stacks || (p._stacks = {});
2580
+ const g = t[f], { [l]: y, [c]: x } = g, w = g._stacks || (g._stacks = {});
2581
2581
  h = w[c] = Zm(s, u, y), h[o] = x, h._top = qc(h, a, !0, i.type), h._bottom = qc(h, a, !1, i.type);
2582
2582
  const M = h._visualValues || (h._visualValues = {});
2583
2583
  M[o] = x;
@@ -2637,7 +2637,7 @@ class nn {
2637
2637
  this.index !== t && ds(this._cachedMeta), this.index = t;
2638
2638
  }
2639
2639
  linkScales() {
2640
- const t = this.chart, e = this._cachedMeta, i = this.getDataset(), s = (d, h, f, p) => d === "x" ? h : d === "r" ? p : f, r = e.xAxisID = it(i.xAxisID, yo(t, "x")), a = e.yAxisID = it(i.yAxisID, yo(t, "y")), o = e.rAxisID = it(i.rAxisID, yo(t, "r")), l = e.indexAxis, c = e.iAxisID = s(l, r, a, o), u = e.vAxisID = s(l, a, r, o);
2640
+ const t = this.chart, e = this._cachedMeta, i = this.getDataset(), s = (d, h, f, g) => d === "x" ? h : d === "r" ? g : f, r = e.xAxisID = it(i.xAxisID, yo(t, "x")), a = e.yAxisID = it(i.yAxisID, yo(t, "y")), o = e.rAxisID = it(i.rAxisID, yo(t, "r")), l = e.indexAxis, c = e.iAxisID = s(l, r, a, o), u = e.vAxisID = s(l, a, r, o);
2641
2641
  e.xScale = this.getScaleForId(r), e.yScale = this.getScaleForId(a), e.rScale = this.getScaleForId(o), e.iScale = this.getScaleForId(c), e.vScale = this.getScaleForId(u);
2642
2642
  }
2643
2643
  getDataset() {
@@ -2705,11 +2705,11 @@ class nn {
2705
2705
  }
2706
2706
  parsePrimitiveData(t, e, i, s) {
2707
2707
  const { iScale: r, vScale: a } = t, o = r.axis, l = a.axis, c = r.getLabels(), u = r === a, d = new Array(s);
2708
- let h, f, p;
2708
+ let h, f, g;
2709
2709
  for (h = 0, f = s; h < f; ++h)
2710
- p = h + i, d[h] = {
2711
- [o]: u || r.parse(c[p], p),
2712
- [l]: a.parse(e[p], p)
2710
+ g = h + i, d[h] = {
2711
+ [o]: u || r.parse(c[g], g),
2712
+ [l]: a.parse(e[g], g)
2713
2713
  };
2714
2714
  return d;
2715
2715
  }
@@ -2760,16 +2760,16 @@ class nn {
2760
2760
  max: Number.NEGATIVE_INFINITY
2761
2761
  }, { min: u, max: d } = Km(o);
2762
2762
  let h, f;
2763
- function p() {
2763
+ function g() {
2764
2764
  f = s[h];
2765
2765
  const y = f[o.axis];
2766
2766
  return !zt(f[t.axis]) || u > y || d < y;
2767
2767
  }
2768
- for (h = 0; h < a && !(!p() && (this.updateRangeFromParsed(c, t, f, l), r)); ++h)
2768
+ for (h = 0; h < a && !(!g() && (this.updateRangeFromParsed(c, t, f, l), r)); ++h)
2769
2769
  ;
2770
2770
  if (r) {
2771
2771
  for (h = a - 1; h >= 0; --h)
2772
- if (!p()) {
2772
+ if (!g()) {
2773
2773
  this.updateRangeFromParsed(c, t, f, l);
2774
2774
  break;
2775
2775
  }
@@ -2841,7 +2841,7 @@ class nn {
2841
2841
  ] : [
2842
2842
  t,
2843
2843
  ""
2844
- ], h = c.getOptionScopes(this.getDataset(), u), f = Object.keys(Nt.elements[t]), p = () => this.getContext(i, s, e), y = c.resolveNamedOptions(h, f, p, d);
2844
+ ], h = c.getOptionScopes(this.getDataset(), u), f = Object.keys(Nt.elements[t]), g = () => this.getContext(i, s, e), y = c.resolveNamedOptions(h, f, g, d);
2845
2845
  return y.$shared && (y.$shared = l, r[a] = Object.freeze(Xc(y, l))), y;
2846
2846
  }
2847
2847
  _resolveAnimations(t, e, i) {
@@ -3103,9 +3103,9 @@ class Ns extends nn {
3103
3103
  }
3104
3104
  parseObjectData(t, e, i, s) {
3105
3105
  const { iScale: r, vScale: a } = t, { xAxisKey: o = "x", yAxisKey: l = "y" } = this._parsing, c = r.axis === "x" ? o : l, u = a.axis === "x" ? o : l, d = [];
3106
- let h, f, p, y;
3106
+ let h, f, g, y;
3107
3107
  for (h = i, f = i + s; h < f; ++h)
3108
- y = e[h], p = {}, p[r.axis] = r.parse(Gn(y, c), h), d.push(Hh(Gn(y, u), p, a, h));
3108
+ y = e[h], g = {}, g[r.axis] = r.parse(Gn(y, c), h), d.push(Hh(Gn(y, u), g, a, h));
3109
3109
  return d;
3110
3110
  }
3111
3111
  updateRangeFromParsed(t, e, i, s) {
@@ -3135,13 +3135,13 @@ class Ns extends nn {
3135
3135
  updateElements(t, e, i, s) {
3136
3136
  const r = s === "reset", { index: a, _cachedMeta: { vScale: o } } = this, l = o.getBasePixel(), c = o.isHorizontal(), u = this._getRuler(), { sharedOptions: d, includeOptions: h } = this._getSharedOptions(e, s);
3137
3137
  for (let f = e; f < e + i; f++) {
3138
- const p = this.getParsed(f), y = r || st(p[o.axis]) ? {
3138
+ const g = this.getParsed(f), y = r || st(g[o.axis]) ? {
3139
3139
  base: l,
3140
3140
  head: l
3141
- } : this._calculateBarValuePixels(f), x = this._calculateBarIndexPixels(f, u), w = (p._stacks || {})[o.axis], M = {
3141
+ } : this._calculateBarValuePixels(f), x = this._calculateBarIndexPixels(f, u), w = (g._stacks || {})[o.axis], M = {
3142
3142
  horizontal: c,
3143
3143
  base: y.base,
3144
- enableBorderRadius: !w || _o(p._custom) || a === w._top || a === w._bottom,
3144
+ enableBorderRadius: !w || _o(g._custom) || a === w._top || a === w._bottom,
3145
3145
  x: c ? y.head : x.center,
3146
3146
  y: c ? x.center : y.head,
3147
3147
  height: c ? x.size : Math.abs(y.size),
@@ -3189,14 +3189,14 @@ class Ns extends nn {
3189
3189
  }
3190
3190
  _calculateBarValuePixels(t) {
3191
3191
  const { _cachedMeta: { vScale: e, _stacked: i, index: s }, options: { base: r, minBarLength: a } } = this, o = r || 0, l = this.getParsed(t), c = l._custom, u = _o(c);
3192
- let d = l[e.axis], h = 0, f = i ? this.applyStack(e, l, i) : d, p, y;
3192
+ let d = l[e.axis], h = 0, f = i ? this.applyStack(e, l, i) : d, g, y;
3193
3193
  f !== d && (h = f - d, f = d), u && (d = c.barStart, f = c.barEnd - c.barStart, d !== 0 && un(d) !== un(c.barEnd) && (h = 0), h += d);
3194
3194
  const x = !st(r) && !u ? r : h;
3195
3195
  let w = e.getPixelForValue(x);
3196
- if (this.chart.getDataVisibility(t) ? p = e.getPixelForValue(h + f) : p = w, y = p - w, Math.abs(y) < a) {
3196
+ if (this.chart.getDataVisibility(t) ? g = e.getPixelForValue(h + f) : g = w, y = g - w, Math.abs(y) < a) {
3197
3197
  y = ay(y, e, o) * a, d === o && (w -= y / 2);
3198
- const M = e.getPixelForDecimal(0), D = e.getPixelForDecimal(1), S = Math.min(M, D), k = Math.max(M, D);
3199
- w = Math.max(Math.min(w, k), S), p = w + y, i && !u && (l._stacks[e.axis]._visualValues[s] = e.getValueForPixel(p) - e.getValueForPixel(w));
3198
+ const M = e.getPixelForDecimal(0), D = e.getPixelForDecimal(1), S = Math.min(M, D), T = Math.max(M, D);
3199
+ w = Math.max(Math.min(w, T), S), g = w + y, i && !u && (l._stacks[e.axis]._visualValues[s] = e.getValueForPixel(g) - e.getValueForPixel(w));
3200
3200
  }
3201
3201
  if (w === e.getPixelForValue(o)) {
3202
3202
  const M = un(y) * e.getLineWidthForValue(o) / 2;
@@ -3205,8 +3205,8 @@ class Ns extends nn {
3205
3205
  return {
3206
3206
  size: y,
3207
3207
  base: w,
3208
- head: p,
3209
- center: p + y / 2
3208
+ head: g,
3209
+ center: g + y / 2
3210
3210
  };
3211
3211
  }
3212
3212
  _calculateBarIndexPixels(t, e) {
@@ -3311,7 +3311,7 @@ class Ur extends nn {
3311
3311
  updateElements(t, e, i, s) {
3312
3312
  const r = s === "reset", { iScale: a, vScale: o } = this._cachedMeta, { sharedOptions: l, includeOptions: c } = this._getSharedOptions(e, s), u = a.axis, d = o.axis;
3313
3313
  for (let h = e; h < e + i; h++) {
3314
- const f = t[h], p = !r && this.getParsed(h), y = {}, x = y[u] = r ? a.getPixelForDecimal(0.5) : a.getPixelForValue(p[u]), w = y[d] = r ? o.getBasePixel() : o.getPixelForValue(p[d]);
3314
+ const f = t[h], g = !r && this.getParsed(h), y = {}, x = y[u] = r ? a.getPixelForDecimal(0.5) : a.getPixelForValue(g[u]), w = y[d] = r ? o.getBasePixel() : o.getPixelForValue(g[d]);
3315
3315
  y.skip = isNaN(x) || isNaN(w), c && (y.options = l || this.resolveDataElementOptions(h, f.active ? "active" : s), r && (y.options.radius = 0)), this.updateElement(f, h, y, s);
3316
3316
  }
3317
3317
  }
@@ -3352,7 +3352,7 @@ O(Ur, "id", "bubble"), O(Ur, "defaults", {
3352
3352
  function dy(n, t, e) {
3353
3353
  let i = 1, s = 1, r = 0, a = 0;
3354
3354
  if (t < Rt) {
3355
- const o = n, l = o + t, c = Math.cos(o), u = Math.sin(o), d = Math.cos(l), h = Math.sin(l), f = (D, S, k) => $s(D, o, l, !0) ? 1 : Math.max(S, S * e, k, k * e), p = (D, S, k) => $s(D, o, l, !0) ? -1 : Math.min(S, S * e, k, k * e), y = f(0, c, d), x = f(It, u, h), w = p(gt, c, d), M = p(gt + It, u, h);
3355
+ const o = n, l = o + t, c = Math.cos(o), u = Math.sin(o), d = Math.cos(l), h = Math.sin(l), f = (D, S, T) => $s(D, o, l, !0) ? 1 : Math.max(S, S * e, T, T * e), g = (D, S, T) => $s(D, o, l, !0) ? -1 : Math.min(S, S * e, T, T * e), y = f(0, c, d), x = f(It, u, h), w = g(gt, c, d), M = g(gt + It, u, h);
3356
3356
  i = (y - w) / 2, s = (x - M) / 2, r = -(y + w) / 2, a = -(x + M) / 2;
3357
3357
  }
3358
3358
  return {
@@ -3402,29 +3402,29 @@ class Mn extends nn {
3402
3402
  };
3403
3403
  }
3404
3404
  update(t) {
3405
- const e = this.chart, { chartArea: i } = e, s = this._cachedMeta, r = s.data, a = this.getMaxBorderWidth() + this.getMaxOffset(r) + this.options.spacing, o = Math.max((Math.min(i.width, i.height) - a) / 2, 0), l = Math.min(kp(this.options.cutout, o), 1), c = this._getRingWeight(this.index), { circumference: u, rotation: d } = this._getRotationExtents(), { ratioX: h, ratioY: f, offsetX: p, offsetY: y } = dy(d, u, l), x = (i.width - a) / h, w = (i.height - a) / f, M = Math.max(Math.min(x, w) / 2, 0), D = ph(this.options.radius, M), S = Math.max(D * l, 0), k = (D - S) / this._getVisibleDatasetWeightTotal();
3406
- this.offsetX = p * D, this.offsetY = y * D, s.total = this.calculateTotal(), this.outerRadius = D - k * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - k * c, 0), this.updateElements(r, 0, r.length, t);
3405
+ const e = this.chart, { chartArea: i } = e, s = this._cachedMeta, r = s.data, a = this.getMaxBorderWidth() + this.getMaxOffset(r) + this.options.spacing, o = Math.max((Math.min(i.width, i.height) - a) / 2, 0), l = Math.min(kp(this.options.cutout, o), 1), c = this._getRingWeight(this.index), { circumference: u, rotation: d } = this._getRotationExtents(), { ratioX: h, ratioY: f, offsetX: g, offsetY: y } = dy(d, u, l), x = (i.width - a) / h, w = (i.height - a) / f, M = Math.max(Math.min(x, w) / 2, 0), D = ph(this.options.radius, M), S = Math.max(D * l, 0), T = (D - S) / this._getVisibleDatasetWeightTotal();
3406
+ this.offsetX = g * D, this.offsetY = y * D, s.total = this.calculateTotal(), this.outerRadius = D - T * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - T * c, 0), this.updateElements(r, 0, r.length, t);
3407
3407
  }
3408
3408
  _circumference(t, e) {
3409
3409
  const i = this.options, s = this._cachedMeta, r = this._getCircumference();
3410
3410
  return e && i.animation.animateRotate || !this.chart.getDataVisibility(t) || s._parsed[t] === null || s.data[t].hidden ? 0 : this.calculateCircumference(s._parsed[t] * r / Rt);
3411
3411
  }
3412
3412
  updateElements(t, e, i, s) {
3413
- const r = s === "reset", a = this.chart, o = a.chartArea, c = a.options.animation, u = (o.left + o.right) / 2, d = (o.top + o.bottom) / 2, h = r && c.animateScale, f = h ? 0 : this.innerRadius, p = h ? 0 : this.outerRadius, { sharedOptions: y, includeOptions: x } = this._getSharedOptions(e, s);
3413
+ const r = s === "reset", a = this.chart, o = a.chartArea, c = a.options.animation, u = (o.left + o.right) / 2, d = (o.top + o.bottom) / 2, h = r && c.animateScale, f = h ? 0 : this.innerRadius, g = h ? 0 : this.outerRadius, { sharedOptions: y, includeOptions: x } = this._getSharedOptions(e, s);
3414
3414
  let w = this._getRotation(), M;
3415
3415
  for (M = 0; M < e; ++M)
3416
3416
  w += this._circumference(M, r);
3417
3417
  for (M = e; M < e + i; ++M) {
3418
- const D = this._circumference(M, r), S = t[M], k = {
3418
+ const D = this._circumference(M, r), S = t[M], T = {
3419
3419
  x: u + this.offsetX,
3420
3420
  y: d + this.offsetY,
3421
3421
  startAngle: w,
3422
3422
  endAngle: w + D,
3423
3423
  circumference: D,
3424
- outerRadius: p,
3424
+ outerRadius: g,
3425
3425
  innerRadius: f
3426
3426
  };
3427
- x && (k.options = y || this.resolveDataElementOptions(M, S.active ? "active" : s)), w += D, this.updateElement(S, M, k, s);
3427
+ x && (T.options = y || this.resolveDataElementOptions(M, S.active ? "active" : s)), w += D, this.updateElement(S, M, T, s);
3428
3428
  }
3429
3429
  }
3430
3430
  calculateTotal() {
@@ -3565,16 +3565,16 @@ class Fs extends nn {
3565
3565
  }, t), this.updateElements(s, o, l, t);
3566
3566
  }
3567
3567
  updateElements(t, e, i, s) {
3568
- const r = s === "reset", { iScale: a, vScale: o, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: u, includeOptions: d } = this._getSharedOptions(e, s), h = a.axis, f = o.axis, { spanGaps: p, segment: y } = this.options, x = Kn(p) ? p : Number.POSITIVE_INFINITY, w = this.chart._animationsDisabled || r || s === "none", M = e + i, D = t.length;
3568
+ const r = s === "reset", { iScale: a, vScale: o, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: u, includeOptions: d } = this._getSharedOptions(e, s), h = a.axis, f = o.axis, { spanGaps: g, segment: y } = this.options, x = Kn(g) ? g : Number.POSITIVE_INFINITY, w = this.chart._animationsDisabled || r || s === "none", M = e + i, D = t.length;
3569
3569
  let S = e > 0 && this.getParsed(e - 1);
3570
- for (let k = 0; k < D; ++k) {
3571
- const E = t[k], P = w ? E : {};
3572
- if (k < e || k >= M) {
3570
+ for (let T = 0; T < D; ++T) {
3571
+ const A = t[T], P = w ? A : {};
3572
+ if (T < e || T >= M) {
3573
3573
  P.skip = !0;
3574
3574
  continue;
3575
3575
  }
3576
- const g = this.getParsed(k), b = st(g[f]), T = P[h] = a.getPixelForValue(g[h], k), A = P[f] = r || b ? o.getBasePixel() : o.getPixelForValue(l ? this.applyStack(o, g, l) : g[f], k);
3577
- P.skip = isNaN(T) || isNaN(A) || b, P.stop = k > 0 && Math.abs(g[h] - S[h]) > x, y && (P.parsed = g, P.raw = c.data[k]), d && (P.options = u || this.resolveDataElementOptions(k, E.active ? "active" : s)), w || this.updateElement(E, k, P, s), S = g;
3576
+ const p = this.getParsed(T), b = st(p[f]), k = P[h] = a.getPixelForValue(p[h], T), E = P[f] = r || b ? o.getBasePixel() : o.getPixelForValue(l ? this.applyStack(o, p, l) : p[f], T);
3577
+ P.skip = isNaN(k) || isNaN(E) || b, P.stop = T > 0 && Math.abs(p[h] - S[h]) > x, y && (P.parsed = p, P.raw = c.data[T]), d && (P.options = u || this.resolveDataElementOptions(T, A.active ? "active" : s)), w || this.updateElement(A, T, P, s), S = p;
3578
3578
  }
3579
3579
  }
3580
3580
  getMaxOverflow() {
@@ -3638,13 +3638,13 @@ class zs extends nn {
3638
3638
  }
3639
3639
  updateElements(t, e, i, s) {
3640
3640
  const r = s === "reset", a = this.chart, l = a.options.animation, c = this._cachedMeta.rScale, u = c.xCenter, d = c.yCenter, h = c.getIndexAngle(0) - 0.5 * gt;
3641
- let f = h, p;
3641
+ let f = h, g;
3642
3642
  const y = 360 / this.countVisibleElements();
3643
- for (p = 0; p < e; ++p)
3644
- f += this._computeAngle(p, s, y);
3645
- for (p = e; p < e + i; p++) {
3646
- const x = t[p];
3647
- let w = f, M = f + this._computeAngle(p, s, y), D = a.getDataVisibility(p) ? c.getDistanceFromCenterForValue(this.getParsed(p).r) : 0;
3643
+ for (g = 0; g < e; ++g)
3644
+ f += this._computeAngle(g, s, y);
3645
+ for (g = e; g < e + i; g++) {
3646
+ const x = t[g];
3647
+ let w = f, M = f + this._computeAngle(g, s, y), D = a.getDataVisibility(g) ? c.getDistanceFromCenterForValue(this.getParsed(g).r) : 0;
3648
3648
  f = M, r && (l.animateScale && (D = 0), l.animateRotate && (w = M = h));
3649
3649
  const S = {
3650
3650
  x: u,
@@ -3653,9 +3653,9 @@ class zs extends nn {
3653
3653
  outerRadius: D,
3654
3654
  startAngle: w,
3655
3655
  endAngle: M,
3656
- options: this.resolveDataElementOptions(p, x.active ? "active" : s)
3656
+ options: this.resolveDataElementOptions(g, x.active ? "active" : s)
3657
3657
  };
3658
- this.updateElement(x, p, S, s);
3658
+ this.updateElement(x, g, S, s);
3659
3659
  }
3660
3660
  }
3661
3661
  countVisibleElements() {
@@ -3831,11 +3831,11 @@ class Vr extends nn {
3831
3831
  !this.datasetElementType && t && (this.datasetElementType = this.chart.registry.getElement("line")), super.addElements();
3832
3832
  }
3833
3833
  updateElements(t, e, i, s) {
3834
- const r = s === "reset", { iScale: a, vScale: o, _stacked: l, _dataset: c } = this._cachedMeta, u = this.resolveDataElementOptions(e, s), d = this.getSharedOptions(u), h = this.includeOptions(s, d), f = a.axis, p = o.axis, { spanGaps: y, segment: x } = this.options, w = Kn(y) ? y : Number.POSITIVE_INFINITY, M = this.chart._animationsDisabled || r || s === "none";
3834
+ const r = s === "reset", { iScale: a, vScale: o, _stacked: l, _dataset: c } = this._cachedMeta, u = this.resolveDataElementOptions(e, s), d = this.getSharedOptions(u), h = this.includeOptions(s, d), f = a.axis, g = o.axis, { spanGaps: y, segment: x } = this.options, w = Kn(y) ? y : Number.POSITIVE_INFINITY, M = this.chart._animationsDisabled || r || s === "none";
3835
3835
  let D = e > 0 && this.getParsed(e - 1);
3836
3836
  for (let S = e; S < e + i; ++S) {
3837
- const k = t[S], E = this.getParsed(S), P = M ? k : {}, g = st(E[p]), b = P[f] = a.getPixelForValue(E[f], S), T = P[p] = r || g ? o.getBasePixel() : o.getPixelForValue(l ? this.applyStack(o, E, l) : E[p], S);
3838
- P.skip = isNaN(b) || isNaN(T) || g, P.stop = S > 0 && Math.abs(E[f] - D[f]) > w, x && (P.parsed = E, P.raw = c.data[S]), h && (P.options = d || this.resolveDataElementOptions(S, k.active ? "active" : s)), M || this.updateElement(k, S, P, s), D = E;
3837
+ const T = t[S], A = this.getParsed(S), P = M ? T : {}, p = st(A[g]), b = P[f] = a.getPixelForValue(A[f], S), k = P[g] = r || p ? o.getBasePixel() : o.getPixelForValue(l ? this.applyStack(o, A, l) : A[g], S);
3838
+ P.skip = isNaN(b) || isNaN(k) || p, P.stop = S > 0 && Math.abs(A[f] - D[f]) > w, x && (P.parsed = A, P.raw = c.data[S]), h && (P.options = d || this.resolveDataElementOptions(S, T.active ? "active" : s)), M || this.updateElement(T, S, P, s), D = A;
3839
3839
  }
3840
3840
  this.updateSharedOptions(d, s, u);
3841
3841
  }
@@ -3959,8 +3959,8 @@ function Js(n, t, e, i, s) {
3959
3959
  for (let o = 0, l = r.length; o < l; ++o) {
3960
3960
  const { index: c, data: u } = r[o], { lo: d, hi: h } = fy(r[o], t, a, s);
3961
3961
  for (let f = d; f <= h; ++f) {
3962
- const p = u[f];
3963
- p.skip || i(p, c, f);
3962
+ const g = u[f];
3963
+ g.skip || i(g, c, f);
3964
3964
  }
3965
3965
  }
3966
3966
  }
@@ -4007,10 +4007,10 @@ function my(n, t, e, i, s, r) {
4007
4007
  const f = u.inRange(t.x, t.y, s);
4008
4008
  if (i && !f)
4009
4009
  return;
4010
- const p = u.getCenterPoint(s);
4011
- if (!(!!r || n.isPointInArea(p)) && !f)
4010
+ const g = u.getCenterPoint(s);
4011
+ if (!(!!r || n.isPointInArea(g)) && !f)
4012
4012
  return;
4013
- const x = o(t, p);
4013
+ const x = o(t, g);
4014
4014
  x < l ? (a = [
4015
4015
  {
4016
4016
  element: u,
@@ -4286,8 +4286,8 @@ var me = {
4286
4286
  h: a,
4287
4287
  x: s.left,
4288
4288
  y: s.top
4289
- }, s), p = _y(l.concat(c), d);
4290
- Ts(o.fullSize, f, d, p), Ts(l, f, d, p), Ts(c, f, d, p) && Ts(l, f, d, p), vy(f), eu(o.leftAndTop, f, d, p), f.x += f.w, f.y += f.h, eu(o.rightAndBottom, f, d, p), n.chartArea = {
4289
+ }, s), g = _y(l.concat(c), d);
4290
+ Ts(o.fullSize, f, d, g), Ts(l, f, d, g), Ts(c, f, d, g) && Ts(l, f, d, g), vy(f), eu(o.leftAndTop, f, d, g), f.x += f.w, f.y += f.h, eu(o.rightAndBottom, f, d, g), n.chartArea = {
4291
4291
  left: f.left,
4292
4292
  top: f.top,
4293
4293
  right: f.left + f.w,
@@ -4658,24 +4658,24 @@ function Gy(n, t, e) {
4658
4658
  }
4659
4659
  function Ky(n, t, e, i) {
4660
4660
  const { top: s, left: r, bottom: a, right: o, chart: l } = n, { chartArea: c, scales: u } = l;
4661
- let d = 0, h, f, p;
4661
+ let d = 0, h, f, g;
4662
4662
  const y = a - s, x = o - r;
4663
4663
  if (n.isHorizontal()) {
4664
4664
  if (f = pe(i, r, o), lt(e)) {
4665
4665
  const w = Object.keys(e)[0], M = e[w];
4666
- p = u[w].getPixelForValue(M) + y - t;
4667
- } else e === "center" ? p = (c.bottom + c.top) / 2 + y - t : p = su(n, e, t);
4666
+ g = u[w].getPixelForValue(M) + y - t;
4667
+ } else e === "center" ? g = (c.bottom + c.top) / 2 + y - t : g = su(n, e, t);
4668
4668
  h = o - r;
4669
4669
  } else {
4670
4670
  if (lt(e)) {
4671
4671
  const w = Object.keys(e)[0], M = e[w];
4672
4672
  f = u[w].getPixelForValue(M) - x + t;
4673
4673
  } else e === "center" ? f = (c.left + c.right) / 2 - x + t : f = su(n, e, t);
4674
- p = pe(i, a, s), d = e === "left" ? -It : It;
4674
+ g = pe(i, a, s), d = e === "left" ? -It : It;
4675
4675
  }
4676
4676
  return {
4677
4677
  titleX: f,
4678
- titleY: p,
4678
+ titleY: g,
4679
4679
  maxWidth: h,
4680
4680
  rotation: d
4681
4681
  };
@@ -4855,7 +4855,7 @@ class yi extends oe {
4855
4855
  if (a) {
4856
4856
  const l = ou(s, e.options.font);
4857
4857
  if (o ? (t.width = this.maxWidth, t.height = gs(r) + l) : (t.height = this.maxHeight, t.width = gs(r) + l), i.display && this.ticks.length) {
4858
- const { first: c, last: u, widest: d, highest: h } = this._getLabelSizes(), f = i.padding * 2, p = Zt(this.labelRotation), y = Math.cos(p), x = Math.sin(p);
4858
+ const { first: c, last: u, widest: d, highest: h } = this._getLabelSizes(), f = i.padding * 2, g = Zt(this.labelRotation), y = Math.cos(g), x = Math.sin(g);
4859
4859
  if (o) {
4860
4860
  const w = i.mirror ? 0 : x * d.width + y * h.height;
4861
4861
  t.height = Math.min(this.maxHeight, t.height + w + f);
@@ -4912,28 +4912,28 @@ class yi extends oe {
4912
4912
  }
4913
4913
  _computeLabelSizes(t, e, i) {
4914
4914
  const { ctx: s, _longestTextCache: r } = this, a = [], o = [], l = Math.floor(e / ru(e, i));
4915
- let c = 0, u = 0, d, h, f, p, y, x, w, M, D, S, k;
4915
+ let c = 0, u = 0, d, h, f, g, y, x, w, M, D, S, T;
4916
4916
  for (d = 0; d < e; d += l) {
4917
- if (p = t[d].label, y = this._resolveTickFontOptions(d), s.font = x = y.string, w = r[x] = r[x] || {
4917
+ if (g = t[d].label, y = this._resolveTickFontOptions(d), s.font = x = y.string, w = r[x] = r[x] || {
4918
4918
  data: {},
4919
4919
  gc: []
4920
- }, M = y.lineHeight, D = S = 0, !st(p) && !St(p))
4921
- D = sa(s, w.data, w.gc, D, p), S = M;
4922
- else if (St(p))
4923
- for (h = 0, f = p.length; h < f; ++h)
4924
- k = p[h], !st(k) && !St(k) && (D = sa(s, w.data, w.gc, D, k), S += M);
4920
+ }, M = y.lineHeight, D = S = 0, !st(g) && !St(g))
4921
+ D = sa(s, w.data, w.gc, D, g), S = M;
4922
+ else if (St(g))
4923
+ for (h = 0, f = g.length; h < f; ++h)
4924
+ T = g[h], !st(T) && !St(T) && (D = sa(s, w.data, w.gc, D, T), S += M);
4925
4925
  a.push(D), o.push(S), c = Math.max(D, c), u = Math.max(S, u);
4926
4926
  }
4927
4927
  qy(r, e);
4928
- const E = a.indexOf(c), P = o.indexOf(u), g = (b) => ({
4928
+ const A = a.indexOf(c), P = o.indexOf(u), p = (b) => ({
4929
4929
  width: a[b] || 0,
4930
4930
  height: o[b] || 0
4931
4931
  });
4932
4932
  return {
4933
- first: g(0),
4934
- last: g(e - 1),
4935
- widest: g(E),
4936
- highest: g(P),
4933
+ first: p(0),
4934
+ last: p(e - 1),
4935
+ widest: p(A),
4936
+ highest: p(P),
4937
4937
  widths: a,
4938
4938
  heights: o
4939
4939
  };
@@ -4983,18 +4983,18 @@ class yi extends oe {
4983
4983
  return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
4984
4984
  }
4985
4985
  _computeGridLineItems(t) {
4986
- const e = this.axis, i = this.chart, s = this.options, { grid: r, position: a, border: o } = s, l = r.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), h = gs(r), f = [], p = o.setContext(this.getContext()), y = p.display ? p.width : 0, x = y / 2, w = function(q) {
4986
+ const e = this.axis, i = this.chart, s = this.options, { grid: r, position: a, border: o } = s, l = r.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), h = gs(r), f = [], g = o.setContext(this.getContext()), y = g.display ? g.width : 0, x = y / 2, w = function(q) {
4987
4987
  return si(i, q, y);
4988
4988
  };
4989
- let M, D, S, k, E, P, g, b, T, A, R, I;
4989
+ let M, D, S, T, A, P, p, b, k, E, R, I;
4990
4990
  if (a === "top")
4991
- M = w(this.bottom), P = this.bottom - h, b = M - x, A = w(t.top) + x, I = t.bottom;
4991
+ M = w(this.bottom), P = this.bottom - h, b = M - x, E = w(t.top) + x, I = t.bottom;
4992
4992
  else if (a === "bottom")
4993
- M = w(this.top), A = t.top, I = w(t.bottom) - x, P = M + x, b = this.top + h;
4993
+ M = w(this.top), E = t.top, I = w(t.bottom) - x, P = M + x, b = this.top + h;
4994
4994
  else if (a === "left")
4995
- M = w(this.right), E = this.right - h, g = M - x, T = w(t.left) + x, R = t.right;
4995
+ M = w(this.right), A = this.right - h, p = M - x, k = w(t.left) + x, R = t.right;
4996
4996
  else if (a === "right")
4997
- M = w(this.left), T = t.left, R = w(t.right) - x, E = M + x, g = this.left + h;
4997
+ M = w(this.left), k = t.left, R = w(t.right) - x, A = M + x, p = this.left + h;
4998
4998
  else if (e === "x") {
4999
4999
  if (a === "center")
5000
5000
  M = w((t.top + t.bottom) / 2 + 0.5);
@@ -5002,7 +5002,7 @@ class yi extends oe {
5002
5002
  const q = Object.keys(a)[0], H = a[q];
5003
5003
  M = w(this.chart.scales[q].getPixelForValue(H));
5004
5004
  }
5005
- A = t.top, I = t.bottom, P = M + x, b = P + h;
5005
+ E = t.top, I = t.bottom, P = M + x, b = P + h;
5006
5006
  } else if (e === "y") {
5007
5007
  if (a === "center")
5008
5008
  M = w((t.left + t.right) / 2);
@@ -5010,18 +5010,18 @@ class yi extends oe {
5010
5010
  const q = Object.keys(a)[0], H = a[q];
5011
5011
  M = w(this.chart.scales[q].getPixelForValue(H));
5012
5012
  }
5013
- E = M - x, g = E - h, T = t.left, R = t.right;
5013
+ A = M - x, p = A - h, k = t.left, R = t.right;
5014
5014
  }
5015
5015
  const z = it(s.ticks.maxTicksLimit, d), G = Math.max(1, Math.ceil(d / z));
5016
5016
  for (D = 0; D < d; D += G) {
5017
5017
  const q = this.getContext(D), H = r.setContext(q), ut = o.setContext(q), B = H.lineWidth, et = H.color, Pt = ut.dash || [], $ = ut.dashOffset, F = H.tickWidth, Y = H.tickColor, X = H.tickBorderDash || [], Z = H.tickBorderDashOffset;
5018
- S = Uy(this, D, l), S !== void 0 && (k = si(i, S, B), c ? E = g = T = R = k : P = b = A = I = k, f.push({
5019
- tx1: E,
5018
+ S = Uy(this, D, l), S !== void 0 && (T = si(i, S, B), c ? A = p = k = R = T : P = b = E = I = T, f.push({
5019
+ tx1: A,
5020
5020
  ty1: P,
5021
- tx2: g,
5021
+ tx2: p,
5022
5022
  ty2: b,
5023
- x1: T,
5024
- y1: A,
5023
+ x1: k,
5024
+ y1: E,
5025
5025
  x2: R,
5026
5026
  y2: I,
5027
5027
  width: B,
@@ -5037,32 +5037,32 @@ class yi extends oe {
5037
5037
  return this._ticksLength = d, this._borderValue = M, f;
5038
5038
  }
5039
5039
  _computeLabelItems(t) {
5040
- const e = this.axis, i = this.options, { position: s, ticks: r } = i, a = this.isHorizontal(), o = this.ticks, { align: l, crossAlign: c, padding: u, mirror: d } = r, h = gs(i.grid), f = h + u, p = d ? -u : f, y = -Zt(this.labelRotation), x = [];
5041
- let w, M, D, S, k, E, P, g, b, T, A, R, I = "middle";
5040
+ const e = this.axis, i = this.options, { position: s, ticks: r } = i, a = this.isHorizontal(), o = this.ticks, { align: l, crossAlign: c, padding: u, mirror: d } = r, h = gs(i.grid), f = h + u, g = d ? -u : f, y = -Zt(this.labelRotation), x = [];
5041
+ let w, M, D, S, T, A, P, p, b, k, E, R, I = "middle";
5042
5042
  if (s === "top")
5043
- E = this.bottom - p, P = this._getXAxisLabelAlignment();
5043
+ A = this.bottom - g, P = this._getXAxisLabelAlignment();
5044
5044
  else if (s === "bottom")
5045
- E = this.top + p, P = this._getXAxisLabelAlignment();
5045
+ A = this.top + g, P = this._getXAxisLabelAlignment();
5046
5046
  else if (s === "left") {
5047
5047
  const G = this._getYAxisLabelAlignment(h);
5048
- P = G.textAlign, k = G.x;
5048
+ P = G.textAlign, T = G.x;
5049
5049
  } else if (s === "right") {
5050
5050
  const G = this._getYAxisLabelAlignment(h);
5051
- P = G.textAlign, k = G.x;
5051
+ P = G.textAlign, T = G.x;
5052
5052
  } else if (e === "x") {
5053
5053
  if (s === "center")
5054
- E = (t.top + t.bottom) / 2 + f;
5054
+ A = (t.top + t.bottom) / 2 + f;
5055
5055
  else if (lt(s)) {
5056
5056
  const G = Object.keys(s)[0], q = s[G];
5057
- E = this.chart.scales[G].getPixelForValue(q) + f;
5057
+ A = this.chart.scales[G].getPixelForValue(q) + f;
5058
5058
  }
5059
5059
  P = this._getXAxisLabelAlignment();
5060
5060
  } else if (e === "y") {
5061
5061
  if (s === "center")
5062
- k = (t.left + t.right) / 2 - f;
5062
+ T = (t.left + t.right) / 2 - f;
5063
5063
  else if (lt(s)) {
5064
5064
  const G = Object.keys(s)[0], q = s[G];
5065
- k = this.chart.scales[G].getPixelForValue(q);
5065
+ T = this.chart.scales[G].getPixelForValue(q);
5066
5066
  }
5067
5067
  P = this._getYAxisLabelAlignment(h).textAlign;
5068
5068
  }
@@ -5071,10 +5071,10 @@ class yi extends oe {
5071
5071
  for (w = 0, M = o.length; w < M; ++w) {
5072
5072
  D = o[w], S = D.label;
5073
5073
  const G = r.setContext(this.getContext(w));
5074
- g = this.getPixelForTick(w) + r.labelOffset, b = this._resolveTickFontOptions(w), T = b.lineHeight, A = St(S) ? S.length : 1;
5075
- const q = A / 2, H = G.color, ut = G.textStrokeColor, B = G.textStrokeWidth;
5074
+ p = this.getPixelForTick(w) + r.labelOffset, b = this._resolveTickFontOptions(w), k = b.lineHeight, E = St(S) ? S.length : 1;
5075
+ const q = E / 2, H = G.color, ut = G.textStrokeColor, B = G.textStrokeWidth;
5076
5076
  let et = P;
5077
- a ? (k = g, P === "inner" && (w === M - 1 ? et = this.options.reverse ? "left" : "right" : w === 0 ? et = this.options.reverse ? "right" : "left" : et = "center"), s === "top" ? c === "near" || y !== 0 ? R = -A * T + T / 2 : c === "center" ? R = -z.highest.height / 2 - q * T + T : R = -z.highest.height + T / 2 : c === "near" || y !== 0 ? R = T / 2 : c === "center" ? R = z.highest.height / 2 - q * T : R = z.highest.height - A * T, d && (R *= -1), y !== 0 && !G.showLabelBackdrop && (k += T / 2 * Math.sin(y))) : (E = g, R = (1 - A) * T / 2);
5077
+ a ? (T = p, P === "inner" && (w === M - 1 ? et = this.options.reverse ? "left" : "right" : w === 0 ? et = this.options.reverse ? "right" : "left" : et = "center"), s === "top" ? c === "near" || y !== 0 ? R = -E * k + k / 2 : c === "center" ? R = -z.highest.height / 2 - q * k + k : R = -z.highest.height + k / 2 : c === "near" || y !== 0 ? R = k / 2 : c === "center" ? R = z.highest.height / 2 - q * k : R = z.highest.height - E * k, d && (R *= -1), y !== 0 && !G.showLabelBackdrop && (T += k / 2 * Math.sin(y))) : (A = p, R = (1 - E) * k / 2);
5078
5078
  let Pt;
5079
5079
  if (G.showLabelBackdrop) {
5080
5080
  const $ = Qt(G.backdropPadding), F = z.heights[w], Y = z.widths[w];
@@ -5118,8 +5118,8 @@ class yi extends oe {
5118
5118
  textAlign: et,
5119
5119
  textBaseline: I,
5120
5120
  translation: [
5121
- k,
5122
- E
5121
+ T,
5122
+ A
5123
5123
  ],
5124
5124
  backdrop: Pt
5125
5125
  }
@@ -6324,27 +6324,27 @@ function Li(n, t, e, i) {
6324
6324
  function oa(n, t, e, i, s, r) {
6325
6325
  const { x: a, y: o, startAngle: l, pixelMargin: c, innerRadius: u } = t, d = Math.max(t.outerRadius + i + e - c, 0), h = u > 0 ? u + i + e + c : 0;
6326
6326
  let f = 0;
6327
- const p = s - l;
6327
+ const g = s - l;
6328
6328
  if (i) {
6329
- const G = u > 0 ? u - i : 0, q = d > 0 ? d - i : 0, H = (G + q) / 2, ut = H !== 0 ? p * H / (H + i) : p;
6330
- f = (p - ut) / 2;
6329
+ const G = u > 0 ? u - i : 0, q = d > 0 ? d - i : 0, H = (G + q) / 2, ut = H !== 0 ? g * H / (H + i) : g;
6330
+ f = (g - ut) / 2;
6331
6331
  }
6332
- const y = Math.max(1e-3, p * d - e / gt) / d, x = (p - y) / 2, w = l + x + f, M = s - x - f, { outerStart: D, outerEnd: S, innerStart: k, innerEnd: E } = Mb(t, h, d, M - w), P = d - D, g = d - S, b = w + D / P, T = M - S / g, A = h + k, R = h + E, I = w + k / A, z = M - E / R;
6332
+ const y = Math.max(1e-3, g * d - e / gt) / d, x = (g - y) / 2, w = l + x + f, M = s - x - f, { outerStart: D, outerEnd: S, innerStart: T, innerEnd: A } = Mb(t, h, d, M - w), P = d - D, p = d - S, b = w + D / P, k = M - S / p, E = h + T, R = h + A, I = w + T / E, z = M - A / R;
6333
6333
  if (n.beginPath(), r) {
6334
- const G = (b + T) / 2;
6335
- if (n.arc(a, o, d, b, G), n.arc(a, o, d, G, T), S > 0) {
6336
- const B = Li(g, T, a, o);
6337
- n.arc(B.x, B.y, S, T, M + It);
6334
+ const G = (b + k) / 2;
6335
+ if (n.arc(a, o, d, b, G), n.arc(a, o, d, G, k), S > 0) {
6336
+ const B = Li(p, k, a, o);
6337
+ n.arc(B.x, B.y, S, k, M + It);
6338
6338
  }
6339
6339
  const q = Li(R, M, a, o);
6340
- if (n.lineTo(q.x, q.y), E > 0) {
6340
+ if (n.lineTo(q.x, q.y), A > 0) {
6341
6341
  const B = Li(R, z, a, o);
6342
- n.arc(B.x, B.y, E, M + It, z + Math.PI);
6342
+ n.arc(B.x, B.y, A, M + It, z + Math.PI);
6343
6343
  }
6344
- const H = (M - E / h + (w + k / h)) / 2;
6345
- if (n.arc(a, o, h, M - E / h, H, !0), n.arc(a, o, h, H, w + k / h, !0), k > 0) {
6346
- const B = Li(A, I, a, o);
6347
- n.arc(B.x, B.y, k, I + Math.PI, w - It);
6344
+ const H = (M - A / h + (w + T / h)) / 2;
6345
+ if (n.arc(a, o, h, M - A / h, H, !0), n.arc(a, o, h, H, w + T / h, !0), T > 0) {
6346
+ const B = Li(E, I, a, o);
6347
+ n.arc(B.x, B.y, T, I + Math.PI, w - It);
6348
6348
  }
6349
6349
  const ut = Li(P, w, a, o);
6350
6350
  if (n.lineTo(ut.x, ut.y), D > 0) {
@@ -6355,7 +6355,7 @@ function oa(n, t, e, i, s, r) {
6355
6355
  n.moveTo(a, o);
6356
6356
  const G = Math.cos(b) * d + a, q = Math.sin(b) * d + o;
6357
6357
  n.lineTo(G, q);
6358
- const H = Math.cos(T) * d + a, ut = Math.sin(T) * d + o;
6358
+ const H = Math.cos(k) * d + a, ut = Math.sin(k) * d + o;
6359
6359
  n.lineTo(H, ut);
6360
6360
  }
6361
6361
  n.closePath();
@@ -6376,14 +6376,14 @@ function Db(n, t, e, i, s) {
6376
6376
  if (!c)
6377
6377
  return;
6378
6378
  n.setLineDash(d || []), n.lineDashOffset = h, f ? (n.lineWidth = c * 2, n.lineJoin = u || "round") : (n.lineWidth = c, n.lineJoin = u || "bevel");
6379
- let p = t.endAngle;
6379
+ let g = t.endAngle;
6380
6380
  if (r) {
6381
- oa(n, t, e, i, p, s);
6381
+ oa(n, t, e, i, g, s);
6382
6382
  for (let y = 0; y < r; ++y)
6383
6383
  n.stroke();
6384
- isNaN(o) || (p = a + (o % Rt || Rt));
6384
+ isNaN(o) || (g = a + (o % Rt || Rt));
6385
6385
  }
6386
- f && wb(n, t, p), r || (oa(n, t, e, i, p, s), n.stroke());
6386
+ f && wb(n, t, g), r || (oa(n, t, e, i, g, s), n.stroke());
6387
6387
  }
6388
6388
  class Cs extends oe {
6389
6389
  constructor(e) {
@@ -6410,7 +6410,7 @@ class Cs extends oe {
6410
6410
  "innerRadius",
6411
6411
  "outerRadius",
6412
6412
  "circumference"
6413
- ], s), f = (this.options.spacing + this.options.borderWidth) / 2, p = it(h, c - l), y = $s(a, l, c) && l !== c, x = p >= Rt || y, w = xn(o, u + f, d + f);
6413
+ ], s), f = (this.options.spacing + this.options.borderWidth) / 2, g = it(h, c - l), y = $s(a, l, c) && l !== c, x = g >= Rt || y, w = xn(o, u + f, d + f);
6414
6414
  return x && w;
6415
6415
  }
6416
6416
  getCenterPoint(e) {
@@ -6479,22 +6479,22 @@ function Zh(n, t, e = {}) {
6479
6479
  }
6480
6480
  function Cb(n, t, e, i) {
6481
6481
  const { points: s, options: r } = t, { count: a, start: o, loop: l, ilen: c } = Zh(s, e, i), u = Tb(r);
6482
- let { move: d = !0, reverse: h } = i || {}, f, p, y;
6482
+ let { move: d = !0, reverse: h } = i || {}, f, g, y;
6483
6483
  for (f = 0; f <= c; ++f)
6484
- p = s[(o + (h ? c - f : f)) % a], !p.skip && (d ? (n.moveTo(p.x, p.y), d = !1) : u(n, y, p, h, r.stepped), y = p);
6485
- return l && (p = s[(o + (h ? c : 0)) % a], u(n, y, p, h, r.stepped)), !!l;
6484
+ g = s[(o + (h ? c - f : f)) % a], !g.skip && (d ? (n.moveTo(g.x, g.y), d = !1) : u(n, y, g, h, r.stepped), y = g);
6485
+ return l && (g = s[(o + (h ? c : 0)) % a], u(n, y, g, h, r.stepped)), !!l;
6486
6486
  }
6487
6487
  function Ob(n, t, e, i) {
6488
6488
  const s = t.points, { count: r, start: a, ilen: o } = Zh(s, e, i), { move: l = !0, reverse: c } = i || {};
6489
- let u = 0, d = 0, h, f, p, y, x, w;
6489
+ let u = 0, d = 0, h, f, g, y, x, w;
6490
6490
  const M = (S) => (a + (c ? o - S : S)) % r, D = () => {
6491
6491
  y !== x && (n.lineTo(u, x), n.lineTo(u, y), n.lineTo(u, w));
6492
6492
  };
6493
6493
  for (l && (f = s[M(0)], n.moveTo(f.x, f.y)), h = 0; h <= o; ++h) {
6494
6494
  if (f = s[M(h)], f.skip)
6495
6495
  continue;
6496
- const S = f.x, k = f.y, E = S | 0;
6497
- E === p ? (k < y ? y = k : k > x && (x = k), u = (d * u + S) / ++d) : (D(), n.lineTo(S, k), p = E, d = 0, y = x = k), w = k;
6496
+ const S = f.x, T = f.y, A = S | 0;
6497
+ A === g ? (T < y ? y = T : T > x && (x = T), u = (d * u + S) / ++d) : (D(), n.lineTo(S, T), g = A, d = 0, y = x = T), w = T;
6498
6498
  }
6499
6499
  D();
6500
6500
  }
@@ -6560,12 +6560,12 @@ class Yn extends oe {
6560
6560
  const o = [], l = Pb(i);
6561
6561
  let c, u;
6562
6562
  for (c = 0, u = a.length; c < u; ++c) {
6563
- const { start: d, end: h } = a[c], f = r[d], p = r[h];
6564
- if (f === p) {
6563
+ const { start: d, end: h } = a[c], f = r[d], g = r[h];
6564
+ if (f === g) {
6565
6565
  o.push(f);
6566
6566
  continue;
6567
6567
  }
6568
- const y = Math.abs((s - f[e]) / (p[e] - f[e])), x = l(f, p, y, i.stepped);
6568
+ const y = Math.abs((s - f[e]) / (g[e] - f[e])), x = l(f, g, y, i.stepped);
6569
6569
  x[e] = t[e], o.push(x);
6570
6570
  }
6571
6571
  return o.length === 1 ? o[0] : o;
@@ -6880,41 +6880,41 @@ function Xb(n, t, e, i, s) {
6880
6880
  const a = [], o = (e - 2) / (r - 2);
6881
6881
  let l = 0;
6882
6882
  const c = t + e - 1;
6883
- let u = t, d, h, f, p, y;
6883
+ let u = t, d, h, f, g, y;
6884
6884
  for (a[l++] = n[u], d = 0; d < r - 2; d++) {
6885
6885
  let x = 0, w = 0, M;
6886
- const D = Math.floor((d + 1) * o) + 1 + t, S = Math.min(Math.floor((d + 2) * o) + 1, e) + t, k = S - D;
6886
+ const D = Math.floor((d + 1) * o) + 1 + t, S = Math.min(Math.floor((d + 2) * o) + 1, e) + t, T = S - D;
6887
6887
  for (M = D; M < S; M++)
6888
6888
  x += n[M].x, w += n[M].y;
6889
- x /= k, w /= k;
6890
- const E = Math.floor(d * o) + 1 + t, P = Math.min(Math.floor((d + 1) * o) + 1, e) + t, { x: g, y: b } = n[u];
6891
- for (f = p = -1, M = E; M < P; M++)
6892
- p = 0.5 * Math.abs((g - x) * (n[M].y - b) - (g - n[M].x) * (w - b)), p > f && (f = p, h = n[M], y = M);
6889
+ x /= T, w /= T;
6890
+ const A = Math.floor(d * o) + 1 + t, P = Math.min(Math.floor((d + 1) * o) + 1, e) + t, { x: p, y: b } = n[u];
6891
+ for (f = g = -1, M = A; M < P; M++)
6892
+ g = 0.5 * Math.abs((p - x) * (n[M].y - b) - (p - n[M].x) * (w - b)), g > f && (f = g, h = n[M], y = M);
6893
6893
  a[l++] = h, u = y;
6894
6894
  }
6895
6895
  return a[l++] = n[c], a;
6896
6896
  }
6897
6897
  function Gb(n, t, e, i) {
6898
- let s = 0, r = 0, a, o, l, c, u, d, h, f, p, y;
6898
+ let s = 0, r = 0, a, o, l, c, u, d, h, f, g, y;
6899
6899
  const x = [], w = t + e - 1, M = n[t].x, S = n[w].x - M;
6900
6900
  for (a = t; a < t + e; ++a) {
6901
6901
  o = n[a], l = (o.x - M) / S * i, c = o.y;
6902
- const k = l | 0;
6903
- if (k === u)
6904
- c < p ? (p = c, d = a) : c > y && (y = c, h = a), s = (r * s + o.x) / ++r;
6902
+ const T = l | 0;
6903
+ if (T === u)
6904
+ c < g ? (g = c, d = a) : c > y && (y = c, h = a), s = (r * s + o.x) / ++r;
6905
6905
  else {
6906
- const E = a - 1;
6906
+ const A = a - 1;
6907
6907
  if (!st(d) && !st(h)) {
6908
- const P = Math.min(d, h), g = Math.max(d, h);
6909
- P !== f && P !== E && x.push({
6908
+ const P = Math.min(d, h), p = Math.max(d, h);
6909
+ P !== f && P !== A && x.push({
6910
6910
  ...n[P],
6911
6911
  x: s
6912
- }), g !== f && g !== E && x.push({
6913
- ...n[g],
6912
+ }), p !== f && p !== A && x.push({
6913
+ ...n[p],
6914
6914
  x: s
6915
6915
  });
6916
6916
  }
6917
- a > 0 && E !== f && x.push(n[E]), x.push(o), u = k, r = 0, p = y = c, d = h = f = a;
6917
+ a > 0 && A !== f && x.push(n[A]), x.push(o), u = T, r = 0, g = y = c, d = h = f = a;
6918
6918
  }
6919
6919
  }
6920
6920
  return x;
@@ -6982,18 +6982,18 @@ var Zb = {
6982
6982
  this._data = y;
6983
6983
  }
6984
6984
  }));
6985
- let p;
6985
+ let g;
6986
6986
  switch (e.algorithm) {
6987
6987
  case "lttb":
6988
- p = Xb(c, d, h, i, e);
6988
+ g = Xb(c, d, h, i, e);
6989
6989
  break;
6990
6990
  case "min-max":
6991
- p = Gb(c, d, h, i);
6991
+ g = Gb(c, d, h, i);
6992
6992
  break;
6993
6993
  default:
6994
6994
  throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`);
6995
6995
  }
6996
- s._decimated = p;
6996
+ s._decimated = g;
6997
6997
  });
6998
6998
  },
6999
6999
  destroy(n) {
@@ -7017,8 +7017,8 @@ function Qb(n, t, e) {
7017
7017
  }
7018
7018
  const d = Fh(t, u);
7019
7019
  for (const h of d) {
7020
- const f = nl(e, r[h.start], r[h.end], h.loop), p = Nh(o, s, f);
7021
- for (const y of p)
7020
+ const f = nl(e, r[h.start], r[h.end], h.loop), g = Nh(o, s, f);
7021
+ for (const y of g)
7022
7022
  a.push({
7023
7023
  source: y,
7024
7024
  target: h,
@@ -7302,15 +7302,15 @@ function Su(n, t) {
7302
7302
  for (const { source: l, target: c, start: u, end: d } of o) {
7303
7303
  const { style: { backgroundColor: h = r } = {} } = l, f = i !== !0;
7304
7304
  n.save(), n.fillStyle = h, m0(n, a, f && nl(s, u, d)), n.beginPath();
7305
- const p = !!e.pathSegment(n, l);
7305
+ const g = !!e.pathSegment(n, l);
7306
7306
  let y;
7307
7307
  if (f) {
7308
- p ? n.closePath() : Du(n, i, d, s);
7308
+ g ? n.closePath() : Du(n, i, d, s);
7309
7309
  const x = !!i.pathSegment(n, c, {
7310
- move: p,
7310
+ move: g,
7311
7311
  reverse: !0
7312
7312
  });
7313
- y = p && x, y || Du(n, i, u, s);
7313
+ y = g && x, y || Du(n, i, u, s);
7314
7314
  }
7315
7315
  n.closePath(), n.fill(y ? "evenodd" : "nonzero"), n.restore();
7316
7316
  }
@@ -7408,8 +7408,8 @@ class Tu extends oe {
7408
7408
  let d = t;
7409
7409
  r.textAlign = "left", r.textBaseline = "middle";
7410
7410
  let h = -1, f = -u;
7411
- return this.legendItems.forEach((p, y) => {
7412
- const x = i + e / 2 + r.measureText(p.text).width;
7411
+ return this.legendItems.forEach((g, y) => {
7412
+ const x = i + e / 2 + r.measureText(g.text).width;
7413
7413
  (y === 0 || c[c.length - 1] + x + 2 * o > a) && (d += u, c[c.length - (y > 0 ? 0 : 1)] = 0, f += u, h++), l[y] = {
7414
7414
  left: 0,
7415
7415
  top: f,
@@ -7421,14 +7421,14 @@ class Tu extends oe {
7421
7421
  }
7422
7422
  _fitCols(t, e, i, s) {
7423
7423
  const { ctx: r, maxHeight: a, options: { labels: { padding: o } } } = this, l = this.legendHitBoxes = [], c = this.columnSizes = [], u = a - t;
7424
- let d = o, h = 0, f = 0, p = 0, y = 0;
7424
+ let d = o, h = 0, f = 0, g = 0, y = 0;
7425
7425
  return this.legendItems.forEach((x, w) => {
7426
7426
  const { itemWidth: M, itemHeight: D } = _0(i, e, r, x, s);
7427
7427
  w > 0 && f + D + 2 * o > u && (d += h + o, c.push({
7428
7428
  width: h,
7429
7429
  height: f
7430
- }), p += h + o, y++, h = f = 0), l[w] = {
7431
- left: p,
7430
+ }), g += h + o, y++, h = f = 0), l[w] = {
7431
+ left: g,
7432
7432
  top: f,
7433
7433
  col: y,
7434
7434
  width: M,
@@ -7466,34 +7466,34 @@ class Tu extends oe {
7466
7466
  const { options: t, columnSizes: e, lineWidths: i, ctx: s } = this, { align: r, labels: a } = t, o = Nt.color, l = Bi(t.rtl, this.left, this.width), c = Ht(a.font), { padding: u } = a, d = c.size, h = d / 2;
7467
7467
  let f;
7468
7468
  this.drawTitle(), s.textAlign = l.textAlign("left"), s.textBaseline = "middle", s.lineWidth = 0.5, s.font = c.string;
7469
- const { boxWidth: p, boxHeight: y, itemHeight: x } = ku(a, d), w = function(E, P, g) {
7470
- if (isNaN(p) || p <= 0 || isNaN(y) || y < 0)
7469
+ const { boxWidth: g, boxHeight: y, itemHeight: x } = ku(a, d), w = function(A, P, p) {
7470
+ if (isNaN(g) || g <= 0 || isNaN(y) || y < 0)
7471
7471
  return;
7472
7472
  s.save();
7473
- const b = it(g.lineWidth, 1);
7474
- if (s.fillStyle = it(g.fillStyle, o), s.lineCap = it(g.lineCap, "butt"), s.lineDashOffset = it(g.lineDashOffset, 0), s.lineJoin = it(g.lineJoin, "miter"), s.lineWidth = b, s.strokeStyle = it(g.strokeStyle, o), s.setLineDash(it(g.lineDash, [])), a.usePointStyle) {
7475
- const T = {
7473
+ const b = it(p.lineWidth, 1);
7474
+ if (s.fillStyle = it(p.fillStyle, o), s.lineCap = it(p.lineCap, "butt"), s.lineDashOffset = it(p.lineDashOffset, 0), s.lineJoin = it(p.lineJoin, "miter"), s.lineWidth = b, s.strokeStyle = it(p.strokeStyle, o), s.setLineDash(it(p.lineDash, [])), a.usePointStyle) {
7475
+ const k = {
7476
7476
  radius: y * Math.SQRT2 / 2,
7477
- pointStyle: g.pointStyle,
7478
- rotation: g.rotation,
7477
+ pointStyle: p.pointStyle,
7478
+ rotation: p.rotation,
7479
7479
  borderWidth: b
7480
- }, A = l.xPlus(E, p / 2), R = P + h;
7481
- Dh(s, T, A, R, a.pointStyleWidth && p);
7480
+ }, E = l.xPlus(A, g / 2), R = P + h;
7481
+ Dh(s, k, E, R, a.pointStyleWidth && g);
7482
7482
  } else {
7483
- const T = P + Math.max((d - y) / 2, 0), A = l.leftForLtr(E, p), R = qn(g.borderRadius);
7483
+ const k = P + Math.max((d - y) / 2, 0), E = l.leftForLtr(A, g), R = qn(p.borderRadius);
7484
7484
  s.beginPath(), Object.values(R).some((I) => I !== 0) ? $i(s, {
7485
- x: A,
7486
- y: T,
7487
- w: p,
7485
+ x: E,
7486
+ y: k,
7487
+ w: g,
7488
7488
  h: y,
7489
7489
  radius: R
7490
- }) : s.rect(A, T, p, y), s.fill(), b !== 0 && s.stroke();
7490
+ }) : s.rect(E, k, g, y), s.fill(), b !== 0 && s.stroke();
7491
7491
  }
7492
7492
  s.restore();
7493
- }, M = function(E, P, g) {
7494
- pi(s, g.text, E, P + x / 2, c, {
7495
- strikethrough: g.hidden,
7496
- textAlign: l.textAlign(g.textAlign)
7493
+ }, M = function(A, P, p) {
7494
+ pi(s, p.text, A, P + x / 2, c, {
7495
+ strikethrough: p.hidden,
7496
+ textAlign: l.textAlign(p.textAlign)
7497
7497
  });
7498
7498
  }, D = this.isHorizontal(), S = this._computeTitleHeight();
7499
7499
  D ? f = {
@@ -7505,20 +7505,20 @@ class Tu extends oe {
7505
7505
  y: pe(r, this.top + S + u, this.bottom - e[0].height),
7506
7506
  line: 0
7507
7507
  }, Rh(this.ctx, t.textDirection);
7508
- const k = x + u;
7509
- this.legendItems.forEach((E, P) => {
7510
- s.strokeStyle = E.fontColor, s.fillStyle = E.fontColor;
7511
- const g = s.measureText(E.text).width, b = l.textAlign(E.textAlign || (E.textAlign = a.textAlign)), T = p + h + g;
7512
- let A = f.x, R = f.y;
7513
- l.setWidth(this.width), D ? P > 0 && A + T + u > this.right && (R = f.y += k, f.line++, A = f.x = pe(r, this.left + u, this.right - i[f.line])) : P > 0 && R + k > this.bottom && (A = f.x = A + e[f.line].width + u, f.line++, R = f.y = pe(r, this.top + S + u, this.bottom - e[f.line].height));
7514
- const I = l.x(A);
7515
- if (w(I, R, E), A = Bp(b, A + p + h, D ? A + T : this.right, t.rtl), M(l.x(A), R, E), D)
7516
- f.x += T + u;
7517
- else if (typeof E.text != "string") {
7508
+ const T = x + u;
7509
+ this.legendItems.forEach((A, P) => {
7510
+ s.strokeStyle = A.fontColor, s.fillStyle = A.fontColor;
7511
+ const p = s.measureText(A.text).width, b = l.textAlign(A.textAlign || (A.textAlign = a.textAlign)), k = g + h + p;
7512
+ let E = f.x, R = f.y;
7513
+ l.setWidth(this.width), D ? P > 0 && E + k + u > this.right && (R = f.y += T, f.line++, E = f.x = pe(r, this.left + u, this.right - i[f.line])) : P > 0 && R + T > this.bottom && (E = f.x = E + e[f.line].width + u, f.line++, R = f.y = pe(r, this.top + S + u, this.bottom - e[f.line].height));
7514
+ const I = l.x(E);
7515
+ if (w(I, R, A), E = Bp(b, E + g + h, D ? E + k : this.right, t.rtl), M(l.x(E), R, A), D)
7516
+ f.x += k + u;
7517
+ else if (typeof A.text != "string") {
7518
7518
  const z = c.lineHeight;
7519
- f.y += rf(E, z) + u;
7519
+ f.y += rf(A, z) + u;
7520
7520
  } else
7521
- f.y += k;
7521
+ f.y += T;
7522
7522
  }), Lh(this.ctx, t.textDirection);
7523
7523
  }
7524
7524
  drawTitle() {
@@ -7530,8 +7530,8 @@ class Tu extends oe {
7530
7530
  if (this.isHorizontal())
7531
7531
  h = Math.max(...this.lineWidths), u = this.top + c, d = pe(t.align, d, this.right - h);
7532
7532
  else {
7533
- const p = this.columnSizes.reduce((y, x) => Math.max(y, x.height), 0);
7534
- u = c + pe(t.align, this.top, this.bottom - p - t.labels.padding - this._computeTitleHeight());
7533
+ const g = this.columnSizes.reduce((y, x) => Math.max(y, x.height), 0);
7534
+ u = c + pe(t.align, this.top, this.bottom - g - t.labels.padding - this._computeTitleHeight());
7535
7535
  }
7536
7536
  const f = pe(o, d, d + h);
7537
7537
  a.textAlign = r.textAlign(Fl(o)), a.textBaseline = "middle", a.strokeStyle = e.color, a.fillStyle = e.color, a.font = i.string, pi(a, e.text, f, u, i);
@@ -7869,8 +7869,8 @@ function T0(n, t) {
7869
7869
  };
7870
7870
  }
7871
7871
  function Cu(n, t) {
7872
- const e = n.chart.ctx, { body: i, footer: s, title: r } = n, { boxWidth: a, boxHeight: o } = t, l = Ht(t.bodyFont), c = Ht(t.titleFont), u = Ht(t.footerFont), d = r.length, h = s.length, f = i.length, p = Qt(t.padding);
7873
- let y = p.height, x = 0, w = i.reduce((S, k) => S + k.before.length + k.lines.length + k.after.length, 0);
7872
+ const e = n.chart.ctx, { body: i, footer: s, title: r } = n, { boxWidth: a, boxHeight: o } = t, l = Ht(t.bodyFont), c = Ht(t.titleFont), u = Ht(t.footerFont), d = r.length, h = s.length, f = i.length, g = Qt(t.padding);
7873
+ let y = g.height, x = 0, w = i.reduce((S, T) => S + T.before.length + T.lines.length + T.after.length, 0);
7874
7874
  if (w += n.beforeBody.length + n.afterBody.length, d && (y += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), w) {
7875
7875
  const S = t.displayColors ? Math.max(o, l.lineHeight) : l.lineHeight;
7876
7876
  y += f * S + (w - f) * l.lineHeight + (w - 1) * t.bodySpacing;
@@ -7882,7 +7882,7 @@ function Cu(n, t) {
7882
7882
  };
7883
7883
  return e.save(), e.font = c.string, Ct(n.title, D), e.font = l.string, Ct(n.beforeBody.concat(n.afterBody), D), M = t.displayColors ? a + 2 + t.boxPadding : 0, Ct(i, (S) => {
7884
7884
  Ct(S.before, D), Ct(S.lines, D), Ct(S.after, D);
7885
- }), M = 0, e.font = u.string, Ct(n.footer, D), e.restore(), x += p.width, {
7885
+ }), M = 0, e.font = u.string, Ct(n.footer, D), e.restore(), x += g.width, {
7886
7886
  width: x,
7887
7887
  height: y
7888
7888
  };
@@ -7918,10 +7918,10 @@ function A0(n, t, e) {
7918
7918
  }
7919
7919
  function Pu(n, t, e, i) {
7920
7920
  const { caretSize: s, caretPadding: r, cornerRadius: a } = n, { xAlign: o, yAlign: l } = e, c = s + r, { topLeft: u, topRight: d, bottomLeft: h, bottomRight: f } = qn(a);
7921
- let p = E0(t, o);
7921
+ let g = E0(t, o);
7922
7922
  const y = A0(t, l, c);
7923
- return l === "center" ? o === "left" ? p += c : o === "right" && (p -= c) : o === "left" ? p -= Math.max(u, h) + s : o === "right" && (p += Math.max(d, f) + s), {
7924
- x: ae(p, 0, i.width - t.width),
7923
+ return l === "center" ? o === "left" ? g += c : o === "right" && (g -= c) : o === "left" ? g -= Math.max(u, h) + s : o === "right" && (g += Math.max(d, f) + s), {
7924
+ x: ae(g, 0, i.width - t.width),
7925
7925
  y: ae(y, 0, i.height - t.height)
7926
7926
  };
7927
7927
  }
@@ -8085,15 +8085,15 @@ class il extends oe {
8085
8085
  e.lineTo(r.x1, r.y1), e.lineTo(r.x2, r.y2), e.lineTo(r.x3, r.y3);
8086
8086
  }
8087
8087
  getCaretPosition(t, e, i) {
8088
- const { xAlign: s, yAlign: r } = this, { caretSize: a, cornerRadius: o } = i, { topLeft: l, topRight: c, bottomLeft: u, bottomRight: d } = qn(o), { x: h, y: f } = t, { width: p, height: y } = e;
8089
- let x, w, M, D, S, k;
8090
- return r === "center" ? (S = f + y / 2, s === "left" ? (x = h, w = x - a, D = S + a, k = S - a) : (x = h + p, w = x + a, D = S - a, k = S + a), M = x) : (s === "left" ? w = h + Math.max(l, u) + a : s === "right" ? w = h + p - Math.max(c, d) - a : w = this.caretX, r === "top" ? (D = f, S = D - a, x = w - a, M = w + a) : (D = f + y, S = D + a, x = w + a, M = w - a), k = D), {
8088
+ const { xAlign: s, yAlign: r } = this, { caretSize: a, cornerRadius: o } = i, { topLeft: l, topRight: c, bottomLeft: u, bottomRight: d } = qn(o), { x: h, y: f } = t, { width: g, height: y } = e;
8089
+ let x, w, M, D, S, T;
8090
+ return r === "center" ? (S = f + y / 2, s === "left" ? (x = h, w = x - a, D = S + a, T = S - a) : (x = h + g, w = x + a, D = S - a, T = S + a), M = x) : (s === "left" ? w = h + Math.max(l, u) + a : s === "right" ? w = h + g - Math.max(c, d) - a : w = this.caretX, r === "top" ? (D = f, S = D - a, x = w - a, M = w + a) : (D = f + y, S = D + a, x = w + a, M = w - a), T = D), {
8091
8091
  x1: x,
8092
8092
  x2: w,
8093
8093
  x3: M,
8094
8094
  y1: D,
8095
8095
  y2: S,
8096
- y3: k
8096
+ y3: T
8097
8097
  };
8098
8098
  }
8099
8099
  drawTitle(t, e, i) {
@@ -8106,44 +8106,44 @@ class il extends oe {
8106
8106
  }
8107
8107
  }
8108
8108
  _drawColorBox(t, e, i, s, r) {
8109
- const a = this.labelColors[i], o = this.labelPointStyles[i], { boxHeight: l, boxWidth: c } = r, u = Ht(r.bodyFont), d = Wr(this, "left", r), h = s.x(d), f = l < u.lineHeight ? (u.lineHeight - l) / 2 : 0, p = e.y + f;
8109
+ const a = this.labelColors[i], o = this.labelPointStyles[i], { boxHeight: l, boxWidth: c } = r, u = Ht(r.bodyFont), d = Wr(this, "left", r), h = s.x(d), f = l < u.lineHeight ? (u.lineHeight - l) / 2 : 0, g = e.y + f;
8110
8110
  if (r.usePointStyle) {
8111
8111
  const y = {
8112
8112
  radius: Math.min(c, l) / 2,
8113
8113
  pointStyle: o.pointStyle,
8114
8114
  rotation: o.rotation,
8115
8115
  borderWidth: 1
8116
- }, x = s.leftForLtr(h, c) + c / 2, w = p + l / 2;
8116
+ }, x = s.leftForLtr(h, c) + c / 2, w = g + l / 2;
8117
8117
  t.strokeStyle = r.multiKeyBackground, t.fillStyle = r.multiKeyBackground, Go(t, y, x, w), t.strokeStyle = a.borderColor, t.fillStyle = a.backgroundColor, Go(t, y, x, w);
8118
8118
  } else {
8119
8119
  t.lineWidth = lt(a.borderWidth) ? Math.max(...Object.values(a.borderWidth)) : a.borderWidth || 1, t.strokeStyle = a.borderColor, t.setLineDash(a.borderDash || []), t.lineDashOffset = a.borderDashOffset || 0;
8120
8120
  const y = s.leftForLtr(h, c), x = s.leftForLtr(s.xPlus(h, 1), c - 2), w = qn(a.borderRadius);
8121
8121
  Object.values(w).some((M) => M !== 0) ? (t.beginPath(), t.fillStyle = r.multiKeyBackground, $i(t, {
8122
8122
  x: y,
8123
- y: p,
8123
+ y: g,
8124
8124
  w: c,
8125
8125
  h: l,
8126
8126
  radius: w
8127
8127
  }), t.fill(), t.stroke(), t.fillStyle = a.backgroundColor, t.beginPath(), $i(t, {
8128
8128
  x,
8129
- y: p + 1,
8129
+ y: g + 1,
8130
8130
  w: c - 2,
8131
8131
  h: l - 2,
8132
8132
  radius: w
8133
- }), t.fill()) : (t.fillStyle = r.multiKeyBackground, t.fillRect(y, p, c, l), t.strokeRect(y, p, c, l), t.fillStyle = a.backgroundColor, t.fillRect(x, p + 1, c - 2, l - 2));
8133
+ }), t.fill()) : (t.fillStyle = r.multiKeyBackground, t.fillRect(y, g, c, l), t.strokeRect(y, g, c, l), t.fillStyle = a.backgroundColor, t.fillRect(x, g + 1, c - 2, l - 2));
8134
8134
  }
8135
8135
  t.fillStyle = this.labelTextColors[i];
8136
8136
  }
8137
8137
  drawBody(t, e, i) {
8138
8138
  const { body: s } = this, { bodySpacing: r, bodyAlign: a, displayColors: o, boxHeight: l, boxWidth: c, boxPadding: u } = i, d = Ht(i.bodyFont);
8139
8139
  let h = d.lineHeight, f = 0;
8140
- const p = Bi(i.rtl, this.x, this.width), y = function(g) {
8141
- e.fillText(g, p.x(t.x + f), t.y + h / 2), t.y += h + r;
8142
- }, x = p.textAlign(a);
8143
- let w, M, D, S, k, E, P;
8144
- for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = Wr(this, x, i), e.fillStyle = i.bodyColor, Ct(this.beforeBody, y), f = o && x !== "right" ? a === "center" ? c / 2 + u : c + 2 + u : 0, S = 0, E = s.length; S < E; ++S) {
8145
- for (w = s[S], M = this.labelTextColors[S], e.fillStyle = M, Ct(w.before, y), D = w.lines, o && D.length && (this._drawColorBox(e, t, S, p, i), h = Math.max(d.lineHeight, l)), k = 0, P = D.length; k < P; ++k)
8146
- y(D[k]), h = d.lineHeight;
8140
+ const g = Bi(i.rtl, this.x, this.width), y = function(p) {
8141
+ e.fillText(p, g.x(t.x + f), t.y + h / 2), t.y += h + r;
8142
+ }, x = g.textAlign(a);
8143
+ let w, M, D, S, T, A, P;
8144
+ for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = Wr(this, x, i), e.fillStyle = i.bodyColor, Ct(this.beforeBody, y), f = o && x !== "right" ? a === "center" ? c / 2 + u : c + 2 + u : 0, S = 0, A = s.length; S < A; ++S) {
8145
+ for (w = s[S], M = this.labelTextColors[S], e.fillStyle = M, Ct(w.before, y), D = w.lines, o && D.length && (this._drawColorBox(e, t, S, g, i), h = Math.max(d.lineHeight, l)), T = 0, P = D.length; T < P; ++T)
8146
+ y(D[T]), h = d.lineHeight;
8147
8147
  Ct(w.after, y);
8148
8148
  }
8149
8149
  f = 0, h = d.lineHeight, Ct(this.afterBody, y), t.y -= r;
@@ -8158,8 +8158,8 @@ class il extends oe {
8158
8158
  }
8159
8159
  }
8160
8160
  drawBackground(t, e, i, s) {
8161
- const { xAlign: r, yAlign: a } = this, { x: o, y: l } = t, { width: c, height: u } = i, { topLeft: d, topRight: h, bottomLeft: f, bottomRight: p } = qn(s.cornerRadius);
8162
- e.fillStyle = s.backgroundColor, e.strokeStyle = s.borderColor, e.lineWidth = s.borderWidth, e.beginPath(), e.moveTo(o + d, l), a === "top" && this.drawCaret(t, e, i, s), e.lineTo(o + c - h, l), e.quadraticCurveTo(o + c, l, o + c, l + h), a === "center" && r === "right" && this.drawCaret(t, e, i, s), e.lineTo(o + c, l + u - p), e.quadraticCurveTo(o + c, l + u, o + c - p, l + u), a === "bottom" && this.drawCaret(t, e, i, s), e.lineTo(o + f, l + u), e.quadraticCurveTo(o, l + u, o, l + u - f), a === "center" && r === "left" && this.drawCaret(t, e, i, s), e.lineTo(o, l + d), e.quadraticCurveTo(o, l, o + d, l), e.closePath(), e.fill(), s.borderWidth > 0 && e.stroke();
8161
+ const { xAlign: r, yAlign: a } = this, { x: o, y: l } = t, { width: c, height: u } = i, { topLeft: d, topRight: h, bottomLeft: f, bottomRight: g } = qn(s.cornerRadius);
8162
+ e.fillStyle = s.backgroundColor, e.strokeStyle = s.borderColor, e.lineWidth = s.borderWidth, e.beginPath(), e.moveTo(o + d, l), a === "top" && this.drawCaret(t, e, i, s), e.lineTo(o + c - h, l), e.quadraticCurveTo(o + c, l, o + c, l + h), a === "center" && r === "right" && this.drawCaret(t, e, i, s), e.lineTo(o + c, l + u - g), e.quadraticCurveTo(o + c, l + u, o + c - g, l + u), a === "bottom" && this.drawCaret(t, e, i, s), e.lineTo(o + f, l + u), e.quadraticCurveTo(o, l + u, o, l + u - f), a === "center" && r === "left" && this.drawCaret(t, e, i, s), e.lineTo(o, l + d), e.quadraticCurveTo(o, l, o + d, l), e.closePath(), e.fill(), s.borderWidth > 0 && e.stroke();
8163
8163
  }
8164
8164
  _updateAnimationTarget(t) {
8165
8165
  const e = this.chart, i = this.$animations, s = i && i.x, r = i && i.y;
@@ -8434,9 +8434,9 @@ O(sl, "id", "category"), O(sl, "defaults", {
8434
8434
  }
8435
8435
  });
8436
8436
  function z0(n, t) {
8437
- const e = [], { bounds: s, step: r, min: a, max: o, precision: l, count: c, maxTicks: u, maxDigits: d, includeBounds: h } = n, f = r || 1, p = u - 1, { min: y, max: x } = t, w = !st(a), M = !st(o), D = !st(c), S = (x - y) / (d + 1);
8438
- let k = Cc((x - y) / p / f) * f, E, P, g, b;
8439
- if (k < 1e-14 && !w && !M)
8437
+ const e = [], { bounds: s, step: r, min: a, max: o, precision: l, count: c, maxTicks: u, maxDigits: d, includeBounds: h } = n, f = r || 1, g = u - 1, { min: y, max: x } = t, w = !st(a), M = !st(o), D = !st(c), S = (x - y) / (d + 1);
8438
+ let T = Cc((x - y) / g / f) * f, A, P, p, b;
8439
+ if (T < 1e-14 && !w && !M)
8440
8440
  return [
8441
8441
  {
8442
8442
  value: y
@@ -8445,24 +8445,24 @@ function z0(n, t) {
8445
8445
  value: x
8446
8446
  }
8447
8447
  ];
8448
- b = Math.ceil(x / k) - Math.floor(y / k), b > p && (k = Cc(b * k / p / f) * f), st(l) || (E = Math.pow(10, l), k = Math.ceil(k * E) / E), s === "ticks" ? (P = Math.floor(y / k) * k, g = Math.ceil(x / k) * k) : (P = y, g = x), w && M && r && Lp((o - a) / r, k / 1e3) ? (b = Math.round(Math.min((o - a) / k, u)), k = (o - a) / b, P = a, g = o) : D ? (P = w ? a : P, g = M ? o : g, b = c - 1, k = (g - P) / b) : (b = (g - P) / k, Rs(b, Math.round(b), k / 1e3) ? b = Math.round(b) : b = Math.ceil(b));
8449
- const T = Math.max(Oc(k), Oc(P));
8450
- E = Math.pow(10, st(l) ? T : l), P = Math.round(P * E) / E, g = Math.round(g * E) / E;
8451
- let A = 0;
8448
+ b = Math.ceil(x / T) - Math.floor(y / T), b > g && (T = Cc(b * T / g / f) * f), st(l) || (A = Math.pow(10, l), T = Math.ceil(T * A) / A), s === "ticks" ? (P = Math.floor(y / T) * T, p = Math.ceil(x / T) * T) : (P = y, p = x), w && M && r && Lp((o - a) / r, T / 1e3) ? (b = Math.round(Math.min((o - a) / T, u)), T = (o - a) / b, P = a, p = o) : D ? (P = w ? a : P, p = M ? o : p, b = c - 1, T = (p - P) / b) : (b = (p - P) / T, Rs(b, Math.round(b), T / 1e3) ? b = Math.round(b) : b = Math.ceil(b));
8449
+ const k = Math.max(Oc(T), Oc(P));
8450
+ A = Math.pow(10, st(l) ? k : l), P = Math.round(P * A) / A, p = Math.round(p * A) / A;
8451
+ let E = 0;
8452
8452
  for (w && (h && P !== a ? (e.push({
8453
8453
  value: a
8454
- }), P < a && A++, Rs(Math.round((P + A * k) * E) / E, a, Lu(a, S, n)) && A++) : P < a && A++); A < b; ++A) {
8455
- const R = Math.round((P + A * k) * E) / E;
8454
+ }), P < a && E++, Rs(Math.round((P + E * T) * A) / A, a, Lu(a, S, n)) && E++) : P < a && E++); E < b; ++E) {
8455
+ const R = Math.round((P + E * T) * A) / A;
8456
8456
  if (M && R > o)
8457
8457
  break;
8458
8458
  e.push({
8459
8459
  value: R
8460
8460
  });
8461
8461
  }
8462
- return M && h && g !== o ? e.length && Rs(e[e.length - 1].value, o, Lu(o, S, n)) ? e[e.length - 1].value = o : e.push({
8462
+ return M && h && p !== o ? e.length && Rs(e[e.length - 1].value, o, Lu(o, S, n)) ? e[e.length - 1].value = o : e.push({
8463
8463
  value: o
8464
- }) : (!M || g === o) && e.push({
8465
- value: g
8464
+ }) : (!M || p === o) && e.push({
8465
+ value: p
8466
8466
  }), e;
8467
8467
  }
8468
8468
  function Lu(n, t, { horizontal: e, minRotation: i }) {
@@ -8682,7 +8682,7 @@ function Y0(n) {
8682
8682
  s[l] = c.padding;
8683
8683
  const u = n.getPointPosition(l, n.drawingArea + s[l], o), d = Ht(c.font), h = B0(n.ctx, d, n._pointLabels[l]);
8684
8684
  i[l] = h;
8685
- const f = He(n.getIndexAngle(l) + o), p = Math.round(xa(f)), y = Fu(p, u.x, h.w, 0, 180), x = Fu(p, u.y, h.h, 90, 270);
8685
+ const f = He(n.getIndexAngle(l) + o), g = Math.round(xa(f)), y = Fu(g, u.x, h.w, 0, 180), x = Fu(g, u.y, h.h, 90, 270);
8686
8686
  j0(e, t, f, y, x);
8687
8687
  }
8688
8688
  n.setCenterPoint(t.l - e.l, e.r - t.r, t.t - e.t, e.b - t.b), n._pointLabelItems = q0(n, i, s);
@@ -8751,7 +8751,7 @@ function K0(n, t, e) {
8751
8751
  const l = qn(t.borderRadius), c = Qt(t.backdropPadding);
8752
8752
  n.fillStyle = o;
8753
8753
  const u = i - c.left, d = s - c.top, h = r - i + c.width, f = a - s + c.height;
8754
- Object.values(l).some((p) => p !== 0) ? (n.beginPath(), $i(n, {
8754
+ Object.values(l).some((g) => g !== 0) ? (n.beginPath(), $i(n, {
8755
8755
  x: u,
8756
8756
  y: d,
8757
8757
  w: h,
@@ -8888,8 +8888,8 @@ class Ps extends la {
8888
8888
  if (e.pointLabels.display && Z0(this, a), s.display && this.ticks.forEach((u, d) => {
8889
8889
  if (d !== 0 || d === 0 && this.min < 0) {
8890
8890
  l = this.getDistanceFromCenterForValue(u.value);
8891
- const h = this.getContext(d), f = s.setContext(h), p = r.setContext(h);
8892
- Q0(this, f, l, a, p);
8891
+ const h = this.getContext(d), f = s.setContext(h), g = r.setContext(h);
8892
+ Q0(this, f, l, a, g);
8893
8893
  }
8894
8894
  }), i.display) {
8895
8895
  for (t.save(), o = a - 1; o >= 0; o--) {
@@ -9135,10 +9135,10 @@ class Vs extends yi {
9135
9135
  let d = e, h, f;
9136
9136
  if (c && (d = +t.startOf(d, "isoWeek", l)), d = +t.startOf(d, c ? "day" : a), t.diff(i, e, a) > 1e5 * o)
9137
9137
  throw new Error(e + " and " + i + " are too far apart with stepSize of " + o + " " + a);
9138
- const p = s.ticks.source === "data" && this.getDataTimestamps();
9138
+ const g = s.ticks.source === "data" && this.getDataTimestamps();
9139
9139
  for (h = d, f = 0; h < i; h = +t.add(h, o, a), f++)
9140
- Bu(u, h, p);
9141
- return (h === i || s.bounds === "ticks" || f === 1) && Bu(u, h, p), Object.keys(u).sort(zu).map((y) => +y);
9140
+ Bu(u, h, g);
9141
+ return (h === i || s.bounds === "ticks" || f === 1) && Bu(u, h, g), Object.keys(u).sort(zu).map((y) => +y);
9142
9142
  }
9143
9143
  getLabelForValue(t) {
9144
9144
  const e = this._adapter, i = this.options.time;
@@ -10713,8 +10713,8 @@ function wx(n, t, e) {
10713
10713
  }
10714
10714
  const vx = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Mx = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Sx = /^'([^]*?)'?$/, Dx = /''/g, kx = /[a-zA-Z]/;
10715
10715
  function vf(n, t, e) {
10716
- var u, d, h, f, p, y, x, w;
10717
- const i = bi(), s = (e == null ? void 0 : e.locale) ?? i.locale ?? mf, r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((f = (h = i.locale) == null ? void 0 : h.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = (e == null ? void 0 : e.weekStartsOn) ?? ((y = (p = e == null ? void 0 : e.locale) == null ? void 0 : p.options) == null ? void 0 : y.weekStartsOn) ?? i.weekStartsOn ?? ((w = (x = i.locale) == null ? void 0 : x.options) == null ? void 0 : w.weekStartsOn) ?? 0, o = rt(n, e == null ? void 0 : e.in);
10716
+ var u, d, h, f, g, y, x, w;
10717
+ const i = bi(), s = (e == null ? void 0 : e.locale) ?? i.locale ?? mf, r = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((d = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((f = (h = i.locale) == null ? void 0 : h.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, a = (e == null ? void 0 : e.weekStartsOn) ?? ((y = (g = e == null ? void 0 : e.locale) == null ? void 0 : g.options) == null ? void 0 : y.weekStartsOn) ?? i.weekStartsOn ?? ((w = (x = i.locale) == null ? void 0 : x.options) == null ? void 0 : w.weekStartsOn) ?? 0, o = rt(n, e == null ? void 0 : e.in);
10718
10718
  if (!Ql(o))
10719
10719
  throw new RangeError("Invalid time value");
10720
10720
  let l = t.match(Mx).map((M) => {
@@ -11552,8 +11552,8 @@ class Kx extends Mt {
11552
11552
  }
11553
11553
  }
11554
11554
  function nc(n, t, e) {
11555
- var d, h, f, p;
11556
- const i = bi(), s = (e == null ? void 0 : e.weekStartsOn) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.weekStartsOn) ?? i.weekStartsOn ?? ((p = (f = i.locale) == null ? void 0 : f.options) == null ? void 0 : p.weekStartsOn) ?? 0, r = rt(n, e == null ? void 0 : e.in), a = r.getDay(), l = (t % 7 + 7) % 7, c = 7 - s, u = t < 0 || t > 6 ? t - (a + c) % 7 : (l + c) % 7 - (a + c) % 7;
11555
+ var d, h, f, g;
11556
+ const i = bi(), s = (e == null ? void 0 : e.weekStartsOn) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.weekStartsOn) ?? i.weekStartsOn ?? ((g = (f = i.locale) == null ? void 0 : f.options) == null ? void 0 : g.weekStartsOn) ?? 0, r = rt(n, e == null ? void 0 : e.in), a = r.getDay(), l = (t % 7 + 7) % 7, c = 7 - s, u = t < 0 || t > 6 ? t - (a + c) % 7 : (l + c) % 7 - (a + c) % 7;
11557
11557
  return Da(r, u, e);
11558
11558
  }
11559
11559
  class Zx extends Mt {
@@ -12228,43 +12228,43 @@ const mw = {
12228
12228
  T: new pw()
12229
12229
  }, yw = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bw = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, _w = /^'([^]*?)'?$/, xw = /''/g, ww = /\S/, vw = /[a-zA-Z]/;
12230
12230
  function Mw(n, t, e, i) {
12231
- var x, w, M, D, S, k, E, P;
12232
- const s = () => Ut((i == null ? void 0 : i.in) || e, NaN), r = Mf(), a = (i == null ? void 0 : i.locale) ?? r.locale ?? mf, o = (i == null ? void 0 : i.firstWeekContainsDate) ?? ((w = (x = i == null ? void 0 : i.locale) == null ? void 0 : x.options) == null ? void 0 : w.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((D = (M = r.locale) == null ? void 0 : M.options) == null ? void 0 : D.firstWeekContainsDate) ?? 1, l = (i == null ? void 0 : i.weekStartsOn) ?? ((k = (S = i == null ? void 0 : i.locale) == null ? void 0 : S.options) == null ? void 0 : k.weekStartsOn) ?? r.weekStartsOn ?? ((P = (E = r.locale) == null ? void 0 : E.options) == null ? void 0 : P.weekStartsOn) ?? 0;
12231
+ var x, w, M, D, S, T, A, P;
12232
+ const s = () => Ut((i == null ? void 0 : i.in) || e, NaN), r = Mf(), a = (i == null ? void 0 : i.locale) ?? r.locale ?? mf, o = (i == null ? void 0 : i.firstWeekContainsDate) ?? ((w = (x = i == null ? void 0 : i.locale) == null ? void 0 : x.options) == null ? void 0 : w.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((D = (M = r.locale) == null ? void 0 : M.options) == null ? void 0 : D.firstWeekContainsDate) ?? 1, l = (i == null ? void 0 : i.weekStartsOn) ?? ((T = (S = i == null ? void 0 : i.locale) == null ? void 0 : S.options) == null ? void 0 : T.weekStartsOn) ?? r.weekStartsOn ?? ((P = (A = r.locale) == null ? void 0 : A.options) == null ? void 0 : P.weekStartsOn) ?? 0;
12233
12233
  if (!t)
12234
12234
  return n ? s() : rt(e, i == null ? void 0 : i.in);
12235
12235
  const c = {
12236
12236
  firstWeekContainsDate: o,
12237
12237
  weekStartsOn: l,
12238
12238
  locale: a
12239
- }, u = [new Rx(i == null ? void 0 : i.in, e)], d = t.match(bw).map((g) => {
12240
- const b = g[0];
12239
+ }, u = [new Rx(i == null ? void 0 : i.in, e)], d = t.match(bw).map((p) => {
12240
+ const b = p[0];
12241
12241
  if (b in ul) {
12242
- const T = ul[b];
12243
- return T(g, a.formatLong);
12242
+ const k = ul[b];
12243
+ return k(p, a.formatLong);
12244
12244
  }
12245
- return g;
12245
+ return p;
12246
12246
  }).join("").match(yw), h = [];
12247
- for (let g of d) {
12248
- !(i != null && i.useAdditionalWeekYearTokens) && wf(g) && dl(g, t, n), !(i != null && i.useAdditionalDayOfYearTokens) && xf(g) && dl(g, t, n);
12249
- const b = g[0], T = mw[b];
12250
- if (T) {
12251
- const { incompatibleTokens: A } = T;
12252
- if (Array.isArray(A)) {
12247
+ for (let p of d) {
12248
+ !(i != null && i.useAdditionalWeekYearTokens) && wf(p) && dl(p, t, n), !(i != null && i.useAdditionalDayOfYearTokens) && xf(p) && dl(p, t, n);
12249
+ const b = p[0], k = mw[b];
12250
+ if (k) {
12251
+ const { incompatibleTokens: E } = k;
12252
+ if (Array.isArray(E)) {
12253
12253
  const I = h.find(
12254
- (z) => A.includes(z.token) || z.token === b
12254
+ (z) => E.includes(z.token) || z.token === b
12255
12255
  );
12256
12256
  if (I)
12257
12257
  throw new RangeError(
12258
- `The format string mustn't contain \`${I.fullToken}\` and \`${g}\` at the same time`
12258
+ `The format string mustn't contain \`${I.fullToken}\` and \`${p}\` at the same time`
12259
12259
  );
12260
- } else if (T.incompatibleTokens === "*" && h.length > 0)
12260
+ } else if (k.incompatibleTokens === "*" && h.length > 0)
12261
12261
  throw new RangeError(
12262
- `The format string mustn't contain \`${g}\` and any other token at the same time`
12262
+ `The format string mustn't contain \`${p}\` and any other token at the same time`
12263
12263
  );
12264
- h.push({ token: b, fullToken: g });
12265
- const R = T.run(
12264
+ h.push({ token: b, fullToken: p });
12265
+ const R = k.run(
12266
12266
  n,
12267
- g,
12267
+ p,
12268
12268
  a.match,
12269
12269
  c
12270
12270
  );
@@ -12276,27 +12276,27 @@ function Mw(n, t, e, i) {
12276
12276
  throw new RangeError(
12277
12277
  "Format string contains an unescaped latin alphabet character `" + b + "`"
12278
12278
  );
12279
- if (g === "''" ? g = "'" : b === "'" && (g = Sw(g)), n.indexOf(g) === 0)
12280
- n = n.slice(g.length);
12279
+ if (p === "''" ? p = "'" : b === "'" && (p = Sw(p)), n.indexOf(p) === 0)
12280
+ n = n.slice(p.length);
12281
12281
  else
12282
12282
  return s();
12283
12283
  }
12284
12284
  }
12285
12285
  if (n.length > 0 && ww.test(n))
12286
12286
  return s();
12287
- const f = u.map((g) => g.priority).sort((g, b) => b - g).filter((g, b, T) => T.indexOf(g) === b).map(
12288
- (g) => u.filter((b) => b.priority === g).sort((b, T) => T.subPriority - b.subPriority)
12289
- ).map((g) => g[0]);
12290
- let p = rt(e, i == null ? void 0 : i.in);
12291
- if (isNaN(+p)) return s();
12287
+ const f = u.map((p) => p.priority).sort((p, b) => b - p).filter((p, b, k) => k.indexOf(p) === b).map(
12288
+ (p) => u.filter((b) => b.priority === p).sort((b, k) => k.subPriority - b.subPriority)
12289
+ ).map((p) => p[0]);
12290
+ let g = rt(e, i == null ? void 0 : i.in);
12291
+ if (isNaN(+g)) return s();
12292
12292
  const y = {};
12293
- for (const g of f) {
12294
- if (!g.validate(p, c))
12293
+ for (const p of f) {
12294
+ if (!p.validate(g, c))
12295
12295
  return s();
12296
- const b = g.set(p, y, c);
12297
- Array.isArray(b) ? (p = b[0], Object.assign(y, b[1])) : p = b;
12296
+ const b = p.set(g, y, c);
12297
+ Array.isArray(b) ? (g = b[0], Object.assign(y, b[1])) : g = b;
12298
12298
  }
12299
- return p;
12299
+ return g;
12300
12300
  }
12301
12301
  function Sw(n) {
12302
12302
  return n.match(_w)[1].replace(xw, "'");
@@ -12451,18 +12451,18 @@ const ic = (n, t) => {
12451
12451
  const y = n.translateUnit(n.units, h);
12452
12452
  f = `${n.units === "usd" ? "$" : ""}${h % 1 === 0 ? hl.format(h) : hl.format(Number(h.toFixed(Kw)))} ${y}`;
12453
12453
  }
12454
- let p;
12455
- return l && u.dataset.label !== u.label ? p = u.dataset.label : c ? p = u.dataset.labels[u.dataIndex] : p = u.dataset.label, {
12454
+ let g;
12455
+ return l && u.dataset.label !== u.label ? g = u.dataset.label : c ? g = u.dataset.labels[u.dataIndex] : g = u.dataset.label, {
12456
12456
  backgroundColor: a[d].backgroundColor,
12457
12457
  borderColor: a[d].borderColor,
12458
- label: p,
12458
+ label: g,
12459
12459
  value: f,
12460
12460
  rawValue: h,
12461
12461
  isSegmentEmpty: u.dataset.isSegmentEmpty
12462
12462
  };
12463
12463
  }).sort(i), n.left = `${e.x}px`, n.top = `${e.y}px`, n.showTooltip = !0;
12464
12464
  }
12465
- }, $w = (n) => n && n.datasets && n.datasets.length, Uw = (n) => $w(n) && n.datasets.some((t) => t.data.length), qw = (n) => Uw(n) && n.datasets.some((t) => t.data.length > 1), Vw = (n) => qw(n) && n.datasets.some((t) => t.data[0] && Ql(t.data[0].x)), Xw = (n) => Vw(n) && n.datasets.some(
12465
+ }, $w = (n) => n && n.datasets && n.datasets.length, Uw = (n) => $w(n) && n.datasets.some((t) => t.data.length), qw = (n) => n.datasets.some((t) => t.data[0] && Ql(t.data[0].x)), Vw = (n) => !!Uw(n) && n.datasets.some((t) => t.data.length == 1), Xw = (n) => qw(n) && n.datasets.some(
12466
12466
  (t) => t.data[0] && t.data[0].x.toString().length >= 13
12467
12467
  ), sc = (n, t, e) => {
12468
12468
  const s = Math.min(t / 1150, 1);
@@ -13116,8 +13116,8 @@ function Hv(n) {
13116
13116
  maxRotation: 90,
13117
13117
  autoSkip: !1,
13118
13118
  font: i,
13119
- callback: function(p, y) {
13120
- return s(this, p, y);
13119
+ callback: function(g, y) {
13120
+ return s(this, g, y);
13121
13121
  }
13122
13122
  },
13123
13123
  title: {
@@ -13141,8 +13141,8 @@ function Hv(n) {
13141
13141
  },
13142
13142
  ticks: {
13143
13143
  font: i,
13144
- callback: function(p, y) {
13145
- return s(this, p, y);
13144
+ callback: function(g, y) {
13145
+ return s(this, g, y);
13146
13146
  }
13147
13147
  },
13148
13148
  title: {
@@ -13164,8 +13164,8 @@ function Hv(n) {
13164
13164
  },
13165
13165
  tooltip: {
13166
13166
  ...t,
13167
- external: (p) => {
13168
- ic(n.tooltipState, p);
13167
+ external: (g) => {
13168
+ ic(n.tooltipState, g);
13169
13169
  }
13170
13170
  }
13171
13171
  },
@@ -13223,8 +13223,8 @@ var zf = { exports: {} };
13223
13223
  if (u.separator === !1 || c < 1e3)
13224
13224
  return c.toString();
13225
13225
  var d = typeof u.separator == "string" ? u.separator : ",", h = [], f = Math.round(c).toString().split("");
13226
- return f.reverse().forEach(function(p, y) {
13227
- y && y % 3 === 0 && h.push(d), h.push(p);
13226
+ return f.reverse().forEach(function(g, y) {
13227
+ y && y % 3 === 0 && h.push(d), h.push(g);
13228
13228
  }), h.reverse().join("");
13229
13229
  }
13230
13230
  function e(c, u, d) {
@@ -14549,7 +14549,7 @@ function nM(n, t, e) {
14549
14549
  const iM = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, sM = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, rM = /^'([^]*?)'?$/, aM = /''/g, oM = /[a-zA-Z]/;
14550
14550
  function lM(n, t, e) {
14551
14551
  var i, s, r, a, o, l, c, u;
14552
- const d = ir(), h = (e == null ? void 0 : e.locale) ?? d.locale ?? j1, f = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (i = e == null ? void 0 : e.locale) == null ? void 0 : i.options) == null ? void 0 : s.firstWeekContainsDate) ?? d.firstWeekContainsDate ?? ((a = (r = d.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, p = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : l.weekStartsOn) ?? d.weekStartsOn ?? ((u = (c = d.locale) == null ? void 0 : c.options) == null ? void 0 : u.weekStartsOn) ?? 0, y = ve(n, e == null ? void 0 : e.in);
14552
+ const d = ir(), h = (e == null ? void 0 : e.locale) ?? d.locale ?? j1, f = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (i = e == null ? void 0 : e.locale) == null ? void 0 : i.options) == null ? void 0 : s.firstWeekContainsDate) ?? d.firstWeekContainsDate ?? ((a = (r = d.locale) == null ? void 0 : r.options) == null ? void 0 : a.firstWeekContainsDate) ?? 1, g = (e == null ? void 0 : e.weekStartsOn) ?? ((l = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : l.weekStartsOn) ?? d.weekStartsOn ?? ((u = (c = d.locale) == null ? void 0 : c.options) == null ? void 0 : u.weekStartsOn) ?? 0, y = ve(n, e == null ? void 0 : e.in);
14553
14553
  if (!c1(y))
14554
14554
  throw new RangeError("Invalid time value");
14555
14555
  let x = t.match(sM).map((M) => {
@@ -14576,7 +14576,7 @@ function lM(n, t, e) {
14576
14576
  h.localize.preprocessor && (x = h.localize.preprocessor(y, x));
14577
14577
  const w = {
14578
14578
  firstWeekContainsDate: f,
14579
- weekStartsOn: p,
14579
+ weekStartsOn: g,
14580
14580
  locale: h
14581
14581
  };
14582
14582
  return x.map((M) => {
@@ -15090,8 +15090,8 @@ function Yo(n) {
15090
15090
  var jr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ma = { exports: {} };
15091
15091
  ma.exports;
15092
15092
  (function(n, t) {
15093
- var e = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, r = "[object Arguments]", a = "[object Array]", o = "[object Boolean]", l = "[object Date]", c = "[object Error]", u = "[object Function]", d = "[object GeneratorFunction]", h = "[object Map]", f = "[object Number]", p = "[object Object]", y = "[object Promise]", x = "[object RegExp]", w = "[object Set]", M = "[object String]", D = "[object Symbol]", S = "[object WeakMap]", k = "[object ArrayBuffer]", E = "[object DataView]", P = "[object Float32Array]", g = "[object Float64Array]", b = "[object Int8Array]", T = "[object Int16Array]", A = "[object Int32Array]", R = "[object Uint8Array]", I = "[object Uint8ClampedArray]", z = "[object Uint16Array]", G = "[object Uint32Array]", q = /[\\^$.*+?()[\]{}|]/g, H = /\w*$/, ut = /^\[object .+?Constructor\]$/, B = /^(?:0|[1-9]\d*)$/, et = {};
15094
- et[r] = et[a] = et[k] = et[E] = et[o] = et[l] = et[P] = et[g] = et[b] = et[T] = et[A] = et[h] = et[f] = et[p] = et[x] = et[w] = et[M] = et[D] = et[R] = et[I] = et[z] = et[G] = !0, et[c] = et[u] = et[S] = !1;
15093
+ var e = 200, i = "__lodash_hash_undefined__", s = 9007199254740991, r = "[object Arguments]", a = "[object Array]", o = "[object Boolean]", l = "[object Date]", c = "[object Error]", u = "[object Function]", d = "[object GeneratorFunction]", h = "[object Map]", f = "[object Number]", g = "[object Object]", y = "[object Promise]", x = "[object RegExp]", w = "[object Set]", M = "[object String]", D = "[object Symbol]", S = "[object WeakMap]", T = "[object ArrayBuffer]", A = "[object DataView]", P = "[object Float32Array]", p = "[object Float64Array]", b = "[object Int8Array]", k = "[object Int16Array]", E = "[object Int32Array]", R = "[object Uint8Array]", I = "[object Uint8ClampedArray]", z = "[object Uint16Array]", G = "[object Uint32Array]", q = /[\\^$.*+?()[\]{}|]/g, H = /\w*$/, ut = /^\[object .+?Constructor\]$/, B = /^(?:0|[1-9]\d*)$/, et = {};
15094
+ et[r] = et[a] = et[T] = et[A] = et[o] = et[l] = et[P] = et[p] = et[b] = et[k] = et[E] = et[h] = et[f] = et[g] = et[x] = et[w] = et[M] = et[D] = et[R] = et[I] = et[z] = et[G] = !0, et[c] = et[u] = et[S] = !1;
15095
15095
  var Pt = typeof jr == "object" && jr && jr.Object === Object && jr, $ = typeof self == "object" && self && self.Object === Object && self, F = Pt || $ || Function("return this")(), Y = t && !t.nodeType && t, X = Y && !0 && n && !n.nodeType && n, Z = X && X.exports === Y;
15096
15096
  function tt(_, C) {
15097
15097
  return _.set(C[0], C[1]), _;
@@ -15299,7 +15299,7 @@ ma.exports;
15299
15299
  var An = gn(_), Mr = An == u || An == d;
15300
15300
  if (ho(_))
15301
15301
  return Ja(_, C);
15302
- if (An == p || An == r || Mr && !re) {
15302
+ if (An == g || An == r || Mr && !re) {
15303
15303
  if (Ft(_))
15304
15304
  return re ? _ : {};
15305
15305
  if (te = oo(Mr ? {} : _), !C)
@@ -15406,12 +15406,12 @@ ma.exports;
15406
15406
  return Qa(N) ? N : void 0;
15407
15407
  }
15408
15408
  var gr = Yt ? pt(Yt, Object) : us, gn = Za;
15409
- (Mi && gn(new Mi(new ArrayBuffer(1))) != E || ti && gn(new ti()) != h || ts && gn(ts.resolve()) != y || es && gn(new es()) != w || ei && gn(new ei()) != S) && (gn = function(_) {
15410
- var C = yt.call(_), N = C == p ? _.constructor : void 0, K = N ? Te(N) : void 0;
15409
+ (Mi && gn(new Mi(new ArrayBuffer(1))) != A || ti && gn(new ti()) != h || ts && gn(ts.resolve()) != y || es && gn(new es()) != w || ei && gn(new ei()) != S) && (gn = function(_) {
15410
+ var C = yt.call(_), N = C == g ? _.constructor : void 0, K = N ? Te(N) : void 0;
15411
15411
  if (K)
15412
15412
  switch (K) {
15413
15413
  case ns:
15414
- return E;
15414
+ return A;
15415
15415
  case is:
15416
15416
  return h;
15417
15417
  case ss:
@@ -15433,18 +15433,18 @@ ma.exports;
15433
15433
  function mr(_, C, N, K) {
15434
15434
  var Gt = _.constructor;
15435
15435
  switch (C) {
15436
- case k:
15436
+ case T:
15437
15437
  return os(_);
15438
15438
  case o:
15439
15439
  case l:
15440
15440
  return new Gt(+_);
15441
- case E:
15441
+ case A:
15442
15442
  return hr(_, K);
15443
15443
  case P:
15444
- case g:
15444
+ case p:
15445
15445
  case b:
15446
- case T:
15447
- case A:
15446
+ case k:
15447
+ case E:
15448
15448
  case R:
15449
15449
  case I:
15450
15450
  case z:
@@ -15876,11 +15876,11 @@ function ZM(n) {
15876
15876
  if (!a.length || n.tooltipState.locked)
15877
15877
  return !1;
15878
15878
  const l = this.chart.canvas.getBoundingClientRect(), c = n.tooltipState.width || this.width, u = n.tooltipState.height || this.height, d = l.width / 2, h = l.height / 2, f = sc(o, c, d);
15879
- let p = Gw(o, u, h);
15879
+ let g = Gw(o, u, h);
15880
15880
  const y = o.y < h ? "top" : "bottom", x = o.x < d ? "left" : "center";
15881
- return u > l.height && (p = 0), {
15881
+ return u > l.height && (g = 0), {
15882
15882
  x: f,
15883
- y: p,
15883
+ y: g,
15884
15884
  xAlign: x,
15885
15885
  yAlign: y
15886
15886
  };
@@ -15890,48 +15890,51 @@ function ZM(n) {
15890
15890
  return Cw(a) > 24 || l.getDate() !== o.getDate();
15891
15891
  });
15892
15892
  return {
15893
- options: U(() => ({
15894
- hover: {
15895
- mode: "index",
15896
- intersect: !1
15897
- },
15898
- elements: {
15899
- point: {
15900
- radius: 0,
15901
- hitRadius: 4,
15902
- hoverRadius: 4
15903
- }
15904
- },
15905
- animation: {
15906
- duration: 250,
15907
- easing: "linear"
15908
- },
15909
- scales: {
15910
- x: t.value,
15911
- y: e.value
15912
- },
15913
- responsive: !0,
15914
- maintainAspectRatio: !1,
15915
- plugins: {
15916
- htmlLegend: {
15917
- containerID: n.legendID
15893
+ options: U(() => {
15894
+ var a;
15895
+ return {
15896
+ hover: {
15897
+ mode: "index",
15898
+ intersect: !1
15918
15899
  },
15919
- legend: {
15920
- display: !1
15900
+ elements: {
15901
+ point: {
15902
+ radius: (a = n.pointsWithoutHover) != null && a.value ? 3 : 0,
15903
+ hitRadius: 4,
15904
+ hoverRadius: 4
15905
+ }
15921
15906
  },
15922
- streaming: !1,
15923
- tooltip: {
15924
- ...i,
15925
- external: (a) => {
15926
- ic(n.tooltipState, a);
15907
+ animation: {
15908
+ duration: 250,
15909
+ easing: "linear"
15910
+ },
15911
+ scales: {
15912
+ x: t.value,
15913
+ y: e.value
15914
+ },
15915
+ responsive: !0,
15916
+ maintainAspectRatio: !1,
15917
+ plugins: {
15918
+ htmlLegend: {
15919
+ containerID: n.legendID
15920
+ },
15921
+ legend: {
15922
+ display: !1
15923
+ },
15924
+ streaming: !1,
15925
+ tooltip: {
15926
+ ...i,
15927
+ external: (o) => {
15928
+ ic(n.tooltipState, o);
15929
+ }
15927
15930
  }
15931
+ },
15932
+ interaction: {
15933
+ mode: "index",
15934
+ intersect: !1
15928
15935
  }
15929
- },
15930
- interaction: {
15931
- mode: "index",
15932
- intersect: !1
15933
- }
15934
- }))
15936
+ };
15937
+ })
15935
15938
  };
15936
15939
  }
15937
15940
  function QM(n) {
@@ -15971,17 +15974,17 @@ function JM(n, t) {
15971
15974
  const s = t.value.data, { display: r, metric_names: a } = t.value.meta, o = r && Object.keys(r), l = a && a.length > 1, c = r && o && o.length > 0;
15972
15975
  if (!s.length || !a)
15973
15976
  return { datasets: [], labels: [] };
15974
- const u = c && o || a, d = u[0], h = u.length > 1 ? u[1] : u[0], f = Object.fromEntries(l ? s.flatMap((g) => a.map((b, T) => {
15975
- const A = g.event[d], R = c ? `${A},${b}` : `${T},${b}`, I = g.event[b];
15977
+ const u = c && o || a, d = u[0], h = u.length > 1 ? u[1] : u[0], f = Object.fromEntries(l ? s.flatMap((p) => a.map((b, k) => {
15978
+ const E = p.event[d], R = c ? `${E},${b}` : `${k},${b}`, I = p.event[b];
15976
15979
  return [R, I];
15977
- })) : s.map((g) => {
15978
- const b = c ? `${g.event[d]},${g.event[h]}` : `${d},${h}`, T = g.event[a[0]];
15979
- return [b, T];
15980
- })), p = Object.keys(f).reduce((g, b) => {
15981
- const [T] = b.split(","), A = f[b];
15982
- return g[T] ? g[T] += A : g[T] = A, g;
15983
- }, {}), y = Object.entries(p).sort(([, g], [, b]) => Number(b) - Number(g)).map(([g]) => g), x = r[d], w = r[h], M = c && x && Object.entries(x).map(([g, b]) => ({ id: g, name: b.name })) || a.map((g) => ({ id: g, name: g })), D = c && w && Object.entries(w).map(([g, b]) => ({ id: g, name: b.name })) || a.map((g) => ({ id: g, name: g }));
15984
- if (d !== "status_code" && d !== "status_code_grouped" && (M.sort((g, b) => y.indexOf(g.id) - y.indexOf(b.id)), D.sort((g, b) => y.indexOf(g.id) - y.indexOf(b.id))), !M || !D)
15980
+ })) : s.map((p) => {
15981
+ const b = c ? `${p.event[d]},${p.event[h]}` : `${d},${h}`, k = p.event[a[0]];
15982
+ return [b, k];
15983
+ })), g = Object.keys(f).reduce((p, b) => {
15984
+ const [k] = b.split(","), E = f[b];
15985
+ return p[k] ? p[k] += E : p[k] = E, p;
15986
+ }, {}), y = Object.entries(g).sort(([, p], [, b]) => Number(b) - Number(p)).map(([p]) => p), x = r[d], w = r[h], M = c && x && Object.entries(x).map(([p, b]) => ({ id: p, name: b.name })) || a.map((p) => ({ id: p, name: p })), D = c && w && Object.entries(w).map(([p, b]) => ({ id: p, name: b.name })) || a.map((p) => ({ id: p, name: p }));
15987
+ if (d !== "status_code" && d !== "status_code_grouped" && (M.sort((p, b) => y.indexOf(p.id) - y.indexOf(b.id)), D.sort((p, b) => y.indexOf(p.id) - y.indexOf(b.id))), !M || !D)
15985
15988
  return { labels: [], datasets: [] };
15986
15989
  const S = QM({
15987
15990
  isMultiMetric: l,
@@ -15992,11 +15995,11 @@ function JM(n, t) {
15992
15995
  pivotRecords: f,
15993
15996
  rowLabels: M,
15994
15997
  colorPalette: n.colorPalette || Zn
15995
- }), k = c ? M.map((g) => e && e.te(`chartLabels.${g.name}`) && e.t(`chartLabels.${g.name}`) || g.name) : a.map((g) => e && e.te(`chartLabels.${g}`) && e.t(`chartLabels.${g}`) || g), E = M.map((g) => g.id === "empty");
15998
+ }), T = c ? M.map((p) => e && e.te(`chartLabels.${p.name}`) && e.t(`chartLabels.${p.name}`) || p.name) : a.map((p) => e && e.te(`chartLabels.${p}`) && e.t(`chartLabels.${p}`) || p), A = M.map((p) => p.id === "empty");
15996
15999
  return {
15997
- labels: k,
16000
+ labels: T,
15998
16001
  datasets: S,
15999
- isLabelEmpty: E
16002
+ isLabelEmpty: A
16000
16003
  };
16001
16004
  }
16002
16005
  } catch (s) {
@@ -16039,39 +16042,39 @@ function cS(n, t) {
16039
16042
  return console.error("Invalid step value:", f), { datasets: [], labels: [] };
16040
16043
  if (!s.length)
16041
16044
  return { datasets: [], labels: [] };
16042
- const p = oS(o), y = lS(o, l, f, p, s), x = /* @__PURE__ */ new Set(), w = s != null && s.length ? s.reduce((S, k) => {
16043
- const E = new Date(k.timestamp).valueOf(), P = k.event;
16044
- for (const g of a)
16045
- x.add(g), E in S || (S[E] = {}), g in S[E] || (S[E][g] = {});
16046
- for (const g of a)
16045
+ const g = oS(o), y = lS(o, l, f, g, s), x = /* @__PURE__ */ new Set(), w = s != null && s.length ? s.reduce((S, T) => {
16046
+ const A = new Date(T.timestamp).valueOf(), P = T.event;
16047
+ for (const p of a)
16048
+ x.add(p), A in S || (S[A] = {}), p in S[A] || (S[A][p] = {});
16049
+ for (const p of a)
16047
16050
  h.forEach((b) => {
16048
- P[u] === b.id || g === b.id ? (S[E][g] || (S[E][g] = {}), S[E][g][b.name] = Math.round(Number(P[g]) * 1e3) / 1e3) : c.length || (S[E][g] || (S[E][g] = {}), S[E][g][b.name] = Math.round(Number(P[b.id]) * 1e3) / 1e3);
16051
+ P[u] === b.id || p === b.id ? (S[A][p] || (S[A][p] = {}), S[A][p][b.name] = Math.round(Number(P[p]) * 1e3) / 1e3) : c.length || (S[A][p] || (S[A][p] = {}), S[A][p][b.name] = Math.round(Number(P[b.id]) * 1e3) / 1e3);
16049
16052
  });
16050
16053
  return S;
16051
- }, {}) : {}, D = [...a.length === 1 ? a.flatMap((S) => h.map((k) => [S, k.name, k.id === "empty"])) : h.map((S) => [S.name, S.name, S.id === "empty"])].map(([S, k, E], P) => {
16052
- const g = y.map((R) => R in w && S in w[R] ? { x: R, y: w[R][S][k] || 0 } : { x: R, y: 0 });
16053
- let { colorPalette: b, fill: T } = n;
16054
+ }, {}) : {}, D = [...a.length === 1 ? a.flatMap((S) => h.map((T) => [S, T.name, T.id === "empty"])) : h.map((S) => [S.name, S.name, S.id === "empty"])].map(([S, T, A], P) => {
16055
+ const p = y.map((R) => R in w && S in w[R] ? { x: R, y: w[R][S][T] || 0 } : { x: R, y: 0 });
16056
+ let { colorPalette: b, fill: k } = n;
16054
16057
  st(b) && (b = Zn);
16055
- const A = Af(P, k, E, b);
16058
+ const E = Af(P, T, A, b);
16056
16059
  return {
16057
- rawDimension: k,
16060
+ rawDimension: T,
16058
16061
  rawMetric: S,
16059
16062
  // @ts-ignore - dynamic i18n key
16060
- label: e && e.te(`chartLabels.${k}`) && e.t(`chartLabels.${k}`) || k,
16061
- borderColor: A,
16062
- backgroundColor: A,
16063
- data: g,
16064
- total: g.reduce((R, { y: I }) => R + Number(I), 0),
16063
+ label: e && e.te(`chartLabels.${T}`) && e.t(`chartLabels.${T}`) || T,
16064
+ borderColor: E,
16065
+ backgroundColor: E,
16066
+ data: p,
16067
+ total: p.reduce((R, { y: I }) => R + Number(I), 0),
16065
16068
  ...iv,
16066
- fill: T,
16067
- borderWidth: T ? rv : sv,
16068
- isSegmentEmpty: E
16069
+ fill: k,
16070
+ borderWidth: k ? rv : sv,
16071
+ isSegmentEmpty: A
16069
16072
  };
16070
16073
  });
16071
- if (u === "status_code" || u === "status_code_grouped" ? D.sort((S, k) => (S.label ?? "") < (k.label ?? "") ? -1 : 1) : D.sort((S, k) => Number(S.total) < Number(k.total) ? -1 : 1), n.threshold)
16074
+ if (u === "status_code" || u === "status_code_grouped" ? D.sort((S, T) => (S.label ?? "") < (T.label ?? "") ? -1 : 1) : D.sort((S, T) => Number(S.total) < Number(T.total) ? -1 : 1), n.threshold)
16072
16075
  for (const S of Object.keys(n.threshold)) {
16073
- const k = n.threshold[S];
16074
- k && D.push({
16076
+ const T = n.threshold[S];
16077
+ T && D.push({
16075
16078
  type: "line",
16076
16079
  rawMetric: S,
16077
16080
  isThreshold: !0,
@@ -16084,7 +16087,7 @@ function cS(n, t) {
16084
16087
  // Display above all other datasets
16085
16088
  stack: "custom",
16086
16089
  // Never stack this dataset
16087
- data: y.map((E) => ({ x: E, y: k }))
16090
+ data: y.map((A) => ({ x: A, y: T }))
16088
16091
  });
16089
16092
  }
16090
16093
  return {
@@ -16500,15 +16503,15 @@ function zS(n, t) {
16500
16503
  return lg.includes(e) ? e : HS(n, t);
16501
16504
  }
16502
16505
  function HS(n, t) {
16503
- const { x: e, y: i, x2: s, y2: r, width: a, height: o, pointX: l, pointY: c, centerX: u, centerY: d, rotation: h } = n, f = { x: u, y: d }, p = t.start, y = Qn(a, p), x = Qn(o, p), w = [e, e + y, e + y, s], M = [i + x, r, i, r], D = [];
16506
+ const { x: e, y: i, x2: s, y2: r, width: a, height: o, pointX: l, pointY: c, centerX: u, centerY: d, rotation: h } = n, f = { x: u, y: d }, g = t.start, y = Qn(a, g), x = Qn(o, g), w = [e, e + y, e + y, s], M = [i + x, r, i, r], D = [];
16504
16507
  for (let S = 0; S < 4; S++) {
16505
- const k = xi({ x: w[S], y: M[S] }, f, Zt(h));
16508
+ const T = xi({ x: w[S], y: M[S] }, f, Zt(h));
16506
16509
  D.push({
16507
16510
  position: lg[S],
16508
- distance: ji(k, { x: l, y: c })
16511
+ distance: ji(T, { x: l, y: c })
16509
16512
  });
16510
16513
  }
16511
- return D.sort((S, k) => S.distance - k.distance)[0].position;
16514
+ return D.sort((S, T) => S.distance - T.distance)[0].position;
16512
16515
  }
16513
16516
  function WS(n, t, e) {
16514
16517
  const { pointX: i, pointY: s } = n, r = t.margin;
@@ -16960,7 +16963,7 @@ function oD({ chartArea: n }, t, e) {
16960
16963
  }, f = {
16961
16964
  x: (h.left + h.right) / 2,
16962
16965
  y: (h.top + h.bottom) / 2
16963
- }, p = t.spacing + t.borderWidth / 2, y = o - p, x = f.y > d, w = x ? s + p : a - p, M = cD(w, u, d, y);
16966
+ }, g = t.spacing + t.borderWidth / 2, y = o - g, x = f.y > d, w = x ? s + g : a - g, M = cD(w, u, d, y);
16964
16967
  return {
16965
16968
  controllerMeta: {
16966
16969
  _centerX: u,
@@ -17273,8 +17276,8 @@ function pD(n, t, e) {
17273
17276
  }
17274
17277
  function mD(n, { mouseX: t, mouseY: e }, i = di, s) {
17275
17278
  const { x: r, y: a, x2: o, y2: l } = n.getProps(["x", "y", "x2", "y2"], s), c = o - r, u = l - a, d = Es(c) + Es(u), h = d === 0 ? -1 : ((t - r) * c + (e - a) * u) / d;
17276
- let f, p;
17277
- return h < 0 ? (f = r, p = a) : h > 1 ? (f = o, p = l) : (f = r + h * c, p = a + h * u), Es(t - f) + Es(e - p) <= i;
17279
+ let f, g;
17280
+ return h < 0 ? (f = r, g = a) : h > 1 ? (f = o, g = l) : (f = r + h * c, g = a + h * u), Es(t - f) + Es(e - g) <= i;
17278
17281
  }
17279
17282
  function wl(n, { mouseX: t, mouseY: e }, i, s) {
17280
17283
  const r = n.label;
@@ -17289,7 +17292,7 @@ function bD(n) {
17289
17292
  return r > gt / 2 ? r - gt : r < gt / -2 ? r + gt : r;
17290
17293
  }
17291
17294
  function _D(n, t, e, i) {
17292
- const { width: s, height: r, padding: a } = e, { xAdjust: o, yAdjust: l } = t, c = { x: n.x, y: n.y }, u = { x: n.x2, y: n.y2 }, d = t.rotation === "auto" ? bD(n) : Zt(t.rotation), h = xD(s, r, d), f = wD(n, t, { labelSize: h, padding: a }, i), p = n.cp ? xl(c, n.cp, u, f) : fc(c, u, f), y = { size: h.w, min: i.left, max: i.right, padding: a.left }, x = { size: h.h, min: i.top, max: i.bottom, padding: a.top }, w = Vd(p.x, y) + o, M = Vd(p.y, x) + l;
17295
+ const { width: s, height: r, padding: a } = e, { xAdjust: o, yAdjust: l } = t, c = { x: n.x, y: n.y }, u = { x: n.x2, y: n.y2 }, d = t.rotation === "auto" ? bD(n) : Zt(t.rotation), h = xD(s, r, d), f = wD(n, t, { labelSize: h, padding: a }, i), g = n.cp ? xl(c, n.cp, u, f) : fc(c, u, f), y = { size: h.w, min: i.left, max: i.right, padding: a.left }, x = { size: h.h, min: i.top, max: i.bottom, padding: a.top }, w = Vd(g.x, y) + o, M = Vd(g.y, x) + l;
17293
17296
  return {
17294
17297
  x: w - s / 2,
17295
17298
  y: M - r / 2,
@@ -17297,8 +17300,8 @@ function _D(n, t, e, i) {
17297
17300
  y2: M + r / 2,
17298
17301
  centerX: w,
17299
17302
  centerY: M,
17300
- pointX: p.x,
17301
- pointY: p.y,
17303
+ pointX: g.x,
17304
+ pointY: g.y,
17302
17305
  width: s,
17303
17306
  height: r,
17304
17307
  rotation: xa(d)
@@ -17365,7 +17368,7 @@ function Gd(n, { x: t, y: e }, { angle: i, adjust: s }, r) {
17365
17368
  !r || !r.display || (n.save(), n.translate(t, e), n.rotate(i), vl(n, 0, -s, r), n.restore());
17366
17369
  }
17367
17370
  function SD(n, t, e, i) {
17368
- const { x: s, y: r, x2: a, y2: o, options: l } = t, { startOpts: c, endOpts: u, startAdjust: d, endAdjust: h } = pg(t), f = { x: s, y: r }, p = { x: a, y: o }, y = jd(f, e, p, 0), x = jd(f, e, p, 1) - gt, w = xl(f, e, p, d / i), M = xl(f, e, p, 1 - h / i), D = new Path2D();
17371
+ const { x: s, y: r, x2: a, y2: o, options: l } = t, { startOpts: c, endOpts: u, startAdjust: d, endAdjust: h } = pg(t), f = { x: s, y: r }, g = { x: a, y: o }, y = jd(f, e, g, 0), x = jd(f, e, g, 1) - gt, w = xl(f, e, g, d / i), M = xl(f, e, g, 1 - h / i), D = new Path2D();
17369
17372
  n.beginPath(), D.moveTo(w.x, w.y), D.quadraticCurveTo(e.x, e.y, M.x, M.y), n.shadowColor = l.borderShadowColor, n.stroke(D), t.path = D, t.ctx = n, Gd(n, w, { angle: y, adjust: d }, c), Gd(n, M, { angle: x, adjust: h }, u);
17370
17373
  }
17371
17374
  class or extends oe {
@@ -17429,8 +17432,8 @@ function DD(n, t, e, i) {
17429
17432
  const { width: s, height: r, centerX: a, centerY: o } = t, l = s / 2, c = r / 2;
17430
17433
  if (l <= 0 || c <= 0)
17431
17434
  return !1;
17432
- const u = Zt(e || 0), d = Math.cos(u), h = Math.sin(u), f = Math.pow(d * (n.x - a) + h * (n.y - o), 2), p = Math.pow(h * (n.x - a) - d * (n.y - o), 2);
17433
- return f / Math.pow(l + i, 2) + p / Math.pow(c + i, 2) <= 1.0001;
17435
+ const u = Zt(e || 0), d = Math.cos(u), h = Math.sin(u), f = Math.pow(d * (n.x - a) + h * (n.y - o), 2), g = Math.pow(h * (n.x - a) - d * (n.y - o), 2);
17436
+ return f / Math.pow(l + i, 2) + g / Math.pow(c + i, 2) <= 1.0001;
17434
17437
  }
17435
17438
  class Ea extends oe {
17436
17439
  inRange(t, e, i, s) {
@@ -17861,8 +17864,8 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17861
17864
  const e = t, i = n, s = dt(null), r = dt(!1), a = dt({ x: 0, y: 0 }), o = dt({ x: 0, y: 0 }), l = dt({ left: i.left, top: i.top });
17862
17865
  Le(s, (f) => {
17863
17866
  if (f) {
17864
- const { width: p, height: y } = f.getBoundingClientRect();
17865
- e("dimensions", { width: p, height: y });
17867
+ const { width: g, height: y } = f.getBoundingClientRect();
17868
+ e("dimensions", { width: g, height: y });
17866
17869
  }
17867
17870
  }), Le(() => i.locked, (f) => {
17868
17871
  f ? (l.value.left = i.left, l.value.top = i.top) : f === !1 && (e("top", l.value.top), e("left", l.value.left));
@@ -17870,21 +17873,21 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17870
17873
  function c(f) {
17871
17874
  if (s.value) {
17872
17875
  r.value = !0;
17873
- const p = window.getComputedStyle(s.value), y = p.transform || p.webkitTransform || p.mozTransform, x = new DOMMatrix(y), w = x.m41, M = x.m42;
17876
+ const g = window.getComputedStyle(s.value), y = g.transform || g.webkitTransform || g.mozTransform, x = new DOMMatrix(y), w = x.m41, M = x.m42;
17874
17877
  a.value = { x: w, y: M }, o.value = { x: f.clientX, y: f.clientY }, window.addEventListener("mousemove", d), window.addEventListener("mouseup", h);
17875
17878
  }
17876
17879
  }
17877
17880
  let u = null;
17878
17881
  function d(f) {
17879
17882
  f.preventDefault(), f.stopPropagation(), r.value && (u !== null && window.cancelAnimationFrame(u), u = window.requestAnimationFrame(() => {
17880
- const p = f.clientX - o.value.x, y = f.clientY - o.value.y;
17881
- l.value.left = `${a.value.x + p}px`, l.value.top = `${a.value.y + y}px`;
17883
+ const g = f.clientX - o.value.x, y = f.clientY - o.value.y;
17884
+ l.value.left = `${a.value.x + g}px`, l.value.top = `${a.value.y + y}px`;
17882
17885
  }));
17883
17886
  }
17884
17887
  function h() {
17885
17888
  r.value = !1, u !== null && window.cancelAnimationFrame(u), window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", h);
17886
17889
  }
17887
- return (f, p) => n.showTooltip ? (nt(), _t("div", {
17890
+ return (f, g) => n.showTooltip ? (nt(), _t("div", {
17888
17891
  key: 0,
17889
17892
  ref_key: "tooltipEl",
17890
17893
  ref: s,
@@ -17955,9 +17958,9 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17955
17958
  const S = i.value;
17956
17959
  if (!S || !s.value || S.children.length === 0)
17957
17960
  return 0;
17958
- const k = S.children[0].getBoundingClientRect().top;
17959
- for (const E of s.value)
17960
- if (E.getBoundingClientRect().top > k)
17961
+ const T = S.children[0].getBoundingClientRect().top;
17962
+ for (const A of s.value)
17963
+ if (A.getBoundingClientRect().top > T)
17961
17964
  return !0;
17962
17965
  return !1;
17963
17966
  }, u = U(() => t.items.length > 2 || a.value === $t.Right), d = () => {
@@ -17965,12 +17968,12 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17965
17968
  }, h = () => {
17966
17969
  if (i.value && a.value === $t.Bottom) {
17967
17970
  let S = 0;
17968
- s.value.forEach((E) => {
17969
- const P = Array.from(E.children).reduce((g, b) => g + b.offsetWidth, 0);
17971
+ s.value.forEach((A) => {
17972
+ const P = Array.from(A.children).reduce((p, b) => p + b.offsetWidth, 0);
17970
17973
  P > S && (S = P);
17971
17974
  });
17972
- const k = parseInt(sS, 10);
17973
- i.value.style.gridTemplateColumns = `repeat(auto-fit, ${S + k}px)`;
17975
+ const T = parseInt(sS, 10);
17976
+ i.value.style.gridTemplateColumns = `repeat(auto-fit, ${S + T}px)`;
17974
17977
  }
17975
17978
  d();
17976
17979
  }, f = () => {
@@ -17984,9 +17987,9 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17984
17987
  Le(() => t.items, () => {
17985
17988
  f() && h();
17986
17989
  }, { immediate: !0, flush: "post" });
17987
- const p = dt(0), y = dt(0), x = new ResizeObserver(Pf((S) => {
17988
- const k = S[0], E = k.contentRect.width, P = k.contentRect.height;
17989
- E !== p.value && P === y.value && h(), p.value = E, y.value = P;
17990
+ const g = dt(0), y = dt(0), x = new ResizeObserver(Pf((S) => {
17991
+ const T = S[0], A = T.contentRect.width, P = T.contentRect.height;
17992
+ A !== g.value && P === y.value && h(), g.value = A, y.value = P;
17990
17993
  }, 100));
17991
17994
  Le(() => a.value, () => {
17992
17995
  h();
@@ -17997,23 +18000,23 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
17997
18000
  }), kl(() => {
17998
18001
  i.value && x.unobserve(i.value);
17999
18002
  });
18000
- const w = (S = 0, k) => {
18003
+ const w = (S = 0, T) => {
18001
18004
  if (t.chartInstance === null)
18002
18005
  return;
18003
- const E = t.chartInstance instanceof Xe ? t.chartInstance : t.chartInstance.chart;
18004
- M(S, k) ? E.hide(S, k) : E.show(S, k), E.update();
18005
- }, M = (S = 0, k) => {
18006
+ const A = t.chartInstance instanceof Xe ? t.chartInstance : t.chartInstance.chart;
18007
+ M(S, T) ? A.hide(S, T) : A.show(S, T), A.update();
18008
+ }, M = (S = 0, T) => {
18006
18009
  if (t.chartInstance === null || t.chartInstance.chart === null)
18007
18010
  return !0;
18008
- const E = t.chartInstance instanceof Xe ? t.chartInstance : t.chartInstance.chart, P = E.getDatasetMeta(S);
18009
- return P.dataset || k === void 0 ? E.isDatasetVisible(S) : !(P.data.length && P.data[k].hidden);
18011
+ const A = t.chartInstance instanceof Xe ? t.chartInstance : t.chartInstance.chart, P = A.getDatasetMeta(S);
18012
+ return P.dataset || T === void 0 ? A.isDatasetVisible(S) : !(P.data.length && P.data[T].hidden);
18010
18013
  }, D = (S) => ({
18011
18014
  [$t.Right]: "vertical",
18012
18015
  [$t.Bottom]: "horizontal",
18013
18016
  [$t.Hidden]: "hidden"
18014
18017
  })[S];
18015
- return (S, k) => {
18016
- const E = qe("KTooltip");
18018
+ return (S, T) => {
18019
+ const A = qe("KTooltip");
18017
18020
  return ht(a) !== ht($t).Hidden ? (nt(), _t("ul", {
18018
18021
  key: 0,
18019
18022
  ref_key: "legendContainerRef",
@@ -18021,21 +18024,21 @@ const WD = { class: "tooltip-title" }, BD = { class: "title font-bold" }, YD = {
18021
18024
  class: $n(["legend-container", D(ht(a))]),
18022
18025
  "data-testid": "legend"
18023
18026
  }, [
18024
- (nt(!0), _t(Bs, null, Tl(n.items, ({ fillStyle: P, strokeStyle: g, text: b, datasetIndex: T, index: A, value: R, isSegmentEmpty: I }) => (nt(), _t("li", {
18027
+ (nt(!0), _t(Bs, null, Tl(n.items, ({ fillStyle: P, strokeStyle: p, text: b, datasetIndex: k, index: E, value: R, isSegmentEmpty: I }) => (nt(), _t("li", {
18025
18028
  key: b,
18026
18029
  ref_for: !0,
18027
18030
  ref_key: "legendItemsRef",
18028
18031
  ref: s,
18029
- onClick: (z) => w(T, A)
18032
+ onClick: (z) => w(k, E)
18030
18033
  }, [
18031
18034
  bt("div", {
18032
18035
  class: "square-marker",
18033
- style: fi({ background: P, "border-color": g })
18036
+ style: fi({ background: P, "border-color": p })
18034
18037
  }, null, 4),
18035
- ne(E, null, uh({
18038
+ ne(A, null, uh({
18036
18039
  default: Wt(() => [
18037
18040
  bt("div", {
18038
- class: $n(["label-container", { "strike-through": !M(T, A) }])
18041
+ class: $n(["label-container", { "strike-through": !M(k, E) }])
18039
18042
  }, [
18040
18043
  bt("div", {
18041
18044
  class: $n(["label", { "truncate-label": u.value, empty: I }])
@@ -18200,7 +18203,7 @@ const th = (n, t) => {
18200
18203
  [`${Y}-value`]: j,
18201
18204
  [`${Y}-percent`]: at
18202
18205
  };
18203
- }, o = dt(null), l = dt(), c = dt(Xn()), u = Xn(), d = Xn(), h = dt([]), f = dt(Ws("legendPosition", $t.Right)), p = dt({
18206
+ }, o = dt(null), l = dt(), c = dt(Xn()), u = Xn(), d = Xn(), h = dt([]), f = dt(Ws("legendPosition", $t.Right)), g = dt({
18204
18207
  show: !1,
18205
18208
  top: "0px",
18206
18209
  left: "0px",
@@ -18233,12 +18236,12 @@ const th = (n, t) => {
18233
18236
  afterUpdate(F) {
18234
18237
  M.value += 1, h.value = Ef(F, t.legendValues, t.chartLegendSortFn);
18235
18238
  }
18236
- }, k = {
18239
+ }, T = {
18237
18240
  id: u,
18238
18241
  afterUpdate(F) {
18239
18242
  F.options.plugins.annotation.annotations = t.annotations ? D() : {};
18240
18243
  }
18241
- }, g = [
18244
+ }, p = [
18242
18245
  S,
18243
18246
  {
18244
18247
  id: "axisHover",
@@ -18246,14 +18249,14 @@ const th = (n, t) => {
18246
18249
  // https://www.chartjs.org/docs/latest/api/interfaces/Plugin.html#parameters
18247
18250
  afterEvent(F, Y) {
18248
18251
  var X;
18249
- if (p.value.show = !1, Y.event.type === "mousemove") {
18252
+ if (g.value.show = !1, Y.event.type === "mousemove") {
18250
18253
  const Z = Y.event, tt = F.options.indexAxis, V = F.scales, j = F.scales[tt].getLabelForValue(Number(F.scales[tt].getValueForPixel(Z[tt]))), J = F.scales[tt].getLabels().indexOf(j), Lt = (X = t.chartData.isLabelEmpty) == null ? void 0 : X[J];
18251
18254
  if (((Ft) => Ft === "x" ? Z.y > V.x.top : Z.x < V.y.right)(tt)) {
18252
18255
  w.locked || (w.showTooltip = !1);
18253
18256
  const wt = F.canvas.getContext("2d").measureText(j).width, pt = Math.abs(Math.round(Z.x - wt * 0.5)), Jt = Math.round(Z.x + wt * 0.5);
18254
- p.value.left = tt === "x" ? `${(pt > 0 ? pt : Jt) - p.value.offset}px` : `${Z.x - wt * 0.5 - p.value.offset}px`, p.value.top = `${Z.y - 50}px`, j.length > fl ? (p.value.show = !0, p.value.text = j) : Lt ? (p.value.text = e.t("emptyEntityInfo"), p.value.show = !0) : p.value.show = !1;
18257
+ g.value.left = tt === "x" ? `${(pt > 0 ? pt : Jt) - g.value.offset}px` : `${Z.x - wt * 0.5 - g.value.offset}px`, g.value.top = `${Z.y - 50}px`, j.length > fl ? (g.value.show = !0, g.value.text = j) : Lt ? (g.value.text = e.t("emptyEntityInfo"), g.value.show = !0) : g.value.show = !1;
18255
18258
  } else
18256
- p.value.show = !1;
18259
+ g.value.show = !1;
18257
18260
  }
18258
18261
  }
18259
18262
  },
@@ -18264,20 +18267,20 @@ const th = (n, t) => {
18264
18267
  }
18265
18268
  },
18266
18269
  bg,
18267
- ...t.annotations ? [k] : []
18268
- ], b = U(() => t.chartData.labels && t.chartData.labels.length || 0), T = dt(0), A = dt(0), R = new ResizeObserver(Pf((F) => {
18269
- T.value = F[0].contentRect.width, A.value = F[0].contentRect.height;
18270
+ ...t.annotations ? [T] : []
18271
+ ], b = U(() => t.chartData.labels && t.chartData.labels.length || 0), k = dt(0), E = dt(0), R = new ResizeObserver(Pf((F) => {
18272
+ k.value = F[0].contentRect.width, E.value = F[0].contentRect.height;
18270
18273
  }, 100)), I = U(() => {
18271
18274
  var Y, X;
18272
18275
  const F = (X = (Y = t.chartData) == null ? void 0 : Y.labels) == null ? void 0 : X.length;
18273
- return o.value && F && !x.value ? `${Math.max(F * (sk + nh), T.value)}px` : nk;
18276
+ return o.value && F && !x.value ? `${Math.max(F * (sk + nh), k.value)}px` : nk;
18274
18277
  }), z = U(() => {
18275
18278
  var Y, X;
18276
18279
  const F = (X = (Y = t.chartData) == null ? void 0 : Y.labels) == null ? void 0 : X.length;
18277
- return o.value && F && x.value ? `${Math.max(F * (rk + nh), A.value)}px` : ik;
18280
+ return o.value && F && x.value ? `${Math.max(F * (rk + nh), E.value)}px` : ik;
18278
18281
  });
18279
18282
  vt.useReportChartDataForSynthetics(At(t, "chartData"), At(t, "syntheticsDataKey")), _a(() => {
18280
- t.annotations && Xe.register(Qd), s.value && (T.value = s.value.offsetWidth, A.value = s.value.offsetHeight, R.observe(s.value));
18283
+ t.annotations && Xe.register(Qd), s.value && (k.value = s.value.offsetWidth, E.value = s.value.offsetHeight, R.observe(s.value));
18281
18284
  }), Ol(() => {
18282
18285
  s.value && R.unobserve(s.value);
18283
18286
  });
@@ -18313,7 +18316,7 @@ const th = (n, t) => {
18313
18316
  "bar",
18314
18317
  o,
18315
18318
  At(t, "chartData"),
18316
- g,
18319
+ p,
18317
18320
  G
18318
18321
  ), H = U(() => {
18319
18322
  M.value;
@@ -18343,7 +18346,7 @@ const th = (n, t) => {
18343
18346
  const X = B.value.scale, Z = B.value.targetCtx, tt = B.value.width, V = B.value.height, j = q.value, at = j.canvas;
18344
18347
  Z.fillStyle = "white", Y.scrollLeft >= ak && Y.scrollLeft <= ok ? (Z.globalCompositeOperation = "source-over", Z.clearRect(0, 0, tt, V), Z.drawImage(at, 0, 0, tt, V, 0, 0, tt, V), Z.globalCompositeOperation = "destination-over", Z.fillRect(0, 0, tt, V)) : (Z.globalCompositeOperation = "source-over", Z.fillRect(0, (j.scales.y.height + j.scales.y.top + lk) * X, tt, j.scales.x.height * X));
18345
18348
  }
18346
- w.offsetY = Y.scrollTop, w.offsetX = Y.scrollLeft, p.value.offset = Y.scrollLeft;
18349
+ w.offsetY = Y.scrollTop, w.offsetX = Y.scrollLeft, g.value.offset = Y.scrollLeft;
18347
18350
  }, Pt = ({ width: F, height: Y }) => {
18348
18351
  w.width = F, w.height = Y;
18349
18352
  };
@@ -18386,13 +18389,13 @@ const th = (n, t) => {
18386
18389
  }, null, 512)
18387
18390
  ], 4)
18388
18391
  ], 544),
18389
- p.value.show ? (nt(), _t("div", {
18392
+ g.value.show ? (nt(), _t("div", {
18390
18393
  key: 0,
18391
18394
  class: "axis-tooltip",
18392
- style: fi({ top: p.value.top, left: p.value.left }),
18395
+ style: fi({ top: g.value.top, left: g.value.left }),
18393
18396
  width: "auto"
18394
18397
  }, [
18395
- bt("div", ek, mt(p.value.text), 1)
18398
+ bt("div", ek, mt(g.value.text), 1)
18396
18399
  ], 4)) : Kt("", !0),
18397
18400
  ne(pc, {
18398
18401
  context: w.tooltipContext,
@@ -18623,7 +18626,7 @@ const _k = we({
18623
18626
  });
18624
18627
  const a = () => {
18625
18628
  if (!s.value) return;
18626
- const { type: c, data: u, options: d, plugins: h, datasetIdKey: f } = n, p = bk(u, f), y = mk(p, u);
18629
+ const { type: c, data: u, options: d, plugins: h, datasetIdKey: f } = n, g = bk(u, f), y = mk(g, u);
18627
18630
  r.value = new Xe(s.value, {
18628
18631
  type: c,
18629
18632
  data: y,
@@ -18644,7 +18647,7 @@ const _k = we({
18644
18647
  () => n.options,
18645
18648
  () => n.data
18646
18649
  ], (c, u) => {
18647
- let [d, h] = c, [f, p] = u;
18650
+ let [d, h] = c, [f, g] = u;
18648
18651
  const y = Uo(r.value);
18649
18652
  if (!y)
18650
18653
  return;
@@ -18654,7 +18657,7 @@ const _k = we({
18654
18657
  w && w !== M && (yk(y, w), x = !0);
18655
18658
  }
18656
18659
  if (h) {
18657
- const w = Fi(h.labels), M = Fi(p.labels), D = Fi(h.datasets), S = Fi(p.datasets);
18660
+ const w = Fi(h.labels), M = Fi(g.labels), D = Fi(h.datasets), S = Fi(g.datasets);
18658
18661
  w !== M && (xg(y.config.data, w), x = !0), D && D !== S && (wg(y.config.data, D, n.datasetIdKey), x = !0);
18659
18662
  }
18660
18663
  x && Ag(() => {
@@ -18762,7 +18765,7 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
18762
18765
  [$t.Right]: "legend-row",
18763
18766
  [$t.Bottom]: "column",
18764
18767
  [$t.Hidden]: "hidden"
18765
- })[y], p = ({ width: y, height: x }) => {
18768
+ })[y], g = ({ width: y, height: x }) => {
18766
18769
  a.width = y, a.height = x;
18767
18770
  };
18768
18771
  return (y, x) => (nt(), _t("div", {
@@ -18785,7 +18788,7 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
18785
18788
  "tooltip-title": n.tooltipTitle,
18786
18789
  top: a.top,
18787
18790
  unit: n.metricUnit,
18788
- onDimensions: p
18791
+ onDimensions: g
18789
18792
  }, null, 8, ["left", "series", "show-tooltip", "tooltip-title", "top", "unit"])
18790
18793
  ]),
18791
18794
  ne(mc, {
@@ -18950,59 +18953,60 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
18950
18953
  chartTooltipSortFn: e.chartTooltipSortFn
18951
18954
  }), f = {
18952
18955
  id: a.value,
18953
- afterUpdate(g) {
18954
- l.value = Ef(g, e.legendValues, e.chartLegendSortFn);
18956
+ afterUpdate(b) {
18957
+ l.value = Ef(b, e.legendValues, e.chartLegendSortFn);
18955
18958
  }
18956
- }, p = U(() => [
18959
+ }, g = U(() => [
18957
18960
  f,
18958
18961
  bg,
18959
18962
  ...e.zoom ? [kk] : [],
18960
18963
  ...e.type === "timeseries_line" ? [Ss] : []
18961
- ]), y = U(() => `line-${p.value.map((g) => g.id).join("-")}`), x = U(() => `bar-${p.value.map((g) => g.id).join("-")}`), { options: w } = vt.useLinechartOptions({
18964
+ ]), y = U(() => `line-${g.value.map((b) => b.id).join("-")}`), x = U(() => `bar-${g.value.map((b) => b.id).join("-")}`), w = U(() => Vw(e.chartData)), { options: M } = vt.useLinechartOptions({
18962
18965
  tooltipState: h,
18963
18966
  timeRangeMs: At(e, "timeRangeMs"),
18964
18967
  granularity: At(e, "granularity"),
18965
18968
  legendID: a.value,
18966
18969
  stacked: At(e, "stacked"),
18967
18970
  metricAxesTitle: At(e, "metricAxesTitle"),
18968
- dimensionAxesTitle: At(e, "dimensionAxesTitle")
18971
+ dimensionAxesTitle: At(e, "dimensionAxesTitle"),
18972
+ pointsWithoutHover: w
18969
18973
  });
18970
18974
  vt.useReportChartDataForSynthetics(At(e, "chartData"), At(e, "syntheticsDataKey"));
18971
- const M = (g) => Ff(new Date(g), e.granularity, !0), D = (g) => ({
18975
+ const D = (b) => Ff(new Date(b), e.granularity, !0), S = (b) => ({
18972
18976
  [$t.Right]: "legend-row",
18973
18977
  [$t.Bottom]: "column",
18974
18978
  [$t.Hidden]: "hidden"
18975
- })[g], S = ({ width: g, height: b }) => {
18976
- h.width = g, h.height = b;
18977
- }, k = () => {
18978
- var g, b, T;
18979
- h.locked = !h.locked, r.value && ((b = (g = r.value.chart.tooltip) == null ? void 0 : g.dataPoints) != null && b.length) && (Ss.clickedSegment = h.locked ? (T = r.value.chart.tooltip) == null ? void 0 : T.dataPoints[0] : void 0);
18979
+ })[b], T = ({ width: b, height: k }) => {
18980
+ h.width = b, h.height = k;
18981
+ }, A = () => {
18982
+ var b, k, E;
18983
+ h.locked = !h.locked, r.value && ((k = (b = r.value.chart.tooltip) == null ? void 0 : b.dataPoints) != null && k.length) && (Ss.clickedSegment = h.locked ? (E = r.value.chart.tooltip) == null ? void 0 : E.dataPoints[0] : void 0);
18980
18984
  };
18981
18985
  Le(() => e.type, () => {
18982
18986
  h.locked = !1, h.showTooltip = !1, delete Ss.clickedSegment;
18983
18987
  });
18984
- const E = (g) => {
18985
- const { xStart: b, xEnd: T } = g.detail;
18986
- b && T && i("zoom-time-range", { start: new Date(b), end: new Date(T), type: "absolute" }), d.value = !1, k(), Ss.pause = !1;
18987
- }, P = () => {
18988
+ const P = (b) => {
18989
+ const { xStart: k, xEnd: E } = b.detail;
18990
+ k && E && i("zoom-time-range", { start: new Date(k), end: new Date(E), type: "absolute" }), d.value = !1, A(), Ss.pause = !1;
18991
+ }, p = () => {
18988
18992
  d.value = !0, Ss.pause = !0;
18989
18993
  };
18990
18994
  return Le(() => {
18991
- var g;
18992
- return (g = r.value) == null ? void 0 : g.chart;
18995
+ var b;
18996
+ return (b = r.value) == null ? void 0 : b.chart;
18993
18997
  }, () => {
18994
- var g;
18995
- (g = r.value) != null && g.chart && (r.value.chart.canvas.removeEventListener("dragSelect", E), r.value.chart.canvas.removeEventListener("dragSelectMove", P), r.value.chart.canvas.addEventListener("dragSelect", E), r.value.chart.canvas.addEventListener("dragSelectMove", P));
18998
+ var b;
18999
+ (b = r.value) != null && b.chart && (r.value.chart.canvas.removeEventListener("dragSelect", P), r.value.chart.canvas.removeEventListener("dragSelectMove", p), r.value.chart.canvas.addEventListener("dragSelect", P), r.value.chart.canvas.addEventListener("dragSelectMove", p));
18996
19000
  }), Ol(() => {
18997
- var g;
18998
- (g = r.value) != null && g.chart && (r.value.chart.canvas.removeEventListener("dragSelect", E), r.value.chart.canvas.removeEventListener("dragSelectMove", P));
18999
- }), (g, b) => (nt(), _t("div", {
19000
- class: $n(["chart-parent", D(u.value)]),
19001
+ var b;
19002
+ (b = r.value) != null && b.chart && (r.value.chart.canvas.removeEventListener("dragSelect", P), r.value.chart.canvas.removeEventListener("dragSelectMove", p));
19003
+ }), (b, k) => (nt(), _t("div", {
19004
+ class: $n(["chart-parent", S(u.value)]),
19001
19005
  "data-testid": "line-chart-parent"
19002
19006
  }, [
19003
19007
  bt("div", {
19004
19008
  class: "chart-container",
19005
- onClick: b[0] || (b[0] = (T) => k())
19009
+ onClick: k[0] || (k[0] = (E) => A())
19006
19010
  }, [
19007
19011
  n.type === "timeseries_line" ? (nt(), xe(ht(wk), {
19008
19012
  key: y.value,
@@ -19012,8 +19016,8 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
19012
19016
  class: "chart-canvas",
19013
19017
  data: n.chartData,
19014
19018
  "data-testid": "time-series-line-chart",
19015
- options: ht(w),
19016
- plugins: p.value
19019
+ options: ht(M),
19020
+ plugins: g.value
19017
19021
  }, null, 8, ["chart-id", "data", "options", "plugins"])) : n.type === "timeseries_bar" ? (nt(), xe(ht(xk), {
19018
19022
  key: x.value,
19019
19023
  ref_key: "chartInstance",
@@ -19022,15 +19026,15 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
19022
19026
  class: "chart-canvas",
19023
19027
  data: n.chartData,
19024
19028
  "data-testid": "time-series-bar-chart",
19025
- options: ht(w),
19026
- plugins: p.value
19029
+ options: ht(M),
19030
+ plugins: g.value
19027
19031
  }, null, 8, ["chart-id", "data", "options", "plugins"])) : Kt("", !0)
19028
19032
  ]),
19029
19033
  d.value ? Kt("", !0) : (nt(), xe(pc, {
19030
19034
  key: 0,
19031
19035
  ref_key: "tooltipElement",
19032
19036
  ref: c,
19033
- context: M(h.tooltipContext),
19037
+ context: D(h.tooltipContext),
19034
19038
  "data-testid": "tooltip",
19035
19039
  left: h.left,
19036
19040
  locked: h.locked,
@@ -19039,9 +19043,9 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
19039
19043
  "tooltip-title": n.tooltipTitle,
19040
19044
  top: h.top,
19041
19045
  unit: n.metricUnit,
19042
- onDimensions: S,
19043
- onLeft: b[1] || (b[1] = (T) => h.left = T),
19044
- onTop: b[2] || (b[2] = (T) => h.top = T)
19046
+ onDimensions: T,
19047
+ onLeft: k[1] || (k[1] = (E) => h.left = E),
19048
+ onTop: k[2] || (k[2] = (E) => h.top = E)
19045
19049
  }, null, 8, ["context", "left", "locked", "series", "show-tooltip", "tooltip-title", "top", "unit"])),
19046
19050
  ne(mc, {
19047
19051
  id: a.value,
@@ -19051,7 +19055,7 @@ const xk = /* @__PURE__ */ yc("bar", Ns), vg = /* @__PURE__ */ yc("doughnut", Mn
19051
19055
  }, null, 8, ["id", "chart-instance", "items"])
19052
19056
  ], 2));
19053
19057
  }
19054
- }), Ck = /* @__PURE__ */ kn(Tk, [["__scopeId", "data-v-9b7839b1"]]), iC = ["hidden", "single", "full"];
19058
+ }), Ck = /* @__PURE__ */ kn(Tk, [["__scopeId", "data-v-4ca2b965"]]), iC = ["hidden", "single", "full"];
19055
19059
  var Wi = /* @__PURE__ */ ((n) => (n.String = "string", n.Number = "number", n.Boolean = "boolean", n.Object = "object", n.Undefined = "undefined", n))(Wi || {});
19056
19060
  const sC = [
19057
19061
  "doughnut",
@@ -19066,8 +19070,8 @@ const sC = [
19066
19070
  var ba = { exports: {} };
19067
19071
  ba.exports;
19068
19072
  (function(n, t) {
19069
- var e = 200, i = "Expected a function", s = "__lodash_hash_undefined__", r = 1, a = 2, o = 1 / 0, l = 9007199254740991, c = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", h = "[object Date]", f = "[object Error]", p = "[object Function]", y = "[object GeneratorFunction]", x = "[object Map]", w = "[object Number]", M = "[object Object]", D = "[object Promise]", S = "[object RegExp]", k = "[object Set]", E = "[object String]", P = "[object Symbol]", g = "[object WeakMap]", b = "[object ArrayBuffer]", T = "[object DataView]", A = "[object Float32Array]", R = "[object Float64Array]", I = "[object Int8Array]", z = "[object Int16Array]", G = "[object Int32Array]", q = "[object Uint8Array]", H = "[object Uint8ClampedArray]", ut = "[object Uint16Array]", B = "[object Uint32Array]", et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Pt = /^\w*$/, $ = /^\./, F = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Y = /[\\^$.*+?()[\]{}|]/g, X = /\\(\\)?/g, Z = /^\[object .+?Constructor\]$/, tt = /^(?:0|[1-9]\d*)$/, V = {};
19070
- V[A] = V[R] = V[I] = V[z] = V[G] = V[q] = V[H] = V[ut] = V[B] = !0, V[c] = V[u] = V[b] = V[d] = V[T] = V[h] = V[f] = V[p] = V[x] = V[w] = V[M] = V[S] = V[k] = V[E] = V[g] = !1;
19073
+ var e = 200, i = "Expected a function", s = "__lodash_hash_undefined__", r = 1, a = 2, o = 1 / 0, l = 9007199254740991, c = "[object Arguments]", u = "[object Array]", d = "[object Boolean]", h = "[object Date]", f = "[object Error]", g = "[object Function]", y = "[object GeneratorFunction]", x = "[object Map]", w = "[object Number]", M = "[object Object]", D = "[object Promise]", S = "[object RegExp]", T = "[object Set]", A = "[object String]", P = "[object Symbol]", p = "[object WeakMap]", b = "[object ArrayBuffer]", k = "[object DataView]", E = "[object Float32Array]", R = "[object Float64Array]", I = "[object Int8Array]", z = "[object Int16Array]", G = "[object Int32Array]", q = "[object Uint8Array]", H = "[object Uint8ClampedArray]", ut = "[object Uint16Array]", B = "[object Uint32Array]", et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Pt = /^\w*$/, $ = /^\./, F = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Y = /[\\^$.*+?()[\]{}|]/g, X = /\\(\\)?/g, Z = /^\[object .+?Constructor\]$/, tt = /^(?:0|[1-9]\d*)$/, V = {};
19074
+ V[E] = V[R] = V[I] = V[z] = V[G] = V[q] = V[H] = V[ut] = V[B] = !0, V[c] = V[u] = V[b] = V[d] = V[k] = V[h] = V[f] = V[g] = V[x] = V[w] = V[M] = V[S] = V[T] = V[A] = V[p] = !1;
19071
19075
  var j = typeof Re == "object" && Re && Re.Object === Object && Re, at = typeof self == "object" && self && self.Object === Object && self, J = j || at || Function("return this")(), Lt = t && !t.nodeType && t, xt = Lt && !0 && n && !n.nodeType && n, Ft = xt && xt.exports === Lt, wt = Ft && j.process, pt = function() {
19072
19076
  try {
19073
19077
  return wt && wt.binding("util");
@@ -19416,7 +19420,7 @@ ba.exports;
19416
19420
  }
19417
19421
  function lo(m, v, L, W, ot, Q, ft) {
19418
19422
  switch (L) {
19419
- case T:
19423
+ case k:
19420
19424
  if (m.byteLength != v.byteLength || m.byteOffset != v.byteOffset)
19421
19425
  return !1;
19422
19426
  m = m.buffer, v = v.buffer;
@@ -19429,11 +19433,11 @@ ba.exports;
19429
19433
  case f:
19430
19434
  return m.name == v.name && m.message == v.message;
19431
19435
  case S:
19432
- case E:
19436
+ case A:
19433
19437
  return m == v + "";
19434
19438
  case x:
19435
19439
  var ee = se;
19436
- case k:
19440
+ case T:
19437
19441
  var jt = Q & a;
19438
19442
  if (ee || (ee = sn), m.size != v.size && !jt)
19439
19443
  return !1;
@@ -19496,20 +19500,20 @@ ba.exports;
19496
19500
  return so(L) ? L : void 0;
19497
19501
  }
19498
19502
  var rn = to;
19499
- (ei && rn(new ei(new ArrayBuffer(1))) != T || Ke && rn(new Ke()) != x || ns && rn(ns.resolve()) != D || is && rn(new is()) != k || ss && rn(new ss()) != g) && (rn = function(m) {
19503
+ (ei && rn(new ei(new ArrayBuffer(1))) != k || Ke && rn(new Ke()) != x || ns && rn(ns.resolve()) != D || is && rn(new is()) != T || ss && rn(new ss()) != p) && (rn = function(m) {
19500
19504
  var v = Yt.call(m), L = v == M ? m.constructor : void 0, W = L ? tn(L) : void 0;
19501
19505
  if (W)
19502
19506
  switch (W) {
19503
19507
  case Ra:
19504
- return T;
19508
+ return k;
19505
19509
  case lr:
19506
19510
  return x;
19507
19511
  case cr:
19508
19512
  return D;
19509
19513
  case hn:
19510
- return k;
19514
+ return T;
19511
19515
  case La:
19512
- return g;
19516
+ return p;
19513
19517
  }
19514
19518
  return v;
19515
19519
  });
@@ -19608,7 +19612,7 @@ ba.exports;
19608
19612
  }
19609
19613
  function Gt(m) {
19610
19614
  var v = Ce(m) ? Yt.call(m) : "";
19611
- return v == p || v == y;
19615
+ return v == g || v == y;
19612
19616
  }
19613
19617
  function re(m) {
19614
19618
  return typeof m == "number" && m > -1 && m % 1 == 0 && m <= l;
@@ -19800,8 +19804,8 @@ var Sg = { exports: {} };
19800
19804
  }
19801
19805
  } : function(c, u, d, h) {
19802
19806
  if (h = h || open("", "_blank"), h && (h.document.title = h.document.body.innerText = "downloading..."), typeof c == "string") return i(c, u, d);
19803
- var f = c.type === "application/octet-stream", p = /constructor/i.test(a.HTMLElement) || a.safari, y = /CriOS\/[\d]+/.test(navigator.userAgent);
19804
- if ((y || f && p || o) && typeof FileReader < "u") {
19807
+ var f = c.type === "application/octet-stream", g = /constructor/i.test(a.HTMLElement) || a.safari, y = /CriOS\/[\d]+/.test(navigator.userAgent);
19808
+ if ((y || f && g || o) && typeof FileReader < "u") {
19805
19809
  var x = new FileReader();
19806
19810
  x.onloadend = function() {
19807
19811
  var D = x.result;
@@ -19828,28 +19832,28 @@ License: MIT
19828
19832
  (function(e, i) {
19829
19833
  n.exports = i();
19830
19834
  })(Re, function e() {
19831
- var i = typeof self < "u" ? self : typeof window < "u" ? window : i !== void 0 ? i : {}, s = !i.document && !!i.postMessage, r = i.IS_PAPA_WORKER || !1, a = {}, o = 0, l = { parse: function(g, b) {
19832
- var T = (b = b || {}).dynamicTyping || !1;
19833
- if (P(T) && (b.dynamicTypingFunction = T, T = {}), b.dynamicTyping = T, b.transform = !!P(b.transform) && b.transform, b.worker && l.WORKERS_SUPPORTED) {
19834
- var A = function() {
19835
+ var i = typeof self < "u" ? self : typeof window < "u" ? window : i !== void 0 ? i : {}, s = !i.document && !!i.postMessage, r = i.IS_PAPA_WORKER || !1, a = {}, o = 0, l = { parse: function(p, b) {
19836
+ var k = (b = b || {}).dynamicTyping || !1;
19837
+ if (P(k) && (b.dynamicTypingFunction = k, k = {}), b.dynamicTyping = k, b.transform = !!P(b.transform) && b.transform, b.worker && l.WORKERS_SUPPORTED) {
19838
+ var E = function() {
19835
19839
  if (!l.WORKERS_SUPPORTED) return !1;
19836
19840
  var I = (G = i.URL || i.webkitURL || null, q = e.toString(), l.BLOB_URL || (l.BLOB_URL = G.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", q, ")();"], { type: "text/javascript" })))), z = new i.Worker(I), G, q;
19837
19841
  return z.onmessage = M, z.id = o++, a[z.id] = z;
19838
19842
  }();
19839
- return A.userStep = b.step, A.userChunk = b.chunk, A.userComplete = b.complete, A.userError = b.error, b.step = P(b.step), b.chunk = P(b.chunk), b.complete = P(b.complete), b.error = P(b.error), delete b.worker, void A.postMessage({ input: g, config: b, workerId: A.id });
19843
+ return E.userStep = b.step, E.userChunk = b.chunk, E.userComplete = b.complete, E.userError = b.error, b.step = P(b.step), b.chunk = P(b.chunk), b.complete = P(b.complete), b.error = P(b.error), delete b.worker, void E.postMessage({ input: p, config: b, workerId: E.id });
19840
19844
  }
19841
19845
  var R = null;
19842
- return l.NODE_STREAM_INPUT, typeof g == "string" ? (g = function(I) {
19846
+ return l.NODE_STREAM_INPUT, typeof p == "string" ? (p = function(I) {
19843
19847
  return I.charCodeAt(0) === 65279 ? I.slice(1) : I;
19844
- }(g), R = b.download ? new d(b) : new f(b)) : g.readable === !0 && P(g.read) && P(g.on) ? R = new p(b) : (i.File && g instanceof File || g instanceof Object) && (R = new h(b)), R.stream(g);
19845
- }, unparse: function(g, b) {
19846
- var T = !1, A = !0, R = ",", I = `\r
19848
+ }(p), R = b.download ? new d(b) : new f(b)) : p.readable === !0 && P(p.read) && P(p.on) ? R = new g(b) : (i.File && p instanceof File || p instanceof Object) && (R = new h(b)), R.stream(p);
19849
+ }, unparse: function(p, b) {
19850
+ var k = !1, E = !0, R = ",", I = `\r
19847
19851
  `, z = '"', G = z + z, q = !1, H = null, ut = !1;
19848
19852
  (function() {
19849
19853
  if (typeof b == "object") {
19850
19854
  if (typeof b.delimiter != "string" || l.BAD_DELIMITERS.filter(function($) {
19851
19855
  return b.delimiter.indexOf($) !== -1;
19852
- }).length || (R = b.delimiter), (typeof b.quotes == "boolean" || typeof b.quotes == "function" || Array.isArray(b.quotes)) && (T = b.quotes), typeof b.skipEmptyLines != "boolean" && typeof b.skipEmptyLines != "string" || (q = b.skipEmptyLines), typeof b.newline == "string" && (I = b.newline), typeof b.quoteChar == "string" && (z = b.quoteChar), typeof b.header == "boolean" && (A = b.header), Array.isArray(b.columns)) {
19856
+ }).length || (R = b.delimiter), (typeof b.quotes == "boolean" || typeof b.quotes == "function" || Array.isArray(b.quotes)) && (k = b.quotes), typeof b.skipEmptyLines != "boolean" && typeof b.skipEmptyLines != "string" || (q = b.skipEmptyLines), typeof b.newline == "string" && (I = b.newline), typeof b.quoteChar == "string" && (z = b.quoteChar), typeof b.header == "boolean" && (E = b.header), Array.isArray(b.columns)) {
19853
19857
  if (b.columns.length === 0) throw new Error("Option columns is empty");
19854
19858
  H = b.columns;
19855
19859
  }
@@ -19857,16 +19861,16 @@ License: MIT
19857
19861
  }
19858
19862
  })();
19859
19863
  var B = new RegExp(x(z), "g");
19860
- if (typeof g == "string" && (g = JSON.parse(g)), Array.isArray(g)) {
19861
- if (!g.length || Array.isArray(g[0])) return et(null, g, q);
19862
- if (typeof g[0] == "object") return et(H || Object.keys(g[0]), g, q);
19863
- } else if (typeof g == "object") return typeof g.data == "string" && (g.data = JSON.parse(g.data)), Array.isArray(g.data) && (g.fields || (g.fields = g.meta && g.meta.fields || H), g.fields || (g.fields = Array.isArray(g.data[0]) ? g.fields : typeof g.data[0] == "object" ? Object.keys(g.data[0]) : []), Array.isArray(g.data[0]) || typeof g.data[0] == "object" || (g.data = [g.data])), et(g.fields || [], g.data || [], q);
19864
+ if (typeof p == "string" && (p = JSON.parse(p)), Array.isArray(p)) {
19865
+ if (!p.length || Array.isArray(p[0])) return et(null, p, q);
19866
+ if (typeof p[0] == "object") return et(H || Object.keys(p[0]), p, q);
19867
+ } else if (typeof p == "object") return typeof p.data == "string" && (p.data = JSON.parse(p.data)), Array.isArray(p.data) && (p.fields || (p.fields = p.meta && p.meta.fields || H), p.fields || (p.fields = Array.isArray(p.data[0]) ? p.fields : typeof p.data[0] == "object" ? Object.keys(p.data[0]) : []), Array.isArray(p.data[0]) || typeof p.data[0] == "object" || (p.data = [p.data])), et(p.fields || [], p.data || [], q);
19864
19868
  throw new Error("Unable to serialize unrecognized input");
19865
19869
  function et($, F, Y) {
19866
19870
  var X = "";
19867
19871
  typeof $ == "string" && ($ = JSON.parse($)), typeof F == "string" && (F = JSON.parse(F));
19868
19872
  var Z = Array.isArray($) && 0 < $.length, tt = !Array.isArray(F[0]);
19869
- if (Z && A) {
19873
+ if (Z && E) {
19870
19874
  for (var V = 0; V < $.length; V++) 0 < V && (X += R), X += Pt($[V], V);
19871
19875
  0 < F.length && (X += I);
19872
19876
  }
@@ -19896,28 +19900,28 @@ License: MIT
19896
19900
  var Y = !1;
19897
19901
  ut && typeof $ == "string" && ut.test($) && ($ = "'" + $, Y = !0);
19898
19902
  var X = $.toString().replace(B, G);
19899
- return (Y = Y || T === !0 || typeof T == "function" && T($, F) || Array.isArray(T) && T[F] || function(Z, tt) {
19903
+ return (Y = Y || k === !0 || typeof k == "function" && k($, F) || Array.isArray(k) && k[F] || function(Z, tt) {
19900
19904
  for (var V = 0; V < tt.length; V++) if (-1 < Z.indexOf(tt[V])) return !0;
19901
19905
  return !1;
19902
19906
  }(X, l.BAD_DELIMITERS) || -1 < X.indexOf(R) || X.charAt(0) === " " || X.charAt(X.length - 1) === " ") ? z + X + z : X;
19903
19907
  }
19904
19908
  } };
19905
19909
  if (l.RECORD_SEP = "", l.UNIT_SEP = "", l.BYTE_ORDER_MARK = "\uFEFF", l.BAD_DELIMITERS = ["\r", `
19906
- `, '"', l.BYTE_ORDER_MARK], l.WORKERS_SUPPORTED = !s && !!i.Worker, l.NODE_STREAM_INPUT = 1, l.LocalChunkSize = 10485760, l.RemoteChunkSize = 5242880, l.DefaultDelimiter = ",", l.Parser = w, l.ParserHandle = y, l.NetworkStreamer = d, l.FileStreamer = h, l.StringStreamer = f, l.ReadableStreamStreamer = p, i.jQuery) {
19910
+ `, '"', l.BYTE_ORDER_MARK], l.WORKERS_SUPPORTED = !s && !!i.Worker, l.NODE_STREAM_INPUT = 1, l.LocalChunkSize = 10485760, l.RemoteChunkSize = 5242880, l.DefaultDelimiter = ",", l.Parser = w, l.ParserHandle = y, l.NetworkStreamer = d, l.FileStreamer = h, l.StringStreamer = f, l.ReadableStreamStreamer = g, i.jQuery) {
19907
19911
  var c = i.jQuery;
19908
- c.fn.parse = function(g) {
19909
- var b = g.config || {}, T = [];
19912
+ c.fn.parse = function(p) {
19913
+ var b = p.config || {}, k = [];
19910
19914
  return this.each(function(I) {
19911
19915
  if (!(c(this).prop("tagName").toUpperCase() === "INPUT" && c(this).attr("type").toLowerCase() === "file" && i.FileReader) || !this.files || this.files.length === 0) return !0;
19912
- for (var z = 0; z < this.files.length; z++) T.push({ file: this.files[z], inputElem: this, instanceConfig: c.extend({}, b) });
19913
- }), A(), this;
19914
- function A() {
19915
- if (T.length !== 0) {
19916
- var I, z, G, q, H = T[0];
19917
- if (P(g.before)) {
19918
- var ut = g.before(H.file, H.inputElem);
19916
+ for (var z = 0; z < this.files.length; z++) k.push({ file: this.files[z], inputElem: this, instanceConfig: c.extend({}, b) });
19917
+ }), E(), this;
19918
+ function E() {
19919
+ if (k.length !== 0) {
19920
+ var I, z, G, q, H = k[0];
19921
+ if (P(p.before)) {
19922
+ var ut = p.before(H.file, H.inputElem);
19919
19923
  if (typeof ut == "object") {
19920
- if (ut.action === "abort") return I = "AbortError", z = H.file, G = H.inputElem, q = ut.reason, void (P(g.error) && g.error({ name: I }, z, G, q));
19924
+ if (ut.action === "abort") return I = "AbortError", z = H.file, G = H.inputElem, q = ut.reason, void (P(p.error) && p.error({ name: I }, z, G, q));
19921
19925
  if (ut.action === "skip") return void R();
19922
19926
  typeof ut.config == "object" && (H.instanceConfig = c.extend(H.instanceConfig, ut.config));
19923
19927
  } else if (ut === "skip") return void R();
@@ -19926,21 +19930,21 @@ License: MIT
19926
19930
  H.instanceConfig.complete = function(et) {
19927
19931
  P(B) && B(et, H.file, H.inputElem), R();
19928
19932
  }, l.parse(H.file, H.instanceConfig);
19929
- } else P(g.complete) && g.complete();
19933
+ } else P(p.complete) && p.complete();
19930
19934
  }
19931
19935
  function R() {
19932
- T.splice(0, 1), A();
19936
+ k.splice(0, 1), E();
19933
19937
  }
19934
19938
  };
19935
19939
  }
19936
- function u(g) {
19940
+ function u(p) {
19937
19941
  this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(b) {
19938
- var T = k(b);
19939
- T.chunkSize = parseInt(T.chunkSize), b.step || b.chunk || (T.chunkSize = null), this._handle = new y(T), (this._handle.streamer = this)._config = T;
19940
- }).call(this, g), this.parseChunk = function(b, T) {
19942
+ var k = T(b);
19943
+ k.chunkSize = parseInt(k.chunkSize), b.step || b.chunk || (k.chunkSize = null), this._handle = new y(k), (this._handle.streamer = this)._config = k;
19944
+ }).call(this, p), this.parseChunk = function(b, k) {
19941
19945
  if (this.isFirstChunk && P(this._config.beforeFirstChunk)) {
19942
- var A = this._config.beforeFirstChunk(b);
19943
- A !== void 0 && (b = A);
19946
+ var E = this._config.beforeFirstChunk(b);
19947
+ E !== void 0 && (b = E);
19944
19948
  }
19945
19949
  this.isFirstChunk = !1, this._halted = !1;
19946
19950
  var R = this._partialLine + b;
@@ -19951,7 +19955,7 @@ License: MIT
19951
19955
  this._finished || (this._partialLine = R.substring(z - this._baseIndex), this._baseIndex = z), I && I.data && (this._rowCount += I.data.length);
19952
19956
  var G = this._finished || this._config.preview && this._rowCount >= this._config.preview;
19953
19957
  if (r) i.postMessage({ results: I, workerId: l.WORKER_ID, finished: G });
19954
- else if (P(this._config.chunk) && !T) {
19958
+ else if (P(this._config.chunk) && !k) {
19955
19959
  if (this._config.chunk(I, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
19956
19960
  I = void 0, this._completeResults = void 0;
19957
19961
  }
@@ -19962,20 +19966,20 @@ License: MIT
19962
19966
  P(this._config.error) ? this._config.error(b) : r && this._config.error && i.postMessage({ workerId: l.WORKER_ID, error: b, finished: !1 });
19963
19967
  };
19964
19968
  }
19965
- function d(g) {
19969
+ function d(p) {
19966
19970
  var b;
19967
- (g = g || {}).chunkSize || (g.chunkSize = l.RemoteChunkSize), u.call(this, g), this._nextChunk = s ? function() {
19971
+ (p = p || {}).chunkSize || (p.chunkSize = l.RemoteChunkSize), u.call(this, p), this._nextChunk = s ? function() {
19968
19972
  this._readChunk(), this._chunkLoaded();
19969
19973
  } : function() {
19970
19974
  this._readChunk();
19971
- }, this.stream = function(T) {
19972
- this._input = T, this._nextChunk();
19975
+ }, this.stream = function(k) {
19976
+ this._input = k, this._nextChunk();
19973
19977
  }, this._readChunk = function() {
19974
19978
  if (this._finished) this._chunkLoaded();
19975
19979
  else {
19976
- if (b = new XMLHttpRequest(), this._config.withCredentials && (b.withCredentials = this._config.withCredentials), s || (b.onload = E(this._chunkLoaded, this), b.onerror = E(this._chunkError, this)), b.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadRequestHeaders) {
19977
- var T = this._config.downloadRequestHeaders;
19978
- for (var A in T) b.setRequestHeader(A, T[A]);
19980
+ if (b = new XMLHttpRequest(), this._config.withCredentials && (b.withCredentials = this._config.withCredentials), s || (b.onload = A(this._chunkLoaded, this), b.onerror = A(this._chunkError, this)), b.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadRequestHeaders) {
19981
+ var k = this._config.downloadRequestHeaders;
19982
+ for (var E in k) b.setRequestHeader(E, k[E]);
19979
19983
  }
19980
19984
  if (this._config.chunkSize) {
19981
19985
  var R = this._start + this._config.chunkSize - 1;
@@ -19989,51 +19993,51 @@ License: MIT
19989
19993
  s && b.status === 0 && this._chunkError();
19990
19994
  }
19991
19995
  }, this._chunkLoaded = function() {
19992
- b.readyState === 4 && (b.status < 200 || 400 <= b.status ? this._chunkError() : (this._start += this._config.chunkSize ? this._config.chunkSize : b.responseText.length, this._finished = !this._config.chunkSize || this._start >= function(T) {
19993
- var A = T.getResponseHeader("Content-Range");
19994
- return A === null ? -1 : parseInt(A.substring(A.lastIndexOf("/") + 1));
19996
+ b.readyState === 4 && (b.status < 200 || 400 <= b.status ? this._chunkError() : (this._start += this._config.chunkSize ? this._config.chunkSize : b.responseText.length, this._finished = !this._config.chunkSize || this._start >= function(k) {
19997
+ var E = k.getResponseHeader("Content-Range");
19998
+ return E === null ? -1 : parseInt(E.substring(E.lastIndexOf("/") + 1));
19995
19999
  }(b), this.parseChunk(b.responseText)));
19996
- }, this._chunkError = function(T) {
19997
- var A = b.statusText || T;
19998
- this._sendError(new Error(A));
20000
+ }, this._chunkError = function(k) {
20001
+ var E = b.statusText || k;
20002
+ this._sendError(new Error(E));
19999
20003
  };
20000
20004
  }
20001
- function h(g) {
20002
- var b, T;
20003
- (g = g || {}).chunkSize || (g.chunkSize = l.LocalChunkSize), u.call(this, g);
20004
- var A = typeof FileReader < "u";
20005
+ function h(p) {
20006
+ var b, k;
20007
+ (p = p || {}).chunkSize || (p.chunkSize = l.LocalChunkSize), u.call(this, p);
20008
+ var E = typeof FileReader < "u";
20005
20009
  this.stream = function(R) {
20006
- this._input = R, T = R.slice || R.webkitSlice || R.mozSlice, A ? ((b = new FileReader()).onload = E(this._chunkLoaded, this), b.onerror = E(this._chunkError, this)) : b = new FileReaderSync(), this._nextChunk();
20010
+ this._input = R, k = R.slice || R.webkitSlice || R.mozSlice, E ? ((b = new FileReader()).onload = A(this._chunkLoaded, this), b.onerror = A(this._chunkError, this)) : b = new FileReaderSync(), this._nextChunk();
20007
20011
  }, this._nextChunk = function() {
20008
20012
  this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
20009
20013
  }, this._readChunk = function() {
20010
20014
  var R = this._input;
20011
20015
  if (this._config.chunkSize) {
20012
20016
  var I = Math.min(this._start + this._config.chunkSize, this._input.size);
20013
- R = T.call(R, this._start, I);
20017
+ R = k.call(R, this._start, I);
20014
20018
  }
20015
20019
  var z = b.readAsText(R, this._config.encoding);
20016
- A || this._chunkLoaded({ target: { result: z } });
20020
+ E || this._chunkLoaded({ target: { result: z } });
20017
20021
  }, this._chunkLoaded = function(R) {
20018
20022
  this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(R.target.result);
20019
20023
  }, this._chunkError = function() {
20020
20024
  this._sendError(b.error);
20021
20025
  };
20022
20026
  }
20023
- function f(g) {
20027
+ function f(p) {
20024
20028
  var b;
20025
- u.call(this, g = g || {}), this.stream = function(T) {
20026
- return b = T, this._nextChunk();
20029
+ u.call(this, p = p || {}), this.stream = function(k) {
20030
+ return b = k, this._nextChunk();
20027
20031
  }, this._nextChunk = function() {
20028
20032
  if (!this._finished) {
20029
- var T, A = this._config.chunkSize;
20030
- return A ? (T = b.substring(0, A), b = b.substring(A)) : (T = b, b = ""), this._finished = !b, this.parseChunk(T);
20033
+ var k, E = this._config.chunkSize;
20034
+ return E ? (k = b.substring(0, E), b = b.substring(E)) : (k = b, b = ""), this._finished = !b, this.parseChunk(k);
20031
20035
  }
20032
20036
  };
20033
20037
  }
20034
- function p(g) {
20035
- u.call(this, g = g || {});
20036
- var b = [], T = !0, A = !1;
20038
+ function g(p) {
20039
+ u.call(this, p = p || {});
20040
+ var b = [], k = !0, E = !1;
20037
20041
  this.pause = function() {
20038
20042
  u.prototype.pause.apply(this, arguments), this._input.pause();
20039
20043
  }, this.resume = function() {
@@ -20041,69 +20045,69 @@ License: MIT
20041
20045
  }, this.stream = function(R) {
20042
20046
  this._input = R, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
20043
20047
  }, this._checkIsFinished = function() {
20044
- A && b.length === 1 && (this._finished = !0);
20048
+ E && b.length === 1 && (this._finished = !0);
20045
20049
  }, this._nextChunk = function() {
20046
- this._checkIsFinished(), b.length ? this.parseChunk(b.shift()) : T = !0;
20047
- }, this._streamData = E(function(R) {
20050
+ this._checkIsFinished(), b.length ? this.parseChunk(b.shift()) : k = !0;
20051
+ }, this._streamData = A(function(R) {
20048
20052
  try {
20049
- b.push(typeof R == "string" ? R : R.toString(this._config.encoding)), T && (T = !1, this._checkIsFinished(), this.parseChunk(b.shift()));
20053
+ b.push(typeof R == "string" ? R : R.toString(this._config.encoding)), k && (k = !1, this._checkIsFinished(), this.parseChunk(b.shift()));
20050
20054
  } catch (I) {
20051
20055
  this._streamError(I);
20052
20056
  }
20053
- }, this), this._streamError = E(function(R) {
20057
+ }, this), this._streamError = A(function(R) {
20054
20058
  this._streamCleanUp(), this._sendError(R);
20055
- }, this), this._streamEnd = E(function() {
20056
- this._streamCleanUp(), A = !0, this._streamData("");
20057
- }, this), this._streamCleanUp = E(function() {
20059
+ }, this), this._streamEnd = A(function() {
20060
+ this._streamCleanUp(), E = !0, this._streamData("");
20061
+ }, this), this._streamCleanUp = A(function() {
20058
20062
  this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
20059
20063
  }, this);
20060
20064
  }
20061
- function y(g) {
20062
- var b, T, A, R = Math.pow(2, 53), I = -R, z = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, G = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, q = this, H = 0, ut = 0, B = !1, et = !1, Pt = [], $ = { data: [], errors: [], meta: {} };
20063
- if (P(g.step)) {
20064
- var F = g.step;
20065
- g.step = function(j) {
20065
+ function y(p) {
20066
+ var b, k, E, R = Math.pow(2, 53), I = -R, z = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, G = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, q = this, H = 0, ut = 0, B = !1, et = !1, Pt = [], $ = { data: [], errors: [], meta: {} };
20067
+ if (P(p.step)) {
20068
+ var F = p.step;
20069
+ p.step = function(j) {
20066
20070
  if ($ = j, Z()) X();
20067
20071
  else {
20068
20072
  if (X(), $.data.length === 0) return;
20069
- H += j.data.length, g.preview && H > g.preview ? T.abort() : ($.data = $.data[0], F($, q));
20073
+ H += j.data.length, p.preview && H > p.preview ? k.abort() : ($.data = $.data[0], F($, q));
20070
20074
  }
20071
20075
  };
20072
20076
  }
20073
20077
  function Y(j) {
20074
- return g.skipEmptyLines === "greedy" ? j.join("").trim() === "" : j.length === 1 && j[0].length === 0;
20078
+ return p.skipEmptyLines === "greedy" ? j.join("").trim() === "" : j.length === 1 && j[0].length === 0;
20075
20079
  }
20076
20080
  function X() {
20077
- return $ && A && (V("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + l.DefaultDelimiter + "'"), A = !1), g.skipEmptyLines && ($.data = $.data.filter(function(j) {
20081
+ return $ && E && (V("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + l.DefaultDelimiter + "'"), E = !1), p.skipEmptyLines && ($.data = $.data.filter(function(j) {
20078
20082
  return !Y(j);
20079
20083
  })), Z() && function() {
20080
20084
  if (!$) return;
20081
20085
  function j(J, Lt) {
20082
- P(g.transformHeader) && (J = g.transformHeader(J, Lt)), Pt.push(J);
20086
+ P(p.transformHeader) && (J = p.transformHeader(J, Lt)), Pt.push(J);
20083
20087
  }
20084
20088
  if (Array.isArray($.data[0])) {
20085
20089
  for (var at = 0; Z() && at < $.data.length; at++) $.data[at].forEach(j);
20086
20090
  $.data.splice(0, 1);
20087
20091
  } else $.data.forEach(j);
20088
20092
  }(), function() {
20089
- if (!$ || !g.header && !g.dynamicTyping && !g.transform) return $;
20093
+ if (!$ || !p.header && !p.dynamicTyping && !p.transform) return $;
20090
20094
  function j(J, Lt) {
20091
- var xt, Ft = g.header ? {} : [];
20095
+ var xt, Ft = p.header ? {} : [];
20092
20096
  for (xt = 0; xt < J.length; xt++) {
20093
20097
  var wt = xt, pt = J[xt];
20094
- g.header && (wt = xt >= Pt.length ? "__parsed_extra" : Pt[xt]), g.transform && (pt = g.transform(pt, wt)), pt = tt(wt, pt), wt === "__parsed_extra" ? (Ft[wt] = Ft[wt] || [], Ft[wt].push(pt)) : Ft[wt] = pt;
20098
+ p.header && (wt = xt >= Pt.length ? "__parsed_extra" : Pt[xt]), p.transform && (pt = p.transform(pt, wt)), pt = tt(wt, pt), wt === "__parsed_extra" ? (Ft[wt] = Ft[wt] || [], Ft[wt].push(pt)) : Ft[wt] = pt;
20095
20099
  }
20096
- return g.header && (xt > Pt.length ? V("FieldMismatch", "TooManyFields", "Too many fields: expected " + Pt.length + " fields but parsed " + xt, ut + Lt) : xt < Pt.length && V("FieldMismatch", "TooFewFields", "Too few fields: expected " + Pt.length + " fields but parsed " + xt, ut + Lt)), Ft;
20100
+ return p.header && (xt > Pt.length ? V("FieldMismatch", "TooManyFields", "Too many fields: expected " + Pt.length + " fields but parsed " + xt, ut + Lt) : xt < Pt.length && V("FieldMismatch", "TooFewFields", "Too few fields: expected " + Pt.length + " fields but parsed " + xt, ut + Lt)), Ft;
20097
20101
  }
20098
20102
  var at = 1;
20099
- return !$.data.length || Array.isArray($.data[0]) ? ($.data = $.data.map(j), at = $.data.length) : $.data = j($.data, 0), g.header && $.meta && ($.meta.fields = Pt), ut += at, $;
20103
+ return !$.data.length || Array.isArray($.data[0]) ? ($.data = $.data.map(j), at = $.data.length) : $.data = j($.data, 0), p.header && $.meta && ($.meta.fields = Pt), ut += at, $;
20100
20104
  }();
20101
20105
  }
20102
20106
  function Z() {
20103
- return g.header && Pt.length === 0;
20107
+ return p.header && Pt.length === 0;
20104
20108
  }
20105
20109
  function tt(j, at) {
20106
- return J = j, g.dynamicTypingFunction && g.dynamicTyping[J] === void 0 && (g.dynamicTyping[J] = g.dynamicTypingFunction(J)), (g.dynamicTyping[J] || g.dynamicTyping) === !0 ? at === "true" || at === "TRUE" || at !== "false" && at !== "FALSE" && (function(Lt) {
20110
+ return J = j, p.dynamicTypingFunction && p.dynamicTyping[J] === void 0 && (p.dynamicTyping[J] = p.dynamicTypingFunction(J)), (p.dynamicTyping[J] || p.dynamicTyping) === !0 ? at === "true" || at === "TRUE" || at !== "false" && at !== "FALSE" && (function(Lt) {
20107
20111
  if (z.test(Lt)) {
20108
20112
  var xt = parseFloat(Lt);
20109
20113
  if (I < xt && xt < R) return !0;
@@ -20117,8 +20121,8 @@ License: MIT
20117
20121
  Lt !== void 0 && (xt.row = Lt), $.errors.push(xt);
20118
20122
  }
20119
20123
  this.parse = function(j, at, J) {
20120
- var Lt = g.quoteChar || '"';
20121
- if (g.newline || (g.newline = function(wt, pt) {
20124
+ var Lt = p.quoteChar || '"';
20125
+ if (p.newline || (p.newline = function(wt, pt) {
20122
20126
  wt = wt.substring(0, 1048576);
20123
20127
  var Jt = new RegExp(x(pt) + "([^]*?)" + x(pt), "gm"), ue = (wt = wt.replace(Jt, "")).split("\r"), Me = wt.split(`
20124
20128
  `), de = 1 < Me.length && Me[0].length < ue[0].length;
@@ -20128,7 +20132,7 @@ License: MIT
20128
20132
  ` && ie++;
20129
20133
  return ie >= ue.length / 2 ? `\r
20130
20134
  ` : "\r";
20131
- }(j, Lt)), A = !1, g.delimiter) P(g.delimiter) && (g.delimiter = g.delimiter(j), $.meta.delimiter = g.delimiter);
20135
+ }(j, Lt)), E = !1, p.delimiter) P(p.delimiter) && (p.delimiter = p.delimiter(j), $.meta.delimiter = p.delimiter);
20132
20136
  else {
20133
20137
  var xt = function(wt, pt, Jt, ue, Me) {
20134
20138
  var de, ie, Ot, Et;
@@ -20143,70 +20147,70 @@ License: MIT
20143
20147
  }
20144
20148
  0 < he.data.length && (Se /= he.data.length - We), (ie === void 0 || sn <= ie) && (Et === void 0 || Et < Se) && 1.99 < Se && (ie = sn, de = yt, Et = Se);
20145
20149
  }
20146
- return { successful: !!(g.delimiter = de), bestDelimiter: de };
20147
- }(j, g.newline, g.skipEmptyLines, g.comments, g.delimitersToGuess);
20148
- xt.successful ? g.delimiter = xt.bestDelimiter : (A = !0, g.delimiter = l.DefaultDelimiter), $.meta.delimiter = g.delimiter;
20150
+ return { successful: !!(p.delimiter = de), bestDelimiter: de };
20151
+ }(j, p.newline, p.skipEmptyLines, p.comments, p.delimitersToGuess);
20152
+ xt.successful ? p.delimiter = xt.bestDelimiter : (E = !0, p.delimiter = l.DefaultDelimiter), $.meta.delimiter = p.delimiter;
20149
20153
  }
20150
- var Ft = k(g);
20151
- return g.preview && g.header && Ft.preview++, b = j, T = new w(Ft), $ = T.parse(b, at, J), X(), B ? { meta: { paused: !0 } } : $ || { meta: { paused: !1 } };
20154
+ var Ft = T(p);
20155
+ return p.preview && p.header && Ft.preview++, b = j, k = new w(Ft), $ = k.parse(b, at, J), X(), B ? { meta: { paused: !0 } } : $ || { meta: { paused: !1 } };
20152
20156
  }, this.paused = function() {
20153
20157
  return B;
20154
20158
  }, this.pause = function() {
20155
- B = !0, T.abort(), b = P(g.chunk) ? "" : b.substring(T.getCharIndex());
20159
+ B = !0, k.abort(), b = P(p.chunk) ? "" : b.substring(k.getCharIndex());
20156
20160
  }, this.resume = function() {
20157
20161
  q.streamer._halted ? (B = !1, q.streamer.parseChunk(b, !0)) : setTimeout(q.resume, 3);
20158
20162
  }, this.aborted = function() {
20159
20163
  return et;
20160
20164
  }, this.abort = function() {
20161
- et = !0, T.abort(), $.meta.aborted = !0, P(g.complete) && g.complete($), b = "";
20165
+ et = !0, k.abort(), $.meta.aborted = !0, P(p.complete) && p.complete($), b = "";
20162
20166
  };
20163
20167
  }
20164
- function x(g) {
20165
- return g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
20168
+ function x(p) {
20169
+ return p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
20166
20170
  }
20167
- function w(g) {
20168
- var b, T = (g = g || {}).delimiter, A = g.newline, R = g.comments, I = g.step, z = g.preview, G = g.fastMode, q = b = g.quoteChar === void 0 || g.quoteChar === null ? '"' : g.quoteChar;
20169
- if (g.escapeChar !== void 0 && (q = g.escapeChar), (typeof T != "string" || -1 < l.BAD_DELIMITERS.indexOf(T)) && (T = ","), R === T) throw new Error("Comment character same as delimiter");
20170
- R === !0 ? R = "#" : (typeof R != "string" || -1 < l.BAD_DELIMITERS.indexOf(R)) && (R = !1), A !== `
20171
- ` && A !== "\r" && A !== `\r
20172
- ` && (A = `
20171
+ function w(p) {
20172
+ var b, k = (p = p || {}).delimiter, E = p.newline, R = p.comments, I = p.step, z = p.preview, G = p.fastMode, q = b = p.quoteChar === void 0 || p.quoteChar === null ? '"' : p.quoteChar;
20173
+ if (p.escapeChar !== void 0 && (q = p.escapeChar), (typeof k != "string" || -1 < l.BAD_DELIMITERS.indexOf(k)) && (k = ","), R === k) throw new Error("Comment character same as delimiter");
20174
+ R === !0 ? R = "#" : (typeof R != "string" || -1 < l.BAD_DELIMITERS.indexOf(R)) && (R = !1), E !== `
20175
+ ` && E !== "\r" && E !== `\r
20176
+ ` && (E = `
20173
20177
  `);
20174
20178
  var H = 0, ut = !1;
20175
20179
  this.parse = function(B, et, Pt) {
20176
20180
  if (typeof B != "string") throw new Error("Input must be a string");
20177
- var $ = B.length, F = T.length, Y = A.length, X = R.length, Z = P(I), tt = [], V = [], j = [], at = H = 0;
20181
+ var $ = B.length, F = k.length, Y = E.length, X = R.length, Z = P(I), tt = [], V = [], j = [], at = H = 0;
20178
20182
  if (!B) return le();
20179
- if (g.header && !et) {
20180
- var J = B.split(A)[0].split(T), Lt = [], xt = {}, Ft = !1;
20183
+ if (p.header && !et) {
20184
+ var J = B.split(E)[0].split(k), Lt = [], xt = {}, Ft = !1;
20181
20185
  for (var wt in J) {
20182
20186
  var pt = J[wt];
20183
- P(g.transformHeader) && (pt = g.transformHeader(pt, wt));
20187
+ P(p.transformHeader) && (pt = p.transformHeader(pt, wt));
20184
20188
  var Jt = pt, ue = xt[pt] || 0;
20185
20189
  for (0 < ue && (Ft = !0, Jt = pt + "_" + ue), xt[pt] = ue + 1; Lt.includes(Jt); ) Jt = Jt + "_" + ue;
20186
20190
  Lt.push(Jt);
20187
20191
  }
20188
20192
  if (Ft) {
20189
- var Me = B.split(A);
20190
- Me[0] = Lt.join(T), B = Me.join(A);
20193
+ var Me = B.split(E);
20194
+ Me[0] = Lt.join(k), B = Me.join(E);
20191
20195
  }
20192
20196
  }
20193
20197
  if (G || G !== !1 && B.indexOf(b) === -1) {
20194
- for (var de = B.split(A), ie = 0; ie < de.length; ie++) {
20195
- if (j = de[ie], H += j.length, ie !== de.length - 1) H += A.length;
20198
+ for (var de = B.split(E), ie = 0; ie < de.length; ie++) {
20199
+ if (j = de[ie], H += j.length, ie !== de.length - 1) H += E.length;
20196
20200
  else if (Pt) return le();
20197
20201
  if (!R || j.substring(0, X) !== R) {
20198
20202
  if (Z) {
20199
- if (tt = [], We(j.split(T)), fe(), ut) return le();
20200
- } else We(j.split(T));
20203
+ if (tt = [], We(j.split(k)), fe(), ut) return le();
20204
+ } else We(j.split(k));
20201
20205
  if (z && z <= ie) return tt = tt.slice(0, z), le(!0);
20202
20206
  }
20203
20207
  }
20204
20208
  return le();
20205
20209
  }
20206
- for (var Ot = B.indexOf(T, H), Et = B.indexOf(A, H), se = new RegExp(x(q) + x(b), "g"), yt = B.indexOf(b, H); ; ) if (B[H] !== b) if (R && j.length === 0 && B.substring(H, H + X) === R) {
20210
+ for (var Ot = B.indexOf(k, H), Et = B.indexOf(E, H), se = new RegExp(x(q) + x(b), "g"), yt = B.indexOf(b, H); ; ) if (B[H] !== b) if (R && j.length === 0 && B.substring(H, H + X) === R) {
20207
20211
  if (Et === -1) return le();
20208
- H = Et + Y, Et = B.indexOf(A, H), Ot = B.indexOf(T, H);
20209
- } else if (Ot !== -1 && (Ot < Et || Et === -1)) j.push(B.substring(H, Ot)), H = Ot + F, Ot = B.indexOf(T, H);
20212
+ H = Et + Y, Et = B.indexOf(E, H), Ot = B.indexOf(k, H);
20213
+ } else if (Ot !== -1 && (Ot < Et || Et === -1)) j.push(B.substring(H, Ot)), H = Ot + F, Ot = B.indexOf(k, H);
20210
20214
  else {
20211
20215
  if (Et === -1) break;
20212
20216
  if (j.push(B.substring(H, Et)), Fe(Et + Y), Z && (fe(), ut)) return le();
@@ -20217,15 +20221,15 @@ License: MIT
20217
20221
  if (yt === $ - 1) return De(B.substring(H, yt).replace(se, b));
20218
20222
  if (b !== q || B[yt + 1] !== q) {
20219
20223
  if (b === q || yt === 0 || B[yt - 1] !== q) {
20220
- Ot !== -1 && Ot < yt + 1 && (Ot = B.indexOf(T, yt + 1)), Et !== -1 && Et < yt + 1 && (Et = B.indexOf(A, yt + 1));
20224
+ Ot !== -1 && Ot < yt + 1 && (Ot = B.indexOf(k, yt + 1)), Et !== -1 && Et < yt + 1 && (Et = B.indexOf(E, yt + 1));
20221
20225
  var sn = he(Et === -1 ? Ot : Math.min(Ot, Et));
20222
- if (B.substr(yt + 1 + sn, F) === T) {
20223
- j.push(B.substring(H, yt).replace(se, b)), B[H = yt + 1 + sn + F] !== b && (yt = B.indexOf(b, H)), Ot = B.indexOf(T, H), Et = B.indexOf(A, H);
20226
+ if (B.substr(yt + 1 + sn, F) === k) {
20227
+ j.push(B.substring(H, yt).replace(se, b)), B[H = yt + 1 + sn + F] !== b && (yt = B.indexOf(b, H)), Ot = B.indexOf(k, H), Et = B.indexOf(E, H);
20224
20228
  break;
20225
20229
  }
20226
20230
  var Se = he(Et);
20227
- if (B.substring(yt + 1 + Se, yt + 1 + Se + Y) === A) {
20228
- if (j.push(B.substring(H, yt).replace(se, b)), Fe(yt + 1 + Se + Y), Ot = B.indexOf(T, H), yt = B.indexOf(b, H), Z && (fe(), ut)) return le();
20231
+ if (B.substring(yt + 1 + Se, yt + 1 + Se + Y) === E) {
20232
+ if (j.push(B.substring(H, yt).replace(se, b)), Fe(yt + 1 + Se + Y), Ot = B.indexOf(k, H), yt = B.indexOf(b, H), Z && (fe(), ut)) return le();
20229
20233
  if (z && tt.length >= z) return le(!0);
20230
20234
  break;
20231
20235
  }
@@ -20249,10 +20253,10 @@ License: MIT
20249
20253
  return Pt || (Yt === void 0 && (Yt = B.substring(H)), j.push(Yt), H = $, We(j), Z && fe()), le();
20250
20254
  }
20251
20255
  function Fe(Yt) {
20252
- H = Yt, We(j), j = [], Et = B.indexOf(A, H);
20256
+ H = Yt, We(j), j = [], Et = B.indexOf(E, H);
20253
20257
  }
20254
20258
  function le(Yt) {
20255
- return { data: tt, errors: V, meta: { delimiter: T, linebreak: A, aborted: ut, truncated: !!Yt, cursor: at + (et || 0) } };
20259
+ return { data: tt, errors: V, meta: { delimiter: k, linebreak: E, aborted: ut, truncated: !!Yt, cursor: at + (et || 0) } };
20256
20260
  }
20257
20261
  function fe() {
20258
20262
  I(le()), tt = [], V = [];
@@ -20263,49 +20267,49 @@ License: MIT
20263
20267
  return H;
20264
20268
  };
20265
20269
  }
20266
- function M(g) {
20267
- var b = g.data, T = a[b.workerId], A = !1;
20268
- if (b.error) T.userError(b.error, b.file);
20270
+ function M(p) {
20271
+ var b = p.data, k = a[b.workerId], E = !1;
20272
+ if (b.error) k.userError(b.error, b.file);
20269
20273
  else if (b.results && b.results.data) {
20270
20274
  var R = { abort: function() {
20271
- A = !0, D(b.workerId, { data: [], errors: [], meta: { aborted: !0 } });
20275
+ E = !0, D(b.workerId, { data: [], errors: [], meta: { aborted: !0 } });
20272
20276
  }, pause: S, resume: S };
20273
- if (P(T.userStep)) {
20274
- for (var I = 0; I < b.results.data.length && (T.userStep({ data: b.results.data[I], errors: b.results.errors, meta: b.results.meta }, R), !A); I++) ;
20277
+ if (P(k.userStep)) {
20278
+ for (var I = 0; I < b.results.data.length && (k.userStep({ data: b.results.data[I], errors: b.results.errors, meta: b.results.meta }, R), !E); I++) ;
20275
20279
  delete b.results;
20276
- } else P(T.userChunk) && (T.userChunk(b.results, R, b.file), delete b.results);
20280
+ } else P(k.userChunk) && (k.userChunk(b.results, R, b.file), delete b.results);
20277
20281
  }
20278
- b.finished && !A && D(b.workerId, b.results);
20282
+ b.finished && !E && D(b.workerId, b.results);
20279
20283
  }
20280
- function D(g, b) {
20281
- var T = a[g];
20282
- P(T.userComplete) && T.userComplete(b), T.terminate(), delete a[g];
20284
+ function D(p, b) {
20285
+ var k = a[p];
20286
+ P(k.userComplete) && k.userComplete(b), k.terminate(), delete a[p];
20283
20287
  }
20284
20288
  function S() {
20285
20289
  throw new Error("Not implemented.");
20286
20290
  }
20287
- function k(g) {
20288
- if (typeof g != "object" || g === null) return g;
20289
- var b = Array.isArray(g) ? [] : {};
20290
- for (var T in g) b[T] = k(g[T]);
20291
+ function T(p) {
20292
+ if (typeof p != "object" || p === null) return p;
20293
+ var b = Array.isArray(p) ? [] : {};
20294
+ for (var k in p) b[k] = T(p[k]);
20291
20295
  return b;
20292
20296
  }
20293
- function E(g, b) {
20297
+ function A(p, b) {
20294
20298
  return function() {
20295
- g.apply(b, arguments);
20299
+ p.apply(b, arguments);
20296
20300
  };
20297
20301
  }
20298
- function P(g) {
20299
- return typeof g == "function";
20302
+ function P(p) {
20303
+ return typeof p == "function";
20300
20304
  }
20301
- return r && (i.onmessage = function(g) {
20302
- var b = g.data;
20305
+ return r && (i.onmessage = function(p) {
20306
+ var b = p.data;
20303
20307
  if (l.WORKER_ID === void 0 && b && (l.WORKER_ID = b.workerId), typeof b.input == "string") i.postMessage({ workerId: l.WORKER_ID, results: l.parse(b.input, b.config), finished: !0 });
20304
20308
  else if (i.File && b.input instanceof File || b.input instanceof Object) {
20305
- var T = l.parse(b.input, b.config);
20306
- T && i.postMessage({ workerId: l.WORKER_ID, results: T, finished: !0 });
20309
+ var k = l.parse(b.input, b.config);
20310
+ k && i.postMessage({ workerId: l.WORKER_ID, results: k, finished: !0 });
20307
20311
  }
20308
- }), (d.prototype = Object.create(u.prototype)).constructor = d, (h.prototype = Object.create(u.prototype)).constructor = h, (f.prototype = Object.create(f.prototype)).constructor = f, (p.prototype = Object.create(u.prototype)).constructor = p, l;
20312
+ }), (d.prototype = Object.create(u.prototype)).constructor = d, (h.prototype = Object.create(u.prototype)).constructor = h, (f.prototype = Object.create(f.prototype)).constructor = f, (g.prototype = Object.create(u.prototype)).constructor = g, l;
20309
20313
  });
20310
20314
  })(Dg);
20311
20315
  var cT = Dg.exports;
@@ -20462,19 +20466,19 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20462
20466
  })), h = () => {
20463
20467
  s("toggleModal", !1);
20464
20468
  }, f = U(() => {
20465
- var k, E, P;
20466
- if (!o.value || !((k = i.chartData) != null && k.meta.metric_names))
20469
+ var T, A, P;
20470
+ if (!o.value || !((T = i.chartData) != null && T.meta.metric_names))
20467
20471
  return { headers: [], rows: [], csvHeaders: {} };
20468
- const y = i.chartData.data.some((g) => g.timestamp !== i.chartData.data[0].timestamp), x = i.chartData.data.map((g) => {
20469
- const b = new Date(g.timestamp);
20472
+ const y = i.chartData.data.some((p) => p.timestamp !== i.chartData.data[0].timestamp), x = i.chartData.data.map((p) => {
20473
+ const b = new Date(p.timestamp);
20470
20474
  return {
20471
- ...Object.keys(g.event).reduce((A, R) => {
20475
+ ...Object.keys(p.event).reduce((E, R) => {
20472
20476
  if (R in i.chartData.meta.display) {
20473
- const I = g.event[R], z = i.chartData.meta.display[R];
20474
- A[R] = I && z && z[I].name || g.event[R];
20477
+ const I = p.event[R], z = i.chartData.meta.display[R];
20478
+ E[R] = I && z && z[I].name || p.event[R];
20475
20479
  } else
20476
- A[R] = g.event[R];
20477
- return A;
20480
+ E[R] = p.event[R];
20481
+ return E;
20478
20482
  }, {}),
20479
20483
  ...y ? {
20480
20484
  timestamp: ml(b, "yyyy-MM-dd HH:mm:ss"),
@@ -20487,27 +20491,27 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20487
20491
  { label: e.t("csvExport.Timestamp"), key: "timestamp" },
20488
20492
  { label: e.t("csvExport.UtcOffset"), key: "tzOffset" }
20489
20493
  ]);
20490
- const M = "display" in i.chartData.meta && ((E = i.chartData.meta) != null && E.display) ? (P = i.chartData.meta) == null ? void 0 : P.display : {}, D = [
20494
+ const M = "display" in i.chartData.meta && ((A = i.chartData.meta) != null && A.display) ? (P = i.chartData.meta) == null ? void 0 : P.display : {}, D = [
20491
20495
  ...w,
20492
20496
  // `dimensions` are present in v1 and v2 explore meta
20493
- ...Object.keys(M).map((g) => ({
20497
+ ...Object.keys(M).map((p) => ({
20494
20498
  // @ts-ignore - dynamic i18n key
20495
- label: e.t(`chartLabels.${g}`),
20496
- key: g
20499
+ label: e.t(`chartLabels.${p}`),
20500
+ key: p
20497
20501
  })),
20498
20502
  // `metricNames` are common to all explore versions
20499
- ...i.chartData.meta.metric_names.map((g) => ({
20503
+ ...i.chartData.meta.metric_names.map((p) => ({
20500
20504
  // @ts-ignore - dynamic i18n key
20501
- label: e.t(`chartLabels.${g}`),
20502
- key: g
20505
+ label: e.t(`chartLabels.${p}`),
20506
+ key: p
20503
20507
  }))
20504
- ], S = D.reduce((g, b) => (g[b.key] = b.label, g), {});
20508
+ ], S = D.reduce((p, b) => (p[b.key] = b.label, p), {});
20505
20509
  return {
20506
20510
  headers: D,
20507
20511
  csvHeaders: S,
20508
20512
  rows: x
20509
20513
  };
20510
- }), p = async () => {
20514
+ }), g = async () => {
20511
20515
  const { rows: y } = f.value;
20512
20516
  return a.value = !1, {
20513
20517
  total: Number(y.length) || 0,
@@ -20529,7 +20533,7 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20529
20533
  onKeyup: Rg(h, ["esc"])
20530
20534
  }, {
20531
20535
  default: Wt(() => {
20532
- var k;
20536
+ var T;
20533
20537
  return [
20534
20538
  bt("div", null, [
20535
20539
  o.value ? (nt(), _t("div", gT, [
@@ -20538,9 +20542,9 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20538
20542
  ])) : Kt("", !0),
20539
20543
  ne(M, {
20540
20544
  class: "vitals-table",
20541
- fetcher: p,
20545
+ fetcher: g,
20542
20546
  "fetcher-cache-key": String(l.value),
20543
- headers: ((k = f.value) == null ? void 0 : k.headers) || [],
20547
+ headers: ((T = f.value) == null ? void 0 : T.headers) || [],
20544
20548
  "hide-pagination": "",
20545
20549
  "row-hover": !1,
20546
20550
  sortable: !1
@@ -20759,7 +20763,7 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20759
20763
  }), d = U(() => e.showLegendValues && e.legendPosition !== $t.Bottom), { legendValues: h } = vt.useChartLegendValues(l, e.chartOptions.type, u), f = U(() => {
20760
20764
  var I, z, G;
20761
20765
  return ((G = (z = (I = e.chartData) == null ? void 0 : I.meta) == null ? void 0 : z.limit) == null ? void 0 : G.toString()) || null;
20762
- }), p = U(() => {
20766
+ }), g = U(() => {
20763
20767
  var I, z;
20764
20768
  return ((z = (I = e.chartData) == null ? void 0 : I.meta) == null ? void 0 : z.truncated) || !1;
20765
20769
  }), y = s.t("limitedResultsShown", { maxReturned: f.value }), x = U(() => [
@@ -20779,26 +20783,26 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20779
20783
  return ((H = e.chartOptions) == null ? void 0 : H.metricAxesTitle) || s.te(`metricAxisTitles.${I}`) && s.te(`chartUnits.${z}`) && // @ts-ignore - dynamic i18n key
20780
20784
  // Metric units are always pluralized on the axis.
20781
20785
  s.t(`metricAxisTitles.${I}`, { unit: s.t(`chartUnits.${z}`, { plural: "s" }) }) || void 0;
20782
- }), k = U(() => {
20786
+ }), T = U(() => {
20783
20787
  const I = w.value ? "Time" : Object.keys(e.chartData.meta.display || e.chartData.meta.metric_names)[0];
20784
20788
  return e.chartOptions.dimensionAxesTitle || s.te(`chartLabels.${I}`) && // @ts-ignore - dynamic i18n key
20785
20789
  s.t(`chartLabels.${I}`) || void 0;
20786
- }), E = U(() => {
20790
+ }), A = U(() => {
20787
20791
  const I = Yo(Number(e.chartData.meta.granularity_ms));
20788
20792
  return s.t(`granularityAxisTitles.${I}`);
20789
- }), P = U(() => e.emptyStateTitle || s.t("noDataAvailableTitle")), g = U(() => e.emptyStateDescription || s.t("noDataAvailableDescription")), b = U(() => w.value ? Xw(l.value) : e.chartData && e.chartData.meta && e.chartData.data.length), T = U(() => e.chartData.meta.granularity_ms ? Yo(e.chartData.meta.granularity_ms) || "hourly" : Yo(
20793
+ }), P = U(() => e.emptyStateTitle || s.t("noDataAvailableTitle")), p = U(() => e.emptyStateDescription || s.t("noDataAvailableDescription")), b = U(() => w.value ? Xw(l.value) : e.chartData && e.chartData.meta && e.chartData.data.length), k = U(() => e.chartData.meta.granularity_ms ? Yo(e.chartData.meta.granularity_ms) || "hourly" : Yo(
20790
20794
  new Date(e.chartData.data[1].timestamp).getTime() - new Date(e.chartData.data[0].timestamp).getTime()
20791
- ) || "hourly"), A = U(() => e.chartOptions.chartLegendSortFn ? e.chartOptions.chartLegendSortFn : (I, z) => I.text === s.t("chartLabels.____OTHER____") ? 1 : z.text === s.t("chartLabels.____OTHER____") ? -1 : !isNaN(parseInt(I.text, 10)) && !isNaN(parseInt(z.text, 10)) ? I.text < z.text ? -1 : 1 : I.value && z.value ? z.value.raw - I.value.raw : 0), R = U(() => e.chartOptions.chartTooltipSortFn ? e.chartOptions.chartTooltipSortFn : (I, z) => I.label === s.t("chartLabels.____OTHER____") ? 1 : z.label === s.t("chartLabels.____OTHER____") ? -1 : !isNaN(parseInt(I.label, 10)) && !isNaN(parseInt(z.label, 10)) ? I.label < z.label ? -1 : 1 : I.value && z.value ? z.rawValue - I.rawValue : 0);
20795
+ ) || "hourly"), E = U(() => e.chartOptions.chartLegendSortFn ? e.chartOptions.chartLegendSortFn : (I, z) => I.text === s.t("chartLabels.____OTHER____") ? 1 : z.text === s.t("chartLabels.____OTHER____") ? -1 : !isNaN(parseInt(I.text, 10)) && !isNaN(parseInt(z.text, 10)) ? I.text < z.text ? -1 : 1 : I.value && z.value ? z.value.raw - I.value.raw : 0), R = U(() => e.chartOptions.chartTooltipSortFn ? e.chartOptions.chartTooltipSortFn : (I, z) => I.label === s.t("chartLabels.____OTHER____") ? 1 : z.label === s.t("chartLabels.____OTHER____") ? -1 : !isNaN(parseInt(I.label, 10)) && !isNaN(parseInt(z.label, 10)) ? I.label < z.label ? -1 : 1 : I.value && z.value ? z.rawValue - I.rawValue : 0);
20792
20796
  return wc("showLegendValues", d), wc("legendPosition", At(e, "legendPosition")), (I, z) => {
20793
20797
  const G = qe("KTooltip"), q = qe("KEmptyState");
20794
20798
  return nt(), _t("div", bT, [
20795
- b.value && p.value && f.value || !ht(a) && (n.allowCsvExport || e.chartTitle) ? (nt(), _t("div", _T, [
20799
+ b.value && g.value && f.value || !ht(a) && (n.allowCsvExport || e.chartTitle) ? (nt(), _t("div", _T, [
20796
20800
  n.chartTitle ? (nt(), _t("div", {
20797
20801
  key: 0,
20798
20802
  class: "chart-title",
20799
20803
  title: n.chartTitle
20800
20804
  }, mt(n.chartTitle), 9, xT)) : Kt("", !0),
20801
- b.value && p.value && f.value ? (nt(), _t("div", wT, [
20805
+ b.value && g.value && f.value ? (nt(), _t("div", wT, [
20802
20806
  ne(G, {
20803
20807
  class: "tooltip",
20804
20808
  "max-width": "500",
@@ -20828,11 +20832,11 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20828
20832
  w.value ? (nt(), xe(Ck, {
20829
20833
  key: 0,
20830
20834
  "chart-data": l.value,
20831
- "chart-legend-sort-fn": A.value,
20835
+ "chart-legend-sort-fn": E.value,
20832
20836
  "chart-tooltip-sort-fn": R.value,
20833
- "dimension-axes-title": E.value,
20837
+ "dimension-axes-title": A.value,
20834
20838
  fill: n.chartOptions.stacked,
20835
- granularity: T.value,
20839
+ granularity: k.value,
20836
20840
  "legend-values": ht(h),
20837
20841
  "metric-axes-title": S.value,
20838
20842
  "metric-unit": u.value,
@@ -20848,10 +20852,10 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20848
20852
  key: 1,
20849
20853
  annotations: n.showAnnotations,
20850
20854
  "chart-data": l.value,
20851
- "chart-legend-sort-fn": A.value,
20855
+ "chart-legend-sort-fn": E.value,
20852
20856
  "chart-tooltip-sort-fn": R.value,
20853
20857
  "data-testid": "bar-chart-container",
20854
- "dimension-axes-title": k.value,
20858
+ "dimension-axes-title": T.value,
20855
20859
  "legend-values": ht(h),
20856
20860
  "metric-axes-title": S.value,
20857
20861
  "metric-unit": u.value,
@@ -20879,7 +20883,7 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20879
20883
  Ve(mt(P.value), 1)
20880
20884
  ]),
20881
20885
  default: Wt(() => [
20882
- Ve(mt(g.value), 1)
20886
+ Ve(mt(p.value), 1)
20883
20887
  ]),
20884
20888
  _: 1
20885
20889
  }))
@@ -20935,7 +20939,7 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20935
20939
  }
20936
20940
  },
20937
20941
  setup(n) {
20938
- const t = n, { i18n: e } = vt.useI18n(), i = dt(Xn()), s = U(() => [t.chartData.datasets.reduce((p, y) => (p.labels.push(y.label), p.borderColor.push(y.backgroundColor), p.backgroundColor.push(y.backgroundColor), p.data.push(y.data.reduce((x, w) => x + w, 0)), p), { labels: [], backgroundColor: [], borderColor: [], data: [] })]), r = U(() => ({
20942
+ const t = n, { i18n: e } = vt.useI18n(), i = dt(Xn()), s = U(() => [t.chartData.datasets.reduce((g, y) => (g.labels.push(y.label), g.borderColor.push(y.backgroundColor), g.backgroundColor.push(y.backgroundColor), g.data.push(y.data.reduce((x, w) => x + w, 0)), g), { labels: [], backgroundColor: [], borderColor: [], data: [] })]), r = U(() => ({
20939
20943
  ...t.chartData,
20940
20944
  datasets: s.value
20941
20945
  }));
@@ -20957,13 +20961,13 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
20957
20961
  var f;
20958
20962
  return Xs((f = s == null ? void 0 : s.value[0]) == null ? void 0 : f.data[t.numerator], { capital: !0 });
20959
20963
  }), c = U(() => {
20960
- var f, p;
20961
- return Xs(((f = s == null ? void 0 : s.value[0]) == null ? void 0 : f.data[0]) + ((p = s == null ? void 0 : s.value[0]) == null ? void 0 : p.data[1]), { capital: !0 });
20964
+ var f, g;
20965
+ return Xs(((f = s == null ? void 0 : s.value[0]) == null ? void 0 : f.data[0]) + ((g = s == null ? void 0 : s.value[0]) == null ? void 0 : g.data[1]), { capital: !0 });
20962
20966
  }), u = U(() => {
20963
20967
  var f;
20964
20968
  return `color: ${(f = s == null ? void 0 : s.value[0]) == null ? void 0 : f.backgroundColor[t.numerator]}`;
20965
20969
  }), d = U(() => ["full", "single"].includes(t.metricDisplay)), h = U(() => t.metricDisplay === "full");
20966
- return (f, p) => (nt(), _t("div", DT, [
20970
+ return (f, g) => (nt(), _t("div", DT, [
20967
20971
  bt("div", kT, [
20968
20972
  d.value ? (nt(), _t("div", {
20969
20973
  key: 0,
@@ -21110,14 +21114,14 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
21110
21114
  },
21111
21115
  setup(n) {
21112
21116
  const t = n, { i18n: e } = vt.useI18n(), i = U(() => t.data.data), s = U(() => {
21113
- var p;
21114
- return !!((p = i.value) != null && p.length);
21117
+ var g;
21118
+ return !!((g = i.value) != null && g.length);
21115
21119
  }), r = U(() => {
21116
- var p, y;
21117
- return (p = t.data.meta) != null && p.display && ((y = Object.keys(t.data.meta.display)) == null ? void 0 : y[0]) || "";
21120
+ var g, y;
21121
+ return (g = t.data.meta) != null && g.display && ((y = Object.keys(t.data.meta.display)) == null ? void 0 : y[0]) || "";
21118
21122
  }), a = U(() => r.value ? t.data.meta.display[r.value] : {}), o = U(() => {
21119
- var p, y;
21120
- return (y = (p = t.data.meta) == null ? void 0 : p.metric_names) != null && y.length ? t.data.meta.metric_names[0] : "";
21123
+ var g, y;
21124
+ return (y = (g = t.data.meta) == null ? void 0 : g.metric_names) != null && y.length ? t.data.meta.metric_names[0] : "";
21121
21125
  }), l = U(() => o.value ? e.t(`chartLabels.${o.value}`) || o.value : ""), c = U(() => {
21122
21126
  if (!s.value)
21123
21127
  return "";
@@ -21128,22 +21132,22 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
21128
21132
  return e.t("topNTable.errors.metricNames");
21129
21133
  } else return e.t("topNTable.errors.meta");
21130
21134
  return "";
21131
- }), u = (p) => {
21132
- const y = p.event;
21135
+ }), u = (g) => {
21136
+ const y = g.event;
21133
21137
  return String(y[r.value]);
21134
- }, d = (p) => {
21135
- const y = u(p), x = a.value && a.value[y];
21138
+ }, d = (g) => {
21139
+ const y = u(g), x = a.value && a.value[y];
21136
21140
  return x ? x.name : "-";
21137
- }, h = (p) => {
21138
- const y = u(p), x = a.value && a.value[y];
21141
+ }, h = (g) => {
21142
+ const y = u(g), x = a.value && a.value[y];
21139
21143
  return x ? !!x.deleted : !1;
21140
- }, f = (p) => {
21144
+ }, f = (g) => {
21141
21145
  if (!o.value)
21142
21146
  return "–";
21143
- const x = p.event[o.value];
21147
+ const x = g.event[o.value];
21144
21148
  return x ? Xs(x, { capital: !0, round: !0 }) : "–";
21145
21149
  };
21146
- return (p, y) => {
21150
+ return (g, y) => {
21147
21151
  const x = qe("KEmptyState"), w = qe("KSkeleton"), M = qe("KCard");
21148
21152
  return nt(), xe(M, {
21149
21153
  class: "kong-ui-public-top-n-table",
@@ -21181,7 +21185,7 @@ const uT = ["id"], dT = /* @__PURE__ */ we({
21181
21185
  "data-testid": `row-${u(D)}`
21182
21186
  }, [
21183
21187
  bt("div", YT, [
21184
- Pl(p.$slots, "name", {
21188
+ Pl(g.$slots, "name", {
21185
21189
  record: {
21186
21190
  id: u(D),
21187
21191
  name: d(D),