@tempots/beatui 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{2019-DJeW9RI7.cjs → 2019-B1QESOSc.cjs} +1 -1
  2. package/dist/{2019-Dmseo7Cq.js → 2019-RaU4YQ5c.js} +2 -2
  3. package/dist/{2020-I1mnGGtD.js → 2020-BAomdSE8.js} +2 -2
  4. package/dist/{2020-BySxLQc5.cjs → 2020-BI-SxTSK.cjs} +1 -1
  5. package/dist/auth/index.cjs.js +1 -1
  6. package/dist/auth/index.es.js +2 -2
  7. package/dist/beatui.css +398 -10
  8. package/dist/beatui.tailwind.css +398 -10
  9. package/dist/{index-CBc0q0zl.cjs → index-BKjL6RO2.cjs} +2 -2
  10. package/dist/{index-D-CBfcZj.js → index-BS0NyhvV.js} +192 -189
  11. package/dist/{index-Ct2_ulan.cjs → index-BzApzJXc.cjs} +1 -1
  12. package/dist/{index-DbQzJti7.js → index-Dc9UNC8n.js} +1 -1
  13. package/dist/index.cjs.js +2 -2
  14. package/dist/index.es.js +1462 -1332
  15. package/dist/json-schema/index.cjs.js +1 -1
  16. package/dist/json-schema/index.es.js +1 -1
  17. package/dist/{modal-Dm61yY5i.js → modal-CxG-RO9B.js} +1 -1
  18. package/dist/{modal-AFhB4rIq.cjs → modal-OMSAbIg1.cjs} +1 -1
  19. package/dist/notice-0Xhzr7qR.cjs +2 -0
  20. package/dist/{notice-Cd9ElXwb.js → notice-C7o5d8Jw.js} +390 -375
  21. package/dist/types/components/data/index.d.ts +1 -0
  22. package/dist/types/components/data/table.d.ts +27 -0
  23. package/dist/types/components/form/input/input-wrapper.d.ts +4 -2
  24. package/dist/types/components/form/input/switch.d.ts +4 -3
  25. package/dist/types/components/layout/action-card.d.ts +19 -0
  26. package/dist/types/components/layout/index.d.ts +1 -0
  27. package/dist/utils-BcIRhDH0.cjs +1 -0
  28. package/dist/{utils-g5YCiiS6.js → utils-C7619Rp3.js} +392 -398
  29. package/package.json +1 -1
  30. package/dist/notice-len8sDjL.cjs +0 -2
  31. package/dist/utils-BetBqtiV.cjs +0 -1
@@ -1,9 +1,9 @@
1
- import { Use as N, coalesce as R, aria as x, attr as o, html as b, on as D, Value as C, Empty as w, computedOf as _, When as V, dataAttr as q, input as Z, emitValue as M, prop as I, Fragment as F, emitValueAsNumber as ee, Unless as se, Ensure as te } from "@tempots/dom";
2
- import { a as L, B as ne, I as P, b as z, C as W } from "./translations-iam7PITs.js";
3
- const H = /* @__PURE__ */ new Map();
4
- function K(e) {
5
- const s = H.get(e) ?? 0;
6
- return H.set(e, s + 1), `${e}-${s}`;
1
+ import { Use as j, coalesce as G, aria as P, attr as o, html as b, on as I, Value as C, Empty as _, computedOf as w, When as O, dataAttr as H, input as se, emitValue as $, prop as T, Fragment as B, emitValueAsNumber as te, Unless as ne, Ensure as ie } from "@tempots/dom";
2
+ import { a as q, B as re, I as N, b as U, C as J } from "./translations-iam7PITs.js";
3
+ const R = /* @__PURE__ */ new Map();
4
+ function Q(e) {
5
+ const s = R.get(e) ?? 0;
6
+ return R.set(e, s + 1), `${e}-${s}`;
7
7
  }
8
8
  const k = {
9
9
  /**
@@ -196,7 +196,7 @@ const k = {
196
196
  return k.failure(s instanceof Error ? s : new Error(String(s)));
197
197
  }
198
198
  }
199
- }, $ = (e, s) => e === s || e !== e && s !== s, S = {
199
+ }, F = (e, s) => e === s || e !== e && s !== s, D = {
200
200
  /**
201
201
  * Creates a valid `Validation`.
202
202
  * @returns A `Validation` that is `Valid`.
@@ -234,14 +234,14 @@ const k = {
234
234
  * @param invalid - The mapping function for an invalid value.
235
235
  * @returns The mapped value.
236
236
  */
237
- match: (e, s, t) => S.isValid(e) ? s() : t(e.error),
237
+ match: (e, s, t) => D.isValid(e) ? s() : t(e.error),
238
238
  /**
239
239
  * Maps the value of a `Validation` to a new `Validation`.
240
240
  * @param validation - The `Validation` to map.
241
241
  * @param value - The value to map.
242
242
  * @returns A new `Validation` with the mapped value.
243
243
  */
244
- toResult: (e, s) => S.match(
244
+ toResult: (e, s) => D.match(
245
245
  e,
246
246
  () => m.success(s),
247
247
  (t) => m.failure(t)
@@ -253,7 +253,7 @@ const k = {
253
253
  * @param apply - The function to execute when the `Validation` is valid.
254
254
  * @returns The `Validation` object.
255
255
  */
256
- whenValid: (e, s) => (S.isValid(e) && s(), e),
256
+ whenValid: (e, s) => (D.isValid(e) && s(), e),
257
257
  /**
258
258
  * Execute a function when the `Validation` is invalid.
259
259
  *
@@ -261,7 +261,7 @@ const k = {
261
261
  * @param apply - The function to execute when the `Validation` is invalid.
262
262
  * @returns The `Validation` object.
263
263
  */
264
- whenInvalid: (e, s) => (S.isInvalid(e) && s(e.error), e)
264
+ whenInvalid: (e, s) => (D.isInvalid(e) && s(e.error), e)
265
265
  }, m = {
266
266
  /**
267
267
  * Creates a successful `Result`.
@@ -321,8 +321,8 @@ const k = {
321
321
  toValidation(e) {
322
322
  return m.match(
323
323
  e,
324
- () => S.valid,
325
- (s) => S.invalid(s)
324
+ () => D.valid,
325
+ (s) => D.invalid(s)
326
326
  );
327
327
  },
328
328
  /**
@@ -420,14 +420,14 @@ const k = {
420
420
  e,
421
421
  (n) => m.match(
422
422
  s,
423
- (a) => m.success(t(n, a)),
424
- (a) => m.failure(a)
423
+ (r) => m.success(t(n, r)),
424
+ (r) => m.failure(r)
425
425
  ),
426
426
  (n) => m.match(
427
427
  s,
428
428
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
429
- (a) => m.failure(n),
430
- (a) => m.failure(i(n, a))
429
+ (r) => m.failure(n),
430
+ (r) => m.failure(i(n, r))
431
431
  )
432
432
  ),
433
433
  /**
@@ -456,55 +456,55 @@ const k = {
456
456
  return m.success(s);
457
457
  }
458
458
  };
459
- function ie({
459
+ function ae({
460
460
  size: e = "sm",
461
461
  icon: s = "line-md:close",
462
462
  disabled: t,
463
463
  roundedness: i = "full",
464
464
  color: n = "base",
465
- onClick: a,
466
- label: r
465
+ onClick: r,
466
+ label: a
467
467
  }, ...l) {
468
- return N(L, (c) => {
469
- const f = R(r, c.$.closeModal);
470
- return ne(
468
+ return j(q, (c) => {
469
+ const p = G(a, c.$.closeModal);
470
+ return re(
471
471
  {
472
472
  variant: "text",
473
473
  size: e,
474
474
  roundedness: i,
475
475
  disabled: t,
476
476
  color: n,
477
- onClick: a
477
+ onClick: r
478
478
  },
479
- o.title(f),
480
- x.label(f),
479
+ o.title(p),
480
+ P.label(p),
481
481
  ...l,
482
- P({ icon: s, size: e ?? "sm" })
482
+ N({ icon: s, size: e ?? "sm" })
483
483
  );
484
484
  });
485
485
  }
486
- function j(e) {
486
+ function z(e) {
487
487
  return `bc-label bc-label--${e}`;
488
488
  }
489
- const De = (...e) => b.span(o.class(j("emphasis")), ...e), ae = (...e) => b.span(o.class(j("default")), ...e), re = (...e) => b.span(o.class(j("muted")), ...e), Ee = (...e) => b.span(o.class(j("danger")), ...e), Te = (e) => {
489
+ const Ie = (...e) => b.span(o.class(z("emphasis")), ...e), le = (...e) => b.span(o.class(z("default")), ...e), ce = (...e) => b.span(o.class(z("muted")), ...e), Te = (...e) => b.span(o.class(z("danger")), ...e), Ae = (e) => {
490
490
  const {
491
491
  value: s,
492
492
  onBlur: t,
493
493
  onChange: i,
494
494
  placeholder: n,
495
- disabled: a,
496
- id: r,
495
+ disabled: r,
496
+ id: a,
497
497
  checkedIcon: l,
498
498
  uncheckedIcon: c,
499
- iconSize: f = "lg"
500
- } = e, u = r ?? K("checkbox"), g = `${u}-label`, y = () => {
501
- if (C.get(a ?? !1)) return;
502
- const h = C.get(s);
503
- i?.(!h);
504
- }, v = (h) => {
505
- C.get(a ?? !1) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), y());
499
+ iconSize: p = "lg"
500
+ } = e, u = a ?? Q("checkbox"), g = `${u}-label`, S = () => {
501
+ if (C.get(r ?? !1)) return;
502
+ const d = C.get(s);
503
+ i?.(!d);
504
+ }, v = (d) => {
505
+ C.get(r ?? !1) || (d.key === " " || d.key === "Enter") && (d.preventDefault(), S());
506
506
  };
507
- return z(
507
+ return U(
508
508
  {
509
509
  baseContainer: !0,
510
510
  growInput: !1,
@@ -516,79 +516,97 @@ const De = (...e) => b.span(o.class(j("emphasis")), ...e), ae = (...e) => b.span
516
516
  o.class(
517
517
  C.map(
518
518
  s,
519
- (h) => h ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
519
+ (d) => d ? "bc-checkbox-input__checkbox--checked" : "bc-checkbox-input__checkbox--unchecked"
520
520
  )
521
521
  ),
522
522
  o.class(
523
523
  C.map(
524
- a ?? !1,
525
- (h) => h ? "bc-checkbox-input__checkbox--disabled" : ""
524
+ r ?? !1,
525
+ (d) => d ? "bc-checkbox-input__checkbox--disabled" : ""
526
526
  )
527
527
  ),
528
528
  o.id(u),
529
529
  o.role("checkbox"),
530
530
  o.tabindex(
531
531
  C.map(
532
- a ?? !1,
533
- (h) => h ? -1 : 0
532
+ r ?? !1,
533
+ (d) => d ? -1 : 0
534
534
  )
535
535
  ),
536
- x.checked(s),
537
- x.disabled(a),
538
- n != null ? x.labelledby(g) : w,
539
- D.keydown(v),
540
- t != null ? D.blur(t) : w,
541
- P({
542
- icon: _(
536
+ P.checked(s),
537
+ P.disabled(r),
538
+ n != null ? P.labelledby(g) : _,
539
+ I.keydown(v),
540
+ t != null ? I.blur(t) : _,
541
+ N({
542
+ icon: w(
543
543
  s,
544
544
  l,
545
545
  c
546
546
  )(
547
- (h, d, p) => h ? d ?? "akar-icons/check-box-fill" : p ?? "akar-icons/box"
547
+ (d, h, f) => d ? h ?? "akar-icons/check-box-fill" : f ?? "akar-icons/box"
548
548
  ),
549
549
  accessibility: "decorative",
550
- size: f
550
+ size: p
551
551
  })
552
552
  ),
553
553
  n != null ? b.label(
554
554
  o.class("bc-checkbox-input__label"),
555
555
  o.id(g),
556
556
  o.for(u),
557
- re(n)
558
- ) : w
557
+ ce(n)
558
+ ) : _
559
559
  )
560
560
  },
561
- D.click(y)
561
+ I.click(S)
562
562
  );
563
- }, le = b.span(
563
+ }, oe = b.span(
564
564
  o.class("bc-input-wrapper__required"),
565
565
  " *"
566
566
  );
567
- function ce(e) {
567
+ function ue(e) {
568
568
  const s = ["bc-input-wrapper"];
569
- return e && s.push("bc-input-wrapper--horizontal"), s.join(" ");
569
+ return e !== "vertical" && s.push(`bc-input-wrapper--${e}`), s.join(" ");
570
570
  }
571
- function oe(e, s) {
571
+ function he(e, s) {
572
572
  const t = ["bc-input-wrapper__label-text"];
573
573
  return e ? t.push("bc-input-wrapper__label-text--error") : s ? t.push("bc-input-wrapper__label-text--disabled") : t.push("bc-input-wrapper__label-text--default"), t.join(" ");
574
574
  }
575
- const G = ({
575
+ function W(e, s) {
576
+ if (e === "horizontal-fixed" && s != null)
577
+ return `--input-wrapper-label-width: ${s}`;
578
+ }
579
+ const X = ({
576
580
  required: e,
577
581
  label: s,
578
582
  labelChildren: t,
579
583
  context: i,
580
584
  description: n,
581
- content: a,
582
- error: r,
585
+ content: r,
586
+ error: a,
583
587
  labelFor: l,
584
588
  hasError: c,
585
- disabled: f,
586
- horizontal: u
587
- }, ...g) => {
588
- const y = c ?? r != null, v = f ?? !1, h = u ?? !1, d = K("input-wrapper"), p = n ? `${d}-description` : void 0, E = r != null ? `${d}-error` : void 0;
589
+ disabled: p,
590
+ layout: u,
591
+ labelWidth: g
592
+ }, ...S) => {
593
+ const v = c ?? a != null, d = p ?? !1, h = u ?? "vertical", f = Q("input-wrapper"), E = n ? `${f}-description` : void 0, A = a != null ? `${f}-error` : void 0, x = w(h)((y) => y !== "vertical");
589
594
  return b.div(
590
- o.class(
591
- C.map(h, (T) => ce(T))
595
+ o.class(C.map(h, (y) => ue(y))),
596
+ O(
597
+ w(
598
+ h,
599
+ g ?? void 0
600
+ )((y, V) => W(y, V) != null),
601
+ () => o.style(
602
+ C.map(
603
+ w(
604
+ h,
605
+ g ?? void 0
606
+ )((y, V) => W(y, V)),
607
+ (y) => y
608
+ )
609
+ )
592
610
  ),
593
611
  s != null || i != null ? b.div(
594
612
  o.class("bc-input-wrapper__header"),
@@ -596,82 +614,79 @@ const G = ({
596
614
  o.class("bc-input-wrapper__label-section"),
597
615
  b.label(
598
616
  o.class("bc-input-wrapper__label"),
599
- l != null ? o.for(l) : w,
617
+ l != null ? o.for(l) : _,
600
618
  b.span(
601
619
  o.class(
602
- _(
603
- y,
604
- v
620
+ w(
621
+ v,
622
+ d
605
623
  )(
606
- (T, A) => oe(
607
- T ?? !1,
608
- A ?? !1
624
+ (y, V) => he(
625
+ y ?? !1,
626
+ V ?? !1
609
627
  )
610
628
  )
611
629
  ),
612
630
  s
613
631
  ),
614
- s != null && e ? le : w
632
+ s != null && e ? oe : _
615
633
  ),
616
634
  // Show description under label when horizontal
617
- V(
618
- _(
619
- h,
635
+ O(
636
+ w(
637
+ x,
620
638
  n
621
- )((T, A) => T && A != null),
639
+ )((y, V) => y && V != null),
622
640
  () => b.div(
623
641
  o.class(
624
642
  "bc-input-wrapper__description bc-input-wrapper__description--under-label"
625
643
  ),
626
- o.id(p),
644
+ o.id(E),
627
645
  n
628
646
  )
629
647
  )
630
648
  ),
631
- i != null ? ae(i) : w,
649
+ i != null ? le(i) : _,
632
650
  t
633
- ) : w,
651
+ ) : _,
634
652
  b.div(
635
653
  o.class("bc-input-wrapper__content"),
636
654
  // Add data attributes to help inputs inherit accessibility information
637
- [p, E].filter(Boolean).length > 0 ? q.describedby(
638
- [p, E].filter(Boolean).join(" ")
639
- ) : w,
640
- e ? q.required("true") : w,
641
- V(y, () => q.invalid("true")),
642
- a
655
+ [E, A].filter(Boolean).length > 0 ? H.describedby(
656
+ [E, A].filter(Boolean).join(" ")
657
+ ) : _,
658
+ e ? H.required("true") : _,
659
+ O(v, () => H.invalid("true")),
660
+ r
643
661
  ),
644
662
  // Show description at bottom only when not horizontal
645
- V(
646
- _(
647
- h,
648
- n
649
- )((T, A) => !T && A != null),
663
+ O(
664
+ w(x, n)((y, V) => !y && V != null),
650
665
  () => b.div(
651
666
  o.class("bc-input-wrapper__description"),
652
- o.id(p),
667
+ o.id(E),
653
668
  n
654
669
  )
655
670
  ),
656
- r != null ? V(
657
- y,
671
+ a != null ? O(
672
+ v,
658
673
  () => b.div(
659
674
  o.class("bc-input-wrapper__error"),
660
- o.id(E),
661
- x.live("polite"),
675
+ o.id(A),
676
+ P.live("polite"),
662
677
  // Announce errors to screen readers
663
678
  o.role("alert"),
664
679
  // Mark as alert for immediate attention
665
- r
680
+ a
666
681
  )
667
682
  ) : null,
668
- ...g
683
+ ...S
669
684
  );
670
685
  };
671
- function Ie(...e) {
686
+ function Ve(...e) {
672
687
  return b.div(o.class("bc-stack"), ...e);
673
688
  }
674
- const Ae = (e) => {
689
+ const Oe = (e) => {
675
690
  const s = {
676
691
  name: "email",
677
692
  autocomplete: "email",
@@ -680,116 +695,116 @@ const Ae = (e) => {
680
695
  value: t,
681
696
  before: i,
682
697
  onBlur: n,
683
- onChange: a,
684
- onInput: r,
698
+ onChange: r,
699
+ onInput: a,
685
700
  placeholder: l
686
- } = s, c = i ?? P({
701
+ } = s, c = i ?? N({
687
702
  icon: "line-md:email",
688
703
  size: "sm",
689
704
  color: "neutral"
690
705
  });
691
- return N(
692
- L,
693
- (f) => z({
706
+ return j(
707
+ q,
708
+ (p) => U({
694
709
  ...e,
695
710
  before: c,
696
- input: Z.email(
697
- W(s),
698
- o.placeholder(R(l, f.$.emailPlaceholderText)),
711
+ input: se.email(
712
+ J(s),
713
+ o.placeholder(G(l, p.$.emailPlaceholderText)),
699
714
  o.value(t),
700
715
  o.class("bc-input"),
701
- n != null ? D.blur(M(n)) : w,
702
- a != null ? D.change(M(a)) : w,
703
- r != null ? D.input(M(r)) : w
716
+ n != null ? I.blur($(n)) : _,
717
+ r != null ? I.change($(r)) : _,
718
+ a != null ? I.input($(a)) : _
704
719
  )
705
720
  })
706
721
  );
707
- }, Ve = (e) => {
722
+ }, Me = (e) => {
708
723
  const {
709
724
  value: s,
710
725
  onBlur: t,
711
726
  onChange: i,
712
727
  onInput: n,
713
- before: a,
714
- after: r,
728
+ before: r,
729
+ after: a,
715
730
  hasError: l,
716
731
  disabled: c,
717
- autocomplete: f,
732
+ autocomplete: p,
718
733
  placeholder: u,
719
734
  ...g
720
- } = e, y = {
735
+ } = e, S = {
721
736
  name: "password",
722
737
  disabled: c,
723
738
  ...g
724
- }, v = I(!0), h = _(
739
+ }, v = T(!0), d = w(
725
740
  v,
726
- f
727
- )((d, p) => d ? p ?? "current-password" : "off");
728
- return N(L, (d) => {
729
- const p = _(
730
- d.$.passwordPlaceholderText,
741
+ p
742
+ )((h, f) => h ? f ?? "current-password" : "off");
743
+ return j(q, (h) => {
744
+ const f = w(
745
+ h.$.passwordPlaceholderText,
731
746
  v,
732
747
  u
733
- )((T, A, Y) => A ? "•••••••••••••••" : Y ?? T), E = b.button(
748
+ )((A, x, y) => x ? "•••••••••••••••" : y ?? A), E = b.button(
734
749
  o.type("button"),
735
750
  o.class("bc-input-container__password-toggle"),
736
- x.label(d.$.togglePasswordVisibility),
737
- D.click(() => v.update((T) => !T)),
738
- V(
751
+ P.label(h.$.togglePasswordVisibility),
752
+ I.click(() => v.update((A) => !A)),
753
+ O(
739
754
  v,
740
- () => P({ icon: "line-md:watch" }),
741
- () => P({ icon: "line-md:watch-off" })
755
+ () => N({ icon: "line-md:watch" }),
756
+ () => N({ icon: "line-md:watch-off" })
742
757
  )
743
758
  );
744
- return z({
745
- before: a,
759
+ return U({
760
+ before: r,
746
761
  disabled: c,
747
762
  hasError: l,
748
763
  input: b.input(
749
- W({
750
- ...y,
751
- autocomplete: h,
752
- placeholder: p
764
+ J({
765
+ ...S,
766
+ autocomplete: d,
767
+ placeholder: f
753
768
  }),
754
- V(
769
+ O(
755
770
  v,
756
- () => F(o.type("password")),
757
- () => F(o.type("text"))
771
+ () => B(o.type("password")),
772
+ () => B(o.type("text"))
758
773
  ),
759
774
  o.class("bc-input"),
760
775
  o.value(s),
761
- t != null ? D.blur(M(t)) : w,
762
- i != null ? D.change(M(i)) : w,
763
- n != null ? D.input(M(n)) : w
776
+ t != null ? I.blur($(t)) : _,
777
+ i != null ? I.change($(i)) : _,
778
+ n != null ? I.input($(n)) : _
764
779
  ),
765
- after: r != null ? F(E, r) : E
780
+ after: a != null ? B(E, a) : E
766
781
  });
767
782
  });
768
- }, ue = (
783
+ }, de = (
769
784
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
770
785
  (e, s) => () => {
771
786
  e.markTouched(), s?.();
772
787
  }
773
- ), he = (e, s) => (t) => {
788
+ ), pe = (e, s) => (t) => {
774
789
  e.change(t), s?.(t);
775
790
  };
776
- function J(e, s) {
777
- const { controller: t, onBlur: i, onChange: n, ...a } = s;
791
+ function Y(e, s) {
792
+ const { controller: t, onBlur: i, onChange: n, ...r } = s;
778
793
  return e({
779
794
  id: t.name,
780
795
  disabled: t.disabled,
781
796
  value: t.signal,
782
797
  hasError: t.errorVisible,
783
- ...a,
784
- onChange: he(t, n),
785
- onBlur: ue(t, i)
798
+ ...r,
799
+ onChange: pe(t, n),
800
+ onBlur: de(t, i)
786
801
  });
787
802
  }
788
- function Oe(e, s, ...t) {
789
- return G(
803
+ function $e(e, s, ...t) {
804
+ return X(
790
805
  {
791
806
  ...s,
792
- content: J(
807
+ content: Y(
793
808
  e,
794
809
  s
795
810
  )
@@ -797,49 +812,49 @@ function Oe(e, s, ...t) {
797
812
  ...t
798
813
  );
799
814
  }
800
- function de(e, s) {
801
- const { toInput: t, fromInput: i, controller: n, ...a } = s, r = n.transform(t, i);
802
- return J(e, {
803
- ...a,
804
- controller: r
815
+ function fe(e, s) {
816
+ const { toInput: t, fromInput: i, controller: n, ...r } = s, a = n.transform(t, i);
817
+ return Y(e, {
818
+ ...r,
819
+ controller: a
805
820
  });
806
821
  }
807
- function Me(e, s, ...t) {
808
- return G(
822
+ function xe(e, s, ...t) {
823
+ return X(
809
824
  {
810
825
  ...s,
811
- content: de(e, s)
826
+ content: fe(e, s)
812
827
  },
813
828
  ...t
814
829
  );
815
830
  }
816
- function $e(e) {
831
+ function Fe(e) {
817
832
  return e.split(".").map((t) => {
818
833
  const i = t.match(/^\[(\d+)\]$/);
819
834
  return i ? Number(i[1]) : t;
820
835
  });
821
836
  }
822
- function pe(e) {
837
+ function be(e) {
823
838
  return typeof e == "number" ? `[${e}]` : `.${e}`;
824
839
  }
825
- function fe(e) {
840
+ function me(e) {
826
841
  if (e.length === 0) return "";
827
842
  const [s, ...t] = e;
828
843
  return [
829
844
  typeof s == "number" ? `[${s}]` : s,
830
- ...t.map(pe)
845
+ ...t.map(be)
831
846
  ].join("");
832
847
  }
833
- function B(e) {
848
+ function L(e) {
834
849
  return function(t) {
835
850
  if (t.type === "valid") return t;
836
851
  let i = t.error;
837
852
  for (const n of e)
838
- if (i = i?.dependencies?.[n], i == null) return S.valid;
839
- return S.invalid(i);
853
+ if (i = i?.dependencies?.[n], i == null) return D.valid;
854
+ return D.invalid(i);
840
855
  };
841
856
  }
842
- class O {
857
+ class M {
843
858
  path;
844
859
  change;
845
860
  signal;
@@ -851,34 +866,34 @@ class O {
851
866
  dirty;
852
867
  dependencyErrors;
853
868
  #e = {
854
- disabled: I(!1),
855
- touched: I(!1)
869
+ disabled: T(!1),
870
+ touched: T(!1)
856
871
  };
857
872
  #t;
858
- #s = I(void 0);
873
+ #s = T(void 0);
859
874
  parent;
860
875
  disabled;
861
876
  #n = [];
862
877
  disabledOrHasErrors;
863
- constructor(s, t, i, n, a, r = $) {
864
- this.path = s, this.change = t, this.signal = i, this.status = n, this.#t = r, this.#s.set(i.value), this.error = n.map(
878
+ constructor(s, t, i, n, r, a = F) {
879
+ this.path = s, this.change = t, this.signal = i, this.status = n, this.#t = a, this.#s.set(i.value), this.error = n.map(
865
880
  (l) => l?.type === "invalid" ? l.error?.message : void 0
866
- ), this.hasError = this.error.map((l) => l != null), this.touched = this.#e.touched, a.validationMode ? this.errorVisible = _(
881
+ ), this.hasError = this.error.map((l) => l != null), this.touched = this.#e.touched, r.validationMode ? this.errorVisible = w(
867
882
  this.hasError,
868
883
  this.touched,
869
- a.validationMode
870
- )((l, c, f) => f === "continuous" ? !!l : !!l && !!c) : this.errorVisible = _(
884
+ r.validationMode
885
+ )((l, c, p) => p === "continuous" ? !!l : !!l && !!c) : this.errorVisible = w(
871
886
  this.hasError,
872
887
  this.touched
873
- )((l, c) => !!l && !!c), this.dirty = _(
888
+ )((l, c) => !!l && !!c), this.dirty = w(
874
889
  this.signal,
875
890
  this.#s
876
891
  )((l, c) => !this.#t(l, c)), this.dependencyErrors = n.map(
877
892
  (l) => l?.type === "invalid" ? l.error?.dependencies : void 0
878
- ), this.parent = a, this.disabled = _(
893
+ ), this.parent = r, this.disabled = w(
879
894
  this.#e.disabled,
880
- a.disabled
881
- )((l, c) => l || c), this.disabledOrHasErrors = _(
895
+ r.disabled
896
+ )((l, c) => l || c), this.disabledOrHasErrors = w(
882
897
  this.disabled,
883
898
  this.hasError
884
899
  )((l, c) => l || c), this.onDispose(() => {
@@ -886,7 +901,7 @@ class O {
886
901
  });
887
902
  }
888
903
  get name() {
889
- return fe(this.path);
904
+ return me(this.path);
890
905
  }
891
906
  onDispose = (s) => {
892
907
  this.#n.push(s);
@@ -917,7 +932,7 @@ class O {
917
932
  reset = () => {
918
933
  this.change(this.#s.value);
919
934
  };
920
- array = (s = $) => new me(
935
+ array = (s = F) => new ve(
921
936
  this.path,
922
937
  this.change,
923
938
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -926,7 +941,7 @@ class O {
926
941
  this.parent,
927
942
  s
928
943
  );
929
- object = (s = $) => new be(
944
+ object = (s = F) => new ge(
930
945
  this.path,
931
946
  this.change,
932
947
  this.signal,
@@ -934,34 +949,34 @@ class O {
934
949
  this.parent,
935
950
  s
936
951
  );
937
- transform = (s, t, i = [], n = $) => new O(
952
+ transform = (s, t, i = [], n = F) => new M(
938
953
  [...this.path, ...i],
939
- (a) => this.change(t(a)),
954
+ (r) => this.change(t(r)),
940
955
  this.signal.map(s, n),
941
- this.status.map(B(i)),
956
+ this.status.map(L(i)),
942
957
  this.parent,
943
958
  n
944
959
  );
945
- asyncTransform = (s, t, i, n = [], a = $) => new O(
960
+ asyncTransform = (s, t, i, n = [], r = F) => new M(
946
961
  [...this.path, ...n],
947
- (r) => {
948
- t(r).then((l) => this.change(l));
962
+ (a) => {
963
+ t(a).then((l) => this.change(l));
949
964
  },
950
- this.signal.mapAsync(s, i, void 0, a),
951
- this.status.map(B(n)),
965
+ this.signal.mapAsync(s, i, void 0, r),
966
+ this.status.map(L(n)),
952
967
  this.parent,
953
- a
968
+ r
954
969
  );
955
970
  }
956
- class be extends O {
971
+ class ge extends M {
957
972
  #e = /* @__PURE__ */ new Map();
958
973
  #t = /* @__PURE__ */ new Map();
959
974
  #s = /* @__PURE__ */ new Map();
960
- #n = I(!1);
975
+ #n = T(!1);
961
976
  touchedDeep = this.#n;
962
- #a = /* @__PURE__ */ new Map();
977
+ #r = /* @__PURE__ */ new Map();
963
978
  #i = /* @__PURE__ */ new Map();
964
- #l = I(!1);
979
+ #l = T(!1);
965
980
  dirtyDeep = this.#l;
966
981
  #o;
967
982
  #u;
@@ -974,20 +989,20 @@ class be extends O {
974
989
  }
975
990
  this.#n.set(this.touched.value || s);
976
991
  };
977
- constructor(s, t, i, n, a, r) {
992
+ constructor(s, t, i, n, r, a) {
978
993
  super(
979
994
  s,
980
995
  t,
981
- i.map((c) => c ?? {}, r),
996
+ i.map((c) => c ?? {}, a),
982
997
  n,
983
- a,
984
- r
998
+ r,
999
+ a
985
1000
  ), this.#o = this.touched.on(() => {
986
1001
  this.#c();
987
1002
  }), this.#u = this.dirty.on(() => {
988
- this.#r();
1003
+ this.#a();
989
1004
  });
990
- const l = this.signal.on(() => this.#r());
1005
+ const l = this.signal.on(() => this.#a());
991
1006
  this.onDispose(() => {
992
1007
  for (const c of this.#e.values())
993
1008
  c.dispose();
@@ -995,22 +1010,22 @@ class be extends O {
995
1010
  for (const c of this.#s.values()) c();
996
1011
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
997
1012
  for (const c of this.#i.values()) c();
998
- this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), l();
1013
+ this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), l();
999
1014
  });
1000
1015
  }
1001
1016
  field = (s) => {
1002
1017
  if (this.#e.has(s))
1003
1018
  return this.#e.get(s);
1004
- const t = async (r) => {
1019
+ const t = async (a) => {
1005
1020
  this.change({
1006
1021
  ...this.signal.value,
1007
- [s]: r
1022
+ [s]: a
1008
1023
  });
1009
- }, i = new O(
1024
+ }, i = new M(
1010
1025
  [...this.path, s],
1011
1026
  t,
1012
- this.signal.map((r) => r[s]),
1013
- this.status.map(B([s])),
1027
+ this.signal.map((a) => a[s]),
1028
+ this.status.map(L([s])),
1014
1029
  {
1015
1030
  disabled: this.disabled,
1016
1031
  // propagate validationMode to children if present
@@ -1018,14 +1033,14 @@ class be extends O {
1018
1033
  }
1019
1034
  );
1020
1035
  this.#e.set(s, i);
1021
- const n = i.touched.on((r) => {
1022
- this.#t.set(s, r), this.#c();
1036
+ const n = i.touched.on((a) => {
1037
+ this.#t.set(s, a), this.#c();
1023
1038
  });
1024
1039
  this.#s.set(s, n);
1025
- const a = i.dirty.on((r) => {
1026
- this.#a.set(s, r), this.#r();
1040
+ const r = i.dirty.on((a) => {
1041
+ this.#r.set(s, a), this.#a();
1027
1042
  });
1028
- return this.#i.set(s, a), i;
1043
+ return this.#i.set(s, r), i;
1029
1044
  };
1030
1045
  markAllTouched = () => {
1031
1046
  this.markTouched();
@@ -1043,9 +1058,9 @@ class be extends O {
1043
1058
  for (const t of this.#e.values())
1044
1059
  t.markPristine?.();
1045
1060
  };
1046
- #r = () => {
1061
+ #a = () => {
1047
1062
  let s = !1;
1048
- for (const t of this.#a.values())
1063
+ for (const t of this.#r.values())
1049
1064
  if (t) {
1050
1065
  s = !0;
1051
1066
  break;
@@ -1053,16 +1068,16 @@ class be extends O {
1053
1068
  this.#l.set(this.dirty.value || s);
1054
1069
  };
1055
1070
  }
1056
- class me extends O {
1071
+ class ve extends M {
1057
1072
  #e = new Array();
1058
1073
  length;
1059
1074
  #t = /* @__PURE__ */ new Map();
1060
1075
  #s = /* @__PURE__ */ new Map();
1061
- #n = I(!1);
1076
+ #n = T(!1);
1062
1077
  touchedDeep = this.#n;
1063
- #a = /* @__PURE__ */ new Map();
1078
+ #r = /* @__PURE__ */ new Map();
1064
1079
  #i = /* @__PURE__ */ new Map();
1065
- #l = I(!1);
1080
+ #l = T(!1);
1066
1081
  dirtyDeep = this.#l;
1067
1082
  #o;
1068
1083
  #u;
@@ -1075,22 +1090,22 @@ class me extends O {
1075
1090
  }
1076
1091
  this.#n.set(this.touched.value || s);
1077
1092
  };
1078
- constructor(s, t, i, n, a, r) {
1079
- const l = i.map((u) => u ?? [], r);
1080
- super(s, t, l, n, a, r);
1093
+ constructor(s, t, i, n, r, a) {
1094
+ const l = i.map((u) => u ?? [], a);
1095
+ super(s, t, l, n, r, a);
1081
1096
  const c = l.on((u) => {
1082
1097
  const g = this.#e.length - u.length;
1083
- g > 0 && (this.#e.splice(u.length, g).forEach((y, v) => {
1084
- const h = u.length + v;
1085
- y.dispose(), this.#s.get(h)?.(), this.#s.delete(h), this.#t.delete(h), this.#i.get(h)?.(), this.#i.delete(h), this.#a.delete(h);
1086
- }), this.#c(), this.#r());
1098
+ g > 0 && (this.#e.splice(u.length, g).forEach((S, v) => {
1099
+ const d = u.length + v;
1100
+ S.dispose(), this.#s.get(d)?.(), this.#s.delete(d), this.#t.delete(d), this.#i.get(d)?.(), this.#i.delete(d), this.#r.delete(d);
1101
+ }), this.#c(), this.#a());
1087
1102
  });
1088
1103
  this.length = l.map((u) => u.length), this.#o = this.touched.on(() => {
1089
1104
  this.#c();
1090
1105
  }), this.#u = this.dirty.on(() => {
1091
- this.#r();
1106
+ this.#a();
1092
1107
  });
1093
- const f = this.signal.on(() => this.#r());
1108
+ const p = this.signal.on(() => this.#a());
1094
1109
  this.onDispose(() => {
1095
1110
  for (const u of this.#e)
1096
1111
  u.dispose();
@@ -1098,34 +1113,34 @@ class me extends O {
1098
1113
  for (const u of this.#s.values()) u();
1099
1114
  this.#s.clear(), this.#t.clear(), this.#n.dispose();
1100
1115
  for (const u of this.#i.values()) u();
1101
- this.#i.clear(), this.#a.clear(), this.#l.dispose(), this.#o(), this.#u(), f();
1116
+ this.#i.clear(), this.#r.clear(), this.#l.dispose(), this.#o(), this.#u(), p();
1102
1117
  });
1103
1118
  }
1104
1119
  item = (s) => {
1105
1120
  if (this.#e[s])
1106
1121
  return this.#e[s];
1107
- const t = async (r) => {
1122
+ const t = async (a) => {
1108
1123
  const l = this.signal.value.slice();
1109
- l[s] = r, this.change(l);
1110
- }, i = new O(
1124
+ l[s] = a, this.change(l);
1125
+ }, i = new M(
1111
1126
  [...this.path, s],
1112
1127
  t,
1113
- this.signal.map((r) => r[s]),
1114
- this.status.map(B([s])),
1128
+ this.signal.map((a) => a[s]),
1129
+ this.status.map(L([s])),
1115
1130
  {
1116
1131
  disabled: this.disabled,
1117
1132
  validationMode: this.parent.validationMode
1118
1133
  }
1119
1134
  );
1120
1135
  this.#e[s] = i;
1121
- const n = i.touched.on((r) => {
1122
- this.#t.set(s, r), this.#c();
1136
+ const n = i.touched.on((a) => {
1137
+ this.#t.set(s, a), this.#c();
1123
1138
  });
1124
1139
  this.#s.set(s, n);
1125
- const a = i.dirty.on((r) => {
1126
- this.#a.set(s, r), this.#r();
1140
+ const r = i.dirty.on((a) => {
1141
+ this.#r.set(s, a), this.#a();
1127
1142
  });
1128
- return this.#i.set(s, a), i;
1143
+ return this.#i.set(s, r), i;
1129
1144
  };
1130
1145
  push = (...s) => {
1131
1146
  this.change([...this.signal.value, ...s]);
@@ -1148,8 +1163,8 @@ class me extends O {
1148
1163
  };
1149
1164
  move = (s, t, i = 1) => {
1150
1165
  if (i < 1 || s === t) return;
1151
- const n = this.signal.value.slice(), a = n.splice(s, i);
1152
- n.splice(t, 0, ...a), this.change(n);
1166
+ const n = this.signal.value.slice(), r = n.splice(s, i);
1167
+ n.splice(t, 0, ...r), this.change(n);
1153
1168
  };
1154
1169
  markAllTouched = () => {
1155
1170
  this.markTouched();
@@ -1163,9 +1178,9 @@ class me extends O {
1163
1178
  for (let t = 0; t < s; t++)
1164
1179
  this.item(t).markPristine?.();
1165
1180
  };
1166
- #r = () => {
1181
+ #a = () => {
1167
1182
  let s = !1;
1168
- for (const t of this.#a.values())
1183
+ for (const t of this.#r.values())
1169
1184
  if (t) {
1170
1185
  s = !0;
1171
1186
  break;
@@ -1173,7 +1188,7 @@ class me extends O {
1173
1188
  this.#l.set(this.dirty.value || s);
1174
1189
  };
1175
1190
  }
1176
- function ge(e) {
1191
+ function ye(e) {
1177
1192
  function s(t) {
1178
1193
  return typeof t == "number" ? t : t.toString();
1179
1194
  }
@@ -1181,13 +1196,13 @@ function ge(e) {
1181
1196
  (t) => typeof t == "object" && t.key != null ? s(t.key) : s(t)
1182
1197
  );
1183
1198
  }
1184
- function ve(e) {
1185
- const s = e.filter((n) => n.path == null || n.path.length === 0).map((n) => n.message), t = e.filter((n) => n.path != null && n.path.length > 0).reduce((n, a) => {
1186
- const r = ge(a.path), l = r.pop();
1199
+ function ke(e) {
1200
+ const s = e.filter((n) => n.path == null || n.path.length === 0).map((n) => n.message), t = e.filter((n) => n.path != null && n.path.length > 0).reduce((n, r) => {
1201
+ const a = ye(r.path), l = a.pop();
1187
1202
  let c = n;
1188
- for (const f of r)
1189
- c.dependencies == null && (c.dependencies = {}), c.dependencies[f] == null && (c.dependencies[f] = {}), c = c.dependencies[f];
1190
- return c.dependencies == null && (c.dependencies = {}), c.dependencies[l] = { message: a.message }, n;
1203
+ for (const p of a)
1204
+ c.dependencies == null && (c.dependencies = {}), c.dependencies[p] == null && (c.dependencies[p] = {}), c = c.dependencies[p];
1205
+ return c.dependencies == null && (c.dependencies = {}), c.dependencies[l] = { message: r.message }, n;
1191
1206
  }, {}), i = s.join(`
1192
1207
  `);
1193
1208
  return {
@@ -1195,76 +1210,76 @@ function ve(e) {
1195
1210
  message: i != "" ? i : void 0
1196
1211
  };
1197
1212
  }
1198
- function ye({
1213
+ function we({
1199
1214
  initialValue: e,
1200
1215
  onChange: s,
1201
1216
  validate: t,
1202
1217
  equals: i,
1203
1218
  validationMode: n,
1204
- validateDebounceMs: a
1219
+ validateDebounceMs: r
1205
1220
  }) {
1206
- const r = C.deriveProp(e), l = I(S.valid), c = I(!1), f = I(n ?? "touchedOrSubmit"), u = (d) => {
1207
- l.set(d);
1221
+ const a = C.deriveProp(e), l = T(D.valid), c = T(!1), p = T(n ?? "touchedOrSubmit"), u = (h) => {
1222
+ l.set(h);
1208
1223
  };
1209
1224
  let g;
1210
- const y = async (d) => {
1225
+ const S = async (h) => {
1211
1226
  if (t != null) {
1212
- const p = await t(d);
1213
- u(p);
1227
+ const f = await t(h);
1228
+ u(f);
1214
1229
  }
1215
- }, v = async (d) => {
1216
- r.set(d), s?.(d);
1217
- const p = f.value;
1230
+ }, v = async (h) => {
1231
+ a.set(h), s?.(h);
1232
+ const f = p.value;
1218
1233
  if (t != null) {
1219
- if (p === "onSubmit")
1234
+ if (f === "onSubmit")
1220
1235
  return;
1221
- const E = a ?? 0;
1236
+ const E = r ?? 0;
1222
1237
  E > 0 ? (g && clearTimeout(g), g = setTimeout(() => {
1223
- y(d);
1224
- }, E)) : await y(d);
1238
+ S(h);
1239
+ }, E)) : await S(h);
1225
1240
  }
1226
- }, h = new O(
1241
+ }, d = new M(
1227
1242
  [],
1228
1243
  v,
1229
- r,
1244
+ a,
1230
1245
  l,
1231
1246
  {
1232
1247
  disabled: c,
1233
- validationMode: f
1248
+ validationMode: p
1234
1249
  },
1235
- i ?? $
1250
+ i ?? F
1236
1251
  );
1237
- return h.onDispose(() => {
1238
- c.dispose(), r.dispose(), l.dispose(), f.dispose(), g && clearTimeout(g);
1239
- }), { controller: h, setStatus: u };
1252
+ return d.onDispose(() => {
1253
+ c.dispose(), a.dispose(), l.dispose(), p.dispose(), g && clearTimeout(g);
1254
+ }), { controller: d, setStatus: u };
1240
1255
  }
1241
- function Q(e) {
1242
- return F(o.disabled(e.disabled), o.name(e.name));
1256
+ function Z(e) {
1257
+ return B(o.disabled(e.disabled), o.name(e.name));
1243
1258
  }
1244
- function xe(e, {
1259
+ function Pe(e, {
1245
1260
  triggerOn: s = "change"
1246
1261
  } = {}) {
1247
- return F(
1248
- Q(e),
1262
+ return B(
1263
+ Z(e),
1249
1264
  o.value(e.signal),
1250
- (s === "input" ? D.input : D.change)(M(e.change))
1265
+ (s === "input" ? I.input : I.change)($(e.change))
1251
1266
  );
1252
1267
  }
1253
- function Fe(e, {
1268
+ function Be(e, {
1254
1269
  triggerOn: s = "change"
1255
1270
  } = {}) {
1256
- return F(
1257
- Q(e),
1271
+ return B(
1272
+ Z(e),
1258
1273
  o.valueAsNumber(e.signal),
1259
- (s === "input" ? D.input : D.change)(
1260
- ee(e.change)
1274
+ (s === "input" ? I.input : I.change)(
1275
+ te(e.change)
1261
1276
  )
1262
1277
  );
1263
1278
  }
1264
- function U(e) {
1265
- return e.issues != null ? S.invalid(ve(e.issues)) : S.valid;
1279
+ function K(e) {
1280
+ return e.issues != null ? D.invalid(ke(e.issues)) : D.valid;
1266
1281
  }
1267
- async function Pe({
1282
+ async function Ne({
1268
1283
  task: e,
1269
1284
  errorMessage: s,
1270
1285
  errorPath: t = ["root"],
@@ -1272,17 +1287,17 @@ async function Pe({
1272
1287
  }) {
1273
1288
  try {
1274
1289
  const n = await e();
1275
- return i != null ? i(n) : S.valid;
1290
+ return i != null ? i(n) : D.valid;
1276
1291
  } catch (n) {
1277
- const a = s ?? (n instanceof Error ? n.message : "Operation failed");
1278
- return t.length === 1 && t[0] === "root" ? S.invalid({
1279
- message: a
1280
- }) : S.invalid({
1281
- dependencies: X(t, a)
1292
+ const r = s ?? (n instanceof Error ? n.message : "Operation failed");
1293
+ return t.length === 1 && t[0] === "root" ? D.invalid({
1294
+ message: r
1295
+ }) : D.invalid({
1296
+ dependencies: ee(t, r)
1282
1297
  });
1283
1298
  }
1284
1299
  }
1285
- function X(e, s) {
1300
+ function ee(e, s) {
1286
1301
  if (e.length === 1)
1287
1302
  return {
1288
1303
  [e[0]]: { message: s }
@@ -1290,45 +1305,45 @@ function X(e, s) {
1290
1305
  const [t, ...i] = e;
1291
1306
  return {
1292
1307
  [t]: {
1293
- dependencies: X(i, s)
1308
+ dependencies: ee(i, s)
1294
1309
  }
1295
1310
  };
1296
1311
  }
1297
- function Be({
1312
+ function Le({
1298
1313
  initialValue: e = {},
1299
1314
  schema: s,
1300
- onSubmit: t = async () => S.valid,
1315
+ onSubmit: t = async () => D.valid,
1301
1316
  validationMode: i,
1302
1317
  validateDebounceMs: n
1303
1318
  }) {
1304
- const { controller: a, setStatus: r } = ye({
1319
+ const { controller: r, setStatus: a } = we({
1305
1320
  initialValue: e,
1306
1321
  validationMode: i ?? "touchedOrSubmit",
1307
1322
  validateDebounceMs: n,
1308
- validate: (i ?? "touchedOrSubmit") === "onSubmit" ? void 0 : async (u) => U(
1323
+ validate: (i ?? "touchedOrSubmit") === "onSubmit" ? void 0 : async (u) => K(
1309
1324
  await s["~standard"].validate(u)
1310
1325
  )
1311
- }), l = I(!1), c = a.object();
1326
+ }), l = T(!1), c = r.object();
1312
1327
  return c.onDispose(l.dispose), {
1313
1328
  controller: c,
1314
- setStatus: r,
1329
+ setStatus: a,
1315
1330
  submit: async (u) => {
1316
1331
  if (l.set(!0), u?.preventDefault(), c.markAllTouched(), (i ?? "touchedOrSubmit") === "onSubmit") {
1317
- const y = c.signal.value, v = U(
1318
- await s["~standard"].validate(y)
1332
+ const S = c.signal.value, v = K(
1333
+ await s["~standard"].validate(S)
1319
1334
  );
1320
- if (r(v), v.type === "invalid") {
1335
+ if (a(v), v.type === "invalid") {
1321
1336
  l.set(!1);
1322
1337
  return;
1323
1338
  }
1324
1339
  }
1325
1340
  const g = await t(c.signal.value);
1326
- l.set(!1), g.type === "invalid" && r(g);
1341
+ l.set(!1), g.type === "invalid" && a(g);
1327
1342
  },
1328
1343
  submitting: l
1329
1344
  };
1330
1345
  }
1331
- function ke(e) {
1346
+ function Se(e) {
1332
1347
  switch (e) {
1333
1348
  case "success":
1334
1349
  return "material-symbols:check-circle-outline";
@@ -1341,7 +1356,7 @@ function ke(e) {
1341
1356
  return "material-symbols:info-outline";
1342
1357
  }
1343
1358
  }
1344
- function we(e) {
1359
+ function Ce(e) {
1345
1360
  switch (e) {
1346
1361
  case "success":
1347
1362
  return "success";
@@ -1354,7 +1369,7 @@ function we(e) {
1354
1369
  return "info";
1355
1370
  }
1356
1371
  }
1357
- function Se(e, s, t, i) {
1372
+ function _e(e, s, t, i) {
1358
1373
  const n = [
1359
1374
  "bc-notice",
1360
1375
  `bc-notice--${e}`,
@@ -1362,106 +1377,106 @@ function Se(e, s, t, i) {
1362
1377
  ];
1363
1378
  return t && n.push("bc-notice--dismissible"), i && i.length > 0 && n.push(i), n.join(" ");
1364
1379
  }
1365
- function Ne({
1380
+ function je({
1366
1381
  variant: e = "info",
1367
1382
  tone: s = "subtle",
1368
1383
  role: t,
1369
1384
  title: i,
1370
1385
  icon: n,
1371
- closable: a = !1,
1372
- onDismiss: r,
1386
+ closable: r = !1,
1387
+ onDismiss: a,
1373
1388
  class: l
1374
1389
  }, ...c) {
1375
- const f = C.map(
1376
- a,
1377
- (d) => !!d || r != null
1378
- ), u = C.map(e, (d) => d ?? "info"), g = C.map(s, (d) => d ?? "subtle"), y = _(
1390
+ const p = C.map(
1391
+ r,
1392
+ (h) => !!h || a != null
1393
+ ), u = C.map(e, (h) => h ?? "info"), g = C.map(s, (h) => h ?? "subtle"), S = w(
1379
1394
  t,
1380
1395
  u
1381
1396
  )(
1382
- (d, p) => d ?? (p === "danger" ? "alert" : "status")
1383
- ), v = I(!0), h = N(
1384
- L,
1385
- (d) => b.div(
1397
+ (h, f) => h ?? (f === "danger" ? "alert" : "status")
1398
+ ), v = T(!0), d = j(
1399
+ q,
1400
+ (h) => b.div(
1386
1401
  o.class(
1387
- _(
1402
+ w(
1388
1403
  u,
1389
1404
  g,
1390
- f,
1405
+ p,
1391
1406
  l
1392
- )((p, E, T, A) => Se(p, E, T, A))
1407
+ )((f, E, A, x) => _e(f, E, A, x))
1393
1408
  ),
1394
1409
  // Accessibility role mapping (always defined)
1395
- o.role(C.map(y, (p) => p)),
1396
- se(
1397
- C.map(n, (p) => p === !1),
1410
+ o.role(C.map(S, (f) => f)),
1411
+ ne(
1412
+ C.map(n, (f) => f === !1),
1398
1413
  () => b.div(
1399
1414
  o.class("bc-notice__icon"),
1400
- P({
1401
- icon: _(
1415
+ N({
1416
+ icon: w(
1402
1417
  n,
1403
1418
  u
1404
- )((p, E) => p === void 0 ? ke(E) : String(p)),
1419
+ )((f, E) => f === void 0 ? Se(E) : String(f)),
1405
1420
  size: "md",
1406
- color: C.map(u, we)
1421
+ color: C.map(u, Ce)
1407
1422
  })
1408
1423
  )
1409
1424
  ),
1410
1425
  b.div(
1411
1426
  o.class("bc-notice__body"),
1412
- te(i, (p) => b.div(o.class("bc-notice__title"), p)),
1427
+ ie(i, (f) => b.div(o.class("bc-notice__title"), f)),
1413
1428
  b.div(o.class("bc-notice__content"), ...c)
1414
1429
  ),
1415
- V(
1416
- f,
1417
- () => ie({
1430
+ O(
1431
+ p,
1432
+ () => ae({
1418
1433
  size: "xs",
1419
- label: d.$.closeModal,
1434
+ label: h.$.closeModal,
1420
1435
  onClick: () => {
1421
- v.set(!1), r?.();
1436
+ v.set(!1), a?.();
1422
1437
  }
1423
1438
  })
1424
1439
  )
1425
1440
  )
1426
1441
  );
1427
- return V(v, () => h);
1442
+ return O(v, () => d);
1428
1443
  }
1429
1444
  export {
1430
- me as A,
1431
- J as B,
1432
- ie as C,
1433
- Ee as D,
1434
- Ae as E,
1435
- G as I,
1436
- ae as L,
1437
- Me as M,
1438
- Ne as N,
1439
- $ as O,
1440
- Ve as P,
1441
- le as R,
1442
- Ie as S,
1443
- S as a,
1444
- Te as b,
1445
- Oe as c,
1446
- he as d,
1447
- O as e,
1448
- B as f,
1449
- de as g,
1450
- fe as h,
1451
- be as i,
1452
- ge as j,
1453
- ve as k,
1454
- ye as l,
1455
- ue as m,
1456
- Q as n,
1457
- xe as o,
1458
- $e as p,
1459
- Fe as q,
1460
- U as r,
1461
- K as s,
1462
- Pe as t,
1463
- Be as u,
1464
- De as v,
1465
- pe as w,
1466
- re as x
1445
+ ve as A,
1446
+ Y as B,
1447
+ ae as C,
1448
+ Te as D,
1449
+ Oe as E,
1450
+ X as I,
1451
+ le as L,
1452
+ xe as M,
1453
+ je as N,
1454
+ F as O,
1455
+ Me as P,
1456
+ oe as R,
1457
+ Ve as S,
1458
+ D as a,
1459
+ Ae as b,
1460
+ $e as c,
1461
+ pe as d,
1462
+ M as e,
1463
+ L as f,
1464
+ fe as g,
1465
+ me as h,
1466
+ ge as i,
1467
+ ye as j,
1468
+ ke as k,
1469
+ we as l,
1470
+ de as m,
1471
+ Z as n,
1472
+ Pe as o,
1473
+ Fe as p,
1474
+ Be as q,
1475
+ K as r,
1476
+ Q as s,
1477
+ Ne as t,
1478
+ Le as u,
1479
+ Ie as v,
1480
+ be as w,
1481
+ ce as x
1467
1482
  };