maz-ui 3.47.2-beta.0 → 3.47.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/components/MazAccordion.mjs +36 -37
  2. package/components/MazAnimatedCounter.mjs +14 -16
  3. package/components/MazBottomSheet.mjs +1 -1
  4. package/components/MazBtn.mjs +1 -1
  5. package/components/MazCard.mjs +1 -1
  6. package/components/MazCarousel.mjs +1 -1
  7. package/components/MazChart.mjs +23 -32
  8. package/components/MazChecklist.mjs +1 -1
  9. package/components/MazCircularProgressBar.mjs +66 -71
  10. package/components/MazDialog.mjs +1 -1
  11. package/components/MazDialogPromise.mjs +1 -1
  12. package/components/MazDrawer.mjs +1 -1
  13. package/components/MazDropdown.mjs +162 -185
  14. package/components/MazExpandAnimation.mjs +20 -21
  15. package/components/MazGallery.mjs +1 -1
  16. package/components/MazInput.mjs +1 -1
  17. package/components/MazInputCode.mjs +30 -31
  18. package/components/MazInputNumber.mjs +1 -1
  19. package/components/MazInputPrice.mjs +1 -1
  20. package/components/MazInputTags.mjs +1 -1
  21. package/components/MazLink.mjs +18 -30
  22. package/components/MazPagination.mjs +1 -1
  23. package/components/MazPhoneNumberInput.mjs +1 -1
  24. package/components/MazPicker.mjs +1 -1
  25. package/components/MazRadio.mjs +37 -42
  26. package/components/MazRadioButtons.mjs +61 -66
  27. package/components/MazSelect.mjs +1 -1
  28. package/components/MazSlider.mjs +107 -116
  29. package/components/MazStepper.mjs +1 -1
  30. package/components/MazSwitch.mjs +24 -28
  31. package/components/MazTable.d.ts +6 -6
  32. package/components/MazTable.mjs +1 -1
  33. package/components/MazTabsBar.mjs +1 -1
  34. package/components/MazTextarea.mjs +32 -34
  35. package/components/assets/MazLink.css +1 -1
  36. package/components/assets/MazTable.css +1 -1
  37. package/components/chunks/{MazBadge-CvIiiTdM.mjs → MazBadge-CqppWg2j.mjs} +1 -1
  38. package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
  39. package/{modules/chunks/MazBtn-BSnVxud6.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
  40. package/components/chunks/{MazBtn-DVkwISlp.mjs → MazBtn-40lm8-AL.mjs} +37 -49
  41. package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
  42. package/components/chunks/{MazBtn-BO3G90L3.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
  43. package/components/chunks/{MazBtn-DJOUeES7.mjs → MazBtn-BijEMn4r.mjs} +37 -49
  44. package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
  45. package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
  46. package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
  47. package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
  48. package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
  49. package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
  50. package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
  51. package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
  52. package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
  53. package/components/chunks/{MazCard-FSXmHyhj.mjs → MazCard-BYB8y1_u.mjs} +18 -19
  54. package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
  55. package/components/chunks/{MazCheckbox-2G4VkxDz.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
  56. package/components/chunks/{MazCheckbox-Cq9gpTEw.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
  57. package/components/chunks/{MazCheckbox-BmnqBHaY.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
  58. package/components/chunks/{MazChecklist-CY1Cv70T.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
  59. package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
  60. package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
  61. package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
  62. package/components/chunks/{MazGallery-BknvUeo1.mjs → MazGallery-CXQiXWFr.mjs} +32 -33
  63. package/components/chunks/{MazGallery-CZOokGAt.mjs → MazGallery-VTZUhBKC.mjs} +33 -34
  64. package/components/chunks/{MazIcon-z-jTiuyI.mjs → MazIcon-BF5TFzse.mjs} +1 -1
  65. package/components/chunks/{MazInput-oOA7gdLO.mjs → MazInput-DC3S-CVu.mjs} +44 -53
  66. package/components/chunks/{MazInput-BQoQSRyL.mjs → MazInput-DzWkS-g8.mjs} +40 -49
  67. package/components/chunks/{MazInput-CJQB68c-.mjs → MazInput-NE6H-10w.mjs} +42 -51
  68. package/components/chunks/{MazInputNumber-B4mQJcVB.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
  69. package/components/chunks/{MazInputPrice-BrxE5WVf.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
  70. package/components/chunks/{MazInputTags-BVCej_gW.mjs → MazInputTags-Dj3sW-e5.mjs} +181 -202
  71. package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
  72. package/components/chunks/{MazLoadingBar-Dwf55oHy.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
  73. package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
  74. package/components/chunks/{MazPhoneNumberInput-Cd25AzXc.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +500 -544
  75. package/components/chunks/{MazPicker-C78yxilJ.mjs → MazPicker-DwWiIYAR.mjs} +243 -264
  76. package/components/chunks/{MazPickerMonthSwitcher-CyHYx8TT.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
  77. package/components/chunks/{MazPickerShortcuts-Bsi8cnox.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
  78. package/components/chunks/{MazPickerYearSwitcher-DLUSMAtz.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
  79. package/components/chunks/{MazSelect-CQDoUpgp.mjs → MazSelect-BJ07NVXQ.mjs} +149 -170
  80. package/components/chunks/{MazSelect-uCJPMXF-.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
  81. package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
  82. package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
  83. package/components/chunks/{MazSpinner-BT_717pD.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
  84. package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
  85. package/components/chunks/{MazSpinner-B9OwpEP_.mjs → MazSpinner-BymqEMBk.mjs} +1 -1
  86. package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
  87. package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
  88. package/components/chunks/{MazSpinner-EFo8dM46.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
  89. package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
  90. package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
  91. package/components/chunks/MazSpinner-DS58mtzm.mjs +34 -0
  92. package/components/chunks/{MazSpinner-2D0ZmAQz.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
  93. package/components/chunks/{MazSpinner-C1Ip-Dwh.mjs → MazSpinner-Dmkr_r9u.mjs} +1 -1
  94. package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
  95. package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
  96. package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
  97. package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
  98. package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
  99. package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
  100. package/components/chunks/{MazTable-Cuz5QI08.mjs → MazTable-BJDPdIJB.mjs} +183 -227
  101. package/components/chunks/{MazTableCell-D_OTOJiy.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
  102. package/components/chunks/{MazTableRow-BTcVAyOy.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
  103. package/components/chunks/{MazTableTitle-BDA9G6Zw.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
  104. package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
  105. package/components/chunks/{MazTransitionExpand-C-FHhOGB.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
  106. package/modules/chunks/MazBtn-QVmZ90t5.mjs +106 -0
  107. package/modules/chunks/MazBtn-R7z-Hxp-.cjs +1 -0
  108. package/modules/chunks/{MazIcon-dhyR9Q8a.cjs → MazIcon-CKCoY05P.cjs} +1 -1
  109. package/modules/chunks/{MazIcon-DllGg8tw.mjs → MazIcon-DJfEPmBG.mjs} +1 -1
  110. package/modules/chunks/{MazSpinner-bdGjxsu6.mjs → MazSpinner-C95OqwKl.mjs} +1 -1
  111. package/modules/chunks/{MazSpinner-CiIyZ8gs.cjs → MazSpinner-DYT43E6e.cjs} +1 -1
  112. package/modules/chunks/{index-x2F1l5sr.mjs → index-CjsYU5rv.mjs} +191 -226
  113. package/modules/chunks/{index-BPqjUr5e.cjs → index-oVi9-l4o.cjs} +2 -27
  114. package/modules/index.cjs +1 -1
  115. package/modules/index.mjs +1 -1
  116. package/nuxt/index.json +1 -1
  117. package/package.json +1 -1
  118. package/types/components/MazTable.vue.d.ts +6 -6
  119. package/types/modules/composables/useFormValidator/types.d.ts +5 -1
  120. package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
  121. package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
  122. package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
  123. package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
  124. package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
  125. package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
  126. package/components/chunks/MazBtn-C87UEsVs.mjs +0 -118
  127. package/components/chunks/MazBtn-C_l3xuAh.mjs +0 -118
  128. package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
  129. package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
  130. package/components/chunks/MazBtn-DadFupkY.mjs +0 -118
  131. package/components/chunks/MazBtn-GGcGrIH4.mjs +0 -118
  132. package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
  133. package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
  134. package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
  135. package/components/chunks/MazSpinner-C23CZ_Za.mjs +0 -34
  136. package/components/chunks/MazSpinner-CViChjTw.mjs +0 -34
  137. package/components/chunks/MazSpinner-CZMBhCOJ.mjs +0 -34
  138. package/components/chunks/MazSpinner-D4C84xZe.mjs +0 -34
  139. package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
  140. package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
  141. package/components/chunks/MazSpinner-u8WQTgUR.mjs +0 -34
  142. package/components/chunks/MazSpinner-w-S5uCxg.mjs +0 -34
  143. package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
  144. package/components/chunks/MazTabsBar-JkRzMDM6.mjs +0 -203
  145. package/modules/chunks/MazBtn-Bf9Cq5M7.cjs +0 -9
@@ -1,28 +1,28 @@
1
1
  import '../assets/MazPhoneNumberInput.css';var Ge = Object.defineProperty;
2
- var Je = (n, o, e) => o in n ? Ge(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
3
- var _ = (n, o, e) => Je(n, typeof o != "symbol" ? o + "" : o, e);
4
- import { useId as Ze, computed as h, inject as Xe, defineComponent as se, defineAsyncComponent as q, withDirectives as ze, openBlock as b, createElementBlock as L, normalizeClass as F, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as oe, createVNode as H, unref as k, createCommentVNode as z, renderSlot as N, ref as E, onMounted as Ie, useSlots as xe, createBlock as U, resolveDynamicComponent as Pe, toHandlers as _e, vModelDynamic as eo, createTextVNode as oo, toDisplayString as ue, withModifiers as ae, withCtx as G, useCssVars as to, onBeforeMount as lo, nextTick as ie, Transition as no, mergeModels as ke, useModel as ao, provide as so, watch as he } from "vue";
2
+ var Je = (a, o, e) => o in a ? Ge(a, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[o] = e;
3
+ var _ = (a, o, e) => Je(a, typeof o != "symbol" ? o + "" : o, e);
4
+ import { useId as Ze, computed as h, inject as Xe, defineComponent as ne, defineAsyncComponent as q, withDirectives as ze, openBlock as b, createElementBlock as E, normalizeClass as F, normalizeStyle as ee, Fragment as be, renderList as Be, createElementVNode as j, mergeProps as oe, createVNode as H, unref as P, createCommentVNode as $, renderSlot as N, ref as k, onMounted as Ie, useSlots as xe, createBlock as U, resolveDynamicComponent as Pe, toHandlers as _e, vModelDynamic as eo, createTextVNode as oo, toDisplayString as ue, withModifiers as se, withCtx as G, useCssVars as to, onBeforeMount as lo, nextTick as ie, Transition as ao, mergeModels as ke, useModel as so, provide as no, watch as he } from "vue";
5
5
  import { getCountries as Oe, getCountryCallingCode as ce, isSupportedCountry as ro, parsePhoneNumberFromString as io, AsYouType as uo, getExampleNumber as co } from "libphonenumber-js";
6
6
  function Ae({
7
- componentName: n,
7
+ componentName: a,
8
8
  providedId: o
9
9
  }) {
10
10
  const e = Ze();
11
- return h(() => o ?? `${n}-${e}`);
11
+ return h(() => o ?? `${a}-${e}`);
12
12
  }
13
- function Ee(n, o = "20x15") {
14
- return `https://flagcdn.com/${o}/${n.toLowerCase()}.png`;
13
+ function Ee(a, o = "20x15") {
14
+ return `https://flagcdn.com/${o}/${a.toLowerCase()}.png`;
15
15
  }
16
- function Me(n, o) {
17
- const e = Xe(n, o);
16
+ function Me(a, o) {
17
+ const e = Xe(a, o);
18
18
  if (!e)
19
- throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${n}`);
19
+ throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${a}`);
20
20
  return e;
21
21
  }
22
- function po(n) {
23
- return !!n;
22
+ function mo(a) {
23
+ return !!a;
24
24
  }
25
- const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", fo = {
25
+ const fo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", po = {
26
26
  baseClass: "m-lazy-img",
27
27
  loadedClass: "m-lazy-loaded",
28
28
  loadingClass: "m-lazy-loading",
@@ -39,7 +39,7 @@ const mo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAA
39
39
  class ho {
40
40
  constructor(o = {}) {
41
41
  _(this, "observers", []);
42
- _(this, "defaultOptions", fo);
42
+ _(this, "defaultOptions", po);
43
43
  _(this, "options");
44
44
  _(this, "onImgLoadedCallback");
45
45
  _(this, "onImgErrorCallback");
@@ -149,18 +149,18 @@ class ho {
149
149
  t.src = e;
150
150
  }
151
151
  handleIntersectionObserver(o, e, t, r) {
152
- var u, y;
152
+ var u, v;
153
153
  this.observers.push(r);
154
- for (const m of t)
155
- if (m.isIntersecting) {
156
- if ((y = (u = this.options).onIntersecting) == null || y.call(u, m.target), this.options.observerOnce && r.unobserve(o), this.options.loadOnce && this.hasImgLoaded)
154
+ for (const f of t)
155
+ if (f.isIntersecting) {
156
+ if ((v = (u = this.options).onIntersecting) == null || v.call(u, f.target), this.options.observerOnce && r.unobserve(o), this.options.loadOnce && this.hasImgLoaded)
157
157
  return;
158
158
  this.loadImage(o, e);
159
159
  }
160
160
  }
161
161
  createObserver(o, e) {
162
- const t = (y, m) => {
163
- this.handleIntersectionObserver(o, e, y, m);
162
+ const t = (v, f) => {
163
+ this.handleIntersectionObserver(o, e, v, f);
164
164
  }, r = this.options.observerOptions;
165
165
  new IntersectionObserver(t, r).observe(o);
166
166
  }
@@ -177,7 +177,7 @@ class ho {
177
177
  async add(o, e) {
178
178
  if (this.hasBgImgMode(e) && this.isPictureElement(o))
179
179
  throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
180
- setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o, mo), await this.bindUpdateHandler(o, e, "bind");
180
+ setTimeout(() => this.setBaseClass(o), 0), o.getAttribute("src") || this.setImgSrc(o, fo), await this.bindUpdateHandler(o, e, "bind");
181
181
  }
182
182
  async update(o, e) {
183
183
  e.value !== e.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(o), await this.bindUpdateHandler(o, e, "update"));
@@ -190,21 +190,21 @@ class ho {
190
190
  }
191
191
  }
192
192
  let de;
193
- const yo = {
194
- created(n, o) {
193
+ const vo = {
194
+ created(a, o) {
195
195
  const e = typeof o.value == "object" ? o.value : {};
196
- de = new ho(e), de.add(n, o);
196
+ de = new ho(e), de.add(a, o);
197
197
  },
198
- updated(n, o) {
199
- de.update(n, o);
198
+ updated(a, o) {
199
+ de.update(a, o);
200
200
  },
201
- unmounted(n, o) {
202
- de.remove(n, o);
201
+ unmounted(a, o) {
202
+ de.remove(a, o);
203
203
  }
204
- }, vo = ["data-lazy-srcset", "media"], go = ["alt"], bo = {
204
+ }, yo = ["data-lazy-srcset", "media"], go = ["alt"], bo = {
205
205
  key: 0,
206
206
  class: "m-lazy-img-component-loader"
207
- }, Co = /* @__PURE__ */ se({
207
+ }, Co = /* @__PURE__ */ ne({
208
208
  inheritAttrs: !1,
209
209
  __name: "MazLazyImg",
210
210
  props: {
@@ -224,26 +224,26 @@ const yo = {
224
224
  block: { type: Boolean }
225
225
  },
226
226
  emits: ["intersecting", "loading", "loaded", "error"],
227
- setup(n) {
228
- const o = n, e = q(() => import("./MazSpinner-C23CZ_Za.mjs")), t = h(() => o.image || o.src), r = h(() => {
227
+ setup(a) {
228
+ const o = a, e = q(() => import("./MazSpinner-CEFbkZkM.mjs")), t = h(() => o.image || o.src), r = h(() => {
229
229
  var u;
230
230
  return typeof t.value == "string" ? [{ srcset: t.value }] : (u = t.value) == null ? void 0 : u.sources;
231
231
  });
232
- return (u, y) => ze((b(), L(
232
+ return (u, v) => ze((b(), E(
233
233
  "picture",
234
234
  {
235
235
  class: F(["m-lazy-img-component", [{ "--use-loader": !u.noLoader, "--height-full": u.imageHeightFull, "--block": u.block }, o.class]]),
236
236
  style: ee(u.style)
237
237
  },
238
238
  [
239
- (b(!0), L(
239
+ (b(!0), E(
240
240
  be,
241
241
  null,
242
- Be(r.value, ({ srcset: m, media: O }, $) => (b(), L("source", {
243
- key: $,
244
- "data-lazy-srcset": m,
242
+ Be(r.value, ({ srcset: f, media: O }, L) => (b(), E("source", {
243
+ key: L,
244
+ "data-lazy-srcset": f,
245
245
  media: O
246
- }, null, 8, vo))),
246
+ }, null, 8, yo))),
247
247
  128
248
248
  /* KEYED_FRAGMENT */
249
249
  )),
@@ -253,29 +253,29 @@ const yo = {
253
253
  alt: u.alt,
254
254
  class: u.imgClass
255
255
  }), null, 16, go),
256
- u.noLoader ? z("v-if", !0) : (b(), L("div", bo, [
257
- H(k(e), { size: "2em" })
256
+ u.noLoader ? $("v-if", !0) : (b(), E("div", bo, [
257
+ H(P(e), { size: "2em" })
258
258
  ])),
259
259
  N(u.$slots, "default", {}, void 0, !0)
260
260
  ],
261
261
  6
262
262
  /* CLASS, STYLE */
263
263
  )), [
264
- [k(yo), {
264
+ [P(vo), {
265
265
  noPhoto: u.noPhoto,
266
266
  loadOnce: u.loadOnce,
267
267
  observerOptions: u.observerOptions,
268
268
  fallbackSrc: u.fallbackSrc,
269
269
  observerOnce: !u.noObserverOnce,
270
- onIntersecting: (m) => u.$emit("intersecting", m),
271
- onLoading: (m) => u.$emit("loading", m),
272
- onLoaded: (m) => u.$emit("loaded", m),
273
- onError: (m) => u.$emit("error", m)
270
+ onIntersecting: (f) => u.$emit("intersecting", f),
271
+ onLoading: (f) => u.$emit("loading", f),
272
+ onLoaded: (f) => u.$emit("loaded", f),
273
+ onError: (f) => u.$emit("error", f)
274
274
  }]
275
275
  ]);
276
276
  }
277
- }), re = (n, o) => {
278
- const e = n.__vccOpts || n;
277
+ }), re = (a, o) => {
278
+ const e = a.__vccOpts || a;
279
279
  for (const [t, r] of o)
280
280
  e[t] = r;
281
281
  return e;
@@ -289,7 +289,7 @@ const yo = {
289
289
  removeNumbers: !1,
290
290
  customNormalizationForms: ["NFC", "NFKD"]
291
291
  };
292
- function pe(n, o) {
292
+ function me(a, o) {
293
293
  const e = { ...zo, ...o }, t = {
294
294
  À: "A",
295
295
  Á: "A",
@@ -339,93 +339,93 @@ function pe(n, o) {
339
339
  ñ: "n",
340
340
  ó: "o"
341
341
  };
342
- let r = n.toString();
342
+ let r = a.toString();
343
343
  if (e.trim && (r = r.trim()), e.normalizeSpaces && (r = r.replaceAll(/\s+/g, " ")), e.replaceSpaces && (r = r.replaceAll(" ", "-")), e.removeNumbers && (r = r.replaceAll(/\d/g, "")), e.removeAccents && (r = r.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g, (u) => t[u] || u), r = r.replaceAll(/[\u0300-\u036F]/g, "")), e.caseSensitive === !1 && (r = r.toLowerCase()), e.removeSpecialCharacters && (r = r.replaceAll(/[^\dA-Z-]/gi, "")), e.trim && (r = r.trim()), e.customNormalizationForms)
344
344
  for (const u of e.customNormalizationForms)
345
345
  r = r.normalize(u);
346
346
  return r;
347
347
  }
348
- function Io(n, o) {
349
- const e = n.length, t = o.length, r = [];
348
+ function Io(a, o) {
349
+ const e = a.length, t = o.length, r = [];
350
350
  for (let u = 0; u <= e; u++)
351
351
  r[u] = [u];
352
352
  for (let u = 0; u <= t; u++)
353
353
  r[0][u] = u;
354
354
  for (let u = 1; u <= e; u++)
355
- for (let y = 1; y <= t; y++) {
356
- const m = n[u - 1] === o[y - 1] ? 0 : 1;
357
- r[u][y] = Math.min(
358
- r[u - 1][y] + 1,
359
- r[u][y - 1] + 1,
360
- r[u - 1][y - 1] + m
355
+ for (let v = 1; v <= t; v++) {
356
+ const f = a[u - 1] === o[v - 1] ? 0 : 1;
357
+ r[u][v] = Math.min(
358
+ r[u - 1][v] + 1,
359
+ r[u][v - 1] + 1,
360
+ r[u - 1][v - 1] + f
361
361
  );
362
362
  }
363
363
  return r[e][t];
364
364
  }
365
- function Te(n, o) {
366
- const e = Io(n, o), t = Math.max(n.length, o.length);
365
+ function Te(a, o) {
366
+ const e = Io(a, o), t = Math.max(a.length, o.length);
367
367
  return 1 - e / t;
368
368
  }
369
- function Ao(n, o, e = 0.75) {
370
- return Te(n, o) >= e;
369
+ function Ao(a, o, e = 0.75) {
370
+ return Te(a, o) >= e;
371
371
  }
372
- function ye(n, o, e = 0.75) {
372
+ function ve(a, o, e = 0.75) {
373
373
  const t = h(
374
- () => pe(typeof n == "string" ? n : n.value)
374
+ () => me(typeof a == "string" ? a : a.value)
375
375
  ), r = h(
376
- () => pe(typeof o == "string" ? o : o.value)
377
- ), u = h(() => typeof e == "number" ? e : e.value), y = h(() => Te(t.value, r.value));
376
+ () => me(typeof o == "string" ? o : o.value)
377
+ ), u = h(() => typeof e == "number" ? e : e.value), v = h(() => Te(t.value, r.value));
378
378
  return {
379
379
  isMatching: h(
380
380
  () => Ao(t.value, r.value, u.value)
381
381
  ),
382
- score: y
382
+ score: v
383
383
  };
384
384
  }
385
- function Fe(n, o, e) {
386
- var y;
387
- n.stopPropagation();
385
+ function Fe(a, o, e) {
386
+ var v;
387
+ a.stopPropagation();
388
388
  const t = typeof e.value == "function" ? e.value : e.value.handler, r = typeof e.value == "object" ? e.value.exclude : void 0;
389
389
  let u = !1;
390
390
  if (r && r.length > 0) {
391
- for (const m of r)
392
- if (!u && n.target instanceof HTMLElement) {
393
- const O = (y = document.querySelector(m)) == null ? void 0 : y.getAttribute("id");
394
- u = n.target.getAttribute("id") === O;
391
+ for (const f of r)
392
+ if (!u && a.target instanceof HTMLElement) {
393
+ const O = (v = document.querySelector(f)) == null ? void 0 : v.getAttribute("id");
394
+ u = a.target.getAttribute("id") === O;
395
395
  }
396
396
  }
397
- !o.contains(n.target) && !u && (t == null || t());
397
+ !o.contains(a.target) && !u && (t == null || t());
398
398
  }
399
399
  function Ne() {
400
400
  return document.ontouchstart === null ? "touchstart" : "click";
401
401
  }
402
- function wo(n, o) {
402
+ function wo(a, o) {
403
403
  const e = Ne();
404
- document.removeEventListener(e, (t) => Fe(t, n, o));
404
+ document.removeEventListener(e, (t) => Fe(t, a, o));
405
405
  }
406
- function So(n, o) {
406
+ function So(a, o) {
407
407
  if (typeof o.value != "function" && typeof o.value == "object" && typeof o.value.handler != "function") {
408
408
  console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
409
409
  return;
410
410
  }
411
411
  const e = Ne();
412
- document.addEventListener(e, (t) => Fe(t, n, o));
412
+ document.addEventListener(e, (t) => Fe(t, a, o));
413
413
  }
414
414
  const Vo = {
415
415
  mounted: So,
416
416
  unmounted: wo
417
417
  };
418
- function Po(n, o) {
418
+ function Po(a, o) {
419
419
  let e;
420
420
  return function(...t) {
421
421
  clearTimeout(e), e = setTimeout(() => {
422
- n.apply(this, t);
422
+ a.apply(this, t);
423
423
  }, o);
424
424
  };
425
425
  }
426
- let ve = null;
427
- function ko(n, o) {
428
- ve && clearTimeout(ve), ve = setTimeout(n, o);
426
+ let ye = null;
427
+ function ko(a, o) {
428
+ ye && clearTimeout(ye), ye = setTimeout(a, o);
429
429
  }
430
430
  const Eo = {
431
431
  key: 0,
@@ -433,7 +433,7 @@ const Eo = {
433
433
  }, Lo = { class: "m-input-wrapper-input" }, $o = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Bo = { key: 0 }, Oo = {
434
434
  key: 1,
435
435
  class: "m-input-wrapper-right"
436
- }, Mo = /* @__PURE__ */ se({
436
+ }, Mo = /* @__PURE__ */ ne({
437
437
  inheritAttrs: !1,
438
438
  __name: "MazInput",
439
439
  props: {
@@ -470,16 +470,16 @@ const Eo = {
470
470
  block: { type: Boolean }
471
471
  },
472
472
  emits: ["update:model-value", "focus", "blur", "click", "change", "input"],
473
- setup(n, { emit: o }) {
474
- const e = n, t = o, r = q(() => import("./MazBtn-C_l3xuAh.mjs")), u = q(() => import("./MazIcon-z-jTiuyI.mjs")), y = q(() => import("./eye-slash-BoO00xzs.mjs")), m = q(() => import("./eye-f8zAUc30.mjs")), O = q(() => import("./check-C9Q_W85g.mjs")), $ = E(!1), v = E(!1), P = E(), i = Ae({
473
+ setup(a, { emit: o }) {
474
+ const e = a, t = o, r = q(() => import("./MazBtn-2VKM1wZu.mjs")), u = q(() => import("./MazIcon-BF5TFzse.mjs")), v = q(() => import("./eye-slash-BoO00xzs.mjs")), f = q(() => import("./eye-f8zAUc30.mjs")), O = q(() => import("./check-C9Q_W85g.mjs")), L = k(!1), y = k(!1), V = k(), i = Ae({
475
475
  componentName: "MazInput",
476
476
  providedId: e.id
477
477
  });
478
478
  Ie(() => {
479
- var s;
480
- e.autoFocus && ((s = P.value) == null || s.focus());
479
+ var n;
480
+ e.autoFocus && ((n = V.value) == null || n.focus());
481
481
  });
482
- const f = h(() => e.type === "password"), I = h(() => $.value ? "text" : e.type), S = h(() => {
482
+ const p = h(() => e.type === "password"), z = h(() => L.value ? "text" : e.type), w = h(() => {
483
483
  if (!e.noBorder) {
484
484
  if (e.error)
485
485
  return "maz-border-danger";
@@ -487,7 +487,7 @@ const Eo = {
487
487
  return "maz-border-success";
488
488
  if (e.warning)
489
489
  return "maz-border-warning";
490
- if (v.value || e.borderActive) {
490
+ if (y.value || e.borderActive) {
491
491
  if (e.color === "black")
492
492
  return "maz-border-black";
493
493
  if (e.color === "danger")
@@ -507,104 +507,101 @@ const Eo = {
507
507
  }
508
508
  return "--default-border";
509
509
  }
510
- }), R = xe(), Y = h(() => {
511
- const { required: s, placeholder: M } = e;
510
+ }), D = xe(), Y = h(() => {
511
+ const { required: n, placeholder: M } = e;
512
512
  if (M)
513
- return s ? `${M} *` : M;
513
+ return n ? `${M} *` : M;
514
514
  }), J = h(() => C.value !== void 0 && C.value !== ""), g = Po(
515
- (s) => {
516
- t("update:model-value", s);
515
+ (n) => {
516
+ t("update:model-value", n);
517
517
  },
518
518
  typeof e.debounce == "number" ? e.debounce : e.debounceDelay ?? 500
519
519
  );
520
- function V(s) {
520
+ function S(n) {
521
521
  if (e.debounce)
522
- return g(s);
523
- t("update:model-value", s);
522
+ return g(n);
523
+ t("update:model-value", n);
524
524
  }
525
525
  const C = h({
526
526
  get: () => e.modelValue,
527
- set: (s) => V(s)
528
- }), W = h(() => (!!e.label || !!e.hint) && (v.value || !!J.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), Z = h(() => !!e.label || !!e.hint);
529
- function a() {
530
- return !!R["right-icon"] || f.value || !!R["valid-button"] || e.validButton || !!e.rightIcon;
527
+ set: (n) => S(n)
528
+ }), W = h(() => (!!e.label || !!e.hint) && (y.value || !!J.value || !!e.placeholder || ["date", "month", "week"].includes(e.type))), Z = h(() => !!e.label || !!e.hint);
529
+ function s() {
530
+ return !!D["right-icon"] || p.value || !!D["valid-button"] || e.validButton || !!e.rightIcon;
531
531
  }
532
- function w() {
533
- return !!R["left-icon"] || !!e.leftIcon;
532
+ function A() {
533
+ return !!D["left-icon"] || !!e.leftIcon;
534
534
  }
535
- function K(s) {
536
- t("focus", s), v.value = !0;
535
+ function K(n) {
536
+ t("focus", n), y.value = !0;
537
537
  }
538
- function T(s) {
539
- t("blur", s), v.value = !1;
538
+ function T(n) {
539
+ t("blur", n), y.value = !1;
540
540
  }
541
- function te(s) {
542
- return t("change", s);
541
+ function te(n) {
542
+ return t("change", n);
543
543
  }
544
- function X(s) {
545
- return t("input", s);
544
+ function X(n) {
545
+ return t("input", n);
546
546
  }
547
- return (s, M) => (b(), L(
547
+ return (n, M) => (b(), E(
548
548
  "div",
549
549
  {
550
550
  class: F(["m-input", [
551
551
  {
552
- "--is-focused": v.value || s.borderActive,
552
+ "--is-focused": y.value || n.borderActive,
553
553
  "--should-up": W.value,
554
554
  "--has-label": Z.value,
555
- "--is-disabled": s.disabled,
556
- "--is-readonly": s.readonly,
557
- "--has-z-2": s.error || s.warning || s.success,
558
- "--has-state": s.error || s.warning || s.success,
559
- "--block": s.block
555
+ "--is-disabled": n.disabled,
556
+ "--is-readonly": n.readonly,
557
+ "--has-z-2": n.error || n.warning || n.success,
558
+ "--has-state": n.error || n.warning || n.success,
559
+ "--block": n.block
560
560
  },
561
561
  e.class,
562
- `--${s.color}`,
563
- `--${s.size}`
562
+ `--${n.color}`,
563
+ `--${n.size}`
564
564
  ]]),
565
- style: ee(s.style)
565
+ style: ee(n.style)
566
566
  },
567
567
  [
568
568
  j(
569
569
  "div",
570
570
  {
571
571
  class: F(["m-input-wrapper", [
572
- s.inputClasses,
573
- S.value,
574
- s.roundedSize ? `--rounded-${s.roundedSize}` : { "maz-rounded": !s.noRadius }
572
+ n.inputClasses,
573
+ w.value,
574
+ n.roundedSize ? `--rounded-${n.roundedSize}` : { "maz-rounded": !n.noRadius }
575
575
  ]])
576
576
  },
577
577
  [
578
- w() ? (b(), L("div", Eo, [
579
- z(`
580
- @slot left-icon - The icon to display on the left of the input
581
- `),
582
- s.$slots["left-icon"] || s.leftIcon ? N(s.$slots, "left-icon", { key: 0 }, () => [
583
- typeof s.leftIcon == "string" ? (b(), U(k(u), {
578
+ A() ? (b(), E("div", Eo, [
579
+ n.$slots["left-icon"] || n.leftIcon ? N(n.$slots, "left-icon", { key: 0 }, () => [
580
+ typeof n.leftIcon == "string" ? (b(), U(P(u), {
584
581
  key: 0,
585
- name: s.leftIcon,
582
+ name: n.leftIcon,
586
583
  class: "maz-text-xl maz-text-muted"
587
- }, null, 8, ["name"])) : s.leftIcon ? (b(), U(Pe(s.leftIcon), {
584
+ }, null, 8, ["name"])) : n.leftIcon ? (b(), U(Pe(n.leftIcon), {
588
585
  key: 1,
589
586
  class: "maz-text-xl maz-text-muted"
590
- })) : z("v-if", !0)
591
- ], !0) : z("v-if", !0)
592
- ])) : z("v-if", !0),
587
+ })) : $("v-if", !0)
588
+ ], !0) : $("v-if", !0)
589
+ ])) : $("v-if", !0),
593
590
  j("div", Lo, [
594
591
  ze(j("input", oe({
595
- id: k(i),
592
+ id: P(i),
596
593
  ref_key: "input",
597
- ref: P,
594
+ ref: V,
598
595
  "onUpdate:modelValue": M[0] || (M[0] = (x) => C.value = x),
599
- type: I.value,
600
- name: s.name
601
- }, s.$attrs, {
602
- inputmode: s.inputmode,
596
+ type: z.value,
597
+ name: n.name
598
+ }, n.$attrs, {
599
+ inputmode: n.inputmode,
603
600
  placeholder: Y.value,
604
- "aria-label": s.label || s.placeholder,
605
- disabled: s.disabled,
606
- readonly: s.readonly,
607
- required: s.required,
601
+ "aria-label": n.label || n.placeholder,
602
+ disabled: n.disabled,
603
+ readonly: n.readonly,
604
+ required: n.required,
608
605
  class: "m-input-input"
609
606
  }, _e({
610
607
  blur: T,
@@ -612,88 +609,82 @@ const Eo = {
612
609
  change: te,
613
610
  input: X
614
611
  }, !0), {
615
- onClick: M[1] || (M[1] = (x) => s.$emit("click", x))
612
+ onClick: M[1] || (M[1] = (x) => n.$emit("click", x))
616
613
  }), null, 16, $o), [
617
614
  [eo, C.value]
618
615
  ]),
619
- s.label || s.hint ? (b(), L(
616
+ n.label || n.hint ? (b(), E(
620
617
  "span",
621
618
  {
622
619
  key: 0,
623
620
  class: F(["m-input-label", [
624
621
  {
625
- "maz-text-danger-600": s.error,
626
- "maz-text-success-600": s.success,
627
- "maz-text-warning-600": s.warning
622
+ "maz-text-danger-600": n.error,
623
+ "maz-text-success-600": n.success,
624
+ "maz-text-warning-600": n.warning
628
625
  }
629
626
  ]])
630
627
  },
631
628
  [
632
629
  oo(
633
- ue(s.hint || s.label) + " ",
630
+ ue(n.hint || n.label) + " ",
634
631
  1
635
632
  /* TEXT */
636
633
  ),
637
- s.required ? (b(), L("sup", Bo, "*")) : z("v-if", !0)
634
+ n.required ? (b(), E("sup", Bo, "*")) : $("v-if", !0)
638
635
  ],
639
636
  2
640
637
  /* CLASS */
641
- )) : z("v-if", !0)
638
+ )) : $("v-if", !0)
642
639
  ]),
643
- a() ? (b(), L("div", Oo, [
644
- z(`
645
- @slot right-icon - The icon to display on the right of the input
646
- `),
647
- s.$slots["right-icon"] || s.rightIcon ? N(s.$slots, "right-icon", { key: 0 }, () => [
648
- typeof s.rightIcon == "string" ? (b(), U(k(u), {
640
+ s() ? (b(), E("div", Oo, [
641
+ n.$slots["right-icon"] || n.rightIcon ? N(n.$slots, "right-icon", { key: 0 }, () => [
642
+ typeof n.rightIcon == "string" ? (b(), U(P(u), {
649
643
  key: 0,
650
- name: s.rightIcon,
644
+ name: n.rightIcon,
651
645
  class: "maz-text-xl maz-text-muted"
652
- }, null, 8, ["name"])) : s.rightIcon ? (b(), U(Pe(s.rightIcon), {
646
+ }, null, 8, ["name"])) : n.rightIcon ? (b(), U(Pe(n.rightIcon), {
653
647
  key: 1,
654
648
  class: "maz-text-xl maz-text-muted"
655
- })) : z("v-if", !0)
656
- ], !0) : z("v-if", !0),
657
- f.value ? (b(), U(k(r), {
649
+ })) : $("v-if", !0)
650
+ ], !0) : $("v-if", !0),
651
+ p.value ? (b(), U(P(r), {
658
652
  key: 1,
659
653
  color: "transparent",
660
654
  tabindex: "-1",
661
655
  size: "mini",
662
- onClick: M[2] || (M[2] = ae((x) => $.value = !$.value, ["stop"]))
656
+ onClick: M[2] || (M[2] = se((x) => L.value = !L.value, ["stop"]))
663
657
  }, {
664
658
  default: G(() => [
665
- $.value ? (b(), U(k(y), {
659
+ L.value ? (b(), U(P(v), {
666
660
  key: 0,
667
661
  class: "maz-text-xl maz-text-muted"
668
- })) : (b(), U(k(m), {
662
+ })) : (b(), U(P(f), {
669
663
  key: 1,
670
664
  class: "maz-text-xl maz-text-muted"
671
665
  }))
672
666
  ]),
673
667
  _: 1
674
668
  /* STABLE */
675
- })) : z("v-if", !0),
676
- z(`
677
- @slot valid-button - Replace the valid button by your own
678
- `),
679
- s.$slots["valid-button"] || s.validButton ? N(s.$slots, "valid-button", { key: 2 }, () => [
680
- H(k(r), {
669
+ })) : $("v-if", !0),
670
+ n.$slots["valid-button"] || n.validButton ? N(n.$slots, "valid-button", { key: 2 }, () => [
671
+ H(P(r), {
681
672
  color: "transparent",
682
- disabled: s.disabled,
673
+ disabled: n.disabled,
683
674
  tabindex: "-1",
684
- loading: s.validButtonLoading,
675
+ loading: n.validButtonLoading,
685
676
  class: "m-input-valid-button",
686
677
  size: "mini",
687
678
  type: "submit"
688
679
  }, {
689
680
  default: G(() => [
690
- H(k(O), { class: "maz-text-2xl maz-text-normal" })
681
+ H(P(O), { class: "maz-text-2xl maz-text-normal" })
691
682
  ]),
692
683
  _: 1
693
684
  /* STABLE */
694
685
  }, 8, ["disabled", "loading"])
695
- ], !0) : z("v-if", !0)
696
- ])) : z("v-if", !0)
686
+ ], !0) : $("v-if", !0)
687
+ ])) : $("v-if", !0)
697
688
  ],
698
689
  2
699
690
  /* CLASS */
@@ -707,7 +698,7 @@ const Eo = {
707
698
  key: 2,
708
699
  class: "m-select-list__scroll-wrapper",
709
700
  tabindex: "-1"
710
- }, Ko = { class: "m-select-list-optgroup" }, Uo = ["onClick"], Ho = /* @__PURE__ */ se({
701
+ }, Ko = { class: "m-select-list-optgroup" }, Uo = ["onClick"], Ho = /* @__PURE__ */ ne({
711
702
  inheritAttrs: !1,
712
703
  __name: "MazSelect",
713
704
  props: {
@@ -739,28 +730,28 @@ const Eo = {
739
730
  autocomplete: { default: "off" }
740
731
  },
741
732
  emits: ["close", "open", "blur", "focus", "change", "input", "update:model-value", "selected-option"],
742
- setup(n, { expose: o, emit: e }) {
733
+ setup(a, { expose: o, emit: e }) {
743
734
  to((l) => ({
744
- cb149e58: I.value,
735
+ cb149e58: z.value,
745
736
  "215ff493": i.value,
746
- "64d6cfbb": f.value
737
+ "64d6cfbb": p.value
747
738
  }));
748
- const t = n, r = e, u = q(() => import("./MazCheckbox-2G4VkxDz.mjs")), y = q(() => import("./magnifying-glass--nBiyXot.mjs")), m = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
739
+ const t = a, r = e, u = q(() => import("./MazCheckbox-B22OcHt8.mjs")), v = q(() => import("./magnifying-glass--nBiyXot.mjs")), f = q(() => import("./chevron-down-BkvtON3b.mjs")), O = q(() => import("./no-symbol-CIgKzsrB.mjs"));
749
740
  o({
750
741
  /** Method to open the option list */
751
- openList: ne,
742
+ openList: ae,
752
743
  /** Method to close the option list */
753
744
  closeList: le
754
745
  });
755
- const $ = E(!1), v = E(), P = h(
746
+ const L = k(!1), y = k(), V = h(
756
747
  () => ["black", "transparent", "white"].includes(t.color)
757
748
  ), i = h(
758
- () => P.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
759
- ), f = h(
760
- () => P.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
761
- ), I = h(
762
- () => P.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
763
- ), S = h(() => $.value || t.open), R = Ae({
749
+ () => V.value ? "var(--maz-color-black)" : `var(--maz-color-${t.color}-800)`
750
+ ), p = h(
751
+ () => V.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-100)`
752
+ ), z = h(
753
+ () => V.value ? "var(--maz-color-muted)" : `var(--maz-color-${t.color}-200)`
754
+ ), w = h(() => L.value || t.open), D = Ae({
764
755
  componentName: "MazSelect",
765
756
  providedId: t.id
766
757
  });
@@ -784,166 +775,166 @@ const Eo = {
784
775
  const l = [];
785
776
  if (!((d = t.options) != null && d.length))
786
777
  return [];
787
- for (const p of t.options)
788
- typeof p == "string" || typeof p == "number" || typeof p == "boolean" ? l.push(Y(p)) : typeof p == "object" && "options" in p && Array.isArray(p.options) ? l.push(
789
- { label: p.label, isOptGroup: !0 },
790
- ...p.options.map(
778
+ for (const m of t.options)
779
+ typeof m == "string" || typeof m == "number" || typeof m == "boolean" ? l.push(Y(m)) : typeof m == "object" && "options" in m && Array.isArray(m.options) ? l.push(
780
+ { label: m.label, isOptGroup: !0 },
781
+ ...m.options.map(
791
782
  (c) => typeof c == "string" || typeof c == "number" || typeof c == "boolean" ? Y(c) : J(c)
792
783
  )
793
- ) : l.push(J(p));
784
+ ) : l.push(J(m));
794
785
  return l;
795
- }), V = h(
786
+ }), S = h(
796
787
  () => {
797
788
  var l;
798
- return ((l = g.value) == null ? void 0 : l.filter((d) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(d[t.optionValueKey]) && !w(d[t.optionValueKey]) : !1 : t.modelValue === d[t.optionValueKey] && !w(d[t.optionValueKey]))) ?? [];
789
+ return ((l = g.value) == null ? void 0 : l.filter((d) => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue.includes(d[t.optionValueKey]) && !A(d[t.optionValueKey]) : !1 : t.modelValue === d[t.optionValueKey] && !A(d[t.optionValueKey]))) ?? [];
799
790
  }
800
791
  );
801
792
  lo(() => {
802
793
  var l;
803
- (l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"), fe();
794
+ (l = t.options) != null && l.length || console.warn("[maz-ui](MazSelect) you must provide options"), pe();
804
795
  });
805
- const C = E(), W = E(), Z = E(), a = E();
806
- function w(l) {
796
+ const C = k(), W = k(), Z = k(), s = k();
797
+ function A(l) {
807
798
  return l == null;
808
799
  }
809
800
  function K(l) {
810
- var p;
811
- return (((p = V.value) == null ? void 0 : p.some(
801
+ var m;
802
+ return (((m = S.value) == null ? void 0 : m.some(
812
803
  (c) => c[t.optionValueKey] === l[t.optionValueKey]
813
- )) ?? !1) && !w(l[t.optionValueKey]);
804
+ )) ?? !1) && !A(l[t.optionValueKey]);
814
805
  }
815
806
  const T = h(() => {
816
807
  var d;
817
808
  if (t.multiple && t.modelValue && Array.isArray(t.modelValue))
818
809
  return t.modelValue.map(
819
- (p) => {
820
- var c, A;
821
- return (A = (c = g.value) == null ? void 0 : c.find((B) => B[t.optionValueKey] === p)) == null ? void 0 : A[t.optionInputValueKey];
810
+ (m) => {
811
+ var c, I;
812
+ return (I = (c = g.value) == null ? void 0 : c.find((B) => B[t.optionValueKey] === m)) == null ? void 0 : I[t.optionInputValueKey];
822
813
  }
823
814
  ).join(", ");
824
815
  const l = (d = g.value) == null ? void 0 : d.find(
825
- (p) => p[t.optionValueKey] === t.modelValue
816
+ (m) => m[t.optionValueKey] === t.modelValue
826
817
  );
827
- return w(t.modelValue) || l == null ? void 0 : l[t.optionInputValueKey];
818
+ return A(t.modelValue) || l == null ? void 0 : l[t.optionInputValueKey];
828
819
  }), te = h(
829
820
  () => t.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
830
- ), X = E(""), s = E("");
821
+ ), X = k(""), n = k("");
831
822
  function M(l, d) {
832
- return d && l && pe(l).includes(pe(d));
823
+ return d && l && me(l).includes(me(d));
833
824
  }
834
825
  function x(l) {
835
826
  var d;
836
- return l ? (d = g.value) == null ? void 0 : d.filter((p) => {
837
- const c = p[t.optionLabelKey], A = p[t.optionValueKey], B = p[t.optionInputValueKey], D = t.searchThreshold;
838
- return M(c, l) || M(B, l) || M(A, l) || typeof c == "string" && ye(c, l, D).isMatching.value || typeof B == "string" && ye(B, l, D).isMatching.value || typeof A == "string" && ye(A, l, D).isMatching.value;
827
+ return l ? (d = g.value) == null ? void 0 : d.filter((m) => {
828
+ const c = m[t.optionLabelKey], I = m[t.optionValueKey], B = m[t.optionInputValueKey], R = t.searchThreshold;
829
+ return M(c, l) || M(B, l) || M(I, l) || typeof c == "string" && ve(c, l, R).isMatching.value || typeof B == "string" && ve(B, l, R).isMatching.value || typeof I == "string" && ve(I, l, R).isMatching.value;
839
830
  }) : g.value;
840
831
  }
841
832
  const Q = h(() => x(X.value));
842
833
  async function le(l) {
843
- var p, c;
844
- if (!S.value)
834
+ var m, c;
835
+ if (!w.value)
845
836
  return;
846
- if (l && ("relatedTarget" in l && ((p = C.value) != null && p.contains(l.relatedTarget)) || l.type === "keydown"))
837
+ if (l && ("relatedTarget" in l && ((m = C.value) != null && m.contains(l.relatedTarget)) || l.type === "keydown"))
847
838
  return l.preventDefault();
848
839
  const d = l && "relatedTarget" in l && l.relatedTarget instanceof HTMLElement && l.relatedTarget.getAttribute("id");
849
840
  if ((c = t.excludeSelectors) != null && c.includes(`#${d}`))
850
841
  return l == null ? void 0 : l.preventDefault();
851
- await ie(), $.value = !1, v.value = 0, r("close", l);
842
+ await ie(), L.value = !1, y.value = 0, r("close", l);
852
843
  }
853
- async function ne(l) {
854
- t.disabled || S.value || (l == null || l.preventDefault(), $.value = !0, await me(), r("focus", l), r("open", $.value));
844
+ async function ae(l) {
845
+ t.disabled || w.value || (l == null || l.preventDefault(), L.value = !0, await fe(), r("focus", l), r("open", L.value));
855
846
  }
856
847
  function we() {
857
848
  var l, d;
858
849
  (d = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || d.focus();
859
850
  }
860
- function Re() {
851
+ function De() {
861
852
  var l, d;
862
853
  (d = ((l = W.value) == null ? void 0 : l.$el).querySelector("input")) == null || d.dispatchEvent(new Event("input"));
863
854
  }
864
- function De(l) {
865
- $.value ? le(l) : we();
855
+ function Re(l) {
856
+ L.value ? le(l) : we();
866
857
  }
867
858
  function qe(l) {
868
- var d, p;
869
- X.value = l, (p = ((d = Z.value) == null ? void 0 : d.$el).querySelector("input")) == null || p.focus();
859
+ var d, m;
860
+ X.value = l, (m = ((d = Z.value) == null ? void 0 : d.$el).querySelector("input")) == null || m.focus();
870
861
  }
871
862
  function je(l) {
872
- var p;
873
- l === "Backspace" && s.value.length > 0 ? s.value = s.value.slice(0, -1) : s.value += l;
874
- const d = x(s.value);
875
- d != null && d.length && (v.value = (p = Q.value) == null ? void 0 : p.findIndex(
863
+ var m;
864
+ l === "Backspace" && n.value.length > 0 ? n.value = n.value.slice(0, -1) : n.value += l;
865
+ const d = x(n.value);
866
+ d != null && d.length && (y.value = (m = Q.value) == null ? void 0 : m.findIndex(
876
867
  (c) => c[t.optionValueKey] === d[0][t.optionValueKey]
877
- ), typeof v.value == "number" && v.value >= 0 && me(v.value)), ko(() => {
878
- s.value = "";
868
+ ), typeof y.value == "number" && y.value >= 0 && fe(y.value)), ko(() => {
869
+ n.value = "";
879
870
  }, 1e3);
880
871
  }
881
872
  function Ye(l) {
882
873
  const d = l.key;
883
- /^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(), ne(l), t.search ? qe(d) : je(d)) : Se(l);
874
+ /^[\dA-Za-z\u0400-\u04FF]$/.test(d) ? (l.preventDefault(), ae(l), t.search ? qe(d) : je(d)) : Se(l);
884
875
  }
885
876
  function Se(l, d = !0) {
886
- const p = l.code, c = ["ArrowUp", "ArrowDown"].includes(p), A = (d ? ["Enter", "Space"] : ["Enter"]).includes(p), B = p === "Escape" && S.value;
887
- c ? We(l, v.value) : A ? Qe(l, v.value) : B && le(l);
877
+ const m = l.code, c = ["ArrowUp", "ArrowDown"].includes(m), I = (d ? ["Enter", "Space"] : ["Enter"]).includes(m), B = m === "Escape" && w.value;
878
+ c ? We(l, y.value) : I ? Qe(l, y.value) : B && le(l);
888
879
  }
889
880
  function We(l, d) {
890
- var A;
881
+ var I;
891
882
  l.preventDefault();
892
- const p = l.code;
893
- S.value || ne(l);
894
- const c = (A = Q.value) == null ? void 0 : A.length;
895
- c && (typeof d == "number" ? d === c - 1 && p === "ArrowDown" ? v.value = 0 : d === 0 && p === "ArrowUp" ? v.value = c - 1 : v.value = p === "ArrowDown" ? d + 1 : d - 1 : v.value = p === "ArrowDown" ? 0 : c - 1, me(v.value));
883
+ const m = l.code;
884
+ w.value || ae(l);
885
+ const c = (I = Q.value) == null ? void 0 : I.length;
886
+ c && (typeof d == "number" ? d === c - 1 && m === "ArrowDown" ? y.value = 0 : d === 0 && m === "ArrowUp" ? y.value = c - 1 : y.value = m === "ArrowDown" ? d + 1 : d - 1 : y.value = m === "ArrowDown" ? 0 : c - 1, fe(y.value));
896
887
  }
897
888
  function Qe(l, d) {
898
- var c, A, B;
899
- if (l.preventDefault(), !S.value)
900
- return ne(l);
901
- const p = d ? ((c = Q.value) == null ? void 0 : c[d]) ?? ((A = Q.value) == null ? void 0 : A[0]) : (B = Q.value) == null ? void 0 : B[0];
902
- w(p) || Ve(p);
889
+ var c, I, B;
890
+ if (l.preventDefault(), !w.value)
891
+ return ae(l);
892
+ const m = d ? ((c = Q.value) == null ? void 0 : c[d]) ?? ((I = Q.value) == null ? void 0 : I[0]) : (B = Q.value) == null ? void 0 : B[0];
893
+ A(m) || Ve(m);
903
894
  }
904
- async function me(l) {
905
- var p, c;
906
- await ie(), typeof l != "number" && fe();
907
- const d = l ?? v.value;
895
+ async function fe(l) {
896
+ var m, c;
897
+ await ie(), typeof l != "number" && pe();
898
+ const d = l ?? y.value;
908
899
  if (typeof d == "number" && d >= 0) {
909
- const A = (p = a.value) == null ? void 0 : p.querySelectorAll(".m-select-list-item");
910
- (c = A == null ? void 0 : A[d]) == null || c.scrollIntoView({
900
+ const I = (m = s.value) == null ? void 0 : m.querySelectorAll(".m-select-list-item");
901
+ (c = I == null ? void 0 : I[d]) == null || c.scrollIntoView({
911
902
  behavior: "auto",
912
903
  block: "nearest",
913
904
  inline: "start"
914
905
  });
915
906
  }
916
907
  }
917
- function fe(l) {
918
- var p;
919
- const d = (p = Q.value) == null ? void 0 : p.findIndex((c) => {
920
- var A, B;
921
- return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === c[t.optionValueKey] : [...t.modelValue].reverse()[0] === c[t.optionValueKey] : ((B = (A = V.value) == null ? void 0 : A[0]) == null ? void 0 : B[t.optionValueKey]) === c[t.optionValueKey];
908
+ function pe(l) {
909
+ var m;
910
+ const d = (m = Q.value) == null ? void 0 : m.findIndex((c) => {
911
+ var I, B;
912
+ return t.multiple && Array.isArray(t.modelValue) ? l ? l[t.optionValueKey] === c[t.optionValueKey] : [...t.modelValue].reverse()[0] === c[t.optionValueKey] : ((B = (I = S.value) == null ? void 0 : I[0]) == null ? void 0 : B[t.optionValueKey]) === c[t.optionValueKey];
922
913
  });
923
- v.value = d && d >= 0 ? d : 0;
914
+ y.value = d && d >= 0 ? d : 0;
924
915
  }
925
916
  function Ve(l, d = !0) {
926
917
  var B;
927
918
  d && !t.multiple && ie(() => le()), X.value = "";
928
- const p = (B = V.value) == null ? void 0 : B.some(
929
- (D) => D[t.optionValueKey] === l[t.optionValueKey]
919
+ const m = (B = S.value) == null ? void 0 : B.some(
920
+ (R) => R[t.optionValueKey] === l[t.optionValueKey]
930
921
  );
931
- let c = V.value;
932
- p && t.multiple ? c = c == null ? void 0 : c.filter(
933
- (D) => D[t.optionValueKey] !== l[t.optionValueKey]
922
+ let c = S.value;
923
+ m && t.multiple ? c = c == null ? void 0 : c.filter(
924
+ (R) => R[t.optionValueKey] !== l[t.optionValueKey]
934
925
  ) : t.multiple ? c.push(l) : c = [l];
935
- const A = c.map((D) => D[t.optionValueKey]);
936
- r("update:model-value", t.multiple ? A : A[0]), r("selected-option", l), Re(), fe(l), we();
926
+ const I = c.map((R) => R[t.optionValueKey]);
927
+ r("update:model-value", t.multiple ? I : I[0]), r("selected-option", l), De(), pe(l), we();
937
928
  }
938
929
  return (l, d) => {
939
- var p;
940
- return ze((b(), L(
930
+ var m;
931
+ return ze((b(), E(
941
932
  "div",
942
933
  {
943
934
  ref_key: "mazSelectElement",
944
935
  ref: C,
945
936
  class: F(["m-select", [
946
- { "--is-open": S.value, "--disabled": l.disabled, "--block": l.block },
937
+ { "--is-open": w.value, "--disabled": l.disabled, "--block": l.block },
947
938
  t.class,
948
939
  `--${l.size}`
949
940
  ]]),
@@ -951,22 +942,22 @@ const Eo = {
951
942
  },
952
943
  [
953
944
  H(Ce, oe({
954
- id: k(R),
945
+ id: P(D),
955
946
  ref_key: "mazInputComponent",
956
947
  ref: W,
957
948
  class: "m-select-input"
958
949
  }, l.$attrs, {
959
950
  required: l.required,
960
- "border-active": $.value,
951
+ "border-active": L.value,
961
952
  color: l.color,
962
953
  "model-value": T.value,
963
954
  size: l.size,
964
955
  block: "",
965
956
  autocomplete: l.autocomplete,
966
957
  disabled: l.disabled,
967
- onFocus: ae(ne, ["prevent", "stop"]),
968
- onBlur: ae(le, ["prevent", "stop"]),
969
- onClick: ae(ne, ["prevent", "stop"]),
958
+ onFocus: se(ae, ["prevent", "stop"]),
959
+ onBlur: se(le, ["prevent", "stop"]),
960
+ onClick: se(ae, ["prevent", "stop"]),
970
961
  onChange: d[0] || (d[0] = (c) => r("change", c)),
971
962
  onInput: d[1] || (d[1] = (c) => r("input", c)),
972
963
  onKeydown: Ye
@@ -976,23 +967,23 @@ const Eo = {
976
967
  tabindex: "-1",
977
968
  type: "button",
978
969
  class: "m-select-input__toggle-button maz-custom",
979
- "aria-label": `${S.value ? "collapse" : "expand"} list of options`,
980
- onClick: ae(De, ["stop"])
970
+ "aria-label": `${w.value ? "collapse" : "expand"} list of options`,
971
+ onClick: se(Re, ["stop"])
981
972
  }, [
982
- H(k(m), { class: "m-select-chevron maz-text-xl" })
973
+ H(P(f), { class: "m-select-chevron maz-text-xl" })
983
974
  ], 8, To)
984
975
  ]),
985
976
  _: 1
986
977
  /* STABLE */
987
978
  }, 16, ["id", "required", "border-active", "color", "model-value", "size", "autocomplete", "disabled"]),
988
- H(no, { name: te.value }, {
979
+ H(ao, { name: te.value }, {
989
980
  default: G(() => [
990
- S.value ? (b(), L(
981
+ w.value ? (b(), E(
991
982
  "div",
992
983
  {
993
984
  key: 0,
994
985
  ref_key: "optionsListElement",
995
- ref: a,
986
+ ref: s,
996
987
  class: F(["m-select-list", {
997
988
  "--top": l.listPosition.includes("top"),
998
989
  "--left": l.listPosition.includes("left"),
@@ -1014,7 +1005,7 @@ const Eo = {
1014
1005
  modelValue: X.value,
1015
1006
  "onUpdate:modelValue": [
1016
1007
  d[2] || (d[2] = (c) => X.value = c),
1017
- d[4] || (d[4] = (c) => v.value = 0)
1008
+ d[4] || (d[4] = (c) => y.value = 0)
1018
1009
  ],
1019
1010
  size: "sm",
1020
1011
  color: l.color,
@@ -1024,28 +1015,21 @@ const Eo = {
1024
1015
  autocomplete: "off",
1025
1016
  tabindex: "-1",
1026
1017
  class: "m-select-list__search-input maz-flex-none",
1027
- "left-icon": k(y),
1018
+ "left-icon": P(v),
1028
1019
  onKeydown: d[3] || (d[3] = (c) => Se(c, !1))
1029
- }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : z("v-if", !0),
1030
- z(`
1031
- @slot No results slot - Displayed when no results corresponding with search query
1032
- `),
1020
+ }, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : $("v-if", !0),
1033
1021
  !Q.value || Q.value.length <= 0 ? N(l.$slots, "no-results", { key: 1 }, () => [
1034
1022
  j("span", Fo, [
1035
- H(k(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
1023
+ H(P(O), { class: "maz-h-6 maz-w-6 maz-text-normal" })
1036
1024
  ])
1037
- ], !0) : (b(), L("div", No, [
1038
- (b(!0), L(
1025
+ ], !0) : (b(), E("div", No, [
1026
+ (b(!0), E(
1039
1027
  be,
1040
1028
  null,
1041
- Be(Q.value, (c, A) => (b(), L(
1029
+ Be(Q.value, (c, I) => (b(), E(
1042
1030
  be,
1043
- { key: A },
1031
+ { key: I },
1044
1032
  [
1045
- z(`
1046
- @slot Custom optgroup label
1047
- @binding {String} label - the label of the optgroup
1048
- `),
1049
1033
  c.label && c.isOptGroup ? N(l.$slots, "optgroup", {
1050
1034
  key: 0,
1051
1035
  label: c.label
@@ -1057,32 +1041,27 @@ const Eo = {
1057
1041
  1
1058
1042
  /* TEXT */
1059
1043
  )
1060
- ], !0) : (b(), L("button", {
1044
+ ], !0) : (b(), E("button", {
1061
1045
  key: 1,
1062
1046
  tabindex: "-1",
1063
1047
  type: "button",
1064
1048
  class: F(["m-select-list-item maz-custom maz-flex-none", [
1065
1049
  {
1066
- "--is-keyboard-selected": v.value === A,
1050
+ "--is-keyboard-selected": y.value === I,
1067
1051
  "--is-selected": K(c),
1068
- "--is-none-value": w(c[l.optionValueKey])
1052
+ "--is-none-value": A(c[l.optionValueKey])
1069
1053
  }
1070
1054
  ]]),
1071
1055
  style: ee(l.itemHeight ? { height: `${l.itemHeight}px` } : void 0),
1072
- onClick: ae((B) => Ve(c), ["prevent", "stop"])
1056
+ onClick: se((B) => Ve(c), ["prevent", "stop"])
1073
1057
  }, [
1074
- l.multiple ? (b(), U(k(u), {
1058
+ l.multiple ? (b(), U(P(u), {
1075
1059
  key: 0,
1076
1060
  tabindex: "-1",
1077
1061
  "model-value": K(c),
1078
1062
  size: "sm",
1079
1063
  color: l.color
1080
- }, null, 8, ["model-value", "color"])) : z("v-if", !0),
1081
- z(`
1082
- @slot Custom option
1083
- @binding {Object} option - the option object
1084
- @binding {Boolean} is-selected - if the option is selected
1085
- `),
1064
+ }, null, 8, ["model-value", "color"])) : $("v-if", !0),
1086
1065
  N(l.$slots, "default", {
1087
1066
  option: c,
1088
1067
  isSelected: K(c)
@@ -1107,7 +1086,7 @@ const Eo = {
1107
1086
  ],
1108
1087
  6
1109
1088
  /* CLASS, STYLE */
1110
- )) : z("v-if", !0)
1089
+ )) : $("v-if", !0)
1111
1090
  ]),
1112
1091
  _: 3
1113
1092
  /* FORWARDED */
@@ -1116,63 +1095,63 @@ const Eo = {
1116
1095
  6
1117
1096
  /* CLASS, STYLE */
1118
1097
  )), [
1119
- [k(Vo), {
1120
- exclude: (p = l.excludeSelectors) != null && p.length ? l.excludeSelectors : [],
1098
+ [P(Vo), {
1099
+ exclude: (m = l.excludeSelectors) != null && m.length ? l.excludeSelectors : [],
1121
1100
  handler: le
1122
1101
  }]
1123
1102
  ]);
1124
1103
  };
1125
1104
  }
1126
- }), Ro = /* @__PURE__ */ re(Ho, [["__scopeId", "data-v-e35a36a6"]]);
1105
+ }), Do = /* @__PURE__ */ re(Ho, [["__scopeId", "data-v-e35a36a6"]]);
1127
1106
  function Ke() {
1128
1107
  if (typeof window > "u")
1129
1108
  return;
1130
- const n = window.navigator.language;
1131
- if (!n)
1109
+ const a = window.navigator.language;
1110
+ if (!a)
1132
1111
  return;
1133
- let o = n.slice(3, 7).toUpperCase();
1134
- return o === "" && (o = n.slice(0, 2).toUpperCase()), o === "EN" && (o = "US"), o === "JA" && (o = "JP"), {
1112
+ let o = a.slice(3, 7).toUpperCase();
1113
+ return o === "" && (o = a.slice(0, 2).toUpperCase()), o === "EN" && (o = "US"), o === "JA" && (o = "JP"), {
1135
1114
  locale: o,
1136
- browserLocale: n
1115
+ browserLocale: a
1137
1116
  };
1138
1117
  }
1139
1118
  let ge, $e;
1140
- function Do(n, o, e) {
1141
- return e != null && e[o] ? e[o] : (($e !== n || !ge) && ($e = n, ge = new Intl.DisplayNames([n], { type: "region" })), ge.of(o));
1119
+ function Ro(a, o, e) {
1120
+ return e != null && e[o] ? e[o] : (($e !== a || !ge) && ($e = a, ge = new Intl.DisplayNames([a], { type: "region" })), ge.of(o));
1142
1121
  }
1143
- function qo(n, o) {
1122
+ function qo(a, o) {
1144
1123
  var r;
1145
1124
  const e = [], t = Oe();
1146
- n = n ?? ((r = Ke()) == null ? void 0 : r.browserLocale) ?? "en-US";
1125
+ a = a ?? ((r = Ke()) == null ? void 0 : r.browserLocale) ?? "en-US";
1147
1126
  for (const u of t) {
1148
- const y = Do(n, u, o);
1149
- if (y)
1127
+ const v = Ro(a, u, o);
1128
+ if (v)
1150
1129
  try {
1151
- const m = ce(u);
1130
+ const f = ce(u);
1152
1131
  e.push({
1153
1132
  iso2: u,
1154
- dialCode: m,
1155
- name: y
1133
+ dialCode: f,
1134
+ name: v
1156
1135
  });
1157
- } catch (m) {
1158
- console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${m}`);
1136
+ } catch (f) {
1137
+ console.error(`[MazPhoneNumberInput](getCountryCallingCode) ${f}`);
1159
1138
  }
1160
1139
  }
1161
1140
  return e;
1162
1141
  }
1163
1142
  async function jo() {
1164
1143
  try {
1165
- const n = await fetch("https://ipwho.is"), { country_code: o } = await n.json();
1144
+ const a = await fetch("https://ipwho.is"), { country_code: o } = await a.json();
1166
1145
  return o;
1167
- } catch (n) {
1168
- throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${n}`);
1146
+ } catch (a) {
1147
+ throw new Error(`[MazPhoneNumberInput](fetchCountryCode) ${a}`);
1169
1148
  }
1170
1149
  }
1171
- function Yo(n) {
1172
- if (!n)
1150
+ function Yo(a) {
1151
+ if (!a)
1173
1152
  return "";
1174
1153
  const o = new RegExp(/[^\d ()+-]/g);
1175
- return n.replaceAll(o, "").trim();
1154
+ return a.replaceAll(o, "").trim();
1176
1155
  }
1177
1156
  function Ue() {
1178
1157
  return {
@@ -1185,7 +1164,7 @@ function Ue() {
1185
1164
  const Wo = ["id"], Qo = {
1186
1165
  key: 0,
1187
1166
  class: "m-country-selector__select__item__flag-container"
1188
- }, Go = /* @__PURE__ */ se({
1167
+ }, Go = /* @__PURE__ */ ne({
1189
1168
  __name: "CountrySelector",
1190
1169
  props: {
1191
1170
  style: { default: void 0 },
@@ -1213,56 +1192,56 @@ const Wo = ["id"], Qo = {
1213
1192
  excludeSelectors: { default: void 0 }
1214
1193
  },
1215
1194
  emits: ["update:model-value"],
1216
- setup(n) {
1217
- const o = n, { phoneNumber: e } = Me("data"), t = E(), { getCountriesList: r } = Ue(), u = h(() => r(o.countryLocale, o.customCountriesList)), y = h(
1195
+ setup(a) {
1196
+ const o = a, { phoneNumber: e } = Me("data"), t = k(), { getCountriesList: r } = Ue(), u = h(() => r(o.countryLocale, o.customCountriesList)), v = h(
1218
1197
  () => {
1219
1198
  var i;
1220
- return (i = u.value) == null ? void 0 : i.filter((f) => {
1221
- var I;
1222
- return !((I = o.ignoredCountries) != null && I.includes(f.iso2));
1199
+ return (i = u.value) == null ? void 0 : i.filter((p) => {
1200
+ var z;
1201
+ return !((z = o.ignoredCountries) != null && z.includes(p.iso2));
1223
1202
  });
1224
1203
  }
1225
- ), m = h(() => {
1204
+ ), f = h(() => {
1226
1205
  const i = o.onlyCountries || o.preferredCountries;
1227
1206
  return i == null ? void 0 : i.map(
1228
- (f) => {
1229
- var I;
1230
- return (I = y.value) == null ? void 0 : I.find((S) => S.iso2.includes(f));
1207
+ (p) => {
1208
+ var z;
1209
+ return (z = v.value) == null ? void 0 : z.find((w) => w.iso2.includes(p));
1231
1210
  }
1232
1211
  );
1233
1212
  }), O = h(
1234
1213
  () => {
1235
1214
  var i;
1236
- return (i = y.value) == null ? void 0 : i.filter((f) => {
1237
- var I;
1238
- return !((I = o.preferredCountries) != null && I.includes(f.iso2));
1215
+ return (i = v.value) == null ? void 0 : i.filter((p) => {
1216
+ var z;
1217
+ return !((z = o.preferredCountries) != null && z.includes(p.iso2));
1239
1218
  });
1240
1219
  }
1241
- ), $ = h(
1242
- () => o.preferredCountries ? [...m.value ?? [], ...O.value ?? []] : o.onlyCountries ? m.value : y.value
1243
- ), v = h(
1220
+ ), L = h(
1221
+ () => o.preferredCountries ? [...f.value ?? [], ...O.value ?? []] : o.onlyCountries ? f.value : v.value
1222
+ ), y = h(
1244
1223
  () => {
1245
1224
  var i;
1246
- return (i = $.value) == null ? void 0 : i.map(
1247
- (f) => f ? {
1248
- ...f,
1249
- dialCode: `+${f.dialCode}`
1225
+ return (i = L.value) == null ? void 0 : i.map(
1226
+ (p) => p ? {
1227
+ ...p,
1228
+ dialCode: `+${p.dialCode}`
1250
1229
  } : void 0
1251
- ).filter(po);
1230
+ ).filter(mo);
1252
1231
  }
1253
1232
  );
1254
- async function P() {
1255
- var i, f;
1256
- (f = (i = t.value) == null ? void 0 : i.$el.querySelector("input")) == null || f.focus();
1233
+ async function V() {
1234
+ var i, p;
1235
+ (p = (i = t.value) == null ? void 0 : i.$el.querySelector("input")) == null || p.focus();
1257
1236
  }
1258
- return (i, f) => (b(), L(
1237
+ return (i, p) => (b(), E(
1259
1238
  "div",
1260
1239
  {
1261
1240
  class: F(["m-country-selector", [o.class, { "--no-flags": i.noFlags }]]),
1262
1241
  style: ee(i.style)
1263
1242
  },
1264
1243
  [
1265
- i.modelValue && !i.noFlags ? (b(), L("button", {
1244
+ i.modelValue && !i.noFlags ? (b(), E("button", {
1266
1245
  key: 0,
1267
1246
  id: `country-selector-flag-button-${i.id}`,
1268
1247
  class: F(["m-country-selector__country-flag", {
@@ -1270,23 +1249,19 @@ const Wo = ["id"], Qo = {
1270
1249
  }]),
1271
1250
  tabindex: "-1",
1272
1251
  type: "button",
1273
- onClick: P
1252
+ onClick: V
1274
1253
  }, [
1275
- z(`
1276
- @slot Country selector flag
1277
- @binding {String} country-code - current selected country code - Ex: \`"FR"\`
1278
- `),
1279
1254
  N(i.$slots, "selector-flag", { countryCode: i.modelValue }, () => [
1280
1255
  H(Le, {
1281
- src: k(Ee)(i.modelValue, "h20"),
1256
+ src: P(Ee)(i.modelValue, "h20"),
1282
1257
  alt: i.modelValue,
1283
1258
  width: "20",
1284
1259
  height: "20",
1285
1260
  "img-class": "maz-w-5 maz-h-4 maz-rounded-sm"
1286
1261
  }, null, 8, ["src", "alt"])
1287
1262
  ], !0)
1288
- ], 10, Wo)) : z("v-if", !0),
1289
- H(Ro, oe({
1263
+ ], 10, Wo)) : $("v-if", !0),
1264
+ H(Do, oe({
1290
1265
  id: `country-selector-${i.id}`,
1291
1266
  ref_key: "CountrySelectorRef",
1292
1267
  ref: t,
@@ -1308,64 +1283,58 @@ const Wo = ["id"], Qo = {
1308
1283
  search: !i.noSearch,
1309
1284
  "search-placeholder": i.locales.countrySelector.searchPlaceholder,
1310
1285
  "search-threshold": i.searchThreshold,
1311
- options: v.value,
1312
- hint: k(e) && !i.modelValue ? i.locales.countrySelector.error : void 0,
1286
+ options: y.value,
1287
+ hint: P(e) && !i.modelValue ? i.locales.countrySelector.error : void 0,
1313
1288
  label: i.locales.countrySelector.placeholder,
1314
1289
  style: {
1315
1290
  width: i.width
1316
1291
  },
1317
1292
  "exclude-selectors": [`#country-selector-flag-button-${i.id}`, ...i.excludeSelectors ?? []],
1318
- "onUpdate:modelValue": f[0] || (f[0] = (I) => i.$emit("update:model-value", I))
1293
+ "onUpdate:modelValue": p[0] || (p[0] = (z) => i.$emit("update:model-value", z))
1319
1294
  }), {
1320
1295
  "no-results": G(() => [
1321
1296
  N(i.$slots, "no-results", {}, void 0, !0)
1322
1297
  ]),
1323
- default: G(({ option: I, isSelected: S }) => [
1298
+ default: G(({ option: z, isSelected: w }) => [
1324
1299
  j(
1325
1300
  "div",
1326
1301
  {
1327
1302
  class: F(["m-country-selector__select__item", {
1328
- "m-country-selector__select__item--selected": S
1303
+ "m-country-selector__select__item--selected": w
1329
1304
  }])
1330
1305
  },
1331
1306
  [
1332
- !i.noFlags && typeof I.iso2 == "string" ? (b(), L("span", Qo, [
1333
- z(`
1334
- @slot Country list flag
1335
- @binding {String} country-code - country code of option - Ex: \`"FR"\`
1336
- @binding {{ iso2: string; dialCode: string; name: string; }} option - country data
1337
- @binding {Boolean} is-selected - \`true\` if option is selected
1338
- `),
1307
+ !i.noFlags && typeof z.iso2 == "string" ? (b(), E("span", Qo, [
1339
1308
  N(i.$slots, "country-list-flag", {
1340
- countryCode: I.iso2,
1341
- option: I,
1342
- isSelected: S
1309
+ countryCode: z.iso2,
1310
+ option: z,
1311
+ isSelected: w
1343
1312
  }, () => [
1344
1313
  H(Le, {
1345
- src: k(Ee)(I.iso2, "h20"),
1346
- alt: `${I.name} flag`,
1314
+ src: P(Ee)(z.iso2, "h20"),
1315
+ alt: `${z.name} flag`,
1347
1316
  width: "20",
1348
1317
  height: "20",
1349
1318
  "img-class": "maz-rounded-full maz-w-5 maz-h-5"
1350
1319
  }, null, 8, ["src", "alt"])
1351
1320
  ], !0)
1352
- ])) : z("v-if", !0),
1353
- i.showCodeOnList ? (b(), L(
1321
+ ])) : $("v-if", !0),
1322
+ i.showCodeOnList ? (b(), E(
1354
1323
  "span",
1355
1324
  {
1356
1325
  key: 1,
1357
- class: F(["maz-w-9 maz-flex-none", { "maz-text-muted": !S }])
1326
+ class: F(["maz-w-9 maz-flex-none", { "maz-text-muted": !w }])
1358
1327
  },
1359
- ue(I.dialCode),
1328
+ ue(z.dialCode),
1360
1329
  3
1361
1330
  /* TEXT, CLASS */
1362
- )) : z("v-if", !0),
1331
+ )) : $("v-if", !0),
1363
1332
  j(
1364
1333
  "span",
1365
1334
  {
1366
- class: F(["maz-flex-1 maz-truncate", { "maz-font-semibold": S }])
1335
+ class: F(["maz-flex-1 maz-truncate", { "maz-font-semibold": w }])
1367
1336
  },
1368
- ue(I.name),
1337
+ ue(z.name),
1369
1338
  3
1370
1339
  /* TEXT, CLASS */
1371
1340
  )
@@ -1393,25 +1362,25 @@ const Wo = ["id"], Qo = {
1393
1362
  example: "Example:"
1394
1363
  }
1395
1364
  };
1396
- function Xo(n) {
1365
+ function Xo(a) {
1397
1366
  try {
1398
- const o = ro(n);
1399
- return o || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${n}" is not available`), !1);
1367
+ const o = ro(a);
1368
+ return o || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${a}" is not available`), !1);
1400
1369
  } catch (o) {
1401
1370
  return console.error(`[maz-ui](MazPhoneNumberInput) ${o}`), !1;
1402
1371
  }
1403
1372
  }
1404
1373
  function xo({
1405
- phoneNumber: n,
1374
+ phoneNumber: a,
1406
1375
  countryCode: o
1407
1376
  }) {
1408
1377
  try {
1409
- if (!n)
1378
+ if (!a)
1410
1379
  return {
1411
1380
  isValid: !1,
1412
1381
  countryCode: o
1413
1382
  };
1414
- const e = io(n, o);
1383
+ const e = io(a, o);
1415
1384
  return {
1416
1385
  countryCode: (e == null ? void 0 : e.country) ?? o,
1417
1386
  isValid: (e == null ? void 0 : e.isValid()) ?? !1,
@@ -1424,33 +1393,33 @@ function xo({
1424
1393
  uri: e == null ? void 0 : e.getURI(),
1425
1394
  e164: e == null ? void 0 : e.format("E.164"),
1426
1395
  rfc3966: e == null ? void 0 : e.format("RFC3966"),
1427
- phoneNumber: n
1396
+ phoneNumber: a
1428
1397
  };
1429
1398
  } catch (e) {
1430
1399
  throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${e}`);
1431
1400
  }
1432
1401
  }
1433
- function _o(n, o) {
1402
+ function _o(a, o) {
1434
1403
  try {
1435
- return o ? new uo(n).input(o) : "";
1404
+ return o ? new uo(a).input(o) : "";
1436
1405
  } catch (e) {
1437
1406
  throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${e}`);
1438
1407
  }
1439
1408
  }
1440
1409
  async function et() {
1441
- const { default: n } = await import("./examples.mobile.json-JpNGylGv.mjs");
1442
- return n;
1410
+ const { default: a } = await import("./examples.mobile.json-JpNGylGv.mjs");
1411
+ return a;
1443
1412
  }
1444
- function ot(n, o) {
1413
+ function ot(a, o) {
1445
1414
  var e;
1446
1415
  try {
1447
- return n && o ? (e = co(o, n)) == null ? void 0 : e.formatNational() : void 0;
1416
+ return a && o ? (e = co(o, a)) == null ? void 0 : e.formatNational() : void 0;
1448
1417
  } catch (t) {
1449
1418
  console.error(`[maz-ui](MazPhoneNumberInput) ${t}`);
1450
1419
  }
1451
1420
  }
1452
1421
  function He() {
1453
- function n(o, e) {
1422
+ function a(o, e) {
1454
1423
  return ce(o) === ce(e);
1455
1424
  }
1456
1425
  return {
@@ -1458,13 +1427,13 @@ function He() {
1458
1427
  getPhoneNumberResults: xo,
1459
1428
  getPhoneNumberExamplesFile: et,
1460
1429
  getPhoneNumberExample: ot,
1461
- isSameCountryCallingCode: n,
1430
+ isSameCountryCallingCode: a,
1462
1431
  isCountryAvailable: Xo,
1463
1432
  getCountries: Oe,
1464
1433
  getCountryCallingCode: ce
1465
1434
  };
1466
1435
  }
1467
- const tt = /* @__PURE__ */ se({
1436
+ const tt = /* @__PURE__ */ ne({
1468
1437
  __name: "PhoneInput",
1469
1438
  props: /* @__PURE__ */ ke({
1470
1439
  id: {},
@@ -1485,52 +1454,52 @@ const tt = /* @__PURE__ */ se({
1485
1454
  modelModifiers: {}
1486
1455
  }),
1487
1456
  emits: /* @__PURE__ */ ke(["update:model-value"], ["update:modelValue"]),
1488
- setup(n, { emit: o }) {
1489
- const e = n, t = o, r = ao(n, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: y } = He(), { selectionRange: m, results: O, selectedCountry: $ } = Me("data"), v = E(), P = E(!1);
1490
- function i(g, V) {
1491
- const C = y(g, V);
1457
+ setup(a, { emit: o }) {
1458
+ const e = a, t = o, r = so(a, "modelValue"), { getPhoneNumberExamplesFile: u, getPhoneNumberExample: v } = He(), { selectionRange: f, results: O, selectedCountry: L } = Me("data"), y = k(), V = k(!1);
1459
+ function i(g, S) {
1460
+ const C = v(g, S);
1492
1461
  return C ? `${e.locales.phoneInput.example} ${C}` : void 0;
1493
1462
  }
1494
- const f = h(() => {
1495
- var V;
1463
+ const p = h(() => {
1464
+ var S;
1496
1465
  if (e.label || e.placeholder)
1497
1466
  return e.label || e.placeholder;
1498
1467
  const g = e.locales.phoneInput.placeholder;
1499
- if (e.noExample || !v.value)
1468
+ if (e.noExample || !y.value)
1500
1469
  return g;
1501
1470
  {
1502
- const C = i(v.value, $.value);
1503
- return (V = O.value) != null && V.isValid || !C ? g : C;
1471
+ const C = i(y.value, L.value);
1472
+ return (S = O.value) != null && S.isValid || !C ? g : C;
1504
1473
  }
1505
- }), I = h(() => e.placeholder ? {
1506
- placeholder: f.value
1474
+ }), z = h(() => e.placeholder ? {
1475
+ placeholder: p.value
1507
1476
  } : {
1508
- label: f.value
1509
- }), S = E();
1510
- async function R() {
1477
+ label: p.value
1478
+ }), w = k();
1479
+ async function D() {
1511
1480
  try {
1512
- if (v.value)
1481
+ if (y.value)
1513
1482
  return;
1514
- v.value = await u();
1483
+ y.value = await u();
1515
1484
  } catch (g) {
1516
1485
  console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file", g);
1517
1486
  }
1518
1487
  }
1519
1488
  async function Y(g) {
1520
- S.value && g && J(S.value, g), await ie(), t("update:model-value", g);
1489
+ w.value && g && J(w.value, g), await ie(), t("update:model-value", g);
1521
1490
  }
1522
- function J(g, V) {
1491
+ function J(g, S) {
1523
1492
  const C = g.$el.querySelector("input");
1524
- m.value.start = C == null ? void 0 : C.selectionStart, m.value.end = C == null ? void 0 : C.selectionEnd, m.value.cursorAtEnd = V && typeof m.value.start == "number" && V.length > 0 ? m.value.start >= V.length : !0;
1493
+ f.value.start = C == null ? void 0 : C.selectionStart, f.value.end = C == null ? void 0 : C.selectionEnd, f.value.cursorAtEnd = S && typeof f.value.start == "number" && S.length > 0 ? f.value.start >= S.length : !0;
1525
1494
  }
1526
1495
  return Ie(() => {
1527
- e.noExample || R();
1528
- }), (g, V) => (b(), U(Ce, oe({
1496
+ e.noExample || D();
1497
+ }), (g, S) => (b(), U(Ce, oe({
1529
1498
  id: g.id,
1530
1499
  ref_key: "PhoneInputRef",
1531
- ref: S,
1500
+ ref: w,
1532
1501
  "model-value": r.value
1533
- }, { ...g.$attrs, ...I.value }, {
1502
+ }, { ...g.$attrs, ...z.value }, {
1534
1503
  disabled: g.disabled,
1535
1504
  color: g.color,
1536
1505
  error: g.error,
@@ -1539,16 +1508,16 @@ const tt = /* @__PURE__ */ se({
1539
1508
  class: ["m-phone-input", [
1540
1509
  {
1541
1510
  "--border-radius": g.hasRadius,
1542
- "--error": g.error || !k(O).isValid,
1543
- "--focused": P.value
1511
+ "--error": g.error || !P(O).isValid,
1512
+ "--focused": V.value
1544
1513
  }
1545
1514
  ]],
1546
- onFocus: V[0] || (V[0] = (C) => P.value = !0),
1547
- onBlur: V[1] || (V[1] = (C) => P.value = !1),
1548
- "onUpdate:modelValue": V[2] || (V[2] = (C) => Y(C))
1515
+ onFocus: S[0] || (S[0] = (C) => V.value = !0),
1516
+ onBlur: S[1] || (S[1] = (C) => V.value = !1),
1517
+ "onUpdate:modelValue": S[2] || (S[2] = (C) => Y(C))
1549
1518
  }), null, 16, ["id", "model-value", "disabled", "color", "error", "size", "success", "class"]));
1550
1519
  }
1551
- }), lt = /* @__PURE__ */ re(tt, [["__scopeId", "data-v-ebe8f08f"]]), nt = /* @__PURE__ */ se({
1520
+ }), lt = /* @__PURE__ */ re(tt, [["__scopeId", "data-v-ebe8f08f"]]), at = /* @__PURE__ */ ne({
1552
1521
  name: "MazPhoneNumberInput",
1553
1522
  inheritAttrs: !1,
1554
1523
  __name: "MazPhoneNumberInput",
@@ -1602,100 +1571,100 @@ const tt = /* @__PURE__ */ se({
1602
1571
  }) }
1603
1572
  },
1604
1573
  emits: ["update:model-value", "country-code", "update:country-code", "update", "data"],
1605
- setup(n, { emit: o }) {
1606
- const e = n, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: y } = Ue(), { isCountryAvailable: m, getPhoneNumberResults: O, getAsYouTypeFormat: $ } = He(), v = Ae({
1574
+ setup(a, { emit: o }) {
1575
+ const e = a, t = o, { fetchCountryCode: r, sanitizePhoneNumber: u, getBrowserLocale: v } = Ue(), { isCountryAvailable: f, getPhoneNumberResults: O, getAsYouTypeFormat: L } = He(), y = Ae({
1607
1576
  componentName: "MazPhoneNumberInput",
1608
1577
  providedId: e.id
1609
- }), P = E(""), i = E(), f = E({
1578
+ }), V = k(""), i = k(), p = k({
1610
1579
  isValid: !1,
1611
1580
  countryCode: void 0
1612
- }), I = E(), S = E({
1581
+ }), z = k(), w = k({
1613
1582
  start: 0,
1614
1583
  end: 0,
1615
1584
  cursorAtEnd: !0
1616
1585
  });
1617
- so("data", {
1586
+ no("data", {
1618
1587
  selectedCountry: i,
1619
- phoneNumber: P,
1620
- results: f,
1621
- selectionRange: S
1588
+ phoneNumber: V,
1589
+ results: p,
1590
+ selectionRange: w
1622
1591
  });
1623
- const R = h(() => ({
1592
+ const D = h(() => ({
1624
1593
  ...Zo,
1625
1594
  ...e.translations
1626
1595
  }));
1627
1596
  Ie(async () => {
1628
- var a;
1597
+ var s;
1629
1598
  if (C(e.countryCode ?? e.defaultCountryCode), e.fetchCountry && !i.value) {
1630
- const w = await r();
1631
- C(w);
1599
+ const A = await r();
1600
+ C(A);
1632
1601
  }
1633
1602
  if (!e.defaultCountryCode && !e.noUseBrowserLocale && !i.value) {
1634
- const w = (a = y()) == null ? void 0 : a.locale;
1635
- C(w);
1603
+ const A = (s = v()) == null ? void 0 : s.locale;
1604
+ C(A);
1636
1605
  }
1637
1606
  });
1638
- const Y = E();
1607
+ const Y = k();
1639
1608
  function J() {
1640
- var a;
1641
- return (a = Y.value) == null ? void 0 : a.$el.querySelector("input");
1609
+ var s;
1610
+ return (s = Y.value) == null ? void 0 : s.$el.querySelector("input");
1642
1611
  }
1643
1612
  async function g() {
1644
- var a;
1645
- await ie(), (a = J()) == null || a.select();
1613
+ var s;
1614
+ await ie(), (s = J()) == null || s.select();
1646
1615
  }
1647
- function V(a) {
1616
+ function S(s) {
1648
1617
  Z({
1649
- countryCode: a
1618
+ countryCode: s
1650
1619
  }), g();
1651
1620
  }
1652
- function C(a) {
1653
- if (a) {
1654
- if (!m(a)) {
1621
+ function C(s) {
1622
+ if (s) {
1623
+ if (!f(s)) {
1655
1624
  i.value = void 0;
1656
1625
  return;
1657
1626
  }
1658
- i.value = a;
1627
+ i.value = s;
1659
1628
  }
1660
1629
  }
1661
1630
  function W({
1662
- newPhoneNumber: a,
1663
- updateResults: w = !0
1631
+ newPhoneNumber: s,
1632
+ updateResults: A = !0
1664
1633
  }) {
1665
- const K = u(a);
1666
- if (w && (f.value = O({
1634
+ const K = u(s);
1635
+ if (A && (p.value = O({
1667
1636
  phoneNumber: K,
1668
1637
  countryCode: i.value
1669
- })), S.value.cursorAtEnd && !e.noFormattingAsYouType && e.autoFormat) {
1670
- const T = f.value.isValid ? f.value.formatNational : K;
1671
- I.value = $(i.value, T), P.value = I.value;
1638
+ })), w.value.cursorAtEnd && !e.noFormattingAsYouType && e.autoFormat) {
1639
+ const T = p.value.isValid ? p.value.formatNational : K;
1640
+ z.value = L(i.value, T), V.value = z.value;
1672
1641
  }
1673
- f.value.countryCode && f.value.countryCode !== i.value && Z({
1674
- countryCode: f.value.countryCode,
1642
+ p.value.countryCode && p.value.countryCode !== i.value && Z({
1643
+ countryCode: p.value.countryCode,
1675
1644
  updateResults: !1
1676
1645
  });
1677
1646
  }
1678
1647
  function Z({
1679
- countryCode: a,
1680
- updateResults: w = !0
1648
+ countryCode: s,
1649
+ updateResults: A = !0
1681
1650
  }) {
1682
- if (!a) {
1651
+ if (!s) {
1683
1652
  i.value = void 0;
1684
1653
  return;
1685
1654
  }
1686
- a !== i.value && C(a), w && (f.value = O({
1687
- phoneNumber: P.value,
1688
- countryCode: a
1655
+ s !== i.value && C(s), A && (p.value = O({
1656
+ phoneNumber: V.value,
1657
+ countryCode: s
1689
1658
  })), W({
1690
- newPhoneNumber: P.value,
1659
+ newPhoneNumber: V.value,
1691
1660
  updateResults: !1
1692
1661
  });
1693
1662
  }
1694
1663
  return he(
1695
1664
  () => e.modelValue ?? e.defaultPhoneNumber,
1696
- (a, w) => {
1697
- a !== w && a !== P.value && W({
1698
- newPhoneNumber: a
1665
+ (s, A) => {
1666
+ s !== A && s !== V.value && W({
1667
+ newPhoneNumber: s
1699
1668
  });
1700
1669
  },
1701
1670
  {
@@ -1703,78 +1672,65 @@ const tt = /* @__PURE__ */ se({
1703
1672
  }
1704
1673
  ), he(
1705
1674
  () => e.countryCode ?? e.defaultCountryCode,
1706
- (a, w) => {
1707
- a && a !== w && a !== i.value && Z({
1708
- countryCode: a
1675
+ (s, A) => {
1676
+ s && s !== A && s !== i.value && Z({
1677
+ countryCode: s
1709
1678
  });
1710
1679
  },
1711
1680
  {
1712
1681
  immediate: !0
1713
1682
  }
1714
1683
  ), he(
1715
- f,
1716
- (a) => {
1717
- t("update", a), t("data", a), a.e164 && a.isValid ? t("update:model-value", a.e164) : t("update:model-value", P.value), t("country-code", i.value), t("update:country-code", i.value);
1684
+ p,
1685
+ (s) => {
1686
+ t("update", s), t("data", s), s.e164 && s.isValid ? t("update:model-value", s.e164) : t("update:model-value", V.value), t("country-code", i.value), t("update:country-code", i.value);
1718
1687
  },
1719
1688
  {
1720
1689
  immediate: !0
1721
1690
  }
1722
- ), (a, w) => {
1691
+ ), (s, A) => {
1723
1692
  var K;
1724
- return b(), L(
1693
+ return b(), E(
1725
1694
  "div",
1726
1695
  {
1727
- class: F(["m-phone-number-input", [e.class, { "--block": a.block }, a.orientation ? `--${a.orientation}` : void 0]]),
1728
- style: ee(a.style)
1696
+ class: F(["m-phone-number-input", [e.class, { "--block": s.block }, s.orientation ? `--${s.orientation}` : void 0]]),
1697
+ style: ee(s.style)
1729
1698
  },
1730
1699
  [
1731
- a.noCountrySelector ? z("v-if", !0) : (b(), U(Jo, oe({
1700
+ s.noCountrySelector ? $("v-if", !0) : (b(), U(Jo, oe({
1732
1701
  key: 0,
1733
- id: k(v)
1734
- }, a.countrySelectAttributes, {
1702
+ id: P(y)
1703
+ }, s.countrySelectAttributes, {
1735
1704
  "model-value": i.value,
1736
- color: a.color,
1737
- size: a.size,
1738
- "country-locale": a.countryLocale,
1739
- "country-selector-display-name": a.countrySelectorDisplayName,
1740
- "custom-countries-list": a.customCountriesList,
1741
- "ignored-countries": a.ignoredCountries,
1742
- "list-position": a.listPosition,
1743
- "no-flags": a.noFlags,
1744
- "no-search": a.noSearch,
1745
- "exclude-selectors": a.excludeSelectors,
1746
- error: a.error || (a.noValidationError ? !1 : !!P.value && !i.value),
1747
- success: a.success || (a.noValidationSuccess ? !1 : (K = f.value) == null ? void 0 : K.isValid),
1748
- locales: R.value,
1749
- disabled: a.disabled,
1750
- "search-threshold": a.searchThreshold,
1751
- "show-code-on-list": a.showCodeOnList,
1752
- "only-countries": a.onlyCountries,
1753
- "preferred-countries": a.preferredCountries,
1754
- width: a.countrySelectorWidth,
1755
- "onUpdate:modelValue": V
1705
+ color: s.color,
1706
+ size: s.size,
1707
+ "country-locale": s.countryLocale,
1708
+ "country-selector-display-name": s.countrySelectorDisplayName,
1709
+ "custom-countries-list": s.customCountriesList,
1710
+ "ignored-countries": s.ignoredCountries,
1711
+ "list-position": s.listPosition,
1712
+ "no-flags": s.noFlags,
1713
+ "no-search": s.noSearch,
1714
+ "exclude-selectors": s.excludeSelectors,
1715
+ error: s.error || (s.noValidationError ? !1 : !!V.value && !i.value),
1716
+ success: s.success || (s.noValidationSuccess ? !1 : (K = p.value) == null ? void 0 : K.isValid),
1717
+ locales: D.value,
1718
+ disabled: s.disabled,
1719
+ "search-threshold": s.searchThreshold,
1720
+ "show-code-on-list": s.showCodeOnList,
1721
+ "only-countries": s.onlyCountries,
1722
+ "preferred-countries": s.preferredCountries,
1723
+ width: s.countrySelectorWidth,
1724
+ "onUpdate:modelValue": S
1756
1725
  }), {
1757
1726
  "no-results": G(() => [
1758
- z(`
1759
- @slot Replace the "no results" icon in the country selector list
1760
- `),
1761
- N(a.$slots, "no-results", {}, void 0, !0)
1727
+ N(s.$slots, "no-results", {}, void 0, !0)
1762
1728
  ]),
1763
1729
  "selector-flag": G(({ countryCode: T }) => [
1764
- z(`
1765
- @slot Country selector flag
1766
- @binding {String} country-code - current selected country code - Ex: \`"FR"\`
1767
- `),
1768
- N(a.$slots, "selector-flag", { countryCode: T }, void 0, !0)
1730
+ N(s.$slots, "selector-flag", { countryCode: T }, void 0, !0)
1769
1731
  ]),
1770
1732
  "country-list-flag": G(({ isSelected: T, option: te }) => [
1771
- z(`
1772
- @slot Country list flag
1773
- @binding {String} country-code - country code of option - Ex: \`"FR"\`
1774
- @binding {{ iso2: string; dialCode: string; name: string; }} option - country data
1775
- @binding {Boolean} is-selected - \`true\` if option is selected
1776
- `),
1777
- N(a.$slots, "country-list-flag", {
1733
+ N(s.$slots, "country-list-flag", {
1778
1734
  countryCode: te.iso2,
1779
1735
  option: te,
1780
1736
  isSelected: T
@@ -1784,26 +1740,26 @@ const tt = /* @__PURE__ */ se({
1784
1740
  /* FORWARDED */
1785
1741
  }, 16, ["id", "model-value", "color", "size", "country-locale", "country-selector-display-name", "custom-countries-list", "ignored-countries", "list-position", "no-flags", "no-search", "exclude-selectors", "error", "success", "locales", "disabled", "search-threshold", "show-code-on-list", "only-countries", "preferred-countries", "width"])),
1786
1742
  H(lt, oe({
1787
- id: k(v),
1743
+ id: P(y),
1788
1744
  ref_key: "PhoneInputRef",
1789
1745
  ref: Y,
1790
- modelValue: P.value,
1791
- "onUpdate:modelValue": w[0] || (w[0] = (T) => P.value = T)
1792
- }, { ...a.$attrs, ...a.phoneInputAttributes }, {
1793
- color: a.color,
1794
- size: a.size,
1795
- "no-example": a.noExample,
1746
+ modelValue: V.value,
1747
+ "onUpdate:modelValue": A[0] || (A[0] = (T) => V.value = T)
1748
+ }, { ...s.$attrs, ...s.phoneInputAttributes }, {
1749
+ color: s.color,
1750
+ size: s.size,
1751
+ "no-example": s.noExample,
1796
1752
  block: "",
1797
- disabled: a.disabled,
1798
- "has-radius": !a.noCountrySelector,
1799
- success: a.success || (a.noValidationSuccess ? !1 : f.value.isValid),
1800
- error: a.error || (a.noValidationError ? !1 : !!P.value && !f.value.isValid),
1801
- locales: R.value,
1802
- "no-formatting-as-you-type": a.noFormattingAsYouType,
1803
- "auto-format": a.autoFormat,
1804
- label: a.label,
1805
- placeholder: a.placeholder,
1806
- "onUpdate:modelValue": w[1] || (w[1] = (T) => W({
1753
+ disabled: s.disabled,
1754
+ "has-radius": !s.noCountrySelector,
1755
+ success: s.success || (s.noValidationSuccess ? !1 : p.value.isValid),
1756
+ error: s.error || (s.noValidationError ? !1 : !!V.value && !p.value.isValid),
1757
+ locales: D.value,
1758
+ "no-formatting-as-you-type": s.noFormattingAsYouType,
1759
+ "auto-format": s.autoFormat,
1760
+ label: s.label,
1761
+ placeholder: s.placeholder,
1762
+ "onUpdate:modelValue": A[1] || (A[1] = (T) => W({
1807
1763
  newPhoneNumber: T
1808
1764
  }))
1809
1765
  }), null, 16, ["id", "modelValue", "color", "size", "no-example", "disabled", "has-radius", "success", "error", "locales", "no-formatting-as-you-type", "auto-format", "label", "placeholder"])
@@ -1813,7 +1769,7 @@ const tt = /* @__PURE__ */ se({
1813
1769
  );
1814
1770
  };
1815
1771
  }
1816
- }), it = /* @__PURE__ */ re(nt, [["__scopeId", "data-v-420d6d4a"]]);
1772
+ }), it = /* @__PURE__ */ re(at, [["__scopeId", "data-v-420d6d4a"]]);
1817
1773
  export {
1818
1774
  it as M,
1819
1775
  re as _,