@fileflow/sdk 0.1.19 → 0.1.20

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 oe } from "react/jsx-runtime";
2
- import * as Se from "react";
3
- import ut, { useCallback as Me, useState as Y, useMemo as He, useEffect as Ae } from "react";
4
- import { h as G, j as ft, k as dt, X as se, m as j, U as Xe, n as Ie, T as Re, q as gt, p as Ve, o as Ge, t as ct, d as pt, V as Oe, g as ee, S as de, L as be } from "./index-oYOmMOWf.mjs";
1
+ import { jsx as c, jsxs as w, Fragment as re } from "react/jsx-runtime";
2
+ import * as xe from "react";
3
+ import pt, { useCallback as Ne, useState as q, useMemo as be, useEffect as Oe } from "react";
4
+ import { h as b, j as mt, k as ht, X as ae, m as U, U as Qe, n as Pe, T as _e, q as vt, p as ke, o as Te, t as wt, d as Ct, V as Be, g as te, S as ce, L as ge } from "./index-EFXXxSbj.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 mt = [
11
+ const St = [
12
12
  ["path", { d: "M5 12h14", key: "1ays0h" }],
13
13
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
14
- ], ht = G("arrow-right", mt);
14
+ ], yt = b("arrow-right", St);
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 wt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], vt = G("check", wt);
21
+ const Rt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = b("check", Rt);
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 Ct = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], St = G("chevron-left", Ct);
28
+ const _t = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ft = b("chevron-left", _t);
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 Rt = [
35
+ const $t = [
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
- ], yt = G("circle-question-mark", Rt);
39
+ ], It = b("circle-question-mark", $t);
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 xt = [
46
+ const Mt = [
47
47
  [
48
48
  "path",
49
49
  {
@@ -52,14 +52,14 @@ const xt = [
52
52
  }
53
53
  ],
54
54
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
55
- ], _t = G("eye", xt);
55
+ ], Vt = b("eye", Mt);
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 Ft = [
62
+ const Nt = [
63
63
  [
64
64
  "path",
65
65
  {
@@ -72,14 +72,14 @@ const Ft = [
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
- ], $t = G("file-spreadsheet", Ft);
75
+ ], Pt = b("file-spreadsheet", Nt);
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 Mt = [
82
+ const kt = [
83
83
  [
84
84
  "path",
85
85
  {
@@ -88,26 +88,26 @@ const Mt = [
88
88
  }
89
89
  ],
90
90
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
91
- ], It = G("file", Mt);
91
+ ], Et = b("file", kt);
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 Vt = [
98
+ const Dt = [
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
- ], Nt = G("git-branch", Vt);
103
+ ], Lt = b("git-branch", Dt);
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 Pt = [
110
+ const zt = [
111
111
  [
112
112
  "path",
113
113
  {
@@ -115,33 +115,33 @@ const Pt = [
115
115
  key: "1a8usu"
116
116
  }
117
117
  ]
118
- ], Et = G("pen", Pt);
118
+ ], Ht = b("pen", zt);
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 Dt = [
125
+ const At = [
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
- ], kt = G("square-check-big", Dt);
131
+ ], Gt = b("square-check-big", At);
132
132
  /**
133
133
  * @license lucide-react v0.563.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
137
  */
138
- const Lt = [
138
+ const bt = [
139
139
  ["path", { d: "M10 11v6", key: "nco0om" }],
140
140
  ["path", { d: "M14 11v6", key: "outv1u" }],
141
141
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
142
142
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
143
143
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
144
- ], zt = G("trash-2", Lt), Be = {
144
+ ], Ot = b("trash-2", bt), Ke = {
145
145
  sessionId: null,
146
146
  status: "idle",
147
147
  step: "upload",
@@ -162,8 +162,269 @@ const Lt = [
162
162
  error: null,
163
163
  editingCell: null,
164
164
  editedRows: /* @__PURE__ */ new Set()
165
- }, J = ft((e, o) => ({
166
- ...Be,
165
+ };
166
+ function Tt(e, o) {
167
+ const t = [], n = (e == null ? void 0 : e.trim()) || "";
168
+ if (o.required && !n)
169
+ return t.push({
170
+ rowIndex: 0,
171
+ // will be set by caller
172
+ columnKey: o.key,
173
+ value: n,
174
+ severity: "error",
175
+ validatorType: "required",
176
+ message: `${o.label} is required`
177
+ }), t;
178
+ if (!n) return t;
179
+ switch (o.type) {
180
+ case "email":
181
+ /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n) || t.push({
182
+ rowIndex: 0,
183
+ columnKey: o.key,
184
+ value: n,
185
+ severity: "error",
186
+ validatorType: "type",
187
+ message: "Invalid email format"
188
+ });
189
+ break;
190
+ case "url":
191
+ /^https?:\/\/.+/.test(n) || t.push({
192
+ rowIndex: 0,
193
+ columnKey: o.key,
194
+ value: n,
195
+ severity: "error",
196
+ validatorType: "type",
197
+ message: "Invalid URL format"
198
+ });
199
+ break;
200
+ case "integer":
201
+ /^-?\d+$/.test(n) || t.push({
202
+ rowIndex: 0,
203
+ columnKey: o.key,
204
+ value: n,
205
+ severity: "error",
206
+ validatorType: "type",
207
+ message: "Must be a whole number"
208
+ });
209
+ break;
210
+ case "number":
211
+ case "float":
212
+ /^-?\d+(\.\d+)?$/.test(n) || t.push({
213
+ rowIndex: 0,
214
+ columnKey: o.key,
215
+ value: n,
216
+ severity: "error",
217
+ validatorType: "type",
218
+ message: "Must be a valid number"
219
+ });
220
+ break;
221
+ case "phone":
222
+ n.replace(/\D/g, "").length < 10 && t.push({
223
+ rowIndex: 0,
224
+ columnKey: o.key,
225
+ value: n,
226
+ severity: "warning",
227
+ validatorType: "type",
228
+ message: "Invalid phone number"
229
+ });
230
+ break;
231
+ }
232
+ if (o.validators)
233
+ for (const r of o.validators) {
234
+ const l = r.severity === "info" ? "warning" : r.severity || "error", i = r.params || {};
235
+ switch (r.type) {
236
+ case "minLength": {
237
+ const s = i.value ?? 0;
238
+ n.length < s && t.push({
239
+ rowIndex: 0,
240
+ columnKey: o.key,
241
+ value: n,
242
+ severity: l,
243
+ validatorType: r.type,
244
+ message: r.message || `Must be at least ${s} characters`
245
+ });
246
+ break;
247
+ }
248
+ case "maxLength": {
249
+ const s = i.value ?? 1 / 0;
250
+ n.length > s && t.push({
251
+ rowIndex: 0,
252
+ columnKey: o.key,
253
+ value: n,
254
+ severity: l,
255
+ validatorType: r.type,
256
+ message: r.message || `Must be at most ${s} characters`
257
+ });
258
+ break;
259
+ }
260
+ case "min": {
261
+ const s = parseFloat(n), u = i.value ?? -1 / 0;
262
+ !isNaN(s) && s < u && t.push({
263
+ rowIndex: 0,
264
+ columnKey: o.key,
265
+ value: n,
266
+ severity: l,
267
+ validatorType: r.type,
268
+ message: r.message || `Must be at least ${u}`
269
+ });
270
+ break;
271
+ }
272
+ case "max": {
273
+ const s = parseFloat(n), u = i.value ?? 1 / 0;
274
+ !isNaN(s) && s > u && t.push({
275
+ rowIndex: 0,
276
+ columnKey: o.key,
277
+ value: n,
278
+ severity: l,
279
+ validatorType: r.type,
280
+ message: r.message || `Must be at most ${u}`
281
+ });
282
+ break;
283
+ }
284
+ case "pattern": {
285
+ const s = i.regex ?? i.pattern ?? ".*";
286
+ new RegExp(s).test(n) || t.push({
287
+ rowIndex: 0,
288
+ columnKey: o.key,
289
+ value: n,
290
+ severity: l,
291
+ validatorType: r.type,
292
+ message: r.message || "Format is invalid"
293
+ });
294
+ break;
295
+ }
296
+ case "enum": {
297
+ const s = i.values || [];
298
+ s.map((f) => f.toLowerCase()).includes(n.toLowerCase()) || t.push({
299
+ rowIndex: 0,
300
+ columnKey: o.key,
301
+ value: n,
302
+ severity: l,
303
+ validatorType: r.type,
304
+ message: r.message || `Must be one of: ${s.slice(0, 5).join(", ")}${s.length > 5 ? "..." : ""}`
305
+ });
306
+ break;
307
+ }
308
+ case "custom": {
309
+ const s = i.validatorName;
310
+ if (s === "commaSeparatedEnum") {
311
+ const u = i.allowedValues || [], f = n.split(",").map((d) => d.trim().toLowerCase()).filter((d) => d), g = u.map((d) => d.toLowerCase()), p = f.filter((d) => !g.includes(d));
312
+ p.length > 0 && t.push({
313
+ rowIndex: 0,
314
+ columnKey: o.key,
315
+ value: n,
316
+ severity: l,
317
+ validatorType: r.type,
318
+ message: r.message || `Invalid values: ${p.join(", ")}. Must be comma-separated values from: ${u.slice(0, 5).join(", ")}${u.length > 5 ? "..." : ""}`
319
+ });
320
+ }
321
+ if (s === "commaSeparatedEmails") {
322
+ const f = n.split(",").map((g) => g.trim()).filter((g) => g).filter((g) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(g));
323
+ f.length > 0 && t.push({
324
+ rowIndex: 0,
325
+ columnKey: o.key,
326
+ value: n,
327
+ severity: l,
328
+ validatorType: r.type,
329
+ message: `Invalid email(s): ${f.join(", ")}`
330
+ });
331
+ }
332
+ break;
333
+ }
334
+ }
335
+ }
336
+ return t;
337
+ }
338
+ function pe(e, o, t) {
339
+ var C;
340
+ const n = [];
341
+ for (const h of e)
342
+ for (const S of t) {
343
+ if (!S.targetKey) continue;
344
+ const x = o.columns.find((V) => V.key === S.targetKey);
345
+ if (!x) continue;
346
+ const I = h.data[S.targetKey] || h.data[S.sourceColumn] || "", F = Tt(String(I), x);
347
+ for (const V of F)
348
+ n.push({ ...V, rowIndex: h.rowIndex });
349
+ }
350
+ const r = ((C = o.options) == null ? void 0 : C.uniqueKeys) || [];
351
+ for (const h of r) {
352
+ const S = t.find((I) => I.targetKey === h);
353
+ if (!S) continue;
354
+ const x = /* @__PURE__ */ new Map();
355
+ for (const I of e) {
356
+ const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
357
+ if (!F) continue;
358
+ const V = x.get(F) || [];
359
+ V.push(I.rowIndex), x.set(F, V);
360
+ }
361
+ for (const [I, F] of x.entries())
362
+ if (F.length > 1)
363
+ for (const V of F.slice(1))
364
+ n.push({
365
+ rowIndex: V,
366
+ columnKey: h,
367
+ value: I,
368
+ severity: "warning",
369
+ validatorType: "unique",
370
+ message: `Duplicate ${h} value`
371
+ });
372
+ }
373
+ const l = /* @__PURE__ */ new Map();
374
+ for (const h of n) {
375
+ const S = l.get(h.rowIndex) || [];
376
+ S.push(h), l.set(h.rowIndex, S);
377
+ }
378
+ const i = n.filter((h) => h.severity === "error").length, s = n.filter((h) => h.severity === "warning").length, u = n.filter((h) => h.severity === "info").length, f = new Set(n.filter((h) => h.severity === "error").map((h) => h.rowIndex)), g = e.length, p = g - f.size, d = {};
379
+ for (const h of n) {
380
+ d[h.columnKey] || (d[h.columnKey] = {
381
+ columnKey: h.columnKey,
382
+ errorCount: 0,
383
+ warningCount: 0,
384
+ infoCount: 0,
385
+ mostCommonError: void 0
386
+ });
387
+ const S = d[h.columnKey];
388
+ h.severity === "error" ? S.errorCount++ : h.severity === "warning" ? S.warningCount++ : S.infoCount++, S.mostCommonError || (S.mostCommonError = h.message);
389
+ }
390
+ const a = {};
391
+ for (const h of n)
392
+ a[h.validatorType] = (a[h.validatorType] || 0) + 1;
393
+ const m = [];
394
+ for (const h of r) {
395
+ const S = t.find((I) => I.targetKey === h);
396
+ if (!S) continue;
397
+ const x = /* @__PURE__ */ new Map();
398
+ for (const I of e) {
399
+ const F = String(I.data[h] || I.data[S.sourceColumn] || "").toLowerCase().trim();
400
+ if (!F) continue;
401
+ const V = x.get(F) || [];
402
+ V.push(I.rowIndex), x.set(F, V);
403
+ }
404
+ for (const [I, F] of x.entries())
405
+ F.length > 1 && m.push({ columnKey: h, value: I, rowIndices: F });
406
+ }
407
+ const v = {
408
+ byColumn: d,
409
+ byType: a,
410
+ duplicates: m.length > 0 ? m : void 0
411
+ };
412
+ return {
413
+ validationResults: {
414
+ isValid: i === 0,
415
+ totalRows: g,
416
+ validRows: p,
417
+ errorCount: i,
418
+ warningCount: s,
419
+ infoCount: u,
420
+ errors: n,
421
+ summary: v
422
+ },
423
+ errorsByRow: l
424
+ };
425
+ }
426
+ const Z = mt((e, o) => ({
427
+ ...Ke,
167
428
  setSchema: (t) => e({ schema: t }),
168
429
  setSessionId: (t) => e({ sessionId: t }),
169
430
  setFile: (t) => e({
@@ -194,6 +455,16 @@ const Lt = [
194
455
  }
195
456
  e({ validationResults: t, errorsByRow: n });
196
457
  },
458
+ revalidate: () => {
459
+ const t = o();
460
+ if (!t.schema || !t.validationResults) return;
461
+ const { validationResults: n, errorsByRow: r } = pe(
462
+ t.rows,
463
+ t.schema,
464
+ t.mappings
465
+ );
466
+ e({ validationResults: n, errorsByRow: r });
467
+ },
197
468
  setStep: (t) => e({ step: t }),
198
469
  nextStep: () => {
199
470
  const t = ["upload", "mapping", "validation", "review", "complete"], n = t.indexOf(o().step);
@@ -207,62 +478,57 @@ const Lt = [
207
478
  editingCell: { rowIndex: t, columnKey: n }
208
479
  }),
209
480
  stopEditing: () => e({ editingCell: null }),
210
- updateCell: (t, n, r) => e((l) => {
211
- const i = [...l.rows], a = i.find((f) => f.rowIndex === t);
212
- a && (a.data = { ...a.data, [n]: String(r) });
481
+ updateCell: (t, n, r) => {
482
+ const l = o(), i = [...l.rows], s = i.find((f) => f.rowIndex === t);
483
+ s && (s.data = { ...s.data, [n]: String(r) });
213
484
  const u = new Set(l.editedRows);
214
- return u.add(t), { rows: i, editedRows: u, editingCell: null };
215
- }),
216
- deleteRow: (t) => e((n) => {
217
- var h;
218
- const l = n.rows.filter((w) => w.rowIndex !== t).map((w, C) => ({ ...w, rowIndex: C })), i = /* @__PURE__ */ new Map();
219
- n.errorsByRow.forEach((w, C) => {
220
- if (C !== t) {
221
- const x = C > t ? C - 1 : C;
222
- i.set(x, w.map((F) => ({ ...F, rowIndex: x })));
223
- }
224
- });
225
- const a = l.length, u = ((h = n.validationResults) == null ? void 0 : h.errors.filter((w) => w.rowIndex !== t).map((w) => ({ ...w, rowIndex: w.rowIndex > t ? w.rowIndex - 1 : w.rowIndex }))) || [], f = u.filter((w) => w.severity === "error").length, p = u.filter((w) => w.severity === "warning").length, c = u.filter((w) => w.severity === "info").length, d = new Set(u.filter((w) => w.severity === "error").map((w) => w.rowIndex)), s = a - d.size, m = n.validationResults ? {
226
- ...n.validationResults,
227
- totalRows: a,
228
- validRows: s,
229
- errorCount: f,
230
- warningCount: p,
231
- infoCount: c,
232
- isValid: f === 0,
233
- errors: u
234
- } : null;
235
- return {
485
+ if (u.add(t), e({ rows: i, editedRows: u, editingCell: null }), l.schema && l.validationResults) {
486
+ const { validationResults: f, errorsByRow: g } = pe(
487
+ i,
488
+ l.schema,
489
+ l.mappings
490
+ );
491
+ e({ validationResults: f, errorsByRow: g });
492
+ }
493
+ },
494
+ deleteRow: (t) => {
495
+ const n = o(), l = n.rows.filter((i) => i.rowIndex !== t).map((i, s) => ({ ...i, rowIndex: s }));
496
+ if (e({
236
497
  rows: l,
237
- totalRows: l.length,
238
- errorsByRow: i,
239
- validationResults: m
240
- };
241
- }),
498
+ totalRows: l.length
499
+ }), n.schema && n.validationResults) {
500
+ const { validationResults: i, errorsByRow: s } = pe(
501
+ l,
502
+ n.schema,
503
+ n.mappings
504
+ );
505
+ e({ validationResults: i, errorsByRow: s });
506
+ }
507
+ },
242
508
  setStatus: (t) => e({ status: t }),
243
509
  setLoading: (t) => e({ isLoading: t }),
244
510
  setError: (t) => e({ error: t }),
245
- reset: () => e(Be)
246
- })), Ht = ({
511
+ reset: () => e(Ke)
512
+ })), Bt = ({
247
513
  onFileSelect: e,
248
514
  maxSize: o = 50 * 1024 * 1024,
249
515
  // 50MB
250
516
  acceptedTypes: t = [".csv", ".xlsx", ".xls"]
251
517
  }) => {
252
- const { file: n, fileName: r, fileSize: l, setFile: i, error: a, setError: u, isLoading: f } = J(), p = Me(
253
- (w, C) => {
254
- if (C.length > 0) {
518
+ const { file: n, fileName: r, fileSize: l, setFile: i, error: s, setError: u, isLoading: f } = Z(), g = Ne(
519
+ (C, h) => {
520
+ if (h.length > 0) {
255
521
  u("Invalid file type or file too large");
256
522
  return;
257
523
  }
258
- if (w.length > 0) {
259
- const x = w[0];
260
- i(x), e == null || e(x);
524
+ if (C.length > 0) {
525
+ const S = C[0];
526
+ i(S), e == null || e(S);
261
527
  }
262
528
  },
263
529
  [e, i, u]
264
- ), { getRootProps: c, getInputProps: d, isDragActive: s } = dt({
265
- onDrop: p,
530
+ ), { getRootProps: p, getInputProps: d, isDragActive: a } = ht({
531
+ onDrop: g,
266
532
  accept: {
267
533
  "text/csv": [".csv"],
268
534
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
@@ -271,45 +537,45 @@ const Lt = [
271
537
  maxSize: o,
272
538
  multiple: !1,
273
539
  disabled: f
274
- }), m = (w) => w < 1024 ? `${w} B` : w < 1024 * 1024 ? `${(w / 1024).toFixed(1)} KB` : `${(w / (1024 * 1024)).toFixed(1)} MB`, h = (w) => {
275
- w.stopPropagation(), J.getState().reset();
540
+ }), m = (C) => C < 1024 ? `${C} B` : C < 1024 * 1024 ? `${(C / 1024).toFixed(1)} KB` : `${(C / (1024 * 1024)).toFixed(1)} MB`, v = (C) => {
541
+ C.stopPropagation(), Z.getState().reset();
276
542
  };
277
- 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: [
278
- /* @__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)" } }) }),
279
- /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0", children: [
280
- /* @__PURE__ */ g("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
281
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
543
+ return n ? /* @__PURE__ */ c("div", { className: "ff-p-4 ff-rounded-xl ff-border", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
544
+ /* @__PURE__ */ c("div", { className: "ff-p-2 ff-rounded-lg", style: { backgroundColor: "rgba(41, 142, 51, 0.15)" }, children: /* @__PURE__ */ c(Et, { className: "ff-w-6 ff-h-6", style: { color: "var(--ff-success)" } }) }),
545
+ /* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0", children: [
546
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-truncate", style: { color: "var(--ff-success-dark)" }, children: r }),
547
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: m(l || 0) })
282
548
  ] }),
283
- /* @__PURE__ */ g(
549
+ /* @__PURE__ */ c(
284
550
  "button",
285
551
  {
286
- onClick: h,
552
+ onClick: v,
287
553
  className: "ff-p-1.5 ff-rounded-full ff-transition-colors",
288
554
  style: { color: "var(--ff-success)" },
289
555
  "aria-label": "Remove file",
290
- children: /* @__PURE__ */ g(se, { className: "ff-w-5 ff-h-5" })
556
+ children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
291
557
  }
292
558
  )
293
- ] }) }) : /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
294
- /* @__PURE__ */ v(
559
+ ] }) }) : /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
560
+ /* @__PURE__ */ w(
295
561
  "div",
296
562
  {
297
- ...c(),
298
- className: j(
563
+ ...p(),
564
+ className: U(
299
565
  "ff-dropzone",
300
- s && "ff-dropzone-active",
566
+ a && "ff-dropzone-active",
301
567
  f && "ff-opacity-50 ff-cursor-not-allowed"
302
568
  ),
303
569
  children: [
304
- /* @__PURE__ */ g("input", { ...d() }),
305
- /* @__PURE__ */ g("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ g(Xe, { className: "ff-dropzone-icon" }) }),
306
- /* @__PURE__ */ g("h3", { className: "ff-dropzone-text", children: s ? "Drop your file here" : "Upload your file" }),
307
- /* @__PURE__ */ g("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
308
- /* @__PURE__ */ g("label", { className: "ff-inline-block", children: /* @__PURE__ */ g("span", { className: j(
570
+ /* @__PURE__ */ c("input", { ...d() }),
571
+ /* @__PURE__ */ c("div", { className: "ff-dropzone-icon-wrapper", children: /* @__PURE__ */ c(Qe, { className: "ff-dropzone-icon" }) }),
572
+ /* @__PURE__ */ c("h3", { className: "ff-dropzone-text", children: a ? "Drop your file here" : "Upload your file" }),
573
+ /* @__PURE__ */ c("p", { className: "ff-dropzone-hint", children: "Drag and drop or click to select" }),
574
+ /* @__PURE__ */ c("label", { className: "ff-inline-block", children: /* @__PURE__ */ c("span", { className: U(
309
575
  "ff-btn ff-btn-primary",
310
576
  f && "ff-opacity-50 ff-cursor-wait"
311
577
  ), children: f ? "Processing..." : "Choose file" }) }),
312
- /* @__PURE__ */ v("p", { className: "ff-dropzone-formats", children: [
578
+ /* @__PURE__ */ w("p", { className: "ff-dropzone-formats", children: [
313
579
  "Supports ",
314
580
  t.join(", "),
315
581
  " up to ",
@@ -318,66 +584,66 @@ const Lt = [
318
584
  ]
319
585
  }
320
586
  ),
321
- 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: [
322
- /* @__PURE__ */ g(Ie, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
323
- /* @__PURE__ */ g("p", { children: a })
587
+ s && /* @__PURE__ */ w("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: [
588
+ /* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4 ff-flex-shrink-0" }),
589
+ /* @__PURE__ */ c("p", { children: s })
324
590
  ] })
325
591
  ] });
326
- }, At = ({ onMappingChange: e }) => {
327
- const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = J(), l = (t == null ? void 0 : t.columns) || [], i = (c, d) => {
328
- const s = d === "" ? null : d;
329
- r(c, s), e == null || e(c, s);
330
- }, a = (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(
331
- o.filter((c) => c.targetKey !== null).map((c) => c.targetKey)
592
+ }, Kt = ({ onMappingChange: e }) => {
593
+ const { mappings: o, schema: t, unmappedSource: n, updateMapping: r } = Z(), l = (t == null ? void 0 : t.columns) || [], i = (p, d) => {
594
+ const a = d === "" ? null : d;
595
+ r(p, a), e == null || e(p, a);
596
+ }, s = (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", g = new Set(
597
+ o.filter((p) => p.targetKey !== null).map((p) => p.targetKey)
332
598
  );
333
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
334
- /* @__PURE__ */ v("div", { className: "ff-mapping-header", children: [
335
- /* @__PURE__ */ v("div", { children: [
336
- /* @__PURE__ */ g("h3", { className: "ff-mapping-title", children: "Column Mapping" }),
337
- /* @__PURE__ */ g("p", { className: "ff-mapping-subtitle", children: "Match your file columns to the expected fields" })
599
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
600
+ /* @__PURE__ */ w("div", { className: "ff-mapping-header", children: [
601
+ /* @__PURE__ */ w("div", { children: [
602
+ /* @__PURE__ */ c("h3", { className: "ff-mapping-title", children: "Column Mapping" }),
603
+ /* @__PURE__ */ c("p", { className: "ff-mapping-subtitle", children: "Match your file columns to the expected fields" })
338
604
  ] }),
339
- /* @__PURE__ */ v("div", { className: "ff-mapping-legend", children: [
340
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
341
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-success)" } }),
342
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Mapped" })
605
+ /* @__PURE__ */ w("div", { className: "ff-mapping-legend", children: [
606
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
607
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-success)" } }),
608
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Mapped" })
343
609
  ] }),
344
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
345
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-warning)" } }),
346
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Review" })
610
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
611
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-warning)" } }),
612
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Review" })
347
613
  ] }),
348
- /* @__PURE__ */ v("span", { className: "ff-mapping-legend-item", children: [
349
- /* @__PURE__ */ g("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-gray-70)" } }),
350
- /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-secondary)" }, children: "Unmapped" })
614
+ /* @__PURE__ */ w("span", { className: "ff-mapping-legend-item", children: [
615
+ /* @__PURE__ */ c("span", { className: "ff-mapping-legend-dot", style: { backgroundColor: "var(--ff-gray-70)" } }),
616
+ /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-secondary)" }, children: "Unmapped" })
351
617
  ] })
352
618
  ] })
353
619
  ] }),
354
- /* @__PURE__ */ g("div", { className: "ff-space-y-2", children: o.map((c) => {
355
- l.find((m) => m.key === c.targetKey);
356
- const d = c.targetKey !== null, s = c.confidence >= 0.85;
357
- return /* @__PURE__ */ v(
620
+ /* @__PURE__ */ c("div", { className: "ff-space-y-2", children: o.map((p) => {
621
+ l.find((m) => m.key === p.targetKey);
622
+ const d = p.targetKey !== null, a = p.confidence >= 0.85;
623
+ return /* @__PURE__ */ w(
358
624
  "div",
359
625
  {
360
- className: j(
626
+ className: U(
361
627
  "ff-mapping-row",
362
- d && s && "ff-mapping-row-success",
363
- d && !s && "ff-mapping-row-warning"
628
+ d && a && "ff-mapping-row-success",
629
+ d && !a && "ff-mapping-row-warning"
364
630
  ),
365
631
  children: [
366
- /* @__PURE__ */ g("div", { className: "ff-flex-1", children: /* @__PURE__ */ g("div", { className: "ff-mapping-source", children: c.sourceColumn }) }),
367
- /* @__PURE__ */ g("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ g(ht, { className: "ff-w-5 ff-h-5" }) }),
368
- /* @__PURE__ */ g("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ v(
632
+ /* @__PURE__ */ c("div", { className: "ff-flex-1", children: /* @__PURE__ */ c("div", { className: "ff-mapping-source", children: p.sourceColumn }) }),
633
+ /* @__PURE__ */ c("div", { className: "ff-mapping-arrow", children: /* @__PURE__ */ c(yt, { className: "ff-w-5 ff-h-5" }) }),
634
+ /* @__PURE__ */ c("div", { className: "ff-flex-1 ff-mapping-target", children: /* @__PURE__ */ w(
369
635
  "select",
370
636
  {
371
- value: c.targetKey || "",
372
- onChange: (m) => i(c.sourceColumn, m.target.value),
637
+ value: p.targetKey || "",
638
+ onChange: (m) => i(p.sourceColumn, m.target.value),
373
639
  className: "ff-input",
374
640
  children: [
375
- /* @__PURE__ */ g("option", { value: "", children: "-- Do not import --" }),
376
- l.map((m) => /* @__PURE__ */ v(
641
+ /* @__PURE__ */ c("option", { value: "", children: "-- Do not import --" }),
642
+ l.map((m) => /* @__PURE__ */ w(
377
643
  "option",
378
644
  {
379
645
  value: m.key,
380
- disabled: p.has(m.key) && c.targetKey !== m.key,
646
+ disabled: g.has(m.key) && p.targetKey !== m.key,
381
647
  children: [
382
648
  m.label,
383
649
  " (",
@@ -391,32 +657,32 @@ const Lt = [
391
657
  ]
392
658
  }
393
659
  ) }),
394
- /* @__PURE__ */ g("div", { className: "ff-mapping-status", children: d ? s ? /* @__PURE__ */ g(vt, { 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" }) }),
395
- c.confidence > 0 && /* @__PURE__ */ v("div", { className: "ff-confidence", style: { color: a(c.confidence) }, children: [
396
- /* @__PURE__ */ v("span", { children: [
397
- Math.round(c.confidence * 100),
660
+ /* @__PURE__ */ c("div", { className: "ff-mapping-status", children: d ? a ? /* @__PURE__ */ c(xt, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(It, { className: "ff-w-5 ff-h-5", style: { color: "var(--ff-warning)" } }) : /* @__PURE__ */ c("span", { className: "ff-w-5 ff-h-5" }) }),
661
+ p.confidence > 0 && /* @__PURE__ */ w("div", { className: "ff-confidence", style: { color: s(p.confidence) }, children: [
662
+ /* @__PURE__ */ w("span", { children: [
663
+ Math.round(p.confidence * 100),
398
664
  "%"
399
665
  ] }),
400
- /* @__PURE__ */ v("span", { style: { color: "var(--ff-text-muted)" }, children: [
666
+ /* @__PURE__ */ w("span", { style: { color: "var(--ff-text-muted)" }, children: [
401
667
  "(",
402
- u(c.confidence),
668
+ u(p.confidence),
403
669
  ")"
404
670
  ] })
405
671
  ] })
406
672
  ]
407
673
  },
408
- c.sourceColumn
674
+ p.sourceColumn
409
675
  );
410
676
  }) }),
411
677
  (() => {
412
- const c = l.filter(
413
- (d) => d.required && !p.has(d.key)
678
+ const p = l.filter(
679
+ (d) => d.required && !g.has(d.key)
414
680
  );
415
- 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: [
416
- /* @__PURE__ */ g(Ie, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
417
- /* @__PURE__ */ v("div", { children: [
418
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
419
- /* @__PURE__ */ g("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: c.map((d) => d.label).join(", ") })
681
+ return p.length > 0 ? /* @__PURE__ */ w("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: [
682
+ /* @__PURE__ */ c(Pe, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
683
+ /* @__PURE__ */ w("div", { children: [
684
+ /* @__PURE__ */ c("p", { className: "ff-text-sm ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Required fields not mapped" }),
685
+ /* @__PURE__ */ c("p", { className: "ff-text-sm ff-mt-1", style: { color: "var(--ff-warning)" }, children: p.map((d) => d.label).join(", ") })
420
686
  ] })
421
687
  ] }) : null;
422
688
  })()
@@ -432,7 +698,7 @@ const Lt = [
432
698
  *
433
699
  * @license MIT
434
700
  */
435
- function Gt() {
701
+ function qt() {
436
702
  return {
437
703
  accessor: (e, o) => typeof e == "function" ? {
438
704
  ...o,
@@ -445,24 +711,24 @@ function Gt() {
445
711
  group: (e) => e
446
712
  };
447
713
  }
448
- function q(e, o) {
714
+ function j(e, o) {
449
715
  return typeof e == "function" ? e(o) : e;
450
716
  }
451
717
  function L(e, o) {
452
718
  return (t) => {
453
719
  o.setState((n) => ({
454
720
  ...n,
455
- [e]: q(t, n[e])
721
+ [e]: j(t, n[e])
456
722
  }));
457
723
  };
458
724
  }
459
- function ae(e) {
725
+ function ue(e) {
460
726
  return e instanceof Function;
461
727
  }
462
- function Ot(e) {
728
+ function jt(e) {
463
729
  return Array.isArray(e) && e.every((o) => typeof o == "number");
464
730
  }
465
- function bt(e, o) {
731
+ function Ut(e, o) {
466
732
  const t = [], n = (r) => {
467
733
  r.forEach((l) => {
468
734
  t.push(l);
@@ -472,23 +738,23 @@ function bt(e, o) {
472
738
  };
473
739
  return n(e), t;
474
740
  }
475
- function S(e, o, t) {
741
+ function y(e, o, t) {
476
742
  let n = [], r;
477
743
  return (l) => {
478
744
  let i;
479
745
  t.key && t.debug && (i = Date.now());
480
- const a = e(l);
481
- if (!(a.length !== n.length || a.some((p, c) => n[c] !== p)))
746
+ const s = e(l);
747
+ if (!(s.length !== n.length || s.some((g, p) => n[p] !== g)))
482
748
  return r;
483
- n = a;
749
+ n = s;
484
750
  let f;
485
- 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()) {
486
- const p = Math.round((Date.now() - i) * 100) / 100, c = Math.round((Date.now() - f) * 100) / 100, d = c / 16, s = (m, h) => {
487
- for (m = String(m); m.length < h; )
751
+ 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()) {
752
+ const g = Math.round((Date.now() - i) * 100) / 100, p = Math.round((Date.now() - f) * 100) / 100, d = p / 16, a = (m, v) => {
753
+ for (m = String(m); m.length < v; )
488
754
  m = " " + m;
489
755
  return m;
490
756
  };
491
- console.info(`%c⏱ ${s(c, 5)} /${s(p, 5)} ms`, `
757
+ console.info(`%c⏱ ${a(p, 5)} /${a(g, 5)} ms`, `
492
758
  font-size: .6rem;
493
759
  font-weight: bold;
494
760
  color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
@@ -506,7 +772,7 @@ function R(e, o, t, n) {
506
772
  onChange: n
507
773
  };
508
774
  }
509
- function Bt(e, o, t, n) {
775
+ function Xt(e, o, t, n) {
510
776
  const r = () => {
511
777
  var i;
512
778
  return (i = l.getValue()) != null ? i : e.options.renderFallbackValue;
@@ -516,9 +782,9 @@ function Bt(e, o, t, n) {
516
782
  column: t,
517
783
  getValue: () => o.getValue(n),
518
784
  renderValue: r,
519
- getContext: S(() => [e, t, o, l], (i, a, u, f) => ({
785
+ getContext: y(() => [e, t, o, l], (i, s, u, f) => ({
520
786
  table: i,
521
- column: a,
787
+ column: s,
522
788
  row: u,
523
789
  cell: f,
524
790
  getValue: f.getValue,
@@ -529,48 +795,48 @@ function Bt(e, o, t, n) {
529
795
  i.createCell == null || i.createCell(l, t, o, e);
530
796
  }, {}), l;
531
797
  }
532
- function Tt(e, o, t, n) {
798
+ function Wt(e, o, t, n) {
533
799
  var r, l;
534
- const a = {
800
+ const s = {
535
801
  ...e._getDefaultColumnDef(),
536
802
  ...o
537
- }, u = a.accessorKey;
538
- 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, p;
539
- if (a.accessorFn ? p = a.accessorFn : u && (u.includes(".") ? p = (d) => {
540
- let s = d;
541
- for (const h of u.split(".")) {
803
+ }, u = s.accessorKey;
804
+ 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, g;
805
+ if (s.accessorFn ? g = s.accessorFn : u && (u.includes(".") ? g = (d) => {
806
+ let a = d;
807
+ for (const v of u.split(".")) {
542
808
  var m;
543
- 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.`);
809
+ a = (m = a) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && a === void 0 && console.warn(`"${v}" in deeply nested key "${u}" returned undefined.`);
544
810
  }
545
- return s;
546
- } : p = (d) => d[a.accessorKey]), !f)
547
- 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();
548
- let c = {
811
+ return a;
812
+ } : g = (d) => d[s.accessorKey]), !f)
813
+ 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();
814
+ let p = {
549
815
  id: `${String(f)}`,
550
- accessorFn: p,
816
+ accessorFn: g,
551
817
  parent: n,
552
818
  depth: t,
553
- columnDef: a,
819
+ columnDef: s,
554
820
  columns: [],
555
- getFlatColumns: S(() => [!0], () => {
821
+ getFlatColumns: y(() => [!0], () => {
556
822
  var d;
557
- return [c, ...(d = c.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
823
+ return [p, ...(d = p.columns) == null ? void 0 : d.flatMap((a) => a.getFlatColumns())];
558
824
  }, R(e.options, "debugColumns", "column.getFlatColumns")),
559
- getLeafColumns: S(() => [e._getOrderColumnsFn()], (d) => {
560
- var s;
561
- if ((s = c.columns) != null && s.length) {
562
- let m = c.columns.flatMap((h) => h.getLeafColumns());
825
+ getLeafColumns: y(() => [e._getOrderColumnsFn()], (d) => {
826
+ var a;
827
+ if ((a = p.columns) != null && a.length) {
828
+ let m = p.columns.flatMap((v) => v.getLeafColumns());
563
829
  return d(m);
564
830
  }
565
- return [c];
831
+ return [p];
566
832
  }, R(e.options, "debugColumns", "column.getLeafColumns"))
567
833
  };
568
834
  for (const d of e._features)
569
- d.createColumn == null || d.createColumn(c, e);
570
- return c;
835
+ d.createColumn == null || d.createColumn(p, e);
836
+ return p;
571
837
  }
572
- const P = "debugHeaders";
573
- function Te(e, o, t) {
838
+ const E = "debugHeaders";
839
+ function qe(e, o, t) {
574
840
  var n;
575
841
  let l = {
576
842
  id: (n = t.id) != null ? n : o.id,
@@ -584,10 +850,10 @@ function Te(e, o, t) {
584
850
  rowSpan: 0,
585
851
  headerGroup: null,
586
852
  getLeafHeaders: () => {
587
- const i = [], a = (u) => {
588
- u.subHeaders && u.subHeaders.length && u.subHeaders.map(a), i.push(u);
853
+ const i = [], s = (u) => {
854
+ u.subHeaders && u.subHeaders.length && u.subHeaders.map(s), i.push(u);
589
855
  };
590
- return a(l), i;
856
+ return s(l), i;
591
857
  },
592
858
  getContext: () => ({
593
859
  table: e,
@@ -599,93 +865,93 @@ function Te(e, o, t) {
599
865
  i.createHeader == null || i.createHeader(l, e);
600
866
  }), l;
601
867
  }
602
- const qt = {
868
+ const Qt = {
603
869
  createTable: (e) => {
604
- e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
870
+ e.getHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
605
871
  var l, i;
606
- const a = (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)));
607
- return re(o, [...a, ...f, ...u], e);
608
- }, R(e.options, P, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [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))), re(o, t, e, "center")), R(e.options, P, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
872
+ const s = (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)));
873
+ return le(o, [...s, ...f, ...u], e);
874
+ }, R(e.options, E, "getHeaderGroups")), e.getCenterHeaderGroups = y(() => [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))), le(o, t, e, "center")), R(e.options, E, "getCenterHeaderGroups")), e.getLeftHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
609
875
  var r;
610
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
611
- return re(o, l, e, "left");
612
- }, R(e.options, P, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
876
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
877
+ return le(o, l, e, "left");
878
+ }, R(e.options, E, "getLeftHeaderGroups")), e.getRightHeaderGroups = y(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
613
879
  var r;
614
- const l = (r = n == null ? void 0 : n.map((i) => t.find((a) => a.id === i)).filter(Boolean)) != null ? r : [];
615
- return re(o, l, e, "right");
616
- }, R(e.options, P, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, P, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, P, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, P, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, P, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, P, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, P, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, P, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, P, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
880
+ const l = (r = n == null ? void 0 : n.map((i) => t.find((s) => s.id === i)).filter(Boolean)) != null ? r : [];
881
+ return le(o, l, e, "right");
882
+ }, R(e.options, E, "getRightHeaderGroups")), e.getFooterGroups = y(() => [e.getHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getFooterGroups")), e.getLeftFooterGroups = y(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getLeftFooterGroups")), e.getCenterFooterGroups = y(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getCenterFooterGroups")), e.getRightFooterGroups = y(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), R(e.options, E, "getRightFooterGroups")), e.getFlatHeaders = y(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getFlatHeaders")), e.getLeftFlatHeaders = y(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getLeftFlatHeaders")), e.getCenterFlatHeaders = y(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getCenterFlatHeaders")), e.getRightFlatHeaders = y(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), R(e.options, E, "getRightFlatHeaders")), e.getCenterLeafHeaders = y(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
617
883
  var n;
618
884
  return !((n = t.subHeaders) != null && n.length);
619
- }), R(e.options, P, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
885
+ }), R(e.options, E, "getCenterLeafHeaders")), e.getLeftLeafHeaders = y(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
620
886
  var n;
621
887
  return !((n = t.subHeaders) != null && n.length);
622
- }), R(e.options, P, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
888
+ }), R(e.options, E, "getLeftLeafHeaders")), e.getRightLeafHeaders = y(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
623
889
  var n;
624
890
  return !((n = t.subHeaders) != null && n.length);
625
- }), R(e.options, P, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
626
- var r, l, i, a, u, f;
627
- 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((p) => p.getLeafHeaders()).flat();
628
- }, R(e.options, P, "getLeafHeaders"));
891
+ }), R(e.options, E, "getRightLeafHeaders")), e.getLeafHeaders = y(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
892
+ var r, l, i, s, u, f;
893
+ 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((g) => g.getLeafHeaders()).flat();
894
+ }, R(e.options, E, "getLeafHeaders"));
629
895
  }
630
896
  };
631
- function re(e, o, t, n) {
897
+ function le(e, o, t, n) {
632
898
  var r, l;
633
899
  let i = 0;
634
- const a = function(d, s) {
635
- s === void 0 && (s = 1), i = Math.max(i, s), d.filter((m) => m.getIsVisible()).forEach((m) => {
636
- var h;
637
- (h = m.columns) != null && h.length && a(m.columns, s + 1);
900
+ const s = function(d, a) {
901
+ a === void 0 && (a = 1), i = Math.max(i, a), d.filter((m) => m.getIsVisible()).forEach((m) => {
902
+ var v;
903
+ (v = m.columns) != null && v.length && s(m.columns, a + 1);
638
904
  }, 0);
639
905
  };
640
- a(e);
906
+ s(e);
641
907
  let u = [];
642
- const f = (d, s) => {
908
+ const f = (d, a) => {
643
909
  const m = {
644
- depth: s,
645
- id: [n, `${s}`].filter(Boolean).join("_"),
910
+ depth: a,
911
+ id: [n, `${a}`].filter(Boolean).join("_"),
646
912
  headers: []
647
- }, h = [];
648
- d.forEach((w) => {
649
- const C = [...h].reverse()[0], x = w.column.depth === m.depth;
650
- let F, E = !1;
651
- if (x && w.column.parent ? F = w.column.parent : (F = w.column, E = !0), C && (C == null ? void 0 : C.column) === F)
652
- C.subHeaders.push(w);
913
+ }, v = [];
914
+ d.forEach((C) => {
915
+ const h = [...v].reverse()[0], S = C.column.depth === m.depth;
916
+ let x, I = !1;
917
+ if (S && C.column.parent ? x = C.column.parent : (x = C.column, I = !0), h && (h == null ? void 0 : h.column) === x)
918
+ h.subHeaders.push(C);
653
919
  else {
654
- const I = Te(t, F, {
655
- id: [n, s, F.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
656
- isPlaceholder: E,
657
- placeholderId: E ? `${h.filter((D) => D.column === F).length}` : void 0,
658
- depth: s,
659
- index: h.length
920
+ const F = qe(t, x, {
921
+ id: [n, a, x.id, C == null ? void 0 : C.id].filter(Boolean).join("_"),
922
+ isPlaceholder: I,
923
+ placeholderId: I ? `${v.filter((V) => V.column === x).length}` : void 0,
924
+ depth: a,
925
+ index: v.length
660
926
  });
661
- I.subHeaders.push(w), h.push(I);
927
+ F.subHeaders.push(C), v.push(F);
662
928
  }
663
- m.headers.push(w), w.headerGroup = m;
664
- }), u.push(m), s > 0 && f(h, s - 1);
665
- }, p = o.map((d, s) => Te(t, d, {
929
+ m.headers.push(C), C.headerGroup = m;
930
+ }), u.push(m), a > 0 && f(v, a - 1);
931
+ }, g = o.map((d, a) => qe(t, d, {
666
932
  depth: i,
667
- index: s
933
+ index: a
668
934
  }));
669
- f(p, i - 1), u.reverse();
670
- const c = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
671
- let h = 0, w = 0, C = [0];
672
- m.subHeaders && m.subHeaders.length ? (C = [], c(m.subHeaders).forEach((F) => {
935
+ f(g, i - 1), u.reverse();
936
+ const p = (d) => d.filter((m) => m.column.getIsVisible()).map((m) => {
937
+ let v = 0, C = 0, h = [0];
938
+ m.subHeaders && m.subHeaders.length ? (h = [], p(m.subHeaders).forEach((x) => {
673
939
  let {
674
- colSpan: E,
675
- rowSpan: I
676
- } = F;
677
- h += E, C.push(I);
678
- })) : h = 1;
679
- const x = Math.min(...C);
680
- return w = w + x, m.colSpan = h, m.rowSpan = w, {
681
- colSpan: h,
682
- rowSpan: w
940
+ colSpan: I,
941
+ rowSpan: F
942
+ } = x;
943
+ v += I, h.push(F);
944
+ })) : v = 1;
945
+ const S = Math.min(...h);
946
+ return C = C + S, m.colSpan = v, m.rowSpan = C, {
947
+ colSpan: v,
948
+ rowSpan: C
683
949
  };
684
950
  });
685
- return c((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
951
+ return p((r = (l = u[0]) == null ? void 0 : l.headers) != null ? r : []), u;
686
952
  }
687
- const Ne = (e, o, t, n, r, l, i) => {
688
- let a = {
953
+ const Ee = (e, o, t, n, r, l, i) => {
954
+ let s = {
689
955
  id: o,
690
956
  index: n,
691
957
  original: t,
@@ -694,114 +960,114 @@ const Ne = (e, o, t, n, r, l, i) => {
694
960
  _valuesCache: {},
695
961
  _uniqueValuesCache: {},
696
962
  getValue: (u) => {
697
- if (a._valuesCache.hasOwnProperty(u))
698
- return a._valuesCache[u];
963
+ if (s._valuesCache.hasOwnProperty(u))
964
+ return s._valuesCache[u];
699
965
  const f = e.getColumn(u);
700
966
  if (f != null && f.accessorFn)
701
- return a._valuesCache[u] = f.accessorFn(a.original, n), a._valuesCache[u];
967
+ return s._valuesCache[u] = f.accessorFn(s.original, n), s._valuesCache[u];
702
968
  },
703
969
  getUniqueValues: (u) => {
704
- if (a._uniqueValuesCache.hasOwnProperty(u))
705
- return a._uniqueValuesCache[u];
970
+ if (s._uniqueValuesCache.hasOwnProperty(u))
971
+ return s._uniqueValuesCache[u];
706
972
  const f = e.getColumn(u);
707
973
  if (f != null && f.accessorFn)
708
- 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]);
974
+ 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]);
709
975
  },
710
976
  renderValue: (u) => {
711
977
  var f;
712
- return (f = a.getValue(u)) != null ? f : e.options.renderFallbackValue;
978
+ return (f = s.getValue(u)) != null ? f : e.options.renderFallbackValue;
713
979
  },
714
980
  subRows: [],
715
- getLeafRows: () => bt(a.subRows, (u) => u.subRows),
716
- getParentRow: () => a.parentId ? e.getRow(a.parentId, !0) : void 0,
981
+ getLeafRows: () => Ut(s.subRows, (u) => u.subRows),
982
+ getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
717
983
  getParentRows: () => {
718
- let u = [], f = a;
984
+ let u = [], f = s;
719
985
  for (; ; ) {
720
- const p = f.getParentRow();
721
- if (!p) break;
722
- u.push(p), f = p;
986
+ const g = f.getParentRow();
987
+ if (!g) break;
988
+ u.push(g), f = g;
723
989
  }
724
990
  return u.reverse();
725
991
  },
726
- getAllCells: S(() => [e.getAllLeafColumns()], (u) => u.map((f) => Bt(e, a, f, f.id)), R(e.options, "debugRows", "getAllCells")),
727
- _getAllCellsByColumnId: S(() => [a.getAllCells()], (u) => u.reduce((f, p) => (f[p.column.id] = p, f), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
992
+ getAllCells: y(() => [e.getAllLeafColumns()], (u) => u.map((f) => Xt(e, s, f, f.id)), R(e.options, "debugRows", "getAllCells")),
993
+ _getAllCellsByColumnId: y(() => [s.getAllCells()], (u) => u.reduce((f, g) => (f[g.column.id] = g, f), {}), R(e.options, "debugRows", "getAllCellsByColumnId"))
728
994
  };
729
995
  for (let u = 0; u < e._features.length; u++) {
730
996
  const f = e._features[u];
731
- f == null || f.createRow == null || f.createRow(a, e);
997
+ f == null || f.createRow == null || f.createRow(s, e);
732
998
  }
733
- return a;
734
- }, jt = {
999
+ return s;
1000
+ }, Yt = {
735
1001
  createColumn: (e, o) => {
736
1002
  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 = () => {
737
1003
  if (e._getFacetedMinMaxValues)
738
1004
  return e._getFacetedMinMaxValues();
739
1005
  };
740
1006
  }
741
- }, We = (e, o, t) => {
1007
+ }, Ye = (e, o, t) => {
742
1008
  var n, r;
743
1009
  const l = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
744
1010
  return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(l));
745
1011
  };
746
- We.autoRemove = (e) => A(e);
747
- const Qe = (e, o, t) => {
1012
+ Ye.autoRemove = (e) => G(e);
1013
+ const Je = (e, o, t) => {
748
1014
  var n;
749
1015
  return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
750
1016
  };
751
- Qe.autoRemove = (e) => A(e);
752
- const Ye = (e, o, t) => {
1017
+ Je.autoRemove = (e) => G(e);
1018
+ const Ze = (e, o, t) => {
753
1019
  var n;
754
1020
  return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
755
1021
  };
756
- Ye.autoRemove = (e) => A(e);
757
- const Je = (e, o, t) => {
1022
+ Ze.autoRemove = (e) => G(e);
1023
+ const et = (e, o, t) => {
758
1024
  var n;
759
1025
  return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
760
1026
  };
761
- Je.autoRemove = (e) => A(e);
762
- const Ze = (e, o, t) => !t.some((n) => {
1027
+ et.autoRemove = (e) => G(e);
1028
+ const tt = (e, o, t) => !t.some((n) => {
763
1029
  var r;
764
1030
  return !((r = e.getValue(o)) != null && r.includes(n));
765
1031
  });
766
- Ze.autoRemove = (e) => A(e) || !(e != null && e.length);
767
- const et = (e, o, t) => t.some((n) => {
1032
+ tt.autoRemove = (e) => G(e) || !(e != null && e.length);
1033
+ const nt = (e, o, t) => t.some((n) => {
768
1034
  var r;
769
1035
  return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
770
1036
  });
771
- et.autoRemove = (e) => A(e) || !(e != null && e.length);
772
- const tt = (e, o, t) => e.getValue(o) === t;
773
- tt.autoRemove = (e) => A(e);
774
- const nt = (e, o, t) => e.getValue(o) == t;
775
- nt.autoRemove = (e) => A(e);
776
- const Pe = (e, o, t) => {
1037
+ nt.autoRemove = (e) => G(e) || !(e != null && e.length);
1038
+ const ot = (e, o, t) => e.getValue(o) === t;
1039
+ ot.autoRemove = (e) => G(e);
1040
+ const rt = (e, o, t) => e.getValue(o) == t;
1041
+ rt.autoRemove = (e) => G(e);
1042
+ const De = (e, o, t) => {
777
1043
  let [n, r] = t;
778
1044
  const l = e.getValue(o);
779
1045
  return l >= n && l <= r;
780
1046
  };
781
- Pe.resolveFilterValue = (e) => {
1047
+ De.resolveFilterValue = (e) => {
782
1048
  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;
783
1049
  if (l > i) {
784
- const a = l;
785
- l = i, i = a;
1050
+ const s = l;
1051
+ l = i, i = s;
786
1052
  }
787
1053
  return [l, i];
788
1054
  };
789
- Pe.autoRemove = (e) => A(e) || A(e[0]) && A(e[1]);
1055
+ De.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
790
1056
  const B = {
791
- includesString: We,
792
- includesStringSensitive: Qe,
793
- equalsString: Ye,
794
- arrIncludes: Je,
795
- arrIncludesAll: Ze,
796
- arrIncludesSome: et,
797
- equals: tt,
798
- weakEquals: nt,
799
- inNumberRange: Pe
1057
+ includesString: Ye,
1058
+ includesStringSensitive: Je,
1059
+ equalsString: Ze,
1060
+ arrIncludes: et,
1061
+ arrIncludesAll: tt,
1062
+ arrIncludesSome: nt,
1063
+ equals: ot,
1064
+ weakEquals: rt,
1065
+ inNumberRange: De
800
1066
  };
801
- function A(e) {
1067
+ function G(e) {
802
1068
  return e == null || e === "";
803
1069
  }
804
- const Ut = {
1070
+ const Jt = {
805
1071
  getDefaultColumnDef: () => ({
806
1072
  filterFn: "auto"
807
1073
  }),
@@ -820,7 +1086,7 @@ const Ut = {
820
1086
  return typeof n == "string" ? B.includesString : typeof n == "number" ? B.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? B.equals : Array.isArray(n) ? B.arrIncludes : B.weakEquals;
821
1087
  }, e.getFilterFn = () => {
822
1088
  var t, n;
823
- return ae(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
1089
+ return ue(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
824
1090
  // @ts-ignore
825
1091
  (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : B[e.columnDef.filterFn]
826
1092
  );
@@ -835,10 +1101,10 @@ const Ut = {
835
1101
  return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
836
1102
  }, e.setFilterValue = (t) => {
837
1103
  o.setColumnFilters((n) => {
838
- const r = e.getFilterFn(), l = n == null ? void 0 : n.find((p) => p.id === e.id), i = q(t, l ? l.value : void 0);
839
- if (qe(r, i, e)) {
840
- var a;
841
- return (a = n == null ? void 0 : n.filter((p) => p.id !== e.id)) != null ? a : [];
1104
+ const r = e.getFilterFn(), l = n == null ? void 0 : n.find((g) => g.id === e.id), i = j(t, l ? l.value : void 0);
1105
+ if (je(r, i, e)) {
1106
+ var s;
1107
+ return (s = n == null ? void 0 : n.filter((g) => g.id !== e.id)) != null ? s : [];
842
1108
  }
843
1109
  const u = {
844
1110
  id: e.id,
@@ -846,7 +1112,7 @@ const Ut = {
846
1112
  };
847
1113
  if (l) {
848
1114
  var f;
849
- return (f = n == null ? void 0 : n.map((p) => p.id === e.id ? u : p)) != null ? f : [];
1115
+ return (f = n == null ? void 0 : n.map((g) => g.id === e.id ? u : g)) != null ? f : [];
850
1116
  }
851
1117
  return n != null && n.length ? [...n, u] : [u];
852
1118
  });
@@ -859,11 +1125,11 @@ const Ut = {
859
1125
  e.setColumnFilters = (o) => {
860
1126
  const t = e.getAllLeafColumns(), n = (r) => {
861
1127
  var l;
862
- return (l = q(o, r)) == null ? void 0 : l.filter((i) => {
863
- const a = t.find((u) => u.id === i.id);
864
- if (a) {
865
- const u = a.getFilterFn();
866
- if (qe(u, i.value, a))
1128
+ return (l = j(o, r)) == null ? void 0 : l.filter((i) => {
1129
+ const s = t.find((u) => u.id === i.id);
1130
+ if (s) {
1131
+ const u = s.getFilterFn();
1132
+ if (je(u, i.value, s))
867
1133
  return !1;
868
1134
  }
869
1135
  return !0;
@@ -876,57 +1142,57 @@ const Ut = {
876
1142
  }, 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());
877
1143
  }
878
1144
  };
879
- function qe(e, o, t) {
1145
+ function je(e, o, t) {
880
1146
  return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
881
1147
  }
882
- const Kt = (e, o, t) => t.reduce((n, r) => {
1148
+ const Zt = (e, o, t) => t.reduce((n, r) => {
883
1149
  const l = r.getValue(e);
884
1150
  return n + (typeof l == "number" ? l : 0);
885
- }, 0), Xt = (e, o, t) => {
1151
+ }, 0), en = (e, o, t) => {
886
1152
  let n;
887
1153
  return t.forEach((r) => {
888
1154
  const l = r.getValue(e);
889
1155
  l != null && (n > l || n === void 0 && l >= l) && (n = l);
890
1156
  }), n;
891
- }, Wt = (e, o, t) => {
1157
+ }, tn = (e, o, t) => {
892
1158
  let n;
893
1159
  return t.forEach((r) => {
894
1160
  const l = r.getValue(e);
895
1161
  l != null && (n < l || n === void 0 && l >= l) && (n = l);
896
1162
  }), n;
897
- }, Qt = (e, o, t) => {
1163
+ }, nn = (e, o, t) => {
898
1164
  let n, r;
899
1165
  return t.forEach((l) => {
900
1166
  const i = l.getValue(e);
901
1167
  i != null && (n === void 0 ? i >= i && (n = r = i) : (n > i && (n = i), r < i && (r = i)));
902
1168
  }), [n, r];
903
- }, Yt = (e, o) => {
1169
+ }, on = (e, o) => {
904
1170
  let t = 0, n = 0;
905
1171
  if (o.forEach((r) => {
906
1172
  let l = r.getValue(e);
907
1173
  l != null && (l = +l) >= l && (++t, n += l);
908
1174
  }), t) return n / t;
909
- }, Jt = (e, o) => {
1175
+ }, rn = (e, o) => {
910
1176
  if (!o.length)
911
1177
  return;
912
1178
  const t = o.map((l) => l.getValue(e));
913
- if (!Ot(t))
1179
+ if (!jt(t))
914
1180
  return;
915
1181
  if (t.length === 1)
916
1182
  return t[0];
917
1183
  const n = Math.floor(t.length / 2), r = t.sort((l, i) => l - i);
918
1184
  return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
919
- }, Zt = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), en = (e, o) => new Set(o.map((t) => t.getValue(e))).size, tn = (e, o) => o.length, ge = {
920
- sum: Kt,
921
- min: Xt,
922
- max: Wt,
923
- extent: Qt,
924
- mean: Yt,
925
- median: Jt,
926
- unique: Zt,
927
- uniqueCount: en,
928
- count: tn
929
- }, nn = {
1185
+ }, ln = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), sn = (e, o) => new Set(o.map((t) => t.getValue(e))).size, an = (e, o) => o.length, me = {
1186
+ sum: Zt,
1187
+ min: en,
1188
+ max: tn,
1189
+ extent: nn,
1190
+ mean: on,
1191
+ median: rn,
1192
+ unique: ln,
1193
+ uniqueCount: sn,
1194
+ count: an
1195
+ }, un = {
930
1196
  getDefaultColumnDef: () => ({
931
1197
  aggregatedCell: (e) => {
932
1198
  var o, t;
@@ -962,14 +1228,14 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
962
1228
  }, e.getAutoAggregationFn = () => {
963
1229
  const t = o.getCoreRowModel().flatRows[0], n = t == null ? void 0 : t.getValue(e.id);
964
1230
  if (typeof n == "number")
965
- return ge.sum;
1231
+ return me.sum;
966
1232
  if (Object.prototype.toString.call(n) === "[object Date]")
967
- return ge.extent;
1233
+ return me.extent;
968
1234
  }, e.getAggregationFn = () => {
969
1235
  var t, n;
970
1236
  if (!e)
971
1237
  throw new Error();
972
- return ae(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 : ge[e.columnDef.aggregationFn];
1238
+ return ue(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 : me[e.columnDef.aggregationFn];
973
1239
  };
974
1240
  },
975
1241
  createTable: (e) => {
@@ -993,13 +1259,13 @@ const Kt = (e, o, t) => t.reduce((n, r) => {
993
1259
  };
994
1260
  }
995
1261
  };
996
- function on(e, o, t) {
1262
+ function fn(e, o, t) {
997
1263
  if (!(o != null && o.length) || !t)
998
1264
  return e;
999
1265
  const n = e.filter((l) => !o.includes(l.id));
1000
1266
  return t === "remove" ? n : [...o.map((l) => e.find((i) => i.id === l)).filter(Boolean), ...n];
1001
1267
  }
1002
- const rn = {
1268
+ const dn = {
1003
1269
  getInitialState: (e) => ({
1004
1270
  columnOrder: [],
1005
1271
  ...e
@@ -1008,12 +1274,12 @@ const rn = {
1008
1274
  onColumnOrderChange: L("columnOrder", e)
1009
1275
  }),
1010
1276
  createColumn: (e, o) => {
1011
- e.getIndex = S((t) => [ne(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
1277
+ e.getIndex = y((t) => [oe(o, t)], (t) => t.findIndex((n) => n.id === e.id), R(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
1012
1278
  var n;
1013
- return ((n = ne(o, t)[0]) == null ? void 0 : n.id) === e.id;
1279
+ return ((n = oe(o, t)[0]) == null ? void 0 : n.id) === e.id;
1014
1280
  }, e.getIsLastColumn = (t) => {
1015
1281
  var n;
1016
- const r = ne(o, t);
1282
+ const r = oe(o, t);
1017
1283
  return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
1018
1284
  };
1019
1285
  },
@@ -1021,27 +1287,27 @@ const rn = {
1021
1287
  e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
1022
1288
  var t;
1023
1289
  e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
1024
- }, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
1290
+ }, e._getOrderColumnsFn = y(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
1025
1291
  let l = [];
1026
1292
  if (!(o != null && o.length))
1027
1293
  l = r;
1028
1294
  else {
1029
- const i = [...o], a = [...r];
1030
- for (; a.length && i.length; ) {
1031
- const u = i.shift(), f = a.findIndex((p) => p.id === u);
1032
- f > -1 && l.push(a.splice(f, 1)[0]);
1295
+ const i = [...o], s = [...r];
1296
+ for (; s.length && i.length; ) {
1297
+ const u = i.shift(), f = s.findIndex((g) => g.id === u);
1298
+ f > -1 && l.push(s.splice(f, 1)[0]);
1033
1299
  }
1034
- l = [...l, ...a];
1300
+ l = [...l, ...s];
1035
1301
  }
1036
- return on(l, t, n);
1302
+ return fn(l, t, n);
1037
1303
  }, R(e.options, "debugTable", "_getOrderColumnsFn"));
1038
1304
  }
1039
- }, ce = () => ({
1305
+ }, he = () => ({
1040
1306
  left: [],
1041
1307
  right: []
1042
- }), ln = {
1308
+ }), cn = {
1043
1309
  getInitialState: (e) => ({
1044
- columnPinning: ce(),
1310
+ columnPinning: he(),
1045
1311
  ...e
1046
1312
  }),
1047
1313
  getDefaultOptions: (e) => ({
@@ -1053,32 +1319,32 @@ const rn = {
1053
1319
  o.setColumnPinning((r) => {
1054
1320
  var l, i;
1055
1321
  if (t === "right") {
1056
- var a, u;
1322
+ var s, u;
1057
1323
  return {
1058
- left: ((a = r == null ? void 0 : r.left) != null ? a : []).filter((c) => !(n != null && n.includes(c))),
1059
- right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((c) => !(n != null && n.includes(c))), ...n]
1324
+ left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((p) => !(n != null && n.includes(p))),
1325
+ right: [...((u = r == null ? void 0 : r.right) != null ? u : []).filter((p) => !(n != null && n.includes(p))), ...n]
1060
1326
  };
1061
1327
  }
1062
1328
  if (t === "left") {
1063
- var f, p;
1329
+ var f, g;
1064
1330
  return {
1065
- left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((c) => !(n != null && n.includes(c))), ...n],
1066
- right: ((p = r == null ? void 0 : r.right) != null ? p : []).filter((c) => !(n != null && n.includes(c)))
1331
+ left: [...((f = r == null ? void 0 : r.left) != null ? f : []).filter((p) => !(n != null && n.includes(p))), ...n],
1332
+ right: ((g = r == null ? void 0 : r.right) != null ? g : []).filter((p) => !(n != null && n.includes(p)))
1067
1333
  };
1068
1334
  }
1069
1335
  return {
1070
- left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((c) => !(n != null && n.includes(c))),
1071
- right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((c) => !(n != null && n.includes(c)))
1336
+ left: ((l = r == null ? void 0 : r.left) != null ? l : []).filter((p) => !(n != null && n.includes(p))),
1337
+ right: ((i = r == null ? void 0 : r.right) != null ? i : []).filter((p) => !(n != null && n.includes(p)))
1072
1338
  };
1073
1339
  });
1074
1340
  }, e.getCanPin = () => e.getLeafColumns().some((n) => {
1075
1341
  var r, l, i;
1076
1342
  return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((l = (i = o.options.enableColumnPinning) != null ? i : o.options.enablePinning) != null ? l : !0);
1077
1343
  }), e.getIsPinned = () => {
1078
- const t = e.getLeafColumns().map((a) => a.id), {
1344
+ const t = e.getLeafColumns().map((s) => s.id), {
1079
1345
  left: n,
1080
1346
  right: r
1081
- } = 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));
1347
+ } = 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));
1082
1348
  return l ? "left" : i ? "right" : !1;
1083
1349
  }, e.getPinnedIndex = () => {
1084
1350
  var t, n;
@@ -1087,13 +1353,13 @@ const rn = {
1087
1353
  };
1088
1354
  },
1089
1355
  createRow: (e, o) => {
1090
- e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
1356
+ e.getCenterVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
1091
1357
  const l = [...n ?? [], ...r ?? []];
1092
1358
  return t.filter((i) => !l.includes(i.column.id));
1093
- }, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1359
+ }, R(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1094
1360
  ...l,
1095
1361
  position: "left"
1096
- })), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1362
+ })), R(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = y(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((l) => t.find((i) => i.column.id === l)).filter(Boolean).map((l) => ({
1097
1363
  ...l,
1098
1364
  position: "right"
1099
1365
  })), R(o.options, "debugRows", "getRightVisibleCells"));
@@ -1101,7 +1367,7 @@ const rn = {
1101
1367
  createTable: (e) => {
1102
1368
  e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
1103
1369
  var t, n;
1104
- return e.setColumnPinning(o ? ce() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : ce());
1370
+ return e.setColumnPinning(o ? he() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : he());
1105
1371
  }, e.getIsSomeColumnsPinned = (o) => {
1106
1372
  var t;
1107
1373
  const n = e.getState().columnPinning;
@@ -1110,31 +1376,31 @@ const rn = {
1110
1376
  return !!((r = n.left) != null && r.length || (l = n.right) != null && l.length);
1111
1377
  }
1112
1378
  return !!((t = n[o]) != null && t.length);
1113
- }, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
1379
+ }, e.getLeftLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), R(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = y(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
1114
1380
  const r = [...t ?? [], ...n ?? []];
1115
1381
  return o.filter((l) => !r.includes(l.id));
1116
1382
  }, R(e.options, "debugColumns", "getCenterLeafColumns"));
1117
1383
  }
1118
1384
  };
1119
- function sn(e) {
1385
+ function gn(e) {
1120
1386
  return e || (typeof document < "u" ? document : null);
1121
1387
  }
1122
- const le = {
1388
+ const ie = {
1123
1389
  size: 150,
1124
1390
  minSize: 20,
1125
1391
  maxSize: Number.MAX_SAFE_INTEGER
1126
- }, pe = () => ({
1392
+ }, ve = () => ({
1127
1393
  startOffset: null,
1128
1394
  startSize: null,
1129
1395
  deltaOffset: null,
1130
1396
  deltaPercentage: null,
1131
1397
  isResizingColumn: !1,
1132
1398
  columnSizingStart: []
1133
- }), an = {
1134
- getDefaultColumnDef: () => le,
1399
+ }), pn = {
1400
+ getDefaultColumnDef: () => ie,
1135
1401
  getInitialState: (e) => ({
1136
1402
  columnSizing: {},
1137
- columnSizingInfo: pe(),
1403
+ columnSizingInfo: ve(),
1138
1404
  ...e
1139
1405
  }),
1140
1406
  getDefaultOptions: (e) => ({
@@ -1147,8 +1413,8 @@ const le = {
1147
1413
  e.getSize = () => {
1148
1414
  var t, n, r;
1149
1415
  const l = o.getState().columnSizing[e.id];
1150
- return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : le.minSize, (n = l ?? e.columnDef.size) != null ? n : le.size), (r = e.columnDef.maxSize) != null ? r : le.maxSize);
1151
- }, e.getStart = S((t) => [t, ne(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getStart")), e.getAfter = S((t) => [t, ne(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1416
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : ie.minSize, (n = l ?? e.columnDef.size) != null ? n : ie.size), (r = e.columnDef.maxSize) != null ? r : ie.maxSize);
1417
+ }, e.getStart = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getStart")), e.getAfter = y((t) => [t, oe(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, l) => r + l.getSize(), 0), R(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
1152
1418
  o.setColumnSizing((t) => {
1153
1419
  let {
1154
1420
  [e.id]: n,
@@ -1182,27 +1448,27 @@ const le = {
1182
1448
  }, e.getResizeHandler = (t) => {
1183
1449
  const n = o.getColumn(e.column.id), r = n == null ? void 0 : n.getCanResize();
1184
1450
  return (l) => {
1185
- if (!n || !r || (l.persist == null || l.persist(), me(l) && l.touches && l.touches.length > 1))
1451
+ if (!n || !r || (l.persist == null || l.persist(), we(l) && l.touches && l.touches.length > 1))
1186
1452
  return;
1187
- const i = e.getSize(), a = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[n.id, n.getSize()]], u = me(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, p = (C, x) => {
1188
- typeof x == "number" && (o.setColumnSizingInfo((F) => {
1189
- var E, I;
1190
- const D = o.options.columnResizeDirection === "rtl" ? -1 : 1, K = (x - ((E = F == null ? void 0 : F.startOffset) != null ? E : 0)) * D, N = Math.max(K / ((I = F == null ? void 0 : F.startSize) != null ? I : 0), -0.999999);
1191
- return F.columnSizingStart.forEach((H) => {
1192
- let [T, O] = H;
1193
- f[T] = Math.round(Math.max(O + O * N, 0) * 100) / 100;
1453
+ const i = e.getSize(), s = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[n.id, n.getSize()]], u = we(l) ? Math.round(l.touches[0].clientX) : l.clientX, f = {}, g = (h, S) => {
1454
+ typeof S == "number" && (o.setColumnSizingInfo((x) => {
1455
+ var I, F;
1456
+ const V = o.options.columnResizeDirection === "rtl" ? -1 : 1, W = (S - ((I = x == null ? void 0 : x.startOffset) != null ? I : 0)) * V, k = Math.max(W / ((F = x == null ? void 0 : x.startSize) != null ? F : 0), -0.999999);
1457
+ return x.columnSizingStart.forEach((H) => {
1458
+ let [K, O] = H;
1459
+ f[K] = Math.round(Math.max(O + O * k, 0) * 100) / 100;
1194
1460
  }), {
1195
- ...F,
1196
- deltaOffset: K,
1197
- deltaPercentage: N
1461
+ ...x,
1462
+ deltaOffset: W,
1463
+ deltaPercentage: k
1198
1464
  };
1199
- }), (o.options.columnResizeMode === "onChange" || C === "end") && o.setColumnSizing((F) => ({
1200
- ...F,
1465
+ }), (o.options.columnResizeMode === "onChange" || h === "end") && o.setColumnSizing((x) => ({
1466
+ ...x,
1201
1467
  ...f
1202
1468
  })));
1203
- }, c = (C) => p("move", C), d = (C) => {
1204
- p("end", C), o.setColumnSizingInfo((x) => ({
1205
- ...x,
1469
+ }, p = (h) => g("move", h), d = (h) => {
1470
+ g("end", h), o.setColumnSizingInfo((S) => ({
1471
+ ...S,
1206
1472
  isResizingColumn: !1,
1207
1473
  startOffset: null,
1208
1474
  startSize: null,
@@ -1210,27 +1476,27 @@ const le = {
1210
1476
  deltaPercentage: null,
1211
1477
  columnSizingStart: []
1212
1478
  }));
1213
- }, s = sn(t), m = {
1214
- moveHandler: (C) => c(C.clientX),
1215
- upHandler: (C) => {
1216
- s == null || s.removeEventListener("mousemove", m.moveHandler), s == null || s.removeEventListener("mouseup", m.upHandler), d(C.clientX);
1479
+ }, a = gn(t), m = {
1480
+ moveHandler: (h) => p(h.clientX),
1481
+ upHandler: (h) => {
1482
+ a == null || a.removeEventListener("mousemove", m.moveHandler), a == null || a.removeEventListener("mouseup", m.upHandler), d(h.clientX);
1217
1483
  }
1218
- }, h = {
1219
- moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()), c(C.touches[0].clientX), !1),
1220
- upHandler: (C) => {
1221
- var x;
1222
- s == null || s.removeEventListener("touchmove", h.moveHandler), s == null || s.removeEventListener("touchend", h.upHandler), C.cancelable && (C.preventDefault(), C.stopPropagation()), d((x = C.touches[0]) == null ? void 0 : x.clientX);
1484
+ }, v = {
1485
+ moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), p(h.touches[0].clientX), !1),
1486
+ upHandler: (h) => {
1487
+ var S;
1488
+ a == null || a.removeEventListener("touchmove", v.moveHandler), a == null || a.removeEventListener("touchend", v.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), d((S = h.touches[0]) == null ? void 0 : S.clientX);
1223
1489
  }
1224
- }, w = un() ? {
1490
+ }, C = mn() ? {
1225
1491
  passive: !1
1226
1492
  } : !1;
1227
- me(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((C) => ({
1228
- ...C,
1493
+ we(l) ? (a == null || a.addEventListener("touchmove", v.moveHandler, C), a == null || a.addEventListener("touchend", v.upHandler, C)) : (a == null || a.addEventListener("mousemove", m.moveHandler, C), a == null || a.addEventListener("mouseup", m.upHandler, C)), o.setColumnSizingInfo((h) => ({
1494
+ ...h,
1229
1495
  startOffset: u,
1230
1496
  startSize: i,
1231
1497
  deltaOffset: 0,
1232
1498
  deltaPercentage: 0,
1233
- columnSizingStart: a,
1499
+ columnSizingStart: s,
1234
1500
  isResizingColumn: n.id
1235
1501
  }));
1236
1502
  };
@@ -1242,7 +1508,7 @@ const le = {
1242
1508
  e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
1243
1509
  }, e.resetHeaderSizeInfo = (o) => {
1244
1510
  var t;
1245
- e.setColumnSizingInfo(o ? pe() : (t = e.initialState.columnSizingInfo) != null ? t : pe());
1511
+ e.setColumnSizingInfo(o ? ve() : (t = e.initialState.columnSizingInfo) != null ? t : ve());
1246
1512
  }, e.getTotalSize = () => {
1247
1513
  var o, t;
1248
1514
  return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
@@ -1258,9 +1524,9 @@ const le = {
1258
1524
  };
1259
1525
  }
1260
1526
  };
1261
- let ie = null;
1262
- function un() {
1263
- if (typeof ie == "boolean") return ie;
1527
+ let se = null;
1528
+ function mn() {
1529
+ if (typeof se == "boolean") return se;
1264
1530
  let e = !1;
1265
1531
  try {
1266
1532
  const o = {
@@ -1273,12 +1539,12 @@ function un() {
1273
1539
  } catch {
1274
1540
  e = !1;
1275
1541
  }
1276
- return ie = e, ie;
1542
+ return se = e, se;
1277
1543
  }
1278
- function me(e) {
1544
+ function we(e) {
1279
1545
  return e.type === "touchstart";
1280
1546
  }
1281
- const fn = {
1547
+ const hn = {
1282
1548
  getInitialState: (e) => ({
1283
1549
  columnVisibility: {},
1284
1550
  ...e
@@ -1304,10 +1570,10 @@ const fn = {
1304
1570
  };
1305
1571
  },
1306
1572
  createRow: (e, o) => {
1307
- e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), R(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], R(o.options, "debugRows", "getVisibleCells"));
1573
+ e._getAllVisibleCells = y(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), R(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = y(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], R(o.options, "debugRows", "getVisibleCells"));
1308
1574
  },
1309
1575
  createTable: (e) => {
1310
- const o = (t, n) => S(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), R(e.options, "debugColumns", t));
1576
+ const o = (t, n) => y(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((l) => l.getIsVisible == null ? void 0 : l.getIsVisible()), R(e.options, "debugColumns", t));
1311
1577
  e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
1312
1578
  var n;
1313
1579
  e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
@@ -1323,17 +1589,17 @@ const fn = {
1323
1589
  };
1324
1590
  }
1325
1591
  };
1326
- function ne(e, o) {
1592
+ function oe(e, o) {
1327
1593
  return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
1328
1594
  }
1329
- const dn = {
1595
+ const vn = {
1330
1596
  createTable: (e) => {
1331
1597
  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 = () => {
1332
1598
  if (e._getGlobalFacetedMinMaxValues)
1333
1599
  return e._getGlobalFacetedMinMaxValues();
1334
1600
  };
1335
1601
  }
1336
- }, gn = {
1602
+ }, wn = {
1337
1603
  getInitialState: (e) => ({
1338
1604
  globalFilter: void 0,
1339
1605
  ...e
@@ -1359,14 +1625,14 @@ const dn = {
1359
1625
  const {
1360
1626
  globalFilterFn: n
1361
1627
  } = e.options;
1362
- return ae(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
1628
+ return ue(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : B[n];
1363
1629
  }, e.setGlobalFilter = (o) => {
1364
1630
  e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
1365
1631
  }, e.resetGlobalFilter = (o) => {
1366
1632
  e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
1367
1633
  };
1368
1634
  }
1369
- }, cn = {
1635
+ }, Cn = {
1370
1636
  getInitialState: (e) => ({
1371
1637
  expanded: {},
1372
1638
  ...e
@@ -1418,8 +1684,8 @@ const dn = {
1418
1684
  var r;
1419
1685
  const l = n === !0 ? !0 : !!(n != null && n[e.id]);
1420
1686
  let i = {};
1421
- if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((a) => {
1422
- i[a] = !0;
1687
+ if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((s) => {
1688
+ i[s] = !0;
1423
1689
  }) : i = n, t = (r = t) != null ? r : !l, !l && t)
1424
1690
  return {
1425
1691
  ...i,
@@ -1427,7 +1693,7 @@ const dn = {
1427
1693
  };
1428
1694
  if (l && !t) {
1429
1695
  const {
1430
- [e.id]: a,
1696
+ [e.id]: s,
1431
1697
  ...u
1432
1698
  } = i;
1433
1699
  return u;
@@ -1453,14 +1719,14 @@ const dn = {
1453
1719
  };
1454
1720
  };
1455
1721
  }
1456
- }, ye = 0, xe = 10, he = () => ({
1457
- pageIndex: ye,
1458
- pageSize: xe
1459
- }), pn = {
1722
+ }, Fe = 0, $e = 10, Ce = () => ({
1723
+ pageIndex: Fe,
1724
+ pageSize: $e
1725
+ }), Sn = {
1460
1726
  getInitialState: (e) => ({
1461
1727
  ...e,
1462
1728
  pagination: {
1463
- ...he(),
1729
+ ...Ce(),
1464
1730
  ...e == null ? void 0 : e.pagination
1465
1731
  }
1466
1732
  }),
@@ -1484,14 +1750,14 @@ const dn = {
1484
1750
  });
1485
1751
  }
1486
1752
  }, e.setPagination = (n) => {
1487
- const r = (l) => q(n, l);
1753
+ const r = (l) => j(n, l);
1488
1754
  return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1489
1755
  }, e.resetPagination = (n) => {
1490
1756
  var r;
1491
- e.setPagination(n ? he() : (r = e.initialState.pagination) != null ? r : he());
1757
+ e.setPagination(n ? Ce() : (r = e.initialState.pagination) != null ? r : Ce());
1492
1758
  }, e.setPageIndex = (n) => {
1493
1759
  e.setPagination((r) => {
1494
- let l = q(n, r.pageIndex);
1760
+ let l = j(n, r.pageIndex);
1495
1761
  const i = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1496
1762
  return l = Math.max(0, Math.min(l, i)), {
1497
1763
  ...r,
@@ -1500,27 +1766,27 @@ const dn = {
1500
1766
  });
1501
1767
  }, e.resetPageIndex = (n) => {
1502
1768
  var r, l;
1503
- e.setPageIndex(n ? ye : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : ye);
1769
+ e.setPageIndex(n ? Fe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageIndex) != null ? r : Fe);
1504
1770
  }, e.resetPageSize = (n) => {
1505
1771
  var r, l;
1506
- e.setPageSize(n ? xe : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : xe);
1772
+ e.setPageSize(n ? $e : (r = (l = e.initialState) == null || (l = l.pagination) == null ? void 0 : l.pageSize) != null ? r : $e);
1507
1773
  }, e.setPageSize = (n) => {
1508
1774
  e.setPagination((r) => {
1509
- const l = Math.max(1, q(n, r.pageSize)), i = r.pageSize * r.pageIndex, a = Math.floor(i / l);
1775
+ const l = Math.max(1, j(n, r.pageSize)), i = r.pageSize * r.pageIndex, s = Math.floor(i / l);
1510
1776
  return {
1511
1777
  ...r,
1512
- pageIndex: a,
1778
+ pageIndex: s,
1513
1779
  pageSize: l
1514
1780
  };
1515
1781
  });
1516
1782
  }, e.setPageCount = (n) => e.setPagination((r) => {
1517
1783
  var l;
1518
- let i = q(n, (l = e.options.pageCount) != null ? l : -1);
1784
+ let i = j(n, (l = e.options.pageCount) != null ? l : -1);
1519
1785
  return typeof i == "number" && (i = Math.max(-1, i)), {
1520
1786
  ...r,
1521
1787
  pageCount: i
1522
1788
  };
1523
- }), e.getPageOptions = S(() => [e.getPageCount()], (n) => {
1789
+ }), e.getPageOptions = y(() => [e.getPageCount()], (n) => {
1524
1790
  let r = [];
1525
1791
  return n && n > 0 && (r = [...new Array(n)].fill(null).map((l, i) => i)), r;
1526
1792
  }, R(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
@@ -1536,12 +1802,12 @@ const dn = {
1536
1802
  return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1537
1803
  };
1538
1804
  }
1539
- }, we = () => ({
1805
+ }, Se = () => ({
1540
1806
  top: [],
1541
1807
  bottom: []
1542
- }), mn = {
1808
+ }), yn = {
1543
1809
  getInitialState: (e) => ({
1544
- rowPinning: we(),
1810
+ rowPinning: Se(),
1545
1811
  ...e
1546
1812
  }),
1547
1813
  getDefaultOptions: (e) => ({
@@ -1559,26 +1825,26 @@ const dn = {
1559
1825
  id: f
1560
1826
  } = u;
1561
1827
  return f;
1562
- }) : [], a = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1828
+ }) : [], s = /* @__PURE__ */ new Set([...i, e.id, ...l]);
1563
1829
  o.setRowPinning((u) => {
1564
- var f, p;
1830
+ var f, g;
1565
1831
  if (t === "bottom") {
1566
- var c, d;
1832
+ var p, d;
1567
1833
  return {
1568
- top: ((c = u == null ? void 0 : u.top) != null ? c : []).filter((h) => !(a != null && a.has(h))),
1569
- bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)]
1834
+ top: ((p = u == null ? void 0 : u.top) != null ? p : []).filter((v) => !(s != null && s.has(v))),
1835
+ bottom: [...((d = u == null ? void 0 : u.bottom) != null ? d : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)]
1570
1836
  };
1571
1837
  }
1572
1838
  if (t === "top") {
1573
- var s, m;
1839
+ var a, m;
1574
1840
  return {
1575
- top: [...((s = u == null ? void 0 : u.top) != null ? s : []).filter((h) => !(a != null && a.has(h))), ...Array.from(a)],
1576
- bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((h) => !(a != null && a.has(h)))
1841
+ top: [...((a = u == null ? void 0 : u.top) != null ? a : []).filter((v) => !(s != null && s.has(v))), ...Array.from(s)],
1842
+ bottom: ((m = u == null ? void 0 : u.bottom) != null ? m : []).filter((v) => !(s != null && s.has(v)))
1577
1843
  };
1578
1844
  }
1579
1845
  return {
1580
- top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((h) => !(a != null && a.has(h))),
1581
- bottom: ((p = u == null ? void 0 : u.bottom) != null ? p : []).filter((h) => !(a != null && a.has(h)))
1846
+ top: ((f = u == null ? void 0 : u.top) != null ? f : []).filter((v) => !(s != null && s.has(v))),
1847
+ bottom: ((g = u == null ? void 0 : u.bottom) != null ? g : []).filter((v) => !(s != null && s.has(v)))
1582
1848
  };
1583
1849
  });
1584
1850
  }, e.getCanPin = () => {
@@ -1592,7 +1858,7 @@ const dn = {
1592
1858
  const t = [e.id], {
1593
1859
  top: n,
1594
1860
  bottom: r
1595
- } = 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));
1861
+ } = 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));
1596
1862
  return l ? "top" : i ? "bottom" : !1;
1597
1863
  }, e.getPinnedIndex = () => {
1598
1864
  var t, n;
@@ -1600,9 +1866,9 @@ const dn = {
1600
1866
  if (!r) return -1;
1601
1867
  const l = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((i) => {
1602
1868
  let {
1603
- id: a
1869
+ id: s
1604
1870
  } = i;
1605
- return a;
1871
+ return s;
1606
1872
  });
1607
1873
  return (n = l == null ? void 0 : l.indexOf(e.id)) != null ? n : -1;
1608
1874
  };
@@ -1610,7 +1876,7 @@ const dn = {
1610
1876
  createTable: (e) => {
1611
1877
  e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1612
1878
  var t, n;
1613
- return e.setRowPinning(o ? we() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : we());
1879
+ return e.setRowPinning(o ? Se() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : Se());
1614
1880
  }, e.getIsSomeRowsPinned = (o) => {
1615
1881
  var t;
1616
1882
  const n = e.getState().rowPinning;
@@ -1625,22 +1891,22 @@ const dn = {
1625
1891
  //get all rows that are pinned even if they would not be otherwise visible
1626
1892
  //account for expanded parent rows, but not pagination or filtering
1627
1893
  (t ?? []).map((i) => {
1628
- const a = e.getRow(i, !0);
1629
- return a.getIsAllParentsExpanded() ? a : null;
1894
+ const s = e.getRow(i, !0);
1895
+ return s.getIsAllParentsExpanded() ? s : null;
1630
1896
  })
1631
1897
  ) : (
1632
1898
  //else get only visible rows that are pinned
1633
- (t ?? []).map((i) => o.find((a) => a.id === i))
1899
+ (t ?? []).map((i) => o.find((s) => s.id === i))
1634
1900
  )).filter(Boolean).map((i) => ({
1635
1901
  ...i,
1636
1902
  position: n
1637
1903
  }));
1638
- }, e.getTopRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1904
+ }, e.getTopRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), R(e.options, "debugRows", "getTopRows")), e.getBottomRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), R(e.options, "debugRows", "getBottomRows")), e.getCenterRows = y(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1639
1905
  const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1640
1906
  return o.filter((l) => !r.has(l.id));
1641
1907
  }, R(e.options, "debugRows", "getCenterRows"));
1642
1908
  }
1643
- }, hn = {
1909
+ }, Rn = {
1644
1910
  getInitialState: (e) => ({
1645
1911
  rowSelection: {},
1646
1912
  ...e
@@ -1675,17 +1941,17 @@ const dn = {
1675
1941
  ...t
1676
1942
  };
1677
1943
  return e.getRowModel().rows.forEach((l) => {
1678
- _e(r, l.id, n, !0, e);
1944
+ Ie(r, l.id, n, !0, e);
1679
1945
  }), r;
1680
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ve(e, t) : {
1946
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = y(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1681
1947
  rows: [],
1682
1948
  flatRows: [],
1683
1949
  rowsById: {}
1684
- }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ve(e, t) : {
1950
+ }, R(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = y(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1685
1951
  rows: [],
1686
1952
  flatRows: [],
1687
1953
  rowsById: {}
1688
- }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ve(e, t) : {
1954
+ }, R(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = y(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? ye(e, t) : {
1689
1955
  rows: [],
1690
1956
  flatRows: [],
1691
1957
  rowsById: {}
@@ -1721,26 +1987,26 @@ const dn = {
1721
1987
  var i;
1722
1988
  if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1723
1989
  return l;
1724
- const a = {
1990
+ const s = {
1725
1991
  ...l
1726
1992
  };
1727
- return _e(a, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), a;
1993
+ return Ie(s, e.id, t, (i = n == null ? void 0 : n.selectChildren) != null ? i : !0, o), s;
1728
1994
  });
1729
1995
  }, e.getIsSelected = () => {
1730
1996
  const {
1731
1997
  rowSelection: t
1732
1998
  } = o.getState();
1733
- return Ee(e, t);
1999
+ return Le(e, t);
1734
2000
  }, e.getIsSomeSelected = () => {
1735
2001
  const {
1736
2002
  rowSelection: t
1737
2003
  } = o.getState();
1738
- return Fe(e, t) === "some";
2004
+ return Me(e, t) === "some";
1739
2005
  }, e.getIsAllSubRowsSelected = () => {
1740
2006
  const {
1741
2007
  rowSelection: t
1742
2008
  } = o.getState();
1743
- return Fe(e, t) === "all";
2009
+ return Me(e, t) === "all";
1744
2010
  }, e.getCanSelect = () => {
1745
2011
  var t;
1746
2012
  return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
@@ -1758,20 +2024,20 @@ const dn = {
1758
2024
  };
1759
2025
  };
1760
2026
  }
1761
- }, _e = (e, o, t, n, r) => {
2027
+ }, Ie = (e, o, t, n, r) => {
1762
2028
  var l;
1763
2029
  const i = r.getRow(o, !0);
1764
- 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) => _e(e, a.id, t, n, r));
2030
+ 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) => Ie(e, s.id, t, n, r));
1765
2031
  };
1766
- function ve(e, o) {
1767
- const t = e.getState().rowSelection, n = [], r = {}, l = function(i, a) {
2032
+ function ye(e, o) {
2033
+ const t = e.getState().rowSelection, n = [], r = {}, l = function(i, s) {
1768
2034
  return i.map((u) => {
1769
2035
  var f;
1770
- const p = Ee(u, t);
1771
- if (p && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
2036
+ const g = Le(u, t);
2037
+ if (g && (n.push(u), r[u.id] = u), (f = u.subRows) != null && f.length && (u = {
1772
2038
  ...u,
1773
2039
  subRows: l(u.subRows)
1774
- }), p)
2040
+ }), g)
1775
2041
  return u;
1776
2042
  }).filter(Boolean);
1777
2043
  };
@@ -1781,35 +2047,35 @@ function ve(e, o) {
1781
2047
  rowsById: r
1782
2048
  };
1783
2049
  }
1784
- function Ee(e, o) {
2050
+ function Le(e, o) {
1785
2051
  var t;
1786
2052
  return (t = o[e.id]) != null ? t : !1;
1787
2053
  }
1788
- function Fe(e, o, t) {
2054
+ function Me(e, o, t) {
1789
2055
  var n;
1790
2056
  if (!((n = e.subRows) != null && n.length)) return !1;
1791
2057
  let r = !0, l = !1;
1792
2058
  return e.subRows.forEach((i) => {
1793
- if (!(l && !r) && (i.getCanSelect() && (Ee(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
1794
- const a = Fe(i, o);
1795
- a === "all" ? l = !0 : (a === "some" && (l = !0), r = !1);
2059
+ if (!(l && !r) && (i.getCanSelect() && (Le(i, o) ? l = !0 : r = !1), i.subRows && i.subRows.length)) {
2060
+ const s = Me(i, o);
2061
+ s === "all" ? l = !0 : (s === "some" && (l = !0), r = !1);
1796
2062
  }
1797
2063
  }), r ? "all" : l ? "some" : !1;
1798
2064
  }
1799
- const $e = /([0-9]+)/gm, wn = (e, o, t) => ot(U(e.getValue(t)).toLowerCase(), U(o.getValue(t)).toLowerCase()), vn = (e, o, t) => ot(U(e.getValue(t)), U(o.getValue(t))), Cn = (e, o, t) => De(U(e.getValue(t)).toLowerCase(), U(o.getValue(t)).toLowerCase()), Sn = (e, o, t) => De(U(e.getValue(t)), U(o.getValue(t))), Rn = (e, o, t) => {
2065
+ const Ve = /([0-9]+)/gm, xn = (e, o, t) => lt(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), _n = (e, o, t) => lt(X(e.getValue(t)), X(o.getValue(t))), Fn = (e, o, t) => ze(X(e.getValue(t)).toLowerCase(), X(o.getValue(t)).toLowerCase()), $n = (e, o, t) => ze(X(e.getValue(t)), X(o.getValue(t))), In = (e, o, t) => {
1800
2066
  const n = e.getValue(t), r = o.getValue(t);
1801
2067
  return n > r ? 1 : n < r ? -1 : 0;
1802
- }, yn = (e, o, t) => De(e.getValue(t), o.getValue(t));
1803
- function De(e, o) {
2068
+ }, Mn = (e, o, t) => ze(e.getValue(t), o.getValue(t));
2069
+ function ze(e, o) {
1804
2070
  return e === o ? 0 : e > o ? 1 : -1;
1805
2071
  }
1806
- function U(e) {
2072
+ function X(e) {
1807
2073
  return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1808
2074
  }
1809
- function ot(e, o) {
1810
- const t = e.split($e).filter(Boolean), n = o.split($e).filter(Boolean);
2075
+ function lt(e, o) {
2076
+ const t = e.split(Ve).filter(Boolean), n = o.split(Ve).filter(Boolean);
1811
2077
  for (; t.length && n.length; ) {
1812
- const r = t.shift(), l = n.shift(), i = parseInt(r, 10), a = parseInt(l, 10), u = [i, a].sort();
2078
+ const r = t.shift(), l = n.shift(), i = parseInt(r, 10), s = parseInt(l, 10), u = [i, s].sort();
1813
2079
  if (isNaN(u[0])) {
1814
2080
  if (r > l)
1815
2081
  return 1;
@@ -1819,21 +2085,21 @@ function ot(e, o) {
1819
2085
  }
1820
2086
  if (isNaN(u[1]))
1821
2087
  return isNaN(i) ? -1 : 1;
1822
- if (i > a)
2088
+ if (i > s)
1823
2089
  return 1;
1824
- if (a > i)
2090
+ if (s > i)
1825
2091
  return -1;
1826
2092
  }
1827
2093
  return t.length - n.length;
1828
2094
  }
1829
- const te = {
1830
- alphanumeric: wn,
1831
- alphanumericCaseSensitive: vn,
1832
- text: Cn,
1833
- textCaseSensitive: Sn,
1834
- datetime: Rn,
1835
- basic: yn
1836
- }, xn = {
2095
+ const ne = {
2096
+ alphanumeric: xn,
2097
+ alphanumericCaseSensitive: _n,
2098
+ text: Fn,
2099
+ textCaseSensitive: $n,
2100
+ datetime: In,
2101
+ basic: Mn
2102
+ }, Vn = {
1837
2103
  getInitialState: (e) => ({
1838
2104
  sorting: [],
1839
2105
  ...e
@@ -1853,11 +2119,11 @@ const te = {
1853
2119
  for (const r of t) {
1854
2120
  const l = r == null ? void 0 : r.getValue(e.id);
1855
2121
  if (Object.prototype.toString.call(l) === "[object Date]")
1856
- return te.datetime;
1857
- if (typeof l == "string" && (n = !0, l.split($e).length > 1))
1858
- return te.alphanumeric;
2122
+ return ne.datetime;
2123
+ if (typeof l == "string" && (n = !0, l.split(Ve).length > 1))
2124
+ return ne.alphanumeric;
1859
2125
  }
1860
- return n ? te.text : te.basic;
2126
+ return n ? ne.text : ne.basic;
1861
2127
  }, e.getAutoSortDir = () => {
1862
2128
  const t = o.getFilteredRowModel().flatRows[0];
1863
2129
  return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
@@ -1865,24 +2131,24 @@ const te = {
1865
2131
  var t, n;
1866
2132
  if (!e)
1867
2133
  throw new Error();
1868
- return ae(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 : te[e.columnDef.sortingFn];
2134
+ return ue(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 : ne[e.columnDef.sortingFn];
1869
2135
  }, e.toggleSorting = (t, n) => {
1870
2136
  const r = e.getNextSortingOrder(), l = typeof t < "u" && t !== null;
1871
2137
  o.setSorting((i) => {
1872
- 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);
1873
- let f = [], p, c = l ? t : r === "desc";
1874
- if (i != null && i.length && e.getCanMultiSort() && n ? a ? p = "toggle" : p = "add" : i != null && i.length && u !== i.length - 1 ? p = "replace" : a ? p = "toggle" : p = "replace", p === "toggle" && (l || r || (p = "remove")), p === "add") {
2138
+ 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);
2139
+ let f = [], g, p = l ? t : r === "desc";
2140
+ if (i != null && i.length && e.getCanMultiSort() && n ? s ? g = "toggle" : g = "add" : i != null && i.length && u !== i.length - 1 ? g = "replace" : s ? g = "toggle" : g = "replace", g === "toggle" && (l || r || (g = "remove")), g === "add") {
1875
2141
  var d;
1876
2142
  f = [...i, {
1877
2143
  id: e.id,
1878
- desc: c
2144
+ desc: p
1879
2145
  }], f.splice(0, f.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
1880
- } else p === "toggle" ? f = i.map((s) => s.id === e.id ? {
1881
- ...s,
1882
- desc: c
1883
- } : s) : p === "remove" ? f = i.filter((s) => s.id !== e.id) : f = [{
2146
+ } else g === "toggle" ? f = i.map((a) => a.id === e.id ? {
2147
+ ...a,
2148
+ desc: p
2149
+ } : a) : g === "remove" ? f = i.filter((a) => a.id !== e.id) : f = [{
1884
2150
  id: e.id,
1885
- desc: c
2151
+ desc: p
1886
2152
  }];
1887
2153
  return f;
1888
2154
  });
@@ -1922,34 +2188,34 @@ const te = {
1922
2188
  e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1923
2189
  }, 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());
1924
2190
  }
1925
- }, _n = [
1926
- qt,
1927
- fn,
1928
- rn,
1929
- ln,
1930
- jt,
1931
- Ut,
2191
+ }, Nn = [
2192
+ Qt,
2193
+ hn,
1932
2194
  dn,
2195
+ cn,
2196
+ Yt,
2197
+ Jt,
2198
+ vn,
1933
2199
  //depends on ColumnFaceting
1934
- gn,
2200
+ wn,
1935
2201
  //depends on ColumnFiltering
1936
- xn,
1937
- nn,
2202
+ Vn,
2203
+ un,
1938
2204
  //depends on RowSorting
1939
- cn,
1940
- pn,
1941
- mn,
1942
- hn,
1943
- an
2205
+ Cn,
2206
+ Sn,
2207
+ yn,
2208
+ Rn,
2209
+ pn
1944
2210
  ];
1945
- function Fn(e) {
2211
+ function Pn(e) {
1946
2212
  var o, t;
1947
2213
  process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1948
- const n = [..._n, ...(o = e._features) != null ? o : []];
2214
+ const n = [...Nn, ...(o = e._features) != null ? o : []];
1949
2215
  let r = {
1950
2216
  _features: n
1951
2217
  };
1952
- 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) : {
2218
+ 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) : {
1953
2219
  ...l,
1954
2220
  ...d
1955
2221
  };
@@ -1958,12 +2224,12 @@ function Fn(e) {
1958
2224
  ...(t = e.initialState) != null ? t : {}
1959
2225
  };
1960
2226
  r._features.forEach((d) => {
1961
- var s;
1962
- u = (s = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? s : u;
2227
+ var a;
2228
+ u = (a = d.getInitialState == null ? void 0 : d.getInitialState(u)) != null ? a : u;
1963
2229
  });
1964
2230
  const f = [];
1965
- let p = !1;
1966
- const c = {
2231
+ let g = !1;
2232
+ const p = {
1967
2233
  _features: n,
1968
2234
  options: {
1969
2235
  ...l,
@@ -1971,106 +2237,106 @@ function Fn(e) {
1971
2237
  },
1972
2238
  initialState: u,
1973
2239
  _queue: (d) => {
1974
- f.push(d), p || (p = !0, Promise.resolve().then(() => {
2240
+ f.push(d), g || (g = !0, Promise.resolve().then(() => {
1975
2241
  for (; f.length; )
1976
2242
  f.shift()();
1977
- p = !1;
1978
- }).catch((s) => setTimeout(() => {
1979
- throw s;
2243
+ g = !1;
2244
+ }).catch((a) => setTimeout(() => {
2245
+ throw a;
1980
2246
  })));
1981
2247
  },
1982
2248
  reset: () => {
1983
2249
  r.setState(r.initialState);
1984
2250
  },
1985
2251
  setOptions: (d) => {
1986
- const s = q(d, r.options);
1987
- r.options = i(s);
2252
+ const a = j(d, r.options);
2253
+ r.options = i(a);
1988
2254
  },
1989
2255
  getState: () => r.options.state,
1990
2256
  setState: (d) => {
1991
2257
  r.options.onStateChange == null || r.options.onStateChange(d);
1992
2258
  },
1993
- _getRowId: (d, s, m) => {
1994
- var h;
1995
- return (h = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s, m)) != null ? h : `${m ? [m.id, s].join(".") : s}`;
2259
+ _getRowId: (d, a, m) => {
2260
+ var v;
2261
+ return (v = r.options.getRowId == null ? void 0 : r.options.getRowId(d, a, m)) != null ? v : `${m ? [m.id, a].join(".") : a}`;
1996
2262
  },
1997
2263
  getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1998
2264
  // The final calls start at the bottom of the model,
1999
2265
  // expanded rows, which then work their way up
2000
2266
  getRowModel: () => r.getPaginationRowModel(),
2001
2267
  //in next version, we should just pass in the row model as the optional 2nd arg
2002
- getRow: (d, s) => {
2003
- let m = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
2268
+ getRow: (d, a) => {
2269
+ let m = (a ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
2004
2270
  if (!m && (m = r.getCoreRowModel().rowsById[d], !m))
2005
2271
  throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
2006
2272
  return m;
2007
2273
  },
2008
- _getDefaultColumnDef: S(() => [r.options.defaultColumn], (d) => {
2009
- var s;
2010
- return d = (s = d) != null ? s : {}, {
2274
+ _getDefaultColumnDef: y(() => [r.options.defaultColumn], (d) => {
2275
+ var a;
2276
+ return d = (a = d) != null ? a : {}, {
2011
2277
  header: (m) => {
2012
- const h = m.header.column.columnDef;
2013
- return h.accessorKey ? h.accessorKey : h.accessorFn ? h.id : null;
2278
+ const v = m.header.column.columnDef;
2279
+ return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
2014
2280
  },
2015
2281
  // footer: props => props.header.column.id,
2016
2282
  cell: (m) => {
2017
- var h, w;
2018
- return (h = (w = m.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? h : null;
2283
+ var v, C;
2284
+ return (v = (C = m.renderValue()) == null || C.toString == null ? void 0 : C.toString()) != null ? v : null;
2019
2285
  },
2020
- ...r._features.reduce((m, h) => Object.assign(m, h.getDefaultColumnDef == null ? void 0 : h.getDefaultColumnDef()), {}),
2286
+ ...r._features.reduce((m, v) => Object.assign(m, v.getDefaultColumnDef == null ? void 0 : v.getDefaultColumnDef()), {}),
2021
2287
  ...d
2022
2288
  };
2023
2289
  }, R(e, "debugColumns", "_getDefaultColumnDef")),
2024
2290
  _getColumnDefs: () => r.options.columns,
2025
- getAllColumns: S(() => [r._getColumnDefs()], (d) => {
2026
- const s = function(m, h, w) {
2027
- return w === void 0 && (w = 0), m.map((C) => {
2028
- const x = Tt(r, C, w, h), F = C;
2029
- return x.columns = F.columns ? s(F.columns, x, w + 1) : [], x;
2291
+ getAllColumns: y(() => [r._getColumnDefs()], (d) => {
2292
+ const a = function(m, v, C) {
2293
+ return C === void 0 && (C = 0), m.map((h) => {
2294
+ const S = Wt(r, h, C, v), x = h;
2295
+ return S.columns = x.columns ? a(x.columns, S, C + 1) : [], S;
2030
2296
  });
2031
2297
  };
2032
- return s(d);
2298
+ return a(d);
2033
2299
  }, R(e, "debugColumns", "getAllColumns")),
2034
- getAllFlatColumns: S(() => [r.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
2035
- _getAllFlatColumnsById: S(() => [r.getAllFlatColumns()], (d) => d.reduce((s, m) => (s[m.id] = m, s), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
2036
- getAllLeafColumns: S(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, s) => {
2037
- let m = d.flatMap((h) => h.getLeafColumns());
2038
- return s(m);
2300
+ getAllFlatColumns: y(() => [r.getAllColumns()], (d) => d.flatMap((a) => a.getFlatColumns()), R(e, "debugColumns", "getAllFlatColumns")),
2301
+ _getAllFlatColumnsById: y(() => [r.getAllFlatColumns()], (d) => d.reduce((a, m) => (a[m.id] = m, a), {}), R(e, "debugColumns", "getAllFlatColumnsById")),
2302
+ getAllLeafColumns: y(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, a) => {
2303
+ let m = d.flatMap((v) => v.getLeafColumns());
2304
+ return a(m);
2039
2305
  }, R(e, "debugColumns", "getAllLeafColumns")),
2040
2306
  getColumn: (d) => {
2041
- const s = r._getAllFlatColumnsById()[d];
2042
- return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
2307
+ const a = r._getAllFlatColumnsById()[d];
2308
+ return process.env.NODE_ENV !== "production" && !a && console.error(`[Table] Column with id '${d}' does not exist.`), a;
2043
2309
  }
2044
2310
  };
2045
- Object.assign(r, c);
2311
+ Object.assign(r, p);
2046
2312
  for (let d = 0; d < r._features.length; d++) {
2047
- const s = r._features[d];
2048
- s == null || s.createTable == null || s.createTable(r);
2313
+ const a = r._features[d];
2314
+ a == null || a.createTable == null || a.createTable(r);
2049
2315
  }
2050
2316
  return r;
2051
2317
  }
2052
- function $n() {
2053
- return (e) => S(() => [e.options.data], (o) => {
2318
+ function kn() {
2319
+ return (e) => y(() => [e.options.data], (o) => {
2054
2320
  const t = {
2055
2321
  rows: [],
2056
2322
  flatRows: [],
2057
2323
  rowsById: {}
2058
2324
  }, n = function(r, l, i) {
2059
2325
  l === void 0 && (l = 0);
2060
- const a = [];
2326
+ const s = [];
2061
2327
  for (let f = 0; f < r.length; f++) {
2062
- const p = Ne(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2063
- if (t.flatRows.push(p), t.rowsById[p.id] = p, a.push(p), e.options.getSubRows) {
2328
+ const g = Ee(e, e._getRowId(r[f], f, i), r[f], f, l, void 0, i == null ? void 0 : i.id);
2329
+ if (t.flatRows.push(g), t.rowsById[g.id] = g, s.push(g), e.options.getSubRows) {
2064
2330
  var u;
2065
- p.originalSubRows = e.options.getSubRows(r[f], f), (u = p.originalSubRows) != null && u.length && (p.subRows = n(p.originalSubRows, l + 1, p));
2331
+ g.originalSubRows = e.options.getSubRows(r[f], f), (u = g.originalSubRows) != null && u.length && (g.subRows = n(g.originalSubRows, l + 1, g));
2066
2332
  }
2067
2333
  }
2068
- return a;
2334
+ return s;
2069
2335
  };
2070
2336
  return t.rows = n(o), t;
2071
2337
  }, R(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
2072
2338
  }
2073
- function Mn(e) {
2339
+ function En(e) {
2074
2340
  const o = [], t = (n) => {
2075
2341
  var r;
2076
2342
  o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
@@ -2081,64 +2347,64 @@ function Mn(e) {
2081
2347
  rowsById: e.rowsById
2082
2348
  };
2083
2349
  }
2084
- function In(e, o, t) {
2085
- return t.options.filterFromLeafRows ? Vn(e, o, t) : Nn(e, o, t);
2350
+ function Dn(e, o, t) {
2351
+ return t.options.filterFromLeafRows ? Ln(e, o, t) : zn(e, o, t);
2086
2352
  }
2087
- function Vn(e, o, t) {
2353
+ function Ln(e, o, t) {
2088
2354
  var n;
2089
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2355
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2090
2356
  f === void 0 && (f = 0);
2091
- const p = [];
2357
+ const g = [];
2092
2358
  for (let d = 0; d < u.length; d++) {
2093
- var c;
2094
- let s = u[d];
2095
- const m = Ne(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2096
- if (m.columnFilters = s.columnFilters, (c = s.subRows) != null && c.length && f < i) {
2097
- if (m.subRows = a(s.subRows, f + 1), s = m, o(s) && !m.subRows.length) {
2098
- p.push(s), l[s.id] = s, r.push(s);
2359
+ var p;
2360
+ let a = u[d];
2361
+ const m = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2362
+ if (m.columnFilters = a.columnFilters, (p = a.subRows) != null && p.length && f < i) {
2363
+ if (m.subRows = s(a.subRows, f + 1), a = m, o(a) && !m.subRows.length) {
2364
+ g.push(a), l[a.id] = a, r.push(a);
2099
2365
  continue;
2100
2366
  }
2101
- if (o(s) || m.subRows.length) {
2102
- p.push(s), l[s.id] = s, r.push(s);
2367
+ if (o(a) || m.subRows.length) {
2368
+ g.push(a), l[a.id] = a, r.push(a);
2103
2369
  continue;
2104
2370
  }
2105
2371
  } else
2106
- s = m, o(s) && (p.push(s), l[s.id] = s, r.push(s));
2372
+ a = m, o(a) && (g.push(a), l[a.id] = a, r.push(a));
2107
2373
  }
2108
- return p;
2374
+ return g;
2109
2375
  };
2110
2376
  return {
2111
- rows: a(e),
2377
+ rows: s(e),
2112
2378
  flatRows: r,
2113
2379
  rowsById: l
2114
2380
  };
2115
2381
  }
2116
- function Nn(e, o, t) {
2382
+ function zn(e, o, t) {
2117
2383
  var n;
2118
- const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, a = function(u, f) {
2384
+ const r = [], l = {}, i = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, s = function(u, f) {
2119
2385
  f === void 0 && (f = 0);
2120
- const p = [];
2386
+ const g = [];
2121
2387
  for (let d = 0; d < u.length; d++) {
2122
- let s = u[d];
2123
- if (o(s)) {
2124
- var c;
2125
- if ((c = s.subRows) != null && c.length && f < i) {
2126
- const h = Ne(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
2127
- h.subRows = a(s.subRows, f + 1), s = h;
2388
+ let a = u[d];
2389
+ if (o(a)) {
2390
+ var p;
2391
+ if ((p = a.subRows) != null && p.length && f < i) {
2392
+ const v = Ee(t, a.id, a.original, a.index, a.depth, void 0, a.parentId);
2393
+ v.subRows = s(a.subRows, f + 1), a = v;
2128
2394
  }
2129
- p.push(s), r.push(s), l[s.id] = s;
2395
+ g.push(a), r.push(a), l[a.id] = a;
2130
2396
  }
2131
2397
  }
2132
- return p;
2398
+ return g;
2133
2399
  };
2134
2400
  return {
2135
- rows: a(e),
2401
+ rows: s(e),
2136
2402
  flatRows: r,
2137
2403
  rowsById: l
2138
2404
  };
2139
2405
  }
2140
- function Pn() {
2141
- return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2406
+ function Hn() {
2407
+ return (e) => y(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
2142
2408
  if (!o.rows.length || !(t != null && t.length) && !n) {
2143
2409
  for (let d = 0; d < o.flatRows.length; d++)
2144
2410
  o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
@@ -2146,66 +2412,66 @@ function Pn() {
2146
2412
  }
2147
2413
  const r = [], l = [];
2148
2414
  (t ?? []).forEach((d) => {
2149
- var s;
2415
+ var a;
2150
2416
  const m = e.getColumn(d.id);
2151
2417
  if (!m)
2152
2418
  return;
2153
- const h = m.getFilterFn();
2154
- if (!h) {
2419
+ const v = m.getFilterFn();
2420
+ if (!v) {
2155
2421
  process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);
2156
2422
  return;
2157
2423
  }
2158
2424
  r.push({
2159
2425
  id: d.id,
2160
- filterFn: h,
2161
- resolvedValue: (s = h.resolveFilterValue == null ? void 0 : h.resolveFilterValue(d.value)) != null ? s : d.value
2426
+ filterFn: v,
2427
+ resolvedValue: (a = v.resolveFilterValue == null ? void 0 : v.resolveFilterValue(d.value)) != null ? a : d.value
2162
2428
  });
2163
2429
  });
2164
- const i = (t ?? []).map((d) => d.id), a = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2165
- n && a && u.length && (i.push("__global__"), u.forEach((d) => {
2166
- var s;
2430
+ const i = (t ?? []).map((d) => d.id), s = e.getGlobalFilterFn(), u = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
2431
+ n && s && u.length && (i.push("__global__"), u.forEach((d) => {
2432
+ var a;
2167
2433
  l.push({
2168
2434
  id: d.id,
2169
- filterFn: a,
2170
- resolvedValue: (s = a.resolveFilterValue == null ? void 0 : a.resolveFilterValue(n)) != null ? s : n
2435
+ filterFn: s,
2436
+ resolvedValue: (a = s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(n)) != null ? a : n
2171
2437
  });
2172
2438
  }));
2173
- let f, p;
2439
+ let f, g;
2174
2440
  for (let d = 0; d < o.flatRows.length; d++) {
2175
- const s = o.flatRows[d];
2176
- if (s.columnFilters = {}, r.length)
2441
+ const a = o.flatRows[d];
2442
+ if (a.columnFilters = {}, r.length)
2177
2443
  for (let m = 0; m < r.length; m++) {
2178
2444
  f = r[m];
2179
- const h = f.id;
2180
- s.columnFilters[h] = f.filterFn(s, h, f.resolvedValue, (w) => {
2181
- s.columnFiltersMeta[h] = w;
2445
+ const v = f.id;
2446
+ a.columnFilters[v] = f.filterFn(a, v, f.resolvedValue, (C) => {
2447
+ a.columnFiltersMeta[v] = C;
2182
2448
  });
2183
2449
  }
2184
2450
  if (l.length) {
2185
2451
  for (let m = 0; m < l.length; m++) {
2186
- p = l[m];
2187
- const h = p.id;
2188
- if (p.filterFn(s, h, p.resolvedValue, (w) => {
2189
- s.columnFiltersMeta[h] = w;
2452
+ g = l[m];
2453
+ const v = g.id;
2454
+ if (g.filterFn(a, v, g.resolvedValue, (C) => {
2455
+ a.columnFiltersMeta[v] = C;
2190
2456
  })) {
2191
- s.columnFilters.__global__ = !0;
2457
+ a.columnFilters.__global__ = !0;
2192
2458
  break;
2193
2459
  }
2194
2460
  }
2195
- s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
2461
+ a.columnFilters.__global__ !== !0 && (a.columnFilters.__global__ = !1);
2196
2462
  }
2197
2463
  }
2198
- const c = (d) => {
2199
- for (let s = 0; s < i.length; s++)
2200
- if (d.columnFilters[i[s]] === !1)
2464
+ const p = (d) => {
2465
+ for (let a = 0; a < i.length; a++)
2466
+ if (d.columnFilters[i[a]] === !1)
2201
2467
  return !1;
2202
2468
  return !0;
2203
2469
  };
2204
- return In(o.rows, c, e);
2470
+ return Dn(o.rows, p, e);
2205
2471
  }, R(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
2206
2472
  }
2207
- function En(e) {
2208
- return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2473
+ function An(e) {
2474
+ return (o) => y(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
2209
2475
  if (!n.rows.length)
2210
2476
  return n;
2211
2477
  const {
@@ -2214,29 +2480,29 @@ function En(e) {
2214
2480
  } = t;
2215
2481
  let {
2216
2482
  rows: i,
2217
- flatRows: a,
2483
+ flatRows: s,
2218
2484
  rowsById: u
2219
2485
  } = n;
2220
- const f = r * l, p = f + r;
2221
- i = i.slice(f, p);
2222
- let c;
2223
- o.options.paginateExpandedRows ? c = {
2486
+ const f = r * l, g = f + r;
2487
+ i = i.slice(f, g);
2488
+ let p;
2489
+ o.options.paginateExpandedRows ? p = {
2224
2490
  rows: i,
2225
- flatRows: a,
2491
+ flatRows: s,
2226
2492
  rowsById: u
2227
- } : c = Mn({
2493
+ } : p = En({
2228
2494
  rows: i,
2229
- flatRows: a,
2495
+ flatRows: s,
2230
2496
  rowsById: u
2231
- }), c.flatRows = [];
2232
- const d = (s) => {
2233
- c.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
2497
+ }), p.flatRows = [];
2498
+ const d = (a) => {
2499
+ p.flatRows.push(a), a.subRows.length && a.subRows.forEach(d);
2234
2500
  };
2235
- return c.rows.forEach(d), c;
2501
+ return p.rows.forEach(d), p;
2236
2502
  }, R(o.options, "debugTable", "getPaginationRowModel"));
2237
2503
  }
2238
- function Dn() {
2239
- return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2504
+ function Gn() {
2505
+ return (e) => y(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
2240
2506
  if (!t.rows.length || !(o != null && o.length))
2241
2507
  return t;
2242
2508
  const n = e.getState().sorting, r = [], l = n.filter((u) => {
@@ -2251,34 +2517,34 @@ function Dn() {
2251
2517
  sortingFn: f.getSortingFn()
2252
2518
  });
2253
2519
  });
2254
- const a = (u) => {
2255
- const f = u.map((p) => ({
2256
- ...p
2520
+ const s = (u) => {
2521
+ const f = u.map((g) => ({
2522
+ ...g
2257
2523
  }));
2258
- return f.sort((p, c) => {
2259
- for (let s = 0; s < l.length; s += 1) {
2524
+ return f.sort((g, p) => {
2525
+ for (let a = 0; a < l.length; a += 1) {
2260
2526
  var d;
2261
- const m = l[s], h = i[m.id], w = h.sortUndefined, C = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2262
- let x = 0;
2263
- if (w) {
2264
- const F = p.getValue(m.id), E = c.getValue(m.id), I = F === void 0, D = E === void 0;
2265
- if (I || D) {
2266
- if (w === "first") return I ? -1 : 1;
2267
- if (w === "last") return I ? 1 : -1;
2268
- x = I && D ? 0 : I ? w : -w;
2527
+ const m = l[a], v = i[m.id], C = v.sortUndefined, h = (d = m == null ? void 0 : m.desc) != null ? d : !1;
2528
+ let S = 0;
2529
+ if (C) {
2530
+ const x = g.getValue(m.id), I = p.getValue(m.id), F = x === void 0, V = I === void 0;
2531
+ if (F || V) {
2532
+ if (C === "first") return F ? -1 : 1;
2533
+ if (C === "last") return F ? 1 : -1;
2534
+ S = F && V ? 0 : F ? C : -C;
2269
2535
  }
2270
2536
  }
2271
- if (x === 0 && (x = h.sortingFn(p, c, m.id)), x !== 0)
2272
- return C && (x *= -1), h.invertSorting && (x *= -1), x;
2537
+ if (S === 0 && (S = v.sortingFn(g, p, m.id)), S !== 0)
2538
+ return h && (S *= -1), v.invertSorting && (S *= -1), S;
2273
2539
  }
2274
- return p.index - c.index;
2275
- }), f.forEach((p) => {
2276
- var c;
2277
- r.push(p), (c = p.subRows) != null && c.length && (p.subRows = a(p.subRows));
2540
+ return g.index - p.index;
2541
+ }), f.forEach((g) => {
2542
+ var p;
2543
+ r.push(g), (p = g.subRows) != null && p.length && (g.subRows = s(g.subRows));
2278
2544
  }), f;
2279
2545
  };
2280
2546
  return {
2281
- rows: a(t.rows),
2547
+ rows: s(t.rows),
2282
2548
  flatRows: r,
2283
2549
  rowsById: t.rowsById
2284
2550
  };
@@ -2294,22 +2560,22 @@ function Dn() {
2294
2560
  *
2295
2561
  * @license MIT
2296
2562
  */
2297
- function je(e, o) {
2298
- return e ? kn(e) ? /* @__PURE__ */ Se.createElement(e, o) : e : null;
2563
+ function Ue(e, o) {
2564
+ return e ? bn(e) ? /* @__PURE__ */ xe.createElement(e, o) : e : null;
2299
2565
  }
2300
- function kn(e) {
2301
- return Ln(e) || typeof e == "function" || zn(e);
2566
+ function bn(e) {
2567
+ return On(e) || typeof e == "function" || Tn(e);
2302
2568
  }
2303
- function Ln(e) {
2569
+ function On(e) {
2304
2570
  return typeof e == "function" && (() => {
2305
2571
  const o = Object.getPrototypeOf(e);
2306
2572
  return o.prototype && o.prototype.isReactComponent;
2307
2573
  })();
2308
2574
  }
2309
- function zn(e) {
2575
+ function Tn(e) {
2310
2576
  return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
2311
2577
  }
2312
- function Hn(e) {
2578
+ function Bn(e) {
2313
2579
  const o = {
2314
2580
  state: {},
2315
2581
  // Dummy state
@@ -2318,9 +2584,9 @@ function Hn(e) {
2318
2584
  // noop
2319
2585
  renderFallbackValue: null,
2320
2586
  ...e
2321
- }, [t] = Se.useState(() => ({
2322
- current: Fn(o)
2323
- })), [n, r] = Se.useState(() => t.current.initialState);
2587
+ }, [t] = xe.useState(() => ({
2588
+ current: Pn(o)
2589
+ })), [n, r] = xe.useState(() => t.current.initialState);
2324
2590
  return t.current.setOptions((l) => ({
2325
2591
  ...l,
2326
2592
  ...e,
@@ -2335,7 +2601,7 @@ function Hn(e) {
2335
2601
  }
2336
2602
  })), t.current;
2337
2603
  }
2338
- const Ue = ({
2604
+ const Xe = ({
2339
2605
  editable: e = !0,
2340
2606
  deletable: o = !0,
2341
2607
  pageSize: t = 25,
@@ -2345,101 +2611,101 @@ const Ue = ({
2345
2611
  const {
2346
2612
  rows: l,
2347
2613
  schema: i,
2348
- mappings: a,
2614
+ mappings: s,
2349
2615
  errorsByRow: u,
2350
2616
  editingCell: f,
2351
- startEditing: p,
2352
- stopEditing: c,
2617
+ startEditing: g,
2618
+ stopEditing: p,
2353
2619
  updateCell: d,
2354
- deleteRow: s
2355
- } = J(), [m, h] = Y([]), [w, C] = Y(""), [x, F] = Y(""), E = He(() => a.filter((y) => y.targetKey !== null).map((y) => {
2356
- const _ = i == null ? void 0 : i.columns.find((V) => V.key === y.targetKey);
2620
+ deleteRow: a
2621
+ } = Z(), [m, v] = q([]), [C, h] = q(""), [S, x] = q(""), I = be(() => s.filter((_) => _.targetKey !== null).map((_) => {
2622
+ const $ = i == null ? void 0 : i.columns.find((P) => P.key === _.targetKey);
2357
2623
  return {
2358
- sourceColumn: y.sourceColumn,
2359
- targetKey: y.targetKey,
2360
- label: (_ == null ? void 0 : _.label) || y.targetKey,
2361
- type: (_ == null ? void 0 : _.type) || "string"
2624
+ sourceColumn: _.sourceColumn,
2625
+ targetKey: _.targetKey,
2626
+ label: ($ == null ? void 0 : $.label) || _.targetKey,
2627
+ type: ($ == null ? void 0 : $.type) || "string"
2362
2628
  };
2363
- }), [a, i]), I = Me(
2364
- (y, _) => {
2365
- const V = u.get(y);
2366
- return V == null ? void 0 : V.find((W) => W.columnKey === _);
2629
+ }), [s, i]), F = Ne(
2630
+ (_, $) => {
2631
+ const P = u.get(_);
2632
+ return P == null ? void 0 : P.find((A) => A.columnKey === $);
2367
2633
  },
2368
2634
  [u]
2369
- ), D = (y, _, V) => {
2370
- F(V), p(y, _);
2371
- }, K = () => {
2372
- f && (d(f.rowIndex, f.columnKey, x), n == null || n(f.rowIndex, f.columnKey, x)), c();
2373
- }, N = () => {
2374
- F(""), c();
2375
- }, H = (y) => {
2376
- s(y), r == null || r(y);
2377
- }, T = Gt(), O = He(
2635
+ ), V = (_, $, P) => {
2636
+ x(P), g(_, $);
2637
+ }, W = () => {
2638
+ f && (d(f.rowIndex, f.columnKey, S), n == null || n(f.rowIndex, f.columnKey, S)), p();
2639
+ }, k = () => {
2640
+ x(""), p();
2641
+ }, H = (_) => {
2642
+ a(_), r == null || r(_);
2643
+ }, K = qt(), O = be(
2378
2644
  () => [
2379
- T.accessor("rowIndex", {
2645
+ K.accessor("rowIndex", {
2380
2646
  header: "#",
2381
2647
  size: 60,
2382
- cell: (y) => /* @__PURE__ */ g("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: y.getValue() + 1 })
2648
+ cell: (_) => /* @__PURE__ */ c("span", { className: "ff-font-mono ff-text-xs", style: { color: "var(--ff-text-muted)" }, children: _.getValue() + 1 })
2383
2649
  }),
2384
- ...E.map(
2385
- (y) => T.accessor((_) => _.data[y.targetKey] || _.data[y.sourceColumn], {
2386
- id: y.targetKey,
2387
- header: y.label,
2388
- cell: (_) => {
2389
- const V = _.row.original.rowIndex, W = String(_.getValue() ?? ""), k = I(V, y.targetKey);
2390
- return (f == null ? void 0 : f.rowIndex) === V && (f == null ? void 0 : f.columnKey) === y.targetKey ? /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
2391
- /* @__PURE__ */ g(
2650
+ ...I.map(
2651
+ (_) => K.accessor(($) => $.data[_.targetKey] || $.data[_.sourceColumn], {
2652
+ id: _.targetKey,
2653
+ header: _.label,
2654
+ cell: ($) => {
2655
+ const P = $.row.original.rowIndex, A = String($.getValue() ?? ""), D = F(P, _.targetKey);
2656
+ return (f == null ? void 0 : f.rowIndex) === P && (f == null ? void 0 : f.columnKey) === _.targetKey ? /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-min-w-[280px]", children: [
2657
+ /* @__PURE__ */ c(
2392
2658
  "input",
2393
2659
  {
2394
2660
  type: "text",
2395
- value: x,
2396
- onChange: (X) => F(X.target.value),
2397
- onKeyDown: (X) => {
2398
- X.key === "Enter" && K(), X.key === "Escape" && N();
2661
+ value: S,
2662
+ onChange: (Y) => x(Y.target.value),
2663
+ onKeyDown: (Y) => {
2664
+ Y.key === "Enter" && W(), Y.key === "Escape" && k();
2399
2665
  },
2400
2666
  className: "ff-input ff-py-2 ff-px-3 ff-text-sm ff-flex-1 ff-min-w-[160px]",
2401
2667
  autoFocus: !0
2402
2668
  }
2403
2669
  ),
2404
- /* @__PURE__ */ g(
2670
+ /* @__PURE__ */ c(
2405
2671
  "button",
2406
2672
  {
2407
- onClick: K,
2673
+ onClick: W,
2408
2674
  className: "ff-btn ff-btn-primary ff-btn-sm ff-flex-shrink-0",
2409
2675
  children: "Save"
2410
2676
  }
2411
2677
  ),
2412
- /* @__PURE__ */ g(
2678
+ /* @__PURE__ */ c(
2413
2679
  "button",
2414
2680
  {
2415
- onClick: N,
2681
+ onClick: k,
2416
2682
  className: "ff-btn ff-btn-secondary ff-btn-sm ff-flex-shrink-0",
2417
2683
  children: "Cancel"
2418
2684
  }
2419
2685
  )
2420
- ] }) : /* @__PURE__ */ v(
2686
+ ] }) : /* @__PURE__ */ w(
2421
2687
  "div",
2422
2688
  {
2423
- className: j(
2689
+ className: U(
2424
2690
  "ff-group ff-flex ff-items-center ff-gap-2",
2425
- (k == null ? void 0 : k.severity) === "error" && "ff-cell-error",
2426
- (k == null ? void 0 : k.severity) === "warning" && "ff-cell-warning"
2691
+ (D == null ? void 0 : D.severity) === "error" && "ff-cell-error",
2692
+ (D == null ? void 0 : D.severity) === "warning" && "ff-cell-warning"
2427
2693
  ),
2428
2694
  children: [
2429
- /* @__PURE__ */ g("span", { className: "ff-flex-1 ff-truncate", children: W || /* @__PURE__ */ g("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2430
- k && /* @__PURE__ */ v("div", { className: "ff-relative ff-group/tooltip", children: [
2431
- k.severity === "error" ? /* @__PURE__ */ g(Ie, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ g(Re, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2432
- /* @__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: [
2433
- k.message,
2434
- k.suggestion && /* @__PURE__ */ g("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: k.suggestion })
2695
+ /* @__PURE__ */ c("span", { className: "ff-flex-1 ff-truncate", children: A || /* @__PURE__ */ c("span", { style: { color: "var(--ff-text-muted)" }, children: "—" }) }),
2696
+ D && /* @__PURE__ */ w("div", { className: "ff-relative ff-group/tooltip", children: [
2697
+ D.severity === "error" ? /* @__PURE__ */ c(Pe, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-error)" } }) : /* @__PURE__ */ c(_e, { className: "ff-w-4 ff-h-4", style: { color: "var(--ff-warning)" } }),
2698
+ /* @__PURE__ */ w("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: [
2699
+ D.message,
2700
+ D.suggestion && /* @__PURE__ */ c("span", { className: "ff-block ff-mt-1", style: { color: "var(--ff-text-muted)" }, children: D.suggestion })
2435
2701
  ] })
2436
2702
  ] }),
2437
- e && /* @__PURE__ */ g(
2703
+ e && /* @__PURE__ */ c(
2438
2704
  "button",
2439
2705
  {
2440
- onClick: () => D(V, y.targetKey, W),
2706
+ onClick: () => V(P, _.targetKey, A),
2441
2707
  className: "ff-opacity-0 group-hover:ff-opacity-100 ff-p-1 ff-rounded ff-transition-opacity ff-edit-btn",
2442
- children: /* @__PURE__ */ g(Et, { className: "ff-w-3 ff-h-3" })
2708
+ children: /* @__PURE__ */ c(Ht, { className: "ff-w-3 ff-h-3" })
2443
2709
  }
2444
2710
  )
2445
2711
  ]
@@ -2450,111 +2716,111 @@ const Ue = ({
2450
2716
  ),
2451
2717
  // Actions column (delete)
2452
2718
  ...o ? [
2453
- T.display({
2719
+ K.display({
2454
2720
  id: "actions",
2455
2721
  header: "",
2456
2722
  size: 50,
2457
- cell: (y) => {
2458
- const _ = y.row.original.rowIndex;
2459
- return /* @__PURE__ */ g(
2723
+ cell: (_) => {
2724
+ const $ = _.row.original.rowIndex;
2725
+ return /* @__PURE__ */ c(
2460
2726
  "button",
2461
2727
  {
2462
- onClick: () => H(_),
2728
+ onClick: () => H($),
2463
2729
  className: "ff-delete-btn",
2464
2730
  title: "Delete row",
2465
- children: /* @__PURE__ */ g(zt, { className: "ff-w-4 ff-h-4" })
2731
+ children: /* @__PURE__ */ c(Ot, { className: "ff-w-4 ff-h-4" })
2466
2732
  }
2467
2733
  );
2468
2734
  }
2469
2735
  })
2470
2736
  ] : []
2471
2737
  ],
2472
- [E, f, x, e, o, I, T]
2473
- ), z = Hn({
2738
+ [I, f, S, e, o, F, K]
2739
+ ), z = Bn({
2474
2740
  data: l,
2475
2741
  columns: O,
2476
2742
  state: {
2477
2743
  sorting: m,
2478
- globalFilter: w
2744
+ globalFilter: C
2479
2745
  },
2480
- onSortingChange: h,
2481
- onGlobalFilterChange: C,
2482
- getCoreRowModel: $n(),
2483
- getPaginationRowModel: En(),
2484
- getSortedRowModel: Dn(),
2485
- getFilteredRowModel: Pn(),
2746
+ onSortingChange: v,
2747
+ onGlobalFilterChange: h,
2748
+ getCoreRowModel: kn(),
2749
+ getPaginationRowModel: An(),
2750
+ getSortedRowModel: Gn(),
2751
+ getFilteredRowModel: Hn(),
2486
2752
  initialState: {
2487
2753
  pagination: {
2488
2754
  pageSize: t
2489
2755
  }
2490
2756
  }
2491
2757
  });
2492
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2493
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between", children: [
2494
- /* @__PURE__ */ g(
2758
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
2759
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between", children: [
2760
+ /* @__PURE__ */ c(
2495
2761
  "input",
2496
2762
  {
2497
2763
  type: "text",
2498
- value: w,
2499
- onChange: (y) => C(y.target.value),
2764
+ value: C,
2765
+ onChange: (_) => h(_.target.value),
2500
2766
  placeholder: "Search all columns...",
2501
2767
  className: "ff-input ff-max-w-xs"
2502
2768
  }
2503
2769
  ),
2504
- /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2770
+ /* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2505
2771
  z.getFilteredRowModel().rows.length,
2506
2772
  " rows"
2507
2773
  ] })
2508
2774
  ] }),
2509
- /* @__PURE__ */ g("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ v("table", { className: "ff-table", children: [
2510
- /* @__PURE__ */ g("thead", { children: z.getHeaderGroups().map((y) => /* @__PURE__ */ g("tr", { children: y.headers.map((_) => /* @__PURE__ */ g(
2775
+ /* @__PURE__ */ c("div", { className: "ff-table-container ff-max-h-[500px]", children: /* @__PURE__ */ w("table", { className: "ff-table", children: [
2776
+ /* @__PURE__ */ c("thead", { children: z.getHeaderGroups().map((_) => /* @__PURE__ */ c("tr", { children: _.headers.map(($) => /* @__PURE__ */ c(
2511
2777
  "th",
2512
2778
  {
2513
- style: { width: _.getSize() },
2514
- onClick: _.column.getToggleSortingHandler(),
2515
- className: j(
2516
- _.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2779
+ style: { width: $.getSize() },
2780
+ onClick: $.column.getToggleSortingHandler(),
2781
+ className: U(
2782
+ $.column.getCanSort() && "ff-cursor-pointer ff-select-none"
2517
2783
  ),
2518
- children: /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2519
- je(_.column.columnDef.header, _.getContext()),
2520
- _.column.getIsSorted() && /* @__PURE__ */ g("span", { children: _.column.getIsSorted() === "asc" ? "↑" : "↓" })
2784
+ children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-1", children: [
2785
+ Ue($.column.columnDef.header, $.getContext()),
2786
+ $.column.getIsSorted() && /* @__PURE__ */ c("span", { children: $.column.getIsSorted() === "asc" ? "↑" : "↓" })
2521
2787
  ] })
2522
2788
  },
2523
- _.id
2524
- )) }, y.id)) }),
2525
- /* @__PURE__ */ g("tbody", { children: z.getRowModel().rows.map((y) => {
2526
- const _ = u.has(y.original.rowIndex);
2527
- return /* @__PURE__ */ g(
2789
+ $.id
2790
+ )) }, _.id)) }),
2791
+ /* @__PURE__ */ c("tbody", { children: z.getRowModel().rows.map((_) => {
2792
+ const $ = u.has(_.original.rowIndex);
2793
+ return /* @__PURE__ */ c(
2528
2794
  "tr",
2529
2795
  {
2530
- className: j(_ && "ff-row-error"),
2531
- children: y.getVisibleCells().map((V) => /* @__PURE__ */ g("td", { children: je(V.column.columnDef.cell, V.getContext()) }, V.id))
2796
+ className: U($ && "ff-row-error"),
2797
+ children: _.getVisibleCells().map((P) => /* @__PURE__ */ c("td", { children: Ue(P.column.columnDef.cell, P.getContext()) }, P.id))
2532
2798
  },
2533
- y.id
2799
+ _.id
2534
2800
  );
2535
2801
  }) })
2536
2802
  ] }) }),
2537
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2538
- /* @__PURE__ */ v("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2803
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-justify-between ff-px-2", children: [
2804
+ /* @__PURE__ */ w("div", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
2539
2805
  "Page ",
2540
2806
  z.getState().pagination.pageIndex + 1,
2541
2807
  " of ",
2542
2808
  z.getPageCount()
2543
2809
  ] }),
2544
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2545
- /* @__PURE__ */ v(
2810
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2", children: [
2811
+ /* @__PURE__ */ w(
2546
2812
  "button",
2547
2813
  {
2548
2814
  onClick: () => z.previousPage(),
2549
2815
  disabled: !z.getCanPreviousPage(),
2550
2816
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2551
2817
  children: [
2552
- /* @__PURE__ */ g(St, { className: "ff-w-4 ff-h-4" }),
2818
+ /* @__PURE__ */ c(Ft, { className: "ff-w-4 ff-h-4" }),
2553
2819
  "Previous"
2554
2820
  ]
2555
2821
  }
2556
2822
  ),
2557
- /* @__PURE__ */ v(
2823
+ /* @__PURE__ */ w(
2558
2824
  "button",
2559
2825
  {
2560
2826
  onClick: () => z.nextPage(),
@@ -2562,22 +2828,22 @@ const Ue = ({
2562
2828
  className: "ff-btn ff-btn-secondary ff-btn-sm",
2563
2829
  children: [
2564
2830
  "Next",
2565
- /* @__PURE__ */ g(gt, { className: "ff-w-4 ff-h-4" })
2831
+ /* @__PURE__ */ c(vt, { className: "ff-w-4 ff-h-4" })
2566
2832
  ]
2567
2833
  }
2568
2834
  )
2569
2835
  ] })
2570
2836
  ] })
2571
2837
  ] });
2572
- }, Ke = ({
2838
+ }, We = ({
2573
2839
  showDetails: e = !0
2574
2840
  }) => {
2575
- const { validationResults: o } = J();
2841
+ const { validationResults: o } = Z();
2576
2842
  if (!o)
2577
2843
  return null;
2578
- const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: a, summary: u } = o, f = Math.round(r / n * 100);
2579
- return /* @__PURE__ */ v("div", { className: "ff-space-y-4", children: [
2580
- /* @__PURE__ */ v(
2844
+ const { isValid: t, totalRows: n, validRows: r, errorCount: l, warningCount: i, infoCount: s, summary: u } = o, f = Math.round(r / n * 100);
2845
+ return /* @__PURE__ */ w("div", { className: "ff-space-y-4", children: [
2846
+ /* @__PURE__ */ w(
2581
2847
  "div",
2582
2848
  {
2583
2849
  className: "ff-flex ff-items-center ff-gap-4 ff-p-4 ff-rounded-lg ff-border",
@@ -2586,9 +2852,9 @@ const Ue = ({
2586
2852
  borderColor: t ? "var(--ff-success)" : "var(--ff-error)"
2587
2853
  },
2588
2854
  children: [
2589
- t ? /* @__PURE__ */ g(Ve, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ g(Ge, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2590
- /* @__PURE__ */ v("div", { children: [
2591
- /* @__PURE__ */ g(
2855
+ t ? /* @__PURE__ */ c(ke, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-success)" } }) : /* @__PURE__ */ c(Te, { className: "ff-w-8 ff-h-8", style: { color: "var(--ff-error)" } }),
2856
+ /* @__PURE__ */ w("div", { children: [
2857
+ /* @__PURE__ */ c(
2592
2858
  "h3",
2593
2859
  {
2594
2860
  className: "ff-text-lg ff-font-semibold",
@@ -2596,7 +2862,7 @@ const Ue = ({
2596
2862
  children: t ? "Validation Passed" : "Validation Failed"
2597
2863
  }
2598
2864
  ),
2599
- /* @__PURE__ */ v("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
2865
+ /* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: t ? "var(--ff-success)" : "var(--ff-error)" }, children: [
2600
2866
  r,
2601
2867
  " of ",
2602
2868
  n,
@@ -2608,27 +2874,27 @@ const Ue = ({
2608
2874
  ]
2609
2875
  }
2610
2876
  ),
2611
- /* @__PURE__ */ v("div", { className: "ff-grid ff-grid-cols-4 ff-gap-4", children: [
2612
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2613
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: n }),
2614
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Total Rows" })
2877
+ /* @__PURE__ */ w("div", { className: "ff-grid ff-grid-cols-4 ff-gap-4", children: [
2878
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2879
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-text-primary)" }, children: n }),
2880
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: "Total Rows" })
2615
2881
  ] }),
2616
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: [
2617
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: r }),
2618
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Valid Rows" })
2882
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-success-light)", borderColor: "var(--ff-success)" }, children: [
2883
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-success-dark)" }, children: r }),
2884
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-success)" }, children: "Valid Rows" })
2619
2885
  ] }),
2620
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)" }, children: [
2621
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-error-dark)" }, children: l }),
2622
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-error)" }, children: "Errors" })
2886
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-error-light)", borderColor: "var(--ff-error)" }, children: [
2887
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-error-dark)" }, children: l }),
2888
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-error)" }, children: "Errors" })
2623
2889
  ] }),
2624
- /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
2625
- /* @__PURE__ */ g("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-warning-dark)" }, children: i }),
2626
- /* @__PURE__ */ g("p", { className: "ff-text-sm", style: { color: "var(--ff-warning)" }, children: "Warnings" })
2890
+ /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-lg ff-p-4 ff-text-center", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: [
2891
+ /* @__PURE__ */ c("p", { className: "ff-text-2xl ff-font-bold", style: { color: "var(--ff-warning-dark)" }, children: i }),
2892
+ /* @__PURE__ */ c("p", { className: "ff-text-sm", style: { color: "var(--ff-warning)" }, children: "Warnings" })
2627
2893
  ] })
2628
2894
  ] }),
2629
- e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ v("div", { className: "ff-border ff-rounded-xl ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2630
- /* @__PURE__ */ g("div", { className: "ff-px-4 ff-py-3", style: { backgroundColor: "var(--ff-bg-secondary)" }, children: /* @__PURE__ */ g("h4", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2631
- /* @__PURE__ */ g("div", { children: Object.entries(u.byColumn).filter(([, p]) => p.errorCount > 0 || p.warningCount > 0).map(([p, c], d, s) => /* @__PURE__ */ v(
2895
+ e && u.byColumn && Object.keys(u.byColumn).length > 0 && /* @__PURE__ */ w("div", { className: "ff-border ff-rounded-xl ff-overflow-hidden", style: { backgroundColor: "var(--ff-bg-primary)", borderColor: "var(--ff-border-light)" }, children: [
2896
+ /* @__PURE__ */ c("div", { className: "ff-px-4 ff-py-3", style: { backgroundColor: "var(--ff-bg-secondary)" }, children: /* @__PURE__ */ c("h4", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-secondary)" }, children: "Issues by Column" }) }),
2897
+ /* @__PURE__ */ c("div", { children: Object.entries(u.byColumn).filter(([, g]) => g.errorCount > 0 || g.warningCount > 0).map(([g, p], d, a) => /* @__PURE__ */ w(
2632
2898
  "div",
2633
2899
  {
2634
2900
  className: "ff-flex ff-items-center ff-justify-between ff-px-4 ff-py-3",
@@ -2636,48 +2902,48 @@ const Ue = ({
2636
2902
  borderTop: d > 0 ? "1px solid var(--ff-border-light)" : void 0
2637
2903
  },
2638
2904
  children: [
2639
- /* @__PURE__ */ v("div", { className: "ff-flex-1 ff-min-w-0 ff-mr-4", children: [
2640
- /* @__PURE__ */ g("p", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-primary)" }, children: c.columnKey }),
2641
- c.mostCommonError && /* @__PURE__ */ g("p", { className: "ff-text-sm ff-truncate", style: { color: "var(--ff-text-muted)" }, children: c.mostCommonError })
2905
+ /* @__PURE__ */ w("div", { className: "ff-flex-1 ff-min-w-0 ff-mr-4", children: [
2906
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-text-sm", style: { color: "var(--ff-text-primary)" }, children: p.columnKey }),
2907
+ p.mostCommonError && /* @__PURE__ */ c("p", { className: "ff-text-sm ff-truncate", style: { color: "var(--ff-text-muted)" }, children: p.mostCommonError })
2642
2908
  ] }),
2643
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-2 ff-flex-shrink-0", children: [
2644
- c.errorCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-error ff-whitespace-nowrap", children: [
2645
- /* @__PURE__ */ g(Ge, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2646
- c.errorCount,
2909
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-2 ff-flex-shrink-0", children: [
2910
+ p.errorCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-error ff-whitespace-nowrap", children: [
2911
+ /* @__PURE__ */ c(Te, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2912
+ p.errorCount,
2647
2913
  " ",
2648
- c.errorCount === 1 ? "error" : "errors"
2914
+ p.errorCount === 1 ? "error" : "errors"
2649
2915
  ] }),
2650
- c.warningCount > 0 && /* @__PURE__ */ v("span", { className: "ff-badge ff-badge-warning ff-whitespace-nowrap", children: [
2651
- /* @__PURE__ */ g(Re, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2652
- c.warningCount,
2916
+ p.warningCount > 0 && /* @__PURE__ */ w("span", { className: "ff-badge ff-badge-warning ff-whitespace-nowrap", children: [
2917
+ /* @__PURE__ */ c(_e, { className: "ff-w-3 ff-h-3 ff-mr-1" }),
2918
+ p.warningCount,
2653
2919
  " ",
2654
- c.warningCount === 1 ? "warning" : "warnings"
2920
+ p.warningCount === 1 ? "warning" : "warnings"
2655
2921
  ] })
2656
2922
  ] })
2657
2923
  ]
2658
2924
  },
2659
- p
2925
+ g
2660
2926
  )) })
2661
2927
  ] }),
2662
- 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: [
2663
- /* @__PURE__ */ g(Re, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2664
- /* @__PURE__ */ v("div", { children: [
2665
- /* @__PURE__ */ g("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2666
- /* @__PURE__ */ v("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2667
- u.duplicates.slice(0, 5).map((p, c) => /* @__PURE__ */ v("li", { children: [
2668
- /* @__PURE__ */ g("span", { className: "ff-font-mono", children: p.columnKey }),
2928
+ e && u.duplicates && u.duplicates.length > 0 && /* @__PURE__ */ c("div", { className: "ff-border ff-rounded-lg ff-p-4", style: { backgroundColor: "var(--ff-warning-light)", borderColor: "var(--ff-warning)" }, children: /* @__PURE__ */ w("div", { className: "ff-flex ff-items-start ff-gap-3", children: [
2929
+ /* @__PURE__ */ c(_e, { className: "ff-w-5 ff-h-5 ff-flex-shrink-0 ff-mt-0.5", style: { color: "var(--ff-warning)" } }),
2930
+ /* @__PURE__ */ w("div", { children: [
2931
+ /* @__PURE__ */ c("h4", { className: "ff-font-medium", style: { color: "var(--ff-warning-dark)" }, children: "Duplicate Values Found" }),
2932
+ /* @__PURE__ */ w("ul", { className: "ff-mt-2 ff-space-y-1 ff-text-sm", style: { color: "var(--ff-warning-dark)" }, children: [
2933
+ u.duplicates.slice(0, 5).map((g, p) => /* @__PURE__ */ w("li", { children: [
2934
+ /* @__PURE__ */ c("span", { className: "ff-font-mono", children: g.columnKey }),
2669
2935
  ': "',
2670
- String(p.value),
2936
+ String(g.value),
2671
2937
  '" appears',
2672
2938
  " ",
2673
- p.rowIndices.length,
2939
+ g.rowIndices.length,
2674
2940
  " times (rows",
2675
2941
  " ",
2676
- p.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2677
- p.rowIndices.length > 3 ? "..." : "",
2942
+ g.rowIndices.slice(0, 3).map((d) => d + 1).join(", "),
2943
+ g.rowIndices.length > 3 ? "..." : "",
2678
2944
  ")"
2679
- ] }, c)),
2680
- u.duplicates.length > 5 && /* @__PURE__ */ v("li", { style: { color: "var(--ff-warning)" }, children: [
2945
+ ] }, p)),
2946
+ u.duplicates.length > 5 && /* @__PURE__ */ w("li", { style: { color: "var(--ff-warning)" }, children: [
2681
2947
  "... and ",
2682
2948
  u.duplicates.length - 5,
2683
2949
  " more duplicate groups"
@@ -2686,13 +2952,13 @@ const Ue = ({
2686
2952
  ] })
2687
2953
  ] }) })
2688
2954
  ] });
2689
- }, Ce = ["upload", "mapping", "validation", "complete"], An = [
2690
- { key: "upload", label: "Upload", icon: Xe },
2691
- { key: "mapping", label: "Map Columns", icon: Nt },
2692
- { key: "validation", label: "Validate", icon: kt },
2693
- { key: "review", label: "Review", icon: _t },
2694
- { key: "complete", label: "Complete", icon: Ve }
2695
- ], Tn = ({
2955
+ }, Re = ["upload", "mapping", "validation", "complete"], Kn = [
2956
+ { key: "upload", label: "Upload", icon: Qe },
2957
+ { key: "mapping", label: "Map Columns", icon: Lt },
2958
+ { key: "validation", label: "Validate", icon: Gt },
2959
+ { key: "review", label: "Review", icon: Vt },
2960
+ { key: "complete", label: "Complete", icon: ke }
2961
+ ], Wn = ({
2696
2962
  template: e,
2697
2963
  schema: o,
2698
2964
  mode: t = "modal",
@@ -2700,122 +2966,126 @@ const Ue = ({
2700
2966
  useShadowDom: r = !1,
2701
2967
  onComplete: l,
2702
2968
  onCancel: i,
2703
- onError: a
2969
+ onError: s
2704
2970
  }) => {
2705
2971
  const {
2706
2972
  step: u,
2707
2973
  sessionId: f,
2708
- file: p,
2709
- mappings: c,
2974
+ file: g,
2975
+ mappings: p,
2710
2976
  validationResults: d,
2711
- isLoading: s,
2977
+ isLoading: a,
2712
2978
  error: m,
2713
- setSchema: h,
2714
- setSessionId: w,
2715
- setParsedData: C,
2716
- setMappings: x,
2717
- setUnmapped: F,
2718
- setValidationResults: E,
2719
- setStep: I,
2720
- nextStep: D,
2721
- previousStep: K,
2722
- setLoading: N,
2979
+ setSchema: v,
2980
+ setSessionId: C,
2981
+ setParsedData: h,
2982
+ setMappings: S,
2983
+ setUnmapped: x,
2984
+ setValidationResults: I,
2985
+ setStep: F,
2986
+ nextStep: V,
2987
+ previousStep: W,
2988
+ setLoading: k,
2723
2989
  setError: H,
2724
- reset: T
2725
- } = J(), [O, z] = Y(null), [y, _] = Y(null);
2726
- Ae(() => {
2727
- if (_(null), e)
2728
- if (ct(e)) {
2729
- const $ = pt(e);
2730
- $ ? z($) : (_(`Failed to load template "${e}"`), a == null || a(new Error(`Failed to load template "${e}"`)));
2990
+ reset: K
2991
+ } = Z(), [O, z] = q(null), [_, $] = q(null), [P, A] = q(0), [D, Q] = q("");
2992
+ Oe(() => {
2993
+ if ($(null), e)
2994
+ if (wt(e)) {
2995
+ const M = Ct(e);
2996
+ M ? z(M) : ($(`Failed to load template "${e}"`), s == null || s(new Error(`Failed to load template "${e}"`)));
2731
2997
  } else {
2732
- const $ = `Template "${e}" not found. Available templates: ${Oe.join(", ")}`;
2733
- _($), a == null || a(new Error($));
2998
+ const M = `Template "${e}" not found. Available templates: ${Be.join(", ")}`;
2999
+ $(M), s == null || s(new Error(M));
2734
3000
  }
2735
3001
  else if (o)
2736
3002
  z(o);
2737
3003
  else {
2738
- const $ = `No template or schema provided. Please specify a template (${Oe.join(", ")}) or provide a custom schema.`;
2739
- _($), a == null || a(new Error($));
3004
+ const M = `No template or schema provided. Please specify a template (${Be.join(", ")}) or provide a custom schema.`;
3005
+ $(M), s == null || s(new Error(M));
2740
3006
  }
2741
- }, [e, o, a]), Ae(() => {
2742
- O && (h(O), V(O));
3007
+ }, [e, o, s]), Oe(() => {
3008
+ O && (v(O), Y(O));
2743
3009
  }, [O]);
2744
- const V = async ($) => {
3010
+ const Y = async (M) => {
2745
3011
  try {
2746
- N(!0);
2747
- const b = await ee().createImportSession($);
2748
- w(b.sessionId);
2749
- } catch (M) {
2750
- const b = M;
2751
- H(b.message), a == null || a(b);
3012
+ k(!0);
3013
+ const T = await te().createImportSession(M);
3014
+ C(T.sessionId);
3015
+ } catch (N) {
3016
+ const T = N;
3017
+ H(T.message), s == null || s(T);
2752
3018
  } finally {
2753
- N(!1);
3019
+ k(!1);
2754
3020
  }
2755
- }, W = Me(async ($) => {
3021
+ }, it = Ne(async (M) => {
2756
3022
  if (f)
2757
3023
  try {
2758
- N(!0), H(null);
2759
- const b = await ee().uploadFile(f, $), ze = (Q, at) => ({
2760
- rowIndex: Q.rowIndex ?? at,
2761
- data: Q.data ?? Q,
2762
- rawData: Q.rawData ?? Object.values(Q.data ?? Q)
3024
+ k(!0), H(null), A(10), Q("Uploading file...");
3025
+ const N = te();
3026
+ A(30), Q("Parsing file data...");
3027
+ const T = await N.uploadFile(f, M);
3028
+ A(60), Q("Processing rows...");
3029
+ const Ge = (J, gt) => ({
3030
+ rowIndex: J.rowIndex ?? gt,
3031
+ data: J.data ?? J,
3032
+ rawData: J.rawData ?? Object.values(J.data ?? J)
2763
3033
  });
2764
- C({
2765
- headers: b.data.headers,
2766
- rows: b.data.sampleRows.map(ze),
2767
- totalRows: b.data.totalRows,
2768
- sampleRows: b.data.sampleRows.map(ze)
2769
- }), D(), await k();
2770
- } catch (M) {
2771
- H(`Failed to process the uploaded file: ${M.message}`);
3034
+ h({
3035
+ headers: T.data.headers,
3036
+ rows: T.data.sampleRows.map(Ge),
3037
+ totalRows: T.data.totalRows,
3038
+ sampleRows: T.data.sampleRows.map(Ge)
3039
+ }), A(80), Q("Matching columns..."), V(), await st(), A(100), Q("Done");
3040
+ } catch (N) {
3041
+ H(`Failed to process the uploaded file: ${N.message}`);
2772
3042
  } finally {
2773
- N(!1);
3043
+ k(!1), A(0), Q("");
2774
3044
  }
2775
- }, [f]), k = async () => {
3045
+ }, [f]), st = async () => {
2776
3046
  if (f)
2777
3047
  try {
2778
- N(!0);
2779
- const M = await ee().matchColumns(f);
2780
- x(M.mappings), F(M.unmappedSource, M.unmappedTarget);
2781
- } catch ($) {
2782
- H(`Column matching failed: ${$.message}`);
3048
+ k(!0);
3049
+ const N = await te().matchColumns(f);
3050
+ S(N.mappings), x(N.unmappedSource, N.unmappedTarget);
3051
+ } catch (M) {
3052
+ H(`Column matching failed: ${M.message}`);
2783
3053
  } finally {
2784
- N(!1);
3054
+ k(!1);
2785
3055
  }
2786
- }, ke = async () => {
3056
+ }, at = async () => {
2787
3057
  if (f)
2788
3058
  try {
2789
- N(!0), H(null);
2790
- const M = await ee().validateImport(f);
2791
- E(M.validation), D();
2792
- } catch ($) {
2793
- H(`Validation failed: ${$.message}`);
3059
+ k(!0), H(null);
3060
+ const N = await te().validateImport(f);
3061
+ I(N.validation), V();
3062
+ } catch (M) {
3063
+ H(`Validation failed: ${M.message}`);
2794
3064
  } finally {
2795
- N(!1);
3065
+ k(!1);
2796
3066
  }
2797
- }, [X, ue] = Y(null), rt = async () => {
3067
+ }, [He, fe] = q(null), ut = async () => {
2798
3068
  if (f)
2799
3069
  try {
2800
- N(!0), H(null), ue(null);
2801
- const M = await ee().completeImport(f, {
3070
+ k(!0), H(null), fe(null);
3071
+ const N = await te().completeImport(f, {
2802
3072
  skipInvalidRows: !0,
2803
3073
  acknowledgeWarnings: !0
2804
3074
  });
2805
- I("complete"), l == null || l(M);
2806
- } catch ($) {
2807
- ue($.message), I("complete");
3075
+ F("complete"), l == null || l(N);
3076
+ } catch (M) {
3077
+ fe(M.message), F("complete");
2808
3078
  } finally {
2809
- N(!1);
3079
+ k(!1);
2810
3080
  }
2811
- }, fe = () => {
2812
- T(), i == null || i();
2813
- }, lt = () => An.findIndex(($) => $.key === u), it = () => {
3081
+ }, de = () => {
3082
+ K(), i == null || i();
3083
+ }, ft = () => Kn.findIndex((M) => M.key === u), dt = () => {
2814
3084
  switch (u) {
2815
3085
  case "upload":
2816
- return p !== null;
3086
+ return g !== null;
2817
3087
  case "mapping":
2818
- return c.length > 0 && c.some(($) => $.targetKey !== null);
3088
+ return p.length > 0 && p.some((M) => M.targetKey !== null);
2819
3089
  case "validation":
2820
3090
  return d !== null;
2821
3091
  case "review":
@@ -2823,138 +3093,152 @@ const Ue = ({
2823
3093
  default:
2824
3094
  return !1;
2825
3095
  }
2826
- }, st = async () => {
3096
+ }, ct = async () => {
2827
3097
  switch (u) {
2828
3098
  case "mapping":
2829
- await ke();
3099
+ await at();
2830
3100
  break;
2831
3101
  case "validation":
2832
- D();
3102
+ V();
2833
3103
  break;
2834
3104
  case "review":
2835
- await rt();
3105
+ await ut();
2836
3106
  break;
2837
3107
  default:
2838
- D();
3108
+ V();
2839
3109
  }
2840
3110
  };
2841
- if (y)
2842
- return /* @__PURE__ */ g(de, { 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: [
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-error-light)" }, children: /* @__PURE__ */ g(se, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2844
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
2845
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: y }),
2846
- i && /* @__PURE__ */ g("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
3111
+ if (_)
3112
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
3113
+ /* @__PURE__ */ c("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__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
3114
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Configuration Error" }),
3115
+ /* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: _ }),
3116
+ i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
2847
3117
  ] }) }) });
2848
3118
  if (!O)
2849
- return /* @__PURE__ */ g(de, { 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: [
2850
- /* @__PURE__ */ g(be, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
2851
- /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
3119
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: /* @__PURE__ */ c("div", { className: "ff-container ff-bg-white ff-rounded-xl ff-shadow-xl ff-overflow-hidden ff-p-6", children: /* @__PURE__ */ w("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-8", children: [
3120
+ /* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
3121
+ /* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Loading template..." })
2852
3122
  ] }) }) });
2853
- const Z = () => {
2854
- const $ = u === "review" ? "validation" : u;
2855
- return Ce.indexOf($);
2856
- }, Le = /* @__PURE__ */ g(oe, { children: /* @__PURE__ */ v("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
2857
- /* @__PURE__ */ v("div", { className: "ff-modal-header", children: [
2858
- /* @__PURE__ */ v("div", { className: "ff-modal-header-left", children: [
2859
- /* @__PURE__ */ v("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
2860
- /* @__PURE__ */ g("div", { className: "ff-modal-icon", children: /* @__PURE__ */ g($t, {}) }),
2861
- /* @__PURE__ */ g("h2", { className: "ff-modal-title", children: "Import Data" })
3123
+ const ee = () => {
3124
+ const M = u === "review" ? "validation" : u;
3125
+ return Re.indexOf(M);
3126
+ }, Ae = /* @__PURE__ */ c(re, { children: /* @__PURE__ */ w("div", { className: t === "embed" ? "ff-container ff-embed" : "ff-container ff-modal", children: [
3127
+ /* @__PURE__ */ w("div", { className: "ff-modal-header", children: [
3128
+ /* @__PURE__ */ w("div", { className: "ff-modal-header-left", children: [
3129
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-items-center ff-gap-3", children: [
3130
+ /* @__PURE__ */ c("div", { className: "ff-modal-icon", children: /* @__PURE__ */ c(Pt, {}) }),
3131
+ /* @__PURE__ */ c("h2", { className: "ff-modal-title", children: "Import Data" })
2862
3132
  ] }),
2863
- /* @__PURE__ */ g("div", { className: "ff-steps ff-ml-4", children: Ce.map(($, M) => /* @__PURE__ */ v(ut.Fragment, { children: [
2864
- /* @__PURE__ */ g(
3133
+ /* @__PURE__ */ c("div", { className: "ff-steps ff-ml-4", children: Re.map((M, N) => /* @__PURE__ */ w(pt.Fragment, { children: [
3134
+ /* @__PURE__ */ c(
2865
3135
  "div",
2866
3136
  {
2867
- className: j(
3137
+ className: U(
2868
3138
  "ff-step",
2869
- Z() === M && "ff-step-active",
2870
- Z() > M && "ff-step-complete",
2871
- Z() < M && "ff-step-pending"
3139
+ ee() === N && "ff-step-active",
3140
+ ee() > N && "ff-step-complete",
3141
+ ee() < N && "ff-step-pending"
2872
3142
  ),
2873
- children: Z() > M ? "✓" : M + 1
3143
+ children: ee() > N ? "✓" : N + 1
2874
3144
  }
2875
3145
  ),
2876
- M < Ce.length - 1 && /* @__PURE__ */ g("div", { className: j(
3146
+ N < Re.length - 1 && /* @__PURE__ */ c("div", { className: U(
2877
3147
  "ff-step-connector",
2878
- Z() > M && "ff-step-connector-complete"
3148
+ ee() > N && "ff-step-connector-complete"
2879
3149
  ) })
2880
- ] }, $)) })
3150
+ ] }, M)) })
2881
3151
  ] }),
2882
- /* @__PURE__ */ g(
3152
+ /* @__PURE__ */ c(
2883
3153
  "button",
2884
3154
  {
2885
- onClick: fe,
3155
+ onClick: de,
2886
3156
  className: "ff-modal-close",
2887
- children: /* @__PURE__ */ g(se, { className: "ff-w-5 ff-h-5" })
3157
+ children: /* @__PURE__ */ c(ae, { className: "ff-w-5 ff-h-5" })
2888
3158
  }
2889
3159
  )
2890
3160
  ] }),
2891
- /* @__PURE__ */ v("div", { className: "ff-modal-body", children: [
2892
- 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 }),
2893
- u === "upload" && /* @__PURE__ */ g("div", { className: "ff-py-4", children: /* @__PURE__ */ g("div", { className: "ff-max-w-xl ff-mx-auto", children: /* @__PURE__ */ g(Ht, { onFileSelect: W }) }) }),
2894
- u === "mapping" && /* @__PURE__ */ g(At, {}),
2895
- u === "validation" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2896
- /* @__PURE__ */ g(Ke, {}),
2897
- /* @__PURE__ */ g(Ue, { editable: !0 })
3161
+ /* @__PURE__ */ w("div", { className: "ff-modal-body", children: [
3162
+ m && /* @__PURE__ */ c("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 }),
3163
+ u === "upload" && /* @__PURE__ */ c("div", { className: "ff-py-4", children: /* @__PURE__ */ c("div", { className: "ff-max-w-xl ff-mx-auto", children: a && P > 0 ? /* @__PURE__ */ w("div", { className: "ff-p-8 ff-text-center", children: [
3164
+ /* @__PURE__ */ c(ge, { className: "ff-w-10 ff-h-10 ff-animate-spin ff-mx-auto ff-mb-4", style: { color: "var(--ff-primary-90)" } }),
3165
+ /* @__PURE__ */ c("p", { className: "ff-font-medium ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: D }),
3166
+ /* @__PURE__ */ c("div", { className: "ff-progress ff-w-full ff-max-w-xs ff-mx-auto ff-mb-2", children: /* @__PURE__ */ c(
3167
+ "div",
3168
+ {
3169
+ className: "ff-progress-bar",
3170
+ style: { width: `${P}%`, transition: "width 0.3s ease" }
3171
+ }
3172
+ ) }),
3173
+ /* @__PURE__ */ w("p", { className: "ff-text-sm", style: { color: "var(--ff-text-muted)" }, children: [
3174
+ P,
3175
+ "% complete"
3176
+ ] })
3177
+ ] }) : /* @__PURE__ */ c(Bt, { onFileSelect: it }) }) }),
3178
+ u === "mapping" && /* @__PURE__ */ c(Kt, {}),
3179
+ u === "validation" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
3180
+ /* @__PURE__ */ c(We, {}),
3181
+ /* @__PURE__ */ c(Xe, { editable: !0 })
2898
3182
  ] }),
2899
- u === "review" && /* @__PURE__ */ v("div", { className: "ff-space-y-6", children: [
2900
- /* @__PURE__ */ g(Ke, { showDetails: !1 }),
2901
- /* @__PURE__ */ g(Ue, { editable: !1, pageSize: 10 })
3183
+ u === "review" && /* @__PURE__ */ w("div", { className: "ff-space-y-6", children: [
3184
+ /* @__PURE__ */ c(We, { showDetails: !1 }),
3185
+ /* @__PURE__ */ c(Xe, { editable: !1, pageSize: 10 })
2902
3186
  ] }),
2903
- u === "complete" && /* @__PURE__ */ g("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: X ? /* @__PURE__ */ v(oe, { children: [
2904
- /* @__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(se, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
2905
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
2906
- /* @__PURE__ */ g("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: X }),
2907
- /* @__PURE__ */ v("div", { className: "ff-flex ff-gap-3", children: [
2908
- /* @__PURE__ */ g(
3187
+ u === "complete" && /* @__PURE__ */ c("div", { className: "ff-flex ff-flex-col ff-items-center ff-justify-center ff-py-12", children: He ? /* @__PURE__ */ w(re, { children: [
3188
+ /* @__PURE__ */ c("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__ */ c(ae, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-error)" } }) }),
3189
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Failed" }),
3190
+ /* @__PURE__ */ c("p", { className: "ff-text-center ff-max-w-md ff-mb-4", style: { color: "var(--ff-text-muted)" }, children: He }),
3191
+ /* @__PURE__ */ w("div", { className: "ff-flex ff-gap-3", children: [
3192
+ /* @__PURE__ */ c(
2909
3193
  "button",
2910
3194
  {
2911
3195
  onClick: () => {
2912
- ue(null), I("review");
3196
+ fe(null), F("review");
2913
3197
  },
2914
3198
  className: "ff-btn ff-btn-secondary",
2915
3199
  children: "Back to Review"
2916
3200
  }
2917
3201
  ),
2918
- i && /* @__PURE__ */ g("button", { onClick: fe, className: "ff-btn ff-btn-secondary", children: "Close" })
3202
+ i && /* @__PURE__ */ c("button", { onClick: de, className: "ff-btn ff-btn-secondary", children: "Close" })
2919
3203
  ] })
2920
- ] }) : /* @__PURE__ */ v(oe, { children: [
2921
- /* @__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(Ve, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
2922
- /* @__PURE__ */ g("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
2923
- /* @__PURE__ */ g("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
3204
+ ] }) : /* @__PURE__ */ w(re, { children: [
3205
+ /* @__PURE__ */ c("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__ */ c(ke, { className: "ff-w-10 ff-h-10", style: { color: "var(--ff-success)" } }) }),
3206
+ /* @__PURE__ */ c("h3", { className: "ff-text-xl ff-font-semibold ff-mb-2", style: { color: "var(--ff-text-primary)" }, children: "Import Complete!" }),
3207
+ /* @__PURE__ */ c("p", { style: { color: "var(--ff-text-muted)" }, children: "Your data has been successfully imported." })
2924
3208
  ] }) })
2925
3209
  ] }),
2926
- u !== "complete" && /* @__PURE__ */ v("div", { className: "ff-modal-footer", children: [
2927
- /* @__PURE__ */ g(
3210
+ u !== "complete" && /* @__PURE__ */ w("div", { className: "ff-modal-footer", children: [
3211
+ /* @__PURE__ */ c(
2928
3212
  "button",
2929
3213
  {
2930
- onClick: K,
2931
- disabled: lt() === 0 || s,
3214
+ onClick: W,
3215
+ disabled: ft() === 0 || a,
2932
3216
  className: "ff-btn ff-btn-secondary",
2933
3217
  children: "Back"
2934
3218
  }
2935
3219
  ),
2936
- /* @__PURE__ */ g(
3220
+ /* @__PURE__ */ c(
2937
3221
  "button",
2938
3222
  {
2939
- onClick: st,
2940
- disabled: !it() || s,
3223
+ onClick: ct,
3224
+ disabled: !dt() || a,
2941
3225
  className: "ff-btn ff-btn-primary",
2942
- children: s ? /* @__PURE__ */ v(oe, { children: [
2943
- /* @__PURE__ */ g(be, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
3226
+ children: a ? /* @__PURE__ */ w(re, { children: [
3227
+ /* @__PURE__ */ c(ge, { className: "ff-w-4 ff-h-4 ff-animate-spin" }),
2944
3228
  "Processing..."
2945
3229
  ] }) : u === "review" ? "Complete Import" : "Continue"
2946
3230
  }
2947
3231
  )
2948
3232
  ] })
2949
3233
  ] }) });
2950
- return /* @__PURE__ */ g(de, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ g("div", { className: "ff-overlay", children: Le }) : Le });
3234
+ return /* @__PURE__ */ c(ce, { theme: n, useShadowDom: r, children: t === "modal" ? /* @__PURE__ */ c("div", { className: "ff-overlay", children: Ae }) : Ae });
2951
3235
  };
2952
3236
  export {
2953
- At as C,
2954
- Ue as D,
2955
- Ht as F,
2956
- Tn as I,
2957
- Ke as V,
2958
- J as u
3237
+ Kt as C,
3238
+ Xe as D,
3239
+ Bt as F,
3240
+ Wn as I,
3241
+ We as V,
3242
+ Z as u
2959
3243
  };
2960
- //# sourceMappingURL=ImportWizard-wQRSiaEP.mjs.map
3244
+ //# sourceMappingURL=ImportWizard-CrUjPf36.mjs.map