@pantograph/vue 0.10.4 → 0.10.6

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 (120) hide show
  1. package/dist/ActionButton/index.js.js +1 -1
  2. package/dist/ActionButton/index.umd.cjs.js +1 -1
  3. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-DZY7N5gS.js → ActionButton.vue_vue_type_script_setup_true_lang-B3fz9VlS.js} +1 -1
  4. package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-XYkQJLWE.js → ActionButton.vue_vue_type_script_setup_true_lang-CGtPZ6WM.js} +2 -2
  5. package/dist/Avatar/index.js.js +1 -1
  6. package/dist/Avatar/index.umd.cjs.js +1 -1
  7. package/dist/{Avatar.vue_vue_type_style_index_0_lang-B3h6--NG.js → Avatar.vue_vue_type_style_index_0_lang-CxtFAywe.js} +2 -2
  8. package/dist/{Avatar.vue_vue_type_style_index_0_lang-B62H7K8P.js → Avatar.vue_vue_type_style_index_0_lang-Dno8MmtN.js} +1 -1
  9. package/dist/AvatarGroup/index.js.js +1 -1
  10. package/dist/AvatarGroup/index.umd.cjs.js +1 -1
  11. package/dist/Badge/Badge.d.ts +1 -1
  12. package/dist/Badge/index.js.js +1 -1
  13. package/dist/{Badge.vue_vue_type_script_setup_true_lang-BY-B21u1.js → Badge.vue_vue_type_script_setup_true_lang-TQx4Ht7v.js} +1 -1
  14. package/dist/BaseButton.vue_vue_type_style_index_0_lang-D0Qoa28N.js +1 -0
  15. package/dist/{BaseButton.vue_vue_type_style_index_0_lang-C0nSQYiX.js → BaseButton.vue_vue_type_style_index_0_lang-DsO7fB2L.js} +30 -30
  16. package/dist/Button/index.js.js +1 -1
  17. package/dist/Button/index.umd.cjs.js +1 -1
  18. package/dist/{Button.vue_vue_type_script_setup_true_lang-ZXQe6Slx.js → Button.vue_vue_type_script_setup_true_lang-CYNr2NyY.js} +1 -1
  19. package/dist/{Button.vue_vue_type_script_setup_true_lang-C49On28W.js → Button.vue_vue_type_script_setup_true_lang-iVnBi1qI.js} +2 -2
  20. package/dist/Checkbox/Checkbox.d.ts +3 -3
  21. package/dist/Checkbox/index.js.js +1 -1
  22. package/dist/Checkbox/index.umd.cjs.js +1 -1
  23. package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bphv5qnx.js → Checkbox.vue_vue_type_style_index_0_lang-BmkAqFq7.js} +69 -67
  24. package/dist/Checkbox.vue_vue_type_style_index_0_lang-pWUK1jtk.js +1 -0
  25. package/dist/CheckboxGroup/index.js.js +1 -1
  26. package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
  27. package/dist/ColorPicker/index.js.js +1 -1
  28. package/dist/ColorPicker/index.umd.cjs.js +1 -1
  29. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-LYEiXGuI.js → ColorPicker.vue_vue_type_style_index_0_lang-BNdf9ydf.js} +1 -1
  30. package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-nriGmBdP.js → ColorPicker.vue_vue_type_style_index_0_lang-ELatlkv4.js} +2 -2
  31. package/dist/ColorSwatch/index.js.js +1 -1
  32. package/dist/ColorSwatch/index.umd.cjs.js +1 -1
  33. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-Tu5jN_qs.js → ColorSwatch.vue_vue_type_style_index_0_lang-DWbErEeg.js} +1 -1
  34. package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-DMzq203l.js → ColorSwatch.vue_vue_type_style_index_0_lang-gdy03Pwc.js} +3 -3
  35. package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +3 -3
  36. package/dist/ColorSwatchGroup/index.js.js +1 -1
  37. package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -1
  38. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-BxWt-Zbz.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-CfrcyIa2.js} +1 -1
  39. package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CRyynAiW.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DfnOsEBq.js} +6 -6
  40. package/dist/ColorTrigger/index.js.js +1 -1
  41. package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-m13EP8UW.js → ColorTrigger.vue_vue_type_style_index_0_lang-C5aTcJN1.js} +2 -2
  42. package/dist/DataTable/DataTable.d.ts +67 -0
  43. package/dist/DataTable/DataTable.model.d.ts +57 -0
  44. package/dist/DataTable/index.d.ts +2 -0
  45. package/dist/DataTable/index.js.js +2663 -0
  46. package/dist/DataTable/index.umd.cjs.js +22 -0
  47. package/dist/DataTable/useColumn.d.ts +16 -0
  48. package/dist/DataTable/useColumnWrap.d.ts +12 -0
  49. package/dist/Divider/Divider.d.ts +1 -1
  50. package/dist/Empty/Empty.d.ts +38 -0
  51. package/dist/Empty/Empty.model.d.ts +2 -0
  52. package/dist/Empty/index.d.ts +1 -0
  53. package/dist/Empty/index.js.js +1 -0
  54. package/dist/Empty/index.umd.cjs.js +1 -0
  55. package/dist/FloatButton/index.js.js +1 -1
  56. package/dist/FloatButton/index.umd.cjs.js +1 -1
  57. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Vfrxg8PK.js → FloatButton.vue_vue_type_script_setup_true_lang-CCzgATDq.js} +2 -2
  58. package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-sfslt2vn.js → FloatButton.vue_vue_type_script_setup_true_lang-io7at7GI.js} +1 -1
  59. package/dist/GraphicalObject/GraphicalObject.d.ts +1 -1
  60. package/dist/GraphicalObject/index.js.js +1 -1
  61. package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-D9DyDBKQ.js → GraphicalObject.vue_vue_type_script_setup_true_lang-zaYp13KC.js} +1 -1
  62. package/dist/IconButton/index.js.js +1 -1
  63. package/dist/IconButton/index.umd.cjs.js +1 -1
  64. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-5W7GQOhv.js → IconButton.vue_vue_type_script_setup_true_lang-CTfRxff0.js} +2 -2
  65. package/dist/{IconButton.vue_vue_type_script_setup_true_lang-B_9aypIC.js → IconButton.vue_vue_type_script_setup_true_lang-CWqrQ22L.js} +1 -1
  66. package/dist/IndentLevel/IndentLevel.d.ts +1 -1
  67. package/dist/IndentLevel/index.js.js +1 -1
  68. package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C4bSKGaz.js → IndentLevel.vue_vue_type_style_index_0_lang-BkunIxeY.js} +1 -1
  69. package/dist/Indicator/Indicator.d.ts +1 -1
  70. package/dist/Indicator/index.js.js +1 -1
  71. package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DYFKQ-dL.js → Indicator.vue_vue_type_script_setup_true_lang-DivfztWD.js} +1 -1
  72. package/dist/Input/index.js.js +1 -1
  73. package/dist/Input/index.umd.cjs.js +1 -1
  74. package/dist/Input.vue_vue_type_style_index_0_lang-Bg1yMzU-.js +1 -0
  75. package/dist/Input.vue_vue_type_style_index_0_lang-DqsL8ARC.js +269 -0
  76. package/dist/Menu/Menu.d.ts +41 -4
  77. package/dist/Menu/index.js.js +1 -1
  78. package/dist/Menu/index.umd.cjs.js +1 -1
  79. package/dist/Menu.vue_vue_type_style_index_0_lang-1iiTY68f.js +1 -0
  80. package/dist/{Menu.vue_vue_type_style_index_0_lang-Dcu2gyxm.js → Menu.vue_vue_type_style_index_0_lang-CL5PTbsT.js} +146 -145
  81. package/dist/MenuItem/MenuItem.d.ts +20 -3
  82. package/dist/MenuItem/MenuItemContent.d.ts +7 -7
  83. package/dist/MenuItem/index.js.js +1 -1
  84. package/dist/MenuItem/index.umd.cjs.js +1 -1
  85. package/dist/Popover/Popover.d.ts +8 -6
  86. package/dist/Popover/index.js.js +1 -1
  87. package/dist/Popover/index.umd.cjs.js +1 -1
  88. package/dist/Popover.vue_vue_type_style_index_0_lang-C7q9V9tc.js +1 -0
  89. package/dist/Popover.vue_vue_type_style_index_0_lang-P1ZoqEUT.js +154 -0
  90. package/dist/RadioGroup/index.js.js +1 -1
  91. package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-DTcXCTZt.js → RadioGroup.vue_vue_type_script_setup_true_lang-DxYzvshj.js} +1 -1
  92. package/dist/Switch/index.js.js +1 -1
  93. package/dist/{Switch.vue_vue_type_style_index_0_lang-Diz2BK9E.js → Switch.vue_vue_type_style_index_0_lang-C63Gv1EO.js} +1 -1
  94. package/dist/Tree/Tree.d.ts +3 -3
  95. package/dist/Tree/index.js.js +1 -1
  96. package/dist/Tree/index.umd.cjs.js +1 -1
  97. package/dist/Tree.vue_vue_type_style_index_0_lang-CDS7qhkC.js +1 -0
  98. package/dist/Tree.vue_vue_type_style_index_0_lang-DTZfk6zI.js +499 -0
  99. package/dist/_baseIsEqual-BknLKouD.js +144 -0
  100. package/dist/_baseIsEqual-DP4HkppL.js +1 -0
  101. package/dist/{_flatRest-Cgl-JzmZ.js → _flatRest-Dx0ZZgOx.js} +17 -17
  102. package/dist/{cloneDeep-C3qTbnbj.js → cloneDeep-C4ka1P8m.js} +1 -1
  103. package/dist/{get-B_rtzkiJ.js → get-B14Mml42.js} +1 -1
  104. package/dist/index.js.js +20 -20
  105. package/dist/index.umd.cjs.js +1 -1
  106. package/dist/{omit-gDFhewvU.js → omit-CD3OjwFx.js} +36 -36
  107. package/dist/{pick-D8bMooY6.js → pick-8ze0sbWb.js} +1 -1
  108. package/dist/style/index.css +1 -1
  109. package/dist/uniq-ChIEzCZe.js +1 -0
  110. package/dist/uniq-DSVd52ma.js +56 -0
  111. package/package.json +12 -2
  112. package/dist/BaseButton.vue_vue_type_style_index_0_lang-dcMigyCt.js +0 -1
  113. package/dist/Checkbox.vue_vue_type_style_index_0_lang-BPQsppLy.js +0 -1
  114. package/dist/Input.vue_vue_type_style_index_0_lang-BCS_of9l.js +0 -406
  115. package/dist/Input.vue_vue_type_style_index_0_lang-HdWdXVjL.js +0 -1
  116. package/dist/Menu.vue_vue_type_style_index_0_lang-zgFo-Qhe.js +0 -1
  117. package/dist/Popover.vue_vue_type_style_index_0_lang-CCfVt5eZ.js +0 -142
  118. package/dist/Popover.vue_vue_type_style_index_0_lang-DyKW40kh.js +0 -1
  119. package/dist/Tree.vue_vue_type_style_index_0_lang-ChV5Fqjc.js +0 -1
  120. package/dist/Tree.vue_vue_type_style_index_0_lang-CoTI1i5g.js +0 -545
@@ -0,0 +1,2663 @@
1
+ import { isRef as Dt, shallowRef as lt, watch as se, ref as ue, watchEffect as Et, unref as v, defineComponent as Be, h as st, useSlots as ut, computed as W, createElementBlock as P, openBlock as V, normalizeClass as z, createElementVNode as I, createCommentVNode as O, renderSlot as B, createBlock as ke, createTextVNode as Re, toDisplayString as pe, useTemplateRef as kt, onBeforeUnmount as At, createVNode as k, withCtx as T, normalizeStyle as Lt, Fragment as N, renderList as ee, mergeProps as U, createSlots as zt, normalizeProps as Gt, guardReactiveProps as Ot, nextTick as _e } from "vue";
2
+ import { b as Bt } from "../_baseIsEqual-BknLKouD.js";
3
+ import { i as Tt, b as Nt, a as ye } from "../isArray-CdbPONHA.js";
4
+ import { u as qt } from "../useId-DvOSMFGX.js";
5
+ import { _ as Ye } from "../Checkbox.vue_vue_type_style_index_0_lang-BmkAqFq7.js";
6
+ import { c as Je, _ as jt, a as $e } from "../Menu.vue_vue_type_style_index_0_lang-CL5PTbsT.js";
7
+ import { _ as Kt } from "../ActionButton.vue_vue_type_script_setup_true_lang-CGtPZ6WM.js";
8
+ import { g as at, a as me, b as q } from "../class-DziTeW9B.js";
9
+ import { cva as gt } from "class-variance-authority";
10
+ import { g as Ut } from "../options-JBqnVZUl.js";
11
+ import { _ as Ce } from "../Icon.vue_vue_type_style_index_0_lang-BVVc15Aa.js";
12
+ import { getCssVar as te, getBreakpoints as Wt } from "@pantograph/tokens";
13
+ import { o as dt } from "../omit-CD3OjwFx.js";
14
+ import { u as Zt } from "../uniq-DSVd52ma.js";
15
+ import { i as Fe, a as Y } from "../_flatRest-Dx0ZZgOx.js";
16
+ import { useBreakpoints as Xt, useIntersectionObserver as Yt } from "@vueuse/core";
17
+ import { _ as Jt } from "../Skeleton.vue_vue_type_style_index_0_lang-BjcjY70B.js";
18
+ import { _ as Qe } from "../Popover.vue_vue_type_style_index_0_lang-P1ZoqEUT.js";
19
+ import { _ as Qt } from "../Badge.vue_vue_type_script_setup_true_lang-TQx4Ht7v.js";
20
+ import { _ as be } from "../Divider.vue_vue_type_style_index_0_lang-CRs1KEcj.js";
21
+ import { _ as et } from "../IconButton.vue_vue_type_script_setup_true_lang-CTfRxff0.js";
22
+ import { _ as bt } from "../Switch.vue_vue_type_style_index_0_lang-C63Gv1EO.js";
23
+ import { g as tt } from "../get-B14Mml42.js";
24
+ /**
25
+ * table-core
26
+ *
27
+ * Copyright (c) TanStack
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE.md file in the root directory of this source tree.
31
+ *
32
+ * @license MIT
33
+ */
34
+ function en() {
35
+ return {
36
+ accessor: (e, o) => typeof e == "function" ? {
37
+ ...o,
38
+ accessorFn: e
39
+ } : {
40
+ ...o,
41
+ accessorKey: e
42
+ },
43
+ display: (e) => e,
44
+ group: (e) => e
45
+ };
46
+ }
47
+ function Q(e, o) {
48
+ return typeof e == "function" ? e(o) : e;
49
+ }
50
+ function j(e, o) {
51
+ return (t) => {
52
+ o.setState((n) => ({
53
+ ...n,
54
+ [e]: Q(t, n[e])
55
+ }));
56
+ };
57
+ }
58
+ function Se(e) {
59
+ return e instanceof Function;
60
+ }
61
+ function tn(e) {
62
+ return Array.isArray(e) && e.every((o) => typeof o == "number");
63
+ }
64
+ function ct(e, o) {
65
+ const t = [], n = (r) => {
66
+ r.forEach((i) => {
67
+ t.push(i);
68
+ const s = o(i);
69
+ s != null && s.length && n(s);
70
+ });
71
+ };
72
+ return n(e), t;
73
+ }
74
+ function R(e, o, t) {
75
+ let n = [], r;
76
+ return (i) => {
77
+ let s;
78
+ t.key && t.debug && (s = Date.now());
79
+ const l = e(i);
80
+ if (!(l.length !== n.length || l.some((f, h) => n[h] !== f)))
81
+ return r;
82
+ n = l;
83
+ let g;
84
+ if (t.key && t.debug && (g = Date.now()), r = o(...l), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
85
+ const f = Math.round((Date.now() - s) * 100) / 100, h = Math.round((Date.now() - g) * 100) / 100, p = h / 16, d = (m, a) => {
86
+ for (m = String(m); m.length < a; )
87
+ m = " " + m;
88
+ return m;
89
+ };
90
+ console.info(`%c⏱ ${d(h, 5)} /${d(f, 5)} ms`, `
91
+ font-size: .6rem;
92
+ font-weight: bold;
93
+ color: hsl(${Math.max(0, Math.min(120 - 120 * p, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
94
+ }
95
+ return r;
96
+ };
97
+ }
98
+ function _(e, o, t, n) {
99
+ return {
100
+ debug: () => {
101
+ var r;
102
+ return (r = e == null ? void 0 : e.debugAll) != null ? r : e[o];
103
+ },
104
+ key: process.env.NODE_ENV === "development" && t,
105
+ onChange: n
106
+ };
107
+ }
108
+ function nn(e, o, t, n) {
109
+ const r = () => {
110
+ var s;
111
+ return (s = i.getValue()) != null ? s : e.options.renderFallbackValue;
112
+ }, i = {
113
+ id: `${o.id}_${t.id}`,
114
+ row: o,
115
+ column: t,
116
+ getValue: () => o.getValue(n),
117
+ renderValue: r,
118
+ getContext: R(() => [e, t, o, i], (s, l, u, g) => ({
119
+ table: s,
120
+ column: l,
121
+ row: u,
122
+ cell: g,
123
+ getValue: g.getValue,
124
+ renderValue: g.renderValue
125
+ }), _(e.options, "debugCells", "cell.getContext"))
126
+ };
127
+ return e._features.forEach((s) => {
128
+ s.createCell == null || s.createCell(i, t, o, e);
129
+ }, {}), i;
130
+ }
131
+ function on(e, o, t, n) {
132
+ var r, i;
133
+ const l = {
134
+ ...e._getDefaultColumnDef(),
135
+ ...o
136
+ }, u = l.accessorKey;
137
+ let g = (r = (i = l.id) != null ? i : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof l.header == "string" ? l.header : void 0, f;
138
+ if (l.accessorFn ? f = l.accessorFn : u && (u.includes(".") ? f = (p) => {
139
+ let d = p;
140
+ for (const a of u.split(".")) {
141
+ var m;
142
+ d = (m = d) == null ? void 0 : m[a], process.env.NODE_ENV !== "production" && d === void 0 && console.warn(`"${a}" in deeply nested key "${u}" returned undefined.`);
143
+ }
144
+ return d;
145
+ } : f = (p) => p[l.accessorKey]), !g)
146
+ throw process.env.NODE_ENV !== "production" ? new Error(l.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
147
+ let h = {
148
+ id: `${String(g)}`,
149
+ accessorFn: f,
150
+ parent: n,
151
+ depth: t,
152
+ columnDef: l,
153
+ columns: [],
154
+ getFlatColumns: R(() => [!0], () => {
155
+ var p;
156
+ return [h, ...(p = h.columns) == null ? void 0 : p.flatMap((d) => d.getFlatColumns())];
157
+ }, _(e.options, "debugColumns", "column.getFlatColumns")),
158
+ getLeafColumns: R(() => [e._getOrderColumnsFn()], (p) => {
159
+ var d;
160
+ if ((d = h.columns) != null && d.length) {
161
+ let m = h.columns.flatMap((a) => a.getLeafColumns());
162
+ return p(m);
163
+ }
164
+ return [h];
165
+ }, _(e.options, "debugColumns", "column.getLeafColumns"))
166
+ };
167
+ for (const p of e._features)
168
+ p.createColumn == null || p.createColumn(h, e);
169
+ return h;
170
+ }
171
+ const G = "debugHeaders";
172
+ function nt(e, o, t) {
173
+ var n;
174
+ let i = {
175
+ id: (n = t.id) != null ? n : o.id,
176
+ column: o,
177
+ index: t.index,
178
+ isPlaceholder: !!t.isPlaceholder,
179
+ placeholderId: t.placeholderId,
180
+ depth: t.depth,
181
+ subHeaders: [],
182
+ colSpan: 0,
183
+ rowSpan: 0,
184
+ headerGroup: null,
185
+ getLeafHeaders: () => {
186
+ const s = [], l = (u) => {
187
+ u.subHeaders && u.subHeaders.length && u.subHeaders.map(l), s.push(u);
188
+ };
189
+ return l(i), s;
190
+ },
191
+ getContext: () => ({
192
+ table: e,
193
+ header: i,
194
+ column: o
195
+ })
196
+ };
197
+ return e._features.forEach((s) => {
198
+ s.createHeader == null || s.createHeader(i, e);
199
+ }), i;
200
+ }
201
+ const rn = {
202
+ createTable: (e) => {
203
+ e.getHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
204
+ var i, s;
205
+ const l = (i = n == null ? void 0 : n.map((h) => t.find((p) => p.id === h)).filter(Boolean)) != null ? i : [], u = (s = r == null ? void 0 : r.map((h) => t.find((p) => p.id === h)).filter(Boolean)) != null ? s : [], g = t.filter((h) => !(n != null && n.includes(h.id)) && !(r != null && r.includes(h.id)));
206
+ return ge(o, [...l, ...g, ...u], e);
207
+ }, _(e.options, G, "getHeaderGroups")), e.getCenterHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), ge(o, t, e, "center")), _(e.options, G, "getCenterHeaderGroups")), e.getLeftHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
208
+ var r;
209
+ const i = (r = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? r : [];
210
+ return ge(o, i, e, "left");
211
+ }, _(e.options, G, "getLeftHeaderGroups")), e.getRightHeaderGroups = R(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
212
+ var r;
213
+ const i = (r = n == null ? void 0 : n.map((s) => t.find((l) => l.id === s)).filter(Boolean)) != null ? r : [];
214
+ return ge(o, i, e, "right");
215
+ }, _(e.options, G, "getRightHeaderGroups")), e.getFooterGroups = R(() => [e.getHeaderGroups()], (o) => [...o].reverse(), _(e.options, G, "getFooterGroups")), e.getLeftFooterGroups = R(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), _(e.options, G, "getLeftFooterGroups")), e.getCenterFooterGroups = R(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), _(e.options, G, "getCenterFooterGroups")), e.getRightFooterGroups = R(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), _(e.options, G, "getRightFooterGroups")), e.getFlatHeaders = R(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), _(e.options, G, "getFlatHeaders")), e.getLeftFlatHeaders = R(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), _(e.options, G, "getLeftFlatHeaders")), e.getCenterFlatHeaders = R(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), _(e.options, G, "getCenterFlatHeaders")), e.getRightFlatHeaders = R(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), _(e.options, G, "getRightFlatHeaders")), e.getCenterLeafHeaders = R(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
216
+ var n;
217
+ return !((n = t.subHeaders) != null && n.length);
218
+ }), _(e.options, G, "getCenterLeafHeaders")), e.getLeftLeafHeaders = R(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
219
+ var n;
220
+ return !((n = t.subHeaders) != null && n.length);
221
+ }), _(e.options, G, "getLeftLeafHeaders")), e.getRightLeafHeaders = R(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
222
+ var n;
223
+ return !((n = t.subHeaders) != null && n.length);
224
+ }), _(e.options, G, "getRightLeafHeaders")), e.getLeafHeaders = R(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
225
+ var r, i, s, l, u, g;
226
+ return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(s = (l = t[0]) == null ? void 0 : l.headers) != null ? s : [], ...(u = (g = n[0]) == null ? void 0 : g.headers) != null ? u : []].map((f) => f.getLeafHeaders()).flat();
227
+ }, _(e.options, G, "getLeafHeaders"));
228
+ }
229
+ };
230
+ function ge(e, o, t, n) {
231
+ var r, i;
232
+ let s = 0;
233
+ const l = function(p, d) {
234
+ d === void 0 && (d = 1), s = Math.max(s, d), p.filter((m) => m.getIsVisible()).forEach((m) => {
235
+ var a;
236
+ (a = m.columns) != null && a.length && l(m.columns, d + 1);
237
+ }, 0);
238
+ };
239
+ l(e);
240
+ let u = [];
241
+ const g = (p, d) => {
242
+ const m = {
243
+ depth: d,
244
+ id: [n, `${d}`].filter(Boolean).join("_"),
245
+ headers: []
246
+ }, a = [];
247
+ p.forEach((C) => {
248
+ const S = [...a].reverse()[0], $ = C.column.depth === m.depth;
249
+ let M, D = !1;
250
+ if ($ && C.column.parent ? M = C.column.parent : (M = C.column, D = !0), S && (S == null ? void 0 : S.column) === M)
251
+ S.subHeaders.push(C);
252
+ else {
253
+ const x = nt(t, M, {
254
+ id: [n, d, M.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
255
+ isPlaceholder: D,
256
+ placeholderId: D ? `${a.filter((A) => A.column === M).length}` : void 0,
257
+ depth: d,
258
+ index: a.length
259
+ });
260
+ x.subHeaders.push(C), a.push(x);
261
+ }
262
+ m.headers.push(C), C.headerGroup = m;
263
+ }), u.push(m), d > 0 && g(a, d - 1);
264
+ }, f = o.map((p, d) => nt(t, p, {
265
+ depth: s,
266
+ index: d
267
+ }));
268
+ g(f, s - 1), u.reverse();
269
+ const h = (p) => p.filter((m) => m.column.getIsVisible()).map((m) => {
270
+ let a = 0, C = 0, S = [0];
271
+ m.subHeaders && m.subHeaders.length ? (S = [], h(m.subHeaders).forEach((M) => {
272
+ let {
273
+ colSpan: D,
274
+ rowSpan: x
275
+ } = M;
276
+ a += D, S.push(x);
277
+ })) : a = 1;
278
+ const $ = Math.min(...S);
279
+ return C = C + $, m.colSpan = a, m.rowSpan = C, {
280
+ colSpan: a,
281
+ rowSpan: C
282
+ };
283
+ });
284
+ return h((r = (i = u[0]) == null ? void 0 : i.headers) != null ? r : []), u;
285
+ }
286
+ const ln = (e, o, t, n, r, i, s) => {
287
+ let l = {
288
+ id: o,
289
+ index: n,
290
+ original: t,
291
+ depth: r,
292
+ parentId: s,
293
+ _valuesCache: {},
294
+ _uniqueValuesCache: {},
295
+ getValue: (u) => {
296
+ if (l._valuesCache.hasOwnProperty(u))
297
+ return l._valuesCache[u];
298
+ const g = e.getColumn(u);
299
+ if (g != null && g.accessorFn)
300
+ return l._valuesCache[u] = g.accessorFn(l.original, n), l._valuesCache[u];
301
+ },
302
+ getUniqueValues: (u) => {
303
+ if (l._uniqueValuesCache.hasOwnProperty(u))
304
+ return l._uniqueValuesCache[u];
305
+ const g = e.getColumn(u);
306
+ if (g != null && g.accessorFn)
307
+ return g.columnDef.getUniqueValues ? (l._uniqueValuesCache[u] = g.columnDef.getUniqueValues(l.original, n), l._uniqueValuesCache[u]) : (l._uniqueValuesCache[u] = [l.getValue(u)], l._uniqueValuesCache[u]);
308
+ },
309
+ renderValue: (u) => {
310
+ var g;
311
+ return (g = l.getValue(u)) != null ? g : e.options.renderFallbackValue;
312
+ },
313
+ subRows: [],
314
+ getLeafRows: () => ct(l.subRows, (u) => u.subRows),
315
+ getParentRow: () => l.parentId ? e.getRow(l.parentId, !0) : void 0,
316
+ getParentRows: () => {
317
+ let u = [], g = l;
318
+ for (; ; ) {
319
+ const f = g.getParentRow();
320
+ if (!f) break;
321
+ u.push(f), g = f;
322
+ }
323
+ return u.reverse();
324
+ },
325
+ getAllCells: R(() => [e.getAllLeafColumns()], (u) => u.map((g) => nn(e, l, g, g.id)), _(e.options, "debugRows", "getAllCells")),
326
+ _getAllCellsByColumnId: R(() => [l.getAllCells()], (u) => u.reduce((g, f) => (g[f.column.id] = f, g), {}), _(e.options, "debugRows", "getAllCellsByColumnId"))
327
+ };
328
+ for (let u = 0; u < e._features.length; u++) {
329
+ const g = e._features[u];
330
+ g == null || g.createRow == null || g.createRow(l, e);
331
+ }
332
+ return l;
333
+ }, sn = {
334
+ createColumn: (e, o) => {
335
+ e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
336
+ if (e._getFacetedMinMaxValues)
337
+ return e._getFacetedMinMaxValues();
338
+ };
339
+ }
340
+ }, ft = (e, o, t) => {
341
+ var n, r;
342
+ const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
343
+ return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
344
+ };
345
+ ft.autoRemove = (e) => Z(e);
346
+ const pt = (e, o, t) => {
347
+ var n;
348
+ return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
349
+ };
350
+ pt.autoRemove = (e) => Z(e);
351
+ const mt = (e, o, t) => {
352
+ var n;
353
+ return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
354
+ };
355
+ mt.autoRemove = (e) => Z(e);
356
+ const Ct = (e, o, t) => {
357
+ var n;
358
+ return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
359
+ };
360
+ Ct.autoRemove = (e) => Z(e);
361
+ const St = (e, o, t) => !t.some((n) => {
362
+ var r;
363
+ return !((r = e.getValue(o)) != null && r.includes(n));
364
+ });
365
+ St.autoRemove = (e) => Z(e) || !(e != null && e.length);
366
+ const wt = (e, o, t) => t.some((n) => {
367
+ var r;
368
+ return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
369
+ });
370
+ wt.autoRemove = (e) => Z(e) || !(e != null && e.length);
371
+ const ht = (e, o, t) => e.getValue(o) === t;
372
+ ht.autoRemove = (e) => Z(e);
373
+ const vt = (e, o, t) => e.getValue(o) == t;
374
+ vt.autoRemove = (e) => Z(e);
375
+ const Te = (e, o, t) => {
376
+ let [n, r] = t;
377
+ const i = e.getValue(o);
378
+ return i >= n && i <= r;
379
+ };
380
+ Te.resolveFilterValue = (e) => {
381
+ let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, s = t === null || Number.isNaN(r) ? 1 / 0 : r;
382
+ if (i > s) {
383
+ const l = i;
384
+ i = s, s = l;
385
+ }
386
+ return [i, s];
387
+ };
388
+ Te.autoRemove = (e) => Z(e) || Z(e[0]) && Z(e[1]);
389
+ const X = {
390
+ includesString: ft,
391
+ includesStringSensitive: pt,
392
+ equalsString: mt,
393
+ arrIncludes: Ct,
394
+ arrIncludesAll: St,
395
+ arrIncludesSome: wt,
396
+ equals: ht,
397
+ weakEquals: vt,
398
+ inNumberRange: Te
399
+ };
400
+ function Z(e) {
401
+ return e == null || e === "";
402
+ }
403
+ const un = {
404
+ getDefaultColumnDef: () => ({
405
+ filterFn: "auto"
406
+ }),
407
+ getInitialState: (e) => ({
408
+ columnFilters: [],
409
+ ...e
410
+ }),
411
+ getDefaultOptions: (e) => ({
412
+ onColumnFiltersChange: j("columnFilters", e),
413
+ filterFromLeafRows: !1,
414
+ maxLeafRowFilterDepth: 100
415
+ }),
416
+ createColumn: (e, o) => {
417
+ e.getAutoFilterFn = () => {
418
+ const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
419
+ return typeof n == "string" ? X.includesString : typeof n == "number" ? X.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? X.equals : Array.isArray(n) ? X.arrIncludes : X.weakEquals;
420
+ }, e.getFilterFn = () => {
421
+ var t, n;
422
+ return Se(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
423
+ // @ts-ignore
424
+ (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : X[e.columnDef.filterFn]
425
+ );
426
+ }, e.getCanFilter = () => {
427
+ var t, n, r;
428
+ return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
429
+ }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
430
+ var t;
431
+ return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
432
+ }, e.getFilterIndex = () => {
433
+ var t, n;
434
+ return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
435
+ }, e.setFilterValue = (t) => {
436
+ o.setColumnFilters((n) => {
437
+ const r = e.getFilterFn(), i = n == null ? void 0 : n.find((f) => f.id === e.id), s = Q(t, i ? i.value : void 0);
438
+ if (ot(r, s, e)) {
439
+ var l;
440
+ return (l = n == null ? void 0 : n.filter((f) => f.id !== e.id)) != null ? l : [];
441
+ }
442
+ const u = {
443
+ id: e.id,
444
+ value: s
445
+ };
446
+ if (i) {
447
+ var g;
448
+ return (g = n == null ? void 0 : n.map((f) => f.id === e.id ? u : f)) != null ? g : [];
449
+ }
450
+ return n != null && n.length ? [...n, u] : [u];
451
+ });
452
+ };
453
+ },
454
+ createRow: (e, o) => {
455
+ e.columnFilters = {}, e.columnFiltersMeta = {};
456
+ },
457
+ createTable: (e) => {
458
+ e.setColumnFilters = (o) => {
459
+ const t = e.getAllLeafColumns(), n = (r) => {
460
+ var i;
461
+ return (i = Q(o, r)) == null ? void 0 : i.filter((s) => {
462
+ const l = t.find((u) => u.id === s.id);
463
+ if (l) {
464
+ const u = l.getFilterFn();
465
+ if (ot(u, s.value, l))
466
+ return !1;
467
+ }
468
+ return !0;
469
+ });
470
+ };
471
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
472
+ }, e.resetColumnFilters = (o) => {
473
+ var t, n;
474
+ e.setColumnFilters(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
475
+ }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
476
+ }
477
+ };
478
+ function ot(e, o, t) {
479
+ return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
480
+ }
481
+ const an = (e, o, t) => t.reduce((n, r) => {
482
+ const i = r.getValue(e);
483
+ return n + (typeof i == "number" ? i : 0);
484
+ }, 0), gn = (e, o, t) => {
485
+ let n;
486
+ return t.forEach((r) => {
487
+ const i = r.getValue(e);
488
+ i != null && (n > i || n === void 0 && i >= i) && (n = i);
489
+ }), n;
490
+ }, dn = (e, o, t) => {
491
+ let n;
492
+ return t.forEach((r) => {
493
+ const i = r.getValue(e);
494
+ i != null && (n < i || n === void 0 && i >= i) && (n = i);
495
+ }), n;
496
+ }, cn = (e, o, t) => {
497
+ let n, r;
498
+ return t.forEach((i) => {
499
+ const s = i.getValue(e);
500
+ s != null && (n === void 0 ? s >= s && (n = r = s) : (n > s && (n = s), r < s && (r = s)));
501
+ }), [n, r];
502
+ }, fn = (e, o) => {
503
+ let t = 0, n = 0;
504
+ if (o.forEach((r) => {
505
+ let i = r.getValue(e);
506
+ i != null && (i = +i) >= i && (++t, n += i);
507
+ }), t) return n / t;
508
+ }, pn = (e, o) => {
509
+ if (!o.length)
510
+ return;
511
+ const t = o.map((i) => i.getValue(e));
512
+ if (!tn(t))
513
+ return;
514
+ if (t.length === 1)
515
+ return t[0];
516
+ const n = Math.floor(t.length / 2), r = t.sort((i, s) => i - s);
517
+ return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
518
+ }, mn = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Cn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Sn = (e, o) => o.length, Ve = {
519
+ sum: an,
520
+ min: gn,
521
+ max: dn,
522
+ extent: cn,
523
+ mean: fn,
524
+ median: pn,
525
+ unique: mn,
526
+ uniqueCount: Cn,
527
+ count: Sn
528
+ }, wn = {
529
+ getDefaultColumnDef: () => ({
530
+ aggregatedCell: (e) => {
531
+ var o, t;
532
+ return (o = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? o : null;
533
+ },
534
+ aggregationFn: "auto"
535
+ }),
536
+ getInitialState: (e) => ({
537
+ grouping: [],
538
+ ...e
539
+ }),
540
+ getDefaultOptions: (e) => ({
541
+ onGroupingChange: j("grouping", e),
542
+ groupedColumnMode: "reorder"
543
+ }),
544
+ createColumn: (e, o) => {
545
+ e.toggleGrouping = () => {
546
+ o.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
547
+ }, e.getCanGroup = () => {
548
+ var t, n;
549
+ return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = o.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
550
+ }, e.getIsGrouped = () => {
551
+ var t;
552
+ return (t = o.getState().grouping) == null ? void 0 : t.includes(e.id);
553
+ }, e.getGroupedIndex = () => {
554
+ var t;
555
+ return (t = o.getState().grouping) == null ? void 0 : t.indexOf(e.id);
556
+ }, e.getToggleGroupingHandler = () => {
557
+ const t = e.getCanGroup();
558
+ return () => {
559
+ t && e.toggleGrouping();
560
+ };
561
+ }, e.getAutoAggregationFn = () => {
562
+ const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
563
+ if (typeof n == "number")
564
+ return Ve.sum;
565
+ if (Object.prototype.toString.call(n) === "[object Date]")
566
+ return Ve.extent;
567
+ }, e.getAggregationFn = () => {
568
+ var t, n;
569
+ if (!e)
570
+ throw new Error();
571
+ return Se(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : Ve[e.columnDef.aggregationFn];
572
+ };
573
+ },
574
+ createTable: (e) => {
575
+ e.setGrouping = (o) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(o), e.resetGrouping = (o) => {
576
+ var t, n;
577
+ e.setGrouping(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
578
+ }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
579
+ },
580
+ createRow: (e, o) => {
581
+ e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
582
+ if (e._groupingValuesCache.hasOwnProperty(t))
583
+ return e._groupingValuesCache[t];
584
+ const n = o.getColumn(t);
585
+ return n != null && n.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = n.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
586
+ }, e._groupingValuesCache = {};
587
+ },
588
+ createCell: (e, o, t, n) => {
589
+ e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
590
+ var r;
591
+ return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((r = t.subRows) != null && r.length);
592
+ };
593
+ }
594
+ };
595
+ function hn(e, o, t) {
596
+ if (!(o != null && o.length) || !t)
597
+ return e;
598
+ const n = e.filter((i) => !o.includes(i.id));
599
+ return t === "remove" ? n : [...o.map((i) => e.find((s) => s.id === i)).filter(Boolean), ...n];
600
+ }
601
+ const vn = {
602
+ getInitialState: (e) => ({
603
+ columnOrder: [],
604
+ ...e
605
+ }),
606
+ getDefaultOptions: (e) => ({
607
+ onColumnOrderChange: j("columnOrder", e)
608
+ }),
609
+ createColumn: (e, o) => {
610
+ e.getIndex = R((t) => [ae(o, t)], (t) => t.findIndex((n) => n.id === e.id), _(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
611
+ var n;
612
+ return ((n = ae(o, t)[0]) == null ? void 0 : n.id) === e.id;
613
+ }, e.getIsLastColumn = (t) => {
614
+ var n;
615
+ const r = ae(o, t);
616
+ return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
617
+ };
618
+ },
619
+ createTable: (e) => {
620
+ e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
621
+ var t;
622
+ e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
623
+ }, e._getOrderColumnsFn = R(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
624
+ let i = [];
625
+ if (!(o != null && o.length))
626
+ i = r;
627
+ else {
628
+ const s = [...o], l = [...r];
629
+ for (; l.length && s.length; ) {
630
+ const u = s.shift(), g = l.findIndex((f) => f.id === u);
631
+ g > -1 && i.push(l.splice(g, 1)[0]);
632
+ }
633
+ i = [...i, ...l];
634
+ }
635
+ return hn(i, t, n);
636
+ }, _(e.options, "debugTable", "_getOrderColumnsFn"));
637
+ }
638
+ }, Pe = () => ({
639
+ left: [],
640
+ right: []
641
+ }), Rn = {
642
+ getInitialState: (e) => ({
643
+ columnPinning: Pe(),
644
+ ...e
645
+ }),
646
+ getDefaultOptions: (e) => ({
647
+ onColumnPinningChange: j("columnPinning", e)
648
+ }),
649
+ createColumn: (e, o) => {
650
+ e.pin = (t) => {
651
+ const n = e.getLeafColumns().map((r) => r.id).filter(Boolean);
652
+ o.setColumnPinning((r) => {
653
+ var i, s;
654
+ if (t === "right") {
655
+ var l, u;
656
+ return {
657
+ left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((h) => !(n != null && n.includes(h))),
658
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((h) => !(n != null && n.includes(h))), ...n]
659
+ };
660
+ }
661
+ if (t === "left") {
662
+ var g, f;
663
+ return {
664
+ left: [...((g = r == null ? void 0 : r.left) != null ? g : []).filter((h) => !(n != null && n.includes(h))), ...n],
665
+ right: ((f = r == null ? void 0 : r.right) != null ? f : []).filter((h) => !(n != null && n.includes(h)))
666
+ };
667
+ }
668
+ return {
669
+ left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((h) => !(n != null && n.includes(h))),
670
+ right: ((s = r == null ? void 0 : r.right) != null ? s : []).filter((h) => !(n != null && n.includes(h)))
671
+ };
672
+ });
673
+ }, e.getCanPin = () => e.getLeafColumns().some((n) => {
674
+ var r, i, s;
675
+ return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((i = (s = o.options.enableColumnPinning) != null ? s : o.options.enablePinning) != null ? i : !0);
676
+ }), e.getIsPinned = () => {
677
+ const t = e.getLeafColumns().map((l) => l.id), {
678
+ left: n,
679
+ right: r
680
+ } = o.getState().columnPinning, i = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => r == null ? void 0 : r.includes(l));
681
+ return i ? "left" : s ? "right" : !1;
682
+ }, e.getPinnedIndex = () => {
683
+ var t, n;
684
+ const r = e.getIsPinned();
685
+ return r ? (t = (n = o.getState().columnPinning) == null || (n = n[r]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
686
+ };
687
+ },
688
+ createRow: (e, o) => {
689
+ e.getCenterVisibleCells = R(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
690
+ const i = [...n ?? [], ...r ?? []];
691
+ return t.filter((s) => !i.includes(s.column.id));
692
+ }, _(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = R(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
693
+ ...i,
694
+ position: "left"
695
+ })), _(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = R(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((i) => t.find((s) => s.column.id === i)).filter(Boolean).map((i) => ({
696
+ ...i,
697
+ position: "right"
698
+ })), _(o.options, "debugRows", "getRightVisibleCells"));
699
+ },
700
+ createTable: (e) => {
701
+ e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
702
+ var t, n;
703
+ return e.setColumnPinning(o ? Pe() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : Pe());
704
+ }, e.getIsSomeColumnsPinned = (o) => {
705
+ var t;
706
+ const n = e.getState().columnPinning;
707
+ if (!o) {
708
+ var r, i;
709
+ return !!((r = n.left) != null && r.length || (i = n.right) != null && i.length);
710
+ }
711
+ return !!((t = n[o]) != null && t.length);
712
+ }, e.getLeftLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), _(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), _(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = R(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
713
+ const r = [...t ?? [], ...n ?? []];
714
+ return o.filter((i) => !r.includes(i.id));
715
+ }, _(e.options, "debugColumns", "getCenterLeafColumns"));
716
+ }
717
+ }, de = {
718
+ size: 150,
719
+ minSize: 20,
720
+ maxSize: Number.MAX_SAFE_INTEGER
721
+ }, Me = () => ({
722
+ startOffset: null,
723
+ startSize: null,
724
+ deltaOffset: null,
725
+ deltaPercentage: null,
726
+ isResizingColumn: !1,
727
+ columnSizingStart: []
728
+ }), _n = {
729
+ getDefaultColumnDef: () => de,
730
+ getInitialState: (e) => ({
731
+ columnSizing: {},
732
+ columnSizingInfo: Me(),
733
+ ...e
734
+ }),
735
+ getDefaultOptions: (e) => ({
736
+ columnResizeMode: "onEnd",
737
+ columnResizeDirection: "ltr",
738
+ onColumnSizingChange: j("columnSizing", e),
739
+ onColumnSizingInfoChange: j("columnSizingInfo", e)
740
+ }),
741
+ createColumn: (e, o) => {
742
+ e.getSize = () => {
743
+ var t, n, r;
744
+ const i = o.getState().columnSizing[e.id];
745
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : de.minSize, (n = i ?? e.columnDef.size) != null ? n : de.size), (r = e.columnDef.maxSize) != null ? r : de.maxSize);
746
+ }, e.getStart = R((t) => [t, ae(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), _(o.options, "debugColumns", "getStart")), e.getAfter = R((t) => [t, ae(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), _(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
747
+ o.setColumnSizing((t) => {
748
+ let {
749
+ [e.id]: n,
750
+ ...r
751
+ } = t;
752
+ return r;
753
+ });
754
+ }, e.getCanResize = () => {
755
+ var t, n;
756
+ return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = o.options.enableColumnResizing) != null ? n : !0);
757
+ }, e.getIsResizing = () => o.getState().columnSizingInfo.isResizingColumn === e.id;
758
+ },
759
+ createHeader: (e, o) => {
760
+ e.getSize = () => {
761
+ let t = 0;
762
+ const n = (r) => {
763
+ if (r.subHeaders.length)
764
+ r.subHeaders.forEach(n);
765
+ else {
766
+ var i;
767
+ t += (i = r.column.getSize()) != null ? i : 0;
768
+ }
769
+ };
770
+ return n(e), t;
771
+ }, e.getStart = () => {
772
+ if (e.index > 0) {
773
+ const t = e.headerGroup.headers[e.index - 1];
774
+ return t.getStart() + t.getSize();
775
+ }
776
+ return 0;
777
+ }, e.getResizeHandler = (t) => {
778
+ const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
779
+ return (i) => {
780
+ if (!n || !r || (i.persist == null || i.persist(), Ie(i) && i.touches && i.touches.length > 1))
781
+ return;
782
+ const s = e.getSize(), l = e ? e.getLeafHeaders().map((S) => [S.column.id, S.column.getSize()]) : [[n.id, n.getSize()]], u = Ie(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, f = (S, $) => {
783
+ typeof $ == "number" && (o.setColumnSizingInfo((M) => {
784
+ var D, x;
785
+ const A = o.options.columnResizeDirection === "rtl" ? -1 : 1, H = ($ - ((D = M == null ? void 0 : M.startOffset) != null ? D : 0)) * A, K = Math.max(H / ((x = M == null ? void 0 : M.startSize) != null ? x : 0), -0.999999);
786
+ return M.columnSizingStart.forEach((ne) => {
787
+ let [re, oe] = ne;
788
+ g[re] = Math.round(Math.max(oe + oe * K, 0) * 100) / 100;
789
+ }), {
790
+ ...M,
791
+ deltaOffset: H,
792
+ deltaPercentage: K
793
+ };
794
+ }), (o.options.columnResizeMode === "onChange" || S === "end") && o.setColumnSizing((M) => ({
795
+ ...M,
796
+ ...g
797
+ })));
798
+ }, h = (S) => f("move", S), p = (S) => {
799
+ f("end", S), o.setColumnSizingInfo(($) => ({
800
+ ...$,
801
+ isResizingColumn: !1,
802
+ startOffset: null,
803
+ startSize: null,
804
+ deltaOffset: null,
805
+ deltaPercentage: null,
806
+ columnSizingStart: []
807
+ }));
808
+ }, d = t || typeof document < "u" ? document : null, m = {
809
+ moveHandler: (S) => h(S.clientX),
810
+ upHandler: (S) => {
811
+ d == null || d.removeEventListener("mousemove", m.moveHandler), d == null || d.removeEventListener("mouseup", m.upHandler), p(S.clientX);
812
+ }
813
+ }, a = {
814
+ moveHandler: (S) => (S.cancelable && (S.preventDefault(), S.stopPropagation()), h(S.touches[0].clientX), !1),
815
+ upHandler: (S) => {
816
+ var $;
817
+ d == null || d.removeEventListener("touchmove", a.moveHandler), d == null || d.removeEventListener("touchend", a.upHandler), S.cancelable && (S.preventDefault(), S.stopPropagation()), p(($ = S.touches[0]) == null ? void 0 : $.clientX);
818
+ }
819
+ }, C = yn() ? {
820
+ passive: !1
821
+ } : !1;
822
+ Ie(i) ? (d == null || d.addEventListener("touchmove", a.moveHandler, C), d == null || d.addEventListener("touchend", a.upHandler, C)) : (d == null || d.addEventListener("mousemove", m.moveHandler, C), d == null || d.addEventListener("mouseup", m.upHandler, C)), o.setColumnSizingInfo((S) => ({
823
+ ...S,
824
+ startOffset: u,
825
+ startSize: s,
826
+ deltaOffset: 0,
827
+ deltaPercentage: 0,
828
+ columnSizingStart: l,
829
+ isResizingColumn: n.id
830
+ }));
831
+ };
832
+ };
833
+ },
834
+ createTable: (e) => {
835
+ e.setColumnSizing = (o) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(o), e.setColumnSizingInfo = (o) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(o), e.resetColumnSizing = (o) => {
836
+ var t;
837
+ e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
838
+ }, e.resetHeaderSizeInfo = (o) => {
839
+ var t;
840
+ e.setColumnSizingInfo(o ? Me() : (t = e.initialState.columnSizingInfo) != null ? t : Me());
841
+ }, e.getTotalSize = () => {
842
+ var o, t;
843
+ return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
844
+ }, e.getLeftTotalSize = () => {
845
+ var o, t;
846
+ return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
847
+ }, e.getCenterTotalSize = () => {
848
+ var o, t;
849
+ return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
850
+ }, e.getRightTotalSize = () => {
851
+ var o, t;
852
+ return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
853
+ };
854
+ }
855
+ };
856
+ let ce = null;
857
+ function yn() {
858
+ if (typeof ce == "boolean") return ce;
859
+ let e = !1;
860
+ try {
861
+ const o = {
862
+ get passive() {
863
+ return e = !0, !1;
864
+ }
865
+ }, t = () => {
866
+ };
867
+ window.addEventListener("test", t, o), window.removeEventListener("test", t);
868
+ } catch {
869
+ e = !1;
870
+ }
871
+ return ce = e, ce;
872
+ }
873
+ function Ie(e) {
874
+ return e.type === "touchstart";
875
+ }
876
+ const $n = {
877
+ getInitialState: (e) => ({
878
+ columnVisibility: {},
879
+ ...e
880
+ }),
881
+ getDefaultOptions: (e) => ({
882
+ onColumnVisibilityChange: j("columnVisibility", e)
883
+ }),
884
+ createColumn: (e, o) => {
885
+ e.toggleVisibility = (t) => {
886
+ e.getCanHide() && o.setColumnVisibility((n) => ({
887
+ ...n,
888
+ [e.id]: t ?? !e.getIsVisible()
889
+ }));
890
+ }, e.getIsVisible = () => {
891
+ var t, n;
892
+ const r = e.columns;
893
+ return (t = r.length ? r.some((i) => i.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
894
+ }, e.getCanHide = () => {
895
+ var t, n;
896
+ return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
897
+ }, e.getToggleVisibilityHandler = () => (t) => {
898
+ e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
899
+ };
900
+ },
901
+ createRow: (e, o) => {
902
+ e._getAllVisibleCells = R(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), _(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = R(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], _(o.options, "debugRows", "getVisibleCells"));
903
+ },
904
+ createTable: (e) => {
905
+ const o = (t, n) => R(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), _(e.options, "debugColumns", t));
906
+ e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
907
+ var n;
908
+ e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
909
+ }, e.toggleAllColumnsVisible = (t) => {
910
+ var n;
911
+ t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((r, i) => ({
912
+ ...r,
913
+ [i.id]: t || !(i.getCanHide != null && i.getCanHide())
914
+ }), {}));
915
+ }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
916
+ var n;
917
+ e.toggleAllColumnsVisible((n = t.target) == null ? void 0 : n.checked);
918
+ };
919
+ }
920
+ };
921
+ function ae(e, o) {
922
+ return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
923
+ }
924
+ const Fn = {
925
+ createTable: (e) => {
926
+ e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
927
+ if (e._getGlobalFacetedMinMaxValues)
928
+ return e._getGlobalFacetedMinMaxValues();
929
+ };
930
+ }
931
+ }, Vn = {
932
+ getInitialState: (e) => ({
933
+ globalFilter: void 0,
934
+ ...e
935
+ }),
936
+ getDefaultOptions: (e) => ({
937
+ onGlobalFilterChange: j("globalFilter", e),
938
+ globalFilterFn: "auto",
939
+ getColumnCanGlobalFilter: (o) => {
940
+ var t;
941
+ const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[o.id]) == null ? void 0 : t.getValue();
942
+ return typeof n == "string" || typeof n == "number";
943
+ }
944
+ }),
945
+ createColumn: (e, o) => {
946
+ e.getCanGlobalFilter = () => {
947
+ var t, n, r, i;
948
+ return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && ((i = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? i : !0) && !!e.accessorFn;
949
+ };
950
+ },
951
+ createTable: (e) => {
952
+ e.getGlobalAutoFilterFn = () => X.includesString, e.getGlobalFilterFn = () => {
953
+ var o, t;
954
+ const {
955
+ globalFilterFn: n
956
+ } = e.options;
957
+ return Se(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : X[n];
958
+ }, e.setGlobalFilter = (o) => {
959
+ e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
960
+ }, e.resetGlobalFilter = (o) => {
961
+ e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
962
+ };
963
+ }
964
+ }, Pn = {
965
+ getInitialState: (e) => ({
966
+ expanded: {},
967
+ ...e
968
+ }),
969
+ getDefaultOptions: (e) => ({
970
+ onExpandedChange: j("expanded", e),
971
+ paginateExpandedRows: !0
972
+ }),
973
+ createTable: (e) => {
974
+ let o = !1, t = !1;
975
+ e._autoResetExpanded = () => {
976
+ var n, r;
977
+ if (!o) {
978
+ e._queue(() => {
979
+ o = !0;
980
+ });
981
+ return;
982
+ }
983
+ if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
984
+ if (t) return;
985
+ t = !0, e._queue(() => {
986
+ e.resetExpanded(), t = !1;
987
+ });
988
+ }
989
+ }, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
990
+ n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
991
+ }, e.resetExpanded = (n) => {
992
+ var r, i;
993
+ e.setExpanded(n ? {} : (r = (i = e.initialState) == null ? void 0 : i.expanded) != null ? r : {});
994
+ }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
995
+ n.persist == null || n.persist(), e.toggleAllRowsExpanded();
996
+ }, e.getIsSomeRowsExpanded = () => {
997
+ const n = e.getState().expanded;
998
+ return n === !0 || Object.values(n).some(Boolean);
999
+ }, e.getIsAllRowsExpanded = () => {
1000
+ const n = e.getState().expanded;
1001
+ return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((r) => !r.getIsExpanded()));
1002
+ }, e.getExpandedDepth = () => {
1003
+ let n = 0;
1004
+ return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((i) => {
1005
+ const s = i.split(".");
1006
+ n = Math.max(n, s.length);
1007
+ }), n;
1008
+ }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
1009
+ },
1010
+ createRow: (e, o) => {
1011
+ e.toggleExpanded = (t) => {
1012
+ o.setExpanded((n) => {
1013
+ var r;
1014
+ const i = n === !0 ? !0 : !!(n != null && n[e.id]);
1015
+ let s = {};
1016
+ if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((l) => {
1017
+ s[l] = !0;
1018
+ }) : s = n, t = (r = t) != null ? r : !i, !i && t)
1019
+ return {
1020
+ ...s,
1021
+ [e.id]: !0
1022
+ };
1023
+ if (i && !t) {
1024
+ const {
1025
+ [e.id]: l,
1026
+ ...u
1027
+ } = s;
1028
+ return u;
1029
+ }
1030
+ return n;
1031
+ });
1032
+ }, e.getIsExpanded = () => {
1033
+ var t;
1034
+ const n = o.getState().expanded;
1035
+ return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n != null && n[e.id]);
1036
+ }, e.getCanExpand = () => {
1037
+ var t, n, r;
1038
+ return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((r = e.subRows) != null && r.length);
1039
+ }, e.getIsAllParentsExpanded = () => {
1040
+ let t = !0, n = e;
1041
+ for (; t && n.parentId; )
1042
+ n = o.getRow(n.parentId, !0), t = n.getIsExpanded();
1043
+ return t;
1044
+ }, e.getToggleExpandedHandler = () => {
1045
+ const t = e.getCanExpand();
1046
+ return () => {
1047
+ t && e.toggleExpanded();
1048
+ };
1049
+ };
1050
+ }
1051
+ }, Ae = 0, Le = 10, xe = () => ({
1052
+ pageIndex: Ae,
1053
+ pageSize: Le
1054
+ }), Mn = {
1055
+ getInitialState: (e) => ({
1056
+ ...e,
1057
+ pagination: {
1058
+ ...xe(),
1059
+ ...e == null ? void 0 : e.pagination
1060
+ }
1061
+ }),
1062
+ getDefaultOptions: (e) => ({
1063
+ onPaginationChange: j("pagination", e)
1064
+ }),
1065
+ createTable: (e) => {
1066
+ let o = !1, t = !1;
1067
+ e._autoResetPageIndex = () => {
1068
+ var n, r;
1069
+ if (!o) {
1070
+ e._queue(() => {
1071
+ o = !0;
1072
+ });
1073
+ return;
1074
+ }
1075
+ if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1076
+ if (t) return;
1077
+ t = !0, e._queue(() => {
1078
+ e.resetPageIndex(), t = !1;
1079
+ });
1080
+ }
1081
+ }, e.setPagination = (n) => {
1082
+ const r = (i) => Q(n, i);
1083
+ return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1084
+ }, e.resetPagination = (n) => {
1085
+ var r;
1086
+ e.setPagination(n ? xe() : (r = e.initialState.pagination) != null ? r : xe());
1087
+ }, e.setPageIndex = (n) => {
1088
+ e.setPagination((r) => {
1089
+ let i = Q(n, r.pageIndex);
1090
+ const s = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1091
+ return i = Math.max(0, Math.min(i, s)), {
1092
+ ...r,
1093
+ pageIndex: i
1094
+ };
1095
+ });
1096
+ }, e.resetPageIndex = (n) => {
1097
+ var r, i;
1098
+ e.setPageIndex(n ? Ae : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : Ae);
1099
+ }, e.resetPageSize = (n) => {
1100
+ var r, i;
1101
+ e.setPageSize(n ? Le : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Le);
1102
+ }, e.setPageSize = (n) => {
1103
+ e.setPagination((r) => {
1104
+ const i = Math.max(1, Q(n, r.pageSize)), s = r.pageSize * r.pageIndex, l = Math.floor(s / i);
1105
+ return {
1106
+ ...r,
1107
+ pageIndex: l,
1108
+ pageSize: i
1109
+ };
1110
+ });
1111
+ }, e.setPageCount = (n) => e.setPagination((r) => {
1112
+ var i;
1113
+ let s = Q(n, (i = e.options.pageCount) != null ? i : -1);
1114
+ return typeof s == "number" && (s = Math.max(-1, s)), {
1115
+ ...r,
1116
+ pageCount: s
1117
+ };
1118
+ }), e.getPageOptions = R(() => [e.getPageCount()], (n) => {
1119
+ let r = [];
1120
+ return n && n > 0 && (r = [...new Array(n)].fill(null).map((i, s) => s)), r;
1121
+ }, _(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1122
+ const {
1123
+ pageIndex: n
1124
+ } = e.getState().pagination, r = e.getPageCount();
1125
+ return r === -1 ? !0 : r === 0 ? !1 : n < r - 1;
1126
+ }, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
1127
+ var n;
1128
+ return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
1129
+ }, e.getRowCount = () => {
1130
+ var n;
1131
+ return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1132
+ };
1133
+ }
1134
+ }, He = () => ({
1135
+ top: [],
1136
+ bottom: []
1137
+ }), In = {
1138
+ getInitialState: (e) => ({
1139
+ rowPinning: He(),
1140
+ ...e
1141
+ }),
1142
+ getDefaultOptions: (e) => ({
1143
+ onRowPinningChange: j("rowPinning", e)
1144
+ }),
1145
+ createRow: (e, o) => {
1146
+ e.pin = (t, n, r) => {
1147
+ const i = n ? e.getLeafRows().map((u) => {
1148
+ let {
1149
+ id: g
1150
+ } = u;
1151
+ return g;
1152
+ }) : [], s = r ? e.getParentRows().map((u) => {
1153
+ let {
1154
+ id: g
1155
+ } = u;
1156
+ return g;
1157
+ }) : [], l = /* @__PURE__ */ new Set([...s, e.id, ...i]);
1158
+ o.setRowPinning((u) => {
1159
+ var g, f;
1160
+ if (t === "bottom") {
1161
+ var h, p;
1162
+ return {
1163
+ top: ((h = u == null ? void 0 : u.top) != null ? h : []).filter((a) => !(l != null && l.has(a))),
1164
+ bottom: [...((p = u == null ? void 0 : u.bottom) != null ? p : []).filter((a) => !(l != null && l.has(a))), ...Array.from(l)]
1165
+ };
1166
+ }
1167
+ if (t === "top") {
1168
+ var d, m;
1169
+ return {
1170
+ top: [...((d = u == null ? void 0 : u.top) != null ? d : []).filter((a) => !(l != null && l.has(a))), ...Array.from(l)],
1171
+ bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((a) => !(l != null && l.has(a)))
1172
+ };
1173
+ }
1174
+ return {
1175
+ top: ((g = u == null ? void 0 : u.top) != null ? g : []).filter((a) => !(l != null && l.has(a))),
1176
+ bottom: ((f = u == null ? void 0 : u.bottom) != null ? f : []).filter((a) => !(l != null && l.has(a)))
1177
+ };
1178
+ });
1179
+ }, e.getCanPin = () => {
1180
+ var t;
1181
+ const {
1182
+ enableRowPinning: n,
1183
+ enablePinning: r
1184
+ } = o.options;
1185
+ return typeof n == "function" ? n(e) : (t = n ?? r) != null ? t : !0;
1186
+ }, e.getIsPinned = () => {
1187
+ const t = [e.id], {
1188
+ top: n,
1189
+ bottom: r
1190
+ } = o.getState().rowPinning, i = t.some((l) => n == null ? void 0 : n.includes(l)), s = t.some((l) => r == null ? void 0 : r.includes(l));
1191
+ return i ? "top" : s ? "bottom" : !1;
1192
+ }, e.getPinnedIndex = () => {
1193
+ var t, n;
1194
+ const r = e.getIsPinned();
1195
+ if (!r) return -1;
1196
+ const i = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((s) => {
1197
+ let {
1198
+ id: l
1199
+ } = s;
1200
+ return l;
1201
+ });
1202
+ return (n = i == null ? void 0 : i.indexOf(e.id)) != null ? n : -1;
1203
+ };
1204
+ },
1205
+ createTable: (e) => {
1206
+ e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1207
+ var t, n;
1208
+ return e.setRowPinning(o ? He() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : He());
1209
+ }, e.getIsSomeRowsPinned = (o) => {
1210
+ var t;
1211
+ const n = e.getState().rowPinning;
1212
+ if (!o) {
1213
+ var r, i;
1214
+ return !!((r = n.top) != null && r.length || (i = n.bottom) != null && i.length);
1215
+ }
1216
+ return !!((t = n[o]) != null && t.length);
1217
+ }, e._getPinnedRows = (o, t, n) => {
1218
+ var r;
1219
+ return ((r = e.options.keepPinnedRows) == null || r ? (
1220
+ //get all rows that are pinned even if they would not be otherwise visible
1221
+ //account for expanded parent rows, but not pagination or filtering
1222
+ (t ?? []).map((s) => {
1223
+ const l = e.getRow(s, !0);
1224
+ return l.getIsAllParentsExpanded() ? l : null;
1225
+ })
1226
+ ) : (
1227
+ //else get only visible rows that are pinned
1228
+ (t ?? []).map((s) => o.find((l) => l.id === s))
1229
+ )).filter(Boolean).map((s) => ({
1230
+ ...s,
1231
+ position: n
1232
+ }));
1233
+ }, e.getTopRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), _(e.options, "debugRows", "getTopRows")), e.getBottomRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), _(e.options, "debugRows", "getBottomRows")), e.getCenterRows = R(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1234
+ const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1235
+ return o.filter((i) => !r.has(i.id));
1236
+ }, _(e.options, "debugRows", "getCenterRows"));
1237
+ }
1238
+ }, xn = {
1239
+ getInitialState: (e) => ({
1240
+ rowSelection: {},
1241
+ ...e
1242
+ }),
1243
+ getDefaultOptions: (e) => ({
1244
+ onRowSelectionChange: j("rowSelection", e),
1245
+ enableRowSelection: !0,
1246
+ enableMultiRowSelection: !0,
1247
+ enableSubRowSelection: !0
1248
+ // enableGroupingRowSelection: false,
1249
+ // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
1250
+ // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1251
+ }),
1252
+ createTable: (e) => {
1253
+ e.setRowSelection = (o) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(o), e.resetRowSelection = (o) => {
1254
+ var t;
1255
+ return e.setRowSelection(o ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1256
+ }, e.toggleAllRowsSelected = (o) => {
1257
+ e.setRowSelection((t) => {
1258
+ o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
1259
+ const n = {
1260
+ ...t
1261
+ }, r = e.getPreGroupedRowModel().flatRows;
1262
+ return o ? r.forEach((i) => {
1263
+ i.getCanSelect() && (n[i.id] = !0);
1264
+ }) : r.forEach((i) => {
1265
+ delete n[i.id];
1266
+ }), n;
1267
+ });
1268
+ }, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
1269
+ const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = {
1270
+ ...t
1271
+ };
1272
+ return e.getRowModel().rows.forEach((i) => {
1273
+ ze(r, i.id, n, !0, e);
1274
+ }), r;
1275
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = R(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? De(e, t) : {
1276
+ rows: [],
1277
+ flatRows: [],
1278
+ rowsById: {}
1279
+ }, _(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = R(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? De(e, t) : {
1280
+ rows: [],
1281
+ flatRows: [],
1282
+ rowsById: {}
1283
+ }, _(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = R(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? De(e, t) : {
1284
+ rows: [],
1285
+ flatRows: [],
1286
+ rowsById: {}
1287
+ }, _(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1288
+ const o = e.getFilteredRowModel().flatRows, {
1289
+ rowSelection: t
1290
+ } = e.getState();
1291
+ let n = !!(o.length && Object.keys(t).length);
1292
+ return n && o.some((r) => r.getCanSelect() && !t[r.id]) && (n = !1), n;
1293
+ }, e.getIsAllPageRowsSelected = () => {
1294
+ const o = e.getPaginationRowModel().flatRows.filter((r) => r.getCanSelect()), {
1295
+ rowSelection: t
1296
+ } = e.getState();
1297
+ let n = !!o.length;
1298
+ return n && o.some((r) => !t[r.id]) && (n = !1), n;
1299
+ }, e.getIsSomeRowsSelected = () => {
1300
+ var o;
1301
+ const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
1302
+ return t > 0 && t < e.getFilteredRowModel().flatRows.length;
1303
+ }, e.getIsSomePageRowsSelected = () => {
1304
+ const o = e.getPaginationRowModel().flatRows;
1305
+ return e.getIsAllPageRowsSelected() ? !1 : o.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1306
+ }, e.getToggleAllRowsSelectedHandler = () => (o) => {
1307
+ e.toggleAllRowsSelected(o.target.checked);
1308
+ }, e.getToggleAllPageRowsSelectedHandler = () => (o) => {
1309
+ e.toggleAllPageRowsSelected(o.target.checked);
1310
+ };
1311
+ },
1312
+ createRow: (e, o) => {
1313
+ e.toggleSelected = (t, n) => {
1314
+ const r = e.getIsSelected();
1315
+ o.setRowSelection((i) => {
1316
+ var s;
1317
+ if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1318
+ return i;
1319
+ const l = {
1320
+ ...i
1321
+ };
1322
+ return ze(l, e.id, t, (s = n == null ? void 0 : n.selectChildren) != null ? s : !0, o), l;
1323
+ });
1324
+ }, e.getIsSelected = () => {
1325
+ const {
1326
+ rowSelection: t
1327
+ } = o.getState();
1328
+ return Ne(e, t);
1329
+ }, e.getIsSomeSelected = () => {
1330
+ const {
1331
+ rowSelection: t
1332
+ } = o.getState();
1333
+ return Ge(e, t) === "some";
1334
+ }, e.getIsAllSubRowsSelected = () => {
1335
+ const {
1336
+ rowSelection: t
1337
+ } = o.getState();
1338
+ return Ge(e, t) === "all";
1339
+ }, e.getCanSelect = () => {
1340
+ var t;
1341
+ return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
1342
+ }, e.getCanSelectSubRows = () => {
1343
+ var t;
1344
+ return typeof o.options.enableSubRowSelection == "function" ? o.options.enableSubRowSelection(e) : (t = o.options.enableSubRowSelection) != null ? t : !0;
1345
+ }, e.getCanMultiSelect = () => {
1346
+ var t;
1347
+ return typeof o.options.enableMultiRowSelection == "function" ? o.options.enableMultiRowSelection(e) : (t = o.options.enableMultiRowSelection) != null ? t : !0;
1348
+ }, e.getToggleSelectedHandler = () => {
1349
+ const t = e.getCanSelect();
1350
+ return (n) => {
1351
+ var r;
1352
+ t && e.toggleSelected((r = n.target) == null ? void 0 : r.checked);
1353
+ };
1354
+ };
1355
+ }
1356
+ }, ze = (e, o, t, n, r) => {
1357
+ var i;
1358
+ const s = r.getRow(o, !0);
1359
+ t ? (s.getCanMultiSelect() || Object.keys(e).forEach((l) => delete e[l]), s.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = s.subRows) != null && i.length && s.getCanSelectSubRows() && s.subRows.forEach((l) => ze(e, l.id, t, n, r));
1360
+ };
1361
+ function De(e, o) {
1362
+ const t = e.getState().rowSelection, n = [], r = {}, i = function(s, l) {
1363
+ return s.map((u) => {
1364
+ var g;
1365
+ const f = Ne(u, t);
1366
+ if (f && (n.push(u), r[u.id] = u), (g = u.subRows) != null && g.length && (u = {
1367
+ ...u,
1368
+ subRows: i(u.subRows)
1369
+ }), f)
1370
+ return u;
1371
+ }).filter(Boolean);
1372
+ };
1373
+ return {
1374
+ rows: i(o.rows),
1375
+ flatRows: n,
1376
+ rowsById: r
1377
+ };
1378
+ }
1379
+ function Ne(e, o) {
1380
+ var t;
1381
+ return (t = o[e.id]) != null ? t : !1;
1382
+ }
1383
+ function Ge(e, o, t) {
1384
+ var n;
1385
+ if (!((n = e.subRows) != null && n.length)) return !1;
1386
+ let r = !0, i = !1;
1387
+ return e.subRows.forEach((s) => {
1388
+ if (!(i && !r) && (s.getCanSelect() && (Ne(s, o) ? i = !0 : r = !1), s.subRows && s.subRows.length)) {
1389
+ const l = Ge(s, o);
1390
+ l === "all" ? i = !0 : (l === "some" && (i = !0), r = !1);
1391
+ }
1392
+ }), r ? "all" : i ? "some" : !1;
1393
+ }
1394
+ const Oe = /([0-9]+)/gm, Hn = (e, o, t) => Rt(b(e.getValue(t)).toLowerCase(), b(o.getValue(t)).toLowerCase()), Dn = (e, o, t) => Rt(b(e.getValue(t)), b(o.getValue(t))), En = (e, o, t) => qe(b(e.getValue(t)).toLowerCase(), b(o.getValue(t)).toLowerCase()), kn = (e, o, t) => qe(b(e.getValue(t)), b(o.getValue(t))), An = (e, o, t) => {
1395
+ const n = e.getValue(t), r = o.getValue(t);
1396
+ return n > r ? 1 : n < r ? -1 : 0;
1397
+ }, Ln = (e, o, t) => qe(e.getValue(t), o.getValue(t));
1398
+ function qe(e, o) {
1399
+ return e === o ? 0 : e > o ? 1 : -1;
1400
+ }
1401
+ function b(e) {
1402
+ return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1403
+ }
1404
+ function Rt(e, o) {
1405
+ const t = e.split(Oe).filter(Boolean), n = o.split(Oe).filter(Boolean);
1406
+ for (; t.length && n.length; ) {
1407
+ const r = t.shift(), i = n.shift(), s = parseInt(r, 10), l = parseInt(i, 10), u = [s, l].sort();
1408
+ if (isNaN(u[0])) {
1409
+ if (r > i)
1410
+ return 1;
1411
+ if (i > r)
1412
+ return -1;
1413
+ continue;
1414
+ }
1415
+ if (isNaN(u[1]))
1416
+ return isNaN(s) ? -1 : 1;
1417
+ if (s > l)
1418
+ return 1;
1419
+ if (l > s)
1420
+ return -1;
1421
+ }
1422
+ return t.length - n.length;
1423
+ }
1424
+ const ie = {
1425
+ alphanumeric: Hn,
1426
+ alphanumericCaseSensitive: Dn,
1427
+ text: En,
1428
+ textCaseSensitive: kn,
1429
+ datetime: An,
1430
+ basic: Ln
1431
+ }, zn = {
1432
+ getInitialState: (e) => ({
1433
+ sorting: [],
1434
+ ...e
1435
+ }),
1436
+ getDefaultColumnDef: () => ({
1437
+ sortingFn: "auto",
1438
+ sortUndefined: 1
1439
+ }),
1440
+ getDefaultOptions: (e) => ({
1441
+ onSortingChange: j("sorting", e),
1442
+ isMultiSortEvent: (o) => o.shiftKey
1443
+ }),
1444
+ createColumn: (e, o) => {
1445
+ e.getAutoSortingFn = () => {
1446
+ const t = o.getFilteredRowModel().flatRows.slice(10);
1447
+ let n = !1;
1448
+ for (const r of t) {
1449
+ const i = r == null ? void 0 : r.getValue(e.id);
1450
+ if (Object.prototype.toString.call(i) === "[object Date]")
1451
+ return ie.datetime;
1452
+ if (typeof i == "string" && (n = !0, i.split(Oe).length > 1))
1453
+ return ie.alphanumeric;
1454
+ }
1455
+ return n ? ie.text : ie.basic;
1456
+ }, e.getAutoSortDir = () => {
1457
+ const t = o.getFilteredRowModel().flatRows[0];
1458
+ return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
1459
+ }, e.getSortingFn = () => {
1460
+ var t, n;
1461
+ if (!e)
1462
+ throw new Error();
1463
+ return Se(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : ie[e.columnDef.sortingFn];
1464
+ }, e.toggleSorting = (t, n) => {
1465
+ const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
1466
+ o.setSorting((s) => {
1467
+ const l = s == null ? void 0 : s.find((d) => d.id === e.id), u = s == null ? void 0 : s.findIndex((d) => d.id === e.id);
1468
+ let g = [], f, h = i ? t : r === "desc";
1469
+ if (s != null && s.length && e.getCanMultiSort() && n ? l ? f = "toggle" : f = "add" : s != null && s.length && u !== s.length - 1 ? f = "replace" : l ? f = "toggle" : f = "replace", f === "toggle" && (i || r || (f = "remove")), f === "add") {
1470
+ var p;
1471
+ g = [...s, {
1472
+ id: e.id,
1473
+ desc: h
1474
+ }], g.splice(0, g.length - ((p = o.options.maxMultiSortColCount) != null ? p : Number.MAX_SAFE_INTEGER));
1475
+ } else f === "toggle" ? g = s.map((d) => d.id === e.id ? {
1476
+ ...d,
1477
+ desc: h
1478
+ } : d) : f === "remove" ? g = s.filter((d) => d.id !== e.id) : g = [{
1479
+ id: e.id,
1480
+ desc: h
1481
+ }];
1482
+ return g;
1483
+ });
1484
+ }, e.getFirstSortDir = () => {
1485
+ var t, n;
1486
+ return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1487
+ }, e.getNextSortingOrder = (t) => {
1488
+ var n, r;
1489
+ const i = e.getFirstSortDir(), s = e.getIsSorted();
1490
+ return s ? s !== i && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1491
+ (!(t && (r = o.options.enableMultiRemove) != null) || r) ? !1 : s === "desc" ? "asc" : "desc" : i;
1492
+ }, e.getCanSort = () => {
1493
+ var t, n;
1494
+ return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1495
+ }, e.getCanMultiSort = () => {
1496
+ var t, n;
1497
+ return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
1498
+ }, e.getIsSorted = () => {
1499
+ var t;
1500
+ const n = (t = o.getState().sorting) == null ? void 0 : t.find((r) => r.id === e.id);
1501
+ return n ? n.desc ? "desc" : "asc" : !1;
1502
+ }, e.getSortIndex = () => {
1503
+ var t, n;
1504
+ return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
1505
+ }, e.clearSorting = () => {
1506
+ o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1507
+ }, e.getToggleSortingHandler = () => {
1508
+ const t = e.getCanSort();
1509
+ return (n) => {
1510
+ t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? o.options.isMultiSortEvent == null ? void 0 : o.options.isMultiSortEvent(n) : !1));
1511
+ };
1512
+ };
1513
+ },
1514
+ createTable: (e) => {
1515
+ e.setSorting = (o) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(o), e.resetSorting = (o) => {
1516
+ var t, n;
1517
+ e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1518
+ }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1519
+ }
1520
+ }, Gn = [
1521
+ rn,
1522
+ $n,
1523
+ vn,
1524
+ Rn,
1525
+ sn,
1526
+ un,
1527
+ Fn,
1528
+ //depends on ColumnFaceting
1529
+ Vn,
1530
+ //depends on ColumnFiltering
1531
+ zn,
1532
+ wn,
1533
+ //depends on RowSorting
1534
+ Pn,
1535
+ Mn,
1536
+ In,
1537
+ xn,
1538
+ _n
1539
+ ];
1540
+ function On(e) {
1541
+ var o, t;
1542
+ process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1543
+ const n = [...Gn, ...(o = e._features) != null ? o : []];
1544
+ let r = {
1545
+ _features: n
1546
+ };
1547
+ const i = r._features.reduce((p, d) => Object.assign(p, d.getDefaultOptions == null ? void 0 : d.getDefaultOptions(r)), {}), s = (p) => r.options.mergeOptions ? r.options.mergeOptions(i, p) : {
1548
+ ...i,
1549
+ ...p
1550
+ };
1551
+ let u = {
1552
+ ...{},
1553
+ ...(t = e.initialState) != null ? t : {}
1554
+ };
1555
+ r._features.forEach((p) => {
1556
+ var d;
1557
+ u = (d = p.getInitialState == null ? void 0 : p.getInitialState(u)) != null ? d : u;
1558
+ });
1559
+ const g = [];
1560
+ let f = !1;
1561
+ const h = {
1562
+ _features: n,
1563
+ options: {
1564
+ ...i,
1565
+ ...e
1566
+ },
1567
+ initialState: u,
1568
+ _queue: (p) => {
1569
+ g.push(p), f || (f = !0, Promise.resolve().then(() => {
1570
+ for (; g.length; )
1571
+ g.shift()();
1572
+ f = !1;
1573
+ }).catch((d) => setTimeout(() => {
1574
+ throw d;
1575
+ })));
1576
+ },
1577
+ reset: () => {
1578
+ r.setState(r.initialState);
1579
+ },
1580
+ setOptions: (p) => {
1581
+ const d = Q(p, r.options);
1582
+ r.options = s(d);
1583
+ },
1584
+ getState: () => r.options.state,
1585
+ setState: (p) => {
1586
+ r.options.onStateChange == null || r.options.onStateChange(p);
1587
+ },
1588
+ _getRowId: (p, d, m) => {
1589
+ var a;
1590
+ return (a = r.options.getRowId == null ? void 0 : r.options.getRowId(p, d, m)) != null ? a : `${m ? [m.id, d].join(".") : d}`;
1591
+ },
1592
+ getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1593
+ // The final calls start at the bottom of the model,
1594
+ // expanded rows, which then work their way up
1595
+ getRowModel: () => r.getPaginationRowModel(),
1596
+ //in next version, we should just pass in the row model as the optional 2nd arg
1597
+ getRow: (p, d) => {
1598
+ let m = (d ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[p];
1599
+ if (!m && (m = r.getCoreRowModel().rowsById[p], !m))
1600
+ throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${p}`) : new Error();
1601
+ return m;
1602
+ },
1603
+ _getDefaultColumnDef: R(() => [r.options.defaultColumn], (p) => {
1604
+ var d;
1605
+ return p = (d = p) != null ? d : {}, {
1606
+ header: (m) => {
1607
+ const a = m.header.column.columnDef;
1608
+ return a.accessorKey ? a.accessorKey : a.accessorFn ? a.id : null;
1609
+ },
1610
+ // footer: props => props.header.column.id,
1611
+ cell: (m) => {
1612
+ var a, C;
1613
+ return (a = (C = m.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? a : null;
1614
+ },
1615
+ ...r._features.reduce((m, a) => Object.assign(m, a.getDefaultColumnDef == null ? void 0 : a.getDefaultColumnDef()), {}),
1616
+ ...p
1617
+ };
1618
+ }, _(e, "debugColumns", "_getDefaultColumnDef")),
1619
+ _getColumnDefs: () => r.options.columns,
1620
+ getAllColumns: R(() => [r._getColumnDefs()], (p) => {
1621
+ const d = function(m, a, C) {
1622
+ return C === void 0 && (C = 0), m.map((S) => {
1623
+ const $ = on(r, S, C, a), M = S;
1624
+ return $.columns = M.columns ? d(M.columns, $, C + 1) : [], $;
1625
+ });
1626
+ };
1627
+ return d(p);
1628
+ }, _(e, "debugColumns", "getAllColumns")),
1629
+ getAllFlatColumns: R(() => [r.getAllColumns()], (p) => p.flatMap((d) => d.getFlatColumns()), _(e, "debugColumns", "getAllFlatColumns")),
1630
+ _getAllFlatColumnsById: R(() => [r.getAllFlatColumns()], (p) => p.reduce((d, m) => (d[m.id] = m, d), {}), _(e, "debugColumns", "getAllFlatColumnsById")),
1631
+ getAllLeafColumns: R(() => [r.getAllColumns(), r._getOrderColumnsFn()], (p, d) => {
1632
+ let m = p.flatMap((a) => a.getLeafColumns());
1633
+ return d(m);
1634
+ }, _(e, "debugColumns", "getAllLeafColumns")),
1635
+ getColumn: (p) => {
1636
+ const d = r._getAllFlatColumnsById()[p];
1637
+ return process.env.NODE_ENV !== "production" && !d && console.error(`[Table] Column with id '${p}' does not exist.`), d;
1638
+ }
1639
+ };
1640
+ Object.assign(r, h);
1641
+ for (let p = 0; p < r._features.length; p++) {
1642
+ const d = r._features[p];
1643
+ d == null || d.createTable == null || d.createTable(r);
1644
+ }
1645
+ return r;
1646
+ }
1647
+ function Bn() {
1648
+ return (e) => R(() => [e.options.data], (o) => {
1649
+ const t = {
1650
+ rows: [],
1651
+ flatRows: [],
1652
+ rowsById: {}
1653
+ }, n = function(r, i, s) {
1654
+ i === void 0 && (i = 0);
1655
+ const l = [];
1656
+ for (let g = 0; g < r.length; g++) {
1657
+ const f = ln(e, e._getRowId(r[g], g, s), r[g], g, i, void 0, s == null ? void 0 : s.id);
1658
+ if (t.flatRows.push(f), t.rowsById[f.id] = f, l.push(f), e.options.getSubRows) {
1659
+ var u;
1660
+ f.originalSubRows = e.options.getSubRows(r[g], g), (u = f.originalSubRows) != null && u.length && (f.subRows = n(f.originalSubRows, i + 1, f));
1661
+ }
1662
+ }
1663
+ return l;
1664
+ };
1665
+ return t.rows = n(o), t;
1666
+ }, _(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
1667
+ }
1668
+ function Tn() {
1669
+ return (e) => R(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
1670
+ if (!t.rows.length || !(o != null && o.length))
1671
+ return t;
1672
+ const n = e.getState().sorting, r = [], i = n.filter((u) => {
1673
+ var g;
1674
+ return (g = e.getColumn(u.id)) == null ? void 0 : g.getCanSort();
1675
+ }), s = {};
1676
+ i.forEach((u) => {
1677
+ const g = e.getColumn(u.id);
1678
+ g && (s[u.id] = {
1679
+ sortUndefined: g.columnDef.sortUndefined,
1680
+ invertSorting: g.columnDef.invertSorting,
1681
+ sortingFn: g.getSortingFn()
1682
+ });
1683
+ });
1684
+ const l = (u) => {
1685
+ const g = u.map((f) => ({
1686
+ ...f
1687
+ }));
1688
+ return g.sort((f, h) => {
1689
+ for (let d = 0; d < i.length; d += 1) {
1690
+ var p;
1691
+ const m = i[d], a = s[m.id], C = a.sortUndefined, S = (p = m == null ? void 0 : m.desc) != null ? p : !1;
1692
+ let $ = 0;
1693
+ if (C) {
1694
+ const M = f.getValue(m.id), D = h.getValue(m.id), x = M === void 0, A = D === void 0;
1695
+ if (x || A) {
1696
+ if (C === "first") return x ? -1 : 1;
1697
+ if (C === "last") return x ? 1 : -1;
1698
+ $ = x && A ? 0 : x ? C : -C;
1699
+ }
1700
+ }
1701
+ if ($ === 0 && ($ = a.sortingFn(f, h, m.id)), $ !== 0)
1702
+ return S && ($ *= -1), a.invertSorting && ($ *= -1), $;
1703
+ }
1704
+ return f.index - h.index;
1705
+ }), g.forEach((f) => {
1706
+ var h;
1707
+ r.push(f), (h = f.subRows) != null && h.length && (f.subRows = l(f.subRows));
1708
+ }), g;
1709
+ };
1710
+ return {
1711
+ rows: l(t.rows),
1712
+ flatRows: r,
1713
+ rowsById: t.rowsById
1714
+ };
1715
+ }, _(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
1716
+ }
1717
+ /**
1718
+ * vue-table
1719
+ *
1720
+ * Copyright (c) TanStack
1721
+ *
1722
+ * This source code is licensed under the MIT license found in the
1723
+ * LICENSE.md file in the root directory of this source tree.
1724
+ *
1725
+ * @license MIT
1726
+ */
1727
+ function fe() {
1728
+ return !0;
1729
+ }
1730
+ const Nn = Symbol("merge-proxy"), qn = {
1731
+ get(e, o, t) {
1732
+ return o === Nn ? t : e.get(o);
1733
+ },
1734
+ has(e, o) {
1735
+ return e.has(o);
1736
+ },
1737
+ set: fe,
1738
+ deleteProperty: fe,
1739
+ getOwnPropertyDescriptor(e, o) {
1740
+ return {
1741
+ configurable: !0,
1742
+ enumerable: !0,
1743
+ get() {
1744
+ return e.get(o);
1745
+ },
1746
+ set: fe,
1747
+ deleteProperty: fe
1748
+ };
1749
+ },
1750
+ ownKeys(e) {
1751
+ return e.keys();
1752
+ }
1753
+ };
1754
+ function Ee(e) {
1755
+ return "value" in e ? e.value : e;
1756
+ }
1757
+ function le() {
1758
+ for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
1759
+ o[t] = arguments[t];
1760
+ return new Proxy({
1761
+ get(n) {
1762
+ for (let r = o.length - 1; r >= 0; r--) {
1763
+ const i = Ee(o[r])[n];
1764
+ if (i !== void 0) return i;
1765
+ }
1766
+ },
1767
+ has(n) {
1768
+ for (let r = o.length - 1; r >= 0; r--)
1769
+ if (n in Ee(o[r])) return !0;
1770
+ return !1;
1771
+ },
1772
+ keys() {
1773
+ const n = [];
1774
+ for (let r = 0; r < o.length; r++) n.push(...Object.keys(Ee(o[r])));
1775
+ return [...Array.from(new Set(n))];
1776
+ }
1777
+ }, qn);
1778
+ }
1779
+ Be({
1780
+ props: ["render", "props"],
1781
+ setup: (e) => () => typeof e.render == "function" || typeof e.render == "object" ? st(e.render, e.props) : e.render
1782
+ });
1783
+ function rt(e) {
1784
+ return le(e, {
1785
+ data: v(e.data)
1786
+ });
1787
+ }
1788
+ function jn(e) {
1789
+ const o = Dt(e.data), t = le({
1790
+ state: {},
1791
+ // Dummy state
1792
+ onStateChange: () => {
1793
+ },
1794
+ // noop
1795
+ renderFallbackValue: null,
1796
+ mergeOptions(i, s) {
1797
+ return o ? {
1798
+ ...i,
1799
+ ...s
1800
+ } : le(i, s);
1801
+ }
1802
+ }, o ? rt(e) : e), n = On(t);
1803
+ if (o) {
1804
+ const i = lt(e.data);
1805
+ se(i, () => {
1806
+ n.setState((s) => ({
1807
+ ...s,
1808
+ data: i.value
1809
+ }));
1810
+ }, {
1811
+ immediate: !0
1812
+ });
1813
+ }
1814
+ const r = ue(n.initialState);
1815
+ return Et(() => {
1816
+ n.setOptions((i) => {
1817
+ var s;
1818
+ const l = new Proxy({}, {
1819
+ get: (u, g) => r.value[g]
1820
+ });
1821
+ return le(i, o ? rt(e) : e, {
1822
+ // merge the initialState and `options.state`
1823
+ // create a new proxy on each `setOptions` call
1824
+ // and get the value from state on each property access
1825
+ state: le(l, (s = e.state) != null ? s : {}),
1826
+ // Similarly, we'll maintain both our internal state and any user-provided
1827
+ // state.
1828
+ onStateChange: (u) => {
1829
+ u instanceof Function ? r.value = u(r.value) : r.value = u, e.onStateChange == null || e.onStateChange(u);
1830
+ }
1831
+ });
1832
+ });
1833
+ }), n;
1834
+ }
1835
+ const Kn = ["lg", "xlg"];
1836
+ function it(e, o) {
1837
+ return Bt(e, o);
1838
+ }
1839
+ const Un = ["simple", "advance"], Wn = {
1840
+ key: 1,
1841
+ viewBox: "0 0 108 88",
1842
+ fill: "none"
1843
+ }, Zn = ["fill"], Xn = ["fill"], Yn = ["fill"], Jn = ["fill"], Qn = ["stroke"], bn = ["stroke"], eo = ["stroke"], to = /* @__PURE__ */ Be({
1844
+ ...Ut("Empty"),
1845
+ __name: "Empty",
1846
+ props: {
1847
+ type: { default: "simple" },
1848
+ class: {},
1849
+ imageCls: {},
1850
+ titleCls: {},
1851
+ descriptionCls: {},
1852
+ contentCls: {},
1853
+ textCls: {},
1854
+ actionsCls: {},
1855
+ icon: { default: "tabler:barrier-block" },
1856
+ title: {},
1857
+ description: {}
1858
+ },
1859
+ setup(e) {
1860
+ const o = e, t = ut(), n = at("empty"), r = gt(n, {
1861
+ variants: {
1862
+ type: me(Un, n)
1863
+ }
1864
+ }), i = W(() => o.title || !!t.title), s = W(() => o.description || !!t.description);
1865
+ return (l, u) => (V(), P("div", {
1866
+ class: z([
1867
+ v(r)({
1868
+ type: l.type
1869
+ }),
1870
+ o.class
1871
+ ])
1872
+ }, [
1873
+ I("div", {
1874
+ class: z([v(q)(v(n), "image"), l.imageCls])
1875
+ }, [
1876
+ B(l.$slots, "image", {}, () => [
1877
+ l.type === "simple" ? (V(), ke(Ce, {
1878
+ key: 0,
1879
+ icon: l.icon,
1880
+ size: "sm"
1881
+ }, null, 8, ["icon"])) : (V(), P("svg", Wn, [
1882
+ I("path", {
1883
+ "fill-rule": "evenodd",
1884
+ "clip-rule": "evenodd",
1885
+ d: "M23.6045 61.3504H67.8586C68.1089 61.3504 68.353 61.323 68.588 61.2709C68.823 61.323 69.0671 61.3504 69.3175 61.3504H94.6055C96.4856 61.3504 98.0097 59.8051 98.0097 57.899C98.0097 55.9929 96.4856 54.4477 94.6055 54.4477H91.6877C89.8076 54.4477 88.2835 52.9024 88.2835 50.9963C88.2835 49.0902 89.8076 47.545 91.6877 47.545H100.928C102.808 47.545 104.332 45.9997 104.332 44.0936C104.332 42.1875 102.808 40.6423 100.928 40.6423H90.2287C92.1088 40.6423 93.6329 39.0971 93.6329 37.1909C93.6329 35.2848 92.1088 33.7396 90.2287 33.7396H59.105C60.9851 33.7396 62.5092 32.1944 62.5092 30.2882C62.5092 28.3821 60.9851 26.8369 59.105 26.8369H31.3854C29.5053 26.8369 27.9813 28.3821 27.9813 30.2882C27.9813 32.1944 29.5053 33.7396 31.3854 33.7396H11.9331C10.053 33.7396 8.52891 35.2848 8.52891 37.1909C8.52891 39.0971 10.053 40.6423 11.9331 40.6423H24.0908C25.9708 40.6423 27.4949 42.1875 27.4949 44.0936C27.4949 45.9997 25.9708 47.545 24.0908 47.545H4.63844C2.75838 47.545 1.23428 49.0902 1.23428 50.9963C1.23428 52.9024 2.75838 54.4477 4.63844 54.4477H23.6045C21.7244 54.4477 20.2003 55.9929 20.2003 57.899C20.2003 59.8051 21.7244 61.3504 23.6045 61.3504ZM102.873 61.3504C104.753 61.3504 106.277 59.8051 106.277 57.899C106.277 55.9929 104.753 54.4477 102.873 54.4477C100.993 54.4477 99.4686 55.9929 99.4686 57.899C99.4686 59.8051 100.993 61.3504 102.873 61.3504Z",
1886
+ fill: v(te)("primary-0")
1887
+ }, null, 8, Zn),
1888
+ I("path", {
1889
+ "fill-rule": "evenodd",
1890
+ "clip-rule": "evenodd",
1891
+ d: "M45.9044 52.7159C45.8528 53.0686 45.8261 53.4291 45.8261 53.7956C45.8261 58.0211 49.3738 61.4465 53.75 61.4465C58.1262 61.4465 61.6738 58.0211 61.6738 53.7956C61.6738 53.4291 61.6472 53.0686 61.5956 52.7159H80.8232V69.735C80.8232 70.7914 79.9363 71.6477 78.8422 71.6477H28.6578C27.5637 71.6477 26.6768 70.7914 26.6768 69.735V52.7159H45.9044Z",
1892
+ fill: v(te)("gray-0")
1893
+ }, null, 8, Xn),
1894
+ I("path", {
1895
+ "fill-rule": "evenodd",
1896
+ "clip-rule": "evenodd",
1897
+ d: "M62.3342 52.9157C62.3342 57.6598 58.4909 61.5057 53.75 61.5057C49.0091 61.5057 45.1658 57.6598 45.1658 52.9157C45.1658 52.762 45.1698 52.6092 45.1778 52.4575H26.6768L32.9898 33.779C33.2619 32.9738 34.0169 32.4318 34.8663 32.4318H72.6337C73.4831 32.4318 74.238 32.9738 74.5102 33.779L80.8232 52.4575H62.3222C62.3301 52.6092 62.3342 52.762 62.3342 52.9157Z",
1898
+ fill: v(te)("gray-0")
1899
+ }, null, 8, Yn),
1900
+ I("path", {
1901
+ "fill-rule": "evenodd",
1902
+ "clip-rule": "evenodd",
1903
+ d: "M61.2612 53.3613C61.2612 57.1125 57.8983 60.8295 53.75 60.8295C49.6017 60.8295 46.2388 57.1125 46.2388 53.3613C46.2388 53.2398 46.2424 52.4429 46.2493 52.3229H32.0915L37.6153 38.9061C37.8534 38.2694 38.514 37.8409 39.2573 37.8409H68.2427C68.986 37.8409 69.6466 38.2694 69.8847 38.9061L75.4085 52.3229H61.2507C61.2576 52.4429 61.2612 53.2398 61.2612 53.3613Z",
1904
+ fill: v(te)("primary-1")
1905
+ }, null, 8, Jn),
1906
+ I("path", {
1907
+ "fill-rule": "evenodd",
1908
+ "clip-rule": "evenodd",
1909
+ d: "M26.846 52.3862V70.2955C26.846 70.9489 27.3763 71.4787 28.0305 71.4787H79.4695C80.1237 71.4787 80.654 70.9489 80.654 70.2955V52.3862L74.2278 33.405C74.065 32.9244 73.6137 32.6009 73.1058 32.6009H34.3942C33.8863 32.6009 33.435 32.9244 33.2722 33.405L26.846 52.3862Z",
1910
+ stroke: v(te)("primary-5"),
1911
+ "stroke-width": "2"
1912
+ }, null, 8, Qn),
1913
+ I("path", {
1914
+ d: "M35.4756 52.0398C38.14 52.0398 41.0154 52.0398 44.1017 52.0398C45.3716 52.0398 45.3716 52.9313 45.3716 53.392C45.3716 57.8731 49.0916 61.5057 53.6805 61.5057C58.2693 61.5057 61.9893 57.8731 61.9893 53.392C61.9893 52.9313 61.9893 52.0398 63.2592 52.0398H80.1463M30.4493 52.0398H32.0915H30.4493Z",
1915
+ stroke: v(te)("primary-5"),
1916
+ "stroke-width": "2",
1917
+ "stroke-linecap": "round",
1918
+ "stroke-linejoin": "round"
1919
+ }, null, 8, bn),
1920
+ I("path", {
1921
+ d: "M70.7382 16.4092L63.2256 24.8292M53.1406 13.5V24.8292V13.5ZM35.4756 16.4092L42.9882 24.8292L35.4756 16.4092Z",
1922
+ stroke: v(te)("primary-5"),
1923
+ "stroke-width": "2",
1924
+ "stroke-linecap": "round",
1925
+ "stroke-linejoin": "round"
1926
+ }, null, 8, eo)
1927
+ ]))
1928
+ ])
1929
+ ], 2),
1930
+ l.type === "simple" && i.value ? (V(), P("div", {
1931
+ key: 0,
1932
+ class: z([v(q)(v(n), "title"), l.titleCls])
1933
+ }, [
1934
+ B(l.$slots, "title", {}, () => [
1935
+ Re(pe(l.title), 1)
1936
+ ])
1937
+ ], 2)) : i.value || s.value || t.actions ? (V(), P("div", {
1938
+ key: 1,
1939
+ class: z([v(q)(v(n), "content"), l.contentCls])
1940
+ }, [
1941
+ i.value || s.value ? (V(), P("div", {
1942
+ key: 0,
1943
+ class: z([v(q)(v(n), "text"), l.textCls])
1944
+ }, [
1945
+ i.value ? (V(), P("div", {
1946
+ key: 0,
1947
+ class: z([v(q)(v(n), "title"), l.titleCls])
1948
+ }, [
1949
+ B(l.$slots, "title", {}, () => [
1950
+ Re(pe(l.title), 1)
1951
+ ])
1952
+ ], 2)) : O("", !0),
1953
+ s.value ? (V(), P("div", {
1954
+ key: 1,
1955
+ class: z([v(q)(v(n), "description"), l.descriptionCls])
1956
+ }, [
1957
+ B(l.$slots, "description", {}, () => [
1958
+ Re(pe(l.description), 1)
1959
+ ])
1960
+ ], 2)) : O("", !0)
1961
+ ], 2)) : O("", !0),
1962
+ t.actions ? (V(), P("div", {
1963
+ key: 1,
1964
+ class: z([v(q)(v(n), "actions"), l.actionsCls])
1965
+ }, [
1966
+ B(l.$slots, "actions")
1967
+ ], 2)) : O("", !0)
1968
+ ], 2)) : O("", !0)
1969
+ ], 2));
1970
+ }
1971
+ }), no = (e, { prefix: o, isColumnWrapped: t, selectionId: n }) => {
1972
+ const r = q(o, "wrap_col"), i = (a) => {
1973
+ var S;
1974
+ const C = ($) => $ === "list" ? "md" : "sm";
1975
+ return {
1976
+ ...(a == null ? void 0 : a.skeletonProps) ?? {},
1977
+ style: "width: 100%",
1978
+ size: C((S = a == null ? void 0 : a.skeletonProps) == null ? void 0 : S.type)
1979
+ };
1980
+ }, s = (a) => {
1981
+ var S, $;
1982
+ const C = (S = a.props) == null ? void 0 : S.column.columnDef;
1983
+ return Y(C == null ? void 0 : C.render) && a.props.row ? ($ = C == null ? void 0 : C.render) == null ? void 0 : $.call(C, {
1984
+ index: a.props.row.index,
1985
+ record: a.props.row.original,
1986
+ column: dt(C, "render")
1987
+ }) : typeof a.render == "function" || typeof a.render == "object" ? st(a.render, a.props) : a.render;
1988
+ }, l = (a) => {
1989
+ let C = {};
1990
+ if (a) {
1991
+ const S = (x) => Number(x) >= 0 ? `${x}px` : x, { width: $, maxWidth: M, minWidth: D } = a;
1992
+ ($ || M || D) && (C = {
1993
+ width: S($),
1994
+ maxWidth: S(M),
1995
+ minWidth: S(D),
1996
+ overflow: $ || M ? "hidden" : void 0
1997
+ });
1998
+ }
1999
+ return C;
2000
+ }, u = {}, g = (a, C = !0) => {
2001
+ var $;
2002
+ let S = 1;
2003
+ return (($ = a == null ? void 0 : a.subHeaders) == null ? void 0 : $.length) === 1 && a.column.id === a.subHeaders[0].column.id && (S += g(a.subHeaders[0], !1)), C && (!u[a.column.id] || u[a.column.id] < S) && (u[a.column.id] = S), S;
2004
+ }, f = (a, C = {}) => {
2005
+ var S;
2006
+ if (a != null && a.column) {
2007
+ const $ = (S = a == null ? void 0 : a.column) == null ? void 0 : S.columnDef, M = [], D = {};
2008
+ if (Fe($)) {
2009
+ let x = t(a.column.id);
2010
+ const { customCell: A, class: H } = $;
2011
+ if (Je(H) || M.push(H), A && (Fe(A) || Y(A))) {
2012
+ const K = (ne) => {
2013
+ if (Fe(ne)) {
2014
+ const { wrap: re, colSpan: oe, rowSpan: we } = ne;
2015
+ x = x || (re ?? !1), D.colSpan = oe, D.rowSpan = we;
2016
+ }
2017
+ };
2018
+ Y(A) && a.row ? K(
2019
+ A({
2020
+ index: a.row.index,
2021
+ record: a.row.original,
2022
+ column: $
2023
+ })
2024
+ ) : K(A);
2025
+ }
2026
+ a.header ? D.rowSpan = g(a.header) : x && M.push(r);
2027
+ }
2028
+ return {
2029
+ class: Je(M) ? void 0 : M,
2030
+ ...D,
2031
+ ...C
2032
+ };
2033
+ }
2034
+ return {};
2035
+ };
2036
+ return {
2037
+ getSkeletonProps: i,
2038
+ RenderCell: s,
2039
+ getThProps: (a) => {
2040
+ var C, S, $;
2041
+ return f(a, {
2042
+ colSpan: (C = a == null ? void 0 : a.header) == null ? void 0 : C.colSpan,
2043
+ "data-has-children": (($ = (S = a == null ? void 0 : a.column) == null ? void 0 : S.columns) == null ? void 0 : $.length) > 1 ? !0 : void 0
2044
+ });
2045
+ },
2046
+ getTdProps: (a) => f(a),
2047
+ getColProps: (a) => {
2048
+ const C = l(a.columnDef);
2049
+ return a.id === n && (C.width = "var(--pt-dimension-2800)"), {
2050
+ style: C
2051
+ };
2052
+ },
2053
+ isThVisible: (a, C, S) => u[S] === 1 ? !0 : C - a === u[S]
2054
+ };
2055
+ };
2056
+ var oo = "[object Boolean]";
2057
+ function ro(e) {
2058
+ return e === !0 || e === !1 || Tt(e) && Nt(e) == oo;
2059
+ }
2060
+ const io = (e) => {
2061
+ const o = ue([]), t = (l) => l ? o.value.findIndex((u) => u.id === l) : -1, n = (l) => {
2062
+ if (l) return o.value.find((u) => u.id === l);
2063
+ }, r = (l) => {
2064
+ var u;
2065
+ return !!((u = n(l)) != null && u.wrap);
2066
+ }, i = (l) => {
2067
+ const { id: u } = l;
2068
+ if (!u) return !1;
2069
+ const g = l.wrap ?? !r(u), f = t(u);
2070
+ return f >= 0 ? o.value[f] = { id: u, wrap: g } : o.value.push({ id: u, wrap: g }), !0;
2071
+ }, s = W(
2072
+ () => (e.columns ?? []).filter((l) => ro(l.wrap)).map((l) => ({
2073
+ id: l.id,
2074
+ wrap: !!l.wrap
2075
+ }))
2076
+ );
2077
+ return se(
2078
+ s,
2079
+ (l) => {
2080
+ o.value = [...o.value, ...l];
2081
+ },
2082
+ {
2083
+ immediate: !0,
2084
+ deep: !0
2085
+ }
2086
+ ), {
2087
+ isColumnWrapped: r,
2088
+ toggleWrap: i
2089
+ };
2090
+ }, lo = { class: "th_content" }, so = { class: "th_title_title" }, uo = {
2091
+ key: 0,
2092
+ class: "th_action"
2093
+ }, ao = {
2094
+ key: 0,
2095
+ class: "action_col_content"
2096
+ }, go = {
2097
+ key: 2,
2098
+ class: "h-full flex items-center"
2099
+ }, co = {
2100
+ key: 3,
2101
+ class: "cell_action"
2102
+ }, fo = {
2103
+ key: 0,
2104
+ class: "empty-row"
2105
+ }, po = ["colspan"], mo = { class: "empty" }, Co = {
2106
+ key: 2,
2107
+ class: "loading-trigger"
2108
+ }, So = { class: "h-1600 flex ps-400 gap-400 text-fg items-center" }, wo = { class: "txs-body" }, ho = { class: "flex items-center" }, qo = /* @__PURE__ */ Be({
2109
+ __name: "DataTable",
2110
+ props: {
2111
+ columns: {},
2112
+ childrenColumnName: { default: "children" },
2113
+ data: {},
2114
+ class: {},
2115
+ scrollViewportCls: {},
2116
+ scrollAreaCls: {},
2117
+ theadCls: {},
2118
+ actionHoverCls: {},
2119
+ rootCls: {},
2120
+ rowSelection: {},
2121
+ rowKey: {},
2122
+ lazyLoading: { type: Boolean },
2123
+ loading: { type: Boolean },
2124
+ emptyProps: {},
2125
+ size: { default: "lg" },
2126
+ batchActionsTitle: { default: "Records selected :" },
2127
+ loadingRowCount: { default: 5 },
2128
+ stickyHeader: { type: Boolean },
2129
+ tableLayout: { default: "fixed" },
2130
+ actionCol: {},
2131
+ noHeader: { type: Boolean }
2132
+ },
2133
+ emits: ["fetch"],
2134
+ setup(e, { emit: o }) {
2135
+ const t = e, n = o, r = ut(), i = at("table"), s = en(), l = `$${i}_selection$`, u = W(() => {
2136
+ var c;
2137
+ return ((c = t.actionCol) == null ? void 0 : c.id) ?? `$${i}_action$`;
2138
+ }), g = (c) => dt(c ?? {}, "title", "sorter", "columns", "id", "dataIndex"), f = W(() => {
2139
+ var E;
2140
+ const c = (w) => {
2141
+ var J;
2142
+ const L = w.id ?? qt(`${i}--col`);
2143
+ return ye(tt(w, t.childrenColumnName)) ? s.group({
2144
+ header: w.title,
2145
+ id: L,
2146
+ columns: (J = tt(w, t.childrenColumnName) ?? []) == null ? void 0 : J.map(c),
2147
+ enableSorting: !1,
2148
+ ...g(w)
2149
+ }) : s.accessor(w.dataIndex ?? w.id, {
2150
+ header: w.title,
2151
+ id: L,
2152
+ sortingFn: typeof w.sorter == "function" ? (ve, Ht) => w.sorter(ve.original, Ht.original) : w.sorter,
2153
+ enableSorting: !!w.sorter,
2154
+ ...g(w)
2155
+ });
2156
+ };
2157
+ if (!ye(t.columns)) throw "no columns";
2158
+ const y = t.columns.map(({ id: w }) => w);
2159
+ if (Zt(y).length !== y.length) throw "no uniq column ids";
2160
+ const F = [];
2161
+ return t.rowSelection && t.rowKey && F.push(
2162
+ s.accessor(l, {
2163
+ id: l,
2164
+ enableSorting: !1
2165
+ })
2166
+ ), t.columns.forEach((w) => {
2167
+ F.push(c(w));
2168
+ }), (r.action || r.hoverAction) && F.push(
2169
+ s.accessor(u.value, {
2170
+ id: u.value,
2171
+ header: (E = t.actionCol) == null ? void 0 : E.title,
2172
+ enableSorting: !1,
2173
+ ...g(t.actionCol)
2174
+ })
2175
+ ), F;
2176
+ }), { toggleWrap: h, isColumnWrapped: p } = io(t), d = ue({}), m = W(() => Object.keys(d.value)), a = W(
2177
+ () => t.rowKey ? ct(t.data, (c) => c.children).map(
2178
+ (c) => c[t.rowKey]
2179
+ ) : []
2180
+ ), C = () => {
2181
+ const c = Object.fromEntries(
2182
+ m.value.filter((y) => {
2183
+ var F;
2184
+ return !((F = t.rowSelection) != null && F.preserveSelectedRowKeys) && t.rowKey ? a.value.includes(y) : !0;
2185
+ }).map((y) => [y, !0])
2186
+ );
2187
+ Object.keys(c).length !== m.value.length && (d.value = c, _e(() => {
2188
+ var y;
2189
+ Y((y = t.rowSelection) == null ? void 0 : y.onChange) && t.rowSelection.onChange(K.value);
2190
+ }));
2191
+ }, S = W(() => (C(), [...t.data])), $ = Wt(), D = Xt(
2192
+ Object.fromEntries(
2193
+ Object.keys($).map((c) => [c, $[c].minWidth])
2194
+ ),
2195
+ { strategy: "min-width" }
2196
+ ).active(), x = ue({});
2197
+ se(
2198
+ D,
2199
+ (c) => {
2200
+ x.value = Object.fromEntries(
2201
+ f.value.map((y) => {
2202
+ var F;
2203
+ return [
2204
+ y.id,
2205
+ ye(y == null ? void 0 : y.responsive) ? (F = y.responsive) == null ? void 0 : F.includes(c) : !0
2206
+ ];
2207
+ })
2208
+ );
2209
+ },
2210
+ { immediate: !0 }
2211
+ );
2212
+ const A = ue([]), H = jn({
2213
+ // debugTable: true,
2214
+ getSubRows: (c) => c.children,
2215
+ enableSorting: !0,
2216
+ enableMultiSort: !0,
2217
+ get data() {
2218
+ return S.value;
2219
+ },
2220
+ onSortingChange: (c) => {
2221
+ A.value = typeof c == "function" ? c(A.value) : c;
2222
+ },
2223
+ state: {
2224
+ get sorting() {
2225
+ return A.value;
2226
+ },
2227
+ get rowSelection() {
2228
+ return d.value;
2229
+ },
2230
+ get columnVisibility() {
2231
+ return x.value;
2232
+ }
2233
+ },
2234
+ enableRowSelection: !0,
2235
+ get columns() {
2236
+ return f.value;
2237
+ },
2238
+ getRowCanExpand: () => !0,
2239
+ getCoreRowModel: Bn(),
2240
+ getSortedRowModel: Tn(),
2241
+ onRowSelectionChange: (c) => {
2242
+ d.value = typeof c == "function" ? c(d.value) : c;
2243
+ }
2244
+ }), K = W(() => ({
2245
+ selectedRowKeys: m.value,
2246
+ selectedRows: H.getFilteredSelectedRowModel().flatRows.map((c) => c.original)
2247
+ }));
2248
+ se(
2249
+ () => t.rowKey,
2250
+ () => {
2251
+ H._getRowId = t.rowKey ? (c) => c[t.rowKey] : void 0;
2252
+ },
2253
+ { immediate: !0 }
2254
+ ), se(
2255
+ () => {
2256
+ var c;
2257
+ return (c = t.rowSelection) == null ? void 0 : c.selectedRowKeys;
2258
+ },
2259
+ (c, y) => {
2260
+ var F, E;
2261
+ if ((E = (F = t.rowSelection) == null ? void 0 : F.selectedRowKeys) != null && E.length && !it(c, y)) {
2262
+ const w = Object.fromEntries(
2263
+ v(t.rowSelection.selectedRowKeys ?? Object.keys(d.value)).map(
2264
+ (L) => [L, !0]
2265
+ )
2266
+ );
2267
+ it(w, d.value) || (d.value = w);
2268
+ }
2269
+ },
2270
+ { immediate: !0 }
2271
+ );
2272
+ const ne = W(() => H.getIsAllRowsSelected() ? !0 : H.getIsSomeRowsSelected() ? "indeterminate" : !1), re = (c) => {
2273
+ H.getIsSomeRowsSelected() || H.getIsAllRowsSelected() ? H.toggleAllRowsSelected(!1) : H.toggleAllRowsSelected(!0), _e(() => {
2274
+ var y, F;
2275
+ Y((y = t.rowSelection) == null ? void 0 : y.onSelectAll) && t.rowSelection.onSelectAll({ ...K.value, selected: c }), Y((F = t.rowSelection) == null ? void 0 : F.onChange) && t.rowSelection.onChange(K.value);
2276
+ });
2277
+ }, oe = (c, y) => {
2278
+ var F;
2279
+ y.toggleSelected(c, {
2280
+ selectChildren: !((F = t.rowSelection) != null && F.checkStrictly)
2281
+ }), _e(() => {
2282
+ var E, w;
2283
+ Y((E = t.rowSelection) == null ? void 0 : E.onSelect) && t.rowSelection.onSelect({
2284
+ ...K.value,
2285
+ selected: c,
2286
+ record: y.original
2287
+ }), Y((w = t.rowSelection) == null ? void 0 : w.onChange) && t.rowSelection.onChange(K.value);
2288
+ });
2289
+ }, we = (c) => {
2290
+ var y, F;
2291
+ return Y((y = t.rowSelection) == null ? void 0 : y.getCheckboxProps) && ((F = t.rowSelection) == null || F.getCheckboxProps(c)), {};
2292
+ }, je = (c) => {
2293
+ var y;
2294
+ if (c.getIsSelected()) return !0;
2295
+ if ((y = c.subRows) != null && y.length) {
2296
+ if (c.getIsAllSubRowsSelected()) return !0;
2297
+ if (c.getIsSomeSelected()) return "indeterminate";
2298
+ }
2299
+ return !1;
2300
+ }, Ke = kt("target"), { stop: _t } = Yt(Ke, ([c]) => {
2301
+ t.lazyLoading && !t.loading && (c != null && c.isIntersecting) && n("fetch");
2302
+ });
2303
+ At(_t);
2304
+ const { getSkeletonProps: yt, getThProps: $t, RenderCell: Ue, getTdProps: he, getColProps: Ft, isThVisible: Vt } = no(t, {
2305
+ prefix: i,
2306
+ selectionId: l,
2307
+ isColumnWrapped: p
2308
+ }), We = W(() => Object.keys(d.value).length), Pt = () => {
2309
+ d.value = {};
2310
+ }, Mt = gt(i, {
2311
+ variants: {
2312
+ size: me(Kn, i),
2313
+ stickyHeader: me("sticky-header", i),
2314
+ empty: me("empty", i)
2315
+ }
2316
+ }), Ze = lt(0), It = ({ item: c }, y) => {
2317
+ c.key === "a-z" && y.toggleSorting(!1, !1), c.key === "z-a" && y.toggleSorting(!0, !1), c.key === "wrap" && h({ id: y.id }), Ze.value++;
2318
+ }, xt = (c) => {
2319
+ const y = c.getIsSorted();
2320
+ if (!y) return "tabler:arrows-up-down";
2321
+ if (y === "desc") return "tabler:arrow-down";
2322
+ if (y === "asc") return "tabler:arrow-up";
2323
+ }, Xe = W(
2324
+ () => H.getHeaderGroups().map((c) => ({
2325
+ ...c,
2326
+ headers: c.headers.map((y) => ({
2327
+ ...y,
2328
+ bindings: $t(y.getContext())
2329
+ }))
2330
+ }))
2331
+ );
2332
+ return (c, y) => (V(), P("div", {
2333
+ class: z([v(q)(v(i), "root"), c.rootCls])
2334
+ }, [
2335
+ k(Qe, {
2336
+ "z-index": "1",
2337
+ open: !!(We.value && r.batchActions),
2338
+ placement: "bottom",
2339
+ "side-offset": -54,
2340
+ "container-cls": "pantograph-tokens dark"
2341
+ }, {
2342
+ content: T(() => [
2343
+ I("div", So, [
2344
+ k(Qt, {
2345
+ text: We.value,
2346
+ size: "xsm"
2347
+ }, null, 8, ["text"]),
2348
+ I("div", wo, pe(c.batchActionsTitle), 1),
2349
+ I("div", ho, [
2350
+ B(c.$slots, "batchActions", Gt(Ot(K.value)))
2351
+ ]),
2352
+ k(be, {
2353
+ type: "vertical",
2354
+ class: "!min-h-800"
2355
+ }),
2356
+ k(et, {
2357
+ icon: "tabler:x",
2358
+ color: "gray",
2359
+ type: "ghost",
2360
+ onClick: Pt
2361
+ })
2362
+ ])
2363
+ ]),
2364
+ default: T(() => [
2365
+ I("div", {
2366
+ class: z([v(q)(v(i), "scroll_area"), c.scrollAreaCls])
2367
+ }, [
2368
+ I("div", {
2369
+ class: z([v(q)(v(i), "scroll_viewport"), c.scrollViewportCls])
2370
+ }, [
2371
+ I("table", {
2372
+ style: Lt({
2373
+ tableLayout: c.tableLayout
2374
+ }),
2375
+ class: z([
2376
+ v(Mt)({
2377
+ size: c.size,
2378
+ stickyHeader: c.stickyHeader,
2379
+ empty: !v(H).getRowModel().rows.length
2380
+ }),
2381
+ t.class
2382
+ ])
2383
+ }, [
2384
+ I("colgroup", null, [
2385
+ (V(!0), P(N, null, ee(v(H).getVisibleLeafColumns(), (F, E) => (V(), P("col", U({
2386
+ key: F.id,
2387
+ ref_for: !0
2388
+ }, v(Ft)(F)), null, 16))), 128))
2389
+ ]),
2390
+ c.noHeader ? O("", !0) : (V(), P("thead", {
2391
+ key: 0,
2392
+ class: z([c.theadCls])
2393
+ }, [
2394
+ (V(!0), P(N, null, ee(Xe.value, (F, E) => (V(), P("tr", {
2395
+ key: F.id
2396
+ }, [
2397
+ (V(!0), P(N, null, ee(F.headers, (w) => (V(), P(N, {
2398
+ key: w.id
2399
+ }, [
2400
+ v(Vt)(E, Xe.value.length, w.column.id) ? (V(), P("th", U({
2401
+ key: 0,
2402
+ ref_for: !0
2403
+ }, w.bindings), [
2404
+ I("div", lo, [
2405
+ I("div", {
2406
+ class: z(["th_title", { selection: w.column.id === l }])
2407
+ }, [
2408
+ w.column.id !== l ? (V(), P(N, { key: 0 }, [
2409
+ I("div", so, [
2410
+ B(c.$slots, "headerCell", U({ ref_for: !0 }, {
2411
+ column: w.column.columnDef
2412
+ }), () => [
2413
+ k(v(Ue), {
2414
+ props: w.getContext(),
2415
+ render: w.column.columnDef.header
2416
+ }, null, 8, ["props", "render"])
2417
+ ])
2418
+ ]),
2419
+ w.column.getCanSort() ? (V(), ke(Kt, {
2420
+ key: 0,
2421
+ class: z({ hide_filter_action: !w.column.getIsSorted() }),
2422
+ icon: xt(w.column),
2423
+ size: "sm",
2424
+ type: "ghost",
2425
+ variant: "icon",
2426
+ active: !!w.column.getIsSorted(),
2427
+ onClick: (L) => {
2428
+ var J;
2429
+ return (J = w.column.getToggleSortingHandler()) == null ? void 0 : J(L);
2430
+ }
2431
+ }, null, 8, ["class", "icon", "active", "onClick"])) : O("", !0)
2432
+ ], 64)) : (V(), P(N, { key: 1 }, [
2433
+ y[0] || (y[0] = I("div", { class: "size-1000 min-w-1000" }, null, -1)),
2434
+ k(Ye, {
2435
+ rootCls: "w-fit",
2436
+ checked: ne.value,
2437
+ onChange: re
2438
+ }, null, 8, ["checked"])
2439
+ ], 64))
2440
+ ], 2),
2441
+ ![u.value, l].includes(w.column.id) && !w.column.columns.length ? (V(), P("div", uo, [
2442
+ (V(), ke(Qe, {
2443
+ "z-index": "1",
2444
+ placement: "bottom-end",
2445
+ key: Ze.value
2446
+ }, {
2447
+ content: T(() => [
2448
+ k(jt, {
2449
+ onSelect: (L) => It(L, w.column)
2450
+ }, {
2451
+ default: T(() => [
2452
+ w.column.getCanSort() ? (V(), P(N, { key: 0 }, [
2453
+ k($e, {
2454
+ title: "Sort A → Z",
2455
+ key: "a-z"
2456
+ }, {
2457
+ leading: T(({ iconSize: L }) => [
2458
+ k(Ce, {
2459
+ icon: "tabler:arrow-up",
2460
+ size: L
2461
+ }, null, 8, ["size"])
2462
+ ]),
2463
+ _: 1
2464
+ }),
2465
+ k($e, {
2466
+ title: "Sort Z → A",
2467
+ key: "z-a"
2468
+ }, {
2469
+ leading: T(({ iconSize: L }) => [
2470
+ k(Ce, {
2471
+ icon: "tabler:arrow-down",
2472
+ size: L
2473
+ }, null, 8, ["size"])
2474
+ ]),
2475
+ _: 1
2476
+ }),
2477
+ k(be)
2478
+ ], 64)) : O("", !0),
2479
+ k($e, {
2480
+ title: "Wrap Column",
2481
+ key: "wrap"
2482
+ }, {
2483
+ leading: T(({ iconSize: L }) => [
2484
+ k(Ce, {
2485
+ icon: "tabler:text-wrap",
2486
+ size: L
2487
+ }, null, 8, ["size"])
2488
+ ]),
2489
+ trailing: T(() => [
2490
+ k(bt, {
2491
+ checked: v(p)(w.column.id)
2492
+ }, null, 8, ["checked"])
2493
+ ]),
2494
+ _: 2
2495
+ }, 1024)
2496
+ ]),
2497
+ _: 2
2498
+ }, 1032, ["onSelect"])
2499
+ ]),
2500
+ default: T(() => [
2501
+ k(et, {
2502
+ icon: "tabler:dots-vertical",
2503
+ size: "sm",
2504
+ color: "gray",
2505
+ type: "ghost",
2506
+ class: "hide_col_action_trigger"
2507
+ })
2508
+ ]),
2509
+ _: 2
2510
+ }, 1024))
2511
+ ])) : O("", !0)
2512
+ ])
2513
+ ], 16)) : O("", !0)
2514
+ ], 64))), 128))
2515
+ ]))), 128))
2516
+ ], 2)),
2517
+ I("tbody", null, [
2518
+ (V(!0), P(N, null, ee(v(H).getRowModel().rows, (F, E) => (V(), P("tr", {
2519
+ key: F.id,
2520
+ class: z({ [v(q)(v(i), "checked_row")]: je(F) })
2521
+ }, [
2522
+ (V(!0), P(N, null, ee(F.getVisibleCells(), (w) => {
2523
+ var L, J;
2524
+ return V(), P(N, {
2525
+ key: w.id
2526
+ }, [
2527
+ ((L = v(he)(w.getContext())) == null ? void 0 : L.colSpan) !== 0 && ((J = v(he)(w.getContext())) == null ? void 0 : J.rowSpan) !== 0 ? (V(), P("td", U({
2528
+ key: 0,
2529
+ ref_for: !0
2530
+ }, v(he)(w.getContext())), [
2531
+ w.column.id === u.value && (r.hoverAction || r.action) ? (V(), P("div", ao, [
2532
+ I("div", {
2533
+ class: z([
2534
+ v(q)(v(i), "action_col__hover_actions"),
2535
+ c.actionHoverCls
2536
+ ])
2537
+ }, [
2538
+ B(c.$slots, "hoverAction", U(
2539
+ { ref_for: !0 },
2540
+ {
2541
+ column: w.column.columnDef,
2542
+ record: F.original,
2543
+ index: E
2544
+ }
2545
+ ))
2546
+ ], 2),
2547
+ B(c.$slots, "action", U(
2548
+ { ref_for: !0 },
2549
+ {
2550
+ column: w.column.columnDef,
2551
+ record: F.original,
2552
+ index: E
2553
+ }
2554
+ ))
2555
+ ])) : w.column.id !== l ? B(c.$slots, "bodyCell", U(
2556
+ {
2557
+ key: 1,
2558
+ ref_for: !0
2559
+ },
2560
+ {
2561
+ column: w.column.columnDef,
2562
+ record: F.original,
2563
+ index: E
2564
+ }
2565
+ ), () => [
2566
+ k(v(Ue), {
2567
+ render: w.column.columnDef.cell,
2568
+ props: w.getContext()
2569
+ }, null, 8, ["render", "props"])
2570
+ ]) : c.rowKey && F.original[c.rowKey] ? (V(), P("div", go, [
2571
+ y[1] || (y[1] = I("div", { class: "size-1000 min-w-1000" }, null, -1)),
2572
+ k(Ye, U({
2573
+ rootCls: "w-fit",
2574
+ disabled: !F.getCanSelect(),
2575
+ checked: je(F),
2576
+ onChange: (ve) => oe(ve, F),
2577
+ ref_for: !0
2578
+ }, we(F.original)), null, 16, ["disabled", "checked", "onChange"])
2579
+ ])) : O("", !0),
2580
+ r.cellAction && ![u.value, l].includes(w.column.id) ? (V(), P("div", co, [
2581
+ B(c.$slots, "cellAction", U(
2582
+ { ref_for: !0 },
2583
+ {
2584
+ column: w.column.columnDef,
2585
+ record: F.original,
2586
+ index: E
2587
+ }
2588
+ ))
2589
+ ])) : O("", !0)
2590
+ ], 16)) : O("", !0)
2591
+ ], 64);
2592
+ }), 128))
2593
+ ], 2))), 128)),
2594
+ t.loading ? (V(!0), P(N, { key: 0 }, ee(v(H).getRowModel().rows.length ? 2 : c.loadingRowCount, (F) => (V(), P("tr", { key: F }, [
2595
+ (V(!0), P(N, null, ee(v(H).getVisibleLeafColumns(), (E, w) => (V(), P("td", { key: w }, [
2596
+ E.id !== l ? B(c.$slots, "skeleton", U({
2597
+ key: 0,
2598
+ ref_for: !0
2599
+ }, { index: w, column: E.columnDef }), () => [
2600
+ k(Jt, U({ ref_for: !0 }, v(yt)(E.columnDef)), null, 16)
2601
+ ]) : O("", !0)
2602
+ ]))), 128))
2603
+ ]))), 128)) : (V(), P(N, { key: 1 }, [
2604
+ v(H).getRowModel().rows.length ? O("", !0) : (V(), P("tr", fo, [
2605
+ I("td", {
2606
+ colspan: v(H).getVisibleLeafColumns().length
2607
+ }, [
2608
+ I("div", mo, [
2609
+ k(to, U({ type: "advance" }, c.emptyProps), zt({ _: 2 }, [
2610
+ r.emptyTitle ? {
2611
+ name: "title",
2612
+ fn: T(() => [
2613
+ B(c.$slots, "emptyTitle")
2614
+ ]),
2615
+ key: "0"
2616
+ } : void 0,
2617
+ r.emptyDescription ? {
2618
+ name: "title",
2619
+ fn: T(() => [
2620
+ B(c.$slots, "emptyDescription")
2621
+ ]),
2622
+ key: "1"
2623
+ } : void 0,
2624
+ r.emptyActions ? {
2625
+ name: "title",
2626
+ fn: T(() => [
2627
+ B(c.$slots, "emptyActions")
2628
+ ]),
2629
+ key: "2"
2630
+ } : void 0,
2631
+ r.emptyImage ? {
2632
+ name: "title",
2633
+ fn: T(() => [
2634
+ B(c.$slots, "emptyImage")
2635
+ ]),
2636
+ key: "3"
2637
+ } : void 0
2638
+ ]), 1040)
2639
+ ])
2640
+ ], 8, po)
2641
+ ]))
2642
+ ], 64)),
2643
+ c.lazyLoading ? (V(), P("tr", Co, [
2644
+ I("td", {
2645
+ ref_key: "target",
2646
+ ref: Ke
2647
+ }, null, 512)
2648
+ ])) : O("", !0)
2649
+ ])
2650
+ ], 6)
2651
+ ], 2)
2652
+ ], 2)
2653
+ ]),
2654
+ _: 3
2655
+ }, 8, ["open"])
2656
+ ], 2));
2657
+ }
2658
+ });
2659
+ export {
2660
+ qo as DataTable,
2661
+ Kn as TableSizes,
2662
+ qo as default
2663
+ };