intl-tel-input 25.10.0 → 25.10.1

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.
@@ -1734,9 +1734,9 @@ class p1 {
1734
1734
  this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
1735
1735
  const { countryOrder: n } = this.options;
1736
1736
  if (n) {
1737
- const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), p = o > -1, h = l > -1;
1738
- if (p || h)
1739
- return p && h ? o - l : p ? -1 : 1;
1737
+ const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), f = o > -1, h = l > -1;
1738
+ if (f || h)
1739
+ return f && h ? o - l : f ? -1 : 1;
1740
1740
  }
1741
1741
  return e.name.localeCompare(i.name);
1742
1742
  });
@@ -1787,8 +1787,8 @@ class p1 {
1787
1787
  const i = this.dialCodeToIso2Map[e.dialCode][0];
1788
1788
  for (const n of e.areaCodes) {
1789
1789
  for (let o = 1; o < n.length; o++) {
1790
- const l = n.substring(0, o), p = e.dialCode + l;
1791
- this._addToDialCodeMap(i, p), this._addToDialCodeMap(e.iso2, p);
1790
+ const l = n.substring(0, o), f = e.dialCode + l;
1791
+ this._addToDialCodeMap(i, f), this._addToDialCodeMap(e.iso2, f);
1792
1792
  }
1793
1793
  this._addToDialCodeMap(e.iso2, e.dialCode + n);
1794
1794
  }
@@ -1796,7 +1796,7 @@ class p1 {
1796
1796
  }
1797
1797
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1798
1798
  _generateMarkup() {
1799
- var f, I, O;
1799
+ var p, I, O;
1800
1800
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1801
1801
  const {
1802
1802
  allowDropdown: e,
@@ -1804,7 +1804,7 @@ class p1 {
1804
1804
  showFlags: n,
1805
1805
  containerClass: o,
1806
1806
  hiddenInput: l,
1807
- dropdownContainer: p,
1807
+ dropdownContainer: f,
1808
1808
  fixDropdownWidth: h,
1809
1809
  useFullscreenPopup: _,
1810
1810
  countrySearch: b,
@@ -1816,10 +1816,11 @@ class p1 {
1816
1816
  "iti--inline-dropdown": !_,
1817
1817
  [o]: !!o
1818
1818
  }), A = N("div", { class: w });
1819
- if ((f = this.telInput.parentNode) == null || f.insertBefore(A, this.telInput), e || n || i) {
1819
+ if ((p = this.telInput.parentNode) == null || p.insertBefore(A, this.telInput), e || n || i) {
1820
1820
  this.countryContainer = N(
1821
1821
  "div",
1822
- { class: "iti__country-container" },
1822
+ // visibly hidden until we measure it's width to set the input padding correctly
1823
+ { class: "iti__country-container iti__v-hide" },
1823
1824
  A
1824
1825
  ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
1825
1826
  "button",
@@ -1936,7 +1937,7 @@ class p1 {
1936
1937
  "aria-label": v.countryListAriaLabel
1937
1938
  },
1938
1939
  this.dropdownContent
1939
- ), this._appendListItems(), b && this._updateSearchResultsA11yText(), p) {
1940
+ ), this._appendListItems(), b && this._updateSearchResultsA11yText(), f) {
1940
1941
  const D = p1._buildClassNames({
1941
1942
  iti: !0,
1942
1943
  "iti--container": !0,
@@ -1949,7 +1950,7 @@ class p1 {
1949
1950
  this.countryContainer.appendChild(this.dropdownContent);
1950
1951
  }
1951
1952
  }
1952
- if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
1953
+ if (A.appendChild(this.telInput), this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide")), l) {
1953
1954
  const G = this.telInput.getAttribute("name") || "", F = l(G);
1954
1955
  if (F.phone) {
1955
1956
  const D = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${F.phone}"]`);
@@ -1992,12 +1993,12 @@ class p1 {
1992
1993
  //* 1. Extracting a dial code from the given number
1993
1994
  //* 2. Using explicit initialCountry
1994
1995
  _setInitialState(e = !1) {
1995
- const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, p = this._getDialCode(l), h = a2(l), { initialCountry: _, geoIpLookup: b } = this.options, v = _ === "auto" && b;
1996
- if (p && !h)
1996
+ const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, f = this._getDialCode(l), h = a2(l), { initialCountry: _, geoIpLookup: b } = this.options, v = _ === "auto" && b;
1997
+ if (f && !h)
1997
1998
  this._updateCountryFromNumber(l);
1998
1999
  else if (!v || e) {
1999
2000
  const w = _ ? _.toLowerCase() : "";
2000
- w && this._getCountryData(w, !0) ? this._setCountry(w) : p && h ? this._setCountry("us") : this._setCountry();
2001
+ w && this._getCountryData(w, !0) ? this._setCountry(w) : f && h ? this._setCountry("us") : this._setCountry();
2001
2002
  }
2002
2003
  l && this._updateValFromNumber(l);
2003
2004
  }
@@ -2057,19 +2058,19 @@ class p1 {
2057
2058
  //* Initialize the tel input listeners.
2058
2059
  _initTelInputListeners() {
2059
2060
  const { strictMode: e, formatAsYouType: i, separateDialCode: n, allowDropdown: o, countrySearch: l } = this.options;
2060
- let p = !1;
2061
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (p = !0), this._handleInputEvent = (h) => {
2061
+ let f = !1;
2062
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (h) => {
2062
2063
  if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
2063
- const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w - 1), f = this.telInput.value.substring(w);
2064
- this.telInput.value = A + f, this._openDropdownWithPlus();
2064
+ const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w - 1), p = this.telInput.value.substring(w);
2065
+ this.telInput.value = A + p, this._openDropdownWithPlus();
2065
2066
  return;
2066
2067
  }
2067
2068
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2068
2069
  const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), b = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
2069
- _ || b && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
2070
+ _ || b && !e ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
2070
2071
  const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
2071
- if (i && !p && !v) {
2072
- const w = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(f, O, w, I);
2072
+ if (i && !f && !v) {
2073
+ const w = this.telInput.selectionStart || 0, p = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(p, O, w, I);
2073
2074
  this.telInput.value = O, this.telInput.setSelectionRange(G, G);
2074
2075
  }
2075
2076
  }, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
@@ -2079,7 +2080,7 @@ class p1 {
2079
2080
  return;
2080
2081
  }
2081
2082
  if (e) {
2082
- const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", w = /^[0-9]$/.test(h.key), A = n ? w : v || w, f = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(f), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
2083
+ const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", w = /^[0-9]$/.test(h.key), A = n ? w : v || w, p = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(p), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
2083
2084
  (!A || G && !D && !v) && h.preventDefault();
2084
2085
  }
2085
2086
  }
@@ -2169,19 +2170,19 @@ class p1 {
2169
2170
  _filterCountries(e, i = !1) {
2170
2171
  let n = !0;
2171
2172
  this.countryList.innerHTML = "";
2172
- const o = o2(e), l = o.length, p = [], h = [], _ = [], b = [], v = [], w = [];
2173
- for (const f of this.countries)
2174
- i || l === 0 ? _.push(f) : f.iso2 === o ? p.push(f) : f.normalisedName.startsWith(o) ? h.push(f) : f.normalisedName.includes(o) ? _.push(f) : o === f.dialCode || o === f.dialCodePlus ? b.push(f) : f.dialCodePlus.includes(o) ? v.push(f) : f.initials.includes(o) && w.push(f);
2173
+ const o = o2(e), l = o.length, f = [], h = [], _ = [], b = [], v = [], w = [];
2174
+ for (const p of this.countries)
2175
+ i || l === 0 ? _.push(p) : p.iso2 === o ? f.push(p) : p.normalisedName.startsWith(o) ? h.push(p) : p.normalisedName.includes(o) ? _.push(p) : o === p.dialCode || o === p.dialCodePlus ? b.push(p) : p.dialCodePlus.includes(o) ? v.push(p) : p.initials.includes(o) && w.push(p);
2175
2176
  const A = [
2176
- ...p.sort((f, I) => f.priority - I.priority),
2177
- ...h.sort((f, I) => f.priority - I.priority),
2178
- ..._.sort((f, I) => f.priority - I.priority),
2179
- ...b.sort((f, I) => f.priority - I.priority),
2180
- ...v.sort((f, I) => f.priority - I.priority),
2181
- ...w.sort((f, I) => f.priority - I.priority)
2177
+ ...f.sort((p, I) => p.priority - I.priority),
2178
+ ...h.sort((p, I) => p.priority - I.priority),
2179
+ ..._.sort((p, I) => p.priority - I.priority),
2180
+ ...b.sort((p, I) => p.priority - I.priority),
2181
+ ...v.sort((p, I) => p.priority - I.priority),
2182
+ ...w.sort((p, I) => p.priority - I.priority)
2182
2183
  ];
2183
- for (const f of A) {
2184
- const I = f.nodeById[this.id];
2184
+ for (const p of A) {
2185
+ const I = p.nodeById[this.id];
2185
2186
  I && (this.countryList.appendChild(I), n && (this._highlightListItem(I, !1), n = !1));
2186
2187
  }
2187
2188
  n ? (this._highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove("iti__hide")) : this.searchNoResults && this.searchNoResults.classList.add("iti__hide"), this.countryList.scrollTop = 0, this._updateSearchResultsA11yText();
@@ -2207,11 +2208,11 @@ class p1 {
2207
2208
  _updateValFromNumber(e) {
2208
2209
  let i = e;
2209
2210
  if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2210
- const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, p = n ? o : l;
2211
+ const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, f = n ? o : l;
2211
2212
  i = C.utils.formatNumber(
2212
2213
  i,
2213
2214
  this.selectedCountryData.iso2,
2214
- p
2215
+ f
2215
2216
  );
2216
2217
  }
2217
2218
  i = this._beforeSetNumber(i), this.telInput.value = i;
@@ -2226,8 +2227,8 @@ class p1 {
2226
2227
  const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
2227
2228
  if (e.charAt(0) === "+" || !i)
2228
2229
  return e;
2229
- const p = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
2230
- return `+${i}${p}`;
2230
+ const f = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
2231
+ return `+${i}${f}`;
2231
2232
  }
2232
2233
  // Get the country ISO2 code from the given number
2233
2234
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
@@ -2237,16 +2238,16 @@ class p1 {
2237
2238
  let n = i ? e.substring(i) : e;
2238
2239
  const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
2239
2240
  n = this._ensureHasDialCode(n);
2240
- const p = this._getDialCode(n, !0), h = f1(n);
2241
- if (p) {
2242
- const _ = f1(p), b = this.dialCodeToIso2Map[_];
2241
+ const f = this._getDialCode(n, !0), h = f1(n);
2242
+ if (f) {
2243
+ const _ = f1(f), b = this.dialCodeToIso2Map[_];
2243
2244
  if (!o && this.defaultCountry && b.includes(this.defaultCountry))
2244
2245
  return this.defaultCountry;
2245
2246
  const v = this.selectedCountryData.areaCodes && h.length > _.length, w = o && b.includes(o) && !v;
2246
2247
  if (!(l === "1" && a2(h)) && !w) {
2247
- for (const f of b)
2248
- if (f)
2249
- return f;
2248
+ for (const p of b)
2249
+ if (p)
2250
+ return p;
2250
2251
  }
2251
2252
  } else {
2252
2253
  if (n.charAt(0) === "+" && h.length)
@@ -2280,26 +2281,26 @@ class p1 {
2280
2281
  _setCountry(e) {
2281
2282
  const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 || "";
2282
2283
  if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2283
- const p = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2284
+ const f = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
2284
2285
  let h, _;
2285
2286
  if (e) {
2286
2287
  const { name: b, dialCode: v } = this.selectedCountryData;
2287
2288
  _ = b, h = o.selectedCountryAriaLabel.replace("${countryName}", b).replace("${dialCode}", `+${v}`);
2288
2289
  } else
2289
2290
  _ = o.noCountrySelected, h = o.noCountrySelected;
2290
- this.selectedCountryInner.className = p, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
2291
+ this.selectedCountryInner.className = f, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
2291
2292
  }
2292
2293
  if (i) {
2293
- const p = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2294
- this.selectedDialCode.innerHTML = p, this._updateInputPadding();
2294
+ const f = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2295
+ this.selectedDialCode.innerHTML = f, this._updateInputPadding();
2295
2296
  }
2296
2297
  return this._updatePlaceholder(), this._updateMaxLength(), l !== e;
2297
2298
  }
2298
2299
  //* Update the input padding to make space for the selected country/dial code.
2299
2300
  _updateInputPadding() {
2300
2301
  if (this.selectedCountry) {
2301
- const i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6;
2302
- this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${i}px` : this.telInput.style.paddingRight = `${i}px`;
2302
+ const e = this.options.separateDialCode ? 78 : 42, n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + 6;
2303
+ this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${n}px` : this.telInput.style.paddingRight = `${n}px`;
2303
2304
  }
2304
2305
  }
2305
2306
  //* Update the maximum valid number length for the currently selected country.
@@ -2308,33 +2309,39 @@ class p1 {
2308
2309
  if (e && C.utils)
2309
2310
  if (o) {
2310
2311
  const l = C.utils.numberType[i];
2311
- let p = C.utils.getExampleNumber(
2312
+ let f = C.utils.getExampleNumber(
2312
2313
  o,
2313
2314
  !1,
2314
2315
  l,
2315
2316
  !0
2316
- ), h = p;
2317
- for (; C.utils.isPossibleNumber(p, o, n); )
2318
- h = p, p += "0";
2317
+ ), h = f;
2318
+ for (; C.utils.isPossibleNumber(f, o, n); )
2319
+ h = f, f += "0";
2319
2320
  const _ = C.utils.getCoreNumber(h, o);
2320
2321
  this.maxCoreNumberLength = _.length, o === "by" && (this.maxCoreNumberLength = _.length + 1);
2321
2322
  } else
2322
2323
  this.maxCoreNumberLength = null;
2323
2324
  }
2324
- //* When the input is in a hidden container during initialisation, we must inject some markup
2325
- //* into the end of the DOM to calculate the correct offsetWidth.
2326
- //* NOTE: this is only used when separateDialCode is enabled, so countryContainer and selectedCountry
2327
- //* will definitely exist.
2325
+ //* When input is in a hidden container during init, we cannot calculate the selected country width.
2326
+ //* Fix: clone the markup, make it invisible, add it to the end of the DOM, and then measure it's width.
2327
+ //* To get the right styling to apply, all we need is a shallow clone of the container,
2328
+ //* and then to inject a deep clone of the selectedCountry element.
2328
2329
  _getHiddenSelectedCountryWidth() {
2329
2330
  if (this.telInput.parentNode) {
2330
- const e = this.telInput.parentNode.cloneNode(!1);
2331
- e.style.visibility = "hidden", document.body.appendChild(e);
2332
- const i = this.countryContainer.cloneNode();
2333
- e.appendChild(i);
2334
- const n = this.selectedCountry.cloneNode(!0);
2331
+ let e;
2332
+ try {
2333
+ e = window.top.document.body;
2334
+ } catch {
2335
+ e = document.body;
2336
+ }
2337
+ const i = this.telInput.parentNode.cloneNode(!1);
2338
+ i.style.visibility = "hidden", e.appendChild(i);
2339
+ const n = this.countryContainer.cloneNode();
2335
2340
  i.appendChild(n);
2336
- const o = n.offsetWidth;
2337
- return document.body.removeChild(e), o;
2341
+ const o = this.selectedCountry.cloneNode(!0);
2342
+ n.appendChild(o);
2343
+ const l = o.offsetWidth;
2344
+ return e.removeChild(i), l;
2338
2345
  }
2339
2346
  return 0;
2340
2347
  }
@@ -2347,11 +2354,11 @@ class p1 {
2347
2354
  customPlaceholder: o
2348
2355
  } = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2349
2356
  if (C.utils && l) {
2350
- const p = C.utils.numberType[i];
2357
+ const f = C.utils.numberType[i];
2351
2358
  let h = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2352
2359
  this.selectedCountryData.iso2,
2353
2360
  n,
2354
- p
2361
+ f
2355
2362
  ) : "";
2356
2363
  h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
2357
2364
  }
@@ -2375,10 +2382,10 @@ class p1 {
2375
2382
  }
2376
2383
  //* Check if an element is visible within it's container, else scroll until it is.
2377
2384
  _scrollTo(e) {
2378
- const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, p = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, b = _ + h, v = _ - l + i.scrollTop;
2385
+ const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, f = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, b = _ + h, v = _ - l + i.scrollTop;
2379
2386
  if (_ < l)
2380
2387
  i.scrollTop = v;
2381
- else if (b > p) {
2388
+ else if (b > f) {
2382
2389
  const w = o - h;
2383
2390
  i.scrollTop = v - w;
2384
2391
  }
@@ -2400,9 +2407,9 @@ class p1 {
2400
2407
  if (e.charAt(0) === "+") {
2401
2408
  let o = "";
2402
2409
  for (let l = 0; l < e.length; l++) {
2403
- const p = e.charAt(l);
2404
- if (!isNaN(parseInt(p, 10))) {
2405
- if (o += p, i)
2410
+ const f = e.charAt(l);
2411
+ if (!isNaN(parseInt(f, 10))) {
2412
+ if (o += f, i)
2406
2413
  this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
2407
2414
  else if (this.dialCodes.has(o)) {
2408
2415
  n = e.substring(0, l + 1);
@@ -2460,7 +2467,7 @@ class p1 {
2460
2467
  //********************
2461
2468
  //* Remove plugin.
2462
2469
  destroy() {
2463
- var l, p;
2470
+ var l, f;
2464
2471
  this.telInput.iti = void 0;
2465
2472
  const { allowDropdown: e, separateDialCode: i } = this.options;
2466
2473
  if (e) {
@@ -2477,7 +2484,7 @@ class p1 {
2477
2484
  const { form: n } = this.telInput;
2478
2485
  this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2479
2486
  const o = this.telInput.parentNode;
2480
- (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (p = o == null ? void 0 : o.parentNode) == null || p.removeChild(o), delete C.instances[this.id];
2487
+ (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (f = o == null ? void 0 : o.parentNode) == null || f.removeChild(o), delete C.instances[this.id];
2481
2488
  }
2482
2489
  //* Get the extension from the current number.
2483
2490
  getExtension() {
@@ -2532,9 +2539,9 @@ class p1 {
2532
2539
  _validateNumber(e) {
2533
2540
  if (!this.selectedCountryData.iso2)
2534
2541
  return !1;
2535
- const i = (p) => e ? this._utilsIsValidNumber(p) : this._utilsIsPossibleNumber(p), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
2542
+ const i = (f) => e ? this._utilsIsValidNumber(f) : this._utilsIsPossibleNumber(f), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
2536
2543
  if (o > -1 && !this.options.allowPhonewords) {
2537
- const p = n.substring(0, o), h = i(p), _ = i(n);
2544
+ const f = n.substring(0, o), h = i(f), _ = i(n);
2538
2545
  return h && _;
2539
2546
  }
2540
2547
  return i(n);
@@ -2602,7 +2609,7 @@ const Z2 = (m) => {
2602
2609
  attachUtils: Z2,
2603
2610
  startedLoadingUtilsScript: !1,
2604
2611
  startedLoadingAutoCountry: !1,
2605
- version: "25.10.0"
2612
+ version: "25.10.1"
2606
2613
  }
2607
2614
  );
2608
2615
  (function() {
@@ -2637,10 +2644,10 @@ const Z2 = (m) => {
2637
2644
  }
2638
2645
  }, l = {};
2639
2646
  new o("about:invalid#zClosurez"), new o("about:blank");
2640
- const p = {};
2647
+ const f = {};
2641
2648
  class h {
2642
2649
  constructor() {
2643
- if (p !== p) throw Error("SafeStyle is not meant to be built directly");
2650
+ if (f !== f) throw Error("SafeStyle is not meant to be built directly");
2644
2651
  }
2645
2652
  toString() {
2646
2653
  return "";
@@ -2677,12 +2684,12 @@ const Z2 = (m) => {
2677
2684
  case D:
2678
2685
  case i1:
2679
2686
  case I:
2680
- case f:
2687
+ case p:
2681
2688
  this.o = !0;
2682
2689
  }
2683
2690
  this.j = t.defaultValue;
2684
2691
  }
2685
- var f = 1, I = 2, O = 3, G = 4, F = 6, D = 16, i1 = 18;
2692
+ var p = 1, I = 2, O = 3, G = 4, F = 6, D = 16, i1 = 18;
2686
2693
  function c2(d, t) {
2687
2694
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2688
2695
  var $ = t[d];
@@ -8801,33 +8808,33 @@ const q2 = {
8801
8808
  "changeErrorCode"
8802
8809
  ], ["update:modelValue"]),
8803
8810
  setup(m, { expose: e, emit: i }) {
8804
- const n = D2(m, "modelValue"), o = m, l = i, p = v1(), h = v1(), _ = v1(!1), b = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
8805
- let f = b();
8806
- _.value !== f && (_.value = f, l("changeValidity", !!f), l(
8811
+ const n = D2(m, "modelValue"), o = m, l = i, f = v1(), h = v1(), _ = v1(!1), b = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
8812
+ let p = b();
8813
+ _.value !== p && (_.value = p, l("changeValidity", !!p), l(
8807
8814
  "changeErrorCode",
8808
- f ? null : h.value.getValidationError()
8815
+ p ? null : h.value.getValidationError()
8809
8816
  ));
8810
8817
  }, w = () => {
8811
- var f;
8812
- l("changeNumber", ((f = h.value) == null ? void 0 : f.getNumber()) ?? ""), v();
8818
+ var p;
8819
+ l("changeNumber", ((p = h.value) == null ? void 0 : p.getNumber()) ?? ""), v();
8813
8820
  }, A = () => {
8814
- var f;
8815
- l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), w(), v();
8821
+ var p;
8822
+ l("changeCountry", ((p = h.value) == null ? void 0 : p.getSelectedCountryData().iso2) ?? ""), w(), v();
8816
8823
  };
8817
8824
  return P2(() => {
8818
- p.value && (h.value = C(p.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = b());
8825
+ f.value && (h.value = C(f.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = b());
8819
8826
  }), x2(
8820
8827
  () => o.disabled,
8821
- (f) => {
8828
+ (p) => {
8822
8829
  var I;
8823
- return (I = h.value) == null ? void 0 : I.setDisabled(f);
8830
+ return (I = h.value) == null ? void 0 : I.setDisabled(p);
8824
8831
  }
8825
8832
  ), R2(() => {
8826
- var f;
8827
- return (f = h.value) == null ? void 0 : f.destroy();
8828
- }), e({ instance: h, input: p }), (f, I) => B2((O2(), k2("input", G2({
8833
+ var p;
8834
+ return (p = h.value) == null ? void 0 : p.destroy();
8835
+ }), e({ instance: h, input: f }), (p, I) => B2((O2(), k2("input", G2({
8829
8836
  ref_key: "input",
8830
- ref: p,
8837
+ ref: f,
8831
8838
  "onUpdate:modelValue": I[0] || (I[0] = (O) => n.value = O),
8832
8839
  type: "tel",
8833
8840
  onCountrychange: A,