katucharts.js 0.2.3 → 0.2.4

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.
@@ -1219,14 +1219,14 @@ class wg extends hg {
1219
1219
  for (let v = 0; v < 16; v++, e += 4)
1220
1220
  Xn[v] = t.getUint32(e), Un[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 = Si(b, k, 1) ^ Si(b, k, 8) ^ zl(b, k, 7), C = _i(b, k, 1) ^ _i(b, k, 8) ^ Bl(b, k, 7), L = Xn[v - 2] | 0, _ = Un[v - 2] | 0, $ = Si(L, _, 19) ^ no(L, _, 61) ^ zl(L, _, 6), I = _i(L, _, 19) ^ io(L, _, 61) ^ Bl(L, _, 6), E = gg(C, I, Un[v - 7], Un[v - 16]), P = mg(E, M, $, Xn[v - 7], Xn[v - 16]);
1222
+ const b = Xn[v - 15] | 0, k = Un[v - 15] | 0, M = Si(b, k, 1) ^ Si(b, k, 8) ^ zl(b, k, 7), C = _i(b, k, 1) ^ _i(b, k, 8) ^ Bl(b, k, 7), L = Xn[v - 2] | 0, _ = Un[v - 2] | 0, T = Si(L, _, 19) ^ no(L, _, 61) ^ zl(L, _, 6), I = _i(L, _, 19) ^ io(L, _, 61) ^ Bl(L, _, 6), E = gg(C, I, Un[v - 7], Un[v - 16]), P = mg(E, M, T, Xn[v - 7], Xn[v - 16]);
1223
1223
  Xn[v] = P | 0, Un[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 = Si(f, u, 14) ^ Si(f, u, 18) ^ no(f, u, 41), k = _i(f, u, 14) ^ _i(f, u, 18) ^ io(f, u, 41), M = f & d ^ ~f & y, C = u & p ^ ~u & g, L = yg(x, k, C, vg[v], Un[v]), _ = xg(L, m, b, M, bg[v], Xn[v]), $ = L | 0, I = Si(i, r, 28) ^ no(i, r, 34) ^ no(i, r, 39), E = _i(i, r, 28) ^ io(i, r, 34) ^ io(i, r, 39), P = i & o ^ i & a ^ o & a, S = r & s ^ r & l ^ s & l;
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, $ | 0), c = a | 0, h = l | 0, a = o | 0, l = s | 0, o = i | 0, s = r | 0;
1229
- const w = dg($, E, S);
1227
+ const b = Si(f, u, 14) ^ Si(f, u, 18) ^ no(f, u, 41), k = _i(f, u, 14) ^ _i(f, u, 18) ^ io(f, u, 41), M = f & d ^ ~f & y, C = u & p ^ ~u & g, L = yg(x, k, C, vg[v], Un[v]), _ = xg(L, m, b, M, bg[v], Xn[v]), T = L | 0, I = Si(i, r, 28) ^ no(i, r, 34) ^ no(i, r, 39), E = _i(i, r, 28) ^ io(i, r, 34) ^ io(i, r, 39), P = i & o ^ i & a ^ o & a, S = r & s ^ r & l ^ s & l;
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, T | 0), c = a | 0, h = l | 0, a = o | 0, l = s | 0, o = i | 0, s = r | 0;
1229
+ const w = dg(T, E, S);
1230
1230
  i = pg(w, _, I, P), r = w | 0;
1231
1231
  }
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);
@@ -1847,7 +1847,7 @@ function qg(n, t = {}) {
1847
1847
  M[v - 1] = C & -129;
1848
1848
  const L = zr(M), _ = x ? l : r.ORDER;
1849
1849
  Nl("point.y", L, qn, _);
1850
- const $ = c(L * L), I = c($ - he), E = c(k * $ - b);
1850
+ const T = c(L * L), I = c(T - he), E = c(k * T - b);
1851
1851
  let { isValid: P, value: S } = h(I, E);
1852
1852
  if (!P)
1853
1853
  throw new Error("bad point: invalid y coordinate");
@@ -1873,7 +1873,7 @@ function qg(n, t = {}) {
1873
1873
  const m = this, { a: x, d: v } = s;
1874
1874
  if (m.is0())
1875
1875
  throw new Error("bad point: ZERO");
1876
- const { X: b, Y: k, Z: M, T: C } = m, L = c(b * b), _ = c(k * k), $ = c(M * M), I = c($ * $), E = c(L * x), P = c($ * c(E + _)), S = c(I + c(v * c(L * _)));
1876
+ const { X: b, Y: k, Z: M, T: C } = m, L = c(b * b), _ = c(k * k), T = c(M * M), I = c(T * T), E = c(L * x), P = c(T * c(E + _)), S = c(I + c(v * c(L * _)));
1877
1877
  if (P !== S)
1878
1878
  throw new Error("bad point: equation left != right (1)");
1879
1879
  const w = c(b * k), A = c(M * C);
@@ -1883,8 +1883,8 @@ function qg(n, t = {}) {
1883
1883
  // Compare one point to another.
1884
1884
  equals(m) {
1885
1885
  u(m);
1886
- const { X: x, Y: v, Z: b } = this, { X: k, Y: M, Z: C } = m, L = c(x * C), _ = c(k * b), $ = c(v * C), I = c(M * b);
1887
- return L === _ && $ === I;
1886
+ const { X: x, Y: v, Z: b } = this, { X: k, Y: M, Z: C } = m, L = c(x * C), _ = c(k * b), T = c(v * C), I = c(M * b);
1887
+ return L === _ && T === I;
1888
1888
  }
1889
1889
  is0() {
1890
1890
  return this.equals(y.ZERO);
@@ -1896,15 +1896,15 @@ function qg(n, t = {}) {
1896
1896
  // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#doubling-dbl-2008-hwcd
1897
1897
  // Cost: 4M + 4S + 1*a + 6add + 1*2.
1898
1898
  double() {
1899
- const { a: m } = s, { X: x, Y: v, Z: b } = this, k = c(x * x), M = c(v * v), C = c(Ns * c(b * b)), L = c(m * k), _ = x + v, $ = c(c(_ * _) - k - M), I = L + M, E = I - C, P = L - M, S = c($ * E), w = c(I * P), A = c($ * P), T = c(E * I);
1900
- return new y(S, w, T, A);
1899
+ const { a: m } = s, { X: x, Y: v, Z: b } = this, k = c(x * x), M = c(v * v), C = c(Ns * c(b * b)), L = c(m * k), _ = x + v, T = c(c(_ * _) - k - M), I = L + M, E = I - C, P = L - M, S = c(T * E), w = c(I * P), A = c(T * P), $ = c(E * I);
1900
+ return new y(S, w, $, A);
1901
1901
  }
1902
1902
  // Fast algo for adding 2 Extended Points.
1903
1903
  // https://hyperelliptic.org/EFD/g1p/auto-twisted-extended.html#addition-add-2008-hwcd
1904
1904
  // Cost: 9M + 1*a + 1*d + 7add.
1905
1905
  add(m) {
1906
1906
  u(m);
1907
- const { a: x, d: v } = s, { X: b, Y: k, Z: M, T: C } = this, { X: L, Y: _, Z: $, T: I } = m, E = c(b * L), P = c(k * _), S = c(C * v * I), w = c(M * $), A = c((b + k) * (L + _) - E - P), T = w - S, R = w + S, F = c(P - x * E), D = c(A * T), z = c(R * F), B = c(A * F), H = c(T * R);
1907
+ const { a: x, d: v } = s, { X: b, Y: k, Z: M, T: C } = this, { X: L, Y: _, Z: T, T: I } = m, E = c(b * L), P = c(k * _), S = c(C * v * I), w = c(M * T), A = c((b + k) * (L + _) - E - P), $ = w - S, R = w + S, F = c(P - x * E), D = c(A * $), z = c(R * F), B = c(A * F), H = c($ * R);
1908
1908
  return new y(D, z, H, B);
1909
1909
  }
1910
1910
  subtract(m) {
@@ -1946,10 +1946,10 @@ function qg(n, t = {}) {
1946
1946
  let v = m;
1947
1947
  const { X: b, Y: k, Z: M } = x, C = x.is0();
1948
1948
  v == null && (v = C ? Xg : r.inv(M));
1949
- const L = c(b * v), _ = c(k * v), $ = r.mul(M, v);
1949
+ const L = c(b * v), _ = c(k * v), T = r.mul(M, v);
1950
1950
  if (C)
1951
1951
  return { x: qn, y: he };
1952
- if ($ !== he)
1952
+ if (T !== he)
1953
1953
  throw new Error("invZ was invalid");
1954
1954
  return { x: L, y: _ };
1955
1955
  }
@@ -2077,12 +2077,12 @@ function jg(n, t, e = {}) {
2077
2077
  function y(E) {
2078
2078
  const P = C.secretKey;
2079
2079
  $e(E, C.secretKey, "secretKey");
2080
- const S = $e(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), T = p(w);
2081
- return { head: w, prefix: A, scalar: T };
2080
+ const S = $e(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), $ = p(w);
2081
+ return { head: w, prefix: A, scalar: $ };
2082
2082
  }
2083
2083
  function g(E) {
2084
- const { head: P, prefix: S, scalar: w } = y(E), A = s.multiply(w), T = A.toBytes();
2085
- return { head: P, prefix: S, scalar: w, point: A, pointBytes: T };
2084
+ const { head: P, prefix: S, scalar: w } = y(E), A = s.multiply(w), $ = A.toBytes();
2085
+ return { head: P, prefix: S, scalar: w, point: A, pointBytes: $ };
2086
2086
  }
2087
2087
  function m(E) {
2088
2088
  return g(E).pointBytes;
@@ -2093,7 +2093,7 @@ function jg(n, t, e = {}) {
2093
2093
  }
2094
2094
  function v(E, P, S = {}) {
2095
2095
  E = $e(E, void 0, "message"), o && (E = o(E));
2096
- const { prefix: w, scalar: A, pointBytes: T } = g(P), R = x(S.context, w, E), F = s.multiply(R).toBytes(), D = x(S.context, F, T, E), z = l.create(R + D * A);
2096
+ const { prefix: w, scalar: A, pointBytes: $ } = g(P), R = x(S.context, w, E), F = s.multiply(R).toBytes(), D = x(S.context, F, $, E), z = l.create(R + D * A);
2097
2097
  if (!l.isValid(z))
2098
2098
  throw new Error("sign failed: invalid s");
2099
2099
  const B = Ol(F, l.toBytes(z));
@@ -2103,16 +2103,16 @@ function jg(n, t, e = {}) {
2103
2103
  zip215: r.zip215
2104
2104
  };
2105
2105
  function k(E, P, S, w = b) {
2106
- const { context: A } = w, T = w.zip215 === void 0 ? !!b.zip215 : w.zip215, R = C.signature;
2107
- E = $e(E, R, "signature"), P = $e(P, void 0, "message"), S = $e(S, C.publicKey, "publicKey"), T !== void 0 && Do(T, "zip215"), o && (P = o(P));
2106
+ const { context: A } = w, $ = w.zip215 === void 0 ? !!b.zip215 : w.zip215, R = C.signature;
2107
+ E = $e(E, R, "signature"), P = $e(P, void 0, "message"), S = $e(S, C.publicKey, "publicKey"), $ !== void 0 && Do($, "zip215"), o && (P = o(P));
2108
2108
  const F = R / 2, D = E.subarray(0, F), z = zr(E.subarray(F, R));
2109
2109
  let B, H, J;
2110
2110
  try {
2111
- B = n.fromBytes(S, T), H = n.fromBytes(D, T), J = s.multiplyUnsafe(z);
2111
+ B = n.fromBytes(S, $), H = n.fromBytes(D, $), J = s.multiplyUnsafe(z);
2112
2112
  } catch {
2113
2113
  return !1;
2114
2114
  }
2115
- if (!T && B.isSmallOrder())
2115
+ if (!$ && B.isSmallOrder())
2116
2116
  return !1;
2117
2117
  const X = x(A, D, S, P);
2118
2118
  return H.add(B.multiplyUnsafe(X)).subtract(J).clearCofactor().is0();
@@ -2129,7 +2129,7 @@ function jg(n, t, e = {}) {
2129
2129
  function _(E) {
2130
2130
  return Sg(E) && E.length === C.secretKey;
2131
2131
  }
2132
- function $(E, P) {
2132
+ function T(E, P) {
2133
2133
  try {
2134
2134
  return !!n.fromBytes(E, P === void 0 ? b.zip215 : P);
2135
2135
  } catch {
@@ -2140,7 +2140,7 @@ function jg(n, t, e = {}) {
2140
2140
  getExtendedPublicKey: g,
2141
2141
  randomSecretKey: L,
2142
2142
  isValidSecretKey: _,
2143
- isValidPublicKey: $,
2143
+ isValidPublicKey: T,
2144
2144
  /**
2145
2145
  * Converts ed public key to x public key. Uses formula:
2146
2146
  * - ed25519:
@@ -3650,10 +3650,10 @@ class cy {
3650
3650
  const it = t.navigator;
3651
3651
  s += (it.height ?? 40) + (it.margin ?? 20);
3652
3652
  }
3653
- const C = this.isNonCartesian(t), _ = !!t.chart.inverted ? { ...t, xAxis: t.yAxis, yAxis: t.xAxis } : t, $ = C ? 0 : this.estimateAxisWidth(_, !0, i, e), I = C ? 0 : this.estimateAxisWidth(_, !1, i, e), E = C ? 0 : this.estimateAxisHeight(_);
3653
+ const C = this.isNonCartesian(t), _ = !!t.chart.inverted ? { ...t, xAxis: t.yAxis, yAxis: t.xAxis } : t, T = C ? 0 : this.estimateAxisWidth(_, !0, i, e), I = C ? 0 : this.estimateAxisWidth(_, !1, i, e), E = C ? 0 : this.estimateAxisHeight(_);
3654
3654
  let P = 0;
3655
3655
  y && ((Y = t.colorAxis) == null ? void 0 : Y.length) > 0 && ((O = t.legend) == null ? void 0 : O.layout) === "vertical" && (P = 55);
3656
- const S = a + $ + k, w = o, A = Math.max(0, e - a - l - $ - I - P - k - M), T = ((ct = t.chart) == null ? void 0 : ct.marginBottom) !== void 0, R = Math.max(0, i - o - s - (T ? 0 : E));
3656
+ const S = a + T + k, w = o, A = Math.max(0, e - a - l - T - I - P - k - M), $ = ((ct = t.chart) == null ? void 0 : ct.marginBottom) !== void 0, R = Math.max(0, i - o - s - ($ ? 0 : E));
3657
3657
  return {
3658
3658
  plotArea: { x: S, y: w, width: A, height: R },
3659
3659
  titleArea: {
@@ -3785,15 +3785,15 @@ class cy {
3785
3785
  const F = g + m + P + 8;
3786
3786
  w = Math.max(1, Math.floor(b / F)), S = b / w;
3787
3787
  }
3788
- const T = Math.ceil(r / w) * d + y * 2, R = t.legend.maxHeight;
3789
- return (R ? Math.min(T, R) : T) + o;
3788
+ const $ = Math.ceil(r / w) * d + y * 2, R = t.legend.maxHeight;
3789
+ return (R ? Math.min($, R) : $) + o;
3790
3790
  }
3791
- let _ = y, $ = 1;
3791
+ let _ = y, T = 1;
3792
3792
  for (let P = 0; P < r; P++) {
3793
3793
  const S = t.legend.itemWidth || tn(M[P], k), w = g + m + S;
3794
- P > 0 && _ + w > b && ($++, _ = y), _ += w + x;
3794
+ P > 0 && _ + w > b && (T++, _ = y), _ += w + x;
3795
3795
  }
3796
- const I = $ * d + y * 2, E = t.legend.maxHeight;
3796
+ const I = T * d + y * 2, E = t.legend.maxHeight;
3797
3797
  return (E ? Math.min(I, E) : I) + o;
3798
3798
  }
3799
3799
  return r * d + (t.legend.padding ?? 8) * 2 + o;
@@ -4301,10 +4301,10 @@ const Vy = function n(t, e, i) {
4301
4301
  else {
4302
4302
  var x = Math.sqrt(y), v = (u * u - c * c + i * y) / (2 * c * e * x), b = (u * u - c * c - i * y) / (2 * u * e * x), k = Math.log(Math.sqrt(v * v + 1) - v), M = Math.log(Math.sqrt(b * b + 1) - b);
4303
4303
  m = (M - k) / t, g = function(C) {
4304
- var L = C * m, _ = lh(k), $ = c / (e * x) * (_ * Hy(t * L + k) - Wy(k));
4304
+ var L = C * m, _ = lh(k), T = c / (e * x) * (_ * Hy(t * L + k) - Wy(k));
4305
4305
  return [
4306
- a + $ * d,
4307
- l + $ * p,
4306
+ a + T * d,
4307
+ l + T * p,
4308
4308
  c * _ / lh(t * L + k)
4309
4309
  ];
4310
4310
  };
@@ -4493,19 +4493,19 @@ function ex(n) {
4493
4493
  f = Or(f);
4494
4494
  var d = f.fill, p = f.align, y = f.sign, g = f.symbol, m = f.zero, x = f.width, v = f.comma, b = f.precision, k = f.trim, M = f.type;
4495
4495
  M === "n" ? (v = !0, M = "g") : fh[M] || (b === void 0 && (b = 12), k = !0, M = "g"), (m || d === "0" && p === "=") && (m = !0, d = "0", p = "=");
4496
- var C = (u && u.prefix !== void 0 ? u.prefix : "") + (g === "$" ? e : g === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : ""), L = (g === "$" ? i : /[%p]/.test(M) ? s : "") + (u && u.suffix !== void 0 ? u.suffix : ""), _ = fh[M], $ = /[defgprs%]/.test(M);
4496
+ var C = (u && u.prefix !== void 0 ? u.prefix : "") + (g === "$" ? e : g === "#" && /[boxX]/.test(M) ? "0" + M.toLowerCase() : ""), L = (g === "$" ? i : /[%p]/.test(M) ? s : "") + (u && u.suffix !== void 0 ? u.suffix : ""), _ = fh[M], T = /[defgprs%]/.test(M);
4497
4497
  b = b === void 0 ? 6 : /[gprs]/.test(M) ? Math.max(1, Math.min(21, b)) : Math.max(0, Math.min(20, b));
4498
4498
  function I(E) {
4499
- var P = C, S = L, w, A, T;
4499
+ var P = C, S = L, w, A, $;
4500
4500
  if (M === "c")
4501
4501
  S = _(E) + S, E = "";
4502
4502
  else {
4503
4503
  E = +E;
4504
4504
  var R = E < 0 || 1 / E < 0;
4505
- if (E = isNaN(E) ? l : _(Math.abs(E), b), k && (E = Qy(E)), R && +E == 0 && y !== "+" && (R = !1), P = (R ? y === "(" ? y : a : y === "-" || y === "(" ? "" : y) + P, S = (M === "s" && !isNaN(E) && Ho !== void 0 ? gh[8 + Ho / 3] : "") + S + (R && y === "(" ? ")" : ""), $) {
4505
+ if (E = isNaN(E) ? l : _(Math.abs(E), b), k && (E = Qy(E)), R && +E == 0 && y !== "+" && (R = !1), P = (R ? y === "(" ? y : a : y === "-" || y === "(" ? "" : y) + P, S = (M === "s" && !isNaN(E) && Ho !== void 0 ? gh[8 + Ho / 3] : "") + S + (R && y === "(" ? ")" : ""), T) {
4506
4506
  for (w = -1, A = E.length; ++w < A; )
4507
- if (T = E.charCodeAt(w), 48 > T || T > 57) {
4508
- S = (T === 46 ? r + E.slice(w + 1) : E.slice(w)) + S, E = E.slice(0, w);
4507
+ if ($ = E.charCodeAt(w), 48 > $ || $ > 57) {
4508
+ S = ($ === 46 ? r + E.slice(w + 1) : E.slice(w)) + S, E = E.slice(0, w);
4509
4509
  break;
4510
4510
  }
4511
4511
  }
@@ -4932,7 +4932,7 @@ function cr(n, t, e) {
4932
4932
  }
4933
4933
  function Ex(n) {
4934
4934
  var t = n.dateTime, e = n.date, i = n.time, r = n.periods, o = n.days, s = n.shortDays, a = n.months, l = n.shortMonths, c = lr(r), h = hr(r), f = lr(o), u = hr(o), d = lr(s), p = hr(s), y = lr(a), g = hr(a), m = lr(l), x = hr(l), v = {
4935
- a: T,
4935
+ a: $,
4936
4936
  A: R,
4937
4937
  b: F,
4938
4938
  B: D,
@@ -4998,7 +4998,7 @@ function Ex(n) {
4998
4998
  Z: P1,
4999
4999
  "%": Ph
5000
5000
  }, k = {
5001
- a: $,
5001
+ a: T,
5002
5002
  A: I,
5003
5003
  b: E,
5004
5004
  B: P,
@@ -5067,7 +5067,7 @@ function Ex(n) {
5067
5067
  var O = c.exec(N.slice(Y));
5068
5068
  return O ? (G.p = h.get(O[0].toLowerCase()), Y + O[0].length) : -1;
5069
5069
  }
5070
- function $(G, N, Y) {
5070
+ function T(G, N, Y) {
5071
5071
  var O = d.exec(N.slice(Y));
5072
5072
  return O ? (G.w = p.get(O[0].toLowerCase()), Y + O[0].length) : -1;
5073
5073
  }
@@ -5092,7 +5092,7 @@ function Ex(n) {
5092
5092
  function A(G, N, Y) {
5093
5093
  return L(G, i, N, Y);
5094
5094
  }
5095
- function T(G) {
5095
+ function $(G) {
5096
5096
  return s[G.getDay()];
5097
5097
  }
5098
5098
  function R(G) {
@@ -5487,15 +5487,15 @@ function W1() {
5487
5487
  function bs(n, t) {
5488
5488
  var e = [], i = null, r = null, o = 6, s = 6, a = 3, l = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, c = n === vo || n === xr ? -1 : 1, h = n === xr || n === wo ? "x" : "y", f = n === vo || n === za ? z1 : B1;
5489
5489
  function u(d) {
5490
- var p = i ?? (t.ticks ? t.ticks.apply(t, e) : t.domain()), y = r ?? (t.tickFormat ? t.tickFormat.apply(t, e) : D1), g = Math.max(o, 0) + a, m = t.range(), x = +m[0] + l, v = +m[m.length - 1] + l, b = (t.bandwidth ? N1 : O1)(t.copy(), l), k = d.selection ? d.selection() : d, M = k.selectAll(".domain").data([null]), C = k.selectAll(".tick").data(p, t).order(), L = C.exit(), _ = C.enter().append("g").attr("class", "tick"), $ = C.select("line"), I = C.select("text");
5491
- M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(_), $ = $.merge(_.append("line").attr("stroke", "currentColor").attr(h + "2", c * o)), I = I.merge(_.append("text").attr("fill", "currentColor").attr(h, c * g).attr("dy", n === vo ? "0em" : n === za ? "0.71em" : "0.32em")), d !== k && (M = M.transition(d), C = C.transition(d), $ = $.transition(d), I = I.transition(d), L = L.transition(d).attr("opacity", $h).attr("transform", function(E) {
5490
+ var p = i ?? (t.ticks ? t.ticks.apply(t, e) : t.domain()), y = r ?? (t.tickFormat ? t.tickFormat.apply(t, e) : D1), g = Math.max(o, 0) + a, m = t.range(), x = +m[0] + l, v = +m[m.length - 1] + l, b = (t.bandwidth ? N1 : O1)(t.copy(), l), k = d.selection ? d.selection() : d, M = k.selectAll(".domain").data([null]), C = k.selectAll(".tick").data(p, t).order(), L = C.exit(), _ = C.enter().append("g").attr("class", "tick"), T = C.select("line"), I = C.select("text");
5491
+ M = M.merge(M.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), C = C.merge(_), T = T.merge(_.append("line").attr("stroke", "currentColor").attr(h + "2", c * o)), I = I.merge(_.append("text").attr("fill", "currentColor").attr(h, c * g).attr("dy", n === vo ? "0em" : n === za ? "0.71em" : "0.32em")), d !== k && (M = M.transition(d), C = C.transition(d), T = T.transition(d), I = I.transition(d), L = L.transition(d).attr("opacity", $h).attr("transform", function(E) {
5492
5492
  return isFinite(E = b(E)) ? f(E + l) : this.getAttribute("transform");
5493
5493
  }), _.attr("opacity", $h).attr("transform", function(E) {
5494
5494
  var P = this.parentNode.__axis;
5495
5495
  return f((P && isFinite(P = P(E)) ? P : b(E)) + l);
5496
5496
  })), L.remove(), M.attr("d", n === xr || n === wo ? s ? "M" + c * s + "," + x + "H" + l + "V" + v + "H" + c * s : "M" + l + "," + x + "V" + v : s ? "M" + x + "," + c * s + "V" + l + "H" + v + "V" + c * s : "M" + x + "," + l + "H" + v), C.attr("opacity", 1).attr("transform", function(E) {
5497
5497
  return f(b(E) + l);
5498
- }), $.attr(h + "2", c * o), I.attr(h, c * g).text(y), k.filter(W1).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", n === wo ? "start" : n === xr ? "end" : "middle"), k.each(function() {
5498
+ }), T.attr(h + "2", c * o), I.attr(h, c * g).text(y), k.filter(W1).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", n === wo ? "start" : n === xr ? "end" : "middle"), k.each(function() {
5499
5499
  this.__axis = b;
5500
5500
  });
5501
5501
  }
@@ -7384,29 +7384,29 @@ class Yc {
7384
7384
  const ot = this.config.title.style || {};
7385
7385
  this.group.append("text").attr("class", "katucharts-legend-title").attr("x", o).attr("y", o + 10).attr("font-size", ot.fontSize || Mt).attr("font-weight", ot.fontWeight || "bold").attr("fill", ot.color || "#333").text(this.config.title.text), k += 20;
7386
7386
  }
7387
- const C = k, L = m || e.width - o * 2, _ = y + p + d, $ = [];
7387
+ const C = k, L = m || e.width - o * 2, _ = y + p + d, T = [];
7388
7388
  for (const ot of i) {
7389
7389
  const q = ot.getMultiLegendItems(), st = ["line", "spline", "area", "areaspline", "radar", "polar"].includes(ot.config._internalType);
7390
7390
  if (q)
7391
7391
  for (const wt of q)
7392
- $.push({ label: wt.label, color: wt.color, series: ot, isLine: st });
7392
+ T.push({ label: wt.label, color: wt.color, series: ot, isLine: st });
7393
7393
  else
7394
- $.push({ label: this.resolveLabel(ot), color: ot.getColor(), series: ot, isLine: st });
7394
+ T.push({ label: this.resolveLabel(ot), color: ot.getColor(), series: ot, isLine: st });
7395
7395
  }
7396
- const I = $.map((ot) => ot.label);
7396
+ const I = T.map((ot) => ot.label);
7397
7397
  let E = 0;
7398
7398
  if (r === "horizontal")
7399
7399
  for (let ot = 0; ot < I.length; ot++) {
7400
7400
  const q = s + l + this.estimateTextWidth(I[ot], v);
7401
7401
  E += q + (ot < I.length - 1 ? f : 0);
7402
7402
  }
7403
- const P = r === "horizontal" && $.length > 8 && E > L;
7403
+ const P = r === "horizontal" && T.length > 8 && E > L;
7404
7404
  let S = 0, w = 0;
7405
7405
  const A = 6;
7406
- let T = 0, R = 0;
7406
+ let $ = 0, R = 0;
7407
7407
  if (P) {
7408
7408
  const ot = Yc.computeGridLayout(
7409
- $.length,
7409
+ T.length,
7410
7410
  I,
7411
7411
  L,
7412
7412
  {
@@ -7418,10 +7418,10 @@ class Yc {
7418
7418
  itemWidth: this.config.itemWidth
7419
7419
  }
7420
7420
  );
7421
- S = ot.columns, w = ot.itemWidth, R = Math.ceil($.length / S);
7421
+ S = ot.columns, w = ot.itemWidth, R = Math.ceil(T.length / S);
7422
7422
  }
7423
7423
  const F = [];
7424
- $.forEach((ot, q) => {
7424
+ T.forEach((ot, q) => {
7425
7425
  var ee;
7426
7426
  const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
7427
7427
  let _t, Vt;
@@ -7467,10 +7467,10 @@ class Yc {
7467
7467
  const J = (ft = this.config.bubbleLegend) != null && ft.enabled ? t.map((ot) => ot.getBubbleLegendInfo()).find((ot) => !!ot) : void 0;
7468
7468
  if (J)
7469
7469
  if (r === "horizontal" && ((dt = this.config.bubbleLegend) == null ? void 0 : dt.layout) === "separate") {
7470
- H = $.length ? k + _ : C;
7470
+ H = T.length ? k + _ : C;
7471
7471
  const q = this.renderBubbleLegend(J, 0, H);
7472
7472
  D = q.width, z = q.height;
7473
- const st = $.length ? Math.max(0, M - o) : 0, wt = Math.max(st, D);
7473
+ const st = T.length ? Math.max(0, M - o) : 0, wt = Math.max(st, D);
7474
7474
  B = o + Math.max(0, (wt - D) / 2), this.group.select(".katucharts-bubble-legend").attr("transform", `translate(${B},0)`);
7475
7475
  const Ct = Math.max(0, (wt - st) / 2);
7476
7476
  if (Ct > 0)
@@ -7479,7 +7479,7 @@ class Yc {
7479
7479
  _t && kt.attr("transform", `translate(${parseFloat(_t[1]) + Ct},${_t[2]})`);
7480
7480
  }
7481
7481
  } else {
7482
- r === "horizontal" ? (B = $.length ? M + f : o, H = C) : (B = o, H = $.length ? k + 6 : C);
7482
+ r === "horizontal" ? (B = T.length ? M + f : o, H = C) : (B = o, H = T.length ? k + 6 : C);
7483
7483
  const q = this.renderBubbleLegend(J, B, H);
7484
7484
  D = q.width, z = q.height;
7485
7485
  }
@@ -7513,9 +7513,9 @@ class Yc {
7513
7513
  }), Vt.on("mouseout", function() {
7514
7514
  Vt.select("rect").attr("fill", "#f0f0f0");
7515
7515
  }), _t.on("click", () => {
7516
- T > 0 && (T--, X(T, !0), _t.style("opacity", T === 0 ? "0.3" : "1"), Vt.style("opacity", T >= q - 1 ? "0.3" : "1"));
7516
+ $ > 0 && ($--, X($, !0), _t.style("opacity", $ === 0 ? "0.3" : "1"), Vt.style("opacity", $ >= q - 1 ? "0.3" : "1"));
7517
7517
  }), Vt.on("click", () => {
7518
- T < q - 1 && (T++, X(T, !0), _t.style("opacity", T === 0 ? "0.3" : "1"), Vt.style("opacity", T >= q - 1 ? "0.3" : "1"));
7518
+ $ < q - 1 && ($++, X($, !0), _t.style("opacity", $ === 0 ? "0.3" : "1"), Vt.style("opacity", $ >= q - 1 ? "0.3" : "1"));
7519
7519
  });
7520
7520
  }
7521
7521
  } else r === "horizontal" ? (j = M + o, W = k + y + o) : (j = m || M + o || 150, W = k + y + o);
@@ -7567,15 +7567,15 @@ class Yc {
7567
7567
  var b, k, M, C, L, _;
7568
7568
  const r = this.config.bubbleLegend || {};
7569
7569
  if (r.layout === "separate") return this.renderBubbleLegendSeparate(t, e, i);
7570
- const o = [...t.ranges].sort(($, I) => I.radius - $.radius), s = o[0].radius;
7570
+ const o = [...t.ranges].sort((T, I) => I.radius - T.radius), s = o[0].radius;
7571
7571
  if (!(s > 0)) return { width: 0, height: 0 };
7572
7572
  const a = ((k = (b = r.labels) == null ? void 0 : b.style) == null ? void 0 : k.fontSize) || Mt, l = r.borderColor || t.color, c = r.borderWidth ?? 1.5, h = r.color || "rgba(0,0,0,0)", f = r.connectorColor || l, u = r.connectorWidth ?? 1, d = r.connectorDistance ?? 16, p = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.color) || Pe, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = e + s, m = i + 2 * s, x = e + 2 * s + d;
7573
7573
  let v = 0;
7574
- for (const $ of o) {
7575
- const I = m - 2 * $.radius;
7576
- y.append("circle").attr("cx", g).attr("cy", m - $.radius).attr("r", $.radius).attr("fill", h).attr("stroke", l).attr("stroke-width", c), y.append("line").attr("x1", g).attr("y1", I).attr("x2", x).attr("y2", I).attr("stroke", f).attr("stroke-width", u).attr("stroke-dasharray", "2,2");
7574
+ for (const T of o) {
7575
+ const I = m - 2 * T.radius;
7576
+ y.append("circle").attr("cx", g).attr("cy", m - T.radius).attr("r", T.radius).attr("fill", h).attr("stroke", l).attr("stroke-width", c), y.append("line").attr("x1", g).attr("y1", I).attr("x2", x).attr("y2", I).attr("stroke", f).attr("stroke-width", u).attr("stroke-dasharray", "2,2");
7577
7577
  let E;
7578
- (L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: $.value }) : (_ = r.labels) != null && _.format ? E = fe(Kt(r.labels.format, { value: $.value })) : E = String($.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
7578
+ (L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: T.value }) : (_ = r.labels) != null && _.format ? E = fe(Kt(r.labels.format, { value: T.value })) : E = String(T.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
7579
7579
  }
7580
7580
  return {
7581
7581
  width: 2 * s + d + v + 8,
@@ -7590,33 +7590,33 @@ class Yc {
7590
7590
  */
7591
7591
  renderBubbleLegendSeparate(t, e, i) {
7592
7592
  var M, C, L, _;
7593
- const r = this.config.bubbleLegend || {}, o = [...t.ranges].sort(($, I) => $.radius - I.radius), s = o[o.length - 1].radius;
7593
+ const r = this.config.bubbleLegend || {}, o = [...t.ranges].sort((T, I) => T.radius - I.radius), s = o[o.length - 1].radius;
7594
7594
  if (!(s > 0)) return { width: 0, height: 0 };
7595
- const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Pe, d = r.connectorDistance ?? 8, p = ($) => {
7595
+ const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Pe, d = r.connectorDistance ?? 8, p = (T) => {
7596
7596
  var I, E;
7597
- return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: $ }) : (E = r.labels) != null && E.format ? fe(Kt(r.labels.format, { value: $ })) : String($);
7598
- }, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = ($, I, E) => y.append("circle").attr("cx", $).attr("cy", I).attr("r", E).attr("fill", f).attr("stroke", c).attr("stroke-width", h);
7597
+ return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: T }) : (E = r.labels) != null && E.format ? fe(Kt(r.labels.format, { value: T })) : String(T);
7598
+ }, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = (T, I, E) => y.append("circle").attr("cx", T).attr("cy", I).attr("r", E).attr("fill", f).attr("stroke", c).attr("stroke-width", h);
7599
7599
  if (this.config.layout === "horizontal") {
7600
- const $ = l + 6, I = i + $ + 2 * s;
7600
+ const T = l + 6, I = i + T + 2 * s;
7601
7601
  let E = e;
7602
7602
  for (const P of o) {
7603
7603
  const S = E + P.radius, w = I - 2 * P.radius;
7604
7604
  g(S, I - P.radius, P.radius);
7605
7605
  const A = p(P.value);
7606
7606
  y.append("text").attr("x", S).attr("y", w - 4).attr("text-anchor", "middle").attr("font-size", a).attr("fill", u).text(A);
7607
- const T = Math.max(2 * P.radius, this.estimateTextWidth(A, a));
7608
- E += T + d + 6;
7607
+ const $ = Math.max(2 * P.radius, this.estimateTextWidth(A, a));
7608
+ E += $ + d + 6;
7609
7609
  }
7610
- return { width: Math.max(0, E - e - (d + 6)), height: $ + 2 * s };
7610
+ return { width: Math.max(0, E - e - (d + 6)), height: T + 2 * s };
7611
7611
  }
7612
7612
  const m = e + s, x = e + 2 * s + d;
7613
7613
  let v = i, b = 0;
7614
7614
  const k = 10;
7615
- for (const $ of o) {
7616
- const I = v + $.radius;
7617
- g(m, I, $.radius);
7618
- const E = p($.value);
7619
- y.append("text").attr("x", x).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", u).text(E), b = Math.max(b, this.estimateTextWidth(E, a)), v += 2 * $.radius + k;
7615
+ for (const T of o) {
7616
+ const I = v + T.radius;
7617
+ g(m, I, T.radius);
7618
+ const E = p(T.value);
7619
+ y.append("text").attr("x", x).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", u).text(E), b = Math.max(b, this.estimateTextWidth(E, a)), v += 2 * T.radius + k;
7620
7620
  }
7621
7621
  return { width: 2 * s + d + b + 8, height: Math.max(0, v - i - k) };
7622
7622
  }
@@ -7868,14 +7868,14 @@ class Cv {
7868
7868
  for (let C = 0; C < 3; C++)
7869
7869
  this.gearGroup.append("line").attr("x1", k).attr("x2", M).attr("y1", Math.round(h * 0.27) + C * Math.round(h * 0.23)).attr("y2", Math.round(h * 0.27) + C * Math.round(h * 0.23)).attr("stroke", d).attr("stroke-width", p).attr("stroke-linecap", "round");
7870
7870
  } else {
7871
- const k = Math.min(c, h), M = c / 2, C = h / 2, L = 8, _ = k * 0.44, $ = k * 0.3, I = k * 0.12, E = Math.PI / (L * 1.6);
7871
+ const k = Math.min(c, h), M = c / 2, C = h / 2, L = 8, _ = k * 0.44, T = k * 0.3, I = k * 0.12, E = Math.PI / (L * 1.6);
7872
7872
  let P = "";
7873
7873
  for (let F = 0; F < L; F++) {
7874
7874
  const D = F / L * Math.PI * 2 - Math.PI / 2, z = [
7875
- [$, D - E * 1.2],
7875
+ [T, D - E * 1.2],
7876
7876
  [_ + I, D - E],
7877
7877
  [_ + I, D + E],
7878
- [$, D + E * 1.2]
7878
+ [T, D + E * 1.2]
7879
7879
  ];
7880
7880
  for (const [B, H] of z) {
7881
7881
  const J = M + Math.cos(H) * B, X = C + Math.sin(H) * B;
@@ -7887,8 +7887,8 @@ class Cv {
7887
7887
  w.append("stop").attr("offset", "0%").attr("stop-color", "#aaa").attr("stop-opacity", "0.7"), w.append("stop").attr("offset", "45%").attr("stop-color", "#999").attr("stop-opacity", "0.45"), w.append("stop").attr("offset", "100%").attr("stop-color", "#888").attr("stop-opacity", "0.35");
7888
7888
  const A = S.append("radialGradient").attr("id", "katu-gear-highlight").attr("cx", "0.35").attr("cy", "0.3").attr("r", "0.65");
7889
7889
  A.append("stop").attr("offset", "0%").attr("stop-color", "#fff").attr("stop-opacity", "0.6"), A.append("stop").attr("offset", "50%").attr("stop-color", "#fff").attr("stop-opacity", "0.1"), A.append("stop").attr("offset", "100%").attr("stop-color", "#fff").attr("stop-opacity", "0"), this.gearGroup.append("path").attr("d", P).attr("fill", "url(#katu-gear-glass)").attr("stroke", "rgba(255,255,255,0.5)").attr("stroke-width", p * 0.4).attr("stroke-linejoin", "round").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.15))"), this.gearGroup.append("path").attr("d", P).attr("fill", "url(#katu-gear-highlight)").attr("stroke", "none").style("pointer-events", "none"), this.gearGroup.append("circle").attr("cx", M).attr("cy", C).attr("r", k * 0.15).attr("fill", "rgba(255,255,255,0.6)").attr("stroke", "rgba(255,255,255,0.4)").attr("stroke-width", "0.5");
7890
- const T = S.append("radialGradient").attr("id", "katu-gear-hover-bg").attr("cx", "0.4").attr("cy", "0.35").attr("r", "0.65");
7891
- T.append("stop").attr("offset", "0%").attr("stop-color", "#fff").attr("stop-opacity", "0.35"), T.append("stop").attr("offset", "50%").attr("stop-color", "#eef2ff").attr("stop-opacity", "0.15"), T.append("stop").attr("offset", "100%").attr("stop-color", "#dde6ff").attr("stop-opacity", "0.08");
7890
+ const $ = S.append("radialGradient").attr("id", "katu-gear-hover-bg").attr("cx", "0.4").attr("cy", "0.35").attr("r", "0.65");
7891
+ $.append("stop").attr("offset", "0%").attr("stop-color", "#fff").attr("stop-opacity", "0.35"), $.append("stop").attr("offset", "50%").attr("stop-color", "#eef2ff").attr("stop-opacity", "0.15"), $.append("stop").attr("offset", "100%").attr("stop-color", "#dde6ff").attr("stop-opacity", "0.08");
7892
7892
  const R = k * 0.85;
7893
7893
  this.group.insert("circle", ".katucharts-gear-icon").attr("class", "katucharts-gear-hover-bg").attr("cx", c / 2).attr("cy", h / 2).attr("r", R).attr("fill", "url(#katu-gear-hover-bg)").attr("stroke", "rgba(255,255,255,0.6)").attr("stroke-width", "1.5").style("filter", "drop-shadow(0 0 10px rgba(200,225,255,0.5)) drop-shadow(0 2px 6px rgba(0,0,0,0.08))").style("opacity", "0").style("transition", "opacity 0.25s ease"), this.group.insert("circle", ".katucharts-gear-icon").attr("class", "katucharts-gear-hover-highlight").attr("cx", c / 2).attr("cy", h / 2).attr("r", R).attr("fill", "none").attr("stroke", "rgba(255,255,255,0.8)").attr("stroke-width", "1.5").style("filter", "drop-shadow(0 0 4px rgba(255,255,255,0.4))").style("opacity", "0").style("transition", "opacity 0.25s ease");
7894
7894
  }
@@ -7933,7 +7933,7 @@ class Cv {
7933
7933
  let c = 0;
7934
7934
  const h = [];
7935
7935
  for (let E = 0; E < l.length; E += 4) {
7936
- const P = E / 4 % r, S = Math.floor(E / 4 / r), w = P / r - 0.5, A = S / r - 0.5, T = Math.sqrt(w * w + A * A), R = Math.max(0, Math.min(1, (0.48 - T) / 0.15)), F = R * R * (3 - 2 * R), D = w * F * r, z = A * F * r;
7936
+ const P = E / 4 % r, S = Math.floor(E / 4 / r), w = P / r - 0.5, A = S / r - 0.5, $ = Math.sqrt(w * w + A * A), R = Math.max(0, Math.min(1, (0.48 - $) / 0.15)), F = R * R * (3 - 2 * R), D = w * F * r, z = A * F * r;
7937
7937
  c = Math.max(c, Math.abs(D), Math.abs(z)), h.push(D, z);
7938
7938
  }
7939
7939
  c *= 0.5;
@@ -7949,9 +7949,9 @@ class Cv {
7949
7949
  m.setAttributeNS("http://www.w3.org/1999/xlink", "href", u), m.setAttribute("width", "44"), m.setAttribute("height", "44"), m.setAttribute("result", "lens_map");
7950
7950
  const x = document.createElementNS(d, "feDisplacementMap");
7951
7951
  x.setAttribute("in", "SourceGraphic"), x.setAttribute("in2", "lens_map"), x.setAttribute("scale", String(Math.round(c / 1))), x.setAttribute("xChannelSelector", "R"), x.setAttribute("yChannelSelector", "G"), g.appendChild(m), g.appendChild(x), y.appendChild(g), p.appendChild(y), this.radialContainer.appendChild(p), document.body.appendChild(this.radialContainer);
7952
- const v = this.container.getBoundingClientRect(), b = v.left + this.btnCenterX, k = v.top + this.btnCenterY, M = 76, C = i.length, L = 100 * (Math.PI / 180), _ = 280 * (Math.PI / 180), $ = this.config.menuItemDefinitions || {};
7952
+ const v = this.container.getBoundingClientRect(), b = v.left + this.btnCenterX, k = v.top + this.btnCenterY, M = 76, C = i.length, L = 100 * (Math.PI / 180), _ = 280 * (Math.PI / 180), T = this.config.menuItemDefinitions || {};
7953
7953
  i.forEach((E, P) => {
7954
- const S = C > 1 ? L + (_ - L) * (P / (C - 1)) : Math.PI, w = b + Math.cos(S) * M, A = k + Math.sin(S) * M, T = w - b, R = A - k, F = document.createElement("div");
7954
+ const S = C > 1 ? L + (_ - L) * (P / (C - 1)) : Math.PI, w = b + Math.cos(S) * M, A = k + Math.sin(S) * M, $ = w - b, R = A - k, F = document.createElement("div");
7955
7955
  F.className = "katucharts-radial-btn", Object.assign(F.style, {
7956
7956
  position: "absolute",
7957
7957
  left: `${b}px`,
@@ -7979,7 +7979,7 @@ class Cv {
7979
7979
  willChange: "transform, opacity",
7980
7980
  transition: `transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) ${P * 40}ms, opacity 0.2s ease ${P * 40}ms, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease`,
7981
7981
  boxShadow: "0 4px 8px rgba(0,0,0,0.2), inset 0 -6px 12px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.4)"
7982
- }), F.dataset.dx = String(T), F.dataset.dy = String(R);
7982
+ }), F.dataset.dx = String($), F.dataset.dy = String(R);
7983
7983
  const D = document.createElement("div");
7984
7984
  Object.assign(D.style, {
7985
7985
  position: "absolute",
@@ -8035,11 +8035,11 @@ class Cv {
8035
8035
  F.style.background = "linear-gradient(160deg, rgba(255,255,255,0.72) 0%, rgba(240,240,255,0.45) 40%, rgba(255,255,255,0.35) 100%)", F.style.borderColor = "rgba(255, 255, 255, 0.4)", F.style.boxShadow = "0 4px 8px rgba(0,0,0,0.2), inset 0 -6px 12px rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.4)", B.forEach((N) => N.setAttribute("stroke", "#333333")), H.forEach((N) => N.setAttribute("fill", "#333333")), X.style.opacity = "0", X.style.transform = G;
8036
8036
  }), F.addEventListener("click", (N) => {
8037
8037
  N.stopPropagation(), this.closeMenu();
8038
- const Y = $[E.key];
8038
+ const Y = T[E.key];
8039
8039
  Y != null && Y.onclick ? Y.onclick() : this.onExport(E.key);
8040
8040
  }), this.radialContainer.appendChild(F), requestAnimationFrame(() => {
8041
8041
  requestAnimationFrame(() => {
8042
- F.style.transform = `translate(${T}px, ${R}px) scale(1)`, F.style.opacity = "1";
8042
+ F.style.transform = `translate(${$}px, ${R}px) scale(1)`, F.style.opacity = "1";
8043
8043
  });
8044
8044
  });
8045
8045
  }), this.outsideClickHandler = (E) => {
@@ -8195,7 +8195,7 @@ function Tv(n) {
8195
8195
  });
8196
8196
  const x = "http://www.w3.org/2000/svg", v = l.offsetWidth - l.clientWidth, b = l.offsetHeight - l.clientHeight, k = c - v, M = h - b, C = document.createElementNS(x, "svg");
8197
8197
  C.setAttribute("data-katu-fixed-overlay", "1"), C.setAttribute("width", k.toString()), C.setAttribute("height", M.toString()), C.style.position = "absolute", C.style.top = "0", C.style.left = "0", C.style.pointerEvents = "none", C.style.overflow = "visible";
8198
- const L = i.chart.backgroundColor || "#ffffff", $ = (r.attr("transform") || "").match(/translate\(([^,]+),\s*([^)]+)\)/), I = $ ? parseFloat($[1]) : 0, E = $ ? parseFloat($[2]) : 0, P = !!i.chart.inverted, S = P ? ".katucharts-axis-y" : ".katucharts-axis-x", w = P ? ".katucharts-axis-x" : ".katucharts-axis-y", A = document.createElementNS(x, "defs"), T = `katucharts-fixed-grad-${Math.random().toString(36).slice(2, 8)}`, R = (N, Y, O, ct, it, ft) => {
8198
+ const L = i.chart.backgroundColor || "#ffffff", T = (r.attr("transform") || "").match(/translate\(([^,]+),\s*([^)]+)\)/), I = T ? parseFloat(T[1]) : 0, E = T ? parseFloat(T[2]) : 0, P = !!i.chart.inverted, S = P ? ".katucharts-axis-y" : ".katucharts-axis-x", w = P ? ".katucharts-axis-x" : ".katucharts-axis-y", A = document.createElementNS(x, "defs"), $ = `katucharts-fixed-grad-${Math.random().toString(36).slice(2, 8)}`, R = (N, Y, O, ct, it, ft) => {
8199
8199
  const dt = document.createElementNS(x, "linearGradient");
8200
8200
  dt.setAttribute("id", N), dt.setAttribute("x1", Y), dt.setAttribute("y1", O), dt.setAttribute("x2", ct), dt.setAttribute("y2", it), ft.forEach(([at, ot]) => {
8201
8201
  const q = document.createElementNS(x, "stop");
@@ -8205,9 +8205,9 @@ function Tv(n) {
8205
8205
  ((F == null ? void 0 : F.y) ?? 0) + ((F == null ? void 0 : F.height) ?? 0),
8206
8206
  ((D == null ? void 0 : D.y) ?? 0) + ((D == null ? void 0 : D.height) ?? 0)
8207
8207
  ), H = Math.max(0, Math.min(z + 30, E)), J = H > 0 ? Math.max(0, Math.min(100, z / H * 100)) : 100;
8208
- if (R(`${T}-top`, "0%", "0%", "0%", "100%", [["0%", "1"], [`${J}%`, "1"], ["100%", "0"]]), R(`${T}-bottom`, "0%", "0%", "0%", "100%", [["0%", "0"], ["30%", "1"], ["100%", "1"]]), R(`${T}-left`, "0%", "0%", "100%", "0%", [["0%", "1"], ["70%", "1"], ["100%", "0"]]), C.appendChild(A), f && H > 0) {
8208
+ if (R(`${$}-top`, "0%", "0%", "0%", "100%", [["0%", "1"], [`${J}%`, "1"], ["100%", "0"]]), R(`${$}-bottom`, "0%", "0%", "0%", "100%", [["0%", "0"], ["30%", "1"], ["100%", "1"]]), R(`${$}-left`, "0%", "0%", "100%", "0%", [["0%", "1"], ["70%", "1"], ["100%", "0"]]), C.appendChild(A), f && H > 0) {
8209
8209
  const N = document.createElementNS(x, "rect");
8210
- N.setAttribute("x", "0"), N.setAttribute("y", "0"), N.setAttribute("width", k.toString()), N.setAttribute("height", H.toString()), N.setAttribute("fill", `url(#${T}-top)`), C.appendChild(N);
8210
+ N.setAttribute("x", "0"), N.setAttribute("y", "0"), N.setAttribute("width", k.toString()), N.setAttribute("height", H.toString()), N.setAttribute("fill", `url(#${$}-top)`), C.appendChild(N);
8211
8211
  }
8212
8212
  if (y.querySelectorAll(".katucharts-title-group").forEach((N) => {
8213
8213
  N.style.visibility = "hidden";
@@ -8217,7 +8217,7 @@ function Tv(n) {
8217
8217
  O !== 0 && Y.setAttribute("transform", `translate(${-O}, 0)`), C.appendChild(Y);
8218
8218
  }), f) {
8219
8219
  const N = E + o.plotArea.height, Y = a - N + 10, O = document.createElementNS(x, "rect");
8220
- O.setAttribute("x", "0"), O.setAttribute("y", (M - Y).toString()), O.setAttribute("width", k.toString()), O.setAttribute("height", Y.toString()), O.setAttribute("fill", `url(#${T}-bottom)`), C.appendChild(O), y.querySelectorAll(S).forEach((it) => {
8220
+ O.setAttribute("x", "0"), O.setAttribute("y", (M - Y).toString()), O.setAttribute("width", k.toString()), O.setAttribute("height", Y.toString()), O.setAttribute("fill", `url(#${$}-bottom)`), C.appendChild(O), y.querySelectorAll(S).forEach((it) => {
8221
8221
  it.style.visibility = "hidden";
8222
8222
  const ft = document.createElementNS(x, "g"), dt = M - (a - N);
8223
8223
  ft.setAttribute("transform", `translate(${I}, ${dt})`);
@@ -8227,7 +8227,7 @@ function Tv(n) {
8227
8227
  }
8228
8228
  if (u) {
8229
8229
  const N = I + 5, Y = document.createElementNS(x, "rect");
8230
- Y.setAttribute("x", "0"), Y.setAttribute("y", "0"), Y.setAttribute("width", N.toString()), Y.setAttribute("height", M.toString()), Y.setAttribute("fill", `url(#${T}-left)`), C.appendChild(Y), y.querySelectorAll(w).forEach((ct) => {
8230
+ Y.setAttribute("x", "0"), Y.setAttribute("y", "0"), Y.setAttribute("width", N.toString()), Y.setAttribute("height", M.toString()), Y.setAttribute("fill", `url(#${$}-left)`), C.appendChild(Y), y.querySelectorAll(w).forEach((ct) => {
8231
8231
  ct.style.visibility = "hidden";
8232
8232
  const it = document.createElementNS(x, "g");
8233
8233
  it.setAttribute("transform", `translate(${I}, ${E})`);
@@ -9113,9 +9113,9 @@ function yd() {
9113
9113
  }
9114
9114
  function g(b, k) {
9115
9115
  if (n.call(this, b, k)) {
9116
- var M = b.changedTouches, C = t.call(this, b, k), L = M.length, _, $;
9116
+ var M = b.changedTouches, C = t.call(this, b, k), L = M.length, _, T;
9117
9117
  for (_ = 0; _ < L; ++_)
9118
- ($ = v(this, C, b, k, M[_].identifier, M[_])) && (Js(b), $("start", b, M[_]));
9118
+ (T = v(this, C, b, k, M[_].identifier, M[_])) && (Js(b), T("start", b, M[_]));
9119
9119
  }
9120
9120
  }
9121
9121
  function m(b) {
@@ -9131,7 +9131,7 @@ function yd() {
9131
9131
  (L = r[k[C].identifier]) && (Js(b), L("end", b, k[C]));
9132
9132
  }
9133
9133
  function v(b, k, M, C, L, _) {
9134
- var $ = o.copy(), I = un(_ || M, k), E, P, S;
9134
+ var T = o.copy(), I = un(_ || M, k), E, P, S;
9135
9135
  if ((S = e.call(b, new Ya("beforestart", {
9136
9136
  sourceEvent: M,
9137
9137
  target: u,
@@ -9141,9 +9141,9 @@ function yd() {
9141
9141
  y: I[1],
9142
9142
  dx: 0,
9143
9143
  dy: 0,
9144
- dispatch: $
9144
+ dispatch: T
9145
9145
  }), C)) != null)
9146
- return E = S.x - I[0] || 0, P = S.y - I[1] || 0, function w(A, T, R) {
9146
+ return E = S.x - I[0] || 0, P = S.y - I[1] || 0, function w(A, $, R) {
9147
9147
  var F = I, D;
9148
9148
  switch (A) {
9149
9149
  case "start":
@@ -9152,14 +9152,14 @@ function yd() {
9152
9152
  case "end":
9153
9153
  delete r[L], --s;
9154
9154
  case "drag":
9155
- I = un(R || T, k), D = s;
9155
+ I = un(R || $, k), D = s;
9156
9156
  break;
9157
9157
  }
9158
- $.call(
9158
+ T.call(
9159
9159
  A,
9160
9160
  b,
9161
9161
  new Ya(A, {
9162
- sourceEvent: T,
9162
+ sourceEvent: $,
9163
9163
  subject: S,
9164
9164
  target: u,
9165
9165
  identifier: L,
@@ -9168,7 +9168,7 @@ function yd() {
9168
9168
  y: I[1] + P,
9169
9169
  dx: I[0] - F[0],
9170
9170
  dy: I[1] - F[1],
9171
- dispatch: $
9171
+ dispatch: T
9172
9172
  }),
9173
9173
  C
9174
9174
  );
@@ -9277,56 +9277,56 @@ function Gv(n, t, e) {
9277
9277
  function xd() {
9278
9278
  var n = Nv, t = Wv, e = Gv, i = Hv, r = Vv, o = [0, 1 / 0], s = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], a = 250, l = Vy, c = Ki("start", "zoom", "end"), h, f, u, d = 500, p = 150, y = 0, g = 10;
9279
9279
  function m(S) {
9280
- S.property("__zoom", Uh).on("wheel.zoom", L, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", $).filter(r).on("touchstart.zoom", I).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", P).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
9280
+ S.property("__zoom", Uh).on("wheel.zoom", L, { passive: !1 }).on("mousedown.zoom", _).on("dblclick.zoom", T).filter(r).on("touchstart.zoom", I).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", P).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
9281
9281
  }
9282
- m.transform = function(S, w, A, T) {
9282
+ m.transform = function(S, w, A, $) {
9283
9283
  var R = S.selection ? S.selection() : S;
9284
- R.property("__zoom", Uh), S !== R ? k(S, w, A, T) : R.interrupt().each(function() {
9285
- M(this, arguments).event(T).start().zoom(null, typeof w == "function" ? w.apply(this, arguments) : w).end();
9284
+ R.property("__zoom", Uh), S !== R ? k(S, w, A, $) : R.interrupt().each(function() {
9285
+ M(this, arguments).event($).start().zoom(null, typeof w == "function" ? w.apply(this, arguments) : w).end();
9286
9286
  });
9287
- }, m.scaleBy = function(S, w, A, T) {
9287
+ }, m.scaleBy = function(S, w, A, $) {
9288
9288
  m.scaleTo(S, function() {
9289
9289
  var R = this.__zoom.k, F = typeof w == "function" ? w.apply(this, arguments) : w;
9290
9290
  return R * F;
9291
- }, A, T);
9292
- }, m.scaleTo = function(S, w, A, T) {
9291
+ }, A, $);
9292
+ }, m.scaleTo = function(S, w, A, $) {
9293
9293
  m.transform(S, function() {
9294
9294
  var R = t.apply(this, arguments), F = this.__zoom, D = A == null ? b(R) : typeof A == "function" ? A.apply(this, arguments) : A, z = F.invert(D), B = typeof w == "function" ? w.apply(this, arguments) : w;
9295
9295
  return e(v(x(F, B), D, z), R, s);
9296
- }, A, T);
9297
- }, m.translateBy = function(S, w, A, T) {
9296
+ }, A, $);
9297
+ }, m.translateBy = function(S, w, A, $) {
9298
9298
  m.transform(S, function() {
9299
9299
  return e(this.__zoom.translate(
9300
9300
  typeof w == "function" ? w.apply(this, arguments) : w,
9301
9301
  typeof A == "function" ? A.apply(this, arguments) : A
9302
9302
  ), t.apply(this, arguments), s);
9303
- }, null, T);
9304
- }, m.translateTo = function(S, w, A, T, R) {
9303
+ }, null, $);
9304
+ }, m.translateTo = function(S, w, A, $, R) {
9305
9305
  m.transform(S, function() {
9306
- var F = t.apply(this, arguments), D = this.__zoom, z = T == null ? b(F) : typeof T == "function" ? T.apply(this, arguments) : T;
9306
+ var F = t.apply(this, arguments), D = this.__zoom, z = $ == null ? b(F) : typeof $ == "function" ? $.apply(this, arguments) : $;
9307
9307
  return e(jo.translate(z[0], z[1]).scale(D.k).translate(
9308
9308
  typeof w == "function" ? -w.apply(this, arguments) : -w,
9309
9309
  typeof A == "function" ? -A.apply(this, arguments) : -A
9310
9310
  ), F, s);
9311
- }, T, R);
9311
+ }, $, R);
9312
9312
  };
9313
9313
  function x(S, w) {
9314
9314
  return w = Math.max(o[0], Math.min(o[1], w)), w === S.k ? S : new Rn(w, S.x, S.y);
9315
9315
  }
9316
9316
  function v(S, w, A) {
9317
- var T = w[0] - A[0] * S.k, R = w[1] - A[1] * S.k;
9318
- return T === S.x && R === S.y ? S : new Rn(S.k, T, R);
9317
+ var $ = w[0] - A[0] * S.k, R = w[1] - A[1] * S.k;
9318
+ return $ === S.x && R === S.y ? S : new Rn(S.k, $, R);
9319
9319
  }
9320
9320
  function b(S) {
9321
9321
  return [(+S[0][0] + +S[1][0]) / 2, (+S[0][1] + +S[1][1]) / 2];
9322
9322
  }
9323
- function k(S, w, A, T) {
9323
+ function k(S, w, A, $) {
9324
9324
  S.on("start.zoom", function() {
9325
- M(this, arguments).event(T).start();
9325
+ M(this, arguments).event($).start();
9326
9326
  }).on("interrupt.zoom end.zoom", function() {
9327
- M(this, arguments).event(T).end();
9327
+ M(this, arguments).event($).end();
9328
9328
  }).tween("zoom", function() {
9329
- var R = this, F = arguments, D = M(R, F).event(T), z = t.apply(R, F), B = A == null ? b(z) : typeof A == "function" ? A.apply(R, F) : A, H = Math.max(z[1][0] - z[0][0], z[1][1] - z[0][1]), J = R.__zoom, X = typeof w == "function" ? w.apply(R, F) : w, j = l(J.invert(B).concat(H / J.k), X.invert(B).concat(H / X.k));
9329
+ var R = this, F = arguments, D = M(R, F).event($), z = t.apply(R, F), B = A == null ? b(z) : typeof A == "function" ? A.apply(R, F) : A, H = Math.max(z[1][0] - z[0][0], z[1][1] - z[0][1]), J = R.__zoom, X = typeof w == "function" ? w.apply(R, F) : w, j = l(J.invert(B).concat(H / J.k), X.invert(B).concat(H / X.k));
9330
9330
  return function(W) {
9331
9331
  if (W === 1) W = X;
9332
9332
  else {
@@ -9373,43 +9373,43 @@ function xd() {
9373
9373
  };
9374
9374
  function L(S, ...w) {
9375
9375
  if (!n.apply(this, arguments)) return;
9376
- var A = M(this, w).event(S), T = this.__zoom, R = Math.max(o[0], Math.min(o[1], T.k * Math.pow(2, i.apply(this, arguments)))), F = un(S);
9376
+ var A = M(this, w).event(S), $ = this.__zoom, R = Math.max(o[0], Math.min(o[1], $.k * Math.pow(2, i.apply(this, arguments)))), F = un(S);
9377
9377
  if (A.wheel)
9378
- (A.mouse[0][0] !== F[0] || A.mouse[0][1] !== F[1]) && (A.mouse[1] = T.invert(A.mouse[0] = F)), clearTimeout(A.wheel);
9378
+ (A.mouse[0][0] !== F[0] || A.mouse[0][1] !== F[1]) && (A.mouse[1] = $.invert(A.mouse[0] = F)), clearTimeout(A.wheel);
9379
9379
  else {
9380
- if (T.k === R) return;
9381
- A.mouse = [F, T.invert(F)], Bi(this), A.start();
9380
+ if ($.k === R) return;
9381
+ A.mouse = [F, $.invert(F)], Bi(this), A.start();
9382
9382
  }
9383
- dr(S), A.wheel = setTimeout(D, p), A.zoom("mouse", e(v(x(T, R), A.mouse[0], A.mouse[1]), A.extent, s));
9383
+ dr(S), A.wheel = setTimeout(D, p), A.zoom("mouse", e(v(x($, R), A.mouse[0], A.mouse[1]), A.extent, s));
9384
9384
  function D() {
9385
9385
  A.wheel = null, A.end();
9386
9386
  }
9387
9387
  }
9388
9388
  function _(S, ...w) {
9389
9389
  if (u || !n.apply(this, arguments)) return;
9390
- var A = S.currentTarget, T = M(this, w, !0).event(S), R = rt(S.view).on("mousemove.zoom", B, !0).on("mouseup.zoom", H, !0), F = un(S, A), D = S.clientX, z = S.clientY;
9391
- Xc(S.view), Qs(S), T.mouse = [F, this.__zoom.invert(F)], Bi(this), T.start();
9390
+ var A = S.currentTarget, $ = M(this, w, !0).event(S), R = rt(S.view).on("mousemove.zoom", B, !0).on("mouseup.zoom", H, !0), F = un(S, A), D = S.clientX, z = S.clientY;
9391
+ Xc(S.view), Qs(S), $.mouse = [F, this.__zoom.invert(F)], Bi(this), $.start();
9392
9392
  function B(J) {
9393
- if (dr(J), !T.moved) {
9393
+ if (dr(J), !$.moved) {
9394
9394
  var X = J.clientX - D, j = J.clientY - z;
9395
- T.moved = X * X + j * j > y;
9395
+ $.moved = X * X + j * j > y;
9396
9396
  }
9397
- T.event(J).zoom("mouse", e(v(T.that.__zoom, T.mouse[0] = un(J, A), T.mouse[1]), T.extent, s));
9397
+ $.event(J).zoom("mouse", e(v($.that.__zoom, $.mouse[0] = un(J, A), $.mouse[1]), $.extent, s));
9398
9398
  }
9399
9399
  function H(J) {
9400
- R.on("mousemove.zoom mouseup.zoom", null), Uc(J.view, T.moved), dr(J), T.event(J).end();
9400
+ R.on("mousemove.zoom mouseup.zoom", null), Uc(J.view, $.moved), dr(J), $.event(J).end();
9401
9401
  }
9402
9402
  }
9403
- function $(S, ...w) {
9403
+ function T(S, ...w) {
9404
9404
  if (n.apply(this, arguments)) {
9405
- var A = this.__zoom, T = un(S.changedTouches ? S.changedTouches[0] : S, this), R = A.invert(T), F = A.k * (S.shiftKey ? 0.5 : 2), D = e(v(x(A, F), T, R), t.apply(this, w), s);
9406
- dr(S), a > 0 ? rt(this).transition().duration(a).call(k, D, T, S) : rt(this).call(m.transform, D, T, S);
9405
+ var A = this.__zoom, $ = un(S.changedTouches ? S.changedTouches[0] : S, this), R = A.invert($), F = A.k * (S.shiftKey ? 0.5 : 2), D = e(v(x(A, F), $, R), t.apply(this, w), s);
9406
+ dr(S), a > 0 ? rt(this).transition().duration(a).call(k, D, $, S) : rt(this).call(m.transform, D, $, S);
9407
9407
  }
9408
9408
  }
9409
9409
  function I(S, ...w) {
9410
9410
  if (n.apply(this, arguments)) {
9411
- var A = S.touches, T = A.length, R = M(this, w, S.changedTouches.length === T).event(S), F, D, z, B;
9412
- for (Qs(S), D = 0; D < T; ++D)
9411
+ var A = S.touches, $ = A.length, R = M(this, w, S.changedTouches.length === $).event(S), F, D, z, B;
9412
+ for (Qs(S), D = 0; D < $; ++D)
9413
9413
  z = A[D], B = un(z, this), B = [B, this.__zoom.invert(B), z.identifier], R.touch0 ? !R.touch1 && R.touch0[2] !== B[2] && (R.touch1 = B, R.taps = 0) : (R.touch0 = B, F = !0, R.taps = 1 + !!h);
9414
9414
  h && (h = clearTimeout(h)), F && (R.taps < 2 && (f = B[0], h = setTimeout(function() {
9415
9415
  h = null;
@@ -9418,9 +9418,9 @@ function xd() {
9418
9418
  }
9419
9419
  function E(S, ...w) {
9420
9420
  if (this.__zooming) {
9421
- var A = M(this, w).event(S), T = S.changedTouches, R = T.length, F, D, z, B;
9421
+ var A = M(this, w).event(S), $ = S.changedTouches, R = $.length, F, D, z, B;
9422
9422
  for (dr(S), F = 0; F < R; ++F)
9423
- D = T[F], z = un(D, this), A.touch0 && A.touch0[2] === D.identifier ? A.touch0[0] = z : A.touch1 && A.touch1[2] === D.identifier && (A.touch1[0] = z);
9423
+ D = $[F], z = un(D, this), A.touch0 && A.touch0[2] === D.identifier ? A.touch0[0] = z : A.touch1 && A.touch1[2] === D.identifier && (A.touch1[0] = z);
9424
9424
  if (D = A.that.__zoom, A.touch1) {
9425
9425
  var H = A.touch0[0], J = A.touch0[1], X = A.touch1[0], j = A.touch1[1], W = (W = X[0] - H[0]) * W + (W = X[1] - H[1]) * W, U = (U = j[0] - J[0]) * U + (U = j[1] - J[1]) * U;
9426
9426
  D = x(D, Math.sqrt(W / U)), z = [(H[0] + X[0]) / 2, (H[1] + X[1]) / 2], B = [(J[0] + j[0]) / 2, (J[1] + j[1]) / 2];
@@ -9431,11 +9431,11 @@ function xd() {
9431
9431
  }
9432
9432
  function P(S, ...w) {
9433
9433
  if (this.__zooming) {
9434
- var A = M(this, w).event(S), T = S.changedTouches, R = T.length, F, D;
9434
+ var A = M(this, w).event(S), $ = S.changedTouches, R = $.length, F, D;
9435
9435
  for (Qs(S), u && clearTimeout(u), u = setTimeout(function() {
9436
9436
  u = null;
9437
9437
  }, d), F = 0; F < R; ++F)
9438
- D = T[F], A.touch0 && A.touch0[2] === D.identifier ? delete A.touch0 : A.touch1 && A.touch1[2] === D.identifier && delete A.touch1;
9438
+ D = $[F], A.touch0 && A.touch0[2] === D.identifier ? delete A.touch0 : A.touch1 && A.touch1[2] === D.identifier && delete A.touch1;
9439
9439
  if (A.touch1 && !A.touch0 && (A.touch0 = A.touch1, delete A.touch1), A.touch0) A.touch0[1] = this.__zoom.invert(A.touch0[0]);
9440
9440
  else if (A.end(), A.taps === 2 && (D = un(D, this), Math.hypot(f[0] - D[0], f[1] - D[1]) < g)) {
9441
9441
  var z = rt(this).on("dblclick.zoom");
@@ -10011,8 +10011,8 @@ function i2(n) {
10011
10011
  h(this, arguments).end(v);
10012
10012
  }).tween("brush", function() {
10013
10013
  var v = this, b = v.__brush, k = h(v, arguments), M = b.selection, C = n.input(typeof m == "function" ? m.apply(this, arguments) : m, b.extent), L = oe(M, C);
10014
- function _($) {
10015
- b.selection = $ === 1 && C === null ? null : L($), c.call(v), k.brush();
10014
+ function _(T) {
10015
+ b.selection = T === 1 && C === null ? null : L(T), c.call(v), k.brush();
10016
10016
  }
10017
10017
  return M !== null && C !== null ? _ : _(1);
10018
10018
  }) : g.each(function() {
@@ -10072,7 +10072,7 @@ function i2(n) {
10072
10072
  };
10073
10073
  function u(g) {
10074
10074
  if (a && !g.touches || !e.apply(this, arguments)) return;
10075
- var m = this, x = g.target.__data__.type, v = (r && g.metaKey ? x = "overlay" : x) === "selection" ? qh : r && g.altKey ? Ti : Ei, b = n === ia ? null : Zv[x], k = n === _o ? null : Kv[x], M = ra(m), C = M.extent, L = M.selection, _ = C[0][0], $, I, E = C[0][1], P, S, w = C[1][0], A, T, R = C[1][1], F, D, z = 0, B = 0, H, J = b && k && r && g.shiftKey, X, j, W = Array.from(g.touches || [g], (at) => {
10075
+ var m = this, x = g.target.__data__.type, v = (r && g.metaKey ? x = "overlay" : x) === "selection" ? qh : r && g.altKey ? Ti : Ei, b = n === ia ? null : Zv[x], k = n === _o ? null : Kv[x], M = ra(m), C = M.extent, L = M.selection, _ = C[0][0], T, I, E = C[0][1], P, S, w = C[1][0], A, $, R = C[1][1], F, D, z = 0, B = 0, H, J = b && k && r && g.shiftKey, X, j, W = Array.from(g.touches || [g], (at) => {
10076
10076
  const ot = at.identifier;
10077
10077
  return at = un(at, m), at.point0 = at.slice(), at.identifier = ot, at;
10078
10078
  });
@@ -10082,15 +10082,15 @@ function i2(n) {
10082
10082
  L && (H = !0);
10083
10083
  const at = [W[0], W[1] || W[0]];
10084
10084
  M.selection = L = [[
10085
- $ = n === ia ? _ : ve(at[0][0], at[1][0]),
10085
+ T = n === ia ? _ : ve(at[0][0], at[1][0]),
10086
10086
  P = n === _o ? E : ve(at[0][1], at[1][1])
10087
10087
  ], [
10088
10088
  A = n === ia ? w : be(at[0][0], at[1][0]),
10089
10089
  F = n === _o ? R : be(at[0][1], at[1][1])
10090
10090
  ]], W.length > 1 && ct(g);
10091
10091
  } else
10092
- $ = L[0][0], P = L[0][1], A = L[1][0], F = L[1][1];
10093
- I = $, S = P, T = A, D = F;
10092
+ T = L[0][0], P = L[0][1], A = L[1][0], F = L[1][1];
10093
+ I = T, S = P, $ = A, D = F;
10094
10094
  var G = rt(m).attr("pointer-events", "none"), N = G.selectAll(".overlay").attr("cursor", $n[x]);
10095
10095
  if (g.touches)
10096
10096
  U.moved = O, U.ended = it;
@@ -10117,19 +10117,19 @@ function i2(n) {
10117
10117
  switch (z = ot[0] - q[0], B = ot[1] - q[1], v) {
10118
10118
  case na:
10119
10119
  case qh: {
10120
- b && (z = be(_ - $, ve(w - A, z)), I = $ + z, T = A + z), k && (B = be(E - P, ve(R - F, B)), S = P + B, D = F + B);
10120
+ b && (z = be(_ - T, ve(w - A, z)), I = T + z, $ = A + z), k && (B = be(E - P, ve(R - F, B)), S = P + B, D = F + B);
10121
10121
  break;
10122
10122
  }
10123
10123
  case Ei: {
10124
- W[1] ? (b && (I = be(_, ve(w, W[0][0])), T = be(_, ve(w, W[1][0])), b = 1), k && (S = be(E, ve(R, W[0][1])), D = be(E, ve(R, W[1][1])), k = 1)) : (b < 0 ? (z = be(_ - $, ve(w - $, z)), I = $ + z, T = A) : b > 0 && (z = be(_ - A, ve(w - A, z)), I = $, T = A + z), k < 0 ? (B = be(E - P, ve(R - P, B)), S = P + B, D = F) : k > 0 && (B = be(E - F, ve(R - F, B)), S = P, D = F + B));
10124
+ W[1] ? (b && (I = be(_, ve(w, W[0][0])), $ = be(_, ve(w, W[1][0])), b = 1), k && (S = be(E, ve(R, W[0][1])), D = be(E, ve(R, W[1][1])), k = 1)) : (b < 0 ? (z = be(_ - T, ve(w - T, z)), I = T + z, $ = A) : b > 0 && (z = be(_ - A, ve(w - A, z)), I = T, $ = A + z), k < 0 ? (B = be(E - P, ve(R - P, B)), S = P + B, D = F) : k > 0 && (B = be(E - F, ve(R - F, B)), S = P, D = F + B));
10125
10125
  break;
10126
10126
  }
10127
10127
  case Ti: {
10128
- b && (I = be(_, ve(w, $ - z * b)), T = be(_, ve(w, A + z * b))), k && (S = be(E, ve(R, P - B * k)), D = be(E, ve(R, F + B * k)));
10128
+ b && (I = be(_, ve(w, T - z * b)), $ = be(_, ve(w, A + z * b))), k && (S = be(E, ve(R, P - B * k)), D = be(E, ve(R, F + B * k)));
10129
10129
  break;
10130
10130
  }
10131
10131
  }
10132
- T < I && (b *= -1, st = $, $ = A, A = st, st = I, I = T, T = st, x in Jh && N.attr("cursor", $n[x = Jh[x]])), D < S && (k *= -1, st = P, P = F, F = st, st = S, S = D, D = st, x in Qh && N.attr("cursor", $n[x = Qh[x]])), M.selection && (L = M.selection), X && (I = L[0][0], T = L[1][0]), j && (S = L[0][1], D = L[1][1]), (L[0][0] !== I || L[0][1] !== S || L[1][0] !== T || L[1][1] !== D) && (M.selection = [[I, S], [T, D]], c.call(m), U.brush(at, v.name));
10132
+ $ < I && (b *= -1, st = T, T = A, A = st, st = I, I = $, $ = st, x in Jh && N.attr("cursor", $n[x = Jh[x]])), D < S && (k *= -1, st = P, P = F, F = st, st = S, S = D, D = st, x in Qh && N.attr("cursor", $n[x = Qh[x]])), M.selection && (L = M.selection), X && (I = L[0][0], $ = L[1][0]), j && (S = L[0][1], D = L[1][1]), (L[0][0] !== I || L[0][1] !== S || L[1][0] !== $ || L[1][1] !== D) && (M.selection = [[I, S], [$, D]], c.call(m), U.brush(at, v.name));
10133
10133
  }
10134
10134
  function it(at) {
10135
10135
  if (jv(at), at.touches) {
@@ -10148,11 +10148,11 @@ function i2(n) {
10148
10148
  break;
10149
10149
  }
10150
10150
  case 18: {
10151
- v === Ei && (b && (A = T - z * b, $ = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti, ct(at));
10151
+ v === Ei && (b && (A = $ - z * b, T = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti, ct(at));
10152
10152
  break;
10153
10153
  }
10154
10154
  case 32: {
10155
- (v === Ei || v === Ti) && (b < 0 ? A = T - z : b > 0 && ($ = I - z), k < 0 ? F = D - B : k > 0 && (P = S - B), v = na, N.attr("cursor", $n.selection), ct(at));
10155
+ (v === Ei || v === Ti) && (b < 0 ? A = $ - z : b > 0 && (T = I - z), k < 0 ? F = D - B : k > 0 && (P = S - B), v = na, N.attr("cursor", $n.selection), ct(at));
10156
10156
  break;
10157
10157
  }
10158
10158
  default:
@@ -10167,11 +10167,11 @@ function i2(n) {
10167
10167
  break;
10168
10168
  }
10169
10169
  case 18: {
10170
- v === Ti && (b < 0 ? A = T : b > 0 && ($ = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei, ct(at));
10170
+ v === Ti && (b < 0 ? A = $ : b > 0 && (T = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei, ct(at));
10171
10171
  break;
10172
10172
  }
10173
10173
  case 32: {
10174
- v === na && (at.altKey ? (b && (A = T - z * b, $ = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti) : (b < 0 ? A = T : b > 0 && ($ = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei), N.attr("cursor", $n[x]), ct(at));
10174
+ v === na && (at.altKey ? (b && (A = $ - z * b, T = I + z * b), k && (F = D - B * k, P = S + B * k), v = Ti) : (b < 0 ? A = $ : b > 0 && (T = I), k < 0 ? F = D : k > 0 && (P = S), v = Ei), N.attr("cursor", $n[x]), ct(at));
10175
10175
  break;
10176
10176
  }
10177
10177
  default:
@@ -10313,8 +10313,8 @@ function p2(n, t, e, i, r, o, s, a) {
10313
10313
  return u = (h * (t - o) - f * (n - r)) / u, [n + u * l, t + u * c];
10314
10314
  }
10315
10315
  function lo(n, t, e, i, r, o, s) {
10316
- var a = n - e, l = t - i, c = (s ? o : -o) / Fe(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Fe(r2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, $ = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = $ - g, w = I - m;
10317
- return E * E + P * P > S * S + w * w && (L = $, _ = I), {
10316
+ var a = n - e, l = t - i, c = (s ? o : -o) / Fe(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Fe(r2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, T = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = T - g, w = I - m;
10317
+ return E * E + P * P > S * S + w * w && (L = T, _ = I), {
10318
10318
  cx: L,
10319
10319
  cy: _,
10320
10320
  x01: -h,
@@ -10331,22 +10331,22 @@ function Ae() {
10331
10331
  else if (g > Pr - ke)
10332
10332
  a.moveTo(d * ei(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u > ke && (a.moveTo(u * ei(y), u * vn(y)), a.arc(0, 0, u, y, p, m));
10333
10333
  else {
10334
- var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > ke && (i ? +i.apply(this, arguments) : Fe(u * u + d * d)), $ = oa(tu(d - u) / 2, +e.apply(this, arguments)), I = $, E = $, P, S;
10334
+ var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > ke && (i ? +i.apply(this, arguments) : Fe(u * u + d * d)), T = oa(tu(d - u) / 2, +e.apply(this, arguments)), I = T, E = T, P, S;
10335
10335
  if (_ > ke) {
10336
10336
  var w = eu(_ / u * vn(L)), A = eu(_ / d * vn(L));
10337
10337
  (M -= w * 2) > ke ? (w *= m ? 1 : -1, b += w, k -= w) : (M = 0, b = k = (p + y) / 2), (C -= A * 2) > ke ? (A *= m ? 1 : -1, x += A, v -= A) : (C = 0, x = v = (p + y) / 2);
10338
10338
  }
10339
- var T = d * ei(x), R = d * vn(x), F = u * ei(k), D = u * vn(k);
10340
- if ($ > ke) {
10339
+ var $ = d * ei(x), R = d * vn(x), F = u * ei(k), D = u * vn(k);
10340
+ if (T > ke) {
10341
10341
  var z = d * ei(v), B = d * vn(v), H = u * ei(b), J = u * vn(b), X;
10342
10342
  if (g < Xi)
10343
- if (X = p2(T, R, H, J, z, B, F, D)) {
10344
- var j = T - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(o2((j * U + W * G) / (Fe(j * j + W * W) * Fe(U * U + G * G))) / 2), Y = Fe(X[0] * X[0] + X[1] * X[1]);
10345
- I = oa($, (u - Y) / (N - 1)), E = oa($, (d - Y) / (N + 1));
10343
+ if (X = p2($, R, H, J, z, B, F, D)) {
10344
+ var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(o2((j * U + W * G) / (Fe(j * j + W * W) * Fe(U * U + G * G))) / 2), Y = Fe(X[0] * X[0] + X[1] * X[1]);
10345
+ I = oa(T, (u - Y) / (N - 1)), E = oa(T, (d - Y) / (N + 1));
10346
10346
  } else
10347
10347
  I = E = 0;
10348
10348
  }
10349
- C > ke ? E > ke ? (P = lo(H, J, T, R, d, E, m), S = lo(z, B, F, D, d, E, m), a.moveTo(P.cx + P.x01, P.cy + P.y01), E < $ ? a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, d, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), !m), a.arc(S.cx, S.cy, E, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : (a.moveTo(T, R), a.arc(0, 0, d, x, v, !m)) : a.moveTo(T, R), !(u > ke) || !(M > ke) ? a.lineTo(F, D) : I > ke ? (P = lo(F, D, z, B, u, -I, m), S = lo(T, R, H, J, u, -I, m), a.lineTo(P.cx + P.x01, P.cy + P.y01), I < $ ? a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, u, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), m), a.arc(S.cx, S.cy, I, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : a.arc(0, 0, u, k, b, m);
10349
+ C > ke ? E > ke ? (P = lo(H, J, $, R, d, E, m), S = lo(z, B, F, D, d, E, m), a.moveTo(P.cx + P.x01, P.cy + P.y01), E < T ? a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, E, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, d, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), !m), a.arc(S.cx, S.cy, E, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : (a.moveTo($, R), a.arc(0, 0, d, x, v, !m)) : a.moveTo($, R), !(u > ke) || !(M > ke) ? a.lineTo(F, D) : I > ke ? (P = lo(F, D, z, B, u, -I, m), S = lo($, R, H, J, u, -I, m), a.lineTo(P.cx + P.x01, P.cy + P.y01), I < T ? a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, I, we(P.y01, P.x01), we(P.y11, P.x11), !m), a.arc(0, 0, u, we(P.cy + P.y11, P.cx + P.x11), we(S.cy + S.y11, S.cx + S.x11), m), a.arc(S.cx, S.cy, I, we(S.y11, S.x11), we(S.y01, S.x01), !m))) : a.arc(0, 0, u, k, b, m);
10350
10350
  }
10351
10351
  if (a.closePath(), h) return a = null, h + "" || null;
10352
10352
  }
@@ -12654,7 +12654,7 @@ class Dd extends Xt {
12654
12654
  a.forEach((g, m) => {
12655
12655
  const x = i.getPixelForValue(g.x ?? 0), v = r.getPixelForValue(g.y ?? 0), b = o.append("circle").attr("cx", x).attr("cy", v).attr("r", 0).attr("fill", g.color || e).attr("opacity", 0).attr("class", "katucharts-halo"), k = o.append("circle").attr("cx", x).attr("cy", v).attr("r", 0).attr("fill", g.color || e).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1).attr("class", "katucharts-hover-marker");
12656
12656
  o.append("circle").attr("cx", x).attr("cy", v).attr("r", 15).attr("fill", "transparent").style("cursor", this.config.cursor || "pointer").on("mouseover", (C) => {
12657
- var L, _, $, I, E;
12657
+ var L, _, T, I, E;
12658
12658
  b.transition().duration(K).ease(Z).attr("r", c).attr("opacity", h), k.transition().duration(K).ease(Z).attr("r", s), this.context.events.emit("point:mouseover", {
12659
12659
  point: g,
12660
12660
  index: m,
@@ -12662,13 +12662,13 @@ class Dd extends Xt {
12662
12662
  event: C,
12663
12663
  plotX: x,
12664
12664
  plotY: v
12665
- }), (_ = (L = g.events) == null ? void 0 : L.mouseOver) == null || _.call(g, C), (E = (I = ($ = this.config.point) == null ? void 0 : $.events) == null ? void 0 : I.mouseOver) == null || E.call(g, C);
12665
+ }), (_ = (L = g.events) == null ? void 0 : L.mouseOver) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.mouseOver) == null || E.call(g, C);
12666
12666
  }).on("mouseout", (C) => {
12667
- var L, _, $, I, E;
12668
- b.transition().duration(K).ease(Z).attr("r", 0).attr("opacity", 0), k.transition().duration(K).ease(Z).attr("r", 0), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.mouseOut) == null || _.call(g, C), (E = (I = ($ = this.config.point) == null ? void 0 : $.events) == null ? void 0 : I.mouseOut) == null || E.call(g, C);
12667
+ var L, _, T, I, E;
12668
+ b.transition().duration(K).ease(Z).attr("r", 0).attr("opacity", 0), k.transition().duration(K).ease(Z).attr("r", 0), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.mouseOut) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.mouseOut) == null || E.call(g, C);
12669
12669
  }).on("click", (C) => {
12670
- var L, _, $, I, E, P, S;
12671
- this.context.events.emit("point:click", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.click) == null || _.call(g, C), (E = (I = ($ = this.config.point) == null ? void 0 : $.events) == null ? void 0 : I.click) == null || E.call(g, C), (S = (P = this.config.events) == null ? void 0 : P.click) == null || S.call(this, C), this.handlePointSelect(k, g, m, C);
12670
+ var L, _, T, I, E, P, S;
12671
+ this.context.events.emit("point:click", { point: g, index: m, series: this, event: C }), (_ = (L = g.events) == null ? void 0 : L.click) == null || _.call(g, C), (E = (I = (T = this.config.point) == null ? void 0 : T.events) == null ? void 0 : I.click) == null || E.call(g, C), (S = (P = this.config.events) == null ? void 0 : P.click) == null || S.call(this, C), this.handlePointSelect(k, g, m, C);
12672
12672
  });
12673
12673
  });
12674
12674
  }
@@ -12763,9 +12763,9 @@ class zd extends Xt {
12763
12763
  t.each((x, v, b) => {
12764
12764
  const k = rt(b[v]), M = this.computeStackedStartParams(x, e, i, r, s, c), C = this.computeStackedRectParams(x, e, i, r, o, s, c, l);
12765
12765
  x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(pt).delay(Ce(v, 0, Wt, e.length)).attrTween("d", () => {
12766
- const L = oe(M.x, C.x), _ = oe(M.y, C.y), $ = oe(M.w, C.w), I = oe(M.h, C.h);
12766
+ const L = oe(M.x, C.x), _ = oe(M.y, C.y), T = oe(M.w, C.w), I = oe(M.h, C.h);
12767
12767
  return (E) => this.rectParamsToPath(
12768
- { x: L(E), y: _(E), w: $(E), h: I(E) },
12768
+ { x: L(E), y: _(E), w: T(E), h: I(E) },
12769
12769
  g,
12770
12770
  p,
12771
12771
  y
@@ -12823,45 +12823,45 @@ class zd extends Xt {
12823
12823
  }
12824
12824
  updateStackedBars(t) {
12825
12825
  const { xAxis: e, yAxis: i, plotArea: r } = this.context, o = this.getColor(), s = this.data, { barWidth: a, barOffset: l, baseline: c } = this.computeBarGeometry(), h = this.config.stacking, f = this.context.stackOffsets, u = h === "percent", d = this.config.crisp !== !1, p = aa(this.config.borderRadius), y = this.config.minPointLength ?? 0, g = u ? this.context.stackTotals : void 0, m = (_) => {
12826
- const $ = _.x ?? 0, I = (f == null ? void 0 : f.get($)) || 0, E = _.y ?? 0;
12826
+ const T = _.x ?? 0, I = (f == null ? void 0 : f.get(T)) || 0, E = _.y ?? 0;
12827
12827
  if (u && g) {
12828
- const P = g.get($) || 1;
12828
+ const P = g.get(T) || 1;
12829
12829
  return (I + E) / P * 100;
12830
12830
  }
12831
12831
  return I + E;
12832
12832
  }, x = (_) => {
12833
- const $ = _.x ?? 0, I = (f == null ? void 0 : f.get($)) || 0;
12833
+ const T = _.x ?? 0, I = (f == null ? void 0 : f.get(T)) || 0;
12834
12834
  if (u && g) {
12835
- const E = g.get($) || 1;
12835
+ const E = g.get(T) || 1;
12836
12836
  return I / E * 100;
12837
12837
  }
12838
12838
  return I;
12839
12839
  };
12840
12840
  if (h) {
12841
12841
  const _ = this.context.stackTotals;
12842
- for (const $ of s) {
12843
- const I = $.x ?? 0;
12844
- if (_ && ($.total = _.get(I) || 0, $.stackTotal = _.get(I) || 0), u && _) {
12842
+ for (const T of s) {
12843
+ const I = T.x ?? 0;
12844
+ if (_ && (T.total = _.get(I) || 0, T.stackTotal = _.get(I) || 0), u && _) {
12845
12845
  const E = _.get(I) || 1;
12846
- $.percentage = ($.y ?? 0) / E * 100;
12846
+ T.percentage = (T.y ?? 0) / E * 100;
12847
12847
  }
12848
12848
  }
12849
12849
  }
12850
12850
  const v = this.context.totalSeriesOfType || 1, b = this.context.indexInType || 0, k = b === v - 1, M = b === 0, C = p, L = this.group.selectAll(".katucharts-column").data(s);
12851
- L.each((_, $, I) => {
12852
- const E = rt(I[$]), P = this.computeStackedRectParams(_, s, a, l, m, x, d, y), S = _._rectParams || P;
12851
+ L.each((_, T, I) => {
12852
+ const E = rt(I[T]), P = this.computeStackedRectParams(_, s, a, l, m, x, d, y), S = _._rectParams || P;
12853
12853
  _._rectParams = P, E.transition().duration(t).attrTween("d", () => {
12854
- const w = oe(S.x, P.x), A = oe(S.y, P.y), T = oe(S.w, P.w), R = oe(S.h, P.h);
12854
+ const w = oe(S.x, P.x), A = oe(S.y, P.y), $ = oe(S.w, P.w), R = oe(S.h, P.h);
12855
12855
  return (F) => this.rectParamsToPath(
12856
- { x: w(F), y: A(F), w: T(F), h: R(F) },
12856
+ { x: w(F), y: A(F), w: $(F), h: R(F) },
12857
12857
  C,
12858
12858
  k,
12859
12859
  M
12860
12860
  );
12861
- }).attr("fill", this.getPointColor(_, $, o));
12862
- }), L.enter().append("path").attr("class", "katucharts-column").attr("stroke", (_) => _.borderColor || this.config.borderColor || "none").attr("stroke-width", (_) => _.borderWidth ?? this.config.borderWidth ?? 0).attr("fill", (_, $) => this.getPointColor(_, $, o)).each((_, $, I) => {
12861
+ }).attr("fill", this.getPointColor(_, T, o));
12862
+ }), L.enter().append("path").attr("class", "katucharts-column").attr("stroke", (_) => _.borderColor || this.config.borderColor || "none").attr("stroke-width", (_) => _.borderWidth ?? this.config.borderWidth ?? 0).attr("fill", (_, T) => this.getPointColor(_, T, o)).each((_, T, I) => {
12863
12863
  const E = this.computeStackedRectParams(_, s, a, l, m, x, d, y);
12864
- _._rectParams = E, rt(I[$]).attr("d", this.rectParamsToPath(E, C, k, M));
12864
+ _._rectParams = E, rt(I[T]).attr("d", this.rectParamsToPath(E, C, k, M));
12865
12865
  }), L.exit().transition().duration(t).attr("opacity", 0).remove(), this.group.selectAll(".katucharts-data-labels").remove(), this.attachHoverEffects(this.group.selectAll(".katucharts-column"), s), this.renderColumnDataLabels(s, a, l, c, m, x);
12866
12866
  }
12867
12867
  computeBarGeometry() {
@@ -12922,7 +12922,7 @@ class zd extends Xt {
12922
12922
  if (this.config.enableMouseTracking === !1) return;
12923
12923
  const { xAxis: i, yAxis: r } = this.context, o = !!this.config.stacking, s = ((f = (h = this.config.states) == null ? void 0 : h.hover) == null ? void 0 : f.brightness) ?? (o ? 0.2 : 0.1), a = (d = (u = this.config.states) == null ? void 0 : u.hover) == null ? void 0 : d.color, l = (y = (p = this.config.states) == null ? void 0 : p.hover) == null ? void 0 : y.borderColor, c = (m = (g = this.config.states) == null ? void 0 : g.hover) == null ? void 0 : m.borderWidth;
12924
12924
  t.style("cursor", this.config.cursor || "pointer").on("mouseover", (x, v) => {
12925
- var E, P, S, w, A, T, R;
12925
+ var E, P, S, w, A, $, R;
12926
12926
  const b = x.currentTarget, k = b.getAttribute("fill") || "";
12927
12927
  b.setAttribute("data-orig-fill", k);
12928
12928
  const C = rt(b).interrupt("hover").transition("hover").duration(K).ease(Z);
@@ -12935,23 +12935,23 @@ class zd extends Xt {
12935
12935
  }).interrupt("stackDim").transition("stackDim").duration(Ko).ease(Z).attr("opacity", 0.3));
12936
12936
  b.setAttribute("data-orig-stroke", b.getAttribute("stroke") || ""), b.setAttribute("data-orig-stroke-width", b.getAttribute("stroke-width") || ""), C.style("stroke", "#ffffff").style("stroke-width", "2");
12937
12937
  }
12938
- const L = e.indexOf(v), _ = i.getPixelForValue(v.x ?? 0), $ = r.getPixelForValue(v.y ?? 0), I = this.context.inverted;
12938
+ const L = e.indexOf(v), _ = i.getPixelForValue(v.x ?? 0), T = r.getPixelForValue(v.y ?? 0), I = this.context.inverted;
12939
12939
  this.context.events.emit("point:mouseover", {
12940
12940
  point: v,
12941
12941
  index: L,
12942
12942
  series: this,
12943
12943
  event: x,
12944
- plotX: I ? $ : _,
12945
- plotY: I ? _ : $
12946
- }), (w = (S = v.events) == null ? void 0 : S.mouseOver) == null || w.call(v, x), (R = (T = (A = this.config.point) == null ? void 0 : A.events) == null ? void 0 : T.mouseOver) == null || R.call(v, x);
12944
+ plotX: I ? T : _,
12945
+ plotY: I ? _ : T
12946
+ }), (w = (S = v.events) == null ? void 0 : S.mouseOver) == null || w.call(v, x), (R = ($ = (A = this.config.point) == null ? void 0 : A.events) == null ? void 0 : $.mouseOver) == null || R.call(v, x);
12947
12947
  }).on("mouseout", (x, v) => {
12948
- var _, $, I, E, P, S, w;
12948
+ var _, T, I, E, P, S, w;
12949
12949
  const b = x.currentTarget, k = b.getAttribute("data-orig-fill") || "", C = rt(b).interrupt("hover").transition("hover").duration(K).ease(Z);
12950
12950
  if (C.style("fill", k), b.style.filter = "", o) {
12951
12951
  const A = this.context.allSeries;
12952
12952
  if (A)
12953
- for (const T of A)
12954
- T.visible && ((_ = T.config) != null && _.stacking) && (($ = T.group) == null || $.selectAll(".katucharts-column").interrupt("stackDim").transition("stackDim").duration(Ko).ease(Z).attr("opacity", 1));
12953
+ for (const $ of A)
12954
+ $.visible && ((_ = $.config) != null && _.stacking) && ((T = $.group) == null || T.selectAll(".katucharts-column").interrupt("stackDim").transition("stackDim").duration(Ko).ease(Z).attr("opacity", 1));
12955
12955
  C.style("stroke", b.getAttribute("data-orig-stroke") || "").style("stroke-width", b.getAttribute("data-orig-stroke-width") || "");
12956
12956
  } else
12957
12957
  C.style("stroke", "").style("stroke-width", "");
@@ -12961,9 +12961,9 @@ class zd extends Xt {
12961
12961
  const L = e.indexOf(v);
12962
12962
  this.context.events.emit("point:mouseout", { point: v, index: L, series: this, event: x }), (E = (I = v.events) == null ? void 0 : I.mouseOut) == null || E.call(v, x), (w = (S = (P = this.config.point) == null ? void 0 : P.events) == null ? void 0 : S.mouseOut) == null || w.call(v, x);
12963
12963
  }).on("click", (x, v) => {
12964
- var C, L, _, $, I, E, P;
12964
+ var C, L, _, T, I, E, P;
12965
12965
  const b = e.indexOf(v);
12966
- this.context.events.emit("point:click", { point: v, index: b, series: this, event: x }), (L = (C = v.events) == null ? void 0 : C.click) == null || L.call(v, x), (I = ($ = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : $.click) == null || I.call(v, x), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, x);
12966
+ this.context.events.emit("point:click", { point: v, index: b, series: this, event: x }), (L = (C = v.events) == null ? void 0 : C.click) == null || L.call(v, x), (I = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click) == null || I.call(v, x), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, x);
12967
12967
  const k = x.currentTarget, M = rt(k);
12968
12968
  this.handlePointSelect(M, v, b, x);
12969
12969
  });
@@ -13033,7 +13033,10 @@ class q2 extends Xt {
13033
13033
  }).attr("stroke-width", (p) => {
13034
13034
  var y, g;
13035
13035
  return ((y = p.marker) == null ? void 0 : y.lineWidth) ?? ((g = this.config.marker) == null ? void 0 : g.lineWidth) ?? 1;
13036
- }).attr("opacity", this.config.opacity ?? 1).merge(u).transition().duration(t).attr("cx", (p, y) => this.cachedPositions[y].cx).attr("cy", (p, y) => this.cachedPositions[y].cy).attr("r", (p) => {
13036
+ }).attr("opacity", this.config.opacity ?? 1).merge(u).attr("fill", (p) => this.getPointFill(p, o)).attr("stroke", (p) => {
13037
+ var y, g;
13038
+ return ((y = p.marker) == null ? void 0 : y.lineColor) ?? ((g = this.config.marker) == null ? void 0 : g.lineColor) ?? o;
13039
+ }).transition().duration(t).attr("cx", (p, y) => this.cachedPositions[y].cx).attr("cy", (p, y) => this.cachedPositions[y].cy).attr("r", (p) => {
13037
13040
  var y;
13038
13041
  return ((y = p.marker) == null ? void 0 : y.radius) ?? a;
13039
13042
  });
@@ -13045,7 +13048,10 @@ class q2 extends Xt {
13045
13048
  }).attr("stroke-width", (y) => {
13046
13049
  var g, m;
13047
13050
  return ((g = y.marker) == null ? void 0 : g.lineWidth) ?? ((m = this.config.marker) == null ? void 0 : m.lineWidth) ?? 1;
13048
- }).attr("opacity", this.config.opacity ?? 1).merge(d).transition().duration(t).attr(
13051
+ }).attr("opacity", this.config.opacity ?? 1).merge(d).attr("fill", (y) => this.getPointFill(y, o)).attr("stroke", (y) => {
13052
+ var g, m;
13053
+ return ((g = y.marker) == null ? void 0 : g.lineColor) ?? ((m = this.config.marker) == null ? void 0 : m.lineColor) ?? o;
13054
+ }).transition().duration(t).attr(
13049
13055
  "transform",
13050
13056
  (y, g) => `translate(${this.cachedPositions[g].cx},${this.cachedPositions[g].cy})`
13051
13057
  ).attr("d", (y) => {
@@ -13113,10 +13119,10 @@ class q2 extends Xt {
13113
13119
  return this.group.insert("circle", ".katucharts-scatter-point").attr("cx", this.cachedPositions[k].cx).attr("cy", this.cachedPositions[k].cy).attr("r", 0).attr("fill", b.color || ((M = this.config.marker) == null ? void 0 : M.fillColor) || o).attr("opacity", 0).attr("class", "katucharts-halo");
13114
13120
  });
13115
13121
  t.on("mouseover", (b, k) => {
13116
- var E, P, S, w, A, T, R, F, D, z, B, H, J, X;
13122
+ var E, P, S, w, A, $, R, F, D, z, B, H, J, X;
13117
13123
  const M = b.currentTarget, C = e.indexOf(k);
13118
13124
  C >= 0 && p[C] && p[C].transition("halo").duration(K).ease(Z).attr("r", u).attr("opacity", d);
13119
- const L = ((E = k.marker) == null ? void 0 : E.radius) ?? i, _ = ((w = (S = (P = k.marker) == null ? void 0 : P.states) == null ? void 0 : S.hover) == null ? void 0 : w.radius) ?? ((R = (T = (A = this.config.marker) == null ? void 0 : A.states) == null ? void 0 : T.hover) == null ? void 0 : R.radius) ?? L + 3, I = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
13125
+ const L = ((E = k.marker) == null ? void 0 : E.radius) ?? i, _ = ((w = (S = (P = k.marker) == null ? void 0 : P.states) == null ? void 0 : S.hover) == null ? void 0 : w.radius) ?? ((R = ($ = (A = this.config.marker) == null ? void 0 : A.states) == null ? void 0 : $.hover) == null ? void 0 : R.radius) ?? L + 3, I = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
13120
13126
  if (s === "circle")
13121
13127
  I.attr("r", _);
13122
13128
  else if (a) {
@@ -13135,18 +13141,18 @@ class q2 extends Xt {
13135
13141
  var I, E, P, S, w, A;
13136
13142
  const M = b.currentTarget, C = e.indexOf(k);
13137
13143
  C >= 0 && p[C] && p[C].transition("halo").duration(K).ease(Z).attr("r", 0).attr("opacity", 0);
13138
- const L = ((I = k.marker) == null ? void 0 : I.radius) ?? i, $ = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
13144
+ const L = ((I = k.marker) == null ? void 0 : I.radius) ?? i, T = rt(M).interrupt("hover").transition("hover").duration(K).ease(Z);
13139
13145
  if (s === "circle")
13140
- $.attr("r", L);
13146
+ T.attr("r", L);
13141
13147
  else if (a) {
13142
- const T = Math.PI * L * L;
13143
- $.attr("d", en().type(a).size(T)());
13148
+ const $ = Math.PI * L * L;
13149
+ T.attr("d", en().type(a).size($)());
13144
13150
  }
13145
- M.style.filter = "", $.style("fill", null).style("stroke-width", null), this.context.events.emit("point:mouseout", { point: k, index: C, series: this, event: b }), (P = (E = k.events) == null ? void 0 : E.mouseOut) == null || P.call(k, b), (A = (w = (S = this.config.point) == null ? void 0 : S.events) == null ? void 0 : w.mouseOut) == null || A.call(k, b);
13151
+ M.style.filter = "", T.style("fill", null).style("stroke-width", null), this.context.events.emit("point:mouseout", { point: k, index: C, series: this, event: b }), (P = (E = k.events) == null ? void 0 : E.mouseOut) == null || P.call(k, b), (A = (w = (S = this.config.point) == null ? void 0 : S.events) == null ? void 0 : w.mouseOut) == null || A.call(k, b);
13146
13152
  }).on("click", (b, k) => {
13147
- var C, L, _, $, I, E, P;
13153
+ var C, L, _, T, I, E, P;
13148
13154
  const M = e.indexOf(k);
13149
- this.context.events.emit("point:click", { point: k, index: M, series: this, event: b }), (L = (C = k.events) == null ? void 0 : C.click) == null || L.call(k, b), (I = ($ = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : $.click) == null || I.call(k, b), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, b), this.handlePointSelect(rt(b.currentTarget), k, M, b);
13155
+ this.context.events.emit("point:click", { point: k, index: M, series: this, event: b }), (L = (C = k.events) == null ? void 0 : C.click) == null || L.call(k, b), (I = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click) == null || I.call(k, b), (P = (E = this.config.events) == null ? void 0 : E.click) == null || P.call(this, b), this.handlePointSelect(rt(b.currentTarget), k, M, b);
13150
13156
  });
13151
13157
  }
13152
13158
  }
@@ -13307,23 +13313,23 @@ class au extends Xt {
13307
13313
  }
13308
13314
  render() {
13309
13315
  var G, N, Y, O, ct, it, ft, dt, at, ot;
13310
- const { plotArea: t, colors: e } = this.context, i = this.config.ignoreHiddenPoint !== !1, r = this.data.filter((q) => q.y !== null && q.y !== void 0 && (q.y ?? 0) > 0), o = i ? r.filter((q) => q.visible !== !1) : r, s = this.context.animate, a = this.dataLabelConfigs().filter((q) => (q.distance ?? 30) >= 0), l = a.length > 0, c = l ? Math.max(...a.map((q) => (q.distance ?? 30) + 10)) : 0, h = this.config.center || ["50%", "50%"], f = this.resolvePercent(h[0], t.width), u = this.resolvePercent(h[1], t.height), d = t.width - c * 2, p = t.height - c, y = Math.min(d, p), g = Math.min(t.width, t.height), m = this.config.size !== void 0 && this.config.size !== null, x = m ? this.resolvePercent(this.config.size, g) : y, v = this.config.minSize ? this.resolvePercent(this.config.minSize, g) : 0, k = Math.max(l ? Math.min(x, y) : m ? x : g, v) / 2, M = this.resolvePercent(this.config.innerSize || 0, k * 2) / 2, C = this.config.depth ?? 0, L = (this.config.startAngle ?? 0) * Math.PI / 180, _ = this.config.endAngle !== void 0 ? this.config.endAngle * Math.PI / 180 : L + 2 * Math.PI, $ = o.reduce((q, st) => q + (st.y ?? 0), 0), I = this.config.fillColor;
13311
- if ($ === 0 && I) {
13316
+ const { plotArea: t, colors: e } = this.context, i = this.config.ignoreHiddenPoint !== !1, r = this.data.filter((q) => q.y !== null && q.y !== void 0 && (q.y ?? 0) > 0), o = i ? r.filter((q) => q.visible !== !1) : r, s = this.context.animate, a = this.dataLabelConfigs().filter((q) => (q.distance ?? 30) >= 0), l = a.length > 0, c = l ? Math.max(...a.map((q) => (q.distance ?? 30) + 10)) : 0, h = this.config.center || ["50%", "50%"], f = this.resolvePercent(h[0], t.width), u = this.resolvePercent(h[1], t.height), d = t.width - c * 2, p = t.height - c, y = Math.min(d, p), g = Math.min(t.width, t.height), m = this.config.size !== void 0 && this.config.size !== null, x = m ? this.resolvePercent(this.config.size, g) : y, v = this.config.minSize ? this.resolvePercent(this.config.minSize, g) : 0, k = Math.max(l ? Math.min(x, y) : m ? x : g, v) / 2, M = this.resolvePercent(this.config.innerSize || 0, k * 2) / 2, C = this.config.depth ?? 0, L = (this.config.startAngle ?? 0) * Math.PI / 180, _ = this.config.endAngle !== void 0 ? this.config.endAngle * Math.PI / 180 : L + 2 * Math.PI, T = o.reduce((q, st) => q + (st.y ?? 0), 0), I = this.config.fillColor;
13317
+ if (T === 0 && I) {
13312
13318
  const q = this.group.append("g").attr("transform", `translate(${f},${u})`), st = Ae().innerRadius(M).outerRadius(k).startAngle(L).endAngle(_);
13313
13319
  q.append("path").attr("d", st({})).attr("fill", I);
13314
13320
  return;
13315
13321
  }
13316
- const E = x2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S = Ae().innerRadius(M).outerRadius(k).cornerRadius(P), w = this.config.slicedOffset ?? 10, A = Ae().innerRadius(M).outerRadius(k + w * 0.4).cornerRadius(P), T = E(o), R = _ - L;
13317
- for (const q of T)
13318
- q.data.percentage = (q.endAngle - q.startAngle) / R * 100, q.data.total = $;
13322
+ const E = x2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S = Ae().innerRadius(M).outerRadius(k).cornerRadius(P), w = this.config.slicedOffset ?? 10, A = Ae().innerRadius(M).outerRadius(k + w * 0.4).cornerRadius(P), $ = E(o), R = _ - L;
13323
+ for (const q of $)
13324
+ q.data.percentage = (q.endAngle - q.startAngle) / R * 100, q.data.total = T;
13319
13325
  const F = this.group.append("g").attr("transform", `translate(${f},${u})`);
13320
- C > 0 && this.render3DEffect(F, T, M, k, C);
13326
+ C > 0 && this.render3DEffect(F, $, M, k, C);
13321
13327
  const D = this.config.allowPointSelect === !0;
13322
13328
  (N = (G = this.config.states) == null ? void 0 : G.hover) == null || N.brightness;
13323
13329
  const z = (O = (Y = this.config.states) == null ? void 0 : Y.select) == null ? void 0 : O.color, B = (it = (ct = this.config.states) == null ? void 0 : ct.select) == null ? void 0 : it.borderColor, H = (dt = (ft = this.config.states) == null ? void 0 : ft.select) == null ? void 0 : dt.borderWidth, J = ((ot = (at = this.config.states) == null ? void 0 : at.inactive) == null ? void 0 : ot.opacity) ?? 0.4, X = (q, st) => q.data.color ? q.data.color : this.config.colors ? this.config.colors[st % this.config.colors.length] : e[st % e.length], j = (q) => {
13324
13330
  const st = (q.startAngle + q.endAngle) / 2, wt = w * Math.sin(st), Ct = -w * Math.cos(st);
13325
13331
  return `translate(${wt},${Ct})`;
13326
- }, W = this, U = F.selectAll(".katucharts-pie-slice").data(T).join("path").attr("class", "katucharts-pie-slice").attr("fill", (q, st) => X(q, st)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
13332
+ }, W = this, U = F.selectAll(".katucharts-pie-slice").data($).join("path").attr("class", "katucharts-pie-slice").attr("fill", (q, st) => X(q, st)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
13327
13333
  U.each(function(q, st) {
13328
13334
  const wt = rt(this);
13329
13335
  (q.data.sliced || W.selectedIndices.has(st)) && wt.attr("transform", j(q));
@@ -13332,7 +13338,7 @@ class au extends Xt {
13332
13338
  wt.transition().duration(bt).ease(pt).delay(Ld + st * Wt).attrTween("d", () => (_t) => S(kt(_t)));
13333
13339
  }) : U.attr("d", S), this.config.enableMouseTracking !== !1 && U.on("mouseover", function(q, st) {
13334
13340
  var Vt, Nt, Ot, jt, ee;
13335
- const wt = rt(this), Ct = T.indexOf(st);
13341
+ const wt = rt(this), Ct = $.indexOf(st);
13336
13342
  W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", A(st)), wt.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), U.interrupt("highlight"), U.attr("opacity", W.config.opacity ?? 1), U.filter((Tt) => Tt !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
13337
13343
  const _t = S.centroid(st);
13338
13344
  W.context.events.emit("point:mouseover", {
@@ -13345,19 +13351,19 @@ class au extends Xt {
13345
13351
  }), (Nt = (Vt = st.data.events) == null ? void 0 : Vt.mouseOver) == null || Nt.call(st.data, q), (ee = (jt = (Ot = W.config.point) == null ? void 0 : Ot.events) == null ? void 0 : jt.mouseOver) == null || ee.call(st.data, q);
13346
13352
  }).on("mouseout", function(q, st) {
13347
13353
  var _t, Vt, Nt, Ot, jt;
13348
- const wt = rt(this), Ct = T.indexOf(st);
13354
+ const wt = rt(this), Ct = $.indexOf(st);
13349
13355
  W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (jt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || jt.call(st.data, q);
13350
13356
  }).on("click", function(q, st) {
13351
13357
  var Ct, kt, _t, Vt, Nt, Ot, jt, ee, Tt, Zt, ce, Ve, le, mn;
13352
- const wt = T.indexOf(st);
13358
+ const wt = $.indexOf(st);
13353
13359
  D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (jt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || jt.call(st.data, q), (Zt = (Tt = (ee = W.config.point) == null ? void 0 : ee.events) == null ? void 0 : Tt.select) == null || Zt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(De, ze) {
13354
13360
  const Ze = rt(this);
13355
13361
  W.selectedIndices.has(ze) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(De, ze)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
13356
13362
  })), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (ce = st.data.events) == null ? void 0 : ce.click) == null || Ve.call(st.data, q), (mn = (le = W.config.events) == null ? void 0 : le.click) == null || mn.call(W, q);
13357
13363
  });
13358
13364
  for (const q of this.dataLabelConfigs())
13359
- this.renderPieLabels(F, T, S, k, _ - L, q);
13360
- s && this.emitAfterAnimate(bt + T.length * Wt);
13365
+ this.renderPieLabels(F, $, S, k, _ - L, q);
13366
+ s && this.emitAfterAnimate(bt + $.length * Wt);
13361
13367
  }
13362
13368
  renderPieLabels(t, e, i, r, o, s) {
13363
13369
  var L, _;
@@ -13365,27 +13371,27 @@ class au extends Xt {
13365
13371
  const a = this.context.plotArea.width, l = this.context.plotArea.height, c = a / 2, h = l / 2, f = s.distance ?? 30, u = s.connectorWidth ?? 1, d = s.connectorColor || "#999", p = s.connectorPadding ?? 5;
13366
13372
  s.softConnector;
13367
13373
  const y = ((L = s.style) == null ? void 0 : L.fontSize) || Mt, g = s.color || ((_ = s.style) == null ? void 0 : _.color) || Pe, m = s.alignTo, x = f < 0, v = Me(y), b = v * 1.4, k = [], { colors: M } = this.context;
13368
- if (e.forEach(($, I) => {
13369
- const E = $.data.percentage, P = i.centroid($), S = ($.startAngle + $.endAngle) / 2, w = $.data.color || (this.config.colors ? this.config.colors[I % this.config.colors.length] : M[I % M.length]), A = r + f;
13370
- let T = A * Math.sin(S), R = -A * Math.cos(S);
13371
- (m === "plotEdges" || m === "connectors") && (T = S < Math.PI ? c - 5 : -(c - 5));
13374
+ if (e.forEach((T, I) => {
13375
+ const E = T.data.percentage, P = i.centroid(T), S = (T.startAngle + T.endAngle) / 2, w = T.data.color || (this.config.colors ? this.config.colors[I % this.config.colors.length] : M[I % M.length]), A = r + f;
13376
+ let $ = A * Math.sin(S), R = -A * Math.cos(S);
13377
+ (m === "plotEdges" || m === "connectors") && ($ = S < Math.PI ? c - 5 : -(c - 5));
13372
13378
  let F, D;
13373
- const z = { ...$.data, color: w };
13379
+ const z = { ...T.data, color: w };
13374
13380
  s.formatter ? F = s.formatter.call({
13375
13381
  point: z,
13376
13382
  series: { name: this.config.name },
13377
- x: $.data.x,
13378
- y: $.data.y,
13383
+ x: T.data.x,
13384
+ y: T.data.y,
13379
13385
  percentage: E
13380
13386
  }) : s.format ? F = Kt(s.format, {
13381
13387
  point: z,
13382
13388
  series: { name: this.config.name }
13383
- }) : F = $.data.name || String($.data.y);
13389
+ }) : F = T.data.name || String(T.data.y);
13384
13390
  const B = /(?:^|[\s;"'])color\s*:\s*([^;"'>]+)/i.exec(F);
13385
- B && (D = pd(B[1], w)), F = fe(F), k.push({ lx: T, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: $.data, visible: !0, color: w, inlineColor: D });
13391
+ B && (D = pd(B[1], w)), F = fe(F), k.push({ lx: $, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: T.data, visible: !0, color: w, inlineColor: D });
13386
13392
  }), !x && !s.allowOverlap) {
13387
- const $ = k.filter((P) => P.midAngle < Math.PI), I = k.filter((P) => P.midAngle >= Math.PI);
13388
- this.distribute($, b, h, c, y), this.distribute(I, b, h, c, y);
13393
+ const T = k.filter((P) => P.midAngle < Math.PI), I = k.filter((P) => P.midAngle >= Math.PI);
13394
+ this.distribute(T, b, h, c, y), this.distribute(I, b, h, c, y);
13389
13395
  const E = r + f;
13390
13396
  for (const P of k) {
13391
13397
  if (!P.visible) continue;
@@ -13393,20 +13399,20 @@ class au extends Xt {
13393
13399
  P.lx = A ? Math.max(w, r * 0.3) : -Math.max(w, r * 0.3);
13394
13400
  }
13395
13401
  } else if (x && !s.allowOverlap) {
13396
- const $ = [], I = k.filter((E) => E.visible).sort((E, P) => P.percentage - E.percentage);
13402
+ const T = [], I = k.filter((E) => E.visible).sort((E, P) => P.percentage - E.percentage);
13397
13403
  for (const E of I) {
13398
- const P = tn(E.text, v), S = v * 1.1, w = E.centroid[0], A = E.centroid[1], T = { l: w - P / 2, r: w + P / 2, t: A - S / 2, b: A + S / 2 };
13399
- if ($.some((F) => T.l < F.r && T.r > F.l && T.t < F.b && T.b > F.t)) {
13404
+ const P = tn(E.text, v), S = v * 1.1, w = E.centroid[0], A = E.centroid[1], $ = { l: w - P / 2, r: w + P / 2, t: A - S / 2, b: A + S / 2 };
13405
+ if (T.some((F) => $.l < F.r && $.r > F.l && $.t < F.b && $.b > F.t)) {
13400
13406
  E.visible = !1;
13401
13407
  continue;
13402
13408
  }
13403
- $.push(T);
13409
+ T.push($);
13404
13410
  }
13405
13411
  }
13406
13412
  const C = t.append("g").attr("class", "katucharts-pie-labels");
13407
- k.forEach(($) => {
13408
- if (!$.visible) return;
13409
- const { lx: I, ly: E, text: P, midAngle: S, centroid: w, color: A, inlineColor: T } = $, R = S < Math.PI, F = A || d;
13413
+ k.forEach((T) => {
13414
+ if (!T.visible) return;
13415
+ const { lx: I, ly: E, text: P, midAngle: S, centroid: w, color: A, inlineColor: $ } = T, R = S < Math.PI, F = A || d;
13410
13416
  if (u > 0 && f >= 0) {
13411
13417
  const B = r + p, H = B * Math.sin(S), J = -B * Math.cos(S), X = s.connectorShape || "fixedOffset";
13412
13418
  if (X === "straight")
@@ -13426,7 +13432,7 @@ class au extends Xt {
13426
13432
  C.append("path").attr("class", "katucharts-pie-connector").attr("d", `M${H},${J}L${W},${U}L${I},${E}`).attr("fill", "none").attr("stroke", F).attr("stroke-width", u);
13427
13433
  }
13428
13434
  }
13429
- const D = C.append("text").attr("x", (x ? w[0] : I) + (s.x ?? 0)).attr("y", (x ? w[1] : E) + (s.y ?? 0)).attr("text-anchor", x ? "middle" : R ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", y).attr("fill", T || g).style("pointer-events", "none").text(P), z = s.style || {};
13435
+ const D = C.append("text").attr("x", (x ? w[0] : I) + (s.x ?? 0)).attr("y", (x ? w[1] : E) + (s.y ?? 0)).attr("text-anchor", x ? "middle" : R ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", y).attr("fill", $ || g).style("pointer-events", "none").text(P), z = s.style || {};
13430
13436
  z.fontWeight && D.attr("font-weight", z.fontWeight), z.fontFamily && D.attr("font-family", z.fontFamily), z.textOutline && D.style("text-shadow", z.textOutline);
13431
13437
  });
13432
13438
  }
@@ -13518,7 +13524,7 @@ class Bd extends Xt {
13518
13524
  var p, y;
13519
13525
  const { plotArea: t, colors: e } = this.context, i = this.data.filter((g) => g.y !== null && g.y !== void 0), r = this.context.animate, o = t.height * 0.8, s = o / i.length, a = Math.max(...i.map((g) => g.y ?? 0), 1), l = t.width / 2, c = t.width * 0.7, h = c * 0.15, f = (t.height - o) / 2, u = ((y = (p = this.config.states) == null ? void 0 : p.inactive) == null ? void 0 : y.opacity) ?? 0.4, d = [];
13520
13526
  i.forEach((g, m) => {
13521
- var $, I, E;
13527
+ var T, I, E;
13522
13528
  const x = (g.y ?? 0) / a, v = m < i.length - 1 ? (i[m + 1].y ?? 0) / a : x * 0.5, b = h + (c - h) * x, k = h + (c - h) * v, M = f + m * s, C = [
13523
13529
  `M ${l - b / 2} ${M}`,
13524
13530
  `L ${l + b / 2} ${M}`,
@@ -13526,7 +13532,7 @@ class Bd extends Xt {
13526
13532
  `L ${l - k / 2} ${M + s}`,
13527
13533
  "Z"
13528
13534
  ].join(" "), L = g.color || e[m % e.length], _ = this.group.append("path").attr("d", C).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("class", "katucharts-funnel-segment").style("cursor", this.config.cursor || "pointer");
13529
- if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), ($ = this.config.dataLabels) != null && $.enabled) {
13535
+ if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (T = this.config.dataLabels) != null && T.enabled) {
13530
13536
  const P = this.config.dataLabels, S = ((I = P.style) == null ? void 0 : I.fontSize) || Mt, w = P.color || ((E = P.style) == null ? void 0 : E.color) || Pe;
13531
13537
  let A;
13532
13538
  P.formatter ? A = P.formatter.call({
@@ -13541,8 +13547,8 @@ class Bd extends Xt {
13541
13547
  }
13542
13548
  this.config.enableMouseTracking !== !1 && _.on("mouseover", (P) => {
13543
13549
  var S, w;
13544
- _.transition("move").duration(K).ease(Z).attr("transform", "translate(0, -3)").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.attr("opacity", 1)), d.forEach((A, T) => {
13545
- T !== m && A.transition("highlight").duration(K).ease(Z).attr("opacity", u);
13550
+ _.transition("move").duration(K).ease(Z).attr("transform", "translate(0, -3)").style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.attr("opacity", 1)), d.forEach((A, $) => {
13551
+ $ !== m && A.transition("highlight").duration(K).ease(Z).attr("opacity", u);
13546
13552
  }), this.context.events.emit("point:mouseover", {
13547
13553
  point: g,
13548
13554
  index: m,
@@ -13555,8 +13561,8 @@ class Bd extends Xt {
13555
13561
  var S, w;
13556
13562
  _.transition("move").duration(K).ease(Z).attr("transform", "").style("filter", ""), d.forEach((A) => A.interrupt("highlight")), d.forEach((A) => A.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.mouseOut) == null || w.call(g, P);
13557
13563
  }).on("click", (P) => {
13558
- var S, w, A, T;
13559
- this.context.events.emit("point:click", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.click) == null || w.call(g, P), (T = (A = this.config.events) == null ? void 0 : A.click) == null || T.call(this, P);
13564
+ var S, w, A, $;
13565
+ this.context.events.emit("point:click", { point: g, index: m, series: this, event: P }), (w = (S = g.events) == null ? void 0 : S.click) == null || w.call(g, P), ($ = (A = this.config.events) == null ? void 0 : A.click) == null || $.call(this, P);
13560
13566
  });
13561
13567
  });
13562
13568
  }
@@ -13686,37 +13692,37 @@ class yw extends Xt {
13686
13692
  var S, w;
13687
13693
  const { plotArea: t } = this.context, e = this.context.animate, i = this.data, r = this.config.colorAxis || {}, o = i.map((A) => A.value ?? A.z ?? A.y ?? 0).filter((A) => A != null), s = r.min ?? (o.length > 0 ? Math.min(...o) : 0), a = r.max ?? (o.length > 0 ? Math.max(...o) : 1), l = this.config.nullColor ?? "#e4e4e4", c = ((w = (S = this.config.states) == null ? void 0 : S.inactive) == null ? void 0 : w.opacity) ?? 0.4, h = this.buildColorScale(r, s, a), f = this.config.interpolation === !0, u = this.config.colsize ?? 1, d = this.config.rowsize ?? 1, p = this.config.pointPadding ?? 0, y = this.getUniqueValues("x"), g = this.getUniqueValues("yCategory"), m = y.length > 0 && g.length > 0, x = m ? t.width / y.length : t.width / Math.max(1, Math.ceil((Math.max(...i.map((A) => A.x ?? 0)) + u) / u)), v = m ? t.height / g.length : t.height / Math.max(1, Math.ceil((Math.max(...i.map((A) => A.y ?? 0)) + d) / d)), b = (A) => {
13688
13694
  if (A.color) return A.color;
13689
- const T = A.value ?? A.z ?? A.y;
13690
- return T == null ? l : h(T);
13691
- }, k = (A) => m ? (typeof A.x == "number" ? A.x : 0) * x : (A.x ?? 0) / u * x, M = (A) => m ? (typeof A.yCategory == "number" ? A.yCategory : typeof A.y == "number" ? A.y : 0) * v : (A.y ?? 0) / d * v, C = p * x, L = p * v, _ = x * u - (this.config.borderWidth ?? 1), $ = v * d - (this.config.borderWidth ?? 1), I = Math.max(1, (m ? x - 1 : _) - C * 2), E = Math.max(1, (m ? v - 1 : $) - L * 2);
13695
+ const $ = A.value ?? A.z ?? A.y;
13696
+ return $ == null ? l : h($);
13697
+ }, k = (A) => m ? (typeof A.x == "number" ? A.x : 0) * x : (A.x ?? 0) / u * x, M = (A) => m ? (typeof A.yCategory == "number" ? A.yCategory : typeof A.y == "number" ? A.y : 0) * v : (A.y ?? 0) / d * v, C = p * x, L = p * v, _ = x * u - (this.config.borderWidth ?? 1), T = v * d - (this.config.borderWidth ?? 1), I = Math.max(1, (m ? x - 1 : _) - C * 2), E = Math.max(1, (m ? v - 1 : T) - L * 2);
13692
13698
  if (f) {
13693
13699
  this.renderInterpolated(i, t, h, l, k, M, x, v, b), this.renderHeatmapLabels(i, k, M, x, v, b), this.renderColorAxis(h, s, a);
13694
13700
  return;
13695
13701
  }
13696
13702
  const P = this.group.selectAll(".katucharts-heatmap-cell").data(i).join("rect").attr("class", "katucharts-heatmap-cell").attr("x", (A) => k(A) + C).attr("y", (A) => M(A) + L).attr("width", I).attr("height", E).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("rx", mw(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
13697
- e ? P.attr("fill", "#fff").transition().duration(600).delay((A, T) => T * 8).attr("fill", (A) => b(A)) : P.attr("fill", (A) => b(A)), this.config.enableMouseTracking !== !1 && P.on("mouseover", (A, T) => {
13703
+ e ? P.attr("fill", "#fff").transition().duration(600).delay((A, $) => $ * 8).attr("fill", (A) => b(A)) : P.attr("fill", (A) => b(A)), this.config.enableMouseTracking !== !1 && P.on("mouseover", (A, $) => {
13698
13704
  var H, J, X, j;
13699
- const R = rt(A.currentTarget), F = b(T), D = ((J = (H = se(F)) == null ? void 0 : H.brighter(0.4)) == null ? void 0 : J.toString()) || F;
13700
- R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", D).attr("stroke", "#333").attr("stroke-width", 2), R.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.3))"), P.interrupt("highlight"), P.attr("opacity", 1), P.filter((W) => W !== T).transition("highlight").duration(K).ease(Z).attr("opacity", c);
13701
- const z = i.indexOf(T), B = T.value ?? T.z ?? T.y;
13705
+ const R = rt(A.currentTarget), F = b($), D = ((J = (H = se(F)) == null ? void 0 : H.brighter(0.4)) == null ? void 0 : J.toString()) || F;
13706
+ R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", D).attr("stroke", "#333").attr("stroke-width", 2), R.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.3))"), P.interrupt("highlight"), P.attr("opacity", 1), P.filter((W) => W !== $).transition("highlight").duration(K).ease(Z).attr("opacity", c);
13707
+ const z = i.indexOf($), B = $.value ?? $.z ?? $.y;
13702
13708
  this.context.events.emit("point:mouseover", {
13703
- point: { ...T, value: B },
13709
+ point: { ...$, value: B },
13704
13710
  index: z,
13705
13711
  series: this,
13706
13712
  event: A,
13707
- plotX: k(T) + x / 2,
13708
- plotY: M(T) + v / 2
13709
- }), (j = (X = T.events) == null ? void 0 : X.mouseOver) == null || j.call(T, A);
13710
- }).on("mouseout", (A, T) => {
13713
+ plotX: k($) + x / 2,
13714
+ plotY: M($) + v / 2
13715
+ }), (j = (X = $.events) == null ? void 0 : X.mouseOver) == null || j.call($, A);
13716
+ }).on("mouseout", (A, $) => {
13711
13717
  var D, z;
13712
13718
  const R = rt(A.currentTarget);
13713
- R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", b(T)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1), R.style("filter", ""), P.interrupt("highlight"), P.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
13714
- const F = i.indexOf(T);
13715
- this.context.events.emit("point:mouseout", { point: T, index: F, series: this, event: A }), (z = (D = T.events) == null ? void 0 : D.mouseOut) == null || z.call(T, A);
13716
- }).on("click", (A, T) => {
13719
+ R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", b($)).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1), R.style("filter", ""), P.interrupt("highlight"), P.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
13720
+ const F = i.indexOf($);
13721
+ this.context.events.emit("point:mouseout", { point: $, index: F, series: this, event: A }), (z = (D = $.events) == null ? void 0 : D.mouseOut) == null || z.call($, A);
13722
+ }).on("click", (A, $) => {
13717
13723
  var F, D, z, B;
13718
- const R = i.indexOf(T);
13719
- this.context.events.emit("point:click", { point: T, index: R, series: this, event: A }), (D = (F = T.events) == null ? void 0 : F.click) == null || D.call(T, A), (B = (z = this.config.events) == null ? void 0 : z.click) == null || B.call(this, A);
13724
+ const R = i.indexOf($);
13725
+ this.context.events.emit("point:click", { point: $, index: R, series: this, event: A }), (D = (F = $.events) == null ? void 0 : F.click) == null || D.call($, A), (B = (z = this.config.events) == null ? void 0 : z.click) == null || B.call(this, A);
13720
13726
  }), this.renderHeatmapLabels(i, k, M, x, v, b), this.renderColorAxis(h, s, a);
13721
13727
  }
13722
13728
  renderInterpolated(t, e, i, r, o, s, a, l, c) {
@@ -13727,8 +13733,8 @@ class yw extends Xt {
13727
13733
  if (p === 0 || y === 0) return;
13728
13734
  const g = /* @__PURE__ */ new Map();
13729
13735
  for (const L of t) {
13730
- const _ = L.value ?? L.z ?? L.y, $ = u.indexOf(L.x ?? 0), I = d.indexOf(L.yCategory ?? L.y ?? 0);
13731
- _ != null && g.set(`${$},${I}`, _);
13736
+ const _ = L.value ?? L.z ?? L.y, T = u.indexOf(L.x ?? 0), I = d.indexOf(L.yCategory ?? L.y ?? 0);
13737
+ _ != null && g.set(`${T},${I}`, _);
13732
13738
  }
13733
13739
  const m = Math.round(e.width), x = Math.round(e.height), v = document.createElement("canvas");
13734
13740
  v.width = m, v.height = x;
@@ -13737,13 +13743,13 @@ class yw extends Xt {
13737
13743
  const k = b.createImageData(m, x), M = k.data;
13738
13744
  for (let L = 0; L < x; L++)
13739
13745
  for (let _ = 0; _ < m; _++) {
13740
- const $ = _ / m * p - 0.5, I = L / x * y - 0.5, E = Math.floor($), P = Math.floor(I), S = $ - E, w = I - P, A = (W, U) => g.get(`${Math.max(0, Math.min(p - 1, W))},${Math.max(0, Math.min(y - 1, U))}`) ?? null, T = A(E, P), R = A(E + 1, P), F = A(E, P + 1), D = A(E + 1, P + 1), z = [T, R, F, D].filter((W) => W !== null);
13746
+ const T = _ / m * p - 0.5, I = L / x * y - 0.5, E = Math.floor(T), P = Math.floor(I), S = T - E, w = I - P, A = (W, U) => g.get(`${Math.max(0, Math.min(p - 1, W))},${Math.max(0, Math.min(y - 1, U))}`) ?? null, $ = A(E, P), R = A(E + 1, P), F = A(E, P + 1), D = A(E + 1, P + 1), z = [$, R, F, D].filter((W) => W !== null);
13741
13747
  if (z.length === 0) {
13742
13748
  const W = Xe(r), U = (L * m + _) * 4;
13743
13749
  M[U] = W.r, M[U + 1] = W.g, M[U + 2] = W.b, M[U + 3] = 255;
13744
13750
  continue;
13745
13751
  }
13746
- const B = (W) => W ?? z[0], H = B(T) * (1 - S) * (1 - w) + B(R) * S * (1 - w) + B(F) * (1 - S) * w + B(D) * S * w, J = i(H), X = Xe(J), j = (L * m + _) * 4;
13752
+ const B = (W) => W ?? z[0], H = B($) * (1 - S) * (1 - w) + B(R) * S * (1 - w) + B(F) * (1 - S) * w + B(D) * S * w, J = i(H), X = Xe(J), j = (L * m + _) * 4;
13747
13753
  M[j] = X.r, M[j + 1] = X.g, M[j + 2] = X.b, M[j + 3] = 255;
13748
13754
  }
13749
13755
  b.putImageData(k, 0, 0);
@@ -13794,17 +13800,17 @@ class yw extends Xt {
13794
13800
  (x.length === 0 || x[0] > e) && x.unshift(e), x[x.length - 1] < i && x.push(i);
13795
13801
  const v = g >= 1 ? 0 : g >= 0.1 ? 1 : 2;
13796
13802
  if (r.dataClasses && r.dataClasses.length > 0) {
13797
- const M = r.dataClasses, C = Math.min(o.width * 0.6, 300), L = 12, _ = (o.width - C) / 2, $ = o.height + 60, I = C / M.length;
13803
+ const M = r.dataClasses, C = Math.min(o.width * 0.6, 300), L = 12, _ = (o.width - C) / 2, T = o.height + 60, I = C / M.length;
13798
13804
  for (let E = 0; E < M.length; E++) {
13799
13805
  const P = M[E];
13800
- c.append("rect").attr("x", _ + E * I).attr("y", $).attr("width", I).attr("height", L).attr("fill", P.color || "#ccc").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", E === 0 ? 2 : 0).attr("ry", E === 0 ? 2 : 0), P.name && c.append("text").attr("x", _ + E * I + I / 2).attr("y", $ + L + 30).attr("font-size", f).attr("fill", u).attr("text-anchor", "middle").text(P.name);
13806
+ c.append("rect").attr("x", _ + E * I).attr("y", T).attr("width", I).attr("height", L).attr("fill", P.color || "#ccc").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", E === 0 ? 2 : 0).attr("ry", E === 0 ? 2 : 0), P.name && c.append("text").attr("x", _ + E * I + I / 2).attr("y", T + L + 30).attr("font-size", f).attr("fill", u).attr("text-anchor", "middle").text(P.name);
13801
13807
  }
13802
13808
  return;
13803
13809
  }
13804
13810
  if (a) {
13805
- const C = Math.min(o.height * 0.7, 200), L = o.width + 20, _ = (o.height - C) / 2, $ = c.append("defs"), I = x.length - 1, E = C / I;
13811
+ const C = Math.min(o.height * 0.7, 200), L = o.width + 20, _ = (o.height - C) / 2, T = c.append("defs"), I = x.length - 1, E = C / I;
13806
13812
  for (let P = 0; P < I; P++) {
13807
- const S = I - 1 - P, w = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, A = $.append("linearGradient").attr("id", w).attr("x1", "0%").attr("y1", "0%").attr("x2", "0%").attr("y2", "100%");
13813
+ const S = I - 1 - P, w = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, A = T.append("linearGradient").attr("id", w).attr("x1", "0%").attr("y1", "0%").attr("x2", "0%").attr("y2", "100%");
13808
13814
  A.append("stop").attr("offset", "0%").attr("stop-color", t(x[S + 1])), A.append("stop").attr("offset", "100%").attr("stop-color", t(x[S])), c.append("rect").attr("x", L).attr("y", _ + P * E).attr("width", 12).attr("height", E + 0.5).attr("fill", `url(#${w})`).attr("stroke", "none");
13809
13815
  }
13810
13816
  c.append("rect").attr("x", L).attr("y", _).attr("width", 12).attr("height", C).attr("fill", "none").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", 2);
@@ -13813,9 +13819,9 @@ class yw extends Xt {
13813
13819
  c.append("line").attr("x1", L + 12).attr("y1", S).attr("x2", L + 12 + 4).attr("y2", S).attr("stroke", "#999").attr("stroke-width", 0.5), c.append("text").attr("x", L + 12 + 7).attr("y", S + 4).attr("font-size", f).attr("fill", u).attr("text-anchor", "start").text(x[P].toFixed(v));
13814
13820
  }
13815
13821
  } else {
13816
- const C = Math.min(o.width * 0.6, 300), L = (o.width - C) / 2, _ = o.height + 60, $ = c.append("defs"), I = x.length - 1, E = C / I;
13822
+ const C = Math.min(o.width * 0.6, 300), L = (o.width - C) / 2, _ = o.height + 60, T = c.append("defs"), I = x.length - 1, E = C / I;
13817
13823
  for (let P = 0; P < I; P++) {
13818
- const S = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, w = $.append("linearGradient").attr("id", S).attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
13824
+ const S = `katucharts-heatmap-seg-${Math.random().toString(36).slice(2, 8)}`, w = T.append("linearGradient").attr("id", S).attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
13819
13825
  w.append("stop").attr("offset", "0%").attr("stop-color", t(x[P])), w.append("stop").attr("offset", "100%").attr("stop-color", t(x[P + 1])), c.append("rect").attr("x", L + P * E).attr("y", _).attr("width", E + 0.5).attr("height", 12).attr("fill", `url(#${S})`).attr("stroke", "none");
13820
13826
  }
13821
13827
  c.append("rect").attr("x", L).attr("y", _).attr("width", C).attr("height", 12).attr("fill", "none").attr("stroke", "#ccc").attr("stroke-width", 0.5).attr("rx", 2);
@@ -13870,13 +13876,13 @@ class bw extends Xt {
13870
13876
  render() {
13871
13877
  const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.getColor(), o = this.data, s = this.context.animate, { boxWidth: a, boxOffset: l } = this.computeBoxGeometry(), c = this.config.medianColor || null, h = this.config.medianWidth ?? 2, f = sn(this.config.medianDashStyle), u = this.config.stemWidth ?? 1, d = sn(this.config.stemDashStyle), p = this.config.whiskerWidth ?? 2, y = sn(this.config.whiskerDashStyle), g = this.parseWhiskerLength(this.config.whiskerLength, a), m = sn(this.config.boxDashStyle), x = this.config.lineWidth ?? 1, b = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
13872
13878
  for (let k = 0; k < o.length; k++) {
13873
- const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0, $ = M.median ?? M.y ?? 0, I = M.q3 ?? M.high ?? 0, E = M.high ?? 0, P = e.getPixelForValue((L + E) / 2), S = M.color || this.getPointColor(k, r), w = this.config.fillColor ?? "transparent", A = this.config.stemColor || S, T = this.config.whiskerColor || S, R = this.group.append("g").attr("class", "katucharts-boxplot-point").style("cursor", this.config.cursor || "pointer"), F = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), D = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), z = R.append("rect").attr("x", C - a / 2).attr("width", a).attr("fill", w).attr("stroke", S).attr("stroke-width", x).attr("stroke-dasharray", m).attr("rx", xw(this.config.borderRadius)), B = R.append("line").attr("x1", C - a / 2).attr("x2", C + a / 2).attr("stroke", c || this.config.lineColor || S).attr("stroke-width", h).attr("stroke-dasharray", f), H = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", T).attr("stroke-width", p).attr("stroke-dasharray", y), J = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", T).attr("stroke-width", p).attr("stroke-dasharray", y);
13879
+ const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0, T = M.median ?? M.y ?? 0, I = M.q3 ?? M.high ?? 0, E = M.high ?? 0, P = e.getPixelForValue((L + E) / 2), S = M.color || this.getPointColor(k, r), w = this.config.fillColor ?? "transparent", A = this.config.stemColor || S, $ = this.config.whiskerColor || S, R = this.group.append("g").attr("class", "katucharts-boxplot-point").style("cursor", this.config.cursor || "pointer"), F = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), D = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), z = R.append("rect").attr("x", C - a / 2).attr("width", a).attr("fill", w).attr("stroke", S).attr("stroke-width", x).attr("stroke-dasharray", m).attr("rx", xw(this.config.borderRadius)), B = R.append("line").attr("x1", C - a / 2).attr("x2", C + a / 2).attr("stroke", c || this.config.lineColor || S).attr("stroke-width", h).attr("stroke-dasharray", f), H = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y), J = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y);
13874
13880
  if (s) {
13875
13881
  const X = Ce(k, 0, Wt, o.length), j = b;
13876
- F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue($)).attr("y2", e.getPixelForValue($)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13882
+ F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13877
13883
  } else
13878
- F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue($)).attr("y2", e.getPixelForValue($)), H.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13879
- this.attachBoxPointEvents(R, M, k, C, e.getPixelForValue($), x);
13884
+ F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
13885
+ this.attachBoxPointEvents(R, M, k, C, e.getPixelForValue(T), x);
13880
13886
  }
13881
13887
  this.renderDataLabels(
13882
13888
  o,
@@ -13885,26 +13891,26 @@ class bw extends Xt {
13885
13891
  ), s && this.emitAfterAnimate(b + o.length * Wt);
13886
13892
  }
13887
13893
  animateUpdate(t) {
13888
- const { xAxis: e, yAxis: i } = this.context, r = this.data, { boxWidth: o, boxOffset: s } = this.computeBoxGeometry(), l = this.group.selectAll(".katucharts-boxplot-point").nodes();
13889
- if (l.length !== r.length) {
13894
+ const { xAxis: e, yAxis: i } = this.context, r = this.getColor(), o = this.data, { boxWidth: s, boxOffset: a } = this.computeBoxGeometry(), c = this.group.selectAll(".katucharts-boxplot-point").nodes();
13895
+ if (c.length !== o.length) {
13890
13896
  this.group.selectAll("*").remove(), this.render();
13891
13897
  return;
13892
13898
  }
13893
- for (let c = 0; c < Math.min(l.length, r.length); c++) {
13894
- const h = r[c], f = l[c], u = e.getPixelForValue(h.x ?? c) + s + o / 2, d = h.low ?? 0, p = h.q1 ?? h.low ?? 0, y = h.median ?? h.y ?? 0, g = h.q3 ?? h.high ?? 0, m = h.high ?? 0, x = f.querySelectorAll("line"), v = f.querySelector("rect");
13895
- if (x[0] && this.group.select(() => x[0]).transition().duration(t).attr("x1", u).attr("x2", u).attr("y1", i.getPixelForValue(d)).attr("y2", i.getPixelForValue(p)), x[1] && this.group.select(() => x[1]).transition().duration(t).attr("x1", u).attr("x2", u).attr("y1", i.getPixelForValue(g)).attr("y2", i.getPixelForValue(m)), v && this.group.select(() => v).transition().duration(t).attr("x", u - o / 2).attr("y", i.getPixelForValue(g)).attr("height", Math.abs(i.getPixelForValue(p) - i.getPixelForValue(g))), x[2] && this.group.select(() => x[2]).transition().duration(t).attr("x1", u - o / 2).attr("x2", u + o / 2).attr("y1", i.getPixelForValue(y)).attr("y2", i.getPixelForValue(y)), x[3]) {
13896
- const b = this.parseWhiskerLength(this.config.whiskerLength, o);
13897
- this.group.select(() => x[3]).transition().duration(t).attr("x1", u - b / 2).attr("x2", u + b / 2).attr("y1", i.getPixelForValue(d)).attr("y2", i.getPixelForValue(d));
13899
+ for (let h = 0; h < Math.min(c.length, o.length); h++) {
13900
+ const f = o[h], u = c[h], d = e.getPixelForValue(f.x ?? h) + a + s / 2, p = f.low ?? 0, y = f.q1 ?? f.low ?? 0, g = f.median ?? f.y ?? 0, m = f.q3 ?? f.high ?? 0, x = f.high ?? 0, v = f.color || this.getPointColor(h, r), b = this.config.stemColor || v, k = this.config.whiskerColor || v, M = this.config.medianColor || this.config.lineColor || v, C = this.config.fillColor ?? "transparent", L = u.querySelectorAll("line"), _ = u.querySelector("rect");
13901
+ if (L[0] && this.group.select(() => L[0]).attr("stroke", b).transition().duration(t).attr("x1", d).attr("x2", d).attr("y1", i.getPixelForValue(p)).attr("y2", i.getPixelForValue(y)), L[1] && this.group.select(() => L[1]).attr("stroke", b).transition().duration(t).attr("x1", d).attr("x2", d).attr("y1", i.getPixelForValue(m)).attr("y2", i.getPixelForValue(x)), _ && this.group.select(() => _).attr("stroke", v).attr("fill", C).transition().duration(t).attr("x", d - s / 2).attr("y", i.getPixelForValue(m)).attr("height", Math.abs(i.getPixelForValue(y) - i.getPixelForValue(m))), L[2] && this.group.select(() => L[2]).attr("stroke", M).transition().duration(t).attr("x1", d - s / 2).attr("x2", d + s / 2).attr("y1", i.getPixelForValue(g)).attr("y2", i.getPixelForValue(g)), L[3]) {
13902
+ const T = this.parseWhiskerLength(this.config.whiskerLength, s);
13903
+ this.group.select(() => L[3]).attr("stroke", k).transition().duration(t).attr("x1", d - T / 2).attr("x2", d + T / 2).attr("y1", i.getPixelForValue(p)).attr("y2", i.getPixelForValue(p));
13898
13904
  }
13899
- if (x[4]) {
13900
- const b = this.parseWhiskerLength(this.config.whiskerLength, o);
13901
- this.group.select(() => x[4]).transition().duration(t).attr("x1", u - b / 2).attr("x2", u + b / 2).attr("y1", i.getPixelForValue(m)).attr("y2", i.getPixelForValue(m));
13905
+ if (L[4]) {
13906
+ const T = this.parseWhiskerLength(this.config.whiskerLength, s);
13907
+ this.group.select(() => L[4]).attr("stroke", k).transition().duration(t).attr("x1", d - T / 2).attr("x2", d + T / 2).attr("y1", i.getPixelForValue(x)).attr("y2", i.getPixelForValue(x));
13902
13908
  }
13903
13909
  }
13904
13910
  this.group.selectAll(".katucharts-data-labels").remove(), this.renderDataLabels(
13905
- r,
13906
- (c, h) => e.getPixelForValue(c.x ?? h) + s + o / 2,
13907
- (c) => i.getPixelForValue(c.high ?? c.y ?? 0)
13911
+ o,
13912
+ (h, f) => e.getPixelForValue(h.x ?? f) + a + s / 2,
13913
+ (h) => i.getPixelForValue(h.high ?? h.y ?? 0)
13908
13914
  );
13909
13915
  }
13910
13916
  computeBoxGeometry() {
@@ -14509,8 +14515,8 @@ function ck(n, t, e, i, r) {
14509
14515
  b - c[k - 1] < c[k] - b && f + 1 < k && --k;
14510
14516
  var L = c[k] - v, _ = d - L;
14511
14517
  if (g - p > m - y) {
14512
- var $ = d ? (p * _ + g * L) / d : g;
14513
- h(f, k, L, p, y, $, m), h(k, u, _, $, y, g, m);
14518
+ var T = d ? (p * _ + g * L) / d : g;
14519
+ h(f, k, L, p, y, T, m), h(k, u, _, T, y, g, m);
14514
14520
  } else {
14515
14521
  var I = d ? (y * _ + m * L) / d : m;
14516
14522
  h(f, k, L, p, y, g, I), h(k, u, _, p, I, g, m);
@@ -14551,8 +14557,8 @@ class uk extends Xt {
14551
14557
  super(t), this.currentRoot = null;
14552
14558
  }
14553
14559
  render() {
14554
- var $, I, E;
14555
- const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.config.levels || [], s = this.config.colorByPoint !== !1, a = this.config.allowTraversingTree === !0 || this.config.allowDrillToNode === !0, l = this.config.interactByLeaf ?? !a, c = this.config.alternateStartingDirection === !0, h = ((I = ($ = this.config.states) == null ? void 0 : $.inactive) == null ? void 0 : I.opacity) ?? 0.4, f = this.buildHierarchy(r), u = a && this.currentRoot ? this.currentRoot : f, d = {
14560
+ var T, I, E;
14561
+ const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.config.levels || [], s = this.config.colorByPoint !== !1, a = this.config.allowTraversingTree === !0 || this.config.allowDrillToNode === !0, l = this.config.interactByLeaf ?? !a, c = this.config.alternateStartingDirection === !0, h = ((I = (T = this.config.states) == null ? void 0 : T.inactive) == null ? void 0 : I.opacity) ?? 0.4, f = this.buildHierarchy(r), u = a && this.currentRoot ? this.currentRoot : f, d = {
14556
14562
  squarify: Po,
14557
14563
  squarified: Po,
14558
14564
  binary: ck,
@@ -14563,19 +14569,19 @@ class uk extends Xt {
14563
14569
  strip: Er,
14564
14570
  stripes: Er
14565
14571
  }, p = this.config.layoutAlgorithm || "squarified", y = d[p] || Po, g = this.config.layoutStartingDirection || "vertical", m = this.config.opacity ?? 1, x = c || p === "sliceAndDice" || p === "sliceDice" ? mr : y, v = (P, S) => {
14566
- var T, R;
14567
- const w = ((T = P.data) == null ? void 0 : T.sortIndex) ?? 0, A = ((R = S.data) == null ? void 0 : R.sortIndex) ?? 0;
14572
+ var $, R;
14573
+ const w = (($ = P.data) == null ? void 0 : $.sortIndex) ?? 0, A = ((R = S.data) == null ? void 0 : R.sortIndex) ?? 0;
14568
14574
  return w !== A ? w - A : (S.value || 0) - (P.value || 0);
14569
14575
  };
14570
14576
  u.sort(v), ak().size([t.width, t.height]).tile(x).padding(1)(u);
14571
14577
  const b = a && !l && u.children || u.leaves(), k = (P) => o.find((S) => S.level === P), C = (((E = this.config.colorAxis) == null ? void 0 : E.dataClasses) || []).map((P) => P.color), L = (P, S) => {
14572
- var A, T, R, F, D;
14578
+ var A, $, R, F, D;
14573
14579
  if (P.data.color) return P.data.color;
14574
14580
  const w = k(P.depth);
14575
14581
  if (w != null && w.color) {
14576
14582
  const z = w.colorVariation;
14577
14583
  if ((z == null ? void 0 : z.key) === "brightness" && ((A = P.parent) != null && A.children)) {
14578
- const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = di(((T = se(w.color)) == null ? void 0 : T.toString()) || w.color);
14584
+ const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = di((($ = se(w.color)) == null ? void 0 : $.toString()) || w.color);
14579
14585
  return j.l = Math.max(0.1, Math.min(0.95, j.l + X * 0.3)), j.toString();
14580
14586
  }
14581
14587
  return w.color;
@@ -14603,7 +14609,7 @@ class uk extends Xt {
14603
14609
  }).attr("rx", hk(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
14604
14610
  i ? _.attr("opacity", 0).transition().duration(bt).ease(pt).delay((P, S) => Ce(S, 0, Wt, b.length)).attr("opacity", m) : m !== 1 && _.attr("opacity", m), this.config.enableMouseTracking !== !1 && _.on("mouseover", (P, S) => {
14605
14611
  var D, z, B, H, J, X;
14606
- const w = rt(P.currentTarget), A = w.attr("fill"), T = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B = se(A)) == null ? void 0 : B.brighter(T)) == null ? void 0 : H.toString()) || A;
14612
+ const w = rt(P.currentTarget), A = w.attr("fill"), $ = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B = se(A)) == null ? void 0 : B.brighter($)) == null ? void 0 : H.toString()) || A;
14607
14613
  w.transition("fill").duration(K).ease(Z).attr("fill", R), w.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), _.interrupt("highlight"), _.attr("opacity", 1), _.filter((j) => j !== S).transition("highlight").duration(K).ease(Z).attr("opacity", h);
14608
14614
  const F = b.indexOf(S);
14609
14615
  this.context.events.emit("point:mouseover", {
@@ -14616,16 +14622,16 @@ class uk extends Xt {
14616
14622
  }), (X = (J = S.data.events) == null ? void 0 : J.mouseOver) == null || X.call(S.data, P);
14617
14623
  }).on("mouseout", (P, S) => {
14618
14624
  var R, F;
14619
- const w = rt(P.currentTarget), A = b.indexOf(S), T = L(S, A);
14620
- w.transition("fill").duration(K).ease(Z).attr("fill", T), w.style("filter", ""), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("opacity", 1), this.context.events.emit("point:mouseout", { point: S.data, index: A, series: this, event: P }), (F = (R = S.data.events) == null ? void 0 : R.mouseOut) == null || F.call(S.data, P);
14625
+ const w = rt(P.currentTarget), A = b.indexOf(S), $ = L(S, A);
14626
+ w.transition("fill").duration(K).ease(Z).attr("fill", $), w.style("filter", ""), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("opacity", 1), this.context.events.emit("point:mouseout", { point: S.data, index: A, series: this, event: P }), (F = (R = S.data.events) == null ? void 0 : R.mouseOut) == null || F.call(S.data, P);
14621
14627
  }).on("click", (P, S) => {
14622
- var A, T, R, F;
14628
+ var A, $, R, F;
14623
14629
  const w = b.indexOf(S);
14624
14630
  if (a && S.children) {
14625
14631
  this.currentRoot = S, this.group.selectAll("*").remove(), this.render();
14626
14632
  return;
14627
14633
  }
14628
- this.context.events.emit("point:click", { point: S.data, index: w, series: this, event: P }), (T = (A = S.data.events) == null ? void 0 : A.click) == null || T.call(S.data, P), (F = (R = this.config.events) == null ? void 0 : R.click) == null || F.call(this, P);
14634
+ this.context.events.emit("point:click", { point: S.data, index: w, series: this, event: P }), ($ = (A = S.data.events) == null ? void 0 : A.click) == null || $.call(S.data, P), (F = (R = this.config.events) == null ? void 0 : R.click) == null || F.call(this, P);
14629
14635
  }), a && this.currentRoot && this.currentRoot !== f && this.renderBreadcrumbs(t, f), this.renderLabels(b, k);
14630
14636
  }
14631
14637
  buildHierarchy(t) {
@@ -14691,21 +14697,21 @@ class uk extends Xt {
14691
14697
  const L = l === "right" ? "end" : l === "center" ? "middle" : "start";
14692
14698
  let _;
14693
14699
  c === "bottom" ? _ = y.y1 - f : c === "middle" ? _ = (y.y0 + y.y1) / 2 : _ = y.y0 + f;
14694
- const $ = this.group.append("text").attr("class", "katucharts-treemap-label").attr("x", C).attr("text-anchor", L).attr("fill", Dn(y._color, s)).style("pointer-events", "none");
14700
+ const T = this.group.append("text").attr("class", "katucharts-treemap-label").attr("x", C).attr("text-anchor", L).attr("fill", Dn(y._color, s)).style("pointer-events", "none");
14695
14701
  let I = _;
14696
14702
  M.forEach((P, S) => {
14697
14703
  if (P.length === 0) return;
14698
- const w = P.map((T) => Me(T.fontSize)), A = Math.max(...w) * 1.15;
14699
- I += A, P.forEach((T, R) => {
14700
- const F = $.append("tspan").attr("font-size", T.fontSize).attr("font-weight", T.fontWeight).text(T.text);
14704
+ const w = P.map(($) => Me($.fontSize)), A = Math.max(...w) * 1.15;
14705
+ I += A, P.forEach(($, R) => {
14706
+ const F = T.append("tspan").attr("font-size", $.fontSize).attr("font-weight", $.fontWeight).text($.text);
14701
14707
  R === 0 && F.attr("x", C).attr("y", I);
14702
14708
  });
14703
- }), this.context.animate && $.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Jn + g * Wt).attr("opacity", 1);
14704
- const E = $.node();
14709
+ }), this.context.animate && T.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Jn + g * Wt).attr("opacity", 1);
14710
+ const E = T.node();
14705
14711
  if (E)
14706
14712
  try {
14707
14713
  const P = E.getBBox();
14708
- (P.height + f > b || P.width + h > v) && P.height > b - f && $.remove();
14714
+ (P.height + f > b || P.width + h > v) && P.height > b - f && T.remove();
14709
14715
  } catch {
14710
14716
  }
14711
14717
  });
@@ -14730,7 +14736,7 @@ class fk extends Xt {
14730
14736
  });
14731
14737
  const C = this.getMaxDepth(M), L = this.config.levelIsConstant !== !1, _ = this.computeRingWidths(d, C, r);
14732
14738
  this.applyCustomRadii(M, _, L), this.assignColors(M, e, r);
14733
- const $ = this.config.borderRadius !== void 0 ? this.resolveBorderRadius(this.config.borderRadius) : 0, I = Ae().startAngle((U) => U.x0).endAngle((U) => U.x1).innerRadius((U) => U._y0).outerRadius((U) => U._y1).padAngle(5e-3).cornerRadius($), E = this.group.append("g").attr("transform", `translate(${c},${h})`), P = M.descendants(), S = P[0], w = P.filter((U) => U.depth > 0), A = S._y1 || S.y1, T = S.data.color || this.getColor() || "#ffffff", R = di(T), F = R && !isNaN(R.h) ? di(R.h, R.s * 0.4, 0.88).toString() : T, D = E.append("circle").attr("r", A).attr("fill", F).attr("stroke", "none").style("cursor", o ? "pointer" : "default");
14739
+ const T = this.config.borderRadius !== void 0 ? this.resolveBorderRadius(this.config.borderRadius) : 0, I = Ae().startAngle((U) => U.x0).endAngle((U) => U.x1).innerRadius((U) => U._y0).outerRadius((U) => U._y1).padAngle(5e-3).cornerRadius(T), E = this.group.append("g").attr("transform", `translate(${c},${h})`), P = M.descendants(), S = P[0], w = P.filter((U) => U.depth > 0), A = S._y1 || S.y1, $ = S.data.color || this.getColor() || "#ffffff", R = di($), F = R && !isNaN(R.h) ? di(R.h, R.s * 0.4, 0.88).toString() : $, D = E.append("circle").attr("r", A).attr("fill", F).attr("stroke", "none").style("cursor", o ? "pointer" : "default");
14734
14740
  if (o && this.currentRoot && this.currentRoot !== b && (E.select("circle").on("click", () => {
14735
14741
  var U;
14736
14742
  this.currentRoot = ((U = this.currentRoot) == null ? void 0 : U.parent) || null, this.group.selectAll("*").remove(), this.render();
@@ -14951,8 +14957,8 @@ class fk extends Xt {
14951
14957
  return `rotate(${M}) translate(${k},0) rotate(${C ? 90 : -90})`;
14952
14958
  if (v === "perpendicular")
14953
14959
  return `rotate(${M}) translate(${k},0)${L ? " rotate(180)" : ""}`;
14954
- const _ = m._y1 * (m.x1 - m.x0), $ = m._y1 - m._y0;
14955
- return _ > $ * 2 ? `rotate(${M}) translate(${k},0) rotate(${C ? 90 : -90})` : `rotate(${M}) translate(${k},0)${L ? " rotate(180)" : ""}`;
14960
+ const _ = m._y1 * (m.x1 - m.x0), T = m._y1 - m._y0;
14961
+ return _ > T * 2 ? `rotate(${M}) translate(${k},0) rotate(${C ? 90 : -90})` : `rotate(${M}) translate(${k},0)${L ? " rotate(180)" : ""}`;
14956
14962
  }).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", (m) => {
14957
14963
  var v, b;
14958
14964
  const x = i.find((k) => k.level === m.depth);
@@ -14977,19 +14983,19 @@ class fk extends Xt {
14977
14983
  if (b.operator === ">" && W <= b.value || b.operator === "<" && W >= b.value) return;
14978
14984
  } else if (k < 16)
14979
14985
  return;
14980
- const L = m.data.name || "", _ = ((J = v == null ? void 0 : v.dataLabels) == null ? void 0 : J.rotationMode) || s, $ = _ === "parallel" || _ === "auto" && k > C * 2, I = $ ? (k + M) / 2 : C, E = $ ? C : (k + M) / 2, P = parseFloat(((j = (X = v == null ? void 0 : v.dataLabels) == null ? void 0 : X.style) == null ? void 0 : j.fontSize) || l) || 11, S = P * 0.6, w = Math.max(3, Math.floor(I / S)), A = Math.max(1, Math.floor(E / (P * 1.2)));
14986
+ const L = m.data.name || "", _ = ((J = v == null ? void 0 : v.dataLabels) == null ? void 0 : J.rotationMode) || s, T = _ === "parallel" || _ === "auto" && k > C * 2, I = T ? (k + M) / 2 : C, E = T ? C : (k + M) / 2, P = parseFloat(((j = (X = v == null ? void 0 : v.dataLabels) == null ? void 0 : X.style) == null ? void 0 : j.fontSize) || l) || 11, S = P * 0.6, w = Math.max(3, Math.floor(I / S)), A = Math.max(1, Math.floor(E / (P * 1.2)));
14981
14987
  if (L.length <= w) {
14982
14988
  x.text(L);
14983
14989
  return;
14984
14990
  }
14985
- const T = L.split(/[\s_-]+/), R = [];
14991
+ const $ = L.split(/[\s_-]+/), R = [];
14986
14992
  let F = "";
14987
- for (const W of T) {
14993
+ for (const W of $) {
14988
14994
  const U = F ? F + " " + W : W;
14989
14995
  if (U.length <= w ? F = U : (F && R.push(F), F = W.length > w ? W.substring(0, w - 1) + "…" : W), R.length >= A) break;
14990
14996
  }
14991
14997
  if (F && R.length < A && R.push(F), R.length === 0) return;
14992
- if (R.length > A && (R.length = A), R.length === A && F && !R[R.length - 1].endsWith("…") && T.slice(R.join(" ").split(/[\s]+/).length).length > 0) {
14998
+ if (R.length > A && (R.length = A), R.length === A && F && !R[R.length - 1].endsWith("…") && $.slice(R.join(" ").split(/[\s]+/).length).length > 0) {
14993
14999
  const U = R[R.length - 1];
14994
15000
  U.length + 2 > w && (R[R.length - 1] = U.substring(0, w - 1) + "…");
14995
15001
  }
@@ -15051,13 +15057,13 @@ class dk extends Xt {
15051
15057
  this.renderPaneBackground(k, f, a, l, r);
15052
15058
  const M = f * 0.15, C = Ae().innerRadius(f - M).outerRadius(f).startAngle(a).endAngle(l).cornerRadius(M / 2);
15053
15059
  k.append("path").attr("d", C({})).attr("fill", "#ddd"), this.renderPlotBands(k, f, a, l, u, d, M), this.renderTickMarks(k, f, a, l, u, d, M);
15054
- const L = this.config.dial || {}, _ = this.config.pivot || {}, $ = L.backgroundColor || "#333", I = L.borderColor || "none", E = L.borderWidth ?? 0, P = L.baseWidth ?? 8, S = L.topWidth ?? 1, w = this.resolvePercent(L.radius ?? "80%", f), A = this.resolvePercent(L.rearLength ?? "15%", f), T = b - Math.PI / 2, R = w * Math.cos(T), F = w * Math.sin(T), D = -A * Math.cos(T), z = -A * Math.sin(T), B = T + Math.PI / 2, H = P / 2, J = S / 2, X = [
15060
+ const L = this.config.dial || {}, _ = this.config.pivot || {}, T = L.backgroundColor || "#333", I = L.borderColor || "none", E = L.borderWidth ?? 0, P = L.baseWidth ?? 8, S = L.topWidth ?? 1, w = this.resolvePercent(L.radius ?? "80%", f), A = this.resolvePercent(L.rearLength ?? "15%", f), $ = b - Math.PI / 2, R = w * Math.cos($), F = w * Math.sin($), D = -A * Math.cos($), z = -A * Math.sin($), B = $ + Math.PI / 2, H = P / 2, J = S / 2, X = [
15055
15061
  `M${D + H * Math.cos(B)},${z + H * Math.sin(B)}`,
15056
15062
  `L${R + J * Math.cos(B)},${F + J * Math.sin(B)}`,
15057
15063
  `L${R - J * Math.cos(B)},${F - J * Math.sin(B)}`,
15058
15064
  `L${D - H * Math.cos(B)},${z - H * Math.sin(B)}`,
15059
15065
  "Z"
15060
- ].join(" "), j = k.append("path").attr("fill", $).attr("stroke", I).attr("stroke-width", E).style("filter", "drop-shadow(0 1px 2px rgba(0,0,0,0.3))").style("cursor", "pointer");
15066
+ ].join(" "), j = k.append("path").attr("fill", T).attr("stroke", I).attr("stroke-width", E).style("filter", "drop-shadow(0 1px 2px rgba(0,0,0,0.3))").style("cursor", "pointer");
15061
15067
  if (e) {
15062
15068
  const O = this.buildNeedlePath(a, w, A, P, S);
15063
15069
  j.attr("d", O).transition().duration(bt).ease(pt).attrTween("d", () => {
@@ -15174,9 +15180,9 @@ class pk extends Xt {
15174
15180
  var k, M, C, L;
15175
15181
  const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = Math.min(t.width, t.height) / 2 - 10, o = t.width / 2, s = t.height / 2, a = ((k = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : k.min) ?? this.config.min ?? 0, l = ((M = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : M.max) ?? this.config.max ?? 100, c = this.data.length > 1, h = this.config.pane || {}, f = (h.startAngle ?? -135) * Math.PI / 180, u = (h.endAngle ?? 135) * Math.PI / 180, d = this.config.overshoot ?? 0, p = d * Math.PI / 180, y = this.group.append("g").attr("transform", `translate(${o},${s})`), g = this.config.innerRadius ?? 0.6, m = this.config.radius ?? 1, x = this.config.rounded ?? 5, v = this.config.linecap || "round", b = ((C = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : C.stops) || [];
15176
15182
  if (c) {
15177
- const _ = r / (this.data.length + 0.5), $ = _ * 0.1;
15183
+ const _ = r / (this.data.length + 0.5), T = _ * 0.1;
15178
15184
  this.renderPaneBackground(y, r, 0, f, u, h), this.data.forEach((I, E) => {
15179
- const P = I.radius ? this.resolveRadiusValue(I.radius, r) : r - E * _, S = I.innerRadius ? this.resolveRadiusValue(I.innerRadius, r) : P - _ + $, w = I.color || e[E % e.length], A = this.config.color;
15185
+ const P = I.radius ? this.resolveRadiusValue(I.radius, r) : r - E * _, S = I.innerRadius ? this.resolveRadiusValue(I.innerRadius, r) : P - _ + T, w = I.color || e[E % e.length], A = this.config.color;
15180
15186
  this.config.color = w, this.renderSingleArc(
15181
15187
  y,
15182
15188
  I,
@@ -15199,13 +15205,13 @@ class pk extends Xt {
15199
15205
  ), this.config.color = A;
15200
15206
  });
15201
15207
  } else {
15202
- const _ = this.resolveRadiusValue(g, r), $ = this.resolveRadiusValue(m, r);
15203
- this.renderPaneBackground(y, $, _, f, u, h), this.renderPlotBands(y, $, _, f, u, a, l), this.renderSingleArc(
15208
+ const _ = this.resolveRadiusValue(g, r), T = this.resolveRadiusValue(m, r);
15209
+ this.renderPaneBackground(y, T, _, f, u, h), this.renderPlotBands(y, T, _, f, u, a, l), this.renderSingleArc(
15204
15210
  y,
15205
15211
  this.data[0],
15206
15212
  0,
15207
15213
  _,
15208
- $,
15214
+ T,
15209
15215
  r,
15210
15216
  f,
15211
15217
  u,
@@ -15232,22 +15238,22 @@ class pk extends Xt {
15232
15238
  }
15233
15239
  const M = p === "round", C = Ae().innerRadius(r).outerRadius(o).startAngle(a).endAngle(l).cornerRadius(M ? (o - r) / 2 : d);
15234
15240
  t.append("path").attr("d", C({})).attr("fill", "#e0e0e0");
15235
- const L = M ? (o - r) / 2 : d, _ = Ae().innerRadius(r).outerRadius(o).cornerRadius(L), $ = Ae().innerRadius(r).outerRadius(o + 5).cornerRadius(L), I = this.resolveArcColor(b, y, e), E = t.append("path").attr("fill", I).style("cursor", "pointer");
15241
+ const L = M ? (o - r) / 2 : d, _ = Ae().innerRadius(r).outerRadius(o).cornerRadius(L), T = Ae().innerRadius(r).outerRadius(o + 5).cornerRadius(L), I = this.resolveArcColor(b, y, e), E = t.append("path").attr("fill", I).style("cursor", "pointer");
15236
15242
  if (x) {
15237
15243
  const P = oe(a, k), S = this;
15238
15244
  E.transition().duration(bt).ease(pt).attrTween("d", () => (w) => {
15239
- const A = P(w), T = _.startAngle(a).endAngle(A)({});
15245
+ const A = P(w), $ = _.startAngle(a).endAngle(A)({});
15240
15246
  if (y.length > 0) {
15241
15247
  const R = (A - a) / (l - a);
15242
15248
  E.attr("fill", S.getStopColor(Math.min(1, R), y));
15243
15249
  }
15244
- return T;
15250
+ return $;
15245
15251
  });
15246
15252
  } else
15247
15253
  E.attr("d", _.startAngle(a).endAngle(k)({}));
15248
15254
  this.config.enableMouseTracking !== !1 && E.on("mouseover", (P) => {
15249
15255
  var S, w;
15250
- E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d", $.startAngle(a).endAngle(k)({})), E.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), this.context.events.emit("point:mouseover", {
15256
+ E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d", T.startAngle(a).endAngle(k)({})), E.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), this.context.events.emit("point:mouseover", {
15251
15257
  point: e,
15252
15258
  index: i,
15253
15259
  series: this,
@@ -15259,8 +15265,8 @@ class pk extends Xt {
15259
15265
  var S, w;
15260
15266
  E.interrupt("hover").transition("hover").duration(K).ease(Z).attr("d", _.startAngle(a).endAngle(k)({})), E.style("filter", ""), this.context.events.emit("point:mouseout", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.mouseOut) == null || w.call(e, P);
15261
15267
  }).on("click", (P) => {
15262
- var S, w, A, T;
15263
- this.context.events.emit("point:click", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.click) == null || w.call(e, P), (T = (A = this.config.events) == null ? void 0 : A.click) == null || T.call(this, P);
15268
+ var S, w, A, $;
15269
+ this.context.events.emit("point:click", { point: e, index: i, series: this, event: P }), (w = (S = e == null ? void 0 : e.events) == null ? void 0 : S.click) == null || w.call(e, P), ($ = (A = this.config.events) == null ? void 0 : A.click) == null || $.call(this, P);
15264
15270
  });
15265
15271
  }
15266
15272
  resolveArcColor(t, e, i) {
@@ -15374,7 +15380,7 @@ class pu extends Xt {
15374
15380
  return t === "column" || t === "bar" ? "column" : t === "line" ? "line" : "area";
15375
15381
  }
15376
15382
  renderLineAreaPolar(t) {
15377
- var E, P, S, w, A, T, R, F, D, z;
15383
+ var E, P, S, w, A, $, R, F, D, z;
15378
15384
  const { plotArea: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = du(e.width, e.height, s), l = e.width / 2, c = e.height / 2, h = Math.max(...r.map((B) => B.y ?? 0), 1), { ticks: f, gridMax: u } = fu(h), d = _e().domain([0, u]).range([0, a]), p = ((E = this.config.marker) == null ? void 0 : E.radius) ?? 4, y = ((P = this.config.marker) == null ? void 0 : P.enabled) !== !1, g = this.config.pointPlacement, m = g === "on" ? 0 : g === "between" ? Math.PI / r.length : typeof g == "number" ? g * Math.PI / 180 : 0, x = 2 * Math.PI / r.length, v = this.config.connectEnds !== !1;
15379
15385
  (w = (S = this.config.states) == null ? void 0 : S.inactive) == null || w.opacity;
15380
15386
  const b = this.group.append("g").attr("transform", `translate(${l},${c})`);
@@ -15385,13 +15391,13 @@ class pu extends Xt {
15385
15391
  }
15386
15392
  const C = k * x - Math.PI / 2;
15387
15393
  this.renderGrid(b, a, r.length, d, f, C);
15388
- const L = v ? T2 : Ji, _ = b2().angle((B, H) => H * x + m).radius((B) => d(B.y ?? 0)).defined((B) => B.y !== null && B.y !== void 0).curve(L), $ = r.map((B) => ({ ...B, y: 0 })), I = b.append("path").datum(r).attr("fill", "none").attr("stroke", o).attr("stroke-width", this.config.lineWidth ?? 2);
15394
+ const L = v ? T2 : Ji, _ = b2().angle((B, H) => H * x + m).radius((B) => d(B.y ?? 0)).defined((B) => B.y !== null && B.y !== void 0).curve(L), T = r.map((B) => ({ ...B, y: 0 })), I = b.append("path").datum(r).attr("fill", "none").attr("stroke", o).attr("stroke-width", this.config.lineWidth ?? 2);
15389
15395
  if (t === "area") {
15390
15396
  const B = v2().angle((J, X) => X * x + m).innerRadius(0).outerRadius((J) => d(J.y ?? 0)).defined((J) => J.y !== null && J.y !== void 0).curve(L), H = b.append("path").datum(r).attr("fill", this.config.fillColor || o).attr("fill-opacity", this.config.fillOpacity ?? 0.3);
15391
- i ? H.attr("d", B($) || "").transition().duration(bt).ease(pt).attr("d", B(r) || "") : H.attr("d", B);
15397
+ i ? H.attr("d", B(T) || "").transition().duration(bt).ease(pt).attr("d", B(r) || "") : H.attr("d", B);
15392
15398
  }
15393
- if (i ? I.attr("d", _($) || "").transition().duration(bt).ease(pt).attr("d", _(r) || "") : I.attr("d", _), y) {
15394
- const H = Math.max(...r.map((X) => X.y ?? 0), 1) * 0.02, J = b.selectAll(".katucharts-polar-point").data(r).join("circle").attr("class", "katucharts-polar-point").attr("cx", (X, j) => d(X.y ?? 0) * Math.cos(j * x - Math.PI / 2 + m)).attr("cy", (X, j) => d(X.y ?? 0) * Math.sin(j * x - Math.PI / 2 + m)).attr("fill", ((A = this.config.marker) == null ? void 0 : A.fillColor) || o).attr("stroke", ((T = this.config.marker) == null ? void 0 : T.lineColor) || this.autoBorderColor()).attr("stroke-width", ((R = this.config.marker) == null ? void 0 : R.lineWidth) ?? 1).style("display", (X) => (X.y ?? 0) < H ? "none" : null).style("cursor", this.config.cursor || "pointer");
15399
+ if (i ? I.attr("d", _(T) || "").transition().duration(bt).ease(pt).attr("d", _(r) || "") : I.attr("d", _), y) {
15400
+ const H = Math.max(...r.map((X) => X.y ?? 0), 1) * 0.02, J = b.selectAll(".katucharts-polar-point").data(r).join("circle").attr("class", "katucharts-polar-point").attr("cx", (X, j) => d(X.y ?? 0) * Math.cos(j * x - Math.PI / 2 + m)).attr("cy", (X, j) => d(X.y ?? 0) * Math.sin(j * x - Math.PI / 2 + m)).attr("fill", ((A = this.config.marker) == null ? void 0 : A.fillColor) || o).attr("stroke", (($ = this.config.marker) == null ? void 0 : $.lineColor) || this.autoBorderColor()).attr("stroke-width", ((R = this.config.marker) == null ? void 0 : R.lineWidth) ?? 1).style("display", (X) => (X.y ?? 0) < H ? "none" : null).style("cursor", this.config.cursor || "pointer");
15395
15401
  if (i ? J.attr("r", 0).attr("opacity", 0).transition().duration(bt).ease(pt).delay((X, j) => j * Wt).attr("r", p).attr("opacity", 1) : J.attr("r", p), this.renderPolarDataLabels(b, r, d, x, m), this.config.enableMouseTracking !== !1) {
15396
15402
  const X = ((z = (D = (F = this.config.marker) == null ? void 0 : F.states) == null ? void 0 : D.hover) == null ? void 0 : z.radius) ?? p + 3;
15397
15403
  J.on("mouseover", (j, W) => {
@@ -15431,33 +15437,33 @@ class pu extends Xt {
15431
15437
  }
15432
15438
  const L = M * p - Math.PI / 2;
15433
15439
  this.renderGrid(k, a, r.length, d, f, L);
15434
- const _ = Ae().cornerRadius(2), $ = k.selectAll(".katucharts-polar-bar").data(r).join("path").attr("class", "katucharts-polar-bar").attr(
15440
+ const _ = Ae().cornerRadius(2), T = k.selectAll(".katucharts-polar-bar").data(r).join("path").attr("class", "katucharts-polar-bar").attr(
15435
15441
  "fill",
15436
15442
  (S, w) => S.color || (v ? e[w % e.length] : o)
15437
15443
  ).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), I = this.context.stackOffsets;
15438
- i ? $.each(function(S, w) {
15439
- const A = rt(this), T = w * p - Math.PI / 2 + g + m, R = (w + 1) * p - Math.PI / 2 + g - m, F = b && I ? d(I.get(w) ?? 0) : 0, D = F + d(S.y ?? 0);
15440
- A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle: T + Math.PI / 2, endAngle: R + Math.PI / 2 }) || "").transition().duration(bt).ease(pt).delay(w * Wt).attrTween("d", () => (z) => _({
15444
+ i ? T.each(function(S, w) {
15445
+ const A = rt(this), $ = w * p - Math.PI / 2 + g + m, R = (w + 1) * p - Math.PI / 2 + g - m, F = b && I ? d(I.get(w) ?? 0) : 0, D = F + d(S.y ?? 0);
15446
+ A.attr("d", _({ innerRadius: F, outerRadius: F, startAngle: $ + Math.PI / 2, endAngle: R + Math.PI / 2 }) || "").transition().duration(bt).ease(pt).delay(w * Wt).attrTween("d", () => (z) => _({
15441
15447
  innerRadius: F,
15442
15448
  outerRadius: F + (D - F) * z,
15443
- startAngle: T + Math.PI / 2,
15449
+ startAngle: $ + Math.PI / 2,
15444
15450
  endAngle: R + Math.PI / 2
15445
15451
  }) || ""), b && I && I.set(w, (I.get(w) ?? 0) + (S.y ?? 0));
15446
- }) : $.attr("d", (S, w) => {
15447
- const A = w * p - Math.PI / 2 + g + m, T = (w + 1) * p - Math.PI / 2 + g - m, R = b && I ? d(I.get(w) ?? 0) : 0, F = R + d(S.y ?? 0);
15452
+ }) : T.attr("d", (S, w) => {
15453
+ const A = w * p - Math.PI / 2 + g + m, $ = (w + 1) * p - Math.PI / 2 + g - m, R = b && I ? d(I.get(w) ?? 0) : 0, F = R + d(S.y ?? 0);
15448
15454
  return b && I && I.set(w, (I.get(w) ?? 0) + (S.y ?? 0)), _({
15449
15455
  innerRadius: R,
15450
15456
  outerRadius: F,
15451
15457
  startAngle: A + Math.PI / 2,
15452
- endAngle: T + Math.PI / 2
15458
+ endAngle: $ + Math.PI / 2
15453
15459
  }) || "";
15454
- }), this.config.enableMouseTracking !== !1 && $.on("mouseover", (S, w) => {
15460
+ }), this.config.enableMouseTracking !== !1 && T.on("mouseover", (S, w) => {
15455
15461
  var D, z;
15456
- rt(S.currentTarget).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), $.interrupt("highlight"), $.attr("opacity", 1), $.filter((B) => B !== w).transition("highlight").duration(K).ease(Z).attr("opacity", x);
15457
- const T = r.indexOf(w), R = T * p + p / 2 - Math.PI / 2 + g, F = d(w.y ?? 0) / 2;
15462
+ rt(S.currentTarget).style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), T.interrupt("highlight"), T.attr("opacity", 1), T.filter((B) => B !== w).transition("highlight").duration(K).ease(Z).attr("opacity", x);
15463
+ const $ = r.indexOf(w), R = $ * p + p / 2 - Math.PI / 2 + g, F = d(w.y ?? 0) / 2;
15458
15464
  this.context.events.emit("point:mouseover", {
15459
15465
  point: w,
15460
- index: T,
15466
+ index: $,
15461
15467
  series: this,
15462
15468
  event: S,
15463
15469
  plotX: l + F * Math.cos(R),
@@ -15465,13 +15471,13 @@ class pu extends Xt {
15465
15471
  }), (z = (D = w.events) == null ? void 0 : D.mouseOver) == null || z.call(w, S);
15466
15472
  }).on("mouseout", (S, w) => {
15467
15473
  var R, F;
15468
- rt(S.currentTarget).style("filter", ""), $.interrupt("highlight"), $.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
15469
- const T = r.indexOf(w);
15470
- this.context.events.emit("point:mouseout", { point: w, index: T, series: this, event: S }), (F = (R = w.events) == null ? void 0 : R.mouseOut) == null || F.call(w, S);
15474
+ rt(S.currentTarget).style("filter", ""), T.interrupt("highlight"), T.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
15475
+ const $ = r.indexOf(w);
15476
+ this.context.events.emit("point:mouseout", { point: w, index: $, series: this, event: S }), (F = (R = w.events) == null ? void 0 : R.mouseOut) == null || F.call(w, S);
15471
15477
  }).on("click", (S, w) => {
15472
- var T, R, F, D;
15478
+ var $, R, F, D;
15473
15479
  const A = r.indexOf(w);
15474
- this.context.events.emit("point:click", { point: w, index: A, series: this, event: S }), (R = (T = w.events) == null ? void 0 : T.click) == null || R.call(w, S), (D = (F = this.config.events) == null ? void 0 : F.click) == null || D.call(this, S);
15480
+ this.context.events.emit("point:click", { point: w, index: A, series: this, event: S }), (R = ($ = w.events) == null ? void 0 : $.click) == null || R.call(w, S), (D = (F = this.config.events) == null ? void 0 : F.click) == null || D.call(this, S);
15475
15481
  });
15476
15482
  }
15477
15483
  renderPolarDataLabels(t, e, i, r, o) {
@@ -15483,12 +15489,12 @@ class pu extends Xt {
15483
15489
  const v = x.length > 0 ? x[0] : null, b = v ? [...m, v] : m;
15484
15490
  b.sort((L, _) => L.i - _.i);
15485
15491
  for (const { d: L, i: _ } of b) {
15486
- const $ = _ * r - Math.PI / 2 + o, I = i(L.y ?? 0), E = I * Math.cos($), P = I * Math.sin($), S = (($ + Math.PI / 2) * 180 / Math.PI + 360) % 360;
15492
+ const T = _ * r - Math.PI / 2 + o, I = i(L.y ?? 0), E = I * Math.cos(T), P = I * Math.sin(T), S = ((T + Math.PI / 2) * 180 / Math.PI + 360) % 360;
15487
15493
  let w;
15488
15494
  S > 20 && S < 160 ? w = "start" : S > 200 && S < 340 ? w = "end" : w = "middle";
15489
15495
  let A;
15490
15496
  S < 45 || S > 315 ? A = "text-after-edge" : S > 135 && S < 225 ? A = "text-before-edge" : A = "middle";
15491
- const T = Math.cos($), R = Math.sin($), F = E + T * u, D = P + R * u;
15497
+ const $ = Math.cos(T), R = Math.sin(T), F = E + $ * u, D = P + R * u;
15492
15498
  let z = !1;
15493
15499
  for (const B of h)
15494
15500
  if ((B.x - F) ** 2 + (B.y - D) ** 2 < f * f) {
@@ -15545,15 +15551,15 @@ class xk extends Xt {
15545
15551
  o.forEach((k, M) => {
15546
15552
  const C = a + M * s, L = k.color || (h ? e[M % e.length] : r.color || e[0]), _ = this.group.append("circle").attr("cx", 20).attr("cy", C + s / 2).attr("fill", L).style("cursor", "pointer");
15547
15553
  if (c && _.attr("stroke", c), i ? _.attr("r", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("r", l) : _.attr("r", l), M < o.length - 1) {
15548
- const T = this.group.append("line").attr("x1", 20).attr("x2", 20).attr("y1", C + s / 2 + l).attr("y2", C + s + s / 2 - l).attr("stroke", f).attr("stroke-width", u);
15549
- i && T.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
15554
+ const $ = this.group.append("line").attr("x1", 20).attr("x2", 20).attr("y1", C + s / 2 + l).attr("y2", C + s + s / 2 - l).attr("stroke", f).attr("stroke-width", u);
15555
+ i && $.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
15550
15556
  }
15551
- const $ = k.label || k.name || `Event ${M + 1}`, I = this.group.append("text").attr("x", 36).attr("y", C + s / 2).attr("dy", "0.35em").attr("font-size", p).attr("fill", y).style("cursor", "pointer").text($);
15557
+ const T = k.label || k.name || `Event ${M + 1}`, I = this.group.append("text").attr("x", 36).attr("y", C + s / 2).attr("dy", "0.35em").attr("font-size", p).attr("fill", y).style("cursor", "pointer").text(T);
15552
15558
  i && I.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1);
15553
15559
  let E = null;
15554
15560
  const P = k.description;
15555
15561
  P && (E = this.group.append("text").attr("x", 36).attr("y", C + s / 2 + 14).attr("dy", "0.35em").attr("font-size", "10px").attr("fill", "#777").style("pointer-events", "none").text(P), i && E.attr("opacity", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("opacity", 1)), g.push({ circle: _, text: I, desc: E });
15556
- const S = (T) => {
15562
+ const S = ($) => {
15557
15563
  _.transition("size").duration(K).ease(Z).attr("r", l + 3), _.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.3))"), I.attr("font-weight", "bold"), g.forEach((R) => {
15558
15564
  R.circle.interrupt("highlight"), R.text.interrupt("highlight"), R.circle.attr("opacity", 1), R.text.attr("opacity", 1), R.desc && (R.desc.interrupt("highlight"), R.desc.attr("opacity", 1));
15559
15565
  }), g.forEach((R, F) => {
@@ -15562,16 +15568,16 @@ class xk extends Xt {
15562
15568
  point: k,
15563
15569
  index: M,
15564
15570
  series: this,
15565
- event: T,
15571
+ event: $,
15566
15572
  plotX: 20,
15567
15573
  plotY: C + s / 2
15568
15574
  });
15569
- }, w = (T) => {
15575
+ }, w = ($) => {
15570
15576
  _.transition("size").duration(K).ease(Z).attr("r", l), _.style("filter", ""), I.attr("font-weight", "normal"), g.forEach((R) => {
15571
15577
  R.circle.interrupt("highlight"), R.text.interrupt("highlight"), R.circle.transition("highlight").duration(K).ease(Z).attr("opacity", 1), R.text.transition("highlight").duration(K).ease(Z).attr("opacity", 1), R.desc && (R.desc.interrupt("highlight"), R.desc.transition("highlight").duration(K).ease(Z).attr("opacity", 1));
15572
- }), this.context.events.emit("point:mouseout", { point: k, index: M, series: this, event: T });
15573
- }, A = (T) => {
15574
- this.context.events.emit("point:click", { point: k, index: M, series: this, event: T });
15578
+ }), this.context.events.emit("point:mouseout", { point: k, index: M, series: this, event: $ });
15579
+ }, A = ($) => {
15580
+ this.context.events.emit("point:click", { point: k, index: M, series: this, event: $ });
15575
15581
  };
15576
15582
  _.on("mouseover", S).on("mouseout", w).on("click", A), I.on("mouseover", S).on("mouseout", w).on("click", A);
15577
15583
  });
@@ -15841,8 +15847,8 @@ function kk(n, t) {
15841
15847
  for (var c = 0, h = n.length; c < h; ++c)
15842
15848
  if (u = (f = n[c]).length)
15843
15849
  for (var f, u, d = f[u - 1], p = pa(d), y = d[1] / 2 + gu, g = Pt(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
15844
- var v = f[x], b = pa(v), k = v[1] / 2 + gu, M = Pt(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1, $ = _ * L, I = $ > zt, E = g * M;
15845
- if (l.add(Wn(E * _ * Pt($), m * C + E * Dt($))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15850
+ var v = f[x], b = pa(v), k = v[1] / 2 + gu, M = Pt(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
15851
+ if (l.add(Wn(E * _ * Pt(T), m * C + E * Dt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15846
15852
  var P = ts(ji(d), ji(v));
15847
15853
  Qa(P);
15848
15854
  var S = ts(o, P);
@@ -15891,11 +15897,11 @@ function Zd(n, t, e, i) {
15891
15897
  }
15892
15898
  function v() {
15893
15899
  m(f[0][0], f[0][1]), a.lineEnd();
15894
- var b = a.clean(), k = s.result(), M, C = k.length, L, _, $;
15900
+ var b = a.clean(), k = s.result(), M, C = k.length, L, _, T;
15895
15901
  if (f.pop(), c.push(f), f = null, !!C) {
15896
15902
  if (b & 1) {
15897
15903
  if (_ = k[0], (L = _.length - 1) > 0) {
15898
- for (l || (r.polygonStart(), l = !0), r.lineStart(), M = 0; M < L; ++M) r.point(($ = _[M])[0], $[1]);
15904
+ for (l || (r.polygonStart(), l = !0), r.lineStart(), M = 0; M < L; ++M) r.point((T = _[M])[0], T[1]);
15899
15905
  r.lineEnd();
15900
15906
  }
15901
15907
  return;
@@ -15991,15 +15997,15 @@ function Pk(n) {
15991
15997
  if (!v) return !u && h;
15992
15998
  var b = t * m / v, k = -t * x / v, M = ts(y, g), C = fo(y, b), L = fo(g, k);
15993
15999
  da(C, L);
15994
- var _ = M, $ = uo(C, _), I = uo(_, _), E = $ * $ - I * (uo(C, C) - 1);
16000
+ var _ = M, T = uo(C, _), I = uo(_, _), E = T * T - I * (uo(C, C) - 1);
15995
16001
  if (!(E < 0)) {
15996
- var P = He(E), S = fo(_, (-$ - P) / I);
16002
+ var P = He(E), S = fo(_, (-T - P) / I);
15997
16003
  if (da(S, C), S = Ja(S), !u) return S;
15998
- var w = h[0], A = f[0], T = h[1], R = f[1], F;
16004
+ var w = h[0], A = f[0], $ = h[1], R = f[1], F;
15999
16005
  A < w && (F = w, w = A, A = F);
16000
16006
  var D = A - w, z = Gt(D - zt) < At, B = z || D < At;
16001
- if (!z && R < T && (F = T, T = R, R = F), B ? z ? T + R > 0 ^ S[1] < (Gt(S[0] - w) < At ? T : R) : T <= S[1] && S[1] <= R : D > zt ^ (w <= S[0] && S[0] <= A)) {
16002
- var H = fo(_, (-$ + P) / I);
16007
+ if (!z && R < $ && (F = $, $ = R, R = F), B ? z ? $ + R > 0 ^ S[1] < (Gt(S[0] - w) < At ? $ : R) : $ <= S[1] && S[1] <= R : D > zt ^ (w <= S[0] && S[0] <= A)) {
16008
+ var H = fo(_, (-T + P) / I);
16003
16009
  return da(H, C), [S, Ja(H)];
16004
16010
  }
16005
16011
  }
@@ -16079,24 +16085,24 @@ function Tk(n, t, e, i) {
16079
16085
  point: L,
16080
16086
  lineStart: E,
16081
16087
  lineEnd: P,
16082
- polygonStart: $,
16088
+ polygonStart: T,
16083
16089
  polygonEnd: I
16084
16090
  };
16085
16091
  function L(w, A) {
16086
16092
  r(w, A) && h.point(w, A);
16087
16093
  }
16088
16094
  function _() {
16089
- for (var w = 0, A = 0, T = d.length; A < T; ++A)
16095
+ for (var w = 0, A = 0, $ = d.length; A < $; ++A)
16090
16096
  for (var R = d[A], F = 1, D = R.length, z = R[0], B, H, J = z[0], X = z[1]; F < D; ++F)
16091
16097
  B = J, H = X, z = R[F], J = z[0], X = z[1], H <= i ? X > i && (J - B) * (i - H) > (X - H) * (n - B) && ++w : X <= i && (J - B) * (i - H) < (X - H) * (n - B) && --w;
16092
16098
  return w;
16093
16099
  }
16094
- function $() {
16100
+ function T() {
16095
16101
  h = f, u = [], d = [], M = !0;
16096
16102
  }
16097
16103
  function I() {
16098
- var w = _(), A = M && w, T = (u = Hf(u)).length;
16099
- (A || T) && (c.polygonStart(), A && (c.lineStart(), o(null, null, 1, c), c.lineEnd()), T && jd(u, a, w, o, c), c.polygonEnd()), h = c, u = d = p = null;
16104
+ var w = _(), A = M && w, $ = (u = Hf(u)).length;
16105
+ (A || $) && (c.polygonStart(), A && (c.lineStart(), o(null, null, 1, c), c.lineEnd()), $ && jd(u, a, w, o, c), c.polygonEnd()), h = c, u = d = p = null;
16100
16106
  }
16101
16107
  function E() {
16102
16108
  C.point = S, d && d.push(p = []), k = !0, b = !1, x = v = NaN;
@@ -16105,15 +16111,15 @@ function Tk(n, t, e, i) {
16105
16111
  u && (S(y, g), m && b && f.rejoin(), u.push(f.result())), C.point = L, b && h.lineEnd();
16106
16112
  }
16107
16113
  function S(w, A) {
16108
- var T = r(w, A);
16114
+ var $ = r(w, A);
16109
16115
  if (d && p.push([w, A]), k)
16110
- y = w, g = A, m = T, k = !1, T && (h.lineStart(), h.point(w, A));
16111
- else if (T && b) h.point(w, A);
16116
+ y = w, g = A, m = $, k = !1, $ && (h.lineStart(), h.point(w, A));
16117
+ else if ($ && b) h.point(w, A);
16112
16118
  else {
16113
16119
  var R = [x = Math.max(go, Math.min(kr, x)), v = Math.max(go, Math.min(kr, v))], F = [w = Math.max(go, Math.min(kr, w)), A = Math.max(go, Math.min(kr, A))];
16114
- Ek(R, F, n, t, e, i) ? (b || (h.lineStart(), h.point(R[0], R[1])), h.point(F[0], F[1]), T || h.lineEnd(), M = !1) : T && (h.lineStart(), h.point(w, A), M = !1);
16120
+ Ek(R, F, n, t, e, i) ? (b || (h.lineStart(), h.point(R[0], R[1])), h.point(F[0], F[1]), $ || h.lineEnd(), M = !1) : $ && (h.lineStart(), h.point(w, A), M = !1);
16115
16121
  }
16116
- x = w, v = A, b = T;
16122
+ x = w, v = A, b = $;
16117
16123
  }
16118
16124
  return C;
16119
16125
  };
@@ -16492,7 +16498,7 @@ function Xk(n, t) {
16492
16498
  function e(i, r, o, s, a, l, c, h, f, u, d, p, y, g) {
16493
16499
  var m = c - i, x = h - r, v = m * m + x * x;
16494
16500
  if (v > 4 * t && y--) {
16495
- var b = s + u, k = a + d, M = l + p, C = He(b * b + k * k + M * M), L = ln(M /= C), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Wn(k, b), $ = n(_, L), I = $[0], E = $[1], P = I - i, S = E - r, w = x * P - m * S;
16501
+ var b = s + u, k = a + d, M = l + p, C = He(b * b + k * k + M * M), L = ln(M /= C), _ = Gt(Gt(M) - 1) < At || Gt(o - f) < At ? (o + f) / 2 : Wn(k, b), T = n(_, L), I = T[0], E = T[1], P = I - i, S = E - r, w = x * P - m * S;
16496
16502
  (w * w / v > t || Gt((m * P + x * S) / v - 0.5) > 0.3 || s * u + a * d + l * p < Gk) && (e(i, r, o, s, a, l, I, E, _, b /= C, k /= C, M, y, g), g.point(I, E), e(I, E, _, b, k, M, c, h, f, u, d, p, y, g));
16497
16503
  }
16498
16504
  }
@@ -16515,8 +16521,8 @@ function Xk(n, t) {
16515
16521
  f = NaN, g.point = v, i.lineStart();
16516
16522
  }
16517
16523
  function v(L, _) {
16518
- var $ = ji([L, _]), I = n(L, _);
16519
- e(f, u, h, d, p, y, f = I[0], u = I[1], h = L, d = $[0], p = $[1], y = $[2], Iu, i), i.point(f, u);
16524
+ var T = ji([L, _]), I = n(L, _);
16525
+ e(f, u, h, d, p, y, f = I[0], u = I[1], h = L, d = T[0], p = T[1], y = T[2], Iu, i), i.point(f, u);
16520
16526
  }
16521
16527
  function b() {
16522
16528
  g.point = m, i.lineEnd();
@@ -16570,7 +16576,7 @@ function Sn(n) {
16570
16576
  })();
16571
16577
  }
16572
16578
  function up(n) {
16573
- var t, e = 150, i = 480, r = 250, o = 0, s = 0, a = 0, l = 0, c = 0, h, f = 0, u = 1, d = 1, p = null, y = Au, g = null, m, x, v, b = nc, k = 0.5, M, C, L, _, $;
16579
+ var t, e = 150, i = 480, r = 250, o = 0, s = 0, a = 0, l = 0, c = 0, h, f = 0, u = 1, d = 1, p = null, y = Au, g = null, m, x, v, b = nc, k = 0.5, M, C, L, _, T;
16574
16580
  function I(w) {
16575
16581
  return L(w[0] * Qt, w[1] * Qt);
16576
16582
  }
@@ -16578,7 +16584,7 @@ function up(n) {
16578
16584
  return w = L.invert(w[0], w[1]), w && [w[0] * Le, w[1] * Le];
16579
16585
  }
16580
16586
  I.stream = function(w) {
16581
- return _ && $ === w ? _ : _ = Uk(qk(h)(y(M(b($ = w)))));
16587
+ return _ && T === w ? _ : _ = Uk(qk(h)(y(M(b(T = w)))));
16582
16588
  }, I.preclip = function(w) {
16583
16589
  return arguments.length ? (y = w, p = void 0, S()) : y;
16584
16590
  }, I.postclip = function(w) {
@@ -16617,7 +16623,7 @@ function up(n) {
16617
16623
  return h = Ud(a, l, c), C = tc(t, A), L = tc(h, C), M = Fu(C, k), S();
16618
16624
  }
16619
16625
  function S() {
16620
- return _ = $ = null, I;
16626
+ return _ = T = null, I;
16621
16627
  }
16622
16628
  return function() {
16623
16629
  return t = n.apply(this, arguments), I.invert = t.invert && E, P();
@@ -17046,7 +17052,7 @@ class vM extends Xt {
17046
17052
  this.autoRotateTimer && (this.autoRotateTimer.stop(), this.autoRotateTimer = null), super.destroy();
17047
17053
  }
17048
17054
  render() {
17049
- var $;
17055
+ var T;
17050
17056
  const { plotArea: t } = this.context, e = this.config, i = e.mapData;
17051
17057
  if (!i) {
17052
17058
  this.group.append("text").attr("x", t.width / 2).attr("y", t.height / 2).attr("text-anchor", "middle").attr("fill", "#999").text("Map data not provided");
@@ -17078,7 +17084,7 @@ class vM extends Xt {
17078
17084
  const E = this.getFeatureKey(I, h);
17079
17085
  return this.dataMap.has(E);
17080
17086
  }), L = this.context.animate;
17081
- this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(pt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ll(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : (($ = e.mapNavigation) == null ? void 0 : $.enabled) !== !1 && this.setupMapNavigation(r, o);
17087
+ this.featurePaths = this.mapGroup.selectAll(".katucharts-map-feature").data(C).join("path").attr("class", "katucharts-map-feature").attr("d", o).attr("stroke", x).attr("stroke-width", v).attr("stroke-linejoin", "round").style("cursor", "pointer"), L ? this.featurePaths.attr("fill", g).attr("fill-opacity", 0).transition().duration(bt).ease(pt).attr("fill-opacity", 1).attr("fill", (I) => this.getFeatureColor(I, h, g)) : this.featurePaths.attr("fill", (I) => this.getFeatureColor(I, h, g)), this.attachMapHover(h, x, v, g), this.renderMapLabels(o, C, h), u.enabled !== !1 && d.length > 0 && this.renderColorAxis(p, y, u), ll(a, e) ? this.setupGlobeMode(r, o, s, h, g, x, v, e) : ((T = e.mapNavigation) == null ? void 0 : T.enabled) !== !1 && this.setupMapNavigation(r, o);
17082
17088
  }
17083
17089
  /**
17084
17090
  * Builds a 0‒1 value normalizer honoring `colorAxis.type`. A `'logarithmic'`
@@ -17121,14 +17127,14 @@ class vM extends Xt {
17121
17127
  b.transition("hover").duration(K).ease(Z).attr("fill", S);
17122
17128
  }
17123
17129
  b.attr("stroke", a).attr("stroke-width", l), b.raise(), this.featurePaths.interrupt("highlight"), this.featurePaths.filter((S) => S !== v).transition("highlight").duration(K).ease(Z).attr("opacity", 0.7);
17124
- const L = ((P = v.properties) == null ? void 0 : P.name) || k, _ = M ? { name: M.name ?? L, y: M.y ?? M.value, ...M } : { name: L }, $ = x.currentTarget.getBBox();
17130
+ const L = ((P = v.properties) == null ? void 0 : P.name) || k, _ = M ? { name: M.name ?? L, y: M.y ?? M.value, ...M } : { name: L }, T = x.currentTarget.getBBox();
17125
17131
  this.context.events.emit("point:mouseover", {
17126
17132
  point: _,
17127
17133
  index: 0,
17128
17134
  series: this,
17129
17135
  event: x,
17130
- plotX: $.x + $.width / 2,
17131
- plotY: $.y + $.height / 2
17136
+ plotX: T.x + T.width / 2,
17137
+ plotY: T.y + T.height / 2
17132
17138
  });
17133
17139
  }).on("mouseout", (x, v) => {
17134
17140
  var L;
@@ -17212,9 +17218,9 @@ class vM extends Xt {
17212
17218
  */
17213
17219
  renderNavButtons(t, e, i) {
17214
17220
  var C, L;
17215
- const { plotArea: r } = this.context, o = this.config.mapNavigation || {}, s = o.buttonOptions || {}, a = s.theme || {}, l = o.buttons || {}, c = 24, h = 4, f = 10, u = c * 2 + h, d = s.align || "left", p = s.verticalAlign || "top", y = (d === "right" ? r.width - c - f : f) + (s.x ?? 0), g = (p === "bottom" ? r.height - u - f : f) + (s.y ?? 0), m = a.fill || "#ffffff", x = a.stroke || "#e0e0e0", v = a.style && a.style.color || s.symbolStroke || "#3f3f46", b = this.group.append("g").attr("class", "katucharts-map-nav"), k = [e, i], M = (_, $, I) => {
17221
+ const { plotArea: r } = this.context, o = this.config.mapNavigation || {}, s = o.buttonOptions || {}, a = s.theme || {}, l = o.buttons || {}, c = 24, h = 4, f = 10, u = c * 2 + h, d = s.align || "left", p = s.verticalAlign || "top", y = (d === "right" ? r.width - c - f : f) + (s.x ?? 0), g = (p === "bottom" ? r.height - u - f : f) + (s.y ?? 0), m = a.fill || "#ffffff", x = a.stroke || "#e0e0e0", v = a.style && a.style.color || s.symbolStroke || "#3f3f46", b = this.group.append("g").attr("class", "katucharts-map-nav"), k = [e, i], M = (_, T, I) => {
17216
17222
  const E = b.append("g").style("cursor", "pointer").on("click", I);
17217
- return E.append("rect").attr("x", y).attr("y", _).attr("width", c).attr("height", c).attr("fill", m).attr("stroke", x).attr("stroke-width", 1).attr("rx", 4), E.append("text").attr("x", y + c / 2).attr("y", _ + c / 2 + 1).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "17px").attr("fill", v).style("user-select", "none").text($), E.on("mouseover", function() {
17223
+ return E.append("rect").attr("x", y).attr("y", _).attr("width", c).attr("height", c).attr("fill", m).attr("stroke", x).attr("stroke-width", 1).attr("rx", 4), E.append("text").attr("x", y + c / 2).attr("y", _ + c / 2 + 1).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", "17px").attr("fill", v).style("user-select", "none").text(T), E.on("mouseover", function() {
17218
17224
  rt(this).select("rect").attr("fill", "#f5f5f5");
17219
17225
  }).on("mouseout", function() {
17220
17226
  rt(this).select("rect").attr("fill", m);
@@ -17235,8 +17241,8 @@ class vM extends Xt {
17235
17241
  this.mapGroup.insert("path", ".katucharts-map-feature").datum(w()).attr("d", e).attr("fill", "none").attr("stroke", m).attr("stroke-width", 0.3).attr("stroke-opacity", x).attr("class", "katucharts-globe-graticule");
17236
17242
  }
17237
17243
  this.featurePaths.attr("d", e);
17238
- const _ = `katucharts-globe-spec-${Math.random().toString(36).slice(2, 8)}`, $ = M.append("radialGradient").attr("id", _).attr("cx", "35%").attr("cy", "25%");
17239
- $.append("stop").attr("offset", "0%").attr("stop-color", "rgba(255,255,255,0.35)"), $.append("stop").attr("offset", "50%").attr("stop-color", "rgba(255,255,255,0.05)"), $.append("stop").attr("offset", "100%").attr("stop-color", "rgba(255,255,255,0)"), this.mapGroup.append("circle").attr("cx", h).attr("cy", f).attr("r", u).attr("fill", `url(#${_})`).style("pointer-events", "none").attr("class", "katucharts-globe-specular");
17244
+ const _ = `katucharts-globe-spec-${Math.random().toString(36).slice(2, 8)}`, T = M.append("radialGradient").attr("id", _).attr("cx", "35%").attr("cy", "25%");
17245
+ T.append("stop").attr("offset", "0%").attr("stop-color", "rgba(255,255,255,0.35)"), T.append("stop").attr("offset", "50%").attr("stop-color", "rgba(255,255,255,0.05)"), T.append("stop").attr("offset", "100%").attr("stop-color", "rgba(255,255,255,0)"), this.mapGroup.append("circle").attr("cx", h).attr("cy", f).attr("r", u).attr("fill", `url(#${_})`).style("pointer-events", "none").attr("class", "katucharts-globe-specular");
17240
17246
  const I = this;
17241
17247
  let E = null, P = v;
17242
17248
  const S = yd().on("start", (w) => {
@@ -17244,14 +17250,14 @@ class vM extends Xt {
17244
17250
  E = [A[0], A[1], w.x], I.autoRotateTimer && (P = !0, I.autoRotateTimer.stop(), I.autoRotateTimer = null);
17245
17251
  }).on("drag", (w) => {
17246
17252
  if (!E) return;
17247
- const A = 0.4, T = (w.x - E[2]) * A, R = E[0] + T, F = Math.max(-90, Math.min(90, E[1] - (w.y - w.subject.y) * A));
17253
+ const A = 0.4, $ = (w.x - E[2]) * A, R = E[0] + $, F = Math.max(-90, Math.min(90, E[1] - (w.y - w.subject.y) * A));
17248
17254
  t.rotate([R, F]), I.redrawGlobe();
17249
17255
  }).on("end", () => {
17250
17256
  E = null, P && v && I.startAutoRotate(t, b);
17251
17257
  });
17252
17258
  this.group.call(S), this.group.style("cursor", "grab"), this.group.on("wheel", (w) => {
17253
17259
  w.preventDefault();
17254
- const A = t.scale(), T = w.deltaY > 0 ? 0.95 : 1.05, R = Math.max(u * 0.5, Math.min(u * 8, A * T));
17260
+ const A = t.scale(), $ = w.deltaY > 0 ? 0.95 : 1.05, R = Math.max(u * 0.5, Math.min(u * 8, A * $));
17255
17261
  t.scale(R), I.redrawGlobe();
17256
17262
  }), v && this.startAutoRotate(t, b);
17257
17263
  }
@@ -17318,30 +17324,30 @@ class wM extends Xt {
17318
17324
  if (!L) return;
17319
17325
  const _ = r(L);
17320
17326
  if (!_ || !isFinite(_[0]) || !isFinite(_[1])) return;
17321
- const [$, I] = _, E = M.color || u, P = ((w = M.marker) == null ? void 0 : w.radius) ?? c, S = s.append("g").attr("class", "katucharts-mappoint");
17327
+ const [T, I] = _, E = M.color || u, P = ((w = M.marker) == null ? void 0 : w.radius) ?? c, S = s.append("g").attr("class", "katucharts-mappoint");
17322
17328
  if (l) {
17323
- const A = S.append("circle").attr("class", "katucharts-mappoint-marker").attr("cx", $).attr("cy", I).attr("fill", E).attr("stroke", h).attr("stroke-width", f).style("cursor", t.cursor || "pointer").attr("r", d ? 0 : P);
17324
- d && A.transition().duration(bt).delay(C * 12).ease(pt).attr("r", P), A.on("mouseover", (T) => {
17329
+ const A = S.append("circle").attr("class", "katucharts-mappoint-marker").attr("cx", T).attr("cy", I).attr("fill", E).attr("stroke", h).attr("stroke-width", f).style("cursor", t.cursor || "pointer").attr("r", d ? 0 : P);
17330
+ d && A.transition().duration(bt).delay(C * 12).ease(pt).attr("r", P), A.on("mouseover", ($) => {
17325
17331
  var R, F;
17326
- rt(T.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P * 1.4), this.context.events.emit("point:mouseover", {
17332
+ rt($.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P * 1.4), this.context.events.emit("point:mouseover", {
17327
17333
  point: M,
17328
17334
  index: C,
17329
17335
  series: this,
17330
- event: T,
17331
- plotX: $,
17336
+ event: $,
17337
+ plotX: T,
17332
17338
  plotY: I
17333
- }), (F = (R = M.events) == null ? void 0 : R.mouseOver) == null || F.call(M, T);
17334
- }).on("mouseout", (T) => {
17339
+ }), (F = (R = M.events) == null ? void 0 : R.mouseOver) == null || F.call(M, $);
17340
+ }).on("mouseout", ($) => {
17335
17341
  var R, F;
17336
- rt(T.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P), this.context.events.emit("point:mouseout", { point: M, index: C, series: this, event: T }), (F = (R = M.events) == null ? void 0 : R.mouseOut) == null || F.call(M, T);
17337
- }).on("click", (T) => {
17342
+ rt($.currentTarget).transition("hover").duration(K).ease(Z).attr("r", P), this.context.events.emit("point:mouseout", { point: M, index: C, series: this, event: $ }), (F = (R = M.events) == null ? void 0 : R.mouseOut) == null || F.call(M, $);
17343
+ }).on("click", ($) => {
17338
17344
  var R, F, D, z, B, H, J;
17339
- this.context.events.emit("point:click", { point: M, index: C, series: this, event: T }), (F = (R = M.events) == null ? void 0 : R.click) == null || F.call(M, T), (B = (z = (D = t.point) == null ? void 0 : D.events) == null ? void 0 : z.click) == null || B.call(M, T), (J = (H = t.events) == null ? void 0 : H.click) == null || J.call(this, T);
17345
+ this.context.events.emit("point:click", { point: M, index: C, series: this, event: $ }), (F = (R = M.events) == null ? void 0 : R.click) == null || F.call(M, $), (B = (z = (D = t.point) == null ? void 0 : D.events) == null ? void 0 : z.click) == null || B.call(M, $), (J = (H = t.events) == null ? void 0 : H.click) == null || J.call(this, $);
17340
17346
  });
17341
17347
  }
17342
17348
  if (y) {
17343
17349
  const A = this.formatLabel(M, C);
17344
- A && s.append("text").attr("class", "katucharts-mappoint-label").attr("x", $).attr("y", I - P - 3).attr("text-anchor", "middle").attr("dominant-baseline", "auto").attr("font-size", m).attr("font-weight", x).attr("fill", g).style("pointer-events", "none").style("text-shadow", this.labelHalo()).text(A);
17350
+ A && s.append("text").attr("class", "katucharts-mappoint-label").attr("x", T).attr("y", I - P - 3).attr("text-anchor", "middle").attr("dominant-baseline", "auto").attr("font-size", m).attr("font-weight", x).attr("fill", g).style("pointer-events", "none").style("text-shadow", this.labelHalo()).text(A);
17345
17351
  }
17346
17352
  });
17347
17353
  }
@@ -17398,13 +17404,13 @@ class kM extends Xt {
17398
17404
  v.name == null && typeof v.from == "string" && typeof v.to == "string" && (v.name = `${v.from} → ${v.to}`);
17399
17405
  const M = r(b), C = r(k);
17400
17406
  if (!M || !C || !isFinite(M[0]) || !isFinite(C[0])) return;
17401
- const L = v.weight ?? v.y ?? v.value ?? 1, _ = Math.max(2, y * (L / p)), $ = v.color || l, { d: I, mid: E, tip: P, tipAngle: S } = this.buildFlowPath(M, C, _, h), w = a.append("path").attr("class", "katucharts-flowmap-link").attr("d", I).attr("fill", $).attr("fill-opacity", u ? 0 : c).attr("stroke", "none").style("cursor", t.cursor || "pointer");
17407
+ const L = v.weight ?? v.y ?? v.value ?? 1, _ = Math.max(2, y * (L / p)), T = v.color || l, { d: I, mid: E, tip: P, tipAngle: S } = this.buildFlowPath(M, C, _, h), w = a.append("path").attr("class", "katucharts-flowmap-link").attr("d", I).attr("fill", T).attr("fill-opacity", u ? 0 : c).attr("stroke", "none").style("cursor", t.cursor || "pointer");
17402
17408
  if (u && w.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c), f) {
17403
- const A = _ * 1.1 + 3, T = a.append("path").attr("class", "katucharts-flowmap-arrow").attr("d", this.arrowHead(P, S, A)).attr("fill", $).attr("fill-opacity", u ? 0 : c).style("pointer-events", "none");
17404
- u && T.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c);
17409
+ const A = _ * 1.1 + 3, $ = a.append("path").attr("class", "katucharts-flowmap-arrow").attr("d", this.arrowHead(P, S, A)).attr("fill", T).attr("fill-opacity", u ? 0 : c).style("pointer-events", "none");
17410
+ u && $.transition().duration(bt).delay(x * 30).ease(pt).attr("fill-opacity", c);
17405
17411
  }
17406
17412
  w.on("mouseover", (A) => {
17407
- var T, R;
17413
+ var $, R;
17408
17414
  rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", Math.min(1, c + 0.3)), this.context.events.emit("point:mouseover", {
17409
17415
  point: m,
17410
17416
  index: x,
@@ -17412,13 +17418,13 @@ class kM extends Xt {
17412
17418
  event: A,
17413
17419
  plotX: E[0],
17414
17420
  plotY: E[1]
17415
- }), (R = (T = v.events) == null ? void 0 : T.mouseOver) == null || R.call(m, A);
17421
+ }), (R = ($ = v.events) == null ? void 0 : $.mouseOver) == null || R.call(m, A);
17416
17422
  }).on("mouseout", (A) => {
17417
- var T, R;
17418
- rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", c), this.context.events.emit("point:mouseout", { point: m, index: x, series: this, event: A }), (R = (T = v.events) == null ? void 0 : T.mouseOut) == null || R.call(m, A);
17423
+ var $, R;
17424
+ rt(A.currentTarget).transition("hover").duration(K).ease(Z).attr("fill-opacity", c), this.context.events.emit("point:mouseout", { point: m, index: x, series: this, event: A }), (R = ($ = v.events) == null ? void 0 : $.mouseOut) == null || R.call(m, A);
17419
17425
  }).on("click", (A) => {
17420
- var T, R, F, D, z, B, H;
17421
- this.context.events.emit("point:click", { point: m, index: x, series: this, event: A }), (R = (T = v.events) == null ? void 0 : T.click) == null || R.call(m, A), (z = (D = (F = t.point) == null ? void 0 : F.events) == null ? void 0 : D.click) == null || z.call(m, A), (H = (B = t.events) == null ? void 0 : B.click) == null || H.call(this, A);
17426
+ var $, R, F, D, z, B, H;
17427
+ this.context.events.emit("point:click", { point: m, index: x, series: this, event: A }), (R = ($ = v.events) == null ? void 0 : $.click) == null || R.call(m, A), (z = (D = (F = t.point) == null ? void 0 : F.events) == null ? void 0 : D.click) == null || z.call(m, A), (H = (B = t.events) == null ? void 0 : B.click) == null || H.call(this, A);
17422
17428
  });
17423
17429
  });
17424
17430
  }
@@ -17432,7 +17438,7 @@ class kM extends Xt {
17432
17438
  const o = e[0] - t[0], s = e[1] - t[1], a = Math.hypot(o, s) || 1, l = -s / a, c = o / a, h = [(t[0] + e[0]) / 2 + l * r * a, (t[1] + e[1]) / 2 + c * r * a], f = 24, u = Math.max(0.6, i * 0.12), d = i / 2, p = [], y = [];
17433
17439
  let g = t;
17434
17440
  for (let k = 0; k <= f; k++) {
17435
- const M = k / f, C = 1 - M, L = C * C * t[0] + 2 * C * M * h[0] + M * M * e[0], _ = C * C * t[1] + 2 * C * M * h[1] + M * M * e[1], $ = L - g[0], I = _ - g[1], E = Math.hypot($, I) || 1, P = -I / E, S = $ / E, w = u + (d - u) * M;
17441
+ const M = k / f, C = 1 - M, L = C * C * t[0] + 2 * C * M * h[0] + M * M * e[0], _ = C * C * t[1] + 2 * C * M * h[1] + M * M * e[1], T = L - g[0], I = _ - g[1], E = Math.hypot(T, I) || 1, P = -I / E, S = T / E, w = u + (d - u) * M;
17436
17442
  p.push([L + P * w, _ + S * w]), y.push([L - P * w, _ - S * w]), g = [L, _];
17437
17443
  }
17438
17444
  const m = 0.25 * t[0] + 0.5 * h[0] + 0.25 * e[0], x = 0.25 * t[1] + 0.5 * h[1] + 0.25 * e[1], v = Math.atan2(e[1] - h[1], e[0] - h[0]);
@@ -17483,36 +17489,36 @@ class SM extends Xt {
17483
17489
  render() {
17484
17490
  var L;
17485
17491
  const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = r.filter((_) => {
17486
- var $;
17487
- return (($ = _.sets) == null ? void 0 : $.length) === 1;
17492
+ var T;
17493
+ return ((T = _.sets) == null ? void 0 : T.length) === 1;
17488
17494
  }), s = r.filter((_) => {
17489
- var $;
17490
- return (($ = _.sets) == null ? void 0 : $.length) >= 2;
17495
+ var T;
17496
+ return ((T = _.sets) == null ? void 0 : T.length) >= 2;
17491
17497
  });
17492
17498
  if (o.length === 0) return;
17493
17499
  const a = t.width / 2, l = t.height / 2, c = t.height / 2 * 0.92, h = Math.max(...o.map((_) => _.value || _.y || 1)), f = this.config.opacity ?? 0.25, u = Math.min(1, f + 0.25), d = 0.4, p = this.config.borderColor, y = this.config.borderWidth ?? 0, g = this.resolveDashStyle(this.config.borderDashStyle), m = this.config.allowPointSelect === !0, x = /* @__PURE__ */ new Map();
17494
17500
  this.layoutSets(o, s, x, a, l, c, h, e, t);
17495
17501
  const v = Array.from(x.values()), b = [];
17496
17502
  for (const _ of o) {
17497
- const $ = x.get(_.sets[0]);
17498
- if (!$) continue;
17499
- let I = $.cx, E = $.cy;
17500
- const P = v.filter((S) => S.id !== $.id);
17503
+ const T = x.get(_.sets[0]);
17504
+ if (!T) continue;
17505
+ let I = T.cx, E = T.cy;
17506
+ const P = v.filter((S) => S.id !== T.id);
17501
17507
  if (P.length > 0) {
17502
17508
  let S = 0, w = 0;
17503
- for (const T of P) {
17504
- const R = $.cx - T.cx, F = $.cy - T.cy, D = Math.sqrt(R * R + F * F) || 1;
17509
+ for (const $ of P) {
17510
+ const R = T.cx - $.cx, F = T.cy - $.cy, D = Math.sqrt(R * R + F * F) || 1;
17505
17511
  S += R / D, w += F / D;
17506
17512
  }
17507
17513
  const A = Math.sqrt(S * S + w * w) || 1;
17508
- I = $.cx + S / A * $.r * 0.7, E = $.cy + w / A * $.r * 0.7;
17514
+ I = T.cx + S / A * T.r * 0.7, E = T.cy + w / A * T.r * 0.7;
17509
17515
  }
17510
17516
  b.push({
17511
17517
  sets: _.sets,
17512
17518
  value: _.value || _.y || 0,
17513
17519
  name: _.name || _.sets[0],
17514
- color: _.color || $.color,
17515
- path: this.circlePath($.cx, $.cy, $.r),
17520
+ color: _.color || T.color,
17521
+ path: this.circlePath(T.cx, T.cy, T.r),
17516
17522
  labelX: I,
17517
17523
  labelY: E,
17518
17524
  data: _,
@@ -17522,11 +17528,11 @@ class SM extends Xt {
17522
17528
  }
17523
17529
  for (const _ of s) {
17524
17530
  if (_.sets.length !== 2) continue;
17525
- const $ = x.get(_.sets[0]), I = x.get(_.sets[1]);
17526
- if (!$ || !I) continue;
17527
- const E = this.lensPath($, I);
17531
+ const T = x.get(_.sets[0]), I = x.get(_.sets[1]);
17532
+ if (!T || !I) continue;
17533
+ const E = this.lensPath(T, I);
17528
17534
  if (!E) continue;
17529
- const P = _.color || this.blendColors($.color, I.color);
17535
+ const P = _.color || this.blendColors(T.color, I.color);
17530
17536
  b.push({
17531
17537
  sets: _.sets,
17532
17538
  value: _.value || _.y || 0,
@@ -17542,11 +17548,11 @@ class SM extends Xt {
17542
17548
  }
17543
17549
  for (const _ of s) {
17544
17550
  if (_.sets.length !== 3) continue;
17545
- const $ = _.sets.map((P) => x.get(P)).filter(Boolean);
17546
- if ($.length < 3) continue;
17547
- const I = this.triIntersectionPath($[0], $[1], $[2]);
17551
+ const T = _.sets.map((P) => x.get(P)).filter(Boolean);
17552
+ if (T.length < 3) continue;
17553
+ const I = this.triIntersectionPath(T[0], T[1], T[2]);
17548
17554
  if (!I) continue;
17549
- const E = _.color || this.blendColors($[0].color, $[1].color, $[2].color);
17555
+ const E = _.color || this.blendColors(T[0].color, T[1].color, T[2].color);
17550
17556
  b.push({
17551
17557
  sets: _.sets,
17552
17558
  value: _.value || _.y || 0,
@@ -17560,14 +17566,14 @@ class SM extends Xt {
17560
17566
  key: [..._.sets].sort().join("_")
17561
17567
  });
17562
17568
  }
17563
- b.sort((_, $) => _.order - $.order);
17569
+ b.sort((_, T) => _.order - T.order);
17564
17570
  const M = (((L = this.config.accessibility) == null ? void 0 : L.point) || {}).descriptionFormatter, C = this.group.selectAll(".katucharts-venn-area").data(b, (_) => _.key).join(
17565
17571
  (_) => {
17566
- const $ = _.append("g").attr(
17572
+ const T = _.append("g").attr(
17567
17573
  "class",
17568
17574
  (I) => `katucharts-venn-area katucharts-venn-${I.sets.length === 1 ? "circle-area" : "intersection-area"}`
17569
17575
  ).attr("data-venn-sets", (I) => I.sets.join("_"));
17570
- return $.append("path"), $;
17576
+ return T.append("path"), T;
17571
17577
  },
17572
17578
  (_) => _,
17573
17579
  (_) => _.remove()
@@ -17578,7 +17584,7 @@ class SM extends Xt {
17578
17584
  ), C.select("path").attr("d", (_) => _.path).attr("fill", (_) => _.color).attr("fill-opacity", (_) => _.sets.length === 1 ? f : 0).attr(
17579
17585
  "stroke",
17580
17586
  (_) => _.sets.length === 1 ? p || _.color : "none"
17581
- ).attr("stroke-width", (_) => _.sets.length === 1 ? y : 0).attr("stroke-dasharray", g).attr("role", "img").attr("aria-label", (_) => M ? M({ name: _.name, value: _.value, sets: _.sets }) : `${_.name}: ${_.value}`).style("cursor", this.config.cursor || "pointer"), C.sort((_, $) => _.order - $.order), C.each(function(_) {
17587
+ ).attr("stroke-width", (_) => _.sets.length === 1 ? y : 0).attr("stroke-dasharray", g).attr("role", "img").attr("aria-label", (_) => M ? M({ name: _.name, value: _.value, sets: _.sets }) : `${_.name}: ${_.value}`).style("cursor", this.config.cursor || "pointer"), C.sort((_, T) => _.order - T.order), C.each(function(_) {
17582
17588
  if (_.sets.length >= 2) {
17583
17589
  const I = this.querySelector("path");
17584
17590
  if (I)
@@ -17588,7 +17594,7 @@ class SM extends Xt {
17588
17594
  } catch {
17589
17595
  }
17590
17596
  }
17591
- }), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(pt).delay((_, $) => $ * Wt).attr("opacity", 1), this.config.enableMouseTracking !== !1 && this.attachEvents(C, b, f, u, d, m), this.renderLabels(b, i ?? !1);
17597
+ }), i && C.select("path").attr("opacity", 0).transition().duration(bt).ease(pt).delay((_, T) => T * Wt).attr("opacity", 1), this.config.enableMouseTracking !== !1 && this.attachEvents(C, b, f, u, d, m), this.renderLabels(b, i ?? !1);
17592
17598
  }
17593
17599
  resolveDashStyle(t) {
17594
17600
  return t && AM[t] || "none";
@@ -17622,7 +17628,7 @@ class SM extends Xt {
17622
17628
  event: h
17623
17629
  }), (m = (g = (y = f.data) == null ? void 0 : y.events) == null ? void 0 : g.mouseOut) == null || m.call(f.data, h);
17624
17630
  }).on("click", (h, f) => {
17625
- var p, y, g, m, x, v, b, k, M, C, L, _, $;
17631
+ var p, y, g, m, x, v, b, k, M, C, L, _, T;
17626
17632
  const u = e.indexOf(f);
17627
17633
  s && (this.selectedIndices.has(u) ? (this.selectedIndices.delete(u), (g = (y = (p = f.data) == null ? void 0 : p.events) == null ? void 0 : y.unselect) == null || g.call(f.data, h)) : (this.selectedIndices.add(u), (v = (x = (m = f.data) == null ? void 0 : m.events) == null ? void 0 : x.select) == null || v.call(f.data, h))), this.context.events.emit("point:click", {
17628
17634
  point: { name: f.name, y: f.value, value: f.value, sets: f.sets },
@@ -17630,7 +17636,7 @@ class SM extends Xt {
17630
17636
  series: this,
17631
17637
  event: h
17632
17638
  }), (M = (k = (b = f.data) == null ? void 0 : b.events) == null ? void 0 : k.click) == null || M.call(f.data, h), (L = (C = this.config.events) == null ? void 0 : C.click) == null || L.call(this, h);
17633
- const d = ($ = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : $.click;
17639
+ const d = (T = (_ = this.config.point) == null ? void 0 : _.events) == null ? void 0 : T.click;
17634
17640
  d && d.call(
17635
17641
  { ...f.data, sets: f.sets, name: f.name, value: f.value },
17636
17642
  h
@@ -17675,7 +17681,7 @@ class SM extends Xt {
17675
17681
  ), d = /* @__PURE__ */ new Map();
17676
17682
  for (const w of e) {
17677
17683
  if (((P = w.sets) == null ? void 0 : P.length) !== 2) continue;
17678
- const [A, T] = w.sets, R = f.indexOf(A), F = f.indexOf(T);
17684
+ const [A, $] = w.sets, R = f.indexOf(A), F = f.indexOf($);
17679
17685
  if (R < 0 || F < 0) continue;
17680
17686
  const D = w.value || w.y || 0;
17681
17687
  if (D <= 0)
@@ -17689,8 +17695,8 @@ class SM extends Xt {
17689
17695
  for (const w of e) {
17690
17696
  if (((S = w.sets) == null ? void 0 : S.length) !== 2) continue;
17691
17697
  const A = w.value || w.y || 0;
17692
- for (const T of w.sets) {
17693
- const R = f.indexOf(T);
17698
+ for (const $ of w.sets) {
17699
+ const R = f.indexOf($);
17694
17700
  R >= 0 && (g[R] += A);
17695
17701
  }
17696
17702
  }
@@ -17698,7 +17704,7 @@ class SM extends Xt {
17698
17704
  p[m[0]] = [0, 0], y.add(m[0]);
17699
17705
  for (let w = 1; w < h; w++) {
17700
17706
  const A = m[w];
17701
- let T = [0, 0], R = 1 / 0;
17707
+ let $ = [0, 0], R = 1 / 0;
17702
17708
  const F = [];
17703
17709
  for (const D of y) {
17704
17710
  const z = D < A ? `${D}-${A}` : `${A}-${D}`, B = d.get(z) ?? (u[D] + u[A]) * 1.1, [H, J] = p[D];
@@ -17713,21 +17719,21 @@ class SM extends Xt {
17713
17719
  const J = H < A ? `${H}-${A}` : `${A}-${H}`, X = d.get(J) ?? (u[H] + u[A]) * 1.1, j = Math.sqrt((D - p[H][0]) ** 2 + (z - p[H][1]) ** 2);
17714
17720
  B += (j - X) ** 2;
17715
17721
  }
17716
- B < R && (R = B, T = [D, z]);
17722
+ B < R && (R = B, $ = [D, z]);
17717
17723
  }
17718
- p[A] = T, y.add(A);
17724
+ p[A] = $, y.add(A);
17719
17725
  }
17720
17726
  h >= 3 && this.optimizePositions(p, u, d, h);
17721
17727
  let x = 1 / 0, v = -1 / 0, b = 1 / 0, k = -1 / 0;
17722
17728
  for (let w = 0; w < h; w++)
17723
17729
  x = Math.min(x, p[w][0] - u[w]), v = Math.max(v, p[w][0] + u[w]), b = Math.min(b, p[w][1] - u[w]), k = Math.max(k, p[w][1] + u[w]);
17724
- const M = v - x || 1, C = k - b || 1, L = c ? c.width * 0.95 : s * 2, _ = c ? c.height * 0.95 : s * 2, $ = Math.min(L / M, _ / C), I = (x + v) / 2, E = (b + k) / 2;
17730
+ const M = v - x || 1, C = k - b || 1, L = c ? c.width * 0.95 : s * 2, _ = c ? c.height * 0.95 : s * 2, T = Math.min(L / M, _ / C), I = (x + v) / 2, E = (b + k) / 2;
17725
17731
  for (let w = 0; w < h; w++) {
17726
- const A = r + (p[w][0] - I) * $, T = o + (p[w][1] - E) * $, R = u[w] * $;
17732
+ const A = r + (p[w][0] - I) * T, $ = o + (p[w][1] - E) * T, R = u[w] * T;
17727
17733
  i.set(f[w], {
17728
17734
  id: f[w],
17729
17735
  cx: A,
17730
- cy: T,
17736
+ cy: $,
17731
17737
  r: R,
17732
17738
  color: t[w].color || Nu[w % Nu.length]
17733
17739
  });
@@ -17958,9 +17964,9 @@ class PM extends Xt {
17958
17964
  k.append("rect").attr("height", m).attr("rx", a).attr("width", (L) => e ? 0 : Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), k.append("text").attr("class", "katucharts-race-label").attr("x", 6).attr("y", m / 2).attr("dy", "0.35em").attr("fill", "#fff").attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").text((L) => L.name), k.append("text").attr("class", "katucharts-race-value").attr("y", m / 2).attr("dy", "0.35em").attr("fill", Pe).attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").attr("data-value", (L) => L.value).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).text((L) => L.value.toLocaleString());
17959
17965
  const M = k.merge(b);
17960
17966
  c > 0 ? (M.transition().duration(c).ease(fr).attr("transform", (L, _) => `translate(0,${_ * x})`).style("opacity", 1), M.select("rect").transition().duration(c).ease(fr).attr("width", (L) => Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), M.select(".katucharts-race-value").transition().duration(c).ease(fr).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).tween("text", function(L) {
17961
- const _ = this, $ = parseFloat(_.getAttribute("data-value") || "0"), I = L.value;
17967
+ const _ = this, T = parseFloat(_.getAttribute("data-value") || "0"), I = L.value;
17962
17968
  return (E) => {
17963
- const P = Math.round($ + (I - $) * E);
17969
+ const P = Math.round(T + (I - T) * E);
17964
17970
  _.textContent = P.toLocaleString(), _.setAttribute("data-value", String(P));
17965
17971
  };
17966
17972
  })) : (M.attr("transform", (L, _) => `translate(0,${_ * x})`).style("opacity", 1), M.select("rect").attr("width", (L) => Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), M.select(".katucharts-race-value").attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).attr("data-value", (L) => L.value).text((L) => L.value.toLocaleString())), M.select(".katucharts-race-label").style(
@@ -18043,10 +18049,10 @@ class EM extends Xt {
18043
18049
  super(t), t.clip = !1;
18044
18050
  }
18045
18051
  render() {
18046
- var _, $, I;
18052
+ var _, T, I;
18047
18053
  const { plotArea: t, colors: e } = this.context, i = this.data || [];
18048
18054
  if (!i.length) return;
18049
- const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = (($ = f.style) == null ? void 0 : $.fontSize) || Mt, d = f.color || ((I = f.style) == null ? void 0 : I.color) || Pe, p = this.buildRoot(i);
18055
+ const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = ((T = f.style) == null ? void 0 : T.fontSize) || Mt, d = f.color || ((I = f.style) == null ? void 0 : I.color) || Pe, p = this.buildRoot(i);
18050
18056
  if (!p) return;
18051
18057
  const y = r === "horizontal" ? [t.height, t.width] : [t.width, t.height], g = c ? Ew() : rk();
18052
18058
  g.size(y), g(p);
@@ -18093,23 +18099,23 @@ class TM extends Xt {
18093
18099
  var b, k, M, C, L;
18094
18100
  const { plotArea: t, colors: e } = this.context, i = this.data || [];
18095
18101
  if (!i.length) return;
18096
- const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) || Pe, h = [...i].filter((_) => _ && _.name && typeof _.weight == "number" && _.weight > 0).sort((_, $) => $.weight - _.weight);
18102
+ const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) || Pe, h = [...i].filter((_) => _ && _.name && typeof _.weight == "number" && _.weight > 0).sort((_, T) => T.weight - _.weight);
18097
18103
  if (!h.length) return;
18098
18104
  const f = h[h.length - 1].weight, u = h[0].weight, d = (_) => {
18099
18105
  if (u === f) return (r + o) / 2;
18100
- const $ = (_ - f) / (u - f);
18101
- return r + $ * (o - r);
18106
+ const T = (_ - f) / (u - f);
18107
+ return r + T * (o - r);
18102
18108
  }, p = t.width / 2, y = t.height / 2, g = [], m = this.group.append("g").attr("class", "katucharts-wordcloud"), { measure: x, dispose: v } = this.createMeasurer(m.node(), l);
18103
18109
  try {
18104
- h.forEach((_, $) => {
18105
- const I = d(_.weight), E = a[$ % a.length] ?? 0, P = x(_.name, I), S = P.width, w = P.height, A = this.findSpiralSpot(p, y, S, w, E, g, t.width, t.height);
18110
+ h.forEach((_, T) => {
18111
+ const I = d(_.weight), E = a[T % a.length] ?? 0, P = x(_.name, I), S = P.width, w = P.height, A = this.findSpiralSpot(p, y, S, w, E, g, t.width, t.height);
18106
18112
  A && g.push({ x: A.x, y: A.y, width: S, height: w, word: _, rotation: E, fontSize: I });
18107
18113
  });
18108
18114
  } finally {
18109
18115
  v();
18110
18116
  }
18111
- g.forEach((_, $) => {
18112
- const I = _.word.color || e[$ % Math.max(1, e.length)] || c;
18117
+ g.forEach((_, T) => {
18118
+ const I = _.word.color || e[T % Math.max(1, e.length)] || c;
18113
18119
  m.append("text").attr("x", _.x).attr("y", _.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("transform", _.rotation ? `rotate(${_.rotation},${_.x},${_.y})` : null).attr("font-size", _.fontSize).attr("font-family", l).attr("fill", I).style("pointer-events", "none").text(_.word.name);
18114
18120
  }), this.context.animate && m.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
18115
18121
  }
@@ -18162,12 +18168,12 @@ class LM extends Xt {
18162
18168
  return "katucharts-candlestick";
18163
18169
  }
18164
18170
  render() {
18165
- var L, _, $, I, E, P, S, w;
18166
- const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.context.animate, o = this.data, s = this.applyDataGrouping(o), a = this.config.pointRange, l = this.config.groupPadding ?? 0.2, c = this.config.pointPadding ?? 0.1, h = l + c, f = this.config.maxPointWidth ?? 1 / 0, u = a ? Math.max(1, Math.min(f, i.width / Math.max(1, ((L = t.domain) == null ? void 0 : L[1]) - ((_ = t.domain) == null ? void 0 : _[0]) || s.length) * a * (1 - h))) : Math.max(1, Math.min(f, i.width / s.length * (1 - h))), d = this.config.pointWidth ?? u, p = this.config.color || "#f45b5b", y = this.config.upColor || "#2f7ed8", g = this.config.lineColor || p, m = this.config.upLineColor || y, x = this.config.lineWidth ?? 1, v = ((I = ($ = this.config.states) == null ? void 0 : $.inactive) == null ? void 0 : I.opacity) ?? 0.4, b = this.config.allowPointSelect === !0, k = (P = (E = this.config.states) == null ? void 0 : E.select) == null ? void 0 : P.color, M = (w = (S = this.config.states) == null ? void 0 : S.select) == null ? void 0 : w.borderColor, C = [];
18171
+ var L, _, T, I, E, P, S, w;
18172
+ const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.context.animate, o = this.data, s = this.applyDataGrouping(o), a = this.config.pointRange, l = this.config.groupPadding ?? 0.2, c = this.config.pointPadding ?? 0.1, h = l + c, f = this.config.maxPointWidth ?? 1 / 0, u = a ? Math.max(1, Math.min(f, i.width / Math.max(1, ((L = t.domain) == null ? void 0 : L[1]) - ((_ = t.domain) == null ? void 0 : _[0]) || s.length) * a * (1 - h))) : Math.max(1, Math.min(f, i.width / s.length * (1 - h))), d = this.config.pointWidth ?? u, p = this.config.color || "#f45b5b", y = this.config.upColor || "#2f7ed8", g = this.config.lineColor || p, m = this.config.upLineColor || y, x = this.config.lineWidth ?? 1, v = ((I = (T = this.config.states) == null ? void 0 : T.inactive) == null ? void 0 : I.opacity) ?? 0.4, b = this.config.allowPointSelect === !0, k = (P = (E = this.config.states) == null ? void 0 : E.select) == null ? void 0 : P.color, M = (w = (S = this.config.states) == null ? void 0 : S.select) == null ? void 0 : w.borderColor, C = [];
18167
18173
  for (let A = 0; A < s.length; A++) {
18168
- const T = s[A];
18169
- if (T.y === null && T.open === void 0) continue;
18170
- const R = T.open ?? T.y ?? 0, F = T.high ?? R, D = T.low ?? R, z = T.close ?? R, B = t.getPixelForValue(T.x ?? A), H = z >= R, J = this.getCandleStyle({
18174
+ const $ = s[A];
18175
+ if ($.y === null && $.open === void 0) continue;
18176
+ const R = $.open ?? $.y ?? 0, F = $.high ?? R, D = $.low ?? R, z = $.close ?? R, B = t.getPixelForValue($.x ?? A), H = z >= R, J = this.getCandleStyle({
18171
18177
  open: R,
18172
18178
  high: F,
18173
18179
  low: D,
@@ -18193,24 +18199,24 @@ class LM extends Xt {
18193
18199
  W.select("rect").transition("size").duration(K).ease(Z).attr("x", B - d * 0.7).attr("width", d * 1.4), W.select("line").transition("size").duration(K).ease(Z).attr("stroke-width", x + ft), W.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), C.forEach((st) => st.interrupt("highlight")), C.forEach((st) => st.attr("opacity", 1)), C.forEach((st, wt) => {
18194
18200
  wt !== A && st.transition("highlight").duration(K).ease(Z).attr("opacity", v);
18195
18201
  }), this.context.events.emit("point:mouseover", {
18196
- point: { ...T, open: R, high: F, low: D, close: z },
18202
+ point: { ...$, open: R, high: F, low: D, close: z },
18197
18203
  index: A,
18198
18204
  series: this,
18199
18205
  event: it,
18200
18206
  plotX: B,
18201
18207
  plotY: e.getPixelForValue((F + D) / 2)
18202
- }), (q = (ot = T.events) == null ? void 0 : ot.mouseOver) == null || q.call(T, it);
18208
+ }), (q = (ot = $.events) == null ? void 0 : ot.mouseOver) == null || q.call($, it);
18203
18209
  }).on("mouseout", (it) => {
18204
18210
  var ft, dt;
18205
18211
  W.select("rect").transition("size").duration(K).ease(Z).attr("x", B - d / 2).attr("width", d), W.select("line").transition("size").duration(K).ease(Z).attr("stroke-width", x), W.style("filter", ""), C.forEach((at) => at.interrupt("highlight")), C.forEach((at) => at.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", {
18206
- point: T,
18212
+ point: $,
18207
18213
  index: A,
18208
18214
  series: this,
18209
18215
  event: it
18210
- }), (dt = (ft = T.events) == null ? void 0 : ft.mouseOut) == null || dt.call(T, it);
18216
+ }), (dt = (ft = $.events) == null ? void 0 : ft.mouseOut) == null || dt.call($, it);
18211
18217
  }).on("click", (it) => {
18212
18218
  var ft, dt, at, ot, q, st, wt, Ct;
18213
- b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft = T.events) == null ? void 0 : ft.unselect) == null || dt.call(T, it)) : (this.selectedIndices.add(A), W.select("rect").attr("stroke", M || "#000").attr("stroke-width", k ? 2 : x + 1), k && W.select("rect").attr("fill", k), (ot = (at = T.events) == null ? void 0 : at.select) == null || ot.call(T, it))), this.context.events.emit("point:click", { point: T, index: A, series: this, event: it }), (st = (q = T.events) == null ? void 0 : q.click) == null || st.call(T, it), (Ct = (wt = this.config.events) == null ? void 0 : wt.click) == null || Ct.call(this, it);
18219
+ b && (this.selectedIndices.has(A) ? (this.selectedIndices.delete(A), W.select("rect").attr("stroke-width", x), (dt = (ft = $.events) == null ? void 0 : ft.unselect) == null || dt.call($, it)) : (this.selectedIndices.add(A), W.select("rect").attr("stroke", M || "#000").attr("stroke-width", k ? 2 : x + 1), k && W.select("rect").attr("fill", k), (ot = (at = $.events) == null ? void 0 : at.select) == null || ot.call($, it))), this.context.events.emit("point:click", { point: $, index: A, series: this, event: it }), (st = (q = $.events) == null ? void 0 : q.click) == null || st.call($, it), (Ct = (wt = this.config.events) == null ? void 0 : wt.click) == null || Ct.call(this, it);
18214
18220
  });
18215
18221
  }
18216
18222
  this.renderCandlestickLabels(s, t, e);
@@ -18290,8 +18296,8 @@ class IM extends Xt {
18290
18296
  const y = p.open ?? p.y ?? 0, g = p.high ?? y, m = p.low ?? y, x = p.close ?? y, v = t.getPixelForValue(p.x ?? d), b = x >= y ? l : a, k = this.group.append("g").attr("class", "katucharts-ohlc").style("cursor", this.config.cursor || "pointer");
18291
18297
  h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Ce(d, 0, Wt, o.length)).attr("opacity", 1), k.append("line").attr("x1", v).attr("x2", v).attr("y1", e.getPixelForValue(g)).attr("y2", e.getPixelForValue(m)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v - s).attr("x2", v).attr("y1", e.getPixelForValue(y)).attr("y2", e.getPixelForValue(y)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v).attr("x2", v + s).attr("y1", e.getPixelForValue(x)).attr("y2", e.getPixelForValue(x)).attr("stroke", b).attr("stroke-width", 1.5), this.config.enableMouseTracking !== !1 && k.on("mouseover", (M) => {
18292
18298
  var C, L;
18293
- k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_, $) => {
18294
- $ !== d && _.transition("highlight").duration(K).ease(Z).attr("opacity", c);
18299
+ k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_, T) => {
18300
+ T !== d && _.transition("highlight").duration(K).ease(Z).attr("opacity", c);
18295
18301
  }), this.context.events.emit("point:mouseover", {
18296
18302
  point: { ...p, open: y, high: g, low: m, close: x },
18297
18303
  index: d,
@@ -18304,8 +18310,8 @@ class IM extends Xt {
18304
18310
  var C, L;
18305
18311
  k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 1.5), k.style("filter", ""), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.transition("highlight").duration(K).ease(Z).attr("opacity", 1)), this.context.events.emit("point:mouseout", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.mouseOut) == null || L.call(p, M);
18306
18312
  }).on("click", (M) => {
18307
- var C, L, _, $;
18308
- this.context.events.emit("point:click", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.click) == null || L.call(p, M), ($ = (_ = this.config.events) == null ? void 0 : _.click) == null || $.call(this, M);
18313
+ var C, L, _, T;
18314
+ this.context.events.emit("point:click", { point: p, index: d, series: this, event: M }), (L = (C = p.events) == null ? void 0 : C.click) == null || L.call(p, M), (T = (_ = this.config.events) == null ? void 0 : _.click) == null || T.call(this, M);
18309
18315
  });
18310
18316
  }
18311
18317
  }
@@ -18439,11 +18445,11 @@ function NM() {
18439
18445
  function y({ nodes: w, links: A }) {
18440
18446
  for (const [R, F] of w.entries())
18441
18447
  F.index = R, F.sourceLinks = [], F.targetLinks = [];
18442
- const T = new Map(w.map((R, F) => [a(R, F, w), R]));
18448
+ const $ = new Map(w.map((R, F) => [a(R, F, w), R]));
18443
18449
  for (const [R, F] of A.entries()) {
18444
18450
  F.index = R;
18445
18451
  let { source: D, target: z } = F;
18446
- typeof D != "object" && (D = F.source = Xu(T, D)), typeof z != "object" && (z = F.target = Xu(T, z)), D.sourceLinks.push(F), z.targetLinks.push(F);
18452
+ typeof D != "object" && (D = F.source = Xu($, D)), typeof z != "object" && (z = F.target = Xu($, z)), D.sourceLinks.push(F), z.targetLinks.push(F);
18447
18453
  }
18448
18454
  if (h != null)
18449
18455
  for (const { sourceLinks: R, targetLinks: F } of w)
@@ -18455,66 +18461,66 @@ function NM() {
18455
18461
  }
18456
18462
  function m({ nodes: w }) {
18457
18463
  const A = w.length;
18458
- let T = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
18459
- for (; T.size; ) {
18460
- for (const D of T) {
18464
+ let $ = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
18465
+ for (; $.size; ) {
18466
+ for (const D of $) {
18461
18467
  D.depth = F;
18462
18468
  for (const { target: z } of D.sourceLinks)
18463
18469
  R.add(z);
18464
18470
  }
18465
18471
  if (++F > A) throw new Error("circular link");
18466
- T = R, R = /* @__PURE__ */ new Set();
18472
+ $ = R, R = /* @__PURE__ */ new Set();
18467
18473
  }
18468
18474
  }
18469
18475
  function x({ nodes: w }) {
18470
18476
  const A = w.length;
18471
- let T = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
18472
- for (; T.size; ) {
18473
- for (const D of T) {
18477
+ let $ = new Set(w), R = /* @__PURE__ */ new Set(), F = 0;
18478
+ for (; $.size; ) {
18479
+ for (const D of $) {
18474
18480
  D.height = F;
18475
18481
  for (const { source: z } of D.targetLinks)
18476
18482
  R.add(z);
18477
18483
  }
18478
18484
  if (++F > A) throw new Error("circular link");
18479
- T = R, R = /* @__PURE__ */ new Set();
18485
+ $ = R, R = /* @__PURE__ */ new Set();
18480
18486
  }
18481
18487
  }
18482
18488
  function v({ nodes: w }) {
18483
- const A = Vu(w, (F) => F.depth) + 1, T = (e - n - r) / (A - 1), R = new Array(A);
18489
+ const A = Vu(w, (F) => F.depth) + 1, $ = (e - n - r) / (A - 1), R = new Array(A);
18484
18490
  for (const F of w) {
18485
18491
  const D = Math.max(0, Math.min(A - 1, Math.floor(l.call(null, F, A))));
18486
- F.layer = D, F.x0 = n + D * T, F.x1 = F.x0 + r, R[D] ? R[D].push(F) : R[D] = [F];
18492
+ F.layer = D, F.x0 = n + D * $, F.x1 = F.x0 + r, R[D] ? R[D].push(F) : R[D] = [F];
18487
18493
  }
18488
18494
  if (c) for (const F of R)
18489
18495
  F.sort(c);
18490
18496
  return R;
18491
18497
  }
18492
18498
  function b(w) {
18493
- const A = RM(w, (T) => (i - t - (T.length - 1) * s) / ya(T, xa));
18494
- for (const T of w) {
18499
+ const A = RM(w, ($) => (i - t - ($.length - 1) * s) / ya($, xa));
18500
+ for (const $ of w) {
18495
18501
  let R = t;
18496
- for (const F of T) {
18502
+ for (const F of $) {
18497
18503
  F.y0 = R, F.y1 = R + F.value * A, R = F.y1 + s;
18498
18504
  for (const D of F.sourceLinks)
18499
18505
  D.width = D.value * A;
18500
18506
  }
18501
- R = (i - R + s) / (T.length + 1);
18502
- for (let F = 0; F < T.length; ++F) {
18503
- const D = T[F];
18507
+ R = (i - R + s) / ($.length + 1);
18508
+ for (let F = 0; F < $.length; ++F) {
18509
+ const D = $[F];
18504
18510
  D.y0 += R * (F + 1), D.y1 += R * (F + 1);
18505
18511
  }
18506
- E(T);
18512
+ E($);
18507
18513
  }
18508
18514
  }
18509
18515
  function k(w) {
18510
18516
  const A = v(w);
18511
- s = Math.min(o, (i - t) / (Vu(A, (T) => T.length) - 1)), b(A);
18512
- for (let T = 0; T < d; ++T) {
18513
- const R = Math.pow(0.99, T), F = Math.max(1 - R, (T + 1) / d);
18517
+ s = Math.min(o, (i - t) / (Vu(A, ($) => $.length) - 1)), b(A);
18518
+ for (let $ = 0; $ < d; ++$) {
18519
+ const R = Math.pow(0.99, $), F = Math.max(1 - R, ($ + 1) / d);
18514
18520
  C(A, R, F), M(A, R, F);
18515
18521
  }
18516
18522
  }
18517
- function M(w, A, T) {
18523
+ function M(w, A, $) {
18518
18524
  for (let R = 1, F = w.length; R < F; ++R) {
18519
18525
  const D = w[R];
18520
18526
  for (const z of D) {
@@ -18527,10 +18533,10 @@ function NM() {
18527
18533
  let J = (B / H - z.y0) * A;
18528
18534
  z.y0 += J, z.y1 += J, I(z);
18529
18535
  }
18530
- c === void 0 && D.sort(hs), L(D, T);
18536
+ c === void 0 && D.sort(hs), L(D, $);
18531
18537
  }
18532
18538
  }
18533
- function C(w, A, T) {
18539
+ function C(w, A, $) {
18534
18540
  for (let R = w.length, F = R - 2; F >= 0; --F) {
18535
18541
  const D = w[F];
18536
18542
  for (const z of D) {
@@ -18543,61 +18549,61 @@ function NM() {
18543
18549
  let J = (B / H - z.y0) * A;
18544
18550
  z.y0 += J, z.y1 += J, I(z);
18545
18551
  }
18546
- c === void 0 && D.sort(hs), L(D, T);
18552
+ c === void 0 && D.sort(hs), L(D, $);
18547
18553
  }
18548
18554
  }
18549
18555
  function L(w, A) {
18550
- const T = w.length >> 1, R = w[T];
18551
- $(w, R.y0 - s, T - 1, A), _(w, R.y1 + s, T + 1, A), $(w, i, w.length - 1, A), _(w, t, 0, A);
18556
+ const $ = w.length >> 1, R = w[$];
18557
+ T(w, R.y0 - s, $ - 1, A), _(w, R.y1 + s, $ + 1, A), T(w, i, w.length - 1, A), _(w, t, 0, A);
18552
18558
  }
18553
- function _(w, A, T, R) {
18554
- for (; T < w.length; ++T) {
18555
- const F = w[T], D = (A - F.y0) * R;
18559
+ function _(w, A, $, R) {
18560
+ for (; $ < w.length; ++$) {
18561
+ const F = w[$], D = (A - F.y0) * R;
18556
18562
  D > 1e-6 && (F.y0 += D, F.y1 += D), A = F.y1 + s;
18557
18563
  }
18558
18564
  }
18559
- function $(w, A, T, R) {
18560
- for (; T >= 0; --T) {
18561
- const F = w[T], D = (F.y1 - A) * R;
18565
+ function T(w, A, $, R) {
18566
+ for (; $ >= 0; --$) {
18567
+ const F = w[$], D = (F.y1 - A) * R;
18562
18568
  D > 1e-6 && (F.y0 -= D, F.y1 -= D), A = F.y0 - s;
18563
18569
  }
18564
18570
  }
18565
18571
  function I({ sourceLinks: w, targetLinks: A }) {
18566
18572
  if (h === void 0) {
18567
- for (const { source: { sourceLinks: T } } of A)
18568
- T.sort(Yu);
18569
- for (const { target: { targetLinks: T } } of w)
18570
- T.sort(Gu);
18573
+ for (const { source: { sourceLinks: $ } } of A)
18574
+ $.sort(Yu);
18575
+ for (const { target: { targetLinks: $ } } of w)
18576
+ $.sort(Gu);
18571
18577
  }
18572
18578
  }
18573
18579
  function E(w) {
18574
18580
  if (h === void 0)
18575
- for (const { sourceLinks: A, targetLinks: T } of w)
18576
- A.sort(Yu), T.sort(Gu);
18581
+ for (const { sourceLinks: A, targetLinks: $ } of w)
18582
+ A.sort(Yu), $.sort(Gu);
18577
18583
  }
18578
18584
  function P(w, A) {
18579
- let T = w.y0 - (w.sourceLinks.length - 1) * s / 2;
18585
+ let $ = w.y0 - (w.sourceLinks.length - 1) * s / 2;
18580
18586
  for (const { target: R, width: F } of w.sourceLinks) {
18581
18587
  if (R === A) break;
18582
- T += F + s;
18588
+ $ += F + s;
18583
18589
  }
18584
18590
  for (const { source: R, width: F } of A.targetLinks) {
18585
18591
  if (R === w) break;
18586
- T -= F;
18592
+ $ -= F;
18587
18593
  }
18588
- return T;
18594
+ return $;
18589
18595
  }
18590
18596
  function S(w, A) {
18591
- let T = A.y0 - (A.targetLinks.length - 1) * s / 2;
18597
+ let $ = A.y0 - (A.targetLinks.length - 1) * s / 2;
18592
18598
  for (const { source: R, width: F } of A.targetLinks) {
18593
18599
  if (R === w) break;
18594
- T += F + s;
18600
+ $ += F + s;
18595
18601
  }
18596
18602
  for (const { target: R, width: F } of w.sourceLinks) {
18597
18603
  if (R === A) break;
18598
- T -= F;
18604
+ $ -= F;
18599
18605
  }
18600
- return T;
18606
+ return $;
18601
18607
  }
18602
18608
  return p;
18603
18609
  }
@@ -18726,12 +18732,12 @@ class iA extends Xt {
18726
18732
  this.group.selectAll("rect, path, text").interrupt("enter").interrupt("highlight");
18727
18733
  const { nodes: s, links: a } = this.buildGraph();
18728
18734
  if (s.length === 0) return;
18729
- const l = t.width < QM, c = t.width < tA, h = t.width < eA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((me = C.style) == null ? void 0 : me.fontSize) || Mt, $ = nA(_), I = c ? Math.min($, 10) : l ? Math.min($, 12) : $, E = `${I}px`, P = C.color || ((Je = C.style) == null ? void 0 : Je.color) || this.autoLabelColor(), S = I * 0.62, w = (V) => C.formatter ? String(C.formatter.call({
18735
+ const l = t.width < QM, c = t.width < tA, h = t.width < eA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((me = C.style) == null ? void 0 : me.fontSize) || Mt, T = nA(_), I = c ? Math.min(T, 10) : l ? Math.min(T, 12) : T, E = `${I}px`, P = C.color || ((Je = C.style) == null ? void 0 : Je.color) || this.autoLabelColor(), S = I * 0.62, w = (V) => C.formatter ? String(C.formatter.call({
18730
18736
  point: { name: V.name || V.id, y: V.value },
18731
18737
  series: { name: this.config.name },
18732
18738
  x: V.name || V.id,
18733
18739
  y: V.value
18734
- }) ?? "") : String(V.name || V.id || ""), A = (V) => V.length * S, T = (V, tt, lt = 2) => {
18740
+ }) ?? "") : String(V.name || V.id || ""), A = (V) => V.length * S, $ = (V, tt, lt = 2) => {
18735
18741
  if (tt <= 0) return "";
18736
18742
  if (A(V) <= tt) return V;
18737
18743
  const Lt = Math.floor(tt / S) - 1;
@@ -18979,18 +18985,18 @@ class iA extends Xt {
18979
18985
  Et.textContent = "";
18980
18986
  return;
18981
18987
  }
18982
- xn > sr && (ne = T(ne, sr, 1), Et.textContent = ne);
18988
+ xn > sr && (ne = $(ne, sr, 1), Et.textContent = ne);
18983
18989
  return;
18984
18990
  }
18985
18991
  const ti = (ut.x0 + ut.x1) / 2, Yn = ti - xn / 2, Ai = ti + xn / 2;
18986
18992
  if (Ai <= t.width && Yn >= 0) return;
18987
18993
  const or = X(ut), Ep = Gn.get(or + 1) ?? t.width, Tp = Cn.get(or - 1) ?? 0, Es = Ep - ut.x1 - 4, Ts = ut.x0 - Tp - 4;
18988
18994
  if (Yn < 0 && Es > I * 1.5) {
18989
- Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Es && (Et.textContent = T(ne, Es));
18995
+ Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Es && (Et.textContent = $(ne, Es));
18990
18996
  return;
18991
18997
  }
18992
18998
  if (Ai > t.width && Ts > I * 1.5) {
18993
- Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > Ts && (Et.textContent = T(ne, Ts));
18999
+ Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > Ts && (Et.textContent = $(ne, Ts));
18994
19000
  return;
18995
19001
  }
18996
19002
  const ml = 2 * Math.min(ti, t.width - ti) - 4;
@@ -18998,7 +19004,7 @@ class iA extends Xt {
18998
19004
  Et.textContent = "";
18999
19005
  return;
19000
19006
  }
19001
- Et.textContent = T(ne, ml);
19007
+ Et.textContent = $(ne, ml);
19002
19008
  });
19003
19009
  const pl = [], Cp = [...q.nodes].sort((ut, Et) => (Et.value ?? 0) - (ut.value ?? 0)), gl = /* @__PURE__ */ new Map();
19004
19010
  Q.each(function(ut) {
@@ -19054,13 +19060,13 @@ class iA extends Xt {
19054
19060
  })) : 1, g = r > 0 ? (s - o - c) / r : 0;
19055
19061
  for (const [v, b] of f) {
19056
19062
  const k = b.some((_) => typeof _.offset == "number");
19057
- b.sort((_, $) => k ? (_.offset ?? 0) - ($.offset ?? 0) || (_.y0 ?? 0) - ($.y0 ?? 0) || String(_.name ?? _.id).localeCompare(String($.name ?? $.id)) : ($.value ?? 0) - (_.value ?? 0) || String(_.name ?? _.id).localeCompare(String($.name ?? $.id)));
19058
- const M = b.reduce((_, $) => _ + Math.max(1, ($.value ?? 0) * y), 0) + Math.max(0, b.length - 1) * d;
19063
+ b.sort((_, T) => k ? (_.offset ?? 0) - (T.offset ?? 0) || (_.y0 ?? 0) - (T.y0 ?? 0) || String(_.name ?? _.id).localeCompare(String(T.name ?? T.id)) : (T.value ?? 0) - (_.value ?? 0) || String(_.name ?? _.id).localeCompare(String(T.name ?? T.id)));
19064
+ const M = b.reduce((_, T) => _ + Math.max(1, (T.value ?? 0) * y), 0) + Math.max(0, b.length - 1) * d;
19059
19065
  let C = Math.max(0, (a - M) / 2);
19060
19066
  const L = o + v * g;
19061
19067
  for (const _ of b) {
19062
- const $ = Math.max(1, (_.value ?? 0) * y);
19063
- _.x0 = L, _.x1 = L + c, _.y0 = C, _.y1 = C + $, C = _.y1 + d;
19068
+ const T = Math.max(1, (_.value ?? 0) * y);
19069
+ _.x0 = L, _.x1 = L + c, _.y0 = C, _.y1 = C + T, C = _.y1 + d;
19064
19070
  }
19065
19071
  }
19066
19072
  for (const v of t.links)
@@ -19362,15 +19368,15 @@ function MA(n) {
19362
19368
  for (f = fl(t, wA, kA).visitAfter(a), c = 0; c < h; ++c)
19363
19369
  u = t[c], y = e[u.index], g = y * y, d = u.x + u.vx, p = u.y + u.vy, f.visit(x);
19364
19370
  function x(v, b, k, M, C) {
19365
- var L = v.data, _ = v.r, $ = y + _;
19371
+ var L = v.data, _ = v.r, T = y + _;
19366
19372
  if (L) {
19367
19373
  if (L.index > u.index) {
19368
19374
  var I = d - L.x - L.vx, E = p - L.y - L.vy, P = I * I + E * E;
19369
- P < $ * $ && (I === 0 && (I = Zn(i), P += I * I), E === 0 && (E = Zn(i), P += E * E), P = ($ - (P = Math.sqrt(P))) / P * r, u.vx += (I *= P) * ($ = (_ *= _) / (g + _)), u.vy += (E *= P) * $, L.vx -= I * ($ = 1 - $), L.vy -= E * $);
19375
+ P < T * T && (I === 0 && (I = Zn(i), P += I * I), E === 0 && (E = Zn(i), P += E * E), P = (T - (P = Math.sqrt(P))) / P * r, u.vx += (I *= P) * (T = (_ *= _) / (g + _)), u.vy += (E *= P) * T, L.vx -= I * (T = 1 - T), L.vy -= E * T);
19370
19376
  }
19371
19377
  return;
19372
19378
  }
19373
- return b > d + $ || M < d - $ || k > p + $ || C < p - $;
19379
+ return b > d + T || M < d - T || k > p + T || C < p - T;
19374
19380
  }
19375
19381
  }
19376
19382
  function a(c) {
@@ -19410,8 +19416,8 @@ function SA(n) {
19410
19416
  }
19411
19417
  function u(g) {
19412
19418
  for (var m = 0, x = n.length; m < h; ++m)
19413
- for (var v = 0, b, k, M, C, L, _, $; v < x; ++v)
19414
- b = n[v], k = b.source, M = b.target, C = M.x + M.vx - k.x - k.vx || Zn(c), L = M.y + M.vy - k.y - k.vy || Zn(c), _ = Math.sqrt(C * C + L * L), _ = (_ - o[v]) / _ * g * i[v], C *= _, L *= _, M.vx -= C * ($ = l[v]), M.vy -= L * $, k.vx += C * ($ = 1 - $), k.vy += L * $;
19419
+ for (var v = 0, b, k, M, C, L, _, T; v < x; ++v)
19420
+ b = n[v], k = b.source, M = b.target, C = M.x + M.vx - k.x - k.vx || Zn(c), L = M.y + M.vy - k.y - k.vy || Zn(c), _ = Math.sqrt(C * C + L * L), _ = (_ - o[v]) / _ * g * i[v], C *= _, L *= _, M.vx -= C * (T = l[v]), M.vy -= L * T, k.vx += C * (T = 1 - T), k.vy += L * T;
19415
19421
  }
19416
19422
  function d() {
19417
19423
  if (s) {
@@ -19589,10 +19595,10 @@ class RA extends Xt {
19589
19595
  if (o.length === 0) return;
19590
19596
  const a = r.link || {}, l = r.layoutAlgorithm || {}, c = r.draggable !== !1, h = l.linkLength ?? a.distance ?? 80, f = a.color ?? "#999", u = a.width, d = a.dashStyle, p = l.maxIterations ?? 300, y = l.gravitationalConstant ?? -200, g = l.friction ?? 0.9, m = l.maxSpeed ?? 10, x = l.initialPositions, v = l.attractiveForce, b = l.repulsiveForce;
19591
19597
  if (x === "circle") {
19592
- const w = t.width / 2, A = t.height / 2, T = Math.min(t.width, t.height) / 3;
19598
+ const w = t.width / 2, A = t.height / 2, $ = Math.min(t.width, t.height) / 3;
19593
19599
  o.forEach((R, F) => {
19594
19600
  const D = 2 * Math.PI * F / o.length;
19595
- R.x = w + T * Math.cos(D), R.y = A + T * Math.sin(D);
19601
+ R.x = w + $ * Math.cos(D), R.y = A + $ * Math.sin(D);
19596
19602
  });
19597
19603
  } else x === "random" ? o.forEach((w) => {
19598
19604
  w.x = Math.random() * t.width, w.y = Math.random() * t.height;
@@ -19608,43 +19614,43 @@ class RA extends Xt {
19608
19614
  b ? C.strength((w) => -b(1, k)) : C.strength(y), this.simulation = IA(o).force("link", M).force("charge", C).force("center", rA(t.width / 2, t.height / 2)).force("collide", MA(20)).velocityDecay(1 - g).alphaDecay(1 - Math.pow(1e-3, 1 / p)).stop();
19609
19615
  for (let w = 0; w < p; w++)
19610
19616
  this.simulation.tick(), o.forEach((A) => {
19611
- const T = Math.abs(A.vx || 0), R = Math.abs(A.vy || 0);
19612
- T > m && (A.vx = Math.sign(A.vx) * m), R > m && (A.vy = Math.sign(A.vy) * m);
19617
+ const $ = Math.abs(A.vx || 0), R = Math.abs(A.vy || 0);
19618
+ $ > m && (A.vx = Math.sign(A.vx) * m), R > m && (A.vy = Math.sign(A.vy) * m);
19613
19619
  });
19614
19620
  o.forEach((w) => {
19615
- var T;
19616
- const A = ((T = w.marker) == null ? void 0 : T.radius) || 10;
19621
+ var $;
19622
+ const A = (($ = w.marker) == null ? void 0 : $.radius) || 10;
19617
19623
  w.x = Math.max(A + 30, Math.min(t.width - A - 30, w.x ?? 0)), w.y = Math.max(A + 18, Math.min(t.height - A - 6, w.y ?? 0));
19618
19624
  });
19619
19625
  const L = this.getDashArray(d), _ = this.group.selectAll(".katucharts-network-link").data(s).join("line").attr("class", "katucharts-network-link").attr("x1", (w) => w.source.x).attr("y1", (w) => w.source.y).attr("x2", (w) => w.target.x).attr("y2", (w) => w.target.y).attr("stroke", f).attr("stroke-width", (w) => u ?? Math.sqrt(w.value || 1)).attr("stroke-dasharray", L);
19620
19626
  i ? _.attr("stroke-opacity", 0).transition().duration(bt).ease(pt).attr("stroke-opacity", 0.6) : _.attr("stroke-opacity", 0.6);
19621
- const $ = this.group.selectAll(".katucharts-network-node").data(o).join("circle").attr("class", "katucharts-network-node").attr("cx", (w) => w.x).attr("cy", (w) => w.y).attr("fill", (w, A) => w.color || e[A % e.length]).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1.5).style("cursor", c ? "grab" : "pointer");
19622
- if (i ? $.attr("r", 0).transition().duration(bt).ease(pt).attr("r", (w) => {
19627
+ const T = this.group.selectAll(".katucharts-network-node").data(o).join("circle").attr("class", "katucharts-network-node").attr("cx", (w) => w.x).attr("cy", (w) => w.y).attr("fill", (w, A) => w.color || e[A % e.length]).attr("stroke", this.autoBorderColor()).attr("stroke-width", 1.5).style("cursor", c ? "grab" : "pointer");
19628
+ if (i ? T.attr("r", 0).transition().duration(bt).ease(pt).attr("r", (w) => {
19623
19629
  var A;
19624
19630
  return ((A = w.marker) == null ? void 0 : A.radius) || 10;
19625
- }) : $.attr("r", (w) => {
19631
+ }) : T.attr("r", (w) => {
19626
19632
  var A;
19627
19633
  return ((A = w.marker) == null ? void 0 : A.radius) || 10;
19628
19634
  }), c) {
19629
- const w = yd().on("start", (A, T) => {
19630
- rt(A.sourceEvent.target).style("cursor", "grabbing"), this.simulation && this.simulation.alphaTarget(0.3).restart(), T.fx = T.x, T.fy = T.y;
19631
- }).on("drag", (A, T) => {
19632
- T.fx = A.x, T.fy = A.y, T.x = A.x, T.y = A.y, this.updatePositions($, _, I);
19633
- }).on("end", (A, T) => {
19634
- rt(A.sourceEvent.target).style("cursor", "grab"), this.simulation && this.simulation.alphaTarget(0), T.fx = null, T.fy = null;
19635
+ const w = yd().on("start", (A, $) => {
19636
+ rt(A.sourceEvent.target).style("cursor", "grabbing"), this.simulation && this.simulation.alphaTarget(0.3).restart(), $.fx = $.x, $.fy = $.y;
19637
+ }).on("drag", (A, $) => {
19638
+ $.fx = A.x, $.fy = A.y, $.x = A.x, $.y = A.y, this.updatePositions(T, _, I);
19639
+ }).on("end", (A, $) => {
19640
+ rt(A.sourceEvent.target).style("cursor", "grab"), this.simulation && this.simulation.alphaTarget(0), $.fx = null, $.fy = null;
19635
19641
  });
19636
- $.call(w);
19642
+ T.call(w);
19637
19643
  }
19638
- $.on("mouseover", (w, A) => {
19644
+ T.on("mouseover", (w, A) => {
19639
19645
  var D;
19640
- const T = rt(w.currentTarget), R = ((D = A.marker) == null ? void 0 : D.radius) || 10;
19641
- T.transition("size").duration(K).ease(Z).attr("r", R + 4), T.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.3))"), $.interrupt("highlight"), _.interrupt("highlight"), $.attr("opacity", 1), _.transition("highlight").duration(K).ease(Z).attr(
19646
+ const $ = rt(w.currentTarget), R = ((D = A.marker) == null ? void 0 : D.radius) || 10;
19647
+ $.transition("size").duration(K).ease(Z).attr("r", R + 4), $.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.3))"), T.interrupt("highlight"), _.interrupt("highlight"), T.attr("opacity", 1), _.transition("highlight").duration(K).ease(Z).attr(
19642
19648
  "stroke-opacity",
19643
19649
  (z) => z.source === A || z.target === A ? 0.9 : 0.1
19644
19650
  ).attr(
19645
19651
  "stroke-width",
19646
19652
  (z) => z.source === A || z.target === A ? 3 : u ?? Math.sqrt(z.value || 1)
19647
- ), $.filter((z) => z !== A).transition("highlight").duration(K).ease(Z).attr("opacity", (z) => s.some(
19653
+ ), T.filter((z) => z !== A).transition("highlight").duration(K).ease(Z).attr("opacity", (z) => s.some(
19648
19654
  (H) => H.source === A && H.target === z || H.target === A && H.source === z
19649
19655
  ) ? 1 : 0.3);
19650
19656
  const F = o.indexOf(A);
@@ -19658,8 +19664,8 @@ class RA extends Xt {
19658
19664
  });
19659
19665
  }).on("mouseout", (w, A) => {
19660
19666
  var F;
19661
- const T = rt(w.currentTarget);
19662
- T.transition("size").duration(K).ease(Z).attr("r", ((F = A.marker) == null ? void 0 : F.radius) || 10), T.style("filter", ""), $.interrupt("highlight"), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("stroke-opacity", 0.6).attr("stroke-width", (D) => u ?? Math.sqrt(D.value || 1)), $.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
19667
+ const $ = rt(w.currentTarget);
19668
+ $.transition("size").duration(K).ease(Z).attr("r", ((F = A.marker) == null ? void 0 : F.radius) || 10), $.style("filter", ""), T.interrupt("highlight"), _.interrupt("highlight"), _.transition("highlight").duration(K).ease(Z).attr("stroke-opacity", 0.6).attr("stroke-width", (D) => u ?? Math.sqrt(D.value || 1)), T.transition("highlight").duration(K).ease(Z).attr("opacity", 1);
19663
19669
  const R = o.indexOf(A);
19664
19670
  this.context.events.emit("point:mouseout", {
19665
19671
  point: { name: A.name || A.id },
@@ -19668,10 +19674,10 @@ class RA extends Xt {
19668
19674
  event: w
19669
19675
  });
19670
19676
  }).on("click", (w, A) => {
19671
- const T = o.indexOf(A);
19677
+ const $ = o.indexOf(A);
19672
19678
  this.context.events.emit("point:click", {
19673
19679
  point: { name: A.name || A.id },
19674
- index: T,
19680
+ index: $,
19675
19681
  series: this,
19676
19682
  event: w
19677
19683
  });
@@ -19788,12 +19794,12 @@ class NA extends Xt {
19788
19794
  const m = r.center || ["50%", "50%"], x = this.resolvePercent(m[0], t.width), v = this.resolvePercent(m[1], t.height), b = r.size, k = o === "small" ? 34 : 70, M = o === "small" ? 34 : 24, C = Math.max(
19789
19795
  80,
19790
19796
  Math.min(t.width - 2 * k, t.height - 2 * M)
19791
- ), L = b ? this.resolvePercent(b, C) : C, _ = Math.max(40, L / 2 - 2), $ = _ - u, { matrix: I, names: E, nodeColors: P } = this.buildMatrix();
19797
+ ), L = b ? this.resolvePercent(b, C) : C, _ = Math.max(40, L / 2 - 2), T = _ - u, { matrix: I, names: E, nodeColors: P } = this.buildMatrix();
19792
19798
  if (E.length === 0) return;
19793
- const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), T = BA().padAngle(w).sortSubgroups(null)(I);
19794
- this.normalizeChordWidths(T), this.sortChordEndpoints(T);
19795
- const R = Ae().innerRadius($).outerRadius(_).cornerRadius(3), F = Ae().innerRadius($).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
19796
- const nt = $, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Jt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19799
+ const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), $ = BA().padAngle(w).sortSubgroups(null)(I);
19800
+ this.normalizeChordWidths($), this.sortChordEndpoints($);
19801
+ const R = Ae().innerRadius(T).outerRadius(_).cornerRadius(3), F = Ae().innerRadius(T).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
19802
+ const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Jt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19797
19803
  let Ee = Math.abs(mt - vt);
19798
19804
  Ee > Math.PI && (Ee = 2 * Math.PI - Ee);
19799
19805
  const Be = Ee / Math.PI, me = nt * Math.max(D, (1 - Be) * (1 - Be) * (1 - Be));
@@ -19805,7 +19811,7 @@ class NA extends Xt {
19805
19811
  let j = null;
19806
19812
  J === "gradient" && (j = X);
19807
19813
  const W = (et) => H(J === "to" ? et.target.index : et.source.index), U = u * 2, G = (et, nt, ht, vt) => {
19808
- const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt = $ * Math.cos(et), Q = $ * Math.sin(et), $t = ($ - U) * Math.cos(et), Ft = ($ - U) * Math.sin(et);
19814
+ const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt = T * Math.cos(et), Q = T * Math.sin(et), $t = (T - U) * Math.cos(et), Ft = (T - U) * Math.sin(et);
19809
19815
  return X.append("linearGradient").attr("id", mt).attr("gradientUnits", "userSpaceOnUse").attr("x1", gt).attr("y1", Q).attr("x2", $t).attr("y2", Ft).selectAll("stop").data([
19810
19816
  { offset: "0%", opacity: 0.7 },
19811
19817
  { offset: "25%", opacity: 0.2 },
@@ -19816,7 +19822,7 @@ class NA extends Xt {
19816
19822
  let Y, O;
19817
19823
  if (N) {
19818
19824
  const et = /* @__PURE__ */ new Map();
19819
- for (const vt of T) {
19825
+ for (const vt of $) {
19820
19826
  const mt = W(vt);
19821
19827
  et.has(mt) || et.set(mt, []), et.get(mt).push(vt);
19822
19828
  }
@@ -19825,7 +19831,7 @@ class NA extends Xt {
19825
19831
  nt.append("g").attr("class", "katucharts-chord-group").attr("opacity", d).selectAll(".katucharts-chord").data(mt).join("path").attr("class", "katucharts-chord").attr("d", (Q) => z(Q)).attr("fill", vt).attr("fill-opacity", 1).attr("stroke", "none").style("cursor", "pointer");
19826
19832
  Y = nt.selectAll(".katucharts-chord"), O = nt.selectAll(".katucharts-chord-group");
19827
19833
  const ht = B.append("g").attr("class", "katucharts-chord-edges").attr("opacity", d);
19828
- if (T.forEach((vt, mt) => {
19834
+ if ($.forEach((vt, mt) => {
19829
19835
  const gt = H(vt.source.index), Q = H(vt.target.index);
19830
19836
  if (gt === Q) return;
19831
19837
  const $t = z(vt), Ft = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Ft, Q, mt, "tgt");
@@ -19836,17 +19842,17 @@ class NA extends Xt {
19836
19842
  ht.attr("opacity", 0);
19837
19843
  const vt = B.append("defs"), mt = Math.round(s * 0.62);
19838
19844
  Y.each(function(Q, $t) {
19839
- const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Jt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Jt) / 2, Ee = $ * Math.cos(Ht), Be = $ * Math.sin(Ht), me = $ * Math.cos(Ke), Je = $ * Math.sin(Ke), hn = Math.atan2(Je - Be, me - Ee) * 180 / Math.PI, _n = Math.sqrt((me - Ee) ** 2 + (Je - Be) ** 2) + _ * 2, ir = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = ir.append("rect").attr("transform", `translate(${Ee},${Be}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19845
+ const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Jt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Jt) / 2, Ee = T * Math.cos(Ht), Be = T * Math.sin(Ht), me = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Be, me - Ee) * 180 / Math.PI, _n = Math.sqrt((me - Ee) ** 2 + (Je - Be) ** 2) + _ * 2, ir = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = ir.append("rect").attr("transform", `translate(${Ee},${Be}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19840
19846
  tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Ft).ease(pt).attr("width", _n).on("end", function() {
19841
19847
  tt.attr("clip-path", null), ir.remove();
19842
19848
  });
19843
19849
  });
19844
- const gt = f + (T.length - 1) * a + mt;
19850
+ const gt = f + ($.length - 1) * a + mt;
19845
19851
  ht.transition("enter").duration(300).delay(gt).ease(pt).attr("opacity", d);
19846
19852
  }
19847
- } else if (Y = B.selectAll(".katucharts-chord").data(T).join("path").attr("class", "katucharts-chord").attr("d", (et) => z(et)).attr("stroke", "none").style("cursor", "pointer"), Y.each(function(et, nt) {
19853
+ } else if (Y = B.selectAll(".katucharts-chord").data($).join("path").attr("class", "katucharts-chord").attr("d", (et) => z(et)).attr("stroke", "none").style("cursor", "pointer"), Y.each(function(et, nt) {
19848
19854
  const ht = `katucharts-dw-grad-${nt}-${Math.random().toString(36).slice(2, 6)}`, vt = (et.source.startAngle + et.source.endAngle) / 2 + p - Math.PI / 2, mt = (et.target.startAngle + et.target.endAngle) / 2 + p - Math.PI / 2;
19849
- j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1", $ * Math.cos(vt)).attr("y1", $ * Math.sin(vt)).attr("x2", $ * Math.cos(mt)).attr("y2", $ * Math.sin(mt)).selectAll("stop").data([
19855
+ j.append("linearGradient").attr("id", ht).attr("gradientUnits", "userSpaceOnUse").attr("x1", T * Math.cos(vt)).attr("y1", T * Math.sin(vt)).attr("x2", T * Math.cos(mt)).attr("y2", T * Math.sin(mt)).selectAll("stop").data([
19850
19856
  { offset: "0%", color: H(et.source.index) },
19851
19857
  { offset: "100%", color: H(et.target.index) }
19852
19858
  ]).join("stop").attr("offset", (gt) => gt.offset).attr("stop-color", (gt) => gt.color), rt(this).attr("fill", `url(#${ht})`);
@@ -19854,7 +19860,7 @@ class NA extends Xt {
19854
19860
  Y.attr("fill-opacity", d);
19855
19861
  const et = B.append("defs"), nt = Math.round(s * 0.62);
19856
19862
  Y.each(function(ht, vt) {
19857
- const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = $ * Math.cos(qt), Jt = $ * Math.sin(qt), Ht = $ * Math.cos(Bt), Ke = $ * Math.sin(Bt), Ee = Math.atan2(Ke - Jt, Ht - Ut) * 180 / Math.PI, Be = Math.sqrt((Ht - Ut) ** 2 + (Ke - Jt) ** 2) + _ * 2, me = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = me.append("rect").attr("transform", `translate(${Ut},${Jt}) rotate(${Ee})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19863
+ const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = T * Math.cos(qt), Jt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Ee = Math.atan2(Ke - Jt, Ht - Ut) * 180 / Math.PI, Be = Math.sqrt((Ht - Ut) ** 2 + (Ke - Jt) ** 2) + _ * 2, me = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = me.append("rect").attr("transform", `translate(${Ut},${Jt}) rotate(${Ee})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19858
19864
  hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Be).on("end", function() {
19859
19865
  hn.attr("clip-path", null), me.remove();
19860
19866
  });
@@ -19874,7 +19880,7 @@ class NA extends Xt {
19874
19880
  if (et === "mouseover") {
19875
19881
  this.context.events.emit("point:mouseover", {
19876
19882
  point: gt,
19877
- index: T.indexOf(ht),
19883
+ index: $.indexOf(ht),
19878
19884
  series: this,
19879
19885
  event: nt,
19880
19886
  plotX: nt.offsetX - this.context.plotArea.x,
@@ -19885,7 +19891,7 @@ class NA extends Xt {
19885
19891
  if (et === "mouseout") {
19886
19892
  this.context.events.emit("point:mouseout", {
19887
19893
  point: gt,
19888
- index: T.indexOf(ht),
19894
+ index: $.indexOf(ht),
19889
19895
  series: this,
19890
19896
  event: nt
19891
19897
  });
@@ -19893,7 +19899,7 @@ class NA extends Xt {
19893
19899
  }
19894
19900
  this.context.events.emit("point:click", {
19895
19901
  point: gt,
19896
- index: T.indexOf(ht),
19902
+ index: $.indexOf(ht),
19897
19903
  series: this,
19898
19904
  event: nt
19899
19905
  });
@@ -19908,7 +19914,7 @@ class NA extends Xt {
19908
19914
  ct("click", et, nt);
19909
19915
  };
19910
19916
  Y.on("mouseover", it).on("mouseout", ft).on("click", dt);
19911
- const at = T.groups.map((et) => ({
19917
+ const at = $.groups.map((et) => ({
19912
19918
  ...et,
19913
19919
  startAngle: et.startAngle + p,
19914
19920
  endAngle: et.endAngle + p
@@ -19917,7 +19923,7 @@ class NA extends Xt {
19917
19923
  let ht = et % nt;
19918
19924
  return ht < 0 && (ht += nt), ht;
19919
19925
  }, q = (et, nt) => {
19920
- const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, mt = ot(Math.atan2(vt, ht) + Math.PI / 2), gt = T.filter(
19926
+ const ht = et.offsetX - this.context.plotArea.x - x, vt = et.offsetY - this.context.plotArea.y - v, mt = ot(Math.atan2(vt, ht) + Math.PI / 2), gt = $.filter(
19921
19927
  (Bt) => Bt.source.index === nt.index || Bt.target.index === nt.index
19922
19928
  );
19923
19929
  if (gt.length === 0) return null;
@@ -19952,7 +19958,7 @@ class NA extends Xt {
19952
19958
  rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", F(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O && O.interrupt("highlight").attr("opacity", 1), Y.transition("highlight").duration(K).ease(Z).attr(
19953
19959
  "fill-opacity",
19954
19960
  (mt) => mt.source.index === nt.index || mt.target.index === nt.index ? Math.min(d + 0.35, 1) : 0.05
19955
- ), kt.attr("opacity", 1), kt.filter((mt) => mt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (mt) => T.some(
19961
+ ), kt.attr("opacity", 1), kt.filter((mt) => mt !== nt).transition("highlight").duration(K).ease(Z).attr("opacity", (mt) => $.some(
19956
19962
  (Q) => Q.source.index === nt.index && Q.target.index === mt.index || Q.target.index === nt.index && Q.source.index === mt.index
19957
19963
  ) ? 1 : 0.3), Ye.filter((mt) => mt.index === nt.index).transition("label").duration(K).ease(Z).attr("opacity", 1);
19958
19964
  const vt = q(et, nt);
@@ -19981,7 +19987,7 @@ class NA extends Xt {
19981
19987
  series: this,
19982
19988
  event: et
19983
19989
  });
19984
- }), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data(T).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
19990
+ }), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data($).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
19985
19991
  const _t = this.config.dataLabels || {}, Vt = _t.color || ((er = _t.style) == null ? void 0 : er.color) || Pe, Nt = ((nr = _t.style) == null ? void 0 : nr.fontSize) || Mt, Ot = Me(Nt), jt = 22, ee = _ + jt, Tt = Math.max(Ot * 1.6, 17), Zt = "…", ce = tn(Zt, Ot, "bold"), Ve = (et, nt) => {
19986
19992
  if (!et || nt <= ce) return "";
19987
19993
  if (tn(et, Ot, "bold") <= nt) return et;
@@ -20030,7 +20036,7 @@ class NA extends Xt {
20030
20036
  mt.append("path").attr("id", me).attr("fill", "none").attr("d", `M${Jt},${Ht}A${nt},${nt},0,0,${Be},${Ke},${Ee}`), Ft.append("textPath").attr("href", `#${me}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
20031
20037
  }), i) {
20032
20038
  Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
20033
- const gt = Math.round(s * 0.62), Q = T.length, $t = f + Q * a + gt;
20039
+ const gt = Math.round(s * 0.62), Q = $.length, $t = f + Q * a + gt;
20034
20040
  this.emitAfterAnimate($t + 100);
20035
20041
  } else
20036
20042
  Ye.attr("opacity", 1);
@@ -20077,7 +20083,7 @@ class NA extends Xt {
20077
20083
  });
20078
20084
  if (Ye = Ge.selectAll(".katucharts-chord-label").data(ze).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && mt(Q) >= ce ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
20079
20085
  gt.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
20080
- const Q = Math.round(s * 0.62), $t = T.length, Ft = f + $t * a + Q;
20086
+ const Q = Math.round(s * 0.62), $t = $.length, Ft = f + $t * a + Q;
20081
20087
  this.emitAfterAnimate(Ft + 100);
20082
20088
  } else
20083
20089
  gt.attr("opacity", 0.8), Ye.attr("opacity", (Q) => Ze(Q) ? 1 : 0);