intl-tel-input 25.5.1 → 25.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { mergeModels as n2, useModel as M2, ref as I1, onMounted as D2, watch as P2, onUnmounted as x2, withDirectives as R2, createElementBlock as B2, openBlock as k2, mergeProps as O2, vModelText as G2 } from "vue";
2
- const s2 = [
1
+ import { mergeModels as r2, useModel as M2, ref as I1, onMounted as D2, watch as P2, onUnmounted as x2, withDirectives as R2, createElementBlock as B2, openBlock as k2, mergeProps as O2, vModelText as G2 } from "vue";
2
+ const F2 = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
@@ -1322,21 +1322,20 @@ const s2 = [
1322
1322
  // Zimbabwe
1323
1323
  "263"
1324
1324
  ]
1325
- ], W = [];
1326
- for (let I = 0; I < s2.length; I++) {
1327
- const e = s2[I];
1328
- W[I] = {
1325
+ ], J = [];
1326
+ for (const y of F2)
1327
+ J.push({
1329
1328
  name: "",
1330
- // this is now populated in the plugin
1331
- iso2: e[0],
1332
- dialCode: e[1],
1333
- priority: e[2] || 0,
1334
- areaCodes: e[3] || null,
1329
+ // populated in the plugin
1330
+ iso2: y[0],
1331
+ dialCode: y[1],
1332
+ priority: y[2] || 0,
1333
+ areaCodes: y[3] || null,
1335
1334
  nodeById: {},
1336
- nationalPrefix: e[4] || null
1337
- };
1338
- }
1339
- const F2 = {
1335
+ // populated by the plugin
1336
+ nationalPrefix: y[4] || null
1337
+ });
1338
+ const U2 = {
1340
1339
  ad: "Andorra",
1341
1340
  ae: "United Arab Emirates",
1342
1341
  af: "Afghanistan",
@@ -1579,7 +1578,7 @@ const F2 = {
1579
1578
  za: "South Africa",
1580
1579
  zm: "Zambia",
1581
1580
  zw: "Zimbabwe"
1582
- }, U2 = {
1581
+ }, V2 = {
1583
1582
  selectedCountryAriaLabel: "Selected country",
1584
1583
  noCountrySelected: "No country selected",
1585
1584
  countryListAriaLabel: "List of countries",
@@ -1590,11 +1589,17 @@ const F2 = {
1590
1589
  // additional countries (not supported by country-list library)
1591
1590
  ac: "Ascension Island",
1592
1591
  xk: "Kosovo"
1593
- }, u2 = { ...F2, ...U2 };
1594
- for (let I = 0; I < W.length; I++)
1595
- W[I].name = u2[W[I].iso2];
1596
- let V2 = 0;
1597
- const l2 = {
1592
+ }, u2 = { ...U2, ...V2 };
1593
+ for (const y of J)
1594
+ y.name = u2[y.iso2];
1595
+ let K2 = 0;
1596
+ const v1 = (y) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(y).matches, H2 = () => {
1597
+ if (typeof navigator < "u" && typeof window < "u") {
1598
+ const y = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = v1("(max-width: 500px)"), n = v1("(max-height: 600px)"), r = v1("(pointer: coarse)");
1599
+ return y || e || r && n;
1600
+ }
1601
+ return !1;
1602
+ }, a2 = {
1598
1603
  //* Whether or not to allow the dropdown.
1599
1604
  allowDropdown: !0,
1600
1605
  //* Add a placeholder in the input with an example number for the selected country.
@@ -1640,16 +1645,10 @@ const l2 = {
1640
1645
  //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
1641
1646
  strictMode: !1,
1642
1647
  //* Use full screen popup instead of dropdown for country list.
1643
- useFullscreenPopup: typeof navigator < "u" && typeof window < "u" ? (
1644
- //* We cannot just test screen size as some smartphones/website meta tags will report desktop resolutions.
1645
- //* Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'
1646
- /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1647
- navigator.userAgent
1648
- ) || window.innerWidth <= 500
1649
- ) : !1,
1648
+ useFullscreenPopup: H2(),
1650
1649
  //* The number type to enforce during validation.
1651
1650
  validationNumberTypes: ["MOBILE"]
1652
- }, K2 = [
1651
+ }, j2 = [
1653
1652
  "800",
1654
1653
  "822",
1655
1654
  "833",
@@ -1667,149 +1666,149 @@ const l2 = {
1667
1666
  "887",
1668
1667
  "888",
1669
1668
  "889"
1670
- ], c1 = (I) => I.replace(/\D/g, ""), r2 = (I = "") => I.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), o2 = (I) => {
1671
- const e = c1(I);
1669
+ ], c1 = (y) => y.replace(/\D/g, ""), s2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), o2 = (y) => {
1670
+ const e = c1(y);
1672
1671
  if (e.charAt(0) === "1") {
1673
- const i = e.substr(1, 3);
1674
- return K2.includes(i);
1672
+ const n = e.substring(1, 4);
1673
+ return j2.includes(n);
1675
1674
  }
1676
1675
  return !1;
1677
- }, H2 = (I, e, i, s) => {
1678
- if (i === 0 && !s)
1676
+ }, W2 = (y, e, n, r) => {
1677
+ if (n === 0 && !r)
1679
1678
  return 0;
1680
- let o = 0;
1681
- for (let a = 0; a < e.length; a++) {
1682
- if (/[+0-9]/.test(e[a]) && o++, o === I && !s)
1683
- return a + 1;
1684
- if (s && o === I + 1)
1685
- return a;
1679
+ let s = 0;
1680
+ for (let l = 0; l < e.length; l++) {
1681
+ if (/[+0-9]/.test(e[l]) && s++, s === y && !r)
1682
+ return l + 1;
1683
+ if (r && s === y + 1)
1684
+ return l;
1686
1685
  }
1687
1686
  return e.length;
1688
- }, E = (I, e, i) => {
1689
- const s = document.createElement(I);
1690
- return e && Object.entries(e).forEach(([o, a]) => s.setAttribute(o, a)), i && i.appendChild(s), s;
1691
- }, $1 = (I, ...e) => {
1692
- const { instances: i } = y;
1693
- Object.values(i).forEach((s) => s[I](...e));
1687
+ }, A = (y, e, n) => {
1688
+ const r = document.createElement(y);
1689
+ return e && Object.entries(e).forEach(([s, l]) => r.setAttribute(s, l)), n && n.appendChild(r), r;
1690
+ }, $1 = (y, ...e) => {
1691
+ const { instances: n } = m;
1692
+ Object.values(n).forEach((r) => r[y](...e));
1694
1693
  };
1695
- class j2 {
1696
- constructor(e, i = {}) {
1697
- this.id = V2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, l2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1694
+ class z2 {
1695
+ constructor(e, n = {}) {
1696
+ this.id = K2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, a2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1698
1697
  }
1699
1698
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1700
1699
  _init() {
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]");
1700
+ 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]"), this.telInput.dir = "ltr";
1702
1701
  const e = this.options.allowDropdown || this.options.separateDialCode;
1703
1702
  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 i = new Promise((o, a) => {
1705
- this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = a;
1706
- }), s = new Promise((o, a) => {
1707
- this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = a;
1703
+ const n = new Promise((s, l) => {
1704
+ this.resolveAutoCountryPromise = s, this.rejectAutoCountryPromise = l;
1705
+ }), r = new Promise((s, l) => {
1706
+ this.resolveUtilsScriptPromise = s, this.rejectUtilsScriptPromise = l;
1708
1707
  });
1709
- this.promise = Promise.all([i, s]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1708
+ this.promise = Promise.all([n, r]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1710
1709
  }
1711
1710
  //********************
1712
1711
  //* PRIVATE METHODS
1713
1712
  //********************
1714
1713
  //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
1715
1714
  _processCountryData() {
1716
- this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries();
1715
+ this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries(), this.countryByIso2 = new Map(this.countries.map((e) => [e.iso2, e])), this._cacheSearchTokens();
1716
+ }
1717
+ //* Precompute and cache country search tokens to speed up filtering
1718
+ _cacheSearchTokens() {
1719
+ for (const e of this.countries)
1720
+ e.normalisedName = s2(e.name), e.initials = e.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((n) => n[0]).join("").toLowerCase(), e.dialCodePlus = `+${e.dialCode}`;
1717
1721
  }
1718
1722
  //* Sort countries by countryOrder option (if present), then name.
1719
1723
  _sortCountries() {
1720
- this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
1721
- const { countryOrder: s } = this.options;
1722
- if (s) {
1723
- const o = s.indexOf(e.iso2), a = s.indexOf(i.iso2), c = o > -1, g = a > -1;
1724
- if (c || g)
1725
- return c && g ? o - a : c ? -1 : 1;
1724
+ this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, n) => {
1725
+ const { countryOrder: r } = this.options;
1726
+ if (r) {
1727
+ const s = r.indexOf(e.iso2), l = r.indexOf(n.iso2), c = s > -1, C = l > -1;
1728
+ if (c || C)
1729
+ return c && C ? s - l : c ? -1 : 1;
1726
1730
  }
1727
- return e.name.localeCompare(i.name);
1731
+ return e.name.localeCompare(n.name);
1728
1732
  });
1729
1733
  }
1730
1734
  //* Add a dial code to this.dialCodeToIso2Map.
1731
- _addToDialCodeMap(e, i, s) {
1732
- i.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = i.length), this.dialCodeToIso2Map.hasOwnProperty(i) || (this.dialCodeToIso2Map[i] = []);
1733
- for (let a = 0; a < this.dialCodeToIso2Map[i].length; a++)
1734
- if (this.dialCodeToIso2Map[i][a] === e)
1735
- return;
1736
- const o = s !== void 0 ? s : this.dialCodeToIso2Map[i].length;
1737
- this.dialCodeToIso2Map[i][o] = e;
1735
+ _addToDialCodeMap(e, n, r) {
1736
+ n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
1737
+ const s = this.dialCodeToIso2Map[n];
1738
+ if (s.includes(e))
1739
+ return;
1740
+ const l = r !== void 0 ? r : s.length;
1741
+ s[l] = e;
1738
1742
  }
1739
1743
  //* Process onlyCountries or excludeCountries array if present.
1740
1744
  _processAllCountries() {
1741
- const { onlyCountries: e, excludeCountries: i } = this.options;
1745
+ const { onlyCountries: e, excludeCountries: n } = this.options;
1742
1746
  if (e.length) {
1743
- const s = e.map(
1744
- (o) => o.toLowerCase()
1747
+ const r = e.map(
1748
+ (s) => s.toLowerCase()
1745
1749
  );
1746
- this.countries = W.filter(
1747
- (o) => s.includes(o.iso2)
1750
+ this.countries = J.filter(
1751
+ (s) => r.includes(s.iso2)
1748
1752
  );
1749
- } else if (i.length) {
1750
- const s = i.map(
1751
- (o) => o.toLowerCase()
1753
+ } else if (n.length) {
1754
+ const r = n.map(
1755
+ (s) => s.toLowerCase()
1752
1756
  );
1753
- this.countries = W.filter(
1754
- (o) => !s.includes(o.iso2)
1757
+ this.countries = J.filter(
1758
+ (s) => !r.includes(s.iso2)
1755
1759
  );
1756
1760
  } else
1757
- this.countries = W;
1761
+ this.countries = J;
1758
1762
  }
1759
1763
  //* Translate Countries by object literal provided on config.
1760
1764
  _translateCountryNames() {
1761
- for (let e = 0; e < this.countries.length; e++) {
1762
- const i = this.countries[e].iso2.toLowerCase();
1763
- this.options.i18n.hasOwnProperty(i) && (this.countries[e].name = this.options.i18n[i]);
1765
+ for (const e of this.countries) {
1766
+ const n = e.iso2.toLowerCase();
1767
+ this.options.i18n.hasOwnProperty(n) && (e.name = this.options.i18n[n]);
1764
1768
  }
1765
1769
  }
1766
1770
  //* Generate this.dialCodes and this.dialCodeToIso2Map.
1767
1771
  _processDialCodes() {
1768
- this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1769
- for (let e = 0; e < this.countries.length; e++) {
1770
- const i = this.countries[e];
1771
- this.dialCodes[i.dialCode] || (this.dialCodes[i.dialCode] = !0), this._addToDialCodeMap(i.iso2, i.dialCode, i.priority);
1772
- }
1773
- for (let e = 0; e < this.countries.length; e++) {
1774
- const i = this.countries[e];
1775
- if (i.areaCodes) {
1776
- const s = this.dialCodeToIso2Map[i.dialCode][0];
1777
- for (let o = 0; o < i.areaCodes.length; o++) {
1778
- const a = i.areaCodes[o];
1779
- for (let c = 1; c < a.length; c++) {
1780
- const g = a.substr(0, c), f = i.dialCode + g;
1781
- this._addToDialCodeMap(s, f), this._addToDialCodeMap(i.iso2, f);
1772
+ this.dialCodes = /* @__PURE__ */ new Set(), this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1773
+ for (const e of this.countries)
1774
+ this.dialCodes.has(e.dialCode) || this.dialCodes.add(e.dialCode), this._addToDialCodeMap(e.iso2, e.dialCode, e.priority);
1775
+ for (const e of this.countries)
1776
+ if (e.areaCodes) {
1777
+ const n = this.dialCodeToIso2Map[e.dialCode][0];
1778
+ for (const r of e.areaCodes) {
1779
+ for (let s = 1; s < r.length; s++) {
1780
+ const l = r.substring(0, s), c = e.dialCode + l;
1781
+ this._addToDialCodeMap(n, c), this._addToDialCodeMap(e.iso2, c);
1782
1782
  }
1783
- this._addToDialCodeMap(i.iso2, i.dialCode + a);
1783
+ this._addToDialCodeMap(e.iso2, e.dialCode + r);
1784
1784
  }
1785
1785
  }
1786
- }
1787
1786
  }
1788
1787
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1789
1788
  _generateMarkup() {
1790
- var C, m, x;
1789
+ var f, I, G;
1791
1790
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1792
1791
  const {
1793
1792
  allowDropdown: e,
1794
- separateDialCode: i,
1795
- showFlags: s,
1796
- containerClass: o,
1797
- hiddenInput: a,
1793
+ separateDialCode: n,
1794
+ showFlags: r,
1795
+ containerClass: s,
1796
+ hiddenInput: l,
1798
1797
  dropdownContainer: c,
1799
- fixDropdownWidth: g,
1800
- useFullscreenPopup: f,
1801
- countrySearch: v,
1798
+ fixDropdownWidth: C,
1799
+ useFullscreenPopup: p,
1800
+ countrySearch: w,
1802
1801
  i18n: b
1803
1802
  } = this.options;
1804
- let S = "iti";
1805
- e && (S += " iti--allow-dropdown"), s && (S += " iti--show-flags"), o && (S += ` ${o}`), f || (S += " iti--inline-dropdown");
1806
- const L = E("div", { class: S });
1807
- if ((C = this.telInput.parentNode) == null || C.insertBefore(L, this.telInput), e || s || i) {
1808
- this.countryContainer = E(
1803
+ let v = "iti";
1804
+ e && (v += " iti--allow-dropdown"), r && (v += " iti--show-flags"), s && (v += ` ${s}`), p || (v += " iti--inline-dropdown");
1805
+ const L = A("div", { class: v });
1806
+ if ((f = this.telInput.parentNode) == null || f.insertBefore(L, this.telInput), e || r || n) {
1807
+ this.countryContainer = A(
1809
1808
  "div",
1810
1809
  { class: "iti__country-container" },
1811
1810
  L
1812
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = E(
1811
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = A(
1813
1812
  "button",
1814
1813
  {
1815
1814
  type: "button",
@@ -1821,30 +1820,30 @@ class j2 {
1821
1820
  role: "combobox"
1822
1821
  },
1823
1822
  this.countryContainer
1824
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = E(
1823
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = A(
1825
1824
  "div",
1826
1825
  { class: "iti__selected-country" },
1827
1826
  this.countryContainer
1828
1827
  );
1829
- const O = E("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1830
- if (this.selectedCountryInner = E("div", { class: "iti__flag" }, O), this.selectedCountryA11yText = E(
1828
+ const F = A("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1829
+ if (this.selectedCountryInner = A("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = A(
1831
1830
  "span",
1832
1831
  { class: "iti__a11y-text" },
1833
1832
  this.selectedCountryInner
1834
- ), e && (this.dropdownArrow = E(
1833
+ ), e && (this.dropdownArrow = A(
1835
1834
  "div",
1836
1835
  { class: "iti__arrow", "aria-hidden": "true" },
1837
- O
1838
- )), i && (this.selectedDialCode = E(
1836
+ F
1837
+ )), n && (this.selectedDialCode = A(
1839
1838
  "div",
1840
- { class: "iti__selected-dial-code", "aria-hidden": "true" },
1839
+ { class: "iti__selected-dial-code", "aria-hidden": "true", dir: "ltr" },
1841
1840
  this.selectedCountry
1842
1841
  )), e) {
1843
- const T = g ? "" : "iti--flexible-dropdown-width";
1844
- if (this.dropdownContent = E("div", {
1842
+ const D = C ? "" : "iti--flexible-dropdown-width";
1843
+ if (this.dropdownContent = A("div", {
1845
1844
  id: `iti-${this.id}__dropdown-content`,
1846
- class: `iti__dropdown-content iti__hide ${T}`
1847
- }), v && (this.searchInput = E(
1845
+ class: `iti__dropdown-content iti__hide ${D}`
1846
+ }), w && (this.searchInput = A(
1848
1847
  "input",
1849
1848
  {
1850
1849
  type: "text",
@@ -1858,11 +1857,11 @@ class j2 {
1858
1857
  autocomplete: "off"
1859
1858
  },
1860
1859
  this.dropdownContent
1861
- ), this.searchResultsA11yText = E(
1860
+ ), this.searchResultsA11yText = A(
1862
1861
  "span",
1863
1862
  { class: "iti__a11y-text" },
1864
1863
  this.dropdownContent
1865
- )), this.countryList = E(
1864
+ )), this.countryList = A(
1866
1865
  "ul",
1867
1866
  {
1868
1867
  class: "iti__country-list",
@@ -1871,27 +1870,27 @@ class j2 {
1871
1870
  "aria-label": b.countryListAriaLabel
1872
1871
  },
1873
1872
  this.dropdownContent
1874
- ), this._appendListItems(), v && this._updateSearchResultsText(), c) {
1875
- let G = "iti iti--container";
1876
- o && (G += ` ${o}`), f ? G += " iti--fullscreen-popup" : G += " iti--inline-dropdown", this.dropdown = E("div", { class: G }), this.dropdown.appendChild(this.dropdownContent);
1873
+ ), this._appendListItems(), w && this._updateSearchResultsText(), c) {
1874
+ let k = "iti iti--container";
1875
+ s && (k += ` ${s}`), p ? k += " iti--fullscreen-popup" : k += " iti--inline-dropdown", this.dropdown = A("div", { class: k }), this.dropdown.appendChild(this.dropdownContent);
1877
1876
  } else
1878
1877
  this.countryContainer.appendChild(this.dropdownContent);
1879
1878
  }
1880
1879
  }
1881
- if (L.appendChild(this.telInput), this._updateInputPadding(), a) {
1882
- const O = this.telInput.getAttribute("name") || "", T = a(O);
1883
- if (T.phone) {
1884
- const G = (m = this.telInput.form) == null ? void 0 : m.querySelector(`input[name="${T.phone}"]`);
1885
- G ? this.hiddenInput = G : (this.hiddenInput = E("input", {
1880
+ if (L.appendChild(this.telInput), this._updateInputPadding(), l) {
1881
+ const F = this.telInput.getAttribute("name") || "", D = l(F);
1882
+ if (D.phone) {
1883
+ const k = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${D.phone}"]`);
1884
+ k ? this.hiddenInput = k : (this.hiddenInput = A("input", {
1886
1885
  type: "hidden",
1887
- name: T.phone
1886
+ name: D.phone
1888
1887
  }), L.appendChild(this.hiddenInput));
1889
1888
  }
1890
- if (T.country) {
1891
- const G = (x = this.telInput.form) == null ? void 0 : x.querySelector(`input[name="${T.country}"]`);
1892
- G ? this.hiddenInputCountry = G : (this.hiddenInputCountry = E("input", {
1889
+ if (D.country) {
1890
+ const k = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${D.country}"]`);
1891
+ k ? this.hiddenInputCountry = k : (this.hiddenInputCountry = A("input", {
1893
1892
  type: "hidden",
1894
- name: T.country
1893
+ name: D.country
1895
1894
  }), L.appendChild(this.hiddenInputCountry));
1896
1895
  }
1897
1896
  }
@@ -1899,36 +1898,36 @@ class j2 {
1899
1898
  //* For each country: add a country list item <li> to the countryList <ul> container.
1900
1899
  _appendListItems() {
1901
1900
  for (let e = 0; e < this.countries.length; e++) {
1902
- const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", o = E(
1901
+ const n = this.countries[e], r = e === 0 ? "iti__highlight" : "", s = A(
1903
1902
  "li",
1904
1903
  {
1905
- id: `iti-${this.id}__item-${i.iso2}`,
1906
- class: `iti__country ${s}`,
1904
+ id: `iti-${this.id}__item-${n.iso2}`,
1905
+ class: `iti__country ${r}`,
1907
1906
  tabindex: "-1",
1908
1907
  role: "option",
1909
- "data-dial-code": i.dialCode,
1910
- "data-country-code": i.iso2,
1908
+ "data-dial-code": n.dialCode,
1909
+ "data-country-code": n.iso2,
1911
1910
  "aria-selected": "false"
1912
1911
  },
1913
1912
  this.countryList
1914
1913
  );
1915
- i.nodeById[this.id] = o;
1916
- let a = "";
1917
- this.options.showFlags && (a += `<div class='iti__flag iti__${i.iso2}'></div>`), a += `<span class='iti__country-name'>${i.name}</span>`, a += `<span class='iti__dial-code'>+${i.dialCode}</span>`, o.insertAdjacentHTML("beforeend", a);
1914
+ n.nodeById[this.id] = s;
1915
+ let l = "";
1916
+ 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' dir='ltr'>+${n.dialCode}</span>`, s.insertAdjacentHTML("beforeend", l);
1918
1917
  }
1919
1918
  }
1920
1919
  //* Set the initial state of the input value and the selected country by:
1921
1920
  //* 1. Extracting a dial code from the given number
1922
1921
  //* 2. Using explicit initialCountry
1923
1922
  _setInitialState(e = !1) {
1924
- const i = this.telInput.getAttribute("value"), s = this.telInput.value, a = i && i.charAt(0) === "+" && (!s || s.charAt(0) !== "+") ? i : s, c = this._getDialCode(a), g = o2(a), { initialCountry: f, geoIpLookup: v } = this.options, b = f === "auto" && v;
1925
- if (c && !g)
1926
- this._updateCountryFromNumber(a);
1923
+ const n = this.telInput.getAttribute("value"), r = this.telInput.value, l = n && n.charAt(0) === "+" && (!r || r.charAt(0) !== "+") ? n : r, c = this._getDialCode(l), C = o2(l), { initialCountry: p, geoIpLookup: w } = this.options, b = p === "auto" && w;
1924
+ if (c && !C)
1925
+ this._updateCountryFromNumber(l);
1927
1926
  else if (!b || e) {
1928
- const S = f ? f.toLowerCase() : "";
1929
- S && this._getCountryData(S, !0) ? this._setCountry(S) : c && g ? this._setCountry("us") : this._setCountry();
1927
+ const v = p ? p.toLowerCase() : "";
1928
+ v && this._getCountryData(v, !0) ? this._setCountry(v) : c && C ? this._setCountry("us") : this._setCountry();
1930
1929
  }
1931
- a && this._updateValFromNumber(a);
1930
+ l && this._updateValFromNumber(l);
1932
1931
  }
1933
1932
  //* Initialise the main event listeners: input keyup, and click selected country.
1934
1933
  _initListeners() {
@@ -1946,14 +1945,14 @@ class j2 {
1946
1945
  }
1947
1946
  //* initialise the dropdown listeners.
1948
1947
  _initDropdownListeners() {
1949
- this._handleLabelClick = (i) => {
1950
- this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : i.preventDefault();
1948
+ this._handleLabelClick = (n) => {
1949
+ this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : n.preventDefault();
1951
1950
  };
1952
1951
  const e = this.telInput.closest("label");
1953
1952
  e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1954
1953
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
1955
- }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (i) => {
1956
- this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(i.key) && (i.preventDefault(), i.stopPropagation(), this._openDropdown()), i.key === "Tab" && this._closeDropdown();
1954
+ }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (n) => {
1955
+ this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), this._openDropdown()), n.key === "Tab" && this._closeDropdown();
1957
1956
  }, this.countryContainer.addEventListener(
1958
1957
  "keydown",
1959
1958
  this._handleCountryContainerKeydown
@@ -1961,19 +1960,19 @@ class j2 {
1961
1960
  }
1962
1961
  //* Init many requests: utils script / geo ip lookup.
1963
1962
  _initRequests() {
1964
- let { loadUtils: e, initialCountry: i, geoIpLookup: s } = this.options;
1965
- e && !y.utils ? (this._handlePageLoad = () => {
1966
- var a;
1967
- window.removeEventListener("load", this._handlePageLoad), (a = y.attachUtils(e)) == null || a.catch(() => {
1963
+ let { loadUtils: e, initialCountry: n, geoIpLookup: r } = this.options;
1964
+ e && !m.utils ? (this._handlePageLoad = () => {
1965
+ var l;
1966
+ window.removeEventListener("load", this._handlePageLoad), (l = m.attachUtils(e)) == null || l.catch(() => {
1968
1967
  });
1969
- }, y.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), i === "auto" && s && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1968
+ }, m.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && r && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1970
1969
  }
1971
1970
  //* Perform the geo ip lookup.
1972
1971
  _loadAutoCountry() {
1973
- y.autoCountry ? this.handleAutoCountry() : y.startedLoadingAutoCountry || (y.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1972
+ m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1974
1973
  (e = "") => {
1975
- const i = e.toLowerCase();
1976
- i && this._getCountryData(i, !0) ? (y.autoCountry = i, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1974
+ const n = e.toLowerCase();
1975
+ n && this._getCountryData(n, !0) ? (m.autoCountry = n, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1977
1976
  },
1978
1977
  () => {
1979
1978
  this._setInitialState(!0), $1("rejectAutoCountryPromise");
@@ -1985,78 +1984,78 @@ class j2 {
1985
1984
  }
1986
1985
  //* Initialize the tel input listeners.
1987
1986
  _initTelInputListeners() {
1988
- const { strictMode: e, formatAsYouType: i, separateDialCode: s, 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) === "+" && s && a && c) {
1992
- const L = this.telInput.selectionStart || 0, C = this.telInput.value.substring(0, L - 1), m = this.telInput.value.substring(L);
1993
- this.telInput.value = C + m, this._openDropdownWithPlus();
1987
+ const { strictMode: e, formatAsYouType: n, separateDialCode: r, formatOnDisplay: s, allowDropdown: l, countrySearch: c } = this.options;
1988
+ let C = !1;
1989
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (C = !0), this._handleInputEvent = (p) => {
1990
+ if (this.isAndroid && (p == null ? void 0 : p.data) === "+" && r && l && c) {
1991
+ const L = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, L - 1), I = this.telInput.value.substring(L);
1992
+ this.telInput.value = f + I, this._openDropdownWithPlus();
1994
1993
  return;
1995
1994
  }
1996
1995
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1997
- const v = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), b = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
1998
- v || b && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
1999
- const S = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
2000
- if (i && !g && !S) {
2001
- const L = this.telInput.selectionStart || 0, m = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, x = (f == null ? void 0 : f.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), T = H2(m, O, L, x);
2002
- this.telInput.value = O, this.telInput.setSelectionRange(T, T);
1996
+ const w = (p == null ? void 0 : p.data) && /[^+0-9]/.test(p.data), b = (p == null ? void 0 : p.inputType) === "insertFromPaste" && this.telInput.value;
1997
+ w || b && !e ? C = !0 : /[^+0-9]/.test(this.telInput.value) || (C = !1);
1998
+ const v = (p == null ? void 0 : p.detail) && p.detail.isSetNumber && !s;
1999
+ if (n && !C && !v) {
2000
+ const L = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, G = (p == null ? void 0 : p.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), D = W2(I, F, L, G);
2001
+ this.telInput.value = F, this.telInput.setSelectionRange(D, D);
2003
2002
  }
2004
- }, this.telInput.addEventListener("input", this._handleInputEvent), (e || s) && (this._handleKeydownEvent = (f) => {
2005
- if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
2006
- if (s && a && c && f.key === "+") {
2007
- f.preventDefault(), this._openDropdownWithPlus();
2003
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || r) && (this._handleKeydownEvent = (p) => {
2004
+ if (p.key && p.key.length === 1 && !p.altKey && !p.ctrlKey && !p.metaKey) {
2005
+ if (r && l && c && p.key === "+") {
2006
+ p.preventDefault(), this._openDropdownWithPlus();
2008
2007
  return;
2009
2008
  }
2010
2009
  if (e) {
2011
- const v = this.telInput.value, S = !(v.charAt(0) === "+") && this.telInput.selectionStart === 0 && f.key === "+", L = /^[0-9]$/.test(f.key), C = s ? L : S || L, m = v.slice(0, this.telInput.selectionStart) + f.key + v.slice(this.telInput.selectionEnd), x = this._getFullNumber(m), O = y.utils.getCoreNumber(x, this.selectedCountryData.iso2), T = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, f1 = this._getNewCountryFromNumber(x) !== null;
2012
- (!C || T && !f1 && !S) && f.preventDefault();
2010
+ const w = this.telInput.value, v = !(w.charAt(0) === "+") && this.telInput.selectionStart === 0 && p.key === "+", L = /^[0-9]$/.test(p.key), f = r ? L : v || L, I = w.slice(0, this.telInput.selectionStart) + p.key + w.slice(this.telInput.selectionEnd), G = this._getFullNumber(I), F = m.utils.getCoreNumber(G, this.selectedCountryData.iso2), D = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength, f1 = this._getNewCountryFromNumber(G) !== null;
2011
+ (!f || D && !f1 && !v) && p.preventDefault();
2013
2012
  }
2014
2013
  }
2015
2014
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
2016
2015
  }
2017
2016
  //* Adhere to the input's maxlength attr.
2018
2017
  _cap(e) {
2019
- const i = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2020
- return i && e.length > i ? e.substr(0, i) : e;
2018
+ const n = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2019
+ return n && e.length > n ? e.substring(0, n) : e;
2021
2020
  }
2022
2021
  //* Trigger a custom event on the input.
2023
- _trigger(e, i = {}) {
2024
- const s = new CustomEvent(e, {
2022
+ _trigger(e, n = {}) {
2023
+ const r = new CustomEvent(e, {
2025
2024
  bubbles: !0,
2026
2025
  cancelable: !0,
2027
- detail: i
2026
+ detail: n
2028
2027
  });
2029
- this.telInput.dispatchEvent(s);
2028
+ this.telInput.dispatchEvent(r);
2030
2029
  }
2031
2030
  //* Open the dropdown.
2032
2031
  _openDropdown() {
2033
- const { fixDropdownWidth: e, countrySearch: i } = this.options;
2034
- if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), i) {
2035
- const s = this.countryList.firstElementChild;
2036
- s && (this._highlightListItem(s, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2032
+ const { fixDropdownWidth: e, countrySearch: n } = this.options;
2033
+ 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) {
2034
+ const r = this.countryList.firstElementChild;
2035
+ r && (this._highlightListItem(r, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2037
2036
  }
2038
2037
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2039
2038
  }
2040
2039
  //* Set the dropdown position
2041
2040
  _setDropdownPosition() {
2042
2041
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2043
- const e = this.telInput.getBoundingClientRect(), i = this.telInput.offsetHeight;
2044
- this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + i}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2042
+ const e = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2043
+ 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));
2045
2044
  }
2046
2045
  }
2047
2046
  //* We only bind dropdown listeners when the dropdown is open.
2048
2047
  _bindDropdownListeners() {
2049
- this._handleMouseoverCountryList = (o) => {
2048
+ this._handleMouseoverCountryList = (s) => {
2050
2049
  var c;
2051
- const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2052
- a && this._highlightListItem(a, !1);
2050
+ const l = (c = s.target) == null ? void 0 : c.closest(".iti__country");
2051
+ l && this._highlightListItem(l, !1);
2053
2052
  }, this.countryList.addEventListener(
2054
2053
  "mouseover",
2055
2054
  this._handleMouseoverCountryList
2056
- ), this._handleClickCountryList = (o) => {
2055
+ ), this._handleClickCountryList = (s) => {
2057
2056
  var c;
2058
- const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2059
- a && this._selectListItem(a);
2057
+ const l = (c = s.target) == null ? void 0 : c.closest(".iti__country");
2058
+ l && this._selectListItem(l);
2060
2059
  }, this.countryList.addEventListener("click", this._handleClickCountryList);
2061
2060
  let e = !0;
2062
2061
  this._handleClickOffToClose = () => {
@@ -2065,69 +2064,65 @@ class j2 {
2065
2064
  "click",
2066
2065
  this._handleClickOffToClose
2067
2066
  );
2068
- let i = "", s = null;
2069
- if (this._handleKeydownOnDropdown = (o) => {
2070
- ["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(), s && clearTimeout(s), i += o.key.toLowerCase(), this._searchForCountry(i), s = setTimeout(() => {
2071
- i = "";
2067
+ let n = "", r = null;
2068
+ if (this._handleKeydownOnDropdown = (s) => {
2069
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(s.key) && (s.preventDefault(), s.stopPropagation(), s.key === "ArrowUp" || s.key === "ArrowDown" ? this._handleUpDownKey(s.key) : s.key === "Enter" ? this._handleEnterKey() : s.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(s.key) && (s.stopPropagation(), r && clearTimeout(r), n += s.key.toLowerCase(), this._searchForCountry(n), r = setTimeout(() => {
2070
+ n = "";
2072
2071
  }, 1e3));
2073
2072
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2074
- const o = () => {
2073
+ const s = () => {
2075
2074
  const c = this.searchInput.value.trim();
2076
2075
  c ? this._filterCountries(c) : this._filterCountries("", !0);
2077
2076
  };
2078
- let a = null;
2077
+ let l = null;
2079
2078
  this._handleSearchChange = () => {
2080
- a && clearTimeout(a), a = setTimeout(() => {
2081
- o(), a = null;
2079
+ l && clearTimeout(l), l = setTimeout(() => {
2080
+ s(), l = null;
2082
2081
  }, 100);
2083
2082
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
2084
2083
  }
2085
2084
  }
2086
2085
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2087
2086
  _searchForCountry(e) {
2088
- for (let i = 0; i < this.countries.length; i++) {
2089
- const s = this.countries[i];
2090
- if (s.name.substr(0, e.length).toLowerCase() === e) {
2091
- const a = s.nodeById[this.id];
2092
- this._highlightListItem(a, !1), this._scrollTo(a);
2087
+ for (const n of this.countries)
2088
+ if (n.name.substring(0, e.length).toLowerCase() === e) {
2089
+ const s = n.nodeById[this.id];
2090
+ this._highlightListItem(s, !1), this._scrollTo(s);
2093
2091
  break;
2094
2092
  }
2095
- }
2096
2093
  }
2097
2094
  //* Country search enabled: Filter the countries according to the search query.
2098
- _filterCountries(e, i = !1) {
2099
- let s = !0;
2095
+ _filterCountries(e, n = !1) {
2096
+ let r = !0;
2100
2097
  this.countryList.innerHTML = "";
2101
- const o = r2(e), a = o.length, c = [], g = [], f = [], v = [], b = [], S = [];
2102
- for (let C = 0; C < this.countries.length; C++) {
2103
- const m = this.countries[C], x = r2(m.name), O = m.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((T) => T[0]).join("").toLowerCase();
2104
- i || a === 0 ? f.push(m) : m.iso2.toLowerCase() === o ? c.push(m) : x.startsWith(o) ? g.push(m) : x.includes(o) ? f.push(m) : o === m.dialCode || o === `+${m.dialCode}` ? v.push(m) : `+${m.dialCode}`.includes(o) ? b.push(m) : O.includes(o) && S.push(m);
2105
- }
2098
+ const s = s2(e), l = s.length, c = [], C = [], p = [], w = [], b = [], v = [];
2099
+ for (const f of this.countries)
2100
+ n || l === 0 ? p.push(f) : f.iso2 === s ? c.push(f) : f.normalisedName.startsWith(s) ? C.push(f) : f.normalisedName.includes(s) ? p.push(f) : s === f.dialCode || s === f.dialCodePlus ? w.push(f) : f.dialCodePlus.includes(s) ? b.push(f) : f.initials.includes(s) && v.push(f);
2106
2101
  const L = [
2107
- ...c.sort((C, m) => C.priority - m.priority),
2108
- ...g.sort((C, m) => C.priority - m.priority),
2109
- ...f.sort((C, m) => C.priority - m.priority),
2110
- ...v.sort((C, m) => C.priority - m.priority),
2111
- ...b.sort((C, m) => C.priority - m.priority),
2112
- ...S.sort((C, m) => C.priority - m.priority)
2102
+ ...c.sort((f, I) => f.priority - I.priority),
2103
+ ...C.sort((f, I) => f.priority - I.priority),
2104
+ ...p.sort((f, I) => f.priority - I.priority),
2105
+ ...w.sort((f, I) => f.priority - I.priority),
2106
+ ...b.sort((f, I) => f.priority - I.priority),
2107
+ ...v.sort((f, I) => f.priority - I.priority)
2113
2108
  ];
2114
- for (const C of L) {
2115
- const m = C.nodeById[this.id];
2116
- m && (this.countryList.appendChild(m), s && (this._highlightListItem(m, !1), s = !1));
2109
+ for (const f of L) {
2110
+ const I = f.nodeById[this.id];
2111
+ I && (this.countryList.appendChild(I), r && (this._highlightListItem(I, !1), r = !1));
2117
2112
  }
2118
- s && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2113
+ r && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2119
2114
  }
2120
2115
  //* Update search results text (for a11y).
2121
2116
  _updateSearchResultsText() {
2122
- const { i18n: e } = this.options, i = this.countryList.childElementCount;
2123
- let s;
2124
- "searchResultsText" in e ? s = e.searchResultsText(i) : i === 0 ? s = e.zeroSearchResults : i === 1 ? s = e.oneSearchResult : s = e.multipleSearchResults.replace("${count}", i.toString()), this.searchResultsA11yText.textContent = s;
2117
+ const { i18n: e } = this.options, n = this.countryList.childElementCount;
2118
+ let r;
2119
+ "searchResultsText" in e ? r = e.searchResultsText(n) : n === 0 ? r = e.zeroSearchResults : n === 1 ? r = e.oneSearchResult : r = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = r;
2125
2120
  }
2126
2121
  //* Highlight the next/prev item in the list (and ensure it is visible).
2127
2122
  _handleUpDownKey(e) {
2128
- var s, o;
2129
- let i = e === "ArrowUp" ? (s = this.highlightedItem) == null ? void 0 : s.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2130
- !i && this.countryList.childElementCount > 1 && (i = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), i && (this._scrollTo(i), this._highlightListItem(i, !1));
2123
+ var r, s;
2124
+ let n = e === "ArrowUp" ? (r = this.highlightedItem) == null ? void 0 : r.previousElementSibling : (s = this.highlightedItem) == null ? void 0 : s.nextElementSibling;
2125
+ !n && this.countryList.childElementCount > 1 && (n = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2131
2126
  }
2132
2127
  //* Select the currently highlighted item.
2133
2128
  _handleEnterKey() {
@@ -2136,122 +2131,122 @@ class j2 {
2136
2131
  //* Update the input's value to the given val (format first if possible)
2137
2132
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2138
2133
  _updateValFromNumber(e) {
2139
- let i = e;
2140
- if (this.options.formatOnDisplay && y.utils && this.selectedCountryData) {
2141
- const s = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = y.utils.numberFormat, c = s ? o : a;
2142
- i = y.utils.formatNumber(
2143
- i,
2134
+ let n = e;
2135
+ if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
2136
+ const r = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: l } = m.utils.numberFormat, c = r ? s : l;
2137
+ n = m.utils.formatNumber(
2138
+ n,
2144
2139
  this.selectedCountryData.iso2,
2145
2140
  c
2146
2141
  );
2147
2142
  }
2148
- i = this._beforeSetNumber(i), this.telInput.value = i;
2143
+ n = this._beforeSetNumber(n), this.telInput.value = n;
2149
2144
  }
2150
2145
  //* Check if need to select a new country based on the given number
2151
2146
  //* Note: called from _setInitialState, keyup handler, setNumber.
2152
2147
  _updateCountryFromNumber(e) {
2153
- const i = this._getNewCountryFromNumber(e);
2154
- return i !== null ? this._setCountry(i) : !1;
2148
+ const n = this._getNewCountryFromNumber(e);
2149
+ return n !== null ? this._setCountry(n) : !1;
2155
2150
  }
2156
2151
  _ensureHasDialCode(e) {
2157
- const { dialCode: i, nationalPrefix: s } = this.selectedCountryData;
2158
- if (e.charAt(0) === "+" || !i)
2152
+ const { dialCode: n, nationalPrefix: r } = this.selectedCountryData;
2153
+ if (e.charAt(0) === "+" || !n)
2159
2154
  return e;
2160
- const c = s && e.charAt(0) === s && !this.options.separateDialCode ? e.substring(1) : e;
2161
- return `+${i}${c}`;
2155
+ const c = r && e.charAt(0) === r && !this.options.separateDialCode ? e.substring(1) : e;
2156
+ return `+${n}${c}`;
2162
2157
  }
2163
2158
  // Get the country ISO2 code from the given number
2164
2159
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2165
2160
  // NOTE: consider refactoring this to be more clear
2166
2161
  _getNewCountryFromNumber(e) {
2167
- const i = e.indexOf("+");
2168
- let s = i ? e.substring(i) : e;
2169
- const o = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
2170
- s = this._ensureHasDialCode(s);
2171
- const c = this._getDialCode(s, !0), g = c1(s);
2162
+ const n = e.indexOf("+");
2163
+ let r = n ? e.substring(n) : e;
2164
+ const s = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
2165
+ r = this._ensureHasDialCode(r);
2166
+ const c = this._getDialCode(r, !0), C = c1(r);
2172
2167
  if (c) {
2173
- const f = c1(c), v = this.dialCodeToIso2Map[f];
2174
- if (!o && this.defaultCountry && v.includes(this.defaultCountry))
2168
+ const p = c1(c), w = this.dialCodeToIso2Map[p];
2169
+ if (!s && this.defaultCountry && w.includes(this.defaultCountry))
2175
2170
  return this.defaultCountry;
2176
- const b = this.selectedCountryData.areaCodes && g.length > f.length, S = o && v.includes(o) && !b;
2177
- if (!(a === "1" && o2(g)) && !S) {
2178
- for (let C = 0; C < v.length; C++)
2179
- if (v[C])
2180
- return v[C];
2171
+ const b = this.selectedCountryData.areaCodes && C.length > p.length, v = s && w.includes(s) && !b;
2172
+ if (!(l === "1" && o2(C)) && !v) {
2173
+ for (const f of w)
2174
+ if (f)
2175
+ return f;
2181
2176
  }
2182
2177
  } else {
2183
- if (s.charAt(0) === "+" && g.length)
2178
+ if (r.charAt(0) === "+" && C.length)
2184
2179
  return "";
2185
- if ((!s || s === "+") && !this.selectedCountryData.iso2)
2180
+ if ((!r || r === "+") && !this.selectedCountryData.iso2)
2186
2181
  return this.defaultCountry;
2187
2182
  }
2188
2183
  return null;
2189
2184
  }
2190
2185
  //* Remove highlighting from other list items and highlight the given item.
2191
- _highlightListItem(e, i) {
2192
- const s = this.highlightedItem;
2193
- if (s && (s.classList.remove("iti__highlight"), s.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2186
+ _highlightListItem(e, n) {
2187
+ const r = this.highlightedItem;
2188
+ if (r && (r.classList.remove("iti__highlight"), r.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2194
2189
  this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true");
2195
- const o = this.highlightedItem.getAttribute("id") || "";
2196
- this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
2190
+ const s = this.highlightedItem.getAttribute("id") || "";
2191
+ this.selectedCountry.setAttribute("aria-activedescendant", s), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", s);
2197
2192
  }
2198
- i && this.highlightedItem.focus();
2193
+ n && this.highlightedItem.focus();
2199
2194
  }
2200
2195
  //* Find the country data for the given iso2 code
2201
- //* the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
2202
- _getCountryData(e, i) {
2203
- for (let s = 0; s < this.countries.length; s++)
2204
- if (this.countries[s].iso2 === e)
2205
- return this.countries[s];
2206
- if (i)
2196
+ //* the allowFail option is only used during init() for the initialCountry option, and for the iso2 returned from geoIpLookup - in these 2 cases we don't want to error out
2197
+ _getCountryData(e, n) {
2198
+ const r = this.countryByIso2.get(e);
2199
+ if (r)
2200
+ return r;
2201
+ if (n)
2207
2202
  return null;
2208
2203
  throw new Error(`No country data for '${e}'`);
2209
2204
  }
2210
2205
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2211
2206
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2212
2207
  _setCountry(e) {
2213
- const { separateDialCode: i, showFlags: s, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2208
+ const { separateDialCode: n, showFlags: r, i18n: s } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2214
2209
  if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2215
- let c = "", g = "";
2216
- e && s ? (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;
2210
+ let c = "", C = "";
2211
+ e && r ? (c = `iti__flag iti__${e}`, C = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", C = s.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = C;
2217
2212
  }
2218
- if (this._setSelectedCountryTitleAttribute(e, i), i) {
2213
+ if (this._setSelectedCountryTitleAttribute(e, n), n) {
2219
2214
  const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2220
2215
  this.selectedDialCode.innerHTML = c, this._updateInputPadding();
2221
2216
  }
2222
- return this._updatePlaceholder(), this._updateMaxLength(), a.iso2 !== e;
2217
+ return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== e;
2223
2218
  }
2224
2219
  //* Update the input padding to make space for the selected country/dial code.
2225
2220
  _updateInputPadding() {
2226
2221
  if (this.selectedCountry) {
2227
- const i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6;
2228
- this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${i}px` : this.telInput.style.paddingRight = `${i}px`;
2222
+ const n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth()) + 6;
2223
+ this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${n}px` : this.telInput.style.paddingRight = `${n}px`;
2229
2224
  }
2230
2225
  }
2231
2226
  //* Update the maximum valid number length for the currently selected country.
2232
2227
  _updateMaxLength() {
2233
- const { strictMode: e, placeholderNumberType: i, validationNumberTypes: s } = this.options, { iso2: o } = this.selectedCountryData;
2234
- if (e && y.utils)
2235
- if (o) {
2236
- const a = y.utils.numberType[i];
2237
- let c = y.utils.getExampleNumber(
2238
- o,
2228
+ const { strictMode: e, placeholderNumberType: n, validationNumberTypes: r } = this.options, { iso2: s } = this.selectedCountryData;
2229
+ if (e && m.utils)
2230
+ if (s) {
2231
+ const l = m.utils.numberType[n];
2232
+ let c = m.utils.getExampleNumber(
2233
+ s,
2239
2234
  !1,
2240
- a,
2235
+ l,
2241
2236
  !0
2242
- ), g = c;
2243
- for (; y.utils.isPossibleNumber(c, o, s); )
2244
- g = c, c += "0";
2245
- const f = y.utils.getCoreNumber(g, o);
2246
- this.maxCoreNumberLength = f.length, o === "by" && (this.maxCoreNumberLength = f.length + 1);
2237
+ ), C = c;
2238
+ for (; m.utils.isPossibleNumber(c, s, r); )
2239
+ C = c, c += "0";
2240
+ const p = m.utils.getCoreNumber(C, s);
2241
+ this.maxCoreNumberLength = p.length, s === "by" && (this.maxCoreNumberLength = p.length + 1);
2247
2242
  } else
2248
2243
  this.maxCoreNumberLength = null;
2249
2244
  }
2250
- _setSelectedCountryTitleAttribute(e = null, i) {
2245
+ _setSelectedCountryTitleAttribute(e = null, n) {
2251
2246
  if (!this.selectedCountry)
2252
2247
  return;
2253
- let s;
2254
- e && !i ? s = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? s = this.selectedCountryData.name : s = "Unknown", this.selectedCountry.setAttribute("title", s);
2248
+ let r;
2249
+ e && !n ? r = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? r = this.selectedCountryData.name : r = "Unknown", this.selectedCountry.setAttribute("title", r);
2255
2250
  }
2256
2251
  //* When the input is in a hidden container during initialisation, we must inject some markup
2257
2252
  //* into the end of the DOM to calculate the correct offsetWidth.
@@ -2261,12 +2256,12 @@ class j2 {
2261
2256
  if (this.telInput.parentNode) {
2262
2257
  const e = this.telInput.parentNode.cloneNode(!1);
2263
2258
  e.style.visibility = "hidden", document.body.appendChild(e);
2264
- const i = this.countryContainer.cloneNode();
2265
- e.appendChild(i);
2266
- const s = this.selectedCountry.cloneNode(!0);
2267
- i.appendChild(s);
2268
- const o = s.offsetWidth;
2269
- return document.body.removeChild(e), o;
2259
+ const n = this.countryContainer.cloneNode();
2260
+ e.appendChild(n);
2261
+ const r = this.selectedCountry.cloneNode(!0);
2262
+ n.appendChild(r);
2263
+ const s = r.offsetWidth;
2264
+ return document.body.removeChild(e), s;
2270
2265
  }
2271
2266
  return 0;
2272
2267
  }
@@ -2274,26 +2269,26 @@ class j2 {
2274
2269
  _updatePlaceholder() {
2275
2270
  const {
2276
2271
  autoPlaceholder: e,
2277
- placeholderNumberType: i,
2278
- nationalMode: s,
2279
- customPlaceholder: o
2280
- } = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2281
- if (y.utils && a) {
2282
- const c = y.utils.numberType[i];
2283
- let g = this.selectedCountryData.iso2 ? y.utils.getExampleNumber(
2272
+ placeholderNumberType: n,
2273
+ nationalMode: r,
2274
+ customPlaceholder: s
2275
+ } = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2276
+ if (m.utils && l) {
2277
+ const c = m.utils.numberType[n];
2278
+ let C = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
2284
2279
  this.selectedCountryData.iso2,
2285
- s,
2280
+ r,
2286
2281
  c
2287
2282
  ) : "";
2288
- g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
2283
+ C = this._beforeSetNumber(C), typeof s == "function" && (C = s(C, this.selectedCountryData)), this.telInput.setAttribute("placeholder", C);
2289
2284
  }
2290
2285
  }
2291
2286
  //* Called when the user selects a list item from the dropdown.
2292
2287
  _selectListItem(e) {
2293
- const i = this._setCountry(
2288
+ const n = this._setCountry(
2294
2289
  e.getAttribute("data-country-code")
2295
2290
  );
2296
- this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), i && this._triggerCountryChange();
2291
+ this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2297
2292
  }
2298
2293
  //* Close the dropdown and unbind any listeners.
2299
2294
  _closeDropdown() {
@@ -2307,65 +2302,65 @@ class j2 {
2307
2302
  }
2308
2303
  //* Check if an element is visible within it's container, else scroll until it is.
2309
2304
  _scrollTo(e) {
2310
- const i = this.countryList, s = document.documentElement.scrollTop, o = i.offsetHeight, a = i.getBoundingClientRect().top + s, c = a + o, g = e.offsetHeight, f = e.getBoundingClientRect().top + s, v = f + g, b = f - a + i.scrollTop;
2311
- if (f < a)
2312
- i.scrollTop = b;
2313
- else if (v > c) {
2314
- const S = o - g;
2315
- i.scrollTop = b - S;
2305
+ const n = this.countryList, r = document.documentElement.scrollTop, s = n.offsetHeight, l = n.getBoundingClientRect().top + r, c = l + s, C = e.offsetHeight, p = e.getBoundingClientRect().top + r, w = p + C, b = p - l + n.scrollTop;
2306
+ if (p < l)
2307
+ n.scrollTop = b;
2308
+ else if (w > c) {
2309
+ const v = s - C;
2310
+ n.scrollTop = b - v;
2316
2311
  }
2317
2312
  }
2318
2313
  //* Replace any existing dial code with the new one
2319
2314
  //* Note: called from _selectListItem and setCountry
2320
2315
  _updateDialCode(e) {
2321
- const i = this.telInput.value, s = `+${e}`;
2322
- let o;
2323
- if (i.charAt(0) === "+") {
2324
- const a = this._getDialCode(i);
2325
- a ? o = i.replace(a, s) : o = s, this.telInput.value = o;
2316
+ const n = this.telInput.value, r = `+${e}`;
2317
+ let s;
2318
+ if (n.charAt(0) === "+") {
2319
+ const l = this._getDialCode(n);
2320
+ l ? s = n.replace(l, r) : s = r, this.telInput.value = s;
2326
2321
  }
2327
2322
  }
2328
2323
  //* Try and extract a valid international dial code from a full telephone number.
2329
2324
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2330
- _getDialCode(e, i) {
2331
- let s = "";
2325
+ _getDialCode(e, n) {
2326
+ let r = "";
2332
2327
  if (e.charAt(0) === "+") {
2333
- let o = "";
2334
- for (let a = 0; a < e.length; a++) {
2335
- const c = e.charAt(a);
2328
+ let s = "";
2329
+ for (let l = 0; l < e.length; l++) {
2330
+ const c = e.charAt(l);
2336
2331
  if (!isNaN(parseInt(c, 10))) {
2337
- if (o += c, i)
2338
- this.dialCodeToIso2Map[o] && (s = e.substr(0, a + 1));
2339
- else if (this.dialCodes[o]) {
2340
- s = e.substr(0, a + 1);
2332
+ if (s += c, n)
2333
+ this.dialCodeToIso2Map[s] && (r = e.substring(0, l + 1));
2334
+ else if (this.dialCodes.has(s)) {
2335
+ r = e.substring(0, l + 1);
2341
2336
  break;
2342
2337
  }
2343
- if (o.length === this.dialCodeMaxLen)
2338
+ if (s.length === this.dialCodeMaxLen)
2344
2339
  break;
2345
2340
  }
2346
2341
  }
2347
2342
  }
2348
- return s;
2343
+ return r;
2349
2344
  }
2350
2345
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2351
2346
  _getFullNumber(e) {
2352
- const i = e || this.telInput.value.trim(), { dialCode: s } = this.selectedCountryData;
2353
- let o;
2354
- const a = c1(i);
2355
- return this.options.separateDialCode && i.charAt(0) !== "+" && s && a ? o = `+${s}` : o = "", o + i;
2347
+ const n = e || this.telInput.value.trim(), { dialCode: r } = this.selectedCountryData;
2348
+ let s;
2349
+ const l = c1(n);
2350
+ return this.options.separateDialCode && n.charAt(0) !== "+" && r && l ? s = `+${r}` : s = "", s + n;
2356
2351
  }
2357
2352
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2358
2353
  _beforeSetNumber(e) {
2359
- let i = e;
2354
+ let n = e;
2360
2355
  if (this.options.separateDialCode) {
2361
- let s = this._getDialCode(i);
2362
- if (s) {
2363
- s = `+${this.selectedCountryData.dialCode}`;
2364
- const o = i[s.length] === " " || i[s.length] === "-" ? s.length + 1 : s.length;
2365
- i = i.substr(o);
2356
+ let r = this._getDialCode(n);
2357
+ if (r) {
2358
+ r = `+${this.selectedCountryData.dialCode}`;
2359
+ const s = n[r.length] === " " || n[r.length] === "-" ? r.length + 1 : r.length;
2360
+ n = n.substring(s);
2366
2361
  }
2367
2362
  }
2368
- return this._cap(i);
2363
+ return this._cap(n);
2369
2364
  }
2370
2365
  //* Trigger the 'countrychange' event.
2371
2366
  _triggerCountryChange() {
@@ -2373,28 +2368,28 @@ class j2 {
2373
2368
  }
2374
2369
  //* Format the number as the user types.
2375
2370
  _formatNumberAsYouType() {
2376
- const e = this._getFullNumber(), i = y.utils ? y.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: s } = this.selectedCountryData;
2377
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${s}`) ? (i.split(`+${s}`)[1] || "").trim() : i;
2371
+ const e = this._getFullNumber(), n = m.utils ? m.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: r } = this.selectedCountryData;
2372
+ return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${r}`) ? (n.split(`+${r}`)[1] || "").trim() : n;
2378
2373
  }
2379
2374
  //**************************
2380
2375
  //* SECRET PUBLIC METHODS
2381
2376
  //**************************
2382
2377
  //* This is called when the geoip call returns.
2383
2378
  handleAutoCountry() {
2384
- this.options.initialCountry === "auto" && y.autoCountry && (this.defaultCountry = y.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2379
+ this.options.initialCountry === "auto" && m.autoCountry && (this.defaultCountry = m.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2385
2380
  }
2386
2381
  //* This is called when the utils request completes.
2387
2382
  handleUtils() {
2388
- y.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2383
+ m.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2389
2384
  }
2390
2385
  //********************
2391
2386
  //* PUBLIC METHODS
2392
2387
  //********************
2393
2388
  //* Remove plugin.
2394
2389
  destroy() {
2395
- var a, c;
2390
+ var l, c;
2396
2391
  this.telInput.iti = void 0;
2397
- const { allowDropdown: e, separateDialCode: i } = this.options;
2392
+ const { allowDropdown: e, separateDialCode: n } = this.options;
2398
2393
  if (e) {
2399
2394
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2400
2395
  "click",
@@ -2403,28 +2398,28 @@ class j2 {
2403
2398
  "keydown",
2404
2399
  this._handleCountryContainerKeydown
2405
2400
  );
2406
- const g = this.telInput.closest("label");
2407
- g && g.removeEventListener("click", this._handleLabelClick);
2401
+ const C = this.telInput.closest("label");
2402
+ C && C.removeEventListener("click", this._handleLabelClick);
2408
2403
  }
2409
- const { form: s } = this.telInput;
2410
- this._handleHiddenInputSubmit && s && s.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2411
- const o = this.telInput.parentNode;
2412
- (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 y.instances[this.id];
2404
+ const { form: r } = this.telInput;
2405
+ 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);
2406
+ const s = this.telInput.parentNode;
2407
+ (l = s == null ? void 0 : s.parentNode) == null || l.insertBefore(this.telInput, s), (c = s == null ? void 0 : s.parentNode) == null || c.removeChild(s), delete m.instances[this.id];
2413
2408
  }
2414
2409
  //* Get the extension from the current number.
2415
2410
  getExtension() {
2416
- return y.utils ? y.utils.getExtension(
2411
+ return m.utils ? m.utils.getExtension(
2417
2412
  this._getFullNumber(),
2418
2413
  this.selectedCountryData.iso2
2419
2414
  ) : "";
2420
2415
  }
2421
2416
  //* Format the number to the given format.
2422
2417
  getNumber(e) {
2423
- if (y.utils) {
2424
- const { iso2: i } = this.selectedCountryData;
2425
- return y.utils.formatNumber(
2418
+ if (m.utils) {
2419
+ const { iso2: n } = this.selectedCountryData;
2420
+ return m.utils.formatNumber(
2426
2421
  this._getFullNumber(),
2427
- i,
2422
+ n,
2428
2423
  e
2429
2424
  );
2430
2425
  }
@@ -2432,7 +2427,7 @@ class j2 {
2432
2427
  }
2433
2428
  //* Get the type of the entered number e.g. landline/mobile.
2434
2429
  getNumberType() {
2435
- return y.utils ? y.utils.getNumberType(
2430
+ return m.utils ? m.utils.getNumberType(
2436
2431
  this._getFullNumber(),
2437
2432
  this.selectedCountryData.iso2
2438
2433
  ) : -99;
@@ -2443,49 +2438,46 @@ class j2 {
2443
2438
  }
2444
2439
  //* Get the validation error.
2445
2440
  getValidationError() {
2446
- if (y.utils) {
2441
+ if (m.utils) {
2447
2442
  const { iso2: e } = this.selectedCountryData;
2448
- return y.utils.getValidationError(this._getFullNumber(), e);
2443
+ return m.utils.getValidationError(this._getFullNumber(), e);
2449
2444
  }
2450
2445
  return -99;
2451
2446
  }
2452
- //* Validate the input val
2447
+ //* Validate the input val (with precise=false)
2453
2448
  isValidNumber() {
2454
- if (!this.selectedCountryData.iso2)
2455
- return !1;
2456
- const e = this._getFullNumber(), i = e.search(new RegExp("\\p{L}", "u"));
2457
- if (i > -1) {
2458
- const s = e.substring(0, i), o = this._utilsIsPossibleNumber(s), a = this._utilsIsPossibleNumber(e);
2459
- return o && a;
2460
- }
2461
- return this._utilsIsPossibleNumber(e);
2449
+ return this._validateNumber(!1);
2450
+ }
2451
+ //* Validate the input val (with precise=true)
2452
+ isValidNumberPrecise() {
2453
+ return this._validateNumber(!0);
2462
2454
  }
2463
2455
  _utilsIsPossibleNumber(e) {
2464
- return y.utils ? y.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2456
+ return m.utils ? m.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2465
2457
  }
2466
- //* Validate the input val (precise)
2467
- isValidNumberPrecise() {
2458
+ //* Shared internal validation logic to handle alpha character extension rules.
2459
+ _validateNumber(e) {
2468
2460
  if (!this.selectedCountryData.iso2)
2469
2461
  return !1;
2470
- const e = this._getFullNumber(), i = e.search(new RegExp("\\p{L}", "u"));
2471
- if (i > -1) {
2472
- const s = e.substring(0, i), o = this._utilsIsValidNumber(s), a = this._utilsIsValidNumber(e);
2473
- return o && a;
2462
+ const n = this._getFullNumber(), r = n.search(new RegExp("\\p{L}", "u")), s = (l) => e ? this._utilsIsValidNumber(l) : this._utilsIsPossibleNumber(l);
2463
+ if (r > -1) {
2464
+ const l = n.substring(0, r), c = s(l), C = s(n);
2465
+ return c && C;
2474
2466
  }
2475
- return this._utilsIsValidNumber(e);
2467
+ return s(n);
2476
2468
  }
2477
2469
  _utilsIsValidNumber(e) {
2478
- return y.utils ? y.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2470
+ return m.utils ? m.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2479
2471
  }
2480
2472
  //* Update the selected country, and update the input val accordingly.
2481
2473
  setCountry(e) {
2482
- const i = e == null ? void 0 : e.toLowerCase(), s = this.selectedCountryData.iso2;
2483
- (e && i !== s || !e && s) && (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
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());
2484
2476
  }
2485
2477
  //* Set the input value and update the country.
2486
2478
  setNumber(e) {
2487
- const i = this._updateCountryFromNumber(e);
2488
- this._updateValFromNumber(e), i && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2479
+ const n = this._updateCountryFromNumber(e);
2480
+ this._updateValFromNumber(e), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2489
2481
  }
2490
2482
  //* Set the placeholder number typ
2491
2483
  setPlaceholderNumberType(e) {
@@ -2495,85 +2487,85 @@ class j2 {
2495
2487
  this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2496
2488
  }
2497
2489
  }
2498
- const W2 = (I) => {
2499
- if (!y.utils && !y.startedLoadingUtilsScript) {
2490
+ const Z2 = (y) => {
2491
+ if (!m.utils && !m.startedLoadingUtilsScript) {
2500
2492
  let e;
2501
- if (typeof I == "function")
2493
+ if (typeof y == "function")
2502
2494
  try {
2503
- e = Promise.resolve(I());
2504
- } catch (i) {
2505
- return Promise.reject(i);
2495
+ e = Promise.resolve(y());
2496
+ } catch (n) {
2497
+ return Promise.reject(n);
2506
2498
  }
2507
2499
  else
2508
- return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof I}`));
2509
- return y.startedLoadingUtilsScript = !0, e.then((i) => {
2510
- const s = i == null ? void 0 : i.default;
2511
- if (!s || typeof s != "object")
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}`));
2501
+ return m.startedLoadingUtilsScript = !0, e.then((n) => {
2502
+ const r = n == null ? void 0 : n.default;
2503
+ if (!r || typeof r != "object")
2512
2504
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2513
- return y.utils = s, $1("handleUtils"), !0;
2514
- }).catch((i) => {
2515
- throw $1("rejectUtilsScriptPromise", i), i;
2505
+ return m.utils = r, $1("handleUtils"), !0;
2506
+ }).catch((n) => {
2507
+ throw $1("rejectUtilsScriptPromise", n), n;
2516
2508
  });
2517
2509
  }
2518
2510
  return null;
2519
- }, y = Object.assign(
2520
- (I, e) => {
2521
- const i = new j2(I, e);
2522
- return i._init(), I.setAttribute("data-intl-tel-input-id", i.id.toString()), y.instances[i.id] = i, I.iti = i, i;
2511
+ }, m = Object.assign(
2512
+ (y, e) => {
2513
+ const n = new z2(y, e);
2514
+ return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), m.instances[n.id] = n, y.iti = n, n;
2523
2515
  },
2524
2516
  {
2525
- defaults: l2,
2517
+ defaults: a2,
2526
2518
  //* Using a static var like this allows us to mock it in the tests.
2527
2519
  documentReady: () => document.readyState === "complete",
2528
2520
  //* Get the country data object.
2529
- getCountryData: () => W,
2521
+ getCountryData: () => J,
2530
2522
  //* A getter for the plugin instance.
2531
- getInstance: (I) => {
2532
- const e = I.getAttribute("data-intl-tel-input-id");
2533
- return e ? y.instances[e] : null;
2523
+ getInstance: (y) => {
2524
+ const e = y.getAttribute("data-intl-tel-input-id");
2525
+ return e ? m.instances[e] : null;
2534
2526
  },
2535
2527
  //* A map from instance ID to instance object.
2536
2528
  instances: {},
2537
- attachUtils: W2,
2529
+ attachUtils: Z2,
2538
2530
  startedLoadingUtilsScript: !1,
2539
2531
  startedLoadingAutoCountry: !1,
2540
- version: "25.5.1"
2532
+ version: "25.7.0"
2541
2533
  }
2542
2534
  );
2543
2535
  (function() {
2544
- var I = this || self;
2536
+ var y = this || self;
2545
2537
  function e(d, t) {
2546
2538
  d = d.split(".");
2547
- var $ = I;
2539
+ var $ = y;
2548
2540
  d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2549
- for (var n; d.length && (n = d.shift()); ) d.length || t === void 0 ? $[n] && $[n] !== Object.prototype[n] ? $ = $[n] : $ = $[n] = {} : $[n] = t;
2541
+ for (var i; d.length && (i = d.shift()); ) d.length || t === void 0 ? $[i] && $[i] !== Object.prototype[i] ? $ = $[i] : $ = $[i] = {} : $[i] = t;
2550
2542
  }
2551
- function i(d, t) {
2543
+ function n(d, t) {
2552
2544
  function $() {
2553
2545
  }
2554
- $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(n, r, u) {
2555
- for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
2556
- return t.prototype[r].apply(n, l);
2546
+ $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(i, o, u) {
2547
+ for (var a = Array(arguments.length - 2), h = 2; h < arguments.length; h++) a[h - 2] = arguments[h];
2548
+ return t.prototype[o].apply(i, a);
2557
2549
  };
2558
2550
  }
2559
- function s(d) {
2551
+ function r(d) {
2560
2552
  const t = [];
2561
2553
  let $ = 0;
2562
- for (const n in d) t[$++] = d[n];
2554
+ for (const i in d) t[$++] = d[i];
2563
2555
  return t;
2564
2556
  }
2565
- var o = class {
2557
+ var s = class {
2566
2558
  constructor(d) {
2567
- if (a !== a) throw Error("SafeUrl is not meant to be built directly");
2559
+ if (l !== l) throw Error("SafeUrl is not meant to be built directly");
2568
2560
  this.g = d;
2569
2561
  }
2570
2562
  toString() {
2571
2563
  return this.g.toString();
2572
2564
  }
2573
- }, a = {};
2574
- new o("about:invalid#zClosurez"), new o("about:blank");
2565
+ }, l = {};
2566
+ new s("about:invalid#zClosurez"), new s("about:blank");
2575
2567
  const c = {};
2576
- class g {
2568
+ class C {
2577
2569
  constructor() {
2578
2570
  if (c !== c) throw Error("SafeStyle is not meant to be built directly");
2579
2571
  }
@@ -2581,21 +2573,21 @@ const W2 = (I) => {
2581
2573
  return "";
2582
2574
  }
2583
2575
  }
2584
- new g();
2585
- const f = {};
2586
- class v {
2576
+ new C();
2577
+ const p = {};
2578
+ class w {
2587
2579
  constructor() {
2588
- if (f !== f) throw Error("SafeStyleSheet is not meant to be built directly");
2580
+ if (p !== p) throw Error("SafeStyleSheet is not meant to be built directly");
2589
2581
  }
2590
2582
  toString() {
2591
2583
  return "";
2592
2584
  }
2593
2585
  }
2594
- new v();
2586
+ new w();
2595
2587
  const b = {};
2596
- class S {
2588
+ class v {
2597
2589
  constructor() {
2598
- var t = I.trustedTypes && I.trustedTypes.emptyHTML || "";
2590
+ var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2599
2591
  if (b !== b) throw Error("SafeHtml is not meant to be built directly");
2600
2592
  this.g = t;
2601
2593
  }
@@ -2603,21 +2595,21 @@ const W2 = (I) => {
2603
2595
  return this.g.toString();
2604
2596
  }
2605
2597
  }
2606
- new S();
2598
+ new v();
2607
2599
  function L(d, t) {
2608
2600
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2609
- case x:
2610
- case O:
2611
- case T:
2612
2601
  case G:
2602
+ case F:
2603
+ case D:
2604
+ case k:
2613
2605
  case f1:
2614
- case m:
2615
- case C:
2606
+ case I:
2607
+ case f:
2616
2608
  this.o = !0;
2617
2609
  }
2618
2610
  this.j = t.defaultValue;
2619
2611
  }
2620
- var C = 1, m = 2, x = 3, O = 4, T = 6, G = 16, f1 = 18;
2612
+ var f = 1, I = 2, G = 3, F = 4, D = 6, k = 16, f1 = 18;
2621
2613
  function h2(d, t) {
2622
2614
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2623
2615
  var $ = t[d];
@@ -2625,64 +2617,64 @@ const W2 = (I) => {
2625
2617
  }
2626
2618
  }
2627
2619
  function c2(d) {
2628
- return d = s(d.g), d.sort(function(t, $) {
2620
+ return d = r(d.g), d.sort(function(t, $) {
2629
2621
  return t.g - $.g;
2630
2622
  }), d;
2631
2623
  }
2632
- function R() {
2624
+ function x() {
2633
2625
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2634
2626
  }
2635
- R.prototype.has = function(d) {
2636
- return B(this, d.g);
2637
- }, R.prototype.get = function(d, t) {
2638
- return p(this, d.g, t);
2639
- }, R.prototype.set = function(d, t) {
2640
- M(this, d.g, t);
2641
- }, R.prototype.add = function(d, t) {
2642
- S1(this, d.g, t);
2627
+ x.prototype.has = function(d) {
2628
+ return R(this, d.g);
2629
+ }, x.prototype.get = function(d, t) {
2630
+ return g(this, d.g, t);
2631
+ }, x.prototype.set = function(d, t) {
2632
+ E(this, d.g, t);
2633
+ }, x.prototype.add = function(d, t) {
2634
+ w1(this, d.g, t);
2643
2635
  };
2644
- function v1(d, t) {
2645
- for (var $ = c2(d.m()), n = 0; n < $.length; n++) {
2646
- var r = $[n], u = r.g;
2647
- if (B(t, u)) {
2648
- d.g && delete d.g[r.g];
2649
- var l = r.h == 11 || r.h == 10;
2650
- if (r.l) {
2651
- r = P(t, u);
2652
- for (var h = 0; h < r.length; h++) S1(d, u, l ? r[h].clone() : r[h]);
2653
- } else r = i1(t, u), l ? (l = i1(d, u)) ? v1(l, r) : M(d, u, r.clone()) : M(d, u, r);
2636
+ function S1(d, t) {
2637
+ for (var $ = c2(d.m()), i = 0; i < $.length; i++) {
2638
+ var o = $[i], u = o.g;
2639
+ if (R(t, u)) {
2640
+ d.g && delete d.g[o.g];
2641
+ var a = o.h == 11 || o.h == 10;
2642
+ if (o.l) {
2643
+ o = P(t, u);
2644
+ for (var h = 0; h < o.length; h++) w1(d, u, a ? o[h].clone() : o[h]);
2645
+ } else o = n1(t, u), a ? (a = n1(d, u)) ? S1(a, o) : E(d, u, o.clone()) : E(d, u, o);
2654
2646
  }
2655
2647
  }
2656
2648
  }
2657
- R.prototype.clone = function() {
2649
+ x.prototype.clone = function() {
2658
2650
  var d = new this.constructor();
2659
- return d != this && (d.h = {}, d.g && (d.g = {}), v1(d, this)), d;
2651
+ return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
2660
2652
  };
2661
- function B(d, t) {
2653
+ function R(d, t) {
2662
2654
  return d.h[t] != null;
2663
2655
  }
2664
- function i1(d, t) {
2656
+ function n1(d, t) {
2665
2657
  var $ = d.h[t];
2666
2658
  if ($ == null) return null;
2667
2659
  if (d.l) {
2668
2660
  if (!(t in d.g)) {
2669
- var n = d.l, r = d.j[t];
2670
- if ($ != null) if (r.l) {
2671
- for (var u = [], l = 0; l < $.length; l++) u[l] = n.h(r, $[l]);
2661
+ var i = d.l, o = d.j[t];
2662
+ if ($ != null) if (o.l) {
2663
+ for (var u = [], a = 0; a < $.length; a++) u[a] = i.h(o, $[a]);
2672
2664
  $ = u;
2673
- } else $ = n.h(r, $);
2665
+ } else $ = i.h(o, $);
2674
2666
  return d.g[t] = $;
2675
2667
  }
2676
2668
  return d.g[t];
2677
2669
  }
2678
2670
  return $;
2679
2671
  }
2680
- function p(d, t, $) {
2681
- var n = i1(d, t);
2682
- return d.j[t].l ? n[$ || 0] : n;
2672
+ function g(d, t, $) {
2673
+ var i = n1(d, t);
2674
+ return d.j[t].l ? i[$ || 0] : i;
2683
2675
  }
2684
- function w(d, t) {
2685
- if (B(d, t)) d = p(d, t);
2676
+ function S(d, t) {
2677
+ if (R(d, t)) d = g(d, t);
2686
2678
  else d: {
2687
2679
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2688
2680
  else if (t === Number) d.j = 0;
@@ -2696,87 +2688,87 @@ const W2 = (I) => {
2696
2688
  return d;
2697
2689
  }
2698
2690
  function P(d, t) {
2699
- return i1(d, t) || [];
2691
+ return n1(d, t) || [];
2700
2692
  }
2701
2693
  function K(d, t) {
2702
- return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
2694
+ return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
2703
2695
  }
2704
- function M(d, t, $) {
2696
+ function E(d, t, $) {
2705
2697
  d.h[t] = $, d.g && (d.g[t] = $);
2706
2698
  }
2707
- function S1(d, t, $) {
2699
+ function w1(d, t, $) {
2708
2700
  d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2709
2701
  }
2710
- function n1(d, t) {
2711
- var $ = [], n;
2712
- for (n in t) n != 0 && $.push(new L(n, t[n]));
2702
+ function i1(d, t) {
2703
+ var $ = [], i;
2704
+ for (i in t) i != 0 && $.push(new L(i, t[i]));
2713
2705
  return new h2(d, $);
2714
2706
  }
2715
- function s1() {
2707
+ function r1() {
2716
2708
  }
2717
- s1.prototype.g = function(d) {
2709
+ r1.prototype.g = function(d) {
2718
2710
  throw new d.h(), Error("Unimplemented");
2719
- }, s1.prototype.h = function(d, t) {
2720
- if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
2721
- if (d.h == 14) return typeof t == "string" && w1.test(t) && (d = Number(t), 0 < d) ? d : t;
2711
+ }, r1.prototype.h = function(d, t) {
2712
+ if (d.h == 11 || d.h == 10) return t instanceof x ? t : this.g(d.s.prototype.m(), t);
2713
+ if (d.h == 14) return typeof t == "string" && b1.test(t) && (d = Number(t), 0 < d) ? d : t;
2722
2714
  if (!d.o) return t;
2723
2715
  if (d = d.s, d === String) {
2724
2716
  if (typeof t == "number") return String(t);
2725
- } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || w1.test(t))) return Number(t);
2717
+ } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || b1.test(t))) return Number(t);
2726
2718
  return t;
2727
2719
  };
2728
- var w1 = /^-?[0-9]+$/;
2720
+ var b1 = /^-?[0-9]+$/;
2729
2721
  function p1() {
2730
2722
  }
2731
- i(p1, s1), p1.prototype.g = function(d, t) {
2723
+ n(p1, r1), p1.prototype.g = function(d, t) {
2732
2724
  return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
2733
2725
  };
2734
2726
  function q() {
2735
2727
  }
2736
- i(q, p1), q.prototype.h = function(d, t) {
2737
- return d.h == 8 ? !!t : s1.prototype.h.apply(this, arguments);
2728
+ n(q, p1), q.prototype.h = function(d, t) {
2729
+ return d.h == 8 ? !!t : r1.prototype.h.apply(this, arguments);
2738
2730
  }, q.prototype.g = function(d, t) {
2739
2731
  return q.ma.g.call(this, d, t);
2740
2732
  };
2741
- function A(d, t) {
2733
+ function T(d, t) {
2742
2734
  d != null && this.g.apply(this, arguments);
2743
2735
  }
2744
- A.prototype.h = "", A.prototype.set = function(d) {
2736
+ T.prototype.h = "", T.prototype.set = function(d) {
2745
2737
  this.h = "" + d;
2746
- }, A.prototype.g = function(d, t, $) {
2747
- if (this.h += String(d), t != null) for (let n = 1; n < arguments.length; n++) this.h += arguments[n];
2738
+ }, T.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];
2748
2740
  return this;
2749
2741
  };
2750
- function k(d) {
2742
+ function B(d) {
2751
2743
  d.h = "";
2752
2744
  }
2753
- A.prototype.toString = function() {
2745
+ T.prototype.toString = function() {
2754
2746
  return this.h;
2755
2747
  };
2756
- function z() {
2757
- R.call(this);
2748
+ function W() {
2749
+ x.call(this);
2758
2750
  }
2759
- i(z, R);
2760
- var b1 = null;
2761
- function N() {
2762
- R.call(this);
2763
- }
2764
- i(N, R);
2751
+ n(W, x);
2765
2752
  var L1 = null;
2766
- function Z() {
2767
- R.call(this);
2753
+ function N() {
2754
+ x.call(this);
2768
2755
  }
2769
- i(Z, R);
2756
+ n(N, x);
2770
2757
  var N1 = null;
2771
- z.prototype.m = function() {
2772
- var d = b1;
2773
- return d || (b1 = d = n1(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;
2774
- }, z.m = z.prototype.m, N.prototype.m = function() {
2758
+ function z() {
2759
+ x.call(this);
2760
+ }
2761
+ n(z, x);
2762
+ var T1 = null;
2763
+ W.prototype.m = function() {
2775
2764
  var d = L1;
2776
- return d || (L1 = d = n1(N, { 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;
2777
- }, N.m = N.prototype.m, Z.prototype.m = function() {
2765
+ return d || (L1 = d = i1(W, { 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
+ }, W.m = W.prototype.m, N.prototype.m = function() {
2778
2767
  var d = N1;
2779
- return d || (N1 = d = n1(Z, {
2768
+ return d || (N1 = d = i1(N, { 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
+ }, N.m = N.prototype.m, z.prototype.m = function() {
2770
+ var d = T1;
2771
+ return d || (T1 = d = i1(z, {
2780
2772
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2781
2773
  1: { name: "general_desc", i: 11, type: N },
2782
2774
  2: { name: "fixed_line", i: 11, type: N },
@@ -2808,20 +2800,20 @@ const W2 = (I) => {
2808
2800
  },
2809
2801
  16: { name: "national_prefix_transform_rule", i: 9, type: String },
2810
2802
  18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
2811
- 19: { name: "number_format", aa: !0, i: 11, type: z },
2812
- 20: { name: "intl_number_format", aa: !0, i: 11, type: z },
2803
+ 19: { name: "number_format", aa: !0, i: 11, type: W },
2804
+ 20: { name: "intl_number_format", aa: !0, i: 11, type: W },
2813
2805
  22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
2814
2806
  23: { name: "leading_digits", i: 9, type: String }
2815
2807
  })), d;
2816
- }, Z.m = Z.prototype.m;
2808
+ }, z.m = z.prototype.m;
2817
2809
  function H() {
2818
- R.call(this);
2810
+ x.call(this);
2819
2811
  }
2820
- i(H, R);
2821
- var T1 = null, f2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2812
+ n(H, x);
2813
+ var A1 = null, f2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2822
2814
  H.prototype.m = function() {
2823
- var d = T1;
2824
- return d || (T1 = d = n1(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: f2 }, 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: f2 }, 7: {
2825
2817
  name: "preferred_domestic_carrier_code",
2826
2818
  i: 9,
2827
2819
  type: String
@@ -3043,7 +3035,7 @@ const W2 = (I) => {
3043
3035
  995: ["GE"],
3044
3036
  996: ["KG"],
3045
3037
  998: ["UZ"]
3046
- }, A1 = {
3038
+ }, E1 = {
3047
3039
  AC: [, [
3048
3040
  ,
3049
3041
  ,
@@ -3826,37 +3818,12 @@ const W2 = (I) => {
3826
3818
  ,
3827
3819
  [-1]
3828
3820
  ], [, , "242225\\d{4}", , , , "2422250123"], , , [, , , , , , , , , [-1]]],
3829
- BT: [
3830
- ,
3831
- [, , "[17]\\d{7}|[2-8]\\d{6}", , , , , , , [7, 8], [6]],
3832
- [, , "(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", , , , "2345678", , , [7], [6]],
3833
- [, , "(?:1[67]|77)\\d{6}", , , , "17123456", , , [8]],
3834
- [, , , , , , , , , [-1]],
3835
- [, , , , , , , , , [-1]],
3836
- [, , , , , , , , , [-1]],
3837
- [, , , , , , , , , [-1]],
3838
- [, , , , , , , , , [-1]],
3839
- "BT",
3840
- 975,
3841
- "00",
3842
- ,
3843
- ,
3844
- ,
3845
- ,
3821
+ BT: [, [, , "[178]\\d{7}|[2-8]\\d{6}", , , , , , , [7, 8], [6]], [, , "(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", , , , "2345678", , , [7], [6]], [, , "(?:1[67]|[78]7)\\d{6}", , , , "17123456", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "BT", 975, "00", , , , , , , , [[, "(\\d{3})(\\d{3})", "$1 $2", ["[2-7]"]], [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], [
3846
3822
  ,
3847
- ,
3848
- ,
3849
- [[, "(\\d{3})(\\d{3})", "$1 $2", ["[2-7]"]], [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]],
3850
- [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]],
3851
- [, , , , , , , , , [-1]],
3852
- ,
3853
- ,
3854
- [, , , , , , , , , [-1]],
3855
- [, , , , , , , , , [-1]],
3856
- ,
3857
- ,
3858
- [, , , , , , , , , [-1]]
3859
- ],
3823
+ "(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
3824
+ "$1 $2 $3 $4",
3825
+ ["1[67]|[78]"]
3826
+ ]], [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
3860
3827
  BW: [, [, , "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", , , , , , , [7, 8, 10]], [, , "(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}", , , , "2401234", , , [7]], [
3861
3828
  ,
3862
3829
  ,
@@ -3868,7 +3835,7 @@ const W2 = (I) => {
3868
3835
  ,
3869
3836
  ,
3870
3837
  [8]
3871
- ], [, , "(?:0800|800\\d)\\d{6}", , , , "0800012345", , , [10]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", , , , "79101234", , , [8]], "BW", 267, "00", , , , , , , , [[, "(\\d{2})(\\d{5})", "$1 $2", ["90"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [
3838
+ ], [, , "(?:0800|800\\d)\\d{6}", , , , "0800012345", , , [10]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", , , , "79101234", , , [8]], "BW", 267, "00", , , , , , , , [[, "(\\d{2})(\\d{5})", "$1 $2", ["90"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [
3872
3839
  ,
3873
3840
  ,
3874
3841
  ,
@@ -3879,7 +3846,7 @@ const W2 = (I) => {
3879
3846
  ,
3880
3847
  ,
3881
3848
  [-1]
3882
- ]],
3849
+ ], , , [, , , , , , , , , [-1]]],
3883
3850
  BY: [, [, , "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", , , , , , , [6, 7, 8, 9, 10, 11], [5]], [, , "(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}", , , , "152450911", , , [9], [5, 6, 7]], [, , "(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", , , , "294911911", , , [9]], [
3884
3851
  ,
3885
3852
  ,
@@ -4274,7 +4241,7 @@ const W2 = (I) => {
4274
4241
  ,
4275
4242
  [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
4276
4243
  [2, 3, 4]
4277
- ], [, , "15310\\d{6}|1(?:5[0-25-9]\\d|7[013-5])\\d{7}|1(?:6[023]|7[26-9])\\d{7,8}", , , , "15123456789", , , [10, 11]], [, , "800\\d{7,12}", , , , "8001234567890", , , [10, 11, 12, 13, 14, 15]], [, , "(?:137[7-9]|900(?:[135]|9\\d))\\d{6}", , , , "9001234567", , , [10, 11]], [, , "180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}", , , , "18012345", , , [7, 8, 9, 10, 11, 12, 13, 14]], [, , "700\\d{8}", , , , "70012345678", , , [11]], [, , , , , , , , , [-1]], "DE", 49, "00", "0", , , "0", , , , [
4244
+ ], [, , "1(?:(?:5(?:[0-25-9]\\d\\d|3(?:10|33))|7[26-9]\\d\\d)\\d{6}|6[023]\\d{7,8})|17\\d{8}", , , , "15123456789", , , [10, 11]], [, , "800\\d{7,12}", , , , "8001234567890", , , [10, 11, 12, 13, 14, 15]], [, , "(?:137[7-9]|900(?:[135]|9\\d))\\d{6}", , , , "9001234567", , , [10, 11]], [, , "180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}", , , , "18012345", , , [7, 8, 9, 10, 11, 12, 13, 14]], [, , "700\\d{8}", , , , "70012345678", , , [11]], [, , , , , , , , , [-1]], "DE", 49, "00", "0", , , "0", , , , [
4278
4245
  [
4279
4246
  ,
4280
4247
  "(\\d{2})(\\d{3,13})",
@@ -4300,7 +4267,7 @@ const W2 = (I) => {
4300
4267
  [, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"],
4301
4268
  [, "(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"],
4302
4269
  [, "(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"],
4303
- [, "(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|31)"], "0$1"],
4270
+ [, "(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"],
4304
4271
  [, "(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"],
4305
4272
  [, "(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"],
4306
4273
  [, "(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"],
@@ -5022,7 +4989,7 @@ const W2 = (I) => {
5022
4989
  ,
5023
4990
  ,
5024
4991
  "2201234"
5025
- ], [, , "(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[019]|70))\\d{4}", , , , "6091234"], [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], [, , "9008\\d{3}", , , , "9008123"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "515\\d{4}", , , , "5151234"], "GY", 592, "001", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
4992
+ ], [, , "(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-39]|70))\\d{4}", , , , "6091234"], [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], [, , "9008\\d{3}", , , , "9008123"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "515\\d{4}", , , , "5151234"], "GY", 592, "001", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5026
4993
  HK: [, [, , "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", , , , , , , [5, 6, 7, 8, 9, 11]], [
5027
4994
  ,
5028
4995
  ,
@@ -5185,7 +5152,7 @@ const W2 = (I) => {
5185
5152
  10,
5186
5153
  11,
5187
5154
  12
5188
- ]], [, , "153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", , , , "21234567", , , [8, 11, 12], [7]], [, , "55(?:4(?:[01]0|5[0-5])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", , , , "502345678", , , [9]], [, , "1(?:255|80[019]\\d{3})\\d{3}", , , , "1800123456", , , [7, 10]], [, , "1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}", , , , "1919123456", , , [8, 10]], [, , "1700\\d{6}", , , , "1700123456", , , [10]], [, , , , , , , , , [-1]], [
5155
+ ]], [, , "153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", , , , "21234567", , , [8, 11, 12], [7]], [, , "55(?:4(?:0[01]|10|5[0-7])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", , , , "502345678", , , [9]], [, , "1(?:255|80[019]\\d{3})\\d{3}", , , , "1800123456", , , [7, 10]], [, , "1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}", , , , "1919123456", , , [8, 10]], [, , "1700\\d{6}", , , , "1700123456", , , [10]], [, , , , , , , , , [-1]], [
5189
5156
  ,
5190
5157
  ,
5191
5158
  "7(?:38(?:[05]\\d|8[018])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",
@@ -6602,7 +6569,7 @@ const W2 = (I) => {
6602
6569
  ,
6603
6570
  [, , "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", , , , , , , [7, 8, 9]],
6604
6571
  [, , "2[1-6]\\d{6}", , , , "23123456", , , [8]],
6605
- [, , "1505\\d{4}|(?:7(?:[126-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}", , , , "92123456", , , [8]],
6572
+ [, , "1505\\d{4}|(?:7(?:[125-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}", , , , "92123456", , , [8]],
6606
6573
  [, , "8007\\d{4,5}|(?:500|800[05])\\d{4}", , , , "80071234"],
6607
6574
  [, , "900\\d{5}", , , , "90012345", , , [8]],
6608
6575
  [, , , , , , , , , [-1]],
@@ -6632,7 +6599,7 @@ const W2 = (I) => {
6632
6599
  PA: [, [, , "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", , , , , , , [7, 8, 10, 11]], [
6633
6600
  ,
6634
6601
  ,
6635
- "(?:1(?:0\\d|1[479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",
6602
+ "(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",
6636
6603
  ,
6637
6604
  ,
6638
6605
  ,
@@ -7082,7 +7049,7 @@ const W2 = (I) => {
7082
7049
  ,
7083
7050
  ,
7084
7051
  [8]
7085
- ], [, , "89(?:7[0-689]|80)\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-6])|9[0-8]\\d)\\d{5}", , , , "81234567", , , [8]], [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], [, , "1900\\d{7}", , , , "19001234567", , , [11]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], "SG", 65, "0[0-3]\\d", , , , , , , , [[, "(\\d{4,5})", "$1", ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], [
7052
+ ], [, , "8980\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}", , , , "81234567", , , [8]], [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], [, , "1900\\d{7}", , , , "19001234567", , , [11]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], "SG", 65, "0[0-3]\\d", , , , , , , , [[, "(\\d{4,5})", "$1", ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], [
7086
7053
  ,
7087
7054
  "(\\d{4})(\\d{4})(\\d{3})",
7088
7055
  "$1 $2 $3",
@@ -7255,7 +7222,7 @@ const W2 = (I) => {
7255
7222
  "$1 $2",
7256
7223
  ["(?:2|90)4|[67]"]
7257
7224
  ], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], [, "(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7258
- SR: [, [, , "(?:[2-5]|68|[78]\\d|90)\\d{5}", , , , , , , [6, 7]], [, , "(?:2[1-3]|3[0-7]|(?:4|68)\\d|5[2-58])\\d{4}", , , , "211234"], [, , "(?:7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], [, , "80\\d{5}", , , , "8012345", , , [7]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [
7225
+ SR: [, [, , "(?:[2-5]|[6-8]\\d|90)\\d{5}", , , , , , , [6, 7]], [, , "(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}", , , , "211234", , , [6]], [, , "(?:6[08]|7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], [, , "80\\d{5}", , , , "8012345", , , [7]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [
7259
7226
  ,
7260
7227
  ,
7261
7228
  "56\\d{4}",
@@ -7267,37 +7234,13 @@ const W2 = (I) => {
7267
7234
  ,
7268
7235
  [6]
7269
7236
  ], "SR", 597, "00", , , , , , , , [[, "(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], [, "(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7270
- SS: [
7271
- ,
7272
- [, , "[19]\\d{8}", , , , , , , [9]],
7273
- [, , "1[89]\\d{7}", , , , "181234567"],
7274
- [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"],
7275
- [, , , , , , , , , [-1]],
7276
- [, , , , , , , , , [-1]],
7277
- [, , , , , , , , , [-1]],
7278
- [, , , , , , , , , [-1]],
7279
- [, , , , , , , , , [-1]],
7280
- "SS",
7281
- 211,
7282
- "00",
7283
- "0",
7284
- ,
7285
- ,
7286
- "0",
7287
- ,
7288
- ,
7289
- ,
7290
- [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]],
7291
- ,
7292
- [, , , , , , , , , [-1]],
7293
- ,
7294
- ,
7295
- [, , , , , , , , , [-1]],
7296
- [, , , , , , , , , [-1]],
7297
- ,
7237
+ SS: [, [, , "[19]\\d{8}", , , , , , , [9]], [, , "1[89]\\d{7}", , , , "181234567"], [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SS", 211, "00", "0", , , "0", , , , [[
7298
7238
  ,
7299
- [, , , , , , , , , [-1]]
7300
- ],
7239
+ "(\\d{3})(\\d{3})(\\d{3})",
7240
+ "$1 $2 $3",
7241
+ ["[19]"],
7242
+ "0$1"
7243
+ ]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7301
7244
  ST: [, [, , "(?:22|9\\d)\\d{5}", , , , , , , [7]], [, , "22\\d{5}", , , , "2221234"], [, , "900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}", , , , "9812345"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "ST", 239, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7302
7245
  SV: [, [, , "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", , , , , , , [7, 8, 11]], [
7303
7246
  ,
@@ -7710,17 +7653,44 @@ const W2 = (I) => {
7710
7653
  [, "(\\d{3})(\\d{4})", "$1-$2", ["[24-9]|3(?:[02-9]|1[1-9])"]],
7711
7654
  [, "(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], , , 1]
7712
7655
  ], [[, "(\\d{3})(\\d{4})", "$1-$2", ["310"], , , 1], [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-9]"]]], [, , , , , , , , , [-1]], 1, , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7713
- UY: [, [, , "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", , , , , , , [6, 7, 8, 9, 10, 11, 12, 13]], [, , "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", , , , "21231234", , , [8], [7]], [, , "9[1-9]\\d{6}", , , , "94231234", , , [8]], [
7656
+ UY: [, [, , "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", , , , , , , [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]], [, , "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", , , , "21231234", , , [8], [7]], [
7657
+ ,
7714
7658
  ,
7659
+ "9[1-9]\\d{6}",
7715
7660
  ,
7716
- "0004\\d{2,9}|(?:405|80[05])\\d{4}",
7717
7661
  ,
7718
7662
  ,
7663
+ "94231234",
7719
7664
  ,
7720
- "8001234"
7721
- ], [, , "90[0-8]\\d{4}", , , , "9001234", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "UY", 598, "0(?:0|1[3-9]\\d)", "0", " int. ", , "0", , "00", , [[, "(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], [, "(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], [, "(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [
7722
7665
  ,
7666
+ [8]
7667
+ ], [, , "0004\\d{2,9}|(?:405|80[05])\\d{4}", , , , "8001234", , , [6, 7, 8, 9, 10, 11, 12, 13]], [, , "90[0-8]\\d{4}", , , , "9001234", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "UY", 598, "0(?:0|1[3-9]\\d)", "0", " int. ", , "0", , "00", , [[, "(\\d{4,5})", "$1", ["21"]], [, "(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], [, "(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], [, "(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], [
7668
+ ,
7669
+ "(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})",
7670
+ "$1 $2 $3 $4",
7671
+ ["0"]
7672
+ ]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "21\\d{2,3}", , , , "21123", , , [4, 5]], , , [, , , , , , , , , [-1]]],
7673
+ UZ: [
7723
7674
  ,
7675
+ [, , "(?:20|33|[5-9]\\d)\\d{7}", , , , , , , [9]],
7676
+ [, , "(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}", , , , "669050123"],
7677
+ [
7678
+ ,
7679
+ ,
7680
+ "(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}",
7681
+ ,
7682
+ ,
7683
+ ,
7684
+ "912345678"
7685
+ ],
7686
+ [, , , , , , , , , [-1]],
7687
+ [, , , , , , , , , [-1]],
7688
+ [, , , , , , , , , [-1]],
7689
+ [, , , , , , , , , [-1]],
7690
+ [, , , , , , , , , [-1]],
7691
+ "UZ",
7692
+ 998,
7693
+ "00",
7724
7694
  ,
7725
7695
  ,
7726
7696
  ,
@@ -7728,17 +7698,17 @@ const W2 = (I) => {
7728
7698
  ,
7729
7699
  ,
7730
7700
  ,
7731
- [-1]
7732
- ]],
7733
- UZ: [, [, , "(?:20|33|[5-9]\\d)\\d{7}", , , , , , , [9]], [, , "(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}", , , , "669050123"], [
7701
+ [[, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]],
7734
7702
  ,
7703
+ [, , , , , , , , , [-1]],
7735
7704
  ,
7736
- "(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}",
7737
7705
  ,
7706
+ [, , , , , , , , , [-1]],
7707
+ [, , , , , , , , , [-1]],
7738
7708
  ,
7739
7709
  ,
7740
- "912345678"
7741
- ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "UZ", 998, "00", , , , , , , , [[, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7710
+ [, , , , , , , , , [-1]]
7711
+ ],
7742
7712
  VA: [, [, , "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", , , , , , , [6, 7, 8, 9, 10, 11, 12]], [, , "06698\\d{1,6}", , , , "0669812345", , , [6, 7, 8, 9, 10, 11]], [, , "3[1-9]\\d{8}|3[2-9]\\d{7}", , , , "3123456789", , , [9, 10]], [
7743
7713
  ,
7744
7714
  ,
@@ -8170,11 +8140,11 @@ const W2 = (I) => {
8170
8140
  ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
8171
8141
  979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
8172
8142
  };
8173
- function D() {
8143
+ function M() {
8174
8144
  this.g = {};
8175
8145
  }
8176
- D.h = void 0, D.g = function() {
8177
- return D.h ? D.h : D.h = new D();
8146
+ M.h = void 0, M.g = function() {
8147
+ return M.h ? M.h : M.h = new M();
8178
8148
  };
8179
8149
  var g1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, p2 = {
8180
8150
  0: "0",
@@ -8257,154 +8227,154 @@ const W2 = (I) => {
8257
8227
  X: "9",
8258
8228
  Y: "9",
8259
8229
  Z: "9"
8260
- }, C2 = RegExp("[++]+"), Q = RegExp("^[++]+"), E1 = RegExp("([0-90-9٠-٩۰-۹])"), m2 = RegExp("[++0-90-9٠-٩۰-۹]"), y2 = /[\\\/] *x/, _2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), I2 = /(?:.*?[A-Za-z]){3}.*/, v2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), S2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8261
- function J(d) {
8230
+ }, C2 = RegExp("[++]+"), Q = RegExp("^[++]+"), M1 = RegExp("([0-90-9٠-٩۰-۹])"), m2 = RegExp("[++0-90-9٠-٩۰-۹]"), y2 = /[\\\/] *x/, _2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), I2 = /(?:.*?[A-Za-z]){3}.*/, v2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), S2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8231
+ function Y(d) {
8262
8232
  return "([0-90-9٠-٩۰-۹]{1," + d + "})";
8263
8233
  }
8264
- function M1() {
8265
- return ";ext=" + J("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (J("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (J("9") + "#?|[- ]+") + (J("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (J("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (J("9") + "#?");
8266
- }
8267
- var D1 = new RegExp("(?:" + M1() + ")$", "i"), w2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + M1() + ")?$", "i"), b2 = /(\$\d)/, L2 = /^\(?\$1\)?$/;
8268
- function P1(d) {
8269
- return 2 > d.length ? !1 : U(w2, d);
8234
+ function D1() {
8235
+ return ";ext=" + Y("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (Y("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (Y("9") + "#?|[- ]+") + (Y("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (Y("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (Y("9") + "#?");
8270
8236
  }
8237
+ var P1 = new RegExp("(?:" + D1() + ")$", "i"), w2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + D1() + ")?$", "i"), b2 = /(\$\d)/, L2 = /^\(?\$1\)?$/;
8271
8238
  function x1(d) {
8272
- return U(I2, d) ? r1(d, g2) : r1(d, g1);
8239
+ return 2 > d.length ? !1 : U(w2, d);
8273
8240
  }
8274
8241
  function R1(d) {
8275
- var t = x1(d.toString());
8276
- k(d), d.g(t);
8242
+ return U(I2, d) ? s1(d, g2) : s1(d, g1);
8277
8243
  }
8278
8244
  function B1(d) {
8245
+ var t = R1(d.toString());
8246
+ B(d), d.g(t);
8247
+ }
8248
+ function k1(d) {
8279
8249
  return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
8280
8250
  }
8281
- function r1(d, t) {
8282
- for (var $ = new A(), n, r = d.length, u = 0; u < r; ++u) n = d.charAt(u), n = t[n.toUpperCase()], n != null && $.g(n);
8251
+ function s1(d, t) {
8252
+ for (var $ = new T(), i, o = d.length, u = 0; u < o; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
8283
8253
  return $.toString();
8284
8254
  }
8285
- function k1(d) {
8255
+ function O1(d) {
8286
8256
  return d.length == 0 || L2.test(d);
8287
8257
  }
8288
8258
  function o1(d) {
8289
- return d != null && isNaN(d) && d.toUpperCase() in A1;
8259
+ return d != null && isNaN(d) && d.toUpperCase() in E1;
8290
8260
  }
8291
- D.prototype.format = function(d, t) {
8292
- if (p(d, 2) == 0 && B(d, 5)) {
8293
- var $ = w(d, 5);
8261
+ M.prototype.format = function(d, t) {
8262
+ if (g(d, 2) == 0 && R(d, 5)) {
8263
+ var $ = S(d, 5);
8294
8264
  if (0 < $.length) return $;
8295
8265
  }
8296
- $ = w(d, 1);
8297
- var n = t1(d);
8298
- if (t == 0) return O1($, 0, n, "");
8299
- if (!($ in X)) return n;
8300
- var r = d1(this, $, e1($));
8301
- d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(r, 13) ? p(r, 13) + w(d, 3) : " ext. " + w(d, 3) : "";
8266
+ $ = S(d, 1);
8267
+ var i = t1(d);
8268
+ if (t == 0) return G1($, 0, i, "");
8269
+ if (!($ in X)) return i;
8270
+ var o = d1(this, $, e1($));
8271
+ d = R(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : R(o, 13) ? g(o, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
8302
8272
  d: {
8303
- r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
8304
- for (var u, l = r.length, h = 0; h < l; ++h) {
8305
- u = r[h];
8273
+ o = P(o, 20).length == 0 || t == 2 ? P(o, 19) : P(o, 20);
8274
+ for (var u, a = o.length, h = 0; h < a; ++h) {
8275
+ u = o[h];
8306
8276
  var _ = K(u, 3);
8307
- if ((_ == 0 || n.search(p(u, 3, _ - 1)) == 0) && (_ = new RegExp(p(u, 1)), U(_, n))) {
8308
- r = u;
8277
+ if ((_ == 0 || i.search(g(u, 3, _ - 1)) == 0) && (_ = new RegExp(g(u, 1)), U(_, i))) {
8278
+ o = u;
8309
8279
  break d;
8310
8280
  }
8311
8281
  }
8312
- r = null;
8282
+ o = null;
8313
8283
  }
8314
- return r != null && (l = r, r = w(l, 2), u = new RegExp(p(l, 1)), w(
8315
- l,
8284
+ return o != null && (a = o, o = S(a, 2), u = new RegExp(g(a, 1)), S(
8285
+ a,
8316
8286
  5
8317
- ), l = w(l, 4), n = t == 2 && l != null && 0 < l.length ? n.replace(u, r.replace(b2, l)) : n.replace(u, r), t == 3 && (n = n.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), n = n.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), O1($, t, n, d);
8287
+ ), a = S(a, 4), i = t == 2 && a != null && 0 < a.length ? i.replace(u, o.replace(b2, a)) : i.replace(u, o), t == 3 && (i = i.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), i = i.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, i, d);
8318
8288
  };
8319
8289
  function d1(d, t, $) {
8320
8290
  return $ == "001" ? j(d, "" + t) : j(d, $);
8321
8291
  }
8322
8292
  function t1(d) {
8323
- if (!B(d, 2)) return "";
8324
- var t = "" + p(d, 2);
8325
- return B(d, 4) && p(d, 4) && 0 < w(d, 8) ? Array(w(d, 8) + 1).join("0") + t : t;
8293
+ if (!R(d, 2)) return "";
8294
+ var t = "" + g(d, 2);
8295
+ return R(d, 4) && g(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
8326
8296
  }
8327
- function O1(d, t, $, n) {
8297
+ function G1(d, t, $, i) {
8328
8298
  switch (t) {
8329
8299
  case 0:
8330
- return "+" + d + $ + n;
8300
+ return "+" + d + $ + i;
8331
8301
  case 1:
8332
- return "+" + d + " " + $ + n;
8302
+ return "+" + d + " " + $ + i;
8333
8303
  case 3:
8334
- return "tel:+" + d + "-" + $ + n;
8304
+ return "tel:+" + d + "-" + $ + i;
8335
8305
  default:
8336
- return $ + n;
8306
+ return $ + i;
8337
8307
  }
8338
8308
  }
8339
8309
  function u1(d, t) {
8340
8310
  switch (t) {
8341
8311
  case 4:
8342
- return p(d, 5);
8312
+ return g(d, 5);
8343
8313
  case 3:
8344
- return p(d, 4);
8314
+ return g(d, 4);
8345
8315
  case 1:
8346
- return p(d, 3);
8316
+ return g(d, 3);
8347
8317
  case 0:
8348
8318
  case 2:
8349
- return p(d, 2);
8319
+ return g(d, 2);
8350
8320
  case 5:
8351
- return p(d, 6);
8321
+ return g(d, 6);
8352
8322
  case 6:
8353
- return p(d, 8);
8323
+ return g(d, 8);
8354
8324
  case 7:
8355
- return p(d, 7);
8325
+ return g(d, 7);
8356
8326
  case 8:
8357
- return p(d, 21);
8327
+ return g(d, 21);
8358
8328
  case 9:
8359
- return p(d, 25);
8329
+ return g(d, 25);
8360
8330
  case 10:
8361
- return p(d, 28);
8331
+ return g(d, 28);
8362
8332
  default:
8363
- return p(d, 1);
8333
+ return g(d, 1);
8364
8334
  }
8365
8335
  }
8366
- function G1(d, t) {
8367
- var $ = F1(d, t);
8368
- return d = d1(d, w(t, 1), $), d == null ? -1 : (t = t1(t), C1(t, d));
8336
+ function F1(d, t) {
8337
+ var $ = U1(d, t);
8338
+ return d = d1(d, S(t, 1), $), d == null ? -1 : (t = t1(t), C1(t, d));
8369
8339
  }
8370
8340
  function C1(d, t) {
8371
- return F(d, p(t, 1)) ? F(d, p(t, 5)) ? 4 : F(d, p(t, 4)) ? 3 : F(d, p(t, 6)) ? 5 : F(d, p(t, 8)) ? 6 : F(d, p(t, 7)) ? 7 : F(d, p(t, 21)) ? 8 : F(d, p(t, 25)) ? 9 : F(d, p(t, 28)) ? 10 : F(d, p(t, 2)) ? p(t, 18) || F(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && F(d, p(t, 3)) ? 1 : -1 : -1;
8341
+ 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;
8372
8342
  }
8373
8343
  function j(d, t) {
8374
8344
  if (t == null) return null;
8375
8345
  t = t.toUpperCase();
8376
8346
  var $ = d.g[t];
8377
8347
  if ($ == null) {
8378
- if ($ = A1[t], $ == null) return null;
8379
- $ = new q().g(Z.m(), $), d.g[t] = $;
8348
+ if ($ = E1[t], $ == null) return null;
8349
+ $ = new q().g(z.m(), $), d.g[t] = $;
8380
8350
  }
8381
8351
  return $;
8382
8352
  }
8383
- function F(d, t) {
8353
+ function O(d, t) {
8384
8354
  var $ = d.length;
8385
- return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(w(t, 2), d);
8355
+ return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(S(t, 2), d);
8386
8356
  }
8387
8357
  function N2(d, t) {
8388
- var $ = F1(d, t), n = w(t, 1), r = d1(d, n, $);
8389
- return r == null || $ != "001" && n != U1(d, $) ? r = !1 : (d = t1(t), r = C1(d, r) != -1), r;
8358
+ var $ = U1(d, t), i = S(t, 1), o = d1(d, i, $);
8359
+ return o == null || $ != "001" && i != V1(d, $) ? o = !1 : (d = t1(t), o = C1(d, o) != -1), o;
8390
8360
  }
8391
- function F1(d, t) {
8361
+ function U1(d, t) {
8392
8362
  if (t == null) return null;
8393
- var $ = w(t, 1);
8363
+ var $ = S(t, 1);
8394
8364
  if ($ = X[$], $ == null) d = null;
8395
8365
  else if ($.length == 1) d = $[0];
8396
8366
  else d: {
8397
8367
  t = t1(t);
8398
- for (var n, r = $.length, u = 0; u < r; u++) {
8399
- n = $[u];
8400
- var l = j(d, n);
8401
- if (B(l, 23)) {
8402
- if (t.search(p(l, 23)) == 0) {
8403
- d = n;
8368
+ for (var i, o = $.length, u = 0; u < o; u++) {
8369
+ i = $[u];
8370
+ var a = j(d, i);
8371
+ if (R(a, 23)) {
8372
+ if (t.search(g(a, 23)) == 0) {
8373
+ d = i;
8404
8374
  break d;
8405
8375
  }
8406
- } else if (C1(t, l) != -1) {
8407
- d = n;
8376
+ } else if (C1(t, a) != -1) {
8377
+ d = i;
8408
8378
  break d;
8409
8379
  }
8410
8380
  }
@@ -8415,148 +8385,148 @@ const W2 = (I) => {
8415
8385
  function e1(d) {
8416
8386
  return d = X[d], d == null ? "ZZ" : d[0];
8417
8387
  }
8418
- function U1(d, t) {
8388
+ function V1(d, t) {
8419
8389
  if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
8420
- return w(d, 10);
8390
+ return S(d, 10);
8421
8391
  }
8422
- function l1(d, t, $, n) {
8423
- var r = u1($, n), u = K(r, 9) == 0 ? P(p($, 1), 9) : P(r, 9);
8424
- if (r = P(r, 10), n == 2) if (B1(u1($, 0))) d = u1($, 1), B1(d) && (u = u.concat(K(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), u.sort(), r.length == 0 ? r = P(d, 10) : (r = r.concat(P(d, 10)), r.sort()));
8425
- else return l1(d, t, $, 1);
8426
- return u[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8392
+ function a1(d, t, $, i) {
8393
+ var o = u1($, i), u = K(o, 9) == 0 ? P(g($, 1), 9) : P(o, 9);
8394
+ if (o = P(o, 10), i == 2) if (k1(u1($, 0))) d = u1($, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(g($, 1), 9) : P(d, 9)), u.sort(), o.length == 0 ? o = P(d, 10) : (o = o.concat(P(d, 10)), o.sort()));
8395
+ else return a1(d, t, $, 1);
8396
+ return u[0] == -1 ? 5 : (t = t.length, -1 < o.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8427
8397
  }
8428
- function a1(d, t, $) {
8429
- var n = t1(t);
8430
- return t = w(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, n, t, $)) : 1;
8398
+ function l1(d, t, $) {
8399
+ var i = t1(t);
8400
+ return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, i, t, $)) : 1;
8431
8401
  }
8432
- function V1(d, t) {
8402
+ function K1(d, t) {
8433
8403
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8434
- for (var $, n = d.length, r = 1; 3 >= r && r <= n; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in X) return t.g(d.substring(r)), $;
8404
+ for (var $, i = d.length, o = 1; 3 >= o && o <= i; ++o) if ($ = parseInt(d.substring(0, o), 10), $ in X) return t.g(d.substring(o)), $;
8435
8405
  return 0;
8436
8406
  }
8437
- function K1(d, t, $, n, r, u) {
8407
+ function H1(d, t, $, i, o, u) {
8438
8408
  if (t.length == 0) return 0;
8439
- t = new A(t);
8440
- var l;
8441
- $ != null && (l = p($, 11)), l == null && (l = "NonMatch");
8409
+ t = new T(t);
8410
+ var a;
8411
+ $ != null && (a = g($, 11)), a == null && (a = "NonMatch");
8442
8412
  var h = t.toString();
8443
- if (h.length == 0) l = 20;
8444
- else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(x1(h)), l = 1;
8413
+ if (h.length == 0) a = 20;
8414
+ else if (Q.test(h)) h = h.replace(Q, ""), B(t), t.g(R1(h)), a = 1;
8445
8415
  else {
8446
- if (h = new RegExp(l), R1(t), l = t.toString(), l.search(h) == 0) {
8447
- h = l.match(h)[0].length;
8448
- var _ = l.substring(h).match(E1);
8449
- _ && _[1] != null && 0 < _[1].length && r1(_[1], g1) == "0" ? l = !1 : (k(t), t.g(l.substring(h)), l = !0);
8450
- } else l = !1;
8451
- l = l ? 5 : 20;
8416
+ if (h = new RegExp(a), B1(t), a = t.toString(), a.search(h) == 0) {
8417
+ h = a.match(h)[0].length;
8418
+ var _ = a.substring(h).match(M1);
8419
+ _ && _[1] != null && 0 < _[1].length && s1(_[1], g1) == "0" ? a = !1 : (B(t), t.g(a.substring(h)), a = !0);
8420
+ } else a = !1;
8421
+ a = a ? 5 : 20;
8452
8422
  }
8453
- if (r && M(u, 6, l), l != 20) {
8423
+ if (o && E(u, 6, a), a != 20) {
8454
8424
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8455
- if (d = V1(t, n), d != 0) return M(u, 1, d), d;
8425
+ if (d = K1(t, i), d != 0) return E(u, 1, d), d;
8456
8426
  throw Error("Invalid country calling code");
8457
8427
  }
8458
- return $ != null && (l = w($, 10), h = "" + l, _ = t.toString(), _.lastIndexOf(h, 0) == 0 && (h = new A(_.substring(h.length)), _ = p($, 1), _ = new RegExp(w(_, 2)), H1(h, $, null), h = h.toString(), !U(_, t.toString()) && U(_, h) || l1(d, t.toString(), $, -1) == 3)) ? (n.g(h), r && M(u, 6, 10), M(u, 1, l), l) : (M(u, 1, 0), 0);
8459
- }
8460
- function H1(d, t, $) {
8461
- var n = d.toString(), r = n.length, u = p(t, 15);
8462
- if (r != 0 && u != null && u.length != 0) {
8463
- var l = new RegExp("^(?:" + u + ")");
8464
- if (r = l.exec(n)) {
8465
- u = new RegExp(w(p(t, 1), 2));
8466
- var h = U(u, n), _ = r.length - 1;
8467
- t = p(t, 16), t == null || t.length == 0 || r[_] == null || r[_].length == 0 ? (!h || U(u, n.substring(r[0].length))) && ($ != null && 0 < _ && r[_] != null && $.g(r[1]), d.set(n.substring(r[0].length))) : (n = n.replace(l, t), (!h || U(u, n)) && ($ != null && 0 < _ && $.g(r[1]), d.set(n)));
8428
+ return $ != null && (a = S($, 10), h = "" + a, _ = t.toString(), _.lastIndexOf(h, 0) == 0 && (h = new T(_.substring(h.length)), _ = g($, 1), _ = new RegExp(S(_, 2)), j1(h, $, null), h = h.toString(), !U(_, t.toString()) && U(_, h) || a1(d, t.toString(), $, -1) == 3)) ? (i.g(h), o && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
8429
+ }
8430
+ function j1(d, t, $) {
8431
+ var i = d.toString(), o = i.length, u = g(t, 15);
8432
+ if (o != 0 && u != null && u.length != 0) {
8433
+ var a = new RegExp("^(?:" + u + ")");
8434
+ if (o = a.exec(i)) {
8435
+ u = new RegExp(S(g(t, 1), 2));
8436
+ var h = U(u, i), _ = o.length - 1;
8437
+ t = g(t, 16), t == null || t.length == 0 || o[_] == null || o[_].length == 0 ? (!h || U(u, i.substring(o[0].length))) && ($ != null && 0 < _ && o[_] != null && $.g(o[1]), d.set(i.substring(o[0].length))) : (i = i.replace(a, t), (!h || U(u, i)) && ($ != null && 0 < _ && $.g(o[1]), d.set(i)));
8468
8438
  }
8469
8439
  }
8470
8440
  }
8471
- function Y(d, t, $) {
8441
+ function Z(d, t, $) {
8472
8442
  if (!o1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8473
- return j1(d, t, $, !0);
8443
+ return W1(d, t, $, !0);
8474
8444
  }
8475
- function j1(d, t, $, n) {
8445
+ function W1(d, t, $, i) {
8476
8446
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8477
8447
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8478
- var r = new A(), u = t.indexOf(";phone-context=");
8448
+ var o = new T(), u = t.indexOf(";phone-context=");
8479
8449
  if (u === -1) u = null;
8480
8450
  else if (u += 15, u >= t.length) u = "";
8481
8451
  else {
8482
- var l = t.indexOf(";", u);
8483
- u = l !== -1 ? t.substring(u, l) : t.substring(u);
8452
+ var a = t.indexOf(";", u);
8453
+ u = a !== -1 ? t.substring(u, a) : t.substring(u);
8484
8454
  }
8485
8455
  var h = u;
8486
- if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = v2.exec(h), h = S2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && r.g(u), u = t.indexOf("tel:"), r.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = r.g, l = t ?? "", h = l.search(m2), 0 <= h ? (l = l.substring(h), l = l.replace(_2, ""), h = l.search(y2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(r, l)), u = r.toString(), l = u.indexOf(";isub="), 0 < l && (k(r), r.g(u.substring(0, l))), !P1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
8487
- if (u = r.toString(), !(o1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8488
- u = new H(), n && M(u, 5, t);
8456
+ if (h == null ? a = !0 : h.length === 0 ? a = !1 : (a = v2.exec(h), h = S2.exec(h), a = a !== null || h !== null), !a || (u != null ? (u.charAt(0) === "+" && o.g(u), u = t.indexOf("tel:"), o.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = o.g, a = t ?? "", h = a.search(m2), 0 <= h ? (a = a.substring(h), a = a.replace(_2, ""), h = a.search(y2), 0 <= h && (a = a.substring(0, h))) : a = "", u.call(o, a)), u = o.toString(), a = u.indexOf(";isub="), 0 < a && (B(o), o.g(u.substring(0, a))), !x1(o.toString()))) throw Error("The string supplied did not seem to be a phone number");
8457
+ if (u = o.toString(), !(o1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8458
+ u = new H(), i && E(u, 5, t);
8489
8459
  d: {
8490
- if (t = r.toString(), l = t.search(D1), 0 <= l && P1(t.substring(0, l))) {
8491
- h = t.match(D1);
8460
+ if (t = o.toString(), a = t.search(P1), 0 <= a && x1(t.substring(0, a))) {
8461
+ h = t.match(P1);
8492
8462
  for (var _ = h.length, V = 1; V < _; ++V) if (h[V] != null && 0 < h[V].length) {
8493
- k(r), r.g(t.substring(0, l)), t = h[V];
8463
+ B(o), o.g(t.substring(0, a)), t = h[V];
8494
8464
  break d;
8495
8465
  }
8496
8466
  }
8497
8467
  t = "";
8498
8468
  }
8499
- 0 < t.length && M(u, 3, t), l = j(d, $), t = new A(), h = 0, _ = r.toString();
8469
+ 0 < t.length && E(u, 3, t), a = j(d, $), t = new T(), h = 0, _ = o.toString();
8500
8470
  try {
8501
- h = K1(d, _, l, t, n, u);
8471
+ h = H1(d, _, a, t, i, u);
8502
8472
  } catch (_1) {
8503
8473
  if (_1.message == "Invalid country calling code" && Q.test(_)) {
8504
- if (_ = _.replace(Q, ""), h = K1(d, _, l, t, n, u), h == 0) throw _1;
8474
+ if (_ = _.replace(Q, ""), h = H1(d, _, a, t, i, u), h == 0) throw _1;
8505
8475
  } else throw _1;
8506
8476
  }
8507
- if (h != 0 ? (r = e1(h), r != $ && (l = d1(d, h, r))) : (R1(r), t.g(r.toString()), $ != null ? (h = w(l, 10), M(
8477
+ if (h != 0 ? (o = e1(h), o != $ && (a = d1(d, h, o))) : (B1(o), t.g(o.toString()), $ != null ? (h = S(a, 10), E(
8508
8478
  u,
8509
8479
  1,
8510
8480
  h
8511
- )) : n && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new A(), r = new A(t.toString()), H1(r, l, $), d = l1(d, r.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = r, n && 0 < $.toString().length && M(u, 7, $.toString()))), n = t.toString(), d = n.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8481
+ )) : i && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (a != null && ($ = new T(), o = new T(t.toString()), j1(o, a, $), d = a1(d, o.toString(), a, -1), d != 2 && d != 4 && d != 5 && (t = o, 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");
8512
8482
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8513
- if (1 < n.length && n.charAt(0) == "0") {
8514
- for (M(u, 4, !0), d = 1; d < n.length - 1 && n.charAt(d) == "0"; ) d++;
8515
- d != 1 && M(u, 8, d);
8483
+ if (1 < i.length && i.charAt(0) == "0") {
8484
+ for (E(u, 4, !0), d = 1; d < i.length - 1 && i.charAt(d) == "0"; ) d++;
8485
+ d != 1 && E(u, 8, d);
8516
8486
  }
8517
- return M(u, 2, parseInt(n, 10)), u;
8487
+ return E(u, 2, parseInt(i, 10)), u;
8518
8488
  }
8519
8489
  function U(d, t) {
8520
8490
  return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
8521
8491
  }
8522
8492
  function T2(d) {
8523
- this.fa = RegExp(" "), this.ja = "", this.v = new A(), this.da = "", this.s = new A(), this.ba = new A(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new A(), this.ha = !1, this.o = "", this.g = new A(), this.j = [], this.ka = d, this.l = Z1(this, this.ka);
8493
+ this.fa = RegExp(" "), this.ja = "", this.v = new T(), this.da = "", this.s = new T(), this.ba = new T(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = M.g(), this.$ = 0, this.h = new T(), this.ha = !1, this.o = "", this.g = new T(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
8524
8494
  }
8525
- var W1 = new Z();
8526
- M(W1, 11, "NA");
8527
- var A2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), z1 = /[- ]/;
8528
- function Z1(d, t) {
8495
+ var z1 = new z();
8496
+ E(z1, 11, "NA");
8497
+ var A2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
8498
+ function Y1(d, t) {
8529
8499
  var $ = d.ga;
8530
- return t = o1(t) ? U1($, t) : 0, d = j(d.ga, e1(t)), d ?? W1;
8500
+ return t = o1(t) ? V1($, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
8531
8501
  }
8532
- function Y1(d) {
8502
+ function J1(d) {
8533
8503
  for (var t = d.j.length, $ = 0; $ < t; ++$) {
8534
- var n = d.j[$], r = w(n, 1);
8535
- if (d.da == r) return !1;
8536
- var u = d, l = n, h = w(l, 1);
8537
- k(u.v);
8504
+ var i = d.j[$], o = S(i, 1);
8505
+ if (d.da == o) return !1;
8506
+ var u = d, a = i, h = S(a, 1);
8507
+ B(u.v);
8538
8508
  var _ = u;
8539
- l = w(l, 2);
8509
+ a = S(a, 2);
8540
8510
  var V = "999999999999999".match(h)[0];
8541
- if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(h, "g"), l), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (u.v.g(_), u = !0) : u = !1, u) return d.da = r, d.ha = z1.test(p(n, 4)), d.$ = 0, !0;
8511
+ if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(h, "g"), a), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (u.v.g(_), u = !0) : u = !1, u) return d.da = o, d.ha = Z1.test(g(i, 4)), d.$ = 0, !0;
8542
8512
  }
8543
8513
  return d.u = !1;
8544
8514
  }
8545
- function J1(d, t) {
8546
- for (var $ = [], n = t.length - 3, r = d.j.length, u = 0; u < r; ++u) {
8547
- var l = d.j[u];
8548
- K(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(n, K(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8515
+ function q1(d, t) {
8516
+ for (var $ = [], i = t.length - 3, o = d.j.length, u = 0; u < o; ++u) {
8517
+ var a = d.j[u];
8518
+ K(a, 3) == 0 ? $.push(d.j[u]) : (a = g(a, 3, Math.min(i, K(a, 3) - 1)), t.search(a) == 0 && $.push(d.j[u]));
8549
8519
  }
8550
8520
  d.j = $;
8551
8521
  }
8552
8522
  function E2(d, t) {
8553
8523
  d.s.g(t);
8554
8524
  var $ = t;
8555
- if (E1.test($) || d.s.h.length == 1 && C2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = g1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8525
+ if (M1.test($) || d.s.h.length == 1 && C2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = g1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8556
8526
  if (!d.la) {
8557
- if (t2(d)) {
8558
- if (e2(d)) return q1(d);
8559
- } 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 != d2(d)) return d.h.g(" "), q1(d);
8527
+ if (e2(d)) {
8528
+ if ($2(d)) return X1(d);
8529
+ } else if (0 < d.o.length && (t = d.g.toString(), B(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), B(d.h), d.h.g(t.substring(0, $))), d.o != t2(d)) return d.h.g(" "), X1(d);
8560
8530
  }
8561
8531
  return d.s.toString();
8562
8532
  }
@@ -8566,19 +8536,19 @@ const W2 = (I) => {
8566
8536
  case 2:
8567
8537
  return d.s.toString();
8568
8538
  case 3:
8569
- if (t2(d)) d.ea = !0;
8570
- else return d.o = d2(d), m1(d);
8539
+ if (e2(d)) d.ea = !0;
8540
+ else return d.o = t2(d), m1(d);
8571
8541
  default:
8572
- return d.ea ? (e2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = $2(d, t), $ = X1(d), 0 < $.length ? $ : (J1(d, d.g.toString()), Y1(d) ? Q1(d) : d.u ? h1(d, t) : d.s.toString())) : m1(d);
8542
+ 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);
8573
8543
  }
8574
8544
  }
8575
- function q1(d) {
8576
- return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", m1(d);
8577
- }
8578
8545
  function X1(d) {
8579
- for (var t = d.g.toString(), $ = d.j.length, n = 0; n < $; ++n) {
8580
- var r = d.j[n], u = w(r, 1);
8581
- if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = z1.test(p(r, 4)), r = t.replace(new RegExp(u, "g"), p(r, 2)), r = h1(d, r), r1(r, p2) == d.ba)) return r;
8546
+ return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", m1(d);
8547
+ }
8548
+ function Q1(d) {
8549
+ for (var t = d.g.toString(), $ = d.j.length, i = 0; i < $; ++i) {
8550
+ var o = d.j[i], u = S(o, 1);
8551
+ if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(g(o, 4)), o = t.replace(new RegExp(u, "g"), g(o, 2)), o = h1(d, o), s1(o, p2) == d.ba)) return o;
8582
8552
  }
8583
8553
  return "";
8584
8554
  }
@@ -8589,75 +8559,76 @@ const W2 = (I) => {
8589
8559
  function m1(d) {
8590
8560
  var t = d.g.toString();
8591
8561
  if (3 <= t.length) {
8592
- for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), n = $.length, r = 0; r < n; ++r) {
8593
- var u = $[r];
8594
- 0 < d.o.length && k1(w(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || k1(w(u, 4)) || p(u, 6)) && A2.test(w(u, 2)) && d.j.push(u);
8562
+ for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), i = $.length, o = 0; o < i; ++o) {
8563
+ var u = $[o];
8564
+ 0 < d.o.length && O1(S(u, 4)) && !g(u, 6) && !R(u, 5) || (d.o.length != 0 || d.ca || O1(S(u, 4)) || g(u, 6)) && A2.test(S(u, 2)) && d.j.push(u);
8595
8565
  }
8596
- return J1(d, t), t = X1(d), 0 < t.length ? t : Y1(d) ? Q1(d) : d.s.toString();
8566
+ return q1(d, t), t = Q1(d), 0 < t.length ? t : J1(d) ? d2(d) : d.s.toString();
8597
8567
  }
8598
8568
  return h1(d, t);
8599
8569
  }
8600
- function Q1(d) {
8570
+ function d2(d) {
8601
8571
  var t = d.g.toString(), $ = t.length;
8602
8572
  if (0 < $) {
8603
- for (var n = "", r = 0; r < $; r++) n = $2(d, t.charAt(r));
8604
- return d.u ? h1(d, n) : d.s.toString();
8573
+ for (var i = "", o = 0; o < $; o++) i = n2(d, t.charAt(o));
8574
+ return d.u ? h1(d, i) : d.s.toString();
8605
8575
  }
8606
8576
  return d.h.toString();
8607
8577
  }
8608
- function d2(d) {
8609
- var t = d.g.toString(), $ = 0;
8610
- if (p(d.l, 10) != 1) var n = !1;
8611
- else n = d.g.toString(), n = n.charAt(0) == "1" && n.charAt(1) != "0" && n.charAt(1) != "1";
8612
- return n ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (n = new RegExp("^(?:" + p(d.l, 15) + ")"), n = t.match(n), n != null && n[0] != null && 0 < n[0].length && (d.ca = !0, $ = n[0].length, d.h.g(t.substring(0, $)))), k(d.g), d.g.g(t.substring($)), t.substring(0, $);
8613
- }
8614
8578
  function t2(d) {
8615
- var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8616
- 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;
8579
+ var t = d.g.toString(), $ = 0;
8580
+ if (g(d.l, 10) != 1) var i = !1;
8581
+ else i = d.g.toString(), i = i.charAt(0) == "1" && i.charAt(1) != "0" && i.charAt(1) != "1";
8582
+ return i ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (i = new RegExp("^(?:" + g(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, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8617
8583
  }
8618
8584
  function e2(d) {
8585
+ var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
8586
+ return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, B(d.g), d.g.g(t.substring($)), B(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8587
+ }
8588
+ function $2(d) {
8619
8589
  if (d.g.h.length == 0) return !1;
8620
- var t = new A(), $ = V1(d.g, t);
8621
- 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 = Z1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8590
+ var t = new T(), $ = K1(d.g, t);
8591
+ return $ == 0 ? !1 : (B(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);
8622
8592
  }
8623
- function $2(d, t) {
8593
+ function n2(d, t) {
8624
8594
  var $ = d.v.toString();
8625
8595
  if (0 <= $.substring(d.$).search(d.fa)) {
8626
- var n = $.search(d.fa);
8627
- return t = $.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = n, t.substring(0, d.$ + 1);
8596
+ var i = $.search(d.fa);
8597
+ return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = i, t.substring(0, d.$ + 1);
8628
8598
  }
8629
8599
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8630
8600
  }
8631
8601
  const i2 = (d) => {
8632
- d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || d.push("MOBILE"), d.includes("FIXED_LINE") || d.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && d.push("FIXED_LINE_OR_MOBILE");
8602
+ const t = [];
8603
+ return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || t.push("MOBILE"), d.includes("FIXED_LINE") || t.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && t.push("FIXED_LINE_OR_MOBILE"), d.concat(t);
8633
8604
  }, 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 };
8634
8605
  e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8635
8606
  try {
8636
- const $ = d.replace(/[^+0-9]/g, ""), n = new T2(t);
8607
+ const $ = d.replace(/[^+0-9]/g, ""), i = new T2(t);
8637
8608
  t = "";
8638
- for (let r = 0; r < $.length; r++) n.ja = E2(n, $.charAt(r)), t = n.ja;
8609
+ for (let o = 0; o < $.length; o++) i.ja = E2(i, $.charAt(o)), t = i.ja;
8639
8610
  return t;
8640
8611
  } catch {
8641
8612
  return d;
8642
8613
  }
8643
8614
  }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8644
8615
  try {
8645
- const r = D.g(), u = Y(r, d, t);
8646
- var n = a1(r, u, -1);
8647
- return n == 0 || n == 4 ? r.format(u, typeof $ > "u" ? 0 : $) : d;
8616
+ const o = M.g(), u = Z(o, d, t);
8617
+ var i = l1(o, u, -1);
8618
+ return i == 0 || i == 4 ? o.format(u, typeof $ > "u" ? 0 : $) : d;
8648
8619
  } catch {
8649
8620
  return d;
8650
8621
  }
8651
- }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, n) => {
8622
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, i) => {
8652
8623
  try {
8653
- const _ = D.g();
8624
+ const _ = M.g();
8654
8625
  d: {
8655
- var r = _;
8626
+ var o = _;
8656
8627
  if (o1(d)) {
8657
- var u = u1(j(r, d), $);
8628
+ var u = u1(j(o, d), $);
8658
8629
  try {
8659
- if (B(u, 6)) {
8660
- var l = p(u, 6), h = j1(r, l, d, !1);
8630
+ if (R(u, 6)) {
8631
+ var a = g(u, 6), h = W1(o, a, d, !1);
8661
8632
  break d;
8662
8633
  }
8663
8634
  } catch {
@@ -8665,38 +8636,37 @@ const W2 = (I) => {
8665
8636
  }
8666
8637
  h = null;
8667
8638
  }
8668
- return _.format(h, n ? 0 : t ? 2 : 1);
8639
+ return _.format(h, i ? 0 : t ? 2 : 1);
8669
8640
  } catch {
8670
8641
  return "";
8671
8642
  }
8672
8643
  }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
8673
8644
  try {
8674
- return p(Y(D.g(), d, t), 3);
8645
+ return g(Z(M.g(), d, t), 3);
8675
8646
  } catch {
8676
8647
  return "";
8677
8648
  }
8678
8649
  }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8679
8650
  try {
8680
- const $ = D.g(), n = Y($, d, t);
8681
- return G1($, n);
8651
+ const $ = M.g(), i = Z($, d, t);
8652
+ return F1($, i);
8682
8653
  } catch {
8683
8654
  return -99;
8684
8655
  }
8685
8656
  }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8686
8657
  if (!t) return 1;
8687
8658
  try {
8688
- const $ = D.g(), n = Y($, d, t);
8689
- return a1($, n, -1);
8659
+ const $ = M.g(), i = Z($, d, t);
8660
+ return l1($, i, -1);
8690
8661
  } catch ($) {
8691
8662
  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;
8692
8663
  }
8693
8664
  }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
8694
8665
  try {
8695
- const n = D.g(), r = Y(n, d, t), u = N2(n, r);
8666
+ const i = M.g(), o = Z(i, d, t), u = N2(i, o);
8696
8667
  if ($) {
8697
- i2($);
8698
- const l = $.map((h) => y1[h]);
8699
- return u && l.includes(G1(n, r));
8668
+ const a = i2($).map((h) => y1[h]);
8669
+ return u && a.includes(F1(i, o));
8700
8670
  }
8701
8671
  return u;
8702
8672
  } catch {
@@ -8704,30 +8674,30 @@ const W2 = (I) => {
8704
8674
  }
8705
8675
  }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8706
8676
  try {
8707
- const n = D.g(), r = Y(n, d, t);
8677
+ const i = M.g(), o = Z(i, d, t);
8708
8678
  if ($) {
8709
- i2($);
8710
- for (let u of $) if (a1(n, r, y1[u]) === 0) return !0;
8679
+ const u = i2($);
8680
+ for (let a of u) if (l1(i, o, y1[a]) === 0) return !0;
8711
8681
  return !1;
8712
8682
  }
8713
- return a1(n, r, -1) === 0;
8683
+ return l1(i, o, -1) === 0;
8714
8684
  } catch {
8715
8685
  return !1;
8716
8686
  }
8717
8687
  }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8718
8688
  try {
8719
- return p(Y(D.g(), d, t), 2).toString();
8689
+ return g(Z(M.g(), d, t), 2).toString();
8720
8690
  } catch {
8721
8691
  return "";
8722
8692
  }
8723
8693
  }), 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 });
8724
8694
  })();
8725
- const a2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, z2 = a2.intlTelInputUtilsTemp;
8726
- delete a2.intlTelInputUtilsTemp;
8727
- y.utils = z2;
8728
- const Y2 = {
8695
+ const l2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, Y2 = l2.intlTelInputUtilsTemp;
8696
+ delete l2.intlTelInputUtilsTemp;
8697
+ m.utils = Y2;
8698
+ const q2 = {
8729
8699
  __name: "IntlTelInputWithUtils",
8730
- props: /* @__PURE__ */ n2({
8700
+ props: /* @__PURE__ */ r2({
8731
8701
  disabled: {
8732
8702
  type: Boolean,
8733
8703
  default: !1
@@ -8751,48 +8721,48 @@ const Y2 = {
8751
8721
  },
8752
8722
  modelModifiers: {}
8753
8723
  }),
8754
- emits: /* @__PURE__ */ n2([
8724
+ emits: /* @__PURE__ */ r2([
8755
8725
  "changeNumber",
8756
8726
  "changeCountry",
8757
8727
  "changeValidity",
8758
8728
  "changeErrorCode"
8759
8729
  ], ["update:modelValue"]),
8760
- setup(I, { expose: e, emit: i }) {
8761
- const s = M2(I, "modelValue"), o = I, a = i, c = I1(), g = I1(), f = I1(!1), v = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, b = () => {
8762
- let C = v();
8763
- f.value !== C && (f.value = C, a("changeValidity", !!C), a(
8730
+ setup(y, { expose: e, emit: n }) {
8731
+ const r = M2(y, "modelValue"), s = y, l = n, c = I1(), C = I1(), p = I1(!1), w = () => C.value ? s.options.strictMode ? C.value.isValidNumberPrecise() : C.value.isValidNumber() : null, b = () => {
8732
+ let f = w();
8733
+ p.value !== f && (p.value = f, l("changeValidity", !!f), l(
8764
8734
  "changeErrorCode",
8765
- C ? null : g.value.getValidationError()
8735
+ f ? null : C.value.getValidationError()
8766
8736
  ));
8767
- }, S = () => {
8768
- var C;
8769
- a("changeNumber", ((C = g.value) == null ? void 0 : C.getNumber()) ?? ""), b();
8737
+ }, v = () => {
8738
+ var f;
8739
+ l("changeNumber", ((f = C.value) == null ? void 0 : f.getNumber()) ?? ""), b();
8770
8740
  }, L = () => {
8771
- var C;
8772
- a("changeCountry", ((C = g.value) == null ? void 0 : C.getSelectedCountryData().iso2) ?? ""), S(), b();
8741
+ var f;
8742
+ l("changeCountry", ((f = C.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), v(), b();
8773
8743
  };
8774
8744
  return D2(() => {
8775
- c.value && (g.value = y(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled), f.value = v());
8745
+ c.value && (C.value = m(c.value, s.options), s.value && C.value.setNumber(s.value), s.disabled && C.value.setDisabled(s.disabled), p.value = w());
8776
8746
  }), P2(
8777
- () => o.disabled,
8778
- (C) => {
8779
- var m;
8780
- return (m = g.value) == null ? void 0 : m.setDisabled(C);
8747
+ () => s.disabled,
8748
+ (f) => {
8749
+ var I;
8750
+ return (I = C.value) == null ? void 0 : I.setDisabled(f);
8781
8751
  }
8782
8752
  ), x2(() => {
8783
- var C;
8784
- return (C = g.value) == null ? void 0 : C.destroy();
8785
- }), e({ instance: g, input: c }), (C, m) => R2((k2(), B2("input", O2({
8753
+ var f;
8754
+ return (f = C.value) == null ? void 0 : f.destroy();
8755
+ }), e({ instance: C, input: c }), (f, I) => R2((k2(), B2("input", O2({
8786
8756
  ref_key: "input",
8787
8757
  ref: c,
8788
- "onUpdate:modelValue": m[0] || (m[0] = (x) => s.value = x),
8758
+ "onUpdate:modelValue": I[0] || (I[0] = (G) => r.value = G),
8789
8759
  type: "tel",
8790
8760
  onCountrychange: L,
8791
- onInput: S
8792
- }, I.inputProps), null, 16)), [
8761
+ onInput: v
8762
+ }, y.inputProps), null, 16)), [
8793
8763
  [
8794
8764
  G2,
8795
- s.value,
8765
+ r.value,
8796
8766
  void 0,
8797
8767
  { lazy: !0 }
8798
8768
  ]
@@ -8800,5 +8770,5 @@ const Y2 = {
8800
8770
  }
8801
8771
  };
8802
8772
  export {
8803
- Y2 as default
8773
+ q2 as default
8804
8774
  };