@pstdio/ui 0.21.0 → 0.22.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 (111) hide show
  1. package/dist/{MermaidComponent-BVMyKttu.js → MermaidComponent-D92GMhht.js} +3 -3
  2. package/dist/{MermaidComponent-BVMyKttu.js.map → MermaidComponent-D92GMhht.js.map} +1 -1
  3. package/dist/chat-ui.d.ts +2 -0
  4. package/dist/chat-ui.js +2 -2
  5. package/dist/components/data-table/build-columns.d.ts +1 -0
  6. package/dist/components/data-table/data-table-column-menu.d.ts +2 -0
  7. package/dist/components/data-table/data-table-row-display.d.ts +11 -0
  8. package/dist/components/data-table/data-table-table-parts.d.ts +1 -0
  9. package/dist/components/data-table/edit-mode-data-table-body.d.ts +1 -0
  10. package/dist/components/data-table/edit-mode-data-table-cell.d.ts +1 -0
  11. package/dist/components/data-table/edit-mode-data-table-header.d.ts +1 -0
  12. package/dist/components/diff-viewer/code-editor.d.ts +8 -2
  13. package/dist/components/kanban-renderer/collection-badge.d.ts +7 -0
  14. package/dist/components/kanban-renderer/index.d.ts +1 -1
  15. package/dist/components/kanban-renderer/kanban-renderer-helpers.d.ts +2 -1
  16. package/dist/components/kanban-renderer/types.d.ts +20 -1
  17. package/dist/components/list-row/list-row-content.d.ts +1 -0
  18. package/dist/components/param-editor/param-editor-presentation.d.ts +1 -1
  19. package/dist/components/param-editor/param-editor.types.d.ts +5 -193
  20. package/dist/components/rich-text/shared/markdown-ast.d.ts +1 -0
  21. package/dist/components/rich-text/shared/markdown-source-document.d.ts +7 -0
  22. package/dist/components/rich-text/shared/markdown-source-links.d.ts +11 -0
  23. package/dist/components/rich-text/shared/markdown-source-map.d.ts +10 -0
  24. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  25. package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
  26. package/dist/components/tag-editor/tag-editor.types.d.ts +12 -0
  27. package/dist/components/tag-editor/tag-settings-panel.d.ts +1 -1
  28. package/dist/components/tree-list/tree-list-drag-provider.d.ts +13 -0
  29. package/dist/components/tree-list/tree-list-order.store.d.ts +4 -1
  30. package/dist/components/tree-list/tree-list-reorder.d.ts +14 -3
  31. package/dist/components/tree-list/tree-list-sortable.d.ts +2 -0
  32. package/dist/components/tree-list/tree-list-visibility-filter.d.ts +2 -2
  33. package/dist/components/tree-list/tree-list.d.ts +3 -0
  34. package/dist/components/tree-list/tree-list.types.d.ts +4 -0
  35. package/dist/data-table.d.ts +2 -0
  36. package/dist/data-table.js +806 -793
  37. package/dist/data-table.js.map +1 -1
  38. package/dist/diff.d.ts +2 -0
  39. package/dist/diff.js +529 -533
  40. package/dist/diff.js.map +1 -1
  41. package/dist/edit-mode-data-table-DGgRuSW3.js +846 -0
  42. package/dist/edit-mode-data-table-DGgRuSW3.js.map +1 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.js +1516 -1413
  45. package/dist/index.js.map +1 -1
  46. package/dist/{kanban-renderer-toolbar-CpegGbwq.js → kanban-renderer-toolbar-Bl8xXdwU.js} +527 -469
  47. package/dist/kanban-renderer-toolbar-Bl8xXdwU.js.map +1 -0
  48. package/dist/kanban-renderer.d.ts +2 -0
  49. package/dist/kanban-renderer.js +21 -21
  50. package/dist/kanban-renderer.js.map +1 -1
  51. package/dist/lazy-markdown-editor-CCOchoJX.js +235 -0
  52. package/dist/lazy-markdown-editor-CCOchoJX.js.map +1 -0
  53. package/dist/list-row-DCgdza1i.js +812 -0
  54. package/dist/list-row-DCgdza1i.js.map +1 -0
  55. package/dist/markdown-CASvn1Z2.js +1643 -0
  56. package/dist/markdown-CASvn1Z2.js.map +1 -0
  57. package/dist/markdown-editor-C4GCyebp.js +1019 -0
  58. package/dist/markdown-editor-C4GCyebp.js.map +1 -0
  59. package/dist/{mermaid-renderer-H3IhLqnQ.js → mermaid-renderer-CVnuKs-A.js} +2 -2
  60. package/dist/{mermaid-renderer-H3IhLqnQ.js.map → mermaid-renderer-CVnuKs-A.js.map} +1 -1
  61. package/dist/mermaid.d.ts +2 -0
  62. package/dist/mermaid.js +1 -1
  63. package/dist/monaco-browser-CgvlArN7.js +21 -0
  64. package/dist/monaco-browser-CgvlArN7.js.map +1 -0
  65. package/dist/{param-editor-B8Ff9Nm8.js → param-editor-CkDq623X.js} +2 -2
  66. package/dist/{param-editor-B8Ff9Nm8.js.map → param-editor-CkDq623X.js.map} +1 -1
  67. package/dist/param-editor-field-DRgbnL7-.js +2809 -0
  68. package/dist/param-editor-field-DRgbnL7-.js.map +1 -0
  69. package/dist/rich-message-DARuDVOX.js +628 -0
  70. package/dist/{rich-message-DdFYRzTo.js.map → rich-message-DARuDVOX.js.map} +1 -1
  71. package/dist/rich-text.d.ts +2 -0
  72. package/dist/rich-text.js +48 -47
  73. package/dist/rich-text.js.map +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/terminal.d.ts +2 -0
  76. package/dist/theme/primitives/sizes.d.ts +9 -0
  77. package/dist/{theme-BH4fSst9.js → theme-B-l5_a6F.js} +69 -50
  78. package/dist/theme-B-l5_a6F.js.map +1 -0
  79. package/dist/theme-preference-Bpobguh4.js +114 -0
  80. package/dist/theme-preference-Bpobguh4.js.map +1 -0
  81. package/dist/theme.d.ts +2 -0
  82. package/dist/theme.js +1 -1
  83. package/dist/tree-list-AlO5ZmxQ.js +1262 -0
  84. package/dist/tree-list-AlO5ZmxQ.js.map +1 -0
  85. package/dist/utils/theme-preference.d.ts +4 -1
  86. package/dist/workspace-badge-BR_GgsAG.js +175 -0
  87. package/dist/workspace-badge-BR_GgsAG.js.map +1 -0
  88. package/package.json +5 -42
  89. package/dist/dialog-accept-shortcut-DAEBsoWW.js +0 -7
  90. package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +0 -1
  91. package/dist/edit-mode-data-table-D6NeiDJx.js +0 -775
  92. package/dist/edit-mode-data-table-D6NeiDJx.js.map +0 -1
  93. package/dist/editor-config-D9OksZ93.js +0 -2416
  94. package/dist/editor-config-D9OksZ93.js.map +0 -1
  95. package/dist/kanban-renderer-toolbar-CpegGbwq.js.map +0 -1
  96. package/dist/lazy-markdown-editor-B7uP2ALS.js +0 -26
  97. package/dist/lazy-markdown-editor-B7uP2ALS.js.map +0 -1
  98. package/dist/list-row-9oxy-F0v.js +0 -796
  99. package/dist/list-row-9oxy-F0v.js.map +0 -1
  100. package/dist/monaco-browser-CO0NxK_Z.js +0 -19
  101. package/dist/monaco-browser-CO0NxK_Z.js.map +0 -1
  102. package/dist/number-input-WUfejtNx.js +0 -343
  103. package/dist/number-input-WUfejtNx.js.map +0 -1
  104. package/dist/param-editor-field-Cu4pto_a.js +0 -2845
  105. package/dist/param-editor-field-Cu4pto_a.js.map +0 -1
  106. package/dist/rich-message-DdFYRzTo.js +0 -658
  107. package/dist/theme-BH4fSst9.js.map +0 -1
  108. package/dist/theme-preference-DyymrYpR.js +0 -123
  109. package/dist/theme-preference-DyymrYpR.js.map +0 -1
  110. package/dist/tree-list-uV4UFj0x.js +0 -1116
  111. package/dist/tree-list-uV4UFj0x.js.map +0 -1
@@ -1,613 +1,623 @@
1
- import { jsx as a, jsxs as _, Fragment as st } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as _, Fragment as ct } from "react/jsx-runtime";
2
2
  import { c as z } from "react/compiler-runtime";
3
- import { Text as O, Popover as Q, HStack as je, Portal as ce, Image as at, Button as ct, chakra as ie, Icon as Y, Menu as X, IconButton as Se, Stack as ke, Box as oe, Table as L, Flex as ee, Skeleton as Ee } from "@chakra-ui/react";
4
- import { flexRender as he, useReactTable as dt, getPaginationRowModel as ut, getCoreRowModel as mt, getSortedRowModel as ft } from "@tanstack/react-table";
5
- import { isValidElement as Be, cloneElement as gt, useRef as _e, useState as Z, useEffect as We, Fragment as ht } from "react";
6
- import { S as xe, T as Fe } from "./browser-storage-DPtOQJx0.js";
7
- import { u as bt } from "./kanban-renderer-toolbar-CpegGbwq.js";
8
- import { Braces as pt, ChevronRight as St, CircleHelp as xt, Minus as wt, Check as we, ChevronDown as yt, Settings2 as Ct, GripVertical as vt, ArrowUpAZ as Ke, ArrowDownAZ as Je, MoreVertical as Rt } from "lucide-react";
9
- import { C as ye } from "./number-input-WUfejtNx.js";
10
- import { L as se, S as It, R as At } from "./list-row-9oxy-F0v.js";
11
- import { c as ne, g as $t, i as Xe, f as kt, E as _t, r as zt, a as ze, s as Tt, b as Dt, d as Vt, e as Mt, h as Pt, j as Ht, k as Lt, l as Ot, m as Nt, D as jt, n as Et, S as Bt, P as Wt } from "./edit-mode-data-table-D6NeiDJx.js";
12
- import { P as Ft } from "./param-editor-B8Ff9Nm8.js";
13
- import { useSensors as Kt, useSensor as Jt, PointerSensor as Xt, DndContext as qt, closestCenter as Gt } from "@dnd-kit/core";
14
- import { SortableContext as Ut, verticalListSortingStrategy as Yt, useSortable as Zt } from "@dnd-kit/sortable";
15
- import { CSS as Qt } from "@dnd-kit/utilities";
16
- import { b as el } from "./param-editor-field-Cu4pto_a.js";
17
- import { useChart as tl, Chart as Te } from "@chakra-ui/charts";
18
- import { XAxis as ll, YAxis as ol, Bar as nl, Tooltip as rl, BarChart as il, useActiveTooltipCoordinate as sl, usePlotArea as al } from "recharts";
19
- const qe = (l, e) => e.find((t) => Object.is(t.value, l))?.color ?? null, cl = (l) => {
3
+ import { Text as O, Popover as te, HStack as Ee, Portal as ue, Image as dt, Button as ut, chakra as ae, Icon as ee, Menu as G, IconButton as we, Stack as ze, Box as re, Table as L, Flex as oe, Skeleton as Be } from "@chakra-ui/react";
4
+ import { flexRender as be, useReactTable as mt, getPaginationRowModel as ft, getCoreRowModel as ht, getSortedRowModel as gt } from "@tanstack/react-table";
5
+ import { isValidElement as Fe, cloneElement as bt, useRef as Te, useState as Q, useEffect as Ke, Fragment as pt } from "react";
6
+ import { S as xe, T as Je } from "./browser-storage-DPtOQJx0.js";
7
+ import { u as St } from "./kanban-renderer-toolbar-Bl8xXdwU.js";
8
+ import { Braces as wt, ChevronRight as xt, CircleHelp as yt, Minus as Ct, Check as ye, ChevronDown as vt, Settings2 as Rt, GripVertical as It, ArrowUpAZ as Xe, ArrowDownAZ as qe, MoreVertical as At } from "lucide-react";
9
+ import { C as Ce, S as $t } from "./lazy-markdown-editor-CCOchoJX.js";
10
+ import { L as ce, S as _t, R as kt } from "./list-row-DCgdza1i.js";
11
+ import { c as ie, g as zt, i as Ge, f as Tt, D as Dt, E as Vt, r as Mt, a as De, s as Pt, b as Ht, d as Lt, e as Ot, h as Wt, j as Nt, k as jt, l as Et, m as Bt, n as Ft, o as Kt, S as Jt, P as Xt } from "./edit-mode-data-table-DGgRuSW3.js";
12
+ import { P as qt } from "./param-editor-CkDq623X.js";
13
+ import { useSensors as Gt, useSensor as Ut, PointerSensor as Yt, DndContext as Zt, closestCenter as Qt } from "@dnd-kit/core";
14
+ import { SortableContext as eo, verticalListSortingStrategy as to, useSortable as oo } from "@dnd-kit/sortable";
15
+ import { CSS as lo } from "@dnd-kit/utilities";
16
+ import { useChart as no, Chart as Ve } from "@chakra-ui/charts";
17
+ import { XAxis as ro, YAxis as io, Bar as so, Tooltip as ao, BarChart as co, useActiveTooltipCoordinate as uo, usePlotArea as mo } from "recharts";
18
+ const Ue = (o, e) => e.find((t) => Object.is(t.value, o))?.color ?? null, fo = (o) => {
20
19
  const {
21
20
  children: e
22
- } = l;
21
+ } = o;
23
22
  return e;
24
- }, dl = "#111827", ul = "#ffffff", ml = "#000000", fl = 4.5, gl = (l) => l.split("").map((e) => e + e).join(""), le = (l) => {
25
- const e = l.trim(), t = e.startsWith("#") ? e.slice(1) : e, o = t.length === 3 ? gl(t) : t;
26
- return /^[\da-f]{6}$/i.test(o) ? {
27
- r: Number.parseInt(o.slice(0, 2), 16),
28
- g: Number.parseInt(o.slice(2, 4), 16),
29
- b: Number.parseInt(o.slice(4, 6), 16)
23
+ }, ho = "#111827", go = "#ffffff", bo = "#000000", po = 4.5, So = (o) => o.split("").map((e) => e + e).join(""), ne = (o) => {
24
+ const e = o.trim(), t = e.startsWith("#") ? e.slice(1) : e, l = t.length === 3 ? So(t) : t;
25
+ return /^[\da-f]{6}$/i.test(l) ? {
26
+ r: Number.parseInt(l.slice(0, 2), 16),
27
+ g: Number.parseInt(l.slice(2, 4), 16),
28
+ b: Number.parseInt(l.slice(4, 6), 16)
30
29
  } : null;
31
- }, fe = (l) => {
32
- const e = l / 255;
30
+ }, he = (o) => {
31
+ const e = o / 255;
33
32
  return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
34
- }, De = (l) => 0.2126 * fe(l.r) + 0.7152 * fe(l.g) + 0.0722 * fe(l.b), hl = (l, e) => {
35
- const t = De(l), o = De(e), n = Math.max(t, o), r = Math.min(t, o);
36
- return (n + 0.05) / (r + 0.05);
37
- }, be = (l) => {
33
+ }, Me = (o) => 0.2126 * he(o.r) + 0.7152 * he(o.g) + 0.0722 * he(o.b), wo = (o, e) => {
34
+ const t = Me(o), l = Me(e), n = Math.max(t, l), i = Math.min(t, l);
35
+ return (n + 0.05) / (i + 0.05);
36
+ }, pe = (o) => {
38
37
  const e = (t) => Math.round(t).toString(16).padStart(2, "0");
39
- return `#${e(l.r)}${e(l.g)}${e(l.b)}`;
40
- }, Ge = (l, e, t) => ({
41
- r: l.r * (1 - t) + e.r * t,
42
- g: l.g * (1 - t) + e.g * t,
43
- b: l.b * (1 - t) + e.b * t
44
- }), Ve = (l, e) => {
38
+ return `#${e(o.r)}${e(o.g)}${e(o.b)}`;
39
+ }, Ye = (o, e, t) => ({
40
+ r: o.r * (1 - t) + e.r * t,
41
+ g: o.g * (1 - t) + e.g * t,
42
+ b: o.b * (1 - t) + e.b * t
43
+ }), Pe = (o, e) => {
45
44
  for (let t = 1; t <= 50; t += 1) {
46
- const o = Ge(l, e, t / 50);
47
- if (hl(o, l) >= fl)
45
+ const l = Ye(o, e, t / 50);
46
+ if (wo(l, o) >= po)
48
47
  return {
49
- color: be(o),
48
+ color: pe(l),
50
49
  step: t
51
50
  };
52
51
  }
53
52
  return {
54
- color: be(e),
53
+ color: pe(e),
55
54
  step: 50
56
55
  };
57
- }, Me = (l) => {
58
- const e = le(l);
59
- if (!e) return dl;
60
- const t = le(ml), o = le(ul), n = Ve(e, t), r = Ve(e, o);
61
- return n.step <= r.step ? n.color : r.color;
62
- }, bl = (l, e, t) => {
63
- const o = le(l), n = le(e);
64
- return !o || !n ? null : be(Ge(o, n, 1 - t));
65
- }, Pe = (l) => {
66
- const e = l.foreground?.light ?? Me(l.light), t = l.foreground?.dark ?? Me(l.dark);
56
+ }, He = (o) => {
57
+ const e = ne(o);
58
+ if (!e) return ho;
59
+ const t = ne(bo), l = ne(go), n = Pe(e, t), i = Pe(e, l);
60
+ return n.step <= i.step ? n.color : i.color;
61
+ }, xo = (o, e, t) => {
62
+ const l = ne(o), n = ne(e);
63
+ return !l || !n ? null : pe(Ye(l, n, 1 - t));
64
+ }, Le = (o) => {
65
+ const e = o.foreground?.light ?? He(o.light), t = o.foreground?.dark ?? He(o.dark);
67
66
  return {
68
- backgroundColor: `light-dark(${l.light}, ${l.dark})`,
67
+ backgroundColor: `light-dark(${o.light}, ${o.dark})`,
69
68
  color: `light-dark(${e}, ${t})`
70
69
  };
71
- }, pl = (l) => Math.round(l * 100) / 100, re = (l, e, t) => {
72
- const o = bl(l, e, t);
73
- return o || `color-mix(in srgb, ${l} ${pl(t * 100)}%, ${e})`;
74
- }, Sl = (l, e, t) => {
75
- const o = l.foreground && e.foreground ? {
76
- light: re(l.foreground.light, e.foreground.light, t),
77
- dark: re(l.foreground.dark, e.foreground.dark, t)
70
+ }, yo = (o) => Math.round(o * 100) / 100, se = (o, e, t) => {
71
+ const l = xo(o, e, t);
72
+ return l || `color-mix(in srgb, ${o} ${yo(t * 100)}%, ${e})`;
73
+ }, Co = (o, e, t) => {
74
+ const l = o.foreground && e.foreground ? {
75
+ light: se(o.foreground.light, e.foreground.light, t),
76
+ dark: se(o.foreground.dark, e.foreground.dark, t)
78
77
  } : void 0;
79
78
  return {
80
- light: re(l.light, e.light, t),
81
- dark: re(l.dark, e.dark, t),
82
- ...o ? {
83
- foreground: o
79
+ light: se(o.light, e.light, t),
80
+ dark: se(o.dark, e.dark, t),
81
+ ...l ? {
82
+ foreground: l
84
83
  } : {}
85
84
  };
86
- }, Ue = (l, e) => {
87
- if (typeof l != "number" || !Number.isFinite(l) || e.length < 2) return null;
88
- const t = e[0], o = e[e.length - 1];
89
- if (o.value - t.value <= 0) return null;
90
- if (l <= t.value) return t.color;
91
- if (l >= o.value) return o.color;
92
- const r = e.findIndex((m) => l <= m.value), c = e[r - 1], i = e[r], d = 1 - (l - c.value) / (i.value - c.value);
93
- return Sl(c.color, i.color, d);
94
- }, xl = (l) => {
85
+ }, Ze = (o, e) => {
86
+ if (typeof o != "number" || !Number.isFinite(o) || e.length < 2) return null;
87
+ const t = e[0], l = e[e.length - 1];
88
+ if (l.value - t.value <= 0) return null;
89
+ if (o <= t.value) return t.color;
90
+ if (o >= l.value) return l.color;
91
+ const i = e.findIndex((u) => o <= u.value), c = e[i - 1], s = e[i], d = 1 - (o - c.value) / (s.value - c.value);
92
+ return Co(c.color, s.color, d);
93
+ }, vo = (o) => {
95
94
  const e = z(2), {
96
95
  value: t
97
- } = l;
98
- let o;
99
- return e[0] !== t ? (o = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = o) : o = e[1], o;
100
- }, wl = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, yl = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Cl = (l) => {
101
- const e = l.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
96
+ } = o;
97
+ let l;
98
+ return e[0] !== t ? (l = /* @__PURE__ */ a(O, { textStyle: "paragraph/S/medium", fontVariantNumeric: "tabular-nums", truncate: !0, children: t }), e[0] = t, e[1] = l) : l = e[1], l;
99
+ }, Ro = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, Io = /(^|\s)(avatar|image|logo|photo|picture|thumbnail)(\s|$)/i, Ao = (o) => {
100
+ const e = o.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().toLowerCase();
102
101
  return e ? `${e[0]?.toUpperCase()}${e.slice(1)}` : "Details";
103
- }, ge = (l) => l.map((e) => /^\d+$/.test(e) ? e : Cl(e)).join(" / "), vl = (l) => l.every((e) => e === null || typeof e != "object"), pe = (l, e, t) => {
104
- if (Array.isArray(l)) {
105
- if (l.length === 0 || vl(l)) {
102
+ }, ge = (o) => o.map((e) => /^\d+$/.test(e) ? e : Ao(e)).join(" / "), $o = (o) => o.every((e) => e === null || typeof e != "object"), Se = (o, e, t) => {
103
+ if (Array.isArray(o)) {
104
+ if (o.length === 0 || $o(o)) {
106
105
  t.push({
107
106
  label: ge(e),
108
- value: l
107
+ value: o
109
108
  });
110
109
  return;
111
110
  }
112
- l.forEach((o, n) => {
113
- pe(o, [...e, String(n + 1)], t);
111
+ o.forEach((l, n) => {
112
+ Se(l, [...e, String(n + 1)], t);
114
113
  });
115
114
  return;
116
115
  }
117
- if (l !== null && typeof l == "object") {
118
- const o = Object.entries(l);
119
- if (o.length === 0) {
116
+ if (o !== null && typeof o == "object") {
117
+ const l = Object.entries(o);
118
+ if (l.length === 0) {
120
119
  t.push({
121
120
  label: ge(e),
122
121
  value: null
123
122
  });
124
123
  return;
125
124
  }
126
- o.forEach(([n, r]) => {
127
- pe(r, [...e, n], t);
125
+ l.forEach(([n, i]) => {
126
+ Se(i, [...e, n], t);
128
127
  });
129
128
  return;
130
129
  }
131
130
  t.push({
132
131
  label: ge(e),
133
- value: l
132
+ value: o
134
133
  });
135
- }, Ye = (l) => {
136
- if (typeof l != "string") return l;
134
+ }, Qe = (o) => {
135
+ if (typeof o != "string") return o;
137
136
  try {
138
- return JSON.parse(l);
137
+ return JSON.parse(o);
139
138
  } catch {
140
- return l;
139
+ return o;
141
140
  }
142
- }, Ce = (l) => {
141
+ }, ve = (o) => {
143
142
  const e = [];
144
- return pe(Ye(l), [], e), e.map((t) => ({
143
+ return Se(Qe(o), [], e), e.map((t) => ({
145
144
  ...t,
146
145
  label: t.label || "Value"
147
146
  }));
148
- }, de = (l, e) => {
149
- if (typeof l != "string") return !1;
150
- if (l.startsWith("data:image/")) return !0;
147
+ }, me = (o, e) => {
148
+ if (typeof o != "string") return !1;
149
+ if (o.startsWith("data:image/")) return !0;
151
150
  try {
152
- const t = new URL(l);
153
- return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : wl.test(t.pathname) || yl.test(e);
151
+ const t = new URL(o);
152
+ return t.protocol !== "http:" && t.protocol !== "https:" ? !1 : Ro.test(t.pathname) || Io.test(e);
154
153
  } catch {
155
154
  return !1;
156
155
  }
157
- }, ve = (l, e) => Array.isArray(l) && l.length > 0 && l.every((t) => de(t, e)), He = (l) => l == null || l === "" ? "Not provided" : typeof l == "boolean" ? l ? "Yes" : "No" : String(l), Rl = (l) => Array.isArray(l) ? l.length === 0 ? "None" : l.map(He).join(", ") : He(l), Il = (l) => {
158
- const e = Ye(l);
156
+ }, Re = (o, e) => Array.isArray(o) && o.length > 0 && o.every((t) => me(t, e)), Oe = (o) => o == null || o === "" ? "Not provided" : typeof o == "boolean" ? o ? "Yes" : "No" : String(o), _o = (o) => Array.isArray(o) ? o.length === 0 ? "None" : o.map(Oe).join(", ") : Oe(o), ko = (o) => {
157
+ const e = Qe(o);
159
158
  if (Array.isArray(e) && e.length === 0 || e !== null && typeof e == "object" && Object.keys(e).length === 0)
160
159
  return "No details";
161
- const t = Ce(l).filter((r) => !de(r.value, r.label) && !ve(r.value, r.label));
160
+ const t = ve(o).filter((i) => !me(i.value, i.label) && !Re(i.value, i.label));
162
161
  if (t.length === 0) return "No details";
163
- const o = t.slice(0, 2).map((r) => Rl(r.value)), n = t.length - o.length;
164
- return [...o, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
165
- }, Al = (l) => {
162
+ const l = t.slice(0, 2).map((i) => _o(i.value)), n = t.length - l.length;
163
+ return [...l, n > 0 ? `${n} more` : null].filter(Boolean).join(" · ");
164
+ }, zo = (o) => {
166
165
  const {
167
166
  label: e,
168
167
  value: t
169
- } = l;
170
- return de(t, e) ? {
168
+ } = o;
169
+ return me(t, e) ? {
171
170
  type: "image",
172
171
  src: String(t),
173
172
  alt: `${e} preview`
174
- } : Array.isArray(t) && ve(t, e) ? {
173
+ } : Array.isArray(t) && Re(t, e) ? {
175
174
  type: "image-gallery",
176
- images: t.map((o, n) => ({
177
- src: String(o),
175
+ images: t.map((l, n) => ({
176
+ src: String(l),
178
177
  alt: `${e} ${n + 1} preview`
179
178
  }))
180
179
  } : Array.isArray(t) ? t : t === void 0 ? null : t;
181
- }, $l = (l) => Ce(l).map((e, t) => ({
180
+ }, To = (o) => ve(o).map((e, t) => ({
182
181
  id: `friendly-json-${t}`,
183
182
  name: e.label,
184
183
  type: "readOnly",
185
- value: Al(e)
186
- })), kl = (l) => {
184
+ value: zo(e)
185
+ })), Do = (o) => {
187
186
  const e = z(4), {
188
187
  value: t
189
- } = l;
190
- let o;
191
- e[0] !== t ? (o = $l(t), e[0] = t, e[1] = o) : o = e[1];
188
+ } = o;
189
+ let l;
190
+ e[0] !== t ? (l = To(t), e[0] = t, e[1] = l) : l = e[1];
192
191
  let n;
193
- return e[2] !== o ? (n = /* @__PURE__ */ a(Ft, { params: o, readOnly: !0, fullWidth: !0 }), e[2] = o, e[3] = n) : n = e[3], n;
194
- }, _l = (l) => l.stopPropagation(), zl = (l) => {
192
+ return e[2] !== l ? (n = /* @__PURE__ */ a(qt, { params: l, readOnly: !0, fullWidth: !0 }), e[2] = l, e[3] = n) : n = e[3], n;
193
+ }, Vo = (o) => o.stopPropagation(), Mo = (o) => {
195
194
  const e = z(49), {
196
195
  columnLabel: t,
197
- value: o
198
- } = l;
199
- let n, r, c, i, s, d, m, u, f, g, p, b, h, x, w, y;
200
- if (e[0] !== t || e[1] !== o) {
201
- const M = Ce(o).flatMap(Tl).slice(0, 2);
202
- let P;
203
- e[18] !== o ? (P = Il(o), e[18] = o, e[19] = P) : P = e[19], i = P, c = Q.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
196
+ value: l
197
+ } = o;
198
+ let n, i, c, s, r, d, u, m, f, h, S, b, x, g, v, w;
199
+ if (e[0] !== t || e[1] !== l) {
200
+ const M = ve(l).flatMap(Po).slice(0, 2);
201
+ let D;
202
+ e[18] !== l ? (D = ko(l), e[18] = l, e[19] = D) : D = e[19], s = D, c = te.Root, e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
204
203
  placement: "bottom-start",
205
204
  offset: {
206
205
  mainAxis: 6
207
206
  }
208
- }, e[20] = u) : u = e[20], r = Q.Trigger, m = !0, n = ct, s = `View ${t} details`, d = "ghost", f = "xs", g = "full", p = "0", b = "28px", h = "2xs", x = "flex-start", w = _l, y = M.length > 0 ? /* @__PURE__ */ a(je, { gap: "-1", flexShrink: "0", children: M.map(Dl) }) : /* @__PURE__ */ a(pt, { size: 14 }), e[0] = t, e[1] = o, e[2] = n, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = p, e[13] = b, e[14] = h, e[15] = x, e[16] = w, e[17] = y;
207
+ }, e[20] = m) : m = e[20], i = te.Trigger, u = !0, n = ut, r = `View ${t} details`, d = "ghost", f = "xs", h = "full", S = "0", b = "28px", x = "2xs", g = "flex-start", v = Vo, w = M.length > 0 ? /* @__PURE__ */ a(Ee, { gap: "-1", flexShrink: "0", children: M.map(Ho) }) : /* @__PURE__ */ a(wt, { size: 14 }), e[0] = t, e[1] = l, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v, e[17] = w;
209
208
  } else
210
- n = e[2], r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], p = e[12], b = e[13], h = e[14], x = e[15], w = e[16], y = e[17];
209
+ n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16], w = e[17];
210
+ let p;
211
+ e[21] !== s ? (p = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: s }), e[21] = s, e[22] = p) : p = e[22];
212
+ let R;
213
+ e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ a(xt, { size: 12 }), e[23] = R) : R = e[23];
211
214
  let C;
212
- e[21] !== i ? (C = /* @__PURE__ */ a(O, { flex: "1", minWidth: "0", textAlign: "left", textStyle: "paragraph/S/regular", truncate: !0, children: i }), e[21] = i, e[22] = C) : C = e[22];
213
- let v;
214
- e[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ a(St, { size: 12 }), e[23] = v) : v = e[23];
215
- let S;
216
- e[24] !== n || e[25] !== s || e[26] !== d || e[27] !== C || e[28] !== f || e[29] !== g || e[30] !== p || e[31] !== b || e[32] !== h || e[33] !== x || e[34] !== w || e[35] !== y ? (S = /* @__PURE__ */ _(n, { "aria-label": s, variant: d, size: f, width: g, minWidth: p, height: b, paddingX: h, justifyContent: x, onClick: w, children: [
217
- y,
218
- C,
219
- v
220
- ] }), e[24] = n, e[25] = s, e[26] = d, e[27] = C, e[28] = f, e[29] = g, e[30] = p, e[31] = b, e[32] = h, e[33] = x, e[34] = w, e[35] = y, e[36] = S) : S = e[36];
221
- let I;
222
- e[37] !== r || e[38] !== m || e[39] !== S ? (I = /* @__PURE__ */ a(r, { asChild: m, children: S }), e[37] = r, e[38] = m, e[39] = S, e[40] = I) : I = e[40];
215
+ e[24] !== n || e[25] !== r || e[26] !== d || e[27] !== p || e[28] !== f || e[29] !== h || e[30] !== S || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v || e[35] !== w ? (C = /* @__PURE__ */ _(n, { "aria-label": r, variant: d, size: f, width: h, minWidth: S, height: b, paddingX: x, justifyContent: g, onClick: v, children: [
216
+ w,
217
+ p,
218
+ R
219
+ ] }), e[24] = n, e[25] = r, e[26] = d, e[27] = p, e[28] = f, e[29] = h, e[30] = S, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = w, e[36] = C) : C = e[36];
220
+ let y;
221
+ e[37] !== i || e[38] !== u || e[39] !== C ? (y = /* @__PURE__ */ a(i, { asChild: u, children: C }), e[37] = i, e[38] = u, e[39] = C, e[40] = y) : y = e[40];
223
222
  let A;
224
223
  e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = {
225
224
  overscrollBehavior: "contain"
226
225
  }, e[41] = A) : A = e[41];
227
226
  let $;
228
- e[42] !== o ? ($ = /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(Q.Positioner, { children: /* @__PURE__ */ a(Q.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(kl, { value: o }) }) }) }) }), e[42] = o, e[43] = $) : $ = e[43];
229
- let D;
230
- return e[44] !== c || e[45] !== u || e[46] !== I || e[47] !== $ ? (D = /* @__PURE__ */ _(c, { positioning: u, children: [
231
- I,
227
+ e[42] !== l ? ($ = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { width: "min(380px, calc(100vw - 32px))", padding: "0", background: "bg", overflow: "hidden", children: /* @__PURE__ */ a(xe, { maxH: "360px", viewportProps: A, children: /* @__PURE__ */ a(Do, { value: l }) }) }) }) }), e[42] = l, e[43] = $) : $ = e[43];
228
+ let T;
229
+ return e[44] !== c || e[45] !== m || e[46] !== y || e[47] !== $ ? (T = /* @__PURE__ */ _(c, { positioning: m, children: [
230
+ y,
232
231
  $
233
- ] }), e[44] = c, e[45] = u, e[46] = I, e[47] = $, e[48] = D) : D = e[48], D;
232
+ ] }), e[44] = c, e[45] = m, e[46] = y, e[47] = $, e[48] = T) : T = e[48], T;
234
233
  };
235
- function Tl(l) {
236
- return de(l.value, l.label) ? [l] : !Array.isArray(l.value) || !ve(l.value, l.label) ? [] : l.value.map((e, t) => ({
237
- label: `${l.label} ${t + 1}`,
234
+ function Po(o) {
235
+ return me(o.value, o.label) ? [o] : !Array.isArray(o.value) || !Re(o.value, o.label) ? [] : o.value.map((e, t) => ({
236
+ label: `${o.label} ${t + 1}`,
238
237
  value: e
239
238
  }));
240
239
  }
241
- function Dl(l) {
242
- return /* @__PURE__ */ a(at, { src: String(l.value), alt: `${l.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, l.label);
240
+ function Ho(o) {
241
+ return /* @__PURE__ */ a(dt, { src: String(o.value), alt: `${o.label} preview`, boxSize: "22px", borderRadius: "xs", borderWidth: "1px", borderColor: "border.subtle", objectFit: "cover" }, o.label);
243
242
  }
244
- const Le = (l) => Xe(l) ? l.sortValue : l, Vl = (l, e) => l === e ? 0 : l == null ? 1 : e == null ? -1 : typeof l == "number" && typeof e == "number" ? l - e : String(l).localeCompare(String(e)), Ml = (l) => Be(l) ? gt(l, {
243
+ const We = (o) => Ge(o) ? o.sortValue : o, Lo = (o, e) => o === e ? 0 : o == null ? 1 : e == null ? -1 : typeof o == "number" && typeof e == "number" ? o - e : String(o).localeCompare(String(e)), Oo = (o) => Fe(o) ? bt(o, {
245
244
  style: {
246
- ...l.props.style,
245
+ ...o.props.style,
247
246
  flexWrap: "nowrap",
248
247
  minWidth: 0,
249
248
  whiteSpace: "nowrap"
250
249
  }
251
- }) : l, ae = (l) => {
252
- l.stopPropagation();
253
- }, Pl = (l) => {
250
+ }) : o, de = (o) => {
251
+ o.stopPropagation();
252
+ }, Wo = (o) => {
254
253
  const e = z(8), {
255
254
  table: t
256
- } = l, o = t.getIsAllRowsSelected(), n = !o && t.getIsSomeRowsSelected(), r = o ? !0 : n ? "indeterminate" : !1, c = n ? wt : we;
257
- let i;
258
- e[0] !== c ? (i = /* @__PURE__ */ a(Y, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = i) : i = e[1];
255
+ } = o, l = t.getIsAllRowsSelected(), n = !l && t.getIsSomeRowsSelected(), i = l ? !0 : n ? "indeterminate" : !1, c = n ? Ct : ye;
259
256
  let s;
260
- e[2] !== t ? (s = (m) => t.toggleAllRowsSelected(m.checked === !0), e[2] = t, e[3] = s) : s = e[3];
257
+ e[0] !== c ? (s = /* @__PURE__ */ a(ee, { as: c, boxSize: "12px", strokeWidth: "3" }), e[0] = c, e[1] = s) : s = e[1];
258
+ let r;
259
+ e[2] !== t ? (r = (u) => t.toggleAllRowsSelected(u.checked === !0), e[2] = t, e[3] = r) : r = e[3];
261
260
  let d;
262
- return e[4] !== r || e[5] !== i || e[6] !== s ? (d = /* @__PURE__ */ a(ye, { checked: r, "aria-label": "Select all", icon: i, onClick: ae, onCheckedChange: s }), e[4] = r, e[5] = i, e[6] = s, e[7] = d) : d = e[7], d;
263
- }, Hl = (l) => {
261
+ return e[4] !== i || e[5] !== s || e[6] !== r ? (d = /* @__PURE__ */ a(Ce, { checked: i, "aria-label": "Select all", icon: s, onClick: de, onCheckedChange: r }), e[4] = i, e[5] = s, e[6] = r, e[7] = d) : d = e[7], d;
262
+ }, No = (o) => {
264
263
  const e = z(6), {
265
264
  row: t,
266
- selectedRowIds: o
267
- } = l, n = !!o?.[t.id];
268
- let r;
269
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ a(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[0] = r) : r = e[0];
270
- let c;
271
- e[1] !== t ? (c = (s) => t.toggleSelected(s.checked === !0), e[1] = t, e[2] = c) : c = e[2];
265
+ selectedRowIds: l
266
+ } = o, n = !!l?.[t.id];
272
267
  let i;
273
- return e[3] !== n || e[4] !== c ? (i = /* @__PURE__ */ a(ye, { checked: n, "aria-label": "Select row", icon: r, onClick: ae, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = i) : i = e[5], i;
274
- }, Ll = (l, e) => {
275
- const t = new Set(e.map((o) => o.label));
276
- return [...e, ...l.filter((o) => !t.has(o.label))];
277
- }, Ol = (l) => {
268
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[0] = i) : i = e[0];
269
+ let c;
270
+ e[1] !== t ? (c = (r) => t.toggleSelected(r.checked === !0), e[1] = t, e[2] = c) : c = e[2];
271
+ let s;
272
+ return e[3] !== n || e[4] !== c ? (s = /* @__PURE__ */ a(Ce, { checked: n, "aria-label": "Select row", icon: i, onClick: de, onCheckedChange: c }), e[3] = n, e[4] = c, e[5] = s) : s = e[5], s;
273
+ }, jo = (o, e) => {
274
+ const t = new Set(e.map((l) => l.label));
275
+ return [...e, ...o.filter((l) => !t.has(l.label))];
276
+ }, Eo = (o) => {
278
277
  const e = z(30), {
279
278
  row: t,
280
- actions: o,
279
+ actions: l,
281
280
  getActions: n
282
- } = l;
283
- let r, c, i, s, d, m, u, f, g;
284
- if (e[0] !== o || e[1] !== n || e[2] !== t) {
285
- g = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
281
+ } = o;
282
+ let i, c, s, r, d, u, m, f, h;
283
+ if (e[0] !== l || e[1] !== n || e[2] !== t) {
284
+ h = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
286
285
  e: {
287
- const w = Ll(o, n?.(t.original) ?? []);
288
- if (w.length === 0) {
289
- g = null;
286
+ const v = jo(l, n?.(t.original) ?? []);
287
+ if (v.length === 0) {
288
+ h = null;
290
289
  break e;
291
290
  }
292
- s = X.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(X.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: ae, children: /* @__PURE__ */ a(Y, { as: yt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], i = ce, c = X.Positioner, r = X.Content, d = "popover", m = "bg";
293
- let y;
294
- e[13] !== t ? (y = (C) => /* @__PURE__ */ a(X.Item, { value: C.label, asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", tone: C.destructive ? "danger" : "default", label: C.label, icon: C.icon, onClick: ae, onActivate: () => C.onSelect(t.original) }) }, C.label), e[13] = t, e[14] = y) : y = e[14], u = w.map(y);
291
+ r = G.Root, e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { "aria-label": "Row actions", size: "2xs", variant: "ghost", onClick: de, children: /* @__PURE__ */ a(ee, { as: vt, boxSize: "14px" }) }) }), e[12] = f) : f = e[12], s = ue, c = G.Positioner, i = G.Content, d = "popover", u = "bg";
292
+ let w;
293
+ e[13] !== t ? (w = (p) => /* @__PURE__ */ a(G.Item, { value: p.label, asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", tone: p.destructive ? "danger" : "default", label: p.label, icon: p.icon, onClick: de, onActivate: () => p.onSelect(t.original) }) }, p.label), e[13] = t, e[14] = w) : w = e[14], m = v.map(w);
295
294
  }
296
- e[0] = o, e[1] = n, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g;
295
+ e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h;
297
296
  } else
298
- r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11];
299
- if (g !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
300
- return g;
301
- let p;
302
- e[15] !== r || e[16] !== d || e[17] !== m || e[18] !== u ? (p = /* @__PURE__ */ a(r, { zIndex: d, bg: m, children: u }), e[15] = r, e[16] = d, e[17] = m, e[18] = u, e[19] = p) : p = e[19];
297
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11];
298
+ if (h !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
299
+ return h;
300
+ let S;
301
+ e[15] !== i || e[16] !== d || e[17] !== u || e[18] !== m ? (S = /* @__PURE__ */ a(i, { zIndex: d, bg: u, children: m }), e[15] = i, e[16] = d, e[17] = u, e[18] = m, e[19] = S) : S = e[19];
303
302
  let b;
304
- e[20] !== c || e[21] !== p ? (b = /* @__PURE__ */ a(c, { children: p }), e[20] = c, e[21] = p, e[22] = b) : b = e[22];
305
- let h;
306
- e[23] !== i || e[24] !== b ? (h = /* @__PURE__ */ a(i, { children: b }), e[23] = i, e[24] = b, e[25] = h) : h = e[25];
303
+ e[20] !== c || e[21] !== S ? (b = /* @__PURE__ */ a(c, { children: S }), e[20] = c, e[21] = S, e[22] = b) : b = e[22];
307
304
  let x;
308
- return e[26] !== s || e[27] !== f || e[28] !== h ? (x = /* @__PURE__ */ _(s, { children: [
305
+ e[23] !== s || e[24] !== b ? (x = /* @__PURE__ */ a(s, { children: b }), e[23] = s, e[24] = b, e[25] = x) : x = e[25];
306
+ let g;
307
+ return e[26] !== r || e[27] !== f || e[28] !== x ? (g = /* @__PURE__ */ _(r, { children: [
309
308
  f,
310
- h
311
- ] }), e[26] = s, e[27] = f, e[28] = h, e[29] = x) : x = e[29], x;
312
- }, Oe = (l) => {
313
- const e = z(5), {
314
- value: t
315
- } = l;
316
- let o, n;
317
- if (e[0] !== t) {
318
- n = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
309
+ x
310
+ ] }), e[26] = r, e[27] = f, e[28] = x, e[29] = g) : g = e[29], g;
311
+ }, Ne = (o) => {
312
+ const e = z(15), {
313
+ value: t,
314
+ wrapRows: l
315
+ } = o;
316
+ let n, i;
317
+ if (e[0] !== t || e[1] !== l) {
318
+ i = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
319
319
  e:
320
- if (o = kt(t), Be(o)) {
321
- n = /* @__PURE__ */ a(ie.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: "hidden", whiteSpace: "nowrap", children: Ml(o) });
320
+ if (n = Tt(t), Fe(n)) {
321
+ const m = l ? "visible" : "hidden", f = l ? "anywhere" : void 0, h = l ? "normal" : "nowrap", S = l ? n : Oo(n);
322
+ let b;
323
+ e[4] !== m || e[5] !== f || e[6] !== h || e[7] !== S ? (b = /* @__PURE__ */ a(ae.span, { display: "inline-flex", maxWidth: "full", minW: "0", overflow: m, overflowWrap: f, whiteSpace: h, children: S }), e[4] = m, e[5] = f, e[6] = h, e[7] = S, e[8] = b) : b = e[8], i = b;
322
324
  break e;
323
325
  }
324
- e[0] = t, e[1] = o, e[2] = n;
326
+ e[0] = t, e[1] = l, e[2] = n, e[3] = i;
325
327
  } else
326
- o = e[1], n = e[2];
327
- if (n !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
328
- return n;
329
- let r;
330
- return e[3] !== o ? (r = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: "hidden", textOverflow: "ellipsis", textStyle: "paragraph/S/regular", whiteSpace: "nowrap", children: o }), e[3] = o, e[4] = r) : r = e[4], r;
331
- }, Nl = (l) => {
332
- const e = z(9), {
328
+ n = e[2], i = e[3];
329
+ if (i !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
330
+ return i;
331
+ const c = l ? "visible" : "hidden", s = l ? "anywhere" : void 0, r = l ? void 0 : "ellipsis", d = l ? "normal" : "nowrap";
332
+ let u;
333
+ return e[9] !== n || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (u = /* @__PURE__ */ a(O, { maxWidth: "full", overflow: c, overflowWrap: s, textOverflow: r, textStyle: "paragraph/S/regular", whiteSpace: d, children: n }), e[9] = n, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = u) : u = e[14], u;
334
+ }, Bo = (o) => {
335
+ const e = z(11), {
333
336
  columnLabel: t,
334
- renderer: o,
335
- value: n
336
- } = l;
337
- if (o?.type === "json") {
338
- let c;
339
- return e[0] !== t || e[1] !== n ? (c = /* @__PURE__ */ a(zl, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = c) : c = e[2], c;
337
+ renderer: l,
338
+ value: n,
339
+ wrapRows: i
340
+ } = o;
341
+ if (l?.type === "json") {
342
+ let s;
343
+ return e[0] !== t || e[1] !== n ? (s = /* @__PURE__ */ a(Mo, { columnLabel: t, value: n }), e[0] = t, e[1] = n, e[2] = s) : s = e[2], s;
340
344
  }
341
- if (o?.type === "color-scale" && Ue(n, o.stops) && typeof n == "number") {
342
- let i;
343
- return e[3] !== n ? (i = /* @__PURE__ */ a(xl, { value: n }), e[3] = n, e[4] = i) : i = e[4], i;
345
+ if (l?.type === "color-scale" && Ze(n, l.stops) && typeof n == "number") {
346
+ let r;
347
+ return e[3] !== n ? (r = /* @__PURE__ */ a(vo, { value: n }), e[3] = n, e[4] = r) : r = e[4], r;
344
348
  }
345
- if (o?.type === "categorical-color" && qe(n, o.categories)) {
346
- let i;
347
- return e[5] !== n ? (i = /* @__PURE__ */ a(cl, { children: /* @__PURE__ */ a(Oe, { value: n }) }), e[5] = n, e[6] = i) : i = e[6], i;
349
+ if (l?.type === "categorical-color" && Ue(n, l.categories)) {
350
+ let r;
351
+ return e[5] !== n || e[6] !== i ? (r = /* @__PURE__ */ a(fo, { children: /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }) }), e[5] = n, e[6] = i, e[7] = r) : r = e[7], r;
348
352
  }
349
- let r;
350
- return e[7] !== n ? (r = /* @__PURE__ */ a(Oe, { value: n }), e[7] = n, e[8] = r) : r = e[8], r;
351
- }, jl = (l, e) => {
353
+ let c;
354
+ return e[8] !== n || e[9] !== i ? (c = /* @__PURE__ */ a(Ne, { value: n, wrapRows: i }), e[8] = n, e[9] = i, e[10] = c) : c = e[10], c;
355
+ }, Fo = (o, e) => {
352
356
  if (e?.type === "color-scale") {
353
- const t = Ue(l, e.stops);
354
- if (t && typeof l == "number") return Pe(t);
357
+ const t = Ze(o, e.stops);
358
+ if (t && typeof o == "number") return Le(t);
355
359
  }
356
360
  if (e?.type === "categorical-color") {
357
- const t = qe(l, e.categories);
358
- if (t) return Pe(t);
361
+ const t = Ue(o, e.categories);
362
+ if (t) return Le(t);
359
363
  }
360
364
  };
361
- function El(l, e, t = {}) {
365
+ function Ko(o, e, t = {}) {
362
366
  const {
363
- columnIcons: o,
367
+ columnIcons: l,
364
368
  columnDescriptions: n,
365
- compactHeaders: r,
369
+ compactHeaders: i,
366
370
  enableSelection: c = !1,
367
- rowActions: i = [],
368
- getRowActions: s,
371
+ rowActions: s = [],
372
+ getRowActions: r,
369
373
  selectedRowIds: d,
370
- columnRenderers: m
371
- } = t, u = ne.accessor((b, h) => h + 1, {
374
+ columnRenderers: u,
375
+ wrapRows: m = !1
376
+ } = t, f = ie.accessor((x, g) => g + 1, {
372
377
  header: "",
373
378
  id: "rowIndex",
374
379
  enableResizing: !1,
375
380
  size: 20,
376
- cell: (b) => /* @__PURE__ */ a(ie.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: b.getValue() })
377
- }), f = ne.display({
381
+ cell: (x) => /* @__PURE__ */ a(ae.span, { display: "block", textStyle: "paragraph/S/regular", textAlign: "center", children: x.getValue() })
382
+ }), h = ie.display({
378
383
  id: "rowSelection",
379
- header: Pl,
380
- cell: (b) => /* @__PURE__ */ a(Hl, { ...b, selectedRowIds: d }),
384
+ header: Wo,
385
+ cell: (x) => /* @__PURE__ */ a(No, { ...x, selectedRowIds: d }),
381
386
  enableResizing: !1,
382
387
  enableSorting: !1,
383
388
  size: 36
384
- }), g = e.map((b) => {
385
- const h = b || "-", x = l.map((S) => S[h]), w = m?.[h], y = o?.[h], C = y === void 0 ? $t(x) : y, v = n?.[h];
386
- return ne.accessor((S) => S[h], {
387
- id: h,
389
+ }), S = e.map((x) => {
390
+ const g = x || "-", v = o.map((y) => y[g]), w = u?.[g], p = l?.[g], R = p === void 0 ? zt(v) : p, C = n?.[g];
391
+ return ie.accessor((y) => y[g], {
392
+ id: g,
388
393
  header: () => {
389
- const S = r?.[h] ?? h;
390
- return /* @__PURE__ */ _(ie.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
391
- C,
392
- /* @__PURE__ */ a(ie.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: S }),
393
- v ? /* @__PURE__ */ a(Fe, { content: v, children: /* @__PURE__ */ a(Y, { as: xt, "aria-label": `About ${S}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
394
+ const y = i?.[g] ?? g;
395
+ return /* @__PURE__ */ _(ae.span, { display: "inline-flex", alignItems: "center", gap: "4px", minW: "0", maxW: "full", overflow: "hidden", children: [
396
+ R,
397
+ /* @__PURE__ */ a(ae.span, { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: y }),
398
+ C ? /* @__PURE__ */ a(Je, { content: C, children: /* @__PURE__ */ a(ee, { as: yt, "aria-label": `About ${y}`, boxSize: "12px", color: "fg.muted", cursor: "help", flexShrink: 0, opacity: 0.6, tabIndex: 0 }) }) : null
394
399
  ] });
395
400
  },
396
- cell: (S) => /* @__PURE__ */ a(Nl, { columnLabel: h, renderer: w, value: S.getValue() }),
401
+ cell: (y) => /* @__PURE__ */ a(Bo, { columnLabel: g, renderer: w, value: y.getValue(), wrapRows: m }),
397
402
  meta: {
398
- getCellStyle: (S) => jl(S, w)
403
+ getCellStyle: (y) => Fo(y, w)
399
404
  },
400
- sortingFn: (S, I) => {
401
- const A = Le(S.original[h]), $ = Le(I.original[h]);
402
- return Vl(A, $);
405
+ sortingFn: (y, A) => {
406
+ const $ = We(y.original[g]), T = We(A.original[g]);
407
+ return Lo($, T);
403
408
  }
404
409
  });
405
- }), p = ne.display({
410
+ }), b = ie.display({
406
411
  id: "rowActions",
407
412
  header: "",
408
- cell: (b) => /* @__PURE__ */ a(Ol, { ...b, actions: i, getActions: s }),
413
+ cell: (x) => /* @__PURE__ */ a(Eo, { ...x, actions: s, getActions: r }),
409
414
  enableResizing: !1,
410
415
  enableSorting: !1,
411
416
  size: 36
412
417
  });
413
- return [u, ...c ? [f] : [], ...g, ...i.length > 0 || s ? [p] : []];
418
+ return [f, ...c ? [h] : [], ...S, ...s.length > 0 || r ? [b] : []];
414
419
  }
415
- const Bl = (l) => {
420
+ const Jo = (o) => {
416
421
  const e = z(28), {
417
422
  column: t,
418
- checked: o,
423
+ checked: l,
419
424
  onColumnVisibilityChange: n
420
- } = l;
421
- let r;
422
- e[0] !== t.id ? (r = {
425
+ } = o;
426
+ let i;
427
+ e[0] !== t.id ? (i = {
423
428
  id: t.id
424
- }, e[0] = t.id, e[1] = r) : r = e[1];
429
+ }, e[0] = t.id, e[1] = i) : i = e[1];
425
430
  const {
426
431
  attributes: c,
427
- listeners: i,
428
- setNodeRef: s,
432
+ listeners: s,
433
+ setNodeRef: r,
429
434
  transform: d,
430
- transition: m,
431
- isDragging: u
432
- } = Zt(r);
435
+ transition: u,
436
+ isDragging: m
437
+ } = oo(i);
433
438
  let f;
434
- e[2] !== d ? (f = Qt.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
435
- const g = u ? 0.5 : 1;
436
- let p;
437
- e[4] !== f || e[5] !== g || e[6] !== m ? (p = {
439
+ e[2] !== d ? (f = lo.Transform.toString(d), e[2] = d, e[3] = f) : f = e[3];
440
+ const h = m ? 0.5 : 1;
441
+ let S;
442
+ e[4] !== f || e[5] !== h || e[6] !== u ? (S = {
438
443
  transform: f,
439
- transition: m,
440
- opacity: g
441
- }, e[4] = f, e[5] = g, e[6] = m, e[7] = p) : p = e[7];
442
- const b = p;
443
- let h;
444
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = {
445
- bg: "bg.hover"
446
- }, e[8] = h) : h = e[8];
444
+ transition: u,
445
+ opacity: h
446
+ }, e[4] = f, e[5] = h, e[6] = u, e[7] = S) : S = e[7];
447
+ const b = S;
447
448
  let x;
448
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ a(vt, { size: 14 }), e[9] = x) : x = e[9];
449
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
450
+ bg: "bg.hover"
451
+ }, e[8] = x) : x = e[8];
452
+ let g;
453
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(It, { size: 14 }), e[9] = g) : g = e[9];
454
+ let v;
455
+ e[10] !== c || e[11] !== s ? (v = /* @__PURE__ */ a(re, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...s, children: g }), e[10] = c, e[11] = s, e[12] = v) : v = e[12];
449
456
  let w;
450
- e[10] !== c || e[11] !== i ? (w = /* @__PURE__ */ a(oe, { as: "span", display: "inline-flex", cursor: "grab", color: "fg.muted", ...c, ...i, children: x }), e[10] = c, e[11] = i, e[12] = w) : w = e[12];
451
- let y;
452
- e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ a(Y, { as: we, boxSize: "12px", strokeWidth: "3" }), e[13] = y) : y = e[13];
457
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ a(ee, { as: ye, boxSize: "12px", strokeWidth: "3" }), e[13] = w) : w = e[13];
458
+ let p;
459
+ e[14] !== t.id || e[15] !== n ? (p = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = p) : p = e[16];
460
+ let R;
461
+ e[17] !== t.label ? (R = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = R) : R = e[18];
453
462
  let C;
454
- e[14] !== t.id || e[15] !== n ? (C = (A) => n(t.id, A.checked === !0), e[14] = t.id, e[15] = n, e[16] = C) : C = e[16];
455
- let v;
456
- e[17] !== t.label ? (v = /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", truncate: !0, children: t.label }), e[17] = t.label, e[18] = v) : v = e[18];
457
- let S;
458
- e[19] !== o || e[20] !== C || e[21] !== v ? (S = /* @__PURE__ */ a(ye, { checked: o, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: y, onCheckedChange: C, children: v }), e[19] = o, e[20] = C, e[21] = v, e[22] = S) : S = e[22];
459
- let I;
460
- return e[23] !== s || e[24] !== b || e[25] !== S || e[26] !== w ? (I = /* @__PURE__ */ _(je, { ref: s, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: h, children: [
461
- w,
462
- S
463
- ] }), e[23] = s, e[24] = b, e[25] = S, e[26] = w, e[27] = I) : I = e[27], I;
464
- }, Wl = (l) => {
465
- const e = z(43), {
463
+ e[19] !== l || e[20] !== p || e[21] !== R ? (C = /* @__PURE__ */ a(Ce, { checked: l, flex: "1", minW: "0", width: "full", flexDirection: "row-reverse", justifyContent: "space-between", size: "sm", icon: w, onCheckedChange: p, children: R }), e[19] = l, e[20] = p, e[21] = R, e[22] = C) : C = e[22];
464
+ let y;
465
+ return e[23] !== r || e[24] !== b || e[25] !== C || e[26] !== v ? (y = /* @__PURE__ */ _(Ee, { ref: r, style: b, gap: "2xs", minW: "0", width: "full", borderRadius: "xs", px: "xs", py: "2xs", _hover: x, children: [
466
+ v,
467
+ C
468
+ ] }), e[23] = r, e[24] = b, e[25] = C, e[26] = v, e[27] = y) : y = e[27], y;
469
+ }, Xo = (o) => {
470
+ const e = z(47), {
466
471
  columns: t,
467
- visibleColumnIds: o,
468
- showStats: n,
469
- statsAvailable: r,
470
- onColumnVisibilityChange: c,
471
- onColumnReorder: i,
472
- onStatsVisibilityChange: s
473
- } = l, d = _e(null), m = _e(null), [u, f] = Z(!1), [g, p] = Z("");
474
- let b;
475
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
472
+ visibleColumnIds: l,
473
+ wrapRows: n,
474
+ showStats: i,
475
+ statsAvailable: c,
476
+ onColumnVisibilityChange: s,
477
+ onColumnReorder: r,
478
+ onWrapRowsChange: d,
479
+ onStatsVisibilityChange: u
480
+ } = o, m = Te(null), f = Te(null), [h, S] = Q(!1), [b, x] = Q("");
481
+ let g;
482
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
476
483
  activationConstraint: {
477
484
  distance: 5
478
485
  }
479
- }, e[0] = b) : b = e[0];
480
- const h = Kt(Jt(Xt, b));
481
- let x;
482
- if (e[1] !== t || e[2] !== g) {
483
- const k = g.trim().toLowerCase();
484
- x = k ? t.filter((T) => T.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = g, e[3] = x;
486
+ }, e[0] = g) : g = e[0];
487
+ const v = Gt(Ut(Yt, g));
488
+ let w;
489
+ if (e[1] !== t || e[2] !== b) {
490
+ const k = b.trim().toLowerCase();
491
+ w = k ? t.filter((B) => B.label.toLowerCase().includes(k)) : t, e[1] = t, e[2] = b, e[3] = w;
485
492
  } else
486
- x = e[3];
487
- const w = x;
488
- let y;
489
- e[4] !== i ? (y = (k) => {
493
+ w = e[3];
494
+ const p = w;
495
+ let R;
496
+ e[4] !== r ? (R = (k) => {
490
497
  const {
491
- active: T,
492
- over: W
498
+ active: B,
499
+ over: F
493
500
  } = k;
494
- !W || T.id === W.id || i(String(T.id), String(W.id));
495
- }, e[4] = i, e[5] = y) : y = e[5];
496
- const C = y;
497
- let v, S;
498
- e[6] !== u ? (v = () => {
499
- if (!u)
501
+ !F || B.id === F.id || r(String(B.id), String(F.id));
502
+ }, e[4] = r, e[5] = R) : R = e[5];
503
+ const C = R;
504
+ let y, A;
505
+ e[6] !== h ? (y = () => {
506
+ if (!h)
500
507
  return;
501
- const k = (W) => {
502
- const H = W.target;
503
- H instanceof Node && (m.current?.contains(H) || d.current?.contains(H) || f(!1));
504
- }, T = (W) => {
505
- W.key === "Escape" && f(!1);
508
+ const k = (F) => {
509
+ const le = F.target;
510
+ le instanceof Node && (f.current?.contains(le) || m.current?.contains(le) || S(!1));
511
+ }, B = (F) => {
512
+ F.key === "Escape" && S(!1);
506
513
  };
507
- return document.addEventListener("pointerdown", k), document.addEventListener("keydown", T, !0), () => {
508
- document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", T, !0);
514
+ return document.addEventListener("pointerdown", k), document.addEventListener("keydown", B, !0), () => {
515
+ document.removeEventListener("pointerdown", k), document.removeEventListener("keydown", B, !0);
509
516
  };
510
- }, S = [u], e[6] = u, e[7] = v, e[8] = S) : (v = e[7], S = e[8]), We(v, S);
511
- let I;
512
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = {
517
+ }, A = [h], e[6] = h, e[7] = y, e[8] = A) : (y = e[7], A = e[8]), Ke(y, A);
518
+ let $;
519
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
513
520
  placement: "bottom-end",
514
521
  offset: {
515
522
  mainAxis: 8
516
523
  },
517
- getAnchorElement: () => d.current
518
- }, e[9] = I) : I = e[9];
519
- let A;
520
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(Q.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { ref: d, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => f(Fl), children: /* @__PURE__ */ a(Y, { as: Ct, boxSize: "14px" }) }) }), e[10] = A) : A = e[10];
521
- let $;
522
- e[11] !== s || e[12] !== n || e[13] !== r ? ($ = r ? /* @__PURE__ */ a(oe, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a(el, { checked: n, inputProps: {
524
+ getAnchorElement: () => m.current
525
+ }, e[9] = $) : $ = e[9];
526
+ let T;
527
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ a(te.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ref: m, "aria-label": "Display settings", variant: "ghost", size: "sm", onClick: () => S(qo), children: /* @__PURE__ */ a(ee, { as: Rt, boxSize: "14px" }) }) }), e[10] = T) : T = e[10];
528
+ let P;
529
+ e[11] !== d || e[12] !== n ? (P = /* @__PURE__ */ a(Dt, { showDivider: !0, wrapRows: n, onWrapRowsChange: d }), e[11] = d, e[12] = n, e[13] = P) : P = e[13];
530
+ let M;
531
+ e[14] !== u || e[15] !== i || e[16] !== c ? (M = c ? /* @__PURE__ */ a(re, { borderBottomWidth: "1px", borderColor: "border.subtle", padding: "xs", children: /* @__PURE__ */ a($t, { checked: i, inputProps: {
523
532
  role: "switch"
524
- }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => s(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[11] = s, e[12] = n, e[13] = r, e[14] = $) : $ = e[14];
533
+ }, width: "full", flexDirection: "row-reverse", justifyContent: "space-between", onCheckedChange: (k) => u(k.checked === !0), children: /* @__PURE__ */ a(O, { as: "span", textStyle: "label/S/regular", children: "Statistics" }) }) }) : null, e[14] = u, e[15] = i, e[16] = c, e[17] = M) : M = e[17];
525
534
  let D;
526
- e[15] !== g ? (D = /* @__PURE__ */ a(It, { value: g, placeholder: "Search columns", onValueChange: p }), e[15] = g, e[16] = D) : D = e[16];
527
- let N;
528
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = {
535
+ e[18] !== b ? (D = /* @__PURE__ */ a(_t, { value: b, placeholder: "Search columns", onValueChange: x }), e[18] = b, e[19] = D) : D = e[19];
536
+ let K;
537
+ e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
529
538
  overscrollBehavior: "contain"
530
- }, e[17] = N) : N = e[17];
531
- let M;
532
- e[18] !== t ? (M = t.map(Kl), e[18] = t, e[19] = M) : M = e[19];
533
- let P;
534
- if (e[20] !== w || e[21] !== c || e[22] !== o) {
539
+ }, e[20] = K) : K = e[20];
540
+ let W;
541
+ e[21] !== t ? (W = t.map(Go), e[21] = t, e[22] = W) : W = e[22];
542
+ let N;
543
+ if (e[23] !== p || e[24] !== s || e[25] !== l) {
535
544
  let k;
536
- e[24] !== c || e[25] !== o ? (k = (T) => /* @__PURE__ */ a(Bl, { column: T, checked: o.has(T.id), onColumnVisibilityChange: c }, T.id), e[24] = c, e[25] = o, e[26] = k) : k = e[26], P = w.map(k), e[20] = w, e[21] = c, e[22] = o, e[23] = P;
545
+ e[27] !== s || e[28] !== l ? (k = (B) => /* @__PURE__ */ a(Jo, { column: B, checked: l.has(B.id), onColumnVisibilityChange: s }, B.id), e[27] = s, e[28] = l, e[29] = k) : k = e[29], N = p.map(k), e[23] = p, e[24] = s, e[25] = l, e[26] = N;
537
546
  } else
538
- P = e[23];
547
+ N = e[26];
548
+ let J;
549
+ e[30] !== N ? (J = /* @__PURE__ */ a(ze, { gap: "1px", children: N }), e[30] = N, e[31] = J) : J = e[31];
550
+ let X;
551
+ e[32] !== W || e[33] !== J ? (X = /* @__PURE__ */ a(eo, { items: W, strategy: to, children: J }), e[32] = W, e[33] = J, e[34] = X) : X = e[34];
539
552
  let j;
540
- e[27] !== P ? (j = /* @__PURE__ */ a(ke, { gap: "1px", children: P }), e[27] = P, e[28] = j) : j = e[28];
541
- let E;
542
- e[29] !== M || e[30] !== j ? (E = /* @__PURE__ */ a(Ut, { items: M, strategy: Yt, children: j }), e[29] = M, e[30] = j, e[31] = E) : E = e[31];
543
- let B;
544
- e[32] !== C || e[33] !== h || e[34] !== E ? (B = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: N, children: /* @__PURE__ */ a(oe, { padding: "2xs", children: /* @__PURE__ */ a(qt, { sensors: h, collisionDetection: Gt, onDragEnd: C, children: E }) }) }), e[32] = C, e[33] = h, e[34] = E, e[35] = B) : B = e[35];
545
- let F;
546
- e[36] !== B || e[37] !== $ || e[38] !== D ? (F = /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(Q.Positioner, { children: /* @__PURE__ */ a(Q.Content, { ref: m, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ke, { gap: "0", children: [
547
- $,
553
+ e[35] !== C || e[36] !== v || e[37] !== X ? (j = /* @__PURE__ */ a(xe, { maxH: "280px", viewportProps: K, children: /* @__PURE__ */ a(re, { padding: "2xs", children: /* @__PURE__ */ a(Zt, { sensors: v, collisionDetection: Qt, onDragEnd: C, children: X }) }) }), e[35] = C, e[36] = v, e[37] = X, e[38] = j) : j = e[38];
554
+ let H;
555
+ e[39] !== j || e[40] !== P || e[41] !== M || e[42] !== D ? (H = /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(te.Positioner, { children: /* @__PURE__ */ a(te.Content, { ref: f, width: "min(320px, calc(100vw - 32px))", p: "0", bg: "bg", overflow: "hidden", children: /* @__PURE__ */ _(ze, { gap: "0", children: [
556
+ P,
557
+ M,
548
558
  D,
549
- B
550
- ] }) }) }) }), e[36] = B, e[37] = $, e[38] = D, e[39] = F) : F = e[39];
551
- let K;
552
- return e[40] !== u || e[41] !== F ? (K = /* @__PURE__ */ _(Q.Root, { open: u, closeOnInteractOutside: !1, positioning: I, children: [
553
- A,
554
- F
555
- ] }), e[40] = u, e[41] = F, e[42] = K) : K = e[42], K;
559
+ j
560
+ ] }) }) }) }), e[39] = j, e[40] = P, e[41] = M, e[42] = D, e[43] = H) : H = e[43];
561
+ let E;
562
+ return e[44] !== h || e[45] !== H ? (E = /* @__PURE__ */ _(te.Root, { open: h, closeOnInteractOutside: !1, positioning: $, children: [
563
+ T,
564
+ H
565
+ ] }), e[44] = h, e[45] = H, e[46] = E) : E = e[46], E;
556
566
  };
557
- function Fl(l) {
558
- return !l;
567
+ function qo(o) {
568
+ return !o;
559
569
  }
560
- function Kl(l) {
561
- return l.id;
570
+ function Go(o) {
571
+ return o.id;
562
572
  }
563
- const Jl = () => {
564
- const l = z(11), e = sl(), t = al();
573
+ const Uo = () => {
574
+ const o = z(11), e = uo(), t = mo();
565
575
  if (!e || !t)
566
576
  return null;
567
- const o = t.y + t.height;
577
+ const l = t.y + t.height;
568
578
  let n;
569
- l[0] !== e.x || l[1] !== t.y || l[2] !== o ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: o }), l[0] = e.x, l[1] = t.y, l[2] = o, l[3] = n) : n = l[3];
570
- const r = t.x + t.width;
579
+ o[0] !== e.x || o[1] !== t.y || o[2] !== l ? (n = /* @__PURE__ */ a("line", { x1: e.x, x2: e.x, y1: t.y, y2: l }), o[0] = e.x, o[1] = t.y, o[2] = l, o[3] = n) : n = o[3];
580
+ const i = t.x + t.width;
571
581
  let c;
572
- l[4] !== e.y || l[5] !== t.x || l[6] !== r ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: r, y1: e.y, y2: e.y }), l[4] = e.y, l[5] = t.x, l[6] = r, l[7] = c) : c = l[7];
573
- let i;
574
- return l[8] !== n || l[9] !== c ? (i = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
582
+ o[4] !== e.y || o[5] !== t.x || o[6] !== i ? (c = /* @__PURE__ */ a("line", { x1: t.x, x2: i, y1: e.y, y2: e.y }), o[4] = e.y, o[5] = t.x, o[6] = i, o[7] = c) : c = o[7];
583
+ let s;
584
+ return o[8] !== n || o[9] !== c ? (s = /* @__PURE__ */ _("g", { pointerEvents: "none", stroke: "var(--chakra-colors-border-emphasized)", strokeWidth: "1", children: [
575
585
  n,
576
586
  c
577
- ] }), l[8] = n, l[9] = c, l[10] = i) : i = l[10], i;
578
- }, Ze = (l) => {
587
+ ] }), o[8] = n, o[9] = c, o[10] = s) : s = o[10], s;
588
+ }, et = (o) => {
579
589
  const e = z(47), {
580
590
  data: t,
581
- dataKey: o,
591
+ dataKey: l,
582
592
  color: n,
583
- height: r,
593
+ height: i,
584
594
  ariaLabel: c,
585
- tooltipLabel: i,
586
- tooltipValue: s,
595
+ tooltipLabel: s,
596
+ tooltipValue: r,
587
597
  tooltipSeriesLabel: d,
588
- layout: m,
589
- categoryKey: u,
598
+ layout: u,
599
+ categoryKey: m,
590
600
  domain: f,
591
- barSize: g,
592
- barCategoryGap: p
593
- } = l, b = m === void 0 ? "horizontal" : m, h = p === void 0 ? 1 : p;
594
- let x;
595
- e[0] !== n || e[1] !== o ? (x = [{
596
- name: o,
601
+ barSize: h,
602
+ barCategoryGap: S
603
+ } = o, b = u === void 0 ? "horizontal" : u, x = S === void 0 ? 1 : S;
604
+ let g;
605
+ e[0] !== n || e[1] !== l ? (g = [{
606
+ name: l,
597
607
  color: n
598
- }], e[0] = n, e[1] = o, e[2] = x) : x = e[2];
599
- let w;
600
- e[3] !== t || e[4] !== x ? (w = {
608
+ }], e[0] = n, e[1] = l, e[2] = g) : g = e[2];
609
+ let v;
610
+ e[3] !== t || e[4] !== g ? (v = {
601
611
  data: t,
602
- series: x
603
- }, e[3] = t, e[4] = x, e[5] = w) : w = e[5];
604
- const y = tl(w);
612
+ series: g
613
+ }, e[3] = t, e[4] = g, e[5] = v) : v = e[5];
614
+ const w = no(v);
615
+ let p;
616
+ e[6] !== l ? (p = (k) => k[l], e[6] = l, e[7] = p) : p = e[7];
617
+ const R = p;
605
618
  let C;
606
- e[6] !== o ? (C = (H) => H[o], e[6] = o, e[7] = C) : C = e[7];
607
- const v = C;
608
- let S;
609
- e[8] !== u ? (S = u ? (H) => H[u] : void 0, e[8] = u, e[9] = S) : S = e[9];
610
- const I = S, A = y.data;
619
+ e[8] !== m ? (C = m ? (k) => k[m] : void 0, e[8] = m, e[9] = C) : C = e[9];
620
+ const y = C, A = w.data;
611
621
  let $;
612
622
  e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? ($ = {
613
623
  top: 2,
@@ -615,572 +625,575 @@ const Jl = () => {
615
625
  bottom: 0,
616
626
  left: 0
617
627
  }, e[10] = $) : $ = e[10];
618
- let D;
619
- e[11] !== f || e[12] !== I || e[13] !== b ? (D = b === "vertical" ? /* @__PURE__ */ _(st, { children: [
620
- /* @__PURE__ */ a(ll, { type: "number", domain: f, hide: !0 }),
621
- /* @__PURE__ */ a(ol, { type: "category", dataKey: I, hide: !0 })
622
- ] }) : null, e[11] = f, e[12] = I, e[13] = b, e[14] = D) : D = e[14];
623
- let N;
624
- e[15] !== y || e[16] !== n ? (N = y.color(n), e[15] = y, e[16] = n, e[17] = N) : N = e[17];
625
- let M;
626
- e[18] !== g || e[19] !== v || e[20] !== N ? (M = /* @__PURE__ */ a(nl, { dataKey: v, fill: N, barSize: g, isAnimationActive: !1 }), e[18] = g, e[19] = v, e[20] = N, e[21] = M) : M = e[21];
628
+ let T;
629
+ e[11] !== f || e[12] !== y || e[13] !== b ? (T = b === "vertical" ? /* @__PURE__ */ _(ct, { children: [
630
+ /* @__PURE__ */ a(ro, { type: "number", domain: f, hide: !0 }),
631
+ /* @__PURE__ */ a(io, { type: "category", dataKey: y, hide: !0 })
632
+ ] }) : null, e[11] = f, e[12] = y, e[13] = b, e[14] = T) : T = e[14];
627
633
  let P;
628
- e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
634
+ e[15] !== w || e[16] !== n ? (P = w.color(n), e[15] = w, e[16] = n, e[17] = P) : P = e[17];
635
+ let M;
636
+ e[18] !== h || e[19] !== R || e[20] !== P ? (M = /* @__PURE__ */ a(so, { dataKey: R, fill: P, barSize: h, isAnimationActive: !1 }), e[18] = h, e[19] = R, e[20] = P, e[21] = M) : M = e[21];
637
+ let D;
638
+ e[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = {
629
639
  x: !0,
630
640
  y: !0
631
- }, e[22] = P) : P = e[22];
632
- let j;
633
- e[23] !== i ? (j = (H, ue) => {
634
- const te = ue[0]?.payload;
635
- return te ? i(te) : H;
636
- }, e[23] = i, e[24] = j) : j = e[24];
637
- let E;
638
- e[25] !== d || e[26] !== s ? (E = (H) => [s(H), d], e[25] = d, e[26] = s, e[27] = E) : E = e[27];
639
- let B;
640
- e[28] !== j || e[29] !== E ? (B = /* @__PURE__ */ a(Te.Tooltip, { labelFormatter: j, formatter: E }), e[28] = j, e[29] = E, e[30] = B) : B = e[30];
641
- let F;
642
- e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ a(Jl, {}), e[31] = F) : F = e[31];
641
+ }, e[22] = D) : D = e[22];
643
642
  let K;
644
- e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (K = {
643
+ e[23] !== s ? (K = (k, B) => {
644
+ const F = B[0]?.payload;
645
+ return F ? s(F) : k;
646
+ }, e[23] = s, e[24] = K) : K = e[24];
647
+ let W;
648
+ e[25] !== d || e[26] !== r ? (W = (k) => [r(k), d], e[25] = d, e[26] = r, e[27] = W) : W = e[27];
649
+ let N;
650
+ e[28] !== K || e[29] !== W ? (N = /* @__PURE__ */ a(Ve.Tooltip, { labelFormatter: K, formatter: W }), e[28] = K, e[29] = W, e[30] = N) : N = e[30];
651
+ let J;
652
+ e[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = /* @__PURE__ */ a(Uo, {}), e[31] = J) : J = e[31];
653
+ let X;
654
+ e[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (X = {
645
655
  zIndex: 1800
646
- }, e[32] = K) : K = e[32];
647
- let k;
648
- e[33] !== B ? (k = /* @__PURE__ */ a(rl, { allowEscapeViewBox: P, content: B, cursor: F, isAnimationActive: !1, wrapperStyle: K }), e[33] = B, e[34] = k) : k = e[34];
649
- let T;
650
- e[35] !== h || e[36] !== y.data || e[37] !== b || e[38] !== M || e[39] !== k || e[40] !== D ? (T = /* @__PURE__ */ _(il, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: h, children: [
651
- D,
656
+ }, e[32] = X) : X = e[32];
657
+ let j;
658
+ e[33] !== N ? (j = /* @__PURE__ */ a(ao, { allowEscapeViewBox: D, content: N, cursor: J, isAnimationActive: !1, wrapperStyle: X }), e[33] = N, e[34] = j) : j = e[34];
659
+ let H;
660
+ e[35] !== x || e[36] !== w.data || e[37] !== b || e[38] !== M || e[39] !== j || e[40] !== T ? (H = /* @__PURE__ */ _(co, { responsive: !0, data: A, layout: b, margin: $, barCategoryGap: x, children: [
661
+ T,
652
662
  M,
653
- k
654
- ] }), e[35] = h, e[36] = y.data, e[37] = b, e[38] = M, e[39] = k, e[40] = D, e[41] = T) : T = e[41];
655
- let W;
656
- return e[42] !== c || e[43] !== y || e[44] !== r || e[45] !== T ? (W = /* @__PURE__ */ a(Te.Root, { chart: y, height: r, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: T }), e[42] = c, e[43] = y, e[44] = r, e[45] = T, e[46] = W) : W = e[46], W;
657
- }, Xl = (l) => Xe(l) ? l.sortValue : l, Re = (l, e) => l.map((t) => Xl(t[e])).filter((t) => t != null && t !== ""), ql = (l, e) => new Set(Re(l, e)).size, Gl = (l, e, t) => {
658
- const o = Re(l, e), n = /* @__PURE__ */ new Map();
659
- for (const s of o)
660
- n.set(s, (n.get(s) ?? 0) + 1);
661
- const r = [...n.entries()].map(([s, d]) => ({
662
- label: String(s),
663
+ j
664
+ ] }), e[35] = x, e[36] = w.data, e[37] = b, e[38] = M, e[39] = j, e[40] = T, e[41] = H) : H = e[41];
665
+ let E;
666
+ return e[42] !== c || e[43] !== w || e[44] !== i || e[45] !== H ? (E = /* @__PURE__ */ a(Ve.Root, { chart: w, height: i, aspectRatio: "auto", cursor: "crosshair", "aria-label": c, children: H }), e[42] = c, e[43] = w, e[44] = i, e[45] = H, e[46] = E) : E = e[46], E;
667
+ }, Yo = (o) => Ge(o) ? o.sortValue : o, Ie = (o, e) => o.map((t) => Yo(t[e])).filter((t) => t != null && t !== ""), Zo = (o, e) => new Set(Ie(o, e)).size, Qo = (o, e, t) => {
668
+ const l = Ie(o, e), n = /* @__PURE__ */ new Map();
669
+ for (const r of l)
670
+ n.set(r, (n.get(r) ?? 0) + 1);
671
+ const i = [...n.entries()].map(([r, d]) => ({
672
+ label: String(r),
663
673
  count: d,
664
- percentage: Math.round(d / o.length * 100)
665
- })).sort((s, d) => d.count - s.count || s.label.localeCompare(d.label)), c = r.slice(0, t), i = r.slice(t).reduce((s, d) => s + d.count, 0);
666
- return i === 0 ? c : [...c, {
674
+ percentage: Math.round(d / l.length * 100)
675
+ })).sort((r, d) => d.count - r.count || r.label.localeCompare(d.label)), c = i.slice(0, t), s = i.slice(t).reduce((r, d) => r + d.count, 0);
676
+ return s === 0 ? c : [...c, {
667
677
  label: "Other",
668
- count: i,
669
- percentage: Math.round(i / o.length * 100)
678
+ count: s,
679
+ percentage: Math.round(s / l.length * 100)
670
680
  }];
671
- }, Ul = (l, e, t) => {
672
- const o = Re(l, e).filter((s) => typeof s == "number");
673
- if (o.length === 0) return null;
674
- const n = Math.min(...o), r = Math.max(...o), c = (r - n) / t, i = Array.from({
681
+ }, el = (o, e, t) => {
682
+ const l = Ie(o, e).filter((r) => typeof r == "number");
683
+ if (l.length === 0) return null;
684
+ const n = Math.min(...l), i = Math.max(...l), c = (i - n) / t, s = Array.from({
675
685
  length: t
676
- }, (s, d) => ({
686
+ }, (r, d) => ({
677
687
  start: n + c * d,
678
688
  end: n + c * (d + 1),
679
689
  count: 0
680
690
  }));
681
- for (const s of o) {
682
- const d = s === r || c === 0 ? t - 1 : Math.floor((s - n) / c);
683
- i[d].count += 1;
691
+ for (const r of l) {
692
+ const d = r === i || c === 0 ? t - 1 : Math.floor((r - n) / c);
693
+ s[d].count += 1;
684
694
  }
685
695
  return {
686
696
  min: n,
687
- max: r,
688
- bins: i
697
+ max: i,
698
+ bins: s
689
699
  };
690
- }, G = new Intl.NumberFormat(void 0, {
700
+ }, Y = new Intl.NumberFormat(void 0, {
691
701
  maximumFractionDigits: 2
692
- }).format, Qe = "vis.categorical.1", et = (l) => {
702
+ }).format, tt = "vis.categorical.1", ot = (o) => {
693
703
  const e = z(10), {
694
704
  value: t,
695
- count: o
696
- } = l;
705
+ count: l
706
+ } = o;
697
707
  let n;
698
708
  e[0] !== t ? (n = /* @__PURE__ */ a(O, { textStyle: "label/L/medium", lineHeight: "1", maxWidth: "100%", truncate: !0, children: t }), e[0] = t, e[1] = n) : n = e[1];
699
- let r;
700
- e[2] !== o ? (r = G(o), e[2] = o, e[3] = r) : r = e[3];
701
- const c = o === 1 ? "value" : "values";
702
709
  let i;
703
- e[4] !== r || e[5] !== c ? (i = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
704
- r,
710
+ e[2] !== l ? (i = Y(l), e[2] = l, e[3] = i) : i = e[3];
711
+ const c = l === 1 ? "value" : "values";
712
+ let s;
713
+ e[4] !== i || e[5] !== c ? (s = /* @__PURE__ */ _(O, { textStyle: "label/XS", color: "fg.muted", children: [
714
+ i,
705
715
  " ",
706
716
  c
707
- ] }), e[4] = r, e[5] = c, e[6] = i) : i = e[6];
708
- let s;
709
- return e[7] !== n || e[8] !== i ? (s = /* @__PURE__ */ _(ee, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
717
+ ] }), e[4] = i, e[5] = c, e[6] = s) : s = e[6];
718
+ let r;
719
+ return e[7] !== n || e[8] !== s ? (r = /* @__PURE__ */ _(oe, { "data-single-value-stat": !0, direction: "column", gap: "2xs", alignItems: "flex-start", minWidth: "0", children: [
710
720
  n,
711
- i
712
- ] }), e[7] = n, e[8] = i, e[9] = s) : s = e[9], s;
713
- }, Yl = (l) => {
721
+ s
722
+ ] }), e[7] = n, e[8] = s, e[9] = r) : r = e[9], r;
723
+ }, tl = (o) => {
714
724
  const e = z(22), {
715
725
  rows: t,
716
- columnId: o
717
- } = l;
718
- let n, r, c, i, s, d, m, u;
719
- if (e[0] !== o || e[1] !== t) {
720
- const b = ql(t, o);
721
- r = ee, d = "column", m = "2xs", u = "flex-start", n = O, c = "label/L/medium", i = "1", s = G(b), e[0] = o, e[1] = t, e[2] = n, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u;
726
+ columnId: l
727
+ } = o;
728
+ let n, i, c, s, r, d, u, m;
729
+ if (e[0] !== l || e[1] !== t) {
730
+ const b = Zo(t, l);
731
+ i = oe, d = "column", u = "2xs", m = "flex-start", n = O, c = "label/L/medium", s = "1", r = Y(b), e[0] = l, e[1] = t, e[2] = n, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m;
722
732
  } else
723
- n = e[2], r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9];
733
+ n = e[2], i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9];
724
734
  let f;
725
- e[10] !== n || e[11] !== c || e[12] !== i || e[13] !== s ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: i, children: s }), e[10] = n, e[11] = c, e[12] = i, e[13] = s, e[14] = f) : f = e[14];
726
- let g;
727
- e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = g) : g = e[15];
728
- let p;
729
- return e[16] !== r || e[17] !== d || e[18] !== m || e[19] !== u || e[20] !== f ? (p = /* @__PURE__ */ _(r, { direction: d, gap: m, alignItems: u, children: [
735
+ e[10] !== n || e[11] !== c || e[12] !== s || e[13] !== r ? (f = /* @__PURE__ */ a(n, { textStyle: c, lineHeight: s, children: r }), e[10] = n, e[11] = c, e[12] = s, e[13] = r, e[14] = f) : f = e[14];
736
+ let h;
737
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "unique values" }), e[15] = h) : h = e[15];
738
+ let S;
739
+ return e[16] !== i || e[17] !== d || e[18] !== u || e[19] !== m || e[20] !== f ? (S = /* @__PURE__ */ _(i, { direction: d, gap: u, alignItems: m, children: [
730
740
  f,
731
- g
732
- ] }), e[16] = r, e[17] = d, e[18] = m, e[19] = u, e[20] = f, e[21] = p) : p = e[21], p;
733
- }, Zl = (l) => {
741
+ h
742
+ ] }), e[16] = i, e[17] = d, e[18] = u, e[19] = m, e[20] = f, e[21] = S) : S = e[21], S;
743
+ }, ol = (o) => {
734
744
  const e = z(36), {
735
745
  rows: t,
736
- columnId: o,
746
+ columnId: l,
737
747
  binCount: n
738
- } = l;
739
- let r, c, i, s, d, m, u, f, g, p, b, h, x, w;
740
- if (e[0] !== n || e[1] !== o || e[2] !== t) {
741
- m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
748
+ } = o;
749
+ let i, c, s, r, d, u, m, f, h, S, b, x, g, v;
750
+ if (e[0] !== n || e[1] !== l || e[2] !== t) {
751
+ u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
742
752
  e: {
743
- const S = Ul(t, o, n);
744
- if (!S) {
753
+ const C = el(t, l, n);
754
+ if (!C) {
745
755
  let A;
746
- e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], m = A;
756
+ e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: "No numeric values" }), e[17] = A) : A = e[17], u = A;
747
757
  break e;
748
758
  }
749
- const I = S.bins.reduce(oo, 0);
750
- if (S.min === S.max) {
751
- m = /* @__PURE__ */ a(et, { value: G(S.min), count: I });
759
+ const y = C.bins.reduce(sl, 0);
760
+ if (C.min === C.max) {
761
+ u = /* @__PURE__ */ a(ot, { value: Y(C.min), count: y });
752
762
  break e;
753
763
  }
754
- i = ee, b = "column", h = "100%", x = "2xs", w = /* @__PURE__ */ a(Ze, { data: S.bins, dataKey: "count", color: Qe, height: "40px", ariaLabel: `Distribution for ${o}`, tooltipLabel: no, tooltipValue: ro, tooltipSeriesLabel: "Count" }), c = ee, f = "space-between", g = "xs", p = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: G(S.min) }), r = O, s = "label/XS/regular", d = "fg.muted", u = G(S.max);
764
+ s = oe, b = "column", x = "100%", g = "2xs", v = /* @__PURE__ */ a(et, { data: C.bins, dataKey: "count", color: tt, height: "40px", ariaLabel: `Distribution for ${l}`, tooltipLabel: al, tooltipValue: cl, tooltipSeriesLabel: "Count" }), c = oe, f = "space-between", h = "xs", S = /* @__PURE__ */ a(O, { textStyle: "label/XS/regular", color: "fg.muted", children: Y(C.min) }), i = O, r = "label/XS/regular", d = "fg.muted", m = Y(C.max);
755
765
  }
756
- e[0] = n, e[1] = o, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m, e[9] = u, e[10] = f, e[11] = g, e[12] = p, e[13] = b, e[14] = h, e[15] = x, e[16] = w;
766
+ e[0] = n, e[1] = l, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u, e[9] = m, e[10] = f, e[11] = h, e[12] = S, e[13] = b, e[14] = x, e[15] = g, e[16] = v;
757
767
  } else
758
- r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8], u = e[9], f = e[10], g = e[11], p = e[12], b = e[13], h = e[14], x = e[15], w = e[16];
759
- if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
760
- return m;
761
- let y;
762
- e[18] !== r || e[19] !== s || e[20] !== d || e[21] !== u ? (y = /* @__PURE__ */ a(r, { textStyle: s, color: d, children: u }), e[18] = r, e[19] = s, e[20] = d, e[21] = u, e[22] = y) : y = e[22];
763
- let C;
764
- e[23] !== c || e[24] !== y || e[25] !== f || e[26] !== g || e[27] !== p ? (C = /* @__PURE__ */ _(c, { justifyContent: f, gap: g, children: [
765
- p,
766
- y
767
- ] }), e[23] = c, e[24] = y, e[25] = f, e[26] = g, e[27] = p, e[28] = C) : C = e[28];
768
- let v;
769
- return e[29] !== i || e[30] !== C || e[31] !== b || e[32] !== h || e[33] !== x || e[34] !== w ? (v = /* @__PURE__ */ _(i, { direction: b, width: h, gap: x, children: [
770
- w,
771
- C
772
- ] }), e[29] = i, e[30] = C, e[31] = b, e[32] = h, e[33] = x, e[34] = w, e[35] = v) : v = e[35], v;
773
- }, Ql = (l) => {
768
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8], m = e[9], f = e[10], h = e[11], S = e[12], b = e[13], x = e[14], g = e[15], v = e[16];
769
+ if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
770
+ return u;
771
+ let w;
772
+ e[18] !== i || e[19] !== r || e[20] !== d || e[21] !== m ? (w = /* @__PURE__ */ a(i, { textStyle: r, color: d, children: m }), e[18] = i, e[19] = r, e[20] = d, e[21] = m, e[22] = w) : w = e[22];
773
+ let p;
774
+ e[23] !== c || e[24] !== w || e[25] !== f || e[26] !== h || e[27] !== S ? (p = /* @__PURE__ */ _(c, { justifyContent: f, gap: h, children: [
775
+ S,
776
+ w
777
+ ] }), e[23] = c, e[24] = w, e[25] = f, e[26] = h, e[27] = S, e[28] = p) : p = e[28];
778
+ let R;
779
+ return e[29] !== s || e[30] !== p || e[31] !== b || e[32] !== x || e[33] !== g || e[34] !== v ? (R = /* @__PURE__ */ _(s, { direction: b, width: x, gap: g, children: [
780
+ v,
781
+ p
782
+ ] }), e[29] = s, e[30] = p, e[31] = b, e[32] = x, e[33] = g, e[34] = v, e[35] = R) : R = e[35], R;
783
+ }, ll = (o) => {
774
784
  const e = z(15), {
775
785
  rows: t,
776
- columnId: o,
786
+ columnId: l,
777
787
  limit: n
778
- } = l;
779
- let r, c, i, s, d, m;
780
- if (e[0] !== o || e[1] !== n || e[2] !== t) {
781
- m = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
788
+ } = o;
789
+ let i, c, s, r, d, u;
790
+ if (e[0] !== l || e[1] !== n || e[2] !== t) {
791
+ u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
782
792
  e: {
783
- const f = Gl(t, o, n);
793
+ const f = Qo(t, l, n);
784
794
  if (f.length === 1 && f[0]) {
785
- m = /* @__PURE__ */ a(et, { value: f[0].label, count: f[0].count });
795
+ u = /* @__PURE__ */ a(ot, { value: f[0].label, count: f[0].count });
786
796
  break e;
787
797
  }
788
- r = ee, c = "column", i = "100%", s = "2xs", d = f.map(ao);
798
+ i = oe, c = "column", s = "100%", r = "2xs", d = f.map(ml);
789
799
  }
790
- e[0] = o, e[1] = n, e[2] = t, e[3] = r, e[4] = c, e[5] = i, e[6] = s, e[7] = d, e[8] = m;
800
+ e[0] = l, e[1] = n, e[2] = t, e[3] = i, e[4] = c, e[5] = s, e[6] = r, e[7] = d, e[8] = u;
791
801
  } else
792
- r = e[3], c = e[4], i = e[5], s = e[6], d = e[7], m = e[8];
793
- if (m !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
794
- return m;
795
- let u;
796
- return e[9] !== r || e[10] !== c || e[11] !== i || e[12] !== s || e[13] !== d ? (u = /* @__PURE__ */ a(r, { direction: c, width: i, gap: s, children: d }), e[9] = r, e[10] = c, e[11] = i, e[12] = s, e[13] = d, e[14] = u) : u = e[14], u;
797
- }, eo = (l) => {
802
+ i = e[3], c = e[4], s = e[5], r = e[6], d = e[7], u = e[8];
803
+ if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
804
+ return u;
805
+ let m;
806
+ return e[9] !== i || e[10] !== c || e[11] !== s || e[12] !== r || e[13] !== d ? (m = /* @__PURE__ */ a(i, { direction: c, width: s, gap: r, children: d }), e[9] = i, e[10] = c, e[11] = s, e[12] = r, e[13] = d, e[14] = m) : m = e[14], m;
807
+ }, nl = (o) => {
798
808
  const e = z(11), {
799
809
  rows: t,
800
- columnId: o,
810
+ columnId: l,
801
811
  stat: n
802
- } = l;
812
+ } = o;
803
813
  if (n.type === "unique") {
804
- let i;
805
- return e[0] !== o || e[1] !== t ? (i = /* @__PURE__ */ a(Yl, { rows: t, columnId: o }), e[0] = o, e[1] = t, e[2] = i) : i = e[2], i;
814
+ let s;
815
+ return e[0] !== l || e[1] !== t ? (s = /* @__PURE__ */ a(tl, { rows: t, columnId: l }), e[0] = l, e[1] = t, e[2] = s) : s = e[2], s;
806
816
  }
807
817
  if (n.type === "histogram") {
808
- const i = n.bins ?? 10;
809
- let s;
810
- return e[3] !== o || e[4] !== t || e[5] !== i ? (s = /* @__PURE__ */ a(Zl, { rows: t, columnId: o, binCount: i }), e[3] = o, e[4] = t, e[5] = i, e[6] = s) : s = e[6], s;
818
+ const s = n.bins ?? 10;
819
+ let r;
820
+ return e[3] !== l || e[4] !== t || e[5] !== s ? (r = /* @__PURE__ */ a(ol, { rows: t, columnId: l, binCount: s }), e[3] = l, e[4] = t, e[5] = s, e[6] = r) : r = e[6], r;
811
821
  }
812
- const r = n.limit ?? 2;
822
+ const i = n.limit ?? 2;
813
823
  let c;
814
- return e[7] !== o || e[8] !== t || e[9] !== r ? (c = /* @__PURE__ */ a(Ql, { rows: t, columnId: o, limit: r }), e[7] = o, e[8] = t, e[9] = r, e[10] = c) : c = e[10], c;
815
- }, to = (l) => {
824
+ return e[7] !== l || e[8] !== t || e[9] !== i ? (c = /* @__PURE__ */ a(ll, { rows: t, columnId: l, limit: i }), e[7] = l, e[8] = t, e[9] = i, e[10] = c) : c = e[10], c;
825
+ }, rl = (o) => {
816
826
  const e = z(12), {
817
827
  header: t,
818
- headerGroup: o,
828
+ headerGroup: l,
819
829
  rows: n,
820
- columnStats: r,
830
+ columnStats: i,
821
831
  fullWidth: c
822
- } = l, i = r[t.column.id], s = i?.type;
832
+ } = o, s = i[t.column.id], r = s?.type;
823
833
  let d;
824
834
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
825
835
  borderRight: "none"
826
836
  }, e[0] = d) : d = e[0];
827
- const m = c && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
828
- let u;
829
- e[1] !== m ? (u = {
830
- width: m
831
- }, e[1] = m, e[2] = u) : u = e[2];
837
+ const u = c && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
838
+ let m;
839
+ e[1] !== u ? (m = {
840
+ width: u
841
+ }, e[1] = u, e[2] = m) : m = e[2];
832
842
  let f;
833
- e[3] !== t.column.id || e[4] !== n || e[5] !== i ? (f = i ? /* @__PURE__ */ a(eo, { rows: n, columnId: t.column.id, stat: i }) : null, e[3] = t.column.id, e[4] = n, e[5] = i, e[6] = f) : f = e[6];
834
- let g;
835
- return e[7] !== t.column.id || e[8] !== s || e[9] !== u || e[10] !== f ? (g = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": s, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: u, children: f }), e[7] = t.column.id, e[8] = s, e[9] = u, e[10] = f, e[11] = g) : g = e[11], g;
836
- }, lo = (l) => {
843
+ e[3] !== t.column.id || e[4] !== n || e[5] !== s ? (f = s ? /* @__PURE__ */ a(nl, { rows: n, columnId: t.column.id, stat: s }) : null, e[3] = t.column.id, e[4] = n, e[5] = s, e[6] = f) : f = e[6];
844
+ let h;
845
+ return e[7] !== t.column.id || e[8] !== r || e[9] !== m || e[10] !== f ? (h = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": t.column.id, "data-stat-type": r, borderRight: "1px solid", _last: d, borderColor: "border.subtle", padding: "xs", verticalAlign: "middle", overflow: "hidden", style: m, children: f }), e[7] = t.column.id, e[8] = r, e[9] = m, e[10] = f, e[11] = h) : h = e[11], h;
846
+ }, il = (o) => {
837
847
  const e = z(8), {
838
848
  headerGroup: t,
839
- rows: o,
849
+ rows: l,
840
850
  columnStats: n,
841
- fullWidth: r,
851
+ fullWidth: i,
842
852
  noBorder: c
843
- } = l;
844
- if (!t.headers.some((u) => n[u.column.id]))
853
+ } = o;
854
+ if (!t.headers.some((m) => n[m.column.id]))
845
855
  return null;
846
- const s = c ? "none" : "1px solid";
856
+ const r = c ? "none" : "1px solid";
847
857
  let d;
848
- e[0] !== n || e[1] !== r || e[2] !== t || e[3] !== o ? (d = t.headers.map((u) => /* @__PURE__ */ a(to, { header: u, headerGroup: t, rows: o, columnStats: n, fullWidth: r }, u.id)), e[0] = n, e[1] = r, e[2] = t, e[3] = o, e[4] = d) : d = e[4];
849
- let m;
850
- return e[5] !== s || e[6] !== d ? (m = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: s, borderColor: "border.subtle", children: d }), e[5] = s, e[6] = d, e[7] = m) : m = e[7], m;
858
+ e[0] !== n || e[1] !== i || e[2] !== t || e[3] !== l ? (d = t.headers.map((m) => /* @__PURE__ */ a(rl, { header: m, headerGroup: t, rows: l, columnStats: n, fullWidth: i }, m.id)), e[0] = n, e[1] = i, e[2] = t, e[3] = l, e[4] = d) : d = e[4];
859
+ let u;
860
+ return e[5] !== r || e[6] !== d ? (u = /* @__PURE__ */ a(L.Row, { className: "data-table-stats-row", borderRight: r, borderColor: "border.subtle", children: d }), e[5] = r, e[6] = d, e[7] = u) : u = e[7], u;
851
861
  };
852
- function oo(l, e) {
853
- return l + e.count;
862
+ function sl(o, e) {
863
+ return o + e.count;
854
864
  }
855
- function no(l) {
856
- return `${G(l.start)} – ${G(l.end)}`;
865
+ function al(o) {
866
+ return `${Y(o.start)} – ${Y(o.end)}`;
857
867
  }
858
- function ro(l) {
859
- return `${G(Number(l))} values`;
868
+ function cl(o) {
869
+ return `${Y(Number(o))} values`;
860
870
  }
861
- function io(l) {
862
- return `${l.label} · ${G(l.count)} values`;
871
+ function dl(o) {
872
+ return `${o.label} · ${Y(o.count)} values`;
863
873
  }
864
- function so(l) {
865
- return `${G(Number(l))}%`;
874
+ function ul(o) {
875
+ return `${Y(Number(o))}%`;
866
876
  }
867
- function ao(l) {
868
- return /* @__PURE__ */ _(oe, { position: "relative", height: "18px", children: [
869
- /* @__PURE__ */ a(Ze, { data: [l], dataKey: "percentage", categoryKey: "label", color: Qe, height: "18px", ariaLabel: `${l.label}: ${l.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: io, tooltipValue: so, tooltipSeriesLabel: "Share" }),
870
- /* @__PURE__ */ _(ee, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
871
- /* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: l.label }),
877
+ function ml(o) {
878
+ return /* @__PURE__ */ _(re, { position: "relative", height: "18px", children: [
879
+ /* @__PURE__ */ a(et, { data: [o], dataKey: "percentage", categoryKey: "label", color: tt, height: "18px", ariaLabel: `${o.label}: ${o.percentage}%`, layout: "vertical", domain: [0, 100], barSize: 18, tooltipLabel: dl, tooltipValue: ul, tooltipSeriesLabel: "Share" }),
880
+ /* @__PURE__ */ _(oe, { position: "absolute", inset: "0", paddingX: "2xs", justifyContent: "space-between", gap: "xs", pointerEvents: "none", children: [
881
+ /* @__PURE__ */ a(O, { textStyle: "label/2XS", color: "fg.inverted", truncate: !0, children: o.label }),
872
882
  /* @__PURE__ */ _(O, { textStyle: "label/2XS/medium", color: "fg.muted", children: [
873
- l.percentage,
883
+ o.percentage,
874
884
  "%"
875
885
  ] })
876
886
  ] })
877
- ] }, l.label);
887
+ ] }, o.label);
878
888
  }
879
- const co = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), uo = (l) => l === "asc" ? Ke : l === "desc" ? Je : Rt, mo = (l) => {
889
+ const fl = /* @__PURE__ */ new Set(["rowIndex", "rowSelection", "rowActions"]), hl = (o) => o === "asc" ? Xe : o === "desc" ? qe : At, gl = (o) => {
880
890
  const e = z(37), {
881
891
  header: t,
882
- headerGroup: o,
892
+ headerGroup: l,
883
893
  table: n,
884
- fullWidth: r,
894
+ fullWidth: i,
885
895
  hasDescription: c
886
- } = l;
887
- let i, s, d;
896
+ } = o;
897
+ let s, r, d;
888
898
  if (e[0] !== t.column || e[1] !== n) {
889
- s = t.column.getIsSorted();
899
+ r = t.column.getIsSorted();
890
900
  let $;
891
- e[5] !== t.column.id || e[6] !== n ? ($ = !co.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], i = $, d = uo(s), e[0] = t.column, e[1] = n, e[2] = i, e[3] = s, e[4] = d;
901
+ e[5] !== t.column.id || e[6] !== n ? ($ = !fl.has(t.column.id) && n.getCoreRowModel().rows.length > 1, e[5] = t.column.id, e[6] = n, e[7] = $) : $ = e[7], s = $, d = hl(r), e[0] = t.column, e[1] = n, e[2] = s, e[3] = r, e[4] = d;
892
902
  } else
893
- i = e[2], s = e[3], d = e[4];
894
- const m = d;
895
- let u;
896
- e[8] !== t ? (u = t.column.id === "rowSelection" ? "Select all" : he(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = u) : u = e[9];
897
- const f = u, g = t.column.id;
898
- let p;
899
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
903
+ s = e[2], r = e[3], d = e[4];
904
+ const u = d;
905
+ let m;
906
+ e[8] !== t ? (m = t.column.id === "rowSelection" ? "Select all" : be(t.column.columnDef.header, t.getContext()), e[8] = t, e[9] = m) : m = e[9];
907
+ const f = m, h = t.column.id;
908
+ let S;
909
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
900
910
  borderRight: "none"
901
- }, e[10] = p) : p = e[10];
902
- const b = t.id, h = r && o.headers.indexOf(t) === o.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
903
- let x;
904
- e[11] !== h ? (x = {
905
- width: h
906
- }, e[11] = h, e[12] = x) : x = e[12];
911
+ }, e[10] = S) : S = e[10];
912
+ const b = t.id, x = i && l.headers.indexOf(t) === l.headers.length - 1 ? void 0 : `calc(var(--header-${t.id}-size) * 1px)`;
913
+ let g;
914
+ e[11] !== x ? (g = {
915
+ width: x
916
+ }, e[11] = x, e[12] = g) : g = e[12];
917
+ let v;
918
+ e[13] !== t ? (v = be(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = v) : v = e[14];
907
919
  let w;
908
- e[13] !== t ? (w = he(t.column.columnDef.header, t.getContext()), e[13] = t, e[14] = w) : w = e[14];
909
- let y;
910
- e[15] !== w ? (y = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: w }), e[15] = w, e[16] = y) : y = e[16];
911
- let C;
912
- e[17] !== m || e[18] !== i || e[19] !== t.column || e[20] !== s ? (C = i && /* @__PURE__ */ _(X.Root, { children: [
913
- /* @__PURE__ */ a(X.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Se, { ml: "2px", size: "2xs", "aria-label": s ? `Sorted ${s}` : "Sort column", variant: "ghost", visibility: s ? "visible" : "hidden", _groupHover: {
920
+ e[15] !== v ? (w = /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: v }), e[15] = v, e[16] = w) : w = e[16];
921
+ let p;
922
+ e[17] !== u || e[18] !== s || e[19] !== t.column || e[20] !== r ? (p = s && /* @__PURE__ */ _(G.Root, { children: [
923
+ /* @__PURE__ */ a(G.Trigger, { asChild: !0, children: /* @__PURE__ */ a(we, { ml: "2px", size: "2xs", "aria-label": r ? `Sorted ${r}` : "Sort column", variant: "ghost", visibility: r ? "visible" : "hidden", _groupHover: {
914
924
  visibility: "visible"
915
- }, children: /* @__PURE__ */ a(Y, { as: m, boxSize: "14px" }) }) }),
916
- /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ a(X.Positioner, { children: /* @__PURE__ */ _(X.Content, { zIndex: "popover", bg: "bg", children: [
917
- /* @__PURE__ */ a(X.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(Y, { as: Ke, boxSize: "16px" }), disabled: s === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
918
- /* @__PURE__ */ a(X.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(Y, { as: Je, boxSize: "16px" }), disabled: s === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
919
- s && /* @__PURE__ */ a(X.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(se, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
925
+ }, children: /* @__PURE__ */ a(ee, { as: u, boxSize: "14px" }) }) }),
926
+ /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(G.Positioner, { children: /* @__PURE__ */ _(G.Content, { zIndex: "popover", bg: "bg", children: [
927
+ /* @__PURE__ */ a(G.Item, { value: "sort-asc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort ascending", icon: /* @__PURE__ */ a(ee, { as: Xe, boxSize: "16px" }), disabled: r === "asc", onActivate: () => t.column.toggleSorting(!1) }) }),
928
+ /* @__PURE__ */ a(G.Item, { value: "sort-desc", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Sort descending", icon: /* @__PURE__ */ a(ee, { as: qe, boxSize: "16px" }), disabled: r === "desc", onActivate: () => t.column.toggleSorting(!0) }) }),
929
+ r && /* @__PURE__ */ a(G.Item, { value: "clear-sort", asChild: !0, children: /* @__PURE__ */ a(ce, { asChild: !0, variant: "full-width", label: "Clear sort", onActivate: () => t.column.clearSorting() }) })
920
930
  ] }) }) })
921
- ] }), e[17] = m, e[18] = i, e[19] = t.column, e[20] = s, e[21] = C) : C = e[21];
922
- let v;
923
- e[22] !== t ? (v = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = v) : v = e[23];
924
- let S;
925
- e[24] !== v || e[25] !== y || e[26] !== C ? (S = /* @__PURE__ */ _(ee, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
926
- y,
927
- C,
928
- v
929
- ] }), e[24] = v, e[25] = y, e[26] = C, e[27] = S) : S = e[27];
930
- let I;
931
- e[28] !== c || e[29] !== S || e[30] !== f ? (I = /* @__PURE__ */ a(Fe, { content: f, disabled: c, children: S }), e[28] = c, e[29] = S, e[30] = f, e[31] = I) : I = e[31];
931
+ ] }), e[17] = u, e[18] = s, e[19] = t.column, e[20] = r, e[21] = p) : p = e[21];
932
+ let R;
933
+ e[22] !== t ? (R = t.column.getCanResize() && /* @__PURE__ */ a("span", { onDoubleClick: () => t.column.resetSize(), onMouseDown: t.getResizeHandler(), onTouchStart: t.getResizeHandler(), className: `resizer ${t.column.getIsResizing() ? "isResizing" : ""}` }), e[22] = t, e[23] = R) : R = e[23];
934
+ let C;
935
+ e[24] !== R || e[25] !== w || e[26] !== p ? (C = /* @__PURE__ */ _(oe, { className: "group", alignItems: "center", justifyContent: "space-between", gap: "1", flex: "1", minW: "0", children: [
936
+ w,
937
+ p,
938
+ R
939
+ ] }), e[24] = R, e[25] = w, e[26] = p, e[27] = C) : C = e[27];
940
+ let y;
941
+ e[28] !== c || e[29] !== C || e[30] !== f ? (y = /* @__PURE__ */ a(Je, { content: f, disabled: c, children: C }), e[28] = c, e[29] = C, e[30] = f, e[31] = y) : y = e[31];
932
942
  let A;
933
- return e[32] !== t.column.id || e[33] !== t.id || e[34] !== I || e[35] !== x ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": g, textTransform: "none", borderRight: "1px solid", _last: p, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: x, children: I }, b), e[32] = t.column.id, e[33] = t.id, e[34] = I, e[35] = x, e[36] = A) : A = e[36], A;
934
- }, fo = (l) => {
935
- const e = z(20), {
943
+ return e[32] !== t.column.id || e[33] !== t.id || e[34] !== y || e[35] !== g ? (A = /* @__PURE__ */ a(L.ColumnHeader, { "data-column-id": h, textTransform: "none", borderRight: "1px solid", _last: S, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", overflow: "hidden", position: "relative", verticalAlign: "middle", whiteSpace: "nowrap", style: g, children: y }, b), e[32] = t.column.id, e[33] = t.id, e[34] = y, e[35] = g, e[36] = A) : A = e[36], A;
944
+ }, bl = (o) => {
945
+ const e = z(26), {
936
946
  cell: t,
937
- row: o,
938
- getCellContextMenuActions: n
939
- } = l, r = t.column.columnDef.meta;
940
- let c;
941
- e[0] !== t || e[1] !== r ? (c = r?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = r, e[2] = c) : c = e[2];
942
- const i = c;
947
+ row: l,
948
+ wrapRows: n,
949
+ getCellContextMenuActions: i
950
+ } = o, c = t.column.columnDef.meta;
943
951
  let s;
944
- if (e[3] !== t || e[4] !== n || e[5] !== o.id || e[6] !== o.original) {
945
- const x = {
946
- row: o.original,
947
- rowId: o.id,
952
+ e[0] !== t || e[1] !== c ? (s = c?.getCellStyle?.(t.getValue()), e[0] = t, e[1] = c, e[2] = s) : s = e[2];
953
+ const r = s;
954
+ let d;
955
+ if (e[3] !== t || e[4] !== i || e[5] !== l.id || e[6] !== l.original) {
956
+ const A = {
957
+ row: l.original,
958
+ rowId: l.id,
948
959
  columnId: t.column.id,
949
960
  value: t.getValue()
950
961
  };
951
- s = n?.(x).map((w) => ({
952
- key: w.label,
953
- label: w.label,
954
- icon: w.icon,
955
- onClick: () => w.onSelect(x)
956
- })) ?? [], e[3] = t, e[4] = n, e[5] = o.id, e[6] = o.original, e[7] = s;
962
+ d = i?.(A).map(($) => ({
963
+ key: $.label,
964
+ label: $.label,
965
+ icon: $.icon,
966
+ onClick: () => $.onSelect(A)
967
+ })) ?? [], e[3] = t, e[4] = i, e[5] = l.id, e[6] = l.original, e[7] = d;
957
968
  } else
958
- s = e[7];
959
- const d = s, m = t.column.id;
960
- let u;
961
- e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = {
969
+ d = e[7];
970
+ const u = d, m = t.column.id, f = n ? "anywhere" : void 0, h = n ? void 0 : "10", S = n ? void 0 : "10";
971
+ let b;
972
+ e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
962
973
  borderRight: "none"
963
- }, e[8] = u) : u = e[8];
964
- const f = t.id;
965
- let g;
966
- e[9] !== t ? (g = he(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = g) : g = e[10];
974
+ }, e[8] = b) : b = e[8];
975
+ const x = t.id, g = n ? void 0 : "ellipsis", v = n ? "top" : "middle", w = n ? "normal" : "nowrap";
967
976
  let p;
968
- e[11] !== t.column.id || e[12] !== t.id || e[13] !== i || e[14] !== g ? (p = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: u, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: "ellipsis", whiteSpace: "nowrap", style: i, children: g }, f), e[11] = t.column.id, e[12] = t.id, e[13] = i, e[14] = g, e[15] = p) : p = e[15];
969
- const b = p;
970
- if (d.length === 0)
971
- return b;
972
- let h;
973
- return e[16] !== t.id || e[17] !== b || e[18] !== d ? (h = /* @__PURE__ */ a(At, { actions: d, children: b }, t.id), e[16] = t.id, e[17] = b, e[18] = d, e[19] = h) : h = e[19], h;
974
- }, go = (l) => {
975
- const e = z(21), {
977
+ e[9] !== t ? (p = be(t.column.columnDef.cell, t.getContext()), e[9] = t, e[10] = p) : p = e[10];
978
+ let R;
979
+ e[11] !== t.column.id || e[12] !== t.id || e[13] !== r || e[14] !== w || e[15] !== p || e[16] !== f || e[17] !== h || e[18] !== S || e[19] !== g || e[20] !== v ? (R = /* @__PURE__ */ a(L.Cell, { "data-column-id": m, width: "fit-content", maxWidth: "12rem", overflow: "hidden", overflowWrap: f, padding: "xs", height: h, maxHeight: S, borderRight: "1px solid", borderColor: "border.subtle", _last: b, borderBottom: "none", textStyle: "paragraph/S/regular", textOverflow: g, verticalAlign: v, whiteSpace: w, style: r, children: p }, x), e[11] = t.column.id, e[12] = t.id, e[13] = r, e[14] = w, e[15] = p, e[16] = f, e[17] = h, e[18] = S, e[19] = g, e[20] = v, e[21] = R) : R = e[21];
980
+ const C = R;
981
+ if (u.length === 0)
982
+ return C;
983
+ let y;
984
+ return e[22] !== t.id || e[23] !== C || e[24] !== u ? (y = /* @__PURE__ */ a(kt, { actions: u, children: C }, t.id), e[22] = t.id, e[23] = C, e[24] = u, e[25] = y) : y = e[25], y;
985
+ }, pl = (o) => {
986
+ const e = z(23), {
976
987
  row: t,
977
- noBorder: o,
988
+ noBorder: l,
978
989
  rowIsInteractive: n,
979
- rowIsActive: r,
990
+ rowIsActive: i,
980
991
  rowIsSelected: c,
981
- onRowClick: i,
982
- getCellContextMenuActions: s
983
- } = l, d = t.id, m = r ? "true" : void 0, u = c ? "true" : void 0, f = c ? "true" : void 0, g = n ? "pointer" : void 0;
992
+ wrapRows: s,
993
+ onRowClick: r,
994
+ getCellContextMenuActions: d
995
+ } = o, u = t.id, m = i ? "true" : void 0, f = c ? "true" : void 0, h = c ? "true" : void 0, S = s ? void 0 : "10", b = n ? "pointer" : void 0;
996
+ let x;
997
+ e[0] !== r || e[1] !== t.original || e[2] !== n ? (x = n ? () => r?.(t.original) : void 0, e[0] = r, e[1] = t.original, e[2] = n, e[3] = x) : x = e[3];
998
+ const g = l ? "none" : "1px solid", v = l ? "none" : "1px solid", w = l ? "none" : "1px solid";
984
999
  let p;
985
- e[0] !== i || e[1] !== t.original || e[2] !== n ? (p = n ? () => i?.(t.original) : void 0, e[0] = i, e[1] = t.original, e[2] = n, e[3] = p) : p = e[3];
986
- const b = o ? "none" : "1px solid", h = o ? "none" : "1px solid", x = o ? "none" : "1px solid";
987
- let w;
988
- e[4] !== x ? (w = {
989
- borderBottom: x,
1000
+ e[4] !== w ? (p = {
1001
+ borderBottom: w,
990
1002
  borderColor: "border.subtle"
991
- }, e[4] = x, e[5] = w) : w = e[5];
992
- const y = r ? "bg.active" : "bg";
1003
+ }, e[4] = w, e[5] = p) : p = e[5];
1004
+ const R = i ? "bg.active" : "bg";
993
1005
  let C;
994
- e[6] !== s || e[7] !== t ? (C = t.getVisibleCells().map((S) => /* @__PURE__ */ a(fo, { cell: S, row: t, getCellContextMenuActions: s }, S.id)), e[6] = s, e[7] = t, e[8] = C) : C = e[8];
995
- let v;
996
- return e[9] !== t.id || e[10] !== m || e[11] !== y || e[12] !== C || e[13] !== u || e[14] !== f || e[15] !== g || e[16] !== p || e[17] !== b || e[18] !== h || e[19] !== w ? (v = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": u, "aria-selected": f, cursor: g, onClick: p, borderTop: b, borderBottom: "1px solid", borderRight: h, _last: w, borderColor: "border.subtle", background: y, children: C }, d), e[9] = t.id, e[10] = m, e[11] = y, e[12] = C, e[13] = u, e[14] = f, e[15] = g, e[16] = p, e[17] = b, e[18] = h, e[19] = w, e[20] = v) : v = e[20], v;
997
- }, ho = (l) => {
1006
+ e[6] !== d || e[7] !== t || e[8] !== s ? (C = t.getVisibleCells().map((A) => /* @__PURE__ */ a(bl, { cell: A, row: t, wrapRows: s, getCellContextMenuActions: d }, A.id)), e[6] = d, e[7] = t, e[8] = s, e[9] = C) : C = e[9];
1007
+ let y;
1008
+ return e[10] !== t.id || e[11] !== m || e[12] !== p || e[13] !== R || e[14] !== C || e[15] !== f || e[16] !== h || e[17] !== S || e[18] !== b || e[19] !== x || e[20] !== g || e[21] !== v ? (y = /* @__PURE__ */ a(L.Row, { "data-active": m, "data-selected": f, "aria-selected": h, height: S, cursor: b, onClick: x, borderTop: g, borderBottom: "1px solid", borderRight: v, _last: p, borderColor: "border.subtle", background: R, children: C }, u), e[10] = t.id, e[11] = m, e[12] = p, e[13] = R, e[14] = C, e[15] = f, e[16] = h, e[17] = S, e[18] = b, e[19] = x, e[20] = g, e[21] = v, e[22] = y) : y = e[22], y;
1009
+ }, Sl = (o, e) => o.map((t) => ({
1010
+ id: t,
1011
+ label: e?.[t] ?? t
1012
+ })), wl = (o) => {
998
1013
  const e = z(12), {
999
1014
  table: t,
1000
- pagination: o,
1015
+ pagination: l,
1001
1016
  pageSizeOptions: n
1002
- } = l;
1017
+ } = o;
1018
+ let i;
1019
+ e[0] !== t ? (i = t.getPageCount(), e[0] = t, e[1] = i) : i = e[1];
1020
+ const c = l.pageIndex, s = l.pageSize;
1003
1021
  let r;
1004
- e[0] !== t ? (r = t.getPageCount(), e[0] = t, e[1] = r) : r = e[1];
1005
- const c = o.pageIndex, i = o.pageSize;
1006
- let s;
1007
- e[2] !== t ? (s = t.getCoreRowModel(), e[2] = t, e[3] = s) : s = e[3];
1022
+ e[2] !== t ? (r = t.getCoreRowModel(), e[2] = t, e[3] = r) : r = e[3];
1008
1023
  let d;
1009
- return e[4] !== n || e[5] !== o.pageIndex || e[6] !== o.pageSize || e[7] !== r || e[8] !== s.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Wt, { pageCount: r, pageIndex: c, pageSize: i, pageSizeOptions: n, totalRows: s.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = o.pageIndex, e[6] = o.pageSize, e[7] = r, e[8] = s.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
1010
- }, bo = (l) => {
1024
+ return e[4] !== n || e[5] !== l.pageIndex || e[6] !== l.pageSize || e[7] !== i || e[8] !== r.rows.length || e[9] !== t.setPageIndex || e[10] !== t.setPageSize ? (d = /* @__PURE__ */ a(Xt, { pageCount: i, pageIndex: c, pageSize: s, pageSizeOptions: n, totalRows: r.rows.length, onPageChange: t.setPageIndex, onPageSizeChange: t.setPageSize }), e[4] = n, e[5] = l.pageIndex, e[6] = l.pageSize, e[7] = i, e[8] = r.rows.length, e[9] = t.setPageIndex, e[10] = t.setPageSize, e[11] = d) : d = e[11], d;
1025
+ }, xl = (o) => {
1011
1026
  const {
1012
1027
  data: e,
1013
1028
  noBorder: t,
1014
- fullWidth: o,
1029
+ fullWidth: l,
1015
1030
  hiddenColumns: n,
1016
- onRowClick: r,
1031
+ onRowClick: i,
1017
1032
  isRowInteractive: c,
1018
- activeRowId: i,
1019
- columnIcons: s,
1033
+ activeRowId: s,
1034
+ columnIcons: r,
1020
1035
  columnDescriptions: d,
1021
- compactHeaders: m,
1022
- columnStats: u,
1036
+ compactHeaders: u,
1037
+ columnStats: m,
1023
1038
  columnRenderers: f,
1024
- initialPageSize: g,
1025
- pageSizeOptions: p = [10, 20, 30, 50, 100],
1039
+ initialPageSize: h,
1040
+ pageSizeOptions: S = [10, 20, 30, 50, 100],
1026
1041
  rowActions: b = [],
1027
- getRowActions: h,
1028
- getRowId: x,
1029
- toolbarStorageKey: w,
1030
- enableRowActivation: y = !1,
1031
- getCellContextMenuActions: C
1032
- } = l, [v, S] = Z([]), [I, A] = Z(() => ({
1042
+ getRowActions: x,
1043
+ getRowId: g,
1044
+ toolbarStorageKey: v,
1045
+ enableRowActivation: w = !1,
1046
+ getCellContextMenuActions: p
1047
+ } = o, [R, C] = Q([]), [y, A] = Q(() => ({
1033
1048
  pageIndex: 0,
1034
- pageSize: zt({
1035
- initialPageSize: g
1049
+ pageSize: Mt({
1050
+ initialPageSize: h
1036
1051
  })
1037
- })), [$, D] = Z({}), [N, M] = Z(!0), [P, j] = Z(() => {
1038
- const R = new Set(n ?? []);
1039
- return Object.keys(e[0] || {}).filter((V) => !R.has(V));
1040
- }), [E, B] = Z(() => /* @__PURE__ */ new Set()), F = new Set(n ?? []), K = Object.keys(e[0] || {}).filter((R) => !F.has(R)), k = ze(K, P), T = new Set(k.filter((R) => !E.has(R))), W = k.filter((R) => T.has(R)), H = Tt(l), ue = Dt(l), te = Vt(e, k, m), Ie = Mt(e, k, x), Ae = Pt({
1041
- toolbarStorageKey: w,
1042
- columnKeys: K
1043
- }), tt = bt(Ae, (R) => R.filters, {
1052
+ })), [$, T] = Q({}), [P, M] = Q(!0), [D, K] = Q(!1), [W, N] = Q(() => {
1053
+ const I = new Set(n ?? []);
1054
+ return Object.keys(e[0] || {}).filter((V) => !I.has(V));
1055
+ }), [J, X] = Q(() => /* @__PURE__ */ new Set()), j = new Set(n ?? []), H = Object.keys(e[0] || {}).filter((I) => !j.has(I)), E = De(H, W), k = new Set(E.filter((I) => !J.has(I))), B = E.filter((I) => k.has(I)), F = Pt(o), le = Ht(o), Ae = Lt(e, E, u), $e = Ot(e, E, g), _e = Wt({
1056
+ toolbarStorageKey: v,
1057
+ columnKeys: H
1058
+ }), lt = St(_e, (I) => I.filters, {
1044
1059
  settings: {
1045
1060
  viewMode: "list"
1046
1061
  },
1047
- views: l.defaultViews,
1048
- activeViewId: l.defaultActiveViewId
1049
- }), $e = Ht(Ie, tt, te).map((R) => R.sourceRow), lt = El(e, W, {
1050
- columnIcons: s,
1062
+ views: o.defaultViews,
1063
+ activeViewId: o.defaultActiveViewId
1064
+ }), ke = Nt($e, lt, Ae).map((I) => I.sourceRow), nt = Ko(e, B, {
1065
+ columnIcons: r,
1051
1066
  columnDescriptions: d,
1052
- compactHeaders: m,
1053
- enableSelection: H,
1067
+ compactHeaders: u,
1068
+ enableSelection: F,
1054
1069
  rowActions: b,
1055
- getRowActions: h,
1070
+ getRowActions: x,
1056
1071
  selectedRowIds: $,
1057
- columnRenderers: f
1058
- }), J = dt({
1059
- data: $e,
1060
- columns: lt,
1072
+ columnRenderers: f,
1073
+ wrapRows: D
1074
+ }), q = mt({
1075
+ data: ke,
1076
+ columns: nt,
1061
1077
  defaultColumn: {
1062
1078
  size: 150,
1063
1079
  minSize: 40,
1064
1080
  maxSize: 800
1065
1081
  },
1066
1082
  state: {
1067
- sorting: v,
1068
- pagination: I,
1083
+ sorting: R,
1084
+ pagination: y,
1069
1085
  rowSelection: $
1070
1086
  },
1071
- getRowId: (R, V) => Lt(R, V, x),
1087
+ getRowId: (I, V) => jt(I, V, g),
1072
1088
  columnResizeMode: "onChange",
1073
1089
  columnResizeDirection: "ltr",
1074
- onSortingChange: S,
1090
+ onSortingChange: C,
1075
1091
  onPaginationChange: A,
1076
- onRowSelectionChange: D,
1077
- getSortedRowModel: ft(),
1078
- getCoreRowModel: mt(),
1079
- getPaginationRowModel: ut(),
1080
- enableMultiRowSelection: H,
1081
- enableRowSelection: H,
1092
+ onRowSelectionChange: T,
1093
+ getSortedRowModel: gt(),
1094
+ getCoreRowModel: ht(),
1095
+ getPaginationRowModel: ft(),
1096
+ enableMultiRowSelection: F,
1097
+ enableRowSelection: F,
1082
1098
  autoResetAll: !1
1083
1099
  });
1084
- We(() => {
1085
- const R = J.getPageCount();
1086
- R === 0 || I.pageIndex < R || A((V) => ({
1100
+ Ke(() => {
1101
+ const I = q.getPageCount();
1102
+ I === 0 || y.pageIndex < I || A((V) => ({
1087
1103
  ...V,
1088
- pageIndex: Math.max(R - 1, 0)
1104
+ pageIndex: Math.max(I - 1, 0)
1089
1105
  }));
1090
- }, [I.pageIndex, J]);
1091
- const ot = (() => {
1092
- const R = J.getFlatHeaders(), V = {};
1093
- for (let U = 0; U < R.length; U++) {
1094
- const q = R[U];
1095
- V[`--header-${q.id}-size`] = q.getSize(), V[`--col-${q.column.id}-size`] = q.column.getSize();
1106
+ }, [y.pageIndex, q]);
1107
+ const rt = (() => {
1108
+ const I = q.getFlatHeaders(), V = {};
1109
+ for (let Z = 0; Z < I.length; Z++) {
1110
+ const U = I[Z];
1111
+ V[`--header-${U.id}-size`] = U.getSize(), V[`--col-${U.column.id}-size`] = U.column.getSize();
1096
1112
  }
1097
1113
  return V;
1098
- })(), me = J.getSelectedRowModel().rows, nt = J.getCoreRowModel().rows, rt = Ot(me), it = /* @__PURE__ */ a(Wl, { columns: k.map((R) => ({
1099
- id: R,
1100
- label: m?.[R] ?? R
1101
- })), visibleColumnIds: T, showStats: N, statsAvailable: !!u, onColumnVisibilityChange: (R, V) => B((U) => {
1102
- const q = new Set(U);
1103
- return V ? q.delete(R) : q.add(R), q;
1104
- }), onColumnReorder: (R, V) => j((U) => Nt(ze(K, U), R, V)), onStatsVisibilityChange: M });
1105
- return /* @__PURE__ */ _(ee, { direction: "column", height: "100%", width: "100%", children: [
1106
- /* @__PURE__ */ a(jt, { rows: Ie, storageKey: Ae, attributes: te, columnControl: it, defaultViews: l.defaultViews, defaultActiveViewId: l.defaultActiveViewId }),
1107
- /* @__PURE__ */ _(oe, { position: "relative", flex: "1", minHeight: "0", children: [
1108
- /* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${o ? " full-width" : ""}`, style: {
1109
- ...ot,
1110
- width: o ? "100%" : J.getTotalSize()
1114
+ })(), fe = q.getSelectedRowModel().rows, it = q.getCoreRowModel().rows, st = Et(fe), at = /* @__PURE__ */ a(Xo, { columns: Sl(E, u), visibleColumnIds: k, wrapRows: D, showStats: P, statsAvailable: !!m, onColumnVisibilityChange: (I, V) => X((Z) => {
1115
+ const U = new Set(Z);
1116
+ return V ? U.delete(I) : U.add(I), U;
1117
+ }), onColumnReorder: (I, V) => N((Z) => Bt(De(H, Z), I, V)), onWrapRowsChange: K, onStatsVisibilityChange: M });
1118
+ return /* @__PURE__ */ _(oe, { direction: "column", height: "100%", width: "100%", children: [
1119
+ /* @__PURE__ */ a(Ft, { rows: $e, storageKey: _e, attributes: Ae, columnControl: at, defaultViews: o.defaultViews, defaultActiveViewId: o.defaultActiveViewId }),
1120
+ /* @__PURE__ */ _(re, { position: "relative", flex: "1", minHeight: "0", children: [
1121
+ /* @__PURE__ */ a(xe, { height: "100%", maxWidth: "unset", showHorizontalScrollbar: !0, children: /* @__PURE__ */ _(L.Root, { className: `data-table${l ? " full-width" : ""}`, style: {
1122
+ ...rt,
1123
+ width: l ? "100%" : q.getTotalSize()
1111
1124
  }, children: [
1112
- /* @__PURE__ */ a(L.Header, { children: J.getHeaderGroups().map((R) => /* @__PURE__ */ _(ht, { children: [
1113
- /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: R.headers.map((V) => /* @__PURE__ */ a(mo, { header: V, headerGroup: R, table: J, fullWidth: o, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1114
- u && N ? /* @__PURE__ */ a(lo, { headerGroup: R, rows: $e, columnStats: u, noBorder: t, fullWidth: o }) : null
1115
- ] }, R.id)) }),
1116
- /* @__PURE__ */ a(L.Body, { children: J.getRowModel().rows.map((R) => {
1117
- const V = r ? c?.(R.original) ?? !0 : !1, U = Et({
1118
- enableRowActivation: y,
1119
- activeRowId: i,
1120
- rowId: R.id
1121
- }), q = R.getIsSelected();
1122
- return /* @__PURE__ */ a(go, { row: R, noBorder: t, rowIsInteractive: V, rowIsActive: U, rowIsSelected: q, onRowClick: r, getCellContextMenuActions: C }, R.id);
1125
+ /* @__PURE__ */ a(L.Header, { children: q.getHeaderGroups().map((I) => /* @__PURE__ */ _(pt, { children: [
1126
+ /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: t ? "none" : "1px solid", borderColor: "border.subtle", children: I.headers.map((V) => /* @__PURE__ */ a(gl, { header: V, headerGroup: I, table: q, fullWidth: l, hasDescription: !!d?.[V.column.id] }, V.id)) }),
1127
+ m && P ? /* @__PURE__ */ a(il, { headerGroup: I, rows: ke, columnStats: m, noBorder: t, fullWidth: l }) : null
1128
+ ] }, I.id)) }),
1129
+ /* @__PURE__ */ a(L.Body, { children: q.getRowModel().rows.map((I) => {
1130
+ const V = i ? c?.(I.original) ?? !0 : !1, Z = Kt({
1131
+ enableRowActivation: w,
1132
+ activeRowId: s,
1133
+ rowId: I.id
1134
+ }), U = I.getIsSelected();
1135
+ return /* @__PURE__ */ a(pl, { row: I, noBorder: t, rowIsInteractive: V, rowIsActive: Z, rowIsSelected: U, wrapRows: D, onRowClick: i, getCellContextMenuActions: p }, I.id);
1123
1136
  }) })
1124
1137
  ] }) }),
1125
- H && me.length > 0 ? /* @__PURE__ */ a(Bt, { selectedCount: me.length, totalCount: nt.length, onClearSelection: () => J.toggleAllRowsSelected(!1), onSelectAll: () => J.toggleAllRowsSelected(!0), actions: ue, selectedRows: rt }) : null
1138
+ F && fe.length > 0 ? /* @__PURE__ */ a(Jt, { selectedCount: fe.length, totalCount: it.length, onClearSelection: () => q.toggleAllRowsSelected(!1), onSelectAll: () => q.toggleAllRowsSelected(!0), actions: le, selectedRows: st }) : null
1126
1139
  ] }),
1127
- J.getPageCount() > 1 && /* @__PURE__ */ a(ho, { table: J, pagination: I, pageSizeOptions: p })
1140
+ q.getPageCount() > 1 && /* @__PURE__ */ a(wl, { table: q, pagination: y, pageSizeOptions: S })
1128
1141
  ] });
1129
- }, Oo = (l) => {
1142
+ }, jl = (o) => {
1130
1143
  const e = z(4);
1131
- if (l.editMode) {
1132
- let o;
1133
- return e[0] !== l ? (o = /* @__PURE__ */ a(_t, { ...l }), e[0] = l, e[1] = o) : o = e[1], o;
1144
+ if (o.editMode) {
1145
+ let l;
1146
+ return e[0] !== o ? (l = /* @__PURE__ */ a(Vt, { ...o }), e[0] = o, e[1] = l) : l = e[1], l;
1134
1147
  }
1135
1148
  let t;
1136
- return e[2] !== l ? (t = /* @__PURE__ */ a(bo, { ...l }), e[2] = l, e[3] = t) : t = e[3], t;
1137
- }, Ne = ["70%", "45%", "60%", "35%", "55%"], No = (l) => {
1149
+ return e[2] !== o ? (t = /* @__PURE__ */ a(xl, { ...o }), e[2] = o, e[3] = t) : t = e[3], t;
1150
+ }, je = ["70%", "45%", "60%", "35%", "55%"], El = (o) => {
1138
1151
  const e = z(15), {
1139
1152
  columns: t,
1140
- columnCount: o,
1153
+ columnCount: l,
1141
1154
  rowCount: n
1142
- } = l, r = o === void 0 ? 3 : o, c = n === void 0 ? 5 : n;
1143
- let i;
1144
- e[0] !== r || e[1] !== t ? (i = t && t.length > 0 ? t : Array.from({
1145
- length: r
1146
- }, po), e[0] = r, e[1] = t, e[2] = i) : i = e[2];
1147
- const s = i;
1155
+ } = o, i = l === void 0 ? 3 : l, c = n === void 0 ? 5 : n;
1156
+ let s;
1157
+ e[0] !== i || e[1] !== t ? (s = t && t.length > 0 ? t : Array.from({
1158
+ length: i
1159
+ }, yl), e[0] = i, e[1] = t, e[2] = s) : s = e[2];
1160
+ const r = s;
1148
1161
  let d;
1149
- e[3] !== s ? (d = s.map(So), e[3] = s, e[4] = d) : d = e[4];
1150
- let m;
1151
- e[5] !== d ? (m = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = m) : m = e[6];
1162
+ e[3] !== r ? (d = r.map(Cl), e[3] = r, e[4] = d) : d = e[4];
1152
1163
  let u;
1153
- if (e[7] !== s || e[8] !== c) {
1154
- let g;
1155
- e[10] !== s ? (g = (p, b) => /* @__PURE__ */ a(L.Row, { children: s.map((h, x) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1164
+ e[5] !== d ? (u = /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Row, { className: "data-table-column-header-row", borderRight: "1px solid", borderColor: "border.subtle", children: d }) }), e[5] = d, e[6] = u) : u = e[6];
1165
+ let m;
1166
+ if (e[7] !== r || e[8] !== c) {
1167
+ let h;
1168
+ e[10] !== r ? (h = (S, b) => /* @__PURE__ */ a(L.Row, { children: r.map((x, g) => /* @__PURE__ */ a(L.Cell, { padding: "xs", borderRight: "1px solid", borderColor: "border.subtle", _last: {
1156
1169
  borderRight: "none"
1157
- }, borderBottom: "none", children: /* @__PURE__ */ a(Ee, { height: "14px", width: Ne[(b + x) % Ne.length], borderRadius: "xs" }) }, h.id)) }, b), e[10] = s, e[11] = g) : g = e[11], u = /* @__PURE__ */ a(L.Body, { children: Array.from({
1170
+ }, borderBottom: "none", children: /* @__PURE__ */ a(Be, { height: "14px", width: je[(b + g) % je.length], borderRadius: "xs" }) }, x.id)) }, b), e[10] = r, e[11] = h) : h = e[11], m = /* @__PURE__ */ a(L.Body, { children: Array.from({
1158
1171
  length: c
1159
- }, g) }), e[7] = s, e[8] = c, e[9] = u;
1172
+ }, h) }), e[7] = r, e[8] = c, e[9] = m;
1160
1173
  } else
1161
- u = e[9];
1174
+ m = e[9];
1162
1175
  let f;
1163
- return e[12] !== m || e[13] !== u ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
1164
- m,
1165
- u
1166
- ] }), e[12] = m, e[13] = u, e[14] = f) : f = e[14], f;
1176
+ return e[12] !== u || e[13] !== m ? (f = /* @__PURE__ */ _(L.Root, { className: "data-table full-width", width: "100%", children: [
1177
+ u,
1178
+ m
1179
+ ] }), e[12] = u, e[13] = m, e[14] = f) : f = e[14], f;
1167
1180
  };
1168
- function po(l, e) {
1181
+ function yl(o, e) {
1169
1182
  return {
1170
1183
  id: `column-${e + 1}`,
1171
1184
  label: ""
1172
1185
  };
1173
1186
  }
1174
- function So(l) {
1187
+ function Cl(o) {
1175
1188
  return /* @__PURE__ */ a(L.ColumnHeader, { textTransform: "none", borderRight: "1px solid", _last: {
1176
1189
  borderRight: "none"
1177
- }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: l.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: l.label }) : /* @__PURE__ */ a(Ee, { height: "12px", width: "4rem", borderRadius: "xs" }) }, l.id);
1190
+ }, borderColor: "border.subtle", paddingX: "xs", paddingY: "xs", whiteSpace: "nowrap", children: o.label ? /* @__PURE__ */ a(O, { as: "div", textStyle: "label/S/medium", lineHeight: "1.2", truncate: !0, children: o.label }) : /* @__PURE__ */ a(Be, { height: "12px", width: "4rem", borderRadius: "xs" }) }, o.id);
1178
1191
  }
1179
1192
  export {
1180
- Oo as DataTable,
1181
- No as DataTableSkeleton,
1182
- kl as FriendlyJsonDisplay,
1183
- kt as formatDisplayValue,
1184
- $t as getIcon
1193
+ jl as DataTable,
1194
+ El as DataTableSkeleton,
1195
+ Do as FriendlyJsonDisplay,
1196
+ Tt as formatDisplayValue,
1197
+ zt as getIcon
1185
1198
  };
1186
1199
  //# sourceMappingURL=data-table.js.map