@webority/ui-elements 0.11.6 → 0.12.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.
@@ -527,7 +527,203 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
527
527
  disconnectedCallback() {
528
528
  this._teardown();
529
529
  }
530
- }, b = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), x = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), S = [
530
+ }, b = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), x = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), S = "wui-consent-save", ee = "[data-consent-settings]", C = {
531
+ heading: "Cookies on this site",
532
+ description: "We use cookies to understand how the site is used and to measure our campaigns. You can change your choice at any time.",
533
+ policyLabel: "Cookie policy",
534
+ essentialLabel: "Essential cookies",
535
+ essentialDescription: "Required for the site to work and stay secure. Always on.",
536
+ analyticsLabel: "Analytics cookies",
537
+ analyticsDescription: "Help us understand how visitors use the site.",
538
+ functionalLabel: "Functional cookies",
539
+ functionalDescription: "Remember choices you make, such as your preferences.",
540
+ marketingLabel: "Marketing cookies",
541
+ marketingDescription: "Measure how well our campaigns work.",
542
+ settingsLabel: "Cookie settings",
543
+ rejectLabel: "Reject all",
544
+ acceptLabel: "Accept all",
545
+ saveLabel: "Save preferences"
546
+ }, w = [
547
+ "analytics",
548
+ "functional",
549
+ "marketing"
550
+ ], T = 0, E = class extends e {
551
+ static get observedAttributes() {
552
+ return [
553
+ "heading",
554
+ "description",
555
+ "policy-href",
556
+ "policy-label",
557
+ "analytics-description",
558
+ "functional-description",
559
+ "marketing-description"
560
+ ];
561
+ }
562
+ constructor() {
563
+ super(), T += 1, this._uid = `wui-consent-${T}`, this._preferences = {
564
+ analytics: !1,
565
+ functional: !1,
566
+ marketing: !1
567
+ }, this._settings = !1, this._onDocumentClick = (e) => {
568
+ e.target instanceof Element && e.target.closest(ee) && (e.preventDefault(), this.open({
569
+ settings: !0,
570
+ focus: !0
571
+ }));
572
+ };
573
+ }
574
+ get position() {
575
+ return this.getAttribute("position") === "bottom-right" ? "bottom-right" : "bottom-left";
576
+ }
577
+ set position(e) {
578
+ this.setAttribute("position", String(e ?? "bottom-left"));
579
+ }
580
+ get heading() {
581
+ return this.getAttribute("heading") || C.heading;
582
+ }
583
+ set heading(e) {
584
+ this.setAttribute("heading", String(e ?? ""));
585
+ }
586
+ get description() {
587
+ return this.getAttribute("description") || C.description;
588
+ }
589
+ set description(e) {
590
+ this.setAttribute("description", String(e ?? ""));
591
+ }
592
+ get policyHref() {
593
+ return this.getAttribute("policy-href") || "";
594
+ }
595
+ set policyHref(e) {
596
+ this.setAttribute("policy-href", String(e ?? ""));
597
+ }
598
+ get policyLabel() {
599
+ return this.getAttribute("policy-label") || C.policyLabel;
600
+ }
601
+ set policyLabel(e) {
602
+ this.setAttribute("policy-label", String(e ?? ""));
603
+ }
604
+ get analyticsDescription() {
605
+ return this.getAttribute("analytics-description") || C.analyticsDescription;
606
+ }
607
+ set analyticsDescription(e) {
608
+ this.setAttribute("analytics-description", String(e ?? ""));
609
+ }
610
+ get functionalDescription() {
611
+ return this.getAttribute("functional-description") || C.functionalDescription;
612
+ }
613
+ set functionalDescription(e) {
614
+ this.setAttribute("functional-description", String(e ?? ""));
615
+ }
616
+ get marketingDescription() {
617
+ return this.getAttribute("marketing-description") || C.marketingDescription;
618
+ }
619
+ set marketingDescription(e) {
620
+ this.setAttribute("marketing-description", String(e ?? ""));
621
+ }
622
+ get preferences() {
623
+ return { ...this._preferences };
624
+ }
625
+ set preferences(e) {
626
+ this._preferences = {
627
+ analytics: e?.analytics === !0,
628
+ functional: e?.functional === !0,
629
+ marketing: e?.marketing === !0
630
+ }, this._applyPreferences();
631
+ }
632
+ get isOpen() {
633
+ return this.hasAttribute("open");
634
+ }
635
+ connectedCallback() {
636
+ this._rendered || this.render(), document.addEventListener("click", this._onDocumentClick);
637
+ }
638
+ disconnectedCallback() {
639
+ document.removeEventListener("click", this._onDocumentClick);
640
+ }
641
+ attributeChangedCallback() {
642
+ this._rendered && this.render();
643
+ }
644
+ render() {
645
+ let e = this.isOpen, t = this._uid, n = this.policyHref ? ` <a class="wui-consent-banner-policy" href="${te(this.policyHref)}">${O(this.policyLabel)}</a>` : "";
646
+ this.innerHTML = `
647
+ <div class="wui-consent-banner-panel" role="dialog" aria-labelledby="${t}-heading" aria-describedby="${t}-description" hidden>
648
+ <h2 class="wui-consent-banner-heading" id="${t}-heading">${O(this.heading)}</h2>
649
+ <p class="wui-consent-banner-description" id="${t}-description">${O(this.description)}${n}</p>
650
+ <div class="wui-consent-banner-settings" hidden>
651
+ ${D(t, "essential", C.essentialLabel, C.essentialDescription, !0)}
652
+ ${D(t, "analytics", C.analyticsLabel, this.analyticsDescription, !1)}
653
+ ${D(t, "functional", C.functionalLabel, this.functionalDescription, !1)}
654
+ ${D(t, "marketing", C.marketingLabel, this.marketingDescription, !1)}
655
+ </div>
656
+ <div class="wui-consent-banner-actions">
657
+ <button type="button" class="btn btn-sm btn-link wui-consent-banner-settings-toggle" aria-expanded="false">${C.settingsLabel}</button>
658
+ <button type="button" class="btn btn-sm btn-outline-secondary wui-consent-banner-reject">${C.rejectLabel}</button>
659
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-accept">${C.acceptLabel}</button>
660
+ <button type="button" class="btn btn-sm btn-primary wui-consent-banner-save" hidden>${C.saveLabel}</button>
661
+ </div>
662
+ </div>`, this._rendered = !0, this._wire(), this._applyPreferences(), this._showSettings(this._settings), e && (this._panel().hidden = !1);
663
+ }
664
+ open({ settings: e = !1, focus: t = !1 } = {}) {
665
+ this._rendered || this.render(), this._applyPreferences(), this._showSettings(e), this._panel().hidden = !1, this.setAttribute("open", ""), t && (e ? this.querySelector(".wui-consent-banner-category input:not([disabled])") : this.querySelector(".wui-consent-banner-accept"))?.focus();
666
+ }
667
+ close() {
668
+ let e = this._panel();
669
+ e && (e.hidden = !0), this.removeAttribute("open"), this._showSettings(!1);
670
+ }
671
+ _panel() {
672
+ return this.querySelector(".wui-consent-banner-panel");
673
+ }
674
+ _wire() {
675
+ this.querySelector(".wui-consent-banner-accept")?.addEventListener("click", () => this._save({
676
+ analytics: !0,
677
+ functional: !0,
678
+ marketing: !0
679
+ })), this.querySelector(".wui-consent-banner-reject")?.addEventListener("click", () => this._save({
680
+ analytics: !1,
681
+ functional: !1,
682
+ marketing: !1
683
+ })), this.querySelector(".wui-consent-banner-save")?.addEventListener("click", () => this._save(this._switchValues())), this.querySelector(".wui-consent-banner-settings-toggle")?.addEventListener("click", () => this._showSettings(!this._settings));
684
+ }
685
+ _save(e) {
686
+ this._preferences = { ...e }, this.dispatchEvent(new CustomEvent(S, {
687
+ bubbles: !0,
688
+ composed: !0,
689
+ detail: { ...e }
690
+ })), this.close();
691
+ }
692
+ _switchValues() {
693
+ let e = {};
694
+ for (let t of w) e[t] = this.querySelector(`input[data-category="${t}"]`)?.checked === !0;
695
+ return e;
696
+ }
697
+ _applyPreferences() {
698
+ for (let e of w) {
699
+ let t = this.querySelector(`input[data-category="${e}"]`);
700
+ t && (t.checked = this._preferences[e]);
701
+ }
702
+ }
703
+ _showSettings(e) {
704
+ this._settings = e;
705
+ let t = this.querySelector(".wui-consent-banner-settings");
706
+ if (!t) return;
707
+ t.hidden = !e, this.querySelector(".wui-consent-banner-settings-toggle")?.setAttribute("aria-expanded", e ? "true" : "false");
708
+ let n = this.querySelector(".wui-consent-banner-save");
709
+ n && (n.hidden = !e);
710
+ for (let t of [".wui-consent-banner-reject", ".wui-consent-banner-accept"]) {
711
+ let n = this.querySelector(t);
712
+ n && (n.hidden = e);
713
+ }
714
+ }
715
+ };
716
+ function D(e, t, n, r, i) {
717
+ let a = `${e}-${t}`;
718
+ return `<div class="wui-consent-banner-category">
719
+ <div class="form-check form-switch">
720
+ <input class="form-check-input" type="checkbox" role="switch" id="${a}" data-category="${t}"${i ? " checked disabled" : ""} />
721
+ <label class="form-check-label" for="${a}">${O(n)}</label>
722
+ </div>
723
+ <p class="wui-consent-banner-category-description">${O(r)}</p>
724
+ </div>`;
725
+ }
726
+ var O = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), te = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), k = [
531
727
  "January",
532
728
  "February",
533
729
  "March",
@@ -540,7 +736,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
540
736
  "October",
541
737
  "November",
542
738
  "December"
543
- ], C = [
739
+ ], A = [
544
740
  "Su",
545
741
  "Mo",
546
742
  "Tu",
@@ -548,24 +744,24 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
548
744
  "Th",
549
745
  "Fr",
550
746
  "Sa"
551
- ], w = (e) => String(e).padStart(2, "0"), T = (e, t, n) => `${e}-${w(t + 1)}-${w(n)}`, E = (e) => {
747
+ ], j = (e) => String(e).padStart(2, "0"), M = (e, t, n) => `${e}-${j(t + 1)}-${j(n)}`, N = (e) => {
552
748
  let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
553
749
  return t ? {
554
750
  y: +t[1],
555
751
  m: t[2] - 1,
556
752
  d: +t[3]
557
753
  } : null;
558
- }, D = (e) => {
559
- let t = E(e);
560
- return t ? `${w(t.d)} ${S[t.m].slice(0, 3)} ${t.y}` : "";
561
- }, O = (e, t) => new Date(e, t + 1, 0).getDate(), k = (e, t) => {
754
+ }, P = (e) => {
755
+ let t = N(e);
756
+ return t ? `${j(t.d)} ${k[t.m].slice(0, 3)} ${t.y}` : "";
757
+ }, F = (e, t) => new Date(e, t + 1, 0).getDate(), I = (e, t) => {
562
758
  for (; t < 0;) t += 12, --e;
563
759
  for (; t > 11;) t -= 12, e += 1;
564
760
  return {
565
761
  y: e,
566
762
  m: t
567
763
  };
568
- }, ee = class extends e {
764
+ }, ne = class extends e {
569
765
  static formAssociated = !0;
570
766
  static get observedAttributes() {
571
767
  return [
@@ -616,13 +812,13 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
616
812
  }
617
813
  render() {
618
814
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
619
- let e = this.getAttribute("placeholder") || "Enter Date", t = E(this._value);
815
+ let e = this.getAttribute("placeholder") || "Enter Date", t = N(this._value);
620
816
  t && (this._viewY = t.y, this._viewM = t.m);
621
817
  let n = this.getAttribute("size"), r = n === "sm" ? " input-sm" : n === "lg" ? " input-lg" : "", i = this.getAttribute("aria-label"), a = this.getAttribute("aria-describedby");
622
818
  this.innerHTML = `
623
819
  <div class="datepicker">
624
820
  <button type="button" class="input datepicker-trigger${r}${t ? " has-value" : ""}" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${i ? ` aria-label="${g(i)}"` : ""}${a ? ` aria-describedby="${g(a)}"` : ""}>
625
- <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? D(this._value) : g(e)}</span>
821
+ <span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? P(this._value) : g(e)}</span>
626
822
  ${p("calendar-dots")}
627
823
  </button>
628
824
  <div class="datepicker-pop" role="dialog" aria-modal="false" hidden></div>
@@ -634,11 +830,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
634
830
  _syncTrigger() {
635
831
  let e = this.querySelector(".datepicker-trigger"), t = this.querySelector("[data-trigger-label]");
636
832
  if (!t) return;
637
- let n = E(this._value);
638
- t.textContent = n ? D(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
833
+ let n = N(this._value);
834
+ t.textContent = n ? P(this._value) : this.getAttribute("placeholder") || "Enter Date", t.classList.toggle("search-select-placeholder", !n), e?.classList.toggle("has-value", !!n);
639
835
  }
640
836
  _limits() {
641
- let e = E(this.getAttribute("min")), t = E(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
837
+ let e = N(this.getAttribute("min")), t = N(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
642
838
  return {
643
839
  dayDisabled: (e, t, i) => {
644
840
  let a = new Date(e, t, i).getTime();
@@ -646,7 +842,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
646
842
  },
647
843
  monthDisabled: (e, t) => {
648
844
  let i = new Date(e, t, 1).getTime();
649
- return new Date(e, t, O(e, t)).getTime() < n || i > r;
845
+ return new Date(e, t, F(e, t)).getTime() < n || i > r;
650
846
  },
651
847
  yearDisabled: (e) => {
652
848
  let t = new Date(e, 0, 1).getTime();
@@ -659,28 +855,28 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
659
855
  e && (this._mode === "months" ? e.innerHTML = this._monthsHtml() : this._mode === "years" ? e.innerHTML = this._yearsHtml() : e.innerHTML = this._daysHtml(), this._focusActive());
660
856
  }
661
857
  _daysHtml() {
662
- let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = O(this._viewY, this._viewM), r = E(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
858
+ let e = this._firstDay(), t = (new Date(this._viewY, this._viewM, 1).getDay() - e + 7) % 7, n = F(this._viewY, this._viewM), r = N(this._value), i = /* @__PURE__ */ new Date(), { dayDisabled: a } = this._limits(), o = this._focus || r || {
663
859
  y: this._viewY,
664
860
  m: this._viewM,
665
861
  d: 1
666
862
  }, s = (e, t, n, s) => {
667
- let c = T(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
863
+ let c = M(e, t, n), l = r && r.y === e && r.m === t && r.d === n, u = i.getFullYear() === e && i.getMonth() === t && i.getDate() === n, d = o.y === e && o.m === t && o.d === n, f = a(e, t, n);
668
864
  return `<button type="button" class="${[
669
865
  "datepicker-day",
670
866
  s ? "is-outside" : "",
671
867
  u ? "is-today" : "",
672
868
  l ? "is-selected" : ""
673
869
  ].filter(Boolean).join(" ")}" data-iso="${c}" role="gridcell" tabindex="${d && !f ? "0" : "-1"}"${l ? " aria-selected=\"true\"" : ""}${f ? " disabled aria-disabled=\"true\"" : ""}>${n}</button>`;
674
- }, c = "", l = k(this._viewY, this._viewM - 1), u = O(l.y, l.m);
870
+ }, c = "", l = I(this._viewY, this._viewM - 1), u = F(l.y, l.m);
675
871
  for (let e = t - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
676
872
  for (let e = 1; e <= n; e++) c += s(this._viewY, this._viewM, e, !1);
677
- let d = k(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
873
+ let d = I(this._viewY, this._viewM + 1), f = (7 - (t + n) % 7) % 7;
678
874
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
679
- let m = C.map((t, n) => C[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
875
+ let m = A.map((t, n) => A[(n + e) % 7]).map((e) => `<span>${e}</span>`).join("");
680
876
  return `
681
877
  <div class="datepicker-head">
682
878
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${p("chevron-left")}</button>
683
- <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${S[this._viewM]} ${this._viewY}</button>
879
+ <button type="button" class="datepicker-month" data-view="months" aria-label="Choose month and year">${k[this._viewM]} ${this._viewY}</button>
684
880
  <button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month">${p("chevron-right")}</button>
685
881
  </div>
686
882
  <div class="datepicker-weekdays">${m}</div>
@@ -691,14 +887,14 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
691
887
  </div>`;
692
888
  }
693
889
  _monthsHtml() {
694
- let e = E(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
890
+ let e = N(this._value), t = /* @__PURE__ */ new Date(), { monthDisabled: n } = this._limits(), r = "";
695
891
  for (let i = 0; i < 12; i++) {
696
892
  let a = e && e.y === this._viewY && e.m === i, o = t.getFullYear() === this._viewY && t.getMonth() === i, s = n(this._viewY, i), c = [
697
893
  "datepicker-cell",
698
894
  o ? "is-today" : "",
699
895
  a ? "is-selected" : ""
700
896
  ].filter(Boolean).join(" ");
701
- r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${S[i].slice(0, 3)}</button>`;
897
+ r += `<button type="button" class="${c}" data-month="${i}"${s ? " disabled" : ""}>${k[i].slice(0, 3)}</button>`;
702
898
  }
703
899
  return `
704
900
  <div class="datepicker-head">
@@ -709,7 +905,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
709
905
  <div class="datepicker-cells">${r}</div>`;
710
906
  }
711
907
  _yearsHtml() {
712
- let e = E(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
908
+ let e = N(this._value), t = (/* @__PURE__ */ new Date()).getFullYear(), { yearDisabled: n } = this._limits(), r = this._viewY - (this._viewY % 10 + 10) % 10 - 1, i = "";
713
909
  for (let a = 0; a < 12; a++) {
714
910
  let o = r + a, s = e && e.y === o, c = t === o, l = n(o), u = [
715
911
  "datepicker-cell",
@@ -734,21 +930,21 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
734
930
  s(e, t, { clampHeight: !0 });
735
931
  }
736
932
  _setFocus(e, t, n, r) {
737
- let { y: i, m: a } = k(e, t);
933
+ let { y: i, m: a } = I(e, t);
738
934
  this._focus = {
739
935
  y: i,
740
936
  m: a,
741
937
  d: n
742
938
  };
743
939
  let o = i !== this._viewY || a !== this._viewM;
744
- this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${T(i, a, n)}"]`)?.focus();
940
+ this._viewY = i, this._viewM = a, this._slide = o && r || "", this._renderView(), this._slide = "", this.querySelector(`.datepicker-day[data-iso="${M(i, a, n)}"]`)?.focus();
745
941
  }
746
942
  _onKey(e) {
747
943
  if (this._mode !== "days") {
748
944
  e.key === "Escape" && this._close();
749
945
  return;
750
946
  }
751
- let t = this._focus || E(this._value) || {
947
+ let t = this._focus || N(this._value) || {
752
948
  y: this._viewY,
753
949
  m: this._viewM,
754
950
  d: 1
@@ -766,17 +962,17 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
766
962
  case "End": return n(6 - (new Date(t.y, t.m, t.d).getDay() - this._firstDay() + 7) % 7, "slide-next");
767
963
  case "PageUp": {
768
964
  e.preventDefault();
769
- let n = k(t.y, t.m - (e.shiftKey ? 12 : 1));
770
- return this._setFocus(n.y, n.m, Math.min(t.d, O(n.y, n.m)), "slide-prev");
965
+ let n = I(t.y, t.m - (e.shiftKey ? 12 : 1));
966
+ return this._setFocus(n.y, n.m, Math.min(t.d, F(n.y, n.m)), "slide-prev");
771
967
  }
772
968
  case "PageDown": {
773
969
  e.preventDefault();
774
- let n = k(t.y, t.m + (e.shiftKey ? 12 : 1));
775
- return this._setFocus(n.y, n.m, Math.min(t.d, O(n.y, n.m)), "slide-next");
970
+ let n = I(t.y, t.m + (e.shiftKey ? 12 : 1));
971
+ return this._setFocus(n.y, n.m, Math.min(t.d, F(n.y, n.m)), "slide-next");
776
972
  }
777
973
  case "Enter":
778
974
  case " ":
779
- e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = T(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
975
+ e.preventDefault(), this._limits().dayDisabled(t.y, t.m, t.d) || (this.value = M(t.y, t.m, t.d), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close());
780
976
  return;
781
977
  case "Escape": return this._close();
782
978
  default:
@@ -788,7 +984,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
788
984
  if (!e || !t) return;
789
985
  let r = () => !t.hidden;
790
986
  this._open = () => {
791
- let r = /* @__PURE__ */ new Date(), i = E(this._value);
987
+ let r = /* @__PURE__ */ new Date(), i = N(this._value);
792
988
  (i || !this._viewNavigated) && (this._viewY = r.getFullYear(), this._viewM = r.getMonth()), this._mode = "days";
793
989
  let a = r.getFullYear() === this._viewY && r.getMonth() === this._viewM, o = i && i.y === this._viewY && i.m === this._viewM;
794
990
  this._focus = o ? i : {
@@ -803,7 +999,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
803
999
  let t = e.target.closest("[data-nav]");
804
1000
  if (t) {
805
1001
  this._viewNavigated = !0, this._slide = Number(t.dataset.nav) < 0 ? "slide-prev" : "slide-next";
806
- let e = k(this._viewY, this._viewM + Number(t.dataset.nav));
1002
+ let e = I(this._viewY, this._viewM + Number(t.dataset.nav));
807
1003
  this._viewY = e.y, this._viewM = e.m, this._focus = {
808
1004
  y: e.y,
809
1005
  m: e.m,
@@ -842,7 +1038,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
842
1038
  }
843
1039
  if (e.target.closest("[data-today]")) {
844
1040
  let e = /* @__PURE__ */ new Date();
845
- this.value = T(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
1041
+ this.value = M(e.getFullYear(), e.getMonth(), e.getDate()), this.dispatchEvent(new Event("change", { bubbles: !0 })), this._close();
846
1042
  return;
847
1043
  }
848
1044
  if (e.target.closest("[data-clear]")) {
@@ -870,7 +1066,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
870
1066
  disconnectedCallback() {
871
1067
  this._teardown();
872
1068
  }
873
- }, te = class extends e {
1069
+ }, re = class extends e {
874
1070
  static formAssociated = !0;
875
1071
  static get observedAttributes() {
876
1072
  return [
@@ -929,13 +1125,13 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
929
1125
  text: e,
930
1126
  empty: !0
931
1127
  } : {
932
- text: `${D(this._start) || "Start"} – ${D(this._end) || "End"}`,
1128
+ text: `${P(this._start) || "Start"} – ${P(this._end) || "End"}`,
933
1129
  empty: !1
934
1130
  };
935
1131
  }
936
1132
  render() {
937
1133
  this._defaultStart === void 0 && (this._defaultStart = this.getAttribute("start") || "", this._defaultEnd = this.getAttribute("end") || "", this._start = this._defaultStart || this._start, this._end = this._defaultEnd || this._end);
938
- let e = E(this._start);
1134
+ let e = N(this._start);
939
1135
  e && (this._viewY = e.y, this._viewM = e.m);
940
1136
  let t = this.getAttribute("size"), n = t === "sm" ? " input-sm" : t === "lg" ? " input-lg" : "", { text: r, empty: i } = this._label(), a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
941
1137
  this.innerHTML = `
@@ -969,24 +1165,24 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
969
1165
  r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute("data-range-mirror", e), this.appendChild(r)), r.name = t, r.value = n || "", r.disabled = this.hasAttribute("disabled");
970
1166
  }
971
1167
  _limits() {
972
- let e = E(this.getAttribute("min")), t = E(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
1168
+ let e = N(this.getAttribute("min")), t = N(this.getAttribute("max")), n = e ? new Date(e.y, e.m, e.d).getTime() : -Infinity, r = t ? new Date(t.y, t.m, t.d).getTime() : Infinity;
973
1169
  return (e, t, i) => {
974
1170
  let a = new Date(e, t, i).getTime();
975
1171
  return a < n || a > r;
976
1172
  };
977
1173
  }
978
1174
  _monthHtml(e, t) {
979
- let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = O(e, t), a = this._limits(), o = C.map((e, t) => C[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
980
- let i = T(e, t, n), o = a(e, t, n);
1175
+ let n = this._firstDay(), r = (new Date(e, t, 1).getDay() - n + 7) % 7, i = F(e, t), a = this._limits(), o = A.map((e, t) => A[(t + n) % 7]).map((e) => `<span>${e}</span>`).join(""), s = (e, t, n, r) => {
1176
+ let i = M(e, t, n), o = a(e, t, n);
981
1177
  return `<button type="button" class="${["datepicker-day", r ? "is-outside" : ""].filter(Boolean).join(" ")}" data-iso="${i}"${o ? " disabled" : ""}>${n}</button>`;
982
- }, c = "", l = k(e, t - 1), u = O(l.y, l.m);
1178
+ }, c = "", l = I(e, t - 1), u = F(l.y, l.m);
983
1179
  for (let e = r - 1; e >= 0; e--) c += s(l.y, l.m, u - e, !0);
984
1180
  for (let n = 1; n <= i; n++) c += s(e, t, n, !1);
985
- let d = k(e, t + 1), f = (7 - (r + i) % 7) % 7;
1181
+ let d = I(e, t + 1), f = (7 - (r + i) % 7) % 7;
986
1182
  for (let e = 1; e <= f; e++) c += s(d.y, d.m, e, !0);
987
1183
  return `
988
1184
  <div class="daterange-cal">
989
- <div class="datepicker-month-label">${S[t]} ${e}</div>
1185
+ <div class="datepicker-month-label">${k[t]} ${e}</div>
990
1186
  <div class="datepicker-weekdays">${o}</div>
991
1187
  <div class="datepicker-grid" role="grid">${c}</div>
992
1188
  </div>`;
@@ -994,7 +1190,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
994
1190
  _renderView() {
995
1191
  let e = this.querySelector(".daterange-pop");
996
1192
  if (!e) return;
997
- let t = k(this._viewY, this._viewM + 1);
1193
+ let t = I(this._viewY, this._viewM + 1);
998
1194
  e.innerHTML = `
999
1195
  <div class="daterange-head">
1000
1196
  <button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month">${p("chevron-left")}</button>
@@ -1020,7 +1216,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1020
1216
  n.classList.toggle("is-range-start", i), n.classList.toggle("is-range-end", a), n.classList.toggle("in-range", o);
1021
1217
  }
1022
1218
  let i = e.querySelector("[data-range-hint]");
1023
- i && (i.textContent = this._start ? this._end ? `${D(this._start)} – ${D(this._end)}` : "Pick an end date" : "Pick a start date");
1219
+ i && (i.textContent = this._start ? this._end ? `${P(this._start)} – ${P(this._end)}` : "Pick an end date" : "Pick a start date");
1024
1220
  }
1025
1221
  _position(e, t) {
1026
1222
  s(e, t, { clampHeight: !0 });
@@ -1042,7 +1238,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1042
1238
  if (!e || !t) return;
1043
1239
  let r = () => !t.hidden;
1044
1240
  this._open = () => {
1045
- let r = E(this._start);
1241
+ let r = N(this._start);
1046
1242
  if (r) this._viewY = r.y, this._viewM = r.m;
1047
1243
  else {
1048
1244
  let e = /* @__PURE__ */ new Date();
@@ -1055,7 +1251,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1055
1251
  this._popClick = !0;
1056
1252
  let t = e.target.closest("[data-nav]");
1057
1253
  if (t) {
1058
- let e = k(this._viewY, this._viewM + Number(t.dataset.nav));
1254
+ let e = I(this._viewY, this._viewM + Number(t.dataset.nav));
1059
1255
  this._viewY = e.y, this._viewM = e.m, this._renderView();
1060
1256
  return;
1061
1257
  }
@@ -1085,7 +1281,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1085
1281
  disconnectedCallback() {
1086
1282
  this._teardown();
1087
1283
  }
1088
- }, ne = class extends e {
1284
+ }, ie = class extends e {
1089
1285
  static get observedAttributes() {
1090
1286
  return [
1091
1287
  "static",
@@ -1106,10 +1302,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1106
1302
  e === "static" && this.isConnected && this._wire();
1107
1303
  }
1108
1304
  _maxScale() {
1109
- return re(this.getAttribute("max-scale"), 1.6);
1305
+ return ae(this.getAttribute("max-scale"), 1.6);
1110
1306
  }
1111
1307
  _radius() {
1112
- return re(this.getAttribute("radius"), 100);
1308
+ return ae(this.getAttribute("radius"), 100);
1113
1309
  }
1114
1310
  _magnifyEnabled() {
1115
1311
  return !(this.hasAttribute("static") || typeof matchMedia == "function" && (matchMedia("(pointer: coarse)").matches || matchMedia("(prefers-reduced-motion: reduce)").matches));
@@ -1134,10 +1330,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1134
1330
  _teardown() {
1135
1331
  this._pointerMoveListener &&= (this.removeEventListener("pointermove", this._pointerMoveListener), null), this._pointerLeaveListener &&= (this.removeEventListener("pointerleave", this._pointerLeaveListener), null), this._resetMagnification();
1136
1332
  }
1137
- }, re = (e, t) => {
1333
+ }, ae = (e, t) => {
1138
1334
  let n = Number.parseFloat(e);
1139
1335
  return Number.isFinite(n) ? n : t;
1140
- }, A = "wui-feedback-submit", j = {
1336
+ }, L = "wui-feedback-submit", R = {
1141
1337
  label: "Feedback",
1142
1338
  heading: "Share feedback",
1143
1339
  placeholder: "What's working, what isn't?",
@@ -1148,7 +1344,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1148
1344
  emptyError: "Please write a message before sending.",
1149
1345
  failedError: "That didn't send. Please try again.",
1150
1346
  thanks: "Thanks — we've got it."
1151
- }, ie = 1e4, ae = 1600, oe = class extends e {
1347
+ }, oe = 1e4, se = 1600, ce = class extends e {
1152
1348
  static get observedAttributes() {
1153
1349
  return [
1154
1350
  "position",
@@ -1170,19 +1366,19 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1170
1366
  this.setAttribute("position", String(e ?? "bottom-right"));
1171
1367
  }
1172
1368
  get label() {
1173
- return this.getAttribute("label") || j.label;
1369
+ return this.getAttribute("label") || R.label;
1174
1370
  }
1175
1371
  set label(e) {
1176
1372
  this.setAttribute("label", String(e ?? ""));
1177
1373
  }
1178
1374
  get heading() {
1179
- return this.getAttribute("heading") || j.heading;
1375
+ return this.getAttribute("heading") || R.heading;
1180
1376
  }
1181
1377
  set heading(e) {
1182
1378
  this.setAttribute("heading", String(e ?? ""));
1183
1379
  }
1184
1380
  get placeholder() {
1185
- return this.getAttribute("placeholder") || j.placeholder;
1381
+ return this.getAttribute("placeholder") || R.placeholder;
1186
1382
  }
1187
1383
  set placeholder(e) {
1188
1384
  this.setAttribute("placeholder", String(e ?? ""));
@@ -1197,10 +1393,10 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1197
1393
  return this._open === !0;
1198
1394
  }
1199
1395
  addEventListener(e, t, n) {
1200
- e === A && (this._submitListeners += 1), super.addEventListener(e, t, n);
1396
+ e === L && (this._submitListeners += 1), super.addEventListener(e, t, n);
1201
1397
  }
1202
1398
  removeEventListener(e, t, n) {
1203
- e === A && this._submitListeners > 0 && --this._submitListeners, super.removeEventListener(e, t, n);
1399
+ e === L && this._submitListeners > 0 && --this._submitListeners, super.removeEventListener(e, t, n);
1204
1400
  }
1205
1401
  connectedCallback() {
1206
1402
  this._rendered || this.render();
@@ -1216,31 +1412,31 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1216
1412
  this.innerHTML = `
1217
1413
  <button type="button" class="feedback-trigger" aria-expanded="false" aria-haspopup="dialog">
1218
1414
  <span class="feedback-trigger-icon" aria-hidden="true">${p("message-square", { size: 18 })}</span>
1219
- <span class="feedback-trigger-label">${se(this.label)}</span>
1415
+ <span class="feedback-trigger-label">${le(this.label)}</span>
1220
1416
  </button>
1221
- <div class="feedback-panel" role="dialog" aria-label="${ce(this.heading)}" hidden>
1417
+ <div class="feedback-panel" role="dialog" aria-label="${ue(this.heading)}" hidden>
1222
1418
  <div class="feedback-head">
1223
- <h2 class="feedback-heading">${se(this.heading)}</h2>
1419
+ <h2 class="feedback-heading">${le(this.heading)}</h2>
1224
1420
  <button type="button" class="feedback-close" aria-label="Close">${p("x", { size: 16 })}</button>
1225
1421
  </div>
1226
1422
  <div class="feedback-body">
1227
1423
  <label class="feedback-field">
1228
- <span class="feedback-field-label">${j.messageLabel}</span>
1229
- <textarea class="feedback-message" rows="4" required placeholder="${ce(this.placeholder)}"></textarea>
1424
+ <span class="feedback-field-label">${R.messageLabel}</span>
1425
+ <textarea class="feedback-message" rows="4" required placeholder="${ue(this.placeholder)}"></textarea>
1230
1426
  </label>
1231
1427
  ${this.collectEmail ? `<label class="feedback-field">
1232
- <span class="feedback-field-label">${j.emailLabel}</span>
1428
+ <span class="feedback-field-label">${R.emailLabel}</span>
1233
1429
  <input type="email" class="feedback-email" autocomplete="email" placeholder="you@example.com" />
1234
1430
  </label>` : ""}
1235
1431
  <p class="feedback-error" role="alert" hidden></p>
1236
1432
  </div>
1237
1433
  <div class="feedback-actions">
1238
1434
  <button type="button" class="feedback-cancel">Cancel</button>
1239
- <button type="button" class="feedback-submit">${j.submitLabel}</button>
1435
+ <button type="button" class="feedback-submit">${R.submitLabel}</button>
1240
1436
  </div>
1241
1437
  <div class="feedback-thanks" hidden>
1242
1438
  <span class="feedback-thanks-icon" aria-hidden="true">${p("check-circle", { size: 20 })}</span>
1243
- <span class="feedback-thanks-text">${j.thanks}</span>
1439
+ <span class="feedback-thanks-text">${R.thanks}</span>
1244
1440
  </div>
1245
1441
  </div>`, this._rendered = !0, this._wire();
1246
1442
  let r = this._refs();
@@ -1278,18 +1474,18 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1278
1474
  let { thanks: e, error: t, submit: n, message: r, email: i } = this._refs();
1279
1475
  this._setBusy(!1), t && (t.hidden = !0, t.textContent = ""), e && (e.hidden = !1), this.querySelector(".feedback-body")?.setAttribute("hidden", ""), this.querySelector(".feedback-actions")?.setAttribute("hidden", ""), n && (n.disabled = !0), this._thanksTimer = setTimeout(() => {
1280
1476
  r && (r.value = ""), i && (i.value = ""), this._reset(), this.close();
1281
- }, ae);
1477
+ }, se);
1282
1478
  }
1283
1479
  failed(e) {
1284
1480
  this._clearTimers(), this._state = "error", this._setBusy(!1);
1285
1481
  let { error: t, message: n } = this._refs();
1286
- t && (t.textContent = e || j.failedError, t.hidden = !1), n?.focus();
1482
+ t && (t.textContent = e || R.failedError, t.hidden = !1), n?.focus();
1287
1483
  }
1288
1484
  _submit() {
1289
1485
  if (this._state === "submitting") return;
1290
1486
  let { message: e, email: t, error: n } = this._refs(), r = (e?.value ?? "").trim();
1291
1487
  if (!r) {
1292
- n && (n.textContent = j.emptyError, n.hidden = !1), e?.focus();
1488
+ n && (n.textContent = R.emptyError, n.hidden = !1), e?.focus();
1293
1489
  return;
1294
1490
  }
1295
1491
  n && (n.hidden = !0, n.textContent = ""), this._state = "submitting", this._setBusy(!0);
@@ -1299,7 +1495,7 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1299
1495
  surface: this.getAttribute("surface") || "",
1300
1496
  screen: this.getAttribute("screen") || ""
1301
1497
  };
1302
- if (this.dispatchEvent(new CustomEvent(A, {
1498
+ if (this.dispatchEvent(new CustomEvent(L, {
1303
1499
  bubbles: !0,
1304
1500
  composed: !0,
1305
1501
  detail: i
@@ -1309,11 +1505,11 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1309
1505
  }
1310
1506
  this._timer = setTimeout(() => {
1311
1507
  this._state === "submitting" && this.failed();
1312
- }, ie);
1508
+ }, oe);
1313
1509
  }
1314
1510
  _setBusy(e) {
1315
1511
  let { submit: t } = this._refs();
1316
- t && (t.disabled = e, t.textContent = e ? j.sendingLabel : j.submitLabel, this.toggleAttribute("busy", e));
1512
+ t && (t.disabled = e, t.textContent = e ? R.sendingLabel : R.submitLabel, this.toggleAttribute("busy", e));
1317
1513
  }
1318
1514
  _reset() {
1319
1515
  this._clearTimers(), this._state = "idle", this._setBusy(!1);
@@ -1323,23 +1519,23 @@ var h = Symbol("wui.trustedHtml"), g = (e) => String(e ?? "").replace(/&/g, "&am
1323
1519
  _clearTimers() {
1324
1520
  this._timer &&= (clearTimeout(this._timer), 0), this._thanksTimer &&= (clearTimeout(this._thanksTimer), 0);
1325
1521
  }
1326
- }, se = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ce = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = {
1522
+ }, le = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), ue = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), de = {
1327
1523
  enter: "Enter",
1328
1524
  comma: ",",
1329
1525
  space: " ",
1330
1526
  tab: "Tab"
1331
- }, ue = {
1527
+ }, fe = {
1332
1528
  enter: "\n",
1333
1529
  comma: ",",
1334
1530
  space: " ",
1335
1531
  tab: " "
1336
- }, de = (e) => le[e], fe = (e) => ue[e];
1337
- function pe(e, t) {
1532
+ }, pe = (e) => de[e], me = (e) => fe[e];
1533
+ function he(e, t) {
1338
1534
  let n = [String(e ?? "")];
1339
1535
  for (let e of t) n = n.flatMap((t) => t.split(e));
1340
1536
  return n.map((e) => e.trim()).filter(Boolean);
1341
1537
  }
1342
- var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends e {
1538
+ var z = (e, t) => t.some((t) => String(e ?? "").includes(t)), ge = class extends e {
1343
1539
  static formAssociated = !0;
1344
1540
  _accessibleName() {
1345
1541
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -1439,7 +1635,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1439
1635
  [h]: !0,
1440
1636
  selected: e.hasAttribute("selected")
1441
1637
  };
1442
- for (let [n, r] of he) {
1638
+ for (let [n, r] of _e) {
1443
1639
  let i = e.getAttribute(n);
1444
1640
  i && (t[r] = i);
1445
1641
  }
@@ -1470,23 +1666,23 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1470
1666
  <div class="search-select${a}">
1471
1667
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : ""}>
1472
1668
  ${r ? p(r, { className: "search-select-icon" }) : ""}
1473
- <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(o)}" aria-label="${F(this._accessibleName())}" aria-describedby="${F(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
1669
+ <div class="ms-chips" data-chips><input type="text" class="ms-input" data-input role="combobox" aria-autocomplete="list" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(o)}" aria-label="${H(this._accessibleName())}" aria-describedby="${H(e)}" autocomplete="off"${s ? " disabled" : ""} /></div>
1474
1670
  ${p("chevron-down", { className: "search-select-caret" })}
1475
1671
  </div>
1476
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1672
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${H(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1477
1673
  <div class="search-select-options"></div>
1478
1674
  </div>
1479
1675
  </div>
1480
- <div class="field-error wui-ms-custom-error" id="${F(e)}" aria-live="polite" hidden></div>`;
1676
+ <div class="field-error wui-ms-custom-error" id="${H(e)}" aria-live="polite" hidden></div>`;
1481
1677
  } else this.innerHTML = `
1482
1678
  <div class="search-select${a}">
1483
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${F(o)}" aria-label="${F(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1679
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(o)}" aria-label="${H(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${s ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1484
1680
  ${r ? p(r, { className: "search-select-icon" }) : ""}
1485
1681
  <div class="ms-chips" data-chips></div>
1486
1682
  ${p("chevron-down", { className: "search-select-caret" })}
1487
1683
  </div>
1488
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${F(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1489
- ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${F(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
1684
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${H(o)}" aria-multiselectable="true" tabindex="-1" hidden>
1685
+ ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${H(n)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
1490
1686
  <div class="search-select-options"></div>
1491
1687
  <div class="search-select-empty" hidden>No matches</div>
1492
1688
  </div>
@@ -1496,7 +1692,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1496
1692
  _renderControl() {
1497
1693
  let e = this.querySelector("[data-chips]");
1498
1694
  if (!e) return;
1499
- let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${F(e)}" aria-label="Remove ${F(I(this._labelFor(e)))}">${p("x")}</button></span>`).join("");
1695
+ let t = this.getAttribute("placeholder") || "Select…", n = this._allowCustom ? e.querySelector("[data-input]") : null, r = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${H(e)}" aria-label="Remove ${H(Ce(this._labelFor(e)))}">${p("x")}</button></span>`).join("");
1500
1696
  if (n) {
1501
1697
  for (let t of [...e.querySelectorAll(":scope > .chip")]) t.remove();
1502
1698
  n.insertAdjacentHTML("beforebegin", r), n.placeholder = this._values.length ? "" : t, this._collapseChips();
@@ -1527,11 +1723,11 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1527
1723
  i.textContent = `+${t.length - o}`;
1528
1724
  }
1529
1725
  _matches(e, t) {
1530
- return I(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
1726
+ return Ce(e.label).toLowerCase().includes(t) || String(e.description ?? "").toLowerCase().includes(t);
1531
1727
  }
1532
1728
  _optionNamed(e) {
1533
1729
  let t = e.trim().toLowerCase();
1534
- return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || I(e.label).trim().toLowerCase() === t);
1730
+ return this._readOptions().find((e) => String(e.value ?? "").toLowerCase() === t || Ce(e.label).trim().toLowerCase() === t);
1535
1731
  }
1536
1732
  _renderOptions(e) {
1537
1733
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
@@ -1540,9 +1736,9 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1540
1736
  i && (a = a.filter((e) => this._matches(e, i)));
1541
1737
  let o = this._listboxId || `${this.id || "wui-multiselect"}-listbox`, s = this._allowCustom && r && !this._optionNamed(r), c = a.map((e, t) => {
1542
1738
  let n = this._values.includes(String(e.value)), r = `${o}-opt-${t}`;
1543
- return ge(e) ? ye(e, r, n) : `<button type="button" role="option" id="${F(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${v(e)}</span><span class="ms-check">${p("check")}</span></button>`;
1739
+ return ve(e) ? xe(e, r, n) : `<button type="button" role="option" id="${H(r)}" class="search-select-option${n ? " selected" : ""}" data-value="${H(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${v(e)}</span><span class="ms-check">${p("check")}</span></button>`;
1544
1740
  });
1545
- s && c.push(`<button type="button" role="option" id="${F(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${F(r)}" data-custom="true" aria-selected="false">Add “${g(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
1741
+ s && c.push(`<button type="button" role="option" id="${H(`${o}-opt-${a.length}`)}" class="search-select-option search-select-option-custom" data-value="${H(r)}" data-custom="true" aria-selected="false">Add “${g(r)}”</button>`), t.innerHTML = c.join(""), n && (n.hidden = a.length > 0), this._active = -1, this._combobox()?.removeAttribute("aria-activedescendant"), this._allowCustom && this._syncCustomMenu?.(), this._reanchor?.();
1546
1742
  }
1547
1743
  _combobox() {
1548
1744
  return this._allowCustom ? this.querySelector("[data-input]") : this.querySelector(".search-select-control");
@@ -1555,7 +1751,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1555
1751
  _customRefusal(e) {
1556
1752
  let t = this.getAttribute("custom-invalid-message") || "Enter a valid value.", n = this.getAttribute("custom-pattern");
1557
1753
  if (n) {
1558
- let r = be(n);
1754
+ let r = Se(n);
1559
1755
  if (r && !r.test(e)) return t;
1560
1756
  }
1561
1757
  let r = this._validateCustom;
@@ -1606,35 +1802,35 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1606
1802
  a ? (_ = !1, y()) : (t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open")), g(-1), clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null, this._typeahead = "";
1607
1803
  }, S = () => {
1608
1804
  d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
1609
- }, C = (e) => {
1805
+ }, ee = (e) => {
1610
1806
  let t = String(e);
1611
1807
  if (this._values.includes(t)) this._values = this._values.filter((e) => e !== t);
1612
1808
  else if (a && this._values.some((e) => e.toLowerCase() === t.toLowerCase())) return;
1613
1809
  else this._values = [...this._values, t];
1614
1810
  this._renderControl(), this._renderOptions(this._query()), S();
1615
- }, w = (e) => {
1811
+ }, C = (e) => {
1616
1812
  this._values = this._values.filter((t) => t !== String(e)), this._renderControl(), this._renderOptions(this._query()), S();
1617
- }, T = (e, { quiet: t = !1 } = {}) => {
1618
- let n = this._values.length, r = M(e, N) ? pe(e, N) : [e], i = [], a = "";
1813
+ }, w = (e, { quiet: t = !1 } = {}) => {
1814
+ let n = this._values.length, r = z(e, B) ? he(e, B) : [e], i = [], a = "";
1619
1815
  for (let e of r) {
1620
1816
  let t = this._commitTyped(e);
1621
1817
  t && (i.push(e.trim()), a ||= t);
1622
1818
  }
1623
1819
  t && i.length || (o.value = i.join(", "), this._setCustomError(a), this._values.length !== n && (this._renderControl(), S()), this._renderOptions(o.value));
1624
- }, E = (e) => {
1820
+ }, T = (e) => {
1625
1821
  if (!(!e || e.getAttribute("aria-disabled") === "true")) {
1626
1822
  if (e.dataset.custom === "true") {
1627
- T(e.dataset.value);
1823
+ w(e.dataset.value);
1628
1824
  return;
1629
1825
  }
1630
- C(e.dataset.value), o?.value && (o.value = "", this._setCustomError(""), this._renderOptions(""));
1826
+ ee(e.dataset.value), o?.value && (o.value = "", this._setCustomError(""), this._renderOptions(""));
1631
1827
  }
1632
1828
  };
1633
1829
  e.addEventListener("click", (e) => {
1634
1830
  if (u()) return;
1635
1831
  let t = e.target.closest("[data-remove]");
1636
1832
  if (t) {
1637
- e.stopPropagation(), w(t.dataset.remove), o?.focus();
1833
+ e.stopPropagation(), C(t.dataset.remove), o?.focus();
1638
1834
  return;
1639
1835
  }
1640
1836
  if (o) {
@@ -1645,7 +1841,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1645
1841
  v() ? x() : b();
1646
1842
  }), i.addEventListener("click", (e) => {
1647
1843
  let t = e.target.closest(".search-select-option");
1648
- t && (E(t), (o || n)?.focus());
1844
+ t && (T(t), (o || n)?.focus());
1649
1845
  }), i.addEventListener("mousemove", (e) => {
1650
1846
  let t = e.target.closest(".search-select-option");
1651
1847
  t && g(h().indexOf(t));
@@ -1658,21 +1854,21 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1658
1854
  getActive: () => this._active,
1659
1855
  setActive: (e) => g(e),
1660
1856
  onEnter: (e) => {
1661
- e ? E(e) : o?.value.trim() && T(o.value);
1857
+ e ? T(e) : o?.value.trim() && w(o.value);
1662
1858
  },
1663
1859
  onEscape: () => {
1664
1860
  this._navHandler.clearTypeahead(), x(), o || e.focus();
1665
1861
  }
1666
1862
  });
1667
- let D = (e) => {
1863
+ let E = (e) => {
1668
1864
  let t = o || n;
1669
1865
  if (e.key === "Backspace" && !t?.value && this._values.length) {
1670
- w(this._values[this._values.length - 1]);
1866
+ C(this._values[this._values.length - 1]);
1671
1867
  return;
1672
1868
  }
1673
1869
  this._navHandler.handler(e);
1674
1870
  };
1675
- if (n?.addEventListener("keydown", D), r?.addEventListener("click", () => {
1871
+ if (n?.addEventListener("keydown", E), r?.addEventListener("click", () => {
1676
1872
  n.value = "", this._renderOptions(""), r.hidden = !0, n.focus();
1677
1873
  }), o) {
1678
1874
  let t = (e) => {
@@ -1682,7 +1878,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1682
1878
  this._customError && this._setCustomError(""), this._renderOptions(o.value), b();
1683
1879
  }), o.addEventListener("keydown", (e) => {
1684
1880
  if (e.key === "," && o.value.trim()) {
1685
- e.preventDefault(), T(o.value);
1881
+ e.preventDefault(), w(o.value);
1686
1882
  return;
1687
1883
  }
1688
1884
  if (e.key === "Enter") {
@@ -1690,16 +1886,16 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1690
1886
  this._navHandler.handler(e);
1691
1887
  return;
1692
1888
  }
1693
- (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), D(e);
1889
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && !v() && b(), E(e);
1694
1890
  }), o.addEventListener("paste", (e) => {
1695
1891
  let t = e.clipboardData?.getData("text/plain") ?? "";
1696
- M(t, N) && (e.preventDefault(), T(`${o.value}${t}`));
1892
+ z(t, B) && (e.preventDefault(), w(`${o.value}${t}`));
1697
1893
  }), o.addEventListener("blur", (e) => {
1698
- e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && T(o.value, { quiet: !0 }), x());
1894
+ e.relatedTarget && this.contains(e.relatedTarget) || (o.value.trim() && w(o.value, { quiet: !0 }), x());
1699
1895
  });
1700
1896
  } else e.addEventListener("keydown", (e) => {
1701
1897
  if (v()) {
1702
- D(e);
1898
+ E(e);
1703
1899
  return;
1704
1900
  }
1705
1901
  (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), b());
@@ -1718,35 +1914,35 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1718
1914
  disconnectedCallback() {
1719
1915
  this._teardown(), this._ro?.disconnect(), this._ro = null;
1720
1916
  }
1721
- }, N = [
1917
+ }, B = [
1722
1918
  ",",
1723
1919
  ";",
1724
1920
  "\n",
1725
1921
  " "
1726
- ], he = [
1922
+ ], _e = [
1727
1923
  ["description", "description"],
1728
1924
  ["avatar", "avatar"],
1729
1925
  ["initials", "initials"],
1730
1926
  ["disabled-hint", "disabledHint"]
1731
- ], ge = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), _e = (e) => {
1927
+ ], ve = (e) => !!(e.description || e.avatar || e.initials || e.disabled || e.disabledHint), ye = (e) => {
1732
1928
  let t = String(e ?? "").trim();
1733
1929
  return /^(https?:)?\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^data:image\/(png|jpe?g|gif|webp|avif);/i.test(t) ? t : "";
1734
- }, ve = (e) => {
1735
- let t = _e(e.avatar);
1736
- return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${g(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${F(t)}" alt="" />` : ""}</span>`;
1737
- }, ye = (e, t, n) => {
1930
+ }, be = (e) => {
1931
+ let t = ye(e.avatar);
1932
+ return !t && !e.initials ? "" : `<span class="avatar wui-opt-avatar" aria-hidden="true"><span class="avatar-face">${g(e.initials ?? "")}</span>${t ? `<img class="avatar-img" src="${H(t)}" alt="" />` : ""}</span>`;
1933
+ }, xe = (e, t, n) => {
1738
1934
  let r = !!e.disabled, i = e.description ? `<span class="wui-opt-desc">${g(e.description)}</span>` : "", a = e.disabledHint && r ? `<span class="wui-opt-hint">${g(e.disabledHint)}</span>` : "";
1739
- return `<button type="button" role="option" id="${F(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${F(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${v(e)}</span>${i}</span>${a}${ve(e)}<span class="ms-check">${p("check")}</span></button>`;
1740
- }, P = /* @__PURE__ */ new Map(), be = (e) => {
1741
- if (P.has(e)) return P.get(e);
1935
+ return `<button type="button" role="option" id="${H(t)}" class="search-select-option wui-opt-rich${n ? " selected" : ""}" data-value="${H(e.value)}" aria-selected="${n}"${r ? " aria-disabled=\"true\"" : ""}><span class="ms-opt-label"><span class="wui-opt-name">${v(e)}</span>${i}</span>${a}${be(e)}<span class="ms-check">${p("check")}</span></button>`;
1936
+ }, V = /* @__PURE__ */ new Map(), Se = (e) => {
1937
+ if (V.has(e)) return V.get(e);
1742
1938
  let t = null;
1743
1939
  try {
1744
1940
  t = RegExp(`^(?:${e})$`, "u");
1745
1941
  } catch {
1746
1942
  console.warn(`<wui-multiselect> custom-pattern is not a valid regular expression and is ignored: ${e}`);
1747
1943
  }
1748
- return P.set(e, t), t;
1749
- }, F = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), I = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), xe = /[^0-9]/g, Se = /[^0-9a-zA-Z]/g, Ce = class extends e {
1944
+ return V.set(e, t), t;
1945
+ }, H = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ce = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), we = /[^0-9]/g, Te = /[^0-9a-zA-Z]/g, Ee = class extends e {
1750
1946
  static formAssociated = !0;
1751
1947
  static get observedAttributes() {
1752
1948
  return [
@@ -1777,7 +1973,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1777
1973
  this._value = this._clean(e), d(this, this._value), this._paint();
1778
1974
  }
1779
1975
  _clean(e) {
1780
- return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Se : xe, "").slice(0, this.length);
1976
+ return (e == null ? "" : String(e)).replace(this.mode === "alphanumeric" ? Te : we, "").slice(0, this.length);
1781
1977
  }
1782
1978
  constructor() {
1783
1979
  super();
@@ -1868,7 +2064,7 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
1868
2064
  disconnectedCallback() {
1869
2065
  this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
1870
2066
  }
1871
- }, L = [
2067
+ }, De = [
1872
2068
  [
1873
2069
  "AF",
1874
2070
  "Afghanistan",
@@ -3094,11 +3290,11 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
3094
3290
  "Zimbabwe",
3095
3291
  "263"
3096
3292
  ]
3097
- ], R = (e) => (L.find((t) => t[0] === e) || [
3293
+ ], U = (e) => (De.find((t) => t[0] === e) || [
3098
3294
  "",
3099
3295
  "",
3100
3296
  ""
3101
- ])[2], we = {
3297
+ ])[2], Oe = {
3102
3298
  AD: ["Europe/Andorra"],
3103
3299
  AE: ["Asia/Dubai"],
3104
3300
  AF: ["Asia/Kabul"],
@@ -3500,13 +3696,13 @@ var M = (e, t) => t.some((t) => String(e ?? "").includes(t)), me = class extends
3500
3696
  ZA: ["Africa/Johannesburg"],
3501
3697
  ZM: ["Africa/Lusaka"],
3502
3698
  ZW: ["Africa/Harare"]
3503
- }, Te = new Set(L.map(([e]) => e)), Ee = /* @__PURE__ */ new Map();
3504
- for (let [e, t] of Object.entries(we)) for (let n of t) Ee.set(n, e);
3505
- function De(e) {
3506
- let t = Ee.get(e);
3507
- return t && Te.has(t) ? t : null;
3699
+ }, ke = new Set(De.map(([e]) => e)), Ae = /* @__PURE__ */ new Map();
3700
+ for (let [e, t] of Object.entries(Oe)) for (let n of t) Ae.set(n, e);
3701
+ function je(e) {
3702
+ let t = Ae.get(e);
3703
+ return t && ke.has(t) ? t : null;
3508
3704
  }
3509
- function Oe(e) {
3705
+ function Me(e) {
3510
3706
  if (!e) return null;
3511
3707
  let t;
3512
3708
  try {
@@ -3514,9 +3710,9 @@ function Oe(e) {
3514
3710
  } catch {
3515
3711
  return null;
3516
3712
  }
3517
- return t && Te.has(t) ? t : null;
3713
+ return t && ke.has(t) ? t : null;
3518
3714
  }
3519
- function ke() {
3715
+ function Ne() {
3520
3716
  let e;
3521
3717
  try {
3522
3718
  e = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -3524,77 +3720,77 @@ function ke() {
3524
3720
  e = void 0;
3525
3721
  }
3526
3722
  let t = typeof navigator > "u" ? void 0 : navigator.language;
3527
- return De(e) || Oe(t) || "IN";
3723
+ return je(e) || Me(t) || "IN";
3528
3724
  }
3529
3725
  //#endregion
3530
3726
  //#region src/WuiPhone.js
3531
- var z = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, B = null, Ae = null;
3532
- function je() {
3533
- return B ? Promise.resolve(B) : (Ae ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (B = {
3727
+ var Pe = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, W = null, Fe = null;
3728
+ function Ie() {
3729
+ return W ? Promise.resolve(W) : (Fe ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (W = {
3534
3730
  AsYouType: e.AsYouType,
3535
3731
  getExampleNumber: e.getExampleNumber,
3536
3732
  isValidPhoneNumber: e.isValidPhoneNumber,
3537
3733
  parsePhoneNumber: e.parsePhoneNumber,
3538
3734
  examples: t.default || t
3539
- }, B)).catch(() => null), Ae);
3735
+ }, W)).catch(() => null), Fe);
3540
3736
  }
3541
- function Me(e, t) {
3542
- let n = `+${R(e)}`;
3737
+ function Le(e, t) {
3738
+ let n = `+${U(e)}`;
3543
3739
  return t?.startsWith(n) ? t.slice(n.length).trimStart() : null;
3544
3740
  }
3545
- function V(e, t) {
3546
- if (!B || !t) return t;
3741
+ function G(e, t) {
3742
+ if (!W || !t) return t;
3547
3743
  try {
3548
- return Me(e, new B.AsYouType(e).input(`+${R(e)}${t}`)) || t;
3744
+ return Le(e, new W.AsYouType(e).input(`+${U(e)}${t}`)) || t;
3549
3745
  } catch {
3550
3746
  return t;
3551
3747
  }
3552
3748
  }
3553
- function Ne(e, t) {
3749
+ function Re(e, t) {
3554
3750
  if (t <= 0) return 0;
3555
3751
  let n = 0;
3556
3752
  for (let r = 0; r < e.length; r++) if (/[0-9]/.test(e[r]) && (n += 1, n === t)) return r + 1;
3557
3753
  return e.length;
3558
3754
  }
3559
- function H(e) {
3560
- if (!B) return null;
3755
+ function K(e) {
3756
+ if (!W) return null;
3561
3757
  try {
3562
- return Me(e, B.getExampleNumber(e, B.examples)?.formatInternational()) || null;
3758
+ return Le(e, W.getExampleNumber(e, W.examples)?.formatInternational()) || null;
3563
3759
  } catch {
3564
3760
  return null;
3565
3761
  }
3566
3762
  }
3567
- function Pe(e) {
3568
- if (!B || !e) return null;
3763
+ function ze(e) {
3764
+ if (!W || !e) return null;
3569
3765
  try {
3570
- if (!B.isValidPhoneNumber(e)) return !1;
3571
- let t = B.parsePhoneNumber(e)?.getType?.();
3766
+ if (!W.isValidPhoneNumber(e)) return !1;
3767
+ let t = W.parsePhoneNumber(e)?.getType?.();
3572
3768
  return t === void 0 || t === "MOBILE" || t === "FIXED_LINE_OR_MOBILE";
3573
3769
  } catch {
3574
3770
  return null;
3575
3771
  }
3576
3772
  }
3577
- function Fe(e) {
3578
- if (!B) return null;
3773
+ function Be(e) {
3774
+ if (!W) return null;
3579
3775
  try {
3580
- let t = B.getExampleNumber(e, B.examples);
3776
+ let t = W.getExampleNumber(e, W.examples);
3581
3777
  return t?.nationalNumber ? t.nationalNumber.length : null;
3582
3778
  } catch {
3583
3779
  return null;
3584
3780
  }
3585
3781
  }
3586
- function Ie(e, t, n) {
3782
+ function Ve(e, t, n) {
3587
3783
  try {
3588
- let r = B.parsePhoneNumber(t, e), i = r?.nationalNumber;
3784
+ let r = W.parsePhoneNumber(t, e), i = r?.nationalNumber;
3589
3785
  return !i || r.country !== e || i.length > n || !t.endsWith(i) ? null : i;
3590
3786
  } catch {
3591
3787
  return null;
3592
3788
  }
3593
3789
  }
3594
- function Le(e) {
3595
- if (!B || !e?.trim().startsWith("+")) return null;
3790
+ function He(e) {
3791
+ if (!W || !e?.trim().startsWith("+")) return null;
3596
3792
  try {
3597
- let t = new B.AsYouType();
3793
+ let t = new W.AsYouType();
3598
3794
  t.input(e.trim());
3599
3795
  let n = t.getCountry();
3600
3796
  return n ? {
@@ -3605,7 +3801,7 @@ function Le(e) {
3605
3801
  return null;
3606
3802
  }
3607
3803
  }
3608
- var Re = class extends e {
3804
+ var Ue = class extends e {
3609
3805
  static formAssociated = !0;
3610
3806
  static get observedAttributes() {
3611
3807
  return [
@@ -3625,7 +3821,7 @@ var Re = class extends e {
3625
3821
  } catch {
3626
3822
  this._internals = null;
3627
3823
  }
3628
- this._defaultCountry = ke(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
3824
+ this._defaultCountry = Ne(), this._country = this._defaultCountry, this._national = "", this._active = -1, this._committedValue = "";
3629
3825
  }
3630
3826
  connectedCallback() {
3631
3827
  if (!this._rendered) {
@@ -3652,13 +3848,13 @@ var Re = class extends e {
3652
3848
  this.value = this._defaultValue || "";
3653
3849
  }
3654
3850
  get value() {
3655
- return this._national ? `+${R(this._country)}${this._national}` : "";
3851
+ return this._national ? `+${U(this._country)}${this._national}` : "";
3656
3852
  }
3657
3853
  set value(e) {
3658
- let t = String(e ?? "").trim(), n = Le(t);
3854
+ let t = String(e ?? "").trim(), n = He(t);
3659
3855
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
3660
3856
  else if (t.startsWith("+")) {
3661
- let e = t.replace(/[^0-9]/g, ""), n = String(R(this._country));
3857
+ let e = t.replace(/[^0-9]/g, ""), n = String(U(this._country));
3662
3858
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
3663
3859
  } else this._national = t.replace(/[^0-9]/g, "");
3664
3860
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
@@ -3674,25 +3870,25 @@ var Re = class extends e {
3674
3870
  }
3675
3871
  render() {
3676
3872
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
3677
- let e = this.getAttribute("placeholder") || H(this._country) || "Enter phone number";
3873
+ let e = this.getAttribute("placeholder") || K(this._country) || "Enter phone number";
3678
3874
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
3679
3875
  let t = `${this.id}-listbox`;
3680
3876
  this._listboxId = t;
3681
- let n = L.map(([e, n, r], i) => `<button type="button" role="option" id="${U(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${z(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3877
+ let n = De.map(([e, n, r], i) => `<button type="button" role="option" id="${q(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${Pe(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3682
3878
  this.innerHTML = `
3683
3879
  <div class="phone-input-wrap">
3684
3880
  <div class="phone-country-adornment">
3685
- <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${U(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3686
- <span class="${z(this._country)}" data-flag aria-hidden="true"></span>
3881
+ <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${q(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3882
+ <span class="${Pe(this._country)}" data-flag aria-hidden="true"></span>
3687
3883
  ${p("chevron-down", { className: "phone-chevron" })}
3688
- <span class="phone-dial" data-dial>+${R(this._country)}</span>
3884
+ <span class="phone-dial" data-dial>+${U(this._country)}</span>
3689
3885
  </button>
3690
- <div class="country-dropdown-menu" role="listbox" id="${U(t)}" tabindex="-1" hidden>
3691
- <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${p("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${U(t)}" aria-autocomplete="list" /></div>
3886
+ <div class="country-dropdown-menu" role="listbox" id="${q(t)}" tabindex="-1" hidden>
3887
+ <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${p("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${q(t)}" aria-autocomplete="list" /></div>
3692
3888
  <div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
3693
3889
  </div>
3694
3890
  </div>
3695
- <input type="tel" class="input" placeholder="${U(e)}" value="${U(V(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${U(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${U(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3891
+ <input type="tel" class="input" placeholder="${q(e)}" value="${q(G(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${q(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${q(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3696
3892
  </div>
3697
3893
  <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, d(this, this.value), this._wire();
3698
3894
  }
@@ -3723,12 +3919,12 @@ var Re = class extends e {
3723
3919
  }
3724
3920
  a && (a.hidden = n > 0);
3725
3921
  }, v = (e) => {
3726
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = z(e)), d && (d.textContent = `+${R(e)}`);
3922
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = Pe(e)), d && (d.textContent = `+${U(e)}`);
3727
3923
  for (let t of this._itemEls()) {
3728
3924
  let n = t.dataset.iso === e;
3729
3925
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
3730
3926
  }
3731
- !this.getAttribute("placeholder") && o && (o.placeholder = H(e) || "Enter phone number"), o && this._national && (o.value = V(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
3927
+ !this.getAttribute("placeholder") && o && (o.placeholder = K(e) || "Enter phone number"), o && this._national && (o.value = G(e, this._national)), g(), this._syncMirror(), this._emitChange(), o?.focus();
3732
3928
  }, y = (t) => {
3733
3929
  let n = this._visibleItems();
3734
3930
  if (t.key === "ArrowDown") {
@@ -3762,7 +3958,7 @@ var Re = class extends e {
3762
3958
  let b = this.querySelector("[data-phone-error]"), x = (e) => {
3763
3959
  if (o.classList.toggle("is-invalid", e), e ? o.setAttribute("aria-invalid", "true") : o.removeAttribute("aria-invalid"), b) {
3764
3960
  if (e) {
3765
- let e = H(this._country);
3961
+ let e = K(this._country);
3766
3962
  b.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
3767
3963
  }
3768
3964
  b.hidden = !e;
@@ -3770,24 +3966,24 @@ var Re = class extends e {
3770
3966
  };
3771
3967
  o.addEventListener("input", (e) => {
3772
3968
  e.stopPropagation();
3773
- let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Fe(this._country);
3969
+ let t = o.selectionStart ?? o.value.length, n = o.value.slice(0, t).replace(/[^0-9]/g, "").length, r = o.value.replace(/[^0-9]/g, ""), i = Be(this._country);
3774
3970
  if (i && r.length > i) {
3775
- let e = Ie(this._country, r, i);
3971
+ let e = Ve(this._country, r, i);
3776
3972
  e ? (n = Math.max(0, n - (r.length - e.length)), r = e) : r = r.slice(0, i);
3777
3973
  }
3778
3974
  this._national = r;
3779
- let a = V(this._country, this._national);
3975
+ let a = G(this._country, this._national);
3780
3976
  if (o.value !== a) {
3781
3977
  o.value = a;
3782
- let e = Ne(a, Math.min(n, r.length));
3978
+ let e = Re(a, Math.min(n, r.length));
3783
3979
  o.setSelectionRange(e, e);
3784
3980
  }
3785
- this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || Pe(this.value) === !0) && x(!1);
3981
+ this._syncMirror(), this._emitInput(), o.classList.contains("is-invalid") && (!this._national || ze(this.value) === !0) && x(!1);
3786
3982
  }), o.addEventListener("change", (e) => e.stopPropagation()), o.addEventListener("blur", () => {
3787
- x(this._national.length > 0 && Pe(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3983
+ x(this._national.length > 0 && ze(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3788
3984
  }), o.addEventListener("paste", (e) => {
3789
- let t = Le(e.clipboardData?.getData("text"));
3790
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = V(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3985
+ let t = He(e.clipboardData?.getData("text"));
3986
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? o.value = G(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3791
3987
  }), this._bindGlobal = () => {
3792
3988
  this._teardownGlobals?.(), this._onDocClick = (e) => {
3793
3989
  f() && !this.contains(e.target) && g();
@@ -3796,9 +3992,9 @@ var Re = class extends e {
3796
3992
  });
3797
3993
  }, this._teardownGlobals = () => {
3798
3994
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), l(this);
3799
- }, this._bindGlobal(), je().then((e) => {
3800
- if (!(!e || !o.isConnected) && (this._national && (o.value = V(this._country, this._national)), !this.getAttribute("placeholder"))) {
3801
- let e = H(this._country);
3995
+ }, this._bindGlobal(), Ie().then((e) => {
3996
+ if (!(!e || !o.isConnected) && (this._national && (o.value = G(this._country, this._national)), !this.getAttribute("placeholder"))) {
3997
+ let e = K(this._country);
3802
3998
  e && (o.placeholder = e);
3803
3999
  }
3804
4000
  }), this._syncMirror();
@@ -3809,7 +4005,7 @@ var Re = class extends e {
3809
4005
  disconnectedCallback() {
3810
4006
  this._teardown();
3811
4007
  }
3812
- }, U = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ze = class extends e {
4008
+ }, q = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), We = class extends e {
3813
4009
  static formAssociated = !0;
3814
4010
  static get observedAttributes() {
3815
4011
  return [
@@ -3898,19 +4094,19 @@ var Re = class extends e {
3898
4094
  this._listboxId = u;
3899
4095
  let f = e.map((e, t) => {
3900
4096
  let n = String(e.value) === String(this._value);
3901
- return `<button type="button" role="option" id="${W(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}">${v(e)}</button>`;
4097
+ return `<button type="button" role="option" id="${J(`${u}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${J(e.value)}" aria-selected="${n}">${v(e)}</button>`;
3902
4098
  }).join("");
3903
4099
  this.innerHTML = `
3904
4100
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
3905
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(u)}" aria-label="${W(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
4101
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${J(u)}" aria-label="${J(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
3906
4102
  ${a ? p(a, { className: "search-select-icon" }) : ""}
3907
4103
  ${o ? `<span class="search-select-prefix">${g(o)}</span>` : ""}
3908
4104
  <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? v(l) : g(s)}</span>
3909
4105
  ${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${p("x")}</span>` : ""}
3910
4106
  ${p("chevron-down", { className: "search-select-caret" })}
3911
4107
  </button>
3912
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(u)}" tabindex="-1" hidden>
3913
- ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${W(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
4108
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${J(u)}" tabindex="-1" hidden>
4109
+ ${t ? `<div class="search-select-search">${p("search")}<input class="search-select-input" placeholder="${J(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${p("x")}</button></div>` : ""}
3914
4110
  <div class="search-select-options">${f}<div class="search-select-empty" hidden>No matches</div></div>
3915
4111
  </div>
3916
4112
  </div>`, this._rendered = !0, d(this, this._value), this._wire(), this._syncReset();
@@ -4015,7 +4211,7 @@ var Re = class extends e {
4015
4211
  disconnectedCallback() {
4016
4212
  this._teardown();
4017
4213
  }
4018
- }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Be = class extends e {
4214
+ }, J = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ge = class extends e {
4019
4215
  static formAssociated = !0;
4020
4216
  static get observedAttributes() {
4021
4217
  return [
@@ -4055,19 +4251,19 @@ var Re = class extends e {
4055
4251
  return this._value;
4056
4252
  }
4057
4253
  set value(e) {
4058
- this._value = this._snapToStep(this._clamp(G(e, this._value))), this._syncValue(), this._syncMirrors();
4254
+ this._value = this._snapToStep(this._clamp(Y(e, this._value))), this._syncValue(), this._syncMirrors();
4059
4255
  }
4060
4256
  get start() {
4061
4257
  return this._start;
4062
4258
  }
4063
4259
  set start(e) {
4064
- this._start = Math.min(this._snapToStep(this._clamp(G(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
4260
+ this._start = Math.min(this._snapToStep(this._clamp(Y(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
4065
4261
  }
4066
4262
  get end() {
4067
4263
  return this._end;
4068
4264
  }
4069
4265
  set end(e) {
4070
- this._end = Math.max(this._snapToStep(this._clamp(G(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
4266
+ this._end = Math.max(this._snapToStep(this._clamp(Y(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
4071
4267
  }
4072
4268
  attributeChangedCallback(e, t, n) {
4073
4269
  if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
@@ -4080,19 +4276,19 @@ var Re = class extends e {
4080
4276
  this._isRange() ? this._resetRange() : this._resetSingle();
4081
4277
  }
4082
4278
  _updateFromAttribute(e) {
4083
- e === "value" ? this._value = this._snapToStep(this._clamp(G(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(G(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(G(this.getAttribute("end"), this._end))));
4279
+ e === "value" ? this._value = this._snapToStep(this._clamp(Y(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(Y(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(Y(this.getAttribute("end"), this._end))));
4084
4280
  }
4085
4281
  _isRange() {
4086
4282
  return this.hasAttribute("range");
4087
4283
  }
4088
4284
  _min() {
4089
- return G(this.getAttribute("min"), 0);
4285
+ return Y(this.getAttribute("min"), 0);
4090
4286
  }
4091
4287
  _max() {
4092
- return G(this.getAttribute("max"), 100);
4288
+ return Y(this.getAttribute("max"), 100);
4093
4289
  }
4094
4290
  _step() {
4095
- return G(this.getAttribute("step"), 1);
4291
+ return Y(this.getAttribute("step"), 1);
4096
4292
  }
4097
4293
  _clamp(e) {
4098
4294
  return Math.max(this._min(), Math.min(e, this._max()));
@@ -4157,7 +4353,7 @@ var Re = class extends e {
4157
4353
  aria-valuenow="${this._value}"
4158
4354
  aria-valuetext="${this._formatValue(this._value)}"
4159
4355
  ${a ? "disabled" : ""}
4160
- aria-label="${Ve(this.getAttribute("aria-label") || "Value")}"
4356
+ aria-label="${Ke(this.getAttribute("aria-label") || "Value")}"
4161
4357
  ></button>
4162
4358
  `}
4163
4359
  ${this.hasAttribute("show-value") ? n ? `<span class="slider-value">${this._formatValue(this._start)} – ${this._formatValue(this._end)}</span>` : `<span class="slider-value">${this._formatValue(this._value)}</span>` : ""}
@@ -4257,10 +4453,10 @@ var Re = class extends e {
4257
4453
  disconnectedCallback() {
4258
4454
  this._teardown();
4259
4455
  }
4260
- }, G = (e, t) => {
4456
+ }, Y = (e, t) => {
4261
4457
  let n = Number.parseFloat(e);
4262
4458
  return Number.isFinite(n) ? n : t;
4263
- }, Ve = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), He = class extends e {
4459
+ }, Ke = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), qe = class extends e {
4264
4460
  static formAssociated = !0;
4265
4461
  _accessibleName() {
4266
4462
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -4333,7 +4529,7 @@ var Re = class extends e {
4333
4529
  d(this, this._values.join(",")), this.innerHTML = `
4334
4530
  <div class="search-select${t}">
4335
4531
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
4336
- <input type="text" class="ms-input" data-input aria-label="${K(this._accessibleName())}" placeholder="${K(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
4532
+ <input type="text" class="ms-input" data-input aria-label="${X(this._accessibleName())}" placeholder="${X(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
4337
4533
  <div class="ms-chips" data-chips></div>
4338
4534
  </div>
4339
4535
  </div>`, this._rendered = !0, d(this, this._values.join(",")), this._renderControl(), this._wire();
@@ -4345,14 +4541,14 @@ var Re = class extends e {
4345
4541
  e.innerHTML = "";
4346
4542
  return;
4347
4543
  }
4348
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${Ue(e)}</span><button type="button" class="chip-remove" data-remove="${K(e)}" aria-label="Remove ${K(e)}">${p("x")}</button></span>`).join("");
4544
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${Je(e)}</span><button type="button" class="chip-remove" data-remove="${X(e)}" aria-label="Remove ${X(e)}">${p("x")}</button></span>`).join("");
4349
4545
  }
4350
4546
  }
4351
4547
  _wire() {
4352
4548
  this._teardown();
4353
4549
  let e = this.querySelector(".search-select-control"), t = this.querySelector("[data-input]");
4354
4550
  if (!e || !t) return;
4355
- let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(de).filter(Boolean)), s = () => {
4551
+ let n = () => this.hasAttribute("disabled"), r = (this.getAttribute("separators") || "enter,comma").split(",").map((e) => e.trim()), i = this.getAttribute("max-tags"), a = this.hasAttribute("allow-duplicates"), o = new Set(r.map(pe).filter(Boolean)), s = () => {
4356
4552
  d(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
4357
4553
  }, c = (e) => {
4358
4554
  let t = e.trim();
@@ -4384,9 +4580,9 @@ var Re = class extends e {
4384
4580
  e.preventDefault();
4385
4581
  let n = e.clipboardData.getData("text/plain"), a = [];
4386
4582
  for (let e of r) {
4387
- let t = fe(e) ?? e;
4388
- if (M(n, [t])) {
4389
- a.push(...pe(n, [t]));
4583
+ let t = me(e) ?? e;
4584
+ if (z(n, [t])) {
4585
+ a.push(...he(n, [t]));
4390
4586
  break;
4391
4587
  }
4392
4588
  }
@@ -4414,18 +4610,18 @@ var Re = class extends e {
4414
4610
  disconnectedCallback() {
4415
4611
  this._teardown();
4416
4612
  }
4417
- }, Ue = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), K = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), q = (e) => String(e).padStart(2, "0"), We = (e, t) => `${q(e)}:${q(t)}`, J = (e) => {
4613
+ }, Je = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Ye = (e) => String(e).padStart(2, "0"), Xe = (e, t) => `${Ye(e)}:${Ye(t)}`, Z = (e) => {
4418
4614
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
4419
4615
  return t ? {
4420
4616
  h: +t[1],
4421
4617
  m: +t[2]
4422
4618
  } : null;
4423
- }, Y = (e, t = "24") => {
4619
+ }, Ze = (e, t = "24") => {
4424
4620
  if (!e) return "";
4425
- if (t === "24") return We(e.h, e.m);
4621
+ if (t === "24") return Xe(e.h, e.m);
4426
4622
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
4427
- return `${n}:${q(e.m)} ${r}`;
4428
- }, Ge = class extends e {
4623
+ return `${n}:${Ye(e.m)} ${r}`;
4624
+ }, Qe = class extends e {
4429
4625
  static formAssociated = !0;
4430
4626
  static get observedAttributes() {
4431
4627
  return [
@@ -4472,11 +4668,11 @@ var Re = class extends e {
4472
4668
  }
4473
4669
  render() {
4474
4670
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
4475
- let e = this.getAttribute("placeholder") || "Select time", t = J(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
4671
+ let e = this.getAttribute("placeholder") || "Select time", t = Z(this._value), n = this.getAttribute("format") || "24", r = this.getAttribute("size"), i = r === "sm" ? " input-sm" : r === "lg" ? " input-lg" : "", a = this.getAttribute("aria-label"), o = this.getAttribute("aria-describedby");
4476
4672
  this.innerHTML = `
4477
4673
  <div class="timepicker">
4478
4674
  <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${g(a)}"` : ""}${o ? ` aria-describedby="${g(o)}"` : ""}>
4479
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Y(t, n) : g(e)}</span>
4675
+ <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Ze(t, n) : g(e)}</span>
4480
4676
  ${p("clock")}
4481
4677
  </button>
4482
4678
  <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
@@ -4488,14 +4684,14 @@ var Re = class extends e {
4488
4684
  _syncTrigger() {
4489
4685
  let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
4490
4686
  if (!t) return;
4491
- let n = J(this._value), r = this.getAttribute("format") || "24";
4492
- t.textContent = n ? Y(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4687
+ let n = Z(this._value), r = this.getAttribute("format") || "24";
4688
+ t.textContent = n ? Ze(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
4493
4689
  }
4494
4690
  _buildTimes() {
4495
- let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = J(t) || {
4691
+ let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = Z(t) || {
4496
4692
  h: 0,
4497
4693
  m: 0
4498
- }, i = J(n) || {
4694
+ }, i = Z(n) || {
4499
4695
  h: 23,
4500
4696
  m: 59
4501
4697
  }, a = [], o = r.h, s = r.m;
@@ -4508,10 +4704,10 @@ var Re = class extends e {
4508
4704
  _renderOptions() {
4509
4705
  let e = this.querySelector(".timepicker-pop");
4510
4706
  if (!e) return;
4511
- let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = J(this._value), i = this._focus, a = "";
4707
+ let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = Z(this._value), i = this._focus, a = "";
4512
4708
  for (let e = 0; e < n.length; e++) {
4513
- let o = n[e], s = We(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4514
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Y(o, t)}</button>`;
4709
+ let o = n[e], s = Xe(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
4710
+ a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${Ze(o, t)}</button>`;
4515
4711
  }
4516
4712
  e.innerHTML = a, this._focusActive();
4517
4713
  }
@@ -4609,7 +4805,7 @@ var Re = class extends e {
4609
4805
  disconnectedCallback() {
4610
4806
  this._teardown();
4611
4807
  }
4612
- }, Ke = "wui-wizard-step", qe = class extends e {
4808
+ }, $e = "wui-wizard-step", et = class extends e {
4613
4809
  static get observedAttributes() {
4614
4810
  return [
4615
4811
  "active",
@@ -4643,7 +4839,7 @@ var Re = class extends e {
4643
4839
  this._beforeNext = typeof e == "function" ? e : null;
4644
4840
  }
4645
4841
  get _steps() {
4646
- return [...this.querySelectorAll(`:scope > ${Ke}`)];
4842
+ return [...this.querySelectorAll(`:scope > ${$e}`)];
4647
4843
  }
4648
4844
  refresh() {
4649
4845
  this._rendered && this._renderChrome();
@@ -4702,13 +4898,13 @@ var Re = class extends e {
4702
4898
  return e.map((e, r) => {
4703
4899
  let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
4704
4900
  u = a === "done" ? p("check") : a === "error" ? p("alert-triangle") : a === "skipped" ? p("minus") : c ? p(c) : String(l);
4705
- let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", m = i || r < this._active, h = s ? `<span class="step-desc">${X(s)}</span>` : "", g;
4706
- return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${X(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${X(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${X(o)}</span>${h}`, m ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
4901
+ let d = a === "pending" ? "step" : `step ${a}`, f = a === "active" ? " aria-current=\"step\"" : "", m = i || r < this._active, h = s ? `<span class="step-desc">${Q(s)}</span>` : "", g;
4902
+ return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Q(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${Q(o)}</span>${h}`, m ? `<button type="button" class="${d}" data-step="${r}"${f}>${g}</button>` : `<div class="${d}"${f}>${g}</div>`;
4707
4903
  }).join("");
4708
4904
  }
4709
4905
  _footerHtml(e) {
4710
4906
  let t = this._active, n = e.length - 1, r = this.hasAttribute("disabled") ? " disabled" : "", i = e[t]?.hasAttribute("optional") || this.hasAttribute("skippable"), a = this.getAttribute("back-label") || "Back", o = this.getAttribute("next-label") || "Next", s = this.getAttribute("skip-label") || "Skip", c = this.getAttribute("finish-label") || "Finish";
4711
- return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${p("arrow-left", { className: "me-2" })}${X(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${X(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${X(o)}${p("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${X(c)}</button>`}</span>`;
4907
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${p("arrow-left", { className: "me-2" })}${Q(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Q(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Q(o)}${p("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Q(c)}</button>`}</span>`;
4712
4908
  }
4713
4909
  _wire() {
4714
4910
  this._teardown(), this._onHeaderClick = (e) => {
@@ -4776,7 +4972,7 @@ var Re = class extends e {
4776
4972
  _reflectActive(e) {
4777
4973
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
4778
4974
  }
4779
- }, X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Je = class extends e {
4975
+ }, Q = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), tt = class extends e {
4780
4976
  static get observedAttributes() {
4781
4977
  return [
4782
4978
  "label",
@@ -4790,8 +4986,8 @@ var Re = class extends e {
4790
4986
  let e = this.closest("wui-wizard");
4791
4987
  e && typeof e.refresh == "function" && e.refresh();
4792
4988
  }
4793
- }, Ye = 2e3;
4794
- async function Xe(e) {
4989
+ }, nt = 2e3;
4990
+ async function rt(e) {
4795
4991
  try {
4796
4992
  if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
4797
4993
  } catch {}
@@ -4806,14 +5002,14 @@ async function Xe(e) {
4806
5002
  }
4807
5003
  //#endregion
4808
5004
  //#region src/fileValidation.js
4809
- var Ze = "image/png,image/jpeg,image/webp", Qe = 5, $e = {
5005
+ var it = "image/png,image/jpeg,image/webp", at = 5, ot = {
4810
5006
  "image/png": [".png"],
4811
5007
  "image/jpeg": [".jpg", ".jpeg"],
4812
5008
  "image/webp": [".webp"],
4813
5009
  "image/gif": [".gif"],
4814
5010
  "image/svg+xml": [".svg"],
4815
5011
  "application/pdf": [".pdf"]
4816
- }, et = {
5012
+ }, st = {
4817
5013
  "image/png": "PNG",
4818
5014
  "image/jpeg": "JPG",
4819
5015
  "image/webp": "WEBP",
@@ -4827,7 +5023,7 @@ var Ze = "image/png,image/jpeg,image/webp", Qe = 5, $e = {
4827
5023
  ".gif": "GIF",
4828
5024
  ".svg": "SVG",
4829
5025
  ".pdf": "PDF"
4830
- }, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), tt = [
5026
+ }, ct = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), lt = [
4831
5027
  ".png",
4832
5028
  ".jpg",
4833
5029
  ".jpeg",
@@ -4838,54 +5034,54 @@ var Ze = "image/png,image/jpeg,image/webp", Qe = 5, $e = {
4838
5034
  ".avif",
4839
5035
  ".heic"
4840
5036
  ];
4841
- function nt(e) {
5037
+ function ut(e) {
4842
5038
  if (!e) return !1;
4843
5039
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
4844
5040
  if (t) return t.startsWith("image/");
4845
5041
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
4846
- return tt.some((e) => r.endsWith(e));
5042
+ return lt.some((e) => r.endsWith(e));
4847
5043
  }
4848
- function rt(e) {
4849
- let t = Z(e);
4850
- return t.length ? t.every((e) => e.startsWith(".") ? tt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
5044
+ function dt(e) {
5045
+ let t = ct(e);
5046
+ return t.length ? t.every((e) => e.startsWith(".") ? lt.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
4851
5047
  }
4852
- function it(e) {
5048
+ function ft(e) {
4853
5049
  let t = [];
4854
- for (let n of Z(e)) {
4855
- let e = et[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
5050
+ for (let n of ct(e)) {
5051
+ let e = st[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
4856
5052
  t.includes(e) || t.push(e);
4857
5053
  }
4858
5054
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
4859
5055
  }
4860
- function at(e, t) {
4861
- let n = Z(t);
5056
+ function pt(e, t) {
5057
+ let n = ct(t);
4862
5058
  if (!n.length) return !0;
4863
5059
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
4864
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && ($e[e] || []).some((e) => i.endsWith(e)));
5060
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ot[e] || []).some((e) => i.endsWith(e)));
4865
5061
  }
4866
- function ot(e, t = {}) {
5062
+ function mt(e, t = {}) {
4867
5063
  if (!e) return null;
4868
- let n = t.accept === void 0 ? Ze : t.accept, r = t.maxSizeMb || 5;
4869
- return at(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${it(n)} file.`;
5064
+ let n = t.accept === void 0 ? it : t.accept, r = t.maxSizeMb || 5;
5065
+ return pt(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${ft(n)} file.`;
4870
5066
  }
4871
5067
  //#endregion
4872
5068
  //#region src/passwordRules.js
4873
- var Q = {
5069
+ var ht = {
4874
5070
  minLength: 8,
4875
5071
  uppercase: !0,
4876
5072
  lowercase: !0,
4877
5073
  digit: !0,
4878
5074
  special: !0,
4879
5075
  uniqueChars: 0
4880
- }, st = "Password Requirements";
4881
- function ct(e) {
4882
- return e === !0 || e == null ? { ...Q } : {
4883
- ...Q,
5076
+ }, gt = "Password Requirements";
5077
+ function _t(e) {
5078
+ return e === !0 || e == null ? { ...ht } : {
5079
+ ...ht,
4884
5080
  ...e
4885
5081
  };
4886
5082
  }
4887
- function lt(e) {
4888
- let t = ct(e), n = [];
5083
+ function vt(e) {
5084
+ let t = _t(e), n = [];
4889
5085
  if (t.minLength > 0 && n.push({
4890
5086
  key: "length",
4891
5087
  label: `At least ${t.minLength} characters long`,
@@ -4916,25 +5112,25 @@ function lt(e) {
4916
5112
  }
4917
5113
  return n;
4918
5114
  }
4919
- function ut(e, t) {
5115
+ function yt(e, t) {
4920
5116
  let n = e == null ? "" : String(e);
4921
- return lt(t).map((e) => ({
5117
+ return vt(t).map((e) => ({
4922
5118
  key: e.key,
4923
5119
  label: e.label,
4924
5120
  met: e.test(n)
4925
5121
  }));
4926
5122
  }
4927
- function dt(e, t) {
4928
- return ut(e, t).every((e) => e.met);
5123
+ function bt(e, t) {
5124
+ return yt(e, t).every((e) => e.met);
4929
5125
  }
4930
5126
  //#endregion
4931
5127
  //#region src/index.js
4932
5128
  var $ = (e, t) => {
4933
5129
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
4934
5130
  };
4935
- function ft() {
4936
- $("wui-select", ze), $("wui-phone", Re), $("wui-datepicker", ee), $("wui-date-range", te), $("wui-dock", ne), $("wui-feedback", oe), $("wui-slider", Be), $("wui-timepicker", Ge), $("wui-autocomplete", y), $("wui-multiselect", me), $("wui-taginput", He), $("wui-otp", Ce), $("wui-status-icon", r), $("wui-wizard-step", Je), $("wui-wizard", qe);
5131
+ function xt() {
5132
+ $("wui-select", We), $("wui-phone", Ue), $("wui-datepicker", ne), $("wui-date-range", re), $("wui-dock", ie), $("wui-feedback", ce), $("wui-consent-banner", E), $("wui-slider", Ge), $("wui-timepicker", Qe), $("wui-autocomplete", y), $("wui-multiselect", ge), $("wui-taginput", qe), $("wui-otp", Ee), $("wui-status-icon", r), $("wui-wizard-step", tt), $("wui-wizard", et);
4937
5133
  }
4938
- ft();
5134
+ xt();
4939
5135
  //#endregion
4940
- export { Ye as COPY_FEEDBACK_MS, Ze as DEFAULT_IMAGE_ACCEPT, Qe as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, st as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, ee as WuiDatePicker, te as WuiDateRange, ne as WuiDock, oe as WuiFeedback, me as WuiMultiSelect, Ce as WuiOtp, Re as WuiPhone, ze as WuiSelect, Be as WuiSlider, r as WuiStatusIcon, He as WuiTagInput, Ge as WuiTimePicker, qe as WuiWizard, Je as WuiWizardStep, it as acceptLabel, lt as buildPasswordRules, Xe as copyTextToClipboard, ft as defineWeborityElements, ut as evaluatePassword, p as glyphSvg, nt as isImageFile, rt as isImageOnlyAccept, at as matchesAccept, dt as passwordSatisfies, ot as validateFile };
5136
+ export { nt as COPY_FEEDBACK_MS, it as DEFAULT_IMAGE_ACCEPT, at as DEFAULT_MAX_SIZE_MB, ht as DEFAULT_PASSWORD_RULES, gt as DEFAULT_REQUIREMENTS_TITLE, n as STATUS_TONES, y as WuiAutocomplete, E as WuiConsentBanner, ne as WuiDatePicker, re as WuiDateRange, ie as WuiDock, ce as WuiFeedback, ge as WuiMultiSelect, Ee as WuiOtp, Ue as WuiPhone, We as WuiSelect, Ge as WuiSlider, r as WuiStatusIcon, qe as WuiTagInput, Qe as WuiTimePicker, et as WuiWizard, tt as WuiWizardStep, ft as acceptLabel, vt as buildPasswordRules, rt as copyTextToClipboard, xt as defineWeborityElements, yt as evaluatePassword, p as glyphSvg, ut as isImageFile, dt as isImageOnlyAccept, pt as matchesAccept, bt as passwordSatisfies, mt as validateFile };