@studiolxd/brand 47.1.0 → 48.0.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/dist/_shared/progressbar.js +19 -18
  3. package/dist/_types/atoms/CopyableValue/CopyableValue.d.ts +4 -4
  4. package/dist/_types/atoms/DescriptionList/DescriptionList.d.ts +5 -4
  5. package/dist/_types/atoms/DotsButton/DotsButton.d.ts +15 -0
  6. package/dist/_types/atoms/ProgressBar/ProgressBar.d.ts +12 -2
  7. package/dist/_types/atoms/Slider/Slider.d.ts +19 -2
  8. package/dist/_types/atoms/Spinner/Spinner.d.ts +15 -1
  9. package/dist/_types/constants/copy-to-clipboard.d.ts +22 -0
  10. package/dist/_types/messages/BrandMessages.d.ts +35 -1
  11. package/dist/_types/messages/index.d.ts +1 -1
  12. package/dist/_types/molecules/CalendarPlanner/CalendarPlanner.d.ts +13 -3
  13. package/dist/_types/molecules/CalendarRoster/CalendarRoster.d.ts +38 -5
  14. package/dist/_types/molecules/Carousel/Carousel.d.ts +65 -13
  15. package/dist/_types/molecules/CodeBlock/CodeBlock.d.ts +20 -6
  16. package/dist/_types/molecules/ContextMenu/ContextMenu.d.ts +5 -1
  17. package/dist/_types/molecules/CopyButton/CopyButton.d.ts +5 -6
  18. package/dist/_types/molecules/LanguageSwitcher/LanguageSwitcher.d.ts +13 -1
  19. package/dist/_types/molecules/NotificationList/NotificationList.d.ts +33 -3
  20. package/dist/_types/molecules/ProjectCard/ProjectCard.d.ts +14 -1
  21. package/dist/_types/molecules/Stepper/Stepper.d.ts +32 -7
  22. package/dist/_types/molecules/TreeView/TreeView.d.ts +11 -2
  23. package/dist/_types/molecules/UptimeBars/UptimeBars.d.ts +20 -2
  24. package/dist/_types/organisms/Chart/Chart.d.ts +46 -8
  25. package/dist/_types/sections/LegalFooter/LegalFooter.d.ts +13 -1
  26. package/dist/_types/templates/PublicPageShell/PublicPageShell.d.ts +15 -1
  27. package/dist/calendar-planner.js +47 -47
  28. package/dist/calendar-roster.js +28 -25
  29. package/dist/carousel.js +69 -67
  30. package/dist/chart.js +250 -249
  31. package/dist/code-block.js +34 -34
  32. package/dist/context-menu.js +1 -1
  33. package/dist/copy-button.js +35 -34
  34. package/dist/copyable-value.js +43 -42
  35. package/dist/description-list.js +1 -1
  36. package/dist/dots-button.js +18 -17
  37. package/dist/language-switcher.js +43 -41
  38. package/dist/legal-footer.js +21 -18
  39. package/dist/notification-list.js +40 -38
  40. package/dist/progress-bar.js +1 -0
  41. package/dist/project-card.js +31 -30
  42. package/dist/public-page-shell.js +12 -11
  43. package/dist/slider.js +24 -23
  44. package/dist/spinner.js +19 -14
  45. package/dist/stepper.js +35 -38
  46. package/dist/tree-view.js +86 -85
  47. package/dist/uptime-bars.js +54 -53
  48. package/package.json +1 -1
package/dist/chart.js CHANGED
@@ -1,13 +1,14 @@
1
1
  'use client';
2
2
  import './chart.css';
3
- import { VisuallyHidden as e } from "./visually-hidden.js";
4
- import { Inline as t } from "./inline.js";
5
- import { Tag as n } from "./tag.js";
6
- import { t as r } from "./_shared/css-properties.js";
7
- import { forwardRef as i, useEffect as a, useId as o, useMemo as s, useRef as c, useState as l } from "react";
8
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { VisuallyHidden as t } from "./visually-hidden.js";
5
+ import { Inline as n } from "./inline.js";
6
+ import { Tag as r } from "./tag.js";
7
+ import { t as i } from "./_shared/css-properties.js";
8
+ import { forwardRef as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
9
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
9
10
  //#region src/stories/organisms/Chart/Chart.tsx
10
- var p = {
11
+ var m = {
11
12
  barRadius: 4,
12
13
  barMaxThickness: 24,
13
14
  markGap: 2,
@@ -20,39 +21,39 @@ var p = {
20
21
  treemapGap: 2,
21
22
  radialBarGap: 4,
22
23
  dotSize: 10
23
- }, m = p.labelFontSize * .6, h = 640, g = 8;
24
- function _(e) {
24
+ }, h = m.labelFontSize * .6, g = 640, _ = 8;
25
+ function v(e) {
25
26
  return typeof e == "number" && Number.isFinite(e) ? e : 0;
26
27
  }
27
- function v(e, t) {
28
+ function y(e, t) {
28
29
  let n = e[t];
29
30
  return typeof n == "number" ? n : String(n ?? "");
30
31
  }
31
- function y(e, t, n) {
32
- if (!(t ?? n?.[e])) return e < g ? String(e + 1) : "muted";
33
- }
34
32
  function b(e, t, n) {
33
+ if (!(t ?? n?.[e])) return e < _ ? String(e + 1) : "muted";
34
+ }
35
+ function x(e, t, n) {
35
36
  return t ?? n?.[e];
36
37
  }
37
38
  function ee(e, t, n) {
38
- if (!(t || n?.[e])) return e < g ? String(e + 1) : "muted";
39
+ if (!(t || n?.[e])) return e < _ ? String(e + 1) : "muted";
39
40
  }
40
- function x({ className: e, index: t, color: n, palette: r, muted: i }) {
41
- return /* @__PURE__ */ d("svg", {
41
+ function te({ className: e, index: t, color: n, palette: r, muted: i }) {
42
+ return /* @__PURE__ */ f("svg", {
42
43
  className: e,
43
44
  "aria-hidden": "true",
44
- "data-slot": y(t, n, r),
45
- children: /* @__PURE__ */ d("rect", {
45
+ "data-slot": b(t, n, r),
46
+ children: /* @__PURE__ */ f("rect", {
46
47
  width: "100%",
47
48
  height: "100%",
48
- fill: i ? void 0 : b(t, n, r)
49
+ fill: i ? void 0 : x(t, n, r)
49
50
  })
50
51
  });
51
52
  }
52
- function te(e, t, n, r, i) {
53
+ function ne(e, t, n, r, i) {
53
54
  return `M ${e - r / 2} ${t} L ${e + r / 2} ${t} L ${e + i / 2} ${t + n} L ${e - i / 2} ${t + n} Z`;
54
55
  }
55
- function ne(e, t, n, r, i) {
56
+ function re(e, t, n, r, i) {
56
57
  let a = e.reduce((e, t) => e + t.value, 0);
57
58
  if (a <= 0 || r <= 0 || i <= 0) return [];
58
59
  let o = r * i, s = e.map((e) => ({
@@ -89,7 +90,7 @@ function ne(e, t, n, r, i) {
89
90
  }
90
91
  return p.length > 0 && g(), c;
91
92
  }
92
- function re(e, t, n) {
93
+ function ie(e, t, n) {
93
94
  let r = Math.min(0, e), i = Math.max(0, t);
94
95
  if (i === r) return [0, 1];
95
96
  let a = (i - r) / Math.max(1, n), o = 10 ** Math.floor(Math.log10(a)), s = [
@@ -102,9 +103,9 @@ function re(e, t, n) {
102
103
  for (let e = c; e <= l + s / 2; e += s) u.push(Math.round(e / s) * s);
103
104
  return u;
104
105
  }
105
- function ie(e, t, n, r, i) {
106
+ function ae(e, t, n, r, i) {
106
107
  if (n <= 0 || r <= 0) return "";
107
- let a = Math.max(0, Math.min(p.barRadius, i === "top" || i === "bottom" ? r : n, (i === "top" || i === "bottom" ? n : r) / 2));
108
+ let a = Math.max(0, Math.min(m.barRadius, i === "top" || i === "bottom" ? r : n, (i === "top" || i === "bottom" ? n : r) / 2));
108
109
  switch (i) {
109
110
  case "top": return `M ${e} ${t + r} L ${e} ${t + a} Q ${e} ${t} ${e + a} ${t} L ${e + n - a} ${t} Q ${e + n} ${t} ${e + n} ${t + a} L ${e + n} ${t + r} Z`;
110
111
  case "bottom": return `M ${e} ${t} L ${e} ${t + r - a} Q ${e} ${t + r} ${e + a} ${t + r} L ${e + n - a} ${t + r} Q ${e + n} ${t + r} ${e + n} ${t + r - a} L ${e + n} ${t} Z`;
@@ -112,13 +113,13 @@ function ie(e, t, n, r, i) {
112
113
  default: return `M ${e + n} ${t} L ${e + a} ${t} Q ${e} ${t} ${e} ${t + a} L ${e} ${t + r - a} Q ${e} ${t + r} ${e + a} ${t + r} L ${e + n} ${t + r} Z`;
113
114
  }
114
115
  }
115
- function ae(e, t, n, r, i, a) {
116
+ function oe(e, t, n, r, i, a) {
116
117
  let o = a - i > Math.PI ? 1 : 0, s = (n, r) => `${e + n * Math.cos(r)} ${t + n * Math.sin(r)}`;
117
118
  return r <= 0 ? `M ${e} ${t} L ${s(n, i)} A ${n} ${n} 0 ${o} 1 ${s(n, a)} Z` : `M ${s(n, i)} A ${n} ${n} 0 ${o} 1 ${s(n, a)} L ${s(r, a)} A ${r} ${r} 0 ${o} 0 ${s(r, i)} Z`;
118
119
  }
119
- function oe(e) {
120
- let t = c(null), [n, r] = l(e);
121
- return a(() => {
120
+ function se(e) {
121
+ let t = l(null), [n, r] = u(e);
122
+ return o(() => {
122
123
  let e = t.current;
123
124
  if (!e || typeof ResizeObserver > "u") return;
124
125
  let n = new ResizeObserver((e) => {
@@ -128,95 +129,95 @@ function oe(e) {
128
129
  return n.observe(e), () => n.disconnect();
129
130
  }, []), [t, n];
130
131
  }
131
- var S = i(function({ type: i = "line", data: a, series: c, xKey: g, colors: S, orientation: se = "vertical", stacked: C = !1, emphasis: ce, height: le = 256, ariaLabel: ue, title: de, caption: fe, formatValue: pe, formatX: me, yTicks: he = 5, legend: ge, grid: _e = !0, tooltip: w = !0, valueLabels: ve, locale: ye = "es-ES", tableCaption: be = "Datos del gráfico", tableHint: xe = "Los datos completos están en la tabla que sigue; flechas para recorrer el gráfico.", categoryLabel: Se = "Categoría", valueLabel: Ce = "Valor", shareLabel: we = "Porcentaje", emptyMessage: Te = "Sin datos que mostrar", className: Ee, ...De }, Oe) {
132
- let [ke, Ae] = oe(h), [T, E] = l(null), [je, Me] = l(!1), Ne = o(), Pe = s(() => new Intl.NumberFormat(ye), [ye]), Fe = s(() => new Intl.NumberFormat(ye, {
132
+ var S = a(function({ type: a = "line", data: o, series: l, xKey: _, colors: S, orientation: ce = "vertical", stacked: C = !1, emphasis: le, height: ue = 256, ariaLabel: de, title: fe, caption: pe, formatValue: me, formatX: he, yTicks: ge = 5, legend: _e, grid: ve = !0, tooltip: w = !0, valueLabels: ye, locale: be = "es-ES", tableCaption: xe, tableHint: Se, categoryLabel: Ce, valueLabel: we, shareLabel: Te, emptyMessage: Ee, className: De, ...Oe }, ke) {
133
+ let [Ae, je] = se(g), [T, E] = u(null), [Me, Ne] = u(!1), Pe = s(), Fe = c(() => new Intl.NumberFormat(be), [be]), D = e("chart"), Ie = c(() => new Intl.NumberFormat(be, {
133
134
  style: "percent",
134
135
  maximumFractionDigits: 1
135
- }), [ye]), D = (e, t) => pe ? pe(e, t) : Pe.format(e), O = (e) => me ? me(e) : String(e), Ie = i === "pie" || i === "donut", k = Ie || i === "funnel" || i === "treemap" || i === "radial-bar", A = i === "scatter", Le = i === "radar", j = k || Le, Re = ge ?? (k ? a.length > 1 : c.length > 1), ze = ve ?? (i === "line" || i === "area" ? "last" : "none"), M = a, N = M.length === 0 || c.length === 0, Be = [
136
+ }), [be]), O = (e, t) => me ? me(e, t) : Fe.format(e), k = (e) => he ? he(e) : String(e), Le = a === "pie" || a === "donut", A = Le || a === "funnel" || a === "treemap" || a === "radial-bar", j = a === "scatter", Re = a === "radar", M = A || Re, ze = _e ?? (A ? o.length > 1 : l.length > 1), Be = ye ?? (a === "line" || a === "area" ? "last" : "none"), N = o, P = N.length === 0 || l.length === 0, Ve = [
136
137
  "chart",
137
- `chart--${i}`,
138
- i === "bar" ? `chart--${se}` : "",
138
+ `chart--${a}`,
139
+ a === "bar" ? `chart--${ce}` : "",
139
140
  C ? "chart--stacked" : "",
140
- Ee
141
- ].filter(Boolean).join(" "), Ve = M.map((e) => c.map((t) => _(e[t.key]))), He = Ve.map((e) => e.reduce((e, t) => e + t, 0)), Ue = Ve.flat(), P = re(Ue.length ? Math.min(0, ...Ue) : 0, C ? Math.max(0, ...He) : Ue.length ? Math.max(0, ...Ue) : 1, he), We = P[0] ?? 0, F = P[P.length - 1] ?? 1, Ge = F - We || 1, Ke = P.map((e) => D(e)), qe = M.map((e) => typeof e[g] == "number" ? e[g] : 0), I = A ? re(Math.min(...qe, 0), Math.max(...qe, 1), he) : [], Je = I[0] ?? 0, Ye = (I[I.length - 1] ?? 1) - Je || 1, Xe = A ? I.map((e) => D(e)) : M.map((e) => O(v(e, g))), L = i === "bar" && se === "horizontal", Ze = L ? Xe : Ke, Qe = j ? p.padding : p.padding + Math.max(...Ze.map((e) => e.length), 1) * m + p.axisGap, $e = j ? 0 : Math.round(p.labelFontSize * 1.4) + p.axisGap, R = Qe, et = Math.max(R + 1, Ae - p.padding), z = p.padding, B = Math.max(z + 1, le - p.padding), V = et - R, H = B - z, tt = le + $e, U = (e) => B - (e - We) / Ge * H, W = (e) => R + (e - We) / Ge * V, nt = U(0), rt = W(0), it = M.length ? (L ? H : V) / M.length : 0, at = (e) => M.length > 1 ? R + e * V / (M.length - 1) : R + V / 2, ot = (e) => (L ? z : R) + it * (e + .5), G = (e) => R + (e - Je) / Ye * V, st = c[0]?.key ?? "", K = M.map((e) => _(e[st])), q = K.reduce((e, t) => e + t, 0), J = Math.max(1, Math.min(V, H) / 2 - p.labelFontSize * 2), Y = R + V / 2, X = z + H / 2, ct = K.map((e, t) => {
141
+ De
142
+ ].filter(Boolean).join(" "), He = N.map((e) => l.map((t) => v(e[t.key]))), Ue = He.map((e) => e.reduce((e, t) => e + t, 0)), We = He.flat(), F = ie(We.length ? Math.min(0, ...We) : 0, C ? Math.max(0, ...Ue) : We.length ? Math.max(0, ...We) : 1, ge), Ge = F[0] ?? 0, Ke = F[F.length - 1] ?? 1, qe = Ke - Ge || 1, Je = F.map((e) => O(e)), Ye = N.map((e) => typeof e[_] == "number" ? e[_] : 0), I = j ? ie(Math.min(...Ye, 0), Math.max(...Ye, 1), ge) : [], Xe = I[0] ?? 0, Ze = (I[I.length - 1] ?? 1) - Xe || 1, Qe = j ? I.map((e) => O(e)) : N.map((e) => k(y(e, _))), L = a === "bar" && ce === "horizontal", $e = L ? Qe : Je, et = M ? m.padding : m.padding + Math.max(...$e.map((e) => e.length), 1) * h + m.axisGap, tt = M ? 0 : Math.round(m.labelFontSize * 1.4) + m.axisGap, R = et, nt = Math.max(R + 1, je - m.padding), z = m.padding, B = Math.max(z + 1, ue - m.padding), V = nt - R, H = B - z, rt = ue + tt, U = (e) => B - (e - Ge) / qe * H, W = (e) => R + (e - Ge) / qe * V, it = U(0), at = W(0), ot = N.length ? (L ? H : V) / N.length : 0, st = (e) => N.length > 1 ? R + e * V / (N.length - 1) : R + V / 2, ct = (e) => (L ? z : R) + ot * (e + .5), G = (e) => R + (e - Xe) / Ze * V, lt = l[0]?.key ?? "", K = N.map((e) => v(e[lt])), q = K.reduce((e, t) => e + t, 0), J = Math.max(1, Math.min(V, H) / 2 - m.labelFontSize * 2), Y = R + V / 2, X = z + H / 2, ut = K.map((e, t) => {
142
143
  let n = K.slice(0, t).reduce((e, t) => e + t, 0), r = -Math.PI / 2 + (q > 0 ? n / q * Math.PI * 2 : 0);
143
144
  return {
144
145
  from: r,
145
146
  to: r + (q > 0 ? e / q * Math.PI * 2 : 0),
146
147
  share: q > 0 ? e / q : 0
147
148
  };
148
- }), lt = M.map((e, t) => -Math.PI / 2 + (M.length ? t * Math.PI * 2 / M.length : 0)), ut = (e, t) => {
149
- let n = J * Math.max(0, Math.min(1, F > 0 ? e / F : 0)), r = lt[t] ?? 0;
149
+ }), dt = N.map((e, t) => -Math.PI / 2 + (N.length ? t * Math.PI * 2 / N.length : 0)), ft = (e, t) => {
150
+ let n = J * Math.max(0, Math.min(1, Ke > 0 ? e / Ke : 0)), r = dt[t] ?? 0;
150
151
  return {
151
152
  x: Y + n * Math.cos(r),
152
153
  y: X + n * Math.sin(r)
153
154
  };
154
- }, Z = (e) => !!ce && ce !== e, dt = (e) => {
155
- if (j || M.length === 0) return null;
155
+ }, Z = (e) => !!le && le !== e, pt = (e) => {
156
+ if (M || N.length === 0) return null;
156
157
  let t = e.currentTarget.getBoundingClientRect();
157
- if (i === "line" || i === "area") {
158
- let n = e.clientX - t.left, r = M.length > 1 ? V / (M.length - 1) : V;
159
- return Math.max(0, Math.min(M.length - 1, Math.round(n / r)));
158
+ if (a === "line" || a === "area") {
159
+ let n = e.clientX - t.left, r = N.length > 1 ? V / (N.length - 1) : V;
160
+ return Math.max(0, Math.min(N.length - 1, Math.round(n / r)));
160
161
  }
161
- if (A) {
162
+ if (j) {
162
163
  let n = e.clientX - t.left + R, r = 0, i = Infinity;
163
- return qe.forEach((e, t) => {
164
+ return Ye.forEach((e, t) => {
164
165
  let a = Math.abs(G(e) - n);
165
166
  a < i && (i = a, r = t);
166
167
  }), r;
167
168
  }
168
169
  let n = L ? e.clientY - t.top : e.clientX - t.left;
169
- return Math.max(0, Math.min(M.length - 1, Math.floor(n / (it || 1))));
170
- }, ft = (e) => {
170
+ return Math.max(0, Math.min(N.length - 1, Math.floor(n / (ot || 1))));
171
+ }, mt = (e) => {
171
172
  E((t) => {
172
173
  let n = (t ?? 0) + e;
173
- return Math.max(0, Math.min(M.length - 1, n));
174
+ return Math.max(0, Math.min(N.length - 1, n));
174
175
  });
175
- }, pt = (e) => {
176
- Me(!0), e.key === "ArrowRight" || e.key === "ArrowDown" ? (e.preventDefault(), ft(1)) : e.key === "ArrowLeft" || e.key === "ArrowUp" ? (e.preventDefault(), ft(-1)) : e.key === "Home" ? (e.preventDefault(), E(0)) : e.key === "End" ? (e.preventDefault(), E(M.length - 1)) : e.key === "Escape" && E(null);
176
+ }, ht = (e) => {
177
+ Ne(!0), e.key === "ArrowRight" || e.key === "ArrowDown" ? (e.preventDefault(), mt(1)) : e.key === "ArrowLeft" || e.key === "ArrowUp" ? (e.preventDefault(), mt(-1)) : e.key === "Home" ? (e.preventDefault(), E(0)) : e.key === "End" ? (e.preventDefault(), E(N.length - 1)) : e.key === "Escape" && E(null);
177
178
  }, Q = [];
178
- if (!N && (i === "line" || i === "area")) {
179
- let e = M.map(() => 0), t = null, n = [];
180
- c.forEach((r, a) => {
181
- let o = M.map((t, n) => {
182
- let i = _(t[r.key]), a = i;
179
+ if (!P && (a === "line" || a === "area")) {
180
+ let e = N.map(() => 0), t = null, n = [];
181
+ l.forEach((r, i) => {
182
+ let o = N.map((t, n) => {
183
+ let i = v(t[r.key]), a = i;
183
184
  return C && (e[n] = (e[n] ?? 0) + i, a = e[n]), {
184
- x: at(n),
185
+ x: st(n),
185
186
  y: U(a),
186
187
  value: i
187
188
  };
188
- }), s = o.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" "), c = Z(r.key), l = y(a, r.color, S), u = c ? void 0 : b(a, r.color, S), f = o[0], m = o[o.length - 1];
189
- if (i === "area" && f && m) {
190
- let e = C && t ? [...t].reverse().map((e) => `L ${e.x} ${e.y}`).join(" ") : `L ${m.x} ${nt} L ${f.x} ${nt}`;
191
- Q.push(/* @__PURE__ */ d("path", {
189
+ }), s = o.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" "), c = Z(r.key), l = b(i, r.color, S), u = c ? void 0 : x(i, r.color, S), d = o[0], p = o[o.length - 1];
190
+ if (a === "area" && d && p) {
191
+ let e = C && t ? [...t].reverse().map((e) => `L ${e.x} ${e.y}`).join(" ") : `L ${p.x} ${it} L ${d.x} ${it}`;
192
+ Q.push(/* @__PURE__ */ f("path", {
192
193
  className: `chart__area${c ? " chart__area--muted" : ""}`,
193
194
  "data-slot": l,
194
195
  fill: u,
195
196
  d: `${s} ${e} Z`
196
197
  }, `area-${r.key}`));
197
198
  }
198
- Q.push(/* @__PURE__ */ d("path", {
199
+ Q.push(/* @__PURE__ */ f("path", {
199
200
  className: `chart__line${c ? " chart__line--muted" : ""}`,
200
201
  "data-slot": l,
201
202
  stroke: u,
202
203
  d: s
203
204
  }, `line-${r.key}`)), o.forEach((e, t) => {
204
205
  let n = t === o.length - 1, i = T === t;
205
- !n && !i || Q.push(/* @__PURE__ */ d("circle", {
206
+ !n && !i || Q.push(/* @__PURE__ */ f("circle", {
206
207
  className: `chart__marker${c ? " chart__marker--muted" : ""}`,
207
208
  "data-slot": l,
208
209
  fill: u,
209
210
  cx: e.x,
210
211
  cy: e.y,
211
- r: p.markerSize / 2,
212
+ r: m.markerSize / 2,
212
213
  "data-active": i || void 0
213
214
  }, `dot-${r.key}-${t}`));
214
- }), (ze === "all" ? o : ze === "last" && m ? [m] : ze === "extremes" ? [f, m].filter(Boolean) : []).forEach((e, t) => {
215
+ }), (Be === "all" ? o : Be === "last" && p ? [p] : Be === "extremes" ? [d, p].filter(Boolean) : []).forEach((e, t) => {
215
216
  e && n.push({
216
217
  key: `label-${r.key}-${t}`,
217
218
  x: e.x,
218
- y: e.y - p.axisGap,
219
- text: D(e.value, r)
219
+ y: e.y - m.axisGap,
220
+ text: O(e.value, r)
220
221
  });
221
222
  }), t = o.map((e) => ({
222
223
  x: e.x,
@@ -225,274 +226,274 @@ var S = i(function({ type: i = "line", data: a, series: c, xKey: g, colors: S, o
225
226
  });
226
227
  let r = [];
227
228
  n.forEach((e) => {
228
- r.some((t) => Math.abs(t.x - e.x) < m * e.text.length && Math.abs(t.y - e.y) < p.labelFontSize * 1.2) || (r.push({
229
+ r.some((t) => Math.abs(t.x - e.x) < h * e.text.length && Math.abs(t.y - e.y) < m.labelFontSize * 1.2) || (r.push({
229
230
  x: e.x,
230
231
  y: e.y
231
- }), Q.push(/* @__PURE__ */ d("text", {
232
+ }), Q.push(/* @__PURE__ */ f("text", {
232
233
  className: "chart__value-label",
233
234
  x: e.x,
234
235
  y: e.y,
235
- textAnchor: e.x > et - p.barMaxThickness * 2 ? "end" : "middle",
236
+ textAnchor: e.x > nt - m.barMaxThickness * 2 ? "end" : "middle",
236
237
  children: e.text
237
238
  }, e.key)));
238
239
  });
239
240
  }
240
- if (!N && i === "bar") {
241
- let e = Math.min(p.barMaxThickness * c.length + p.markGap * (c.length - 1), it * .72), t = C ? Math.min(p.barMaxThickness, it * .72) : Math.max(1, (e - p.markGap * (c.length - 1)) / c.length);
242
- M.forEach((e, n) => {
243
- let r = ot(n), i = 0, a = 0;
244
- c.forEach((o, s) => {
245
- let l = _(e[o.key]), u = Z(o.key), f = y(s, o.color, S), m = u ? void 0 : b(s, o.color, S), h = r + (C ? 0 : (s - (c.length - 1) / 2) * (t + p.markGap)) - t / 2, g = C ? l >= 0 ? i : a : 0, v = g + l;
246
- C && (l >= 0 ? i = v : a = v);
247
- let ee = C && g !== 0 ? p.markGap : 0, x = "";
241
+ if (!P && a === "bar") {
242
+ let e = Math.min(m.barMaxThickness * l.length + m.markGap * (l.length - 1), ot * .72), t = C ? Math.min(m.barMaxThickness, ot * .72) : Math.max(1, (e - m.markGap * (l.length - 1)) / l.length);
243
+ N.forEach((e, n) => {
244
+ let r = ct(n), i = 0, a = 0;
245
+ l.forEach((o, s) => {
246
+ let c = v(e[o.key]), u = Z(o.key), d = b(s, o.color, S), p = u ? void 0 : x(s, o.color, S), h = r + (C ? 0 : (s - (l.length - 1) / 2) * (t + m.markGap)) - t / 2, g = C ? c >= 0 ? i : a : 0, _ = g + c;
247
+ C && (c >= 0 ? i = _ : a = _);
248
+ let y = C && g !== 0 ? m.markGap : 0, ee = "";
248
249
  if (L) {
249
- let e = W(g) + (l >= 0 ? ee : 0), n = W(v);
250
- x = ie(Math.min(e, n), h, Math.abs(n - e), t, l >= 0 ? "right" : "left");
250
+ let e = W(g) + (c >= 0 ? y : 0), n = W(_);
251
+ ee = ae(Math.min(e, n), h, Math.abs(n - e), t, c >= 0 ? "right" : "left");
251
252
  } else {
252
- let e = U(g) - (l >= 0 ? ee : 0), n = U(v);
253
- x = ie(h, Math.min(e, n), t, Math.abs(n - e), l >= 0 ? "top" : "bottom");
253
+ let e = U(g) - (c >= 0 ? y : 0), n = U(_);
254
+ ee = ae(h, Math.min(e, n), t, Math.abs(n - e), c >= 0 ? "top" : "bottom");
254
255
  }
255
- if (x && (Q.push(/* @__PURE__ */ d("path", {
256
+ if (ee && (Q.push(/* @__PURE__ */ f("path", {
256
257
  className: `chart__bar${u ? " chart__bar--muted" : ""}`,
257
- "data-slot": f,
258
- fill: m,
259
- d: x,
258
+ "data-slot": d,
259
+ fill: p,
260
+ d: ee,
260
261
  "data-active": T === n || void 0
261
- }, `bar-${n}-${o.key}`)), ze === "all" && !C)) {
262
- let e = L ? W(v) : U(v);
263
- Q.push(/* @__PURE__ */ d("text", {
262
+ }, `bar-${n}-${o.key}`)), Be === "all" && !C)) {
263
+ let e = L ? W(_) : U(_);
264
+ Q.push(/* @__PURE__ */ f("text", {
264
265
  className: "chart__value-label",
265
- x: L ? e + p.axisGap : h + t / 2,
266
- y: L ? h + t / 2 : e - p.axisGap,
266
+ x: L ? e + m.axisGap : h + t / 2,
267
+ y: L ? h + t / 2 : e - m.axisGap,
267
268
  textAnchor: L ? "start" : "middle",
268
269
  dominantBaseline: L ? "middle" : "auto",
269
- children: D(l, o)
270
+ children: O(c, o)
270
271
  }, `bar-label-${n}-${o.key}`));
271
272
  }
272
273
  });
273
274
  });
274
275
  }
275
- if (!N && Ie) {
276
- let e = i === "donut" ? J * (1 - p.donutThickness) : 0;
277
- ct.forEach((t, n) => {
276
+ if (!P && Le) {
277
+ let e = a === "donut" ? J * (1 - m.donutThickness) : 0;
278
+ ut.forEach((t, n) => {
278
279
  if (t.to - t.from <= 0) return;
279
- let r = String(v(M[n], g));
280
- if (Q.push(/* @__PURE__ */ d("path", {
280
+ let r = String(y(N[n], _));
281
+ if (Q.push(/* @__PURE__ */ f("path", {
281
282
  className: `chart__slice${Z(r) ? " chart__slice--muted" : ""}`,
282
- "data-slot": y(n, void 0, S),
283
- fill: Z(r) ? void 0 : b(n, void 0, S),
284
- d: ae(Y, X, J, e, t.from, t.to),
283
+ "data-slot": b(n, void 0, S),
284
+ fill: Z(r) ? void 0 : x(n, void 0, S),
285
+ d: oe(Y, X, J, e, t.from, t.to),
285
286
  "data-active": T === n || void 0
286
287
  }, `slice-${n}`)), t.share >= .05) {
287
- let e = (t.from + t.to) / 2, r = Y + (J + p.axisGap) * Math.cos(e), i = X + (J + p.axisGap) * Math.sin(e);
288
- Q.push(/* @__PURE__ */ d("text", {
288
+ let e = (t.from + t.to) / 2, r = Y + (J + m.axisGap) * Math.cos(e), i = X + (J + m.axisGap) * Math.sin(e);
289
+ Q.push(/* @__PURE__ */ f("text", {
289
290
  className: "chart__value-label",
290
291
  x: r,
291
292
  y: i,
292
293
  textAnchor: Math.cos(e) < -.1 ? "end" : Math.cos(e) > .1 ? "start" : "middle",
293
294
  dominantBaseline: "middle",
294
- children: Fe.format(t.share)
295
+ children: Ie.format(t.share)
295
296
  }, `slice-label-${n}`));
296
297
  }
297
298
  });
298
299
  }
299
- if (!N && i === "funnel") {
300
- let e = Math.max(...K, 1), t = H / Math.max(1, M.length), n = (t) => Math.max(0, t) / e * V;
300
+ if (!P && a === "funnel") {
301
+ let e = Math.max(...K, 1), t = H / Math.max(1, N.length), n = (t) => Math.max(0, t) / e * V;
301
302
  K.forEach((e, r) => {
302
- let i = z + t * r, a = Math.max(0, t - p.funnelGap), o = K[r + 1], s = String(v(M[r], g));
303
- Q.push(/* @__PURE__ */ d("path", {
303
+ let i = z + t * r, a = Math.max(0, t - m.funnelGap), o = K[r + 1], s = String(y(N[r], _));
304
+ Q.push(/* @__PURE__ */ f("path", {
304
305
  className: `chart__funnel-step${Z(s) ? " chart__funnel-step--muted" : ""}`,
305
- "data-slot": y(r, void 0, S),
306
- fill: Z(s) ? void 0 : b(r, void 0, S),
306
+ "data-slot": b(r, void 0, S),
307
+ fill: Z(s) ? void 0 : x(r, void 0, S),
307
308
  "data-active": T === r || void 0,
308
- d: te(Y, i, a, n(e), n(o ?? e))
309
- }, `funnel-${r}`)), Q.push(/* @__PURE__ */ d("text", {
309
+ d: ne(Y, i, a, n(e), n(o ?? e))
310
+ }, `funnel-${r}`)), Q.push(/* @__PURE__ */ f("text", {
310
311
  className: "chart__value-label",
311
312
  x: Y,
312
313
  y: i + a / 2,
313
314
  textAnchor: "middle",
314
315
  dominantBaseline: "middle",
315
- children: `${O(v(M[r], g))} · ${D(e)}`
316
+ children: `${k(y(N[r], _))} · ${O(e)}`
316
317
  }, `funnel-label-${r}`));
317
318
  });
318
319
  }
319
- if (!N && i === "treemap" && ne(K.map((e, t) => ({
320
+ if (!P && a === "treemap" && re(K.map((e, t) => ({
320
321
  value: Math.max(0, e),
321
322
  index: t
322
323
  })).filter((e) => e.value > 0), R, z, V, H).forEach((e) => {
323
- let t = String(v(M[e.index], g)), n = Math.max(0, e.w - p.treemapGap), r = Math.max(0, e.h - p.treemapGap);
324
- Q.push(/* @__PURE__ */ d("rect", {
324
+ let t = String(y(N[e.index], _)), n = Math.max(0, e.w - m.treemapGap), r = Math.max(0, e.h - m.treemapGap);
325
+ Q.push(/* @__PURE__ */ f("rect", {
325
326
  className: `chart__tile${Z(t) ? " chart__tile--muted" : ""}`,
326
- "data-slot": y(e.index, void 0, S),
327
- fill: Z(t) ? void 0 : b(e.index, void 0, S),
327
+ "data-slot": b(e.index, void 0, S),
328
+ fill: Z(t) ? void 0 : x(e.index, void 0, S),
328
329
  "data-active": T === e.index || void 0,
329
330
  x: e.x,
330
331
  y: e.y,
331
332
  width: n,
332
333
  height: r
333
- }, `tile-${e.index}`)), n > m * 4 && r > p.labelFontSize * 2 && Q.push(/* @__PURE__ */ d("text", {
334
+ }, `tile-${e.index}`)), n > h * 4 && r > m.labelFontSize * 2 && Q.push(/* @__PURE__ */ f("text", {
334
335
  className: "chart__tile-label",
335
336
  "data-slot": ee(e.index, void 0, S),
336
- x: e.x + p.axisGap,
337
- y: e.y + p.axisGap + p.labelFontSize,
338
- children: O(v(M[e.index], g))
337
+ x: e.x + m.axisGap,
338
+ y: e.y + m.axisGap + m.labelFontSize,
339
+ children: k(y(N[e.index], _))
339
340
  }, `tile-label-${e.index}`));
340
- }), !N && i === "radial-bar") {
341
- let e = Math.max(...K, 1), t = J / Math.max(1, M.length), n = Math.max(1, t - p.radialBarGap);
341
+ }), !P && a === "radial-bar") {
342
+ let e = Math.max(...K, 1), t = J / Math.max(1, N.length), n = Math.max(1, t - m.radialBarGap);
342
343
  K.forEach((r, i) => {
343
- let a = J - t * i, o = a - n, s = String(v(M[i], g)), c = Math.max(0, r) / e * Math.PI * 1.999;
344
- Q.push(/* @__PURE__ */ d("path", {
344
+ let a = J - t * i, o = a - n, s = String(y(N[i], _)), c = Math.max(0, r) / e * Math.PI * 1.999;
345
+ Q.push(/* @__PURE__ */ f("path", {
345
346
  className: "chart__radial-track",
346
- d: ae(Y, X, a, o, -Math.PI / 2, -Math.PI / 2 + Math.PI * 1.999)
347
- }, `radial-track-${i}`)), !(c <= 0) && Q.push(/* @__PURE__ */ d("path", {
347
+ d: oe(Y, X, a, o, -Math.PI / 2, -Math.PI / 2 + Math.PI * 1.999)
348
+ }, `radial-track-${i}`)), !(c <= 0) && Q.push(/* @__PURE__ */ f("path", {
348
349
  className: `chart__radial-bar${Z(s) ? " chart__radial-bar--muted" : ""}`,
349
- "data-slot": y(i, void 0, S),
350
- fill: Z(s) ? void 0 : b(i, void 0, S),
350
+ "data-slot": b(i, void 0, S),
351
+ fill: Z(s) ? void 0 : x(i, void 0, S),
351
352
  "data-active": T === i || void 0,
352
- d: ae(Y, X, a, o, -Math.PI / 2, -Math.PI / 2 + c)
353
+ d: oe(Y, X, a, o, -Math.PI / 2, -Math.PI / 2 + c)
353
354
  }, `radial-bar-${i}`));
354
355
  });
355
356
  }
356
- !N && A && c.forEach((e, t) => {
357
- let n = Z(e.key), r = y(t, e.color, S), i = n ? void 0 : b(t, e.color, S);
358
- M.forEach((t, a) => {
357
+ !P && j && l.forEach((e, t) => {
358
+ let n = Z(e.key), r = b(t, e.color, S), i = n ? void 0 : x(t, e.color, S);
359
+ N.forEach((t, a) => {
359
360
  let o = t[e.key];
360
- typeof o != "number" || !Number.isFinite(o) || Q.push(/* @__PURE__ */ d("circle", {
361
+ typeof o != "number" || !Number.isFinite(o) || Q.push(/* @__PURE__ */ f("circle", {
361
362
  className: `chart__point${n ? " chart__point--muted" : ""}`,
362
363
  "data-slot": r,
363
364
  fill: i,
364
- cx: G(qe[a] ?? 0),
365
+ cx: G(Ye[a] ?? 0),
365
366
  cy: U(o),
366
- r: p.dotSize / 2,
367
+ r: m.dotSize / 2,
367
368
  "data-active": T === a || void 0
368
369
  }, `point-${e.key}-${a}`));
369
370
  });
370
- }), !N && Le && c.forEach((e, t) => {
371
- let n = Z(e.key), r = y(t, e.color, S), i = n ? void 0 : b(t, e.color, S), a = M.map((t, n) => ut(_(t[e.key]), n));
371
+ }), !P && Re && l.forEach((e, t) => {
372
+ let n = Z(e.key), r = b(t, e.color, S), i = n ? void 0 : x(t, e.color, S), a = N.map((t, n) => ft(v(t[e.key]), n));
372
373
  if (a.length === 0) return;
373
374
  let o = `${a.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" ")} Z`;
374
- Q.push(/* @__PURE__ */ d("path", {
375
+ Q.push(/* @__PURE__ */ f("path", {
375
376
  className: `chart__radar-shape${n ? " chart__radar-shape--muted" : ""}`,
376
377
  "data-slot": r,
377
378
  fill: i,
378
379
  stroke: i,
379
380
  d: o
380
381
  }, `radar-${e.key}`)), a.forEach((t, a) => {
381
- Q.push(/* @__PURE__ */ d("circle", {
382
+ Q.push(/* @__PURE__ */ f("circle", {
382
383
  className: `chart__marker${n ? " chart__marker--muted" : ""}`,
383
384
  "data-slot": r,
384
385
  fill: i,
385
386
  cx: t.x,
386
387
  cy: t.y,
387
- r: p.markerSize / 2,
388
+ r: m.markerSize / 2,
388
389
  "data-active": T === a || void 0
389
390
  }, `radar-dot-${e.key}-${a}`));
390
391
  });
391
392
  });
392
- let $ = T === null ? void 0 : M[T], mt = $ ? k ? [{
393
- key: st,
394
- label: String(v($, g)),
395
- value: D(_($[st])),
393
+ let $ = T === null ? void 0 : N[T], gt = $ ? A ? [{
394
+ key: lt,
395
+ label: String(y($, _)),
396
+ value: O(v($[lt])),
396
397
  index: T ?? 0
397
- }] : c.map((e, t) => ({
398
+ }] : l.map((e, t) => ({
398
399
  key: e.key,
399
400
  label: e.label,
400
- value: D(_($[e.key]), e),
401
+ value: O(v($[e.key]), e),
401
402
  index: t
402
- })) : [], ht = T === null ? 0 : j ? Y : A ? G(qe[T] ?? 0) : i === "bar" && L ? W(F) : i === "bar" ? ot(T) : at(T), gt = T === null ? 0 : j ? X - J : i === "bar" && L ? ot(T) : z, _t = je && $ ? [k ? D(q) : O(v($, g)), ...mt.map((e) => `${e.label}: ${e.value}`)].join(" · ") : "", vt = r({
403
+ })) : [], _t = T === null ? 0 : M ? Y : j ? G(Ye[T] ?? 0) : a === "bar" && L ? W(Ke) : a === "bar" ? ct(T) : st(T), vt = T === null ? 0 : M ? X - J : a === "bar" && L ? ct(T) : z, yt = Me && $ ? [A ? O(q) : k(y($, _)), ...gt.map((e) => `${e.label}: ${e.value}`)].join(" · ") : "", bt = i({
403
404
  "inset-inline-start": `${R}px`,
404
405
  "inset-block-start": `${z}px`,
405
406
  width: `${V}px`,
406
407
  height: `${H}px`
407
- }), yt = r({
408
- left: `${ht}px`,
409
- top: `${gt}px`
408
+ }), xt = i({
409
+ left: `${_t}px`,
410
+ top: `${vt}px`
410
411
  });
411
- return /* @__PURE__ */ f("figure", {
412
- ref: Oe,
413
- className: Be,
414
- ...De,
412
+ return /* @__PURE__ */ p("figure", {
413
+ ref: ke,
414
+ className: Ve,
415
+ ...Oe,
415
416
  children: [
416
- de ? /* @__PURE__ */ d("figcaption", {
417
+ fe ? /* @__PURE__ */ f("figcaption", {
417
418
  className: "chart__title",
418
- children: de
419
+ children: fe
419
420
  }) : null,
420
- N ? /* @__PURE__ */ d("p", {
421
+ P ? /* @__PURE__ */ f("p", {
421
422
  className: "chart__empty",
422
- children: Te
423
- }) : /* @__PURE__ */ f("div", {
423
+ children: D("empty", Ee)
424
+ }) : /* @__PURE__ */ p("div", {
424
425
  className: "chart__plot",
425
- ref: ke,
426
+ ref: Ae,
426
427
  children: [
427
- /* @__PURE__ */ f("svg", {
428
+ /* @__PURE__ */ p("svg", {
428
429
  className: "chart__canvas",
429
- viewBox: `0 0 ${Ae} ${tt}`,
430
- width: Ae,
431
- height: tt,
430
+ viewBox: `0 0 ${je} ${rt}`,
431
+ width: je,
432
+ height: rt,
432
433
  "aria-hidden": "true",
433
434
  children: [
434
- _e && !j ? /* @__PURE__ */ d("g", {
435
+ ve && !M ? /* @__PURE__ */ f("g", {
435
436
  className: "chart__grid",
436
437
  "aria-hidden": "true",
437
- children: P.map((e) => L ? /* @__PURE__ */ d("line", {
438
+ children: F.map((e) => L ? /* @__PURE__ */ f("line", {
438
439
  className: "chart__grid-line",
439
440
  x1: W(e),
440
441
  y1: z,
441
442
  x2: W(e),
442
443
  y2: B
443
- }, e) : /* @__PURE__ */ d("line", {
444
+ }, e) : /* @__PURE__ */ f("line", {
444
445
  className: "chart__grid-line",
445
446
  x1: R,
446
447
  y1: U(e),
447
- x2: et,
448
+ x2: nt,
448
449
  y2: U(e)
449
450
  }, e))
450
451
  }) : null,
451
- j ? null : /* @__PURE__ */ f("g", {
452
+ M ? null : /* @__PURE__ */ p("g", {
452
453
  className: "chart__axes",
453
454
  "aria-hidden": "true",
454
455
  children: [
455
- /* @__PURE__ */ d("line", {
456
+ /* @__PURE__ */ f("line", {
456
457
  className: "chart__axis",
457
- x1: L ? rt : R,
458
- y1: L ? z : nt,
459
- x2: L ? rt : et,
460
- y2: L ? B : nt
458
+ x1: L ? at : R,
459
+ y1: L ? z : it,
460
+ x2: L ? at : nt,
461
+ y2: L ? B : it
461
462
  }),
462
- L ? Xe.map((e, t) => /* @__PURE__ */ d("text", {
463
+ L ? Qe.map((e, t) => /* @__PURE__ */ f("text", {
463
464
  className: "chart__axis-label",
464
- x: R - p.axisGap,
465
- y: ot(t),
465
+ x: R - m.axisGap,
466
+ y: ct(t),
466
467
  textAnchor: "end",
467
468
  dominantBaseline: "middle",
468
469
  children: e
469
- }, `cat-${t}`)) : P.map((e, t) => /* @__PURE__ */ d("text", {
470
+ }, `cat-${t}`)) : F.map((e, t) => /* @__PURE__ */ f("text", {
470
471
  className: "chart__axis-label",
471
- x: R - p.axisGap,
472
+ x: R - m.axisGap,
472
473
  y: U(e),
473
474
  textAnchor: "end",
474
475
  dominantBaseline: "middle",
475
- children: Ke[t]
476
+ children: Je[t]
476
477
  }, `tick-${e}`)),
477
- L ? P.map((e, t) => /* @__PURE__ */ d("text", {
478
+ L ? F.map((e, t) => /* @__PURE__ */ f("text", {
478
479
  className: "chart__axis-label",
479
480
  x: W(e),
480
- y: B + p.axisGap + p.labelFontSize,
481
+ y: B + m.axisGap + m.labelFontSize,
481
482
  textAnchor: "middle",
482
- children: Ke[t]
483
- }, `vtick-${e}`)) : Xe.map((e, t) => /* @__PURE__ */ d("text", {
483
+ children: Je[t]
484
+ }, `vtick-${e}`)) : Qe.map((e, t) => /* @__PURE__ */ f("text", {
484
485
  className: "chart__axis-label",
485
- x: A ? G(I[t] ?? 0) : i === "bar" ? ot(t) : at(t),
486
- y: B + p.axisGap + p.labelFontSize,
487
- textAnchor: A ? "middle" : t === 0 && i !== "bar" ? "start" : t === M.length - 1 && i !== "bar" ? "end" : "middle",
486
+ x: j ? G(I[t] ?? 0) : a === "bar" ? ct(t) : st(t),
487
+ y: B + m.axisGap + m.labelFontSize,
488
+ textAnchor: j ? "middle" : t === 0 && a !== "bar" ? "start" : t === N.length - 1 && a !== "bar" ? "end" : "middle",
488
489
  children: e
489
490
  }, `cat-${t}`))
490
491
  ]
491
492
  }),
492
- _e && A ? /* @__PURE__ */ d("g", {
493
+ ve && j ? /* @__PURE__ */ f("g", {
493
494
  className: "chart__grid",
494
495
  "aria-hidden": "true",
495
- children: I.map((e) => /* @__PURE__ */ d("line", {
496
+ children: I.map((e) => /* @__PURE__ */ f("line", {
496
497
  className: "chart__grid-line",
497
498
  x1: G(e),
498
499
  y1: z,
@@ -500,95 +501,95 @@ var S = i(function({ type: i = "line", data: a, series: c, xKey: g, colors: S, o
500
501
  y2: B
501
502
  }, `xgrid-${e}`))
502
503
  }) : null,
503
- Le && M.length > 0 ? /* @__PURE__ */ f("g", {
504
+ Re && N.length > 0 ? /* @__PURE__ */ p("g", {
504
505
  className: "chart__radar-grid",
505
506
  "aria-hidden": "true",
506
507
  children: [
507
- P.filter((e) => e > 0).map((e) => /* @__PURE__ */ d("path", {
508
+ F.filter((e) => e > 0).map((e) => /* @__PURE__ */ f("path", {
508
509
  className: "chart__grid-line",
509
- d: `${lt.map((t, n) => {
510
- let r = J * (F > 0 ? e / F : 0);
510
+ d: `${dt.map((t, n) => {
511
+ let r = J * (Ke > 0 ? e / Ke : 0);
511
512
  return `${n === 0 ? "M" : "L"} ${Y + r * Math.cos(t)} ${X + r * Math.sin(t)}`;
512
513
  }).join(" ")} Z`
513
514
  }, `web-${e}`)),
514
- lt.map((e, t) => /* @__PURE__ */ d("line", {
515
+ dt.map((e, t) => /* @__PURE__ */ f("line", {
515
516
  className: "chart__grid-line",
516
517
  x1: Y,
517
518
  y1: X,
518
519
  x2: Y + J * Math.cos(e),
519
520
  y2: X + J * Math.sin(e)
520
521
  }, `spoke-${t}`)),
521
- lt.map((e, t) => /* @__PURE__ */ d("text", {
522
+ dt.map((e, t) => /* @__PURE__ */ f("text", {
522
523
  className: "chart__axis-label",
523
- x: Y + (J + p.axisGap) * Math.cos(e),
524
- y: X + (J + p.axisGap) * Math.sin(e),
524
+ x: Y + (J + m.axisGap) * Math.cos(e),
525
+ y: X + (J + m.axisGap) * Math.sin(e),
525
526
  textAnchor: Math.cos(e) < -.1 ? "end" : Math.cos(e) > .1 ? "start" : "middle",
526
527
  dominantBaseline: "middle",
527
- children: Xe[t]
528
+ children: Qe[t]
528
529
  }, `radar-cat-${t}`))
529
530
  ]
530
531
  }) : null,
531
- T !== null && w && (i === "line" || i === "area") ? /* @__PURE__ */ d("line", {
532
+ T !== null && w && (a === "line" || a === "area") ? /* @__PURE__ */ f("line", {
532
533
  className: "chart__crosshair",
533
534
  "aria-hidden": "true",
534
- x1: at(T),
535
+ x1: st(T),
535
536
  y1: z,
536
- x2: at(T),
537
+ x2: st(T),
537
538
  y2: B
538
539
  }) : null,
539
- /* @__PURE__ */ d("g", {
540
+ /* @__PURE__ */ f("g", {
540
541
  className: "chart__marks",
541
542
  children: Q
542
543
  }),
543
- i === "donut" ? /* @__PURE__ */ d("text", {
544
+ a === "donut" ? /* @__PURE__ */ f("text", {
544
545
  className: "chart__center-value",
545
546
  x: Y,
546
547
  y: X,
547
548
  textAnchor: "middle",
548
549
  dominantBaseline: "middle",
549
- children: D(q)
550
+ children: O(q)
550
551
  }) : null
551
552
  ]
552
553
  }),
553
- /* @__PURE__ */ d("div", {
554
- ref: vt,
554
+ /* @__PURE__ */ f("div", {
555
+ ref: bt,
555
556
  className: "chart__hit-layer",
556
557
  role: "img",
557
- "aria-label": ue,
558
- "aria-describedby": Ne,
558
+ "aria-label": de,
559
+ "aria-describedby": Pe,
559
560
  tabIndex: w ? 0 : void 0,
560
561
  onPointerMove: w ? (e) => {
561
- Me(!1), E(dt(e));
562
+ Ne(!1), E(pt(e));
562
563
  } : void 0,
563
564
  onPointerLeave: w ? () => E(null) : void 0,
564
- onKeyDown: w ? pt : void 0,
565
+ onKeyDown: w ? ht : void 0,
565
566
  onBlur: w ? () => {
566
- Me(!1), E(null);
567
+ Ne(!1), E(null);
567
568
  } : void 0
568
569
  }),
569
- w && T !== null && $ ? /* @__PURE__ */ f("div", {
570
- ref: yt,
570
+ w && T !== null && $ ? /* @__PURE__ */ p("div", {
571
+ ref: xt,
571
572
  className: "chart__tooltip",
572
573
  "aria-hidden": "true",
573
- children: [/* @__PURE__ */ d("p", {
574
+ children: [/* @__PURE__ */ f("p", {
574
575
  className: "chart__tooltip-header",
575
- children: k ? D(q) : O(v($, g))
576
- }), /* @__PURE__ */ d("ul", {
576
+ children: A ? O(q) : k(y($, _))
577
+ }), /* @__PURE__ */ f("ul", {
577
578
  className: "chart__tooltip-list",
578
- children: mt.map((e) => /* @__PURE__ */ f("li", {
579
+ children: gt.map((e) => /* @__PURE__ */ p("li", {
579
580
  className: "chart__tooltip-row",
580
581
  children: [
581
- /* @__PURE__ */ d(x, {
582
+ /* @__PURE__ */ f(te, {
582
583
  className: "chart__tooltip-key",
583
584
  index: e.index,
584
- color: k ? void 0 : c[e.index]?.color,
585
+ color: A ? void 0 : l[e.index]?.color,
585
586
  palette: S
586
587
  }),
587
- /* @__PURE__ */ d("span", {
588
+ /* @__PURE__ */ f("span", {
588
589
  className: "chart__tooltip-value",
589
590
  children: e.value
590
591
  }),
591
- /* @__PURE__ */ d("span", {
592
+ /* @__PURE__ */ f("span", {
592
593
  className: "chart__tooltip-label",
593
594
  children: e.label
594
595
  })
@@ -598,25 +599,25 @@ var S = i(function({ type: i = "line", data: a, series: c, xKey: g, colors: S, o
598
599
  }) : null
599
600
  ]
600
601
  }),
601
- Re && !N ? /* @__PURE__ */ d("div", {
602
+ ze && !P ? /* @__PURE__ */ f("div", {
602
603
  className: "chart__legend",
603
- children: /* @__PURE__ */ d(t, {
604
+ children: /* @__PURE__ */ f(n, {
604
605
  gap: "sm",
605
- children: (k ? M.map((e, t) => ({
606
- key: String(v(e, g)),
607
- label: O(v(e, g)),
606
+ children: (A ? N.map((e, t) => ({
607
+ key: String(y(e, _)),
608
+ label: k(y(e, _)),
608
609
  index: t,
609
610
  color: void 0
610
- })) : c.map((e, t) => ({
611
+ })) : l.map((e, t) => ({
611
612
  key: e.key,
612
613
  label: e.label,
613
614
  index: t,
614
615
  color: e.color
615
- }))).map((e) => /* @__PURE__ */ f(n, {
616
+ }))).map((e) => /* @__PURE__ */ p(r, {
616
617
  variant: "neutral",
617
618
  className: `chart__legend-item${Z(e.key) ? " chart__legend-item--muted" : ""}`,
618
- children: [/* @__PURE__ */ d(x, {
619
- className: `chart__legend-swatch${i === "line" ? " chart__legend-swatch--line" : ""}`,
619
+ children: [/* @__PURE__ */ f(te, {
620
+ className: `chart__legend-swatch${a === "line" ? " chart__legend-swatch--line" : ""}`,
620
621
  index: e.index,
621
622
  color: e.color,
622
623
  palette: S,
@@ -625,41 +626,41 @@ var S = i(function({ type: i = "line", data: a, series: c, xKey: g, colors: S, o
625
626
  }, e.key))
626
627
  })
627
628
  }) : null,
628
- fe ? /* @__PURE__ */ d("p", {
629
+ pe ? /* @__PURE__ */ f("p", {
629
630
  className: "chart__caption",
630
- children: fe
631
+ children: pe
631
632
  }) : null,
632
- /* @__PURE__ */ d(e, {
633
+ /* @__PURE__ */ f(t, {
633
634
  role: "status",
634
- children: _t
635
+ children: yt
635
636
  }),
636
- /* @__PURE__ */ d(e, {
637
- id: Ne,
638
- children: xe
637
+ /* @__PURE__ */ f(t, {
638
+ id: Pe,
639
+ children: D("tableHint", Se)
639
640
  }),
640
- /* @__PURE__ */ d(e, {
641
+ /* @__PURE__ */ f(t, {
641
642
  as: "div",
642
- children: /* @__PURE__ */ f("table", {
643
+ children: /* @__PURE__ */ p("table", {
643
644
  className: "chart__table",
644
645
  children: [
645
- /* @__PURE__ */ d("caption", { children: be }),
646
- /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ f("tr", { children: [/* @__PURE__ */ d("th", {
646
+ /* @__PURE__ */ f("caption", { children: D("tableCaption", xe) }),
647
+ /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", { children: [/* @__PURE__ */ f("th", {
647
648
  scope: "col",
648
- children: Se
649
- }), k ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("th", {
649
+ children: D("category", Ce)
650
+ }), A ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("th", {
650
651
  scope: "col",
651
- children: Ce
652
- }), /* @__PURE__ */ d("th", {
652
+ children: D("value", we)
653
+ }), /* @__PURE__ */ f("th", {
653
654
  scope: "col",
654
- children: we
655
- })] }) : c.map((e) => /* @__PURE__ */ d("th", {
655
+ children: D("share", Te)
656
+ })] }) : l.map((e) => /* @__PURE__ */ f("th", {
656
657
  scope: "col",
657
658
  children: e.label
658
659
  }, e.key))] }) }),
659
- /* @__PURE__ */ d("tbody", { children: M.map((e, t) => /* @__PURE__ */ f("tr", { children: [/* @__PURE__ */ d("th", {
660
+ /* @__PURE__ */ f("tbody", { children: N.map((e, t) => /* @__PURE__ */ p("tr", { children: [/* @__PURE__ */ f("th", {
660
661
  scope: "row",
661
- children: O(v(e, g))
662
- }), k ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("td", { children: D(_(e[st])) }), /* @__PURE__ */ d("td", { children: Fe.format(ct[t]?.share ?? 0) })] }) : c.map((t) => /* @__PURE__ */ d("td", { children: D(_(e[t.key]), t) }, t.key))] }, `row-${t}`)) })
662
+ children: k(y(e, _))
663
+ }), A ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("td", { children: O(v(e[lt])) }), /* @__PURE__ */ f("td", { children: Ie.format(ut[t]?.share ?? 0) })] }) : l.map((t) => /* @__PURE__ */ f("td", { children: O(v(e[t.key]), t) }, t.key))] }, `row-${t}`)) })
663
664
  ]
664
665
  })
665
666
  })