@kong-ui-public/analytics-chart 10.25.6 → 10.25.7

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.
@@ -4874,7 +4874,7 @@ class $r extends sn {
4874
4874
  }
4875
4875
  const j = Ot(r.ticks.maxTicksLimit, g), nt = Math.max(1, Math.ceil(g / j));
4876
4876
  for (U = 0; U < g; U += nt) {
4877
- const X = this.getContext(U), J = s.setContext(X), rt = c.setContext(X), st = J.lineWidth, at = J.color, B = rt.dash || [], V = rt.dashOffset, Z = J.tickWidth, pt = J.tickColor, mt = J.tickBorderDash || [], it = J.tickBorderDashOffset;
4877
+ const X = this.getContext(U), J = s.setContext(X), rt = c.setContext(X), st = J.lineWidth, at = J.color, B = rt.dash || [], V = rt.dashOffset, Z = J.tickWidth, mt = J.tickColor, gt = J.tickBorderDash || [], it = J.tickBorderDashOffset;
4878
4878
  P = mO(this, U, u), P !== void 0 && (E = Ar(i, P, st), d ? F = S = k = H = E : L = M = I = tt = E, y.push({
4879
4879
  tx1: F,
4880
4880
  ty1: L,
@@ -4889,8 +4889,8 @@ class $r extends sn {
4889
4889
  borderDash: B,
4890
4890
  borderDashOffset: V,
4891
4891
  tickWidth: Z,
4892
- tickColor: pt,
4893
- tickBorderDash: mt,
4892
+ tickColor: mt,
4893
+ tickBorderDash: gt,
4894
4894
  tickBorderDashOffset: it
4895
4895
  }));
4896
4896
  }
@@ -4937,31 +4937,31 @@ class $r extends sn {
4937
4937
  a ? (E = S, L === "inner" && (C === A - 1 ? at = this.options.reverse ? "left" : "right" : C === 0 ? at = this.options.reverse ? "right" : "left" : at = "center"), r === "top" ? d === "near" || x !== 0 ? H = -I * k + k / 2 : d === "center" ? H = -j.highest.height / 2 - X * k + k : H = -j.highest.height + k / 2 : d === "near" || x !== 0 ? H = k / 2 : d === "center" ? H = j.highest.height / 2 - X * k : H = j.highest.height - I * k, g && (H *= -1), x !== 0 && !nt.showLabelBackdrop && (E += k / 2 * Math.sin(x))) : (F = S, H = (1 - I) * k / 2);
4938
4938
  let B;
4939
4939
  if (nt.showLabelBackdrop) {
4940
- const V = Ee(nt.backdropPadding), Z = j.heights[C], pt = j.widths[C];
4941
- let mt = H - V.top, it = 0 - V.left;
4940
+ const V = Ee(nt.backdropPadding), Z = j.heights[C], mt = j.widths[C];
4941
+ let gt = H - V.top, it = 0 - V.left;
4942
4942
  switch (tt) {
4943
4943
  case "middle":
4944
- mt -= Z / 2;
4944
+ gt -= Z / 2;
4945
4945
  break;
4946
4946
  case "bottom":
4947
- mt -= Z;
4947
+ gt -= Z;
4948
4948
  break;
4949
4949
  }
4950
4950
  switch (L) {
4951
4951
  case "center":
4952
- it -= pt / 2;
4952
+ it -= mt / 2;
4953
4953
  break;
4954
4954
  case "right":
4955
- it -= pt;
4955
+ it -= mt;
4956
4956
  break;
4957
4957
  case "inner":
4958
- C === A - 1 ? it -= pt : C > 0 && (it -= pt / 2);
4958
+ C === A - 1 ? it -= mt : C > 0 && (it -= mt / 2);
4959
4959
  break;
4960
4960
  }
4961
4961
  B = {
4962
4962
  left: it,
4963
- top: mt,
4964
- width: pt + V.width,
4963
+ top: gt,
4964
+ width: mt + V.width,
4965
4965
  height: Z + V.height,
4966
4966
  color: nt.backdropColor
4967
4967
  };
@@ -14533,8 +14533,8 @@ function SL() {
14533
14533
  return y0 || (y0 = 1, (function(n, t) {
14534
14534
  var e = 200, i = "__lodash_hash_undefined__", r = 9007199254740991, s = "[object Arguments]", a = "[object Array]", c = "[object Boolean]", u = "[object Date]", d = "[object Error]", f = "[object Function]", g = "[object GeneratorFunction]", m = "[object Map]", y = "[object Number]", b = "[object Object]", x = "[object Promise]", w = "[object RegExp]", C = "[object Set]", A = "[object String]", U = "[object Symbol]", P = "[object WeakMap]", E = "[object ArrayBuffer]", F = "[object DataView]", L = "[object Float32Array]", S = "[object Float64Array]", M = "[object Int8Array]", k = "[object Int16Array]", I = "[object Int32Array]", H = "[object Uint8Array]", tt = "[object Uint8ClampedArray]", j = "[object Uint16Array]", nt = "[object Uint32Array]", X = /[\\^$.*+?()[\]{}|]/g, J = /\w*$/, rt = /^\[object .+?Constructor\]$/, st = /^(?:0|[1-9]\d*)$/, at = {};
14535
14535
  at[s] = at[a] = at[E] = at[F] = at[c] = at[u] = at[L] = at[S] = at[M] = at[k] = at[I] = at[m] = at[y] = at[b] = at[w] = at[C] = at[A] = at[U] = at[H] = at[tt] = at[j] = at[nt] = !0, at[d] = at[f] = at[P] = !1;
14536
- var B = typeof Bl == "object" && Bl && Bl.Object === Object && Bl, V = typeof self == "object" && self && self.Object === Object && self, Z = B || V || Function("return this")(), pt = t && !t.nodeType && t, mt = pt && !0 && n && !n.nodeType && n, it = mt && mt.exports === pt;
14537
- function gt(D, W) {
14536
+ var B = typeof Bl == "object" && Bl && Bl.Object === Object && Bl, V = typeof self == "object" && self && self.Object === Object && self, Z = B || V || Function("return this")(), mt = t && !t.nodeType && t, gt = mt && !0 && n && !n.nodeType && n, it = gt && gt.exports === mt;
14537
+ function pt(D, W) {
14538
14538
  return D.set(W[0], W[1]), D;
14539
14539
  }
14540
14540
  function ht(D, W) {
@@ -14801,7 +14801,7 @@ function SL() {
14801
14801
  }
14802
14802
  function nu(D, W, Q) {
14803
14803
  var bt = W ? Q(Pt(D), !0) : Pt(D);
14804
- return ut(bt, gt, new D.constructor());
14804
+ return ut(bt, pt, new D.constructor());
14805
14805
  }
14806
14806
  function Oa(D) {
14807
14807
  var W = new D.constructor(D.source, J.exec(D));
@@ -16892,9 +16892,9 @@ function Hz(n, t = {}) {
16892
16892
  margin: (r = Kt(M.margin)) !== null && r !== void 0 ? r : Hl.margin,
16893
16893
  direction: (s = M.direction) !== null && s !== void 0 ? s : Hl.direction
16894
16894
  } : Hl, I = (B) => typeof B == "number" ? [B, B] : [B.x, B.y], H = (B, V, Z) => {
16895
- const { clientWidth: pt, clientHeight: mt, scrollLeft: it, scrollTop: gt, scrollWidth: ht, scrollHeight: ft } = B, [_t, ut] = I(k.margin), [Ft, Yt] = I(k.speed);
16895
+ const { clientWidth: mt, clientHeight: gt, scrollLeft: it, scrollTop: pt, scrollWidth: ht, scrollHeight: ft } = B, [_t, ut] = I(k.margin), [Ft, Yt] = I(k.speed);
16896
16896
  let Mt = 0, Pt = 0;
16897
- (k.direction === "x" || k.direction === "both") && (Z.x < _t && it > 0 ? Mt = -Ft : Z.x + V.width > pt - _t && it < ht - pt && (Mt = Ft)), (k.direction === "y" || k.direction === "both") && (Z.y < ut && gt > 0 ? Pt = -Yt : Z.y + V.height > mt - ut && gt < ft - mt && (Pt = Yt)), (Mt || Pt) && B.scrollBy({
16897
+ (k.direction === "x" || k.direction === "both") && (Z.x < _t && it > 0 ? Mt = -Ft : Z.x + V.width > mt - _t && it < ht - mt && (Mt = Ft)), (k.direction === "y" || k.direction === "both") && (Z.y < ut && pt > 0 ? Pt = -Yt : Z.y + V.height > gt - ut && pt < ft - gt && (Pt = Yt)), (Mt || Pt) && B.scrollBy({
16898
16898
  left: Mt,
16899
16899
  top: Pt,
16900
16900
  behavior: "auto"
@@ -16904,34 +16904,34 @@ function Hz(n, t = {}) {
16904
16904
  const j = () => {
16905
16905
  const B = Kt(w);
16906
16906
  B && !tt && (tt = setInterval(() => {
16907
- const V = Kt(n).getBoundingClientRect(), { x: Z, y: pt } = E.value, mt = {
16907
+ const V = Kt(n).getBoundingClientRect(), { x: Z, y: mt } = E.value, gt = {
16908
16908
  x: Z - B.scrollLeft,
16909
- y: pt - B.scrollTop
16909
+ y: mt - B.scrollTop
16910
16910
  };
16911
- mt.x >= 0 && mt.y >= 0 && (H(B, V, mt), mt.x += B.scrollLeft, mt.y += B.scrollTop, E.value = mt);
16911
+ gt.x >= 0 && gt.y >= 0 && (H(B, V, gt), gt.x += B.scrollLeft, gt.y += B.scrollTop, E.value = gt);
16912
16912
  }, 1e3 / 60));
16913
16913
  }, nt = () => {
16914
16914
  tt && (clearInterval(tt), tt = null);
16915
- }, X = (B, V, Z, pt) => {
16916
- const [mt, it] = typeof Z == "number" ? [Z, Z] : [Z.x, Z.y], { clientWidth: gt, clientHeight: ht } = V;
16917
- return B.x < mt || B.x + pt.width > gt - mt || B.y < it || B.y + pt.height > ht - it;
16915
+ }, X = (B, V, Z, mt) => {
16916
+ const [gt, it] = typeof Z == "number" ? [Z, Z] : [Z.x, Z.y], { clientWidth: pt, clientHeight: ht } = V;
16917
+ return B.x < gt || B.x + mt.width > pt - gt || B.y < it || B.y + mt.height > ht - it;
16918
16918
  }, J = () => {
16919
16919
  if (Kt(t.disabled) || !F.value) return;
16920
16920
  const B = Kt(w);
16921
16921
  if (!B) return;
16922
- const V = Kt(n).getBoundingClientRect(), { x: Z, y: pt } = E.value;
16923
- X({
16922
+ const V = Kt(n).getBoundingClientRect(), { x: Z, y: mt } = E.value, gt = {
16924
16923
  x: Z - B.scrollLeft,
16925
- y: pt - B.scrollTop
16926
- }, B, k.margin, V) ? j() : nt();
16924
+ y: mt - B.scrollTop
16925
+ };
16926
+ X(gt, B, k.margin, V) ? j() : nt();
16927
16927
  };
16928
16928
  Kt(P) && Ue(E, J);
16929
16929
  const rt = (B) => {
16930
16930
  var V;
16931
16931
  if (!Kt(A).includes(B.button) || Kt(t.disabled) || !L(B) || Kt(d) && B.target !== Kt(n)) return;
16932
- const Z = Kt(w), pt = Z == null || (V = Z.getBoundingClientRect) === null || V === void 0 ? void 0 : V.call(Z), mt = Kt(n).getBoundingClientRect(), it = {
16933
- x: B.clientX - (Z ? mt.left - pt.left + (P ? 0 : Z.scrollLeft) : mt.left),
16934
- y: B.clientY - (Z ? mt.top - pt.top + (P ? 0 : Z.scrollTop) : mt.top)
16932
+ const Z = Kt(w), mt = Z == null || (V = Z.getBoundingClientRect) === null || V === void 0 ? void 0 : V.call(Z), gt = Kt(n).getBoundingClientRect(), it = {
16933
+ x: B.clientX - (Z ? gt.left - mt.left + (P ? 0 : Z.scrollLeft) : gt.left),
16934
+ y: B.clientY - (Z ? gt.top - mt.top + (P ? 0 : Z.scrollTop) : gt.top)
16935
16935
  };
16936
16936
  m?.(it, B) !== !1 && (F.value = it, S(B));
16937
16937
  }, st = (B) => {
@@ -16939,23 +16939,23 @@ function Hz(n, t = {}) {
16939
16939
  const V = Kt(w);
16940
16940
  V instanceof HTMLElement && Bz(V);
16941
16941
  const Z = Kt(n).getBoundingClientRect();
16942
- let { x: pt, y: mt } = E.value;
16943
- if ((b === "x" || b === "both") && (pt = B.clientX - F.value.x, V && (pt = Math.min(Math.max(0, pt), V.scrollWidth - Z.width))), (b === "y" || b === "both") && (mt = B.clientY - F.value.y, V && (mt = Math.min(Math.max(0, mt), V.scrollHeight - Z.height))), Kt(P) && V && (tt === null && H(V, Z, {
16944
- x: pt,
16945
- y: mt
16946
- }), pt += V.scrollLeft, mt += V.scrollTop), V && (U || P)) {
16942
+ let { x: mt, y: gt } = E.value;
16943
+ if ((b === "x" || b === "both") && (mt = B.clientX - F.value.x, V && (mt = Math.min(Math.max(0, mt), V.scrollWidth - Z.width))), (b === "y" || b === "both") && (gt = B.clientY - F.value.y, V && (gt = Math.min(Math.max(0, gt), V.scrollHeight - Z.height))), Kt(P) && V && (tt === null && H(V, Z, {
16944
+ x: mt,
16945
+ y: gt
16946
+ }), mt += V.scrollLeft, gt += V.scrollTop), V && (U || P)) {
16947
16947
  if (b !== "y") {
16948
- const it = pt - V.scrollLeft;
16949
- it < 0 ? pt = V.scrollLeft : it > V.clientWidth - Z.width && (pt = V.clientWidth - Z.width + V.scrollLeft);
16948
+ const it = mt - V.scrollLeft;
16949
+ it < 0 ? mt = V.scrollLeft : it > V.clientWidth - Z.width && (mt = V.clientWidth - Z.width + V.scrollLeft);
16950
16950
  }
16951
16951
  if (b !== "x") {
16952
- const it = mt - V.scrollTop;
16953
- it < 0 ? mt = V.scrollTop : it > V.clientHeight - Z.height && (mt = V.clientHeight - Z.height + V.scrollTop);
16952
+ const it = gt - V.scrollTop;
16953
+ it < 0 ? gt = V.scrollTop : it > V.clientHeight - Z.height && (gt = V.clientHeight - Z.height + V.scrollTop);
16954
16954
  }
16955
16955
  }
16956
16956
  E.value = {
16957
- x: pt,
16958
- y: mt
16957
+ x: mt,
16958
+ y: gt
16959
16959
  }, f?.(E.value, B), S(B);
16960
16960
  }, at = (B) => {
16961
16961
  Kt(t.disabled) || !L(B) || F.value && (F.value = void 0, P && nt(), g?.(E.value, B), S(B));
@@ -16968,7 +16968,7 @@ function Hz(n, t = {}) {
16968
16968
  passive: !Kt(c)
16969
16969
  };
16970
16970
  };
16971
- Zo(C, "pointerdown", rt, B), Zo(x, "pointermove", st, B), Zo(x, "pointerup", at, B);
16971
+ Zo(C, "pointerdown", rt, B), Zo(x, "pointermove", st, B), Zo(x, ["pointerup", "pointercancel"], at, B);
16972
16972
  }
16973
16973
  return {
16974
16974
  ...Lz(E),
@@ -19141,8 +19141,8 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19141
19141
  tooltipMetricDisplay: { default: "" }
19142
19142
  },
19143
19143
  setup(n) {
19144
- const t = n, { i18n: e } = zt.useI18n(), { translateUnit: i } = zt.useTranslatedUnits(), r = crypto.randomUUID(), s = crypto.randomUUID(), a = new jb(), c = Os("chartContainer"), u = Os("chartParent"), d = ({ chart: it }, gt) => {
19145
- const ht = it.data, ft = ht.labels?.indexOf(gt);
19144
+ const t = n, { i18n: e } = zt.useI18n(), { translateUnit: i } = zt.useTranslatedUnits(), r = crypto.randomUUID(), s = crypto.randomUUID(), a = new jb(), c = Os("chartContainer"), u = Os("chartParent"), d = ({ chart: it }, pt) => {
19145
+ const ht = it.data, ft = ht.labels?.indexOf(pt);
19146
19146
  return ht.datasets.reduce((_t, ut, Ft) => {
19147
19147
  if (it.isDatasetVisible(Ft)) {
19148
19148
  const Yt = ut.data[ft];
@@ -19150,28 +19150,28 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19150
19150
  } else
19151
19151
  return _t;
19152
19152
  }, 0);
19153
- }, f = (it, gt, ht, ft) => {
19153
+ }, f = (it, pt, ht, ft) => {
19154
19154
  const _t = ft === "horizontal";
19155
- gt === null && (gt = e.t("entityNoName"));
19155
+ pt === null && (pt = e.t("entityNoName"));
19156
19156
  const ut = {
19157
19157
  type: "label",
19158
- yValue: (Mt) => _t ? gt : d(Mt, gt),
19159
- xValue: (Mt) => _t ? d(Mt, gt) : gt
19158
+ yValue: (Mt) => _t ? pt : d(Mt, pt),
19159
+ xValue: (Mt) => _t ? d(Mt, pt) : pt
19160
19160
  }, Ft = {
19161
19161
  ...ut,
19162
19162
  position: _t ? { x: "start", y: "center" } : { x: "center", y: "end" },
19163
19163
  yAdjust: () => _t ? 0 : -Math.abs(TF()),
19164
- content: (Mt) => M0(d(Mt, gt), ht)
19164
+ content: (Mt) => M0(d(Mt, pt), ht)
19165
19165
  }, Yt = {
19166
19166
  ...ut,
19167
- content: (Mt) => DF(d(Mt, gt), MF(Mt.chart, it)),
19167
+ content: (Mt) => DF(d(Mt, pt), MF(Mt.chart, it)),
19168
19168
  position: _t ? { x: "start", y: "center" } : { x: "center", y: "end" },
19169
- xAdjust: (Mt) => _t ? SF(M0(d(Mt, gt), ht)) : 0,
19169
+ xAdjust: (Mt) => _t ? SF(M0(d(Mt, pt), ht)) : 0,
19170
19170
  color: yF
19171
19171
  };
19172
19172
  return {
19173
- [`${gt}-value`]: Ft,
19174
- [`${gt}-percent`]: Yt
19173
+ [`${pt}-value`]: Ft,
19174
+ [`${pt}-percent`]: Yt
19175
19175
  };
19176
19176
  }, g = Os("canvas"), m = Os("axis"), y = Ah(), b = Ah(), x = Se([]), w = Jo("legendPosition", Fn.Bottom), C = ta({
19177
19177
  show: !1,
@@ -19203,7 +19203,7 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19203
19203
  u,
19204
19204
  P
19205
19205
  ), L = Se(0), S = () => t.annotations && t.chartData.labels?.reduce(
19206
- (it, gt) => Object.assign(it, f(t.chartData, gt, A.value, t.orientation)),
19206
+ (it, pt) => Object.assign(it, f(t.chartData, pt, A.value, t.orientation)),
19207
19207
  {}
19208
19208
  ), M = {
19209
19209
  id: y,
@@ -19221,9 +19221,9 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19221
19221
  id: "axisHover",
19222
19222
  // args any because it is not typed by chartjs
19223
19223
  // https://www.chartjs.org/docs/latest/api/interfaces/Plugin.html#parameters
19224
- afterEvent(it, gt) {
19225
- if (C.show = !1, gt.event.type === "mousemove") {
19226
- const ht = gt.event, ft = it.options.indexAxis, _t = it.scales, ut = it.scales[ft].getLabelForValue(Number(it.scales[ft].getValueForPixel(ht[ft]))), Yt = it.scales[ft].getLabels().indexOf(ut), Mt = t.chartData.isLabelEmpty?.[Yt];
19224
+ afterEvent(it, pt) {
19225
+ if (C.show = !1, pt.event.type === "mousemove") {
19226
+ const ht = pt.event, ft = it.options.indexAxis, _t = it.scales, ut = it.scales[ft].getLabelForValue(Number(it.scales[ft].getValueForPixel(ht[ft]))), Yt = it.scales[ft].getLabels().indexOf(ut), Mt = t.chartData.isLabelEmpty?.[Yt];
19227
19227
  if (((Rt) => Rt === "x" ? ht.y > _t.x.top : ht.x < _t.y.right)(ft)) {
19228
19228
  P.interactionMode !== "interactive" && (P.showTooltip = !1);
19229
19229
  const Re = it.canvas.getContext("2d").measureText(ut).width, xt = Math.abs(Math.round(ht.x - Re * 0.5)), Zt = Math.round(ht.x + Re * 0.5), Ie = it.canvas.getBoundingClientRect(), Be = 40;
@@ -19283,7 +19283,7 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19283
19283
  [Fn.Bottom]: "column"
19284
19284
  }, V = $(() => {
19285
19285
  if (m.value && at.value) {
19286
- const it = window.devicePixelRatio, gt = at.value, ht = gt.scales.y.width * it + dH, ft = (gt.scales.y.height + gt.scales.y.top + gt.scales.x.height) * it, _t = m.value.getContext("2d");
19286
+ const it = window.devicePixelRatio, pt = at.value, ht = pt.scales.y.width * it + dH, ft = (pt.scales.y.height + pt.scales.y.top + pt.scales.x.height) * it, _t = m.value.getContext("2d");
19287
19287
  return _t.scale(it, it), _t.canvas.width = ht, _t.canvas.height = ft, _t.canvas.style.width = `${ht / it}px`, _t.canvas.style.height = `${ft / it}px`, {
19288
19288
  scale: it,
19289
19289
  width: ht * it,
@@ -19293,28 +19293,28 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19293
19293
  }
19294
19294
  return null;
19295
19295
  }), Z = (it) => {
19296
- const gt = it.target;
19296
+ const pt = it.target;
19297
19297
  if (V.value && at.value && !U.value) {
19298
19298
  const ht = V.value.scale, ft = V.value.targetCtx, _t = V.value.width, ut = V.value.height, Ft = at.value, Yt = Ft.canvas;
19299
- ft.fillStyle = "white", gt.scrollLeft >= lH && gt.scrollLeft <= cH ? (ft.globalCompositeOperation = "source-over", ft.clearRect(0, 0, _t, ut), ft.drawImage(Yt, 0, 0, _t, ut, 0, 0, _t, ut), ft.globalCompositeOperation = "destination-over", ft.fillRect(0, 0, _t, ut)) : (ft.globalCompositeOperation = "source-over", ft.fillRect(0, (Ft.scales.y.height + Ft.scales.y.top + uH) * ht, _t, Ft.scales.x.height * ht));
19299
+ ft.fillStyle = "white", pt.scrollLeft >= lH && pt.scrollLeft <= cH ? (ft.globalCompositeOperation = "source-over", ft.clearRect(0, 0, _t, ut), ft.drawImage(Yt, 0, 0, _t, ut, 0, 0, _t, ut), ft.globalCompositeOperation = "destination-over", ft.fillRect(0, 0, _t, ut)) : (ft.globalCompositeOperation = "source-over", ft.fillRect(0, (Ft.scales.y.height + Ft.scales.y.top + uH) * ht, _t, Ft.scales.x.height * ht));
19300
19300
  }
19301
- P.offsetY = gt.scrollTop, P.offsetX = gt.scrollLeft, C.offset = gt.scrollLeft;
19302
- }, pt = ({ width: it, height: gt }) => {
19303
- P.width = it, P.height = gt;
19301
+ P.offsetY = pt.scrollTop, P.offsetX = pt.scrollLeft, C.offset = pt.scrollLeft;
19302
+ }, mt = ({ width: it, height: pt }) => {
19303
+ P.width = it, P.height = pt;
19304
19304
  };
19305
19305
  Ue(() => t.orientation, () => {
19306
19306
  if (m.value && V.value) {
19307
- const it = V.value.width, gt = V.value.height;
19308
- (m.value?.getContext("2d")).clearRect(0, 0, it, gt);
19307
+ const it = V.value.width, pt = V.value.height;
19308
+ (m.value?.getContext("2d")).clearRect(0, 0, it, pt);
19309
19309
  }
19310
19310
  P.showTooltip = !1, P.interactionMode = "idle";
19311
19311
  }), Ue(() => t.annotations, (it) => {
19312
19312
  at.value && (it ? at.value.options.plugins.annotation.annotations = S(t.chartData) : delete at.value.options.plugins.annotation.annotations);
19313
19313
  });
19314
- const mt = () => {
19314
+ const gt = () => {
19315
19315
  P.showTooltip && (P.interactionMode !== "idle" ? P.interactionMode = "idle" : P.interactionMode = "interactive");
19316
19316
  };
19317
- return (it, gt) => (ot(), wt("div", {
19317
+ return (it, pt) => (ot(), wt("div", {
19318
19318
  ref: "chartParent",
19319
19319
  class: Sn(["chart-parent", B[ct(w)]])
19320
19320
  }, [
@@ -19326,7 +19326,7 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19326
19326
  St("div", {
19327
19327
  ref: "chartContainer",
19328
19328
  class: "chart-container",
19329
- onClick: gt[0] || (gt[0] = (ht) => mt()),
19329
+ onClick: pt[0] || (pt[0] = (ht) => gt()),
19330
19330
  onScroll: Z
19331
19331
  }, [
19332
19332
  St("div", {
@@ -19355,7 +19355,7 @@ const eH = ["id"], nH = ["id"], iH = { class: "axis-tooltip-content" }, rH = "10
19355
19355
  "chart-parent-ref": u.value,
19356
19356
  state: P,
19357
19357
  "tooltip-title": n.tooltipTitle,
19358
- onDimensions: pt
19358
+ onDimensions: mt
19359
19359
  }, null, 8, ["absolute-left", "absolute-top", "chart-parent-ref", "state", "tooltip-title"])
19360
19360
  ])),
19361
19361
  ke(gf, {
@@ -20131,16 +20131,16 @@ const UH = /* @__PURE__ */ Ve({
20131
20131
  });
20132
20132
  const rt = (B) => {
20133
20133
  B.preventDefault(), B.stopPropagation();
20134
- const { xStart: V, xEnd: Z } = B.detail, pt = {
20134
+ const { xStart: V, xEnd: Z } = B.detail, mt = {
20135
20135
  start: new Date(V),
20136
20136
  end: new Date(Z),
20137
20137
  type: "absolute"
20138
20138
  };
20139
- if (!I(pt)) {
20139
+ if (!I(mt)) {
20140
20140
  w.value = void 0, j(!1);
20141
20141
  return;
20142
20142
  }
20143
- w.value = pt, A.interactionMode = "zoom-interactive", pt && i("select-chart-range", pt);
20143
+ w.value = mt, A.interactionMode = "zoom-interactive", mt && i("select-chart-range", mt);
20144
20144
  }, st = (B) => {
20145
20145
  A.interactionMode = "selecting-chart-area", C.value = !0, s.pause(), a.pause();
20146
20146
  const { xStart: V, xEnd: Z } = B.detail;
@@ -21181,7 +21181,7 @@ var TW = Yo.exports, gy;
21181
21181
  function MW() {
21182
21182
  return gy || (gy = 1, (function(n, t) {
21183
21183
  (function() {
21184
- var e, i = "4.18.1", r = 200, s = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", a = "Expected a function", c = "Invalid `variable` option passed into `_.template`", u = "Invalid `imports` option passed into `_.template`", d = "__lodash_hash_undefined__", f = 500, g = "__lodash_placeholder__", m = 1, y = 2, b = 4, x = 1, w = 2, C = 1, A = 2, U = 4, P = 8, E = 16, F = 32, L = 64, S = 128, M = 256, k = 512, I = 30, H = "...", tt = 800, j = 16, nt = 1, X = 2, J = 3, rt = 1 / 0, st = 9007199254740991, at = 17976931348623157e292, B = NaN, V = 4294967295, Z = V - 1, pt = V >>> 1, mt = [
21184
+ var e, i = "4.18.1", r = 200, s = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", a = "Expected a function", c = "Invalid `variable` option passed into `_.template`", u = "Invalid `imports` option passed into `_.template`", d = "__lodash_hash_undefined__", f = 500, g = "__lodash_placeholder__", m = 1, y = 2, b = 4, x = 1, w = 2, C = 1, A = 2, U = 4, P = 8, E = 16, F = 32, L = 64, S = 128, M = 256, k = 512, I = 30, H = "...", tt = 800, j = 16, nt = 1, X = 2, J = 3, rt = 1 / 0, st = 9007199254740991, at = 17976931348623157e292, B = NaN, V = 4294967295, Z = V - 1, mt = V >>> 1, gt = [
21185
21185
  ["ary", S],
21186
21186
  ["bind", C],
21187
21187
  ["bindKey", A],
@@ -21191,7 +21191,7 @@ function MW() {
21191
21191
  ["partial", F],
21192
21192
  ["partialRight", L],
21193
21193
  ["rearg", M]
21194
- ], it = "[object Arguments]", gt = "[object Array]", ht = "[object AsyncFunction]", ft = "[object Boolean]", _t = "[object Date]", ut = "[object DOMException]", Ft = "[object Error]", Yt = "[object Function]", Mt = "[object GeneratorFunction]", Pt = "[object Map]", Rt = "[object Number]", Re = "[object Null]", xt = "[object Object]", Zt = "[object Promise]", Ie = "[object Proxy]", Be = "[object RegExp]", de = "[object Set]", fn = "[object String]", Qt = "[object Symbol]", qe = "[object Undefined]", ue = "[object WeakMap]", Le = "[object WeakSet]", He = "[object ArrayBuffer]", Cn = "[object DataView]", Fi = "[object Float32Array]", Un = "[object Float64Array]", Ze = "[object Int8Array]", Zn = "[object Int16Array]", mi = "[object Int32Array]", qs = "[object Uint8Array]", js = "[object Uint8ClampedArray]", _r = "[object Uint16Array]", yi = "[object Uint32Array]", Gs = /\b__p \+= '';/g, Ks = /\b(__p \+=) '' \+/g, Xs = /(__e\(.*?\)|\b__t\)) \+\n'';/g, zi = /&(?:amp|lt|gt|quot|#39);/g, xa = /[&<>"']/g, Ec = RegExp(zi.source), Ic = RegExp(xa.source), Lc = /<%-([\s\S]+?)%>/g, Nc = /<%([\s\S]+?)%>/g, Zs = /<%=([\s\S]+?)%>/g, wa = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _i = /^\w*$/, Fc = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Qs = /[\\^$.*+?()[\]{}|]/g, zc = RegExp(Qs.source), Js = /^\s+/, Uc = /\s/, Qn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Bc = /\{\n\/\* \[wrapped with (.+)\] \*/, Hc = /,? & /, Wc = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Sa = /[()=,{}\[\]\/\s]/, Yc = /\\(\\)?/g, Ui = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ta = /\w*$/, $c = /^[-+]0x[0-9a-f]+$/i, Vc = /^0b[01]+$/i, qc = /^\[object .+?Constructor\]$/, jc = /^0o[0-7]+$/i, Bi = /^(?:0|[1-9]\d*)$/, Gc = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Zr = /($^)/, Kc = /['\n\r\u2028\u2029\\]/g, Qr = "\\ud800-\\udfff", Xc = "\\u0300-\\u036f", Zc = "\\ufe20-\\ufe2f", Ma = "\\u20d0-\\u20ff", br = Xc + Zc + Ma, Da = "\\u2700-\\u27bf", Jr = "a-z\\xdf-\\xf6\\xf8-\\xff", Qc = "\\xac\\xb1\\xd7\\xf7", Jc = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", tu = "\\u2000-\\u206f", eu = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Ca = "A-Z\\xc0-\\xd6\\xd8-\\xde", ka = "\\ufe0e\\ufe0f", ts = Qc + Jc + tu + eu, to = "['’]", nu = "[" + Qr + "]", Oa = "[" + ts + "]", es = "[" + br + "]", Aa = "\\d+", iu = "[" + Da + "]", Ra = "[" + Jr + "]", eo = "[^" + Qr + ts + Aa + Da + Jr + Ca + "]", no = "\\ud83c[\\udffb-\\udfff]", ru = "(?:" + es + "|" + no + ")", vr = "[^" + Qr + "]", si = "(?:\\ud83c[\\udde6-\\uddff]){2}", ns = "[\\ud800-\\udbff][\\udc00-\\udfff]", gn = "[" + Ca + "]", Pa = "\\u200d", Ea = "(?:" + Ra + "|" + eo + ")", su = "(?:" + gn + "|" + eo + ")", Ia = "(?:" + to + "(?:d|ll|m|re|s|t|ve))?", La = "(?:" + to + "(?:D|LL|M|RE|S|T|VE))?", Na = ru + "?", io = "[" + ka + "]?", bi = "(?:" + Pa + "(?:" + [vr, si, ns].join("|") + ")" + io + Na + ")*", ou = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Fa = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", za = io + Na + bi, ro = "(?:" + [iu, si, ns].join("|") + ")" + za, Ua = "(?:" + [vr + es + "?", es, si, ns, nu].join("|") + ")", au = RegExp(to, "g"), lu = RegExp(es, "g"), is = RegExp(no + "(?=" + no + ")|" + Ua + za, "g"), cu = RegExp([
21194
+ ], it = "[object Arguments]", pt = "[object Array]", ht = "[object AsyncFunction]", ft = "[object Boolean]", _t = "[object Date]", ut = "[object DOMException]", Ft = "[object Error]", Yt = "[object Function]", Mt = "[object GeneratorFunction]", Pt = "[object Map]", Rt = "[object Number]", Re = "[object Null]", xt = "[object Object]", Zt = "[object Promise]", Ie = "[object Proxy]", Be = "[object RegExp]", de = "[object Set]", fn = "[object String]", Qt = "[object Symbol]", qe = "[object Undefined]", ue = "[object WeakMap]", Le = "[object WeakSet]", He = "[object ArrayBuffer]", Cn = "[object DataView]", Fi = "[object Float32Array]", Un = "[object Float64Array]", Ze = "[object Int8Array]", Zn = "[object Int16Array]", mi = "[object Int32Array]", qs = "[object Uint8Array]", js = "[object Uint8ClampedArray]", _r = "[object Uint16Array]", yi = "[object Uint32Array]", Gs = /\b__p \+= '';/g, Ks = /\b(__p \+=) '' \+/g, Xs = /(__e\(.*?\)|\b__t\)) \+\n'';/g, zi = /&(?:amp|lt|gt|quot|#39);/g, xa = /[&<>"']/g, Ec = RegExp(zi.source), Ic = RegExp(xa.source), Lc = /<%-([\s\S]+?)%>/g, Nc = /<%([\s\S]+?)%>/g, Zs = /<%=([\s\S]+?)%>/g, wa = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _i = /^\w*$/, Fc = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Qs = /[\\^$.*+?()[\]{}|]/g, zc = RegExp(Qs.source), Js = /^\s+/, Uc = /\s/, Qn = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Bc = /\{\n\/\* \[wrapped with (.+)\] \*/, Hc = /,? & /, Wc = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Sa = /[()=,{}\[\]\/\s]/, Yc = /\\(\\)?/g, Ui = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Ta = /\w*$/, $c = /^[-+]0x[0-9a-f]+$/i, Vc = /^0b[01]+$/i, qc = /^\[object .+?Constructor\]$/, jc = /^0o[0-7]+$/i, Bi = /^(?:0|[1-9]\d*)$/, Gc = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Zr = /($^)/, Kc = /['\n\r\u2028\u2029\\]/g, Qr = "\\ud800-\\udfff", Xc = "\\u0300-\\u036f", Zc = "\\ufe20-\\ufe2f", Ma = "\\u20d0-\\u20ff", br = Xc + Zc + Ma, Da = "\\u2700-\\u27bf", Jr = "a-z\\xdf-\\xf6\\xf8-\\xff", Qc = "\\xac\\xb1\\xd7\\xf7", Jc = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", tu = "\\u2000-\\u206f", eu = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Ca = "A-Z\\xc0-\\xd6\\xd8-\\xde", ka = "\\ufe0e\\ufe0f", ts = Qc + Jc + tu + eu, to = "['’]", nu = "[" + Qr + "]", Oa = "[" + ts + "]", es = "[" + br + "]", Aa = "\\d+", iu = "[" + Da + "]", Ra = "[" + Jr + "]", eo = "[^" + Qr + ts + Aa + Da + Jr + Ca + "]", no = "\\ud83c[\\udffb-\\udfff]", ru = "(?:" + es + "|" + no + ")", vr = "[^" + Qr + "]", si = "(?:\\ud83c[\\udde6-\\uddff]){2}", ns = "[\\ud800-\\udbff][\\udc00-\\udfff]", gn = "[" + Ca + "]", Pa = "\\u200d", Ea = "(?:" + Ra + "|" + eo + ")", su = "(?:" + gn + "|" + eo + ")", Ia = "(?:" + to + "(?:d|ll|m|re|s|t|ve))?", La = "(?:" + to + "(?:D|LL|M|RE|S|T|VE))?", Na = ru + "?", io = "[" + ka + "]?", bi = "(?:" + Pa + "(?:" + [vr, si, ns].join("|") + ")" + io + Na + ")*", ou = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Fa = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", za = io + Na + bi, ro = "(?:" + [iu, si, ns].join("|") + ")" + za, Ua = "(?:" + [vr + es + "?", es, si, ns, nu].join("|") + ")", au = RegExp(to, "g"), lu = RegExp(es, "g"), is = RegExp(no + "(?=" + no + ")|" + Ua + za, "g"), cu = RegExp([
21195
21195
  gn + "?" + Ra + "+" + Ia + "(?=" + [Oa, gn, "$"].join("|") + ")",
21196
21196
  su + "+" + La + "(?=" + [Oa, gn + Ea, "$"].join("|") + ")",
21197
21197
  gn + "?" + Ea + "+" + Ia,
@@ -21232,9 +21232,9 @@ function MW() {
21232
21232
  "parseInt",
21233
21233
  "setTimeout"
21234
21234
  ], du = -1, oe = {};
21235
- oe[Fi] = oe[Un] = oe[Ze] = oe[Zn] = oe[mi] = oe[qs] = oe[js] = oe[_r] = oe[yi] = !0, oe[it] = oe[gt] = oe[He] = oe[ft] = oe[Cn] = oe[_t] = oe[Ft] = oe[Yt] = oe[Pt] = oe[Rt] = oe[xt] = oe[Be] = oe[de] = oe[fn] = oe[ue] = !1;
21235
+ oe[Fi] = oe[Un] = oe[Ze] = oe[Zn] = oe[mi] = oe[qs] = oe[js] = oe[_r] = oe[yi] = !0, oe[it] = oe[pt] = oe[He] = oe[ft] = oe[Cn] = oe[_t] = oe[Ft] = oe[Yt] = oe[Pt] = oe[Rt] = oe[xt] = oe[Be] = oe[de] = oe[fn] = oe[ue] = !1;
21236
21236
  var D = {};
21237
- D[it] = D[gt] = D[He] = D[Cn] = D[ft] = D[_t] = D[Fi] = D[Un] = D[Ze] = D[Zn] = D[mi] = D[Pt] = D[Rt] = D[xt] = D[Be] = D[de] = D[fn] = D[Qt] = D[qs] = D[js] = D[_r] = D[yi] = !0, D[Ft] = D[Yt] = D[ue] = !1;
21237
+ D[it] = D[pt] = D[He] = D[Cn] = D[ft] = D[_t] = D[Fi] = D[Un] = D[Ze] = D[Zn] = D[mi] = D[Pt] = D[Rt] = D[xt] = D[Be] = D[de] = D[fn] = D[Qt] = D[qs] = D[js] = D[_r] = D[yi] = !0, D[Ft] = D[Yt] = D[ue] = !1;
21238
21238
  var W = {
21239
21239
  // Latin-1 Supplement block.
21240
21240
  À: "A",
@@ -22230,7 +22230,7 @@ function MW() {
22230
22230
  return o === l ? !0 : o == null || l == null || !we(o) && !we(l) ? o !== o && l !== l : Ox(o, l, h, p, yo, _);
22231
22231
  }
22232
22232
  function Ox(o, l, h, p, _, T) {
22233
- var O = Lt(o), R = Lt(l), z = O ? gt : tn(o), G = R ? gt : tn(l);
22233
+ var O = Lt(o), R = Lt(l), z = O ? pt : tn(o), G = R ? pt : tn(l);
22234
22234
  z = z == it ? xt : z, G = G == it ? xt : G;
22235
22235
  var K = z == xt, et = G == xt, lt = z == G;
22236
22236
  if (lt && Ki(o)) {
@@ -22483,7 +22483,7 @@ function MW() {
22483
22483
  }
22484
22484
  function ll(o, l, h) {
22485
22485
  var p = 0, _ = o == null ? p : o.length;
22486
- if (typeof l == "number" && l === l && _ <= pt) {
22486
+ if (typeof l == "number" && l === l && _ <= mt) {
22487
22487
  for (; p < _; ) {
22488
22488
  var T = p + _ >>> 1, O = o[T];
22489
22489
  O !== null && !Pn(O) && (h ? O <= l : O < l) ? p = T + 1 : _ = T;
@@ -23412,7 +23412,7 @@ function MW() {
23412
23412
  return "";
23413
23413
  }
23414
23414
  function bw(o, l) {
23415
- return On(mt, function(h) {
23415
+ return On(gt, function(h) {
23416
23416
  var p = "_." + h[0];
23417
23417
  l & h[1] && !Ha(o, p) && o.push(p);
23418
23418
  }), o.sort();
@@ -25044,12 +25044,12 @@ function AW() {
25044
25044
  }
25045
25045
  function x(S) {
25046
25046
  var M, k, I, H, tt = Math.pow(2, 53), j = -tt, nt = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, X = /^((\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)))$/, J = this, rt = 0, st = 0, at = !1, B = !1, V = [], Z = { data: [], errors: [], meta: {} };
25047
- function pt(ht) {
25047
+ function mt(ht) {
25048
25048
  return S.skipEmptyLines === "greedy" ? ht.join("").trim() === "" : ht.length === 1 && ht[0].length === 0;
25049
25049
  }
25050
- function mt() {
25051
- if (Z && I && (gt("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + d.DefaultDelimiter + "'"), I = !1), S.skipEmptyLines && (Z.data = Z.data.filter(function(ut) {
25052
- return !pt(ut);
25050
+ function gt() {
25051
+ if (Z && I && (pt("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + d.DefaultDelimiter + "'"), I = !1), S.skipEmptyLines && (Z.data = Z.data.filter(function(ut) {
25052
+ return !mt(ut);
25053
25053
  })), it()) {
25054
25054
  let ut = function(Ft, Yt) {
25055
25055
  L(S.transformHeader) && (Ft = S.transformHeader(Ft, Yt)), V.push(Ft);
@@ -25067,7 +25067,7 @@ function AW() {
25067
25067
  })(xt) ? parseFloat(xt) : X.test(xt) ? new Date(xt) : xt === "" ? null : xt) : xt)(Pt = S.header ? Mt >= V.length ? "__parsed_extra" : V[Mt] : Pt, Rt = S.transform ? S.transform(Rt, Pt) : Rt);
25068
25068
  Pt === "__parsed_extra" ? (Yt[Pt] = Yt[Pt] || [], Yt[Pt].push(Rt)) : Yt[Pt] = Rt;
25069
25069
  }
25070
- return S.header && (Mt > V.length ? gt("FieldMismatch", "TooManyFields", "Too many fields: expected " + V.length + " fields but parsed " + Mt, st + Ft) : Mt < V.length && gt("FieldMismatch", "TooFewFields", "Too few fields: expected " + V.length + " fields but parsed " + Mt, st + Ft)), Yt;
25070
+ return S.header && (Mt > V.length ? pt("FieldMismatch", "TooManyFields", "Too many fields: expected " + V.length + " fields but parsed " + Mt, st + Ft) : Mt < V.length && pt("FieldMismatch", "TooFewFields", "Too few fields: expected " + V.length + " fields but parsed " + Mt, st + Ft)), Yt;
25071
25071
  }
25072
25072
  var _t;
25073
25073
  Z && (S.header || S.dynamicTyping || S.transform) && (_t = 1, !Z.data.length || Array.isArray(Z.data[0]) ? (Z.data = Z.data.map(ft), _t = Z.data.length) : Z.data = ft(Z.data, 0), S.header && Z.meta && (Z.meta.fields = V), st += _t);
@@ -25075,22 +25075,22 @@ function AW() {
25075
25075
  function it() {
25076
25076
  return S.header && V.length === 0;
25077
25077
  }
25078
- function gt(ht, ft, _t, ut) {
25078
+ function pt(ht, ft, _t, ut) {
25079
25079
  ht = { type: ht, code: ft, message: _t }, ut !== void 0 && (ht.row = ut), Z.errors.push(ht);
25080
25080
  }
25081
25081
  L(S.step) && (H = S.step, S.step = function(ht) {
25082
- Z = ht, it() ? mt() : (mt(), Z.data.length !== 0 && (rt += ht.data.length, S.preview && rt > S.preview ? k.abort() : (Z.data = Z.data[0], H(Z, J))));
25082
+ Z = ht, it() ? gt() : (gt(), Z.data.length !== 0 && (rt += ht.data.length, S.preview && rt > S.preview ? k.abort() : (Z.data = Z.data[0], H(Z, J))));
25083
25083
  }), this.parse = function(ht, ft, _t) {
25084
25084
  var ut = S.quoteChar || '"', ut = (S.newline || (S.newline = this.guessLineEndings(ht, ut)), I = !1, S.delimiter ? L(S.delimiter) && (S.delimiter = S.delimiter(ht), Z.meta.delimiter = S.delimiter) : ((ut = ((Ft, Yt, Mt, Pt, Rt) => {
25085
25085
  var Re, xt, Zt, Ie;
25086
25086
  Rt = Rt || [",", " ", "|", ";", d.RECORD_SEP, d.UNIT_SEP];
25087
25087
  for (var Be = 0; Be < Rt.length; Be++) {
25088
- for (var de, fn = Rt[Be], Qt = 0, qe = 0, ue = 0, Le = (Zt = void 0, new C({ comments: Pt, delimiter: fn, newline: Yt, preview: 10 }).parse(Ft)), He = 0; He < Le.data.length; He++) Mt && pt(Le.data[He]) ? ue++ : (de = Le.data[He].length, qe += de, Zt === void 0 ? Zt = de : 0 < de && (Qt += Math.abs(de - Zt), Zt = de));
25088
+ for (var de, fn = Rt[Be], Qt = 0, qe = 0, ue = 0, Le = (Zt = void 0, new C({ comments: Pt, delimiter: fn, newline: Yt, preview: 10 }).parse(Ft)), He = 0; He < Le.data.length; He++) Mt && mt(Le.data[He]) ? ue++ : (de = Le.data[He].length, qe += de, Zt === void 0 ? Zt = de : 0 < de && (Qt += Math.abs(de - Zt), Zt = de));
25089
25089
  0 < Le.data.length && (qe /= Le.data.length - ue), (xt === void 0 || Qt <= xt) && (Ie === void 0 || Ie < qe) && 1.99 < qe && (xt = Qt, Re = fn, Ie = qe);
25090
25090
  }
25091
25091
  return { successful: !!(S.delimiter = Re), bestDelimiter: Re };
25092
25092
  })(ht, S.newline, S.skipEmptyLines, S.comments, S.delimitersToGuess)).successful ? S.delimiter = ut.bestDelimiter : (I = !0, S.delimiter = d.DefaultDelimiter), Z.meta.delimiter = S.delimiter), E(S));
25093
- return S.preview && S.header && ut.preview++, M = ht, k = new C(ut), Z = k.parse(M, ft, _t), mt(), at ? { meta: { paused: !0 } } : Z || { meta: { paused: !1 } };
25093
+ return S.preview && S.header && ut.preview++, M = ht, k = new C(ut), Z = k.parse(M, ft, _t), gt(), at ? { meta: { paused: !0 } } : Z || { meta: { paused: !1 } };
25094
25094
  }, this.paused = function() {
25095
25095
  return at;
25096
25096
  }, this.pause = function() {
@@ -25126,13 +25126,13 @@ function AW() {
25126
25126
  var st = 0, at = !1;
25127
25127
  this.parse = function(B, V, Z) {
25128
25128
  if (typeof B != "string") throw new Error("Input must be a string");
25129
- var pt = B.length, mt = M.length, it = k.length, gt = I.length, ht = L(H), ft = [], _t = [], ut = [], Ft = st = 0;
25129
+ var mt = B.length, gt = M.length, it = k.length, pt = I.length, ht = L(H), ft = [], _t = [], ut = [], Ft = st = 0;
25130
25130
  if (!B) return Qt();
25131
25131
  if (j || j !== !1 && B.indexOf(J) === -1) {
25132
25132
  for (var Yt = B.split(k), Mt = 0; Mt < Yt.length; Mt++) {
25133
25133
  if (ut = Yt[Mt], st += ut.length, Mt !== Yt.length - 1) st += k.length;
25134
25134
  else if (Z) return Qt();
25135
- if (!I || ut.substring(0, gt) !== I) {
25135
+ if (!I || ut.substring(0, pt) !== I) {
25136
25136
  if (ht) {
25137
25137
  if (ft = [], Ie(ut.split(M)), qe(), at) return Qt();
25138
25138
  } else Ie(ut.split(M));
@@ -25143,13 +25143,13 @@ function AW() {
25143
25143
  }
25144
25144
  for (var Pt = B.indexOf(M, st), Rt = B.indexOf(k, st), Re = new RegExp(w(rt) + w(J), "g"), xt = B.indexOf(J, st); ; ) if (B[st] === J) for (xt = st, st++; ; ) {
25145
25145
  if ((xt = B.indexOf(J, xt + 1)) === -1) return Z || _t.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: ft.length, index: st }), de();
25146
- if (xt === pt - 1) return de(B.substring(st, xt).replace(Re, J));
25146
+ if (xt === mt - 1) return de(B.substring(st, xt).replace(Re, J));
25147
25147
  if (J === rt && B[xt + 1] === rt) xt++;
25148
25148
  else if (J === rt || xt === 0 || B[xt - 1] !== rt) {
25149
25149
  Pt !== -1 && Pt < xt + 1 && (Pt = B.indexOf(M, xt + 1));
25150
25150
  var Zt = Be((Rt = Rt !== -1 && Rt < xt + 1 ? B.indexOf(k, xt + 1) : Rt) === -1 ? Pt : Math.min(Pt, Rt));
25151
- if (B.substr(xt + 1 + Zt, mt) === M) {
25152
- ut.push(B.substring(st, xt).replace(Re, J)), B[st = xt + 1 + Zt + mt] !== J && (xt = B.indexOf(J, st)), Pt = B.indexOf(M, st), Rt = B.indexOf(k, st);
25151
+ if (B.substr(xt + 1 + Zt, gt) === M) {
25152
+ ut.push(B.substring(st, xt).replace(Re, J)), B[st = xt + 1 + Zt + gt] !== J && (xt = B.indexOf(J, st)), Pt = B.indexOf(M, st), Rt = B.indexOf(k, st);
25153
25153
  break;
25154
25154
  }
25155
25155
  if (Zt = Be(Rt), B.substring(xt + 1 + Zt, xt + 1 + Zt + it) === k) {
@@ -25160,10 +25160,10 @@ function AW() {
25160
25160
  _t.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: ft.length, index: st }), xt++;
25161
25161
  }
25162
25162
  }
25163
- else if (I && ut.length === 0 && B.substring(st, st + gt) === I) {
25163
+ else if (I && ut.length === 0 && B.substring(st, st + pt) === I) {
25164
25164
  if (Rt === -1) return Qt();
25165
25165
  st = Rt + it, Rt = B.indexOf(k, st), Pt = B.indexOf(M, st);
25166
- } else if (Pt !== -1 && (Pt < Rt || Rt === -1)) ut.push(B.substring(st, Pt)), st = Pt + mt, Pt = B.indexOf(M, st);
25166
+ } else if (Pt !== -1 && (Pt < Rt || Rt === -1)) ut.push(B.substring(st, Pt)), st = Pt + gt, Pt = B.indexOf(M, st);
25167
25167
  else {
25168
25168
  if (Rt === -1) break;
25169
25169
  if (ut.push(B.substring(st, Rt)), fn(Rt + it), ht && (qe(), at)) return Qt();
@@ -25178,7 +25178,7 @@ function AW() {
25178
25178
  return Le = ue !== -1 && (ue = B.substring(xt + 1, ue)) && ue.trim() === "" ? ue.length : Le;
25179
25179
  }
25180
25180
  function de(ue) {
25181
- return Z || (ue === void 0 && (ue = B.substring(st)), ut.push(ue), st = pt, Ie(ut), ht && qe()), Qt();
25181
+ return Z || (ue === void 0 && (ue = B.substring(st)), ut.push(ue), st = mt, Ie(ut), ht && qe()), Qt();
25182
25182
  }
25183
25183
  function fn(ue) {
25184
25184
  st = ue, Ie(ut), ut = [], Rt = B.indexOf(k, st);
@@ -25272,38 +25272,38 @@ function AW() {
25272
25272
  if (typeof S[0] == "object") return at(J || Object.keys(S[0]), S, X);
25273
25273
  } else if (typeof S == "object") return typeof S.data == "string" && (S.data = JSON.parse(S.data)), Array.isArray(S.data) && (S.fields || (S.fields = S.meta && S.meta.fields || J), S.fields || (S.fields = Array.isArray(S.data[0]) ? S.fields : typeof S.data[0] == "object" ? Object.keys(S.data[0]) : []), Array.isArray(S.data[0]) || typeof S.data[0] == "object" || (S.data = [S.data])), at(S.fields || [], S.data || [], X);
25274
25274
  throw new Error("Unable to serialize unrecognized input");
25275
- function at(V, Z, pt) {
25276
- var mt = "", it = (typeof V == "string" && (V = JSON.parse(V)), typeof Z == "string" && (Z = JSON.parse(Z)), Array.isArray(V) && 0 < V.length), gt = !Array.isArray(Z[0]);
25275
+ function at(V, Z, mt) {
25276
+ var gt = "", it = (typeof V == "string" && (V = JSON.parse(V)), typeof Z == "string" && (Z = JSON.parse(Z)), Array.isArray(V) && 0 < V.length), pt = !Array.isArray(Z[0]);
25277
25277
  if (it && I) {
25278
- for (var ht = 0; ht < V.length; ht++) 0 < ht && (mt += H), mt += B(V[ht], ht);
25279
- 0 < Z.length && (mt += tt);
25278
+ for (var ht = 0; ht < V.length; ht++) 0 < ht && (gt += H), gt += B(V[ht], ht);
25279
+ 0 < Z.length && (gt += tt);
25280
25280
  }
25281
25281
  for (var ft = 0; ft < Z.length; ft++) {
25282
25282
  var _t = (it ? V : Z[ft]).length, ut = !1, Ft = it ? Object.keys(Z[ft]).length === 0 : Z[ft].length === 0;
25283
- if (pt && !it && (ut = pt === "greedy" ? Z[ft].join("").trim() === "" : Z[ft].length === 1 && Z[ft][0].length === 0), pt === "greedy" && it) {
25283
+ if (mt && !it && (ut = mt === "greedy" ? Z[ft].join("").trim() === "" : Z[ft].length === 1 && Z[ft][0].length === 0), mt === "greedy" && it) {
25284
25284
  for (var Yt = [], Mt = 0; Mt < _t; Mt++) {
25285
- var Pt = gt ? V[Mt] : Mt;
25285
+ var Pt = pt ? V[Mt] : Mt;
25286
25286
  Yt.push(Z[ft][Pt]);
25287
25287
  }
25288
25288
  ut = Yt.join("").trim() === "";
25289
25289
  }
25290
25290
  if (!ut) {
25291
25291
  for (var Rt = 0; Rt < _t; Rt++) {
25292
- 0 < Rt && !Ft && (mt += H);
25293
- var Re = it && gt ? V[Rt] : Rt;
25294
- mt += B(Z[ft][Re], Rt);
25292
+ 0 < Rt && !Ft && (gt += H);
25293
+ var Re = it && pt ? V[Rt] : Rt;
25294
+ gt += B(Z[ft][Re], Rt);
25295
25295
  }
25296
- ft < Z.length - 1 && (!pt || 0 < _t && !Ft) && (mt += tt);
25296
+ ft < Z.length - 1 && (!mt || 0 < _t && !Ft) && (gt += tt);
25297
25297
  }
25298
25298
  }
25299
- return mt;
25299
+ return gt;
25300
25300
  }
25301
25301
  function B(V, Z) {
25302
- var pt, mt;
25303
- return V == null ? "" : V.constructor === Date ? JSON.stringify(V).slice(1, 25) : (mt = !1, rt && typeof V == "string" && rt.test(V) && (V = "'" + V, mt = !0), pt = V.toString().replace(st, nt), (mt = mt || k === !0 || typeof k == "function" && k(V, Z) || Array.isArray(k) && k[Z] || ((it, gt) => {
25304
- for (var ht = 0; ht < gt.length; ht++) if (-1 < it.indexOf(gt[ht])) return !0;
25302
+ var mt, gt;
25303
+ return V == null ? "" : V.constructor === Date ? JSON.stringify(V).slice(1, 25) : (gt = !1, rt && typeof V == "string" && rt.test(V) && (V = "'" + V, gt = !0), mt = V.toString().replace(st, nt), (gt = gt || k === !0 || typeof k == "function" && k(V, Z) || Array.isArray(k) && k[Z] || ((it, pt) => {
25304
+ for (var ht = 0; ht < pt.length; ht++) if (-1 < it.indexOf(pt[ht])) return !0;
25305
25305
  return !1;
25306
- })(pt, d.BAD_DELIMITERS) || -1 < pt.indexOf(H) || pt.charAt(0) === " " || pt.charAt(pt.length - 1) === " ") ? j + pt + j : pt);
25306
+ })(mt, d.BAD_DELIMITERS) || -1 < mt.indexOf(H) || mt.charAt(0) === " " || mt.charAt(mt.length - 1) === " ") ? j + mt + j : mt);
25307
25307
  }
25308
25308
  }, d.RECORD_SEP = "", d.UNIT_SEP = "", d.BYTE_ORDER_MARK = "\uFEFF", d.BAD_DELIMITERS = ["\r", `
25309
25309
  `, '"', d.BYTE_ORDER_MARK], d.WORKERS_SUPPORTED = !s && !!i.Worker, d.NODE_STREAM_INPUT = 1, d.LocalChunkSize = 10485760, d.RemoteChunkSize = 5242880, d.DefaultDelimiter = ",", d.Parser = C, d.ParserHandle = x, d.NetworkStreamer = g, d.FileStreamer = m, d.StringStreamer = y, d.ReadableStreamStreamer = b, i.jQuery && ((r = i.jQuery).fn.parse = function(S) {