@webority/ui-elements 0.9.17 → 0.9.18

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.
@@ -1134,7 +1134,7 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1134
1134
  emptyError: "Please write a message before sending.",
1135
1135
  failedError: "That didn't send. Please try again.",
1136
1136
  thanks: "Thanks — we've got it."
1137
- }, ie = 1e4, ae = 1600, j = class extends HTMLElement {
1137
+ }, ie = 1e4, ae = 1600, oe = class extends HTMLElement {
1138
1138
  static get observedAttributes() {
1139
1139
  return [
1140
1140
  "position",
@@ -1202,17 +1202,17 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1202
1202
  this.innerHTML = `
1203
1203
  <button type="button" class="feedback-trigger" aria-expanded="false" aria-haspopup="dialog">
1204
1204
  <span class="feedback-trigger-icon" aria-hidden="true">${f("message-square", { size: 18 })}</span>
1205
- <span class="feedback-trigger-label">${oe(this.label)}</span>
1205
+ <span class="feedback-trigger-label">${se(this.label)}</span>
1206
1206
  </button>
1207
- <div class="feedback-panel" role="dialog" aria-label="${se(this.heading)}" hidden>
1207
+ <div class="feedback-panel" role="dialog" aria-label="${ce(this.heading)}" hidden>
1208
1208
  <div class="feedback-head">
1209
- <h2 class="feedback-heading">${oe(this.heading)}</h2>
1209
+ <h2 class="feedback-heading">${se(this.heading)}</h2>
1210
1210
  <button type="button" class="feedback-close" aria-label="Close">${f("x", { size: 16 })}</button>
1211
1211
  </div>
1212
1212
  <div class="feedback-body">
1213
1213
  <label class="feedback-field">
1214
1214
  <span class="feedback-field-label">${A.messageLabel}</span>
1215
- <textarea class="feedback-message" rows="4" required placeholder="${se(this.placeholder)}"></textarea>
1215
+ <textarea class="feedback-message" rows="4" required placeholder="${ce(this.placeholder)}"></textarea>
1216
1216
  </label>
1217
1217
  ${this.collectEmail ? `<label class="feedback-field">
1218
1218
  <span class="feedback-field-label">${A.emailLabel}</span>
@@ -1309,7 +1309,7 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1309
1309
  _clearTimers() {
1310
1310
  this._timer &&= (clearTimeout(this._timer), 0), this._thanksTimer &&= (clearTimeout(this._thanksTimer), 0);
1311
1311
  }
1312
- }, oe = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), se = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ce = class extends HTMLElement {
1312
+ }, 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 = class extends HTMLElement {
1313
1313
  static formAssociated = !0;
1314
1314
  _accessibleName() {
1315
1315
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
@@ -1409,13 +1409,13 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1409
1409
  let a = `${this.id}-listbox`;
1410
1410
  this._listboxId = a, this.innerHTML = `
1411
1411
  <div class="search-select${i}">
1412
- <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${M(a)}" aria-label="${M(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1412
+ <div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-controls="${j(a)}" aria-label="${j(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : " tabindex=\"0\""}>
1413
1413
  ${n ? f(n, { className: "search-select-icon" }) : ""}
1414
1414
  <div class="ms-chips" data-chips></div>
1415
1415
  ${f("chevron-down", { className: "search-select-caret" })}
1416
1416
  </div>
1417
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${M(a)}" aria-multiselectable="true" tabindex="-1" hidden>
1418
- ${e ? `<div class="search-select-search">${f("search")}<input class="search-select-input" placeholder="${M(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${f("x")}</button></div>` : ""}
1417
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${j(a)}" aria-multiselectable="true" tabindex="-1" hidden>
1418
+ ${e ? `<div class="search-select-search">${f("search")}<input class="search-select-input" placeholder="${j(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${f("x")}</button></div>` : ""}
1419
1419
  <div class="search-select-options"></div>
1420
1420
  <div class="search-select-empty" hidden>No matches</div>
1421
1421
  </div>
@@ -1429,7 +1429,7 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1429
1429
  e.innerHTML = `<span class="search-select-placeholder">${h(t)}</span>`;
1430
1430
  return;
1431
1431
  }
1432
- e.innerHTML = 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="${M(e)}" aria-label="Remove ${M(le(this._labelFor(e)))}">${f("x")}</button></span>`).join(""), this._collapseChips();
1432
+ e.innerHTML = 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="${j(e)}" aria-label="Remove ${j(M(this._labelFor(e)))}">${f("x")}</button></span>`).join(""), this._collapseChips();
1433
1433
  }
1434
1434
  _collapseChips() {
1435
1435
  let e = this.querySelector("[data-chips]");
@@ -1453,11 +1453,11 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1453
1453
  let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
1454
1454
  if (!t) return;
1455
1455
  let r = (e || "").trim().toLowerCase(), i = this._readOptions();
1456
- r && (i = i.filter((e) => le(e.label).toLowerCase().includes(r)));
1456
+ r && (i = i.filter((e) => M(e.label).toLowerCase().includes(r)));
1457
1457
  let a = this._listboxId || `${this.id || "wui-multiselect"}-listbox`;
1458
1458
  t.innerHTML = i.map((e, t) => {
1459
1459
  let n = this._values.includes(String(e.value));
1460
- return `<button type="button" role="option" id="${M(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${M(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${_(e)}</span><span class="ms-check">${f("check")}</span></button>`;
1460
+ return `<button type="button" role="option" id="${j(`${a}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${j(e.value)}" aria-selected="${n}"><span class="ms-opt-label">${_(e)}</span><span class="ms-check">${f("check")}</span></button>`;
1461
1461
  }).join(""), n && (n.hidden = i.length > 0), this._active = -1, this.querySelector(".search-select-control")?.removeAttribute("aria-activedescendant"), this._reanchor?.();
1462
1462
  }
1463
1463
  _wire() {
@@ -1537,7 +1537,7 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1537
1537
  disconnectedCallback() {
1538
1538
  this._teardown(), this._ro?.disconnect(), this._ro = null;
1539
1539
  }
1540
- }, M = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), le = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ue = /[^0-9]/g, de = /[^0-9a-zA-Z]/g, fe = class extends HTMLElement {
1540
+ }, j = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), M = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), ue = /[^0-9]/g, de = /[^0-9a-zA-Z]/g, N = class extends HTMLElement {
1541
1541
  static formAssociated = !0;
1542
1542
  static get observedAttributes() {
1543
1543
  return [
@@ -1659,7 +1659,7 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
1659
1659
  disconnectedCallback() {
1660
1660
  this._onSelectionChange && document.removeEventListener("selectionchange", this._onSelectionChange);
1661
1661
  }
1662
- }, pe = [
1662
+ }, fe = [
1663
1663
  [
1664
1664
  "AF",
1665
1665
  "Afghanistan",
@@ -2885,59 +2885,59 @@ var m = Symbol("wui.trustedHtml"), h = (e) => String(e ?? "").replace(/&/g, "&am
2885
2885
  "Zimbabwe",
2886
2886
  "263"
2887
2887
  ]
2888
- ], N = (e) => (pe.find((t) => t[0] === e) || [
2888
+ ], P = (e) => (fe.find((t) => t[0] === e) || [
2889
2889
  "",
2890
2890
  "",
2891
2891
  ""
2892
- ])[2], P = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, F = null, I = null;
2893
- function me() {
2894
- return F ? Promise.resolve(F) : (I ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (F = {
2892
+ ])[2], F = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, I = null, L = null;
2893
+ function pe() {
2894
+ return I ? Promise.resolve(I) : (L ||= Promise.all([import("./max-BDKx469G.js"), import("./examples.mobile.json-BMXTGiGC.js")]).then(([e, t]) => (I = {
2895
2895
  AsYouType: e.AsYouType,
2896
2896
  getExampleNumber: e.getExampleNumber,
2897
2897
  isValidPhoneNumber: e.isValidPhoneNumber,
2898
2898
  parsePhoneNumber: e.parsePhoneNumber,
2899
2899
  examples: t.default || t
2900
- }, F)).catch(() => null), I);
2900
+ }, I)).catch(() => null), L);
2901
2901
  }
2902
- function L(e, t) {
2903
- if (!F || !t) return t;
2902
+ function R(e, t) {
2903
+ if (!I || !t) return t;
2904
2904
  try {
2905
- return new F.AsYouType(e).input(t);
2905
+ return new I.AsYouType(e).input(t);
2906
2906
  } catch {
2907
2907
  return t;
2908
2908
  }
2909
2909
  }
2910
- function R(e) {
2911
- if (!F) return null;
2910
+ function z(e) {
2911
+ if (!I) return null;
2912
2912
  try {
2913
- return F.getExampleNumber(e, F.examples)?.formatNational() || null;
2913
+ return I.getExampleNumber(e, I.examples)?.formatNational() || null;
2914
2914
  } catch {
2915
2915
  return null;
2916
2916
  }
2917
2917
  }
2918
- function z(e) {
2919
- if (!F || !e) return null;
2918
+ function B(e) {
2919
+ if (!I || !e) return null;
2920
2920
  try {
2921
- if (!F.isValidPhoneNumber(e)) return !1;
2922
- let t = F.parsePhoneNumber(e)?.getType?.();
2921
+ if (!I.isValidPhoneNumber(e)) return !1;
2922
+ let t = I.parsePhoneNumber(e)?.getType?.();
2923
2923
  return t === void 0 || t === "MOBILE" || t === "FIXED_LINE_OR_MOBILE";
2924
2924
  } catch {
2925
2925
  return null;
2926
2926
  }
2927
2927
  }
2928
- function he(e) {
2929
- if (!F) return null;
2928
+ function me(e) {
2929
+ if (!I) return null;
2930
2930
  try {
2931
- let t = F.getExampleNumber(e, F.examples);
2931
+ let t = I.getExampleNumber(e, I.examples);
2932
2932
  return t?.nationalNumber ? t.nationalNumber.length : null;
2933
2933
  } catch {
2934
2934
  return null;
2935
2935
  }
2936
2936
  }
2937
- function B(e) {
2938
- if (!F || !e?.trim().startsWith("+")) return null;
2937
+ function V(e) {
2938
+ if (!I || !e?.trim().startsWith("+")) return null;
2939
2939
  try {
2940
- let t = new F.AsYouType();
2940
+ let t = new I.AsYouType();
2941
2941
  t.input(e.trim());
2942
2942
  let n = t.getCountry();
2943
2943
  return n ? {
@@ -2948,7 +2948,7 @@ function B(e) {
2948
2948
  return null;
2949
2949
  }
2950
2950
  }
2951
- var V = class extends HTMLElement {
2951
+ var H = class extends HTMLElement {
2952
2952
  static formAssociated = !0;
2953
2953
  static get observedAttributes() {
2954
2954
  return [
@@ -2995,13 +2995,13 @@ var V = class extends HTMLElement {
2995
2995
  this.value = this._defaultValue || "";
2996
2996
  }
2997
2997
  get value() {
2998
- return this._national ? `+${N(this._country)}${this._national}` : "";
2998
+ return this._national ? `+${P(this._country)}${this._national}` : "";
2999
2999
  }
3000
3000
  set value(e) {
3001
- let t = String(e ?? "").trim(), n = B(t);
3001
+ let t = String(e ?? "").trim(), n = V(t);
3002
3002
  if (n) this._country = n.country, this._national = n.national.replace(/[^0-9]/g, "");
3003
3003
  else if (t.startsWith("+")) {
3004
- let e = t.replace(/[^0-9]/g, ""), n = String(N(this._country));
3004
+ let e = t.replace(/[^0-9]/g, ""), n = String(P(this._country));
3005
3005
  n && e.startsWith(n) && (e = e.slice(n.length)), this._national = e;
3006
3006
  } else this._national = t.replace(/[^0-9]/g, "");
3007
3007
  n && this.getAttribute("country") !== this._country ? this.setAttribute("country", this._country) : this._rendered && this.render(), this._committedValue = this.value, this._syncMirror();
@@ -3017,25 +3017,25 @@ var V = class extends HTMLElement {
3017
3017
  }
3018
3018
  render() {
3019
3019
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || ""), this._country = this.getAttribute("country") || this._country;
3020
- let e = this.getAttribute("placeholder") || R(this._country) || "Enter phone number";
3020
+ let e = this.getAttribute("placeholder") || z(this._country) || "Enter phone number";
3021
3021
  this.id ||= `wui-phone-${Math.random().toString(36).slice(2, 9)}`;
3022
3022
  let t = `${this.id}-listbox`;
3023
3023
  this._listboxId = t;
3024
- let n = pe.map(([e, n, r], i) => `<button type="button" role="option" id="${H(`${t}-opt-${i}`)}" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}" aria-selected="${e === this._country}"><span class="${P(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3024
+ let n = fe.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="${F(e)}" aria-hidden="true"></span><span class="country-name-text">${n}<span class="country-code-text">+${r}</span></span></button>`).join("");
3025
3025
  this.innerHTML = `
3026
3026
  <div class="phone-input-wrap">
3027
3027
  <div class="phone-country-adornment">
3028
- <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${H(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3029
- <span class="${P(this._country)}" data-flag aria-hidden="true"></span>
3028
+ <button type="button" class="country-toggle" aria-label="Choose country" aria-haspopup="listbox" aria-expanded="false" aria-controls="${U(t)}"${this.hasAttribute("disabled") ? " disabled" : ""}>
3029
+ <span class="${F(this._country)}" data-flag aria-hidden="true"></span>
3030
3030
  ${f("chevron-down", { className: "phone-chevron" })}
3031
- <span class="phone-dial" data-dial>+${N(this._country)}</span>
3031
+ <span class="phone-dial" data-dial>+${P(this._country)}</span>
3032
3032
  </button>
3033
- <div class="country-dropdown-menu" role="listbox" id="${H(t)}" tabindex="-1" hidden>
3034
- <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${f("search")}</span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" aria-controls="${H(t)}" aria-autocomplete="list" /></div>
3033
+ <div class="country-dropdown-menu" role="listbox" id="${U(t)}" tabindex="-1" hidden>
3034
+ <div class="dropdown-search-wrapper"><span class="dropdown-search-icon">${f("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>
3035
3035
  <div class="country-list-scroll">${n}<div class="country-empty" hidden>No countries found</div></div>
3036
3036
  </div>
3037
3037
  </div>
3038
- <input type="tel" class="input" placeholder="${H(e)}" value="${H(L(this._country, this._national))}"${this.getAttribute("aria-label") ? ` aria-label="${H(this.getAttribute("aria-label"))}"` : ""}${this.getAttribute("aria-describedby") ? ` aria-describedby="${H(this.getAttribute("aria-describedby"))}"` : ""}${this.hasAttribute("required") ? " required aria-required=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""} />
3038
+ <input type="tel" class="input" placeholder="${U(e)}" value="${U(R(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" : ""} />
3039
3039
  </div>
3040
3040
  <div class="field-error" data-phone-error hidden></div>`, this._rendered = !0, u(this, this.value), this._wire();
3041
3041
  }
@@ -3066,12 +3066,12 @@ var V = class extends HTMLElement {
3066
3066
  }
3067
3067
  a && (a.hidden = n > 0);
3068
3068
  }, v = (e) => {
3069
- this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = P(e)), d && (d.textContent = `+${N(e)}`);
3069
+ this._country = e, this.getAttribute("country") !== e && (this._suppressCountryRender = !0, this.setAttribute("country", e), this._suppressCountryRender = !1), u && (u.className = F(e)), d && (d.textContent = `+${P(e)}`);
3070
3070
  for (let t of this._itemEls()) {
3071
3071
  let n = t.dataset.iso === e;
3072
3072
  t.classList.toggle("selected", n), t.setAttribute("aria-selected", String(n));
3073
3073
  }
3074
- !this.getAttribute("placeholder") && l && (l.placeholder = R(e) || "Enter phone number"), l && this._national && (l.value = L(e, this._national)), g(), this._syncMirror(), this._emitChange(), l?.focus();
3074
+ !this.getAttribute("placeholder") && l && (l.placeholder = z(e) || "Enter phone number"), l && this._national && (l.value = R(e, this._national)), g(), this._syncMirror(), this._emitChange(), l?.focus();
3075
3075
  }, y = (t) => {
3076
3076
  let n = this._visibleItems();
3077
3077
  if (t.key === "ArrowDown") {
@@ -3105,7 +3105,7 @@ var V = class extends HTMLElement {
3105
3105
  let b = this.querySelector("[data-phone-error]"), x = (e) => {
3106
3106
  if (l.classList.toggle("is-invalid", e), e ? l.setAttribute("aria-invalid", "true") : l.removeAttribute("aria-invalid"), b) {
3107
3107
  if (e) {
3108
- let e = R(this._country);
3108
+ let e = z(this._country);
3109
3109
  b.textContent = e ? `Enter a valid phone number, e.g. ${e}` : "Enter a valid phone number";
3110
3110
  }
3111
3111
  b.hidden = !e;
@@ -3113,15 +3113,15 @@ var V = class extends HTMLElement {
3113
3113
  };
3114
3114
  l.addEventListener("input", (e) => {
3115
3115
  e.stopPropagation();
3116
- let t = l.value.replace(/[^0-9]/g, ""), n = he(this._country);
3116
+ let t = l.value.replace(/[^0-9]/g, ""), n = me(this._country);
3117
3117
  n && t.length > n && (t = t.slice(0, n)), this._national = t;
3118
- let r = L(this._country, this._national);
3119
- l.value !== r && (l.value = r), this._syncMirror(), this._emitInput(), l.classList.contains("is-invalid") && (!this._national || z(this.value) === !0) && x(!1);
3118
+ let r = R(this._country, this._national);
3119
+ l.value !== r && (l.value = r), this._syncMirror(), this._emitInput(), l.classList.contains("is-invalid") && (!this._national || B(this.value) === !0) && x(!1);
3120
3120
  }), l.addEventListener("change", (e) => e.stopPropagation()), l.addEventListener("blur", () => {
3121
- x(this._national.length > 0 && z(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3121
+ x(this._national.length > 0 && B(this.value) === !1), this.value !== this._committedValue && this._emitChange();
3122
3122
  }), l.addEventListener("paste", (e) => {
3123
- let t = B(e.clipboardData?.getData("text"));
3124
- t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? l.value = L(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3123
+ let t = V(e.clipboardData?.getData("text"));
3124
+ t && (e.preventDefault(), this._national = t.national.replace(/[^0-9]/g, ""), t.country === this._country ? l.value = R(this._country, this._national) : this.setAttribute("country", t.country), this._syncMirror(), this._emitInput(), this._emitChange(), this.querySelector("input[type=tel]")?.focus());
3125
3125
  }), this._bindGlobal = () => {
3126
3126
  this._teardownGlobals?.(), this._onDocClick = (e) => {
3127
3127
  f() && !this.contains(e.target) && g();
@@ -3130,9 +3130,9 @@ var V = class extends HTMLElement {
3130
3130
  });
3131
3131
  }, this._teardownGlobals = () => {
3132
3132
  this._onDocClick &&= (document.removeEventListener("click", this._onDocClick), null), c(this);
3133
- }, this._bindGlobal(), me().then((e) => {
3134
- if (!(!e || !l.isConnected) && (this._national && (l.value = L(this._country, this._national)), !this.getAttribute("placeholder"))) {
3135
- let e = R(this._country);
3133
+ }, this._bindGlobal(), pe().then((e) => {
3134
+ if (!(!e || !l.isConnected) && (this._national && (l.value = R(this._country, this._national)), !this.getAttribute("placeholder"))) {
3135
+ let e = z(this._country);
3136
3136
  e && (l.placeholder = e);
3137
3137
  }
3138
3138
  }), this._syncMirror();
@@ -3143,7 +3143,7 @@ var V = class extends HTMLElement {
3143
3143
  disconnectedCallback() {
3144
3144
  this._teardown();
3145
3145
  }
3146
- }, H = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ge = class extends HTMLElement {
3146
+ }, U = (e) => String(e ?? "").replace(/"/g, "&quot;").replace(/</g, "&lt;"), he = class extends HTMLElement {
3147
3147
  static formAssociated = !0;
3148
3148
  static get observedAttributes() {
3149
3149
  return [
@@ -3232,19 +3232,19 @@ var V = class extends HTMLElement {
3232
3232
  this._listboxId = d;
3233
3233
  let p = e.map((e, t) => {
3234
3234
  let n = String(e.value) === String(this._value);
3235
- return `<button type="button" role="option" id="${U(`${d}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${U(e.value)}" aria-selected="${n}">${_(e)}</button>`;
3235
+ return `<button type="button" role="option" id="${W(`${d}-opt-${t}`)}" class="search-select-option${n ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${n}">${_(e)}</button>`;
3236
3236
  }).join("");
3237
3237
  this.innerHTML = `
3238
3238
  <div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}${i}">
3239
- <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${U(d)}" aria-label="${U(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
3239
+ <button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-controls="${W(d)}" aria-label="${W(this._accessibleName())}"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " disabled" : ""}>
3240
3240
  ${a ? f(a, { className: "search-select-icon" }) : ""}
3241
3241
  ${o ? `<span class="search-select-prefix">${h(o)}</span>` : ""}
3242
3242
  <span class="${l ? "" : "search-select-placeholder"}" data-label>${l ? _(l) : h(s)}</span>
3243
3243
  ${n ? `<span class="search-select-reset" role="button" aria-label="Clear selection" hidden>${f("x")}</span>` : ""}
3244
3244
  ${f("chevron-down", { className: "search-select-caret" })}
3245
3245
  </button>
3246
- <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${U(d)}" tabindex="-1" hidden>
3247
- ${t ? `<div class="search-select-search">${f("search")}<input class="search-select-input" placeholder="${U(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${f("x")}</button></div>` : ""}
3246
+ <div class="search-select-menu search-select-menu-fixed" role="listbox" id="${W(d)}" tabindex="-1" hidden>
3247
+ ${t ? `<div class="search-select-search">${f("search")}<input class="search-select-input" placeholder="${W(c)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden>${f("x")}</button></div>` : ""}
3248
3248
  <div class="search-select-options">${p}<div class="search-select-empty" hidden>No matches</div></div>
3249
3249
  </div>
3250
3250
  </div>`, this._rendered = !0, u(this, this._value), this._wire(), this._syncReset();
@@ -3349,7 +3349,7 @@ var V = class extends HTMLElement {
3349
3349
  disconnectedCallback() {
3350
3350
  this._teardown();
3351
3351
  }
3352
- }, U = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), _e = class extends HTMLElement {
3352
+ }, W = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ge = class extends HTMLElement {
3353
3353
  static formAssociated = !0;
3354
3354
  static get observedAttributes() {
3355
3355
  return [
@@ -3389,19 +3389,19 @@ var V = class extends HTMLElement {
3389
3389
  return this._value;
3390
3390
  }
3391
3391
  set value(e) {
3392
- this._value = this._snapToStep(this._clamp(W(e, this._value))), this._syncValue(), this._syncMirrors();
3392
+ this._value = this._snapToStep(this._clamp(G(e, this._value))), this._syncValue(), this._syncMirrors();
3393
3393
  }
3394
3394
  get start() {
3395
3395
  return this._start;
3396
3396
  }
3397
3397
  set start(e) {
3398
- this._start = Math.min(this._snapToStep(this._clamp(W(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
3398
+ this._start = Math.min(this._snapToStep(this._clamp(G(e, this._start))), this._end), this._syncValue(), this._syncMirrors();
3399
3399
  }
3400
3400
  get end() {
3401
3401
  return this._end;
3402
3402
  }
3403
3403
  set end(e) {
3404
- this._end = Math.max(this._snapToStep(this._clamp(W(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
3404
+ this._end = Math.max(this._snapToStep(this._clamp(G(e, this._end))), this._start), this._syncValue(), this._syncMirrors();
3405
3405
  }
3406
3406
  attributeChangedCallback(e, t, n) {
3407
3407
  if (e === "value" || e === "start" || e === "end" || e === "min" || e === "max" || e === "step") {
@@ -3414,19 +3414,19 @@ var V = class extends HTMLElement {
3414
3414
  this._isRange() ? this._resetRange() : this._resetSingle();
3415
3415
  }
3416
3416
  _updateFromAttribute(e) {
3417
- e === "value" ? this._value = this._snapToStep(this._clamp(W(this.getAttribute("value"), this._value))) : e === "start" ? this._start = this._snapToStep(this._clamp(W(this.getAttribute("start"), this._start))) : e === "end" && (this._end = this._snapToStep(this._clamp(W(this.getAttribute("end"), this._end))));
3417
+ 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))));
3418
3418
  }
3419
3419
  _isRange() {
3420
3420
  return this.hasAttribute("range");
3421
3421
  }
3422
3422
  _min() {
3423
- return W(this.getAttribute("min"), 0);
3423
+ return G(this.getAttribute("min"), 0);
3424
3424
  }
3425
3425
  _max() {
3426
- return W(this.getAttribute("max"), 100);
3426
+ return G(this.getAttribute("max"), 100);
3427
3427
  }
3428
3428
  _step() {
3429
- return W(this.getAttribute("step"), 1);
3429
+ return G(this.getAttribute("step"), 1);
3430
3430
  }
3431
3431
  _clamp(e) {
3432
3432
  return Math.max(this._min(), Math.min(e, this._max()));
@@ -3491,7 +3491,7 @@ var V = class extends HTMLElement {
3491
3491
  aria-valuenow="${this._value}"
3492
3492
  aria-valuetext="${this._formatValue(this._value)}"
3493
3493
  ${a ? "disabled" : ""}
3494
- aria-label="${ve(this.getAttribute("aria-label") || "Value")}"
3494
+ aria-label="${_e(this.getAttribute("aria-label") || "Value")}"
3495
3495
  ></button>
3496
3496
  `}
3497
3497
  ${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>` : ""}
@@ -3591,10 +3591,10 @@ var V = class extends HTMLElement {
3591
3591
  disconnectedCallback() {
3592
3592
  this._teardown();
3593
3593
  }
3594
- }, W = (e, t) => {
3594
+ }, G = (e, t) => {
3595
3595
  let n = Number.parseFloat(e);
3596
3596
  return Number.isFinite(n) ? n : t;
3597
- }, ve = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ye = class extends HTMLElement {
3597
+ }, _e = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), ve = class extends HTMLElement {
3598
3598
  static formAssociated = !0;
3599
3599
  _accessibleName() {
3600
3600
  return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Add tags";
@@ -3667,7 +3667,7 @@ var V = class extends HTMLElement {
3667
3667
  u(this, this._values.join(",")), this.innerHTML = `
3668
3668
  <div class="search-select${t}">
3669
3669
  <div class="input search-select-control search-select-multi"${this.hasAttribute("aria-invalid") ? " aria-invalid=\"true\"" : ""}${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
3670
- <input type="text" class="ms-input" data-input aria-label="${G(this._accessibleName())}" placeholder="${G(this.getAttribute("placeholder") || "Add…")}" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""}/>
3670
+ <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" : ""}/>
3671
3671
  <div class="ms-chips" data-chips></div>
3672
3672
  </div>
3673
3673
  </div>`, this._rendered = !0, u(this, this._values.join(",")), this._renderControl(), this._wire();
@@ -3679,7 +3679,7 @@ var V = class extends HTMLElement {
3679
3679
  e.innerHTML = "";
3680
3680
  return;
3681
3681
  }
3682
- e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${be(e)}</span><button type="button" class="chip-remove" data-remove="${G(e)}" aria-label="Remove ${G(e)}">${f("x")}</button></span>`).join("");
3682
+ e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${ye(e)}</span><button type="button" class="chip-remove" data-remove="${K(e)}" aria-label="Remove ${K(e)}">${f("x")}</button></span>`).join("");
3683
3683
  }
3684
3684
  }
3685
3685
  _wire() {
@@ -3750,18 +3750,18 @@ var V = class extends HTMLElement {
3750
3750
  disconnectedCallback() {
3751
3751
  this._teardown();
3752
3752
  }
3753
- }, be = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), G = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), K = (e) => String(e).padStart(2, "0"), xe = (e, t) => `${K(e)}:${K(t)}`, q = (e) => {
3753
+ }, ye = (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"), be = (e, t) => `${q(e)}:${q(t)}`, J = (e) => {
3754
3754
  let t = /^(\d{2}):(\d{2})$/.exec(e || "");
3755
3755
  return t ? {
3756
3756
  h: +t[1],
3757
3757
  m: +t[2]
3758
3758
  } : null;
3759
- }, J = (e, t = "24") => {
3759
+ }, Y = (e, t = "24") => {
3760
3760
  if (!e) return "";
3761
- if (t === "24") return xe(e.h, e.m);
3761
+ if (t === "24") return be(e.h, e.m);
3762
3762
  let n = e.h % 12 || 12, r = e.h >= 12 ? "PM" : "AM";
3763
- return `${n}:${K(e.m)} ${r}`;
3764
- }, Se = class extends HTMLElement {
3763
+ return `${n}:${q(e.m)} ${r}`;
3764
+ }, xe = class extends HTMLElement {
3765
3765
  static formAssociated = !0;
3766
3766
  static get observedAttributes() {
3767
3767
  return [
@@ -3808,11 +3808,11 @@ var V = class extends HTMLElement {
3808
3808
  }
3809
3809
  render() {
3810
3810
  this._defaultValue === void 0 && (this._defaultValue = this.getAttribute("value") || "", this._value = this._defaultValue || this._value);
3811
- let e = this.getAttribute("placeholder") || "Select time", t = q(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");
3811
+ 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");
3812
3812
  this.innerHTML = `
3813
3813
  <div class="timepicker">
3814
3814
  <button type="button" class="input timepicker-trigger${i}${t ? " has-value" : ""}" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}${a ? ` aria-label="${h(a)}"` : ""}${o ? ` aria-describedby="${h(o)}"` : ""}>
3815
- <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? J(t, n) : h(e)}</span>
3815
+ <span data-trigger-label class="${t ? "" : "timepicker-placeholder"}">${t ? Y(t, n) : h(e)}</span>
3816
3816
  ${f("clock")}
3817
3817
  </button>
3818
3818
  <div class="timepicker-pop" role="listbox" tabindex="-1" hidden></div>
@@ -3824,14 +3824,14 @@ var V = class extends HTMLElement {
3824
3824
  _syncTrigger() {
3825
3825
  let e = this.querySelector(".timepicker-trigger"), t = this.querySelector("[data-trigger-label]");
3826
3826
  if (!t) return;
3827
- let n = q(this._value), r = this.getAttribute("format") || "24";
3828
- t.textContent = n ? J(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
3827
+ let n = J(this._value), r = this.getAttribute("format") || "24";
3828
+ t.textContent = n ? Y(n, r) : this.getAttribute("placeholder") || "Select time", t.classList.toggle("timepicker-placeholder", !n), e?.classList.toggle("has-value", !!n);
3829
3829
  }
3830
3830
  _buildTimes() {
3831
- let e = Math.max(1, parseInt(this.getAttribute("step") || "30", 10)), t = this.getAttribute("min") || "00:00", n = this.getAttribute("max") || "23:59", r = q(t) || {
3831
+ 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) || {
3832
3832
  h: 0,
3833
3833
  m: 0
3834
- }, i = q(n) || {
3834
+ }, i = J(n) || {
3835
3835
  h: 23,
3836
3836
  m: 59
3837
3837
  }, a = [], o = r.h, s = r.m;
@@ -3844,10 +3844,10 @@ var V = class extends HTMLElement {
3844
3844
  _renderOptions() {
3845
3845
  let e = this.querySelector(".timepicker-pop");
3846
3846
  if (!e) return;
3847
- let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = q(this._value), i = this._focus, a = "";
3847
+ let t = this.getAttribute("format") || "24", n = this._buildTimes(), r = J(this._value), i = this._focus, a = "";
3848
3848
  for (let e = 0; e < n.length; e++) {
3849
- let o = n[e], s = xe(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
3850
- a += `<button type="button" class="timepicker-option${c ? " is-selected" : ""}" data-hm="${s}" role="option" tabindex="${i === e ? "0" : "-1"}"${c ? " aria-selected=\"true\"" : ""}>${J(o, t)}</button>`;
3849
+ let o = n[e], s = be(o.h, o.m), c = r && r.h === o.h && r.m === o.m;
3850
+ 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>`;
3851
3851
  }
3852
3852
  e.innerHTML = a, this._focusActive();
3853
3853
  }
@@ -3945,7 +3945,7 @@ var V = class extends HTMLElement {
3945
3945
  disconnectedCallback() {
3946
3946
  this._teardown();
3947
3947
  }
3948
- }, Ce = "wui-wizard-step", we = class extends HTMLElement {
3948
+ }, Se = "wui-wizard-step", Ce = class extends HTMLElement {
3949
3949
  static get observedAttributes() {
3950
3950
  return [
3951
3951
  "active",
@@ -3979,7 +3979,7 @@ var V = class extends HTMLElement {
3979
3979
  this._beforeNext = typeof e == "function" ? e : null;
3980
3980
  }
3981
3981
  get _steps() {
3982
- return [...this.querySelectorAll(`:scope > ${Ce}`)];
3982
+ return [...this.querySelectorAll(`:scope > ${Se}`)];
3983
3983
  }
3984
3984
  refresh() {
3985
3985
  this._rendered && this._renderChrome();
@@ -4038,13 +4038,13 @@ var V = class extends HTMLElement {
4038
4038
  return e.map((e, r) => {
4039
4039
  let a = this._stepStatus(e, r), o = e.getAttribute("label") || "", s = e.getAttribute("description") || "", c = e.getAttribute("icon") || "", l = r + 1, u;
4040
4040
  u = a === "done" ? f("check") : a === "error" ? f("alert-triangle") : a === "skipped" ? f("minus") : c ? f(c) : String(l);
4041
- let d = a === "pending" ? "step" : `step ${a}`, p = a === "active" ? " aria-current=\"step\"" : "", m = i || r < this._active, h = s ? `<span class="step-desc">${Y(s)}</span>` : "", g;
4042
- return g = t ? `<span class="step-circle">${u}</span><span class="step-text"><span class="step-index">Step ${l}</span><span class="step-label">${Y(o)}</span>${h}</span>` : n ? `<span class="step-circle">${u}</span><span class="step-index">Step ${l}</span><span class="step-label">${Y(o)}</span>${h}` : `<span class="step-circle">${u}</span><span class="step-label">${Y(o)}</span>${h}`, m ? `<button type="button" class="${d}" data-step="${r}"${p}>${g}</button>` : `<div class="${d}"${p}>${g}</div>`;
4041
+ let d = a === "pending" ? "step" : `step ${a}`, p = a === "active" ? " aria-current=\"step\"" : "", m = i || r < this._active, h = s ? `<span class="step-desc">${X(s)}</span>` : "", g;
4042
+ 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}"${p}>${g}</button>` : `<div class="${d}"${p}>${g}</div>`;
4043
4043
  }).join("");
4044
4044
  }
4045
4045
  _footerHtml(e) {
4046
4046
  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";
4047
- return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${f("arrow-left", { className: "me-2" })}${Y(a)}</button>` : "<span></span>"}<span class="wizard-footer-actions">${i && t < n ? `<button type="button" class="btn btn-subtle" data-nav="skip"${r}>${Y(s)}</button>` : ""}${t < n ? `<button type="button" class="btn btn-primary" data-nav="next"${r}>${Y(o)}${f("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${Y(c)}</button>`}</span>`;
4047
+ return `${t > 0 ? `<button type="button" class="btn btn-secondary" data-nav="back"${r}>${f("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)}${f("arrow-right", { className: "ms-2" })}</button>` : `<button type="button" class="btn btn-primary" data-nav="finish"${r}>${X(c)}</button>`}</span>`;
4048
4048
  }
4049
4049
  _wire() {
4050
4050
  this._teardown(), this._onHeaderClick = (e) => {
@@ -4112,7 +4112,7 @@ var V = class extends HTMLElement {
4112
4112
  _reflectActive(e) {
4113
4113
  this._reflecting = !0, this.setAttribute("active", String(e)), this._reflecting = !1;
4114
4114
  }
4115
- }, Y = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Te = class extends HTMLElement {
4115
+ }, X = (e) => String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), we = class extends HTMLElement {
4116
4116
  static get observedAttributes() {
4117
4117
  return [
4118
4118
  "label",
@@ -4126,14 +4126,30 @@ var V = class extends HTMLElement {
4126
4126
  let e = this.closest("wui-wizard");
4127
4127
  e && typeof e.refresh == "function" && e.refresh();
4128
4128
  }
4129
- }, Ee = "image/png,image/jpeg,image/webp", De = 5, Oe = {
4129
+ }, Te = 2e3;
4130
+ async function Ee(e) {
4131
+ try {
4132
+ if (navigator.clipboard?.writeText) return await navigator.clipboard.writeText(e), !0;
4133
+ } catch {}
4134
+ try {
4135
+ let t = document.createElement("textarea");
4136
+ t.value = e, t.style.position = "fixed", t.style.top = "0", t.style.left = "0", t.style.opacity = "0", document.body.appendChild(t), t.select();
4137
+ let n = document.execCommand("copy");
4138
+ return document.body.removeChild(t), !!n;
4139
+ } catch {
4140
+ return !1;
4141
+ }
4142
+ }
4143
+ //#endregion
4144
+ //#region src/fileValidation.js
4145
+ var De = "image/png,image/jpeg,image/webp", Oe = 5, ke = {
4130
4146
  "image/png": [".png"],
4131
4147
  "image/jpeg": [".jpg", ".jpeg"],
4132
4148
  "image/webp": [".webp"],
4133
4149
  "image/gif": [".gif"],
4134
4150
  "image/svg+xml": [".svg"],
4135
4151
  "application/pdf": [".pdf"]
4136
- }, ke = {
4152
+ }, Ae = {
4137
4153
  "image/png": "PNG",
4138
4154
  "image/jpeg": "JPG",
4139
4155
  "image/webp": "WEBP",
@@ -4147,7 +4163,7 @@ var V = class extends HTMLElement {
4147
4163
  ".gif": "GIF",
4148
4164
  ".svg": "SVG",
4149
4165
  ".pdf": "PDF"
4150
- }, X = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), Z = [
4166
+ }, Z = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), je = [
4151
4167
  ".png",
4152
4168
  ".jpg",
4153
4169
  ".jpeg",
@@ -4158,35 +4174,35 @@ var V = class extends HTMLElement {
4158
4174
  ".avif",
4159
4175
  ".heic"
4160
4176
  ];
4161
- function Ae(e) {
4177
+ function Me(e) {
4162
4178
  if (!e) return !1;
4163
4179
  let t = typeof e == "object" && e.type ? String(e.type).toLowerCase() : "";
4164
4180
  if (t) return t.startsWith("image/");
4165
4181
  let n = typeof e == "string" ? e : e.name || e.url || "", r = String(n).toLowerCase();
4166
- return Z.some((e) => r.endsWith(e));
4182
+ return je.some((e) => r.endsWith(e));
4167
4183
  }
4168
- function je(e) {
4169
- let t = X(e);
4170
- return t.length ? t.every((e) => e.startsWith(".") ? Z.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
4184
+ function Ne(e) {
4185
+ let t = Z(e);
4186
+ return t.length ? t.every((e) => e.startsWith(".") ? je.includes(e) : e === "image/*" || e.startsWith("image/")) : !1;
4171
4187
  }
4172
- function Me(e) {
4188
+ function Pe(e) {
4173
4189
  let t = [];
4174
- for (let n of X(e)) {
4175
- let e = ke[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
4190
+ for (let n of Z(e)) {
4191
+ let e = Ae[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
4176
4192
  t.includes(e) || t.push(e);
4177
4193
  }
4178
4194
  return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
4179
4195
  }
4180
- function Ne(e, t) {
4181
- let n = X(t);
4196
+ function Fe(e, t) {
4197
+ let n = Z(t);
4182
4198
  if (!n.length) return !0;
4183
4199
  let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
4184
- return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (Oe[e] || []).some((e) => i.endsWith(e)));
4200
+ return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ke[e] || []).some((e) => i.endsWith(e)));
4185
4201
  }
4186
- function Pe(e, t = {}) {
4202
+ function Ie(e, t = {}) {
4187
4203
  if (!e) return null;
4188
- let n = t.accept === void 0 ? Ee : t.accept, r = t.maxSizeMb || 5;
4189
- return Ne(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Me(n)} file.`;
4204
+ let n = t.accept === void 0 ? De : t.accept, r = t.maxSizeMb || 5;
4205
+ return Fe(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${Pe(n)} file.`;
4190
4206
  }
4191
4207
  //#endregion
4192
4208
  //#region src/passwordRules.js
@@ -4197,15 +4213,15 @@ var Q = {
4197
4213
  digit: !0,
4198
4214
  special: !0,
4199
4215
  uniqueChars: 0
4200
- }, Fe = "Password Requirements";
4201
- function Ie(e) {
4216
+ }, Le = "Password Requirements";
4217
+ function Re(e) {
4202
4218
  return e === !0 || e == null ? { ...Q } : {
4203
4219
  ...Q,
4204
4220
  ...e
4205
4221
  };
4206
4222
  }
4207
- function Le(e) {
4208
- let t = Ie(e), n = [];
4223
+ function ze(e) {
4224
+ let t = Re(e), n = [];
4209
4225
  if (t.minLength > 0 && n.push({
4210
4226
  key: "length",
4211
4227
  label: `At least ${t.minLength} characters long`,
@@ -4236,25 +4252,25 @@ function Le(e) {
4236
4252
  }
4237
4253
  return n;
4238
4254
  }
4239
- function Re(e, t) {
4255
+ function Be(e, t) {
4240
4256
  let n = e == null ? "" : String(e);
4241
- return Le(t).map((e) => ({
4257
+ return ze(t).map((e) => ({
4242
4258
  key: e.key,
4243
4259
  label: e.label,
4244
4260
  met: e.test(n)
4245
4261
  }));
4246
4262
  }
4247
- function ze(e, t) {
4248
- return Re(e, t).every((e) => e.met);
4263
+ function Ve(e, t) {
4264
+ return Be(e, t).every((e) => e.met);
4249
4265
  }
4250
4266
  //#endregion
4251
4267
  //#region src/index.js
4252
4268
  var $ = (e, t) => {
4253
4269
  typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
4254
4270
  };
4255
- function Be() {
4256
- $("wui-select", ge), $("wui-phone", V), $("wui-datepicker", ee), $("wui-date-range", te), $("wui-dock", ne), $("wui-feedback", j), $("wui-slider", _e), $("wui-timepicker", Se), $("wui-autocomplete", v), $("wui-multiselect", ce), $("wui-taginput", ye), $("wui-otp", fe), $("wui-status-icon", n), $("wui-wizard-step", Te), $("wui-wizard", we);
4271
+ function He() {
4272
+ $("wui-select", he), $("wui-phone", H), $("wui-datepicker", ee), $("wui-date-range", te), $("wui-dock", ne), $("wui-feedback", oe), $("wui-slider", ge), $("wui-timepicker", xe), $("wui-autocomplete", v), $("wui-multiselect", le), $("wui-taginput", ve), $("wui-otp", N), $("wui-status-icon", n), $("wui-wizard-step", we), $("wui-wizard", Ce);
4257
4273
  }
4258
- Be();
4274
+ He();
4259
4275
  //#endregion
4260
- export { Ee as DEFAULT_IMAGE_ACCEPT, De as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, Fe as DEFAULT_REQUIREMENTS_TITLE, t as STATUS_TONES, v as WuiAutocomplete, ee as WuiDatePicker, te as WuiDateRange, ne as WuiDock, j as WuiFeedback, ce as WuiMultiSelect, fe as WuiOtp, V as WuiPhone, ge as WuiSelect, _e as WuiSlider, n as WuiStatusIcon, ye as WuiTagInput, Se as WuiTimePicker, we as WuiWizard, Te as WuiWizardStep, Me as acceptLabel, Le as buildPasswordRules, Be as defineWeborityElements, Re as evaluatePassword, f as glyphSvg, Ae as isImageFile, je as isImageOnlyAccept, Ne as matchesAccept, ze as passwordSatisfies, Pe as validateFile };
4276
+ export { Te as COPY_FEEDBACK_MS, De as DEFAULT_IMAGE_ACCEPT, Oe as DEFAULT_MAX_SIZE_MB, Q as DEFAULT_PASSWORD_RULES, Le as DEFAULT_REQUIREMENTS_TITLE, t as STATUS_TONES, v as WuiAutocomplete, ee as WuiDatePicker, te as WuiDateRange, ne as WuiDock, oe as WuiFeedback, le as WuiMultiSelect, N as WuiOtp, H as WuiPhone, he as WuiSelect, ge as WuiSlider, n as WuiStatusIcon, ve as WuiTagInput, xe as WuiTimePicker, Ce as WuiWizard, we as WuiWizardStep, Pe as acceptLabel, ze as buildPasswordRules, Ee as copyTextToClipboard, He as defineWeborityElements, Be as evaluatePassword, f as glyphSvg, Me as isImageFile, Ne as isImageOnlyAccept, Fe as matchesAccept, Ve as passwordSatisfies, Ie as validateFile };