@fileflow/sdk 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,49 @@
1
- import { jsx as g, jsxs as v, Fragment as ie } from "react/jsx-runtime";
2
- import * as he from "react";
3
- import lt, { useCallback as xe, useState as K, useMemo as Ee, useEffect as ke } from "react";
4
- import { h as A, j as it, k as st, X as ne, m as b, U as qe, n as _e, T as ve, q as at, p as Fe, o as Le, t as ut, d as ft, V as He, g as Q, S as se, L as ze } from "./index-oKr8Wtf5.mjs";
1
+ import { jsx as g, jsxs as v, Fragment as ee } from "react/jsx-runtime";
2
+ import * as ve from "react";
3
+ import ut, { useCallback as _e, useState as K, useMemo as ke, useEffect as Le } from "react";
4
+ import { h as A, j as ft, k as dt, X as re, m as b, U as je, n as Fe, T as we, q as gt, p as $e, o as He, t as ct, d as pt, V as ze, g as Y, S as ae, L as Ae } from "./index-BNtIB3cM.mjs";
5
5
  /**
6
6
  * @license lucide-react v0.563.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const dt = [
11
+ const mt = [
12
12
  ["path", { d: "M5 12h14", key: "1ays0h" }],
13
13
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
14
- ], gt = A("arrow-right", dt);
14
+ ], ht = A("arrow-right", mt);
15
15
  /**
16
16
  * @license lucide-react v0.563.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- const ct = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], pt = A("check", ct);
21
+ const vt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], wt = A("check", vt);
22
22
  /**
23
23
  * @license lucide-react v0.563.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const mt = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ht = A("chevron-left", mt);
28
+ const Ct = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], St = A("chevron-left", Ct);
29
29
  /**
30
30
  * @license lucide-react v0.563.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const vt = [
35
+ const Rt = [
36
36
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
37
37
  ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
38
38
  ["path", { d: "M12 17h.01", key: "p32p05" }]
39
- ], wt = A("circle-question-mark", vt);
39
+ ], yt = A("circle-question-mark", Rt);
40
40
  /**
41
41
  * @license lucide-react v0.563.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const Ct = [
46
+ const xt = [
47
47
  [
48
48
  "path",
49
49
  {
@@ -52,14 +52,14 @@ const Ct = [
52
52
  }
53
53
  ],
54
54
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
55
- ], St = A("eye", Ct);
55
+ ], _t = A("eye", xt);
56
56
  /**
57
57
  * @license lucide-react v0.563.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
61
  */
62
- const Rt = [
62
+ const Ft = [
63
63
  [
64
64
  "path",
65
65
  {
@@ -72,14 +72,14 @@ const Rt = [
72
72
  ["path", { d: "M14 13h2", key: "un5t4a" }],
73
73
  ["path", { d: "M8 17h2", key: "2yhykz" }],
74
74
  ["path", { d: "M14 17h2", key: "10kma7" }]
75
- ], yt = A("file-spreadsheet", Rt);
75
+ ], $t = A("file-spreadsheet", Ft);
76
76
  /**
77
77
  * @license lucide-react v0.563.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const xt = [
82
+ const Mt = [
83
83
  [
84
84
  "path",
85
85
  {
@@ -88,26 +88,26 @@ const xt = [
88
88
  }
89
89
  ],
90
90
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
91
- ], _t = A("file", xt);
91
+ ], It = A("file", Mt);
92
92
  /**
93
93
  * @license lucide-react v0.563.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
97
  */
98
- const Ft = [
98
+ const Vt = [
99
99
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
100
100
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
101
101
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
102
102
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
103
- ], $t = A("git-branch", Ft);
103
+ ], Nt = A("git-branch", Vt);
104
104
  /**
105
105
  * @license lucide-react v0.563.0 - ISC
106
106
  *
107
107
  * This source code is licensed under the ISC license.
108
108
  * See the LICENSE file in the root directory of this source tree.
109
109
  */
110
- const Mt = [
110
+ const Pt = [
111
111
  [
112
112
  "path",
113
113
  {
@@ -115,20 +115,20 @@ const Mt = [
115
115
  key: "1a8usu"
116
116
  }
117
117
  ]
118
- ], It = A("pen", Mt);
118
+ ], Dt = A("pen", Pt);
119
119
  /**
120
120
  * @license lucide-react v0.563.0 - ISC
121
121
  *
122
122
  * This source code is licensed under the ISC license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
124
  */
125
- const Vt = [
125
+ const Et = [
126
126
  [
127
127
  "path",
128
128
  { d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
129
129
  ],
130
130
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
131
- ], Nt = A("square-check-big", Vt), Ae = {
131
+ ], kt = A("square-check-big", Et), Ge = {
132
132
  sessionId: null,
133
133
  status: "idle",
134
134
  step: "upload",
@@ -149,8 +149,8 @@ const Vt = [
149
149
  error: null,
150
150
  editingCell: null,
151
151
  editedRows: /* @__PURE__ */ new Set()
152
- }, X = it((e, o) => ({
153
- ...Ae,
152
+ }, X = ft((e, o) => ({
153
+ ...Ge,
154
154
  setSchema: (t) => e({ schema: t }),
155
155
  setSessionId: (t) => e({ sessionId: t }),
156
156
  setFile: (t) => e({
@@ -195,22 +195,22 @@ const Vt = [
195
195
  }),
196
196
  stopEditing: () => e({ editingCell: null }),
197
197
  updateCell: (t, n, r) => e((l) => {
198
- const i = [...l.rows], a = i.find((f) => f.rowIndex === t);
199
- a && (a.data = { ...a.data, [n]: String(r) });
198
+ const i = [...l.rows], s = i.find((f) => f.rowIndex === t);
199
+ s && (s.data = { ...s.data, [n]: String(r) });
200
200
  const u = new Set(l.editedRows);
201
201
  return u.add(t), { rows: i, editedRows: u, editingCell: null };
202
202
  }),
203
203
  setStatus: (t) => e({ status: t }),
204
204
  setLoading: (t) => e({ isLoading: t }),
205
205
  setError: (t) => e({ error: t }),
206
- reset: () => e(Ae)
207
- })), Pt = ({
206
+ reset: () => e(Ge)
207
+ })), Lt = ({
208
208
  onFileSelect: e,
209
209
  maxSize: o = 50 * 1024 * 1024,
210
210
  // 50MB
211
211
  acceptedTypes: t = [".csv", ".xlsx", ".xls"]
212
212
  }) => {
213
- const { file: n, fileName: r, fileSize: l, setFile: i, error: a, setError: u, isLoading: f } = X(), c = xe(
213
+ const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: f } = X(), p = _e(
214
214
  (w, R) => {
215
215
  if (R.length > 0) {
216
216
  u("Invalid file type or file too large");
@@ -222,8 +222,8 @@ const Vt = [
222
222
  }
223
223
  },
224
224
  [e, i, u]
225
- ), { getRootProps: p, getInputProps: d, isDragActive: s } = st({
226
- onDrop: c,
225
+ ), { getRootProps: c, getInputProps: d, isDragActive: a } = dt({
226
+ onDrop: p,
227
227
  accept: {
228
228
  "text/csv": [".csv"],
229
229
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
@@ -236,7 +236,7 @@ const Vt = [
236
236
  w.stopPropagation(), X.getState().reset();
237
237
  };
238
238
  return n ? /* @__PURE__ */ g("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
239
- /* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(_t, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
239
+ /* @__PURE__ */ g("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ g(It, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
240
240
  /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0", children: [
241
241
  /* @__PURE__ */ g("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
242
242
  /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
@@ -248,23 +248,23 @@ const Vt = [
248
248
  className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
249
249
  style: { color: "var(--ff-success)" },
250
250
  "aria-label": "Remove file",
251
- children: /* @__PURE__ */ g(ne, { className: "ff-w-5 ff-h-5" })
251
+ children: /* @__PURE__ */ g(re, { className: "ff-w-5 ff-h-5" })
252
252
  }
253
253
  )
254
254
  ] }) }) : /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
255
255
  /* @__PURE__ */ v(
256
256
  "div",
257
257
  {
258
- ...p(),
258
+ ...c(),
259
259
  className: b(
260
260
  "ff-dropzone",
261
- s && "ff-dropzone-active",
261
+ a && "ff-dropzone-active",
262
262
  f && "ff-opacity-50 ff-cursor-not-allowed"
263
263
  ),
264
264
  children: [
265
265
  /* @__PURE__ */ g("input", { ...d() }),
266
- /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(qe, { className: "ff-dropzone-icon" }) }),
267
- /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: s ? "Drop your file here" : "Upload your file" }),
266
+ /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(je, { className: "ff-dropzone-icon" }) }),
267
+ /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
268
268
  /* @__PURE__ */ g("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
269
269
  /* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: b(
270
270
  "ff-btn ff-btn-primary",
@@ -279,17 +279,17 @@ const Vt = [
279
279
  ]
280
280
  }
281
281
  ),
282
- a && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
283
- /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
284
- /* @__PURE__ */ g("p", { children: a })
282
+ s && /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-p-4 ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", color: "var(--ff-error)" }, children: [
283
+ /* @__PURE__ */ g(Fe, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
284
+ /* @__PURE__ */ g("p", { children: s })
285
285
  ] })
286
286
  ] });
287
- }, Dt = ({ onMappingChange: e }) => {
288
- const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (p, d) => {
289
- const s = d === "" ? null : d;
290
- r(p, s), e == null || e(p, s);
291
- }, a = (p) => p >= 0.85 ? "var(--ff-success)" : p >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (p) => p >= 0.85 ? "High" : p >= 0.6 ? "Medium" : "Low", c = new Set(
292
- o.filter((p) => p.targetKey !== null).map((p) => p.targetKey)
287
+ }, Ht = ({ onMappingChange: e }) => {
288
+ const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = X(), l = (t == null ? void 0 : t.columns) || [], i = (c, d) => {
289
+ const a = d === "" ? null : d;
290
+ r(c, a), e == null || e(c, a);
291
+ }, s = (c) => c >= 0.85 ? "var(--ff-success)" : c >= 0.6 ? "var(--ff-warning)" : "var(--ff-error)", u = (c) => c >= 0.85 ? "High" : c >= 0.6 ? "Medium" : "Low", p = new Set(
292
+ o.filter((c) => c.targetKey !== null).map((c) => c.targetKey)
293
293
  );
294
294
  return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
295
295
  /* @__PURE__ */ v("div", { className: "ff-mapping-header", children: [
@@ -312,25 +312,25 @@ const Vt = [
312
312
  ] })
313
313
  ] })
314
314
  ] }),
315
- /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((p) => {
316
- l.find((m) => m.key === p.targetKey);
317
- const d = p.targetKey !== null, s = p.confidence >= 0.85;
315
+ /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((c) => {
316
+ l.find((m) => m.key === c.targetKey);
317
+ const d = c.targetKey !== null, a = c.confidence >= 0.85;
318
318
  return /* @__PURE__ */ v(
319
319
  "div",
320
320
  {
321
321
  className: b(
322
322
  "ff-mapping-row",
323
- d && s && "ff-mapping-row-success",
324
- d && !s && "ff-mapping-row-warning"
323
+ d && a && "ff-mapping-row-success",
324
+ d && !a && "ff-mapping-row-warning"
325
325
  ),
326
326
  children: [
327
- /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: p.sourceColumn }) }),
328
- /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(gt, { className: "ff-w-5 ff-h-5" }) }),
327
+ /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
328
+ /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(ht, { className: "ff-w-5 ff-h-5" }) }),
329
329
  /* @__PURE__ */ g("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ v(
330
330
  "select",
331
331
  {
332
- value: p.targetKey || "",
333
- onChange: (m) => i(p.sourceColumn, m.target.value),
332
+ value: c.targetKey || "",
333
+ onChange: (m) => i(c.sourceColumn, m.target.value),
334
334
  className: "ff-input",
335
335
  children: [
336
336
  /* @__PURE__ */ g("option", { value: "", children: "-- Do not import --" }),
@@ -338,7 +338,7 @@ const Vt = [
338
338
  "option",
339
339
  {
340
340
  value: m.key,
341
- disabled: c.has(m.key) && p.targetKey !== m.key,
341
+ disabled: p.has(m.key) && c.targetKey !== m.key,
342
342
  children: [
343
343
  m.label,
344
344
  " (",
@@ -352,32 +352,32 @@ const Vt = [
352
352
  ]
353
353
  }
354
354
  ) }),
355
- /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: d ? s ? /* @__PURE__ */ g(pt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(wt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
356
- p.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: a(p.confidence) }, children: [
355
+ /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: d ? a ? /* @__PURE__ */ g(wt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(yt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ g("span", { className: "ff-w-5 ff-h-5" }) }),
356
+ c.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: s(c.confidence) }, children: [
357
357
  /* @__PURE__ */ v("span", { children: [
358
- Math.round(p.confidence * 100),
358
+ Math.round(c.confidence * 100),
359
359
  "%"
360
360
  ] }),
361
361
  /* @__PURE__ */ v("span", { style: { color: "var(--ff-text-muted)" }, children: [
362
362
  "(",
363
- u(p.confidence),
363
+ u(c.confidence),
364
364
  ")"
365
365
  ] })
366
366
  ] })
367
367
  ]
368
368
  },
369
- p.sourceColumn
369
+ c.sourceColumn
370
370
  );
371
371
  }) }),
372
372
  (() => {
373
- const p = l.filter(
374
- (d) => d.required && !c.has(d.key)
373
+ const c = l.filter(
374
+ (d) => d.required && !p.has(d.key)
375
375
  );
376
- return p.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
377
- /* @__PURE__ */ g(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
376
+ return c.length > 0 ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-2 ff-p-4 ff-rounded-lg", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
377
+ /* @__PURE__ */ g(Fe, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
378
378
  /* @__PURE__ */ v("div", { children: [
379
379
  /* @__PURE__ */ g("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
380
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: p.map((d) => d.label).join(", ") })
380
+ /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: c.map((d) => d.label).join(", ") })
381
381
  ] })
382
382
  ] }) : null;
383
383
  })()
@@ -393,7 +393,7 @@ const Vt = [
393
393
  *
394
394
  * @license MIT
395
395
  */
396
- function Et() {
396
+ function zt() {
397
397
  return {
398
398
  accessor: (e, o) => typeof e == "function" ? {
399
399
  ...o,
@@ -417,13 +417,13 @@ function L(e, o) {
417
417
  }));
418
418
  };
419
419
  }
420
- function oe(e) {
420
+ function le(e) {
421
421
  return e instanceof Function;
422
422
  }
423
- function kt(e) {
423
+ function At(e) {
424
424
  return Array.isArray(e) && e.every((o) => typeof o == "number");
425
425
  }
426
- function Lt(e, o) {
426
+ function Gt(e, o) {
427
427
  const t = [], n = (r) => {
428
428
  r.forEach((l) => {
429
429
  t.push(l);
@@ -438,18 +438,18 @@ function C(e, o, t) {
438
438
  return (l) => {
439
439
  let i;
440
440
  t.key && t.debug && (i = Date.now());
441
- const a = e(l);
442
- if (!(a.length !== n.length || a.some((c, p) => n[p] !== c)))
441
+ const s = e(l);
442
+ if (!(s.length !== n.length || s.some((p, c) => n[c] !== p)))
443
443
  return r;
444
- n = a;
444
+ n = s;
445
445
  let f;
446
- if (t.key && t.debug && (f = Date.now()), r = o(...a), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
447
- const c = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - f) * 100) / 100, d = p / 16, s = (m, h) => {
446
+ if (t.key && t.debug && (f = Date.now()), r = o(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
447
+ const p = Math.round((Date.now() - i) * 100) / 100, c = Math.round((Date.now() - f) * 100) / 100, d = c / 16, a = (m, h) => {
448
448
  for (m = String(m); m.length < h; )
449
449
  m = " " + m;
450
450
  return m;
451
451
  };
452
- console.info(`%c⏱ ${s(p, 5)} /${s(c, 5)} ms`, `
452
+ console.info(`%c⏱ ${a(c, 5)} /${a(p, 5)} ms`, `
453
453
  font-size: .6rem;
454
454
  font-weight: bold;
455
455
  color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
@@ -467,7 +467,7 @@ function S(e, o, t, n) {
467
467
  onChange: n
468
468
  };
469
469
  }
470
- function Ht(e, o, t, n) {
470
+ function Ot(e, o, t, n) {
471
471
  const r = () => {
472
472
  var i;
473
473
  return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
@@ -477,9 +477,9 @@ function Ht(e, o, t, n) {
477
477
  column: t,
478
478
  getValue: () => o.getValue(n),
479
479
  renderValue: r,
480
- getContext: C(() => [e, t, o, l], (i, a, u, f) => ({
480
+ getContext: C(() => [e, t, o, l], (i, s, u, f) => ({
481
481
  table: i,
482
- column: a,
482
+ column: s,
483
483
  row: u,
484
484
  cell: f,
485
485
  getValue: f.getValue,
@@ -490,48 +490,48 @@ function Ht(e, o, t, n) {
490
490
  i.createCell == null || i.createCell(l, t, o, e);
491
491
  }, {}), l;
492
492
  }
493
- function zt(e, o, t, n) {
493
+ function bt(e, o, t, n) {
494
494
  var r, l;
495
- const a = {
495
+ const s = {
496
496
  ...e._getDefaultColumnDef(),
497
497
  ...o
498
- }, u = a.accessorKey;
499
- let f = (r = (l = a.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof a.header == "string" ? a.header : void 0, c;
500
- if (a.accessorFn ? c = a.accessorFn : u && (u.includes(".") ? c = (d) => {
501
- let s = d;
498
+ }, u = s.accessorKey;
499
+ let f = (r = (l = s.id) != null ? l : u ? typeof String.prototype.replaceAll == "function" ? u.replaceAll(".", "_") : u.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, p;
500
+ if (s.accessorFn ? p = s.accessorFn : u && (u.includes(".") ? p = (d) => {
501
+ let a = d;
502
502
  for (const h of u.split(".")) {
503
503
  var m;
504
- s = (m = s) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
504
+ a = (m = a) == null ? void 0 : m[h], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${h}" in deeply nested key "${u}" returned undefined.`);
505
505
  }
506
- return s;
507
- } : c = (d) => d[a.accessorKey]), !f)
508
- throw process.env.NODE_ENV !== "production" ? new Error(a.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
509
- let p = {
506
+ return a;
507
+ } : p = (d) => d[s.accessorKey]), !f)
508
+ throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
509
+ let c = {
510
510
  id: `${String(f)}`,
511
- accessorFn: c,
511
+ accessorFn: p,
512
512
  parent: n,
513
513
  depth: t,
514
- columnDef: a,
514
+ columnDef: s,
515
515
  columns: [],
516
516
  getFlatColumns: C(() => [!0], () => {
517
517
  var d;
518
- return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
518
+ return [c, ...(d = c.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
519
519
  }, S(e.options, "debugColumns", "column.getFlatColumns")),
520
520
  getLeafColumns: C(() => [e._getOrderColumnsFn()], (d) => {
521
- var s;
522
- if ((s = p.columns) != null && s.length) {
523
- let m = p.columns.flatMap((h) => h.getLeafColumns());
521
+ var a;
522
+ if ((a = c.columns) != null && a.length) {
523
+ let m = c.columns.flatMap((h) => h.getLeafColumns());
524
524
  return d(m);
525
525
  }
526
- return [p];
526
+ return [c];
527
527
  }, S(e.options, "debugColumns", "column.getLeafColumns"))
528
528
  };
529
529
  for (const d of e._features)
530
- d.createColumn == null || d.createColumn(p, e);
531
- return p;
530
+ d.createColumn == null || d.createColumn(c, e);
531
+ return c;
532
532
  }
533
- const D = "debugHeaders";
534
- function Ge(e, o, t) {
533
+ const P = "debugHeaders";
534
+ function Oe(e, o, t) {
535
535
  var n;
536
536
  let l = {
537
537
  id: (n = t.id) != null ? n : o.id,
@@ -545,10 +545,10 @@ function Ge(e, o, t) {
545
545
  rowSpan: 0,
546
546
  headerGroup: null,
547
547
  getLeafHeaders: () => {
548
- const i = [], a = (u) => {
549
- u.subHeaders && u.subHeaders.length && u.subHeaders.map(a), i.push(u);
548
+ const i = [], s = (u) => {
549
+ u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
550
550
  };
551
- return a(l), i;
551
+ return s(l), i;
552
552
  },
553
553
  getContext: () => ({
554
554
  table: e,
@@ -560,82 +560,82 @@ function Ge(e, o, t) {
560
560
  i.createHeader == null || i.createHeader(l, e);
561
561
  }), l;
562
562
  }
563
- const At = {
563
+ const Bt = {
564
564
  createTable: (e) => {
565
565
  e.getHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
566
566
  var l, i;
567
- const a = (l = n == null ? void 0 : n.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((p) => t.find((d) => d.id === p)).filter(Boolean)) != null ? i : [], f = t.filter((p) => !(n != null && n.includes(p.id)) && !(r != null && r.includes(p.id)));
568
- return Z(o, [...a, ...f, ...u], e);
569
- }, S(e.options, D, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), Z(o, t, e, "center")), S(e.options, D, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
567
+ const s = (l = n == null ? void 0 : n.map((c) => t.find((d) => d.id === c)).filter(Boolean)) != null ? l : [], u = (i = r == null ? void 0 : r.map((c) => t.find((d) => d.id === c)).filter(Boolean)) != null ? i : [], f = t.filter((c) => !(n != null && n.includes(c.id)) && !(r != null && r.includes(c.id)));
568
+ return te(o, [...s, ...f, ...u], e);
569
+ }, S(e.options, P, "getHeaderGroups")), e.getCenterHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((l) => !(n != null && n.includes(l.id)) && !(r != null && r.includes(l.id))), te(o, t, e, "center")), S(e.options, P, "getCenterHeaderGroups")), e.getLeftHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
570
570
  var r;
571
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
572
- return Z(o, l, e, "left");
573
- }, S(e.options, D, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
571
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
572
+ return te(o, l, e, "left");
573
+ }, S(e.options, P, "getLeftHeaderGroups")), e.getRightHeaderGroups = C(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
574
574
  var r;
575
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
576
- return Z(o, l, e, "right");
577
- }, S(e.options, D, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, D, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, D, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
575
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
576
+ return te(o, l, e, "right");
577
+ }, S(e.options, P, "getRightHeaderGroups")), e.getFooterGroups = C(() => [e.getHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getFooterGroups")), e.getLeftFooterGroups = C(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getLeftFooterGroups")), e.getCenterFooterGroups = C(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getCenterFooterGroups")), e.getRightFooterGroups = C(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), S(e.options, P, "getRightFooterGroups")), e.getFlatHeaders = C(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getFlatHeaders")), e.getLeftFlatHeaders = C(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getLeftFlatHeaders")), e.getCenterFlatHeaders = C(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getCenterFlatHeaders")), e.getRightFlatHeaders = C(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), S(e.options, P, "getRightFlatHeaders")), e.getCenterLeafHeaders = C(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
578
578
  var n;
579
579
  return !((n = t.subHeaders) != null && n.length);
580
- }), S(e.options, D, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
580
+ }), S(e.options, P, "getCenterLeafHeaders")), e.getLeftLeafHeaders = C(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
581
581
  var n;
582
582
  return !((n = t.subHeaders) != null && n.length);
583
- }), S(e.options, D, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
583
+ }), S(e.options, P, "getLeftLeafHeaders")), e.getRightLeafHeaders = C(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
584
584
  var n;
585
585
  return !((n = t.subHeaders) != null && n.length);
586
- }), S(e.options, D, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
587
- var r, l, i, a, u, f;
588
- return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (a = t[0]) == null ? void 0 : a.headers) != null ? i : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((c) => c.getLeafHeaders()).flat();
589
- }, S(e.options, D, "getLeafHeaders"));
586
+ }), S(e.options, P, "getRightLeafHeaders")), e.getLeafHeaders = C(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
587
+ var r, l, i, s, u, f;
588
+ return [...(r = (l = o[0]) == null ? void 0 : l.headers) != null ? r : [], ...(i = (s = t[0]) == null ? void 0 : s.headers) != null ? i : [], ...(u = (f = n[0]) == null ? void 0 : f.headers) != null ? u : []].map((p) => p.getLeafHeaders()).flat();
589
+ }, S(e.options, P, "getLeafHeaders"));
590
590
  }
591
591
  };
592
- function Z(e, o, t, n) {
592
+ function te(e, o, t, n) {
593
593
  var r, l;
594
594
  let i = 0;
595
- const a = function(d, s) {
596
- s === void 0 && (s = 1), i = Math.max(i, s), d.filter((m) => m.getIsVisible()).forEach((m) => {
595
+ const s = function(d, a) {
596
+ a === void 0 && (a = 1), i = Math.max(i, a), d.filter((m) => m.getIsVisible()).forEach((m) => {
597
597
  var h;
598
- (h = m.columns) != null && h.length && a(m.columns, s + 1);
598
+ (h = m.columns) != null && h.length && s(m.columns, a + 1);
599
599
  }, 0);
600
600
  };
601
- a(e);
601
+ s(e);
602
602
  let u = [];
603
- const f = (d, s) => {
603
+ const f = (d, a) => {
604
604
  const m = {
605
- depth: s,
606
- id: [n, `${s}`].filter(Boolean).join("_"),
605
+ depth: a,
606
+ id: [n, `${a}`].filter(Boolean).join("_"),
607
607
  headers: []
608
608
  }, h = [];
609
609
  d.forEach((w) => {
610
610
  const R = [...h].reverse()[0], x = w.column.depth === m.depth;
611
- let F, E = !1;
612
- if (x && w.column.parent ? F = w.column.parent : (F = w.column, E = !0), R && (R == null ? void 0 : R.column) === F)
611
+ let $, D = !1;
612
+ if (x && w.column.parent ? $ = w.column.parent : ($ = w.column, D = !0), R && (R == null ? void 0 : R.column) === $)
613
613
  R.subHeaders.push(w);
614
614
  else {
615
- const M = Ge(t, F, {
616
- id: [n, s, F.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
617
- isPlaceholder: E,
618
- placeholderId: E ? `${h.filter((N) => N.column === F).length}` : void 0,
619
- depth: s,
615
+ const N = Oe(t, $, {
616
+ id: [n, a, $.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
617
+ isPlaceholder: D,
618
+ placeholderId: D ? `${h.filter((E) => E.column === $).length}` : void 0,
619
+ depth: a,
620
620
  index: h.length
621
621
  });
622
- M.subHeaders.push(w), h.push(M);
622
+ N.subHeaders.push(w), h.push(N);
623
623
  }
624
624
  m.headers.push(w), w.headerGroup = m;
625
- }), u.push(m), s > 0 && f(h, s - 1);
626
- }, c = o.map((d, s) => Ge(t, d, {
625
+ }), u.push(m), a > 0 && f(h, a - 1);
626
+ }, p = o.map((d, a) => Oe(t, d, {
627
627
  depth: i,
628
- index: s
628
+ index: a
629
629
  }));
630
- f(c, i - 1), u.reverse();
631
- const p = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
630
+ f(p, i - 1), u.reverse();
631
+ const c = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
632
632
  let h = 0, w = 0, R = [0];
633
- m.subHeaders && m.subHeaders.length ? (R = [], p(m.subHeaders).forEach((F) => {
633
+ m.subHeaders && m.subHeaders.length ? (R = [], c(m.subHeaders).forEach(($) => {
634
634
  let {
635
- colSpan: E,
636
- rowSpan: M
637
- } = F;
638
- h += E, R.push(M);
635
+ colSpan: D,
636
+ rowSpan: N
637
+ } = $;
638
+ h += D, R.push(N);
639
639
  })) : h = 1;
640
640
  const x = Math.min(...R);
641
641
  return w = w + x, m.colSpan = h, m.rowSpan = w, {
@@ -643,10 +643,10 @@ function Z(e, o, t, n) {
643
643
  rowSpan: w
644
644
  };
645
645
  });
646
- return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
646
+ return c((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
647
647
  }
648
- const $e = (e, o, t, n, r, l, i) => {
649
- let a = {
648
+ const Me = (e, o, t, n, r, l, i) => {
649
+ let s = {
650
650
  id: o,
651
651
  index: n,
652
652
  original: t,
@@ -655,114 +655,114 @@ const $e = (e, o, t, n, r, l, i) => {
655
655
  _valuesCache: {},
656
656
  _uniqueValuesCache: {},
657
657
  getValue: (u) => {
658
- if (a._valuesCache.hasOwnProperty(u))
659
- return a._valuesCache[u];
658
+ if (s._valuesCache.hasOwnProperty(u))
659
+ return s._valuesCache[u];
660
660
  const f = e.getColumn(u);
661
661
  if (f != null && f.accessorFn)
662
- return a._valuesCache[u] = f.accessorFn(a.original, n), a._valuesCache[u];
662
+ return s._valuesCache[u] = f.accessorFn(s.original, n), s._valuesCache[u];
663
663
  },
664
664
  getUniqueValues: (u) => {
665
- if (a._uniqueValuesCache.hasOwnProperty(u))
666
- return a._uniqueValuesCache[u];
665
+ if (s._uniqueValuesCache.hasOwnProperty(u))
666
+ return s._uniqueValuesCache[u];
667
667
  const f = e.getColumn(u);
668
668
  if (f != null && f.accessorFn)
669
- return f.columnDef.getUniqueValues ? (a._uniqueValuesCache[u] = f.columnDef.getUniqueValues(a.original, n), a._uniqueValuesCache[u]) : (a._uniqueValuesCache[u] = [a.getValue(u)], a._uniqueValuesCache[u]);
669
+ return f.columnDef.getUniqueValues ? (s._uniqueValuesCache[u] = f.columnDef.getUniqueValues(s.original, n), s._uniqueValuesCache[u]) : (s._uniqueValuesCache[u] = [s.getValue(u)], s._uniqueValuesCache[u]);
670
670
  },
671
671
  renderValue: (u) => {
672
672
  var f;
673
- return (f = a.getValue(u)) != null ? f : e.options.renderFallbackValue;
673
+ return (f = s.getValue(u)) != null ? f : e.options.renderFallbackValue;
674
674
  },
675
675
  subRows: [],
676
- getLeafRows: () => Lt(a.subRows, (u) => u.subRows),
677
- getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
676
+ getLeafRows: () => Gt(s.subRows, (u) => u.subRows),
677
+ getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
678
678
  getParentRows: () => {
679
- let u = [], f = a;
679
+ let u = [], f = s;
680
680
  for (; ; ) {
681
- const c = f.getParentRow();
682
- if (!c) break;
683
- u.push(c), f = c;
681
+ const p = f.getParentRow();
682
+ if (!p) break;
683
+ u.push(p), f = p;
684
684
  }
685
685
  return u.reverse();
686
686
  },
687
- getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((f) => Ht(e, a, f, f.id)), S(e.options, "debugRows", "getAllCells")),
688
- _getAllCellsByColumnId: C(() => [a.getAllCells()], (u) => u.reduce((f, c) => (f[c.column.id] = c, f), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
687
+ getAllCells: C(() => [e.getAllLeafColumns()], (u) => u.map((f) => Ot(e, s, f, f.id)), S(e.options, "debugRows", "getAllCells")),
688
+ _getAllCellsByColumnId: C(() => [s.getAllCells()], (u) => u.reduce((f, p) => (f[p.column.id] = p, f), {}), S(e.options, "debugRows", "getAllCellsByColumnId"))
689
689
  };
690
690
  for (let u = 0; u < e._features.length; u++) {
691
691
  const f = e._features[u];
692
- f == null || f.createRow == null || f.createRow(a, e);
692
+ f == null || f.createRow == null || f.createRow(s, e);
693
693
  }
694
- return a;
695
- }, Gt = {
694
+ return s;
695
+ }, Tt = {
696
696
  createColumn: (e, o) => {
697
697
  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 = () => {
698
698
  if (e._getFacetedMinMaxValues)
699
699
  return e._getFacetedMinMaxValues();
700
700
  };
701
701
  }
702
- }, je = (e, o, t) => {
702
+ }, Ue = (e, o, t) => {
703
703
  var n, r;
704
704
  const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
705
705
  return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
706
706
  };
707
- je.autoRemove = (e) => H(e);
708
- const Ue = (e, o, t) => {
709
- var n;
710
- return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
711
- };
712
707
  Ue.autoRemove = (e) => H(e);
713
708
  const Ke = (e, o, t) => {
714
709
  var n;
715
- return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
710
+ return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
716
711
  };
717
712
  Ke.autoRemove = (e) => H(e);
718
713
  const Xe = (e, o, t) => {
719
714
  var n;
720
- return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
715
+ return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
721
716
  };
722
717
  Xe.autoRemove = (e) => H(e);
723
- const We = (e, o, t) => !t.some((n) => {
718
+ const We = (e, o, t) => {
719
+ var n;
720
+ return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
721
+ };
722
+ We.autoRemove = (e) => H(e);
723
+ const Qe = (e, o, t) => !t.some((n) => {
724
724
  var r;
725
725
  return !((r = e.getValue(o)) != null && r.includes(n));
726
726
  });
727
- We.autoRemove = (e) => H(e) || !(e != null && e.length);
728
- const Qe = (e, o, t) => t.some((n) => {
727
+ Qe.autoRemove = (e) => H(e) || !(e != null && e.length);
728
+ const Ye = (e, o, t) => t.some((n) => {
729
729
  var r;
730
730
  return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
731
731
  });
732
- Qe.autoRemove = (e) => H(e) || !(e != null && e.length);
733
- const Ye = (e, o, t) => e.getValue(o) === t;
734
- Ye.autoRemove = (e) => H(e);
735
- const Je = (e, o, t) => e.getValue(o) == t;
732
+ Ye.autoRemove = (e) => H(e) || !(e != null && e.length);
733
+ const Je = (e, o, t) => e.getValue(o) === t;
736
734
  Je.autoRemove = (e) => H(e);
737
- const Me = (e, o, t) => {
735
+ const Ze = (e, o, t) => e.getValue(o) == t;
736
+ Ze.autoRemove = (e) => H(e);
737
+ const Ie = (e, o, t) => {
738
738
  let [n, r] = t;
739
739
  const l = e.getValue(o);
740
740
  return l >= n && l <= r;
741
741
  };
742
- Me.resolveFilterValue = (e) => {
742
+ Ie.resolveFilterValue = (e) => {
743
743
  let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, l = o === null || Number.isNaN(n) ? -1 / 0 : n, i = t === null || Number.isNaN(r) ? 1 / 0 : r;
744
744
  if (l > i) {
745
- const a = l;
746
- l = i, i = a;
745
+ const s = l;
746
+ l = i, i = s;
747
747
  }
748
748
  return [l, i];
749
749
  };
750
- Me.autoRemove = (e) => H(e) || H(e[0]) && H(e[1]);
750
+ Ie.autoRemove = (e) => H(e) || H(e[0]) && H(e[1]);
751
751
  const G = {
752
- includesString: je,
753
- includesStringSensitive: Ue,
754
- equalsString: Ke,
755
- arrIncludes: Xe,
756
- arrIncludesAll: We,
757
- arrIncludesSome: Qe,
758
- equals: Ye,
759
- weakEquals: Je,
760
- inNumberRange: Me
752
+ includesString: Ue,
753
+ includesStringSensitive: Ke,
754
+ equalsString: Xe,
755
+ arrIncludes: We,
756
+ arrIncludesAll: Qe,
757
+ arrIncludesSome: Ye,
758
+ equals: Je,
759
+ weakEquals: Ze,
760
+ inNumberRange: Ie
761
761
  };
762
762
  function H(e) {
763
763
  return e == null || e === "";
764
764
  }
765
- const Ot = {
765
+ const qt = {
766
766
  getDefaultColumnDef: () => ({
767
767
  filterFn: "auto"
768
768
  }),
@@ -781,7 +781,7 @@ const Ot = {
781
781
  return typeof n == "string" ? G.includesString : typeof n == "number" ? G.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? G.equals : Array.isArray(n) ? G.arrIncludes : G.weakEquals;
782
782
  }, e.getFilterFn = () => {
783
783
  var t, n;
784
- return oe(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
784
+ return le(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
785
785
  // @ts-ignore
786
786
  (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : G[e.columnDef.filterFn]
787
787
  );
@@ -796,10 +796,10 @@ const Ot = {
796
796
  return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
797
797
  }, e.setFilterValue = (t) => {
798
798
  o.setColumnFilters((n) => {
799
- const r = e.getFilterFn(), l = n == null ? void 0 : n.find((c) => c.id === e.id), i = O(t, l ? l.value : void 0);
800
- if (Oe(r, i, e)) {
801
- var a;
802
- return (a = n == null ? void 0 : n.filter((c) => c.id !== e.id)) != null ? a : [];
799
+ const r = e.getFilterFn(), l = n == null ? void 0 : n.find((p) => p.id === e.id), i = O(t, l ? l.value : void 0);
800
+ if (be(r, i, e)) {
801
+ var s;
802
+ return (s = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? s : [];
803
803
  }
804
804
  const u = {
805
805
  id: e.id,
@@ -807,7 +807,7 @@ const Ot = {
807
807
  };
808
808
  if (l) {
809
809
  var f;
810
- return (f = n == null ? void 0 : n.map((c) => c.id === e.id ? u : c)) != null ? f : [];
810
+ return (f = n == null ? void 0 : n.map((p) => p.id === e.id ? u : p)) != null ? f : [];
811
811
  }
812
812
  return n != null && n.length ? [...n, u] : [u];
813
813
  });
@@ -821,10 +821,10 @@ const Ot = {
821
821
  const t = e.getAllLeafColumns(), n = (r) => {
822
822
  var l;
823
823
  return (l = O(o, r)) == null ? void 0 : l.filter((i) => {
824
- const a = t.find((u) => u.id === i.id);
825
- if (a) {
826
- const u = a.getFilterFn();
827
- if (Oe(u, i.value, a))
824
+ const s = t.find((u) => u.id === i.id);
825
+ if (s) {
826
+ const u = s.getFilterFn();
827
+ if (be(u, i.value, s))
828
828
  return !1;
829
829
  }
830
830
  return !0;
@@ -837,57 +837,57 @@ const Ot = {
837
837
  }, 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());
838
838
  }
839
839
  };
840
- function Oe(e, o, t) {
840
+ function be(e, o, t) {
841
841
  return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
842
842
  }
843
- const bt = (e, o, t) => t.reduce((n, r) => {
843
+ const jt = (e, o, t) => t.reduce((n, r) => {
844
844
  const l = r.getValue(e);
845
845
  return n + (typeof l == "number" ? l : 0);
846
- }, 0), Bt = (e, o, t) => {
846
+ }, 0), Ut = (e, o, t) => {
847
847
  let n;
848
848
  return t.forEach((r) => {
849
849
  const l = r.getValue(e);
850
850
  l != null && (n > l || n === void 0 && l >= l) && (n = l);
851
851
  }), n;
852
- }, Tt = (e, o, t) => {
852
+ }, Kt = (e, o, t) => {
853
853
  let n;
854
854
  return t.forEach((r) => {
855
855
  const l = r.getValue(e);
856
856
  l != null && (n < l || n === void 0 && l >= l) && (n = l);
857
857
  }), n;
858
- }, qt = (e, o, t) => {
858
+ }, Xt = (e, o, t) => {
859
859
  let n, r;
860
860
  return t.forEach((l) => {
861
861
  const i = l.getValue(e);
862
862
  i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
863
863
  }), [n, r];
864
- }, jt = (e, o) => {
864
+ }, Wt = (e, o) => {
865
865
  let t = 0, n = 0;
866
866
  if (o.forEach((r) => {
867
867
  let l = r.getValue(e);
868
868
  l != null && (l = +l) >= l && (++t, n += l);
869
869
  }), t) return n / t;
870
- }, Ut = (e, o) => {
870
+ }, Qt = (e, o) => {
871
871
  if (!o.length)
872
872
  return;
873
873
  const t = o.map((l) => l.getValue(e));
874
- if (!kt(t))
874
+ if (!At(t))
875
875
  return;
876
876
  if (t.length === 1)
877
877
  return t[0];
878
878
  const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
879
879
  return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
880
- }, Kt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Xt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Wt = (e, o) => o.length, ae = {
881
- sum: bt,
882
- min: Bt,
883
- max: Tt,
884
- extent: qt,
885
- mean: jt,
886
- median: Ut,
887
- unique: Kt,
888
- uniqueCount: Xt,
889
- count: Wt
890
- }, Qt = {
880
+ }, Yt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Jt = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Zt = (e, o) => o.length, ue = {
881
+ sum: jt,
882
+ min: Ut,
883
+ max: Kt,
884
+ extent: Xt,
885
+ mean: Wt,
886
+ median: Qt,
887
+ unique: Yt,
888
+ uniqueCount: Jt,
889
+ count: Zt
890
+ }, en = {
891
891
  getDefaultColumnDef: () => ({
892
892
  aggregatedCell: (e) => {
893
893
  var o, t;
@@ -923,14 +923,14 @@ const bt = (e, o, t) => t.reduce((n, r) => {
923
923
  }, e.getAutoAggregationFn = () => {
924
924
  const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
925
925
  if (typeof n == "number")
926
- return ae.sum;
926
+ return ue.sum;
927
927
  if (Object.prototype.toString.call(n) === "[object Date]")
928
- return ae.extent;
928
+ return ue.extent;
929
929
  }, e.getAggregationFn = () => {
930
930
  var t, n;
931
931
  if (!e)
932
932
  throw new Error();
933
- return oe(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 : ae[e.columnDef.aggregationFn];
933
+ return le(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 : ue[e.columnDef.aggregationFn];
934
934
  };
935
935
  },
936
936
  createTable: (e) => {
@@ -954,13 +954,13 @@ const bt = (e, o, t) => t.reduce((n, r) => {
954
954
  };
955
955
  }
956
956
  };
957
- function Yt(e, o, t) {
957
+ function tn(e, o, t) {
958
958
  if (!(o != null && o.length) || !t)
959
959
  return e;
960
960
  const n = e.filter((l) => !o.includes(l.id));
961
961
  return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
962
962
  }
963
- const Jt = {
963
+ const nn = {
964
964
  getInitialState: (e) => ({
965
965
  columnOrder: [],
966
966
  ...e
@@ -969,12 +969,12 @@ const Jt = {
969
969
  onColumnOrderChange: L("columnOrder", e)
970
970
  }),
971
971
  createColumn: (e, o) => {
972
- e.getIndex = C((t) => [J(o, t)], (t) => t.findIndex((n) => n.id === e.id), S(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
972
+ e.getIndex = C((t) => [Z(o, t)], (t) => t.findIndex((n) => n.id === e.id), S(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
973
973
  var n;
974
- return ((n = J(o, t)[0]) == null ? void 0 : n.id) === e.id;
974
+ return ((n = Z(o, t)[0]) == null ? void 0 : n.id) === e.id;
975
975
  }, e.getIsLastColumn = (t) => {
976
976
  var n;
977
- const r = J(o, t);
977
+ const r = Z(o, t);
978
978
  return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
979
979
  };
980
980
  },
@@ -987,22 +987,22 @@ const Jt = {
987
987
  if (!(o != null && o.length))
988
988
  l = r;
989
989
  else {
990
- const i = [...o], a = [...r];
991
- for (; a.length && i.length; ) {
992
- const u = i.shift(), f = a.findIndex((c) => c.id === u);
993
- f > -1 && l.push(a.splice(f, 1)[0]);
990
+ const i = [...o], s = [...r];
991
+ for (; s.length && i.length; ) {
992
+ const u = i.shift(), f = s.findIndex((p) => p.id === u);
993
+ f > -1 && l.push(s.splice(f, 1)[0]);
994
994
  }
995
- l = [...l, ...a];
995
+ l = [...l, ...s];
996
996
  }
997
- return Yt(l, t, n);
997
+ return tn(l, t, n);
998
998
  }, S(e.options, "debugTable", "_getOrderColumnsFn"));
999
999
  }
1000
- }, ue = () => ({
1000
+ }, fe = () => ({
1001
1001
  left: [],
1002
1002
  right: []
1003
- }), Zt = {
1003
+ }), on = {
1004
1004
  getInitialState: (e) => ({
1005
- columnPinning: ue(),
1005
+ columnPinning: fe(),
1006
1006
  ...e
1007
1007
  }),
1008
1008
  getDefaultOptions: (e) => ({
@@ -1014,32 +1014,32 @@ const Jt = {
1014
1014
  o.setColumnPinning((r) => {
1015
1015
  var l, i;
1016
1016
  if (t === "right") {
1017
- var a, u;
1017
+ var s, u;
1018
1018
  return {
1019
- left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((p) => !(n != null && n.includes(p))),
1020
- right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
1019
+ left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((c) => !(n != null && n.includes(c))),
1020
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((c) => !(n != null && n.includes(c))), ...n]
1021
1021
  };
1022
1022
  }
1023
1023
  if (t === "left") {
1024
- var f, c;
1024
+ var f, p;
1025
1025
  return {
1026
- left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((p) => !(n != null && n.includes(p))), ...n],
1027
- right: ((c = r == null ? void 0 : r.right) != null ? c : []).filter((p) => !(n != null && n.includes(p)))
1026
+ left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((c) => !(n != null && n.includes(c))), ...n],
1027
+ right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((c) => !(n != null && n.includes(c)))
1028
1028
  };
1029
1029
  }
1030
1030
  return {
1031
- left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
1032
- right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
1031
+ left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((c) => !(n != null && n.includes(c))),
1032
+ right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((c) => !(n != null && n.includes(c)))
1033
1033
  };
1034
1034
  });
1035
1035
  }, e.getCanPin = () => e.getLeafColumns().some((n) => {
1036
1036
  var r, l, i;
1037
1037
  return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
1038
1038
  }), e.getIsPinned = () => {
1039
- const t = e.getLeafColumns().map((a) => a.id), {
1039
+ const t = e.getLeafColumns().map((s) => s.id), {
1040
1040
  left: n,
1041
1041
  right: r
1042
- } = o.getState().columnPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
1042
+ } = o.getState().columnPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
1043
1043
  return l ? "left" : i ? "right" : !1;
1044
1044
  }, e.getPinnedIndex = () => {
1045
1045
  var t, n;
@@ -1062,7 +1062,7 @@ const Jt = {
1062
1062
  createTable: (e) => {
1063
1063
  e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
1064
1064
  var t, n;
1065
- return e.setColumnPinning(o ? ue() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ue());
1065
+ return e.setColumnPinning(o ? fe() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : fe());
1066
1066
  }, e.getIsSomeColumnsPinned = (o) => {
1067
1067
  var t;
1068
1068
  const n = e.getState().columnPinning;
@@ -1077,25 +1077,25 @@ const Jt = {
1077
1077
  }, S(e.options, "debugColumns", "getCenterLeafColumns"));
1078
1078
  }
1079
1079
  };
1080
- function en(e) {
1080
+ function rn(e) {
1081
1081
  return e || (typeof document < "u" ? document : null);
1082
1082
  }
1083
- const ee = {
1083
+ const ne = {
1084
1084
  size: 150,
1085
1085
  minSize: 20,
1086
1086
  maxSize: Number.MAX_SAFE_INTEGER
1087
- }, fe = () => ({
1087
+ }, de = () => ({
1088
1088
  startOffset: null,
1089
1089
  startSize: null,
1090
1090
  deltaOffset: null,
1091
1091
  deltaPercentage: null,
1092
1092
  isResizingColumn: !1,
1093
1093
  columnSizingStart: []
1094
- }), tn = {
1095
- getDefaultColumnDef: () => ee,
1094
+ }), ln = {
1095
+ getDefaultColumnDef: () => ne,
1096
1096
  getInitialState: (e) => ({
1097
1097
  columnSizing: {},
1098
- columnSizingInfo: fe(),
1098
+ columnSizingInfo: de(),
1099
1099
  ...e
1100
1100
  }),
1101
1101
  getDefaultOptions: (e) => ({
@@ -1108,8 +1108,8 @@ const ee = {
1108
1108
  e.getSize = () => {
1109
1109
  var t, n, r;
1110
1110
  const l = o.getState().columnSizing[e.id];
1111
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ee.minSize, (n = l ?? e.columnDef.size) != null ? n : ee.size), (r = e.columnDef.maxSize) != null ? r : ee.maxSize);
1112
- }, e.getStart = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, J(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1111
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ne.minSize, (n = l ?? e.columnDef.size) != null ? n : ne.size), (r = e.columnDef.maxSize) != null ? r : ne.maxSize);
1112
+ }, e.getStart = C((t) => [t, Z(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getStart")), e.getAfter = C((t) => [t, Z(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), S(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1113
1113
  o.setColumnSizing((t) => {
1114
1114
  let {
1115
1115
  [e.id]: n,
@@ -1143,26 +1143,26 @@ const ee = {
1143
1143
  }, e.getResizeHandler = (t) => {
1144
1144
  const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
1145
1145
  return (l) => {
1146
- if (!n || !r || (l.persist == null || l.persist(), de(l) && l.touches && l.touches.length > 1))
1146
+ if (!n || !r || (l.persist == null || l.persist(), ge(l) && l.touches && l.touches.length > 1))
1147
1147
  return;
1148
- const i = e.getSize(), a = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = de(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, c = (R, x) => {
1149
- typeof x == "number" && (o.setColumnSizingInfo((F) => {
1150
- var E, M;
1151
- const N = o.options.columnResizeDirection === "rtl" ? -1 : 1, T = (x - ((E = F == null ? void 0 : F.startOffset) != null ? E : 0)) * N, P = Math.max(T / ((M = F == null ? void 0 : F.startSize) != null ? M : 0), -0.999999);
1152
- return F.columnSizingStart.forEach((y) => {
1153
- let [_, V] = y;
1154
- f[_] = Math.round(Math.max(V + V * P, 0) * 100) / 100;
1148
+ const i = e.getSize(), s = e ? e.getLeafHeaders().map((R) => [R.column.id, R.column.getSize()]) : [[n.id, n.getSize()]], u = ge(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, p = (R, x) => {
1149
+ typeof x == "number" && (o.setColumnSizingInfo(($) => {
1150
+ var D, N;
1151
+ const E = o.options.columnResizeDirection === "rtl" ? -1 : 1, q = (x - ((D = $ == null ? void 0 : $.startOffset) != null ? D : 0)) * E, V = Math.max(q / ((N = $ == null ? void 0 : $.startSize) != null ? N : 0), -0.999999);
1152
+ return $.columnSizingStart.forEach((y) => {
1153
+ let [_, M] = y;
1154
+ f[_] = Math.round(Math.max(M + M * V, 0) * 100) / 100;
1155
1155
  }), {
1156
- ...F,
1157
- deltaOffset: T,
1158
- deltaPercentage: P
1156
+ ...$,
1157
+ deltaOffset: q,
1158
+ deltaPercentage: V
1159
1159
  };
1160
- }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing((F) => ({
1161
- ...F,
1160
+ }), (o.options.columnResizeMode === "onChange" || R === "end") && o.setColumnSizing(($) => ({
1161
+ ...$,
1162
1162
  ...f
1163
1163
  })));
1164
- }, p = (R) => c("move", R), d = (R) => {
1165
- c("end", R), o.setColumnSizingInfo((x) => ({
1164
+ }, c = (R) => p("move", R), d = (R) => {
1165
+ p("end", R), o.setColumnSizingInfo((x) => ({
1166
1166
  ...x,
1167
1167
  isResizingColumn: !1,
1168
1168
  startOffset: null,
@@ -1171,27 +1171,27 @@ const ee = {
1171
1171
  deltaPercentage: null,
1172
1172
  columnSizingStart: []
1173
1173
  }));
1174
- }, s = en(t), m = {
1175
- moveHandler: (R) => p(R.clientX),
1174
+ }, a = rn(t), m = {
1175
+ moveHandler: (R) => c(R.clientX),
1176
1176
  upHandler: (R) => {
1177
- s == null || s.removeEventListener("mousemove", m.moveHandler), s == null || s.removeEventListener("mouseup", m.upHandler), d(R.clientX);
1177
+ a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), d(R.clientX);
1178
1178
  }
1179
1179
  }, h = {
1180
- moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), p(R.touches[0].clientX), !1),
1180
+ moveHandler: (R) => (R.cancelable && (R.preventDefault(), R.stopPropagation()), c(R.touches[0].clientX), !1),
1181
1181
  upHandler: (R) => {
1182
1182
  var x;
1183
- s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), d((x = R.touches[0]) == null ? void 0 : x.clientX);
1183
+ a == null || a.removeEventListener("touchmove", h.moveHandler), a == null || a.removeEventListener("touchend", h.upHandler), R.cancelable && (R.preventDefault(), R.stopPropagation()), d((x = R.touches[0]) == null ? void 0 : x.clientX);
1184
1184
  }
1185
- }, w = nn() ? {
1185
+ }, w = sn() ? {
1186
1186
  passive: !1
1187
1187
  } : !1;
1188
- de(l) ? (s == null || s.addEventListener("touchmove", h.moveHandler, w), s == null || s.addEventListener("touchend", h.upHandler, w)) : (s == null || s.addEventListener("mousemove", m.moveHandler, w), s == null || s.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
1188
+ ge(l) ? (a == null || a.addEventListener("touchmove", h.moveHandler, w), a == null || a.addEventListener("touchend", h.upHandler, w)) : (a == null || a.addEventListener("mousemove", m.moveHandler, w), a == null || a.addEventListener("mouseup", m.upHandler, w)), o.setColumnSizingInfo((R) => ({
1189
1189
  ...R,
1190
1190
  startOffset: u,
1191
1191
  startSize: i,
1192
1192
  deltaOffset: 0,
1193
1193
  deltaPercentage: 0,
1194
- columnSizingStart: a,
1194
+ columnSizingStart: s,
1195
1195
  isResizingColumn: n.id
1196
1196
  }));
1197
1197
  };
@@ -1203,7 +1203,7 @@ const ee = {
1203
1203
  e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
1204
1204
  }, e.resetHeaderSizeInfo = (o) => {
1205
1205
  var t;
1206
- e.setColumnSizingInfo(o ? fe() : (t = e.initialState.columnSizingInfo) != null ? t : fe());
1206
+ e.setColumnSizingInfo(o ? de() : (t = e.initialState.columnSizingInfo) != null ? t : de());
1207
1207
  }, e.getTotalSize = () => {
1208
1208
  var o, t;
1209
1209
  return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
@@ -1219,9 +1219,9 @@ const ee = {
1219
1219
  };
1220
1220
  }
1221
1221
  };
1222
- let te = null;
1223
- function nn() {
1224
- if (typeof te == "boolean") return te;
1222
+ let oe = null;
1223
+ function sn() {
1224
+ if (typeof oe == "boolean") return oe;
1225
1225
  let e = !1;
1226
1226
  try {
1227
1227
  const o = {
@@ -1234,12 +1234,12 @@ function nn() {
1234
1234
  } catch {
1235
1235
  e = !1;
1236
1236
  }
1237
- return te = e, te;
1237
+ return oe = e, oe;
1238
1238
  }
1239
- function de(e) {
1239
+ function ge(e) {
1240
1240
  return e.type === "touchstart";
1241
1241
  }
1242
- const on = {
1242
+ const an = {
1243
1243
  getInitialState: (e) => ({
1244
1244
  columnVisibility: {},
1245
1245
  ...e
@@ -1284,17 +1284,17 @@ const on = {
1284
1284
  };
1285
1285
  }
1286
1286
  };
1287
- function J(e, o) {
1287
+ function Z(e, o) {
1288
1288
  return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
1289
1289
  }
1290
- const rn = {
1290
+ const un = {
1291
1291
  createTable: (e) => {
1292
1292
  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 = () => {
1293
1293
  if (e._getGlobalFacetedMinMaxValues)
1294
1294
  return e._getGlobalFacetedMinMaxValues();
1295
1295
  };
1296
1296
  }
1297
- }, ln = {
1297
+ }, fn = {
1298
1298
  getInitialState: (e) => ({
1299
1299
  globalFilter: void 0,
1300
1300
  ...e
@@ -1320,14 +1320,14 @@ const rn = {
1320
1320
  const {
1321
1321
  globalFilterFn: n
1322
1322
  } = e.options;
1323
- return oe(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : G[n];
1323
+ return le(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : G[n];
1324
1324
  }, e.setGlobalFilter = (o) => {
1325
1325
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
1326
1326
  }, e.resetGlobalFilter = (o) => {
1327
1327
  e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
1328
1328
  };
1329
1329
  }
1330
- }, sn = {
1330
+ }, dn = {
1331
1331
  getInitialState: (e) => ({
1332
1332
  expanded: {},
1333
1333
  ...e
@@ -1379,8 +1379,8 @@ const rn = {
1379
1379
  var r;
1380
1380
  const l = n === !0 ? !0 : !!(n != null && n[e.id]);
1381
1381
  let i = {};
1382
- if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((a) => {
1383
- i[a] = !0;
1382
+ if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((s) => {
1383
+ i[s] = !0;
1384
1384
  }) : i = n, t = (r = t) != null ? r : !l, !l && t)
1385
1385
  return {
1386
1386
  ...i,
@@ -1388,7 +1388,7 @@ const rn = {
1388
1388
  };
1389
1389
  if (l && !t) {
1390
1390
  const {
1391
- [e.id]: a,
1391
+ [e.id]: s,
1392
1392
  ...u
1393
1393
  } = i;
1394
1394
  return u;
@@ -1414,14 +1414,14 @@ const rn = {
1414
1414
  };
1415
1415
  };
1416
1416
  }
1417
- }, we = 0, Ce = 10, ge = () => ({
1418
- pageIndex: we,
1419
- pageSize: Ce
1420
- }), an = {
1417
+ }, Ce = 0, Se = 10, ce = () => ({
1418
+ pageIndex: Ce,
1419
+ pageSize: Se
1420
+ }), gn = {
1421
1421
  getInitialState: (e) => ({
1422
1422
  ...e,
1423
1423
  pagination: {
1424
- ...ge(),
1424
+ ...ce(),
1425
1425
  ...e == null ? void 0 : e.pagination
1426
1426
  }
1427
1427
  }),
@@ -1449,7 +1449,7 @@ const rn = {
1449
1449
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1450
1450
  }, e.resetPagination = (n) => {
1451
1451
  var r;
1452
- e.setPagination(n ? ge() : (r = e.initialState.pagination) != null ? r : ge());
1452
+ e.setPagination(n ? ce() : (r = e.initialState.pagination) != null ? r : ce());
1453
1453
  }, e.setPageIndex = (n) => {
1454
1454
  e.setPagination((r) => {
1455
1455
  let l = O(n, r.pageIndex);
@@ -1461,16 +1461,16 @@ const rn = {
1461
1461
  });
1462
1462
  }, e.resetPageIndex = (n) => {
1463
1463
  var r, l;
1464
- e.setPageIndex(n ? we : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : we);
1464
+ e.setPageIndex(n ? Ce : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : Ce);
1465
1465
  }, e.resetPageSize = (n) => {
1466
1466
  var r, l;
1467
- e.setPageSize(n ? Ce : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : Ce);
1467
+ e.setPageSize(n ? Se : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : Se);
1468
1468
  }, e.setPageSize = (n) => {
1469
1469
  e.setPagination((r) => {
1470
- const l = Math.max(1, O(n, r.pageSize)), i = r.pageSize * r.pageIndex, a = Math.floor(i / l);
1470
+ const l = Math.max(1, O(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
1471
1471
  return {
1472
1472
  ...r,
1473
- pageIndex: a,
1473
+ pageIndex: s,
1474
1474
  pageSize: l
1475
1475
  };
1476
1476
  });
@@ -1497,12 +1497,12 @@ const rn = {
1497
1497
  return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1498
1498
  };
1499
1499
  }
1500
- }, ce = () => ({
1500
+ }, pe = () => ({
1501
1501
  top: [],
1502
1502
  bottom: []
1503
- }), un = {
1503
+ }), cn = {
1504
1504
  getInitialState: (e) => ({
1505
- rowPinning: ce(),
1505
+ rowPinning: pe(),
1506
1506
  ...e
1507
1507
  }),
1508
1508
  getDefaultOptions: (e) => ({
@@ -1520,26 +1520,26 @@ const rn = {
1520
1520
  id: f
1521
1521
  } = u;
1522
1522
  return f;
1523
- }) : [], a = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1523
+ }) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1524
1524
  o.setRowPinning((u) => {
1525
- var f, c;
1525
+ var f, p;
1526
1526
  if (t === "bottom") {
1527
- var p, d;
1527
+ var c, d;
1528
1528
  return {
1529
- top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((h) => !(a != null && a.has(h))),
1530
- bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)]
1529
+ top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(s != null && s.has(h))),
1530
+ bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)]
1531
1531
  };
1532
1532
  }
1533
1533
  if (t === "top") {
1534
- var s, m;
1534
+ var a, m;
1535
1535
  return {
1536
- top: [...((s = u == null ? void 0 : u.top) != null ? s : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
1537
- bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(a != null && a.has(h)))
1536
+ top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((h) => !(s != null && s.has(h))), ...Array.from(s)],
1537
+ bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(s != null && s.has(h)))
1538
1538
  };
1539
1539
  }
1540
1540
  return {
1541
- top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((h) => !(a != null && a.has(h))),
1542
- bottom: ((c = u == null ? void 0 : u.bottom) != null ? c : []).filter((h) => !(a != null && a.has(h)))
1541
+ top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((h) => !(s != null && s.has(h))),
1542
+ bottom: ((p = u == null ? void 0 : u.bottom) != null ? p : []).filter((h) => !(s != null && s.has(h)))
1543
1543
  };
1544
1544
  });
1545
1545
  }, e.getCanPin = () => {
@@ -1553,7 +1553,7 @@ const rn = {
1553
1553
  const t = [e.id], {
1554
1554
  top: n,
1555
1555
  bottom: r
1556
- } = o.getState().rowPinning, l = t.some((a) => n == null ? void 0 : n.includes(a)), i = t.some((a) => r == null ? void 0 : r.includes(a));
1556
+ } = o.getState().rowPinning, l = t.some((s) => n == null ? void 0 : n.includes(s)), i = t.some((s) => r == null ? void 0 : r.includes(s));
1557
1557
  return l ? "top" : i ? "bottom" : !1;
1558
1558
  }, e.getPinnedIndex = () => {
1559
1559
  var t, n;
@@ -1561,9 +1561,9 @@ const rn = {
1561
1561
  if (!r) return -1;
1562
1562
  const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
1563
1563
  let {
1564
- id: a
1564
+ id: s
1565
1565
  } = i;
1566
- return a;
1566
+ return s;
1567
1567
  });
1568
1568
  return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
1569
1569
  };
@@ -1571,7 +1571,7 @@ const rn = {
1571
1571
  createTable: (e) => {
1572
1572
  e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1573
1573
  var t, n;
1574
- return e.setRowPinning(o ? ce() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : ce());
1574
+ return e.setRowPinning(o ? pe() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : pe());
1575
1575
  }, e.getIsSomeRowsPinned = (o) => {
1576
1576
  var t;
1577
1577
  const n = e.getState().rowPinning;
@@ -1586,12 +1586,12 @@ const rn = {
1586
1586
  //get all rows that are pinned even if they would not be otherwise visible
1587
1587
  //account for expanded parent rows, but not pagination or filtering
1588
1588
  (t ?? []).map((i) => {
1589
- const a = e.getRow(i, !0);
1590
- return a.getIsAllParentsExpanded() ? a : null;
1589
+ const s = e.getRow(i, !0);
1590
+ return s.getIsAllParentsExpanded() ? s : null;
1591
1591
  })
1592
1592
  ) : (
1593
1593
  //else get only visible rows that are pinned
1594
- (t ?? []).map((i) => o.find((a) => a.id === i))
1594
+ (t ?? []).map((i) => o.find((s) => s.id === i))
1595
1595
  )).filter(Boolean).map((i) => ({
1596
1596
  ...i,
1597
1597
  position: n
@@ -1601,7 +1601,7 @@ const rn = {
1601
1601
  return o.filter((l) => !r.has(l.id));
1602
1602
  }, S(e.options, "debugRows", "getCenterRows"));
1603
1603
  }
1604
- }, fn = {
1604
+ }, pn = {
1605
1605
  getInitialState: (e) => ({
1606
1606
  rowSelection: {},
1607
1607
  ...e
@@ -1636,17 +1636,17 @@ const rn = {
1636
1636
  ...t
1637
1637
  };
1638
1638
  return e.getRowModel().rows.forEach((l) => {
1639
- Se(r, l.id, n, !0, e);
1639
+ Re(r, l.id, n, !0, e);
1640
1640
  }), r;
1641
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? pe(e, t) : {
1641
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = C(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? me(e, t) : {
1642
1642
  rows: [],
1643
1643
  flatRows: [],
1644
1644
  rowsById: {}
1645
- }, S(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? pe(e, t) : {
1645
+ }, S(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = C(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? me(e, t) : {
1646
1646
  rows: [],
1647
1647
  flatRows: [],
1648
1648
  rowsById: {}
1649
- }, S(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? pe(e, t) : {
1649
+ }, S(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = C(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? me(e, t) : {
1650
1650
  rows: [],
1651
1651
  flatRows: [],
1652
1652
  rowsById: {}
@@ -1682,26 +1682,26 @@ const rn = {
1682
1682
  var i;
1683
1683
  if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1684
1684
  return l;
1685
- const a = {
1685
+ const s = {
1686
1686
  ...l
1687
1687
  };
1688
- return Se(a, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), a;
1688
+ return Re(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
1689
1689
  });
1690
1690
  }, e.getIsSelected = () => {
1691
1691
  const {
1692
1692
  rowSelection: t
1693
1693
  } = o.getState();
1694
- return Ie(e, t);
1694
+ return Ve(e, t);
1695
1695
  }, e.getIsSomeSelected = () => {
1696
1696
  const {
1697
1697
  rowSelection: t
1698
1698
  } = o.getState();
1699
- return Re(e, t) === "some";
1699
+ return ye(e, t) === "some";
1700
1700
  }, e.getIsAllSubRowsSelected = () => {
1701
1701
  const {
1702
1702
  rowSelection: t
1703
1703
  } = o.getState();
1704
- return Re(e, t) === "all";
1704
+ return ye(e, t) === "all";
1705
1705
  }, e.getCanSelect = () => {
1706
1706
  var t;
1707
1707
  return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
@@ -1719,20 +1719,20 @@ const rn = {
1719
1719
  };
1720
1720
  };
1721
1721
  }
1722
- }, Se = (e, o, t, n, r) => {
1722
+ }, Re = (e, o, t, n, r) => {
1723
1723
  var l;
1724
1724
  const i = r.getRow(o, !0);
1725
- t ? (i.getCanMultiSelect() || Object.keys(e).forEach((a) => delete e[a]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((a) => Se(e, a.id, t, n, r));
1725
+ t ? (i.getCanMultiSelect() || Object.keys(e).forEach((s) => delete e[s]), i.getCanSelect() && (e[o] = !0)) : delete e[o], n && (l = i.subRows) != null && l.length && i.getCanSelectSubRows() && i.subRows.forEach((s) => Re(e, s.id, t, n, r));
1726
1726
  };
1727
- function pe(e, o) {
1728
- const t = e.getState().rowSelection, n = [], r = {}, l = function(i, a) {
1727
+ function me(e, o) {
1728
+ const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
1729
1729
  return i.map((u) => {
1730
1730
  var f;
1731
- const c = Ie(u, t);
1732
- if (c && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
1731
+ const p = Ve(u, t);
1732
+ if (p && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
1733
1733
  ...u,
1734
1734
  subRows: l(u.subRows)
1735
- }), c)
1735
+ }), p)
1736
1736
  return u;
1737
1737
  }).filter(Boolean);
1738
1738
  };
@@ -1742,35 +1742,35 @@ function pe(e, o) {
1742
1742
  rowsById: r
1743
1743
  };
1744
1744
  }
1745
- function Ie(e, o) {
1745
+ function Ve(e, o) {
1746
1746
  var t;
1747
1747
  return (t = o[e.id]) != null ? t : !1;
1748
1748
  }
1749
- function Re(e, o, t) {
1749
+ function ye(e, o, t) {
1750
1750
  var n;
1751
1751
  if (!((n = e.subRows) != null && n.length)) return !1;
1752
1752
  let r = !0, l = !1;
1753
1753
  return e.subRows.forEach((i) => {
1754
- if (!(l && !r) && (i.getCanSelect() && (Ie(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1755
- const a = Re(i, o);
1756
- a === "all" ? l = !0 : (a === "some" && (l = !0), r = !1);
1754
+ if (!(l && !r) && (i.getCanSelect() && (Ve(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1755
+ const s = ye(i, o);
1756
+ s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
1757
1757
  }
1758
1758
  }), r ? "all" : l ? "some" : !1;
1759
1759
  }
1760
- const ye = /([0-9]+)/gm, dn = (e, o, t) => Ze(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), gn = (e, o, t) => Ze(B(e.getValue(t)), B(o.getValue(t))), cn = (e, o, t) => Ve(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), pn = (e, o, t) => Ve(B(e.getValue(t)), B(o.getValue(t))), mn = (e, o, t) => {
1760
+ const xe = /([0-9]+)/gm, mn = (e, o, t) => et(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), hn = (e, o, t) => et(B(e.getValue(t)), B(o.getValue(t))), vn = (e, o, t) => Ne(B(e.getValue(t)).toLowerCase(), B(o.getValue(t)).toLowerCase()), wn = (e, o, t) => Ne(B(e.getValue(t)), B(o.getValue(t))), Cn = (e, o, t) => {
1761
1761
  const n = e.getValue(t), r = o.getValue(t);
1762
1762
  return n > r ? 1 : n < r ? -1 : 0;
1763
- }, hn = (e, o, t) => Ve(e.getValue(t), o.getValue(t));
1764
- function Ve(e, o) {
1763
+ }, Sn = (e, o, t) => Ne(e.getValue(t), o.getValue(t));
1764
+ function Ne(e, o) {
1765
1765
  return e === o ? 0 : e > o ? 1 : -1;
1766
1766
  }
1767
1767
  function B(e) {
1768
1768
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1769
1769
  }
1770
- function Ze(e, o) {
1771
- const t = e.split(ye).filter(Boolean), n = o.split(ye).filter(Boolean);
1770
+ function et(e, o) {
1771
+ const t = e.split(xe).filter(Boolean), n = o.split(xe).filter(Boolean);
1772
1772
  for (; t.length && n.length; ) {
1773
- const r = t.shift(), l = n.shift(), i = parseInt(r, 10), a = parseInt(l, 10), u = [i, a].sort();
1773
+ const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
1774
1774
  if (isNaN(u[0])) {
1775
1775
  if (r > l)
1776
1776
  return 1;
@@ -1780,21 +1780,21 @@ function Ze(e, o) {
1780
1780
  }
1781
1781
  if (isNaN(u[1]))
1782
1782
  return isNaN(i) ? -1 : 1;
1783
- if (i > a)
1783
+ if (i > s)
1784
1784
  return 1;
1785
- if (a > i)
1785
+ if (s > i)
1786
1786
  return -1;
1787
1787
  }
1788
1788
  return t.length - n.length;
1789
1789
  }
1790
- const Y = {
1791
- alphanumeric: dn,
1792
- alphanumericCaseSensitive: gn,
1793
- text: cn,
1794
- textCaseSensitive: pn,
1795
- datetime: mn,
1796
- basic: hn
1797
- }, vn = {
1790
+ const J = {
1791
+ alphanumeric: mn,
1792
+ alphanumericCaseSensitive: hn,
1793
+ text: vn,
1794
+ textCaseSensitive: wn,
1795
+ datetime: Cn,
1796
+ basic: Sn
1797
+ }, Rn = {
1798
1798
  getInitialState: (e) => ({
1799
1799
  sorting: [],
1800
1800
  ...e
@@ -1814,11 +1814,11 @@ const Y = {
1814
1814
  for (const r of t) {
1815
1815
  const l = r == null ? void 0 : r.getValue(e.id);
1816
1816
  if (Object.prototype.toString.call(l) === "[object Date]")
1817
- return Y.datetime;
1818
- if (typeof l == "string" && (n = !0, l.split(ye).length > 1))
1819
- return Y.alphanumeric;
1817
+ return J.datetime;
1818
+ if (typeof l == "string" && (n = !0, l.split(xe).length > 1))
1819
+ return J.alphanumeric;
1820
1820
  }
1821
- return n ? Y.text : Y.basic;
1821
+ return n ? J.text : J.basic;
1822
1822
  }, e.getAutoSortDir = () => {
1823
1823
  const t = o.getFilteredRowModel().flatRows[0];
1824
1824
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
@@ -1826,24 +1826,24 @@ const Y = {
1826
1826
  var t, n;
1827
1827
  if (!e)
1828
1828
  throw new Error();
1829
- return oe(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 : Y[e.columnDef.sortingFn];
1829
+ return le(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 : J[e.columnDef.sortingFn];
1830
1830
  }, e.toggleSorting = (t, n) => {
1831
1831
  const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
1832
1832
  o.setSorting((i) => {
1833
- const a = i == null ? void 0 : i.find((s) => s.id === e.id), u = i == null ? void 0 : i.findIndex((s) => s.id === e.id);
1834
- let f = [], c, p = l ? t : r === "desc";
1835
- if (i != null && i.length && e.getCanMultiSort() && n ? a ? c = "toggle" : c = "add" : i != null && i.length && u !== i.length - 1 ? c = "replace" : a ? c = "toggle" : c = "replace", c === "toggle" && (l || r || (c = "remove")), c === "add") {
1833
+ const s = i == null ? void 0 : i.find((a) => a.id === e.id), u = i == null ? void 0 : i.findIndex((a) => a.id === e.id);
1834
+ let f = [], p, c = l ? t : r === "desc";
1835
+ if (i != null && i.length && e.getCanMultiSort() && n ? s ? p = "toggle" : p = "add" : i != null && i.length && u !== i.length - 1 ? p = "replace" : s ? p = "toggle" : p = "replace", p === "toggle" && (l || r || (p = "remove")), p === "add") {
1836
1836
  var d;
1837
1837
  f = [...i, {
1838
1838
  id: e.id,
1839
- desc: p
1839
+ desc: c
1840
1840
  }], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
1841
- } else c === "toggle" ? f = i.map((s) => s.id === e.id ? {
1842
- ...s,
1843
- desc: p
1844
- } : s) : c === "remove" ? f = i.filter((s) => s.id !== e.id) : f = [{
1841
+ } else p === "toggle" ? f = i.map((a) => a.id === e.id ? {
1842
+ ...a,
1843
+ desc: c
1844
+ } : a) : p === "remove" ? f = i.filter((a) => a.id !== e.id) : f = [{
1845
1845
  id: e.id,
1846
- desc: p
1846
+ desc: c
1847
1847
  }];
1848
1848
  return f;
1849
1849
  });
@@ -1883,34 +1883,34 @@ const Y = {
1883
1883
  e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1884
1884
  }, 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());
1885
1885
  }
1886
- }, wn = [
1887
- At,
1886
+ }, yn = [
1887
+ Bt,
1888
+ an,
1889
+ nn,
1888
1890
  on,
1889
- Jt,
1890
- Zt,
1891
- Gt,
1892
- Ot,
1893
- rn,
1891
+ Tt,
1892
+ qt,
1893
+ un,
1894
1894
  //depends on ColumnFaceting
1895
- ln,
1895
+ fn,
1896
1896
  //depends on ColumnFiltering
1897
- vn,
1898
- Qt,
1897
+ Rn,
1898
+ en,
1899
1899
  //depends on RowSorting
1900
- sn,
1901
- an,
1902
- un,
1903
- fn,
1904
- tn
1900
+ dn,
1901
+ gn,
1902
+ cn,
1903
+ pn,
1904
+ ln
1905
1905
  ];
1906
- function Cn(e) {
1906
+ function xn(e) {
1907
1907
  var o, t;
1908
1908
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1909
- const n = [...wn, ...(o = e._features) != null ? o : []];
1909
+ const n = [...yn, ...(o = e._features) != null ? o : []];
1910
1910
  let r = {
1911
1911
  _features: n
1912
1912
  };
1913
- const l = r._features.reduce((d, s) => Object.assign(d, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
1913
+ const l = r._features.reduce((d, a) => Object.assign(d, a.getDefaultOptions == null ? void 0 : a.getDefaultOptions(r)), {}), i = (d) => r.options.mergeOptions ? r.options.mergeOptions(l, d) : {
1914
1914
  ...l,
1915
1915
  ...d
1916
1916
  };
@@ -1919,12 +1919,12 @@ function Cn(e) {
1919
1919
  ...(t = e.initialState) != null ? t : {}
1920
1920
  };
1921
1921
  r._features.forEach((d) => {
1922
- var s;
1923
- u = (s = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? s : u;
1922
+ var a;
1923
+ u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
1924
1924
  });
1925
1925
  const f = [];
1926
- let c = !1;
1927
- const p = {
1926
+ let p = !1;
1927
+ const c = {
1928
1928
  _features: n,
1929
1929
  options: {
1930
1930
  ...l,
@@ -1932,43 +1932,43 @@ function Cn(e) {
1932
1932
  },
1933
1933
  initialState: u,
1934
1934
  _queue: (d) => {
1935
- f.push(d), c || (c = !0, Promise.resolve().then(() => {
1935
+ f.push(d), p || (p = !0, Promise.resolve().then(() => {
1936
1936
  for (; f.length; )
1937
1937
  f.shift()();
1938
- c = !1;
1939
- }).catch((s) => setTimeout(() => {
1940
- throw s;
1938
+ p = !1;
1939
+ }).catch((a) => setTimeout(() => {
1940
+ throw a;
1941
1941
  })));
1942
1942
  },
1943
1943
  reset: () => {
1944
1944
  r.setState(r.initialState);
1945
1945
  },
1946
1946
  setOptions: (d) => {
1947
- const s = O(d, r.options);
1948
- r.options = i(s);
1947
+ const a = O(d, r.options);
1948
+ r.options = i(a);
1949
1949
  },
1950
1950
  getState: () => r.options.state,
1951
1951
  setState: (d) => {
1952
1952
  r.options.onStateChange == null || r.options.onStateChange(d);
1953
1953
  },
1954
- _getRowId: (d, s, m) => {
1954
+ _getRowId: (d, a, m) => {
1955
1955
  var h;
1956
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s, m)) != null ? h : `${m ? [m.id, s].join(".") : s}`;
1956
+ return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(d, a, m)) != null ? h : `${m ? [m.id, a].join(".") : a}`;
1957
1957
  },
1958
1958
  getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1959
1959
  // The final calls start at the bottom of the model,
1960
1960
  // expanded rows, which then work their way up
1961
1961
  getRowModel: () => r.getPaginationRowModel(),
1962
1962
  //in next version, we should just pass in the row model as the optional 2nd arg
1963
- getRow: (d, s) => {
1964
- let m = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
1963
+ getRow: (d, a) => {
1964
+ let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
1965
1965
  if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
1966
1966
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
1967
1967
  return m;
1968
1968
  },
1969
1969
  _getDefaultColumnDef: C(() => [r.options.defaultColumn], (d) => {
1970
- var s;
1971
- return d = (s = d) != null ? s : {}, {
1970
+ var a;
1971
+ return d = (a = d) != null ? a : {}, {
1972
1972
  header: (m) => {
1973
1973
  const h = m.header.column.columnDef;
1974
1974
  return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
@@ -1984,33 +1984,33 @@ function Cn(e) {
1984
1984
  }, S(e, "debugColumns", "_getDefaultColumnDef")),
1985
1985
  _getColumnDefs: () => r.options.columns,
1986
1986
  getAllColumns: C(() => [r._getColumnDefs()], (d) => {
1987
- const s = function(m, h, w) {
1987
+ const a = function(m, h, w) {
1988
1988
  return w === void 0 && (w = 0), m.map((R) => {
1989
- const x = zt(r, R, w, h), F = R;
1990
- return x.columns = F.columns ? s(F.columns, x, w + 1) : [], x;
1989
+ const x = bt(r, R, w, h), $ = R;
1990
+ return x.columns = $.columns ? a($.columns, x, w + 1) : [], x;
1991
1991
  });
1992
1992
  };
1993
- return s(d);
1993
+ return a(d);
1994
1994
  }, S(e, "debugColumns", "getAllColumns")),
1995
- getAllFlatColumns: C(() => [r.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
1996
- _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((s, m) => (s[m.id] = m, s), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
1997
- getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, s) => {
1995
+ getAllFlatColumns: C(() => [r.getAllColumns()], (d) => d.flatMap((a) => a.getFlatColumns()), S(e, "debugColumns", "getAllFlatColumns")),
1996
+ _getAllFlatColumnsById: C(() => [r.getAllFlatColumns()], (d) => d.reduce((a, m) => (a[m.id] = m, a), {}), S(e, "debugColumns", "getAllFlatColumnsById")),
1997
+ getAllLeafColumns: C(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, a) => {
1998
1998
  let m = d.flatMap((h) => h.getLeafColumns());
1999
- return s(m);
1999
+ return a(m);
2000
2000
  }, S(e, "debugColumns", "getAllLeafColumns")),
2001
2001
  getColumn: (d) => {
2002
- const s = r._getAllFlatColumnsById()[d];
2003
- return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
2002
+ const a = r._getAllFlatColumnsById()[d];
2003
+ return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${d}' does not exist.`), a;
2004
2004
  }
2005
2005
  };
2006
- Object.assign(r, p);
2006
+ Object.assign(r, c);
2007
2007
  for (let d = 0; d < r._features.length; d++) {
2008
- const s = r._features[d];
2009
- s == null || s.createTable == null || s.createTable(r);
2008
+ const a = r._features[d];
2009
+ a == null || a.createTable == null || a.createTable(r);
2010
2010
  }
2011
2011
  return r;
2012
2012
  }
2013
- function Sn() {
2013
+ function _n() {
2014
2014
  return (e) => C(() => [e.options.data], (o) => {
2015
2015
  const t = {
2016
2016
  rows: [],
@@ -2018,20 +2018,20 @@ function Sn() {
2018
2018
  rowsById: {}
2019
2019
  }, n = function(r, l, i) {
2020
2020
  l === void 0 && (l = 0);
2021
- const a = [];
2021
+ const s = [];
2022
2022
  for (let f = 0; f < r.length; f++) {
2023
- const c = $e(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2024
- if (t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows) {
2023
+ const p = Me(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2024
+ if (t.flatRows.push(p), t.rowsById[p.id] = p, s.push(p), e.options.getSubRows) {
2025
2025
  var u;
2026
- c.originalSubRows = e.options.getSubRows(r[f], f), (u = c.originalSubRows) != null && u.length && (c.subRows = n(c.originalSubRows, l + 1, c));
2026
+ p.originalSubRows = e.options.getSubRows(r[f], f), (u = p.originalSubRows) != null && u.length && (p.subRows = n(p.originalSubRows, l + 1, p));
2027
2027
  }
2028
2028
  }
2029
- return a;
2029
+ return s;
2030
2030
  };
2031
2031
  return t.rows = n(o), t;
2032
2032
  }, S(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
2033
2033
  }
2034
- function Rn(e) {
2034
+ function Fn(e) {
2035
2035
  const o = [], t = (n) => {
2036
2036
  var r;
2037
2037
  o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
@@ -2042,63 +2042,63 @@ function Rn(e) {
2042
2042
  rowsById: e.rowsById
2043
2043
  };
2044
2044
  }
2045
- function yn(e, o, t) {
2046
- return t.options.filterFromLeafRows ? xn(e, o, t) : _n(e, o, t);
2045
+ function $n(e, o, t) {
2046
+ return t.options.filterFromLeafRows ? Mn(e, o, t) : In(e, o, t);
2047
2047
  }
2048
- function xn(e, o, t) {
2048
+ function Mn(e, o, t) {
2049
2049
  var n;
2050
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2050
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2051
2051
  f === void 0 && (f = 0);
2052
- const c = [];
2052
+ const p = [];
2053
2053
  for (let d = 0; d < u.length; d++) {
2054
- var p;
2055
- let s = u[d];
2056
- const m = $e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2057
- if (m.columnFilters = s.columnFilters, (p = s.subRows) != null && p.length && f < i) {
2058
- if (m.subRows = a(s.subRows, f + 1), s = m, o(s) && !m.subRows.length) {
2059
- c.push(s), l[s.id] = s, r.push(s);
2054
+ var c;
2055
+ let a = u[d];
2056
+ const m = Me(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2057
+ if (m.columnFilters = a.columnFilters, (c = a.subRows) != null && c.length && f < i) {
2058
+ if (m.subRows = s(a.subRows, f + 1), a = m, o(a) && !m.subRows.length) {
2059
+ p.push(a), l[a.id] = a, r.push(a);
2060
2060
  continue;
2061
2061
  }
2062
- if (o(s) || m.subRows.length) {
2063
- c.push(s), l[s.id] = s, r.push(s);
2062
+ if (o(a) || m.subRows.length) {
2063
+ p.push(a), l[a.id] = a, r.push(a);
2064
2064
  continue;
2065
2065
  }
2066
2066
  } else
2067
- s = m, o(s) && (c.push(s), l[s.id] = s, r.push(s));
2067
+ a = m, o(a) && (p.push(a), l[a.id] = a, r.push(a));
2068
2068
  }
2069
- return c;
2069
+ return p;
2070
2070
  };
2071
2071
  return {
2072
- rows: a(e),
2072
+ rows: s(e),
2073
2073
  flatRows: r,
2074
2074
  rowsById: l
2075
2075
  };
2076
2076
  }
2077
- function _n(e, o, t) {
2077
+ function In(e, o, t) {
2078
2078
  var n;
2079
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2079
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2080
2080
  f === void 0 && (f = 0);
2081
- const c = [];
2081
+ const p = [];
2082
2082
  for (let d = 0; d < u.length; d++) {
2083
- let s = u[d];
2084
- if (o(s)) {
2085
- var p;
2086
- if ((p = s.subRows) != null && p.length && f < i) {
2087
- const h = $e(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2088
- h.subRows = a(s.subRows, f + 1), s = h;
2083
+ let a = u[d];
2084
+ if (o(a)) {
2085
+ var c;
2086
+ if ((c = a.subRows) != null && c.length && f < i) {
2087
+ const h = Me(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2088
+ h.subRows = s(a.subRows, f + 1), a = h;
2089
2089
  }
2090
- c.push(s), r.push(s), l[s.id] = s;
2090
+ p.push(a), r.push(a), l[a.id] = a;
2091
2091
  }
2092
2092
  }
2093
- return c;
2093
+ return p;
2094
2094
  };
2095
2095
  return {
2096
- rows: a(e),
2096
+ rows: s(e),
2097
2097
  flatRows: r,
2098
2098
  rowsById: l
2099
2099
  };
2100
2100
  }
2101
- function Fn() {
2101
+ function Vn() {
2102
2102
  return (e) => C(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2103
2103
  if (!o.rows.length || !(t != null && t.length) && !n) {
2104
2104
  for (let d = 0; d < o.flatRows.length; d++)
@@ -2107,7 +2107,7 @@ function Fn() {
2107
2107
  }
2108
2108
  const r = [], l = [];
2109
2109
  (t ?? []).forEach((d) => {
2110
- var s;
2110
+ var a;
2111
2111
  const m = e.getColumn(d.id);
2112
2112
  if (!m)
2113
2113
  return;
@@ -2119,53 +2119,53 @@ function Fn() {
2119
2119
  r.push({
2120
2120
  id: d.id,
2121
2121
  filterFn: h,
2122
- resolvedValue: (s = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(d.value)) != null ? s : d.value
2122
+ resolvedValue: (a = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(d.value)) != null ? a : d.value
2123
2123
  });
2124
2124
  });
2125
- const i = (t ?? []).map((d) => d.id), a = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2126
- n && a && u.length && (i.push("__global__"), u.forEach((d) => {
2127
- var s;
2125
+ const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2126
+ n && s && u.length && (i.push("__global__"), u.forEach((d) => {
2127
+ var a;
2128
2128
  l.push({
2129
2129
  id: d.id,
2130
- filterFn: a,
2131
- resolvedValue: (s = a.resolveFilterValue == null ? void 0 : a.resolveFilterValue(n)) != null ? s : n
2130
+ filterFn: s,
2131
+ resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
2132
2132
  });
2133
2133
  }));
2134
- let f, c;
2134
+ let f, p;
2135
2135
  for (let d = 0; d < o.flatRows.length; d++) {
2136
- const s = o.flatRows[d];
2137
- if (s.columnFilters = {}, r.length)
2136
+ const a = o.flatRows[d];
2137
+ if (a.columnFilters = {}, r.length)
2138
2138
  for (let m = 0; m < r.length; m++) {
2139
2139
  f = r[m];
2140
2140
  const h = f.id;
2141
- s.columnFilters[h] = f.filterFn(s, h, f.resolvedValue, (w) => {
2142
- s.columnFiltersMeta[h] = w;
2141
+ a.columnFilters[h] = f.filterFn(a, h, f.resolvedValue, (w) => {
2142
+ a.columnFiltersMeta[h] = w;
2143
2143
  });
2144
2144
  }
2145
2145
  if (l.length) {
2146
2146
  for (let m = 0; m < l.length; m++) {
2147
- c = l[m];
2148
- const h = c.id;
2149
- if (c.filterFn(s, h, c.resolvedValue, (w) => {
2150
- s.columnFiltersMeta[h] = w;
2147
+ p = l[m];
2148
+ const h = p.id;
2149
+ if (p.filterFn(a, h, p.resolvedValue, (w) => {
2150
+ a.columnFiltersMeta[h] = w;
2151
2151
  })) {
2152
- s.columnFilters.__global__ = !0;
2152
+ a.columnFilters.__global__ = !0;
2153
2153
  break;
2154
2154
  }
2155
2155
  }
2156
- s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
2156
+ a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
2157
2157
  }
2158
2158
  }
2159
- const p = (d) => {
2160
- for (let s = 0; s < i.length; s++)
2161
- if (d.columnFilters[i[s]] === !1)
2159
+ const c = (d) => {
2160
+ for (let a = 0; a < i.length; a++)
2161
+ if (d.columnFilters[i[a]] === !1)
2162
2162
  return !1;
2163
2163
  return !0;
2164
2164
  };
2165
- return yn(o.rows, p, e);
2165
+ return $n(o.rows, c, e);
2166
2166
  }, S(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
2167
2167
  }
2168
- function $n(e) {
2168
+ function Nn(e) {
2169
2169
  return (o) => C(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2170
2170
  if (!n.rows.length)
2171
2171
  return n;
@@ -2175,28 +2175,28 @@ function $n(e) {
2175
2175
  } = t;
2176
2176
  let {
2177
2177
  rows: i,
2178
- flatRows: a,
2178
+ flatRows: s,
2179
2179
  rowsById: u
2180
2180
  } = n;
2181
- const f = r * l, c = f + r;
2182
- i = i.slice(f, c);
2183
- let p;
2184
- o.options.paginateExpandedRows ? p = {
2181
+ const f = r * l, p = f + r;
2182
+ i = i.slice(f, p);
2183
+ let c;
2184
+ o.options.paginateExpandedRows ? c = {
2185
2185
  rows: i,
2186
- flatRows: a,
2186
+ flatRows: s,
2187
2187
  rowsById: u
2188
- } : p = Rn({
2188
+ } : c = Fn({
2189
2189
  rows: i,
2190
- flatRows: a,
2190
+ flatRows: s,
2191
2191
  rowsById: u
2192
- }), p.flatRows = [];
2193
- const d = (s) => {
2194
- p.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
2192
+ }), c.flatRows = [];
2193
+ const d = (a) => {
2194
+ c.flatRows.push(a), a.subRows.length && a.subRows.forEach(d);
2195
2195
  };
2196
- return p.rows.forEach(d), p;
2196
+ return c.rows.forEach(d), c;
2197
2197
  }, S(o.options, "debugTable", "getPaginationRowModel"));
2198
2198
  }
2199
- function Mn() {
2199
+ function Pn() {
2200
2200
  return (e) => C(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2201
2201
  if (!t.rows.length || !(o != null && o.length))
2202
2202
  return t;
@@ -2212,34 +2212,34 @@ function Mn() {
2212
2212
  sortingFn: f.getSortingFn()
2213
2213
  });
2214
2214
  });
2215
- const a = (u) => {
2216
- const f = u.map((c) => ({
2217
- ...c
2215
+ const s = (u) => {
2216
+ const f = u.map((p) => ({
2217
+ ...p
2218
2218
  }));
2219
- return f.sort((c, p) => {
2220
- for (let s = 0; s < l.length; s += 1) {
2219
+ return f.sort((p, c) => {
2220
+ for (let a = 0; a < l.length; a += 1) {
2221
2221
  var d;
2222
- const m = l[s], h = i[m.id], w = h.sortUndefined, R = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2222
+ const m = l[a], h = i[m.id], w = h.sortUndefined, R = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2223
2223
  let x = 0;
2224
2224
  if (w) {
2225
- const F = c.getValue(m.id), E = p.getValue(m.id), M = F === void 0, N = E === void 0;
2226
- if (M || N) {
2227
- if (w === "first") return M ? -1 : 1;
2228
- if (w === "last") return M ? 1 : -1;
2229
- x = M && N ? 0 : M ? w : -w;
2225
+ const $ = p.getValue(m.id), D = c.getValue(m.id), N = $ === void 0, E = D === void 0;
2226
+ if (N || E) {
2227
+ if (w === "first") return N ? -1 : 1;
2228
+ if (w === "last") return N ? 1 : -1;
2229
+ x = N && E ? 0 : N ? w : -w;
2230
2230
  }
2231
2231
  }
2232
- if (x === 0 && (x = h.sortingFn(c, p, m.id)), x !== 0)
2232
+ if (x === 0 && (x = h.sortingFn(p, c, m.id)), x !== 0)
2233
2233
  return R && (x *= -1), h.invertSorting && (x *= -1), x;
2234
2234
  }
2235
- return c.index - p.index;
2236
- }), f.forEach((c) => {
2237
- var p;
2238
- r.push(c), (p = c.subRows) != null && p.length && (c.subRows = a(c.subRows));
2235
+ return p.index - c.index;
2236
+ }), f.forEach((p) => {
2237
+ var c;
2238
+ r.push(p), (c = p.subRows) != null && c.length && (p.subRows = s(p.subRows));
2239
2239
  }), f;
2240
2240
  };
2241
2241
  return {
2242
- rows: a(t.rows),
2242
+ rows: s(t.rows),
2243
2243
  flatRows: r,
2244
2244
  rowsById: t.rowsById
2245
2245
  };
@@ -2255,22 +2255,22 @@ function Mn() {
2255
2255
  *
2256
2256
  * @license MIT
2257
2257
  */
2258
- function be(e, o) {
2259
- return e ? In(e) ? /* @__PURE__ */ he.createElement(e, o) : e : null;
2258
+ function Be(e, o) {
2259
+ return e ? Dn(e) ? /* @__PURE__ */ ve.createElement(e, o) : e : null;
2260
2260
  }
2261
- function In(e) {
2262
- return Vn(e) || typeof e == "function" || Nn(e);
2261
+ function Dn(e) {
2262
+ return En(e) || typeof e == "function" || kn(e);
2263
2263
  }
2264
- function Vn(e) {
2264
+ function En(e) {
2265
2265
  return typeof e == "function" && (() => {
2266
2266
  const o = Object.getPrototypeOf(e);
2267
2267
  return o.prototype && o.prototype.isReactComponent;
2268
2268
  })();
2269
2269
  }
2270
- function Nn(e) {
2270
+ function kn(e) {
2271
2271
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
2272
2272
  }
2273
- function Pn(e) {
2273
+ function Ln(e) {
2274
2274
  const o = {
2275
2275
  state: {},
2276
2276
  // Dummy state
@@ -2279,9 +2279,9 @@ function Pn(e) {
2279
2279
  // noop
2280
2280
  renderFallbackValue: null,
2281
2281
  ...e
2282
- }, [t] = he.useState(() => ({
2283
- current: Cn(o)
2284
- })), [n, r] = he.useState(() => t.current.initialState);
2282
+ }, [t] = ve.useState(() => ({
2283
+ current: xn(o)
2284
+ })), [n, r] = ve.useState(() => t.current.initialState);
2285
2285
  return t.current.setOptions((l) => ({
2286
2286
  ...l,
2287
2287
  ...e,
@@ -2296,7 +2296,7 @@ function Pn(e) {
2296
2296
  }
2297
2297
  })), t.current;
2298
2298
  }
2299
- const Be = ({
2299
+ const Te = ({
2300
2300
  editable: e = !0,
2301
2301
  pageSize: o = 25,
2302
2302
  onCellEdit: t
@@ -2306,44 +2306,44 @@ const Be = ({
2306
2306
  schema: r,
2307
2307
  mappings: l,
2308
2308
  errorsByRow: i,
2309
- editingCell: a,
2309
+ editingCell: s,
2310
2310
  startEditing: u,
2311
2311
  stopEditing: f,
2312
- updateCell: c
2313
- } = X(), [p, d] = K([]), [s, m] = K(""), [h, w] = K(""), R = Ee(() => l.filter((y) => y.targetKey !== null).map((y) => {
2314
- const _ = r == null ? void 0 : r.columns.find((V) => V.key === y.targetKey);
2312
+ updateCell: p
2313
+ } = X(), [c, d] = K([]), [a, m] = K(""), [h, w] = K(""), R = ke(() => l.filter((y) => y.targetKey !== null).map((y) => {
2314
+ const _ = r == null ? void 0 : r.columns.find((M) => M.key === y.targetKey);
2315
2315
  return {
2316
2316
  sourceColumn: y.sourceColumn,
2317
2317
  targetKey: y.targetKey,
2318
2318
  label: (_ == null ? void 0 : _.label) || y.targetKey,
2319
2319
  type: (_ == null ? void 0 : _.type) || "string"
2320
2320
  };
2321
- }), [l, r]), x = xe(
2321
+ }), [l, r]), x = _e(
2322
2322
  (y, _) => {
2323
- const V = i.get(y);
2324
- return V == null ? void 0 : V.find((q) => q.columnKey === _);
2323
+ const M = i.get(y);
2324
+ return M == null ? void 0 : M.find((T) => T.columnKey === _);
2325
2325
  },
2326
2326
  [i]
2327
- ), F = (y, _, V) => {
2328
- w(V), u(y, _);
2329
- }, E = () => {
2330
- a && (c(a.rowIndex, a.columnKey, h), t == null || t(a.rowIndex, a.columnKey, h)), f();
2331
- }, M = () => {
2327
+ ), $ = (y, _, M) => {
2328
+ w(M), u(y, _);
2329
+ }, D = () => {
2330
+ s && (p(s.rowIndex, s.columnKey, h), t == null || t(s.rowIndex, s.columnKey, h)), f();
2331
+ }, N = () => {
2332
2332
  w(""), f();
2333
- }, N = Et(), T = Ee(
2333
+ }, E = zt(), q = ke(
2334
2334
  () => [
2335
- N.accessor("rowIndex", {
2335
+ E.accessor("rowIndex", {
2336
2336
  header: "#",
2337
2337
  size: 60,
2338
2338
  cell: (y) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: y.getValue() + 1 })
2339
2339
  }),
2340
2340
  ...R.map(
2341
- (y) => N.accessor((_) => _.data[y.targetKey] || _.data[y.sourceColumn], {
2341
+ (y) => E.accessor((_) => _.data[y.targetKey] || _.data[y.sourceColumn], {
2342
2342
  id: y.targetKey,
2343
2343
  header: y.label,
2344
2344
  cell: (_) => {
2345
- const V = _.row.original.rowIndex, q = String(_.getValue() ?? ""), k = x(V, y.targetKey);
2346
- return (a == null ? void 0 : a.rowIndex) === V && (a == null ? void 0 : a.columnKey) === y.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2345
+ const M = _.row.original.rowIndex, T = String(_.getValue() ?? ""), k = x(M, y.targetKey);
2346
+ return (s == null ? void 0 : s.rowIndex) === M && (s == null ? void 0 : s.columnKey) === y.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2347
2347
  /* @__PURE__ */ g(
2348
2348
  "input",
2349
2349
  {
@@ -2351,7 +2351,7 @@ const Be = ({
2351
2351
  value: h,
2352
2352
  onChange: (j) => w(j.target.value),
2353
2353
  onKeyDown: (j) => {
2354
- j.key === "Enter" && E(), j.key === "Escape" && M();
2354
+ j.key === "Enter" && D(), j.key === "Escape" && N();
2355
2355
  },
2356
2356
  className: "ff-input ff-py-1 ff-text-sm",
2357
2357
  autoFocus: !0
@@ -2360,7 +2360,7 @@ const Be = ({
2360
2360
  /* @__PURE__ */ g(
2361
2361
  "button",
2362
2362
  {
2363
- onClick: E,
2363
+ onClick: D,
2364
2364
  className: "ff-btn ff-btn-primary ff-btn-sm",
2365
2365
  children: "Save"
2366
2366
  }
@@ -2368,7 +2368,7 @@ const Be = ({
2368
2368
  /* @__PURE__ */ g(
2369
2369
  "button",
2370
2370
  {
2371
- onClick: M,
2371
+ onClick: N,
2372
2372
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2373
2373
  children: "Cancel"
2374
2374
  }
@@ -2382,9 +2382,9 @@ const Be = ({
2382
2382
  (k == null ? void 0 : k.severity) === "warning" && "ff-cell-warning"
2383
2383
  ),
2384
2384
  children: [
2385
- /* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: q || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2385
+ /* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: T || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2386
2386
  k && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
2387
- k.severity === "error" ? /* @__PURE__ */ g(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(ve, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2387
+ k.severity === "error" ? /* @__PURE__ */ g(Fe, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(we, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2388
2388
  /* @__PURE__ */ v("div", { className: "ff-tooltip ff-bottom-full ff-left-1/2 ff-transform ff--translate-x-1/2 ff-mb-2 ff-w-48 group-hover/tooltip:ff-tooltip-visible", children: [
2389
2389
  k.message,
2390
2390
  k.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: k.suggestion })
@@ -2393,9 +2393,9 @@ const Be = ({
2393
2393
  e && !k && /* @__PURE__ */ g(
2394
2394
  "button",
2395
2395
  {
2396
- onClick: () => F(V, y.targetKey, q),
2396
+ onClick: () => $(M, y.targetKey, T),
2397
2397
  className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
2398
- children: /* @__PURE__ */ g(It, { className: "ff-w-3 ff-h-3" })
2398
+ children: /* @__PURE__ */ g(Dt, { className: "ff-w-3 ff-h-3" })
2399
2399
  }
2400
2400
  )
2401
2401
  ]
@@ -2405,20 +2405,20 @@ const Be = ({
2405
2405
  })
2406
2406
  )
2407
2407
  ],
2408
- [R, a, h, e, x, N]
2409
- ), P = Pn({
2408
+ [R, s, h, e, x, E]
2409
+ ), V = Ln({
2410
2410
  data: n,
2411
- columns: T,
2411
+ columns: q,
2412
2412
  state: {
2413
- sorting: p,
2414
- globalFilter: s
2413
+ sorting: c,
2414
+ globalFilter: a
2415
2415
  },
2416
2416
  onSortingChange: d,
2417
2417
  onGlobalFilterChange: m,
2418
- getCoreRowModel: Sn(),
2419
- getPaginationRowModel: $n(),
2420
- getSortedRowModel: Mn(),
2421
- getFilteredRowModel: Fn(),
2418
+ getCoreRowModel: _n(),
2419
+ getPaginationRowModel: Nn(),
2420
+ getSortedRowModel: Pn(),
2421
+ getFilteredRowModel: Vn(),
2422
2422
  initialState: {
2423
2423
  pagination: {
2424
2424
  pageSize: o
@@ -2431,19 +2431,19 @@ const Be = ({
2431
2431
  "input",
2432
2432
  {
2433
2433
  type: "text",
2434
- value: s,
2434
+ value: a,
2435
2435
  onChange: (y) => m(y.target.value),
2436
2436
  placeholder: "Search all columns...",
2437
2437
  className: "ff-input ff-max-w-xs"
2438
2438
  }
2439
2439
  ),
2440
2440
  /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2441
- P.getFilteredRowModel().rows.length,
2441
+ V.getFilteredRowModel().rows.length,
2442
2442
  " rows"
2443
2443
  ] })
2444
2444
  ] }),
2445
2445
  /* @__PURE__ */ g("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ v("table", { className: "ff-table", children: [
2446
- /* @__PURE__ */ g("thead", { children: P.getHeaderGroups().map((y) => /* @__PURE__ */ g("tr", { children: y.headers.map((_) => /* @__PURE__ */ g(
2446
+ /* @__PURE__ */ g("thead", { children: V.getHeaderGroups().map((y) => /* @__PURE__ */ g("tr", { children: y.headers.map((_) => /* @__PURE__ */ g(
2447
2447
  "th",
2448
2448
  {
2449
2449
  style: { width: _.getSize() },
@@ -2452,19 +2452,19 @@ const Be = ({
2452
2452
  _.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2453
2453
  ),
2454
2454
  children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2455
- be(_.column.columnDef.header, _.getContext()),
2455
+ Be(_.column.columnDef.header, _.getContext()),
2456
2456
  _.column.getIsSorted() && /* @__PURE__ */ g("span", { children: _.column.getIsSorted() === "asc" ? "↑" : "↓" })
2457
2457
  ] })
2458
2458
  },
2459
2459
  _.id
2460
2460
  )) }, y.id)) }),
2461
- /* @__PURE__ */ g("tbody", { children: P.getRowModel().rows.map((y) => {
2461
+ /* @__PURE__ */ g("tbody", { children: V.getRowModel().rows.map((y) => {
2462
2462
  const _ = i.has(y.original.rowIndex);
2463
2463
  return /* @__PURE__ */ g(
2464
2464
  "tr",
2465
2465
  {
2466
2466
  className: b(_ && "ff-row-error"),
2467
- children: y.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: be(V.column.columnDef.cell, V.getContext()) }, V.id))
2467
+ children: y.getVisibleCells().map((M) => /* @__PURE__ */ g("td", { children: Be(M.column.columnDef.cell, M.getContext()) }, M.id))
2468
2468
  },
2469
2469
  y.id
2470
2470
  );
@@ -2473,19 +2473,19 @@ const Be = ({
2473
2473
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2474
2474
  /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2475
2475
  "Page ",
2476
- P.getState().pagination.pageIndex + 1,
2476
+ V.getState().pagination.pageIndex + 1,
2477
2477
  " of ",
2478
- P.getPageCount()
2478
+ V.getPageCount()
2479
2479
  ] }),
2480
2480
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2481
2481
  /* @__PURE__ */ v(
2482
2482
  "button",
2483
2483
  {
2484
- onClick: () => P.previousPage(),
2485
- disabled: !P.getCanPreviousPage(),
2484
+ onClick: () => V.previousPage(),
2485
+ disabled: !V.getCanPreviousPage(),
2486
2486
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2487
2487
  children: [
2488
- /* @__PURE__ */ g(ht, { className: "ff-w-4 ff-h-4" }),
2488
+ /* @__PURE__ */ g(St, { className: "ff-w-4 ff-h-4" }),
2489
2489
  "Previous"
2490
2490
  ]
2491
2491
  }
@@ -2493,25 +2493,25 @@ const Be = ({
2493
2493
  /* @__PURE__ */ v(
2494
2494
  "button",
2495
2495
  {
2496
- onClick: () => P.nextPage(),
2497
- disabled: !P.getCanNextPage(),
2496
+ onClick: () => V.nextPage(),
2497
+ disabled: !V.getCanNextPage(),
2498
2498
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2499
2499
  children: [
2500
2500
  "Next",
2501
- /* @__PURE__ */ g(at, { className: "ff-w-4 ff-h-4" })
2501
+ /* @__PURE__ */ g(gt, { className: "ff-w-4 ff-h-4" })
2502
2502
  ]
2503
2503
  }
2504
2504
  )
2505
2505
  ] })
2506
2506
  ] })
2507
2507
  ] });
2508
- }, Te = ({
2508
+ }, qe = ({
2509
2509
  showDetails: e = !0
2510
2510
  }) => {
2511
2511
  const { validationResults: o } = X();
2512
2512
  if (!o)
2513
2513
  return null;
2514
- const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: a, summary: u } = o, f = Math.round(r / n * 100);
2514
+ const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, f = Math.round(r / n * 100);
2515
2515
  return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2516
2516
  /* @__PURE__ */ v(
2517
2517
  "div",
@@ -2522,7 +2522,7 @@ const Be = ({
2522
2522
  borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
2523
2523
  },
2524
2524
  children: [
2525
- t ? /* @__PURE__ */ g(Fe, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Le, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2525
+ t ? /* @__PURE__ */ g($e, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(He, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2526
2526
  /* @__PURE__ */ v("div", { children: [
2527
2527
  /* @__PURE__ */ g(
2528
2528
  "h3",
@@ -2564,43 +2564,43 @@ const Be = ({
2564
2564
  ] }),
2565
2565
  e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2566
2566
  /* @__PURE__ */ g("div", { className: "ff-px-4 ff-py-3 ff-border-b", style: { backgroundColor: "var(--ff-bg-secondary)", borderColor: "var(--ff-border-light)" }, children: /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2567
- /* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([, c]) => c.errorCount > 0 || c.warningCount > 0).map(([c, p]) => /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3", children: [
2567
+ /* @__PURE__ */ g("div", { className: "ff-divide-y", style: { borderColor: "var(--ff-border-light)" }, children: Object.entries(u.byColumn).filter(([, p]) => p.errorCount > 0 || p.warningCount > 0).map(([p, c]) => /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3", children: [
2568
2568
  /* @__PURE__ */ v("div", { children: [
2569
- /* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children: p.columnKey }),
2570
- p.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: p.mostCommonError })
2569
+ /* @__PURE__ */ g("p", { className: "ff-font-medium", style: { color: "var(--ff-text-primary)" }, children: c.columnKey }),
2570
+ c.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: c.mostCommonError })
2571
2571
  ] }),
2572
2572
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2573
- p.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error", children: [
2574
- /* @__PURE__ */ g(Le, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2575
- p.errorCount,
2573
+ c.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error", children: [
2574
+ /* @__PURE__ */ g(He, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2575
+ c.errorCount,
2576
2576
  " errors"
2577
2577
  ] }),
2578
- p.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning", children: [
2579
- /* @__PURE__ */ g(ve, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2580
- p.warningCount,
2578
+ c.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning", children: [
2579
+ /* @__PURE__ */ g(we, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2580
+ c.warningCount,
2581
2581
  " warnings"
2582
2582
  ] })
2583
2583
  ] })
2584
- ] }, c)) })
2584
+ ] }, p)) })
2585
2585
  ] }),
2586
2586
  e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ g("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
2587
- /* @__PURE__ */ g(ve, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2587
+ /* @__PURE__ */ g(we, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2588
2588
  /* @__PURE__ */ v("div", { children: [
2589
2589
  /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2590
2590
  /* @__PURE__ */ v("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2591
- u.duplicates.slice(0, 5).map((c, p) => /* @__PURE__ */ v("li", { children: [
2592
- /* @__PURE__ */ g("span", { className: "ff-font-mono", children: c.columnKey }),
2591
+ u.duplicates.slice(0, 5).map((p, c) => /* @__PURE__ */ v("li", { children: [
2592
+ /* @__PURE__ */ g("span", { className: "ff-font-mono", children: p.columnKey }),
2593
2593
  ': "',
2594
- String(c.value),
2594
+ String(p.value),
2595
2595
  '" appears',
2596
2596
  " ",
2597
- c.rowIndices.length,
2597
+ p.rowIndices.length,
2598
2598
  " times (rows",
2599
2599
  " ",
2600
- c.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2601
- c.rowIndices.length > 3 ? "..." : "",
2600
+ p.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2601
+ p.rowIndices.length > 3 ? "..." : "",
2602
2602
  ")"
2603
- ] }, p)),
2603
+ ] }, c)),
2604
2604
  u.duplicates.length > 5 && /* @__PURE__ */ v("li", { style: { color: "var(--ff-warning)" }, children: [
2605
2605
  "... and ",
2606
2606
  u.duplicates.length - 5,
@@ -2610,220 +2610,222 @@ const Be = ({
2610
2610
  ] })
2611
2611
  ] }) })
2612
2612
  ] });
2613
- }, me = ["upload", "mapping", "validation", "complete"], Dn = [
2614
- { key: "upload", label: "Upload", icon: qe },
2615
- { key: "mapping", label: "Map Columns", icon: $t },
2616
- { key: "validation", label: "Validate", icon: Nt },
2617
- { key: "review", label: "Review", icon: St },
2618
- { key: "complete", label: "Complete", icon: Fe }
2619
- ], Hn = ({
2613
+ }, he = ["upload", "mapping", "validation", "complete"], Hn = [
2614
+ { key: "upload", label: "Upload", icon: je },
2615
+ { key: "mapping", label: "Map Columns", icon: Nt },
2616
+ { key: "validation", label: "Validate", icon: kt },
2617
+ { key: "review", label: "Review", icon: _t },
2618
+ { key: "complete", label: "Complete", icon: $e }
2619
+ ], bn = ({
2620
2620
  template: e,
2621
2621
  schema: o,
2622
- onComplete: t,
2623
- onCancel: n,
2624
- onError: r
2622
+ mode: t = "modal",
2623
+ theme: n,
2624
+ useShadowDom: r = !1,
2625
+ onComplete: l,
2626
+ onCancel: i,
2627
+ onError: s
2625
2628
  }) => {
2626
2629
  const {
2627
- step: l,
2628
- sessionId: i,
2629
- file: a,
2630
- mappings: u,
2631
- validationResults: f,
2632
- isLoading: c,
2633
- error: p,
2634
- setSchema: d,
2635
- setSessionId: s,
2636
- setParsedData: m,
2637
- setMappings: h,
2638
- setUnmapped: w,
2639
- setValidationResults: R,
2640
- setStep: x,
2641
- nextStep: F,
2642
- previousStep: E,
2643
- setLoading: M,
2644
- setError: N,
2645
- reset: T
2646
- } = X(), [P, y] = K(null), [_, V] = K(null);
2647
- ke(() => {
2648
- if (V(null), e)
2649
- if (ut(e)) {
2650
- const $ = ft(e);
2651
- $ ? y($) : (V(`Failed to load template "${e}"`), r == null || r(new Error(`Failed to load template "${e}"`)));
2630
+ step: u,
2631
+ sessionId: f,
2632
+ file: p,
2633
+ mappings: c,
2634
+ validationResults: d,
2635
+ isLoading: a,
2636
+ error: m,
2637
+ setSchema: h,
2638
+ setSessionId: w,
2639
+ setParsedData: R,
2640
+ setMappings: x,
2641
+ setUnmapped: $,
2642
+ setValidationResults: D,
2643
+ setStep: N,
2644
+ nextStep: E,
2645
+ previousStep: q,
2646
+ setLoading: V,
2647
+ setError: y,
2648
+ reset: _
2649
+ } = X(), [M, T] = K(null), [k, W] = K(null);
2650
+ Le(() => {
2651
+ if (W(null), e)
2652
+ if (ct(e)) {
2653
+ const F = pt(e);
2654
+ F ? T(F) : (W(`Failed to load template "${e}"`), s == null || s(new Error(`Failed to load template "${e}"`)));
2652
2655
  } else {
2653
- const $ = `Template "${e}" not found. Available templates: ${He.join(", ")}`;
2654
- V($), r == null || r(new Error($));
2656
+ const F = `Template "${e}" not found. Available templates: ${ze.join(", ")}`;
2657
+ W(F), s == null || s(new Error(F));
2655
2658
  }
2656
2659
  else if (o)
2657
- y(o);
2660
+ T(o);
2658
2661
  else {
2659
- const $ = `No template or schema provided. Please specify a template (${He.join(", ")}) or provide a custom schema.`;
2660
- V($), r == null || r(new Error($));
2662
+ const F = `No template or schema provided. Please specify a template (${ze.join(", ")}) or provide a custom schema.`;
2663
+ W(F), s == null || s(new Error(F));
2661
2664
  }
2662
- }, [e, o, r]), ke(() => {
2663
- P && (d(P), q(P));
2664
- }, [P]);
2665
- const q = async ($) => {
2665
+ }, [e, o, s]), Le(() => {
2666
+ M && (h(M), j(M));
2667
+ }, [M]);
2668
+ const j = async (F) => {
2666
2669
  try {
2667
- M(!0);
2668
- const z = await Q().createImportSession($);
2669
- s(z.sessionId);
2670
+ V(!0);
2671
+ const z = await Y().createImportSession(F);
2672
+ w(z.sessionId);
2670
2673
  } catch (I) {
2671
2674
  const z = I;
2672
- N(z.message), r == null || r(z);
2675
+ y(z.message), s == null || s(z);
2673
2676
  } finally {
2674
- M(!1);
2677
+ V(!1);
2675
2678
  }
2676
- }, k = xe(async ($) => {
2677
- if (i)
2679
+ }, tt = _e(async (F) => {
2680
+ if (f)
2678
2681
  try {
2679
- M(!0), N(null);
2680
- const z = await Q().uploadFile(i, $), De = (U, rt) => ({
2681
- rowIndex: U.rowIndex ?? rt,
2682
+ V(!0), y(null);
2683
+ const z = await Y().uploadFile(f, F), Ee = (U, at) => ({
2684
+ rowIndex: U.rowIndex ?? at,
2682
2685
  data: U.data ?? U,
2683
2686
  rawData: U.rawData ?? Object.values(U.data ?? U)
2684
2687
  });
2685
- m({
2688
+ R({
2686
2689
  headers: z.data.headers,
2687
- rows: z.data.sampleRows.map(De),
2690
+ rows: z.data.sampleRows.map(Ee),
2688
2691
  totalRows: z.data.totalRows,
2689
- sampleRows: z.data.sampleRows.map(De)
2690
- }), F(), await Ne();
2692
+ sampleRows: z.data.sampleRows.map(Ee)
2693
+ }), E(), await nt();
2691
2694
  } catch (I) {
2692
- N(`Failed to process the uploaded file: ${I.message}`);
2695
+ y(`Failed to process the uploaded file: ${I.message}`);
2693
2696
  } finally {
2694
- M(!1);
2697
+ V(!1);
2695
2698
  }
2696
- }, [i]), Ne = async () => {
2697
- if (i)
2699
+ }, [f]), nt = async () => {
2700
+ if (f)
2698
2701
  try {
2699
- M(!0);
2700
- const I = await Q().matchColumns(i);
2701
- h(I.mappings), w(I.unmappedSource, I.unmappedTarget);
2702
- } catch ($) {
2703
- N(`Column matching failed: ${$.message}`);
2702
+ V(!0);
2703
+ const I = await Y().matchColumns(f);
2704
+ x(I.mappings), $(I.unmappedSource, I.unmappedTarget);
2705
+ } catch (F) {
2706
+ y(`Column matching failed: ${F.message}`);
2704
2707
  } finally {
2705
- M(!1);
2708
+ V(!1);
2706
2709
  }
2707
- }, j = async () => {
2708
- if (i)
2710
+ }, ot = async () => {
2711
+ if (f)
2709
2712
  try {
2710
- M(!0), N(null);
2711
- const I = await Q().validateImport(i);
2712
- R(I.validation), F();
2713
- } catch ($) {
2714
- N(`Validation failed: ${$.message}`);
2713
+ V(!0), y(null);
2714
+ const I = await Y().validateImport(f);
2715
+ D(I.validation), E();
2716
+ } catch (F) {
2717
+ y(`Validation failed: ${F.message}`);
2715
2718
  } finally {
2716
- M(!1);
2719
+ V(!1);
2717
2720
  }
2718
- }, [Pe, re] = K(null), et = async () => {
2719
- if (i)
2721
+ }, [Pe, ie] = K(null), rt = async () => {
2722
+ if (f)
2720
2723
  try {
2721
- M(!0), N(null), re(null);
2722
- const I = await Q().completeImport(i, {
2724
+ V(!0), y(null), ie(null);
2725
+ const I = await Y().completeImport(f, {
2723
2726
  skipInvalidRows: !0,
2724
2727
  acknowledgeWarnings: !0
2725
2728
  });
2726
- x("complete"), t == null || t(I);
2727
- } catch ($) {
2728
- re($.message), x("complete");
2729
+ N("complete"), l == null || l(I);
2730
+ } catch (F) {
2731
+ ie(F.message), N("complete");
2729
2732
  } finally {
2730
- M(!1);
2733
+ V(!1);
2731
2734
  }
2732
- }, le = () => {
2733
- T(), n == null || n();
2734
- }, tt = () => Dn.findIndex(($) => $.key === l), nt = () => {
2735
- switch (l) {
2735
+ }, se = () => {
2736
+ _(), i == null || i();
2737
+ }, lt = () => Hn.findIndex((F) => F.key === u), it = () => {
2738
+ switch (u) {
2736
2739
  case "upload":
2737
- return a !== null;
2740
+ return p !== null;
2738
2741
  case "mapping":
2739
- return u.length > 0 && u.some(($) => $.targetKey !== null);
2742
+ return c.length > 0 && c.some((F) => F.targetKey !== null);
2740
2743
  case "validation":
2741
- return f !== null;
2744
+ return d !== null;
2742
2745
  case "review":
2743
- return f !== null && (f.isValid || f.errorCount === 0);
2746
+ return d !== null && (d.isValid || d.errorCount === 0);
2744
2747
  default:
2745
2748
  return !1;
2746
2749
  }
2747
- }, ot = async () => {
2748
- switch (l) {
2750
+ }, st = async () => {
2751
+ switch (u) {
2749
2752
  case "mapping":
2750
- await j();
2753
+ await ot();
2751
2754
  break;
2752
2755
  case "validation":
2753
- F();
2756
+ E();
2754
2757
  break;
2755
2758
  case "review":
2756
- await et();
2759
+ await rt();
2757
2760
  break;
2758
2761
  default:
2759
- F();
2762
+ E();
2760
2763
  }
2761
2764
  };
2762
- if (_)
2763
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2764
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(ne, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2765
+ if (k)
2766
+ return /* @__PURE__ */ g(ae, { theme: n, useShadowDom: r, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2767
+ /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(re, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2765
2768
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
2766
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: _ }),
2767
- n && /* @__PURE__ */ g("button", { onClick: le, className: "ff-btn ff-btn-secondary", children: "Close" })
2769
+ /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: k }),
2770
+ i && /* @__PURE__ */ g("button", { onClick: se, className: "ff-btn ff-btn-secondary", children: "Close" })
2768
2771
  ] }) }) });
2769
- if (!P)
2770
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2771
- /* @__PURE__ */ g(ze, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2772
+ if (!M)
2773
+ return /* @__PURE__ */ g(ae, { theme: n, useShadowDom: r, children: /* @__PURE__ */ g("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ v("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
2774
+ /* @__PURE__ */ g(Ae, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2772
2775
  /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
2773
2776
  ] }) }) });
2774
- const W = () => {
2775
- const $ = l === "review" ? "validation" : l;
2776
- return me.indexOf($);
2777
- };
2778
- return /* @__PURE__ */ g(se, { children: /* @__PURE__ */ v("div", { className: "ff-container ff-modal", children: [
2777
+ const Q = () => {
2778
+ const F = u === "review" ? "validation" : u;
2779
+ return he.indexOf(F);
2780
+ }, De = /* @__PURE__ */ g(ee, { children: /* @__PURE__ */ v("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
2779
2781
  /* @__PURE__ */ v("div", { className: "ff-modal-header", children: [
2780
2782
  /* @__PURE__ */ v("div", { className: "ff-modal-header-left", children: [
2781
2783
  /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2782
- /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g(yt, {}) }),
2784
+ /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g($t, {}) }),
2783
2785
  /* @__PURE__ */ g("h2", { className: "ff-modal-title", children: "Import Data" })
2784
2786
  ] }),
2785
- /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: me.map(($, I) => /* @__PURE__ */ v(lt.Fragment, { children: [
2787
+ /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: he.map((F, I) => /* @__PURE__ */ v(ut.Fragment, { children: [
2786
2788
  /* @__PURE__ */ g(
2787
2789
  "div",
2788
2790
  {
2789
2791
  className: b(
2790
2792
  "ff-step",
2791
- W() === I && "ff-step-active",
2792
- W() > I && "ff-step-complete",
2793
- W() < I && "ff-step-pending"
2793
+ Q() === I && "ff-step-active",
2794
+ Q() > I && "ff-step-complete",
2795
+ Q() < I && "ff-step-pending"
2794
2796
  ),
2795
- children: W() > I ? "✓" : I + 1
2797
+ children: Q() > I ? "✓" : I + 1
2796
2798
  }
2797
2799
  ),
2798
- I < me.length - 1 && /* @__PURE__ */ g("div", { className: b(
2800
+ I < he.length - 1 && /* @__PURE__ */ g("div", { className: b(
2799
2801
  "ff-step-connector",
2800
- W() > I && "ff-step-connector-complete"
2802
+ Q() > I && "ff-step-connector-complete"
2801
2803
  ) })
2802
- ] }, $)) })
2804
+ ] }, F)) })
2803
2805
  ] }),
2804
2806
  /* @__PURE__ */ g(
2805
2807
  "button",
2806
2808
  {
2807
- onClick: le,
2809
+ onClick: se,
2808
2810
  className: "ff-modal-close",
2809
- children: /* @__PURE__ */ g(ne, { className: "ff-w-5 ff-h-5" })
2811
+ children: /* @__PURE__ */ g(re, { className: "ff-w-5 ff-h-5" })
2810
2812
  }
2811
2813
  )
2812
2814
  ] }),
2813
2815
  /* @__PURE__ */ v("div", { className: "ff-modal-body", children: [
2814
- p && /* @__PURE__ */ g("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: p }),
2815
- l === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(Pt, { onFileSelect: k }) }) }),
2816
- l === "mapping" && /* @__PURE__ */ g(Dt, {}),
2817
- l === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2818
- /* @__PURE__ */ g(Te, {}),
2819
- /* @__PURE__ */ g(Be, { editable: !0 })
2816
+ m && /* @__PURE__ */ g("div", { className: "ff-mb-4 ff-p-4 ff-border ff-rounded-lg ff-text-sm", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)", color: "var(--ff-error)" }, children: m }),
2817
+ u === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(Lt, { onFileSelect: tt }) }) }),
2818
+ u === "mapping" && /* @__PURE__ */ g(Ht, {}),
2819
+ u === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2820
+ /* @__PURE__ */ g(qe, {}),
2821
+ /* @__PURE__ */ g(Te, { editable: !0 })
2820
2822
  ] }),
2821
- l === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2822
- /* @__PURE__ */ g(Te, { showDetails: !1 }),
2823
- /* @__PURE__ */ g(Be, { editable: !1, pageSize: 10 })
2823
+ u === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2824
+ /* @__PURE__ */ g(qe, { showDetails: !1 }),
2825
+ /* @__PURE__ */ g(Te, { editable: !1, pageSize: 10 })
2824
2826
  ] }),
2825
- l === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: Pe ? /* @__PURE__ */ v(ie, { children: [
2826
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(ne, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2827
+ u === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: Pe ? /* @__PURE__ */ v(ee, { children: [
2828
+ /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-error-light)" }, children: /* @__PURE__ */ g(re, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2827
2829
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
2828
2830
  /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: Pe }),
2829
2831
  /* @__PURE__ */ v("div", { className: "ff-flex ff-gap-3", children: [
@@ -2831,26 +2833,26 @@ const Be = ({
2831
2833
  "button",
2832
2834
  {
2833
2835
  onClick: () => {
2834
- re(null), x("review");
2836
+ ie(null), N("review");
2835
2837
  },
2836
2838
  className: "ff-btn ff-btn-secondary",
2837
2839
  children: "Back to Review"
2838
2840
  }
2839
2841
  ),
2840
- n && /* @__PURE__ */ g("button", { onClick: le, className: "ff-btn ff-btn-secondary", children: "Close" })
2842
+ i && /* @__PURE__ */ g("button", { onClick: se, className: "ff-btn ff-btn-secondary", children: "Close" })
2841
2843
  ] })
2842
- ] }) : /* @__PURE__ */ v(ie, { children: [
2843
- /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ g(Fe, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
2844
+ ] }) : /* @__PURE__ */ v(ee, { children: [
2845
+ /* @__PURE__ */ g("div", { className: "ff-w-16 ff-h-16 ff-rounded-full ff-flex ff-items-center ff-justify-center ff-mb-4", style: { backgroundColor: "var(--ff-success-light)" }, children: /* @__PURE__ */ g($e, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
2844
2846
  /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
2845
2847
  /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
2846
2848
  ] }) })
2847
2849
  ] }),
2848
- l !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2850
+ u !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2849
2851
  /* @__PURE__ */ g(
2850
2852
  "button",
2851
2853
  {
2852
- onClick: E,
2853
- disabled: tt() === 0 || c,
2854
+ onClick: q,
2855
+ disabled: lt() === 0 || a,
2854
2856
  className: "ff-btn ff-btn-secondary",
2855
2857
  children: "Back"
2856
2858
  }
@@ -2858,24 +2860,25 @@ const Be = ({
2858
2860
  /* @__PURE__ */ g(
2859
2861
  "button",
2860
2862
  {
2861
- onClick: ot,
2862
- disabled: !nt() || c,
2863
+ onClick: st,
2864
+ disabled: !it() || a,
2863
2865
  className: "ff-btn ff-btn-primary",
2864
- children: c ? /* @__PURE__ */ v(ie, { children: [
2865
- /* @__PURE__ */ g(ze, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2866
+ children: a ? /* @__PURE__ */ v(ee, { children: [
2867
+ /* @__PURE__ */ g(Ae, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2866
2868
  "Processing..."
2867
- ] }) : l === "review" ? "Complete Import" : "Continue"
2869
+ ] }) : u === "review" ? "Complete Import" : "Continue"
2868
2870
  }
2869
2871
  )
2870
2872
  ] })
2871
2873
  ] }) });
2874
+ return /* @__PURE__ */ g(ae, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ g("div", { className: "ff-overlay", children: De }) : De });
2872
2875
  };
2873
2876
  export {
2874
- Dt as C,
2875
- Be as D,
2876
- Pt as F,
2877
- Hn as I,
2878
- Te as V,
2877
+ Ht as C,
2878
+ Te as D,
2879
+ Lt as F,
2880
+ bn as I,
2881
+ qe as V,
2879
2882
  X as u
2880
2883
  };
2881
- //# sourceMappingURL=ImportWizard-B69XBxtG.mjs.map
2884
+ //# sourceMappingURL=ImportWizard-BNCe0g8q.mjs.map