katucharts.js 0.2.14 → 0.2.15

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.
@@ -467,7 +467,7 @@ function Il(n, t) {
467
467
  return (Math.max(n, t) + 0.05) / (Math.min(n, t) + 0.05);
468
468
  }
469
469
  const Qp = cf(26, 26, 26);
470
- function Dn(n, t) {
470
+ function zn(n, t) {
471
471
  var s;
472
472
  if (t) return t;
473
473
  const e = n ? (s = ae(n)) == null ? void 0 : s.rgb() : null;
@@ -1201,7 +1201,7 @@ const gg = (n, t, e) => (n >>> 0) + (t >>> 0) + (e >>> 0), mg = (n, t, e, i) =>
1201
1201
  "0x597f299cfc657e2a",
1202
1202
  "0x5fcb6fab3ad6faec",
1203
1203
  "0x6c44198c4a475817"
1204
- ].map((n) => BigInt(n))), wg = pf[0], kg = pf[1], Xn = /* @__PURE__ */ new Uint32Array(80), Un = /* @__PURE__ */ new Uint32Array(80);
1204
+ ].map((n) => BigInt(n))), wg = pf[0], kg = pf[1], Un = /* @__PURE__ */ new Uint32Array(80), qn = /* @__PURE__ */ new Uint32Array(80);
1205
1205
  class Mg extends fg {
1206
1206
  constructor(t) {
1207
1207
  super(128, t, 16, !1);
@@ -1217,14 +1217,14 @@ class Mg extends fg {
1217
1217
  }
1218
1218
  process(t, e) {
1219
1219
  for (let v = 0; v < 16; v++, e += 4)
1220
- Xn[v] = t.getUint32(e), Un[v] = t.getUint32(e += 4);
1220
+ Un[v] = t.getUint32(e), qn[v] = t.getUint32(e += 4);
1221
1221
  for (let v = 16; v < 80; v++) {
1222
- const b = Xn[v - 15] | 0, k = Un[v - 15] | 0, M = _i(b, k, 1) ^ _i(b, k, 8) ^ Ol(b, k, 7), P = Ci(b, k, 1) ^ Ci(b, k, 8) ^ Nl(b, k, 7), $ = Xn[v - 2] | 0, _ = Un[v - 2] | 0, L = _i($, _, 19) ^ ro($, _, 61) ^ Ol($, _, 6), I = Ci($, _, 19) ^ oo($, _, 61) ^ Nl($, _, 6), E = yg(P, I, Un[v - 7], Un[v - 16]), C = xg(E, M, L, Xn[v - 7], Xn[v - 16]);
1223
- Xn[v] = C | 0, Un[v] = E | 0;
1222
+ const b = Un[v - 15] | 0, k = qn[v - 15] | 0, M = _i(b, k, 1) ^ _i(b, k, 8) ^ Ol(b, k, 7), P = Ci(b, k, 1) ^ Ci(b, k, 8) ^ Nl(b, k, 7), $ = Un[v - 2] | 0, _ = qn[v - 2] | 0, L = _i($, _, 19) ^ ro($, _, 61) ^ Ol($, _, 6), I = Ci($, _, 19) ^ oo($, _, 61) ^ Nl($, _, 6), E = yg(P, I, qn[v - 7], qn[v - 16]), C = xg(E, M, L, Un[v - 7], Un[v - 16]);
1223
+ Un[v] = C | 0, qn[v] = E | 0;
1224
1224
  }
1225
1225
  let { Ah: i, Al: r, Bh: o, Bl: s, Ch: a, Cl: l, Dh: c, Dl: h, Eh: f, El: u, Fh: d, Fl: p, Gh: y, Gl: g, Hh: m, Hl: x } = this;
1226
1226
  for (let v = 0; v < 80; v++) {
1227
- const b = _i(f, u, 14) ^ _i(f, u, 18) ^ ro(f, u, 41), k = Ci(f, u, 14) ^ Ci(f, u, 18) ^ oo(f, u, 41), M = f & d ^ ~f & y, P = u & p ^ ~u & g, $ = bg(x, k, P, kg[v], Un[v]), _ = vg($, m, b, M, wg[v], Xn[v]), L = $ | 0, I = _i(i, r, 28) ^ ro(i, r, 34) ^ ro(i, r, 39), E = Ci(i, r, 28) ^ oo(i, r, 34) ^ oo(i, r, 39), C = i & o ^ i & a ^ o & a, S = r & s ^ r & l ^ s & l;
1227
+ const b = _i(f, u, 14) ^ _i(f, u, 18) ^ ro(f, u, 41), k = Ci(f, u, 14) ^ Ci(f, u, 18) ^ oo(f, u, 41), M = f & d ^ ~f & y, P = u & p ^ ~u & g, $ = bg(x, k, P, kg[v], qn[v]), _ = vg($, m, b, M, wg[v], Un[v]), L = $ | 0, I = _i(i, r, 28) ^ ro(i, r, 34) ^ ro(i, r, 39), E = Ci(i, r, 28) ^ oo(i, r, 34) ^ oo(i, r, 39), C = i & o ^ i & a ^ o & a, S = r & s ^ r & l ^ s & l;
1228
1228
  m = y | 0, x = g | 0, y = d | 0, g = p | 0, d = f | 0, p = u | 0, { h: f, l: u } = En(c | 0, h | 0, _ | 0, L | 0), c = a | 0, h = l | 0, a = o | 0, l = s | 0, o = i | 0, s = r | 0;
1229
1229
  const w = gg(L, E, S);
1230
1230
  i = mg(w, _, I, C), r = w | 0;
@@ -1232,7 +1232,7 @@ class Mg extends fg {
1232
1232
  ({ h: i, l: r } = En(this.Ah | 0, this.Al | 0, i | 0, r | 0)), { h: o, l: s } = En(this.Bh | 0, this.Bl | 0, o | 0, s | 0), { h: a, l } = En(this.Ch | 0, this.Cl | 0, a | 0, l | 0), { h: c, l: h } = En(this.Dh | 0, this.Dl | 0, c | 0, h | 0), { h: f, l: u } = En(this.Eh | 0, this.El | 0, f | 0, u | 0), { h: d, l: p } = En(this.Fh | 0, this.Fl | 0, d | 0, p | 0), { h: y, l: g } = En(this.Gh | 0, this.Gl | 0, y | 0, g | 0), { h: m, l: x } = En(this.Hh | 0, this.Hl | 0, m | 0, x | 0), this.set(i, r, o, s, a, l, c, h, f, u, d, p, y, g, m, x);
1233
1233
  }
1234
1234
  roundClean() {
1235
- ka(Xn, Un);
1235
+ ka(Un, qn);
1236
1236
  }
1237
1237
  destroy() {
1238
1238
  this.destroyed = !0, ka(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -1790,7 +1790,7 @@ function Ug(n, t) {
1790
1790
  };
1791
1791
  }
1792
1792
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1793
- const qn = /* @__PURE__ */ BigInt(0), ue = /* @__PURE__ */ BigInt(1), Ws = /* @__PURE__ */ BigInt(2), qg = /* @__PURE__ */ BigInt(8);
1793
+ const jn = /* @__PURE__ */ BigInt(0), ue = /* @__PURE__ */ BigInt(1), Ws = /* @__PURE__ */ BigInt(2), qg = /* @__PURE__ */ BigInt(8);
1794
1794
  function jg(n, t, e, i) {
1795
1795
  const r = n.sqr(e), o = n.sqr(i), s = n.add(n.mul(t.a, r), o), a = n.add(n.ONE, n.mul(t.d, n.mul(r, o)));
1796
1796
  return n.eql(s, a);
@@ -1804,13 +1804,13 @@ function Zg(n, t = {}) {
1804
1804
  try {
1805
1805
  return { isValid: !0, value: r.sqrt(r.div(g, m)) };
1806
1806
  } catch {
1807
- return { isValid: !1, value: qn };
1807
+ return { isValid: !1, value: jn };
1808
1808
  }
1809
1809
  } : e.uvRatio;
1810
1810
  if (!jg(r, s, s.Gx, s.Gy))
1811
1811
  throw new Error("bad curve params: generator point");
1812
1812
  function f(g, m, x = !1) {
1813
- const v = x ? ue : qn;
1813
+ const v = x ? ue : jn;
1814
1814
  return Hl("coordinate " + g, m, v, l), m;
1815
1815
  }
1816
1816
  function u(g) {
@@ -1846,13 +1846,13 @@ function Zg(n, t = {}) {
1846
1846
  const M = Sa(m), P = m[v - 1];
1847
1847
  M[v - 1] = P & -129;
1848
1848
  const $ = Or(M), _ = x ? l : r.ORDER;
1849
- Hl("point.y", $, qn, _);
1849
+ Hl("point.y", $, jn, _);
1850
1850
  const L = c($ * $), I = c(L - ue), E = c(k * L - b);
1851
1851
  let { isValid: C, value: S } = h(I, E);
1852
1852
  if (!C)
1853
1853
  throw new Error("bad point: invalid y coordinate");
1854
1854
  const w = (S & ue) === ue, A = (P & 128) !== 0;
1855
- if (!x && S === qn && A)
1855
+ if (!x && S === jn && A)
1856
1856
  throw new Error("bad point: x=0 and x_0=1");
1857
1857
  return A !== w && (S = c(-S)), y.fromAffine({ x: S, y: $ });
1858
1858
  }
@@ -1925,7 +1925,7 @@ function Zg(n, t = {}) {
1925
1925
  multiplyUnsafe(m) {
1926
1926
  if (!o.isValid(m))
1927
1927
  throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");
1928
- return m === qn ? y.ZERO : this.is0() || m === ue ? this : p.unsafe(this, m, (x) => zs(y, x));
1928
+ return m === jn ? y.ZERO : this.is0() || m === ue ? this : p.unsafe(this, m, (x) => zs(y, x));
1929
1929
  }
1930
1930
  // Checks if point is of small order.
1931
1931
  // If you add something to small order point, you will have "dirty"
@@ -1948,7 +1948,7 @@ function Zg(n, t = {}) {
1948
1948
  v == null && (v = P ? qg : r.inv(M));
1949
1949
  const $ = c(b * v), _ = c(k * v), L = r.mul(M, v);
1950
1950
  if (P)
1951
- return { x: qn, y: ue };
1951
+ return { x: jn, y: ue };
1952
1952
  if (L !== ue)
1953
1953
  throw new Error("invZ was invalid");
1954
1954
  return { x: $, y: _ };
@@ -1969,7 +1969,7 @@ function Zg(n, t = {}) {
1969
1969
  };
1970
1970
  // base / generator point
1971
1971
  bt(y, "BASE", new y(s.Gx, s.Gy, ue, c(s.Gx * s.Gy))), // zero / infinity / identity point
1972
- bt(y, "ZERO", new y(qn, ue, ue, qn)), // 0, 1, 1, 0
1972
+ bt(y, "ZERO", new y(jn, ue, ue, jn)), // 0, 1, 1, 0
1973
1973
  // math field
1974
1974
  bt(y, "Fp", r), // scalar field
1975
1975
  bt(y, "Fn", o);
@@ -2579,7 +2579,7 @@ function rh(n) {
2579
2579
  function A0() {
2580
2580
  return No;
2581
2581
  }
2582
- const jn = class jn {
2582
+ const Zn = class Zn {
2583
2583
  parse(t) {
2584
2584
  var o;
2585
2585
  (o = t.chart) != null && o.palette && !t.colors && (t = { ...t, colors: sf(t.chart.palette) });
@@ -2684,7 +2684,7 @@ const jn = class jn {
2684
2684
  static mergeDataLabels(t) {
2685
2685
  let e;
2686
2686
  for (const i of t)
2687
- i !== void 0 && (e = jn.mergeTwoDataLabels(e, i));
2687
+ i !== void 0 && (e = Zn.mergeTwoDataLabels(e, i));
2688
2688
  return e;
2689
2689
  }
2690
2690
  static mergeTwoDataLabels(t, e) {
@@ -2700,7 +2700,7 @@ const jn = class jn {
2700
2700
  normalizeSeries(t, e, i) {
2701
2701
  let r = { ...t };
2702
2702
  if (r.type ? delete r._typeFromChart : (r.type = e, r._typeFromChart = !0), i) {
2703
- const o = i.series || {}, s = i[r.type] || {}, a = r._polarSubType, l = a ? i[a] || {} : {}, c = jn.mergeDataLabels(
2703
+ const o = i.series || {}, s = i[r.type] || {}, a = r._polarSubType, l = a ? i[a] || {} : {}, c = Zn.mergeDataLabels(
2704
2704
  [o, l, s, r].map((h) => h.dataLabels)
2705
2705
  );
2706
2706
  r = fe({}, o, l, s, r), c !== void 0 && (r.dataLabels = c);
@@ -2724,7 +2724,7 @@ const jn = class jn {
2724
2724
  * `[o,h,l,c]`/`[x,o,h,l,c]` for OHLC, `[low,high]`/`[x,low,high]` for ranges.
2725
2725
  */
2726
2726
  defaultArrayKeys(t, e) {
2727
- return t ? jn.OHLC_TYPES.has(t) ? e >= 5 ? ["x", "open", "high", "low", "close"] : ["open", "high", "low", "close"] : jn.RANGE_TYPES.has(t) ? e >= 3 ? ["x", "low", "high"] : ["low", "high"] : null : null;
2727
+ return t ? Zn.OHLC_TYPES.has(t) ? e >= 5 ? ["x", "open", "high", "low", "close"] : ["open", "high", "low", "close"] : Zn.RANGE_TYPES.has(t) ? e >= 3 ? ["x", "low", "high"] : ["low", "high"] : null : null;
2728
2728
  }
2729
2729
  normalizeDataPoint(t, e, i) {
2730
2730
  if (t === null)
@@ -2859,8 +2859,8 @@ const jn = class jn {
2859
2859
  };
2860
2860
  }
2861
2861
  };
2862
- jn.OHLC_TYPES = /* @__PURE__ */ new Set(["candlestick", "ohlc", "heikinashi", "hollowcandlestick"]), jn.RANGE_TYPES = /* @__PURE__ */ new Set(["arearange", "areasplinerange", "columnrange"]);
2863
- let hi = jn;
2862
+ Zn.OHLC_TYPES = /* @__PURE__ */ new Set(["candlestick", "ohlc", "heikinashi", "hollowcandlestick"]), Zn.RANGE_TYPES = /* @__PURE__ */ new Set(["arearange", "areasplinerange", "columnrange"]);
2863
+ let hi = Zn;
2864
2864
  var Ta = "http://www.w3.org/1999/xhtml";
2865
2865
  const oh = {
2866
2866
  svg: "http://www.w3.org/2000/svg",
@@ -4763,14 +4763,14 @@ Yo.every = (n) => (n = Math.floor(n), !isFinite(n) || !(n > 0) ? null : n > 1 ?
4763
4763
  t.setTime(+t + e * n);
4764
4764
  }, (t, e) => (e - t) / n) : Yo);
4765
4765
  Yo.range;
4766
- const In = 1e3, on = In * 60, Fn = on * 60, zn = Fn * 24, Ic = zn * 7, kh = zn * 30, Us = zn * 365, fi = ce((n) => {
4766
+ const Fn = 1e3, on = Fn * 60, Rn = on * 60, Bn = Rn * 24, Ic = Bn * 7, kh = Bn * 30, Us = Bn * 365, fi = ce((n) => {
4767
4767
  n.setTime(n - n.getMilliseconds());
4768
4768
  }, (n, t) => {
4769
- n.setTime(+n + t * In);
4770
- }, (n, t) => (t - n) / In, (n) => n.getUTCSeconds());
4769
+ n.setTime(+n + t * Fn);
4770
+ }, (n, t) => (t - n) / Fn, (n) => n.getUTCSeconds());
4771
4771
  fi.range;
4772
4772
  const Fc = ce((n) => {
4773
- n.setTime(n - n.getMilliseconds() - n.getSeconds() * In);
4773
+ n.setTime(n - n.getMilliseconds() - n.getSeconds() * Fn);
4774
4774
  }, (n, t) => {
4775
4775
  n.setTime(+n + t * on);
4776
4776
  }, (n, t) => (t - n) / on, (n) => n.getMinutes());
@@ -4782,21 +4782,21 @@ const Rc = ce((n) => {
4782
4782
  }, (n, t) => (t - n) / on, (n) => n.getUTCMinutes());
4783
4783
  Rc.range;
4784
4784
  const Dc = ce((n) => {
4785
- n.setTime(n - n.getMilliseconds() - n.getSeconds() * In - n.getMinutes() * on);
4785
+ n.setTime(n - n.getMilliseconds() - n.getSeconds() * Fn - n.getMinutes() * on);
4786
4786
  }, (n, t) => {
4787
- n.setTime(+n + t * Fn);
4788
- }, (n, t) => (t - n) / Fn, (n) => n.getHours());
4787
+ n.setTime(+n + t * Rn);
4788
+ }, (n, t) => (t - n) / Rn, (n) => n.getHours());
4789
4789
  Dc.range;
4790
4790
  const zc = ce((n) => {
4791
4791
  n.setUTCMinutes(0, 0, 0);
4792
4792
  }, (n, t) => {
4793
- n.setTime(+n + t * Fn);
4794
- }, (n, t) => (t - n) / Fn, (n) => n.getUTCHours());
4793
+ n.setTime(+n + t * Rn);
4794
+ }, (n, t) => (t - n) / Rn, (n) => n.getUTCHours());
4795
4795
  zc.range;
4796
4796
  const jr = ce(
4797
4797
  (n) => n.setHours(0, 0, 0, 0),
4798
4798
  (n, t) => n.setDate(n.getDate() + t),
4799
- (n, t) => (t - n - (t.getTimezoneOffset() - n.getTimezoneOffset()) * on) / zn,
4799
+ (n, t) => (t - n - (t.getTimezoneOffset() - n.getTimezoneOffset()) * on) / Bn,
4800
4800
  (n) => n.getDate() - 1
4801
4801
  );
4802
4802
  jr.range;
@@ -4804,13 +4804,13 @@ const gs = ce((n) => {
4804
4804
  n.setUTCHours(0, 0, 0, 0);
4805
4805
  }, (n, t) => {
4806
4806
  n.setUTCDate(n.getUTCDate() + t);
4807
- }, (n, t) => (t - n) / zn, (n) => n.getUTCDate() - 1);
4807
+ }, (n, t) => (t - n) / Bn, (n) => n.getUTCDate() - 1);
4808
4808
  gs.range;
4809
4809
  const nd = ce((n) => {
4810
4810
  n.setUTCHours(0, 0, 0, 0);
4811
4811
  }, (n, t) => {
4812
4812
  n.setUTCDate(n.getUTCDate() + t);
4813
- }, (n, t) => (t - n) / zn, (n) => Math.floor(n / zn));
4813
+ }, (n, t) => (t - n) / Bn, (n) => Math.floor(n / Bn));
4814
4814
  nd.range;
4815
4815
  function Mi(n) {
4816
4816
  return ce((t) => {
@@ -4854,44 +4854,44 @@ const Oc = ce((n) => {
4854
4854
  n.setUTCMonth(n.getUTCMonth() + t);
4855
4855
  }, (n, t) => t.getUTCMonth() - n.getUTCMonth() + (t.getUTCFullYear() - n.getUTCFullYear()) * 12, (n) => n.getUTCMonth());
4856
4856
  Oc.range;
4857
- const Bn = ce((n) => {
4857
+ const On = ce((n) => {
4858
4858
  n.setMonth(0, 1), n.setHours(0, 0, 0, 0);
4859
4859
  }, (n, t) => {
4860
4860
  n.setFullYear(n.getFullYear() + t);
4861
4861
  }, (n, t) => t.getFullYear() - n.getFullYear(), (n) => n.getFullYear());
4862
- Bn.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
4862
+ On.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
4863
4863
  t.setFullYear(Math.floor(t.getFullYear() / n) * n), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
4864
4864
  }, (t, e) => {
4865
4865
  t.setFullYear(t.getFullYear() + e * n);
4866
4866
  });
4867
- Bn.range;
4868
- const On = ce((n) => {
4867
+ On.range;
4868
+ const Nn = ce((n) => {
4869
4869
  n.setUTCMonth(0, 1), n.setUTCHours(0, 0, 0, 0);
4870
4870
  }, (n, t) => {
4871
4871
  n.setUTCFullYear(n.getUTCFullYear() + t);
4872
4872
  }, (n, t) => t.getUTCFullYear() - n.getUTCFullYear(), (n) => n.getUTCFullYear());
4873
- On.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
4873
+ Nn.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
4874
4874
  t.setUTCFullYear(Math.floor(t.getUTCFullYear() / n) * n), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
4875
4875
  }, (t, e) => {
4876
4876
  t.setUTCFullYear(t.getUTCFullYear() + e * n);
4877
4877
  });
4878
- On.range;
4878
+ Nn.range;
4879
4879
  function id(n, t, e, i, r, o) {
4880
4880
  const s = [
4881
- [fi, 1, In],
4882
- [fi, 5, 5 * In],
4883
- [fi, 15, 15 * In],
4884
- [fi, 30, 30 * In],
4881
+ [fi, 1, Fn],
4882
+ [fi, 5, 5 * Fn],
4883
+ [fi, 15, 15 * Fn],
4884
+ [fi, 30, 30 * Fn],
4885
4885
  [o, 1, on],
4886
4886
  [o, 5, 5 * on],
4887
4887
  [o, 15, 15 * on],
4888
4888
  [o, 30, 30 * on],
4889
- [r, 1, Fn],
4890
- [r, 3, 3 * Fn],
4891
- [r, 6, 6 * Fn],
4892
- [r, 12, 12 * Fn],
4893
- [i, 1, zn],
4894
- [i, 2, 2 * zn],
4889
+ [r, 1, Rn],
4890
+ [r, 3, 3 * Rn],
4891
+ [r, 6, 6 * Rn],
4892
+ [r, 12, 12 * Rn],
4893
+ [i, 1, Bn],
4894
+ [i, 2, 2 * Bn],
4895
4895
  [e, 1, Ic],
4896
4896
  [t, 1, kh],
4897
4897
  [t, 3, 3 * kh],
@@ -4912,7 +4912,7 @@ function id(n, t, e, i, r, o) {
4912
4912
  }
4913
4913
  return [a, l];
4914
4914
  }
4915
- const [Cx, Px] = id(On, Oc, ys, nd, zc, Rc), [Ex, Tx] = id(Bn, Bc, ms, jr, Dc, Fc);
4915
+ const [Cx, Px] = id(Nn, Oc, ys, nd, zc, Rc), [Ex, Tx] = id(On, Bc, ms, jr, Dc, Fc);
4916
4916
  function qs(n) {
4917
4917
  if (0 <= n.y && n.y < 100) {
4918
4918
  var t = new Date(-1, n.m, n.d, n.H, n.M, n.S, n.L);
@@ -5259,7 +5259,7 @@ function Jx(n, t) {
5259
5259
  return Yt(n.getHours() % 12 || 12, t, 2);
5260
5260
  }
5261
5261
  function Qx(n, t) {
5262
- return Yt(1 + jr.count(Bn(n), n), t, 3);
5262
+ return Yt(1 + jr.count(On(n), n), t, 3);
5263
5263
  }
5264
5264
  function rd(n, t) {
5265
5265
  return Yt(n.getMilliseconds(), t, 3);
@@ -5281,20 +5281,20 @@ function r1(n) {
5281
5281
  return t === 0 ? 7 : t;
5282
5282
  }
5283
5283
  function o1(n, t) {
5284
- return Yt(ms.count(Bn(n) - 1, n), t, 2);
5284
+ return Yt(ms.count(On(n) - 1, n), t, 2);
5285
5285
  }
5286
5286
  function od(n) {
5287
5287
  var t = n.getDay();
5288
5288
  return t >= 4 || t === 0 ? Gi(n) : Gi.ceil(n);
5289
5289
  }
5290
5290
  function s1(n, t) {
5291
- return n = od(n), Yt(Gi.count(Bn(n), n) + (Bn(n).getDay() === 4), t, 2);
5291
+ return n = od(n), Yt(Gi.count(On(n), n) + (On(n).getDay() === 4), t, 2);
5292
5292
  }
5293
5293
  function a1(n) {
5294
5294
  return n.getDay();
5295
5295
  }
5296
5296
  function c1(n, t) {
5297
- return Yt(Xo.count(Bn(n) - 1, n), t, 2);
5297
+ return Yt(Xo.count(On(n) - 1, n), t, 2);
5298
5298
  }
5299
5299
  function l1(n, t) {
5300
5300
  return Yt(n.getFullYear() % 100, t, 2);
@@ -5323,7 +5323,7 @@ function g1(n, t) {
5323
5323
  return Yt(n.getUTCHours() % 12 || 12, t, 2);
5324
5324
  }
5325
5325
  function m1(n, t) {
5326
- return Yt(1 + gs.count(On(n), n), t, 3);
5326
+ return Yt(1 + gs.count(Nn(n), n), t, 3);
5327
5327
  }
5328
5328
  function sd(n, t) {
5329
5329
  return Yt(n.getUTCMilliseconds(), t, 3);
@@ -5345,20 +5345,20 @@ function w1(n) {
5345
5345
  return t === 0 ? 7 : t;
5346
5346
  }
5347
5347
  function k1(n, t) {
5348
- return Yt(ys.count(On(n) - 1, n), t, 2);
5348
+ return Yt(ys.count(Nn(n) - 1, n), t, 2);
5349
5349
  }
5350
5350
  function ad(n) {
5351
5351
  var t = n.getUTCDay();
5352
5352
  return t >= 4 || t === 0 ? Yi(n) : Yi.ceil(n);
5353
5353
  }
5354
5354
  function M1(n, t) {
5355
- return n = ad(n), Yt(Yi.count(On(n), n) + (On(n).getUTCDay() === 4), t, 2);
5355
+ return n = ad(n), Yt(Yi.count(Nn(n), n) + (Nn(n).getUTCDay() === 4), t, 2);
5356
5356
  }
5357
5357
  function A1(n) {
5358
5358
  return n.getUTCDay();
5359
5359
  }
5360
5360
  function S1(n, t) {
5361
- return Yt(Uo.count(On(n) - 1, n), t, 2);
5361
+ return Yt(Uo.count(Nn(n) - 1, n), t, 2);
5362
5362
  }
5363
5363
  function _1(n, t) {
5364
5364
  return Yt(n.getUTCFullYear() % 100, t, 2);
@@ -5427,10 +5427,10 @@ function Nc(n, t, e, i, r, o, s, a, l, c) {
5427
5427
  }, h;
5428
5428
  }
5429
5429
  function F1() {
5430
- return ki.apply(Nc(Ex, Tx, Bn, Bc, ms, jr, Dc, Fc, fi, xs).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
5430
+ return ki.apply(Nc(Ex, Tx, On, Bc, ms, jr, Dc, Fc, fi, xs).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
5431
5431
  }
5432
5432
  function R1() {
5433
- return ki.apply(Nc(Cx, Px, On, Oc, ys, gs, zc, Rc, fi, bs).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
5433
+ return ki.apply(Nc(Cx, Px, Nn, Oc, ys, gs, zc, Rc, fi, bs).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
5434
5434
  }
5435
5435
  function D1() {
5436
5436
  var n = 0, t = 1, e, i, r, o, s = rn, a = !1, l;
@@ -5929,7 +5929,7 @@ function _b(n) {
5929
5929
  for (var t = this._groups, e = t.length, i = new Array(e), r = 0; r < e; ++r)
5930
5930
  for (var o = t[r], s = o.length, a = i[r] = [], l, c = 0; c < s; ++c)
5931
5931
  (l = o[c]) && n.call(l, l.__data__, c, o) && a.push(l);
5932
- return new Nn(i, this._parents, this._name, this._id);
5932
+ return new Wn(i, this._parents, this._name, this._id);
5933
5933
  }
5934
5934
  function Cb(n) {
5935
5935
  if (n._id !== this._id) throw new Error();
@@ -5938,7 +5938,7 @@ function Cb(n) {
5938
5938
  (u = l[d] || c[d]) && (f[d] = u);
5939
5939
  for (; a < i; ++a)
5940
5940
  s[a] = t[a];
5941
- return new Nn(s, this._parents, this._name, this._id);
5941
+ return new Wn(s, this._parents, this._name, this._id);
5942
5942
  }
5943
5943
  function Pb(n) {
5944
5944
  return (n + "").trim().split(/^|\s+/).every(function(t) {
@@ -5973,7 +5973,7 @@ function Ib(n) {
5973
5973
  for (var i = this._groups, r = i.length, o = new Array(r), s = 0; s < r; ++s)
5974
5974
  for (var a = i[s], l = a.length, c = o[s] = new Array(l), h, f, u = 0; u < l; ++u)
5975
5975
  (h = a[u]) && (f = n.call(h, h.__data__, u, a)) && ("__data__" in h && (f.__data__ = h.__data__), c[u] = f, Ms(c[u], t, e, u, c, gn(h, e)));
5976
- return new Nn(o, this._parents, t, e);
5976
+ return new Wn(o, this._parents, t, e);
5977
5977
  }
5978
5978
  function Fb(n) {
5979
5979
  var t = this._name, e = this._id;
@@ -5985,7 +5985,7 @@ function Fb(n) {
5985
5985
  (d = u[y]) && Ms(d, t, e, y, u, p);
5986
5986
  o.push(u), s.push(h);
5987
5987
  }
5988
- return new Nn(o, s, t, e);
5988
+ return new Wn(o, s, t, e);
5989
5989
  }
5990
5990
  var Rb = Ur.prototype.constructor;
5991
5991
  function Db() {
@@ -6094,7 +6094,7 @@ function Kb() {
6094
6094
  ease: h.ease
6095
6095
  });
6096
6096
  }
6097
- return new Nn(i, this._parents, n, e);
6097
+ return new Wn(i, this._parents, n, e);
6098
6098
  }
6099
6099
  function Jb() {
6100
6100
  var n, t, e = this, i = e._id, r = e.size();
@@ -6109,15 +6109,15 @@ function Jb() {
6109
6109
  });
6110
6110
  }
6111
6111
  var Qb = 0;
6112
- function Nn(n, t, e, i) {
6112
+ function Wn(n, t, e, i) {
6113
6113
  this._groups = n, this._parents = t, this._name = e, this._id = i;
6114
6114
  }
6115
6115
  function pd() {
6116
6116
  return ++Qb;
6117
6117
  }
6118
6118
  var Tn = Ur.prototype;
6119
- Nn.prototype = {
6120
- constructor: Nn,
6119
+ Wn.prototype = {
6120
+ constructor: Wn,
6121
6121
  select: Ib,
6122
6122
  selectAll: Fb,
6123
6123
  selectChild: Tn.selectChild,
@@ -6170,11 +6170,11 @@ function nv(n, t) {
6170
6170
  }
6171
6171
  function iv(n) {
6172
6172
  var t, e;
6173
- n instanceof Nn ? (t = n._id, n = n._name) : (t = pd(), (e = ev).time = Wc(), n = n == null ? null : n + "");
6173
+ n instanceof Wn ? (t = n._id, n = n._name) : (t = pd(), (e = ev).time = Wc(), n = n == null ? null : n + "");
6174
6174
  for (var i = this._groups, r = i.length, o = 0; o < r; ++o)
6175
6175
  for (var s = i[o], a = s.length, l, c = 0; c < a; ++c)
6176
6176
  (l = s[c]) && Ms(l, n, t, c, s, e || nv(l, t));
6177
- return new Nn(i, this._parents, n, t);
6177
+ return new Wn(i, this._parents, n, t);
6178
6178
  }
6179
6179
  Ur.prototype.interrupt = tb;
6180
6180
  Ur.prototype.transition = iv;
@@ -6315,7 +6315,7 @@ class Ss {
6315
6315
  }
6316
6316
  /** Readable axis text color when none is configured — adapts to the chart background. */
6317
6317
  autoText() {
6318
- return Dn(this.config._backgroundColor);
6318
+ return zn(this.config._backgroundColor);
6319
6319
  }
6320
6320
  getRange() {
6321
6321
  const t = this.config._inverted;
@@ -7320,7 +7320,7 @@ class Uc {
7320
7320
  }
7321
7321
  /** Readable legend text color when none is configured — adapts to the chart background. */
7322
7322
  autoText() {
7323
- return Dn(this.config._backgroundColor);
7323
+ return zn(this.config._backgroundColor);
7324
7324
  }
7325
7325
  resolveLabel(t) {
7326
7326
  var r;
@@ -7685,7 +7685,7 @@ class wv {
7685
7685
  }
7686
7686
  const Yh = "Powered by: KatuCharts", kv = "https://charts.katudv.com", xd = "#707070", Mv = "#b0b0b0";
7687
7687
  function Av(n) {
7688
- return Dn(n) === "#ffffff" ? Mv : xd;
7688
+ return zn(n) === "#ffffff" ? Mv : xd;
7689
7689
  }
7690
7690
  class Sv {
7691
7691
  constructor(t, e, i, r) {
@@ -9244,16 +9244,16 @@ function Wv(n, {
9244
9244
  _: { value: r }
9245
9245
  });
9246
9246
  }
9247
- function Rn(n, t, e) {
9247
+ function Dn(n, t, e) {
9248
9248
  this.k = n, this.x = t, this.y = e;
9249
9249
  }
9250
- Rn.prototype = {
9251
- constructor: Rn,
9250
+ Dn.prototype = {
9251
+ constructor: Dn,
9252
9252
  scale: function(n) {
9253
- return n === 1 ? this : new Rn(this.k * n, this.x, this.y);
9253
+ return n === 1 ? this : new Dn(this.k * n, this.x, this.y);
9254
9254
  },
9255
9255
  translate: function(n, t) {
9256
- return n === 0 & t === 0 ? this : new Rn(this.k, this.x + this.k * n, this.y + this.k * t);
9256
+ return n === 0 & t === 0 ? this : new Dn(this.k, this.x + this.k * n, this.y + this.k * t);
9257
9257
  },
9258
9258
  apply: function(n) {
9259
9259
  return [n[0] * this.k + this.x, n[1] * this.k + this.y];
@@ -9283,8 +9283,8 @@ Rn.prototype = {
9283
9283
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
9284
9284
  }
9285
9285
  };
9286
- var Er = new Rn(1, 0, 0);
9287
- Rn.prototype;
9286
+ var Er = new Dn(1, 0, 0);
9287
+ Dn.prototype;
9288
9288
  function ta(n) {
9289
9289
  n.stopImmediatePropagation();
9290
9290
  }
@@ -9351,11 +9351,11 @@ function vd() {
9351
9351
  }, T, F);
9352
9352
  };
9353
9353
  function x(S, w) {
9354
- return w = Math.max(o[0], Math.min(o[1], w)), w === S.k ? S : new Rn(w, S.x, S.y);
9354
+ return w = Math.max(o[0], Math.min(o[1], w)), w === S.k ? S : new Dn(w, S.x, S.y);
9355
9355
  }
9356
9356
  function v(S, w, A) {
9357
9357
  var T = w[0] - A[0] * S.k, F = w[1] - A[1] * S.k;
9358
- return T === S.x && F === S.y ? S : new Rn(S.k, T, F);
9358
+ return T === S.x && F === S.y ? S : new Dn(S.k, T, F);
9359
9359
  }
9360
9360
  function b(S) {
9361
9361
  return [(+S[0][0] + +S[1][0]) / 2, (+S[0][1] + +S[1][1]) / 2];
@@ -9371,7 +9371,7 @@ function vd() {
9371
9371
  if (N === 1) N = X;
9372
9372
  else {
9373
9373
  var H = j(N), Y = W / H[2];
9374
- N = new Rn(Y, B[0] - H[0] * Y, B[1] - H[1] * Y);
9374
+ N = new Dn(Y, B[0] - H[0] * Y, B[1] - H[1] * Y);
9375
9375
  }
9376
9376
  D.zoom(null, N);
9377
9377
  };
@@ -11179,20 +11179,27 @@ class z2 {
11179
11179
  (t = this.navigator) == null || t.destroy(), (e = this.rangeSelector) == null || e.destroy();
11180
11180
  }
11181
11181
  }
11182
- const Zn = class Zn {
11182
+ const Ln = class Ln {
11183
11183
  constructor(t, e) {
11184
11184
  var h, f;
11185
11185
  this.xAxes = [], this.yAxes = [], this.seriesInstances = [], this.tooltip = null, this.legend = null, this.crosshair = null, this.credits = null, this.exportButton = null, this.responsiveEngine = null, this.stock = null, this.clipPathId = "", this.autoHeight = !1, this.resizeObserver = null, this.isResponsiveUpdate = !1, this.scrollableInner = null, this.scrollableOuterWidth = 0, this.scrollableOuterHeight = 0, this.useVerticalScroll = !1, this.useHorizontalScroll = !1, this.fixedAxisOverlay = null, this.container = bv(t), this.container.style.position = "relative";
11186
11186
  const i = new hi();
11187
11187
  this.options = i.parse(e), this.originalUserOptions = no(e), rv(((h = this.options.time) == null ? void 0 : h.useUTC) !== !1), this.events = new oy(), this.state = new sy(this.options, this.events), this.layoutEngine = new hy();
11188
- const r = Vh(this.container, this.getDefaultHeightAspectRatio()), o = this.options.chart.width || r.width || 600, s = this.resolveHeight(this.options.chart.height, r.height), a = this.options.chart.scrollablePlotArea, l = (a == null ? void 0 : a.minHeight) && a.minHeight > s, c = (a == null ? void 0 : a.minWidth) && a.minWidth > o;
11189
- this.autoHeight = this.options.chart.height == null && !r.heightMeasured, this.chartWidth = c ? a.minWidth : o, this.chartHeight = l ? a.minHeight : s, this.scrollableOuterWidth = o, this.scrollableOuterHeight = s, this.useVerticalScroll = !!l, this.useHorizontalScroll = !!c, (l || c) && (this.container.style.position = "relative", this.container.querySelectorAll(":scope > [data-katu-scrollable-inner]").forEach((p) => {
11188
+ const r = Vh(this.container, this.getDefaultHeightAspectRatio()), o = this.options.chart.width || r.width || 600;
11189
+ let s = this.resolveHeight(this.options.chart.height, r.height);
11190
+ const a = this.options.chart.scrollablePlotArea, l = (a == null ? void 0 : a.minWidth) && a.minWidth > o;
11191
+ if (this.autoHeight = this.options.chart.height == null && !r.heightMeasured, this.chartWidth = l ? a.minWidth : o, this.autoHeight) {
11192
+ const u = a != null && a.minHeight ? Math.min(a.minHeight, Ln.MAX_AUTO_HEIGHT) : 0;
11193
+ s = Math.max(this.fitHeightToContent(s), u);
11194
+ }
11195
+ const c = (a == null ? void 0 : a.minHeight) && a.minHeight > s;
11196
+ this.chartHeight = c ? a.minHeight : s, this.scrollableOuterWidth = o, this.scrollableOuterHeight = s, this.useVerticalScroll = !!c, this.useHorizontalScroll = !!l, (c || l) && (this.container.style.position = "relative", this.container.querySelectorAll(":scope > [data-katu-scrollable-inner]").forEach((p) => {
11190
11197
  var y;
11191
11198
  return (y = p.parentElement) == null ? void 0 : y.removeChild(p);
11192
11199
  }), this.container.querySelectorAll(":scope > svg[data-katu-fixed-overlay]").forEach((p) => {
11193
11200
  var y;
11194
11201
  return (y = p.parentElement) == null ? void 0 : y.removeChild(p);
11195
- }), this.scrollableInner = document.createElement("div"), this.scrollableInner.setAttribute("data-katu-scrollable-inner", "1"), this.scrollableInner.style.overflowX = c ? "auto" : "hidden", this.scrollableInner.style.overflowY = l ? "auto" : "hidden", this.scrollableInner.style.width = o + "px", this.scrollableInner.style.height = s + "px", this.container.appendChild(this.scrollableInner)), this.setupResponsive(), this.applyInitialResponsiveRules(), this.autoHeight && !this.useVerticalScroll && (this.chartHeight = this.fitHeightToContent(this.chartHeight), this.scrollableOuterHeight = this.chartHeight), this.renderer = new $a(this.scrollableInner || this.container, this.chartWidth, this.chartHeight), this.scrollableInner && this.renderer.svg.style("max-width", "none"), this.exporter = new Iv({
11202
+ }), this.scrollableInner = document.createElement("div"), this.scrollableInner.setAttribute("data-katu-scrollable-inner", "1"), this.scrollableInner.style.overflowX = l ? "auto" : "hidden", this.scrollableInner.style.overflowY = c ? "auto" : "hidden", this.scrollableInner.style.width = o + "px", this.scrollableInner.style.height = s + "px", this.container.appendChild(this.scrollableInner)), this.setupResponsive(), this.applyInitialResponsiveRules(), this.autoHeight && !this.useVerticalScroll && (this.chartHeight = this.fitHeightToContent(this.chartHeight), this.scrollableOuterHeight = this.chartHeight), this.renderer = new $a(this.scrollableInner || this.container, this.chartWidth, this.chartHeight), this.scrollableInner && this.renderer.svg.style("max-width", "none"), this.exporter = new Iv({
11196
11203
  getRenderer: () => this.renderer,
11197
11204
  getOptions: () => this.options,
11198
11205
  getContainer: () => this.container,
@@ -11241,7 +11248,7 @@ const Zn = class Zn {
11241
11248
  this.renderAxes(), this.renderSeriesInstances(), this.renderLegend();
11242
11249
  },
11243
11250
  fireEvent: (u, ...d) => this.fireEvent(u, ...d)
11244
- }), this.applyChartStyles(), this.computeLayout(), this.createStructuralGroups(), this.buildAxes(), this.buildSeries(), this.renderAll(), (f = this.credits) == null || f.refresh(), (l || c) && this.createFixedAxisOverlay(), this.options.chart.reflow && this.setupReflow(), this.interactions.setup(), this.stock = new z2({
11251
+ }), this.applyChartStyles(), this.computeLayout(), this.createStructuralGroups(), this.buildAxes(), this.buildSeries(), this.renderAll(), (f = this.credits) == null || f.refresh(), (c || l) && this.createFixedAxisOverlay(), this.options.chart.reflow && this.setupReflow(), this.interactions.setup(), this.stock = new z2({
11245
11252
  getOptions: () => this.options,
11246
11253
  getContainer: () => this.container,
11247
11254
  getEvents: () => this.events,
@@ -11293,10 +11300,10 @@ const Zn = class Zn {
11293
11300
  */
11294
11301
  fitHeightToContent(t) {
11295
11302
  const r = 4e3 - this.layoutEngine.compute(this.options, this.chartWidth, 4e3).plotArea.height, o = Math.max(
11296
- Zn.MIN_AUTO_PLOT_HEIGHT,
11297
- this.verticalCategoryCount() * Zn.MIN_CATEGORY_ROW_HEIGHT
11303
+ Ln.MIN_AUTO_PLOT_HEIGHT,
11304
+ this.verticalCategoryCount() * Ln.MIN_CATEGORY_ROW_HEIGHT
11298
11305
  ), s = Math.ceil(r + o);
11299
- return s <= t ? t : Math.min(s, Math.max(t, Zn.MAX_AUTO_HEIGHT));
11306
+ return s <= t ? t : Math.min(s, Math.max(t, Ln.MAX_AUTO_HEIGHT));
11300
11307
  }
11301
11308
  /**
11302
11309
  * Categories rendered down the vertical axis (heatmap rows, or the category
@@ -11866,8 +11873,8 @@ const Zn = class Zn {
11866
11873
  return this.exporter.optionsToExternal();
11867
11874
  }
11868
11875
  };
11869
- Zn.MIN_AUTO_PLOT_HEIGHT = 160, Zn.MAX_AUTO_HEIGHT = 900, Zn.MIN_CATEGORY_ROW_HEIGHT = 22;
11870
- let Za = Zn;
11876
+ Ln.MIN_AUTO_PLOT_HEIGHT = 160, Ln.MAX_AUTO_HEIGHT = 900, Ln.MIN_CATEGORY_ROW_HEIGHT = 22;
11877
+ let Za = Ln;
11871
11878
  const vt = 600, Wt = 8, Fd = 0, Qn = vt + 100, Z = 300, Jo = 250, gt = gd, q = gd, B2 = 500;
11872
11879
  function Pe(n, t, e, i) {
11873
11880
  return i > B2 ? t : t + n * e;
@@ -11931,7 +11938,7 @@ class Xt {
11931
11938
  * light on dark ones (WCAG-based), so labels stay legible under any theme.
11932
11939
  */
11933
11940
  autoLabelColor(t) {
11934
- return Dn(this.context.backgroundColor, t);
11941
+ return zn(this.context.backgroundColor, t);
11935
11942
  }
11936
11943
  /**
11937
11944
  * Text halo (`text-shadow`) for labels placed over busy fills like maps. The
@@ -11945,7 +11952,7 @@ class Xt {
11945
11952
  }
11946
11953
  /** Single halo color (for SVG `stroke` outlines) that contrasts with the label. */
11947
11954
  labelHaloColor() {
11948
- return Dn(this.context.backgroundColor) === "#ffffff" ? "rgba(0,0,0,0.85)" : "#ffffff";
11955
+ return zn(this.context.backgroundColor) === "#ffffff" ? "rgba(0,0,0,0.85)" : "#ffffff";
11949
11956
  }
11950
11957
  /**
11951
11958
  * Border/separator color for cells, slices, nodes and point markers. Matches
@@ -13688,7 +13695,7 @@ function Ze(n) {
13688
13695
  for (var t = n.length / 6 | 0, e = new Array(t), i = 0; i < t; ) e[i] = "#" + n.slice(i * 6, ++i * 6);
13689
13696
  return e;
13690
13697
  }
13691
- const Hn = (n) => Ty(n[n.length - 1]);
13698
+ const Vn = (n) => Ty(n[n.length - 1]);
13692
13699
  var J2 = new Array(3).concat(
13693
13700
  "fc8d59ffffbf91cf60",
13694
13701
  "d7191cfdae61a6d96a1a9641",
@@ -13700,7 +13707,7 @@ var J2 = new Array(3).concat(
13700
13707
  "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
13701
13708
  "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
13702
13709
  ).map(Ze);
13703
- const Q2 = Hn(J2);
13710
+ const Q2 = Vn(J2);
13704
13711
  var tw = new Array(3).concat(
13705
13712
  "edf8b17fcdbb2c7fb8",
13706
13713
  "ffffcca1dab441b6c4225ea8",
@@ -13710,7 +13717,7 @@ var tw = new Array(3).concat(
13710
13717
  "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
13711
13718
  "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
13712
13719
  ).map(Ze);
13713
- const ew = Hn(tw);
13720
+ const ew = Vn(tw);
13714
13721
  var nw = new Array(3).concat(
13715
13722
  "ffeda0feb24cf03b20",
13716
13723
  "ffffb2fecc5cfd8d3ce31a1c",
@@ -13720,7 +13727,7 @@ var nw = new Array(3).concat(
13720
13727
  "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
13721
13728
  "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
13722
13729
  ).map(Ze);
13723
- const Wd = Hn(nw);
13730
+ const Wd = Vn(nw);
13724
13731
  var iw = new Array(3).concat(
13725
13732
  "deebf79ecae13182bd",
13726
13733
  "eff3ffbdd7e76baed62171b5",
@@ -13730,7 +13737,7 @@ var iw = new Array(3).concat(
13730
13737
  "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
13731
13738
  "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
13732
13739
  ).map(Ze);
13733
- const Hd = Hn(iw);
13740
+ const Hd = Vn(iw);
13734
13741
  var rw = new Array(3).concat(
13735
13742
  "e5f5e0a1d99b31a354",
13736
13743
  "edf8e9bae4b374c476238b45",
@@ -13740,7 +13747,7 @@ var rw = new Array(3).concat(
13740
13747
  "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
13741
13748
  "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
13742
13749
  ).map(Ze);
13743
- const ow = Hn(rw);
13750
+ const ow = Vn(rw);
13744
13751
  var sw = new Array(3).concat(
13745
13752
  "f0f0f0bdbdbd636363",
13746
13753
  "f7f7f7cccccc969696525252",
@@ -13750,7 +13757,7 @@ var sw = new Array(3).concat(
13750
13757
  "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
13751
13758
  "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
13752
13759
  ).map(Ze);
13753
- const aw = Hn(sw);
13760
+ const aw = Vn(sw);
13754
13761
  var cw = new Array(3).concat(
13755
13762
  "efedf5bcbddc756bb1",
13756
13763
  "f2f0f7cbc9e29e9ac86a51a3",
@@ -13760,7 +13767,7 @@ var cw = new Array(3).concat(
13760
13767
  "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
13761
13768
  "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
13762
13769
  ).map(Ze);
13763
- const lw = Hn(cw);
13770
+ const lw = Vn(cw);
13764
13771
  var hw = new Array(3).concat(
13765
13772
  "fee0d2fc9272de2d26",
13766
13773
  "fee5d9fcae91fb6a4acb181d",
@@ -13770,7 +13777,7 @@ var hw = new Array(3).concat(
13770
13777
  "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
13771
13778
  "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
13772
13779
  ).map(Ze);
13773
- const uw = Hn(hw);
13780
+ const uw = Vn(hw);
13774
13781
  var fw = new Array(3).concat(
13775
13782
  "fee6cefdae6be6550d",
13776
13783
  "feeddefdbe85fd8d3cd94701",
@@ -13780,7 +13787,7 @@ var fw = new Array(3).concat(
13780
13787
  "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
13781
13788
  "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
13782
13789
  ).map(Ze);
13783
- const dw = Hn(fw);
13790
+ const dw = Vn(fw);
13784
13791
  function Cs(n) {
13785
13792
  var t = n.length;
13786
13793
  return function(e) {
@@ -13947,7 +13954,7 @@ class xw extends Xt {
13947
13954
  const l = a.minCellHeight ?? 20;
13948
13955
  if (o < l) return;
13949
13956
  const c = ((f = a.style) == null ? void 0 : f.fontSize) || Mt, h = a.color || ((u = a.style) == null ? void 0 : u.color) || void 0;
13950
- this.group.selectAll(".katucharts-heatmap-label").data(t).join("text").attr("class", "katucharts-heatmap-label").attr("x", (d) => e(d) + r / 2 + (a.x ?? 0)).attr("y", (d) => i(d) + o / 2 + (a.y ?? 0)).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-size", c).attr("fill", (d) => Dn(s(d), h)).style("pointer-events", "none").text((d) => {
13957
+ this.group.selectAll(".katucharts-heatmap-label").data(t).join("text").attr("class", "katucharts-heatmap-label").attr("x", (d) => e(d) + r / 2 + (a.x ?? 0)).attr("y", (d) => i(d) + o / 2 + (a.y ?? 0)).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-size", c).attr("fill", (d) => zn(s(d), h)).style("pointer-events", "none").text((d) => {
13951
13958
  const p = d.value ?? d.z ?? d.y;
13952
13959
  return p == null ? a.nullFormatter ? a.nullFormatter.call({ point: d, series: { name: this.config.name } }) : a.nullFormat ? a.nullFormat : "" : a.formatter ? a.formatter.call({
13953
13960
  point: { ...d, value: p },
@@ -14806,7 +14813,7 @@ class fk extends Xt {
14806
14813
  const $ = l === "right" ? "end" : l === "center" ? "middle" : "start";
14807
14814
  let _;
14808
14815
  c === "bottom" ? _ = y.y1 - f : c === "middle" ? _ = (y.y0 + y.y1) / 2 : _ = y.y0 + f;
14809
- const L = this.group.append("text").attr("class", "katucharts-treemap-label").attr("x", P).attr("text-anchor", $).attr("fill", Dn(y._color, s)).style("pointer-events", "none");
14816
+ const L = this.group.append("text").attr("class", "katucharts-treemap-label").attr("x", P).attr("text-anchor", $).attr("fill", zn(y._color, s)).style("pointer-events", "none");
14810
14817
  let I = _;
14811
14818
  M.forEach((C, S) => {
14812
14819
  if (C.length === 0) return;
@@ -14867,7 +14874,7 @@ class dk extends Xt {
14867
14874
  if (A > 15) {
14868
14875
  const H = this.config.name || ((j = S.data) == null ? void 0 : j.name) || "";
14869
14876
  if (H) {
14870
- const Y = ((N = this.config.dataLabels) == null ? void 0 : N.style) || {}, G = Dn(R, Y.color), Q = Y.textOutline, O = E.append("text").attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", A > 35 ? "13px" : "10px").attr("font-weight", "bold").attr("fill", G).style("pointer-events", "none").text(H);
14877
+ const Y = ((N = this.config.dataLabels) == null ? void 0 : N.style) || {}, G = zn(R, Y.color), Q = Y.textOutline, O = E.append("text").attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", A > 35 ? "13px" : "10px").attr("font-weight", "bold").attr("fill", G).style("pointer-events", "none").text(H);
14871
14878
  if (Q) {
14872
14879
  const nt = Q.split(/\s+/);
14873
14880
  O.style("paint-order", "stroke fill").attr("stroke", nt.length >= 2 ? nt.slice(1).join(" ") : "white").attr("stroke-width", parseFloat(Q) || 0).attr("stroke-linejoin", "round");
@@ -15057,7 +15064,7 @@ class dk extends Xt {
15057
15064
  }, y = (m) => {
15058
15065
  var b, k;
15059
15066
  const x = i.find((M) => M.level === m.depth), v = ((k = (b = x == null ? void 0 : x.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.color) || a.color;
15060
- return Dn(p(m), v);
15067
+ return zn(p(m), v);
15061
15068
  };
15062
15069
  t.selectAll(".katucharts-sunburst-label").data(e).join("text").attr("class", "katucharts-sunburst-label").attr("transform", (m) => {
15063
15070
  var I;
@@ -15728,7 +15735,7 @@ class vk extends Xt {
15728
15735
  return { xMin: t, xMax: e, yMin: 0, yMax: 0 };
15729
15736
  }
15730
15737
  }
15731
- var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, je = zt * 2, Fe = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Dt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Et = Math.sin, an = Math.sign || function(n) {
15738
+ var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, je = zt * 2, Fe = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Hn = Math.atan2, Dt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Et = Math.sin, an = Math.sign || function(n) {
15732
15739
  return n > 0 ? 1 : n < 0 ? -1 : 0;
15733
15740
  }, Ve = Math.sqrt, sl = Math.tan;
15734
15741
  function qd(n) {
@@ -15789,7 +15796,7 @@ function Fi(n, t) {
15789
15796
  n && xu.hasOwnProperty(n.type) ? xu[n.type](n, t) : ts(n, t);
15790
15797
  }
15791
15798
  function tc(n) {
15792
- return [Wn(n[1], n[0]), ln(n[2])];
15799
+ return [Hn(n[1], n[0]), ln(n[2])];
15793
15800
  }
15794
15801
  function Zi(n) {
15795
15802
  var t = n[0], e = n[1], i = Dt(e);
@@ -15840,14 +15847,14 @@ function Mu(n, t) {
15840
15847
  function s(a, l) {
15841
15848
  var c = Dt(l), h = Dt(a) * c, f = Et(a) * c, u = Et(l), d = u * e + h * i;
15842
15849
  return [
15843
- Wn(f * r - d * o, h * e - u * i),
15850
+ Hn(f * r - d * o, h * e - u * i),
15844
15851
  ln(d * r + f * o)
15845
15852
  ];
15846
15853
  }
15847
15854
  return s.invert = function(a, l) {
15848
15855
  var c = Dt(l), h = Dt(a) * c, f = Et(a) * c, u = Et(l), d = u * r - f * o;
15849
15856
  return [
15850
- Wn(f * r + u * o, h * e + d * i),
15857
+ Hn(f * r + u * o, h * e + d * i),
15851
15858
  ln(d * e - h * i)
15852
15859
  ];
15853
15860
  }, s;
@@ -15957,7 +15964,7 @@ function Mk(n, t) {
15957
15964
  if (u = (f = n[c]).length)
15958
15965
  for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Et(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = P, d = v) {
15959
15966
  var v = f[x], b = ga(v), k = v[1] / 2 + yu, M = Et(k), P = Dt(k), $ = b - p, _ = $ >= 0 ? 1 : -1, L = _ * $, I = L > zt, E = g * M;
15960
- if (l.add(Wn(E * _ * Et(L), m * P + E * Dt(L))), s += I ? $ + _ * je : $, I ^ p >= e ^ b >= e) {
15967
+ if (l.add(Hn(E * _ * Et(L), m * P + E * Dt(L))), s += I ? $ + _ * je : $, I ^ p >= e ^ b >= e) {
15961
15968
  var C = es(Zi(d), Zi(v));
15962
15969
  ec(C);
15963
15970
  var S = es(o, C);
@@ -16293,15 +16300,15 @@ function Lk() {
16293
16300
  }, m.extentMajor([[-180, -90 + At], [180, 90 - At]]).extentMinor([[-180, -80 - At], [180, 80 + At]]);
16294
16301
  }
16295
16302
  const rc = (n) => n;
16296
- var ma = new yi(), oc = new yi(), Qd, tp, sc, ac, Ln = {
16303
+ var ma = new yi(), oc = new yi(), Qd, tp, sc, ac, In = {
16297
16304
  point: cn,
16298
16305
  lineStart: cn,
16299
16306
  lineEnd: cn,
16300
16307
  polygonStart: function() {
16301
- Ln.lineStart = Ik, Ln.lineEnd = Rk;
16308
+ In.lineStart = Ik, In.lineEnd = Rk;
16302
16309
  },
16303
16310
  polygonEnd: function() {
16304
- Ln.lineStart = Ln.lineEnd = Ln.point = cn, ma.add(Gt(oc)), oc = new yi();
16311
+ In.lineStart = In.lineEnd = In.point = cn, ma.add(Gt(oc)), oc = new yi();
16305
16312
  },
16306
16313
  result: function() {
16307
16314
  var n = ma / 2;
@@ -16309,10 +16316,10 @@ var ma = new yi(), oc = new yi(), Qd, tp, sc, ac, Ln = {
16309
16316
  }
16310
16317
  };
16311
16318
  function Ik() {
16312
- Ln.point = Fk;
16319
+ In.point = Fk;
16313
16320
  }
16314
16321
  function Fk(n, t) {
16315
- Ln.point = ep, Qd = sc = n, tp = ac = t;
16322
+ In.point = ep, Qd = sc = n, tp = ac = t;
16316
16323
  }
16317
16324
  function ep(n, t) {
16318
16325
  oc.add(ac * n - sc * t), sc = n, ac = t;
@@ -16513,7 +16520,7 @@ function Gk(n, t) {
16513
16520
  return a && (typeof i == "function" && o.pointRadius(+i.apply(this, arguments)), Fi(a, r(o))), o.result();
16514
16521
  }
16515
16522
  return s.area = function(a) {
16516
- return Fi(a, r(Ln)), Ln.result();
16523
+ return Fi(a, r(In)), In.result();
16517
16524
  }, s.measure = function(a) {
16518
16525
  return Fi(a, r(Yr)), Yr.result();
16519
16526
  }, s.bounds = function(a) {
@@ -16607,7 +16614,7 @@ function Uk(n, t) {
16607
16614
  function e(i, r, o, s, a, l, c, h, f, u, d, p, y, g) {
16608
16615
  var m = c - i, x = h - r, v = m * m + x * x;
16609
16616
  if (v > 4 * t && y--) {
16610
- var b = s + u, k = a + d, M = l + p, P = Ve(b * b + k * k + M * M), $ = ln(M /= P), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Wn(k, b), L = n(_, $), I = L[0], E = L[1], C = I - i, S = E - r, w = x * C - m * S;
16617
+ var b = s + u, k = a + d, M = l + p, P = Ve(b * b + k * k + M * M), $ = ln(M /= P), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Hn(k, b), L = n(_, $), I = L[0], E = L[1], C = I - i, S = E - r, w = x * C - m * S;
16611
16618
  (w * w / v > t || Gt((m * C + x * S) / v - 0.5) > 0.3 || s * u + a * d + l * p < Yk) && (e(i, r, o, s, a, l, I, E, _, b /= P, k /= P, M, y, g), g.point(I, E), e(I, E, _, b, k, M, c, h, f, u, d, p, y, g));
16612
16619
  }
16613
16620
  }
@@ -16762,7 +16769,7 @@ function Jk(n, t) {
16762
16769
  return [c * Et(a *= i), o - c * Dt(a)];
16763
16770
  }
16764
16771
  return s.invert = function(a, l) {
16765
- var c = o - l, h = Wn(a, Gt(c)) * an(c);
16772
+ var c = o - l, h = Hn(a, Gt(c)) * an(c);
16766
16773
  return c * i < 0 && (h -= zt * an(a) * an(c)), [h / i, ln((r - (a * a + c * c) * i * i) / (2 * i))];
16767
16774
  }, s;
16768
16775
  }
@@ -16843,7 +16850,7 @@ function Kr(n) {
16843
16850
  return function(t, e) {
16844
16851
  var i = Ve(t * t + e * e), r = n(i), o = Et(r), s = Dt(r);
16845
16852
  return [
16846
- Wn(t * o, i * s),
16853
+ Hn(t * o, i * s),
16847
16854
  ln(i && e * o / i)
16848
16855
  ];
16849
16856
  };
@@ -16904,7 +16911,7 @@ function iM(n, t) {
16904
16911
  return [l * Et(i * s), r - l * Dt(i * s)];
16905
16912
  }
16906
16913
  return o.invert = function(s, a) {
16907
- var l = r - a, c = an(i) * Ve(s * s + l * l), h = Wn(s, Gt(l)) * an(l);
16914
+ var l = r - a, c = an(i) * Ve(s * s + l * l), h = Hn(s, Gt(l)) * an(l);
16908
16915
  return l * i < 0 && (h -= zt * an(s) * an(l)), [h / i, 2 * tr(da(r / c, 1 / i)) - ee];
16909
16916
  }, o;
16910
16917
  }
@@ -16926,7 +16933,7 @@ function sM(n, t) {
16926
16933
  return [l * Et(c), r - l * Dt(c)];
16927
16934
  }
16928
16935
  return o.invert = function(s, a) {
16929
- var l = r - a, c = Wn(s, Gt(l)) * an(l);
16936
+ var l = r - a, c = Hn(s, Gt(l)) * an(l);
16930
16937
  return l * i < 0 && (c -= zt * an(s) * an(l)), [c / i, r - an(i) * Ve(s * s + l * l)];
16931
16938
  }, o;
16932
16939
  }
@@ -18916,7 +18923,7 @@ class rA extends Xt {
18916
18923
  const he = (V) => {
18917
18924
  const tt = V.source ? X(V.source) : void 0, lt = tt !== void 0 ? Ge.get(tt) : void 0;
18918
18925
  return (lt == null ? void 0 : lt.linkOpacity) ?? m;
18919
- }, mn = QM(), Vn = (V) => {
18926
+ }, mn = QM(), Gn = (V) => {
18920
18927
  if (!c) return mn(V);
18921
18928
  const tt = V.source.x1, lt = V.target.x0, _t = V.y0, Lt = V.y1, Le = lt - tt;
18922
18929
  if (!Number.isFinite(Le) || !Number.isFinite(_t) || !Number.isFinite(Lt))
@@ -18931,22 +18938,22 @@ class rA extends Xt {
18931
18938
  }, Be = c, Ke = Be ? (V) => {
18932
18939
  const tt = V.source.x1, lt = V.target.x0, _t = V.y0, Lt = V.y1, Le = lt - tt, xe = Math.max(v, V.width) / 2;
18933
18940
  if (!Number.isFinite(Le) || !Number.isFinite(_t) || !Number.isFinite(Lt))
18934
- return Vn(V);
18935
- const ge = _t - xe, yn = _t + xe, or = Lt - xe, Gn = Lt + xe, Cn = Math.max(1, Le * 0.42);
18941
+ return Gn(V);
18942
+ const ge = _t - xe, yn = _t + xe, or = Lt - xe, Yn = Lt + xe, Cn = Math.max(1, Le * 0.42);
18936
18943
  return Le <= 2 ? [
18937
18944
  `M${tt},${ge}`,
18938
18945
  `L${lt},${or}`,
18939
- `L${lt},${Gn}`,
18946
+ `L${lt},${Yn}`,
18940
18947
  `L${tt},${yn}`,
18941
18948
  "Z"
18942
18949
  ].join("") : [
18943
18950
  `M${tt},${ge}`,
18944
18951
  `C${tt + Cn},${ge} ${lt - Cn},${or} ${lt},${or}`,
18945
- `L${lt},${Gn}`,
18946
- `C${lt - Cn},${Gn} ${tt + Cn},${yn} ${tt},${yn}`,
18952
+ `L${lt},${Yn}`,
18953
+ `C${lt - Cn},${Yn} ${tt + Cn},${yn} ${tt},${yn}`,
18947
18954
  "Z"
18948
18955
  ].join("");
18949
- } : Vn, Ye = Be ? "fill-opacity" : "stroke-opacity", Xe = r.linkColorMode ?? "from", er = (V) => V.source.color || e[U.nodes.indexOf(V.source) % e.length] || "#aaa", nr = (V) => V.target.color || e[U.nodes.indexOf(V.target) % e.length] || "#aaa", ir = this.group.append("defs"), rt = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
18956
+ } : Gn, Ye = Be ? "fill-opacity" : "stroke-opacity", Xe = r.linkColorMode ?? "from", er = (V) => V.source.color || e[U.nodes.indexOf(V.source) % e.length] || "#aaa", nr = (V) => V.target.color || e[U.nodes.indexOf(V.target) % e.length] || "#aaa", ir = this.group.append("defs"), rt = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
18950
18957
  ir.append("clipPath").attr("id", rt).append("rect").attr("x", 0).attr("y", 0).attr("width", t.width).attr("height", t.height);
18951
18958
  const ot = this.group.append("g").attr("class", "katucharts-sankey-clipped-layer").attr("clip-path", `url(#${rt})`), ut = ot.append("g").attr("class", "katucharts-sankey-links"), wt = ot.append("g").attr("class", "katucharts-sankey-nodes"), yt = ot.append("g").attr("class", "katucharts-sankey-link-hitareas");
18952
18959
  let mt = null;
@@ -19058,7 +19065,7 @@ class rA extends Xt {
19058
19065
  event: V
19059
19066
  });
19060
19067
  };
19061
- if (Ht.on("mouseover", Je).on("mouseout", $e).on("click", Oe), yt.selectAll(".katucharts-sankey-link-hitarea").data(U.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", qt).on("click", Qt), $) {
19068
+ if (Ht.on("mouseover", Je).on("mouseout", $e).on("click", Oe), yt.selectAll(".katucharts-sankey-link-hitarea").data(U.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Gn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", qt).on("click", Qt), $) {
19062
19069
  const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = U.nodes.reduce((dt, $t) => Math.max(dt, $t.x0 ?? 0), 0), _t = U.nodes.reduce((dt, $t) => Math.min(dt, $t.x0 ?? 1 / 0), 1 / 0), Lt = (dt) => p ? X(dt) === Nt : lt > 0 && (dt.x0 ?? 0) >= lt - 0.5, Le = (dt) => p ? X(dt) === 0 : Number.isFinite(_t) && (dt.x0 ?? 0) <= _t + 0.5, xe = (dt) => Q && Lt(dt) || Le(dt), ge = /* @__PURE__ */ new Map();
19063
19070
  for (const dt of U.nodes) {
19064
19071
  const $t = dt.y1 - dt.y0;
@@ -19070,10 +19077,10 @@ class rA extends Xt {
19070
19077
  }
19071
19078
  const yn = (dt) => xe(dt) ? Lt(dt) ? "end" : "start" : "middle", or = (dt) => xe(dt) ? Lt(dt) ? dt.x0 - 4 + (P.x ?? 0) : dt.x1 + 4 + (P.x ?? 0) : (dt.x0 + dt.x1) / 2 + (P.x ?? 0);
19072
19079
  J = V.selectAll(".katucharts-sankey-label").data(U.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (dt) => (dt.y0 + dt.y1) / 2 + (P.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = P.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", C).attr("paint-order", "stroke").attr("stroke", (_n = P.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = P.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Je).on("mouseout", $e).on("click", Oe).text((dt) => ge.get(dt) ?? "");
19073
- const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
19080
+ const Yn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
19074
19081
  for (const dt of U.nodes) {
19075
19082
  const $t = X(dt);
19076
- Gn.set($t, Math.min(Gn.get($t) ?? 1 / 0, dt.x0)), Cn.set($t, Math.max(Cn.get($t) ?? -1 / 0, dt.x1));
19083
+ Yn.set($t, Math.min(Yn.get($t) ?? 1 / 0, dt.x0)), Cn.set($t, Math.max(Cn.get($t) ?? -1 / 0, dt.x1));
19077
19084
  }
19078
19085
  J.each(function(dt) {
19079
19086
  const $t = this;
@@ -19087,7 +19094,7 @@ class rA extends Xt {
19087
19094
  const cr = Cn.get(bl - 1), wl = cr !== void 0 ? (cr + dt.x0) / 2 : 2;
19088
19095
  ar = dt.x0 - 4 - (wl + vl / 2);
19089
19096
  } else {
19090
- const cr = Gn.get(bl + 1);
19097
+ const cr = Yn.get(bl + 1);
19091
19098
  ar = (cr !== void 0 ? (dt.x1 + cr) / 2 : t.width - 2) - vl / 2 - (dt.x1 + 4);
19092
19099
  }
19093
19100
  if (ar <= S) {
@@ -19097,10 +19104,10 @@ class rA extends Xt {
19097
19104
  xn > ar && (ie = T(ie, ar, 1), $t.textContent = ie);
19098
19105
  return;
19099
19106
  }
19100
- const ei = (dt.x0 + dt.x1) / 2, Yn = ei - xn / 2, Si = ei + xn / 2;
19101
- if (Si <= t.width && Yn >= 0) return;
19102
- const sr = X(dt), $p = Gn.get(sr + 1) ?? t.width, Lp = Cn.get(sr - 1) ?? 0, Ts = $p - dt.x1 - 4, $s = dt.x0 - Lp - 4;
19103
- if (Yn < 0 && Ts > I * 1.5) {
19107
+ const ei = (dt.x0 + dt.x1) / 2, Xn = ei - xn / 2, Si = ei + xn / 2;
19108
+ if (Si <= t.width && Xn >= 0) return;
19109
+ const sr = X(dt), $p = Yn.get(sr + 1) ?? t.width, Lp = Cn.get(sr - 1) ?? 0, Ts = $p - dt.x1 - 4, $s = dt.x0 - Lp - 4;
19110
+ if (Xn < 0 && Ts > I * 1.5) {
19104
19111
  $t.setAttribute("text-anchor", "start"), $t.setAttribute("x", String(dt.x1 + 2)), xn > Ts && ($t.textContent = T(ie, Ts));
19105
19112
  return;
19106
19113
  }
@@ -19128,11 +19135,11 @@ class rA extends Xt {
19128
19135
  try {
19129
19136
  ie = $t.getBBox();
19130
19137
  } catch {
19131
- const Yn = A($t.textContent || ""), Si = Number($t.getAttribute("x") || 0), sr = $t.getAttribute("text-anchor");
19138
+ const Xn = A($t.textContent || ""), Si = Number($t.getAttribute("x") || 0), sr = $t.getAttribute("text-anchor");
19132
19139
  ie = {
19133
- x: sr === "end" ? Si - Yn : sr === "middle" ? Si - Yn / 2 : Si,
19140
+ x: sr === "end" ? Si - Xn : sr === "middle" ? Si - Xn / 2 : Si,
19134
19141
  y: Number($t.getAttribute("y") || 0) - I / 2,
19135
- width: Yn,
19142
+ width: Xn,
19136
19143
  height: I
19137
19144
  };
19138
19145
  }
@@ -19143,7 +19150,7 @@ class rA extends Xt {
19143
19150
  top: ie.y,
19144
19151
  bottom: ie.y + ie.height
19145
19152
  };
19146
- if (ml.some((Yn) => Tp(Yn, xn)) && P.overflow !== "allow") {
19153
+ if (ml.some((Xn) => Tp(Xn, xn)) && P.overflow !== "allow") {
19147
19154
  $t.textContent = "";
19148
19155
  continue;
19149
19156
  }
@@ -20106,7 +20113,7 @@ class WA extends Xt {
20106
20113
  ut += wt;
20107
20114
  }
20108
20115
  return ut = ut.trimEnd(), (ut || rt[0]) + Kt;
20109
- }, he = t.width - x, mn = x, Vn = v, Be = t.height - v, Te = ct.map((rt) => {
20116
+ }, he = t.width - x, mn = x, Gn = v, Be = t.height - v, Te = ct.map((rt) => {
20110
20117
  const ot = (rt.startAngle + rt.endAngle) / 2, ut = Math.sin(ot) >= 0;
20111
20118
  return {
20112
20119
  index: rt.index,
@@ -20150,7 +20157,7 @@ class WA extends Xt {
20150
20157
  } else
20151
20158
  Xe.attr("opacity", 1);
20152
20159
  } else {
20153
- const rt = Math.max(1, Vn - 5 + (Be - 5));
20160
+ const rt = Math.max(1, Gn - 5 + (Be - 5));
20154
20161
  if (o === "medium") {
20155
20162
  const Pt = Math.max(1, Math.min(10, Math.floor(rt / (Tt * 1.2)))) * 2, Ft = Te.filter((pt) => pt.visible).sort((pt, Ut) => Ut.rank - pt.rank);
20156
20163
  Ft.length > Pt && Ft.slice(Pt).forEach((pt) => {
@@ -20163,7 +20170,7 @@ class WA extends Xt {
20163
20170
  pt.visible = !1;
20164
20171
  });
20165
20172
  }
20166
- this.distributeChordLabels(Te.filter((J) => J.visible && J.isRight), Tt, Vn, Be), this.distributeChordLabels(Te.filter((J) => J.visible && !J.isRight), Tt, Vn, Be);
20173
+ this.distributeChordLabels(Te.filter((J) => J.visible && J.isRight), Tt, Gn, Be), this.distributeChordLabels(Te.filter((J) => J.visible && !J.isRight), Tt, Gn, Be);
20167
20174
  const ot = Math.max(Ot * 1.4, 16), ut = (J) => {
20168
20175
  const Pt = J.filter((Bt) => Bt.visible).sort((Bt, qt) => Bt.ly - qt.ly), Ft = Pt.length * Tt / rt;
20169
20176
  let pt = 1;