@ram_28/kf-ai-sdk 1.0.2 → 1.0.4

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.
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- var Bt = Object.defineProperty;
2
- var zt = (e, r, t) => r in e ? Bt(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
- var He = (e, r, t) => zt(e, typeof r != "symbol" ? r + "" : r, t);
1
+ var Ut = Object.defineProperty;
2
+ var Bt = (e, r, t) => r in e ? Ut(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
3
+ var Ge = (e, r, t) => Bt(e, typeof r != "symbol" ? r + "" : r, t);
4
4
  import * as Le from "react";
5
- import rt, { useState as we, useCallback as E, useMemo as fe, useEffect as Te, useRef as ge, createContext as tt, useContext as Kt } from "react";
6
- import { useQuery as ar, useQueryClient as nt, useQueries as Mt, keepPreviousData as Gt, useMutation as ir } from "@tanstack/react-query";
7
- import { useForm as Ht } from "react-hook-form";
5
+ import rt, { useState as we, useCallback as E, useMemo as ce, useEffect as Re, useRef as ge, createContext as tt, useContext as zt } from "react";
6
+ import { useQuery as ar, useQueryClient as nt, useQueries as Kt, keepPreviousData as Mt, useMutation as ir } from "@tanstack/react-query";
7
+ import { useForm as Gt } from "react-hook-form";
8
8
  let We = {
9
9
  baseUrl: "",
10
10
  headers: {
@@ -40,7 +40,7 @@ function gr(e) {
40
40
  }
41
41
  return e;
42
42
  }
43
- function Re(e) {
43
+ function Te(e) {
44
44
  const r = We.baseUrl, t = We.headers;
45
45
  return {
46
46
  async get(n) {
@@ -231,7 +231,7 @@ function so(e) {
231
231
  function io(e) {
232
232
  return new Date(e.$__d__);
233
233
  }
234
- async function Yt(e) {
234
+ async function Ht(e) {
235
235
  try {
236
236
  const r = Ar(), t = yr(), n = await fetch(`${r}/api/app/meta/bdo/${e}`, {
237
237
  method: "GET",
@@ -269,7 +269,7 @@ async function lo(e) {
269
269
  );
270
270
  }
271
271
  }
272
- function Qt(e) {
272
+ function Yt(e) {
273
273
  return typeof e == "string" ? e : typeof e == "object" && e !== null ? new Intl.NumberFormat("en-US", {
274
274
  style: "currency",
275
275
  currency: e.currency
@@ -284,7 +284,7 @@ function co(e) {
284
284
  }
285
285
  return null;
286
286
  }
287
- function Wt(e, r = "medium") {
287
+ function Qt(e, r = "medium") {
288
288
  if (!(e instanceof Date) || isNaN(e.getTime()))
289
289
  return "Invalid Date";
290
290
  const t = {
@@ -294,7 +294,7 @@ function Wt(e, r = "medium") {
294
294
  }[r];
295
295
  return new Intl.DateTimeFormat("en-US", t).format(e);
296
296
  }
297
- function Jt(e, r = "medium") {
297
+ function Wt(e, r = "medium") {
298
298
  if (!(e instanceof Date) || isNaN(e.getTime()))
299
299
  return "Invalid Date";
300
300
  const t = {
@@ -304,26 +304,26 @@ function Jt(e, r = "medium") {
304
304
  }[r];
305
305
  return new Intl.DateTimeFormat("en-US", t).format(e);
306
306
  }
307
- function Xt(e, r = 2) {
307
+ function Jt(e, r = 2) {
308
308
  return typeof e != "number" || isNaN(e) ? "Invalid Number" : e.toFixed(r);
309
309
  }
310
- function Zt(e, r = 2) {
310
+ function Xt(e, r = 2) {
311
311
  try {
312
312
  return JSON.stringify(e, null, r);
313
313
  } catch {
314
314
  return "Invalid JSON";
315
315
  }
316
316
  }
317
- function en(e, r, t = ", ") {
317
+ function Zt(e, r, t = ", ") {
318
318
  return Array.isArray(e) ? r ? e.map(r).join(t) : e.map((n) => String(n)).join(t) : "Invalid Array";
319
319
  }
320
- function rn(e, r) {
320
+ function en(e, r) {
321
321
  return typeof e != "boolean" ? "Invalid Boolean" : e ? (r == null ? void 0 : r.trueLabel) || "Yes" : (r == null ? void 0 : r.falseLabel) || "No";
322
322
  }
323
323
  function uo(e, r = 50) {
324
324
  return typeof e != "string" ? "Invalid String" : e.length <= r ? e : e.slice(0, r - 3) + "...";
325
325
  }
326
- function tn(e, r) {
326
+ function rn(e, r) {
327
327
  if (typeof e != "string")
328
328
  return "Invalid Text";
329
329
  const t = e.split(`
@@ -340,21 +340,21 @@ function fo(e, r) {
340
340
  case "string":
341
341
  return String(e);
342
342
  case "textarea":
343
- return tn(String(e));
343
+ return rn(String(e));
344
344
  case "number":
345
- return Xt(e);
345
+ return Jt(e);
346
346
  case "boolean":
347
- return rn(e);
347
+ return en(e);
348
348
  case "date":
349
- return Wt(e);
349
+ return Qt(e);
350
350
  case "datetime":
351
- return Jt(e);
351
+ return Wt(e);
352
352
  case "currency":
353
- return Qt(e);
353
+ return Yt(e);
354
354
  case "json":
355
- return Zt(e);
355
+ return Xt(e);
356
356
  case "array":
357
- return en(e);
357
+ return Zt(e);
358
358
  default:
359
359
  return String(e);
360
360
  }
@@ -368,42 +368,42 @@ function at(e) {
368
368
  } else for (t in e) e[t] && (n && (n += " "), n += t);
369
369
  return n;
370
370
  }
371
- function nn() {
371
+ function tn() {
372
372
  for (var e, r, t = 0, n = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (r = at(e)) && (n && (n += " "), n += r);
373
373
  return n;
374
374
  }
375
- const an = (e, r) => {
375
+ const nn = (e, r) => {
376
376
  const t = new Array(e.length + r.length);
377
377
  for (let n = 0; n < e.length; n++)
378
378
  t[n] = e[n];
379
379
  for (let n = 0; n < r.length; n++)
380
380
  t[e.length + n] = r[n];
381
381
  return t;
382
- }, on = (e, r) => ({
382
+ }, an = (e, r) => ({
383
383
  classGroupId: e,
384
384
  validator: r
385
385
  }), ot = (e = /* @__PURE__ */ new Map(), r = null, t) => ({
386
386
  nextPart: e,
387
387
  validators: r,
388
388
  classGroupId: t
389
- }), hr = "-", Lr = [], sn = "arbitrary..", ln = (e) => {
390
- const r = un(e), {
389
+ }), hr = "-", jr = [], on = "arbitrary..", sn = (e) => {
390
+ const r = cn(e), {
391
391
  conflictingClassGroups: t,
392
392
  conflictingClassGroupModifiers: n
393
393
  } = e;
394
394
  return {
395
395
  getClassGroupId: (i) => {
396
396
  if (i.startsWith("[") && i.endsWith("]"))
397
- return cn(i);
397
+ return ln(i);
398
398
  const f = i.split(hr), c = f[0] === "" && f.length > 1 ? 1 : 0;
399
399
  return st(f, c, r);
400
400
  },
401
401
  getConflictingClassGroupIds: (i, f) => {
402
402
  if (f) {
403
403
  const c = n[i], u = t[i];
404
- return c ? u ? an(u, c) : c : u || Lr;
404
+ return c ? u ? nn(u, c) : c : u || jr;
405
405
  }
406
- return t[i] || Lr;
406
+ return t[i] || jr;
407
407
  }
408
408
  };
409
409
  }, st = (e, r, t) => {
@@ -423,16 +423,16 @@ const an = (e, r) => {
423
423
  if (y.validator(f))
424
424
  return y.classGroupId;
425
425
  }
426
- }, cn = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
426
+ }, ln = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
427
427
  const r = e.slice(1, -1), t = r.indexOf(":"), n = r.slice(0, t);
428
- return n ? sn + n : void 0;
429
- })(), un = (e) => {
428
+ return n ? on + n : void 0;
429
+ })(), cn = (e) => {
430
430
  const {
431
431
  theme: r,
432
432
  classGroups: t
433
433
  } = e;
434
- return dn(t, r);
435
- }, dn = (e, r) => {
434
+ return un(t, r);
435
+ }, un = (e, r) => {
436
436
  const t = ot();
437
437
  for (const n in e) {
438
438
  const a = e[n];
@@ -443,28 +443,28 @@ const an = (e, r) => {
443
443
  const a = e.length;
444
444
  for (let s = 0; s < a; s++) {
445
445
  const i = e[s];
446
- fn(i, r, t, n);
446
+ dn(i, r, t, n);
447
447
  }
448
- }, fn = (e, r, t, n) => {
448
+ }, dn = (e, r, t, n) => {
449
449
  if (typeof e == "string") {
450
- mn(e, r, t);
450
+ fn(e, r, t);
451
451
  return;
452
452
  }
453
453
  if (typeof e == "function") {
454
- pn(e, r, t, n);
454
+ mn(e, r, t, n);
455
455
  return;
456
456
  }
457
- gn(e, r, t, n);
458
- }, mn = (e, r, t) => {
457
+ pn(e, r, t, n);
458
+ }, fn = (e, r, t) => {
459
459
  const n = e === "" ? r : it(r, e);
460
460
  n.classGroupId = t;
461
- }, pn = (e, r, t, n) => {
462
- if (hn(e)) {
461
+ }, mn = (e, r, t, n) => {
462
+ if (gn(e)) {
463
463
  Fr(e(n), r, t, n);
464
464
  return;
465
465
  }
466
- r.validators === null && (r.validators = []), r.validators.push(on(t, e));
467
- }, gn = (e, r, t, n) => {
466
+ r.validators === null && (r.validators = []), r.validators.push(an(t, e));
467
+ }, pn = (e, r, t, n) => {
468
468
  const a = Object.entries(e), s = a.length;
469
469
  for (let i = 0; i < s; i++) {
470
470
  const [f, c] = a[i];
@@ -479,7 +479,7 @@ const an = (e, r) => {
479
479
  f || (f = ot(), t.nextPart.set(i, f)), t = f;
480
480
  }
481
481
  return t;
482
- }, hn = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, yn = (e) => {
482
+ }, gn = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, hn = (e) => {
483
483
  if (e < 1)
484
484
  return {
485
485
  get: () => {
@@ -503,13 +503,13 @@ const an = (e, r) => {
503
503
  s in t ? t[s] = i : a(s, i);
504
504
  }
505
505
  };
506
- }, Or = "!", qr = ":", bn = [], Ur = (e, r, t, n, a) => ({
506
+ }, Nr = "!", qr = ":", yn = [], Ur = (e, r, t, n, a) => ({
507
507
  modifiers: e,
508
508
  hasImportantModifier: r,
509
509
  baseClassName: t,
510
510
  maybePostfixModifierPosition: n,
511
511
  isExternal: a
512
- }), wn = (e) => {
512
+ }), bn = (e) => {
513
513
  const {
514
514
  prefix: r,
515
515
  experimentalParseClassName: t
@@ -519,34 +519,34 @@ const an = (e, r) => {
519
519
  let i = 0, f = 0, c = 0, u;
520
520
  const y = a.length;
521
521
  for (let b = 0; b < y; b++) {
522
- const G = a[b];
522
+ const H = a[b];
523
523
  if (i === 0 && f === 0) {
524
- if (G === qr) {
524
+ if (H === qr) {
525
525
  s.push(a.slice(c, b)), c = b + 1;
526
526
  continue;
527
527
  }
528
- if (G === "/") {
528
+ if (H === "/") {
529
529
  u = b;
530
530
  continue;
531
531
  }
532
532
  }
533
- G === "[" ? i++ : G === "]" ? i-- : G === "(" ? f++ : G === ")" && f--;
533
+ H === "[" ? i++ : H === "]" ? i-- : H === "(" ? f++ : H === ")" && f--;
534
534
  }
535
535
  const D = s.length === 0 ? a : a.slice(c);
536
- let _ = D, F = !1;
537
- D.endsWith(Or) ? (_ = D.slice(0, -1), F = !0) : (
536
+ let V = D, F = !1;
537
+ D.endsWith(Nr) ? (V = D.slice(0, -1), F = !0) : (
538
538
  /**
539
539
  * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
540
540
  * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
541
541
  */
542
- D.startsWith(Or) && (_ = D.slice(1), F = !0)
542
+ D.startsWith(Nr) && (V = D.slice(1), F = !0)
543
543
  );
544
- const Y = u && u > c ? u - c : void 0;
545
- return Ur(s, F, _, Y);
544
+ const G = u && u > c ? u - c : void 0;
545
+ return Ur(s, F, V, G);
546
546
  };
547
547
  if (r) {
548
548
  const a = r + qr, s = n;
549
- n = (i) => i.startsWith(a) ? s(i.slice(a.length)) : Ur(bn, !1, i, void 0, !0);
549
+ n = (i) => i.startsWith(a) ? s(i.slice(a.length)) : Ur(yn, !1, i, void 0, !0);
550
550
  }
551
551
  if (t) {
552
552
  const a = n;
@@ -556,7 +556,7 @@ const an = (e, r) => {
556
556
  });
557
557
  }
558
558
  return n;
559
- }, vn = (e) => {
559
+ }, wn = (e) => {
560
560
  const r = /* @__PURE__ */ new Map();
561
561
  return e.orderSensitiveModifiers.forEach((t, n) => {
562
562
  r.set(t, 1e6 + n);
@@ -569,56 +569,56 @@ const an = (e, r) => {
569
569
  }
570
570
  return a.length > 0 && (a.sort(), n.push(...a)), n;
571
571
  };
572
- }, Cn = (e) => ({
573
- cache: yn(e.cacheSize),
574
- parseClassName: wn(e),
575
- sortModifiers: vn(e),
576
- ...ln(e)
577
- }), En = /\s+/, Sn = (e, r) => {
572
+ }, vn = (e) => ({
573
+ cache: hn(e.cacheSize),
574
+ parseClassName: bn(e),
575
+ sortModifiers: wn(e),
576
+ ...sn(e)
577
+ }), Cn = /\s+/, En = (e, r) => {
578
578
  const {
579
579
  parseClassName: t,
580
580
  getClassGroupId: n,
581
581
  getConflictingClassGroupIds: a,
582
582
  sortModifiers: s
583
- } = r, i = [], f = e.trim().split(En);
583
+ } = r, i = [], f = e.trim().split(Cn);
584
584
  let c = "";
585
585
  for (let u = f.length - 1; u >= 0; u -= 1) {
586
586
  const y = f[u], {
587
587
  isExternal: D,
588
- modifiers: _,
588
+ modifiers: V,
589
589
  hasImportantModifier: F,
590
- baseClassName: Y,
590
+ baseClassName: G,
591
591
  maybePostfixModifierPosition: b
592
592
  } = t(y);
593
593
  if (D) {
594
594
  c = y + (c.length > 0 ? " " + c : c);
595
595
  continue;
596
596
  }
597
- let G = !!b, q = n(G ? Y.substring(0, b) : Y);
597
+ let H = !!b, q = n(H ? G.substring(0, b) : G);
598
598
  if (!q) {
599
- if (!G) {
599
+ if (!H) {
600
600
  c = y + (c.length > 0 ? " " + c : c);
601
601
  continue;
602
602
  }
603
- if (q = n(Y), !q) {
603
+ if (q = n(G), !q) {
604
604
  c = y + (c.length > 0 ? " " + c : c);
605
605
  continue;
606
606
  }
607
- G = !1;
607
+ H = !1;
608
608
  }
609
- const I = _.length === 0 ? "" : _.length === 1 ? _[0] : s(_).join(":"), L = F ? I + Or : I, te = L + q;
609
+ const $ = V.length === 0 ? "" : V.length === 1 ? V[0] : s(V).join(":"), j = F ? $ + Nr : $, te = j + q;
610
610
  if (i.indexOf(te) > -1)
611
611
  continue;
612
612
  i.push(te);
613
- const ne = a(q, G);
614
- for (let R = 0; R < ne.length; ++R) {
615
- const p = ne[R];
616
- i.push(L + p);
613
+ const ne = a(q, H);
614
+ for (let T = 0; T < ne.length; ++T) {
615
+ const p = ne[T];
616
+ i.push(j + p);
617
617
  }
618
618
  c = y + (c.length > 0 ? " " + c : c);
619
619
  }
620
620
  return c;
621
- }, xn = (...e) => {
621
+ }, Sn = (...e) => {
622
622
  let r = 0, t, n, a = "";
623
623
  for (; r < e.length; )
624
624
  (t = e[r++]) && (n = lt(t)) && (a && (a += " "), a += n);
@@ -630,35 +630,35 @@ const an = (e, r) => {
630
630
  for (let n = 0; n < e.length; n++)
631
631
  e[n] && (r = lt(e[n])) && (t && (t += " "), t += r);
632
632
  return t;
633
- }, Nn = (e, ...r) => {
633
+ }, xn = (e, ...r) => {
634
634
  let t, n, a, s;
635
635
  const i = (c) => {
636
636
  const u = r.reduce((y, D) => D(y), e());
637
- return t = Cn(u), n = t.cache.get, a = t.cache.set, s = f, f(c);
637
+ return t = vn(u), n = t.cache.get, a = t.cache.set, s = f, f(c);
638
638
  }, f = (c) => {
639
639
  const u = n(c);
640
640
  if (u)
641
641
  return u;
642
- const y = Sn(c, t);
642
+ const y = En(c, t);
643
643
  return a(c, y), y;
644
644
  };
645
- return s = i, (...c) => s(xn(...c));
646
- }, On = [], de = (e) => {
645
+ return s = i, (...c) => s(Sn(...c));
646
+ }, On = [], fe = (e) => {
647
647
  const r = (t) => t[e] || On;
648
648
  return r.isThemeGetter = !0, r;
649
- }, ct = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ut = /^\((?:(\w[\w-]*):)?(.+)\)$/i, kn = /^\d+\/\d+$/, Tn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Rn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, An = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Fn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Dn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, nr = (e) => kn.test(e), z = (e) => !!e && !Number.isNaN(Number(e)), ze = (e) => !!e && Number.isInteger(Number(e)), Sr = (e) => e.endsWith("%") && z(e.slice(0, -1)), $e = (e) => Tn.test(e), _n = () => !0, Vn = (e) => (
649
+ }, ct = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, ut = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Nn = /^\d+\/\d+$/, kn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Rn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Tn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Fn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, nr = (e) => Nn.test(e), z = (e) => !!e && !Number.isNaN(Number(e)), Be = (e) => !!e && Number.isInteger(Number(e)), Sr = (e) => e.endsWith("%") && z(e.slice(0, -1)), Ie = (e) => kn.test(e), Dn = () => !0, _n = (e) => (
650
650
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
651
651
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
652
652
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
653
- Rn.test(e) && !An.test(e)
654
- ), dt = () => !1, Pn = (e) => Fn.test(e), In = (e) => Dn.test(e), $n = (e) => !N(e) && !O(e), jn = (e) => or(e, pt, dt), N = (e) => ct.test(e), Ye = (e) => or(e, gt, Vn), xr = (e) => or(e, zn, z), Br = (e) => or(e, ft, dt), Ln = (e) => or(e, mt, In), mr = (e) => or(e, ht, Pn), O = (e) => ut.test(e), lr = (e) => sr(e, gt), qn = (e) => sr(e, Kn), zr = (e) => sr(e, ft), Un = (e) => sr(e, pt), Bn = (e) => sr(e, mt), pr = (e) => sr(e, ht, !0), or = (e, r, t) => {
653
+ Rn.test(e) && !Tn.test(e)
654
+ ), dt = () => !1, Vn = (e) => An.test(e), Pn = (e) => Fn.test(e), $n = (e) => !O(e) && !N(e), In = (e) => or(e, pt, dt), O = (e) => ct.test(e), He = (e) => or(e, gt, _n), xr = (e) => or(e, Bn, z), Br = (e) => or(e, ft, dt), Ln = (e) => or(e, mt, Pn), mr = (e) => or(e, ht, Vn), N = (e) => ut.test(e), lr = (e) => sr(e, gt), jn = (e) => sr(e, zn), zr = (e) => sr(e, ft), qn = (e) => sr(e, pt), Un = (e) => sr(e, mt), pr = (e) => sr(e, ht, !0), or = (e, r, t) => {
655
655
  const n = ct.exec(e);
656
656
  return n ? n[1] ? r(n[1]) : t(n[2]) : !1;
657
657
  }, sr = (e, r, t = !1) => {
658
658
  const n = ut.exec(e);
659
659
  return n ? n[1] ? r(n[1]) : t : !1;
660
- }, ft = (e) => e === "position" || e === "percentage", mt = (e) => e === "image" || e === "url", pt = (e) => e === "length" || e === "size" || e === "bg-size", gt = (e) => e === "length", zn = (e) => e === "number", Kn = (e) => e === "family-name", ht = (e) => e === "shadow", Mn = () => {
661
- const e = de("color"), r = de("font"), t = de("text"), n = de("font-weight"), a = de("tracking"), s = de("leading"), i = de("breakpoint"), f = de("container"), c = de("spacing"), u = de("radius"), y = de("shadow"), D = de("inset-shadow"), _ = de("text-shadow"), F = de("drop-shadow"), Y = de("blur"), b = de("perspective"), G = de("aspect"), q = de("ease"), I = de("animate"), L = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], te = () => [
660
+ }, ft = (e) => e === "position" || e === "percentage", mt = (e) => e === "image" || e === "url", pt = (e) => e === "length" || e === "size" || e === "bg-size", gt = (e) => e === "length", Bn = (e) => e === "number", zn = (e) => e === "family-name", ht = (e) => e === "shadow", Kn = () => {
661
+ const e = fe("color"), r = fe("font"), t = fe("text"), n = fe("font-weight"), a = fe("tracking"), s = fe("leading"), i = fe("breakpoint"), f = fe("container"), c = fe("spacing"), u = fe("radius"), y = fe("shadow"), D = fe("inset-shadow"), V = fe("text-shadow"), F = fe("drop-shadow"), G = fe("blur"), b = fe("perspective"), H = fe("aspect"), q = fe("ease"), $ = fe("animate"), j = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], te = () => [
662
662
  "center",
663
663
  "top",
664
664
  "bottom",
@@ -676,51 +676,51 @@ const an = (e, r) => {
676
676
  "bottom-left",
677
677
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
678
678
  "left-bottom"
679
- ], ne = () => [...te(), O, N], R = () => ["auto", "hidden", "clip", "visible", "scroll"], p = () => ["auto", "contain", "none"], l = () => [O, N, c], w = () => [nr, "full", "auto", ...l()], v = () => [ze, "none", "subgrid", O, N], k = () => ["auto", {
680
- span: ["full", ze, O, N]
681
- }, ze, O, N], j = () => [ze, "auto", O, N], K = () => ["auto", "min", "max", "fr", O, N], Q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], ee = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], U = () => ["auto", ...l()], Z = () => [nr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...l()], A = () => [e, O, N], me = () => [...te(), zr, Br, {
682
- position: [O, N]
679
+ ], ne = () => [...te(), N, O], T = () => ["auto", "hidden", "clip", "visible", "scroll"], p = () => ["auto", "contain", "none"], l = () => [N, O, c], w = () => [nr, "full", "auto", ...l()], v = () => [Be, "none", "subgrid", N, O], k = () => ["auto", {
680
+ span: ["full", Be, N, O]
681
+ }, Be, N, O], L = () => [Be, "auto", N, O], K = () => ["auto", "min", "max", "fr", N, O], Q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], ee = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], U = () => ["auto", ...l()], Z = () => [nr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...l()], A = () => [e, N, O], me = () => [...te(), zr, Br, {
682
+ position: [N, O]
683
683
  }], Fe = () => ["no-repeat", {
684
684
  repeat: ["", "x", "y", "space", "round"]
685
- }], he = () => ["auto", "cover", "contain", Un, jn, {
686
- size: [O, N]
687
- }], Se = () => [Sr, lr, Ye], T = () => [
685
+ }], he = () => ["auto", "cover", "contain", qn, In, {
686
+ size: [N, O]
687
+ }], Se = () => [Sr, lr, He], R = () => [
688
688
  // Deprecated since Tailwind CSS v4.0.0
689
689
  "",
690
690
  "none",
691
691
  "full",
692
692
  u,
693
- O,
694
- N
695
- ], ae = () => ["", z, lr, Ye], xe = () => ["solid", "dashed", "dotted", "double"], pe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => [z, Sr, zr, Br], Ne = () => [
693
+ N,
694
+ O
695
+ ], ae = () => ["", z, lr, He], xe = () => ["solid", "dashed", "dotted", "double"], pe = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], P = () => [z, Sr, zr, Br], Oe = () => [
696
696
  // Deprecated since Tailwind CSS v4.0.0
697
697
  "",
698
698
  "none",
699
- Y,
700
- O,
701
- N
702
- ], ve = () => ["none", z, O, N], ye = () => ["none", z, O, N], De = () => [z, O, N], Oe = () => [nr, "full", ...l()];
699
+ G,
700
+ N,
701
+ O
702
+ ], ve = () => ["none", z, N, O], ye = () => ["none", z, N, O], De = () => [z, N, O], Ne = () => [nr, "full", ...l()];
703
703
  return {
704
704
  cacheSize: 500,
705
705
  theme: {
706
706
  animate: ["spin", "ping", "pulse", "bounce"],
707
707
  aspect: ["video"],
708
- blur: [$e],
709
- breakpoint: [$e],
710
- color: [_n],
711
- container: [$e],
712
- "drop-shadow": [$e],
708
+ blur: [Ie],
709
+ breakpoint: [Ie],
710
+ color: [Dn],
711
+ container: [Ie],
712
+ "drop-shadow": [Ie],
713
713
  ease: ["in", "out", "in-out"],
714
714
  font: [$n],
715
715
  "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
716
- "inset-shadow": [$e],
716
+ "inset-shadow": [Ie],
717
717
  leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
718
718
  perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
719
- radius: [$e],
720
- shadow: [$e],
719
+ radius: [Ie],
720
+ shadow: [Ie],
721
721
  spacing: ["px", z],
722
- text: [$e],
723
- "text-shadow": [$e],
722
+ text: [Ie],
723
+ "text-shadow": [Ie],
724
724
  tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
725
725
  },
726
726
  classGroups: {
@@ -732,7 +732,7 @@ const an = (e, r) => {
732
732
  * @see https://tailwindcss.com/docs/aspect-ratio
733
733
  */
734
734
  aspect: [{
735
- aspect: ["auto", "square", nr, N, O, G]
735
+ aspect: ["auto", "square", nr, O, N, H]
736
736
  }],
737
737
  /**
738
738
  * Container
@@ -745,21 +745,21 @@ const an = (e, r) => {
745
745
  * @see https://tailwindcss.com/docs/columns
746
746
  */
747
747
  columns: [{
748
- columns: [z, N, O, f]
748
+ columns: [z, O, N, f]
749
749
  }],
750
750
  /**
751
751
  * Break After
752
752
  * @see https://tailwindcss.com/docs/break-after
753
753
  */
754
754
  "break-after": [{
755
- "break-after": L()
755
+ "break-after": j()
756
756
  }],
757
757
  /**
758
758
  * Break Before
759
759
  * @see https://tailwindcss.com/docs/break-before
760
760
  */
761
761
  "break-before": [{
762
- "break-before": L()
762
+ "break-before": j()
763
763
  }],
764
764
  /**
765
765
  * Break Inside
@@ -830,21 +830,21 @@ const an = (e, r) => {
830
830
  * @see https://tailwindcss.com/docs/overflow
831
831
  */
832
832
  overflow: [{
833
- overflow: R()
833
+ overflow: T()
834
834
  }],
835
835
  /**
836
836
  * Overflow X
837
837
  * @see https://tailwindcss.com/docs/overflow
838
838
  */
839
839
  "overflow-x": [{
840
- "overflow-x": R()
840
+ "overflow-x": T()
841
841
  }],
842
842
  /**
843
843
  * Overflow Y
844
844
  * @see https://tailwindcss.com/docs/overflow
845
845
  */
846
846
  "overflow-y": [{
847
- "overflow-y": R()
847
+ "overflow-y": T()
848
848
  }],
849
849
  /**
850
850
  * Overscroll Behavior
@@ -945,7 +945,7 @@ const an = (e, r) => {
945
945
  * @see https://tailwindcss.com/docs/z-index
946
946
  */
947
947
  z: [{
948
- z: [ze, "auto", O, N]
948
+ z: [Be, "auto", N, O]
949
949
  }],
950
950
  // ------------------------
951
951
  // --- Flexbox and Grid ---
@@ -976,28 +976,28 @@ const an = (e, r) => {
976
976
  * @see https://tailwindcss.com/docs/flex
977
977
  */
978
978
  flex: [{
979
- flex: [z, nr, "auto", "initial", "none", N]
979
+ flex: [z, nr, "auto", "initial", "none", O]
980
980
  }],
981
981
  /**
982
982
  * Flex Grow
983
983
  * @see https://tailwindcss.com/docs/flex-grow
984
984
  */
985
985
  grow: [{
986
- grow: ["", z, O, N]
986
+ grow: ["", z, N, O]
987
987
  }],
988
988
  /**
989
989
  * Flex Shrink
990
990
  * @see https://tailwindcss.com/docs/flex-shrink
991
991
  */
992
992
  shrink: [{
993
- shrink: ["", z, O, N]
993
+ shrink: ["", z, N, O]
994
994
  }],
995
995
  /**
996
996
  * Order
997
997
  * @see https://tailwindcss.com/docs/order
998
998
  */
999
999
  order: [{
1000
- order: [ze, "first", "last", "none", O, N]
1000
+ order: [Be, "first", "last", "none", N, O]
1001
1001
  }],
1002
1002
  /**
1003
1003
  * Grid Template Columns
@@ -1018,14 +1018,14 @@ const an = (e, r) => {
1018
1018
  * @see https://tailwindcss.com/docs/grid-column
1019
1019
  */
1020
1020
  "col-start": [{
1021
- "col-start": j()
1021
+ "col-start": L()
1022
1022
  }],
1023
1023
  /**
1024
1024
  * Grid Column End
1025
1025
  * @see https://tailwindcss.com/docs/grid-column
1026
1026
  */
1027
1027
  "col-end": [{
1028
- "col-end": j()
1028
+ "col-end": L()
1029
1029
  }],
1030
1030
  /**
1031
1031
  * Grid Template Rows
@@ -1046,14 +1046,14 @@ const an = (e, r) => {
1046
1046
  * @see https://tailwindcss.com/docs/grid-row
1047
1047
  */
1048
1048
  "row-start": [{
1049
- "row-start": j()
1049
+ "row-start": L()
1050
1050
  }],
1051
1051
  /**
1052
1052
  * Grid Row End
1053
1053
  * @see https://tailwindcss.com/docs/grid-row
1054
1054
  */
1055
1055
  "row-end": [{
1056
- "row-end": j()
1056
+ "row-end": L()
1057
1057
  }],
1058
1058
  /**
1059
1059
  * Grid Auto Flow
@@ -1392,7 +1392,7 @@ const an = (e, r) => {
1392
1392
  * @see https://tailwindcss.com/docs/font-size
1393
1393
  */
1394
1394
  "font-size": [{
1395
- text: ["base", t, lr, Ye]
1395
+ text: ["base", t, lr, He]
1396
1396
  }],
1397
1397
  /**
1398
1398
  * Font Smoothing
@@ -1409,21 +1409,21 @@ const an = (e, r) => {
1409
1409
  * @see https://tailwindcss.com/docs/font-weight
1410
1410
  */
1411
1411
  "font-weight": [{
1412
- font: [n, O, xr]
1412
+ font: [n, N, xr]
1413
1413
  }],
1414
1414
  /**
1415
1415
  * Font Stretch
1416
1416
  * @see https://tailwindcss.com/docs/font-stretch
1417
1417
  */
1418
1418
  "font-stretch": [{
1419
- "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Sr, N]
1419
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Sr, O]
1420
1420
  }],
1421
1421
  /**
1422
1422
  * Font Family
1423
1423
  * @see https://tailwindcss.com/docs/font-family
1424
1424
  */
1425
1425
  "font-family": [{
1426
- font: [qn, N, r]
1426
+ font: [jn, O, r]
1427
1427
  }],
1428
1428
  /**
1429
1429
  * Font Variant Numeric
@@ -1460,14 +1460,14 @@ const an = (e, r) => {
1460
1460
  * @see https://tailwindcss.com/docs/letter-spacing
1461
1461
  */
1462
1462
  tracking: [{
1463
- tracking: [a, O, N]
1463
+ tracking: [a, N, O]
1464
1464
  }],
1465
1465
  /**
1466
1466
  * Line Clamp
1467
1467
  * @see https://tailwindcss.com/docs/line-clamp
1468
1468
  */
1469
1469
  "line-clamp": [{
1470
- "line-clamp": [z, "none", O, xr]
1470
+ "line-clamp": [z, "none", N, xr]
1471
1471
  }],
1472
1472
  /**
1473
1473
  * Line Height
@@ -1485,7 +1485,7 @@ const an = (e, r) => {
1485
1485
  * @see https://tailwindcss.com/docs/list-style-image
1486
1486
  */
1487
1487
  "list-image": [{
1488
- "list-image": ["none", O, N]
1488
+ "list-image": ["none", N, O]
1489
1489
  }],
1490
1490
  /**
1491
1491
  * List Style Position
@@ -1499,7 +1499,7 @@ const an = (e, r) => {
1499
1499
  * @see https://tailwindcss.com/docs/list-style-type
1500
1500
  */
1501
1501
  "list-style-type": [{
1502
- list: ["disc", "decimal", "none", O, N]
1502
+ list: ["disc", "decimal", "none", N, O]
1503
1503
  }],
1504
1504
  /**
1505
1505
  * Text Alignment
@@ -1540,7 +1540,7 @@ const an = (e, r) => {
1540
1540
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1541
1541
  */
1542
1542
  "text-decoration-thickness": [{
1543
- decoration: [z, "from-font", "auto", O, Ye]
1543
+ decoration: [z, "from-font", "auto", N, He]
1544
1544
  }],
1545
1545
  /**
1546
1546
  * Text Decoration Color
@@ -1554,7 +1554,7 @@ const an = (e, r) => {
1554
1554
  * @see https://tailwindcss.com/docs/text-underline-offset
1555
1555
  */
1556
1556
  "underline-offset": [{
1557
- "underline-offset": [z, "auto", O, N]
1557
+ "underline-offset": [z, "auto", N, O]
1558
1558
  }],
1559
1559
  /**
1560
1560
  * Text Transform
@@ -1585,7 +1585,7 @@ const an = (e, r) => {
1585
1585
  * @see https://tailwindcss.com/docs/vertical-align
1586
1586
  */
1587
1587
  "vertical-align": [{
1588
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", O, N]
1588
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", N, O]
1589
1589
  }],
1590
1590
  /**
1591
1591
  * Whitespace
@@ -1620,7 +1620,7 @@ const an = (e, r) => {
1620
1620
  * @see https://tailwindcss.com/docs/content
1621
1621
  */
1622
1622
  content: [{
1623
- content: ["none", O, N]
1623
+ content: ["none", N, O]
1624
1624
  }],
1625
1625
  // -------------------
1626
1626
  // --- Backgrounds ---
@@ -1675,10 +1675,10 @@ const an = (e, r) => {
1675
1675
  bg: ["none", {
1676
1676
  linear: [{
1677
1677
  to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1678
- }, ze, O, N],
1679
- radial: ["", O, N],
1680
- conic: [ze, O, N]
1681
- }, Bn, Ln]
1678
+ }, Be, N, O],
1679
+ radial: ["", N, O],
1680
+ conic: [Be, N, O]
1681
+ }, Un, Ln]
1682
1682
  }],
1683
1683
  /**
1684
1684
  * Background Color
@@ -1737,105 +1737,105 @@ const an = (e, r) => {
1737
1737
  * @see https://tailwindcss.com/docs/border-radius
1738
1738
  */
1739
1739
  rounded: [{
1740
- rounded: T()
1740
+ rounded: R()
1741
1741
  }],
1742
1742
  /**
1743
1743
  * Border Radius Start
1744
1744
  * @see https://tailwindcss.com/docs/border-radius
1745
1745
  */
1746
1746
  "rounded-s": [{
1747
- "rounded-s": T()
1747
+ "rounded-s": R()
1748
1748
  }],
1749
1749
  /**
1750
1750
  * Border Radius End
1751
1751
  * @see https://tailwindcss.com/docs/border-radius
1752
1752
  */
1753
1753
  "rounded-e": [{
1754
- "rounded-e": T()
1754
+ "rounded-e": R()
1755
1755
  }],
1756
1756
  /**
1757
1757
  * Border Radius Top
1758
1758
  * @see https://tailwindcss.com/docs/border-radius
1759
1759
  */
1760
1760
  "rounded-t": [{
1761
- "rounded-t": T()
1761
+ "rounded-t": R()
1762
1762
  }],
1763
1763
  /**
1764
1764
  * Border Radius Right
1765
1765
  * @see https://tailwindcss.com/docs/border-radius
1766
1766
  */
1767
1767
  "rounded-r": [{
1768
- "rounded-r": T()
1768
+ "rounded-r": R()
1769
1769
  }],
1770
1770
  /**
1771
1771
  * Border Radius Bottom
1772
1772
  * @see https://tailwindcss.com/docs/border-radius
1773
1773
  */
1774
1774
  "rounded-b": [{
1775
- "rounded-b": T()
1775
+ "rounded-b": R()
1776
1776
  }],
1777
1777
  /**
1778
1778
  * Border Radius Left
1779
1779
  * @see https://tailwindcss.com/docs/border-radius
1780
1780
  */
1781
1781
  "rounded-l": [{
1782
- "rounded-l": T()
1782
+ "rounded-l": R()
1783
1783
  }],
1784
1784
  /**
1785
1785
  * Border Radius Start Start
1786
1786
  * @see https://tailwindcss.com/docs/border-radius
1787
1787
  */
1788
1788
  "rounded-ss": [{
1789
- "rounded-ss": T()
1789
+ "rounded-ss": R()
1790
1790
  }],
1791
1791
  /**
1792
1792
  * Border Radius Start End
1793
1793
  * @see https://tailwindcss.com/docs/border-radius
1794
1794
  */
1795
1795
  "rounded-se": [{
1796
- "rounded-se": T()
1796
+ "rounded-se": R()
1797
1797
  }],
1798
1798
  /**
1799
1799
  * Border Radius End End
1800
1800
  * @see https://tailwindcss.com/docs/border-radius
1801
1801
  */
1802
1802
  "rounded-ee": [{
1803
- "rounded-ee": T()
1803
+ "rounded-ee": R()
1804
1804
  }],
1805
1805
  /**
1806
1806
  * Border Radius End Start
1807
1807
  * @see https://tailwindcss.com/docs/border-radius
1808
1808
  */
1809
1809
  "rounded-es": [{
1810
- "rounded-es": T()
1810
+ "rounded-es": R()
1811
1811
  }],
1812
1812
  /**
1813
1813
  * Border Radius Top Left
1814
1814
  * @see https://tailwindcss.com/docs/border-radius
1815
1815
  */
1816
1816
  "rounded-tl": [{
1817
- "rounded-tl": T()
1817
+ "rounded-tl": R()
1818
1818
  }],
1819
1819
  /**
1820
1820
  * Border Radius Top Right
1821
1821
  * @see https://tailwindcss.com/docs/border-radius
1822
1822
  */
1823
1823
  "rounded-tr": [{
1824
- "rounded-tr": T()
1824
+ "rounded-tr": R()
1825
1825
  }],
1826
1826
  /**
1827
1827
  * Border Radius Bottom Right
1828
1828
  * @see https://tailwindcss.com/docs/border-radius
1829
1829
  */
1830
1830
  "rounded-br": [{
1831
- "rounded-br": T()
1831
+ "rounded-br": R()
1832
1832
  }],
1833
1833
  /**
1834
1834
  * Border Radius Bottom Left
1835
1835
  * @see https://tailwindcss.com/docs/border-radius
1836
1836
  */
1837
1837
  "rounded-bl": [{
1838
- "rounded-bl": T()
1838
+ "rounded-bl": R()
1839
1839
  }],
1840
1840
  /**
1841
1841
  * Border Width
@@ -2020,14 +2020,14 @@ const an = (e, r) => {
2020
2020
  * @see https://tailwindcss.com/docs/outline-offset
2021
2021
  */
2022
2022
  "outline-offset": [{
2023
- "outline-offset": [z, O, N]
2023
+ "outline-offset": [z, N, O]
2024
2024
  }],
2025
2025
  /**
2026
2026
  * Outline Width
2027
2027
  * @see https://tailwindcss.com/docs/outline-width
2028
2028
  */
2029
2029
  "outline-w": [{
2030
- outline: ["", z, lr, Ye]
2030
+ outline: ["", z, lr, He]
2031
2031
  }],
2032
2032
  /**
2033
2033
  * Outline Color
@@ -2102,7 +2102,7 @@ const an = (e, r) => {
2102
2102
  * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2103
2103
  */
2104
2104
  "ring-offset-w": [{
2105
- "ring-offset": [z, Ye]
2105
+ "ring-offset": [z, He]
2106
2106
  }],
2107
2107
  /**
2108
2108
  * Ring Offset Color
@@ -2132,7 +2132,7 @@ const an = (e, r) => {
2132
2132
  * @see https://tailwindcss.com/docs/text-shadow
2133
2133
  */
2134
2134
  "text-shadow": [{
2135
- "text-shadow": ["none", _, pr, mr]
2135
+ "text-shadow": ["none", V, pr, mr]
2136
2136
  }],
2137
2137
  /**
2138
2138
  * Text Shadow Color
@@ -2146,7 +2146,7 @@ const an = (e, r) => {
2146
2146
  * @see https://tailwindcss.com/docs/opacity
2147
2147
  */
2148
2148
  opacity: [{
2149
- opacity: [z, O, N]
2149
+ opacity: [z, N, O]
2150
2150
  }],
2151
2151
  /**
2152
2152
  * Mix Blend Mode
@@ -2268,7 +2268,7 @@ const an = (e, r) => {
2268
2268
  "mask-y-to": A()
2269
2269
  }],
2270
2270
  "mask-image-radial": [{
2271
- "mask-radial": [O, N]
2271
+ "mask-radial": [N, O]
2272
2272
  }],
2273
2273
  "mask-image-radial-from-pos": [{
2274
2274
  "mask-radial-from": P()
@@ -2356,7 +2356,7 @@ const an = (e, r) => {
2356
2356
  * @see https://tailwindcss.com/docs/mask-image
2357
2357
  */
2358
2358
  "mask-image": [{
2359
- mask: ["none", O, N]
2359
+ mask: ["none", N, O]
2360
2360
  }],
2361
2361
  // ---------------
2362
2362
  // --- Filters ---
@@ -2370,8 +2370,8 @@ const an = (e, r) => {
2370
2370
  // Deprecated since Tailwind CSS v3.0.0
2371
2371
  "",
2372
2372
  "none",
2373
- O,
2374
- N
2373
+ N,
2374
+ O
2375
2375
  ]
2376
2376
  }],
2377
2377
  /**
@@ -2379,21 +2379,21 @@ const an = (e, r) => {
2379
2379
  * @see https://tailwindcss.com/docs/blur
2380
2380
  */
2381
2381
  blur: [{
2382
- blur: Ne()
2382
+ blur: Oe()
2383
2383
  }],
2384
2384
  /**
2385
2385
  * Brightness
2386
2386
  * @see https://tailwindcss.com/docs/brightness
2387
2387
  */
2388
2388
  brightness: [{
2389
- brightness: [z, O, N]
2389
+ brightness: [z, N, O]
2390
2390
  }],
2391
2391
  /**
2392
2392
  * Contrast
2393
2393
  * @see https://tailwindcss.com/docs/contrast
2394
2394
  */
2395
2395
  contrast: [{
2396
- contrast: [z, O, N]
2396
+ contrast: [z, N, O]
2397
2397
  }],
2398
2398
  /**
2399
2399
  * Drop Shadow
@@ -2421,35 +2421,35 @@ const an = (e, r) => {
2421
2421
  * @see https://tailwindcss.com/docs/grayscale
2422
2422
  */
2423
2423
  grayscale: [{
2424
- grayscale: ["", z, O, N]
2424
+ grayscale: ["", z, N, O]
2425
2425
  }],
2426
2426
  /**
2427
2427
  * Hue Rotate
2428
2428
  * @see https://tailwindcss.com/docs/hue-rotate
2429
2429
  */
2430
2430
  "hue-rotate": [{
2431
- "hue-rotate": [z, O, N]
2431
+ "hue-rotate": [z, N, O]
2432
2432
  }],
2433
2433
  /**
2434
2434
  * Invert
2435
2435
  * @see https://tailwindcss.com/docs/invert
2436
2436
  */
2437
2437
  invert: [{
2438
- invert: ["", z, O, N]
2438
+ invert: ["", z, N, O]
2439
2439
  }],
2440
2440
  /**
2441
2441
  * Saturate
2442
2442
  * @see https://tailwindcss.com/docs/saturate
2443
2443
  */
2444
2444
  saturate: [{
2445
- saturate: [z, O, N]
2445
+ saturate: [z, N, O]
2446
2446
  }],
2447
2447
  /**
2448
2448
  * Sepia
2449
2449
  * @see https://tailwindcss.com/docs/sepia
2450
2450
  */
2451
2451
  sepia: [{
2452
- sepia: ["", z, O, N]
2452
+ sepia: ["", z, N, O]
2453
2453
  }],
2454
2454
  /**
2455
2455
  * Backdrop Filter
@@ -2460,8 +2460,8 @@ const an = (e, r) => {
2460
2460
  // Deprecated since Tailwind CSS v3.0.0
2461
2461
  "",
2462
2462
  "none",
2463
- O,
2464
- N
2463
+ N,
2464
+ O
2465
2465
  ]
2466
2466
  }],
2467
2467
  /**
@@ -2469,63 +2469,63 @@ const an = (e, r) => {
2469
2469
  * @see https://tailwindcss.com/docs/backdrop-blur
2470
2470
  */
2471
2471
  "backdrop-blur": [{
2472
- "backdrop-blur": Ne()
2472
+ "backdrop-blur": Oe()
2473
2473
  }],
2474
2474
  /**
2475
2475
  * Backdrop Brightness
2476
2476
  * @see https://tailwindcss.com/docs/backdrop-brightness
2477
2477
  */
2478
2478
  "backdrop-brightness": [{
2479
- "backdrop-brightness": [z, O, N]
2479
+ "backdrop-brightness": [z, N, O]
2480
2480
  }],
2481
2481
  /**
2482
2482
  * Backdrop Contrast
2483
2483
  * @see https://tailwindcss.com/docs/backdrop-contrast
2484
2484
  */
2485
2485
  "backdrop-contrast": [{
2486
- "backdrop-contrast": [z, O, N]
2486
+ "backdrop-contrast": [z, N, O]
2487
2487
  }],
2488
2488
  /**
2489
2489
  * Backdrop Grayscale
2490
2490
  * @see https://tailwindcss.com/docs/backdrop-grayscale
2491
2491
  */
2492
2492
  "backdrop-grayscale": [{
2493
- "backdrop-grayscale": ["", z, O, N]
2493
+ "backdrop-grayscale": ["", z, N, O]
2494
2494
  }],
2495
2495
  /**
2496
2496
  * Backdrop Hue Rotate
2497
2497
  * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2498
2498
  */
2499
2499
  "backdrop-hue-rotate": [{
2500
- "backdrop-hue-rotate": [z, O, N]
2500
+ "backdrop-hue-rotate": [z, N, O]
2501
2501
  }],
2502
2502
  /**
2503
2503
  * Backdrop Invert
2504
2504
  * @see https://tailwindcss.com/docs/backdrop-invert
2505
2505
  */
2506
2506
  "backdrop-invert": [{
2507
- "backdrop-invert": ["", z, O, N]
2507
+ "backdrop-invert": ["", z, N, O]
2508
2508
  }],
2509
2509
  /**
2510
2510
  * Backdrop Opacity
2511
2511
  * @see https://tailwindcss.com/docs/backdrop-opacity
2512
2512
  */
2513
2513
  "backdrop-opacity": [{
2514
- "backdrop-opacity": [z, O, N]
2514
+ "backdrop-opacity": [z, N, O]
2515
2515
  }],
2516
2516
  /**
2517
2517
  * Backdrop Saturate
2518
2518
  * @see https://tailwindcss.com/docs/backdrop-saturate
2519
2519
  */
2520
2520
  "backdrop-saturate": [{
2521
- "backdrop-saturate": [z, O, N]
2521
+ "backdrop-saturate": [z, N, O]
2522
2522
  }],
2523
2523
  /**
2524
2524
  * Backdrop Sepia
2525
2525
  * @see https://tailwindcss.com/docs/backdrop-sepia
2526
2526
  */
2527
2527
  "backdrop-sepia": [{
2528
- "backdrop-sepia": ["", z, O, N]
2528
+ "backdrop-sepia": ["", z, N, O]
2529
2529
  }],
2530
2530
  // --------------
2531
2531
  // --- Tables ---
@@ -2580,7 +2580,7 @@ const an = (e, r) => {
2580
2580
  * @see https://tailwindcss.com/docs/transition-property
2581
2581
  */
2582
2582
  transition: [{
2583
- transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", O, N]
2583
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", N, O]
2584
2584
  }],
2585
2585
  /**
2586
2586
  * Transition Behavior
@@ -2594,28 +2594,28 @@ const an = (e, r) => {
2594
2594
  * @see https://tailwindcss.com/docs/transition-duration
2595
2595
  */
2596
2596
  duration: [{
2597
- duration: [z, "initial", O, N]
2597
+ duration: [z, "initial", N, O]
2598
2598
  }],
2599
2599
  /**
2600
2600
  * Transition Timing Function
2601
2601
  * @see https://tailwindcss.com/docs/transition-timing-function
2602
2602
  */
2603
2603
  ease: [{
2604
- ease: ["linear", "initial", q, O, N]
2604
+ ease: ["linear", "initial", q, N, O]
2605
2605
  }],
2606
2606
  /**
2607
2607
  * Transition Delay
2608
2608
  * @see https://tailwindcss.com/docs/transition-delay
2609
2609
  */
2610
2610
  delay: [{
2611
- delay: [z, O, N]
2611
+ delay: [z, N, O]
2612
2612
  }],
2613
2613
  /**
2614
2614
  * Animation
2615
2615
  * @see https://tailwindcss.com/docs/animation
2616
2616
  */
2617
2617
  animate: [{
2618
- animate: ["none", I, O, N]
2618
+ animate: ["none", $, N, O]
2619
2619
  }],
2620
2620
  // ------------------
2621
2621
  // --- Transforms ---
@@ -2632,7 +2632,7 @@ const an = (e, r) => {
2632
2632
  * @see https://tailwindcss.com/docs/perspective
2633
2633
  */
2634
2634
  perspective: [{
2635
- perspective: [b, O, N]
2635
+ perspective: [b, N, O]
2636
2636
  }],
2637
2637
  /**
2638
2638
  * Perspective Origin
@@ -2728,7 +2728,7 @@ const an = (e, r) => {
2728
2728
  * @see https://tailwindcss.com/docs/transform
2729
2729
  */
2730
2730
  transform: [{
2731
- transform: [O, N, "", "none", "gpu", "cpu"]
2731
+ transform: [N, O, "", "none", "gpu", "cpu"]
2732
2732
  }],
2733
2733
  /**
2734
2734
  * Transform Origin
@@ -2749,28 +2749,28 @@ const an = (e, r) => {
2749
2749
  * @see https://tailwindcss.com/docs/translate
2750
2750
  */
2751
2751
  translate: [{
2752
- translate: Oe()
2752
+ translate: Ne()
2753
2753
  }],
2754
2754
  /**
2755
2755
  * Translate X
2756
2756
  * @see https://tailwindcss.com/docs/translate
2757
2757
  */
2758
2758
  "translate-x": [{
2759
- "translate-x": Oe()
2759
+ "translate-x": Ne()
2760
2760
  }],
2761
2761
  /**
2762
2762
  * Translate Y
2763
2763
  * @see https://tailwindcss.com/docs/translate
2764
2764
  */
2765
2765
  "translate-y": [{
2766
- "translate-y": Oe()
2766
+ "translate-y": Ne()
2767
2767
  }],
2768
2768
  /**
2769
2769
  * Translate Z
2770
2770
  * @see https://tailwindcss.com/docs/translate
2771
2771
  */
2772
2772
  "translate-z": [{
2773
- "translate-z": Oe()
2773
+ "translate-z": Ne()
2774
2774
  }],
2775
2775
  /**
2776
2776
  * Translate None
@@ -2813,7 +2813,7 @@ const an = (e, r) => {
2813
2813
  * @see https://tailwindcss.com/docs/cursor
2814
2814
  */
2815
2815
  cursor: [{
2816
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", O, N]
2816
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", N, O]
2817
2817
  }],
2818
2818
  /**
2819
2819
  * Field Sizing
@@ -3035,7 +3035,7 @@ const an = (e, r) => {
3035
3035
  * @see https://tailwindcss.com/docs/will-change
3036
3036
  */
3037
3037
  "will-change": [{
3038
- "will-change": ["auto", "scroll", "contents", "transform", O, N]
3038
+ "will-change": ["auto", "scroll", "contents", "transform", N, O]
3039
3039
  }],
3040
3040
  // -----------
3041
3041
  // --- SVG ---
@@ -3052,7 +3052,7 @@ const an = (e, r) => {
3052
3052
  * @see https://tailwindcss.com/docs/stroke-width
3053
3053
  */
3054
3054
  "stroke-w": [{
3055
- stroke: [z, lr, Ye, xr]
3055
+ stroke: [z, lr, He, xr]
3056
3056
  }],
3057
3057
  /**
3058
3058
  * Stroke
@@ -3127,11 +3127,11 @@ const an = (e, r) => {
3127
3127
  },
3128
3128
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3129
3129
  };
3130
- }, Gn = /* @__PURE__ */ Nn(Mn);
3131
- function qe(...e) {
3132
- return Gn(nn(e));
3130
+ }, Mn = /* @__PURE__ */ xn(Kn);
3131
+ function je(...e) {
3132
+ return Mn(tn(e));
3133
3133
  }
3134
- const Hn = () => crypto.randomUUID(), yt = (e) => e === "And" || e === "Or" || e === "Not", bt = (e, r) => {
3134
+ const Gn = () => crypto.randomUUID(), yt = (e) => e === "And" || e === "Or" || e === "Not", bt = (e, r) => {
3135
3135
  const t = [];
3136
3136
  if (e.operator || t.push("Operator is required"), e.operator && yt(e.operator))
3137
3137
  !e.children || !Array.isArray(e.children) ? t.push("Logical operators require a children array") : e.children.length === 0 ? t.push("Logical operators require at least one child condition") : e.operator === "Not" && e.children.length > 1 && t.push("Not operator can only have one child condition"), e.children && Array.isArray(e.children) && e.children.forEach((n, a) => {
@@ -3177,7 +3177,7 @@ const Hn = () => crypto.randomUUID(), yt = (e) => e === "And" || e === "Or" || e
3177
3177
  LHSField: e.lhsField,
3178
3178
  RHSValue: e.rhsValue,
3179
3179
  RHSType: e.rhsType || "Constant"
3180
- }, Yn = (e, r) => {
3180
+ }, Hn = (e, r) => {
3181
3181
  if (e.length === 0)
3182
3182
  return;
3183
3183
  const t = e.filter((n) => n.isValid);
@@ -3204,32 +3204,32 @@ function vt(e = {}) {
3204
3204
  errors: p
3205
3205
  };
3206
3206
  }, [r.conditions, a]), i = E((p) => {
3207
- const l = Hn(), w = p, v = a(w), k = {
3207
+ const l = Gn(), w = p, v = a(w), k = {
3208
3208
  ...w,
3209
3209
  id: l,
3210
3210
  isValid: v.isValid,
3211
3211
  validationErrors: v.errors
3212
3212
  };
3213
- return t((j) => ({
3214
- ...j,
3215
- conditions: [...j.conditions, k]
3213
+ return t((L) => ({
3214
+ ...L,
3215
+ conditions: [...L.conditions, k]
3216
3216
  })), e.onConditionAdd && e.onConditionAdd(k), l;
3217
3217
  }, [a, e]), f = E((p, l) => {
3218
3218
  let w = !1;
3219
3219
  const v = l;
3220
3220
  return t((k) => ({
3221
3221
  ...k,
3222
- conditions: k.conditions.map((j) => {
3223
- if (j.id === p) {
3222
+ conditions: k.conditions.map((L) => {
3223
+ if (L.id === p) {
3224
3224
  w = !0;
3225
- const K = { ...j, ...v }, Q = a(K), ee = {
3225
+ const K = { ...L, ...v }, Q = a(K), ee = {
3226
3226
  ...K,
3227
3227
  isValid: Q.isValid,
3228
3228
  validationErrors: Q.errors
3229
3229
  };
3230
3230
  return e.onConditionUpdate && e.onConditionUpdate(ee), ee;
3231
3231
  }
3232
- return j;
3232
+ return L;
3233
3233
  })
3234
3234
  })), w;
3235
3235
  }, [a, e]), c = E((p) => {
@@ -3248,7 +3248,7 @@ function vt(e = {}) {
3248
3248
  ...l,
3249
3249
  logicalOperator: p
3250
3250
  }));
3251
- }, []), _ = E((p) => {
3251
+ }, []), V = E((p) => {
3252
3252
  const l = p.map((w) => {
3253
3253
  const v = a(w);
3254
3254
  return {
@@ -3266,8 +3266,8 @@ function vt(e = {}) {
3266
3266
  const v = l;
3267
3267
  return t((k) => ({
3268
3268
  ...k,
3269
- conditions: k.conditions.map((j) => {
3270
- if (j.id === p) {
3269
+ conditions: k.conditions.map((L) => {
3270
+ if (L.id === p) {
3271
3271
  w = !0;
3272
3272
  const K = a(v);
3273
3273
  return {
@@ -3277,10 +3277,10 @@ function vt(e = {}) {
3277
3277
  validationErrors: K.errors
3278
3278
  };
3279
3279
  }
3280
- return j;
3280
+ return L;
3281
3281
  })
3282
3282
  })), w;
3283
- }, [a]), Y = E(() => ({
3283
+ }, [a]), G = E(() => ({
3284
3284
  logicalOperator: r.logicalOperator,
3285
3285
  conditions: r.conditions.map((p) => ({ ...p }))
3286
3286
  // Deep copy
@@ -3297,12 +3297,12 @@ function vt(e = {}) {
3297
3297
  logicalOperator: p.logicalOperator,
3298
3298
  conditions: l
3299
3299
  });
3300
- }, [a]), G = E(() => {
3300
+ }, [a]), H = E(() => {
3301
3301
  t({ ...n });
3302
- }, [n]), q = fe(
3303
- () => Yn(r.conditions, r.logicalOperator),
3302
+ }, [n]), q = ce(
3303
+ () => Hn(r.conditions, r.logicalOperator),
3304
3304
  [r.conditions, r.logicalOperator]
3305
- ), I = fe(() => {
3305
+ ), $ = ce(() => {
3306
3306
  const p = [];
3307
3307
  return r.conditions.forEach((l) => {
3308
3308
  !l.isValid && l.validationErrors && l.validationErrors.forEach((w) => {
@@ -3314,19 +3314,19 @@ function vt(e = {}) {
3314
3314
  });
3315
3315
  });
3316
3316
  }), p;
3317
- }, [r.conditions]), L = fe(
3317
+ }, [r.conditions]), j = ce(
3318
3318
  () => r.conditions.every((p) => p.isValid),
3319
3319
  [r.conditions]
3320
- ), te = E(() => r.conditions.length, [r.conditions]), ne = fe(() => r.conditions.length > 0, [r.conditions]), R = fe(() => !0, []);
3321
- return Te(() => {
3322
- e.onValidationError && I.length > 0 && e.onValidationError(I);
3323
- }, [I, e]), {
3320
+ ), te = E(() => r.conditions.length, [r.conditions]), ne = ce(() => r.conditions.length > 0, [r.conditions]), T = ce(() => !0, []);
3321
+ return Re(() => {
3322
+ e.onValidationError && $.length > 0 && e.onValidationError($);
3323
+ }, [$, e]), {
3324
3324
  // Current state
3325
3325
  conditions: r.conditions,
3326
3326
  logicalOperator: r.logicalOperator,
3327
3327
  filterPayload: q,
3328
- isValid: L,
3329
- validationErrors: I,
3328
+ isValid: j,
3329
+ validationErrors: $,
3330
3330
  // Condition management
3331
3331
  addCondition: i,
3332
3332
  updateCondition: f,
@@ -3336,22 +3336,22 @@ function vt(e = {}) {
3336
3336
  // Logical operator management
3337
3337
  setLogicalOperator: D,
3338
3338
  // Bulk operations
3339
- setConditions: _,
3339
+ setConditions: V,
3340
3340
  replaceCondition: F,
3341
3341
  // Validation
3342
3342
  validateCondition: a,
3343
3343
  validateAllConditions: s,
3344
3344
  // State management
3345
- exportState: Y,
3345
+ exportState: G,
3346
3346
  importState: b,
3347
- resetToInitial: G,
3347
+ resetToInitial: H,
3348
3348
  // Utilities
3349
3349
  getConditionCount: te,
3350
3350
  hasConditions: ne,
3351
- canAddCondition: R
3351
+ canAddCondition: T
3352
3352
  };
3353
3353
  }
3354
- const Qn = (e, r) => {
3354
+ const Yn = (e, r) => {
3355
3355
  const t = [];
3356
3356
  switch (r) {
3357
3357
  case "Between":
@@ -3378,7 +3378,7 @@ const Qn = (e, r) => {
3378
3378
  isValid: t.length === 0,
3379
3379
  errors: t
3380
3380
  };
3381
- }, Wn = (e, r) => {
3381
+ }, Qn = (e, r) => {
3382
3382
  const t = [], n = (s) => s instanceof Date && !isNaN(s.getTime()), a = (s) => {
3383
3383
  if (s instanceof Date) return s;
3384
3384
  if (typeof s == "string" || typeof s == "number") {
@@ -3412,7 +3412,7 @@ const Qn = (e, r) => {
3412
3412
  isValid: t.length === 0,
3413
3413
  errors: t
3414
3414
  };
3415
- }, Jn = (e, r) => {
3415
+ }, Wn = (e, r) => {
3416
3416
  const t = [], n = (i) => i && typeof i == "object" && typeof i.value == "number" && typeof i.currency == "string" && i.currency.length === 3, a = (i) => typeof i == "string" && /^\d+(\.\d{2})?\s[A-Z]{3}$/.test(i), s = (i) => n(i) || a(i) || typeof i == "number";
3417
3417
  switch (r) {
3418
3418
  case "Between":
@@ -3434,7 +3434,7 @@ const Qn = (e, r) => {
3434
3434
  isValid: t.length === 0,
3435
3435
  errors: t
3436
3436
  };
3437
- }, Xn = (e, r) => {
3437
+ }, Jn = (e, r) => {
3438
3438
  const t = [];
3439
3439
  switch (r) {
3440
3440
  case "Between":
@@ -3468,7 +3468,7 @@ const Qn = (e, r) => {
3468
3468
  isValid: t.length === 0,
3469
3469
  errors: t
3470
3470
  };
3471
- }, Zn = (e, r) => {
3471
+ }, Xn = (e, r) => {
3472
3472
  const t = [];
3473
3473
  if (!["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"].includes(r))
3474
3474
  return t.push(`Operator ${r} is not supported for boolean fields`), { isValid: !1, errors: t };
@@ -3488,7 +3488,7 @@ const Qn = (e, r) => {
3488
3488
  isValid: t.length === 0,
3489
3489
  errors: t
3490
3490
  };
3491
- }, ea = (e, r, t) => {
3491
+ }, Zn = (e, r, t) => {
3492
3492
  const n = [];
3493
3493
  if (!t || t.length === 0)
3494
3494
  return n.push("No select options defined for this field"), { isValid: !1, errors: n };
@@ -3517,37 +3517,37 @@ const Qn = (e, r) => {
3517
3517
  isValid: n.length === 0,
3518
3518
  errors: n
3519
3519
  };
3520
- }, Qe = (e) => {
3520
+ }, Ye = (e) => {
3521
3521
  switch (e) {
3522
3522
  case "string":
3523
3523
  return {
3524
3524
  type: "string",
3525
3525
  allowedOperators: ["EQ", "NE", "Contains", "NotContains", "IN", "NIN", "Empty", "NotEmpty", "MinLength", "MaxLength"],
3526
- validateValue: Xn
3526
+ validateValue: Jn
3527
3527
  };
3528
3528
  case "number":
3529
3529
  return {
3530
3530
  type: "number",
3531
3531
  allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
3532
- validateValue: Qn
3532
+ validateValue: Yn
3533
3533
  };
3534
3534
  case "date":
3535
3535
  return {
3536
3536
  type: "date",
3537
3537
  allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
3538
- validateValue: Wn
3538
+ validateValue: Qn
3539
3539
  };
3540
3540
  case "boolean":
3541
3541
  return {
3542
3542
  type: "boolean",
3543
3543
  allowedOperators: ["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"],
3544
- validateValue: Zn
3544
+ validateValue: Xn
3545
3545
  };
3546
3546
  case "currency":
3547
3547
  return {
3548
3548
  type: "currency",
3549
3549
  allowedOperators: ["EQ", "NE", "GT", "GTE", "LT", "LTE", "Between", "NotBetween", "IN", "NIN", "Empty", "NotEmpty"],
3550
- validateValue: Jn
3550
+ validateValue: Wn
3551
3551
  };
3552
3552
  case "select":
3553
3553
  const r = {
@@ -3555,15 +3555,15 @@ const Qn = (e, r) => {
3555
3555
  allowedOperators: ["EQ", "NE", "IN", "NIN", "Empty", "NotEmpty"],
3556
3556
  selectOptions: []
3557
3557
  };
3558
- return r.validateValue = (t, n) => ea(t, n, r.selectOptions), r;
3558
+ return r.validateValue = (t, n) => Zn(t, n, r.selectOptions), r;
3559
3559
  default:
3560
- return Qe("string");
3560
+ return Ye("string");
3561
3561
  }
3562
3562
  }, mo = (e) => {
3563
3563
  const r = {};
3564
3564
  return !e || typeof e != "object" || Object.keys(e).forEach((t) => {
3565
3565
  const n = e[t], a = t;
3566
- typeof n == "string" ? r[a] = Qe("string") : typeof n == "number" ? r[a] = Qe("number") : typeof n == "boolean" ? r[a] = Qe("boolean") : n instanceof Date ? r[a] = Qe("date") : n && typeof n == "object" && "value" in n && "currency" in n ? r[a] = Qe("currency") : r[a] = Qe("string");
3566
+ typeof n == "string" ? r[a] = Ye("string") : typeof n == "number" ? r[a] = Ye("number") : typeof n == "boolean" ? r[a] = Ye("boolean") : n instanceof Date ? r[a] = Ye("date") : n && typeof n == "object" && "value" in n && "currency" in n ? r[a] = Ye("currency") : r[a] = Ye("string");
3567
3567
  }), r;
3568
3568
  }, dr = (e) => e === "And" || e === "Or" || e === "Not", Ct = (e) => dr(e.operator) ? {
3569
3569
  Operator: e.operator,
@@ -3573,7 +3573,7 @@ const Qn = (e, r) => {
3573
3573
  LHSField: e.lhsField,
3574
3574
  RHSValue: e.rhsValue,
3575
3575
  RHSType: e.rhsType || "Constant"
3576
- }, ra = (e, r) => {
3576
+ }, ea = (e, r) => {
3577
3577
  if (e.length === 0)
3578
3578
  return;
3579
3579
  const t = e.filter((n) => n.isValid);
@@ -3582,7 +3582,7 @@ const Qn = (e, r) => {
3582
3582
  Operator: r,
3583
3583
  Condition: t.map(Ct)
3584
3584
  };
3585
- }, po = (e) => ra(e.conditions, e.logicalOperator), Et = (e) => e ? !e.Operator || !["And", "Or", "Not"].includes(e.Operator) || !Array.isArray(e.Condition) || e.Condition.length === 0 || e.Operator === "Not" && e.Condition.length !== 1 ? !1 : e.Condition.every((r) => {
3585
+ }, po = (e) => ea(e.conditions, e.logicalOperator), Et = (e) => e ? !e.Operator || !["And", "Or", "Not"].includes(e.Operator) || !Array.isArray(e.Condition) || e.Condition.length === 0 || e.Operator === "Not" && e.Condition.length !== 1 ? !1 : e.Condition.every((r) => {
3586
3586
  if (!r.Operator)
3587
3587
  return !1;
3588
3588
  if (dr(r.Operator))
@@ -3606,7 +3606,7 @@ const Qn = (e, r) => {
3606
3606
  RHSType: r.RHSType
3607
3607
  };
3608
3608
  }
3609
- }, ta = (e) => {
3609
+ }, ra = (e) => {
3610
3610
  if (e)
3611
3611
  return {
3612
3612
  Operator: e.Operator,
@@ -3619,7 +3619,7 @@ const Qn = (e, r) => {
3619
3619
  if (t.length === 0)
3620
3620
  return;
3621
3621
  if (t.length === 1)
3622
- return ta(t[0]);
3622
+ return ra(t[0]);
3623
3623
  const n = t.flatMap((a) => a.Condition);
3624
3624
  return {
3625
3625
  Operator: r,
@@ -3638,153 +3638,153 @@ const Qn = (e, r) => {
3638
3638
  return "No filters";
3639
3639
  const r = e.Condition.map(xt);
3640
3640
  return r.length === 1 ? r[0] : `(${r.join(` ${e.Operator} `)})`;
3641
- }, Nt = (e, r) => {
3641
+ }, Ot = (e, r) => {
3642
3642
  if (e.Operator !== r.Operator)
3643
3643
  return !1;
3644
3644
  if (dr(e.Operator)) {
3645
3645
  const t = e, n = r;
3646
3646
  return t.Condition.length !== n.Condition.length ? !1 : t.Condition.every(
3647
- (a, s) => Nt(a, n.Condition[s])
3647
+ (a, s) => Ot(a, n.Condition[s])
3648
3648
  );
3649
3649
  } else {
3650
3650
  const t = e, n = r;
3651
3651
  return t.LHSField === n.LHSField && JSON.stringify(t.RHSValue) === JSON.stringify(n.RHSValue) && t.RHSType === n.RHSType;
3652
3652
  }
3653
3653
  }, yo = (e, r) => !e && !r ? !0 : !e || !r || e.Operator !== r.Operator || e.Condition.length !== r.Condition.length ? !1 : e.Condition.every(
3654
- (t, n) => Nt(t, r.Condition[n])
3654
+ (t, n) => Ot(t, r.Condition[n])
3655
3655
  );
3656
3656
  function bo(e) {
3657
- var T, ae, xe, pe, P, Ne, ve, ye, De, Oe, Ue;
3657
+ var R, ae, xe, pe, P, Oe, ve, ye, De, Ne, qe;
3658
3658
  const [r, t] = we({
3659
3659
  query: ""
3660
3660
  }), [n, a] = we({
3661
- field: ((ae = (T = e.initialState) == null ? void 0 : T.sorting) == null ? void 0 : ae.field) || null,
3661
+ field: ((ae = (R = e.initialState) == null ? void 0 : R.sorting) == null ? void 0 : ae.field) || null,
3662
3662
  direction: ((pe = (xe = e.initialState) == null ? void 0 : xe.sorting) == null ? void 0 : pe.direction) || null
3663
3663
  }), [s, i] = we({
3664
3664
  global: ((P = e.initialState) == null ? void 0 : P.globalFilter) || ""
3665
3665
  }), [f, c] = we({
3666
- pageNo: ((ve = (Ne = e.initialState) == null ? void 0 : Ne.pagination) == null ? void 0 : ve.pageNo) || 1,
3666
+ pageNo: ((ve = (Oe = e.initialState) == null ? void 0 : Oe.pagination) == null ? void 0 : ve.pageNo) || 1,
3667
3667
  // Start at page 1
3668
3668
  pageSize: ((De = (ye = e.initialState) == null ? void 0 : ye.pagination) == null ? void 0 : De.pageSize) || 10
3669
3669
  }), u = vt({
3670
- initialConditions: (Oe = e.initialState) == null ? void 0 : Oe.filters,
3671
- initialLogicalOperator: ((Ue = e.initialState) == null ? void 0 : Ue.filterOperator) || "And",
3670
+ initialConditions: (Ne = e.initialState) == null ? void 0 : Ne.filters,
3671
+ initialLogicalOperator: ((qe = e.initialState) == null ? void 0 : qe.filterOperator) || "And",
3672
3672
  fieldDefinitions: e.fieldDefinitions,
3673
3673
  validateOnChange: !0,
3674
3674
  onValidationError: e.onFilterError,
3675
3675
  onConditionAdd: () => {
3676
- c((V) => ({ ...V, pageNo: 1 }));
3676
+ c((_) => ({ ..._, pageNo: 1 }));
3677
3677
  },
3678
3678
  onConditionUpdate: () => {
3679
- c((V) => ({ ...V, pageNo: 1 }));
3679
+ c((_) => ({ ..._, pageNo: 1 }));
3680
3680
  },
3681
3681
  onConditionRemove: () => {
3682
- c((V) => ({ ...V, pageNo: 1 }));
3682
+ c((_) => ({ ..._, pageNo: 1 }));
3683
3683
  }
3684
- }), y = fe(() => {
3685
- const V = {};
3686
- return r.query && (V.Search = r.query), u.filterPayload && (V.Filter = u.filterPayload), V;
3687
- }, [r.query, u.filterPayload]), D = fe(() => {
3688
- const V = { ...y };
3689
- return n.field && n.direction && (V.Sort = [
3684
+ }), y = ce(() => {
3685
+ const _ = {};
3686
+ return r.query && (_.Search = r.query), u.filterPayload && (_.Filter = u.filterPayload), _;
3687
+ }, [r.query, u.filterPayload]), D = ce(() => {
3688
+ const _ = { ...y };
3689
+ return n.field && n.direction && (_.Sort = [
3690
3690
  {
3691
3691
  [String(n.field)]: n.direction === "asc" ? "ASC" : "DESC"
3692
3692
  }
3693
- ]), e.enablePagination && (V.Page = f.pageNo, V.PageSize = f.pageSize), V;
3693
+ ]), e.enablePagination && (_.Page = f.pageNo, _.PageSize = f.pageSize), _;
3694
3694
  }, [y, n, f, e.enablePagination]), {
3695
- data: _,
3695
+ data: V,
3696
3696
  isLoading: F,
3697
- isFetching: Y,
3697
+ isFetching: G,
3698
3698
  error: b,
3699
- refetch: G
3699
+ refetch: H
3700
3700
  } = ar({
3701
3701
  queryKey: ["table", e.source, D],
3702
3702
  queryFn: async () => {
3703
3703
  try {
3704
- const V = await Re(e.source).list(D);
3705
- return e.onSuccess && e.onSuccess(V.Data), V;
3706
- } catch (V) {
3707
- throw e.onError && e.onError(V), V;
3704
+ const _ = await Te(e.source).list(D);
3705
+ return e.onSuccess && e.onSuccess(_.Data), _;
3706
+ } catch (_) {
3707
+ throw e.onError && e.onError(_), _;
3708
3708
  }
3709
3709
  },
3710
3710
  staleTime: 0,
3711
3711
  gcTime: 0
3712
3712
  }), {
3713
3713
  data: q,
3714
- isLoading: I,
3715
- isFetching: L,
3714
+ isLoading: $,
3715
+ isFetching: j,
3716
3716
  error: te,
3717
3717
  refetch: ne
3718
3718
  } = ar({
3719
3719
  queryKey: ["table-count", e.source, y],
3720
3720
  queryFn: async () => {
3721
3721
  try {
3722
- return await Re(e.source).count(y);
3723
- } catch (V) {
3724
- throw e.onError && e.onError(V), V;
3722
+ return await Te(e.source).count(y);
3723
+ } catch (_) {
3724
+ throw e.onError && e.onError(_), _;
3725
3725
  }
3726
3726
  },
3727
3727
  staleTime: 0,
3728
3728
  gcTime: 0
3729
- }), R = fe(() => (_ == null ? void 0 : _.Data) || [], [_]), p = fe(() => (q == null ? void 0 : q.Count) || 0, [q]), l = fe(() => Math.ceil(p / f.pageSize), [p, f.pageSize]), w = E((V) => {
3729
+ }), T = ce(() => (V == null ? void 0 : V.Data) || [], [V]), p = ce(() => (q == null ? void 0 : q.Count) || 0, [q]), l = ce(() => Math.ceil(p / f.pageSize), [p, f.pageSize]), w = E((_) => {
3730
3730
  a((oe) => {
3731
- if (oe.field === V) {
3731
+ if (oe.field === _) {
3732
3732
  if (oe.direction === "asc")
3733
- return { field: V, direction: "desc" };
3733
+ return { field: _, direction: "desc" };
3734
3734
  if (oe.direction === "desc")
3735
3735
  return { field: null, direction: null };
3736
3736
  }
3737
- return { field: V, direction: "asc" };
3737
+ return { field: _, direction: "asc" };
3738
3738
  });
3739
3739
  }, []), v = E(() => {
3740
3740
  a({ field: null, direction: null });
3741
3741
  }, []), k = E(
3742
- (V, oe) => {
3743
- a({ field: V, direction: oe });
3742
+ (_, oe) => {
3743
+ a({ field: _, direction: oe });
3744
3744
  },
3745
3745
  []
3746
- ), j = E((V) => {
3747
- t({ query: V }), c((oe) => ({ ...oe, pageNo: 1 }));
3746
+ ), L = E((_) => {
3747
+ t({ query: _ }), c((oe) => ({ ...oe, pageNo: 1 }));
3748
3748
  }, []), K = E(() => {
3749
3749
  t({ query: "" });
3750
- }, []), Q = E((V) => {
3751
- i((oe) => ({ ...oe, global: V })), c((oe) => ({ ...oe, pageNo: 1 }));
3750
+ }, []), Q = E((_) => {
3751
+ i((oe) => ({ ...oe, global: _ })), c((oe) => ({ ...oe, pageNo: 1 }));
3752
3752
  }, []), ee = E(() => {
3753
3753
  i({ global: "" });
3754
3754
  }, []), U = f.pageNo < l, Z = f.pageNo > 1, A = E(() => {
3755
- U && c((V) => ({ ...V, pageNo: V.pageNo + 1 }));
3755
+ U && c((_) => ({ ..._, pageNo: _.pageNo + 1 }));
3756
3756
  }, [U]), me = E(() => {
3757
- Z && c((V) => ({ ...V, pageNo: V.pageNo - 1 }));
3757
+ Z && c((_) => ({ ..._, pageNo: _.pageNo - 1 }));
3758
3758
  }, [Z]), Fe = E(
3759
- (V) => {
3760
- const oe = Math.max(1, Math.min(V, l));
3759
+ (_) => {
3760
+ const oe = Math.max(1, Math.min(_, l));
3761
3761
  c((Ce) => ({ ...Ce, pageNo: oe }));
3762
3762
  },
3763
3763
  [l]
3764
- ), he = E((V) => {
3764
+ ), he = E((_) => {
3765
3765
  c((oe) => ({
3766
3766
  ...oe,
3767
- pageSize: V,
3767
+ pageSize: _,
3768
3768
  pageNo: 1
3769
3769
  // Reset to first page
3770
3770
  }));
3771
3771
  }, []), Se = E(async () => {
3772
- const [V] = await Promise.all([G(), ne()]);
3773
- return V.data || { Data: [] };
3774
- }, [G, ne]);
3772
+ const [_] = await Promise.all([H(), ne()]);
3773
+ return _.data || { Data: [] };
3774
+ }, [H, ne]);
3775
3775
  return {
3776
3776
  // Data
3777
- rows: R,
3777
+ rows: T,
3778
3778
  totalItems: p,
3779
3779
  // Loading States
3780
- isLoading: F || I,
3781
- isFetching: Y || L,
3780
+ isLoading: F || $,
3781
+ isFetching: G || j,
3782
3782
  // Error Handling
3783
3783
  error: b || te,
3784
3784
  // Search (Flat Access)
3785
3785
  search: {
3786
3786
  query: r.query,
3787
- setQuery: j,
3787
+ setQuery: L,
3788
3788
  clear: K
3789
3789
  },
3790
3790
  // Sorting (Flat Access)
@@ -3848,7 +3848,7 @@ function bo(e) {
3848
3848
  refetch: Se
3849
3849
  };
3850
3850
  }
3851
- function na() {
3851
+ function ta() {
3852
3852
  const e = /* @__PURE__ */ new Date();
3853
3853
  return {
3854
3854
  NOW: e,
@@ -3864,7 +3864,7 @@ function na() {
3864
3864
  CURRENT_USER_ID: 1
3865
3865
  };
3866
3866
  }
3867
- const aa = {
3867
+ const na = {
3868
3868
  // String functions
3869
3869
  CONCAT: (...e) => e.map((r) => String(r || "")).join(""),
3870
3870
  TRIM: (e) => String(e || "").trim(),
@@ -3927,7 +3927,7 @@ const aa = {
3927
3927
  ARRAY_CONTAINS: (e, r) => Array.isArray(e) ? e.includes(r) : !1,
3928
3928
  ARRAY_JOIN: (e, r = ",") => Array.isArray(e) ? e.join(r) : ""
3929
3929
  };
3930
- function Ke(e, r) {
3930
+ function ze(e, r) {
3931
3931
  var t;
3932
3932
  switch (e.Type) {
3933
3933
  case "Literal":
@@ -3935,43 +3935,43 @@ function Ke(e, r) {
3935
3935
  case "SystemIdentifier":
3936
3936
  if (e.Property) {
3937
3937
  const u = r.systemValues[e.Name];
3938
- return Nr(u, e.Property.Name);
3938
+ return Or(u, e.Property.Name);
3939
3939
  }
3940
3940
  return r.systemValues[e.Name];
3941
3941
  case "Identifier":
3942
3942
  if (e.Property) {
3943
3943
  const u = Kr(e, r);
3944
- return Nr(u, e.Property.Name);
3944
+ return Or(u, e.Property.Name);
3945
3945
  }
3946
3946
  return Kr(e, r);
3947
3947
  case "MemberExpression":
3948
3948
  if (!e.Arguments || e.Arguments.length === 0)
3949
3949
  throw new Error("MemberExpression requires Arguments array");
3950
- const n = Ke(e.Arguments[0], r), a = (t = e.Arguments[0].Property) == null ? void 0 : t.Name;
3951
- return a ? Nr(n, a) : n;
3950
+ const n = ze(e.Arguments[0], r), a = (t = e.Arguments[0].Property) == null ? void 0 : t.Name;
3951
+ return a ? Or(n, a) : n;
3952
3952
  case "BinaryExpression":
3953
3953
  if (!e.Arguments || e.Arguments.length !== 2)
3954
3954
  throw new Error("BinaryExpression requires exactly 2 arguments");
3955
- const s = Ke(e.Arguments[0], r), i = Ke(e.Arguments[1], r);
3956
- return oa(e.Operator, s, i);
3955
+ const s = ze(e.Arguments[0], r), i = ze(e.Arguments[1], r);
3956
+ return aa(e.Operator, s, i);
3957
3957
  case "LogicalExpression":
3958
3958
  if (!e.Arguments || e.Arguments.length < 2)
3959
3959
  throw new Error("LogicalExpression requires at least 2 arguments");
3960
- return sa(e.Operator, e.Arguments, r);
3960
+ return oa(e.Operator, e.Arguments, r);
3961
3961
  case "CallExpression":
3962
3962
  if (!e.Callee)
3963
3963
  throw new Error("CallExpression requires Callee");
3964
- const f = aa[e.Callee];
3964
+ const f = na[e.Callee];
3965
3965
  if (!f)
3966
3966
  throw new Error(`Unknown function: ${e.Callee}`);
3967
3967
  const c = (e.Arguments || []).map(
3968
- (u) => Ke(u, r)
3968
+ (u) => ze(u, r)
3969
3969
  );
3970
3970
  return f(...c);
3971
3971
  case "AssignmentExpression":
3972
3972
  if (!e.Arguments || e.Arguments.length !== 1)
3973
3973
  throw new Error("AssignmentExpression requires exactly 1 argument");
3974
- return Ke(e.Arguments[0], r);
3974
+ return ze(e.Arguments[0], r);
3975
3975
  default:
3976
3976
  throw new Error(`Unknown expression type: ${e.Type}`);
3977
3977
  }
@@ -3986,11 +3986,11 @@ function Kr(e, r) {
3986
3986
  return r.formValues[t];
3987
3987
  }
3988
3988
  }
3989
- function Nr(e, r) {
3989
+ function Or(e, r) {
3990
3990
  if (!(!e || typeof e != "object"))
3991
3991
  return e[r];
3992
3992
  }
3993
- function oa(e, r, t) {
3993
+ function aa(e, r, t) {
3994
3994
  const n = (a) => a == null ? 0 : typeof a == "number" ? a : typeof a == "object" && a !== null && "value" in a ? Number(a.value) || 0 : Number(a) || 0;
3995
3995
  switch (e) {
3996
3996
  case "==":
@@ -4018,33 +4018,33 @@ function oa(e, r, t) {
4018
4018
  throw new Error(`Unknown binary operator: ${e}`);
4019
4019
  }
4020
4020
  }
4021
- function sa(e, r, t) {
4021
+ function oa(e, r, t) {
4022
4022
  switch (e) {
4023
4023
  case "AND":
4024
- return r.every((n) => !!Ke(n, t));
4024
+ return r.every((n) => !!ze(n, t));
4025
4025
  case "OR":
4026
- return r.some((n) => !!Ke(n, t));
4026
+ return r.some((n) => !!ze(n, t));
4027
4027
  default:
4028
4028
  throw new Error(`Unknown logical operator: ${e}`);
4029
4029
  }
4030
4030
  }
4031
- function Ot(e, r, t = {}) {
4031
+ function Nt(e, r, t = {}) {
4032
4032
  const n = {
4033
4033
  formValues: r,
4034
- systemValues: na(),
4034
+ systemValues: ta(),
4035
4035
  referenceData: t
4036
4036
  };
4037
4037
  try {
4038
- return Ke(e, n);
4038
+ return ze(e, n);
4039
4039
  } catch (a) {
4040
4040
  return console.warn("Expression evaluation failed:", a), !1;
4041
4041
  }
4042
4042
  }
4043
- function ia(e, r, t = {}) {
4043
+ function sa(e, r, t = {}) {
4044
4044
  const n = [];
4045
4045
  for (const a of e)
4046
4046
  try {
4047
- Ot(
4047
+ Nt(
4048
4048
  a.Condition.ExpressionTree,
4049
4049
  r,
4050
4050
  t
@@ -4058,9 +4058,9 @@ function ia(e, r, t = {}) {
4058
4058
  }
4059
4059
  return n;
4060
4060
  }
4061
- function la(e, r = {}, t = {}) {
4061
+ function ia(e, r = {}, t = {}) {
4062
4062
  try {
4063
- return Ot(e, r, t);
4063
+ return Nt(e, r, t);
4064
4064
  } catch (n) {
4065
4065
  return console.warn("Default value calculation failed:", n), null;
4066
4066
  }
@@ -4076,7 +4076,7 @@ function Mr(e, r) {
4076
4076
  `${s}!=''`
4077
4077
  ].some((y) => t.includes(y));
4078
4078
  }
4079
- function ca(e) {
4079
+ function la(e) {
4080
4080
  const r = { ...e };
4081
4081
  r.Rules || (r.Rules = {
4082
4082
  Validation: {},
@@ -4118,7 +4118,7 @@ function ca(e) {
4118
4118
  }
4119
4119
  }), r.Fields = t, r;
4120
4120
  }
4121
- function ua(e) {
4121
+ function ca(e) {
4122
4122
  var t, n, a;
4123
4123
  const r = {
4124
4124
  validation: {},
@@ -4127,7 +4127,7 @@ function ua(e) {
4127
4127
  };
4128
4128
  return (t = e.Rules) != null && t.Validation && (r.validation = { ...e.Rules.Validation }), (n = e.Rules) != null && n.Computation && (r.computation = { ...e.Rules.Computation }), (a = e.Rules) != null && a.BusinessLogic && (r.businessLogic = { ...e.Rules.BusinessLogic }), r;
4129
4129
  }
4130
- function da(e) {
4130
+ function ua(e) {
4131
4131
  var n;
4132
4132
  const r = {};
4133
4133
  if (!((n = e.Rules) != null && n.Computation)) return r;
@@ -4149,7 +4149,7 @@ function da(e) {
4149
4149
  }
4150
4150
  }), r;
4151
4151
  }
4152
- function fa(e, r) {
4152
+ function da(e, r) {
4153
4153
  const t = {};
4154
4154
  Object.keys(e.Fields).forEach((a) => {
4155
4155
  t[a] = {
@@ -4165,24 +4165,24 @@ function fa(e, r) {
4165
4165
  f.Expression === ((c = s.Formula) == null ? void 0 : c.Expression) && (t[a].computation.includes(i) || t[a].computation.push(i));
4166
4166
  });
4167
4167
  });
4168
- const n = da(e);
4168
+ const n = ua(e);
4169
4169
  return Object.entries(n).forEach(([a, s]) => {
4170
4170
  t[s] && !t[s].computation.includes(a) && t[s].computation.push(a);
4171
4171
  }), t;
4172
4172
  }
4173
- function ma(e, r) {
4173
+ function fa(e, r) {
4174
4174
  const t = {}, n = {
4175
4175
  editable: !0,
4176
4176
  readable: !0,
4177
4177
  hidden: !1
4178
4178
  };
4179
4179
  return Object.keys(e.Fields).forEach((a) => {
4180
- var c, u, y, D, _, F;
4180
+ var c, u, y, D, V, F;
4181
4181
  if (!r || !((c = e.RolePermission) != null && c[r])) {
4182
4182
  t[a] = n;
4183
4183
  return;
4184
4184
  }
4185
- const s = e.RolePermission[r], i = ((u = s.Editable) == null ? void 0 : u.includes(a)) || ((y = s.Editable) == null ? void 0 : y.includes("*")) || !1, f = ((D = s.ReadOnly) == null ? void 0 : D.includes(a)) || ((_ = s.ReadOnly) == null ? void 0 : _.includes("*")) || i;
4185
+ const s = e.RolePermission[r], i = ((u = s.Editable) == null ? void 0 : u.includes(a)) || ((y = s.Editable) == null ? void 0 : y.includes("*")) || !1, f = ((D = s.ReadOnly) == null ? void 0 : D.includes(a)) || ((V = s.ReadOnly) == null ? void 0 : V.includes("*")) || i;
4186
4186
  t[a] = {
4187
4187
  editable: i && !((F = s.ReadOnly) != null && F.includes(a)),
4188
4188
  readable: f,
@@ -4190,7 +4190,7 @@ function ma(e, r) {
4190
4190
  };
4191
4191
  }), t;
4192
4192
  }
4193
- function pa(e) {
4193
+ function ma(e) {
4194
4194
  return {
4195
4195
  Id: "legacy_schema",
4196
4196
  Name: "Legacy Schema",
@@ -4217,7 +4217,7 @@ function pa(e) {
4217
4217
  Roles: {}
4218
4218
  };
4219
4219
  }
4220
- function ga(e, r) {
4220
+ function pa(e, r) {
4221
4221
  switch (e) {
4222
4222
  case "String":
4223
4223
  return r.toLowerCase().includes("email") ? "email" : r.toLowerCase().includes("password") ? "password" : "text";
@@ -4241,7 +4241,7 @@ function ga(e, r) {
4241
4241
  function kt(e) {
4242
4242
  return e.replace(/([A-Z])/g, " $1").replace(/^./, (r) => r.toUpperCase()).replace(/_/g, " ").trim();
4243
4243
  }
4244
- function ha(e, r, t) {
4244
+ function ga(e, r, t) {
4245
4245
  const n = {};
4246
4246
  switch (r.Required && (n.required = {
4247
4247
  value: !0,
@@ -4257,13 +4257,13 @@ function ha(e, r, t) {
4257
4257
  }
4258
4258
  return r.Validation && r.Validation.length > 0 && (n.validate = () => !0), n;
4259
4259
  }
4260
- function ya(e) {
4260
+ function ha(e) {
4261
4261
  return e.Values ? e.Values.Mode === "Static" && e.Values.Items ? e.Values.Items.map((r) => ({
4262
4262
  value: r.Value,
4263
4263
  label: r.Label
4264
4264
  })) : e.Values.Mode === "Dynamic" && e.Values.Reference ? [] : [] : [];
4265
4265
  }
4266
- function ba(e, r = {}) {
4266
+ function ya(e, r = {}) {
4267
4267
  if (!e.DefaultValue)
4268
4268
  switch (e.Type) {
4269
4269
  case "Boolean":
@@ -4279,12 +4279,12 @@ function ba(e, r = {}) {
4279
4279
  default:
4280
4280
  return;
4281
4281
  }
4282
- return la(
4282
+ return ia(
4283
4283
  e.DefaultValue.ExpressionTree,
4284
4284
  r
4285
4285
  );
4286
4286
  }
4287
- function wa(e, r, t, n = {}, a, s) {
4287
+ function ba(e, r, t, n = {}, a, s) {
4288
4288
  const i = {
4289
4289
  editable: !0,
4290
4290
  readable: !0,
@@ -4293,15 +4293,15 @@ function wa(e, r, t, n = {}, a, s) {
4293
4293
  validation: [],
4294
4294
  computation: [],
4295
4295
  businessLogic: []
4296
- }, u = r.Computed || !!r.Formula || c.computation.length > 0, y = ha(e, r);
4296
+ }, u = r.Computed || !!r.Formula || c.computation.length > 0, y = ga(e, r);
4297
4297
  return u && (y.disabled = !0), {
4298
4298
  name: e,
4299
- type: ga(r.Type, e),
4299
+ type: pa(r.Type, e),
4300
4300
  label: r.Name || kt(e),
4301
4301
  required: r.Required || !1,
4302
4302
  computed: u,
4303
- defaultValue: ba(r, n),
4304
- options: ya(r),
4303
+ defaultValue: ya(r, n),
4304
+ options: ha(r),
4305
4305
  validation: y,
4306
4306
  description: r.Description,
4307
4307
  backendField: r,
@@ -4309,29 +4309,29 @@ function wa(e, r, t, n = {}, a, s) {
4309
4309
  rules: c
4310
4310
  };
4311
4311
  }
4312
- function va(e, r = {}, t) {
4313
- let n = "Kind" in e && e.Kind === "BusinessObject" ? e : pa(e);
4314
- n = ca(n);
4315
- const a = {}, s = [], i = [], f = [], c = [], u = ua(n), y = fa(n, u), D = ma(n, t);
4316
- for (const [_, F] of Object.entries(n.Fields)) {
4317
- if (_.startsWith("_") && !["_id"].includes(_))
4312
+ function wa(e, r = {}, t) {
4313
+ let n = "Kind" in e && e.Kind === "BusinessObject" ? e : ma(e);
4314
+ n = la(n);
4315
+ const a = {}, s = [], i = [], f = [], c = [], u = ca(n), y = da(n, u), D = fa(n, t);
4316
+ for (const [V, F] of Object.entries(n.Fields)) {
4317
+ if (V.startsWith("_") && !["_id"].includes(V))
4318
4318
  continue;
4319
- const Y = D[_];
4320
- if (Y.hidden)
4319
+ const G = D[V];
4320
+ if (G.hidden)
4321
4321
  continue;
4322
- const b = wa(
4323
- _,
4322
+ const b = ba(
4323
+ V,
4324
4324
  F,
4325
4325
  n.Fields,
4326
4326
  r,
4327
- Y,
4328
- y[_] || {
4327
+ G,
4328
+ y[V] || {
4329
4329
  validation: [],
4330
4330
  computation: [],
4331
4331
  businessLogic: []
4332
4332
  }
4333
4333
  );
4334
- a[_] = b, s.push(_), b.computed && i.push(_), b.required && f.push(_);
4334
+ a[V] = b, s.push(V), b.computed && i.push(V), b.required && f.push(V);
4335
4335
  }
4336
4336
  return {
4337
4337
  fields: a,
@@ -4344,7 +4344,7 @@ function va(e, r = {}, t) {
4344
4344
  rolePermissions: n.RolePermission
4345
4345
  };
4346
4346
  }
4347
- function Ca(e) {
4347
+ function va(e) {
4348
4348
  var t;
4349
4349
  if (e.type !== "reference" || !((t = e.backendField.Values) != null && t.Reference))
4350
4350
  return null;
@@ -4357,18 +4357,18 @@ function Ca(e) {
4357
4357
  sort: r.Sort
4358
4358
  };
4359
4359
  }
4360
- function Ea(e) {
4360
+ function Ca(e) {
4361
4361
  const r = {};
4362
4362
  for (const [t, n] of Object.entries(e.fields))
4363
4363
  if (n.type === "reference") {
4364
- const a = Ca(n);
4364
+ const a = va(n);
4365
4365
  a && (r[t] = a);
4366
4366
  }
4367
4367
  return r;
4368
4368
  }
4369
- async function Sa(e) {
4369
+ async function Ea(e) {
4370
4370
  try {
4371
- const t = (await Yt(e)).BOBlob;
4371
+ const t = (await Ht(e)).BOBlob;
4372
4372
  if (!t || typeof t != "object" || !t.Fields)
4373
4373
  throw new Error(`Invalid BDO schema response for ${e}`);
4374
4374
  return t;
@@ -4378,11 +4378,11 @@ async function Sa(e) {
4378
4378
  );
4379
4379
  }
4380
4380
  }
4381
- async function xa(e, r = 3) {
4381
+ async function Sa(e, r = 3) {
4382
4382
  let t;
4383
4383
  for (let n = 1; n <= r; n++)
4384
4384
  try {
4385
- return await Sa(e);
4385
+ return await Ea(e);
4386
4386
  } catch (a) {
4387
4387
  if (t = a, n < r) {
4388
4388
  const s = Math.min(1e3 * Math.pow(2, n - 1), 5e3);
@@ -4392,9 +4392,9 @@ async function xa(e, r = 3) {
4392
4392
  }
4393
4393
  throw t;
4394
4394
  }
4395
- async function Na(e, r) {
4395
+ async function xa(e, r) {
4396
4396
  try {
4397
- return await Re(e).get(r);
4397
+ return await Te(e).get(r);
4398
4398
  } catch (t) {
4399
4399
  throw console.error(`Record fetch error for ${e}/${r}:`, t), new Error(
4400
4400
  `Failed to load record: ${t instanceof Error ? t.message : "Unknown error"}`
@@ -4405,7 +4405,7 @@ async function Oa(e, r, t, n) {
4405
4405
  try {
4406
4406
  let a;
4407
4407
  if (r === "create")
4408
- return a = await Re(e).create(t), {
4408
+ return a = await Te(e).create(t), {
4409
4409
  success: !0,
4410
4410
  data: a,
4411
4411
  recordId: a._id || n
@@ -4413,7 +4413,7 @@ async function Oa(e, r, t, n) {
4413
4413
  if (r === "update") {
4414
4414
  if (!n)
4415
4415
  throw new Error("Record ID is required for update operations");
4416
- return a = await Re(e).update(n, t), {
4416
+ return a = await Te(e).update(n, t), {
4417
4417
  success: !0,
4418
4418
  data: a,
4419
4419
  recordId: a._id || n
@@ -4429,19 +4429,19 @@ async function Oa(e, r, t, n) {
4429
4429
  };
4430
4430
  }
4431
4431
  }
4432
- async function ka(e, r = ["_id"], t, n) {
4432
+ async function Na(e, r = ["_id"], t, n) {
4433
4433
  try {
4434
4434
  const a = {};
4435
- return t && (a.Filter = t), n && (a.Sort = n), r.length > 0 && (a.Field = r), (await Re(e).list(a)).Data || [];
4435
+ return t && (a.Filter = t), n && (a.Sort = n), r.length > 0 && (a.Field = r), (await Te(e).list(a)).Data || [];
4436
4436
  } catch (a) {
4437
4437
  return console.error(`Reference data fetch error for ${e}:`, a), [];
4438
4438
  }
4439
4439
  }
4440
- async function Ta(e) {
4440
+ async function ka(e) {
4441
4441
  const r = {}, t = Object.entries(e).map(
4442
4442
  async ([a, s]) => {
4443
4443
  try {
4444
- const i = await ka(
4444
+ const i = await Na(
4445
4445
  s.businessObject,
4446
4446
  s.fields,
4447
4447
  s.filters,
@@ -4481,28 +4481,28 @@ function Ra(e, r, t = "create", n) {
4481
4481
  }), a;
4482
4482
  }
4483
4483
  const kr = /* @__PURE__ */ new Map();
4484
- function Aa(e, r, t = 10) {
4484
+ function Ta(e, r, t = 10) {
4485
4485
  kr.set(e, {
4486
4486
  data: r,
4487
4487
  timestamp: Date.now(),
4488
4488
  ttl: t * 60 * 1e3
4489
4489
  });
4490
4490
  }
4491
- function Fa(e) {
4491
+ function Aa(e) {
4492
4492
  const r = kr.get(e);
4493
4493
  return r ? Date.now() - r.timestamp > r.ttl ? (kr.delete(e), null) : r.data : null;
4494
4494
  }
4495
- async function Da(e) {
4496
- const r = `schema:${e}`, t = Fa(r);
4495
+ async function Fa(e) {
4496
+ const r = `schema:${e}`, t = Aa(r);
4497
4497
  if (t)
4498
4498
  return t;
4499
- const n = await xa(e);
4500
- return Aa(r, n, 30), n;
4499
+ const n = await Sa(e);
4500
+ return Ta(r, n, 30), n;
4501
4501
  }
4502
4502
  class Gr {
4503
4503
  constructor(r = 1e3) {
4504
- He(this, "cache", /* @__PURE__ */ new Map());
4505
- He(this, "maxSize");
4504
+ Ge(this, "cache", /* @__PURE__ */ new Map());
4505
+ Ge(this, "maxSize");
4506
4506
  this.maxSize = r;
4507
4507
  }
4508
4508
  get(r) {
@@ -4522,7 +4522,7 @@ class Gr {
4522
4522
  this.cache.clear();
4523
4523
  }
4524
4524
  }
4525
- function _a(e) {
4525
+ function Da(e) {
4526
4526
  const r = /* @__PURE__ */ new Set();
4527
4527
  function t(n) {
4528
4528
  switch (n.Type) {
@@ -4541,11 +4541,11 @@ function _a(e) {
4541
4541
  }
4542
4542
  return t(e), r;
4543
4543
  }
4544
- class Va {
4544
+ class _a {
4545
4545
  constructor() {
4546
- He(this, "resultCache", new Gr(500));
4547
- He(this, "dependencyCache", new Gr(200));
4548
- He(this, "compiledExpressions", /* @__PURE__ */ new Map());
4546
+ Ge(this, "resultCache", new Gr(500));
4547
+ Ge(this, "dependencyCache", new Gr(200));
4548
+ Ge(this, "compiledExpressions", /* @__PURE__ */ new Map());
4549
4549
  }
4550
4550
  /**
4551
4551
  * Create cache key from expression and context
@@ -4560,7 +4560,7 @@ class Va {
4560
4560
  getDependencies(r) {
4561
4561
  const t = JSON.stringify(r);
4562
4562
  let n = this.dependencyCache.get(t);
4563
- return n || (n = _a(r), this.dependencyCache.set(t, n)), n;
4563
+ return n || (n = Da(r), this.dependencyCache.set(t, n)), n;
4564
4564
  }
4565
4565
  /**
4566
4566
  * Check if expression result is cached and context hasn't changed
@@ -4755,14 +4755,14 @@ class Va {
4755
4755
  this.resultCache.clear(), this.dependencyCache.clear(), this.compiledExpressions.clear();
4756
4756
  }
4757
4757
  }
4758
- const Tt = new Va();
4759
- function Pa(e, r, t, n, a) {
4758
+ const Rt = new _a();
4759
+ function Va(e, r, t, n, a) {
4760
4760
  if (!t || t.length === 0)
4761
4761
  return { isValid: !0 };
4762
4762
  const s = { ...n, [e]: r };
4763
4763
  for (const i of t)
4764
4764
  try {
4765
- if (!Tt.evaluate(
4765
+ if (!Rt.evaluate(
4766
4766
  i.ExpressionTree,
4767
4767
  s,
4768
4768
  a
@@ -4778,7 +4778,7 @@ function Pa(e, r, t, n, a) {
4778
4778
  return { isValid: !0 };
4779
4779
  }
4780
4780
  function Hr(e) {
4781
- return Array.from(Tt.getDependencies(e));
4781
+ return Array.from(Rt.getDependencies(e));
4782
4782
  }
4783
4783
  function wo(e) {
4784
4784
  const {
@@ -4794,17 +4794,17 @@ function wo(e) {
4794
4794
  onError: u,
4795
4795
  onSchemaError: y,
4796
4796
  onSubmitError: D,
4797
- skipSchemaFetch: _ = !1,
4797
+ skipSchemaFetch: V = !1,
4798
4798
  schema: F,
4799
- draftOnEveryChange: Y = !1
4800
- } = e, [b, G] = we(null), [q, I] = we({}), [L, te] = we(null), [ne, R] = we(!1), [p] = we({}), l = ge(!1), w = ge(null), v = ge(null), k = ge(c), j = ge(u), K = ge(D), Q = ge(y);
4801
- Te(() => {
4799
+ draftOnEveryChange: G = !1
4800
+ } = e, [b, H] = we(null), [q, $] = we({}), [j, te] = we(null), [ne, T] = we(!1), [p] = we({}), l = ge(!1), w = ge(null), v = ge(null), k = ge(c), L = ge(u), K = ge(D), Q = ge(y);
4801
+ Re(() => {
4802
4802
  k.current = c;
4803
- }, [c]), Te(() => {
4804
- j.current = u;
4805
- }, [u]), Te(() => {
4803
+ }, [c]), Re(() => {
4804
+ L.current = u;
4805
+ }, [u]), Re(() => {
4806
4806
  K.current = D;
4807
- }, [D]), Te(() => {
4807
+ }, [D]), Re(() => {
4808
4808
  Q.current = y;
4809
4809
  }, [y]);
4810
4810
  const {
@@ -4814,8 +4814,8 @@ function wo(e) {
4814
4814
  refetch: A
4815
4815
  } = ar({
4816
4816
  queryKey: ["form-schema", r],
4817
- queryFn: () => _ ? Promise.resolve(F || {}) : Da(r),
4818
- enabled: i && (!_ || !!F),
4817
+ queryFn: () => V ? Promise.resolve(F || {}) : Fa(r),
4818
+ enabled: i && (!V || !!F),
4819
4819
  retry: 3,
4820
4820
  staleTime: 30 * 60 * 1e3,
4821
4821
  // 30 minutes - schemas don't change frequently
@@ -4828,7 +4828,7 @@ function wo(e) {
4828
4828
  error: he
4829
4829
  } = ar({
4830
4830
  queryKey: ["form-record", r, n],
4831
- queryFn: () => Na(r, n),
4831
+ queryFn: () => xa(r, n),
4832
4832
  enabled: i && t === "update" && !!n,
4833
4833
  retry: 3,
4834
4834
  staleTime: 5 * 60 * 1e3,
@@ -4836,48 +4836,48 @@ function wo(e) {
4836
4836
  gcTime: 15 * 60 * 1e3,
4837
4837
  // 15 minutes - keep records for a reasonable time
4838
4838
  throwOnError: !1
4839
- }), Se = fe(() => {
4839
+ }), Se = ce(() => {
4840
4840
  const d = { ...a };
4841
4841
  if (t === "update" && me && Object.assign(d, me), b)
4842
4842
  for (const [h, x] of Object.entries(b.fields))
4843
4843
  x.defaultValue !== void 0 && !(h in d) && (d[h] = x.defaultValue);
4844
4844
  return d;
4845
- }, [a, me, t, b]), T = Ht({
4845
+ }, [a, me, t, b]), R = Gt({
4846
4846
  mode: s,
4847
4847
  defaultValues: a,
4848
4848
  values: t === "update" && me ? Se : void 0
4849
4849
  });
4850
- Te(() => {
4850
+ Re(() => {
4851
4851
  var d;
4852
4852
  if (ee)
4853
4853
  try {
4854
- const h = va(
4854
+ const h = wa(
4855
4855
  ee,
4856
4856
  {},
4857
4857
  // Pass empty object - validation functions get live values from react-hook-form
4858
4858
  f
4859
4859
  );
4860
- G(h);
4861
- const x = Ea(h);
4862
- Object.keys(x).length > 0 && Ta(x).then(I).catch(console.warn);
4860
+ H(h);
4861
+ const x = Ca(h);
4862
+ Object.keys(x).length > 0 && ka(x).then($).catch(console.warn);
4863
4863
  } catch (h) {
4864
4864
  console.error("Schema processing failed:", h), (d = Q.current) == null || d.call(Q, h);
4865
4865
  }
4866
- }, [ee, f]), Te(() => {
4866
+ }, [ee, f]), Re(() => {
4867
4867
  var d;
4868
4868
  Z && ((d = Q.current) == null || d.call(Q, Z));
4869
- }, [Z]), Te(() => {
4869
+ }, [Z]), Re(() => {
4870
4870
  var d;
4871
- he && ((d = j.current) == null || d.call(j, he));
4871
+ he && ((d = L.current) == null || d.call(L, he));
4872
4872
  }, [he]);
4873
- const ae = fe(() => {
4873
+ const ae = ce(() => {
4874
4874
  if (!b) return [];
4875
4875
  const d = /* @__PURE__ */ new Set(), h = new Set(b.computedFields);
4876
4876
  return Object.entries(b.fieldRules).forEach(([x, W]) => {
4877
4877
  W.computation.forEach((B) => {
4878
4878
  const J = b.rules.computation[B];
4879
- J != null && J.ExpressionTree && Hr(J.ExpressionTree).forEach((ce) => {
4880
- b.fields[ce] && ce !== x && !h.has(ce) && d.add(ce);
4879
+ J != null && J.ExpressionTree && Hr(J.ExpressionTree).forEach((ue) => {
4880
+ b.fields[ue] && ue !== x && !h.has(ue) && d.add(ue);
4881
4881
  });
4882
4882
  });
4883
4883
  }), b.computedFields.forEach((x) => {
@@ -4890,40 +4890,40 @@ function wo(e) {
4890
4890
  }), Array.from(d);
4891
4891
  }, [b]), xe = E(
4892
4892
  async (d) => {
4893
- !b || ae.length === 0 || !(Y || ae.includes(d)) || l.current || (w.current && clearTimeout(w.current), w.current = setTimeout(() => {
4893
+ !b || ae.length === 0 || !(G || ae.includes(d)) || l.current || (w.current && clearTimeout(w.current), w.current = setTimeout(() => {
4894
4894
  if (!b || l.current)
4895
4895
  return;
4896
- const x = T.getValues();
4896
+ const x = R.getValues();
4897
4897
  (async () => {
4898
4898
  l.current = !0;
4899
4899
  try {
4900
- const B = Re(r), J = {};
4900
+ const B = Te(r), J = {};
4901
4901
  t === "update" && n && "_id" in x && (J._id = x._id);
4902
- const se = v.current ?? (t === "update" ? me : null) ?? {}, ce = new Set(
4902
+ const se = v.current ?? (t === "update" ? me : null) ?? {}, ue = new Set(
4903
4903
  b.computedFields || []
4904
4904
  );
4905
- Object.keys(x).forEach((ue) => {
4906
- if (ue === "_id" || ce.has(ue)) return;
4907
- const be = x[ue], er = se[ue];
4908
- JSON.stringify(be) !== JSON.stringify(er) && (be !== "" && be !== null && be !== void 0) && (J[ue] = be);
4905
+ Object.keys(x).forEach((de) => {
4906
+ if (de === "_id" || ue.has(de)) return;
4907
+ const be = x[de], er = se[de];
4908
+ JSON.stringify(be) !== JSON.stringify(er) && (be !== "" && be !== null && be !== void 0) && (J[de] = be);
4909
4909
  });
4910
4910
  const _e = J, Pe = {
4911
4911
  ...v.current
4912
4912
  };
4913
- Object.keys(x).forEach((ue) => {
4914
- ce.has(ue) || (Pe[ue] = x[ue]);
4913
+ Object.keys(x).forEach((de) => {
4914
+ ue.has(de) || (Pe[de] = x[de]);
4915
4915
  }), v.current = Pe;
4916
- const Be = t === "update" && n ? await B.draftPatch(n, _e) : await B.draft(_e);
4917
- Be && typeof Be == "object" && (Object.entries(Be).forEach(
4918
- ([ue, be]) => {
4919
- x[ue] !== be && T.setValue(ue, be, {
4916
+ const Ue = t === "update" && n ? await B.draftPatch(n, _e) : await B.draft(_e);
4917
+ Ue && typeof Ue == "object" && (Object.entries(Ue).forEach(
4918
+ ([de, be]) => {
4919
+ x[de] !== be && R.setValue(de, be, {
4920
4920
  shouldDirty: !1,
4921
4921
  shouldValidate: !1
4922
4922
  });
4923
4923
  }
4924
- ), Object.entries(Be).forEach(
4925
- ([ue, be]) => {
4926
- ce.has(ue) && (v.current[ue] = be);
4924
+ ), Object.entries(Ue).forEach(
4925
+ ([de, be]) => {
4926
+ ue.has(de) && (v.current[de] = be);
4927
4927
  }
4928
4928
  ));
4929
4929
  } catch (B) {
@@ -4940,15 +4940,15 @@ function wo(e) {
4940
4940
  n,
4941
4941
  me,
4942
4942
  r,
4943
- T,
4943
+ R,
4944
4944
  ae,
4945
- Y
4945
+ G
4946
4946
  ]
4947
4947
  ), pe = E(async () => {
4948
4948
  if (!b)
4949
4949
  return !1;
4950
- const d = T.getValues();
4951
- if (!await T.trigger())
4950
+ const d = R.getValues();
4951
+ if (!await R.trigger())
4952
4952
  return !1;
4953
4953
  const x = b.crossFieldValidation.map(
4954
4954
  (B) => ({
@@ -4956,32 +4956,32 @@ function wo(e) {
4956
4956
  Condition: { ExpressionTree: B.ExpressionTree },
4957
4957
  Message: B.Message || `Validation failed for ${B.Name}`
4958
4958
  })
4959
- ), W = ia(
4959
+ ), W = sa(
4960
4960
  x,
4961
4961
  d,
4962
4962
  q
4963
4963
  );
4964
4964
  return W.length > 0 ? (W.forEach((B, J) => {
4965
- T.setError(`root.crossField${J}`, {
4965
+ R.setError(`root.crossField${J}`, {
4966
4966
  type: "validate",
4967
4967
  message: B.message
4968
4968
  });
4969
4969
  }), !1) : !0;
4970
4970
  }, [
4971
4971
  b,
4972
- T.getValues,
4973
- T.trigger,
4974
- T.setError,
4972
+ R.getValues,
4973
+ R.trigger,
4974
+ R.setError,
4975
4975
  q
4976
4976
  ]), P = E(async () => {
4977
4977
  var d, h, x;
4978
4978
  if (!b)
4979
4979
  throw new Error("Schema not loaded");
4980
- R(!0), te(null);
4980
+ T(!0), te(null);
4981
4981
  try {
4982
4982
  if (!await pe())
4983
4983
  throw new Error("Form validation failed");
4984
- const B = T.getValues(), J = Ra(
4984
+ const B = R.getValues(), J = Ra(
4985
4985
  B,
4986
4986
  b.computedFields,
4987
4987
  t,
@@ -4994,16 +4994,16 @@ function wo(e) {
4994
4994
  );
4995
4995
  if (!se.success)
4996
4996
  throw se.error || new Error("Submission failed");
4997
- (d = k.current) == null || d.call(k, se.data || B), t === "create" && T.reset();
4997
+ (d = k.current) == null || d.call(k, se.data || B), t === "create" && R.reset();
4998
4998
  } catch (W) {
4999
4999
  const B = W;
5000
- throw te(B), (h = K.current) == null || h.call(K, B), (x = j.current) == null || x.call(j, B), W;
5000
+ throw te(B), (h = K.current) == null || h.call(K, B), (x = L.current) == null || x.call(L, B), W;
5001
5001
  } finally {
5002
- R(!1);
5002
+ T(!1);
5003
5003
  }
5004
- }, [b, pe, T, r, t, n, me]), Ne = E(() => T.handleSubmit(async () => {
5004
+ }, [b, pe, R, r, t, n, me]), Oe = E(() => R.handleSubmit(async () => {
5005
5005
  await P();
5006
- }), [T, P]), ve = E(
5006
+ }), [R, P]), ve = E(
5007
5007
  (d) => (b == null ? void 0 : b.fields[d]) || null,
5008
5008
  [b]
5009
5009
  ), ye = E(() => {
@@ -5015,23 +5015,23 @@ function wo(e) {
5015
5015
  }, [b]), De = E(
5016
5016
  (d) => !!(b != null && b.fields[d]),
5017
5017
  [b]
5018
- ), Oe = E(
5018
+ ), Ne = E(
5019
5019
  (d) => (b == null ? void 0 : b.requiredFields.includes(d)) || !1,
5020
5020
  [b]
5021
- ), Ue = E(
5021
+ ), qe = E(
5022
5022
  (d) => (b == null ? void 0 : b.computedFields.includes(d)) || !1,
5023
5023
  [b]
5024
- ), V = E(async () => {
5024
+ ), _ = E(async () => {
5025
5025
  await A();
5026
5026
  }, [A]), oe = E(() => {
5027
- T.clearErrors(), te(null);
5028
- }, [T]), Ce = U || t === "update" && Fe, Je = Ce || ne, Me = Z || he, Ie = !!(Me || L), Xe = fe(
5027
+ R.clearErrors(), te(null);
5028
+ }, [R]), Ce = U || t === "update" && Fe, Je = Ce || ne, Ke = Z || he, $e = !!(Ke || j), Xe = ce(
5029
5029
  () => (b == null ? void 0 : b.computedFields) || [],
5030
5030
  [b]
5031
- ), Ze = fe(
5031
+ ), Ze = ce(
5032
5032
  () => (b == null ? void 0 : b.requiredFields) || [],
5033
5033
  [b]
5034
- ), m = fe(() => {
5034
+ ), m = ce(() => {
5035
5035
  if (!b) return {};
5036
5036
  const d = {};
5037
5037
  return Object.entries(b.fields).forEach(([h, x]) => {
@@ -5048,11 +5048,11 @@ function wo(e) {
5048
5048
  const B = x.rules.validation;
5049
5049
  B.length > 0 && (W.validate = {
5050
5050
  expressionValidation: (J) => {
5051
- const se = T.getValues();
5052
- for (const ce of B) {
5053
- const _e = b.rules.validation[ce];
5051
+ const se = R.getValues();
5052
+ for (const ue of B) {
5053
+ const _e = b.rules.validation[ue];
5054
5054
  if (_e) {
5055
- const Pe = Pa(
5055
+ const Pe = Va(
5056
5056
  h,
5057
5057
  J,
5058
5058
  [_e],
@@ -5067,7 +5067,7 @@ function wo(e) {
5067
5067
  }
5068
5068
  }), d[h] = W;
5069
5069
  }), d;
5070
- }, [b, T, q]);
5070
+ }, [b, R, q]);
5071
5071
  return {
5072
5072
  // Form methods with strict typing
5073
5073
  register: E(
@@ -5075,37 +5075,37 @@ function wo(e) {
5075
5075
  const x = m[d], W = h == null ? void 0 : h.onBlur, B = async (J) => {
5076
5076
  W && await W(J);
5077
5077
  let se = !0;
5078
- s === "onBlur" || s === "onTouched" || s === "all" ? se = await T.trigger(d) : se = !T.getFieldState(d, T.formState).error, se && await xe(d);
5078
+ s === "onBlur" || s === "onTouched" || s === "all" ? se = await R.trigger(d) : se = !R.getFieldState(d, R.formState).error, se && await xe(d);
5079
5079
  };
5080
- return T.register(d, {
5080
+ return R.register(d, {
5081
5081
  ...x,
5082
5082
  ...h,
5083
5083
  onBlur: B
5084
5084
  });
5085
5085
  },
5086
- [T, m, xe, s]
5086
+ [R, m, xe, s]
5087
5087
  ),
5088
- handleSubmit: Ne,
5089
- watch: T.watch,
5088
+ handleSubmit: Oe,
5089
+ watch: R.watch,
5090
5090
  // Type assertion for complex generic constraints
5091
- setValue: T.setValue,
5092
- reset: T.reset,
5091
+ setValue: R.setValue,
5092
+ reset: R.reset,
5093
5093
  // Flattened form state (NEW - direct access, no nested formState)
5094
- errors: T.formState.errors,
5095
- isValid: T.formState.isValid,
5096
- isDirty: T.formState.isDirty,
5097
- isSubmitting: T.formState.isSubmitting || ne,
5098
- isSubmitSuccessful: T.formState.isSubmitSuccessful,
5094
+ errors: R.formState.errors,
5095
+ isValid: R.formState.isValid,
5096
+ isDirty: R.formState.isDirty,
5097
+ isSubmitting: R.formState.isSubmitting || ne,
5098
+ isSubmitSuccessful: R.formState.isSubmitSuccessful,
5099
5099
  // BACKWARD COMPATIBILITY - Keep formState for existing components
5100
- formState: T.formState,
5100
+ formState: R.formState,
5101
5101
  // Loading states
5102
5102
  isLoadingInitialData: Ce,
5103
5103
  isLoadingRecord: Fe,
5104
5104
  isLoading: Je,
5105
5105
  // Error handling
5106
- loadError: Me,
5107
- submitError: L,
5108
- hasError: Ie,
5106
+ loadError: Ke,
5107
+ submitError: j,
5108
+ hasError: $e,
5109
5109
  // Schema information
5110
5110
  schema: ee,
5111
5111
  processedSchema: b,
@@ -5115,17 +5115,17 @@ function wo(e) {
5115
5115
  getField: ve,
5116
5116
  getFields: ye,
5117
5117
  hasField: De,
5118
- isFieldRequired: Oe,
5119
- isFieldComputed: Ue,
5118
+ isFieldRequired: Ne,
5119
+ isFieldComputed: qe,
5120
5120
  // Operations
5121
5121
  submit: P,
5122
- refreshSchema: V,
5122
+ refreshSchema: _,
5123
5123
  validateForm: pe,
5124
5124
  clearErrors: oe
5125
5125
  };
5126
5126
  }
5127
5127
  const Yr = 50, Qr = 5, Wr = 5;
5128
- function Ia({
5128
+ function Pa({
5129
5129
  onCardMove: e,
5130
5130
  onError: r,
5131
5131
  columns: t,
@@ -5145,22 +5145,22 @@ function Ia({
5145
5145
  dragOverPosition: null,
5146
5146
  dragSourceColumn: null
5147
5147
  }), f.current && (clearTimeout(f.current), f.current = null);
5148
- }, []), y = E((R) => t.find((p) => p._id === R) || null, [t]), D = E((R) => {
5148
+ }, []), y = E((T) => t.find((p) => p._id === T) || null, [t]), D = E((T) => {
5149
5149
  for (const p of t) {
5150
- const l = p.cards.find((w) => w._id === R);
5150
+ const l = p.cards.find((w) => w._id === T);
5151
5151
  if (l)
5152
5152
  return { card: l, column: p };
5153
5153
  }
5154
5154
  return null;
5155
- }, [t]), _ = E((R, p) => {
5155
+ }, [t]), V = E((T, p) => {
5156
5156
  var l, w;
5157
5157
  try {
5158
- const v = R.target, k = y(p.columnId);
5158
+ const v = T.target, k = y(p.columnId);
5159
5159
  if (!k)
5160
5160
  throw new Error("Source column not found");
5161
- (l = R.dataTransfer) == null || l.setData("text/plain", p._id), (w = R.dataTransfer) == null || w.setData("application/json", JSON.stringify(p));
5162
- const j = v.cloneNode(!0);
5163
- j.style.cssText = `
5161
+ (l = T.dataTransfer) == null || l.setData("text/plain", p._id), (w = T.dataTransfer) == null || w.setData("application/json", JSON.stringify(p));
5162
+ const L = v.cloneNode(!0);
5163
+ L.style.cssText = `
5164
5164
  position: fixed;
5165
5165
  top: -1000px;
5166
5166
  left: -1000px;
@@ -5172,7 +5172,7 @@ function Ia({
5172
5172
  max-width: 300px;
5173
5173
  background: white;
5174
5174
  border-radius: 8px;
5175
- `, document.body.appendChild(j), i.current = j, R.dataTransfer && R.dataTransfer.setDragImage(j, R.offsetX || 50, R.offsetY || 20), s({
5175
+ `, document.body.appendChild(L), i.current = L, T.dataTransfer && T.dataTransfer.setDragImage(L, T.offsetX || 50, T.offsetY || 20), s({
5176
5176
  isDragging: !0,
5177
5177
  draggedCard: p,
5178
5178
  dragOverColumn: null,
@@ -5182,17 +5182,17 @@ function Ia({
5182
5182
  } catch (v) {
5183
5183
  r == null || r(v instanceof Error ? v : new Error("Drag start failed")), u();
5184
5184
  }
5185
- }, [y, r, u, n]), F = E((R, p) => {
5186
- if (R.preventDefault(), !a.isDragging || !a.draggedCard) return;
5185
+ }, [y, r, u, n]), F = E((T, p) => {
5186
+ if (T.preventDefault(), !a.isDragging || !a.draggedCard) return;
5187
5187
  const l = p ? y(p) : null;
5188
5188
  s((w) => ({
5189
5189
  ...w,
5190
5190
  dragOverColumn: (l == null ? void 0 : l._id) || null,
5191
5191
  dragOverPosition: null
5192
5192
  // Will be calculated based on mouse position
5193
- })), G(R);
5194
- }, [a.isDragging, a.draggedCard, y]), Y = E((R, p) => {
5195
- if (R.preventDefault(), !(!a.isDragging || !a.draggedCard))
5193
+ })), H(T);
5194
+ }, [a.isDragging, a.draggedCard, y]), G = E((T, p) => {
5195
+ if (T.preventDefault(), !(!a.isDragging || !a.draggedCard))
5196
5196
  try {
5197
5197
  const l = a.draggedCard, w = a.dragSourceColumn, v = y(p), k = y(w);
5198
5198
  if (!v || !k)
@@ -5211,28 +5211,28 @@ function Ia({
5211
5211
  }
5212
5212
  }, [a, y, e, r, u, n]), b = E(() => {
5213
5213
  i.current && (document.body.removeChild(i.current), i.current = null), u();
5214
- }, [u]), G = E((R) => {
5215
- const p = R.target.closest(".kanban-container");
5214
+ }, [u]), H = E((T) => {
5215
+ const p = T.target.closest(".kanban-container");
5216
5216
  if (!p) return;
5217
- const l = p.getBoundingClientRect(), w = R.clientX - l.left, v = l.width;
5217
+ const l = p.getBoundingClientRect(), w = T.clientX - l.left, v = l.width;
5218
5218
  let k = 0;
5219
5219
  if (w < Yr ? k = -Qr : w > v - Yr && (k = Qr), k !== 0) {
5220
5220
  f.current && clearTimeout(f.current);
5221
- const j = () => {
5222
- p.scrollLeft += k, f.current = setTimeout(j, 16);
5221
+ const L = () => {
5222
+ p.scrollLeft += k, f.current = setTimeout(L, 16);
5223
5223
  };
5224
- f.current = setTimeout(j, 100);
5224
+ f.current = setTimeout(L, 100);
5225
5225
  } else
5226
5226
  f.current && (clearTimeout(f.current), f.current = null);
5227
- }, []), q = E((R, p) => {
5228
- if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter", "Space", "Escape"].includes(R.key))
5227
+ }, []), q = E((T, p) => {
5228
+ if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter", "Space", "Escape"].includes(T.key))
5229
5229
  return;
5230
- R.preventDefault();
5230
+ T.preventDefault();
5231
5231
  const l = D(p._id);
5232
5232
  if (!l) return;
5233
5233
  const { column: w } = l, v = t.findIndex((k) => k._id === w._id);
5234
5234
  try {
5235
- switch (R.key) {
5235
+ switch (T.key) {
5236
5236
  case "ArrowLeft":
5237
5237
  if (v > 0) {
5238
5238
  const k = t[v - 1];
@@ -5262,16 +5262,16 @@ function Ia({
5262
5262
  } catch (k) {
5263
5263
  r == null || r(k instanceof Error ? k : new Error("Keyboard navigation failed"));
5264
5264
  }
5265
- }, [D, t, e, r, n]), I = E((R, p) => {
5266
- const l = R.touches[0];
5265
+ }, [D, t, e, r, n]), $ = E((T, p) => {
5266
+ const l = T.touches[0];
5267
5267
  c.current = {
5268
5268
  x: l.clientX,
5269
5269
  y: l.clientY,
5270
5270
  card: p
5271
5271
  };
5272
- }, []), L = E((R) => {
5272
+ }, []), j = E((T) => {
5273
5273
  if (!c.current) return;
5274
- const p = R.touches[0], l = Math.abs(p.clientX - c.current.x), w = Math.abs(p.clientY - c.current.y);
5274
+ const p = T.touches[0], l = Math.abs(p.clientX - c.current.x), w = Math.abs(p.clientY - c.current.y);
5275
5275
  if (l > Wr || w > Wr) {
5276
5276
  const v = c.current.card, k = y(v.columnId);
5277
5277
  if (!k) return;
@@ -5283,19 +5283,19 @@ function Ia({
5283
5283
  dragSourceColumn: k._id
5284
5284
  }), n == null || n(v, k.title, "being moved");
5285
5285
  }
5286
- }, [y, n]), te = E((R) => {
5286
+ }, [y, n]), te = E((T) => {
5287
5287
  if (!a.isDragging || !a.draggedCard || !c.current) {
5288
5288
  c.current = null;
5289
5289
  return;
5290
5290
  }
5291
5291
  try {
5292
- const p = R.changedTouches[0], l = document.elementFromPoint(p.clientX, p.clientY), w = l == null ? void 0 : l.closest("[data-column-id]");
5292
+ const p = T.changedTouches[0], l = document.elementFromPoint(p.clientX, p.clientY), w = l == null ? void 0 : l.closest("[data-column-id]");
5293
5293
  if (w) {
5294
- const v = w.dataset.columnId, k = a.draggedCard, j = a.dragSourceColumn, K = y(v), Q = y(j);
5295
- if (K && Q && j !== v) {
5294
+ const v = w.dataset.columnId, k = a.draggedCard, L = a.dragSourceColumn, K = y(v), Q = y(L);
5295
+ if (K && Q && L !== v) {
5296
5296
  if (K.limit && K.cards.length >= K.limit)
5297
5297
  throw new Error(`Column "${K.title}" has reached its limit of ${K.limit} cards`);
5298
- e == null || e(k, j, v), n == null || n(k, Q.title, K.title);
5298
+ e == null || e(k, L, v), n == null || n(k, Q.title, K.title);
5299
5299
  }
5300
5300
  }
5301
5301
  } catch (p) {
@@ -5303,13 +5303,13 @@ function Ia({
5303
5303
  } finally {
5304
5304
  c.current = null, u();
5305
5305
  }
5306
- }, [a, y, e, r, u, n]), ne = E((R, p, l) => {
5307
- const w = `Moved "${R.title}" from ${p} to ${l}`, v = document.createElement("div");
5306
+ }, [a, y, e, r, u, n]), ne = E((T, p, l) => {
5307
+ const w = `Moved "${T.title}" from ${p} to ${l}`, v = document.createElement("div");
5308
5308
  v.setAttribute("aria-live", "polite"), v.setAttribute("aria-atomic", "true"), v.className = "sr-only", v.textContent = w, document.body.appendChild(v), setTimeout(() => {
5309
5309
  document.body.removeChild(v);
5310
5310
  }, 1e3), console.log(`Kanban: ${w}`);
5311
5311
  }, []);
5312
- return Te(() => () => {
5312
+ return Re(() => () => {
5313
5313
  f.current && clearTimeout(f.current), i.current && document.body.contains(i.current) && document.body.removeChild(i.current);
5314
5314
  }, []), {
5315
5315
  // State
@@ -5319,13 +5319,13 @@ function Ia({
5319
5319
  dragOverPosition: a.dragOverPosition,
5320
5320
  dragSourceColumn: a.dragSourceColumn,
5321
5321
  // Handlers
5322
- handleDragStart: _,
5322
+ handleDragStart: V,
5323
5323
  handleDragOver: F,
5324
- handleDrop: Y,
5324
+ handleDrop: G,
5325
5325
  handleDragEnd: b,
5326
5326
  handleKeyDown: q,
5327
- handleTouchStart: I,
5328
- handleTouchMove: L,
5327
+ handleTouchStart: $,
5328
+ handleTouchMove: j,
5329
5329
  handleTouchEnd: te,
5330
5330
  // Utilities
5331
5331
  announceMove: n || ne,
@@ -5333,7 +5333,7 @@ function Ia({
5333
5333
  };
5334
5334
  }
5335
5335
  function vo(e) {
5336
- var Ie, Xe, Ze;
5336
+ var $e, Xe, Ze;
5337
5337
  const {
5338
5338
  columns: r,
5339
5339
  cardSource: t,
@@ -5346,30 +5346,30 @@ function vo(e) {
5346
5346
  onCardUpdate: u,
5347
5347
  onCardDelete: y,
5348
5348
  onError: D,
5349
- onFilterError: _
5349
+ onFilterError: V
5350
5350
  } = e, F = n || t;
5351
5351
  if (!F)
5352
5352
  throw new Error('useKanban requires either "source" or "cardSource" parameter');
5353
- const [Y, b] = we({
5353
+ const [G, b] = we({
5354
5354
  query: (i == null ? void 0 : i.search) || ""
5355
- }), [G] = we({
5356
- field: ((Ie = i == null ? void 0 : i.sorting) == null ? void 0 : Ie.field) || null,
5355
+ }), [H] = we({
5356
+ field: (($e = i == null ? void 0 : i.sorting) == null ? void 0 : $e.field) || null,
5357
5357
  direction: ((Xe = i == null ? void 0 : i.sorting) == null ? void 0 : Xe.direction) || null
5358
- }), [q, I] = we(() => {
5358
+ }), [q, $] = we(() => {
5359
5359
  const m = {};
5360
5360
  return r.forEach((C) => {
5361
5361
  m[C.id] = 10;
5362
5362
  }), m;
5363
- }), L = ge(D), te = ge(f), ne = ge(c), R = ge(u), p = ge(y);
5364
- Te(() => {
5365
- L.current = D, te.current = f, ne.current = c, R.current = u, p.current = y;
5363
+ }), j = ge(D), te = ge(f), ne = ge(c), T = ge(u), p = ge(y);
5364
+ Re(() => {
5365
+ j.current = D, te.current = f, ne.current = c, T.current = u, p.current = y;
5366
5366
  }, [D, f, c, u, y]);
5367
5367
  const l = nt(), w = vt({
5368
5368
  initialConditions: i == null ? void 0 : i.filters,
5369
5369
  initialLogicalOperator: (i == null ? void 0 : i.filterOperator) || "And",
5370
5370
  fieldDefinitions: s,
5371
5371
  validateOnChange: !0,
5372
- onValidationError: _
5372
+ onValidationError: V
5373
5373
  }), v = E((m) => {
5374
5374
  const C = {
5375
5375
  LHSField: "columnId",
@@ -5394,35 +5394,35 @@ function vo(e) {
5394
5394
  PageSize: q[m] || 10,
5395
5395
  Filter: h
5396
5396
  };
5397
- return G.field && G.direction ? x.Sort = [
5398
- { [String(G.field)]: G.direction === "asc" ? "ASC" : "DESC" },
5397
+ return H.field && H.direction ? x.Sort = [
5398
+ { [String(H.field)]: H.direction === "asc" ? "ASC" : "DESC" },
5399
5399
  { position: "ASC" }
5400
5400
  ] : x.Sort = [
5401
5401
  { columnId: "ASC" },
5402
5402
  { position: "ASC" }
5403
- ], Y.query && (x.Search = Y.query), x;
5404
- }, [w.filterPayload, q, G, Y.query]), k = Mt({
5403
+ ], G.query && (x.Search = G.query), x;
5404
+ }, [w.filterPayload, q, H, G.query]), k = Kt({
5405
5405
  queries: r.map((m) => {
5406
5406
  const C = v(m.id);
5407
5407
  return {
5408
5408
  queryKey: ["kanban-cards", F, m.id, C],
5409
5409
  queryFn: async () => {
5410
5410
  try {
5411
- return await Re(F).list(C);
5411
+ return await Te(F).list(C);
5412
5412
  } catch (d) {
5413
5413
  throw d;
5414
5414
  }
5415
5415
  },
5416
- placeholderData: Gt,
5416
+ placeholderData: Mt,
5417
5417
  staleTime: 30 * 1e3
5418
5418
  };
5419
5419
  })
5420
- }), j = k.some((m) => m.isLoading), K = k.some((m) => m.isFetching), Q = ((Ze = k.find((m) => m.error)) == null ? void 0 : Ze.error) || null, ee = async () => {
5420
+ }), L = k.some((m) => m.isLoading), K = k.some((m) => m.isFetching), Q = ((Ze = k.find((m) => m.error)) == null ? void 0 : Ze.error) || null, ee = async () => {
5421
5421
  await Promise.all(k.map((m) => m.refetch()));
5422
- }, U = fe(() => {
5422
+ }, U = ce(() => {
5423
5423
  const m = {};
5424
- return Y.query && (m.Search = Y.query), w.filterPayload && (m.Filter = w.filterPayload), m;
5425
- }, [Y.query, w.filterPayload]), {
5424
+ return G.query && (m.Search = G.query), w.filterPayload && (m.Filter = w.filterPayload), m;
5425
+ }, [G.query, w.filterPayload]), {
5426
5426
  data: Z,
5427
5427
  isLoading: A,
5428
5428
  error: me
@@ -5430,9 +5430,9 @@ function vo(e) {
5430
5430
  queryKey: ["kanban-count", F, U],
5431
5431
  queryFn: async () => {
5432
5432
  try {
5433
- return await Re(F).count(U);
5433
+ return await Te(F).count(U);
5434
5434
  } catch (m) {
5435
- throw L.current && L.current(m), m;
5435
+ throw j.current && j.current(m), m;
5436
5436
  }
5437
5437
  },
5438
5438
  staleTime: 30 * 1e3,
@@ -5440,7 +5440,7 @@ function vo(e) {
5440
5440
  }), Fe = ir({
5441
5441
  mutationFn: async (m) => {
5442
5442
  const C = m.position ?? 999999;
5443
- return (await Re(F).create({ ...m, position: C }))._id;
5443
+ return (await Te(F).create({ ...m, position: C }))._id;
5444
5444
  },
5445
5445
  onMutate: async (m) => {
5446
5446
  const C = m.columnId, d = v(C), h = ["kanban-cards", F, C, d];
@@ -5470,28 +5470,28 @@ function vo(e) {
5470
5470
  },
5471
5471
  onError: (m, C, d) => {
5472
5472
  var h;
5473
- d != null && d.previousCards && (d != null && d.queryKey) && l.setQueryData(d.queryKey, d.previousCards), (h = L.current) == null || h.call(L, m);
5473
+ d != null && d.previousCards && (d != null && d.queryKey) && l.setQueryData(d.queryKey, d.previousCards), (h = j.current) == null || h.call(j, m);
5474
5474
  },
5475
5475
  onSettled: (m, C, d) => {
5476
5476
  const h = d.columnId, x = v(h);
5477
5477
  l.invalidateQueries({ queryKey: ["kanban-cards", F, h, x] });
5478
5478
  }
5479
5479
  }), he = ir({
5480
- mutationFn: async ({ id: m, updates: C }) => (await Re(F).update(m, C), { id: m, updates: C }),
5480
+ mutationFn: async ({ id: m, updates: C }) => (await Te(F).update(m, C), { id: m, updates: C }),
5481
5481
  onMutate: async () => (await l.cancelQueries({ queryKey: ["kanban-cards", F] }), {}),
5482
5482
  onSuccess: async (m) => {
5483
5483
  var C;
5484
- (C = R.current) == null || C.call(R, { _id: m.id, ...m.updates });
5484
+ (C = T.current) == null || C.call(T, { _id: m.id, ...m.updates });
5485
5485
  },
5486
5486
  onError: (m, C, d) => {
5487
5487
  var h;
5488
- (h = L.current) == null || h.call(L, m);
5488
+ (h = j.current) == null || h.call(j, m);
5489
5489
  },
5490
5490
  onSettled: () => {
5491
5491
  l.invalidateQueries({ queryKey: ["kanban-cards", F] });
5492
5492
  }
5493
5493
  }), Se = ir({
5494
- mutationFn: async (m) => (await Re(F).delete(m), m),
5494
+ mutationFn: async (m) => (await Te(F).delete(m), m),
5495
5495
  onMutate: async () => (await l.cancelQueries({ queryKey: ["kanban-cards", F] }), {}),
5496
5496
  onSuccess: async (m) => {
5497
5497
  var C;
@@ -5499,41 +5499,41 @@ function vo(e) {
5499
5499
  },
5500
5500
  onError: (m, C, d) => {
5501
5501
  var h;
5502
- (h = L.current) == null || h.call(L, m);
5502
+ (h = j.current) == null || h.call(j, m);
5503
5503
  },
5504
5504
  onSettled: () => {
5505
5505
  l.invalidateQueries({ queryKey: ["kanban-cards", F] });
5506
5506
  }
5507
- }), T = ir({
5507
+ }), R = ir({
5508
5508
  mutationFn: async ({ cardId: m, fromColumnId: C, toColumnId: d, position: h }) => {
5509
5509
  const x = { columnId: d, ...h !== void 0 && { position: h } };
5510
- return await Re(F).update(m, x), { cardId: m, fromColumnId: C, toColumnId: d, position: h };
5510
+ return await Te(F).update(m, x), { cardId: m, fromColumnId: C, toColumnId: d, position: h };
5511
5511
  },
5512
5512
  onMutate: async ({ cardId: m, fromColumnId: C, toColumnId: d, position: h }) => {
5513
5513
  const x = v(C), W = v(d), B = ["kanban-cards", F, C, x], J = ["kanban-cards", F, d, W];
5514
5514
  await l.cancelQueries({ queryKey: B }), await l.cancelQueries({ queryKey: J });
5515
- const se = l.getQueryData(B), ce = l.getQueryData(J);
5516
- if (se && ce) {
5515
+ const se = l.getQueryData(B), ue = l.getQueryData(J);
5516
+ if (se && ue) {
5517
5517
  const _e = se.Data.find((Pe) => Pe._id === m);
5518
5518
  if (_e) {
5519
5519
  const Pe = {
5520
5520
  ...se,
5521
5521
  Data: se.Data.filter((be) => be._id !== m)
5522
- }, Be = {
5522
+ }, Ue = {
5523
5523
  ..._e,
5524
5524
  columnId: d,
5525
- position: h ?? ce.Data.length,
5525
+ position: h ?? ue.Data.length,
5526
5526
  _modified_at: /* @__PURE__ */ new Date()
5527
- }, ue = {
5528
- ...ce,
5529
- Data: [...ce.Data, Be].sort((be, er) => be.position - er.position)
5527
+ }, de = {
5528
+ ...ue,
5529
+ Data: [...ue.Data, Ue].sort((be, er) => be.position - er.position)
5530
5530
  };
5531
- l.setQueryData(B, Pe), l.setQueryData(J, ue);
5531
+ l.setQueryData(B, Pe), l.setQueryData(J, de);
5532
5532
  }
5533
5533
  }
5534
5534
  return {
5535
5535
  previousFromData: se,
5536
- previousToData: ce,
5536
+ previousToData: ue,
5537
5537
  fromQueryKey: B,
5538
5538
  toQueryKey: J,
5539
5539
  fromColumnId: C,
@@ -5551,7 +5551,7 @@ function vo(e) {
5551
5551
  },
5552
5552
  onError: (m, C, d) => {
5553
5553
  var h;
5554
- d != null && d.previousFromData && (d != null && d.fromQueryKey) && l.setQueryData(d.fromQueryKey, d.previousFromData), d != null && d.previousToData && (d != null && d.toQueryKey) && l.setQueryData(d.toQueryKey, d.previousToData), (h = L.current) == null || h.call(L, m);
5554
+ d != null && d.previousFromData && (d != null && d.fromQueryKey) && l.setQueryData(d.fromQueryKey, d.previousFromData), d != null && d.previousToData && (d != null && d.toQueryKey) && l.setQueryData(d.toQueryKey, d.previousToData), (h = j.current) == null || h.call(j, m);
5555
5555
  },
5556
5556
  onSettled: (m, C, d) => {
5557
5557
  const h = v(d.fromColumnId), x = v(d.toColumnId);
@@ -5562,7 +5562,7 @@ function vo(e) {
5562
5562
  const d = m.map((h, x) => ({ id: h, position: x, columnId: C }));
5563
5563
  await Promise.all(
5564
5564
  d.map(
5565
- (h) => Re(F).update(h.id, { position: h.position, columnId: h.columnId })
5565
+ (h) => Te(F).update(h.id, { position: h.position, columnId: h.columnId })
5566
5566
  )
5567
5567
  );
5568
5568
  },
@@ -5574,7 +5574,7 @@ function vo(e) {
5574
5574
  },
5575
5575
  onError: (m, C, d) => {
5576
5576
  var h;
5577
- (h = L.current) == null || h.call(L, m);
5577
+ (h = j.current) == null || h.call(j, m);
5578
5578
  },
5579
5579
  onSettled: (m, C, d) => {
5580
5580
  const h = v(d.columnId);
@@ -5583,7 +5583,7 @@ function vo(e) {
5583
5583
  }), xe = E(
5584
5584
  async (m, C, d) => {
5585
5585
  try {
5586
- await T.mutateAsync({
5586
+ await R.mutateAsync({
5587
5587
  cardId: m._id,
5588
5588
  fromColumnId: C,
5589
5589
  toColumnId: d,
@@ -5593,8 +5593,8 @@ function vo(e) {
5593
5593
  } catch {
5594
5594
  }
5595
5595
  },
5596
- [T]
5597
- ), pe = fe(() => r.sort((m, C) => m.position - C.position).map((m, C) => {
5596
+ [R]
5597
+ ), pe = ce(() => r.sort((m, C) => m.position - C.position).map((m, C) => {
5598
5598
  var x;
5599
5599
  const h = ((x = k[C].data) == null ? void 0 : x.Data) || [];
5600
5600
  return {
@@ -5608,16 +5608,16 @@ function vo(e) {
5608
5608
  _created_at: /* @__PURE__ */ new Date(),
5609
5609
  _modified_at: /* @__PURE__ */ new Date()
5610
5610
  };
5611
- }), [r, k]), P = Ia({
5611
+ }), [r, k]), P = Pa({
5612
5612
  onCardMove: xe,
5613
- onError: L.current,
5613
+ onError: j.current,
5614
5614
  columns: pe,
5615
5615
  announceMove: (m, C, d) => {
5616
5616
  console.log(
5617
5617
  `Kanban: Moved "${m.title}" from ${C} to ${d}`
5618
5618
  );
5619
5619
  }
5620
- }), Ne = E(
5620
+ }), Oe = E(
5621
5621
  (m) => {
5622
5622
  var C, d;
5623
5623
  return {
@@ -5660,22 +5660,22 @@ function vo(e) {
5660
5660
  b({ query: m });
5661
5661
  }, []), De = E(() => {
5662
5662
  b({ query: "" });
5663
- }, []), Oe = (Z == null ? void 0 : Z.Count) || 0, Ue = j || A, V = K, oe = Fe.isPending || he.isPending || Se.isPending || T.isPending || ae.isPending, Ce = Q || me, Je = E(async () => {
5663
+ }, []), Ne = (Z == null ? void 0 : Z.Count) || 0, qe = L || A, _ = K, oe = Fe.isPending || he.isPending || Se.isPending || R.isPending || ae.isPending, Ce = Q || me, Je = E(async () => {
5664
5664
  await ee();
5665
- }, [ee]), Me = E(async () => {
5665
+ }, [ee]), Ke = E(async () => {
5666
5666
  await l.invalidateQueries({
5667
5667
  predicate: (m) => m.queryKey[0] === "kanban-cards" || m.queryKey[0] === "kanban-count"
5668
5668
  });
5669
5669
  }, [l]);
5670
- return Te(() => {
5671
- Ce && L.current && L.current(Ce);
5670
+ return Re(() => {
5671
+ Ce && j.current && j.current(Ce);
5672
5672
  }, [Ce]), {
5673
5673
  // Data
5674
5674
  columns: pe,
5675
- totalCards: Oe,
5675
+ totalCards: Ne,
5676
5676
  // Loading States
5677
- isLoading: Ue,
5678
- isFetching: V,
5677
+ isLoading: qe,
5678
+ isFetching: _,
5679
5679
  isUpdating: oe,
5680
5680
  // Error Handling
5681
5681
  error: Ce,
@@ -5704,9 +5704,9 @@ function vo(e) {
5704
5704
  if (!h)
5705
5705
  throw new Error(`Card ${m} not found in any column`);
5706
5706
  }
5707
- await T.mutateAsync({ cardId: m, fromColumnId: h, toColumnId: C, position: d });
5707
+ await R.mutateAsync({ cardId: m, fromColumnId: h, toColumnId: C, position: d });
5708
5708
  },
5709
- [T, pe]
5709
+ [R, pe]
5710
5710
  ),
5711
5711
  reorderCards: E(
5712
5712
  async (m, C) => {
@@ -5715,7 +5715,7 @@ function vo(e) {
5715
5715
  [ae]
5716
5716
  ),
5717
5717
  // Search (Flat Access)
5718
- searchQuery: Y.query,
5718
+ searchQuery: G.query,
5719
5719
  setSearchQuery: ye,
5720
5720
  clearSearch: De,
5721
5721
  // Filter (Nested - following useTable pattern)
@@ -5736,22 +5736,22 @@ function vo(e) {
5736
5736
  },
5737
5737
  // Prop Getters
5738
5738
  // Prop Getters
5739
- getCardProps: a ? Ne : (m) => ({}),
5739
+ getCardProps: a ? Oe : (m) => ({}),
5740
5740
  getColumnProps: a ? ve : (m) => ({}),
5741
5741
  // Load More (Per Column)
5742
5742
  loadMore: E((m) => {
5743
- I((C) => ({
5743
+ $((C) => ({
5744
5744
  ...C,
5745
5745
  [m]: (C[m] || 10) + 10
5746
5746
  }));
5747
5747
  }, []),
5748
5748
  // Utilities
5749
5749
  refetch: Je,
5750
- refresh: Me
5750
+ refresh: Ke
5751
5751
  };
5752
5752
  }
5753
5753
  tt(null);
5754
- var Tr = { exports: {} }, cr = {};
5754
+ var Rr = { exports: {} }, cr = {};
5755
5755
  /**
5756
5756
  * @license React
5757
5757
  * react-jsx-runtime.production.min.js
@@ -5767,11 +5767,11 @@ function $a() {
5767
5767
  Jr = 1;
5768
5768
  var e = rt, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
5769
5769
  function i(f, c, u) {
5770
- var y, D = {}, _ = null, F = null;
5771
- u !== void 0 && (_ = "" + u), c.key !== void 0 && (_ = "" + c.key), c.ref !== void 0 && (F = c.ref);
5770
+ var y, D = {}, V = null, F = null;
5771
+ u !== void 0 && (V = "" + u), c.key !== void 0 && (V = "" + c.key), c.ref !== void 0 && (F = c.ref);
5772
5772
  for (y in c) n.call(c, y) && !s.hasOwnProperty(y) && (D[y] = c[y]);
5773
5773
  if (f && f.defaultProps) for (y in c = f.defaultProps, c) D[y] === void 0 && (D[y] = c[y]);
5774
- return { $$typeof: r, type: f, key: _, ref: F, props: D, _owner: a.current };
5774
+ return { $$typeof: r, type: f, key: V, ref: F, props: D, _owner: a.current };
5775
5775
  }
5776
5776
  return cr.Fragment = t, cr.jsx = i, cr.jsxs = i, cr;
5777
5777
  }
@@ -5786,56 +5786,56 @@ var ur = {};
5786
5786
  * LICENSE file in the root directory of this source tree.
5787
5787
  */
5788
5788
  var Xr;
5789
- function ja() {
5789
+ function Ia() {
5790
5790
  return Xr || (Xr = 1, process.env.NODE_ENV !== "production" && function() {
5791
- var e = rt, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), Y = Symbol.iterator, b = "@@iterator";
5792
- function G(o) {
5791
+ var e = rt, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), f = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), G = Symbol.iterator, b = "@@iterator";
5792
+ function H(o) {
5793
5793
  if (o === null || typeof o != "object")
5794
5794
  return null;
5795
- var g = Y && o[Y] || o[b];
5795
+ var g = G && o[G] || o[b];
5796
5796
  return typeof g == "function" ? g : null;
5797
5797
  }
5798
5798
  var q = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
5799
- function I(o) {
5799
+ function $(o) {
5800
5800
  {
5801
- for (var g = arguments.length, S = new Array(g > 1 ? g - 1 : 0), $ = 1; $ < g; $++)
5802
- S[$ - 1] = arguments[$];
5803
- L("error", o, S);
5801
+ for (var g = arguments.length, S = new Array(g > 1 ? g - 1 : 0), I = 1; I < g; I++)
5802
+ S[I - 1] = arguments[I];
5803
+ j("error", o, S);
5804
5804
  }
5805
5805
  }
5806
- function L(o, g, S) {
5806
+ function j(o, g, S) {
5807
5807
  {
5808
- var $ = q.ReactDebugCurrentFrame, X = $.getStackAddendum();
5808
+ var I = q.ReactDebugCurrentFrame, X = I.getStackAddendum();
5809
5809
  X !== "" && (g += "%s", S = S.concat([X]));
5810
- var re = S.map(function(H) {
5811
- return String(H);
5810
+ var re = S.map(function(Y) {
5811
+ return String(Y);
5812
5812
  });
5813
5813
  re.unshift("Warning: " + g), Function.prototype.apply.call(console[o], console, re);
5814
5814
  }
5815
5815
  }
5816
- var te = !1, ne = !1, R = !1, p = !1, l = !1, w;
5816
+ var te = !1, ne = !1, T = !1, p = !1, l = !1, w;
5817
5817
  w = Symbol.for("react.module.reference");
5818
5818
  function v(o) {
5819
- return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || l || o === a || o === u || o === y || p || o === F || te || ne || R || typeof o == "object" && o !== null && (o.$$typeof === _ || o.$$typeof === D || o.$$typeof === i || o.$$typeof === f || o.$$typeof === c || // This needs to include all possible module reference object
5819
+ return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || l || o === a || o === u || o === y || p || o === F || te || ne || T || typeof o == "object" && o !== null && (o.$$typeof === V || o.$$typeof === D || o.$$typeof === i || o.$$typeof === f || o.$$typeof === c || // This needs to include all possible module reference object
5820
5820
  // types supported by any Flight configuration anywhere since
5821
5821
  // we don't know which Flight build this will end up being used
5822
5822
  // with.
5823
5823
  o.$$typeof === w || o.getModuleId !== void 0));
5824
5824
  }
5825
5825
  function k(o, g, S) {
5826
- var $ = o.displayName;
5827
- if ($)
5828
- return $;
5826
+ var I = o.displayName;
5827
+ if (I)
5828
+ return I;
5829
5829
  var X = g.displayName || g.name || "";
5830
5830
  return X !== "" ? S + "(" + X + ")" : S;
5831
5831
  }
5832
- function j(o) {
5832
+ function L(o) {
5833
5833
  return o.displayName || "Context";
5834
5834
  }
5835
5835
  function K(o) {
5836
5836
  if (o == null)
5837
5837
  return null;
5838
- if (typeof o.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
5838
+ if (typeof o.tag == "number" && $("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
5839
5839
  return o.displayName || o.name || null;
5840
5840
  if (typeof o == "string")
5841
5841
  return o;
@@ -5857,19 +5857,19 @@ function ja() {
5857
5857
  switch (o.$$typeof) {
5858
5858
  case f:
5859
5859
  var g = o;
5860
- return j(g) + ".Consumer";
5860
+ return L(g) + ".Consumer";
5861
5861
  case i:
5862
5862
  var S = o;
5863
- return j(S._context) + ".Provider";
5863
+ return L(S._context) + ".Provider";
5864
5864
  case c:
5865
5865
  return k(o, o.render, "ForwardRef");
5866
5866
  case D:
5867
- var $ = o.displayName || null;
5868
- return $ !== null ? $ : K(o.type) || "Memo";
5869
- case _: {
5870
- var X = o, re = X._payload, H = X._init;
5867
+ var I = o.displayName || null;
5868
+ return I !== null ? I : K(o.type) || "Memo";
5869
+ case V: {
5870
+ var X = o, re = X._payload, Y = X._init;
5871
5871
  try {
5872
- return K(H(re));
5872
+ return K(Y(re));
5873
5873
  } catch {
5874
5874
  return null;
5875
5875
  }
@@ -5878,9 +5878,9 @@ function ja() {
5878
5878
  return null;
5879
5879
  }
5880
5880
  var Q = Object.assign, ee = 0, U, Z, A, me, Fe, he, Se;
5881
- function T() {
5881
+ function R() {
5882
5882
  }
5883
- T.__reactDisabledLog = !0;
5883
+ R.__reactDisabledLog = !0;
5884
5884
  function ae() {
5885
5885
  {
5886
5886
  if (ee === 0) {
@@ -5888,7 +5888,7 @@ function ja() {
5888
5888
  var o = {
5889
5889
  configurable: !0,
5890
5890
  enumerable: !0,
5891
- value: T,
5891
+ value: R,
5892
5892
  writable: !0
5893
5893
  };
5894
5894
  Object.defineProperties(console, {
@@ -5936,18 +5936,18 @@ function ja() {
5936
5936
  })
5937
5937
  });
5938
5938
  }
5939
- ee < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
5939
+ ee < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
5940
5940
  }
5941
5941
  }
5942
5942
  var pe = q.ReactCurrentDispatcher, P;
5943
- function Ne(o, g, S) {
5943
+ function Oe(o, g, S) {
5944
5944
  {
5945
5945
  if (P === void 0)
5946
5946
  try {
5947
5947
  throw Error();
5948
5948
  } catch (X) {
5949
- var $ = X.stack.trim().match(/\n( *(at )?)/);
5950
- P = $ && $[1] || "";
5949
+ var I = X.stack.trim().match(/\n( *(at )?)/);
5950
+ P = I && I[1] || "";
5951
5951
  }
5952
5952
  return `
5953
5953
  ` + P + o;
@@ -5958,7 +5958,7 @@ function ja() {
5958
5958
  var De = typeof WeakMap == "function" ? WeakMap : Map;
5959
5959
  ye = new De();
5960
5960
  }
5961
- function Oe(o, g) {
5961
+ function Ne(o, g) {
5962
5962
  if (!o || ve)
5963
5963
  return "";
5964
5964
  {
@@ -5966,7 +5966,7 @@ function ja() {
5966
5966
  if (S !== void 0)
5967
5967
  return S;
5968
5968
  }
5969
- var $;
5969
+ var I;
5970
5970
  ve = !0;
5971
5971
  var X = Error.prepareStackTrace;
5972
5972
  Error.prepareStackTrace = void 0;
@@ -5974,40 +5974,40 @@ function ja() {
5974
5974
  re = pe.current, pe.current = null, ae();
5975
5975
  try {
5976
5976
  if (g) {
5977
- var H = function() {
5977
+ var Y = function() {
5978
5978
  throw Error();
5979
5979
  };
5980
- if (Object.defineProperty(H.prototype, "props", {
5980
+ if (Object.defineProperty(Y.prototype, "props", {
5981
5981
  set: function() {
5982
5982
  throw Error();
5983
5983
  }
5984
5984
  }), typeof Reflect == "object" && Reflect.construct) {
5985
5985
  try {
5986
- Reflect.construct(H, []);
5986
+ Reflect.construct(Y, []);
5987
5987
  } catch (ke) {
5988
- $ = ke;
5988
+ I = ke;
5989
5989
  }
5990
- Reflect.construct(o, [], H);
5990
+ Reflect.construct(o, [], Y);
5991
5991
  } else {
5992
5992
  try {
5993
- H.call();
5993
+ Y.call();
5994
5994
  } catch (ke) {
5995
- $ = ke;
5995
+ I = ke;
5996
5996
  }
5997
- o.call(H.prototype);
5997
+ o.call(Y.prototype);
5998
5998
  }
5999
5999
  } else {
6000
6000
  try {
6001
6001
  throw Error();
6002
6002
  } catch (ke) {
6003
- $ = ke;
6003
+ I = ke;
6004
6004
  }
6005
6005
  o();
6006
6006
  }
6007
6007
  } catch (ke) {
6008
- if (ke && $ && typeof ke.stack == "string") {
6008
+ if (ke && I && typeof ke.stack == "string") {
6009
6009
  for (var M = ke.stack.split(`
6010
- `), Ee = $.stack.split(`
6010
+ `), Ee = I.stack.split(`
6011
6011
  `), ie = M.length - 1, le = Ee.length - 1; ie >= 1 && le >= 0 && M[ie] !== Ee[le]; )
6012
6012
  le--;
6013
6013
  for (; ie >= 1 && le >= 0; ie--, le--)
@@ -6026,13 +6026,13 @@ function ja() {
6026
6026
  } finally {
6027
6027
  ve = !1, pe.current = re, xe(), Error.prepareStackTrace = X;
6028
6028
  }
6029
- var tr = o ? o.displayName || o.name : "", Ge = tr ? Ne(tr) : "";
6030
- return typeof o == "function" && ye.set(o, Ge), Ge;
6029
+ var tr = o ? o.displayName || o.name : "", Me = tr ? Oe(tr) : "";
6030
+ return typeof o == "function" && ye.set(o, Me), Me;
6031
6031
  }
6032
- function Ue(o, g, S) {
6033
- return Oe(o, !1);
6032
+ function qe(o, g, S) {
6033
+ return Ne(o, !1);
6034
6034
  }
6035
- function V(o) {
6035
+ function _(o) {
6036
6036
  var g = o.prototype;
6037
6037
  return !!(g && g.isReactComponent);
6038
6038
  }
@@ -6040,23 +6040,23 @@ function ja() {
6040
6040
  if (o == null)
6041
6041
  return "";
6042
6042
  if (typeof o == "function")
6043
- return Oe(o, V(o));
6043
+ return Ne(o, _(o));
6044
6044
  if (typeof o == "string")
6045
- return Ne(o);
6045
+ return Oe(o);
6046
6046
  switch (o) {
6047
6047
  case u:
6048
- return Ne("Suspense");
6048
+ return Oe("Suspense");
6049
6049
  case y:
6050
- return Ne("SuspenseList");
6050
+ return Oe("SuspenseList");
6051
6051
  }
6052
6052
  if (typeof o == "object")
6053
6053
  switch (o.$$typeof) {
6054
6054
  case c:
6055
- return Ue(o.render);
6055
+ return qe(o.render);
6056
6056
  case D:
6057
6057
  return oe(o.type, g, S);
6058
- case _: {
6059
- var $ = o, X = $._payload, re = $._init;
6058
+ case V: {
6059
+ var I = o, X = I._payload, re = I._init;
6060
6060
  try {
6061
6061
  return oe(re(X), g, S);
6062
6062
  } catch {
@@ -6065,30 +6065,30 @@ function ja() {
6065
6065
  }
6066
6066
  return "";
6067
6067
  }
6068
- var Ce = Object.prototype.hasOwnProperty, Je = {}, Me = q.ReactDebugCurrentFrame;
6069
- function Ie(o) {
6068
+ var Ce = Object.prototype.hasOwnProperty, Je = {}, Ke = q.ReactDebugCurrentFrame;
6069
+ function $e(o) {
6070
6070
  if (o) {
6071
6071
  var g = o._owner, S = oe(o.type, o._source, g ? g.type : null);
6072
- Me.setExtraStackFrame(S);
6072
+ Ke.setExtraStackFrame(S);
6073
6073
  } else
6074
- Me.setExtraStackFrame(null);
6074
+ Ke.setExtraStackFrame(null);
6075
6075
  }
6076
- function Xe(o, g, S, $, X) {
6076
+ function Xe(o, g, S, I, X) {
6077
6077
  {
6078
6078
  var re = Function.call.bind(Ce);
6079
- for (var H in o)
6080
- if (re(o, H)) {
6079
+ for (var Y in o)
6080
+ if (re(o, Y)) {
6081
6081
  var M = void 0;
6082
6082
  try {
6083
- if (typeof o[H] != "function") {
6084
- var Ee = Error(($ || "React class") + ": " + S + " type `" + H + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[H] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
6083
+ if (typeof o[Y] != "function") {
6084
+ var Ee = Error((I || "React class") + ": " + S + " type `" + Y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
6085
6085
  throw Ee.name = "Invariant Violation", Ee;
6086
6086
  }
6087
- M = o[H](g, H, $, S, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6087
+ M = o[Y](g, Y, I, S, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
6088
6088
  } catch (ie) {
6089
6089
  M = ie;
6090
6090
  }
6091
- M && !(M instanceof Error) && (Ie(X), I("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", S, H, typeof M), Ie(null)), M instanceof Error && !(M.message in Je) && (Je[M.message] = !0, Ie(X), I("Failed %s type: %s", S, M.message), Ie(null));
6091
+ M && !(M instanceof Error) && ($e(X), $("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", S, Y, typeof M), $e(null)), M instanceof Error && !(M.message in Je) && (Je[M.message] = !0, $e(X), $("Failed %s type: %s", S, M.message), $e(null));
6092
6092
  }
6093
6093
  }
6094
6094
  }
@@ -6114,7 +6114,7 @@ function ja() {
6114
6114
  }
6115
6115
  function x(o) {
6116
6116
  if (d(o))
6117
- return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", C(o)), h(o);
6117
+ return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", C(o)), h(o);
6118
6118
  }
6119
6119
  var W = q.ReactCurrentOwner, B = {
6120
6120
  key: !0,
@@ -6122,7 +6122,7 @@ function ja() {
6122
6122
  __self: !0,
6123
6123
  __source: !0
6124
6124
  }, J, se;
6125
- function ce(o) {
6125
+ function ue(o) {
6126
6126
  if (Ce.call(o, "ref")) {
6127
6127
  var g = Object.getOwnPropertyDescriptor(o, "ref").get;
6128
6128
  if (g && g.isReactWarning)
@@ -6141,10 +6141,10 @@ function ja() {
6141
6141
  function Pe(o, g) {
6142
6142
  typeof o.ref == "string" && W.current;
6143
6143
  }
6144
- function Be(o, g) {
6144
+ function Ue(o, g) {
6145
6145
  {
6146
6146
  var S = function() {
6147
- J || (J = !0, I("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
6147
+ J || (J = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
6148
6148
  };
6149
6149
  S.isReactWarning = !0, Object.defineProperty(o, "key", {
6150
6150
  get: S,
@@ -6152,10 +6152,10 @@ function ja() {
6152
6152
  });
6153
6153
  }
6154
6154
  }
6155
- function ue(o, g) {
6155
+ function de(o, g) {
6156
6156
  {
6157
6157
  var S = function() {
6158
- se || (se = !0, I("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
6158
+ se || (se = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", g));
6159
6159
  };
6160
6160
  S.isReactWarning = !0, Object.defineProperty(o, "ref", {
6161
6161
  get: S,
@@ -6163,7 +6163,7 @@ function ja() {
6163
6163
  });
6164
6164
  }
6165
6165
  }
6166
- var be = function(o, g, S, $, X, re, H) {
6166
+ var be = function(o, g, S, I, X, re, Y) {
6167
6167
  var M = {
6168
6168
  // This tag allows us to uniquely identify this as a React Element
6169
6169
  $$typeof: r,
@@ -6171,7 +6171,7 @@ function ja() {
6171
6171
  type: o,
6172
6172
  key: g,
6173
6173
  ref: S,
6174
- props: H,
6174
+ props: Y,
6175
6175
  // Record the component responsible for creating this element.
6176
6176
  _owner: re
6177
6177
  };
@@ -6184,7 +6184,7 @@ function ja() {
6184
6184
  configurable: !1,
6185
6185
  enumerable: !1,
6186
6186
  writable: !1,
6187
- value: $
6187
+ value: I
6188
6188
  }), Object.defineProperty(M, "_source", {
6189
6189
  configurable: !1,
6190
6190
  enumerable: !1,
@@ -6192,22 +6192,22 @@ function ja() {
6192
6192
  value: X
6193
6193
  }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
6194
6194
  };
6195
- function er(o, g, S, $, X) {
6195
+ function er(o, g, S, I, X) {
6196
6196
  {
6197
- var re, H = {}, M = null, Ee = null;
6198
- S !== void 0 && (x(S), M = "" + S), _e(g) && (x(g.key), M = "" + g.key), ce(g) && (Ee = g.ref, Pe(g, X));
6197
+ var re, Y = {}, M = null, Ee = null;
6198
+ S !== void 0 && (x(S), M = "" + S), _e(g) && (x(g.key), M = "" + g.key), ue(g) && (Ee = g.ref, Pe(g, X));
6199
6199
  for (re in g)
6200
- Ce.call(g, re) && !B.hasOwnProperty(re) && (H[re] = g[re]);
6200
+ Ce.call(g, re) && !B.hasOwnProperty(re) && (Y[re] = g[re]);
6201
6201
  if (o && o.defaultProps) {
6202
6202
  var ie = o.defaultProps;
6203
6203
  for (re in ie)
6204
- H[re] === void 0 && (H[re] = ie[re]);
6204
+ Y[re] === void 0 && (Y[re] = ie[re]);
6205
6205
  }
6206
6206
  if (M || Ee) {
6207
6207
  var le = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
6208
- M && Be(H, le), Ee && ue(H, le);
6208
+ M && Ue(Y, le), Ee && de(Y, le);
6209
6209
  }
6210
- return be(o, M, Ee, X, $, W.current, H);
6210
+ return be(o, M, Ee, X, I, W.current, Y);
6211
6211
  }
6212
6212
  }
6213
6213
  var fr = q.ReactCurrentOwner, wr = q.ReactDebugCurrentFrame;
@@ -6235,11 +6235,11 @@ Check the render method of \`` + o + "`.";
6235
6235
  return "";
6236
6236
  }
6237
6237
  }
6238
- function Dt(o) {
6238
+ function Ft(o) {
6239
6239
  return "";
6240
6240
  }
6241
6241
  var Vr = {};
6242
- function _t(o) {
6242
+ function Dt(o) {
6243
6243
  {
6244
6244
  var g = _r();
6245
6245
  if (!g) {
@@ -6256,34 +6256,34 @@ Check the top-level render call using <` + S + ">.");
6256
6256
  if (!o._store || o._store.validated || o.key != null)
6257
6257
  return;
6258
6258
  o._store.validated = !0;
6259
- var S = _t(g);
6259
+ var S = Dt(g);
6260
6260
  if (Vr[S])
6261
6261
  return;
6262
6262
  Vr[S] = !0;
6263
- var $ = "";
6264
- o && o._owner && o._owner !== fr.current && ($ = " It was passed a child from " + K(o._owner.type) + "."), rr(o), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', S, $), rr(null);
6263
+ var I = "";
6264
+ o && o._owner && o._owner !== fr.current && (I = " It was passed a child from " + K(o._owner.type) + "."), rr(o), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', S, I), rr(null);
6265
6265
  }
6266
6266
  }
6267
- function Ir(o, g) {
6267
+ function $r(o, g) {
6268
6268
  {
6269
6269
  if (typeof o != "object")
6270
6270
  return;
6271
6271
  if (m(o))
6272
6272
  for (var S = 0; S < o.length; S++) {
6273
- var $ = o[S];
6274
- Cr($) && Pr($, g);
6273
+ var I = o[S];
6274
+ Cr(I) && Pr(I, g);
6275
6275
  }
6276
6276
  else if (Cr(o))
6277
6277
  o._store && (o._store.validated = !0);
6278
6278
  else if (o) {
6279
- var X = G(o);
6279
+ var X = H(o);
6280
6280
  if (typeof X == "function" && X !== o.entries)
6281
- for (var re = X.call(o), H; !(H = re.next()).done; )
6282
- Cr(H.value) && Pr(H.value, g);
6281
+ for (var re = X.call(o), Y; !(Y = re.next()).done; )
6282
+ Cr(Y.value) && Pr(Y.value, g);
6283
6283
  }
6284
6284
  }
6285
6285
  }
6286
- function Vt(o) {
6286
+ function _t(o) {
6287
6287
  {
6288
6288
  var g = o.type;
6289
6289
  if (g == null || typeof g == "string")
@@ -6298,90 +6298,90 @@ Check the top-level render call using <` + S + ">.");
6298
6298
  else
6299
6299
  return;
6300
6300
  if (S) {
6301
- var $ = K(g);
6302
- Xe(S, o.props, "prop", $, o);
6301
+ var I = K(g);
6302
+ Xe(S, o.props, "prop", I, o);
6303
6303
  } else if (g.PropTypes !== void 0 && !vr) {
6304
6304
  vr = !0;
6305
6305
  var X = K(g);
6306
- I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", X || "Unknown");
6306
+ $("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", X || "Unknown");
6307
6307
  }
6308
- typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
6308
+ typeof g.getDefaultProps == "function" && !g.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
6309
6309
  }
6310
6310
  }
6311
- function Pt(o) {
6311
+ function Vt(o) {
6312
6312
  {
6313
6313
  for (var g = Object.keys(o.props), S = 0; S < g.length; S++) {
6314
- var $ = g[S];
6315
- if ($ !== "children" && $ !== "key") {
6316
- rr(o), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), rr(null);
6314
+ var I = g[S];
6315
+ if (I !== "children" && I !== "key") {
6316
+ rr(o), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), rr(null);
6317
6317
  break;
6318
6318
  }
6319
6319
  }
6320
- o.ref !== null && (rr(o), I("Invalid attribute `ref` supplied to `React.Fragment`."), rr(null));
6320
+ o.ref !== null && (rr(o), $("Invalid attribute `ref` supplied to `React.Fragment`."), rr(null));
6321
6321
  }
6322
6322
  }
6323
- var $r = {};
6324
- function jr(o, g, S, $, X, re) {
6323
+ var Ir = {};
6324
+ function Lr(o, g, S, I, X, re) {
6325
6325
  {
6326
- var H = v(o);
6327
- if (!H) {
6326
+ var Y = v(o);
6327
+ if (!Y) {
6328
6328
  var M = "";
6329
6329
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
6330
- var Ee = Dt();
6330
+ var Ee = Ft();
6331
6331
  Ee ? M += Ee : M += _r();
6332
6332
  var ie;
6333
- o === null ? ie = "null" : m(o) ? ie = "array" : o !== void 0 && o.$$typeof === r ? (ie = "<" + (K(o.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof o, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, M);
6333
+ o === null ? ie = "null" : m(o) ? ie = "array" : o !== void 0 && o.$$typeof === r ? (ie = "<" + (K(o.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof o, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, M);
6334
6334
  }
6335
6335
  var le = er(o, g, S, X, re);
6336
6336
  if (le == null)
6337
6337
  return le;
6338
- if (H) {
6338
+ if (Y) {
6339
6339
  var Ve = g.children;
6340
6340
  if (Ve !== void 0)
6341
- if ($)
6341
+ if (I)
6342
6342
  if (m(Ve)) {
6343
6343
  for (var tr = 0; tr < Ve.length; tr++)
6344
- Ir(Ve[tr], o);
6344
+ $r(Ve[tr], o);
6345
6345
  Object.freeze && Object.freeze(Ve);
6346
6346
  } else
6347
- I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
6347
+ $("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
6348
6348
  else
6349
- Ir(Ve, o);
6349
+ $r(Ve, o);
6350
6350
  }
6351
6351
  if (Ce.call(g, "key")) {
6352
- var Ge = K(o), ke = Object.keys(g).filter(function(Ut) {
6353
- return Ut !== "key";
6352
+ var Me = K(o), ke = Object.keys(g).filter(function(qt) {
6353
+ return qt !== "key";
6354
6354
  }), Er = ke.length > 0 ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}";
6355
- if (!$r[Ge + Er]) {
6356
- var qt = ke.length > 0 ? "{" + ke.join(": ..., ") + ": ...}" : "{}";
6357
- I(`A props object containing a "key" prop is being spread into JSX:
6355
+ if (!Ir[Me + Er]) {
6356
+ var jt = ke.length > 0 ? "{" + ke.join(": ..., ") + ": ...}" : "{}";
6357
+ $(`A props object containing a "key" prop is being spread into JSX:
6358
6358
  let props = %s;
6359
6359
  <%s {...props} />
6360
6360
  React keys must be passed directly to JSX without using spread:
6361
6361
  let props = %s;
6362
- <%s key={someKey} {...props} />`, Er, Ge, qt, Ge), $r[Ge + Er] = !0;
6362
+ <%s key={someKey} {...props} />`, Er, Me, jt, Me), Ir[Me + Er] = !0;
6363
6363
  }
6364
6364
  }
6365
- return o === n ? Pt(le) : Vt(le), le;
6365
+ return o === n ? Vt(le) : _t(le), le;
6366
6366
  }
6367
6367
  }
6368
- function It(o, g, S) {
6369
- return jr(o, g, S, !0);
6368
+ function Pt(o, g, S) {
6369
+ return Lr(o, g, S, !0);
6370
6370
  }
6371
6371
  function $t(o, g, S) {
6372
- return jr(o, g, S, !1);
6372
+ return Lr(o, g, S, !1);
6373
6373
  }
6374
- var jt = $t, Lt = It;
6375
- ur.Fragment = n, ur.jsx = jt, ur.jsxs = Lt;
6374
+ var It = $t, Lt = Pt;
6375
+ ur.Fragment = n, ur.jsx = It, ur.jsxs = Lt;
6376
6376
  }()), ur;
6377
6377
  }
6378
- process.env.NODE_ENV === "production" ? Tr.exports = $a() : Tr.exports = ja();
6379
- var Ae = Tr.exports;
6378
+ process.env.NODE_ENV === "production" ? Rr.exports = $a() : Rr.exports = Ia();
6379
+ var Ae = Rr.exports;
6380
6380
  const La = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6381
6381
  "div",
6382
6382
  {
6383
6383
  ref: t,
6384
- className: qe(
6384
+ className: je(
6385
6385
  "flex h-full flex-grow items-start gap-x-4 overflow-x-auto py-2",
6386
6386
  e
6387
6387
  ),
@@ -6389,85 +6389,85 @@ const La = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6389
6389
  }
6390
6390
  ));
6391
6391
  La.displayName = "Kanban";
6392
- const qa = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6392
+ const ja = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6393
6393
  "div",
6394
6394
  {
6395
6395
  ref: t,
6396
- className: qe(
6396
+ className: je(
6397
6397
  "flex h-full min-w-[300px] flex-col rounded-lg border bg-gray-50 p-3",
6398
6398
  e
6399
6399
  ),
6400
6400
  ...r
6401
6401
  }
6402
6402
  ));
6403
- qa.displayName = "KanbanColumn";
6404
- const Ua = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6403
+ ja.displayName = "KanbanColumn";
6404
+ const qa = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6405
6405
  "div",
6406
6406
  {
6407
6407
  ref: t,
6408
- className: qe("mb-3 flex items-center justify-between", e),
6408
+ className: je("mb-3 flex items-center justify-between", e),
6409
6409
  ...r
6410
6410
  }
6411
6411
  ));
6412
- Ua.displayName = "KanbanColumnHeader";
6413
- const Ba = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6412
+ qa.displayName = "KanbanColumnHeader";
6413
+ const Ua = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6414
6414
  "h3",
6415
6415
  {
6416
6416
  ref: t,
6417
- className: qe("text-sm font-semibold text-gray-700", e),
6417
+ className: je("text-sm font-semibold text-gray-700", e),
6418
6418
  ...r
6419
6419
  }
6420
6420
  ));
6421
- Ba.displayName = "KanbanColumnTitle";
6422
- const za = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6421
+ Ua.displayName = "KanbanColumnTitle";
6422
+ const Ba = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6423
6423
  "div",
6424
6424
  {
6425
6425
  ref: t,
6426
- className: qe("flex-1 space-y-2 overflow-y-auto", e),
6426
+ className: je("flex-1 space-y-2 overflow-y-auto", e),
6427
6427
  ...r
6428
6428
  }
6429
6429
  ));
6430
- za.displayName = "KanbanColumnContent";
6431
- const Ka = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6430
+ Ba.displayName = "KanbanColumnContent";
6431
+ const za = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6432
6432
  "div",
6433
6433
  {
6434
6434
  ref: t,
6435
- className: qe(
6435
+ className: je(
6436
6436
  "rounded-lg border border-gray-200 bg-white p-3 shadow-sm hover:shadow-md transition-shadow cursor-move",
6437
6437
  e
6438
6438
  ),
6439
6439
  ...r
6440
6440
  }
6441
6441
  ));
6442
- Ka.displayName = "KanbanCard";
6443
- const Ma = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6442
+ za.displayName = "KanbanCard";
6443
+ const Ka = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6444
6444
  "div",
6445
6445
  {
6446
6446
  ref: t,
6447
- className: qe("font-medium text-gray-900 mb-1", e),
6447
+ className: je("font-medium text-gray-900 mb-1", e),
6448
6448
  ...r
6449
6449
  }
6450
6450
  ));
6451
- Ma.displayName = "KanbanCardTitle";
6452
- const Ga = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6451
+ Ka.displayName = "KanbanCardTitle";
6452
+ const Ma = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6453
6453
  "div",
6454
6454
  {
6455
6455
  ref: t,
6456
- className: qe("text-sm text-gray-600", e),
6456
+ className: je("text-sm text-gray-600", e),
6457
6457
  ...r
6458
6458
  }
6459
6459
  ));
6460
- Ga.displayName = "KanbanCardDescription";
6461
- const Ha = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6460
+ Ma.displayName = "KanbanCardDescription";
6461
+ const Ga = Le.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ Ae.jsx(
6462
6462
  "div",
6463
6463
  {
6464
6464
  ref: t,
6465
- className: qe("mt-3 pt-3 border-t border-gray-200", e),
6465
+ className: je("mt-3 pt-3 border-t border-gray-200", e),
6466
6466
  ...r
6467
6467
  }
6468
6468
  ));
6469
- Ha.displayName = "KanbanColumnFooter";
6470
- const Rt = {
6469
+ Ga.displayName = "KanbanColumnFooter";
6470
+ const Ha = {
6471
6471
  sessionEndpoint: "/api/id",
6472
6472
  providers: {
6473
6473
  google: {
@@ -6476,48 +6476,44 @@ const Rt = {
6476
6476
  }
6477
6477
  },
6478
6478
  defaultProvider: "google",
6479
- autoRedirect: !0,
6479
+ autoRedirect: !1,
6480
6480
  sessionCheckInterval: 0,
6481
6481
  retry: {
6482
6482
  count: 3,
6483
6483
  delay: 1e3
6484
6484
  },
6485
- staleTime: 5 * 60 * 1e3
6485
+ staleTime: 5 * 60 * 1e3,
6486
+ refetchOnWindowFocus: !1,
6487
+ refetchOnReconnect: !0
6486
6488
  };
6487
- let je = { ...Rt };
6489
+ let Qe = { ...Ha };
6488
6490
  function Ya(e) {
6489
- je = {
6490
- ...je,
6491
+ Qe = {
6492
+ ...Qe,
6491
6493
  ...e,
6492
6494
  providers: {
6493
- ...je.providers,
6495
+ ...Qe.providers,
6494
6496
  ...e.providers
6495
6497
  },
6496
6498
  retry: {
6497
- ...je.retry,
6499
+ ...Qe.retry,
6498
6500
  ...e.retry
6499
6501
  }
6500
6502
  };
6501
6503
  }
6502
- function Co(e, r) {
6503
- je.providers[e] = r;
6504
- }
6505
6504
  function br() {
6506
- return { ...je };
6505
+ return { ...Qe };
6507
6506
  }
6508
6507
  function Dr() {
6509
- return je.baseUrl || Ar();
6510
- }
6511
- function At(e) {
6512
- return je.providers[e];
6508
+ return Qe.baseUrl || Ar() || (typeof window < "u" ? window.location.origin : "");
6513
6509
  }
6514
- function Eo() {
6515
- je = { ...Rt };
6510
+ function Tt(e) {
6511
+ return Qe.providers[e];
6516
6512
  }
6517
- class Rr extends Error {
6513
+ class Tr extends Error {
6518
6514
  constructor(t, n) {
6519
6515
  super(t);
6520
- He(this, "statusCode");
6516
+ Ge(this, "statusCode");
6521
6517
  this.name = "AuthenticationError", this.statusCode = n;
6522
6518
  }
6523
6519
  }
@@ -6528,26 +6524,48 @@ async function Qa() {
6528
6524
  credentials: "include"
6529
6525
  });
6530
6526
  if (!n.ok)
6531
- throw n.status === 401 || n.status === 403 ? new Rr("Not authenticated", n.status) : new Rr(
6527
+ throw n.status === 401 || n.status === 403 ? new Tr("Not authenticated", n.status) : new Tr(
6532
6528
  `Session check failed: ${n.statusText}`,
6533
6529
  n.status
6534
6530
  );
6535
6531
  return await n.json();
6536
6532
  }
6537
6533
  function Zr(e, r) {
6538
- const t = br(), n = Dr(), a = e || t.defaultProvider, s = At(a);
6539
- if (!s)
6540
- throw new Error(`Auth provider "${a}" is not configured`);
6541
- const i = new URL(`${n}${s.loginPath}`);
6542
- (r != null && r.callbackUrl || t.callbackUrl) && i.searchParams.set(
6543
- "callbackUrl",
6544
- (r == null ? void 0 : r.callbackUrl) || t.callbackUrl || window.location.href
6545
- ), r != null && r.params && Object.entries(r.params).forEach(([f, c]) => {
6546
- i.searchParams.set(f, c);
6547
- }), window.location.href = i.toString();
6534
+ return new Promise(() => {
6535
+ const t = br(), n = Dr();
6536
+ if (!n)
6537
+ throw new Error(
6538
+ 'Auth base URL is not configured. Call setApiBaseUrl("https://...") or configureAuth({ baseUrl: "https://..." }) first.'
6539
+ );
6540
+ const a = e || t.defaultProvider, s = Tt(a);
6541
+ if (!s) {
6542
+ const f = Object.keys(t.providers || {}).join(", ") || "none";
6543
+ throw new Error(
6544
+ `Auth provider "${a}" is not configured. Available providers: ${f}`
6545
+ );
6546
+ }
6547
+ if (!s.loginPath)
6548
+ throw new Error(
6549
+ `Login path not configured for provider "${a}". Configure it with: configureAuth({ providers: { ${a}: { loginPath: '/api/auth/...' } } })`
6550
+ );
6551
+ let i;
6552
+ try {
6553
+ i = new URL(`${n}${s.loginPath}`);
6554
+ } catch {
6555
+ throw new Error(
6556
+ `Failed to construct login URL. Base URL: "${n}", Login path: "${s.loginPath}". Ensure baseUrl is a valid URL (e.g., "https://example.com").`
6557
+ );
6558
+ }
6559
+ (r != null && r.callbackUrl || t.callbackUrl) && i.searchParams.set(
6560
+ "callbackUrl",
6561
+ (r == null ? void 0 : r.callbackUrl) || t.callbackUrl || window.location.href
6562
+ ), r != null && r.params && Object.entries(r.params).forEach(([f, c]) => {
6563
+ i.searchParams.set(f, c);
6564
+ }), window.location.href = i.toString();
6565
+ });
6548
6566
  }
6549
6567
  async function Wa(e) {
6550
- const r = br(), t = Dr(), n = yr(), a = At(r.defaultProvider), s = a == null ? void 0 : a.logoutPath;
6568
+ const r = br(), t = Dr(), n = yr(), a = Tt(r.defaultProvider), s = a == null ? void 0 : a.logoutPath;
6551
6569
  if (s && (e == null ? void 0 : e.callLogoutEndpoint) !== !1)
6552
6570
  try {
6553
6571
  await fetch(`${t}${s}`, {
@@ -6560,8 +6578,8 @@ async function Wa(e) {
6560
6578
  }
6561
6579
  e != null && e.redirectUrl ? window.location.href = e.redirectUrl : r.loginRedirectUrl && (window.location.href = r.loginRedirectUrl);
6562
6580
  }
6563
- const Ft = tt(null), et = ["auth", "session"];
6564
- function So({
6581
+ const At = tt(null), et = ["auth", "session"];
6582
+ function Co({
6565
6583
  children: e,
6566
6584
  config: r,
6567
6585
  onAuthChange: t,
@@ -6575,29 +6593,30 @@ function So({
6575
6593
  const c = nt(), u = br(), {
6576
6594
  data: y,
6577
6595
  isLoading: D,
6578
- error: _,
6596
+ error: V,
6579
6597
  refetch: F,
6580
- isFetching: Y
6598
+ isFetching: G
6581
6599
  } = ar({
6582
6600
  queryKey: et,
6583
6601
  queryFn: Qa,
6584
6602
  enabled: !i,
6585
- retry: (U, Z) => Z instanceof Rr && (Z.statusCode === 401 || Z.statusCode === 403) ? !1 : U < u.retry.count,
6603
+ retry: (U, Z) => Z instanceof Tr && (Z.statusCode === 401 || Z.statusCode === 403) ? !1 : U < u.retry.count,
6586
6604
  retryDelay: u.retry.delay,
6587
6605
  staleTime: u.staleTime,
6588
6606
  gcTime: u.staleTime * 2,
6589
- refetchOnWindowFocus: !0,
6607
+ refetchOnWindowFocus: u.refetchOnWindowFocus ?? !0,
6608
+ refetchOnReconnect: u.refetchOnReconnect ?? !0,
6590
6609
  refetchInterval: u.sessionCheckInterval || !1
6591
- }), [b, G] = we(null), q = fe(() => D || Y ? "loading" : y != null && y.userDetails ? "authenticated" : "unauthenticated", [D, Y, y]), I = (y == null ? void 0 : y.userDetails) || null, L = (y == null ? void 0 : y.staticBaseUrl) || null, te = (y == null ? void 0 : y.buildId) || null, ne = q === "authenticated", R = ge(t);
6592
- R.current = t;
6610
+ }), [b, H] = we(null), q = ce(() => D || G ? "loading" : y != null && y.userDetails ? "authenticated" : "unauthenticated", [D, G, y]), $ = (y == null ? void 0 : y.userDetails) || null, j = (y == null ? void 0 : y.staticBaseUrl) || null, te = (y == null ? void 0 : y.buildId) || null, ne = q === "authenticated", T = ge(t);
6611
+ T.current = t;
6593
6612
  const p = ge(n);
6594
- p.current = n, Te(() => {
6613
+ p.current = n, Re(() => {
6595
6614
  var U;
6596
- D || (U = R.current) == null || U.call(R, q, I);
6597
- }, [q, I, D]), Te(() => {
6615
+ D || (U = T.current) == null || U.call(T, q, $);
6616
+ }, [q, $, D]), Re(() => {
6598
6617
  var U;
6599
- _ && (G(_), (U = p.current) == null || U.call(p, _));
6600
- }, [_]), Te(() => {
6618
+ V && (H(V), (U = p.current) == null || U.call(p, V));
6619
+ }, [V]), Re(() => {
6601
6620
  q === "unauthenticated" && u.autoRedirect && !D && Zr();
6602
6621
  }, [q, D, u.autoRedirect]);
6603
6622
  const l = E(
@@ -6611,25 +6630,27 @@ function So({
6611
6630
  },
6612
6631
  [c]
6613
6632
  ), v = E(async () => {
6633
+ if (G)
6634
+ return y || null;
6614
6635
  try {
6615
6636
  return (await F()).data || null;
6616
6637
  } catch (U) {
6617
- return G(U), null;
6638
+ return H(U), null;
6618
6639
  }
6619
- }, [F]), k = E(
6620
- (U) => (I == null ? void 0 : I.Role) === U,
6621
- [I]
6622
- ), j = E(
6623
- (U) => U.includes((I == null ? void 0 : I.Role) || ""),
6624
- [I]
6640
+ }, [F, G, y]), k = E(
6641
+ (U) => ($ == null ? void 0 : $.Role) === U,
6642
+ [$]
6643
+ ), L = E(
6644
+ (U) => U.includes(($ == null ? void 0 : $.Role) || ""),
6645
+ [$]
6625
6646
  ), K = E(() => {
6626
- G(null);
6647
+ H(null);
6627
6648
  }, []), Q = E(() => {
6628
6649
  F();
6629
- }, [F]), ee = fe(
6650
+ }, [F]), ee = ce(
6630
6651
  () => ({
6631
- user: I,
6632
- staticBaseUrl: L,
6652
+ user: $,
6653
+ staticBaseUrl: j,
6633
6654
  buildId: te,
6634
6655
  status: q,
6635
6656
  isAuthenticated: ne,
@@ -6638,14 +6659,14 @@ function So({
6638
6659
  logout: w,
6639
6660
  refreshSession: v,
6640
6661
  hasRole: k,
6641
- hasAnyRole: j,
6662
+ hasAnyRole: L,
6642
6663
  error: b,
6643
6664
  clearError: K,
6644
6665
  _forceCheck: Q
6645
6666
  }),
6646
6667
  [
6647
- I,
6648
- L,
6668
+ $,
6669
+ j,
6649
6670
  te,
6650
6671
  q,
6651
6672
  ne,
@@ -6654,113 +6675,108 @@ function So({
6654
6675
  w,
6655
6676
  v,
6656
6677
  k,
6657
- j,
6678
+ L,
6658
6679
  b,
6659
6680
  K,
6660
6681
  Q
6661
6682
  ]
6662
6683
  );
6663
- return q === "loading" && a ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: a }) : q === "unauthenticated" && !u.autoRedirect && s ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: s }) : /* @__PURE__ */ Ae.jsx(Ft.Provider, { value: ee, children: e });
6684
+ return q === "loading" && a ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: a }) : q === "unauthenticated" && !u.autoRedirect && s ? /* @__PURE__ */ Ae.jsx(Ae.Fragment, { children: s }) : /* @__PURE__ */ Ae.jsx(At.Provider, { value: ee, children: e });
6664
6685
  }
6665
6686
  function Ja() {
6666
- const e = Kt(Ft);
6687
+ const e = zt(At);
6667
6688
  if (!e)
6668
6689
  throw new Error("useAuth must be used within an AuthProvider");
6669
6690
  return e;
6670
6691
  }
6671
- function xo() {
6672
- const e = Ja(), {
6673
- user: r,
6674
- staticBaseUrl: t,
6675
- buildId: n,
6676
- status: a,
6677
- isAuthenticated: s,
6678
- isLoading: i,
6679
- login: f,
6680
- logout: c,
6681
- refreshSession: u,
6682
- hasRole: y,
6683
- hasAnyRole: D,
6684
- error: _,
6685
- clearError: F
6686
- } = e;
6687
- return {
6688
- user: r,
6689
- staticBaseUrl: t,
6690
- buildId: n,
6691
- status: a,
6692
- isAuthenticated: s,
6693
- isLoading: i,
6694
- login: f,
6695
- logout: c,
6696
- refreshSession: u,
6697
- hasRole: y,
6698
- hasAnyRole: D,
6699
- error: _,
6700
- clearError: F
6701
- };
6692
+ function Eo() {
6693
+ const e = Ja();
6694
+ return ce(
6695
+ () => ({
6696
+ user: e.user,
6697
+ staticBaseUrl: e.staticBaseUrl,
6698
+ buildId: e.buildId,
6699
+ status: e.status,
6700
+ isAuthenticated: e.isAuthenticated,
6701
+ isLoading: e.isLoading,
6702
+ login: e.login,
6703
+ logout: e.logout,
6704
+ refreshSession: e.refreshSession,
6705
+ hasRole: e.hasRole,
6706
+ hasAnyRole: e.hasAnyRole,
6707
+ error: e.error,
6708
+ clearError: e.clearError
6709
+ }),
6710
+ [
6711
+ e.user,
6712
+ e.staticBaseUrl,
6713
+ e.buildId,
6714
+ e.status,
6715
+ e.isAuthenticated,
6716
+ e.isLoading,
6717
+ e.login,
6718
+ e.logout,
6719
+ e.refreshSession,
6720
+ e.hasRole,
6721
+ e.hasAnyRole,
6722
+ e.error,
6723
+ e.clearError
6724
+ ]
6725
+ );
6702
6726
  }
6703
6727
  export {
6704
- So as AuthProvider,
6705
- Rr as AuthenticationError,
6728
+ Co as AuthProvider,
6729
+ Tr as AuthenticationError,
6706
6730
  La as Kanban,
6707
- Ka as KanbanCard,
6708
- Ga as KanbanCardDescription,
6709
- Ma as KanbanCardTitle,
6710
- qa as KanbanColumn,
6711
- za as KanbanColumnContent,
6712
- Ha as KanbanColumnFooter,
6713
- Ua as KanbanColumnHeader,
6714
- Ba as KanbanColumnTitle,
6715
- Re as api,
6731
+ za as KanbanCard,
6732
+ Ma as KanbanCardDescription,
6733
+ Ka as KanbanCardTitle,
6734
+ ja as KanbanColumn,
6735
+ Ba as KanbanColumnContent,
6736
+ Ga as KanbanColumnFooter,
6737
+ qa as KanbanColumnHeader,
6738
+ Ua as KanbanColumnTitle,
6739
+ Te as api,
6716
6740
  yo as areFilterPayloadsEqual,
6717
- ra as buildFilterPayload,
6741
+ ea as buildFilterPayload,
6718
6742
  po as buildFilterPayloadFromState,
6719
- ta as cloneFilterPayload,
6720
- qe as cn,
6721
- Ya as configureAuth,
6743
+ ra as cloneFilterPayload,
6744
+ je as cn,
6722
6745
  mo as createFieldDefinitionsFromSample,
6723
6746
  io as decodeDate,
6724
6747
  oo as decodeDatetime,
6725
6748
  so as encodeDate,
6726
6749
  ao as encodeDatetime,
6727
- Qa as fetchSession,
6728
6750
  ho as filterPayloadToString,
6729
- en as formatArray,
6730
- rn as formatBoolean,
6731
- Qt as formatCurrency,
6732
- Wt as formatDate,
6733
- Jt as formatDateTime,
6751
+ Zt as formatArray,
6752
+ en as formatBoolean,
6753
+ Yt as formatCurrency,
6754
+ Qt as formatDate,
6755
+ Wt as formatDateTime,
6734
6756
  fo as formatFieldValue,
6735
- Zt as formatJSON,
6736
- Xt as formatNumber,
6737
- tn as formatTextArea,
6757
+ Xt as formatJSON,
6758
+ Jt as formatNumber,
6759
+ rn as formatTextArea,
6738
6760
  Ar as getApiBaseUrl,
6739
- Dr as getAuthBaseUrl,
6740
- br as getAuthConfig,
6741
- Yt as getBdoSchema,
6742
- Qe as getDefaultFieldDefinition,
6761
+ Ht as getBdoSchema,
6762
+ Ye as getDefaultFieldDefinition,
6743
6763
  yr as getDefaultHeaders,
6744
- Zr as initiateLogin,
6745
6764
  lo as listMetadata,
6746
6765
  go as mergeFilterPayloads,
6747
6766
  co as parseCurrency,
6748
- Wa as performLogout,
6749
- Eo as resetAuthConfig,
6750
6767
  to as setApiBaseUrl,
6751
- Co as setAuthProvider,
6752
6768
  no as setDefaultHeaders,
6753
6769
  uo as truncateString,
6754
- xo as useAuth,
6770
+ Eo as useAuth,
6755
6771
  vt as useFilter,
6756
6772
  wo as useForm,
6757
6773
  vo as useKanban,
6758
6774
  bo as useTable,
6759
- Zn as validateBooleanValue,
6760
- Jn as validateCurrencyValue,
6761
- Wn as validateDateValue,
6775
+ Xn as validateBooleanValue,
6776
+ Wn as validateCurrencyValue,
6777
+ Qn as validateDateValue,
6762
6778
  Et as validateFilterPayload,
6763
- Qn as validateNumberValue,
6764
- ea as validateSelectValue,
6765
- Xn as validateStringValue
6779
+ Yn as validateNumberValue,
6780
+ Zn as validateSelectValue,
6781
+ Jn as validateStringValue
6766
6782
  };