katucharts.js 0.2.10 → 0.2.11

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.
@@ -7426,40 +7426,40 @@ class Uc {
7426
7426
  const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
7427
7427
  let _t, Vt;
7428
7428
  if (P) {
7429
- const Tt = q % S, Kt = Math.floor(q / S), le = S * w, Ve = Math.max(0, (L - le) / 2);
7430
- _t = o + Ve + Tt * w, Vt = C + Kt * _ + d;
7429
+ const $t = q % S, Kt = Math.floor(q / S), le = S * w, Ve = Math.max(0, (L - le) / 2);
7430
+ _t = o + Ve + $t * w, Vt = C + Kt * _ + d;
7431
7431
  } else if (r === "horizontal") {
7432
- const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
7432
+ const $t = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + $t;
7433
7433
  q > 0 && b + Kt > L && (b = o, k += _), _t = b, Vt = k + d, M = Math.max(M, b + Kt), b += Kt + f;
7434
7434
  } else {
7435
- const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
7435
+ const $t = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + $t;
7436
7436
  _t = b, Vt = k + d, M = Math.max(M, b + Kt), b = o, k += _;
7437
7437
  }
7438
7438
  const Nt = this.group.append("g").attr("class", "katucharts-legend-item").attr("transform", `translate(${_t},${Vt})`).style("cursor", "pointer"), Ot = st.getLegendSymbolShape();
7439
7439
  if (Ct)
7440
7440
  Nt.append("line").attr("x1", 0).attr("x2", s).attr("y1", 6).attr("y2", 6).attr("stroke", wt).attr("stroke-width", 2), Nt.append("circle").attr("cx", s / 2).attr("cy", 6).attr("r", 3).attr("fill", wt);
7441
7441
  else if (Ot) {
7442
- const Tt = s / 2, Kt = a / 2, le = Math.min(s, a) / 2;
7443
- Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Kt} L ${Tt} ${a} L 0 ${Kt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Kt} L ${s} ${Kt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt);
7442
+ const $t = s / 2, Kt = a / 2, le = Math.min(s, a) / 2;
7443
+ Ot === "circle" ? Nt.append("circle").attr("cx", $t).attr("cy", Kt).attr("r", le).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${$t} 0 L ${s} ${Kt} L ${$t} ${a} L 0 ${Kt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${$t} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${$t} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Kt} L ${s} ${Kt} M ${$t} 0 L ${$t} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", $t).attr("cy", Kt).attr("r", le).attr("fill", wt);
7444
7444
  } else h ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("rx", c).attr("fill", wt) : Nt.append("circle").attr("cx", s / 2).attr("cy", a / 2).attr("r", Math.min(s, a) / 2).attr("fill", wt);
7445
7445
  const Zt = Nt.append("text").attr("x", s + l).attr("y", 10).attr("fill", st.visible ? u.color || this.autoText() : ((ne = this.config.itemHiddenStyle) == null ? void 0 : ne.color) || "#cccccc").attr("font-size", v).attr("font-weight", u.fontWeight || "normal").text(kt);
7446
7446
  this.config.rtl && (Zt.attr("text-anchor", "end").attr("x", -l), Nt.select("rect, circle, line").attr("transform", `translate(${-(s + l)}, 0)`)), Nt.on("click", () => {
7447
7447
  var le, Ve, he;
7448
- const Tt = this.config.events;
7449
- if (Tt != null && Tt.itemClick && Tt.itemClick.call(st, new Event("legendItemClick")) === !1)
7448
+ const $t = this.config.events;
7449
+ if ($t != null && $t.itemClick && $t.itemClick.call(st, new Event("legendItemClick")) === !1)
7450
7450
  return;
7451
7451
  st.toggleVisible(), Zt.attr(
7452
7452
  "fill",
7453
7453
  st.visible ? u.color || this.autoText() : ((le = this.config.itemHiddenStyle) == null ? void 0 : le.color) || "#cccccc"
7454
7454
  ), ((he = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : he.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
7455
7455
  }), Nt.on("mouseover", () => {
7456
- var Tt;
7457
- Zt.attr("fill", ((Tt = this.config.itemHoverStyle) == null ? void 0 : Tt.color) || this.autoText()), this.events.emit("legend:itemHover", st);
7456
+ var $t;
7457
+ Zt.attr("fill", (($t = this.config.itemHoverStyle) == null ? void 0 : $t.color) || this.autoText()), this.events.emit("legend:itemHover", st);
7458
7458
  }), Nt.on("mouseout", () => {
7459
- var Tt;
7459
+ var $t;
7460
7460
  Zt.attr(
7461
7461
  "fill",
7462
- st.visible ? u.color || this.autoText() : ((Tt = this.config.itemHiddenStyle) == null ? void 0 : Tt.color) || "#cccccc"
7462
+ st.visible ? u.color || this.autoText() : (($t = this.config.itemHiddenStyle) == null ? void 0 : $t.color) || "#cccccc"
7463
7463
  ), this.events.emit("legend:itemLeave");
7464
7464
  }), F.push(Nt);
7465
7465
  });
@@ -7488,8 +7488,8 @@ class Uc {
7488
7488
  F.forEach((Ct, kt) => {
7489
7489
  const _t = Math.floor(kt / S);
7490
7490
  if (_t >= st && _t < wt) {
7491
- const Nt = kt % S, Ot = S * w, Zt = Math.max(0, (L - Ot) / 2), ne = o + Zt + Nt * w, Tt = C + (_t - st) * _ + (this.config.itemMarginTop ?? 0);
7492
- Ct.style("display", "block"), q ? Ct.style("opacity", "0").attr("transform", `translate(${ne},${Tt})`).transition().duration(250).style("opacity", "1") : Ct.attr("transform", `translate(${ne},${Tt})`).style("opacity", "1");
7491
+ const Nt = kt % S, Ot = S * w, Zt = Math.max(0, (L - Ot) / 2), ne = o + Zt + Nt * w, $t = C + (_t - st) * _ + (this.config.itemMarginTop ?? 0);
7492
+ Ct.style("display", "block"), q ? Ct.style("opacity", "0").attr("transform", `translate(${ne},${$t})`).transition().duration(250).style("opacity", "1") : Ct.attr("transform", `translate(${ne},${$t})`).style("opacity", "1");
7493
7493
  } else
7494
7494
  q ? Ct.transition().duration(150).style("opacity", "0").on("end", function() {
7495
7495
  Ct.style("display", "none");
@@ -10268,7 +10268,7 @@ function o2(n) {
10268
10268
  return g === o ? l : g;
10269
10269
  }, l;
10270
10270
  }
10271
- function Rt(n) {
10271
+ function Ft(n) {
10272
10272
  return function() {
10273
10273
  return n;
10274
10274
  };
@@ -10387,7 +10387,7 @@ function uo(n, t, e, i, r, o, s) {
10387
10387
  };
10388
10388
  }
10389
10389
  function Se() {
10390
- var n = u2, t = f2, e = Rt(0), i = null, r = d2, o = p2, s = g2, a = null, l = Zr(c);
10390
+ var n = u2, t = f2, e = Ft(0), i = null, r = d2, o = p2, s = g2, a = null, l = Zr(c);
10391
10391
  function c() {
10392
10392
  var h, f, u = +n.apply(this, arguments), d = +t.apply(this, arguments), p = r.apply(this, arguments) - Ko, y = o.apply(this, arguments) - Ko, g = nu(y - p), m = y > p;
10393
10393
  if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d > Me)) a.moveTo(0, 0);
@@ -10417,19 +10417,19 @@ function Se() {
10417
10417
  var h = (+n.apply(this, arguments) + +t.apply(this, arguments)) / 2, f = (+r.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Ui / 2;
10418
10418
  return [ni(f) * h, vn(f) * h];
10419
10419
  }, c.innerRadius = function(h) {
10420
- return arguments.length ? (n = typeof h == "function" ? h : Rt(+h), c) : n;
10420
+ return arguments.length ? (n = typeof h == "function" ? h : Ft(+h), c) : n;
10421
10421
  }, c.outerRadius = function(h) {
10422
- return arguments.length ? (t = typeof h == "function" ? h : Rt(+h), c) : t;
10422
+ return arguments.length ? (t = typeof h == "function" ? h : Ft(+h), c) : t;
10423
10423
  }, c.cornerRadius = function(h) {
10424
- return arguments.length ? (e = typeof h == "function" ? h : Rt(+h), c) : e;
10424
+ return arguments.length ? (e = typeof h == "function" ? h : Ft(+h), c) : e;
10425
10425
  }, c.padRadius = function(h) {
10426
- return arguments.length ? (i = h == null ? null : typeof h == "function" ? h : Rt(+h), c) : i;
10426
+ return arguments.length ? (i = h == null ? null : typeof h == "function" ? h : Ft(+h), c) : i;
10427
10427
  }, c.startAngle = function(h) {
10428
- return arguments.length ? (r = typeof h == "function" ? h : Rt(+h), c) : r;
10428
+ return arguments.length ? (r = typeof h == "function" ? h : Ft(+h), c) : r;
10429
10429
  }, c.endAngle = function(h) {
10430
- return arguments.length ? (o = typeof h == "function" ? h : Rt(+h), c) : o;
10430
+ return arguments.length ? (o = typeof h == "function" ? h : Ft(+h), c) : o;
10431
10431
  }, c.padAngle = function(h) {
10432
- return arguments.length ? (s = typeof h == "function" ? h : Rt(+h), c) : s;
10432
+ return arguments.length ? (s = typeof h == "function" ? h : Ft(+h), c) : s;
10433
10433
  }, c.context = function(h) {
10434
10434
  return arguments.length ? (a = h ?? null, c) : a;
10435
10435
  }, c;
@@ -10477,8 +10477,8 @@ function Jc(n) {
10477
10477
  return n[1];
10478
10478
  }
10479
10479
  function gi(n, t) {
10480
- var e = Rt(!0), i = null, r = Qi, o = null, s = Zr(a);
10481
- n = typeof n == "function" ? n : n === void 0 ? Kc : Rt(n), t = typeof t == "function" ? t : t === void 0 ? Jc : Rt(t);
10480
+ var e = Ft(!0), i = null, r = Qi, o = null, s = Zr(a);
10481
+ n = typeof n == "function" ? n : n === void 0 ? Kc : Ft(n), t = typeof t == "function" ? t : t === void 0 ? Jc : Ft(t);
10482
10482
  function a(l) {
10483
10483
  var c, h = (l = Zc(l)).length, f, u = !1, d;
10484
10484
  for (i == null && (o = r(d = s())), c = 0; c <= h; ++c)
@@ -10486,11 +10486,11 @@ function gi(n, t) {
10486
10486
  if (d) return o = null, d + "" || null;
10487
10487
  }
10488
10488
  return a.x = function(l) {
10489
- return arguments.length ? (n = typeof l == "function" ? l : Rt(+l), a) : n;
10489
+ return arguments.length ? (n = typeof l == "function" ? l : Ft(+l), a) : n;
10490
10490
  }, a.y = function(l) {
10491
- return arguments.length ? (t = typeof l == "function" ? l : Rt(+l), a) : t;
10491
+ return arguments.length ? (t = typeof l == "function" ? l : Ft(+l), a) : t;
10492
10492
  }, a.defined = function(l) {
10493
- return arguments.length ? (e = typeof l == "function" ? l : Rt(!!l), a) : e;
10493
+ return arguments.length ? (e = typeof l == "function" ? l : Ft(!!l), a) : e;
10494
10494
  }, a.curve = function(l) {
10495
10495
  return arguments.length ? (r = l, i != null && (o = r(i)), a) : r;
10496
10496
  }, a.context = function(l) {
@@ -10498,8 +10498,8 @@ function gi(n, t) {
10498
10498
  }, a;
10499
10499
  }
10500
10500
  function Ii(n, t, e) {
10501
- var i = null, r = Rt(!0), o = null, s = Qi, a = null, l = Zr(c);
10502
- n = typeof n == "function" ? n : n === void 0 ? Kc : Rt(+n), t = typeof t == "function" ? t : Rt(t === void 0 ? 0 : +t), e = typeof e == "function" ? e : e === void 0 ? Jc : Rt(+e);
10501
+ var i = null, r = Ft(!0), o = null, s = Qi, a = null, l = Zr(c);
10502
+ n = typeof n == "function" ? n : n === void 0 ? Kc : Ft(+n), t = typeof t == "function" ? t : Ft(t === void 0 ? 0 : +t), e = typeof e == "function" ? e : e === void 0 ? Jc : Ft(+e);
10503
10503
  function c(f) {
10504
10504
  var u, d, p, y = (f = Zc(f)).length, g, m = !1, x, v = new Array(y), b = new Array(y);
10505
10505
  for (o == null && (a = s(x = l())), u = 0; u <= y; ++u) {
@@ -10519,17 +10519,17 @@ function Ii(n, t, e) {
10519
10519
  return gi().defined(r).curve(s).context(o);
10520
10520
  }
10521
10521
  return c.x = function(f) {
10522
- return arguments.length ? (n = typeof f == "function" ? f : Rt(+f), i = null, c) : n;
10522
+ return arguments.length ? (n = typeof f == "function" ? f : Ft(+f), i = null, c) : n;
10523
10523
  }, c.x0 = function(f) {
10524
- return arguments.length ? (n = typeof f == "function" ? f : Rt(+f), c) : n;
10524
+ return arguments.length ? (n = typeof f == "function" ? f : Ft(+f), c) : n;
10525
10525
  }, c.x1 = function(f) {
10526
- return arguments.length ? (i = f == null ? null : typeof f == "function" ? f : Rt(+f), c) : i;
10526
+ return arguments.length ? (i = f == null ? null : typeof f == "function" ? f : Ft(+f), c) : i;
10527
10527
  }, c.y = function(f) {
10528
- return arguments.length ? (t = typeof f == "function" ? f : Rt(+f), e = null, c) : t;
10528
+ return arguments.length ? (t = typeof f == "function" ? f : Ft(+f), e = null, c) : t;
10529
10529
  }, c.y0 = function(f) {
10530
- return arguments.length ? (t = typeof f == "function" ? f : Rt(+f), c) : t;
10530
+ return arguments.length ? (t = typeof f == "function" ? f : Ft(+f), c) : t;
10531
10531
  }, c.y1 = function(f) {
10532
- return arguments.length ? (e = f == null ? null : typeof f == "function" ? f : Rt(+f), c) : e;
10532
+ return arguments.length ? (e = f == null ? null : typeof f == "function" ? f : Ft(+f), c) : e;
10533
10533
  }, c.lineX0 = c.lineY0 = function() {
10534
10534
  return h().x(n).y(t);
10535
10535
  }, c.lineY1 = function() {
@@ -10537,7 +10537,7 @@ function Ii(n, t, e) {
10537
10537
  }, c.lineX1 = function() {
10538
10538
  return h().x(i).y(t);
10539
10539
  }, c.defined = function(f) {
10540
- return arguments.length ? (r = typeof f == "function" ? f : Rt(!!f), c) : r;
10540
+ return arguments.length ? (r = typeof f == "function" ? f : Ft(!!f), c) : r;
10541
10541
  }, c.curve = function(f) {
10542
10542
  return arguments.length ? (s = f, o != null && (a = s(o)), c) : s;
10543
10543
  }, c.context = function(f) {
@@ -10551,7 +10551,7 @@ function b2(n) {
10551
10551
  return n;
10552
10552
  }
10553
10553
  function v2() {
10554
- var n = b2, t = x2, e = null, i = Rt(0), r = Rt(Tr), o = Rt(0);
10554
+ var n = b2, t = x2, e = null, i = Ft(0), r = Ft(Tr), o = Ft(0);
10555
10555
  function s(a) {
10556
10556
  var l, c = (a = Zc(a)).length, h, f, u = 0, d = new Array(c), p = new Array(c), y = +i.apply(this, arguments), g = Math.min(Tr, Math.max(-Tr, r.apply(this, arguments) - y)), m, x = Math.min(Math.abs(g) / c, o.apply(this, arguments)), v = x * (g < 0 ? -1 : 1), b;
10557
10557
  for (l = 0; l < c; ++l)
@@ -10572,17 +10572,17 @@ function v2() {
10572
10572
  return p;
10573
10573
  }
10574
10574
  return s.value = function(a) {
10575
- return arguments.length ? (n = typeof a == "function" ? a : Rt(+a), s) : n;
10575
+ return arguments.length ? (n = typeof a == "function" ? a : Ft(+a), s) : n;
10576
10576
  }, s.sortValues = function(a) {
10577
10577
  return arguments.length ? (t = a, e = null, s) : t;
10578
10578
  }, s.sort = function(a) {
10579
10579
  return arguments.length ? (e = a, t = null, s) : e;
10580
10580
  }, s.startAngle = function(a) {
10581
- return arguments.length ? (i = typeof a == "function" ? a : Rt(+a), s) : i;
10581
+ return arguments.length ? (i = typeof a == "function" ? a : Ft(+a), s) : i;
10582
10582
  }, s.endAngle = function(a) {
10583
- return arguments.length ? (r = typeof a == "function" ? a : Rt(+a), s) : r;
10583
+ return arguments.length ? (r = typeof a == "function" ? a : Ft(+a), s) : r;
10584
10584
  }, s.padAngle = function(a) {
10585
- return arguments.length ? (o = typeof a == "function" ? a : Rt(+a), s) : o;
10585
+ return arguments.length ? (o = typeof a == "function" ? a : Ft(+a), s) : o;
10586
10586
  }, s;
10587
10587
  }
10588
10588
  var Md = Qc(Qi);
@@ -10691,9 +10691,9 @@ function _d(n) {
10691
10691
  }, l.target = function(c) {
10692
10692
  return arguments.length ? (e = c, l) : e;
10693
10693
  }, l.x = function(c) {
10694
- return arguments.length ? (i = typeof c == "function" ? c : Rt(+c), l) : i;
10694
+ return arguments.length ? (i = typeof c == "function" ? c : Ft(+c), l) : i;
10695
10695
  }, l.y = function(c) {
10696
- return arguments.length ? (r = typeof c == "function" ? c : Rt(+c), l) : r;
10696
+ return arguments.length ? (r = typeof c == "function" ? c : Ft(+c), l) : r;
10697
10697
  }, l.context = function(c) {
10698
10698
  return arguments.length ? (c == null ? o = s = null : s = n(o = c), l) : o;
10699
10699
  }, l;
@@ -10737,15 +10737,15 @@ const ti = {
10737
10737
  };
10738
10738
  function en(n, t) {
10739
10739
  let e = null, i = Zr(r);
10740
- n = typeof n == "function" ? n : Rt(n || ti), t = typeof t == "function" ? t : Rt(t === void 0 ? 64 : +t);
10740
+ n = typeof n == "function" ? n : Ft(n || ti), t = typeof t == "function" ? t : Ft(t === void 0 ? 64 : +t);
10741
10741
  function r() {
10742
10742
  let o;
10743
10743
  if (e || (e = o = i()), n.apply(this, arguments).draw(e, +t.apply(this, arguments)), o) return e = null, o + "" || null;
10744
10744
  }
10745
10745
  return r.type = function(o) {
10746
- return arguments.length ? (n = typeof o == "function" ? o : Rt(o), r) : n;
10746
+ return arguments.length ? (n = typeof o == "function" ? o : Ft(o), r) : n;
10747
10747
  }, r.size = function(o) {
10748
- return arguments.length ? (t = typeof o == "function" ? o : Rt(+o), r) : t;
10748
+ return arguments.length ? (t = typeof o == "function" ? o : Ft(+o), r) : t;
10749
10749
  }, r.context = function(o) {
10750
10750
  return arguments.length ? (e = o ?? null, r) : e;
10751
10751
  }, r;
@@ -13440,7 +13440,7 @@ class lu extends Xt {
13440
13440
  }) : U.attr("d", S), this.config.enableMouseTracking !== !1 && U.on("mouseover", function(q, st) {
13441
13441
  var Vt, Nt, Ot, Zt, ne;
13442
13442
  const wt = rt(this), Ct = $.indexOf(st);
13443
- 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);
13443
+ 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(($t) => $t !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
13444
13444
  const _t = S.centroid(st);
13445
13445
  W.context.events.emit("point:mouseover", {
13446
13446
  point: st.data,
@@ -13455,9 +13455,9 @@ class lu extends Xt {
13455
13455
  const wt = rt(this), Ct = $.indexOf(st);
13456
13456
  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), (Zt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || Zt.call(st.data, q);
13457
13457
  }).on("click", function(q, st) {
13458
- var Ct, kt, _t, Vt, Nt, Ot, Zt, ne, Tt, Kt, le, Ve, he, mn;
13458
+ var Ct, kt, _t, Vt, Nt, Ot, Zt, ne, $t, Kt, le, Ve, he, mn;
13459
13459
  const wt = $.indexOf(st);
13460
- 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)), (Zt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || Zt.call(st.data, q), (Kt = (Tt = (ne = W.config.point) == null ? void 0 : ne.events) == null ? void 0 : Tt.select) == null || Kt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(ze, Be) {
13460
+ 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)), (Zt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || Zt.call(st.data, q), (Kt = ($t = (ne = W.config.point) == null ? void 0 : ne.events) == null ? void 0 : $t.select) == null || Kt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(ze, Be) {
13461
13461
  const Ze = rt(this);
13462
13462
  W.selectedIndices.has(Be) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(ze, Be)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
13463
13463
  })), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (le = st.data.events) == null ? void 0 : le.click) == null || Ve.call(st.data, q), (mn = (he = W.config.events) == null ? void 0 : he.click) == null || mn.call(W, q);
@@ -15586,7 +15586,7 @@ class mu extends Xt {
15586
15586
  const s = this.config.dataLabels || {};
15587
15587
  if (s.enabled !== !0) return;
15588
15588
  const a = ((k = s.style) == null ? void 0 : k.fontSize) || Mt, l = ((M = s.style) == null ? void 0 : M.color) || this.autoLabelColor(), c = ((C = s.style) == null ? void 0 : C.fontWeight) || "normal", h = [], f = 16, u = 6, d = Math.max(...e.map((L) => L.y ?? 0), 1), p = d * 0.02, y = d * 0.5, g = e.map((L, _) => ({ d: L, i: _, v: L.y ?? 0 })).filter((L) => L.d.y != null && L.d.y !== 0 && L.v >= p), m = g.filter((L) => L.v >= y), x = g.filter((L) => L.v < y);
15589
- x.sort((L, _) => L.v - _.v);
15589
+ x.sort((L, _) => _.v - L.v);
15590
15590
  const v = x.length > 0 ? x[0] : null, b = v ? [...m, v] : m;
15591
15591
  b.sort((L, _) => L.i - _.i);
15592
15592
  for (const { d: L, i: _ } of b) {
@@ -15720,7 +15720,7 @@ class vk extends Xt {
15720
15720
  return { xMin: t, xMax: e, yMin: 0, yMax: 0 };
15721
15721
  }
15722
15722
  }
15723
- var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, qe = zt * 2, Ie = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Dt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Pt = Math.sin, an = Math.sign || function(n) {
15723
+ var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, qe = zt * 2, Ie = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Rt = Math.cos, fo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Pt = Math.sin, an = Math.sign || function(n) {
15724
15724
  return n > 0 ? 1 : n < 0 ? -1 : 0;
15725
15725
  }, He = Math.sqrt, sl = Math.tan;
15726
15726
  function qd(n) {
@@ -15784,8 +15784,8 @@ function tc(n) {
15784
15784
  return [Wn(n[1], n[0]), ln(n[2])];
15785
15785
  }
15786
15786
  function Zi(n) {
15787
- var t = n[0], e = n[1], i = Dt(e);
15788
- return [i * Dt(t), i * Pt(t), Pt(e)];
15787
+ var t = n[0], e = n[1], i = Rt(e);
15788
+ return [i * Rt(t), i * Pt(t), Pt(e)];
15789
15789
  }
15790
15790
  function po(n, t) {
15791
15791
  return n[0] * t[0] + n[1] * t[1] + n[2] * t[2];
@@ -15828,16 +15828,16 @@ function ku(n) {
15828
15828
  return t.invert = wu(-n), t;
15829
15829
  }
15830
15830
  function Mu(n, t) {
15831
- var e = Dt(n), i = Pt(n), r = Dt(t), o = Pt(t);
15831
+ var e = Rt(n), i = Pt(n), r = Rt(t), o = Pt(t);
15832
15832
  function s(a, l) {
15833
- var c = Dt(l), h = Dt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * e + h * i;
15833
+ var c = Rt(l), h = Rt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * e + h * i;
15834
15834
  return [
15835
15835
  Wn(f * r - d * o, h * e - u * i),
15836
15836
  ln(d * r + f * o)
15837
15837
  ];
15838
15838
  }
15839
15839
  return s.invert = function(a, l) {
15840
- var c = Dt(l), h = Dt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * r - f * o;
15840
+ var c = Rt(l), h = Rt(a) * c, f = Pt(a) * c, u = Pt(l), d = u * r - f * o;
15841
15841
  return [
15842
15842
  Wn(f * r + u * o, h * e + d * i),
15843
15843
  ln(d * e - h * i)
@@ -15855,10 +15855,10 @@ function wk(n) {
15855
15855
  }
15856
15856
  function kk(n, t, e, i, r, o) {
15857
15857
  if (e) {
15858
- var s = Dt(t), a = Pt(t), l = i * e;
15858
+ var s = Rt(t), a = Pt(t), l = i * e;
15859
15859
  r == null ? (r = t + i * qe, o = t - l / 2) : (r = Au(s, r), o = Au(s, o), (i > 0 ? r < o : r > o) && (r += i * qe));
15860
15860
  for (var c, h = r; i > 0 ? h > o : h < o; h -= l)
15861
- c = tc([s, -a * Dt(h), -a * Pt(h)]), n.point(c[0], c[1]);
15861
+ c = tc([s, -a * Rt(h), -a * Pt(h)]), n.point(c[0], c[1]);
15862
15862
  }
15863
15863
  }
15864
15864
  function Au(n, t) {
@@ -15943,13 +15943,13 @@ function ga(n) {
15943
15943
  return Gt(n[0]) <= zt ? n[0] : an(n[0]) * ((Gt(n[0]) + zt) % qe - zt);
15944
15944
  }
15945
15945
  function Mk(n, t) {
15946
- var e = ga(t), i = t[1], r = Pt(i), o = [Pt(e), -Dt(e), 0], s = 0, a = 0, l = new yi();
15946
+ var e = ga(t), i = t[1], r = Pt(i), o = [Pt(e), -Rt(e), 0], s = 0, a = 0, l = new yi();
15947
15947
  r === 1 ? i = ee + At : r === -1 && (i = -ee - At);
15948
15948
  for (var c = 0, h = n.length; c < h; ++c)
15949
15949
  if (u = (f = n[c]).length)
15950
- for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Pt(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
15951
- var v = f[x], b = ga(v), k = v[1] / 2 + yu, M = Pt(k), C = Dt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
15952
- if (l.add(Wn(E * _ * Pt(T), m * C + E * Dt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15950
+ for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Pt(y), m = Rt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
15951
+ var v = f[x], b = ga(v), k = v[1] / 2 + yu, M = Pt(k), C = Rt(k), L = b - p, _ = L >= 0 ? 1 : -1, T = _ * L, I = T > zt, E = g * M;
15952
+ if (l.add(Wn(E * _ * Pt(T), m * C + E * Rt(T))), s += I ? L + _ * qe : L, I ^ p >= e ^ b >= e) {
15953
15953
  var P = es(Zi(d), Zi(v));
15954
15954
  ec(P);
15955
15955
  var S = es(o, P);
@@ -16047,7 +16047,7 @@ function _k(n) {
16047
16047
  }
16048
16048
  function Ck(n, t, e, i) {
16049
16049
  var r, o, s = Pt(n - e);
16050
- return Gt(s) > At ? tr((Pt(t) * (o = Dt(i)) * Pt(e) - Pt(i) * (r = Dt(t)) * Pt(n)) / (r * o * s)) : (t + i) / 2;
16050
+ return Gt(s) > At ? tr((Pt(t) * (o = Rt(i)) * Pt(e) - Pt(i) * (r = Rt(t)) * Pt(n)) / (r * o * s)) : (t + i) / 2;
16051
16051
  }
16052
16052
  function Pk(n, t, e, i) {
16053
16053
  var r;
@@ -16060,12 +16060,12 @@ function Pk(n, t, e, i) {
16060
16060
  i.point(t[0], t[1]);
16061
16061
  }
16062
16062
  function Ek(n) {
16063
- var t = Dt(n), e = 2 * te, i = t > 0, r = Gt(t) > At;
16063
+ var t = Rt(n), e = 2 * te, i = t > 0, r = Gt(t) > At;
16064
16064
  function o(h, f, u, d) {
16065
16065
  kk(d, n, e, u, h, f);
16066
16066
  }
16067
16067
  function s(h, f) {
16068
- return Dt(h) * Dt(f) > t;
16068
+ return Rt(h) * Rt(f) > t;
16069
16069
  }
16070
16070
  function a(h) {
16071
16071
  var f, u, d, p, y;
@@ -16584,7 +16584,7 @@ function fp(n, t, e) {
16584
16584
  n.scale(150 * o).translate([s, a]);
16585
16585
  }, e);
16586
16586
  }
16587
- var Ru = 16, Yk = Dt(30 * te);
16587
+ var Ru = 16, Yk = Rt(30 * te);
16588
16588
  function Du(n, t) {
16589
16589
  return +t ? Uk(n, t) : Xk(n);
16590
16590
  }
@@ -16663,7 +16663,7 @@ function Zk(n, t, e, i, r) {
16663
16663
  }
16664
16664
  function zu(n, t, e, i, r, o) {
16665
16665
  if (!o) return Zk(n, t, e, i, r);
16666
- var s = Dt(o), a = Pt(o), l = s * n, c = a * n, h = s / n, f = a / n, u = (a * e - s * t) / n, d = (a * t + s * e) / n;
16666
+ var s = Rt(o), a = Pt(o), l = s * n, c = a * n, h = s / n, f = a / n, u = (a * e - s * t) / n, d = (a * t + s * e) / n;
16667
16667
  function p(y, g) {
16668
16668
  return y *= i, g *= r, [l * y - c * g + t, e - c * y - l * g];
16669
16669
  }
@@ -16737,7 +16737,7 @@ function hl(n) {
16737
16737
  }, r;
16738
16738
  }
16739
16739
  function Kk(n) {
16740
- var t = Dt(n);
16740
+ var t = Rt(n);
16741
16741
  function e(i, r) {
16742
16742
  return [i * t, Pt(r) / t];
16743
16743
  }
@@ -16751,7 +16751,7 @@ function Jk(n, t) {
16751
16751
  var r = 1 + e * (2 * i - e), o = He(r) / i;
16752
16752
  function s(a, l) {
16753
16753
  var c = He(r - 2 * i * Pt(l)) / i;
16754
- return [c * Pt(a *= i), o - c * Dt(a)];
16754
+ return [c * Pt(a *= i), o - c * Rt(a)];
16755
16755
  }
16756
16756
  return s.invert = function(a, l) {
16757
16757
  var c = o - l, h = Wn(a, Gt(c)) * an(c);
@@ -16824,7 +16824,7 @@ function tM() {
16824
16824
  }
16825
16825
  function gp(n) {
16826
16826
  return function(t, e) {
16827
- var i = Dt(t), r = Dt(e), o = n(i * r);
16827
+ var i = Rt(t), r = Rt(e), o = n(i * r);
16828
16828
  return o === 1 / 0 ? [2, 0] : [
16829
16829
  o * r * Pt(t),
16830
16830
  o * Pt(e)
@@ -16833,7 +16833,7 @@ function gp(n) {
16833
16833
  }
16834
16834
  function Kr(n) {
16835
16835
  return function(t, e) {
16836
- var i = He(t * t + e * e), r = n(i), o = Pt(r), s = Dt(r);
16836
+ var i = He(t * t + e * e), r = n(i), o = Pt(r), s = Rt(r);
16837
16837
  return [
16838
16838
  Wn(t * o, i * s),
16839
16839
  ln(i && e * o / i)
@@ -16888,12 +16888,12 @@ function xo(n) {
16888
16888
  return sl((ee + n) / 2);
16889
16889
  }
16890
16890
  function iM(n, t) {
16891
- var e = Dt(n), i = n === t ? Pt(n) : Qo(e / Dt(t)) / Qo(xo(t) / xo(n)), r = e * da(xo(n), i) / i;
16891
+ var e = Rt(n), i = n === t ? Pt(n) : Qo(e / Rt(t)) / Qo(xo(t) / xo(n)), r = e * da(xo(n), i) / i;
16892
16892
  if (!i) return Es;
16893
16893
  function o(s, a) {
16894
16894
  r > 0 ? a < -ee + At && (a = -ee + At) : a > ee - At && (a = ee - At);
16895
16895
  var l = r / da(xo(a), i);
16896
- return [l * Pt(i * s), r - l * Dt(i * s)];
16896
+ return [l * Pt(i * s), r - l * Rt(i * s)];
16897
16897
  }
16898
16898
  return o.invert = function(s, a) {
16899
16899
  var l = r - a, c = an(i) * He(s * s + l * l), h = Wn(s, Gt(l)) * an(l);
@@ -16911,11 +16911,11 @@ function oM() {
16911
16911
  return Sn(ls).scale(152.63);
16912
16912
  }
16913
16913
  function sM(n, t) {
16914
- var e = Dt(n), i = n === t ? Pt(n) : (e - Dt(t)) / (t - n), r = e / i + n;
16914
+ var e = Rt(n), i = n === t ? Pt(n) : (e - Rt(t)) / (t - n), r = e / i + n;
16915
16915
  if (Gt(i) < At) return ls;
16916
16916
  function o(s, a) {
16917
16917
  var l = r - a, c = i * s;
16918
- return [l * Pt(c), r - l * Dt(c)];
16918
+ return [l * Pt(c), r - l * Rt(c)];
16919
16919
  }
16920
16920
  return o.invert = function(s, a) {
16921
16921
  var l = r - a, c = Wn(s, Gt(l)) * an(l);
@@ -16929,7 +16929,7 @@ var Lr = 1.340264, Ir = -0.081106, Fr = 893e-6, Rr = 3796e-6, hs = He(3) / 2, cM
16929
16929
  function bp(n, t) {
16930
16930
  var e = ln(hs * Pt(t)), i = e * e, r = i * i * i;
16931
16931
  return [
16932
- n * Dt(e) / (hs * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i))),
16932
+ n * Rt(e) / (hs * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i))),
16933
16933
  e * (Lr + Ir * i + r * (Fr + Rr * i))
16934
16934
  ];
16935
16935
  }
@@ -16937,7 +16937,7 @@ bp.invert = function(n, t) {
16937
16937
  for (var e = t, i = e * e, r = i * i * i, o = 0, s, a, l; o < cM && (a = e * (Lr + Ir * i + r * (Fr + Rr * i)) - t, l = Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i), e -= s = a / l, i = e * e, r = i * i * i, !(Gt(s) < Xd)); ++o)
16938
16938
  ;
16939
16939
  return [
16940
- hs * n * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i)) / Dt(e),
16940
+ hs * n * (Lr + 3 * Ir * i + r * (7 * Fr + 9 * Rr * i)) / Rt(e),
16941
16941
  ln(Pt(e) / hs)
16942
16942
  ];
16943
16943
  };
@@ -16945,7 +16945,7 @@ function Ou() {
16945
16945
  return Sn(bp).scale(177.158);
16946
16946
  }
16947
16947
  function vp(n, t) {
16948
- var e = Dt(t), i = Dt(n) * e;
16948
+ var e = Rt(t), i = Rt(n) * e;
16949
16949
  return [e * Pt(n) / i, Pt(t) / i];
16950
16950
  }
16951
16951
  vp.invert = Kr(tr);
@@ -16974,14 +16974,14 @@ function pc() {
16974
16974
  return Sn(wp).scale(175.295);
16975
16975
  }
16976
16976
  function kp(n, t) {
16977
- return [Dt(t) * Pt(n), Pt(t)];
16977
+ return [Rt(t) * Pt(n), Pt(t)];
16978
16978
  }
16979
16979
  kp.invert = Kr(ln);
16980
16980
  function Nu() {
16981
16981
  return Sn(kp).scale(249.5).clipAngle(90 + At);
16982
16982
  }
16983
16983
  function Mp(n, t) {
16984
- var e = Dt(t), i = 1 + Dt(n) * e;
16984
+ var e = Rt(t), i = 1 + Rt(n) * e;
16985
16985
  return [e * Pt(n) / i, Pt(t) / i];
16986
16986
  }
16987
16987
  Mp.invert = Kr(function(n) {
@@ -18900,7 +18900,7 @@ class rA extends Xt {
18900
18900
  const tt = X(V.source);
18901
18901
  Vt.has(tt) || Vt.set(tt, []), Vt.get(tt).push(V);
18902
18902
  }
18903
- const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), Zt = Ot, ne = Zt, Tt = Nt * ne + Ot + Zt, Kt = r.centerNodes === !0, le = r.spreadFactor ?? 1;
18903
+ const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), Zt = Ot, ne = Zt, $t = Nt * ne + Ot + Zt, Kt = r.centerNodes === !0, le = r.spreadFactor ?? 1;
18904
18904
  (Kt || le !== 1) && this.centerAndSpreadNodes(q, ot, t.height, le, Ct);
18905
18905
  const Ve = /* @__PURE__ */ new Map();
18906
18906
  for (const V of M)
@@ -18944,7 +18944,7 @@ class rA extends Xt {
18944
18944
  let gt = null;
18945
18945
  Ye === "gradient" && (gt = ir);
18946
18946
  let Q = null;
18947
- const $t = 0.55, Ft = 0.25, yt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill", ze ? "#aaa" : "none").attr("stroke", ze ? "none" : "#aaa").attr("stroke-width", (V) => ze ? null : Math.max(v, V.width)).attr("stroke-linecap", "butt").style("cursor", "pointer");
18947
+ const Et = 0.55, Dt = 0.25, yt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill", ze ? "#aaa" : "none").attr("stroke", ze ? "none" : "#aaa").attr("stroke-width", (V) => ze ? null : Math.max(v, V.width)).attr("stroke-linecap", "butt").style("cursor", "pointer");
18948
18948
  Ye === "gradient" && gt ? yt.each(function(V, tt) {
18949
18949
  const lt = `katucharts-sankey-grad-${tt}-${Math.random().toString(36).slice(2, 6)}`;
18950
18950
  gt.append("linearGradient").attr("id", lt).attr("gradientUnits", "userSpaceOnUse").attr("x1", V.source.x1).attr("x2", V.target.x0).selectAll("stop").data([
@@ -19001,7 +19001,7 @@ class rA extends Xt {
19001
19001
  });
19002
19002
  }, Bt = (V, tt) => {
19003
19003
  const lt = he(tt);
19004
- yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : he(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), qt("mouseover", V, tt);
19004
+ yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : he(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Et), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Dt), qt("mouseover", V, tt);
19005
19005
  }, Ut = (V, tt) => {
19006
19006
  yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), qt("mouseout", V, tt);
19007
19007
  }, Qt = (V, tt) => {
@@ -19022,7 +19022,7 @@ class rA extends Xt {
19022
19022
  const lt = /* @__PURE__ */ new Set([tt]);
19023
19023
  for (const Lt of q.links)
19024
19024
  Lt.source === tt ? lt.add(Lt.target) : Lt.target === tt && lt.add(Lt.source);
19025
- Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Ft), yt.transition("highlight").duration(K).ease(Z).attr(
19025
+ Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", Et), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Dt), yt.transition("highlight").duration(K).ease(Z).attr(
19026
19026
  Ge,
19027
19027
  (Lt) => Lt.source === tt || Lt.target === tt ? Math.min(he(Lt) + 0.3, 1) : he(Lt) * 0.375
19028
19028
  );
@@ -19051,10 +19051,10 @@ class rA extends Xt {
19051
19051
  });
19052
19052
  };
19053
19053
  if (Ht.on("mouseover", Ke).on("mouseout", Te).on("click", Oe), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", Ut).on("click", Qt), L) {
19054
- const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, $e = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, xe = (ut) => Y && Lt(ut) || $e(ut), ge = /* @__PURE__ */ new Map();
19054
+ const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Tt) => Math.max(ut, Tt.x0 ?? 0), 0), St = q.nodes.reduce((ut, Tt) => Math.min(ut, Tt.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, $e = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, xe = (ut) => Y && Lt(ut) || $e(ut), ge = /* @__PURE__ */ new Map();
19055
19055
  for (const ut of q.nodes) {
19056
- const Et = ut.y1 - ut.y0;
19057
- if (!xe(ut) && Et < tt) {
19056
+ const Tt = ut.y1 - ut.y0;
19057
+ if (!xe(ut) && Tt < tt) {
19058
19058
  ge.set(ut, "");
19059
19059
  continue;
19060
19060
  }
@@ -19064,12 +19064,12 @@ class rA extends Xt {
19064
19064
  Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = C.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Te).on("click", Oe).text((ut) => ge.get(ut) ?? "");
19065
19065
  const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
19066
19066
  for (const ut of q.nodes) {
19067
- const Et = X(ut);
19068
- Gn.set(Et, Math.min(Gn.get(Et) ?? 1 / 0, ut.x0)), Cn.set(Et, Math.max(Cn.get(Et) ?? -1 / 0, ut.x1));
19067
+ const Tt = X(ut);
19068
+ Gn.set(Tt, Math.min(Gn.get(Tt) ?? 1 / 0, ut.x0)), Cn.set(Tt, Math.max(Cn.get(Tt) ?? -1 / 0, ut.x1));
19069
19069
  }
19070
19070
  Q.each(function(ut) {
19071
- const Et = this;
19072
- let ie = Et.textContent;
19071
+ const Tt = this;
19072
+ let ie = Tt.textContent;
19073
19073
  if (!ie) return;
19074
19074
  const xn = A(ie);
19075
19075
  if (xe(ut)) {
@@ -19083,47 +19083,47 @@ class rA extends Xt {
19083
19083
  ar = (cr !== void 0 ? (ut.x1 + cr) / 2 : t.width - 2) - vl / 2 - (ut.x1 + 4);
19084
19084
  }
19085
19085
  if (ar <= S) {
19086
- Et.textContent = "";
19086
+ Tt.textContent = "";
19087
19087
  return;
19088
19088
  }
19089
- xn > ar && (ie = $(ie, ar, 1), Et.textContent = ie);
19089
+ xn > ar && (ie = $(ie, ar, 1), Tt.textContent = ie);
19090
19090
  return;
19091
19091
  }
19092
19092
  const ei = (ut.x0 + ut.x1) / 2, Yn = ei - xn / 2, Si = ei + xn / 2;
19093
19093
  if (Si <= t.width && Yn >= 0) return;
19094
19094
  const sr = X(ut), $p = Gn.get(sr + 1) ?? t.width, Lp = Cn.get(sr - 1) ?? 0, Ts = $p - ut.x1 - 4, $s = ut.x0 - Lp - 4;
19095
19095
  if (Yn < 0 && Ts > I * 1.5) {
19096
- Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Ts && (Et.textContent = $(ie, Ts));
19096
+ Tt.setAttribute("text-anchor", "start"), Tt.setAttribute("x", String(ut.x1 + 2)), xn > Ts && (Tt.textContent = $(ie, Ts));
19097
19097
  return;
19098
19098
  }
19099
19099
  if (Si > t.width && $s > I * 1.5) {
19100
- Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > $s && (Et.textContent = $(ie, $s));
19100
+ Tt.setAttribute("text-anchor", "end"), Tt.setAttribute("x", String(ut.x0 - 2)), xn > $s && (Tt.textContent = $(ie, $s));
19101
19101
  return;
19102
19102
  }
19103
19103
  const xl = 2 * Math.min(ei, t.width - ei) - 4;
19104
19104
  if (xl < I * 2) {
19105
- Et.textContent = "";
19105
+ Tt.textContent = "";
19106
19106
  return;
19107
19107
  }
19108
- Et.textContent = $(ie, xl);
19108
+ Tt.textContent = $(ie, xl);
19109
19109
  });
19110
- const ml = [], Ep = [...q.nodes].sort((ut, Et) => (Et.value ?? 0) - (ut.value ?? 0)), yl = /* @__PURE__ */ new Map();
19110
+ const ml = [], Ep = [...q.nodes].sort((ut, Tt) => (Tt.value ?? 0) - (ut.value ?? 0)), yl = /* @__PURE__ */ new Map();
19111
19111
  Q.each(function(ut) {
19112
19112
  yl.set(ut, this);
19113
19113
  });
19114
- const Tp = (ut, Et) => ut.left < Et.right && ut.right > Et.left && ut.top < Et.bottom && ut.bottom > Et.top;
19114
+ const Tp = (ut, Tt) => ut.left < Tt.right && ut.right > Tt.left && ut.top < Tt.bottom && ut.bottom > Tt.top;
19115
19115
  for (const ut of Ep) {
19116
19116
  if (C.allowOverlap === !0) break;
19117
- const Et = yl.get(ut);
19118
- if (!Et || !Et.textContent) continue;
19117
+ const Tt = yl.get(ut);
19118
+ if (!Tt || !Tt.textContent) continue;
19119
19119
  let ie;
19120
19120
  try {
19121
- ie = Et.getBBox();
19121
+ ie = Tt.getBBox();
19122
19122
  } catch {
19123
- const Yn = A(Et.textContent || ""), Si = Number(Et.getAttribute("x") || 0), sr = Et.getAttribute("text-anchor");
19123
+ const Yn = A(Tt.textContent || ""), Si = Number(Tt.getAttribute("x") || 0), sr = Tt.getAttribute("text-anchor");
19124
19124
  ie = {
19125
19125
  x: sr === "end" ? Si - Yn : sr === "middle" ? Si - Yn / 2 : Si,
19126
- y: Number(Et.getAttribute("y") || 0) - I / 2,
19126
+ y: Number(Tt.getAttribute("y") || 0) - I / 2,
19127
19127
  width: Yn,
19128
19128
  height: I
19129
19129
  };
@@ -19136,17 +19136,17 @@ class rA extends Xt {
19136
19136
  bottom: ie.y + ie.height
19137
19137
  };
19138
19138
  if (ml.some((Yn) => Tp(Yn, xn)) && C.overflow !== "allow") {
19139
- Et.textContent = "";
19139
+ Tt.textContent = "";
19140
19140
  continue;
19141
19141
  }
19142
19142
  ml.push(xn);
19143
19143
  }
19144
19144
  i && !h && Q.attr("opacity", 0).each(function(ut) {
19145
- const Et = X(ut), xn = (_t.get(Et) || []).indexOf(ut), ei = Et * ne + Ot - 80 + Math.min(xn * 20, 80);
19145
+ const Tt = X(ut), xn = (_t.get(Tt) || []).indexOf(ut), ei = Tt * ne + Ot - 80 + Math.min(xn * 20, 80);
19146
19146
  rt(this).transition("enter").duration(Ot).delay(ei).ease(pt).attr("opacity", 1);
19147
19147
  });
19148
19148
  }
19149
- i && this.emitAfterAnimate(h ? 0 : Tt + 100);
19149
+ i && this.emitAfterAnimate(h ? 0 : $t + 100);
19150
19150
  }
19151
19151
  applyExplicitColumnLayout(t, e, i, r, o, s, a, l, c) {
19152
19152
  var m, x;
@@ -19900,20 +19900,20 @@ class WA extends Xt {
19900
19900
  const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), $ = OA().padAngle(w).sortSubgroups(null)(I);
19901
19901
  this.normalizeChordWidths($), this.sortChordEndpoints($);
19902
19902
  const R = Se().innerRadius(T).outerRadius(_).cornerRadius(3), F = Se().innerRadius(T).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
19903
- 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), Qt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19903
+ 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), Et = nt * Math.sin(ht), Dt = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Qt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
19904
19904
  let Te = Math.abs(mt - vt);
19905
19905
  Te > Math.PI && (Te = 2 * Math.PI - Te);
19906
19906
  const Oe = Te / Math.PI, ye = nt * Math.max(D, (1 - Oe) * (1 - Oe) * (1 - Oe));
19907
19907
  let Je = Math.abs(ht - gt);
19908
19908
  Je > Math.PI && (Je = 2 * Math.PI - Je);
19909
19909
  const hn = Je / Math.PI, _n = nt * Math.max(D, (1 - hn) * (1 - hn) * (1 - hn));
19910
- return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${ye * Math.cos(vt)},${ye * Math.sin(vt)},${ye * Math.cos(mt)},${ye * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Qt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${$t}Z`;
19910
+ return `M${Q},${Et}A${nt},${nt},0,${Ht},1,${Dt},${yt}C${ye * Math.cos(vt)},${ye * Math.sin(vt)},${ye * Math.cos(mt)},${ye * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Qt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${Et}Z`;
19911
19911
  }, B = this.group.append("g").attr("transform", `translate(${x},${v})`), H = (et) => P[et] || e[et % e.length], J = r.linkColorMode ?? "from", X = B.append("defs");
19912
19912
  let j = null;
19913
19913
  J === "gradient" && (j = X);
19914
19914
  const W = (et) => H(J === "to" ? et.target.index : et.source.index), U = u * 2, G = (et, nt, ht, vt) => {
19915
- 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);
19916
- 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([
19915
+ const mt = `katucharts-dw-edge-${vt}-${ht}-${Math.random().toString(36).slice(2, 6)}`, gt = T * Math.cos(et), Q = T * Math.sin(et), Et = (T - U) * Math.cos(et), Dt = (T - U) * Math.sin(et);
19916
+ return X.append("linearGradient").attr("id", mt).attr("gradientUnits", "userSpaceOnUse").attr("x1", gt).attr("y1", Q).attr("x2", Et).attr("y2", Dt).selectAll("stop").data([
19917
19917
  { offset: "0%", opacity: 0.7 },
19918
19918
  { offset: "25%", opacity: 0.2 },
19919
19919
  { offset: "50%", opacity: 0.05 },
@@ -19935,16 +19935,16 @@ class WA extends Xt {
19935
19935
  if ($.forEach((vt, mt) => {
19936
19936
  const gt = H(vt.source.index), Q = H(vt.target.index);
19937
19937
  if (gt === Q) return;
19938
- const $t = z(vt), Ft = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Ft, Q, mt, "tgt");
19939
- ht.append("path").attr("d", $t).attr("fill", `url(#${yt})`).attr("stroke", "none").style("pointer-events", "none");
19938
+ const Et = z(vt), Dt = (vt.target.startAngle + vt.target.endAngle) / 2 + p - Math.PI / 2, yt = G(Dt, Q, mt, "tgt");
19939
+ ht.append("path").attr("d", Et).attr("fill", `url(#${yt})`).attr("stroke", "none").style("pointer-events", "none");
19940
19940
  const qt = (vt.source.startAngle + vt.source.endAngle) / 2 + p - Math.PI / 2, Bt = G(qt, gt, mt, "src");
19941
- ht.append("path").attr("d", $t).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
19941
+ ht.append("path").attr("d", Et).attr("fill", `url(#${Bt})`).attr("stroke", "none").style("pointer-events", "none");
19942
19942
  }), i) {
19943
19943
  ht.attr("opacity", 0);
19944
19944
  const vt = B.append("defs"), mt = Math.round(s * 0.62);
19945
- Y.each(function(Q, $t) {
19946
- 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, Qt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Qt) / 2, Te = T * Math.cos(Ht), Oe = T * Math.sin(Ht), ye = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Oe, ye - Te) * 180 / Math.PI, _n = Math.sqrt((ye - Te) ** 2 + (Je - Oe) ** 2) + _ * 2, rr = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = rr.append("rect").attr("transform", `translate(${Te},${Oe}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19947
- tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Ft).ease(pt).attr("width", _n).on("end", function() {
19945
+ Y.each(function(Q, Et) {
19946
+ const Dt = f + Et * a, yt = `dw-clip-${Et}-${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, Qt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Qt) / 2, Te = T * Math.cos(Ht), Oe = T * Math.sin(Ht), ye = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Oe, ye - Te) * 180 / Math.PI, _n = Math.sqrt((ye - Te) ** 2 + (Je - Oe) ** 2) + _ * 2, rr = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = rr.append("rect").attr("transform", `translate(${Te},${Oe}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
19947
+ tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Dt).ease(pt).attr("width", _n).on("end", function() {
19948
19948
  tt.attr("clip-path", null), rr.remove();
19949
19949
  });
19950
19950
  });
@@ -19961,7 +19961,7 @@ class WA extends Xt {
19961
19961
  Y.attr("fill-opacity", d);
19962
19962
  const et = B.append("defs"), nt = Math.round(s * 0.62);
19963
19963
  Y.each(function(ht, vt) {
19964
- 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), Qt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Te = Math.atan2(Ke - Qt, Ht - Ut) * 180 / Math.PI, Oe = Math.sqrt((Ht - Ut) ** 2 + (Ke - Qt) ** 2) + _ * 2, ye = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = ye.append("rect").attr("transform", `translate(${Ut},${Qt}) rotate(${Te})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19964
+ const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, Et = ht.source.endAngle + p - Math.PI / 2, Dt = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + Et) / 2, Bt = (Dt + yt) / 2, Ut = T * Math.cos(qt), Qt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Te = Math.atan2(Ke - Qt, Ht - Ut) * 180 / Math.PI, Oe = Math.sqrt((Ht - Ut) ** 2 + (Ke - Qt) ** 2) + _ * 2, ye = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = ye.append("rect").attr("transform", `translate(${Ut},${Qt}) rotate(${Te})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
19965
19965
  hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Oe).on("end", function() {
19966
19966
  hn.attr("clip-path", null), ye.remove();
19967
19967
  });
@@ -20028,11 +20028,11 @@ class WA extends Xt {
20028
20028
  (Bt) => Bt.source.index === nt.index || Bt.target.index === nt.index
20029
20029
  );
20030
20030
  if (gt.length === 0) return null;
20031
- const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, $t = (Bt) => {
20031
+ const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, Et = (Bt) => {
20032
20032
  const Ut = Q(Bt), Qt = ot(Ut.startAngle + p), Ht = ot(Ut.endAngle + p);
20033
20033
  return Qt <= Ht ? mt >= Qt && mt <= Ht : mt >= Qt || mt <= Ht;
20034
- }, Ft = gt.find($t);
20035
- if (Ft) return Ft;
20034
+ }, Dt = gt.find(Et);
20035
+ if (Dt) return Dt;
20036
20036
  let yt = gt[0], qt = 1 / 0;
20037
20037
  for (const Bt of gt) {
20038
20038
  const Ut = Q(Bt), Qt = ot((Ut.startAngle + Ut.endAngle) / 2 + p);
@@ -20089,7 +20089,7 @@ class WA extends Xt {
20089
20089
  event: et
20090
20090
  });
20091
20091
  }), 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);
20092
- const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) || Ee, Nt = ((ir = _t.style) == null ? void 0 : ir.fontSize) || Mt, Ot = Ae(Nt), Zt = 22, ne = _ + Zt, Tt = Math.max(Ot * 1.6, 17), Kt = "…", le = tn(Kt, Ot, "bold"), Ve = (et, nt) => {
20092
+ const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) || Ee, Nt = ((ir = _t.style) == null ? void 0 : ir.fontSize) || Mt, Ot = Ae(Nt), Zt = 22, ne = _ + Zt, $t = Math.max(Ot * 1.6, 17), Kt = "…", le = tn(Kt, Ot, "bold"), Ve = (et, nt) => {
20093
20093
  if (!et || nt <= le) return "";
20094
20094
  if (tn(et, Ot, "bold") <= nt) return et;
20095
20095
  let ht = "";
@@ -20118,47 +20118,44 @@ class WA extends Xt {
20118
20118
  if (o === "small") {
20119
20119
  const et = Math.PI * 2, nt = _ + 6 + Ot * 0.5, ht = (gt) => [nt * Math.sin(gt), -nt * Math.cos(gt)], vt = (gt, Q) => {
20120
20120
  if (!gt) return "";
20121
- const $t = Q * nt - 2;
20122
- if ($t < tn(gt[0], Ot, "bold")) return "";
20123
- if (tn(gt, Ot, "bold") <= $t) return gt;
20124
- let Ft = "";
20121
+ const Et = Q * nt - 2;
20122
+ if (Et < tn(gt[0], Ot, "bold")) return "";
20123
+ if (tn(gt, Ot, "bold") <= Et) return gt;
20124
+ let Dt = "";
20125
20125
  for (const yt of gt) {
20126
- if (Ft && tn(Ft + yt, Ot, "bold") > $t) break;
20127
- Ft += yt;
20126
+ if (Dt && tn(Dt + yt, Ot, "bold") > Et) break;
20127
+ Dt += yt;
20128
20128
  }
20129
- return Ft;
20129
+ return Dt;
20130
20130
  }, mt = B.append("defs");
20131
- if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be.filter((gt) => gt.visible)).join("text").attr("class", "katucharts-chord-label").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0), Ye.each((gt, Q, $t) => {
20132
- const Ft = rt($t[Q]);
20133
- Ft.text(null);
20131
+ if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be.filter((gt) => gt.visible)).join("text").attr("class", "katucharts-chord-label").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0), Ye.each((gt, Q, Et) => {
20132
+ const Dt = rt(Et[Q]);
20133
+ Dt.text(null);
20134
20134
  const yt = vt(E[gt.index] || "", gt.span);
20135
20135
  if (!yt) return;
20136
20136
  const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [Qt, Ht] = ht(Bt ? gt.mid + Ut : gt.mid - Ut), [Ke, Te] = ht(Bt ? gt.mid - Ut : gt.mid + Ut), Oe = Bt ? 0 : 1, ye = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
20137
- mt.append("path").attr("id", ye).attr("fill", "none").attr("d", `M${Qt},${Ht}A${nt},${nt},0,0,${Oe},${Ke},${Te}`), Ft.append("textPath").attr("href", `#${ye}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
20137
+ mt.append("path").attr("id", ye).attr("fill", "none").attr("d", `M${Qt},${Ht}A${nt},${nt},0,0,${Oe},${Ke},${Te}`), Dt.append("textPath").attr("href", `#${ye}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
20138
20138
  }), i) {
20139
20139
  Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
20140
- const gt = Math.round(s * 0.62), Q = $.length, $t = f + Q * a + gt;
20141
- this.emitAfterAnimate($t + 100);
20140
+ const gt = Math.round(s * 0.62), Q = $.length, Et = f + Q * a + gt;
20141
+ this.emitAfterAnimate(Et + 100);
20142
20142
  } else
20143
20143
  Ye.attr("opacity", 1);
20144
20144
  } else {
20145
20145
  const et = Math.max(1, Vn - 5 + (ze - 5));
20146
20146
  if (o === "medium") {
20147
- const Q = Math.max(1, Math.min(10, Math.floor(et / (Tt * 1.2))));
20148
- for (const $t of [!0, !1]) {
20149
- const Ft = Be.filter((yt) => yt.visible && yt.isRight === $t);
20150
- Ft.length > Q && (Ft.sort((yt, qt) => qt.rank - yt.rank), Ft.slice(Q).forEach((yt) => {
20151
- yt.visible = !1;
20152
- }));
20153
- }
20147
+ const Et = Math.max(1, Math.min(10, Math.floor(et / ($t * 1.2)))) * 2, Dt = Be.filter((yt) => yt.visible).sort((yt, qt) => qt.rank - yt.rank);
20148
+ Dt.length > Et && Dt.slice(Et).forEach((yt) => {
20149
+ yt.visible = !1;
20150
+ });
20154
20151
  }
20155
- this.distributeChordLabels(Be.filter((Q) => Q.visible && Q.isRight), Tt, Vn, ze), this.distributeChordLabels(Be.filter((Q) => Q.visible && !Q.isRight), Tt, Vn, ze);
20152
+ this.distributeChordLabels(Be.filter((Q) => Q.visible && Q.isRight), $t, Vn, ze), this.distributeChordLabels(Be.filter((Q) => Q.visible && !Q.isRight), $t, Vn, ze);
20156
20153
  const nt = Math.max(Ot * 1.4, 16), ht = (Q) => {
20157
- const $t = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Ft = $t.length * Tt / et;
20154
+ const Et = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Dt = Et.length * $t / et;
20158
20155
  let yt = 1;
20159
- $t.length >= 8 && Ft > 0.5 && (yt = 2), $t.length >= 14 && Ft > 0.75 && (yt = 3);
20156
+ Et.length >= 8 && Dt > 0.5 && (yt = 2), Et.length >= 14 && Dt > 0.75 && (yt = 3);
20160
20157
  const qt = Math.max(1, yt * 2 - 2);
20161
- $t.forEach((Bt, Ut) => {
20158
+ Et.forEach((Bt, Ut) => {
20162
20159
  if (yt <= 1) {
20163
20160
  Bt.col = 0;
20164
20161
  return;
@@ -20173,19 +20170,19 @@ class WA extends Xt {
20173
20170
  ht(Be.filter((Q) => Q.isRight)), ht(Be.filter((Q) => !Q.isRight));
20174
20171
  for (const Q of Be) {
20175
20172
  if (!Q.visible) continue;
20176
- const $t = (Q.col || 0) * nt, Ft = ne + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)), qt = Math.sqrt(Math.max(0, Ft * Ft - yt * yt)), Bt = _ * 0.4 + $t;
20173
+ const Et = (Q.col || 0) * nt, Dt = ne + Et, yt = Math.max(-Dt, Math.min(Dt, Q.ly)), qt = Math.sqrt(Math.max(0, Dt * Dt - yt * yt)), Bt = _ * 0.4 + Et;
20177
20174
  Q.lx = Q.isRight ? Math.max(qt, Bt) : -Math.max(qt, Bt);
20178
20175
  const Ut = (Q.isRight ? he : mn) - le - 4;
20179
20176
  Q.lx = Q.isRight ? Math.min(Q.lx, Ut) : Math.max(Q.lx, -Ut);
20180
20177
  }
20181
20178
  const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ? he - vt(Q) : vt(Q) + mn) - 6), gt = Ge.selectAll(".katucharts-chord-connector").data(Be.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
20182
- const $t = _ + Zt * 0.55, Ft = $t * Math.sin(Q.mid), yt = -$t * Math.cos(Q.mid);
20183
- return `M${Q.ax},${Q.ay}L${Ft},${yt}L${Q.lx},${Q.ly}`;
20179
+ const Et = _ + Zt * 0.55, Dt = Et * Math.sin(Q.mid), yt = -Et * Math.cos(Q.mid);
20180
+ return `M${Q.ax},${Q.ay}L${Dt},${yt}L${Q.lx},${Q.ly}`;
20184
20181
  });
20185
20182
  if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be).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) >= le ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
20186
20183
  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);
20187
- const Q = Math.round(s * 0.62), $t = $.length, Ft = f + $t * a + Q;
20188
- this.emitAfterAnimate(Ft + 100);
20184
+ const Q = Math.round(s * 0.62), Et = $.length, Dt = f + Et * a + Q;
20185
+ this.emitAfterAnimate(Dt + 100);
20189
20186
  } else
20190
20187
  gt.attr("opacity", 0.8), Ye.attr("opacity", (Q) => Ze(Q) ? 1 : 0);
20191
20188
  }