drizzle-cube 0.1.66 → 0.1.67

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.
@@ -1,10 +1,29 @@
1
- import { jsx as s, jsxs as b, Fragment as Ee } from "react/jsx-runtime";
2
- import { useRef as bt, useState as H, useLayoutEffect as Nt, useMemo as wt } from "react";
3
- import { ResponsiveContainer as He, Tooltip as lt, ComposedChart as ot, CartesianGrid as ve, XAxis as be, YAxis as Ne, Legend as Y, Bar as At, Cell as je, Line as W, LineChart as St, Area as kt, PieChart as Mt, Pie as $t, ScatterChart as Lt, Scatter as Ge, RadarChart as Tt, PolarGrid as Ft, PolarAngleAxis as Et, PolarRadiusAxis as jt, Radar as zt, RadialBarChart as Dt, RadialBar as Rt, Treemap as Vt } from "recharts";
1
+ import { jsx as s, jsxs as b, Fragment as ze } from "react/jsx-runtime";
2
+ import { useRef as Nt, useState as H, useLayoutEffect as wt, useMemo as At } from "react";
3
+ import { ResponsiveContainer as He, Tooltip as ot, ComposedChart as ct, CartesianGrid as ve, XAxis as be, YAxis as Ne, Legend as Y, Bar as St, Cell as Ee, Line as W, LineChart as kt, Area as Mt, PieChart as $t, Pie as Lt, ScatterChart as Tt, Scatter as Ge, RadarChart as Ft, PolarGrid as zt, PolarAngleAxis as Et, PolarRadiusAxis as jt, Radar as Dt, RadialBarChart as Rt, RadialBar as It, Treemap as Vt } from "recharts";
4
4
  import { u as X } from "./providers-D7zRgZrO.js";
5
+ const Ot = {
6
+ sm: "h-6 w-6",
7
+ md: "h-8 w-8",
8
+ lg: "h-12 w-12"
9
+ };
10
+ function Ue({
11
+ size: e = "md",
12
+ className: t = ""
13
+ }) {
14
+ return /* @__PURE__ */ s(
15
+ "div",
16
+ {
17
+ className: `animate-spin rounded-full border-b-2 ${Ot[e]} ${t}`,
18
+ style: { borderBottomColor: "var(--dc-primary)" },
19
+ role: "status",
20
+ "aria-label": "Loading"
21
+ }
22
+ );
23
+ }
5
24
  function B({ children: e, height: t = "100%" }) {
6
- const n = bt(null), [r, i] = H(!1), [a, l] = H({ width: 0, height: 0 });
7
- Nt(() => {
25
+ const n = Nt(null), [r, i] = H(!1), [a, l] = H({ width: 0, height: 0 });
26
+ wt(() => {
8
27
  let o = !0, d = null;
9
28
  const c = () => {
10
29
  if (!o || !n.current) return;
@@ -37,7 +56,7 @@ function B({ children: e, height: t = "100%" }) {
37
56
  style: { marginTop: "16px" },
38
57
  children: e
39
58
  }
40
- ) : /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ s("div", { className: "animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" }) })
59
+ ) : /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ s(Ue, { size: "sm" }) })
41
60
  }
42
61
  );
43
62
  const o = {
@@ -61,7 +80,7 @@ function B({ children: e, height: t = "100%" }) {
61
80
  style: { marginTop: "16px" },
62
81
  children: e
63
82
  }
64
- ) : /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ s("div", { className: "animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500" }) })
83
+ ) : /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ s(Ue, { size: "sm" }) })
65
84
  }
66
85
  );
67
86
  } catch (o) {
@@ -152,7 +171,7 @@ function O(e, t) {
152
171
  return;
153
172
  }
154
173
  }
155
- function It(e, t, n, r, i = {}) {
174
+ function _t(e, t, n, r, i = {}) {
156
175
  if (!e || e.length === 0) return [];
157
176
  const a = O(r, t);
158
177
  return e.map((l) => {
@@ -212,19 +231,19 @@ function se(e, t, n, r, i, a = {}) {
212
231
  hasDimensions: !0
213
232
  };
214
233
  }
215
- const f = It(e, t, n, r, a), m = n.map((p) => Me(p, a));
234
+ const f = _t(e, t, n, r, a), m = n.map((p) => Me(p, a));
216
235
  return {
217
236
  data: f,
218
237
  seriesKeys: m,
219
238
  hasDimensions: !1
220
239
  };
221
240
  }
222
- const Ot = (e, t) => e == null ? ["No data", t] : [q(e), t];
241
+ const Ht = (e, t) => e == null ? ["No data", t] : [q(e), t];
223
242
  function Q({ formatter: e, labelFormatter: t }) {
224
243
  return /* @__PURE__ */ s(
225
- lt,
244
+ ot,
226
245
  {
227
- formatter: e || Ot,
246
+ formatter: e || Ht,
228
247
  labelFormatter: t,
229
248
  contentStyle: {
230
249
  backgroundColor: "white",
@@ -238,7 +257,7 @@ function Q({ formatter: e, labelFormatter: t }) {
238
257
  }
239
258
  );
240
259
  }
241
- const j = [
260
+ const E = [
242
261
  "#3b82f6",
243
262
  // blue
244
263
  "#10b981",
@@ -268,13 +287,13 @@ const j = [
268
287
  // green
269
288
  "#fde725"
270
289
  // yellow
271
- ], Ue = "#10b981", _t = "#ef4444", we = {
290
+ ], qe = "#10b981", Gt = "#ef4444", we = {
272
291
  top: 5,
273
292
  right: 30,
274
293
  left: 20,
275
294
  bottom: 5
276
295
  };
277
- function ze(e) {
296
+ function je(e) {
278
297
  if (!e || typeof e != "string")
279
298
  return [];
280
299
  const t = e.trim();
@@ -306,13 +325,13 @@ function De(e, t) {
306
325
  }
307
326
  return n;
308
327
  }
309
- function Qn(e, t) {
328
+ function Jn(e, t) {
310
329
  return t === 0 ? e === 0 ? 0 : e > 0 ? 100 : -100 : (e - t) / t * 100;
311
330
  }
312
- function Zn(e, t = 1) {
331
+ function Pn(e, t = 1) {
313
332
  return `${e >= 0 ? "+" : ""}${e.toFixed(t)}%`;
314
333
  }
315
- function Jn({
334
+ function er({
316
335
  data: e,
317
336
  chartConfig: t,
318
337
  displayConfig: n = {},
@@ -354,26 +373,26 @@ function Jn({
354
373
  r,
355
374
  h,
356
375
  d
357
- ), { chartData: v, skippedCount: A } = wt(() => {
358
- const L = M.filter((D) => F.some((V) => ke(D[V]))), E = M.length - L.length;
359
- return { chartData: L, skippedCount: E };
376
+ ), { chartData: v, skippedCount: A } = At(() => {
377
+ const L = M.filter((D) => F.some((I) => ke(D[I]))), z = M.length - L.length;
378
+ return { chartData: L, skippedCount: z };
360
379
  }, [M, F]), S = m ? "expand" : void 0, x = F.length === 1 && v.some((L) => {
361
- const E = L[F[0]];
362
- return typeof E == "number" && E < 0;
380
+ const z = L[F[0]];
381
+ return typeof z == "number" && z < 0;
363
382
  }), y = p.showLegend, k = {
364
383
  ...we,
365
384
  left: 40
366
385
  // Increased from 20 to 40 for Y-axis label space
367
- }, w = ze(n?.target || ""), T = De(w, v.length);
386
+ }, w = je(n?.target || ""), T = De(w, v.length);
368
387
  let $ = v;
369
- return T.length > 0 && ($ = v.map((L, E) => ({
388
+ return T.length > 0 && ($ = v.map((L, z) => ({
370
389
  ...L,
371
- __target: T[E] || null
390
+ __target: T[z] || null
372
391
  }))), !v || v.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
373
392
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
374
393
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for bar chart after transformation" })
375
394
  ] }) }) : /* @__PURE__ */ b("div", { className: "relative w-full", style: { height: i }, children: [
376
- /* @__PURE__ */ s(B, { height: A > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ b(ot, { data: $, margin: k, stackOffset: S, children: [
395
+ /* @__PURE__ */ s(B, { height: A > 0 ? "calc(100% - 20px)" : "100%", children: /* @__PURE__ */ b(ct, { data: $, margin: k, stackOffset: S, children: [
377
396
  p.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
378
397
  /* @__PURE__ */ s(
379
398
  be,
@@ -397,7 +416,7 @@ function Jn({
397
416
  p.showTooltip && /* @__PURE__ */ s(
398
417
  Q,
399
418
  {
400
- formatter: (L, E) => L == null ? ["No data", E] : E === "Target" ? [q(L), "Target Value"] : m && typeof L == "number" ? [`${(L * 100).toFixed(1)}%`, E] : [q(L), E]
419
+ formatter: (L, z) => L == null ? ["No data", z] : z === "Target" ? [q(L), "Target Value"] : m && typeof L == "number" ? [`${(L * 100).toFixed(1)}%`, z] : [q(L), z]
401
420
  }
402
421
  ),
403
422
  y && /* @__PURE__ */ s(
@@ -413,28 +432,28 @@ function Jn({
413
432
  onMouseLeave: () => o(null)
414
433
  }
415
434
  ),
416
- F.map((L, E) => /* @__PURE__ */ s(
417
- At,
435
+ F.map((L, z) => /* @__PURE__ */ s(
436
+ St,
418
437
  {
419
438
  dataKey: L,
420
439
  stackId: f ? "stack" : void 0,
421
- fill: x ? Ue : a?.colors && a.colors[E % a.colors.length] || j[E % j.length],
440
+ fill: x ? qe : a?.colors && a.colors[z % a.colors.length] || E[z % E.length],
422
441
  fillOpacity: l ? l === L ? 1 : 0.3 : 1,
423
- children: x && v.map((D, V) => {
424
- const G = D[L], Z = typeof G == "number" && G < 0 ? _t : Ue;
442
+ children: x && v.map((D, I) => {
443
+ const G = D[L], Z = typeof G == "number" && G < 0 ? Gt : qe;
425
444
  return /* @__PURE__ */ s(
426
- je,
445
+ Ee,
427
446
  {
428
447
  fill: Z,
429
448
  fillOpacity: l ? l === L ? 1 : 0.3 : 1
430
449
  },
431
- `cell-${V}`
450
+ `cell-${I}`
432
451
  );
433
452
  })
434
453
  },
435
454
  L
436
455
  )),
437
- T.length > 0 && /* @__PURE__ */ b(Ee, { children: [
456
+ T.length > 0 && /* @__PURE__ */ b(ze, { children: [
438
457
  /* @__PURE__ */ s(
439
458
  W,
440
459
  {
@@ -478,7 +497,7 @@ function Jn({
478
497
  ] }) });
479
498
  }
480
499
  }
481
- function Pn({
500
+ function tr({
482
501
  data: e,
483
502
  chartConfig: t,
484
503
  displayConfig: n = {},
@@ -525,7 +544,7 @@ function Pn({
525
544
  ...we,
526
545
  left: 40
527
546
  // Increased from 20 to 40 for Y-axis label space
528
- }, F = ze(n?.target || ""), v = De(F, N.length);
547
+ }, F = je(n?.target || ""), v = De(F, N.length);
529
548
  let A = N;
530
549
  return v.length > 0 && (A = N.map((S, x) => ({
531
550
  ...S,
@@ -533,7 +552,7 @@ function Pn({
533
552
  }))), !N || N.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
534
553
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
535
554
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for line chart after transformation" })
536
- ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(St, { data: A, margin: M, children: [
555
+ ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(kt, { data: A, margin: M, children: [
537
556
  u.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
538
557
  /* @__PURE__ */ s(
539
558
  be,
@@ -576,7 +595,7 @@ function Pn({
576
595
  {
577
596
  type: "monotone",
578
597
  dataKey: S,
579
- stroke: a?.colors && a.colors[x % a.colors.length] || j[x % j.length],
598
+ stroke: a?.colors && a.colors[x % a.colors.length] || E[x % E.length],
580
599
  strokeWidth: 2,
581
600
  dot: { r: 3 },
582
601
  activeDot: { r: 5 },
@@ -585,7 +604,7 @@ function Pn({
585
604
  },
586
605
  S
587
606
  )),
588
- v.length > 0 && /* @__PURE__ */ b(Ee, { children: [
607
+ v.length > 0 && /* @__PURE__ */ b(ze, { children: [
589
608
  /* @__PURE__ */ s(
590
609
  W,
591
610
  {
@@ -622,7 +641,7 @@ function Pn({
622
641
  ] }) });
623
642
  }
624
643
  }
625
- function er({
644
+ function nr({
626
645
  data: e,
627
646
  chartConfig: t,
628
647
  displayConfig: n = {},
@@ -669,7 +688,7 @@ function er({
669
688
  ...we,
670
689
  left: 40
671
690
  // Increased from 20 to 40 for Y-axis label space
672
- }, S = ze(n?.target || ""), x = De(S, M.length);
691
+ }, S = je(n?.target || ""), x = De(S, M.length);
673
692
  let y = M;
674
693
  return x.length > 0 && (y = M.map((w, T) => ({
675
694
  ...w,
@@ -677,7 +696,7 @@ function er({
677
696
  }))), !M || M.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
678
697
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
679
698
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for area chart after transformation" })
680
- ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(ot, { data: y, margin: A, stackOffset: m ? "expand" : void 0, children: [
699
+ ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(ct, { data: y, margin: A, stackOffset: m ? "expand" : void 0, children: [
681
700
  p.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
682
701
  /* @__PURE__ */ s(
683
702
  be,
@@ -718,13 +737,13 @@ function er({
718
737
  }
719
738
  ),
720
739
  F.map((w, T) => /* @__PURE__ */ s(
721
- kt,
740
+ Mt,
722
741
  {
723
742
  type: "monotone",
724
743
  dataKey: w,
725
744
  stackId: f ? "stack" : void 0,
726
- stroke: a?.colors && a.colors[T % a.colors.length] || j[T % j.length],
727
- fill: a?.colors && a.colors[T % a.colors.length] || j[T % j.length],
745
+ stroke: a?.colors && a.colors[T % a.colors.length] || E[T % E.length],
746
+ fill: a?.colors && a.colors[T % a.colors.length] || E[T % E.length],
728
747
  fillOpacity: l ? l === w ? 0.6 : 0.1 : 0.3,
729
748
  strokeWidth: 2,
730
749
  strokeOpacity: l ? l === w ? 1 : 0.3 : 1,
@@ -732,7 +751,7 @@ function er({
732
751
  },
733
752
  w
734
753
  )),
735
- x.length > 0 && /* @__PURE__ */ b(Ee, { children: [
754
+ x.length > 0 && /* @__PURE__ */ b(ze, { children: [
736
755
  /* @__PURE__ */ s(
737
756
  W,
738
757
  {
@@ -769,7 +788,7 @@ function er({
769
788
  ] }) });
770
789
  }
771
790
  }
772
- function tr({
791
+ function rr({
773
792
  data: e,
774
793
  chartConfig: t,
775
794
  displayConfig: n = {},
@@ -837,9 +856,9 @@ function tr({
837
856
  ), u.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
838
857
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
839
858
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: N > 0 ? `Filtered out ${N} data points (zero or invalid values)` : "No data points to display in pie chart" })
840
- ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(Mt, { children: [
859
+ ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b($t, { children: [
841
860
  /* @__PURE__ */ s(
842
- $t,
861
+ Lt,
843
862
  {
844
863
  data: u,
845
864
  cx: "50%",
@@ -848,9 +867,9 @@ function tr({
848
867
  dataKey: "value",
849
868
  label: c.showLegend ? void 0 : ({ name: g, percent: h }) => `${g} ${((h || 0) * 100).toFixed(0)}%`,
850
869
  children: u.map((g, h) => /* @__PURE__ */ s(
851
- je,
870
+ Ee,
852
871
  {
853
- fill: a?.colors && a.colors[h % a.colors.length] || j[h % j.length],
872
+ fill: a?.colors && a.colors[h % a.colors.length] || E[h % E.length],
854
873
  fillOpacity: l ? l === u[h].name ? 1 : 0.3 : 1
855
874
  },
856
875
  `cell-${h}`
@@ -880,7 +899,7 @@ function tr({
880
899
  ] }) });
881
900
  }
882
901
  }
883
- function nr({
902
+ function ir({
884
903
  data: e,
885
904
  chartConfig: t,
886
905
  displayConfig: n = {},
@@ -924,16 +943,16 @@ function nr({
924
943
  e.forEach((k) => {
925
944
  const w = String(k[x] || "Default");
926
945
  h[w] || (h[w] = []);
927
- const T = O(r, u), $ = R(k[u], T) || k[u], L = te(k[f]), E = typeof $ == "string" ? parseFloat($) : $;
928
- if (ke(E) && L !== null) {
946
+ const T = O(r, u), $ = R(k[u], T) || k[u], L = te(k[f]), z = typeof $ == "string" ? parseFloat($) : $;
947
+ if (ke(z) && L !== null) {
929
948
  const D = {};
930
- N.forEach((V) => {
931
- if (k[V]) {
932
- const G = O(r, V);
933
- D[V] = R(k[V], G);
949
+ N.forEach((I) => {
950
+ if (k[I]) {
951
+ const G = O(r, I);
952
+ D[I] = R(k[I], G);
934
953
  }
935
954
  }), h[w].push({
936
- x: E,
955
+ x: z,
937
956
  y: L,
938
957
  name: w,
939
958
  timeValues: D,
@@ -947,8 +966,8 @@ function nr({
947
966
  const k = R(y[u], x) || y[u], w = te(y[f]), T = typeof k == "string" ? parseFloat(k) : k, $ = {};
948
967
  return N.forEach((L) => {
949
968
  if (y[L]) {
950
- const E = O(r, L);
951
- $[L] = R(y[L], E);
969
+ const z = O(r, L);
970
+ $[L] = R(y[L], z);
952
971
  }
953
972
  }), {
954
973
  x: T,
@@ -970,7 +989,7 @@ function nr({
970
989
  left: 40
971
990
  // Increased from 20 to 40 for Y-axis label space
972
991
  };
973
- return /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(Lt, { margin: S, children: [
992
+ return /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(Tt, { margin: S, children: [
974
993
  c.showGrid && /* @__PURE__ */ s(ve, { strokeDasharray: "3 3" }),
975
994
  /* @__PURE__ */ s(
976
995
  be,
@@ -992,7 +1011,7 @@ function nr({
992
1011
  }
993
1012
  ),
994
1013
  c.showTooltip && /* @__PURE__ */ s(
995
- lt,
1014
+ ot,
996
1015
  {
997
1016
  cursor: { strokeDasharray: "3 3" },
998
1017
  content: ({ active: x, payload: y }) => {
@@ -1047,7 +1066,7 @@ function nr({
1047
1066
  {
1048
1067
  name: x,
1049
1068
  data: h[x],
1050
- fill: a?.colors && a.colors[y % a.colors.length] || j[y % j.length],
1069
+ fill: a?.colors && a.colors[y % a.colors.length] || E[y % E.length],
1051
1070
  fillOpacity: l ? l === x ? 1 : 0.3 : 1
1052
1071
  },
1053
1072
  x
@@ -1059,7 +1078,7 @@ function nr({
1059
1078
  {
1060
1079
  name: "Data",
1061
1080
  data: g,
1062
- fill: a?.colors && a.colors[0] || j[0]
1081
+ fill: a?.colors && a.colors[0] || E[0]
1063
1082
  }
1064
1083
  )
1065
1084
  )
@@ -1072,7 +1091,7 @@ function nr({
1072
1091
  ] }) });
1073
1092
  }
1074
1093
  }
1075
- function rr({
1094
+ function sr({
1076
1095
  data: e,
1077
1096
  chartConfig: t,
1078
1097
  displayConfig: n = {},
@@ -1133,8 +1152,8 @@ function rr({
1133
1152
  return !c || c.length === 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center w-full text-dc-text-muted", style: { height: i }, children: /* @__PURE__ */ b("div", { className: "text-center", children: [
1134
1153
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1135
1154
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radar chart after transformation" })
1136
- ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(Tt, { data: c, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1137
- d.showGrid && /* @__PURE__ */ s(Ft, {}),
1155
+ ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(Ft, { data: c, margin: { top: 20, right: 80, bottom: 20, left: 80 }, children: [
1156
+ d.showGrid && /* @__PURE__ */ s(zt, {}),
1138
1157
  /* @__PURE__ */ s(
1139
1158
  Et,
1140
1159
  {
@@ -1165,12 +1184,12 @@ function rr({
1165
1184
  }
1166
1185
  ),
1167
1186
  u.map((f, m) => /* @__PURE__ */ s(
1168
- zt,
1187
+ Dt,
1169
1188
  {
1170
1189
  name: f,
1171
1190
  dataKey: f,
1172
- stroke: a?.colors && a.colors[m % a.colors.length] || j[m % j.length],
1173
- fill: a?.colors && a.colors[m % a.colors.length] || j[m % j.length],
1191
+ stroke: a?.colors && a.colors[m % a.colors.length] || E[m % E.length],
1192
+ fill: a?.colors && a.colors[m % a.colors.length] || E[m % E.length],
1174
1193
  fillOpacity: l ? l === f ? 0.6 : 0.1 : 0.3,
1175
1194
  strokeOpacity: l ? l === f ? 1 : 0.3 : 1,
1176
1195
  strokeWidth: 2
@@ -1186,7 +1205,7 @@ function rr({
1186
1205
  ] }) });
1187
1206
  }
1188
1207
  }
1189
- function ir({
1208
+ function ar({
1190
1209
  data: e,
1191
1210
  chartConfig: t,
1192
1211
  displayConfig: n = {},
@@ -1211,7 +1230,7 @@ function ir({
1211
1230
  c = e.map((p, N) => ({
1212
1231
  name: R(p[u], m) || String(p[u]) || "Unknown",
1213
1232
  value: typeof p[f] == "string" ? parseFloat(p[f]) : p[f] || 0,
1214
- fill: a?.colors && a.colors[N % a.colors.length] || j[N % j.length]
1233
+ fill: a?.colors && a.colors[N % a.colors.length] || E[N % E.length]
1215
1234
  }));
1216
1235
  } else {
1217
1236
  const u = e[0], f = Object.keys(u), m = f.find(
@@ -1229,7 +1248,7 @@ function ir({
1229
1248
  return typeof h == "boolean" ? h = h ? "Active" : "Inactive" : h === "true" || h === "false" ? h = h === "true" ? "Active" : "Inactive" : h = String(h), {
1230
1249
  name: h,
1231
1250
  value: typeof N[p] == "string" ? parseFloat(N[p]) : N[p] || 0,
1232
- fill: a?.colors && a.colors[g % a.colors.length] || j[g % j.length]
1251
+ fill: a?.colors && a.colors[g % a.colors.length] || E[g % E.length]
1233
1252
  };
1234
1253
  });
1235
1254
  }
@@ -1237,7 +1256,7 @@ function ir({
1237
1256
  /* @__PURE__ */ s("div", { className: "text-sm font-semibold mb-1", children: "No valid data" }),
1238
1257
  /* @__PURE__ */ s("div", { className: "text-xs text-dc-text-secondary", children: "No valid data points for radial bar chart after transformation" })
1239
1258
  ] }) }) : /* @__PURE__ */ s(B, { height: i, children: /* @__PURE__ */ b(
1240
- Dt,
1259
+ Rt,
1241
1260
  {
1242
1261
  data: c,
1243
1262
  innerRadius: "10%",
@@ -1259,13 +1278,13 @@ function ir({
1259
1278
  }
1260
1279
  ),
1261
1280
  /* @__PURE__ */ s(
1262
- Rt,
1281
+ It,
1263
1282
  {
1264
1283
  dataKey: "value",
1265
1284
  cornerRadius: 4,
1266
1285
  label: { position: "insideStart", fill: "#fff", fontSize: 12 },
1267
1286
  children: c.map((u, f) => /* @__PURE__ */ s(
1268
- je,
1287
+ Ee,
1269
1288
  {
1270
1289
  fill: u.fill,
1271
1290
  fillOpacity: l ? l === u.name ? 1 : 0.3 : 1
@@ -1288,12 +1307,12 @@ function ir({
1288
1307
  function fe(e, t) {
1289
1308
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
1290
1309
  }
1291
- function Ht(e, t) {
1310
+ function Ut(e, t) {
1292
1311
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
1293
1312
  }
1294
- function ct(e) {
1313
+ function dt(e) {
1295
1314
  let t, n, r;
1296
- e.length !== 2 ? (t = fe, n = (o, d) => fe(e(o), d), r = (o, d) => e(o) - d) : (t = e === fe || e === Ht ? e : Gt, n = e, r = e);
1315
+ e.length !== 2 ? (t = fe, n = (o, d) => fe(e(o), d), r = (o, d) => e(o) - d) : (t = e === fe || e === Ut ? e : qt, n = e, r = e);
1297
1316
  function i(o, d, c = 0, u = o.length) {
1298
1317
  if (c < u) {
1299
1318
  if (t(d, d) !== 0) return u;
@@ -1320,53 +1339,53 @@ function ct(e) {
1320
1339
  }
1321
1340
  return { left: i, center: l, right: a };
1322
1341
  }
1323
- function Gt() {
1342
+ function qt() {
1324
1343
  return 0;
1325
1344
  }
1326
- function Ut(e) {
1345
+ function Bt(e) {
1327
1346
  return e === null ? NaN : +e;
1328
1347
  }
1329
- const qt = ct(fe), dt = qt.right;
1330
- ct(Ut).center;
1331
- class qe extends Map {
1332
- constructor(t, n = Wt) {
1348
+ const Kt = dt(fe), ut = Kt.right;
1349
+ dt(Bt).center;
1350
+ class Be extends Map {
1351
+ constructor(t, n = Yt) {
1333
1352
  if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, i] of t) this.set(r, i);
1334
1353
  }
1335
1354
  get(t) {
1336
- return super.get(Be(this, t));
1355
+ return super.get(Ke(this, t));
1337
1356
  }
1338
1357
  has(t) {
1339
- return super.has(Be(this, t));
1358
+ return super.has(Ke(this, t));
1340
1359
  }
1341
1360
  set(t, n) {
1342
- return super.set(Bt(this, t), n);
1361
+ return super.set(Wt(this, t), n);
1343
1362
  }
1344
1363
  delete(t) {
1345
- return super.delete(Kt(this, t));
1364
+ return super.delete(Ct(this, t));
1346
1365
  }
1347
1366
  }
1348
- function Be({ _intern: e, _key: t }, n) {
1367
+ function Ke({ _intern: e, _key: t }, n) {
1349
1368
  const r = t(n);
1350
1369
  return e.has(r) ? e.get(r) : n;
1351
1370
  }
1352
- function Bt({ _intern: e, _key: t }, n) {
1371
+ function Wt({ _intern: e, _key: t }, n) {
1353
1372
  const r = t(n);
1354
1373
  return e.has(r) ? e.get(r) : (e.set(r, n), n);
1355
1374
  }
1356
- function Kt({ _intern: e, _key: t }, n) {
1375
+ function Ct({ _intern: e, _key: t }, n) {
1357
1376
  const r = t(n);
1358
1377
  return e.has(r) && (n = e.get(r), e.delete(r)), n;
1359
1378
  }
1360
- function Wt(e) {
1379
+ function Yt(e) {
1361
1380
  return e !== null && typeof e == "object" ? e.valueOf() : e;
1362
1381
  }
1363
- const Ct = Math.sqrt(50), Yt = Math.sqrt(10), Xt = Math.sqrt(2);
1382
+ const Xt = Math.sqrt(50), Qt = Math.sqrt(10), Zt = Math.sqrt(2);
1364
1383
  function me(e, t, n) {
1365
- const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), l = a >= Ct ? 10 : a >= Yt ? 5 : a >= Xt ? 2 : 1;
1384
+ const r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / Math.pow(10, i), l = a >= Xt ? 10 : a >= Qt ? 5 : a >= Zt ? 2 : 1;
1366
1385
  let o, d, c;
1367
1386
  return i < 0 ? (c = Math.pow(10, -i) / l, o = Math.round(e * c), d = Math.round(t * c), o / c < e && ++o, d / c > t && --d, c = -c) : (c = Math.pow(10, i) * l, o = Math.round(e / c), d = Math.round(t / c), o * c < e && ++o, d * c > t && --d), d < o && 0.5 <= n && n < 2 ? me(e, t, n * 2) : [o, d, c];
1368
1387
  }
1369
- function Qt(e, t, n) {
1388
+ function Jt(e, t, n) {
1370
1389
  if (t = +t, e = +e, n = +n, !(n > 0)) return [];
1371
1390
  if (e === t) return [e];
1372
1391
  const r = t < e, [i, a, l] = r ? me(t, e, n) : me(e, t, n);
@@ -1382,7 +1401,7 @@ function Qt(e, t, n) {
1382
1401
  function $e(e, t, n) {
1383
1402
  return t = +t, e = +e, n = +n, me(e, t, n)[2];
1384
1403
  }
1385
- function Zt(e, t, n) {
1404
+ function Pt(e, t, n) {
1386
1405
  t = +t, e = +e, n = +n;
1387
1406
  const r = t < e, i = r ? $e(t, e, n) : $e(e, t, n);
1388
1407
  return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
@@ -1390,14 +1409,14 @@ function Zt(e, t, n) {
1390
1409
  function Re(e, t, n) {
1391
1410
  e.prototype = t.prototype = n, n.constructor = e;
1392
1411
  }
1393
- function ut(e, t) {
1412
+ function ft(e, t) {
1394
1413
  var n = Object.create(e.prototype);
1395
1414
  for (var r in t) n[r] = t[r];
1396
1415
  return n;
1397
1416
  }
1398
1417
  function ae() {
1399
1418
  }
1400
- var ne = 0.7, xe = 1 / ne, P = "\\s*([+-]?\\d+)\\s*", re = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", _ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Jt = /^#([0-9a-f]{3,8})$/, Pt = new RegExp(`^rgb\\(${P},${P},${P}\\)$`), en = new RegExp(`^rgb\\(${_},${_},${_}\\)$`), tn = new RegExp(`^rgba\\(${P},${P},${P},${re}\\)$`), nn = new RegExp(`^rgba\\(${_},${_},${_},${re}\\)$`), rn = new RegExp(`^hsl\\(${re},${_},${_}\\)$`), sn = new RegExp(`^hsla\\(${re},${_},${_},${re}\\)$`), Ke = {
1419
+ var ne = 0.7, xe = 1 / ne, P = "\\s*([+-]?\\d+)\\s*", re = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", _ = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", en = /^#([0-9a-f]{3,8})$/, tn = new RegExp(`^rgb\\(${P},${P},${P}\\)$`), nn = new RegExp(`^rgb\\(${_},${_},${_}\\)$`), rn = new RegExp(`^rgba\\(${P},${P},${P},${re}\\)$`), sn = new RegExp(`^rgba\\(${_},${_},${_},${re}\\)$`), an = new RegExp(`^hsl\\(${re},${_},${_}\\)$`), ln = new RegExp(`^hsla\\(${re},${_},${_},${re}\\)$`), We = {
1401
1420
  aliceblue: 15792383,
1402
1421
  antiquewhite: 16444375,
1403
1422
  aqua: 65535,
@@ -1554,75 +1573,75 @@ Re(ae, ie, {
1554
1573
  displayable() {
1555
1574
  return this.rgb().displayable();
1556
1575
  },
1557
- hex: We,
1576
+ hex: Ce,
1558
1577
  // Deprecated! Use color.formatHex.
1559
- formatHex: We,
1560
- formatHex8: an,
1561
- formatHsl: ln,
1562
- formatRgb: Ce,
1563
- toString: Ce
1578
+ formatHex: Ce,
1579
+ formatHex8: on,
1580
+ formatHsl: cn,
1581
+ formatRgb: Ye,
1582
+ toString: Ye
1564
1583
  });
1565
- function We() {
1584
+ function Ce() {
1566
1585
  return this.rgb().formatHex();
1567
1586
  }
1568
- function an() {
1587
+ function on() {
1569
1588
  return this.rgb().formatHex8();
1570
1589
  }
1571
- function ln() {
1572
- return ft(this).formatHsl();
1590
+ function cn() {
1591
+ return mt(this).formatHsl();
1573
1592
  }
1574
- function Ce() {
1593
+ function Ye() {
1575
1594
  return this.rgb().formatRgb();
1576
1595
  }
1577
1596
  function ie(e) {
1578
1597
  var t, n;
1579
- return e = (e + "").trim().toLowerCase(), (t = Jt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Ye(t) : n === 3 ? new z(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ce(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ce(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Pt.exec(e)) ? new z(t[1], t[2], t[3], 1) : (t = en.exec(e)) ? new z(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = tn.exec(e)) ? ce(t[1], t[2], t[3], t[4]) : (t = nn.exec(e)) ? ce(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = rn.exec(e)) ? Ze(t[1], t[2] / 100, t[3] / 100, 1) : (t = sn.exec(e)) ? Ze(t[1], t[2] / 100, t[3] / 100, t[4]) : Ke.hasOwnProperty(e) ? Ye(Ke[e]) : e === "transparent" ? new z(NaN, NaN, NaN, 0) : null;
1598
+ return e = (e + "").trim().toLowerCase(), (t = en.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Xe(t) : n === 3 ? new j(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? ce(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? ce(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = tn.exec(e)) ? new j(t[1], t[2], t[3], 1) : (t = nn.exec(e)) ? new j(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = rn.exec(e)) ? ce(t[1], t[2], t[3], t[4]) : (t = sn.exec(e)) ? ce(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = an.exec(e)) ? Je(t[1], t[2] / 100, t[3] / 100, 1) : (t = ln.exec(e)) ? Je(t[1], t[2] / 100, t[3] / 100, t[4]) : We.hasOwnProperty(e) ? Xe(We[e]) : e === "transparent" ? new j(NaN, NaN, NaN, 0) : null;
1580
1599
  }
1581
- function Ye(e) {
1582
- return new z(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1600
+ function Xe(e) {
1601
+ return new j(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1583
1602
  }
1584
1603
  function ce(e, t, n, r) {
1585
- return r <= 0 && (e = t = n = NaN), new z(e, t, n, r);
1604
+ return r <= 0 && (e = t = n = NaN), new j(e, t, n, r);
1586
1605
  }
1587
- function on(e) {
1588
- return e instanceof ae || (e = ie(e)), e ? (e = e.rgb(), new z(e.r, e.g, e.b, e.opacity)) : new z();
1606
+ function dn(e) {
1607
+ return e instanceof ae || (e = ie(e)), e ? (e = e.rgb(), new j(e.r, e.g, e.b, e.opacity)) : new j();
1589
1608
  }
1590
1609
  function Le(e, t, n, r) {
1591
- return arguments.length === 1 ? on(e) : new z(e, t, n, r ?? 1);
1610
+ return arguments.length === 1 ? dn(e) : new j(e, t, n, r ?? 1);
1592
1611
  }
1593
- function z(e, t, n, r) {
1612
+ function j(e, t, n, r) {
1594
1613
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1595
1614
  }
1596
- Re(z, Le, ut(ae, {
1615
+ Re(j, Le, ft(ae, {
1597
1616
  brighter(e) {
1598
- return e = e == null ? xe : Math.pow(xe, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1617
+ return e = e == null ? xe : Math.pow(xe, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1599
1618
  },
1600
1619
  darker(e) {
1601
- return e = e == null ? ne : Math.pow(ne, e), new z(this.r * e, this.g * e, this.b * e, this.opacity);
1620
+ return e = e == null ? ne : Math.pow(ne, e), new j(this.r * e, this.g * e, this.b * e, this.opacity);
1602
1621
  },
1603
1622
  rgb() {
1604
1623
  return this;
1605
1624
  },
1606
1625
  clamp() {
1607
- return new z(C(this.r), C(this.g), C(this.b), he(this.opacity));
1626
+ return new j(C(this.r), C(this.g), C(this.b), he(this.opacity));
1608
1627
  },
1609
1628
  displayable() {
1610
1629
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1611
1630
  },
1612
- hex: Xe,
1631
+ hex: Qe,
1613
1632
  // Deprecated! Use color.formatHex.
1614
- formatHex: Xe,
1615
- formatHex8: cn,
1616
- formatRgb: Qe,
1617
- toString: Qe
1633
+ formatHex: Qe,
1634
+ formatHex8: un,
1635
+ formatRgb: Ze,
1636
+ toString: Ze
1618
1637
  }));
1619
- function Xe() {
1638
+ function Qe() {
1620
1639
  return `#${K(this.r)}${K(this.g)}${K(this.b)}`;
1621
1640
  }
1622
- function cn() {
1641
+ function un() {
1623
1642
  return `#${K(this.r)}${K(this.g)}${K(this.b)}${K((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1624
1643
  }
1625
- function Qe() {
1644
+ function Ze() {
1626
1645
  const e = he(this.opacity);
1627
1646
  return `${e === 1 ? "rgb(" : "rgba("}${C(this.r)}, ${C(this.g)}, ${C(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1628
1647
  }
@@ -1635,33 +1654,33 @@ function C(e) {
1635
1654
  function K(e) {
1636
1655
  return e = C(e), (e < 16 ? "0" : "") + e.toString(16);
1637
1656
  }
1638
- function Ze(e, t, n, r) {
1639
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new I(e, t, n, r);
1657
+ function Je(e, t, n, r) {
1658
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new V(e, t, n, r);
1640
1659
  }
1641
- function ft(e) {
1642
- if (e instanceof I) return new I(e.h, e.s, e.l, e.opacity);
1643
- if (e instanceof ae || (e = ie(e)), !e) return new I();
1644
- if (e instanceof I) return e;
1660
+ function mt(e) {
1661
+ if (e instanceof V) return new V(e.h, e.s, e.l, e.opacity);
1662
+ if (e instanceof ae || (e = ie(e)), !e) return new V();
1663
+ if (e instanceof V) return e;
1645
1664
  e = e.rgb();
1646
1665
  var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), l = NaN, o = a - i, d = (a + i) / 2;
1647
- return o ? (t === a ? l = (n - r) / o + (n < r) * 6 : n === a ? l = (r - t) / o + 2 : l = (t - n) / o + 4, o /= d < 0.5 ? a + i : 2 - a - i, l *= 60) : o = d > 0 && d < 1 ? 0 : l, new I(l, o, d, e.opacity);
1666
+ return o ? (t === a ? l = (n - r) / o + (n < r) * 6 : n === a ? l = (r - t) / o + 2 : l = (t - n) / o + 4, o /= d < 0.5 ? a + i : 2 - a - i, l *= 60) : o = d > 0 && d < 1 ? 0 : l, new V(l, o, d, e.opacity);
1648
1667
  }
1649
- function dn(e, t, n, r) {
1650
- return arguments.length === 1 ? ft(e) : new I(e, t, n, r ?? 1);
1668
+ function fn(e, t, n, r) {
1669
+ return arguments.length === 1 ? mt(e) : new V(e, t, n, r ?? 1);
1651
1670
  }
1652
- function I(e, t, n, r) {
1671
+ function V(e, t, n, r) {
1653
1672
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1654
1673
  }
1655
- Re(I, dn, ut(ae, {
1674
+ Re(V, fn, ft(ae, {
1656
1675
  brighter(e) {
1657
- return e = e == null ? xe : Math.pow(xe, e), new I(this.h, this.s, this.l * e, this.opacity);
1676
+ return e = e == null ? xe : Math.pow(xe, e), new V(this.h, this.s, this.l * e, this.opacity);
1658
1677
  },
1659
1678
  darker(e) {
1660
- return e = e == null ? ne : Math.pow(ne, e), new I(this.h, this.s, this.l * e, this.opacity);
1679
+ return e = e == null ? ne : Math.pow(ne, e), new V(this.h, this.s, this.l * e, this.opacity);
1661
1680
  },
1662
1681
  rgb() {
1663
1682
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, i = 2 * n - r;
1664
- return new z(
1683
+ return new j(
1665
1684
  Ae(e >= 240 ? e - 240 : e + 120, i, r),
1666
1685
  Ae(e, i, r),
1667
1686
  Ae(e < 120 ? e + 240 : e - 120, i, r),
@@ -1669,17 +1688,17 @@ Re(I, dn, ut(ae, {
1669
1688
  );
1670
1689
  },
1671
1690
  clamp() {
1672
- return new I(Je(this.h), de(this.s), de(this.l), he(this.opacity));
1691
+ return new V(Pe(this.h), de(this.s), de(this.l), he(this.opacity));
1673
1692
  },
1674
1693
  displayable() {
1675
1694
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1676
1695
  },
1677
1696
  formatHsl() {
1678
1697
  const e = he(this.opacity);
1679
- return `${e === 1 ? "hsl(" : "hsla("}${Je(this.h)}, ${de(this.s) * 100}%, ${de(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1698
+ return `${e === 1 ? "hsl(" : "hsla("}${Pe(this.h)}, ${de(this.s) * 100}%, ${de(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1680
1699
  }
1681
1700
  }));
1682
- function Je(e) {
1701
+ function Pe(e) {
1683
1702
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1684
1703
  }
1685
1704
  function de(e) {
@@ -1688,37 +1707,37 @@ function de(e) {
1688
1707
  function Ae(e, t, n) {
1689
1708
  return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
1690
1709
  }
1691
- const Ve = (e) => () => e;
1692
- function un(e, t) {
1710
+ const Ie = (e) => () => e;
1711
+ function mn(e, t) {
1693
1712
  return function(n) {
1694
1713
  return e + n * t;
1695
1714
  };
1696
1715
  }
1697
- function fn(e, t, n) {
1716
+ function xn(e, t, n) {
1698
1717
  return e = Math.pow(e, n), t = Math.pow(t, n) - e, n = 1 / n, function(r) {
1699
1718
  return Math.pow(e + r * t, n);
1700
1719
  };
1701
1720
  }
1702
- function mn(e) {
1703
- return (e = +e) == 1 ? mt : function(t, n) {
1704
- return n - t ? fn(t, n, e) : Ve(isNaN(t) ? n : t);
1721
+ function hn(e) {
1722
+ return (e = +e) == 1 ? xt : function(t, n) {
1723
+ return n - t ? xn(t, n, e) : Ie(isNaN(t) ? n : t);
1705
1724
  };
1706
1725
  }
1707
- function mt(e, t) {
1726
+ function xt(e, t) {
1708
1727
  var n = t - e;
1709
- return n ? un(e, n) : Ve(isNaN(e) ? t : e);
1728
+ return n ? mn(e, n) : Ie(isNaN(e) ? t : e);
1710
1729
  }
1711
- const Pe = (function e(t) {
1712
- var n = mn(t);
1730
+ const et = (function e(t) {
1731
+ var n = hn(t);
1713
1732
  function r(i, a) {
1714
- var l = n((i = Le(i)).r, (a = Le(a)).r), o = n(i.g, a.g), d = n(i.b, a.b), c = mt(i.opacity, a.opacity);
1733
+ var l = n((i = Le(i)).r, (a = Le(a)).r), o = n(i.g, a.g), d = n(i.b, a.b), c = xt(i.opacity, a.opacity);
1715
1734
  return function(u) {
1716
1735
  return i.r = l(u), i.g = o(u), i.b = d(u), i.opacity = c(u), i + "";
1717
1736
  };
1718
1737
  }
1719
1738
  return r.gamma = e, r;
1720
1739
  })(1);
1721
- function xn(e, t) {
1740
+ function yn(e, t) {
1722
1741
  t || (t = []);
1723
1742
  var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
1724
1743
  return function(a) {
@@ -1726,19 +1745,19 @@ function xn(e, t) {
1726
1745
  return r;
1727
1746
  };
1728
1747
  }
1729
- function hn(e) {
1748
+ function pn(e) {
1730
1749
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
1731
1750
  }
1732
- function yn(e, t) {
1751
+ function gn(e, t) {
1733
1752
  var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = new Array(r), a = new Array(n), l;
1734
- for (l = 0; l < r; ++l) i[l] = Ie(e[l], t[l]);
1753
+ for (l = 0; l < r; ++l) i[l] = Ve(e[l], t[l]);
1735
1754
  for (; l < n; ++l) a[l] = t[l];
1736
1755
  return function(o) {
1737
1756
  for (l = 0; l < r; ++l) a[l] = i[l](o);
1738
1757
  return a;
1739
1758
  };
1740
1759
  }
1741
- function pn(e, t) {
1760
+ function vn(e, t) {
1742
1761
  var n = /* @__PURE__ */ new Date();
1743
1762
  return e = +e, t = +t, function(r) {
1744
1763
  return n.setTime(e * (1 - r) + t * r), n;
@@ -1749,46 +1768,46 @@ function ye(e, t) {
1749
1768
  return e * (1 - n) + t * n;
1750
1769
  };
1751
1770
  }
1752
- function gn(e, t) {
1771
+ function bn(e, t) {
1753
1772
  var n = {}, r = {}, i;
1754
1773
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
1755
1774
  for (i in t)
1756
- i in e ? n[i] = Ie(e[i], t[i]) : r[i] = t[i];
1775
+ i in e ? n[i] = Ve(e[i], t[i]) : r[i] = t[i];
1757
1776
  return function(a) {
1758
1777
  for (i in n) r[i] = n[i](a);
1759
1778
  return r;
1760
1779
  };
1761
1780
  }
1762
1781
  var Te = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Se = new RegExp(Te.source, "g");
1763
- function vn(e) {
1782
+ function Nn(e) {
1764
1783
  return function() {
1765
1784
  return e;
1766
1785
  };
1767
1786
  }
1768
- function bn(e) {
1787
+ function wn(e) {
1769
1788
  return function(t) {
1770
1789
  return e(t) + "";
1771
1790
  };
1772
1791
  }
1773
- function Nn(e, t) {
1792
+ function An(e, t) {
1774
1793
  var n = Te.lastIndex = Se.lastIndex = 0, r, i, a, l = -1, o = [], d = [];
1775
1794
  for (e = e + "", t = t + ""; (r = Te.exec(e)) && (i = Se.exec(t)); )
1776
1795
  (a = i.index) > n && (a = t.slice(n, a), o[l] ? o[l] += a : o[++l] = a), (r = r[0]) === (i = i[0]) ? o[l] ? o[l] += i : o[++l] = i : (o[++l] = null, d.push({ i: l, x: ye(r, i) })), n = Se.lastIndex;
1777
- return n < t.length && (a = t.slice(n), o[l] ? o[l] += a : o[++l] = a), o.length < 2 ? d[0] ? bn(d[0].x) : vn(t) : (t = d.length, function(c) {
1796
+ return n < t.length && (a = t.slice(n), o[l] ? o[l] += a : o[++l] = a), o.length < 2 ? d[0] ? wn(d[0].x) : Nn(t) : (t = d.length, function(c) {
1778
1797
  for (var u = 0, f; u < t; ++u) o[(f = d[u]).i] = f.x(c);
1779
1798
  return o.join("");
1780
1799
  });
1781
1800
  }
1782
- function Ie(e, t) {
1801
+ function Ve(e, t) {
1783
1802
  var n = typeof t, r;
1784
- return t == null || n === "boolean" ? Ve(t) : (n === "number" ? ye : n === "string" ? (r = ie(t)) ? (t = r, Pe) : Nn : t instanceof ie ? Pe : t instanceof Date ? pn : hn(t) ? xn : Array.isArray(t) ? yn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? gn : ye)(e, t);
1803
+ return t == null || n === "boolean" ? Ie(t) : (n === "number" ? ye : n === "string" ? (r = ie(t)) ? (t = r, et) : An : t instanceof ie ? et : t instanceof Date ? vn : pn(t) ? yn : Array.isArray(t) ? gn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? bn : ye)(e, t);
1785
1804
  }
1786
- function wn(e, t) {
1805
+ function Sn(e, t) {
1787
1806
  return e = +e, t = +t, function(n) {
1788
1807
  return Math.round(e * (1 - n) + t * n);
1789
1808
  };
1790
1809
  }
1791
- function An(e) {
1810
+ function kn(e) {
1792
1811
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
1793
1812
  }
1794
1813
  function pe(e, t) {
@@ -1802,23 +1821,23 @@ function pe(e, t) {
1802
1821
  function ee(e) {
1803
1822
  return e = pe(Math.abs(e)), e ? e[1] : NaN;
1804
1823
  }
1805
- function Sn(e, t) {
1824
+ function Mn(e, t) {
1806
1825
  return function(n, r) {
1807
1826
  for (var i = n.length, a = [], l = 0, o = e[0], d = 0; i > 0 && o > 0 && (d + o + 1 > r && (o = Math.max(1, r - d)), a.push(n.substring(i -= o, i + o)), !((d += o + 1) > r)); )
1808
1827
  o = e[l = (l + 1) % e.length];
1809
1828
  return a.reverse().join(t);
1810
1829
  };
1811
1830
  }
1812
- function kn(e) {
1831
+ function $n(e) {
1813
1832
  return function(t) {
1814
1833
  return t.replace(/[0-9]/g, function(n) {
1815
1834
  return e[+n];
1816
1835
  });
1817
1836
  };
1818
1837
  }
1819
- var Mn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1838
+ var Ln = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
1820
1839
  function ge(e) {
1821
- if (!(t = Mn.exec(e))) throw new Error("invalid format: " + e);
1840
+ if (!(t = Ln.exec(e))) throw new Error("invalid format: " + e);
1822
1841
  var t;
1823
1842
  return new Oe({
1824
1843
  fill: t[1],
@@ -1840,7 +1859,7 @@ function Oe(e) {
1840
1859
  Oe.prototype.toString = function() {
1841
1860
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
1842
1861
  };
1843
- function $n(e) {
1862
+ function Tn(e) {
1844
1863
  e: for (var t = e.length, n = 1, r = -1, i; n < t; ++n)
1845
1864
  switch (e[n]) {
1846
1865
  case ".":
@@ -1856,75 +1875,75 @@ function $n(e) {
1856
1875
  }
1857
1876
  return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
1858
1877
  }
1859
- var xt;
1860
- function Ln(e, t) {
1878
+ var ht;
1879
+ function Fn(e, t) {
1861
1880
  var n = pe(e, t);
1862
1881
  if (!n) return e + "";
1863
- var r = n[0], i = n[1], a = i - (xt = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, l = r.length;
1882
+ var r = n[0], i = n[1], a = i - (ht = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, l = r.length;
1864
1883
  return a === l ? r : a > l ? r + new Array(a - l + 1).join("0") : a > 0 ? r.slice(0, a) + "." + r.slice(a) : "0." + new Array(1 - a).join("0") + pe(e, Math.max(0, t + a - 1))[0];
1865
1884
  }
1866
- function et(e, t) {
1885
+ function tt(e, t) {
1867
1886
  var n = pe(e, t);
1868
1887
  if (!n) return e + "";
1869
1888
  var r = n[0], i = n[1];
1870
1889
  return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
1871
1890
  }
1872
- const tt = {
1891
+ const nt = {
1873
1892
  "%": (e, t) => (e * 100).toFixed(t),
1874
1893
  b: (e) => Math.round(e).toString(2),
1875
1894
  c: (e) => e + "",
1876
- d: An,
1895
+ d: kn,
1877
1896
  e: (e, t) => e.toExponential(t),
1878
1897
  f: (e, t) => e.toFixed(t),
1879
1898
  g: (e, t) => e.toPrecision(t),
1880
1899
  o: (e) => Math.round(e).toString(8),
1881
- p: (e, t) => et(e * 100, t),
1882
- r: et,
1883
- s: Ln,
1900
+ p: (e, t) => tt(e * 100, t),
1901
+ r: tt,
1902
+ s: Fn,
1884
1903
  X: (e) => Math.round(e).toString(16).toUpperCase(),
1885
1904
  x: (e) => Math.round(e).toString(16)
1886
1905
  };
1887
- function nt(e) {
1906
+ function rt(e) {
1888
1907
  return e;
1889
1908
  }
1890
- var rt = Array.prototype.map, it = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1891
- function Tn(e) {
1892
- var t = e.grouping === void 0 || e.thousands === void 0 ? nt : Sn(rt.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? nt : kn(rt.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", o = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1909
+ var it = Array.prototype.map, st = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
1910
+ function zn(e) {
1911
+ var t = e.grouping === void 0 || e.thousands === void 0 ? rt : Mn(it.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? rt : $n(it.call(e.numerals, String)), l = e.percent === void 0 ? "%" : e.percent + "", o = e.minus === void 0 ? "−" : e.minus + "", d = e.nan === void 0 ? "NaN" : e.nan + "";
1893
1912
  function c(f) {
1894
1913
  f = ge(f);
1895
1914
  var m = f.fill, p = f.align, N = f.sign, g = f.symbol, h = f.zero, M = f.width, F = f.comma, v = f.precision, A = f.trim, S = f.type;
1896
- S === "n" ? (F = !0, S = "g") : tt[S] || (v === void 0 && (v = 12), A = !0, S = "g"), (h || m === "0" && p === "=") && (h = !0, m = "0", p = "=");
1897
- var x = g === "$" ? n : g === "#" && /[boxX]/.test(S) ? "0" + S.toLowerCase() : "", y = g === "$" ? r : /[%p]/.test(S) ? l : "", k = tt[S], w = /[defgprs%]/.test(S);
1915
+ S === "n" ? (F = !0, S = "g") : nt[S] || (v === void 0 && (v = 12), A = !0, S = "g"), (h || m === "0" && p === "=") && (h = !0, m = "0", p = "=");
1916
+ var x = g === "$" ? n : g === "#" && /[boxX]/.test(S) ? "0" + S.toLowerCase() : "", y = g === "$" ? r : /[%p]/.test(S) ? l : "", k = nt[S], w = /[defgprs%]/.test(S);
1898
1917
  v = v === void 0 ? 6 : /[gprs]/.test(S) ? Math.max(1, Math.min(21, v)) : Math.max(0, Math.min(20, v));
1899
1918
  function T($) {
1900
- var L = x, E = y, D, V, G;
1919
+ var L = x, z = y, D, I, G;
1901
1920
  if (S === "c")
1902
- E = k($) + E, $ = "";
1921
+ z = k($) + z, $ = "";
1903
1922
  else {
1904
1923
  $ = +$;
1905
1924
  var Z = $ < 0 || 1 / $ < 0;
1906
- if ($ = isNaN($) ? d : k(Math.abs($), v), A && ($ = $n($)), Z && +$ == 0 && N !== "+" && (Z = !1), L = (Z ? N === "(" ? N : o : N === "-" || N === "(" ? "" : N) + L, E = (S === "s" ? it[8 + xt / 3] : "") + E + (Z && N === "(" ? ")" : ""), w) {
1907
- for (D = -1, V = $.length; ++D < V; )
1925
+ if ($ = isNaN($) ? d : k(Math.abs($), v), A && ($ = Tn($)), Z && +$ == 0 && N !== "+" && (Z = !1), L = (Z ? N === "(" ? N : o : N === "-" || N === "(" ? "" : N) + L, z = (S === "s" ? st[8 + ht / 3] : "") + z + (Z && N === "(" ? ")" : ""), w) {
1926
+ for (D = -1, I = $.length; ++D < I; )
1908
1927
  if (G = $.charCodeAt(D), 48 > G || G > 57) {
1909
- E = (G === 46 ? i + $.slice(D + 1) : $.slice(D)) + E, $ = $.slice(0, D);
1928
+ z = (G === 46 ? i + $.slice(D + 1) : $.slice(D)) + z, $ = $.slice(0, D);
1910
1929
  break;
1911
1930
  }
1912
1931
  }
1913
1932
  }
1914
1933
  F && !h && ($ = t($, 1 / 0));
1915
- var le = L.length + $.length + E.length, U = le < M ? new Array(M - le + 1).join(m) : "";
1916
- switch (F && h && ($ = t(U + $, U.length ? M - E.length : 1 / 0), U = ""), p) {
1934
+ var le = L.length + $.length + z.length, U = le < M ? new Array(M - le + 1).join(m) : "";
1935
+ switch (F && h && ($ = t(U + $, U.length ? M - z.length : 1 / 0), U = ""), p) {
1917
1936
  case "<":
1918
- $ = L + $ + E + U;
1937
+ $ = L + $ + z + U;
1919
1938
  break;
1920
1939
  case "=":
1921
- $ = L + U + $ + E;
1940
+ $ = L + U + $ + z;
1922
1941
  break;
1923
1942
  case "^":
1924
- $ = U.slice(0, le = U.length >> 1) + L + $ + E + U.slice(le);
1943
+ $ = U.slice(0, le = U.length >> 1) + L + $ + z + U.slice(le);
1925
1944
  break;
1926
1945
  default:
1927
- $ = U + L + $ + E;
1946
+ $ = U + L + $ + z;
1928
1947
  break;
1929
1948
  }
1930
1949
  return a($);
@@ -1934,7 +1953,7 @@ function Tn(e) {
1934
1953
  }, T;
1935
1954
  }
1936
1955
  function u(f, m) {
1937
- var p = c((f = ge(f), f.type = "f", f)), N = Math.max(-8, Math.min(8, Math.floor(ee(m) / 3))) * 3, g = Math.pow(10, -N), h = it[8 + N / 3];
1956
+ var p = c((f = ge(f), f.type = "f", f)), N = Math.max(-8, Math.min(8, Math.floor(ee(m) / 3))) * 3, g = Math.pow(10, -N), h = st[8 + N / 3];
1938
1957
  return function(M) {
1939
1958
  return p(g * M) + h;
1940
1959
  };
@@ -1944,22 +1963,22 @@ function Tn(e) {
1944
1963
  formatPrefix: u
1945
1964
  };
1946
1965
  }
1947
- var ue, ht, yt;
1948
- Fn({
1966
+ var ue, yt, pt;
1967
+ En({
1949
1968
  thousands: ",",
1950
1969
  grouping: [3],
1951
1970
  currency: ["$", ""]
1952
1971
  });
1953
- function Fn(e) {
1954
- return ue = Tn(e), ht = ue.format, yt = ue.formatPrefix, ue;
1955
- }
1956
1972
  function En(e) {
1973
+ return ue = zn(e), yt = ue.format, pt = ue.formatPrefix, ue;
1974
+ }
1975
+ function jn(e) {
1957
1976
  return Math.max(0, -ee(Math.abs(e)));
1958
1977
  }
1959
- function jn(e, t) {
1978
+ function Dn(e, t) {
1960
1979
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(ee(t) / 3))) * 3 - ee(Math.abs(e)));
1961
1980
  }
1962
- function zn(e, t) {
1981
+ function Rn(e, t) {
1963
1982
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, ee(t) - ee(e)) + 1;
1964
1983
  }
1965
1984
  function _e(e, t) {
@@ -1975,20 +1994,20 @@ function _e(e, t) {
1975
1994
  }
1976
1995
  return this;
1977
1996
  }
1978
- const st = /* @__PURE__ */ Symbol("implicit");
1979
- function pt() {
1980
- var e = new qe(), t = [], n = [], r = st;
1997
+ const at = /* @__PURE__ */ Symbol("implicit");
1998
+ function gt() {
1999
+ var e = new Be(), t = [], n = [], r = at;
1981
2000
  function i(a) {
1982
2001
  let l = e.get(a);
1983
2002
  if (l === void 0) {
1984
- if (r !== st) return r;
2003
+ if (r !== at) return r;
1985
2004
  e.set(a, l = t.push(a) - 1);
1986
2005
  }
1987
2006
  return n[l % n.length];
1988
2007
  }
1989
2008
  return i.domain = function(a) {
1990
2009
  if (!arguments.length) return t.slice();
1991
- t = [], e = new qe();
2010
+ t = [], e = new Be();
1992
2011
  for (const l of a)
1993
2012
  e.has(l) || e.set(l, t.push(l) - 1);
1994
2013
  return i;
@@ -1997,55 +2016,55 @@ function pt() {
1997
2016
  }, i.unknown = function(a) {
1998
2017
  return arguments.length ? (r = a, i) : r;
1999
2018
  }, i.copy = function() {
2000
- return pt(t, n).unknown(r);
2019
+ return gt(t, n).unknown(r);
2001
2020
  }, _e.apply(i, arguments), i;
2002
2021
  }
2003
- function Dn(e) {
2022
+ function In(e) {
2004
2023
  return function() {
2005
2024
  return e;
2006
2025
  };
2007
2026
  }
2008
- function Rn(e) {
2027
+ function Vn(e) {
2009
2028
  return +e;
2010
2029
  }
2011
- var at = [0, 1];
2030
+ var lt = [0, 1];
2012
2031
  function J(e) {
2013
2032
  return e;
2014
2033
  }
2015
2034
  function Fe(e, t) {
2016
2035
  return (t -= e = +e) ? function(n) {
2017
2036
  return (n - e) / t;
2018
- } : Dn(isNaN(t) ? NaN : 0.5);
2037
+ } : In(isNaN(t) ? NaN : 0.5);
2019
2038
  }
2020
- function Vn(e, t) {
2039
+ function On(e, t) {
2021
2040
  var n;
2022
2041
  return e > t && (n = e, e = t, t = n), function(r) {
2023
2042
  return Math.max(e, Math.min(t, r));
2024
2043
  };
2025
2044
  }
2026
- function In(e, t, n) {
2045
+ function _n(e, t, n) {
2027
2046
  var r = e[0], i = e[1], a = t[0], l = t[1];
2028
2047
  return i < r ? (r = Fe(i, r), a = n(l, a)) : (r = Fe(r, i), a = n(a, l)), function(o) {
2029
2048
  return a(r(o));
2030
2049
  };
2031
2050
  }
2032
- function On(e, t, n) {
2051
+ function Hn(e, t, n) {
2033
2052
  var r = Math.min(e.length, t.length) - 1, i = new Array(r), a = new Array(r), l = -1;
2034
2053
  for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++l < r; )
2035
2054
  i[l] = Fe(e[l], e[l + 1]), a[l] = n(t[l], t[l + 1]);
2036
2055
  return function(o) {
2037
- var d = dt(e, o, 1, r) - 1;
2056
+ var d = ut(e, o, 1, r) - 1;
2038
2057
  return a[d](i[d](o));
2039
2058
  };
2040
2059
  }
2041
- function _n(e, t) {
2060
+ function Gn(e, t) {
2042
2061
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
2043
2062
  }
2044
- function Hn() {
2045
- var e = at, t = at, n = Ie, r, i, a, l = J, o, d, c;
2063
+ function Un() {
2064
+ var e = lt, t = lt, n = Ve, r, i, a, l = J, o, d, c;
2046
2065
  function u() {
2047
2066
  var m = Math.min(e.length, t.length);
2048
- return l !== J && (l = Vn(e[0], e[m - 1])), o = m > 2 ? On : In, d = c = null, f;
2067
+ return l !== J && (l = On(e[0], e[m - 1])), o = m > 2 ? Hn : _n, d = c = null, f;
2049
2068
  }
2050
2069
  function f(m) {
2051
2070
  return m == null || isNaN(m = +m) ? a : (d || (d = o(e.map(r), t, n)))(r(l(m)));
@@ -2053,11 +2072,11 @@ function Hn() {
2053
2072
  return f.invert = function(m) {
2054
2073
  return l(i((c || (c = o(t, e.map(r), ye)))(m)));
2055
2074
  }, f.domain = function(m) {
2056
- return arguments.length ? (e = Array.from(m, Rn), u()) : e.slice();
2075
+ return arguments.length ? (e = Array.from(m, Vn), u()) : e.slice();
2057
2076
  }, f.range = function(m) {
2058
2077
  return arguments.length ? (t = Array.from(m), u()) : t.slice();
2059
2078
  }, f.rangeRound = function(m) {
2060
- return t = Array.from(m), n = wn, u();
2079
+ return t = Array.from(m), n = Sn, u();
2061
2080
  }, f.clamp = function(m) {
2062
2081
  return arguments.length ? (l = m ? !0 : J, u()) : l !== J;
2063
2082
  }, f.interpolate = function(m) {
@@ -2068,40 +2087,40 @@ function Hn() {
2068
2087
  return r = m, i = p, u();
2069
2088
  };
2070
2089
  }
2071
- function Gn() {
2072
- return Hn()(J, J);
2090
+ function qn() {
2091
+ return Un()(J, J);
2073
2092
  }
2074
- function Un(e, t, n, r) {
2075
- var i = Zt(e, t, n), a;
2093
+ function Bn(e, t, n, r) {
2094
+ var i = Pt(e, t, n), a;
2076
2095
  switch (r = ge(r ?? ",f"), r.type) {
2077
2096
  case "s": {
2078
2097
  var l = Math.max(Math.abs(e), Math.abs(t));
2079
- return r.precision == null && !isNaN(a = jn(i, l)) && (r.precision = a), yt(r, l);
2098
+ return r.precision == null && !isNaN(a = Dn(i, l)) && (r.precision = a), pt(r, l);
2080
2099
  }
2081
2100
  case "":
2082
2101
  case "e":
2083
2102
  case "g":
2084
2103
  case "p":
2085
2104
  case "r": {
2086
- r.precision == null && !isNaN(a = zn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
2105
+ r.precision == null && !isNaN(a = Rn(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
2087
2106
  break;
2088
2107
  }
2089
2108
  case "f":
2090
2109
  case "%": {
2091
- r.precision == null && !isNaN(a = En(i)) && (r.precision = a - (r.type === "%") * 2);
2110
+ r.precision == null && !isNaN(a = jn(i)) && (r.precision = a - (r.type === "%") * 2);
2092
2111
  break;
2093
2112
  }
2094
2113
  }
2095
- return ht(r);
2114
+ return yt(r);
2096
2115
  }
2097
- function gt(e) {
2116
+ function vt(e) {
2098
2117
  var t = e.domain;
2099
2118
  return e.ticks = function(n) {
2100
2119
  var r = t();
2101
- return Qt(r[0], r[r.length - 1], n ?? 10);
2120
+ return Jt(r[0], r[r.length - 1], n ?? 10);
2102
2121
  }, e.tickFormat = function(n, r) {
2103
2122
  var i = t();
2104
- return Un(i[0], i[i.length - 1], n ?? 10, r);
2123
+ return Bn(i[0], i[i.length - 1], n ?? 10, r);
2105
2124
  }, e.nice = function(n) {
2106
2125
  n == null && (n = 10);
2107
2126
  var r = t(), i = 0, a = r.length - 1, l = r[i], o = r[a], d, c, u = 10;
@@ -2119,16 +2138,16 @@ function gt(e) {
2119
2138
  return e;
2120
2139
  }, e;
2121
2140
  }
2122
- function qn() {
2123
- var e = Gn();
2141
+ function Kn() {
2142
+ var e = qn();
2124
2143
  return e.copy = function() {
2125
- return _n(e, qn());
2126
- }, _e.apply(e, arguments), gt(e);
2144
+ return Gn(e, Kn());
2145
+ }, _e.apply(e, arguments), vt(e);
2127
2146
  }
2128
- function vt() {
2147
+ function bt() {
2129
2148
  var e = 0, t = 1, n = 1, r = [0.5], i = [0, 1], a;
2130
2149
  function l(d) {
2131
- return d != null && d <= d ? i[dt(r, d, 0, n)] : a;
2150
+ return d != null && d <= d ? i[ut(r, d, 0, n)] : a;
2132
2151
  }
2133
2152
  function o() {
2134
2153
  var d = -1;
@@ -2147,10 +2166,10 @@ function vt() {
2147
2166
  }, l.thresholds = function() {
2148
2167
  return r.slice();
2149
2168
  }, l.copy = function() {
2150
- return vt().domain([e, t]).range(i).unknown(a);
2151
- }, _e.apply(gt(l), arguments);
2169
+ return bt().domain([e, t]).range(i).unknown(a);
2170
+ }, _e.apply(vt(l), arguments);
2152
2171
  }
2153
- function sr({
2172
+ function lr({
2154
2173
  data: e,
2155
2174
  chartConfig: t,
2156
2175
  displayConfig: n = {},
@@ -2180,7 +2199,7 @@ function sr({
2180
2199
  return typeof k == "string" ? parseFloat(k) : k;
2181
2200
  }).filter((y) => !isNaN(y));
2182
2201
  if (f = x.length === e.length && x.every((y) => typeof y == "number"), f) {
2183
- const y = Math.min(...x), k = Math.max(...x), w = vt().domain([y, k]).range(oe);
2202
+ const y = Math.min(...x), k = Math.max(...x), w = bt().domain([y, k]).range(oe);
2184
2203
  u = e.map((T) => {
2185
2204
  const $ = typeof T[m] == "string" ? parseFloat(T[m]) : T[m], L = w($);
2186
2205
  return {
@@ -2191,7 +2210,7 @@ function sr({
2191
2210
  };
2192
2211
  });
2193
2212
  } else {
2194
- const y = [...new Set(e.map((w) => String(w[m])))], k = pt().domain(y).range(a?.colors || j);
2213
+ const y = [...new Set(e.map((w) => String(w[m])))], k = gt().domain(y).range(a?.colors || E);
2195
2214
  u = e.map((w) => ({
2196
2215
  name: R(w[v], S) || String(w[v]) || "Unknown",
2197
2216
  size: typeof w[A] == "string" ? parseFloat(w[A]) : w[A] || 0,
@@ -2203,7 +2222,7 @@ function sr({
2203
2222
  u = e.map((x, y) => ({
2204
2223
  name: R(x[v], S) || String(x[v]) || "Unknown",
2205
2224
  size: typeof x[A] == "string" ? parseFloat(x[A]) : x[A] || 0,
2206
- fill: a?.colors && a.colors[y % a.colors.length] || j[y % j.length]
2225
+ fill: a?.colors && a.colors[y % a.colors.length] || E[y % E.length]
2207
2226
  }));
2208
2227
  } else {
2209
2228
  const v = e[0], A = Object.keys(v), S = A.find(
@@ -2221,7 +2240,7 @@ function sr({
2221
2240
  return typeof w == "boolean" ? w = w ? "Active" : "Inactive" : w === "true" || w === "false" ? w = w === "true" ? "Active" : "Inactive" : w = String(w), {
2222
2241
  name: w,
2223
2242
  size: typeof y[x] == "string" ? parseFloat(y[x]) : y[x] || 0,
2224
- fill: a?.colors && a.colors[k % a.colors.length] || j[k % j.length]
2243
+ fill: a?.colors && a.colors[k % a.colors.length] || E[k % E.length]
2225
2244
  };
2226
2245
  });
2227
2246
  }
@@ -2241,7 +2260,7 @@ function sr({
2241
2260
  width: x,
2242
2261
  height: y,
2243
2262
  style: {
2244
- fill: u[k]?.fill || a?.colors && a.colors[k % a.colors.length] || j[k % j.length],
2263
+ fill: u[k]?.fill || a?.colors && a.colors[k % a.colors.length] || E[k % E.length],
2245
2264
  fillOpacity: l !== null ? l === k ? 1 : 0.6 : 0.8,
2246
2265
  stroke: "#fff",
2247
2266
  strokeWidth: 2,
@@ -2331,7 +2350,7 @@ function sr({
2331
2350
  } else g.length > 1 && (h = g.map((v, A) => ({
2332
2351
  value: v,
2333
2352
  type: "rect",
2334
- color: j[A % j.length]
2353
+ color: E[A % E.length]
2335
2354
  })));
2336
2355
  const M = c.showLegend && h.length > 0, F = M ? typeof i == "string" && i.includes("%") ? i : typeof i == "number" ? i + 60 : `calc(${i} + 60px)` : i;
2337
2356
  return /* @__PURE__ */ b("div", { className: "w-full", style: { height: F }, children: [
@@ -2393,7 +2412,7 @@ function sr({
2393
2412
  ] }) });
2394
2413
  }
2395
2414
  }
2396
- function ar({
2415
+ function or({
2397
2416
  data: e,
2398
2417
  chartConfig: t,
2399
2418
  height: n = 300
@@ -2435,23 +2454,23 @@ function ar({
2435
2454
  "td",
2436
2455
  {
2437
2456
  className: "px-3 py-2 whitespace-nowrap text-sm text-dc-text",
2438
- children: Bn(l[d])
2457
+ children: Wn(l[d])
2439
2458
  },
2440
2459
  d
2441
2460
  )) }, o)) })
2442
2461
  ] }) });
2443
2462
  }
2444
- function Bn(e) {
2463
+ function Wn(e) {
2445
2464
  return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "Yes" : "No" : String(e);
2446
2465
  }
2447
- function lr(e) {
2448
- const t = Kn(e);
2466
+ function cr(e) {
2467
+ const t = Cn(e);
2449
2468
  return {
2450
2469
  portlets: e,
2451
2470
  layouts: t
2452
2471
  };
2453
2472
  }
2454
- function Kn(e) {
2473
+ function Cn(e) {
2455
2474
  const t = e.map((n) => ({
2456
2475
  i: n.id,
2457
2476
  x: n.x,
@@ -2469,7 +2488,7 @@ function Kn(e) {
2469
2488
  xxs: t.map((n) => ({ ...n, w: 2 }))
2470
2489
  };
2471
2490
  }
2472
- function or(e, t = {}) {
2491
+ function dr(e, t = {}) {
2473
2492
  const { formatNumbers: n = !0, precision: r = 2 } = t;
2474
2493
  return n ? e.map((i) => {
2475
2494
  const a = {};
@@ -2478,13 +2497,13 @@ function or(e, t = {}) {
2478
2497
  return a;
2479
2498
  }) : e;
2480
2499
  }
2481
- function cr() {
2500
+ function ur() {
2482
2501
  return `portlet-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2483
2502
  }
2484
- function dr(e, t = 6, n = 4) {
2503
+ function fr(e, t = 6, n = 4) {
2485
2504
  return e.length === 0 ? { x: 0, y: 0 } : { x: 0, y: Math.max(...e.map((i) => i.y + i.h)) };
2486
2505
  }
2487
- function ur(e) {
2506
+ function mr(e) {
2488
2507
  try {
2489
2508
  const t = JSON.parse(e);
2490
2509
  return typeof t != "object" || t === null ? { valid: !1, error: "Query must be a JSON object" } : !t.measures && !t.dimensions ? { valid: !1, error: "Query must have at least measures or dimensions" } : { valid: !0, query: t };
@@ -2492,7 +2511,7 @@ function ur(e) {
2492
2511
  return { valid: !1, error: "Invalid JSON format" };
2493
2512
  }
2494
2513
  }
2495
- function fr() {
2514
+ function xr() {
2496
2515
  return {
2497
2516
  title: "Sample Chart",
2498
2517
  query: JSON.stringify({
@@ -2516,45 +2535,46 @@ function fr() {
2516
2535
  };
2517
2536
  }
2518
2537
  export {
2519
- er as A,
2520
- Jn as B,
2538
+ nr as A,
2539
+ er as B,
2521
2540
  we as C,
2522
- ar as D,
2523
- dr as E,
2524
- ur as F,
2525
- fr as G,
2526
- Ue as H,
2527
- Pn as L,
2528
- _t as N,
2529
- tr as P,
2530
- rr as R,
2531
- nr as S,
2532
- sr as T,
2533
- ir as a,
2534
- Pe as b,
2535
- lr as c,
2536
- Nn as d,
2537
- ie as e,
2538
- or as f,
2539
- _n as g,
2540
- _e as h,
2541
+ or as D,
2542
+ ur as E,
2543
+ fr as F,
2544
+ mr as G,
2545
+ xr as H,
2546
+ qe as I,
2547
+ Ue as L,
2548
+ Gt as N,
2549
+ rr as P,
2550
+ sr as R,
2551
+ ir as S,
2552
+ lr as T,
2553
+ tr as a,
2554
+ ar as b,
2555
+ cr as c,
2556
+ et as d,
2557
+ An as e,
2558
+ dr as f,
2559
+ ie as g,
2560
+ Gn as h,
2541
2561
  ye as i,
2542
- J as j,
2543
- O as k,
2544
- gt as l,
2545
- R as m,
2546
- ke as n,
2547
- qn as o,
2562
+ _e as j,
2563
+ J as k,
2564
+ vt as l,
2565
+ O as m,
2566
+ R as n,
2567
+ ke as o,
2548
2568
  te as p,
2549
- vt as q,
2550
- oe as r,
2551
- pt as s,
2552
- Hn as t,
2553
- j as u,
2554
- ze as v,
2555
- Zn as w,
2556
- Qn as x,
2557
- Kn as y,
2558
- cr as z
2569
+ Kn as q,
2570
+ bt as r,
2571
+ oe as s,
2572
+ Un as t,
2573
+ gt as u,
2574
+ E as v,
2575
+ je as w,
2576
+ Pn as x,
2577
+ Jn as y,
2578
+ Cn as z
2559
2579
  };
2560
- //# sourceMappingURL=charts-BvRqT6o9.js.map
2580
+ //# sourceMappingURL=charts-jwgcWeFt.js.map