intl-tel-input 25.0.2 → 25.1.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.
@@ -1,4 +1,4 @@
1
- import { mergeModels as i2, useModel as T2, ref as I1, onMounted as E2, watch as D2, onUnmounted as M2, withDirectives as P2, openBlock as x2, createElementBlock as R2, mergeProps as B2, vModelText as k2 } from "vue";
1
+ import { mergeModels as i2, useModel as A2, ref as I1, onMounted as E2, watch as D2, onUnmounted as M2, withDirectives as P2, openBlock as x2, createElementBlock as R2, mergeProps as B2, vModelText as k2 } from "vue";
2
2
  const r2 = [
3
3
  [
4
4
  "af",
@@ -76,7 +76,9 @@ const r2 = [
76
76
  "au",
77
77
  // Australia
78
78
  "61",
79
- 0
79
+ 0,
80
+ null,
81
+ "0"
80
82
  ],
81
83
  [
82
84
  "at",
@@ -257,14 +259,16 @@ const r2 = [
257
259
  // Christmas Island
258
260
  "61",
259
261
  2,
260
- ["89164"]
262
+ ["89164"],
263
+ "0"
261
264
  ],
262
265
  [
263
266
  "cc",
264
267
  // Cocos (Keeling) Islands
265
268
  "61",
266
269
  1,
267
- ["89162"]
270
+ ["89162"],
271
+ "0"
268
272
  ],
269
273
  [
270
274
  "co",
@@ -497,7 +501,8 @@ const r2 = [
497
501
  // Guernsey
498
502
  "44",
499
503
  1,
500
- ["1481", "7781", "7839", "7911"]
504
+ ["1481", "7781", "7839", "7911"],
505
+ "0"
501
506
  ],
502
507
  [
503
508
  "gn",
@@ -569,7 +574,8 @@ const r2 = [
569
574
  // Isle of Man
570
575
  "44",
571
576
  2,
572
- ["1624", "74576", "7524", "7924", "7624"]
577
+ ["1624", "74576", "7524", "7924", "7624"],
578
+ "0"
573
579
  ],
574
580
  [
575
581
  "il",
@@ -599,7 +605,8 @@ const r2 = [
599
605
  // Jersey
600
606
  "44",
601
607
  3,
602
- ["1534", "7509", "7700", "7797", "7829", "7937"]
608
+ ["1534", "7509", "7700", "7797", "7829", "7937"],
609
+ "0"
603
610
  ],
604
611
  [
605
612
  "jo",
@@ -611,7 +618,8 @@ const r2 = [
611
618
  // Kazakhstan
612
619
  "7",
613
620
  1,
614
- ["33", "7"]
621
+ ["33", "7"],
622
+ "8"
615
623
  ],
616
624
  [
617
625
  "ke",
@@ -743,7 +751,8 @@ const r2 = [
743
751
  // Mayotte
744
752
  "262",
745
753
  1,
746
- ["269", "639"]
754
+ ["269", "639"],
755
+ "0"
747
756
  ],
748
757
  [
749
758
  "mx",
@@ -786,7 +795,9 @@ const r2 = [
786
795
  "ma",
787
796
  // Morocco
788
797
  "212",
789
- 0
798
+ 0,
799
+ null,
800
+ "0"
790
801
  ],
791
802
  [
792
803
  "mz",
@@ -947,7 +958,9 @@ const r2 = [
947
958
  "re",
948
959
  // Réunion
949
960
  "262",
950
- 0
961
+ 0,
962
+ null,
963
+ "0"
951
964
  ],
952
965
  [
953
966
  "ro",
@@ -958,7 +971,9 @@ const r2 = [
958
971
  "ru",
959
972
  // Russia
960
973
  "7",
961
- 0
974
+ 0,
975
+ null,
976
+ "8"
962
977
  ],
963
978
  [
964
979
  "rw",
@@ -1230,7 +1245,9 @@ const r2 = [
1230
1245
  "gb",
1231
1246
  // United Kingdom
1232
1247
  "44",
1233
- 0
1248
+ 0,
1249
+ null,
1250
+ "0"
1234
1251
  ],
1235
1252
  [
1236
1253
  "us",
@@ -1287,7 +1304,8 @@ const r2 = [
1287
1304
  // Western Sahara
1288
1305
  "212",
1289
1306
  1,
1290
- ["5288", "5289"]
1307
+ ["5288", "5289"],
1308
+ "0"
1291
1309
  ],
1292
1310
  [
1293
1311
  "ye",
@@ -1306,16 +1324,16 @@ const r2 = [
1306
1324
  ]
1307
1325
  ], W = [];
1308
1326
  for (let y = 0; y < r2.length; y++) {
1309
- const $ = r2[y];
1327
+ const e = r2[y];
1310
1328
  W[y] = {
1311
1329
  name: "",
1312
1330
  // this is now populated in the plugin
1313
- iso2: $[0],
1314
- dialCode: $[1],
1315
- priority: $[2] || 0,
1316
- areaCodes: $[3] || null,
1317
- partialAreaCodes: null,
1318
- nodeById: {}
1331
+ iso2: e[0],
1332
+ dialCode: e[1],
1333
+ priority: e[2] || 0,
1334
+ areaCodes: e[3] || null,
1335
+ nodeById: {},
1336
+ nationalPrefix: e[4] || null
1319
1337
  };
1320
1338
  }
1321
1339
  const O2 = {
@@ -1576,7 +1594,7 @@ const O2 = {
1576
1594
  for (let y = 0; y < W.length; y++)
1577
1595
  W[y].name = u2[W[y].iso2];
1578
1596
  let F2 = 0;
1579
- const a2 = {
1597
+ const l2 = {
1580
1598
  //* Whether or not to allow the dropdown.
1581
1599
  allowDropdown: !0,
1582
1600
  //* Add a placeholder in the input with an example number for the selected country.
@@ -1650,45 +1668,45 @@ const a2 = {
1650
1668
  "888",
1651
1669
  "889"
1652
1670
  ], c1 = (y) => y.replace(/\D/g, ""), s2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), o2 = (y) => {
1653
- const $ = c1(y);
1654
- if ($.charAt(0) === "1") {
1655
- const n = $.substr(1, 3);
1671
+ const e = c1(y);
1672
+ if (e.charAt(0) === "1") {
1673
+ const n = e.substr(1, 3);
1656
1674
  return U2.indexOf(n) !== -1;
1657
1675
  }
1658
1676
  return !1;
1659
- }, V2 = (y, $, n, i) => {
1660
- if (n === 0 && !i)
1677
+ }, V2 = (y, e, n, r) => {
1678
+ if (n === 0 && !r)
1661
1679
  return 0;
1662
1680
  let o = 0;
1663
- for (let l = 0; l < $.length; l++) {
1664
- if (/[+0-9]/.test($[l]) && o++, o === y && !i)
1665
- return l + 1;
1666
- if (i && o === y + 1)
1667
- return l;
1668
- }
1669
- return $.length;
1670
- }, N = (y, $, n) => {
1671
- const i = document.createElement(y);
1672
- return $ && Object.entries($).forEach(([o, l]) => i.setAttribute(o, l)), n && n.appendChild(i), i;
1673
- }, $1 = (y, ...$) => {
1681
+ for (let a = 0; a < e.length; a++) {
1682
+ if (/[+0-9]/.test(e[a]) && o++, o === y && !r)
1683
+ return a + 1;
1684
+ if (r && o === y + 1)
1685
+ return a;
1686
+ }
1687
+ return e.length;
1688
+ }, T = (y, e, n) => {
1689
+ const r = document.createElement(y);
1690
+ return e && Object.entries(e).forEach(([o, a]) => r.setAttribute(o, a)), n && n.appendChild(r), r;
1691
+ }, $1 = (y, ...e) => {
1674
1692
  const { instances: n } = C;
1675
- Object.values(n).forEach((i) => i[y](...$));
1693
+ Object.values(n).forEach((r) => r[y](...e));
1676
1694
  };
1677
1695
  class K2 {
1678
- constructor($, n = {}) {
1679
- this.id = F2++, this.telInput = $, this.highlightedItem = null, this.options = Object.assign({}, a2, n), this.hadInitialPlaceholder = !!$.getAttribute("placeholder");
1696
+ constructor(e, n = {}) {
1697
+ this.id = F2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, l2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1680
1698
  }
1681
1699
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1700
  _init() {
1683
1701
  this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]");
1684
- const $ = this.options.allowDropdown || this.options.separateDialCode;
1685
- this.showSelectedCountryOnLeft = this.isRTL ? !$ : $, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
1686
- const n = new Promise((o, l) => {
1687
- this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = l;
1688
- }), i = new Promise((o, l) => {
1689
- this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = l;
1702
+ const e = this.options.allowDropdown || this.options.separateDialCode;
1703
+ this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
1704
+ const n = new Promise((o, a) => {
1705
+ this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = a;
1706
+ }), r = new Promise((o, a) => {
1707
+ this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = a;
1690
1708
  });
1691
- this.promise = Promise.all([n, i]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1709
+ this.promise = Promise.all([n, r]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1692
1710
  }
1693
1711
  //********************
1694
1712
  //* PRIVATE METHODS
@@ -1699,99 +1717,99 @@ class K2 {
1699
1717
  }
1700
1718
  //* Sort countries by countryOrder option (if present), then name.
1701
1719
  _sortCountries() {
1702
- this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map(($) => $.toLowerCase())), this.countries.sort(($, n) => {
1703
- const { countryOrder: i } = this.options;
1704
- if (i) {
1705
- const o = i.indexOf($.iso2), l = i.indexOf(n.iso2), c = o > -1, f = l > -1;
1706
- if (c || f)
1707
- return c && f ? o - l : c ? -1 : 1;
1720
+ this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, n) => {
1721
+ const { countryOrder: r } = this.options;
1722
+ if (r) {
1723
+ const o = r.indexOf(e.iso2), a = r.indexOf(n.iso2), c = o > -1, g = a > -1;
1724
+ if (c || g)
1725
+ return c && g ? o - a : c ? -1 : 1;
1708
1726
  }
1709
- return $.name.localeCompare(n.name);
1727
+ return e.name.localeCompare(n.name);
1710
1728
  });
1711
1729
  }
1712
1730
  //* Add a dial code to this.dialCodeToIso2Map.
1713
- _addToDialCodeMap($, n, i) {
1731
+ _addToDialCodeMap(e, n, r) {
1714
1732
  n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
1715
- for (let l = 0; l < this.dialCodeToIso2Map[n].length; l++)
1716
- if (this.dialCodeToIso2Map[n][l] === $)
1733
+ for (let a = 0; a < this.dialCodeToIso2Map[n].length; a++)
1734
+ if (this.dialCodeToIso2Map[n][a] === e)
1717
1735
  return;
1718
- const o = i !== void 0 ? i : this.dialCodeToIso2Map[n].length;
1719
- this.dialCodeToIso2Map[n][o] = $;
1736
+ const o = r !== void 0 ? r : this.dialCodeToIso2Map[n].length;
1737
+ this.dialCodeToIso2Map[n][o] = e;
1720
1738
  }
1721
1739
  //* Process onlyCountries or excludeCountries array if present.
1722
1740
  _processAllCountries() {
1723
- const { onlyCountries: $, excludeCountries: n } = this.options;
1724
- if ($.length) {
1725
- const i = $.map(
1741
+ const { onlyCountries: e, excludeCountries: n } = this.options;
1742
+ if (e.length) {
1743
+ const r = e.map(
1726
1744
  (o) => o.toLowerCase()
1727
1745
  );
1728
1746
  this.countries = W.filter(
1729
- (o) => i.indexOf(o.iso2) > -1
1747
+ (o) => r.indexOf(o.iso2) > -1
1730
1748
  );
1731
1749
  } else if (n.length) {
1732
- const i = n.map(
1750
+ const r = n.map(
1733
1751
  (o) => o.toLowerCase()
1734
1752
  );
1735
1753
  this.countries = W.filter(
1736
- (o) => i.indexOf(o.iso2) === -1
1754
+ (o) => r.indexOf(o.iso2) === -1
1737
1755
  );
1738
1756
  } else
1739
1757
  this.countries = W;
1740
1758
  }
1741
1759
  //* Translate Countries by object literal provided on config.
1742
1760
  _translateCountryNames() {
1743
- for (let $ = 0; $ < this.countries.length; $++) {
1744
- const n = this.countries[$].iso2.toLowerCase();
1745
- this.options.i18n.hasOwnProperty(n) && (this.countries[$].name = this.options.i18n[n]);
1761
+ for (let e = 0; e < this.countries.length; e++) {
1762
+ const n = this.countries[e].iso2.toLowerCase();
1763
+ this.options.i18n.hasOwnProperty(n) && (this.countries[e].name = this.options.i18n[n]);
1746
1764
  }
1747
1765
  }
1748
- //* Generate this.dialCodes and this.dialCodeToIso2Map and country.partialAreaCodes.
1766
+ //* Generate this.dialCodes and this.dialCodeToIso2Map.
1749
1767
  _processDialCodes() {
1750
1768
  this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1751
- for (let $ = 0; $ < this.countries.length; $++) {
1752
- const n = this.countries[$];
1769
+ for (let e = 0; e < this.countries.length; e++) {
1770
+ const n = this.countries[e];
1753
1771
  this.dialCodes[n.dialCode] || (this.dialCodes[n.dialCode] = !0), this._addToDialCodeMap(n.iso2, n.dialCode, n.priority);
1754
1772
  }
1755
- for (let $ = 0; $ < this.countries.length; $++) {
1756
- const n = this.countries[$];
1773
+ for (let e = 0; e < this.countries.length; e++) {
1774
+ const n = this.countries[e];
1757
1775
  if (n.areaCodes) {
1758
- const i = this.dialCodeToIso2Map[n.dialCode][0];
1776
+ const r = this.dialCodeToIso2Map[n.dialCode][0];
1759
1777
  for (let o = 0; o < n.areaCodes.length; o++) {
1760
- const l = n.areaCodes[o];
1761
- for (let c = 1; c < l.length; c++) {
1762
- const f = l.substr(0, c), p = n.dialCode + f;
1763
- this._addToDialCodeMap(i, p), this._addToDialCodeMap(n.iso2, p), n.partialAreaCodes || (n.partialAreaCodes = []), n.partialAreaCodes.includes(f) || n.partialAreaCodes.push(f);
1778
+ const a = n.areaCodes[o];
1779
+ for (let c = 1; c < a.length; c++) {
1780
+ const g = a.substr(0, c), f = n.dialCode + g;
1781
+ this._addToDialCodeMap(r, f), this._addToDialCodeMap(n.iso2, f);
1764
1782
  }
1765
- this._addToDialCodeMap(n.iso2, n.dialCode + l);
1783
+ this._addToDialCodeMap(n.iso2, n.dialCode + a);
1766
1784
  }
1767
1785
  }
1768
1786
  }
1769
1787
  }
1770
1788
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1771
1789
  _generateMarkup() {
1772
- var _, T, G;
1790
+ var I, A, G;
1773
1791
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1774
1792
  const {
1775
- allowDropdown: $,
1793
+ allowDropdown: e,
1776
1794
  separateDialCode: n,
1777
- showFlags: i,
1795
+ showFlags: r,
1778
1796
  containerClass: o,
1779
- hiddenInput: l,
1797
+ hiddenInput: a,
1780
1798
  dropdownContainer: c,
1781
- fixDropdownWidth: f,
1782
- useFullscreenPopup: p,
1783
- countrySearch: w,
1784
- i18n: I
1799
+ fixDropdownWidth: g,
1800
+ useFullscreenPopup: f,
1801
+ countrySearch: S,
1802
+ i18n: _
1785
1803
  } = this.options;
1786
- let S = "iti";
1787
- $ && (S += " iti--allow-dropdown"), i && (S += " iti--show-flags"), o && (S += ` ${o}`), p || (S += " iti--inline-dropdown");
1788
- const A = N("div", { class: S });
1789
- if ((_ = this.telInput.parentNode) == null || _.insertBefore(A, this.telInput), $ || i || n) {
1790
- this.countryContainer = N(
1804
+ let b = "iti";
1805
+ e && (b += " iti--allow-dropdown"), r && (b += " iti--show-flags"), o && (b += ` ${o}`), f || (b += " iti--inline-dropdown");
1806
+ const w = T("div", { class: b });
1807
+ if ((I = this.telInput.parentNode) == null || I.insertBefore(w, this.telInput), e || r || n) {
1808
+ this.countryContainer = T(
1791
1809
  "div",
1792
1810
  { class: "iti__country-container" },
1793
- A
1794
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry = N(
1811
+ w
1812
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1795
1813
  "button",
1796
1814
  {
1797
1815
  type: "button",
@@ -1803,89 +1821,89 @@ class K2 {
1803
1821
  role: "combobox"
1804
1822
  },
1805
1823
  this.countryContainer
1806
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = N(
1824
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1807
1825
  "div",
1808
1826
  { class: "iti__selected-country" },
1809
1827
  this.countryContainer
1810
1828
  );
1811
- const F = N("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1812
- if (this.selectedCountryInner = N("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = N(
1829
+ const F = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1830
+ if (this.selectedCountryInner = T("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = T(
1813
1831
  "span",
1814
1832
  { class: "iti__a11y-text" },
1815
1833
  this.selectedCountryInner
1816
- ), $ && (this.dropdownArrow = N(
1834
+ ), e && (this.dropdownArrow = T(
1817
1835
  "div",
1818
1836
  { class: "iti__arrow", "aria-hidden": "true" },
1819
1837
  F
1820
- )), n && (this.selectedDialCode = N(
1838
+ )), n && (this.selectedDialCode = T(
1821
1839
  "div",
1822
1840
  { class: "iti__selected-dial-code" },
1823
1841
  this.selectedCountry
1824
- )), $) {
1825
- const M = f ? "" : "iti--flexible-dropdown-width";
1826
- if (this.dropdownContent = N("div", {
1842
+ )), e) {
1843
+ const M = g ? "" : "iti--flexible-dropdown-width";
1844
+ if (this.dropdownContent = T("div", {
1827
1845
  id: `iti-${this.id}__dropdown-content`,
1828
1846
  class: `iti__dropdown-content iti__hide ${M}`
1829
- }), w && (this.searchInput = N(
1847
+ }), S && (this.searchInput = T(
1830
1848
  "input",
1831
1849
  {
1832
1850
  type: "text",
1833
1851
  class: "iti__search-input",
1834
- placeholder: I.searchPlaceholder,
1852
+ placeholder: _.searchPlaceholder,
1835
1853
  role: "combobox",
1836
1854
  "aria-expanded": "true",
1837
- "aria-label": I.searchPlaceholder,
1855
+ "aria-label": _.searchPlaceholder,
1838
1856
  "aria-controls": `iti-${this.id}__country-listbox`,
1839
1857
  "aria-autocomplete": "list",
1840
1858
  autocomplete: "off"
1841
1859
  },
1842
1860
  this.dropdownContent
1843
- ), this.searchResultsA11yText = N(
1861
+ ), this.searchResultsA11yText = T(
1844
1862
  "span",
1845
1863
  { class: "iti__a11y-text" },
1846
1864
  this.dropdownContent
1847
- )), this.countryList = N(
1865
+ )), this.countryList = T(
1848
1866
  "ul",
1849
1867
  {
1850
1868
  class: "iti__country-list",
1851
1869
  id: `iti-${this.id}__country-listbox`,
1852
1870
  role: "listbox",
1853
- "aria-label": I.countryListAriaLabel
1871
+ "aria-label": _.countryListAriaLabel
1854
1872
  },
1855
1873
  this.dropdownContent
1856
- ), this._appendListItems(), w && this._updateSearchResultsText(), c) {
1874
+ ), this._appendListItems(), S && this._updateSearchResultsText(), c) {
1857
1875
  let x = "iti iti--container";
1858
- p ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = N("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
1876
+ f ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = T("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
1859
1877
  } else
1860
1878
  this.countryContainer.appendChild(this.dropdownContent);
1861
1879
  }
1862
1880
  }
1863
- if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
1864
- const F = this.telInput.getAttribute("name") || "", M = l(F);
1881
+ if (w.appendChild(this.telInput), this._updateInputPadding(), a) {
1882
+ const F = this.telInput.getAttribute("name") || "", M = a(F);
1865
1883
  if (M.phone) {
1866
- const x = (T = this.telInput.form) == null ? void 0 : T.querySelector(`input[name="${M.phone}"]`);
1867
- x ? this.hiddenInput = x : (this.hiddenInput = N("input", {
1884
+ const x = (A = this.telInput.form) == null ? void 0 : A.querySelector(`input[name="${M.phone}"]`);
1885
+ x ? this.hiddenInput = x : (this.hiddenInput = T("input", {
1868
1886
  type: "hidden",
1869
1887
  name: M.phone
1870
- }), A.appendChild(this.hiddenInput));
1888
+ }), w.appendChild(this.hiddenInput));
1871
1889
  }
1872
1890
  if (M.country) {
1873
1891
  const x = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${M.country}"]`);
1874
- x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = N("input", {
1892
+ x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = T("input", {
1875
1893
  type: "hidden",
1876
1894
  name: M.country
1877
- }), A.appendChild(this.hiddenInputCountry));
1895
+ }), w.appendChild(this.hiddenInputCountry));
1878
1896
  }
1879
1897
  }
1880
1898
  }
1881
1899
  //* For each country: add a country list item <li> to the countryList <ul> container.
1882
1900
  _appendListItems() {
1883
- for (let $ = 0; $ < this.countries.length; $++) {
1884
- const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o = N(
1901
+ for (let e = 0; e < this.countries.length; e++) {
1902
+ const n = this.countries[e], r = e === 0 ? "iti__highlight" : "", o = T(
1885
1903
  "li",
1886
1904
  {
1887
1905
  id: `iti-${this.id}__item-${n.iso2}`,
1888
- class: `iti__country ${i}`,
1906
+ class: `iti__country ${r}`,
1889
1907
  tabindex: "-1",
1890
1908
  role: "option",
1891
1909
  "data-dial-code": n.dialCode,
@@ -1895,22 +1913,22 @@ class K2 {
1895
1913
  this.countryList
1896
1914
  );
1897
1915
  n.nodeById[this.id] = o;
1898
- let l = "";
1899
- this.options.showFlags && (l += `<div class='iti__flag iti__${n.iso2}'></div>`), l += `<span class='iti__country-name'>${n.name}</span>`, l += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", l);
1916
+ let a = "";
1917
+ this.options.showFlags && (a += `<div class='iti__flag iti__${n.iso2}'></div>`), a += `<span class='iti__country-name'>${n.name}</span>`, a += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", a);
1900
1918
  }
1901
1919
  }
1902
1920
  //* Set the initial state of the input value and the selected country by:
1903
1921
  //* 1. Extracting a dial code from the given number
1904
1922
  //* 2. Using explicit initialCountry
1905
- _setInitialState($ = !1) {
1906
- const n = this.telInput.getAttribute("value"), i = this.telInput.value, l = n && n.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? n : i, c = this._getDialCode(l), f = o2(l), { initialCountry: p, geoIpLookup: w } = this.options, I = p === "auto" && w;
1907
- if (c && !f)
1908
- this._updateCountryFromNumber(l);
1909
- else if (!I || $) {
1910
- const S = p ? p.toLowerCase() : "";
1911
- S && this._getCountryData(S, !0) ? this._setCountry(S) : c && f ? this._setCountry("us") : this._setCountry();
1923
+ _setInitialState(e = !1) {
1924
+ const n = this.telInput.getAttribute("value"), r = this.telInput.value, a = n && n.charAt(0) === "+" && (!r || r.charAt(0) !== "+") ? n : r, c = this._getDialCode(a), g = o2(a), { initialCountry: f, geoIpLookup: S } = this.options, _ = f === "auto" && S;
1925
+ if (c && !g)
1926
+ this._updateCountryFromNumber(a);
1927
+ else if (!_ || e) {
1928
+ const b = f ? f.toLowerCase() : "";
1929
+ b && this._getCountryData(b, !0) ? this._setCountry(b) : c && g ? this._setCountry("us") : this._setCountry();
1912
1930
  }
1913
- l && this._updateValFromNumber(l);
1931
+ a && this._updateValFromNumber(a);
1914
1932
  }
1915
1933
  //* Initialise the main event listeners: input keyup, and click selected country.
1916
1934
  _initListeners() {
@@ -1918,10 +1936,10 @@ class K2 {
1918
1936
  }
1919
1937
  //* Update hidden input on form submit.
1920
1938
  _initHiddenInputListener() {
1921
- var $;
1939
+ var e;
1922
1940
  this._handleHiddenInputSubmit = () => {
1923
1941
  this.hiddenInput && (this.hiddenInput.value = this.getNumber()), this.hiddenInputCountry && (this.hiddenInputCountry.value = this.getSelectedCountryData().iso2 || "");
1924
- }, ($ = this.telInput.form) == null || $.addEventListener(
1942
+ }, (e = this.telInput.form) == null || e.addEventListener(
1925
1943
  "submit",
1926
1944
  this._handleHiddenInputSubmit
1927
1945
  );
@@ -1931,8 +1949,8 @@ class K2 {
1931
1949
  this._handleLabelClick = (n) => {
1932
1950
  this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : n.preventDefault();
1933
1951
  };
1934
- const $ = this.telInput.closest("label");
1935
- $ && $.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1952
+ const e = this.telInput.closest("label");
1953
+ e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1936
1954
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
1937
1955
  }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (n) => {
1938
1956
  this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), this._openDropdown()), n.key === "Tab" && this._closeDropdown();
@@ -1943,18 +1961,18 @@ class K2 {
1943
1961
  }
1944
1962
  //* Init many requests: utils script / geo ip lookup.
1945
1963
  _initRequests() {
1946
- let { loadUtils: $, initialCountry: n, geoIpLookup: i } = this.options;
1947
- $ && !C.utils ? (this._handlePageLoad = () => {
1948
- var l;
1949
- window.removeEventListener("load", this._handlePageLoad), (l = C.attachUtils($)) == null || l.catch(() => {
1964
+ let { loadUtils: e, initialCountry: n, geoIpLookup: r } = this.options;
1965
+ e && !C.utils ? (this._handlePageLoad = () => {
1966
+ var a;
1967
+ window.removeEventListener("load", this._handlePageLoad), (a = C.attachUtils(e)) == null || a.catch(() => {
1950
1968
  });
1951
- }, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1969
+ }, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && r && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1952
1970
  }
1953
1971
  //* Perform the geo ip lookup.
1954
1972
  _loadAutoCountry() {
1955
1973
  C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1956
- ($ = "") => {
1957
- const n = $.toLowerCase();
1974
+ (e = "") => {
1975
+ const n = e.toLowerCase();
1958
1976
  n && this._getCountryData(n, !0) ? (C.autoCountry = n, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1959
1977
  },
1960
1978
  () => {
@@ -1967,94 +1985,94 @@ class K2 {
1967
1985
  }
1968
1986
  //* Initialize the tel input listeners.
1969
1987
  _initTelInputListeners() {
1970
- const { strictMode: $, formatAsYouType: n, separateDialCode: i, formatOnDisplay: o, allowDropdown: l, countrySearch: c } = this.options;
1971
- let f = !1;
1972
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (p) => {
1973
- if (this.isAndroid && (p == null ? void 0 : p.data) === "+" && i && l && c) {
1974
- const A = this.telInput.selectionStart || 0, _ = this.telInput.value.substring(0, A - 1), T = this.telInput.value.substring(A);
1975
- this.telInput.value = _ + T, this._openDropdownWithPlus();
1988
+ const { strictMode: e, formatAsYouType: n, separateDialCode: r, formatOnDisplay: o, allowDropdown: a, countrySearch: c } = this.options;
1989
+ let g = !1;
1990
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (f) => {
1991
+ if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && r && a && c) {
1992
+ const w = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, w - 1), A = this.telInput.value.substring(w);
1993
+ this.telInput.value = I + A, this._openDropdownWithPlus();
1976
1994
  return;
1977
1995
  }
1978
1996
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1979
- const w = (p == null ? void 0 : p.data) && /[^+0-9]/.test(p.data), I = (p == null ? void 0 : p.inputType) === "insertFromPaste" && this.telInput.value;
1980
- w || I && !$ ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
1981
- const S = (p == null ? void 0 : p.detail) && p.detail.isSetNumber && !o;
1982
- if (n && !f && !S) {
1983
- const A = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, A).replace(/[^+0-9]/g, "").length, G = (p == null ? void 0 : p.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(T, F, A, G);
1997
+ const S = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), _ = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
1998
+ S || _ && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
1999
+ const b = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
2000
+ if (n && !g && !b) {
2001
+ const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, G = (f == null ? void 0 : f.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(A, F, w, G);
1984
2002
  this.telInput.value = F, this.telInput.setSelectionRange(M, M);
1985
2003
  }
1986
- }, this.telInput.addEventListener("input", this._handleInputEvent), ($ || i) && (this._handleKeydownEvent = (p) => {
1987
- if (p.key && p.key.length === 1 && !p.altKey && !p.ctrlKey && !p.metaKey) {
1988
- if (i && l && c && p.key === "+") {
1989
- p.preventDefault(), this._openDropdownWithPlus();
2004
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || r) && (this._handleKeydownEvent = (f) => {
2005
+ if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
2006
+ if (r && a && c && f.key === "+") {
2007
+ f.preventDefault(), this._openDropdownWithPlus();
1990
2008
  return;
1991
2009
  }
1992
- if ($) {
1993
- const w = this.telInput.value, I = w.charAt(0) === "+", S = !I && this.telInput.selectionStart === 0 && p.key === "+", A = /^[0-9]$/.test(p.key), _ = i ? A : S || A, T = w.slice(0, this.telInput.selectionStart) + p.key + w.slice(this.telInput.selectionEnd), G = this._getFullNumber(T), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
2010
+ if (e) {
2011
+ const S = this.telInput.value, _ = S.charAt(0) === "+", b = !_ && this.telInput.selectionStart === 0 && f.key === "+", w = /^[0-9]$/.test(f.key), I = r ? w : b || w, A = S.slice(0, this.telInput.selectionStart) + f.key + S.slice(this.telInput.selectionEnd), G = this._getFullNumber(A), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
1994
2012
  let x = !1;
1995
- if (I) {
2013
+ if (_) {
1996
2014
  const f1 = this.selectedCountryData.iso2;
1997
2015
  x = this._getCountryFromNumber(G) !== f1;
1998
2016
  }
1999
- (!_ || M && !x && !S) && p.preventDefault();
2017
+ (!I || M && !x && !b) && f.preventDefault();
2000
2018
  }
2001
2019
  }
2002
2020
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
2003
2021
  }
2004
2022
  //* Adhere to the input's maxlength attr.
2005
- _cap($) {
2023
+ _cap(e) {
2006
2024
  const n = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2007
- return n && $.length > n ? $.substr(0, n) : $;
2025
+ return n && e.length > n ? e.substr(0, n) : e;
2008
2026
  }
2009
2027
  //* Trigger a custom event on the input.
2010
- _trigger($, n = {}) {
2011
- const i = new CustomEvent($, {
2028
+ _trigger(e, n = {}) {
2029
+ const r = new CustomEvent(e, {
2012
2030
  bubbles: !0,
2013
2031
  cancelable: !0,
2014
2032
  detail: n
2015
2033
  });
2016
- this.telInput.dispatchEvent(i);
2034
+ this.telInput.dispatchEvent(r);
2017
2035
  }
2018
2036
  //* Open the dropdown.
2019
2037
  _openDropdown() {
2020
- const { fixDropdownWidth: $, countrySearch: n } = this.options;
2021
- if ($ && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), n) {
2022
- const i = this.countryList.firstElementChild;
2023
- i && (this._highlightListItem(i, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2038
+ const { fixDropdownWidth: e, countrySearch: n } = this.options;
2039
+ if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), n) {
2040
+ const r = this.countryList.firstElementChild;
2041
+ r && (this._highlightListItem(r, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2024
2042
  }
2025
2043
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2026
2044
  }
2027
2045
  //* Set the dropdown position
2028
2046
  _setDropdownPosition() {
2029
2047
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2030
- const $ = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2031
- this.options.dropdownContainer && (this.dropdown.style.top = `${$.top + n}px`, this.dropdown.style.left = `${$.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2048
+ const e = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2049
+ this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + n}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2032
2050
  }
2033
2051
  }
2034
2052
  //* We only bind dropdown listeners when the dropdown is open.
2035
2053
  _bindDropdownListeners() {
2036
2054
  this._handleMouseoverCountryList = (o) => {
2037
2055
  var c;
2038
- const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2039
- l && this._highlightListItem(l, !1);
2056
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2057
+ a && this._highlightListItem(a, !1);
2040
2058
  }, this.countryList.addEventListener(
2041
2059
  "mouseover",
2042
2060
  this._handleMouseoverCountryList
2043
2061
  ), this._handleClickCountryList = (o) => {
2044
2062
  var c;
2045
- const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2046
- l && this._selectListItem(l);
2063
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2064
+ a && this._selectListItem(a);
2047
2065
  }, this.countryList.addEventListener("click", this._handleClickCountryList);
2048
- let $ = !0;
2066
+ let e = !0;
2049
2067
  this._handleClickOffToClose = () => {
2050
- $ || this._closeDropdown(), $ = !1;
2068
+ e || this._closeDropdown(), e = !1;
2051
2069
  }, document.documentElement.addEventListener(
2052
2070
  "click",
2053
2071
  this._handleClickOffToClose
2054
2072
  );
2055
- let n = "", i = null;
2073
+ let n = "", r = null;
2056
2074
  if (this._handleKeydownOnDropdown = (o) => {
2057
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), i && clearTimeout(i), n += o.key.toLowerCase(), this._searchForCountry(n), i = setTimeout(() => {
2075
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), r && clearTimeout(r), n += o.key.toLowerCase(), this._searchForCountry(n), r = setTimeout(() => {
2058
2076
  n = "";
2059
2077
  }, 1e3));
2060
2078
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
@@ -2062,50 +2080,50 @@ class K2 {
2062
2080
  const c = this.searchInput.value.trim();
2063
2081
  c ? this._filterCountries(c) : this._filterCountries("", !0);
2064
2082
  };
2065
- let l = null;
2083
+ let a = null;
2066
2084
  this._handleSearchChange = () => {
2067
- l && clearTimeout(l), l = setTimeout(() => {
2068
- o(), l = null;
2085
+ a && clearTimeout(a), a = setTimeout(() => {
2086
+ o(), a = null;
2069
2087
  }, 100);
2070
2088
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
2071
2089
  }
2072
2090
  }
2073
2091
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2074
- _searchForCountry($) {
2092
+ _searchForCountry(e) {
2075
2093
  for (let n = 0; n < this.countries.length; n++) {
2076
- const i = this.countries[n];
2077
- if (i.name.substr(0, $.length).toLowerCase() === $) {
2078
- const l = i.nodeById[this.id];
2079
- this._highlightListItem(l, !1), this._scrollTo(l);
2094
+ const r = this.countries[n];
2095
+ if (r.name.substr(0, e.length).toLowerCase() === e) {
2096
+ const a = r.nodeById[this.id];
2097
+ this._highlightListItem(a, !1), this._scrollTo(a);
2080
2098
  break;
2081
2099
  }
2082
2100
  }
2083
2101
  }
2084
2102
  //* Country search enabled: Filter the countries according to the search query.
2085
- _filterCountries($, n = !1) {
2086
- let i = !0;
2103
+ _filterCountries(e, n = !1) {
2104
+ let r = !0;
2087
2105
  this.countryList.innerHTML = "";
2088
- const o = s2($);
2089
- for (let l = 0; l < this.countries.length; l++) {
2090
- const c = this.countries[l], f = s2(c.name), p = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((I) => I[0]).join("").toLowerCase(), w = `+${c.dialCode}`;
2091
- if (n || f.includes(o) || w.includes(o) || c.iso2.includes(o) || p.includes(o)) {
2092
- const I = c.nodeById[this.id];
2093
- I && this.countryList.appendChild(I), i && (this._highlightListItem(I, !1), i = !1);
2106
+ const o = s2(e);
2107
+ for (let a = 0; a < this.countries.length; a++) {
2108
+ const c = this.countries[a], g = s2(c.name), f = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((_) => _[0]).join("").toLowerCase(), S = `+${c.dialCode}`;
2109
+ if (n || g.includes(o) || S.includes(o) || c.iso2.includes(o) || f.includes(o)) {
2110
+ const _ = c.nodeById[this.id];
2111
+ _ && this.countryList.appendChild(_), r && (this._highlightListItem(_, !1), r = !1);
2094
2112
  }
2095
2113
  }
2096
- i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2114
+ r && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2097
2115
  }
2098
2116
  //* Update search results text (for a11y).
2099
2117
  _updateSearchResultsText() {
2100
- const { i18n: $ } = this.options, n = this.countryList.childElementCount;
2101
- let i;
2102
- n === 0 ? i = $.zeroSearchResults : n === 1 ? i = $.oneSearchResult : i = $.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = i;
2118
+ const { i18n: e } = this.options, n = this.countryList.childElementCount;
2119
+ let r;
2120
+ n === 0 ? r = e.zeroSearchResults : n === 1 ? r = e.oneSearchResult : r = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = r;
2103
2121
  }
2104
2122
  //* Highlight the next/prev item in the list (and ensure it is visible).
2105
- _handleUpDownKey($) {
2106
- var i, o;
2107
- let n = $ === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2108
- !n && this.countryList.childElementCount > 1 && (n = $ === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2123
+ _handleUpDownKey(e) {
2124
+ var r, o;
2125
+ let n = e === "ArrowUp" ? (r = this.highlightedItem) == null ? void 0 : r.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2126
+ !n && this.countryList.childElementCount > 1 && (n = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2109
2127
  }
2110
2128
  //* Select the currently highlighted item.
2111
2129
  _handleEnterKey() {
@@ -2113,10 +2131,10 @@ class K2 {
2113
2131
  }
2114
2132
  //* Update the input's value to the given val (format first if possible)
2115
2133
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2116
- _updateValFromNumber($) {
2117
- let n = $;
2134
+ _updateValFromNumber(e) {
2135
+ let n = e;
2118
2136
  if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2119
- const i = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, c = i ? o : l;
2137
+ const r = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = C.utils.numberFormat, c = r ? o : a;
2120
2138
  n = C.utils.formatNumber(
2121
2139
  n,
2122
2140
  this.selectedCountryData.iso2,
@@ -2127,41 +2145,45 @@ class K2 {
2127
2145
  }
2128
2146
  //* Check if need to select a new country based on the given number
2129
2147
  //* Note: called from _setInitialState, keyup handler, setNumber.
2130
- _updateCountryFromNumber($) {
2131
- const n = this._getCountryFromNumber($);
2148
+ _updateCountryFromNumber(e) {
2149
+ const n = this._getCountryFromNumber(e);
2132
2150
  return n !== null ? this._setCountry(n) : !1;
2133
2151
  }
2134
- //* Check if the given number matches an area code from the selected country.
2135
- _isAreaCodeMatch($, n) {
2136
- const { areaCodes: i, partialAreaCodes: o, dialCode: l } = this.selectedCountryData, c = $.substring(l.length), f = n.substring(l.length);
2137
- return !!(i.includes(f) || o.includes(c));
2138
- }
2139
- _getCountryFromNumber($) {
2140
- const n = $.indexOf("+");
2141
- let i = n ? $.substring(n) : $;
2142
- const o = this.selectedCountryData.dialCode;
2143
- i && o === "1" && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = `1${i}`), i = `+${i}`), this.options.separateDialCode && o && i.charAt(0) !== "+" && (i = `+${o}${i}`);
2144
- const c = this._getDialCode(i, !0), f = c1(i);
2152
+ _ensureHasDialCode(e) {
2153
+ const { dialCode: n, nationalPrefix: r } = this.selectedCountryData;
2154
+ if (e.charAt(0) === "+" || !n)
2155
+ return e;
2156
+ const c = r && e.charAt(0) === r && !this.options.separateDialCode ? e.substring(1) : e;
2157
+ return `+${n}${c}`;
2158
+ }
2159
+ _getCountryFromNumber(e) {
2160
+ const n = e.indexOf("+");
2161
+ let r = n ? e.substring(n) : e;
2162
+ const o = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
2163
+ r = this._ensureHasDialCode(r);
2164
+ const c = this._getDialCode(r, !0), g = c1(r);
2145
2165
  if (c) {
2146
- const p = c1(c), w = this.dialCodeToIso2Map[p], I = this.selectedCountryData.iso2 && w.includes(this.selectedCountryData.iso2);
2147
- let S = !1;
2148
- if (I && (this.selectedCountryData.areaCodes && f.length > o.length ? S = this._isAreaCodeMatch(f, p) : S = !0), !(o === "1" && o2(f)) && (!I || !S)) {
2149
- for (let _ = 0; _ < w.length; _++)
2150
- if (w[_])
2151
- return w[_];
2166
+ const f = c1(c), S = this.dialCodeToIso2Map[f];
2167
+ if (!o && this.defaultCountry && S.includes(this.defaultCountry))
2168
+ return this.defaultCountry;
2169
+ const _ = o && S.includes(o) && (g.length === f.length || !this.selectedCountryData.areaCodes);
2170
+ if (!(a === "1" && o2(g)) && !_) {
2171
+ for (let w = 0; w < S.length; w++)
2172
+ if (S[w])
2173
+ return S[w];
2152
2174
  }
2153
2175
  } else {
2154
- if (i.charAt(0) === "+" && f.length)
2176
+ if (r.charAt(0) === "+" && g.length)
2155
2177
  return "";
2156
- if ((!i || i === "+") && !this.selectedCountryData.iso2)
2178
+ if ((!r || r === "+") && !this.selectedCountryData.iso2)
2157
2179
  return this.defaultCountry;
2158
2180
  }
2159
2181
  return null;
2160
2182
  }
2161
2183
  //* Remove highlighting from other list items and highlight the given item.
2162
- _highlightListItem($, n) {
2163
- const i = this.highlightedItem;
2164
- if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = $, this.highlightedItem) {
2184
+ _highlightListItem(e, n) {
2185
+ const r = this.highlightedItem;
2186
+ if (r && (r.classList.remove("iti__highlight"), r.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2165
2187
  this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true");
2166
2188
  const o = this.highlightedItem.getAttribute("id") || "";
2167
2189
  this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
@@ -2170,27 +2192,27 @@ class K2 {
2170
2192
  }
2171
2193
  //* Find the country data for the given iso2 code
2172
2194
  //* the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
2173
- _getCountryData($, n) {
2174
- for (let i = 0; i < this.countries.length; i++)
2175
- if (this.countries[i].iso2 === $)
2176
- return this.countries[i];
2195
+ _getCountryData(e, n) {
2196
+ for (let r = 0; r < this.countries.length; r++)
2197
+ if (this.countries[r].iso2 === e)
2198
+ return this.countries[r];
2177
2199
  if (n)
2178
2200
  return null;
2179
- throw new Error(`No country data for '${$}'`);
2201
+ throw new Error(`No country data for '${e}'`);
2180
2202
  }
2181
2203
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2182
2204
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2183
- _setCountry($) {
2184
- const { separateDialCode: n, showFlags: i, i18n: o } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2185
- if (this.selectedCountryData = $ ? this._getCountryData($, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2186
- let c = "", f = "";
2187
- $ && i ? (c = `iti__flag iti__${$}`, f = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", f = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = f;
2205
+ _setCountry(e) {
2206
+ const { separateDialCode: n, showFlags: r, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2207
+ if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2208
+ let c = "", g = "";
2209
+ e && r ? (c = `iti__flag iti__${e}`, g = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", g = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = g;
2188
2210
  }
2189
- if (this._setSelectedCountryTitleAttribute($, n), n) {
2211
+ if (this._setSelectedCountryTitleAttribute(e, n), n) {
2190
2212
  const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2191
2213
  this.selectedDialCode.innerHTML = c, this._updateInputPadding();
2192
2214
  }
2193
- return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== $;
2215
+ return this._updatePlaceholder(), this._updateMaxLength(), a.iso2 !== e;
2194
2216
  }
2195
2217
  //* Update the input padding to make space for the selected country/dial code.
2196
2218
  _updateInputPadding() {
@@ -2201,28 +2223,28 @@ class K2 {
2201
2223
  }
2202
2224
  //* Update the maximum valid number length for the currently selected country.
2203
2225
  _updateMaxLength() {
2204
- const { strictMode: $, placeholderNumberType: n, validationNumberTypes: i } = this.options, { iso2: o } = this.selectedCountryData;
2205
- if ($ && C.utils)
2226
+ const { strictMode: e, placeholderNumberType: n, validationNumberTypes: r } = this.options, { iso2: o } = this.selectedCountryData;
2227
+ if (e && C.utils)
2206
2228
  if (o) {
2207
- const l = C.utils.numberType[n];
2229
+ const a = C.utils.numberType[n];
2208
2230
  let c = C.utils.getExampleNumber(
2209
2231
  o,
2210
2232
  !1,
2211
- l,
2233
+ a,
2212
2234
  !0
2213
- ), f = c;
2214
- for (; C.utils.isPossibleNumber(c, o, i); )
2215
- f = c, c += "0";
2216
- const p = C.utils.getCoreNumber(f, o);
2217
- this.maxCoreNumberLength = p.length, o === "by" && (this.maxCoreNumberLength = p.length + 1);
2235
+ ), g = c;
2236
+ for (; C.utils.isPossibleNumber(c, o, r); )
2237
+ g = c, c += "0";
2238
+ const f = C.utils.getCoreNumber(g, o);
2239
+ this.maxCoreNumberLength = f.length, o === "by" && (this.maxCoreNumberLength = f.length + 1);
2218
2240
  } else
2219
2241
  this.maxCoreNumberLength = null;
2220
2242
  }
2221
- _setSelectedCountryTitleAttribute($ = null, n) {
2243
+ _setSelectedCountryTitleAttribute(e = null, n) {
2222
2244
  if (!this.selectedCountry)
2223
2245
  return;
2224
- let i;
2225
- $ && !n ? i = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : $ ? i = this.selectedCountryData.name : i = "Unknown", this.selectedCountry.setAttribute("title", i);
2246
+ let r;
2247
+ e && !n ? r = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? r = this.selectedCountryData.name : r = "Unknown", this.selectedCountry.setAttribute("title", r);
2226
2248
  }
2227
2249
  //* When the input is in a hidden container during initialisation, we must inject some markup
2228
2250
  //* into the end of the DOM to calculate the correct offsetWidth.
@@ -2230,41 +2252,41 @@ class K2 {
2230
2252
  //* will definitely exist.
2231
2253
  _getHiddenSelectedCountryWidth() {
2232
2254
  if (this.telInput.parentNode) {
2233
- const $ = this.telInput.parentNode.cloneNode(!1);
2234
- $.style.visibility = "hidden", document.body.appendChild($);
2255
+ const e = this.telInput.parentNode.cloneNode(!1);
2256
+ e.style.visibility = "hidden", document.body.appendChild(e);
2235
2257
  const n = this.countryContainer.cloneNode();
2236
- $.appendChild(n);
2237
- const i = this.selectedCountry.cloneNode(!0);
2238
- n.appendChild(i);
2239
- const o = i.offsetWidth;
2240
- return document.body.removeChild($), o;
2258
+ e.appendChild(n);
2259
+ const r = this.selectedCountry.cloneNode(!0);
2260
+ n.appendChild(r);
2261
+ const o = r.offsetWidth;
2262
+ return document.body.removeChild(e), o;
2241
2263
  }
2242
2264
  return 0;
2243
2265
  }
2244
2266
  //* Update the input placeholder to an example number from the currently selected country.
2245
2267
  _updatePlaceholder() {
2246
2268
  const {
2247
- autoPlaceholder: $,
2269
+ autoPlaceholder: e,
2248
2270
  placeholderNumberType: n,
2249
- nationalMode: i,
2271
+ nationalMode: r,
2250
2272
  customPlaceholder: o
2251
- } = this.options, l = $ === "aggressive" || !this.hadInitialPlaceholder && $ === "polite";
2252
- if (C.utils && l) {
2273
+ } = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2274
+ if (C.utils && a) {
2253
2275
  const c = C.utils.numberType[n];
2254
- let f = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2276
+ let g = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2255
2277
  this.selectedCountryData.iso2,
2256
- i,
2278
+ r,
2257
2279
  c
2258
2280
  ) : "";
2259
- f = this._beforeSetNumber(f), typeof o == "function" && (f = o(f, this.selectedCountryData)), this.telInput.setAttribute("placeholder", f);
2281
+ g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
2260
2282
  }
2261
2283
  }
2262
2284
  //* Called when the user selects a list item from the dropdown.
2263
- _selectListItem($) {
2285
+ _selectListItem(e) {
2264
2286
  const n = this._setCountry(
2265
- $.getAttribute("data-country-code")
2287
+ e.getAttribute("data-country-code")
2266
2288
  );
2267
- this._closeDropdown(), this._updateDialCode($.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2289
+ this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2268
2290
  }
2269
2291
  //* Close the dropdown and unbind any listeners.
2270
2292
  _closeDropdown() {
@@ -2277,38 +2299,38 @@ class K2 {
2277
2299
  ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown");
2278
2300
  }
2279
2301
  //* Check if an element is visible within it's container, else scroll until it is.
2280
- _scrollTo($) {
2281
- const n = this.countryList, i = document.documentElement.scrollTop, o = n.offsetHeight, l = n.getBoundingClientRect().top + i, c = l + o, f = $.offsetHeight, p = $.getBoundingClientRect().top + i, w = p + f, I = p - l + n.scrollTop;
2282
- if (p < l)
2283
- n.scrollTop = I;
2284
- else if (w > c) {
2285
- const S = o - f;
2286
- n.scrollTop = I - S;
2302
+ _scrollTo(e) {
2303
+ const n = this.countryList, r = document.documentElement.scrollTop, o = n.offsetHeight, a = n.getBoundingClientRect().top + r, c = a + o, g = e.offsetHeight, f = e.getBoundingClientRect().top + r, S = f + g, _ = f - a + n.scrollTop;
2304
+ if (f < a)
2305
+ n.scrollTop = _;
2306
+ else if (S > c) {
2307
+ const b = o - g;
2308
+ n.scrollTop = _ - b;
2287
2309
  }
2288
2310
  }
2289
2311
  //* Replace any existing dial code with the new one
2290
2312
  //* Note: called from _selectListItem and setCountry
2291
- _updateDialCode($) {
2292
- const n = this.telInput.value, i = `+${$}`;
2313
+ _updateDialCode(e) {
2314
+ const n = this.telInput.value, r = `+${e}`;
2293
2315
  let o;
2294
2316
  if (n.charAt(0) === "+") {
2295
- const l = this._getDialCode(n);
2296
- l ? o = n.replace(l, i) : o = i, this.telInput.value = o;
2317
+ const a = this._getDialCode(n);
2318
+ a ? o = n.replace(a, r) : o = r, this.telInput.value = o;
2297
2319
  }
2298
2320
  }
2299
2321
  //* Try and extract a valid international dial code from a full telephone number.
2300
2322
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2301
- _getDialCode($, n) {
2302
- let i = "";
2303
- if ($.charAt(0) === "+") {
2323
+ _getDialCode(e, n) {
2324
+ let r = "";
2325
+ if (e.charAt(0) === "+") {
2304
2326
  let o = "";
2305
- for (let l = 0; l < $.length; l++) {
2306
- const c = $.charAt(l);
2327
+ for (let a = 0; a < e.length; a++) {
2328
+ const c = e.charAt(a);
2307
2329
  if (!isNaN(parseInt(c, 10))) {
2308
2330
  if (o += c, n)
2309
- this.dialCodeToIso2Map[o] && (i = $.substr(0, l + 1));
2331
+ this.dialCodeToIso2Map[o] && (r = e.substr(0, a + 1));
2310
2332
  else if (this.dialCodes[o]) {
2311
- i = $.substr(0, l + 1);
2333
+ r = e.substr(0, a + 1);
2312
2334
  break;
2313
2335
  }
2314
2336
  if (o.length === this.dialCodeMaxLen)
@@ -2316,23 +2338,23 @@ class K2 {
2316
2338
  }
2317
2339
  }
2318
2340
  }
2319
- return i;
2341
+ return r;
2320
2342
  }
2321
2343
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2322
- _getFullNumber($) {
2323
- const n = $ || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2344
+ _getFullNumber(e) {
2345
+ const n = e || this.telInput.value.trim(), { dialCode: r } = this.selectedCountryData;
2324
2346
  let o;
2325
- const l = c1(n);
2326
- return this.options.separateDialCode && n.charAt(0) !== "+" && i && l ? o = `+${i}` : o = "", o + n;
2347
+ const a = c1(n);
2348
+ return this.options.separateDialCode && n.charAt(0) !== "+" && r && a ? o = `+${r}` : o = "", o + n;
2327
2349
  }
2328
2350
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2329
- _beforeSetNumber($) {
2330
- let n = $;
2351
+ _beforeSetNumber(e) {
2352
+ let n = e;
2331
2353
  if (this.options.separateDialCode) {
2332
- let i = this._getDialCode(n);
2333
- if (i) {
2334
- i = `+${this.selectedCountryData.dialCode}`;
2335
- const o = n[i.length] === " " || n[i.length] === "-" ? i.length + 1 : i.length;
2354
+ let r = this._getDialCode(n);
2355
+ if (r) {
2356
+ r = `+${this.selectedCountryData.dialCode}`;
2357
+ const o = n[r.length] === " " || n[r.length] === "-" ? r.length + 1 : r.length;
2336
2358
  n = n.substr(o);
2337
2359
  }
2338
2360
  }
@@ -2344,8 +2366,8 @@ class K2 {
2344
2366
  }
2345
2367
  //* Format the number as the user types.
2346
2368
  _formatNumberAsYouType() {
2347
- const $ = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType($, this.selectedCountryData.iso2) : $, { dialCode: i } = this.selectedCountryData;
2348
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${i}`) ? (n.split(`+${i}`)[1] || "").trim() : n;
2369
+ const e = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: r } = this.selectedCountryData;
2370
+ return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${r}`) ? (n.split(`+${r}`)[1] || "").trim() : n;
2349
2371
  }
2350
2372
  //**************************
2351
2373
  //* SECRET PUBLIC METHODS
@@ -2363,9 +2385,9 @@ class K2 {
2363
2385
  //********************
2364
2386
  //* Remove plugin.
2365
2387
  destroy() {
2366
- var l, c;
2367
- const { allowDropdown: $, separateDialCode: n } = this.options;
2368
- if ($) {
2388
+ var a, c;
2389
+ const { allowDropdown: e, separateDialCode: n } = this.options;
2390
+ if (e) {
2369
2391
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2370
2392
  "click",
2371
2393
  this._handleClickSelectedCountry
@@ -2373,13 +2395,13 @@ class K2 {
2373
2395
  "keydown",
2374
2396
  this._handleCountryContainerKeydown
2375
2397
  );
2376
- const f = this.telInput.closest("label");
2377
- f && f.removeEventListener("click", this._handleLabelClick);
2398
+ const g = this.telInput.closest("label");
2399
+ g && g.removeEventListener("click", this._handleLabelClick);
2378
2400
  }
2379
- const { form: i } = this.telInput;
2380
- this._handleHiddenInputSubmit && i && i.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"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2401
+ const { form: r } = this.telInput;
2402
+ this._handleHiddenInputSubmit && r && r.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"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2381
2403
  const o = this.telInput.parentNode;
2382
- (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
2404
+ (a = o == null ? void 0 : o.parentNode) == null || a.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
2383
2405
  }
2384
2406
  //* Get the extension from the current number.
2385
2407
  getExtension() {
@@ -2389,13 +2411,13 @@ class K2 {
2389
2411
  ) : "";
2390
2412
  }
2391
2413
  //* Format the number to the given format.
2392
- getNumber($) {
2414
+ getNumber(e) {
2393
2415
  if (C.utils) {
2394
2416
  const { iso2: n } = this.selectedCountryData;
2395
2417
  return C.utils.formatNumber(
2396
2418
  this._getFullNumber(),
2397
2419
  n,
2398
- $
2420
+ e
2399
2421
  );
2400
2422
  }
2401
2423
  return "";
@@ -2414,8 +2436,8 @@ class K2 {
2414
2436
  //* Get the validation error.
2415
2437
  getValidationError() {
2416
2438
  if (C.utils) {
2417
- const { iso2: $ } = this.selectedCountryData;
2418
- return C.utils.getValidationError(this._getFullNumber(), $);
2439
+ const { iso2: e } = this.selectedCountryData;
2440
+ return C.utils.getValidationError(this._getFullNumber(), e);
2419
2441
  }
2420
2442
  return -99;
2421
2443
  }
@@ -2423,127 +2445,127 @@ class K2 {
2423
2445
  isValidNumber() {
2424
2446
  if (!this.selectedCountryData.iso2)
2425
2447
  return !1;
2426
- const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
2448
+ const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2427
2449
  if (n > -1) {
2428
- const i = $.substring(0, n), o = this._utilsIsPossibleNumber(i), l = this._utilsIsPossibleNumber($);
2429
- return o && l;
2450
+ const r = e.substring(0, n), o = this._utilsIsPossibleNumber(r), a = this._utilsIsPossibleNumber(e);
2451
+ return o && a;
2430
2452
  }
2431
- return this._utilsIsPossibleNumber($);
2453
+ return this._utilsIsPossibleNumber(e);
2432
2454
  }
2433
- _utilsIsPossibleNumber($) {
2434
- return C.utils ? C.utils.isPossibleNumber($, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2455
+ _utilsIsPossibleNumber(e) {
2456
+ return C.utils ? C.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2435
2457
  }
2436
2458
  //* Validate the input val (precise)
2437
2459
  isValidNumberPrecise() {
2438
2460
  if (!this.selectedCountryData.iso2)
2439
2461
  return !1;
2440
- const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
2462
+ const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2441
2463
  if (n > -1) {
2442
- const i = $.substring(0, n), o = this._utilsIsValidNumber(i), l = this._utilsIsValidNumber($);
2443
- return o && l;
2464
+ const r = e.substring(0, n), o = this._utilsIsValidNumber(r), a = this._utilsIsValidNumber(e);
2465
+ return o && a;
2444
2466
  }
2445
- return this._utilsIsValidNumber($);
2467
+ return this._utilsIsValidNumber(e);
2446
2468
  }
2447
- _utilsIsValidNumber($) {
2448
- return C.utils ? C.utils.isValidNumber($, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2469
+ _utilsIsValidNumber(e) {
2470
+ return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2449
2471
  }
2450
2472
  //* Update the selected country, and update the input val accordingly.
2451
- setCountry($) {
2452
- const n = $ == null ? void 0 : $.toLowerCase(), i = this.selectedCountryData.iso2;
2453
- ($ && n !== i || !$ && i) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2473
+ setCountry(e) {
2474
+ const n = e == null ? void 0 : e.toLowerCase(), r = this.selectedCountryData.iso2;
2475
+ (e && n !== r || !e && r) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2454
2476
  }
2455
2477
  //* Set the input value and update the country.
2456
- setNumber($) {
2457
- const n = this._updateCountryFromNumber($);
2458
- this._updateValFromNumber($), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2478
+ setNumber(e) {
2479
+ const n = this._updateCountryFromNumber(e);
2480
+ this._updateValFromNumber(e), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2459
2481
  }
2460
2482
  //* Set the placeholder number typ
2461
- setPlaceholderNumberType($) {
2462
- this.options.placeholderNumberType = $, this._updatePlaceholder();
2483
+ setPlaceholderNumberType(e) {
2484
+ this.options.placeholderNumberType = e, this._updatePlaceholder();
2463
2485
  }
2464
- setDisabled($) {
2465
- this.telInput.disabled = $, $ ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2486
+ setDisabled(e) {
2487
+ this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2466
2488
  }
2467
2489
  }
2468
2490
  const H2 = (y) => {
2469
2491
  if (!C.utils && !C.startedLoadingUtilsScript) {
2470
- let $;
2492
+ let e;
2471
2493
  if (typeof y == "function")
2472
2494
  try {
2473
- $ = Promise.resolve(y());
2495
+ e = Promise.resolve(y());
2474
2496
  } catch (n) {
2475
2497
  return Promise.reject(n);
2476
2498
  }
2477
2499
  else
2478
2500
  return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof y}`));
2479
- return C.startedLoadingUtilsScript = !0, $.then((n) => {
2480
- const i = n == null ? void 0 : n.default;
2481
- if (!i || typeof i != "object")
2501
+ return C.startedLoadingUtilsScript = !0, e.then((n) => {
2502
+ const r = n == null ? void 0 : n.default;
2503
+ if (!r || typeof r != "object")
2482
2504
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2483
- return C.utils = i, $1("handleUtils"), !0;
2505
+ return C.utils = r, $1("handleUtils"), !0;
2484
2506
  }).catch((n) => {
2485
2507
  throw $1("rejectUtilsScriptPromise", n), n;
2486
2508
  });
2487
2509
  }
2488
2510
  return null;
2489
2511
  }, C = Object.assign(
2490
- (y, $) => {
2491
- const n = new K2(y, $);
2512
+ (y, e) => {
2513
+ const n = new K2(y, e);
2492
2514
  return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), C.instances[n.id] = n, n;
2493
2515
  },
2494
2516
  {
2495
- defaults: a2,
2517
+ defaults: l2,
2496
2518
  //* Using a static var like this allows us to mock it in the tests.
2497
2519
  documentReady: () => document.readyState === "complete",
2498
2520
  //* Get the country data object.
2499
2521
  getCountryData: () => W,
2500
2522
  //* A getter for the plugin instance.
2501
2523
  getInstance: (y) => {
2502
- const $ = y.getAttribute("data-intl-tel-input-id");
2503
- return $ ? C.instances[$] : null;
2524
+ const e = y.getAttribute("data-intl-tel-input-id");
2525
+ return e ? C.instances[e] : null;
2504
2526
  },
2505
2527
  //* A map from instance ID to instance object.
2506
2528
  instances: {},
2507
2529
  attachUtils: H2,
2508
2530
  startedLoadingUtilsScript: !1,
2509
2531
  startedLoadingAutoCountry: !1,
2510
- version: "25.0.2"
2532
+ version: "25.1.1"
2511
2533
  }
2512
2534
  );
2513
2535
  (function() {
2514
2536
  var y = this || self;
2515
- function $(d, t) {
2537
+ function e(d, t) {
2516
2538
  d = d.split(".");
2517
- var e = y;
2518
- d[0] in e || typeof e.execScript > "u" || e.execScript("var " + d[0]);
2519
- for (var r; d.length && (r = d.shift()); ) d.length || t === void 0 ? e[r] && e[r] !== Object.prototype[r] ? e = e[r] : e = e[r] = {} : e[r] = t;
2539
+ var $ = y;
2540
+ d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2541
+ for (var i; d.length && (i = d.shift()); ) d.length || t === void 0 ? $[i] && $[i] !== Object.prototype[i] ? $ = $[i] : $ = $[i] = {} : $[i] = t;
2520
2542
  }
2521
2543
  function n(d, t) {
2522
- function e() {
2544
+ function $() {
2523
2545
  }
2524
- e.prototype = t.prototype, d.ma = t.prototype, d.prototype = new e(), d.prototype.constructor = d, d.sa = function(r, s, u) {
2525
- for (var a = Array(arguments.length - 2), h = 2; h < arguments.length; h++) a[h - 2] = arguments[h];
2526
- return t.prototype[s].apply(r, a);
2546
+ $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(i, s, u) {
2547
+ for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
2548
+ return t.prototype[s].apply(i, l);
2527
2549
  };
2528
2550
  }
2529
- function i(d) {
2551
+ function r(d) {
2530
2552
  const t = [];
2531
- let e = 0;
2532
- for (const r in d) t[e++] = d[r];
2553
+ let $ = 0;
2554
+ for (const i in d) t[$++] = d[i];
2533
2555
  return t;
2534
2556
  }
2535
2557
  var o = class {
2536
2558
  constructor(d) {
2537
- if (l !== l) throw Error("SafeUrl is not meant to be built directly");
2559
+ if (a !== a) throw Error("SafeUrl is not meant to be built directly");
2538
2560
  this.g = d;
2539
2561
  }
2540
2562
  toString() {
2541
2563
  return this.g.toString();
2542
2564
  }
2543
- }, l = {};
2565
+ }, a = {};
2544
2566
  new o("about:invalid#zClosurez"), new o("about:blank");
2545
2567
  const c = {};
2546
- class f {
2568
+ class g {
2547
2569
  constructor() {
2548
2570
  if (c !== c) throw Error("SafeStyle is not meant to be built directly");
2549
2571
  }
@@ -2551,52 +2573,52 @@ const H2 = (y) => {
2551
2573
  return "";
2552
2574
  }
2553
2575
  }
2554
- new f();
2555
- const p = {};
2556
- class w {
2576
+ new g();
2577
+ const f = {};
2578
+ class S {
2557
2579
  constructor() {
2558
- if (p !== p) throw Error("SafeStyleSheet is not meant to be built directly");
2580
+ if (f !== f) throw Error("SafeStyleSheet is not meant to be built directly");
2559
2581
  }
2560
2582
  toString() {
2561
2583
  return "";
2562
2584
  }
2563
2585
  }
2564
- new w();
2565
- const I = {};
2566
- class S {
2586
+ new S();
2587
+ const _ = {};
2588
+ class b {
2567
2589
  constructor() {
2568
2590
  var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2569
- if (I !== I) throw Error("SafeHtml is not meant to be built directly");
2591
+ if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
2570
2592
  this.g = t;
2571
2593
  }
2572
2594
  toString() {
2573
2595
  return this.g.toString();
2574
2596
  }
2575
2597
  }
2576
- new S();
2577
- function A(d, t) {
2598
+ new b();
2599
+ function w(d, t) {
2578
2600
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2579
2601
  case G:
2580
2602
  case F:
2581
2603
  case M:
2582
2604
  case x:
2583
2605
  case f1:
2584
- case T:
2585
- case _:
2606
+ case A:
2607
+ case I:
2586
2608
  this.o = !0;
2587
2609
  }
2588
2610
  this.j = t.defaultValue;
2589
2611
  }
2590
- var _ = 1, T = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
2612
+ var I = 1, A = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
2591
2613
  function v1(d, t) {
2592
2614
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2593
- var e = t[d];
2594
- this.g[e.g] = e;
2615
+ var $ = t[d];
2616
+ this.g[$.g] = $;
2595
2617
  }
2596
2618
  }
2597
- function l2(d) {
2598
- return d = i(d.g), d.sort(function(t, e) {
2599
- return t.g - e.g;
2619
+ function a2(d) {
2620
+ return d = r(d.g), d.sort(function(t, $) {
2621
+ return t.g - $.g;
2600
2622
  }), d;
2601
2623
  }
2602
2624
  function R() {
@@ -2605,22 +2627,22 @@ const H2 = (y) => {
2605
2627
  R.prototype.has = function(d) {
2606
2628
  return B(this, d.g);
2607
2629
  }, R.prototype.get = function(d, t) {
2608
- return g(this, d.g, t);
2630
+ return p(this, d.g, t);
2609
2631
  }, R.prototype.set = function(d, t) {
2610
2632
  E(this, d.g, t);
2611
2633
  }, R.prototype.add = function(d, t) {
2612
2634
  w1(this, d.g, t);
2613
2635
  };
2614
2636
  function S1(d, t) {
2615
- for (var e = l2(d.m()), r = 0; r < e.length; r++) {
2616
- var s = e[r], u = s.g;
2637
+ for (var $ = a2(d.m()), i = 0; i < $.length; i++) {
2638
+ var s = $[i], u = s.g;
2617
2639
  if (B(t, u)) {
2618
2640
  d.g && delete d.g[s.g];
2619
- var a = s.h == 11 || s.h == 10;
2641
+ var l = s.h == 11 || s.h == 10;
2620
2642
  if (s.l) {
2621
2643
  s = P(t, u);
2622
- for (var h = 0; h < s.length; h++) w1(d, u, a ? s[h].clone() : s[h]);
2623
- } else s = n1(t, u), a ? (a = n1(d, u)) ? S1(a, s) : E(d, u, s.clone()) : E(d, u, s);
2644
+ for (var h = 0; h < s.length; h++) w1(d, u, l ? s[h].clone() : s[h]);
2645
+ } else s = n1(t, u), l ? (l = n1(d, u)) ? S1(l, s) : E(d, u, s.clone()) : E(d, u, s);
2624
2646
  }
2625
2647
  }
2626
2648
  }
@@ -2632,27 +2654,27 @@ const H2 = (y) => {
2632
2654
  return d.h[t] != null;
2633
2655
  }
2634
2656
  function n1(d, t) {
2635
- var e = d.h[t];
2636
- if (e == null) return null;
2657
+ var $ = d.h[t];
2658
+ if ($ == null) return null;
2637
2659
  if (d.l) {
2638
2660
  if (!(t in d.g)) {
2639
- var r = d.l, s = d.j[t];
2640
- if (e != null) if (s.l) {
2641
- for (var u = [], a = 0; a < e.length; a++) u[a] = r.h(s, e[a]);
2642
- e = u;
2643
- } else e = r.h(s, e);
2644
- return d.g[t] = e;
2661
+ var i = d.l, s = d.j[t];
2662
+ if ($ != null) if (s.l) {
2663
+ for (var u = [], l = 0; l < $.length; l++) u[l] = i.h(s, $[l]);
2664
+ $ = u;
2665
+ } else $ = i.h(s, $);
2666
+ return d.g[t] = $;
2645
2667
  }
2646
2668
  return d.g[t];
2647
2669
  }
2648
- return e;
2670
+ return $;
2649
2671
  }
2650
- function g(d, t, e) {
2651
- var r = n1(d, t);
2652
- return d.j[t].l ? r[e || 0] : r;
2672
+ function p(d, t, $) {
2673
+ var i = n1(d, t);
2674
+ return d.j[t].l ? i[$ || 0] : i;
2653
2675
  }
2654
2676
  function v(d, t) {
2655
- if (B(d, t)) d = g(d, t);
2677
+ if (B(d, t)) d = p(d, t);
2656
2678
  else d: {
2657
2679
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2658
2680
  else if (t === Number) d.j = 0;
@@ -2671,16 +2693,16 @@ const H2 = (y) => {
2671
2693
  function K(d, t) {
2672
2694
  return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
2673
2695
  }
2674
- function E(d, t, e) {
2675
- d.h[t] = e, d.g && (d.g[t] = e);
2696
+ function E(d, t, $) {
2697
+ d.h[t] = $, d.g && (d.g[t] = $);
2676
2698
  }
2677
- function w1(d, t, e) {
2678
- d.h[t] || (d.h[t] = []), d.h[t].push(e), d.g && delete d.g[t];
2699
+ function w1(d, t, $) {
2700
+ d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2679
2701
  }
2680
2702
  function i1(d, t) {
2681
- var e = [], r;
2682
- for (r in t) r != 0 && e.push(new A(r, t[r]));
2683
- return new v1(d, e);
2703
+ var $ = [], i;
2704
+ for (i in t) i != 0 && $.push(new w(i, t[i]));
2705
+ return new v1(d, $);
2684
2706
  }
2685
2707
  function r1() {
2686
2708
  }
@@ -2708,63 +2730,63 @@ const H2 = (y) => {
2708
2730
  }, q.prototype.g = function(d, t) {
2709
2731
  return q.ma.g.call(this, d, t);
2710
2732
  };
2711
- function L(d, t) {
2733
+ function N(d, t) {
2712
2734
  d != null && this.g.apply(this, arguments);
2713
2735
  }
2714
- L.prototype.h = "", L.prototype.set = function(d) {
2736
+ N.prototype.h = "", N.prototype.set = function(d) {
2715
2737
  this.h = "" + d;
2716
- }, L.prototype.g = function(d, t, e) {
2717
- if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
2738
+ }, N.prototype.g = function(d, t, $) {
2739
+ if (this.h += String(d), t != null) for (let i = 1; i < arguments.length; i++) this.h += arguments[i];
2718
2740
  return this;
2719
2741
  };
2720
2742
  function k(d) {
2721
2743
  d.h = "";
2722
2744
  }
2723
- L.prototype.toString = function() {
2745
+ N.prototype.toString = function() {
2724
2746
  return this.h;
2725
2747
  };
2726
2748
  function z() {
2727
2749
  R.call(this);
2728
2750
  }
2729
2751
  n(z, R);
2730
- var A1 = null;
2731
- function b() {
2752
+ var L1 = null;
2753
+ function L() {
2732
2754
  R.call(this);
2733
2755
  }
2734
- n(b, R);
2735
- var L1 = null;
2756
+ n(L, R);
2757
+ var N1 = null;
2736
2758
  function Z() {
2737
2759
  R.call(this);
2738
2760
  }
2739
2761
  n(Z, R);
2740
- var N1 = null;
2762
+ var T1 = null;
2741
2763
  z.prototype.m = function() {
2742
- var d = A1;
2743
- return d || (A1 = d = i1(z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2744
- }, z.m = z.prototype.m, b.prototype.m = function() {
2745
2764
  var d = L1;
2746
- return d || (L1 = d = i1(b, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2747
- }, b.m = b.prototype.m, Z.prototype.m = function() {
2765
+ return d || (L1 = d = i1(z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2766
+ }, z.m = z.prototype.m, L.prototype.m = function() {
2748
2767
  var d = N1;
2749
- return d || (N1 = d = i1(Z, {
2768
+ return d || (N1 = d = i1(L, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2769
+ }, L.m = L.prototype.m, Z.prototype.m = function() {
2770
+ var d = T1;
2771
+ return d || (T1 = d = i1(Z, {
2750
2772
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2751
- 1: { name: "general_desc", i: 11, type: b },
2752
- 2: { name: "fixed_line", i: 11, type: b },
2753
- 3: { name: "mobile", i: 11, type: b },
2754
- 4: { name: "toll_free", i: 11, type: b },
2755
- 5: { name: "premium_rate", i: 11, type: b },
2756
- 6: { name: "shared_cost", i: 11, type: b },
2757
- 7: { name: "personal_number", i: 11, type: b },
2758
- 8: { name: "voip", i: 11, type: b },
2759
- 21: { name: "pager", i: 11, type: b },
2760
- 25: { name: "uan", i: 11, type: b },
2761
- 27: { name: "emergency", i: 11, type: b },
2762
- 28: { name: "voicemail", i: 11, type: b },
2763
- 29: { name: "short_code", i: 11, type: b },
2764
- 30: { name: "standard_rate", i: 11, type: b },
2765
- 31: { name: "carrier_specific", i: 11, type: b },
2766
- 33: { name: "sms_services", i: 11, type: b },
2767
- 24: { name: "no_international_dialling", i: 11, type: b },
2773
+ 1: { name: "general_desc", i: 11, type: L },
2774
+ 2: { name: "fixed_line", i: 11, type: L },
2775
+ 3: { name: "mobile", i: 11, type: L },
2776
+ 4: { name: "toll_free", i: 11, type: L },
2777
+ 5: { name: "premium_rate", i: 11, type: L },
2778
+ 6: { name: "shared_cost", i: 11, type: L },
2779
+ 7: { name: "personal_number", i: 11, type: L },
2780
+ 8: { name: "voip", i: 11, type: L },
2781
+ 21: { name: "pager", i: 11, type: L },
2782
+ 25: { name: "uan", i: 11, type: L },
2783
+ 27: { name: "emergency", i: 11, type: L },
2784
+ 28: { name: "voicemail", i: 11, type: L },
2785
+ 29: { name: "short_code", i: 11, type: L },
2786
+ 30: { name: "standard_rate", i: 11, type: L },
2787
+ 31: { name: "carrier_specific", i: 11, type: L },
2788
+ 33: { name: "sms_services", i: 11, type: L },
2789
+ 24: { name: "no_international_dialling", i: 11, type: L },
2768
2790
  9: { name: "id", required: !0, i: 9, type: String },
2769
2791
  10: { name: "country_code", i: 5, type: Number },
2770
2792
  11: { name: "international_prefix", i: 9, type: String },
@@ -2788,10 +2810,10 @@ const H2 = (y) => {
2788
2810
  R.call(this);
2789
2811
  }
2790
2812
  n(H, R);
2791
- var T1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2813
+ var A1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2792
2814
  H.prototype.m = function() {
2793
- var d = T1;
2794
- return d || (T1 = d = i1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: h2 }, 7: {
2815
+ var d = A1;
2816
+ return d || (A1 = d = i1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: h2 }, 7: {
2795
2817
  name: "preferred_domestic_carrier_code",
2796
2818
  i: 9,
2797
2819
  type: String
@@ -7987,8 +8009,8 @@ const H2 = (y) => {
7987
8009
  return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
7988
8010
  }
7989
8011
  function s1(d, t) {
7990
- for (var e = new L(), r, s = d.length, u = 0; u < s; ++u) r = d.charAt(u), r = t[r.toUpperCase()], r != null && e.g(r);
7991
- return e.toString();
8012
+ for (var $ = new N(), i, s = d.length, u = 0; u < s; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
8013
+ return $.toString();
7992
8014
  }
7993
8015
  function O1(d) {
7994
8016
  return d.length == 0 || w2.test(d);
@@ -7997,122 +8019,122 @@ const H2 = (y) => {
7997
8019
  return d != null && isNaN(d) && d.toUpperCase() in E1;
7998
8020
  }
7999
8021
  D.prototype.format = function(d, t) {
8000
- if (g(d, 2) == 0 && B(d, 5)) {
8001
- var e = v(d, 5);
8002
- if (0 < e.length) return e;
8022
+ if (p(d, 2) == 0 && B(d, 5)) {
8023
+ var $ = v(d, 5);
8024
+ if (0 < $.length) return $;
8003
8025
  }
8004
- e = v(d, 1);
8005
- var r = t1(d);
8006
- if (t == 0) return G1(e, 0, r, "");
8007
- if (!(e in X)) return r;
8008
- var s = d1(this, e, e1(e));
8009
- d = B(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : B(s, 13) ? g(s, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8026
+ $ = v(d, 1);
8027
+ var i = t1(d);
8028
+ if (t == 0) return G1($, 0, i, "");
8029
+ if (!($ in X)) return i;
8030
+ var s = d1(this, $, e1($));
8031
+ d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(s, 13) ? p(s, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8010
8032
  d: {
8011
8033
  s = P(s, 20).length == 0 || t == 2 ? P(s, 19) : P(s, 20);
8012
- for (var u, a = s.length, h = 0; h < a; ++h) {
8034
+ for (var u, l = s.length, h = 0; h < l; ++h) {
8013
8035
  u = s[h];
8014
8036
  var m = K(u, 3);
8015
- if ((m == 0 || r.search(g(u, 3, m - 1)) == 0) && (m = new RegExp(g(u, 1)), U(m, r))) {
8037
+ if ((m == 0 || i.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)), U(m, i))) {
8016
8038
  s = u;
8017
8039
  break d;
8018
8040
  }
8019
8041
  }
8020
8042
  s = null;
8021
8043
  }
8022
- return s != null && (a = s, s = v(a, 2), u = new RegExp(g(a, 1)), v(
8023
- a,
8044
+ return s != null && (l = s, s = v(l, 2), u = new RegExp(p(l, 1)), v(
8045
+ l,
8024
8046
  5
8025
- ), a = v(a, 4), r = t == 2 && a != null && 0 < a.length ? r.replace(u, s.replace(S2, a)) : r.replace(u, s), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1(e, t, r, d);
8047
+ ), l = v(l, 4), i = t == 2 && l != null && 0 < l.length ? i.replace(u, s.replace(S2, l)) : i.replace(u, s), t == 3 && (i = i.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), i = i.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, i, d);
8026
8048
  };
8027
- function d1(d, t, e) {
8028
- return e == "001" ? j(d, "" + t) : j(d, e);
8049
+ function d1(d, t, $) {
8050
+ return $ == "001" ? j(d, "" + t) : j(d, $);
8029
8051
  }
8030
8052
  function t1(d) {
8031
8053
  if (!B(d, 2)) return "";
8032
- var t = "" + g(d, 2);
8033
- return B(d, 4) && g(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8054
+ var t = "" + p(d, 2);
8055
+ return B(d, 4) && p(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8034
8056
  }
8035
- function G1(d, t, e, r) {
8057
+ function G1(d, t, $, i) {
8036
8058
  switch (t) {
8037
8059
  case 0:
8038
- return "+" + d + e + r;
8060
+ return "+" + d + $ + i;
8039
8061
  case 1:
8040
- return "+" + d + " " + e + r;
8062
+ return "+" + d + " " + $ + i;
8041
8063
  case 3:
8042
- return "tel:+" + d + "-" + e + r;
8064
+ return "tel:+" + d + "-" + $ + i;
8043
8065
  default:
8044
- return e + r;
8066
+ return $ + i;
8045
8067
  }
8046
8068
  }
8047
8069
  function u1(d, t) {
8048
8070
  switch (t) {
8049
8071
  case 4:
8050
- return g(d, 5);
8072
+ return p(d, 5);
8051
8073
  case 3:
8052
- return g(d, 4);
8074
+ return p(d, 4);
8053
8075
  case 1:
8054
- return g(d, 3);
8076
+ return p(d, 3);
8055
8077
  case 0:
8056
8078
  case 2:
8057
- return g(d, 2);
8079
+ return p(d, 2);
8058
8080
  case 5:
8059
- return g(d, 6);
8081
+ return p(d, 6);
8060
8082
  case 6:
8061
- return g(d, 8);
8083
+ return p(d, 8);
8062
8084
  case 7:
8063
- return g(d, 7);
8085
+ return p(d, 7);
8064
8086
  case 8:
8065
- return g(d, 21);
8087
+ return p(d, 21);
8066
8088
  case 9:
8067
- return g(d, 25);
8089
+ return p(d, 25);
8068
8090
  case 10:
8069
- return g(d, 28);
8091
+ return p(d, 28);
8070
8092
  default:
8071
- return g(d, 1);
8093
+ return p(d, 1);
8072
8094
  }
8073
8095
  }
8074
8096
  function F1(d, t) {
8075
- var e = U1(d, t);
8076
- return d = d1(d, v(t, 1), e), d == null ? -1 : (t = t1(t), C1(t, d));
8097
+ var $ = U1(d, t);
8098
+ return d = d1(d, v(t, 1), $), d == null ? -1 : (t = t1(t), C1(t, d));
8077
8099
  }
8078
8100
  function C1(d, t) {
8079
- return O(d, g(t, 1)) ? O(d, g(t, 5)) ? 4 : O(d, g(t, 4)) ? 3 : O(d, g(t, 6)) ? 5 : O(d, g(t, 8)) ? 6 : O(d, g(t, 7)) ? 7 : O(d, g(t, 21)) ? 8 : O(d, g(t, 25)) ? 9 : O(d, g(t, 28)) ? 10 : O(d, g(t, 2)) ? g(t, 18) || O(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && O(d, g(t, 3)) ? 1 : -1 : -1;
8101
+ return O(d, p(t, 1)) ? O(d, p(t, 5)) ? 4 : O(d, p(t, 4)) ? 3 : O(d, p(t, 6)) ? 5 : O(d, p(t, 8)) ? 6 : O(d, p(t, 7)) ? 7 : O(d, p(t, 21)) ? 8 : O(d, p(t, 25)) ? 9 : O(d, p(t, 28)) ? 10 : O(d, p(t, 2)) ? p(t, 18) || O(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && O(d, p(t, 3)) ? 1 : -1 : -1;
8080
8102
  }
8081
8103
  function j(d, t) {
8082
8104
  if (t == null) return null;
8083
8105
  t = t.toUpperCase();
8084
- var e = d.g[t];
8085
- if (e == null) {
8086
- if (e = E1[t], e == null) return null;
8087
- e = new q().g(Z.m(), e), d.g[t] = e;
8106
+ var $ = d.g[t];
8107
+ if ($ == null) {
8108
+ if ($ = E1[t], $ == null) return null;
8109
+ $ = new q().g(Z.m(), $), d.g[t] = $;
8088
8110
  }
8089
- return e;
8111
+ return $;
8090
8112
  }
8091
8113
  function O(d, t) {
8092
- var e = d.length;
8093
- return 0 < K(t, 9) && P(t, 9).indexOf(e) == -1 ? !1 : U(v(t, 2), d);
8114
+ var $ = d.length;
8115
+ return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(v(t, 2), d);
8094
8116
  }
8095
8117
  function b2(d, t) {
8096
- var e = U1(d, t), r = v(t, 1), s = d1(d, r, e);
8097
- return s == null || e != "001" && r != V1(d, e) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
8118
+ var $ = U1(d, t), i = v(t, 1), s = d1(d, i, $);
8119
+ return s == null || $ != "001" && i != V1(d, $) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
8098
8120
  }
8099
8121
  function U1(d, t) {
8100
8122
  if (t == null) return null;
8101
- var e = v(t, 1);
8102
- if (e = X[e], e == null) d = null;
8103
- else if (e.length == 1) d = e[0];
8123
+ var $ = v(t, 1);
8124
+ if ($ = X[$], $ == null) d = null;
8125
+ else if ($.length == 1) d = $[0];
8104
8126
  else d: {
8105
8127
  t = t1(t);
8106
- for (var r, s = e.length, u = 0; u < s; u++) {
8107
- r = e[u];
8108
- var a = j(d, r);
8109
- if (B(a, 23)) {
8110
- if (t.search(g(a, 23)) == 0) {
8111
- d = r;
8128
+ for (var i, s = $.length, u = 0; u < s; u++) {
8129
+ i = $[u];
8130
+ var l = j(d, i);
8131
+ if (B(l, 23)) {
8132
+ if (t.search(p(l, 23)) == 0) {
8133
+ d = i;
8112
8134
  break d;
8113
8135
  }
8114
- } else if (C1(t, a) != -1) {
8115
- d = r;
8136
+ } else if (C1(t, l) != -1) {
8137
+ d = i;
8116
8138
  break d;
8117
8139
  }
8118
8140
  }
@@ -8127,144 +8149,144 @@ const H2 = (y) => {
8127
8149
  if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
8128
8150
  return v(d, 10);
8129
8151
  }
8130
- function a1(d, t, e, r) {
8131
- var s = u1(e, r), u = K(s, 9) == 0 ? P(g(e, 1), 9) : P(s, 9);
8132
- if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(g(e, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
8133
- else return a1(d, t, e, 1);
8134
- return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : (e = u[0], e == t ? 0 : e > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8152
+ function l1(d, t, $, i) {
8153
+ var s = u1($, i), u = K(s, 9) == 0 ? P(p($, 1), 9) : P(s, 9);
8154
+ if (s = P(s, 10), i == 2) if (k1(u1($, 0))) d = u1($, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
8155
+ else return l1(d, t, $, 1);
8156
+ return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8135
8157
  }
8136
- function l1(d, t, e) {
8137
- var r = t1(t);
8138
- return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, r, t, e)) : 1;
8158
+ function a1(d, t, $) {
8159
+ var i = t1(t);
8160
+ return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, i, t, $)) : 1;
8139
8161
  }
8140
8162
  function K1(d, t) {
8141
8163
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8142
- for (var e, r = d.length, s = 1; 3 >= s && s <= r; ++s) if (e = parseInt(d.substring(0, s), 10), e in X) return t.g(d.substring(s)), e;
8164
+ for (var $, i = d.length, s = 1; 3 >= s && s <= i; ++s) if ($ = parseInt(d.substring(0, s), 10), $ in X) return t.g(d.substring(s)), $;
8143
8165
  return 0;
8144
8166
  }
8145
- function H1(d, t, e, r, s, u) {
8167
+ function H1(d, t, $, i, s, u) {
8146
8168
  if (t.length == 0) return 0;
8147
- t = new L(t);
8148
- var a;
8149
- e != null && (a = g(e, 11)), a == null && (a = "NonMatch");
8169
+ t = new N(t);
8170
+ var l;
8171
+ $ != null && (l = p($, 11)), l == null && (l = "NonMatch");
8150
8172
  var h = t.toString();
8151
- if (h.length == 0) a = 20;
8152
- else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), a = 1;
8173
+ if (h.length == 0) l = 20;
8174
+ else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), l = 1;
8153
8175
  else {
8154
- if (h = new RegExp(a), B1(t), a = t.toString(), a.search(h) == 0) {
8155
- h = a.match(h)[0].length;
8156
- var m = a.substring(h).match(D1);
8157
- m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? a = !1 : (k(t), t.g(a.substring(h)), a = !0);
8158
- } else a = !1;
8159
- a = a ? 5 : 20;
8176
+ if (h = new RegExp(l), B1(t), l = t.toString(), l.search(h) == 0) {
8177
+ h = l.match(h)[0].length;
8178
+ var m = l.substring(h).match(D1);
8179
+ m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? l = !1 : (k(t), t.g(l.substring(h)), l = !0);
8180
+ } else l = !1;
8181
+ l = l ? 5 : 20;
8160
8182
  }
8161
- if (s && E(u, 6, a), a != 20) {
8183
+ if (s && E(u, 6, l), l != 20) {
8162
8184
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8163
- if (d = K1(t, r), d != 0) return E(u, 1, d), d;
8185
+ if (d = K1(t, i), d != 0) return E(u, 1, d), d;
8164
8186
  throw Error("Invalid country calling code");
8165
8187
  }
8166
- return e != null && (a = v(e, 10), h = "" + a, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = g(e, 1), m = new RegExp(v(m, 2)), j1(h, e, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || a1(d, t.toString(), e, -1) == 3)) ? (r.g(h), s && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
8188
+ return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new N(m.substring(h.length)), m = p($, 1), m = new RegExp(v(m, 2)), j1(h, $, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || l1(d, t.toString(), $, -1) == 3)) ? (i.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
8167
8189
  }
8168
- function j1(d, t, e) {
8169
- var r = d.toString(), s = r.length, u = g(t, 15);
8190
+ function j1(d, t, $) {
8191
+ var i = d.toString(), s = i.length, u = p(t, 15);
8170
8192
  if (s != 0 && u != null && u.length != 0) {
8171
- var a = new RegExp("^(?:" + u + ")");
8172
- if (s = a.exec(r)) {
8173
- u = new RegExp(v(g(t, 1), 2));
8174
- var h = U(u, r), m = s.length - 1;
8175
- t = g(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, r.substring(s[0].length))) && (e != null && 0 < m && s[m] != null && e.g(s[1]), d.set(r.substring(s[0].length))) : (r = r.replace(a, t), (!h || U(u, r)) && (e != null && 0 < m && e.g(s[1]), d.set(r)));
8193
+ var l = new RegExp("^(?:" + u + ")");
8194
+ if (s = l.exec(i)) {
8195
+ u = new RegExp(v(p(t, 1), 2));
8196
+ var h = U(u, i), m = s.length - 1;
8197
+ t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, i.substring(s[0].length))) && ($ != null && 0 < m && s[m] != null && $.g(s[1]), d.set(i.substring(s[0].length))) : (i = i.replace(l, t), (!h || U(u, i)) && ($ != null && 0 < m && $.g(s[1]), d.set(i)));
8176
8198
  }
8177
8199
  }
8178
8200
  }
8179
- function Y(d, t, e) {
8180
- if (!o1(e) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8181
- return W1(d, t, e, !0);
8201
+ function Y(d, t, $) {
8202
+ if (!o1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8203
+ return W1(d, t, $, !0);
8182
8204
  }
8183
- function W1(d, t, e, r) {
8205
+ function W1(d, t, $, i) {
8184
8206
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8185
8207
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8186
- var s = new L(), u = t.indexOf(";phone-context=");
8208
+ var s = new N(), u = t.indexOf(";phone-context=");
8187
8209
  if (u === -1) u = null;
8188
8210
  else if (u += 15, u >= t.length) u = "";
8189
8211
  else {
8190
- var a = t.indexOf(";", u);
8191
- u = a !== -1 ? t.substring(u, a) : t.substring(u);
8212
+ var l = t.indexOf(";", u);
8213
+ u = l !== -1 ? t.substring(u, l) : t.substring(u);
8192
8214
  }
8193
8215
  var h = u;
8194
- if (h == null ? a = !0 : h.length === 0 ? a = !1 : (a = _2.exec(h), h = I2.exec(h), a = a !== null || h !== null), !a || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, a = t ?? "", h = a.search(g2), 0 <= h ? (a = a.substring(h), a = a.replace(m2, ""), h = a.search(C2), 0 <= h && (a = a.substring(0, h))) : a = "", u.call(s, a)), u = s.toString(), a = u.indexOf(";isub="), 0 < a && (k(s), s.g(u.substring(0, a))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8195
- if (u = s.toString(), !(o1(e) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8196
- u = new H(), r && E(u, 5, t);
8216
+ if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = _2.exec(h), h = I2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(g2), 0 <= h ? (l = l.substring(h), l = l.replace(m2, ""), h = l.search(C2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (k(s), s.g(u.substring(0, l))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8217
+ if (u = s.toString(), !(o1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8218
+ u = new H(), i && E(u, 5, t);
8197
8219
  d: {
8198
- if (t = s.toString(), a = t.search(P1), 0 <= a && x1(t.substring(0, a))) {
8220
+ if (t = s.toString(), l = t.search(P1), 0 <= l && x1(t.substring(0, l))) {
8199
8221
  h = t.match(P1);
8200
8222
  for (var m = h.length, V = 1; V < m; ++V) if (h[V] != null && 0 < h[V].length) {
8201
- k(s), s.g(t.substring(0, a)), t = h[V];
8223
+ k(s), s.g(t.substring(0, l)), t = h[V];
8202
8224
  break d;
8203
8225
  }
8204
8226
  }
8205
8227
  t = "";
8206
8228
  }
8207
- 0 < t.length && E(u, 3, t), a = j(d, e), t = new L(), h = 0, m = s.toString();
8229
+ 0 < t.length && E(u, 3, t), l = j(d, $), t = new N(), h = 0, m = s.toString();
8208
8230
  try {
8209
- h = H1(d, m, a, t, r, u);
8231
+ h = H1(d, m, l, t, i, u);
8210
8232
  } catch (_1) {
8211
8233
  if (_1.message == "Invalid country calling code" && Q.test(m)) {
8212
- if (m = m.replace(Q, ""), h = H1(d, m, a, t, r, u), h == 0) throw _1;
8234
+ if (m = m.replace(Q, ""), h = H1(d, m, l, t, i, u), h == 0) throw _1;
8213
8235
  } else throw _1;
8214
8236
  }
8215
- if (h != 0 ? (s = e1(h), s != e && (a = d1(d, h, s))) : (B1(s), t.g(s.toString()), e != null ? (h = v(a, 10), E(
8237
+ if (h != 0 ? (s = e1(h), s != $ && (l = d1(d, h, s))) : (B1(s), t.g(s.toString()), $ != null ? (h = v(l, 10), E(
8216
8238
  u,
8217
8239
  1,
8218
8240
  h
8219
- )) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (a != null && (e = new L(), s = new L(t.toString()), j1(s, a, e), d = a1(d, s.toString(), a, -1), d != 2 && d != 4 && d != 5 && (t = s, r && 0 < e.toString().length && E(u, 7, e.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8241
+ )) : i && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new N(), s = new N(t.toString()), j1(s, l, $), d = l1(d, s.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = s, i && 0 < $.toString().length && E(u, 7, $.toString()))), i = t.toString(), d = i.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8220
8242
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8221
- if (1 < r.length && r.charAt(0) == "0") {
8222
- for (E(u, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
8243
+ if (1 < i.length && i.charAt(0) == "0") {
8244
+ for (E(u, 4, !0), d = 1; d < i.length - 1 && i.charAt(d) == "0"; ) d++;
8223
8245
  d != 1 && E(u, 8, d);
8224
8246
  }
8225
- return E(u, 2, parseInt(r, 10)), u;
8247
+ return E(u, 2, parseInt(i, 10)), u;
8226
8248
  }
8227
8249
  function U(d, t) {
8228
8250
  return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
8229
8251
  }
8230
- function A2(d) {
8231
- this.fa = RegExp(" "), this.ja = "", this.v = new L(), this.da = "", this.s = new L(), this.ba = new L(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new L(), this.ha = !1, this.o = "", this.g = new L(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
8252
+ function L2(d) {
8253
+ this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
8232
8254
  }
8233
8255
  var z1 = new Z();
8234
8256
  E(z1, 11, "NA");
8235
- var L2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
8257
+ var N2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
8236
8258
  function Y1(d, t) {
8237
- var e = d.ga;
8238
- return t = o1(t) ? V1(e, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
8259
+ var $ = d.ga;
8260
+ return t = o1(t) ? V1($, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
8239
8261
  }
8240
8262
  function J1(d) {
8241
- for (var t = d.j.length, e = 0; e < t; ++e) {
8242
- var r = d.j[e], s = v(r, 1);
8263
+ for (var t = d.j.length, $ = 0; $ < t; ++$) {
8264
+ var i = d.j[$], s = v(i, 1);
8243
8265
  if (d.da == s) return !1;
8244
- var u = d, a = r, h = v(a, 1);
8266
+ var u = d, l = i, h = v(l, 1);
8245
8267
  k(u.v);
8246
8268
  var m = u;
8247
- a = v(a, 2);
8269
+ l = v(l, 2);
8248
8270
  var V = "999999999999999".match(h)[0];
8249
- if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), a), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(g(r, 4)), d.$ = 0, !0;
8271
+ if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(p(i, 4)), d.$ = 0, !0;
8250
8272
  }
8251
8273
  return d.u = !1;
8252
8274
  }
8253
8275
  function q1(d, t) {
8254
- for (var e = [], r = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8255
- var a = d.j[u];
8256
- K(a, 3) == 0 ? e.push(d.j[u]) : (a = g(a, 3, Math.min(r, K(a, 3) - 1)), t.search(a) == 0 && e.push(d.j[u]));
8276
+ for (var $ = [], i = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8277
+ var l = d.j[u];
8278
+ K(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(i, K(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8257
8279
  }
8258
- d.j = e;
8280
+ d.j = $;
8259
8281
  }
8260
- function N2(d, t) {
8282
+ function T2(d, t) {
8261
8283
  d.s.g(t);
8262
- var e = t;
8263
- if (D1.test(e) || d.s.h.length == 1 && p2.test(e) ? (t == "+" ? (e = t, d.ba.g(t)) : (e = g1[t], d.ba.g(e), d.g.g(e)), t = e) : (d.u = !1, d.la = !0), !d.u) {
8284
+ var $ = t;
8285
+ if (D1.test($) || d.s.h.length == 1 && p2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = g1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8264
8286
  if (!d.la) {
8265
8287
  if (e2(d)) {
8266
8288
  if ($2(d)) return X1(d);
8267
- } else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), e = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, e))), d.o != t2(d)) return d.h.g(" "), X1(d);
8289
+ } else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, $))), d.o != t2(d)) return d.h.g(" "), X1(d);
8268
8290
  }
8269
8291
  return d.s.toString();
8270
8292
  }
@@ -8277,93 +8299,93 @@ const H2 = (y) => {
8277
8299
  if (e2(d)) d.ea = !0;
8278
8300
  else return d.o = t2(d), m1(d);
8279
8301
  default:
8280
- return d.ea ? ($2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = n2(d, t), e = Q1(d), 0 < e.length ? e : (q1(d, d.g.toString()), J1(d) ? d2(d) : d.u ? h1(d, t) : d.s.toString())) : m1(d);
8302
+ return d.ea ? ($2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = n2(d, t), $ = Q1(d), 0 < $.length ? $ : (q1(d, d.g.toString()), J1(d) ? d2(d) : d.u ? h1(d, t) : d.s.toString())) : m1(d);
8281
8303
  }
8282
8304
  }
8283
8305
  function X1(d) {
8284
8306
  return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", m1(d);
8285
8307
  }
8286
8308
  function Q1(d) {
8287
- for (var t = d.g.toString(), e = d.j.length, r = 0; r < e; ++r) {
8288
- var s = d.j[r], u = v(s, 1);
8289
- if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(g(s, 4)), s = t.replace(new RegExp(u, "g"), g(s, 2)), s = h1(d, s), s1(s, c2) == d.ba)) return s;
8309
+ for (var t = d.g.toString(), $ = d.j.length, i = 0; i < $; ++i) {
8310
+ var s = d.j[i], u = v(s, 1);
8311
+ if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(p(s, 4)), s = t.replace(new RegExp(u, "g"), p(s, 2)), s = h1(d, s), s1(s, c2) == d.ba)) return s;
8290
8312
  }
8291
8313
  return "";
8292
8314
  }
8293
8315
  function h1(d, t) {
8294
- var e = d.h.h.length;
8295
- return d.ha && 0 < e && d.h.toString().charAt(e - 1) != " " ? d.h + " " + t : d.h + t;
8316
+ var $ = d.h.h.length;
8317
+ return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
8296
8318
  }
8297
8319
  function m1(d) {
8298
8320
  var t = d.g.toString();
8299
8321
  if (3 <= t.length) {
8300
- for (var e = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), r = e.length, s = 0; s < r; ++s) {
8301
- var u = e[s];
8302
- 0 < d.o.length && O1(v(u, 4)) && !g(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || g(u, 6)) && L2.test(v(u, 2)) && d.j.push(u);
8322
+ for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), i = $.length, s = 0; s < i; ++s) {
8323
+ var u = $[s];
8324
+ 0 < d.o.length && O1(v(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || p(u, 6)) && N2.test(v(u, 2)) && d.j.push(u);
8303
8325
  }
8304
8326
  return q1(d, t), t = Q1(d), 0 < t.length ? t : J1(d) ? d2(d) : d.s.toString();
8305
8327
  }
8306
8328
  return h1(d, t);
8307
8329
  }
8308
8330
  function d2(d) {
8309
- var t = d.g.toString(), e = t.length;
8310
- if (0 < e) {
8311
- for (var r = "", s = 0; s < e; s++) r = n2(d, t.charAt(s));
8312
- return d.u ? h1(d, r) : d.s.toString();
8331
+ var t = d.g.toString(), $ = t.length;
8332
+ if (0 < $) {
8333
+ for (var i = "", s = 0; s < $; s++) i = n2(d, t.charAt(s));
8334
+ return d.u ? h1(d, i) : d.s.toString();
8313
8335
  }
8314
8336
  return d.h.toString();
8315
8337
  }
8316
8338
  function t2(d) {
8317
- var t = d.g.toString(), e = 0;
8318
- if (g(d.l, 10) != 1) var r = !1;
8319
- else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
8320
- return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (r = new RegExp("^(?:" + g(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, e = r[0].length, d.h.g(t.substring(0, e)))), k(d.g), d.g.g(t.substring(e)), t.substring(0, e);
8339
+ var t = d.g.toString(), $ = 0;
8340
+ if (p(d.l, 10) != 1) var i = !1;
8341
+ else i = d.g.toString(), i = i.charAt(0) == "1" && i.charAt(1) != "0" && i.charAt(1) != "1";
8342
+ return i ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (i = new RegExp("^(?:" + p(d.l, 15) + ")"), i = t.match(i), i != null && i[0] != null && 0 < i[0].length && (d.ca = !0, $ = i[0].length, d.h.g(t.substring(0, $)))), k(d.g), d.g.g(t.substring($)), t.substring(0, $);
8321
8343
  }
8322
8344
  function e2(d) {
8323
- var t = d.ba.toString(), e = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
8324
- return e = t.match(e), e != null && e[0] != null && 0 < e[0].length ? (d.ca = !0, e = e[0].length, k(d.g), d.g.g(t.substring(e)), k(d.h), d.h.g(t.substring(0, e)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8345
+ var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8346
+ return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, k(d.g), d.g.g(t.substring($)), k(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8325
8347
  }
8326
8348
  function $2(d) {
8327
8349
  if (d.g.h.length == 0) return !1;
8328
- var t = new L(), e = K1(d.g, t);
8329
- return e == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1(e), t == "001" ? d.l = j(d.ga, "" + e) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + e).g(" "), d.o = "", !0);
8350
+ var t = new N(), $ = K1(d.g, t);
8351
+ return $ == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8330
8352
  }
8331
8353
  function n2(d, t) {
8332
- var e = d.v.toString();
8333
- if (0 <= e.substring(d.$).search(d.fa)) {
8334
- var r = e.search(d.fa);
8335
- return t = e.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
8354
+ var $ = d.v.toString();
8355
+ if (0 <= $.substring(d.$).search(d.fa)) {
8356
+ var i = $.search(d.fa);
8357
+ return t = $.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = i, t.substring(0, d.$ + 1);
8336
8358
  }
8337
8359
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8338
8360
  }
8339
8361
  const y1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
8340
- $("intlTelInputUtilsTemp", {}), $("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8362
+ e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8341
8363
  try {
8342
- const e = d.replace(/[^+0-9]/g, ""), r = new A2(t);
8364
+ const $ = d.replace(/[^+0-9]/g, ""), i = new L2(t);
8343
8365
  t = "";
8344
- for (let s = 0; s < e.length; s++) r.ja = N2(r, e.charAt(s)), t = r.ja;
8366
+ for (let s = 0; s < $.length; s++) i.ja = T2(i, $.charAt(s)), t = i.ja;
8345
8367
  return t;
8346
8368
  } catch {
8347
8369
  return d;
8348
8370
  }
8349
- }), $("intlTelInputUtilsTemp.formatNumber", (d, t, e) => {
8371
+ }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8350
8372
  try {
8351
8373
  const s = D.g(), u = Y(s, d, t);
8352
- var r = l1(s, u, -1);
8353
- return r == 0 || r == 4 ? s.format(u, typeof e > "u" ? 0 : e) : d;
8374
+ var i = a1(s, u, -1);
8375
+ return i == 0 || i == 4 ? s.format(u, typeof $ > "u" ? 0 : $) : d;
8354
8376
  } catch {
8355
8377
  return d;
8356
8378
  }
8357
- }), $("intlTelInputUtilsTemp.getExampleNumber", (d, t, e, r) => {
8379
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, i) => {
8358
8380
  try {
8359
8381
  const m = D.g();
8360
8382
  d: {
8361
8383
  var s = m;
8362
8384
  if (o1(d)) {
8363
- var u = u1(j(s, d), e);
8385
+ var u = u1(j(s, d), $);
8364
8386
  try {
8365
8387
  if (B(u, 6)) {
8366
- var a = g(u, 6), h = W1(s, a, d, !1);
8388
+ var l = p(u, 6), h = W1(s, l, d, !1);
8367
8389
  break d;
8368
8390
  }
8369
8391
  } catch {
@@ -8371,61 +8393,61 @@ const H2 = (y) => {
8371
8393
  }
8372
8394
  h = null;
8373
8395
  }
8374
- return m.format(h, r ? 0 : t ? 2 : 1);
8396
+ return m.format(h, i ? 0 : t ? 2 : 1);
8375
8397
  } catch {
8376
8398
  return "";
8377
8399
  }
8378
- }), $("intlTelInputUtilsTemp.getExtension", (d, t) => {
8400
+ }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
8379
8401
  try {
8380
- return g(Y(D.g(), d, t), 3);
8402
+ return p(Y(D.g(), d, t), 3);
8381
8403
  } catch {
8382
8404
  return "";
8383
8405
  }
8384
- }), $("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8406
+ }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8385
8407
  try {
8386
- const e = D.g(), r = Y(e, d, t);
8387
- return F1(e, r);
8408
+ const $ = D.g(), i = Y($, d, t);
8409
+ return F1($, i);
8388
8410
  } catch {
8389
8411
  return -99;
8390
8412
  }
8391
- }), $("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8413
+ }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8392
8414
  if (!t) return 1;
8393
8415
  try {
8394
- const e = D.g(), r = Y(e, d, t);
8395
- return l1(e, r, -1);
8396
- } catch (e) {
8397
- return e.message === "Invalid country calling code" ? 1 : 3 >= d.length || e.message === "Phone number too short after IDD" || e.message === "The string supplied is too short to be a phone number" ? 2 : e.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8416
+ const $ = D.g(), i = Y($, d, t);
8417
+ return a1($, i, -1);
8418
+ } catch ($) {
8419
+ return $.message === "Invalid country calling code" ? 1 : 3 >= d.length || $.message === "Phone number too short after IDD" || $.message === "The string supplied is too short to be a phone number" ? 2 : $.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8398
8420
  }
8399
- }), $("intlTelInputUtilsTemp.isValidNumber", (d, t, e) => {
8421
+ }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
8400
8422
  try {
8401
- const r = D.g(), s = Y(r, d, t), u = b2(r, s);
8402
- if (e) {
8403
- const a = e.map((h) => y1[h]);
8404
- return u && a.includes(F1(r, s));
8423
+ const i = D.g(), s = Y(i, d, t), u = b2(i, s);
8424
+ if ($) {
8425
+ const l = $.map((h) => y1[h]);
8426
+ return u && l.includes(F1(i, s));
8405
8427
  }
8406
8428
  return u;
8407
8429
  } catch {
8408
8430
  return !1;
8409
8431
  }
8410
- }), $("intlTelInputUtilsTemp.isPossibleNumber", (d, t, e) => {
8432
+ }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8411
8433
  try {
8412
- const r = D.g(), s = Y(r, d, t);
8413
- if (e) {
8414
- e.includes("FIXED_LINE_OR_MOBILE") && (e.includes("MOBILE") || e.push("MOBILE"), e.includes("FIXED_LINE") || e.push("FIXED_LINE"));
8415
- for (let u of e) if (l1(r, s, y1[u]) === 0) return !0;
8434
+ const i = D.g(), s = Y(i, d, t);
8435
+ if ($) {
8436
+ $.includes("FIXED_LINE_OR_MOBILE") && ($.includes("MOBILE") || $.push("MOBILE"), $.includes("FIXED_LINE") || $.push("FIXED_LINE"));
8437
+ for (let u of $) if (a1(i, s, y1[u]) === 0) return !0;
8416
8438
  return !1;
8417
8439
  }
8418
- return l1(r, s, -1) === 0;
8440
+ return a1(i, s, -1) === 0;
8419
8441
  } catch {
8420
8442
  return !1;
8421
8443
  }
8422
- }), $("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8444
+ }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8423
8445
  try {
8424
- return g(Y(D.g(), d, t), 2).toString();
8446
+ return p(Y(D.g(), d, t), 2).toString();
8425
8447
  } catch {
8426
8448
  return "";
8427
8449
  }
8428
- }), $("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), $("intlTelInputUtilsTemp.numberType", y1), $("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8450
+ }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", y1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8429
8451
  })();
8430
8452
  const j2 = window.intlTelInputUtilsTemp;
8431
8453
  delete window.intlTelInputUtilsTemp;
@@ -8462,40 +8484,40 @@ const z2 = {
8462
8484
  "changeValidity",
8463
8485
  "changeErrorCode"
8464
8486
  ], ["update:modelValue"]),
8465
- setup(y, { expose: $, emit: n }) {
8466
- const i = T2(y, "modelValue"), o = y, l = n, c = I1(), f = I1(), p = I1(!1), w = () => f.value ? o.options.strictMode ? f.value.isValidNumberPrecise() : f.value.isValidNumber() : null, I = () => {
8467
- let _ = w();
8468
- p.value !== _ && (p.value = _, l("changeValidity", !!_), l(
8487
+ setup(y, { expose: e, emit: n }) {
8488
+ const r = A2(y, "modelValue"), o = y, a = n, c = I1(), g = I1(), f = I1(!1), S = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, _ = () => {
8489
+ let I = S();
8490
+ f.value !== I && (f.value = I, a("changeValidity", !!I), a(
8469
8491
  "changeErrorCode",
8470
- _ ? null : f.value.getValidationError()
8492
+ I ? null : g.value.getValidationError()
8471
8493
  ));
8472
- }, S = () => {
8473
- var _;
8474
- l("changeNumber", ((_ = f.value) == null ? void 0 : _.getNumber()) ?? ""), I();
8475
- }, A = () => {
8476
- var _;
8477
- l("changeCountry", ((_ = f.value) == null ? void 0 : _.getSelectedCountryData().iso2) ?? ""), S(), I();
8494
+ }, b = () => {
8495
+ var I;
8496
+ a("changeNumber", ((I = g.value) == null ? void 0 : I.getNumber()) ?? ""), _();
8497
+ }, w = () => {
8498
+ var I;
8499
+ a("changeCountry", ((I = g.value) == null ? void 0 : I.getSelectedCountryData().iso2) ?? ""), b(), _();
8478
8500
  };
8479
8501
  return E2(() => {
8480
- c.value && (f.value = C(c.value, o.options), o.value && f.value.setNumber(o.value), o.disabled && f.value.setDisabled(o.disabled));
8502
+ c.value && (g.value = C(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled));
8481
8503
  }), D2(
8482
8504
  () => o.disabled,
8483
- (_) => {
8484
- var T;
8485
- return (T = f.value) == null ? void 0 : T.setDisabled(_);
8505
+ (I) => {
8506
+ var A;
8507
+ return (A = g.value) == null ? void 0 : A.setDisabled(I);
8486
8508
  }
8487
8509
  ), M2(() => {
8488
- var _;
8489
- return (_ = f.value) == null ? void 0 : _.destroy();
8490
- }), $({ instance: f, input: c }), (_, T) => P2((x2(), R2("input", B2({
8510
+ var I;
8511
+ return (I = g.value) == null ? void 0 : I.destroy();
8512
+ }), e({ instance: g, input: c }), (I, A) => P2((x2(), R2("input", B2({
8491
8513
  ref_key: "input",
8492
8514
  ref: c,
8493
- "onUpdate:modelValue": T[0] || (T[0] = (G) => i.value = G),
8515
+ "onUpdate:modelValue": A[0] || (A[0] = (G) => r.value = G),
8494
8516
  type: "tel",
8495
- onCountrychange: A,
8496
- onInput: S
8517
+ onCountrychange: w,
8518
+ onInput: b
8497
8519
  }, y.inputProps), null, 16)), [
8498
- [k2, i.value]
8520
+ [k2, r.value]
8499
8521
  ]);
8500
8522
  }
8501
8523
  };