@fileflow/sdk 0.1.30 → 0.1.32

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