intl-tel-input 24.3.3 → 24.3.4
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.
- package/README.md +6 -6
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +5 -6
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +5 -6
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +4 -5
- package/react/build/IntlTelInput.js +4 -5
- package/react/build/IntlTelInputWithUtils.cjs +4 -5
- package/react/build/IntlTelInputWithUtils.js +4 -5
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +190 -190
- package/vue/build/IntlTelInputWithUtils.mjs +440 -440
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeModels as
|
|
2
|
-
const
|
|
1
|
+
import { mergeModels as t2, useModel as A2, ref as y1, onMounted as N2, watch as L2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as x2, vModelText as P2 } from "vue";
|
|
2
|
+
const e2 = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
5
5
|
// Afghanistan
|
|
@@ -1306,9 +1306,9 @@ const t2 = [
|
|
|
1306
1306
|
"263"
|
|
1307
1307
|
]
|
|
1308
1308
|
], H = [];
|
|
1309
|
-
for (let
|
|
1310
|
-
const e =
|
|
1311
|
-
H[
|
|
1309
|
+
for (let y = 0; y < e2.length; y++) {
|
|
1310
|
+
const e = e2[y];
|
|
1311
|
+
H[y] = {
|
|
1312
1312
|
name: "",
|
|
1313
1313
|
// this is now populated in the plugin
|
|
1314
1314
|
iso2: e[0],
|
|
@@ -1572,11 +1572,11 @@ const R2 = {
|
|
|
1572
1572
|
// additional countries (not supported by country-list library)
|
|
1573
1573
|
ac: "Ascension Island",
|
|
1574
1574
|
xk: "Kosovo"
|
|
1575
|
-
},
|
|
1576
|
-
for (let
|
|
1577
|
-
H[
|
|
1575
|
+
}, n2 = { ...R2, ...B2 };
|
|
1576
|
+
for (let y = 0; y < H.length; y++)
|
|
1577
|
+
H[y].name = n2[H[y].iso2];
|
|
1578
1578
|
let k2 = 0;
|
|
1579
|
-
const
|
|
1579
|
+
const s2 = {
|
|
1580
1580
|
//* Whether or not to allow the dropdown.
|
|
1581
1581
|
allowDropdown: !0,
|
|
1582
1582
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
@@ -1649,40 +1649,40 @@ const n2 = {
|
|
|
1649
1649
|
"887",
|
|
1650
1650
|
"888",
|
|
1651
1651
|
"889"
|
|
1652
|
-
],
|
|
1653
|
-
const e =
|
|
1652
|
+
], c1 = (y) => y.replace(/\D/g, ""), $2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), i2 = (y) => {
|
|
1653
|
+
const e = c1(y);
|
|
1654
1654
|
if (e.charAt(0) === "1") {
|
|
1655
1655
|
const i = e.substr(1, 3);
|
|
1656
1656
|
return O2.indexOf(i) !== -1;
|
|
1657
1657
|
}
|
|
1658
1658
|
return !1;
|
|
1659
|
-
}, G2 = (
|
|
1659
|
+
}, G2 = (y, e, i, s) => {
|
|
1660
1660
|
if (i === 0 && !s)
|
|
1661
1661
|
return 0;
|
|
1662
1662
|
let u = 0;
|
|
1663
1663
|
for (let a = 0; a < e.length; a++) {
|
|
1664
|
-
if (/[+0-9]/.test(e[a]) && u++, u ===
|
|
1664
|
+
if (/[+0-9]/.test(e[a]) && u++, u === y && !s)
|
|
1665
1665
|
return a + 1;
|
|
1666
|
-
if (s && u ===
|
|
1666
|
+
if (s && u === y + 1)
|
|
1667
1667
|
return a;
|
|
1668
1668
|
}
|
|
1669
1669
|
return e.length;
|
|
1670
|
-
},
|
|
1671
|
-
const s = document.createElement(
|
|
1670
|
+
}, L = (y, e, i) => {
|
|
1671
|
+
const s = document.createElement(y);
|
|
1672
1672
|
return e && Object.entries(e).forEach(([u, a]) => s.setAttribute(u, a)), i && i.appendChild(s), s;
|
|
1673
|
-
}, e1 = (
|
|
1674
|
-
const { instances: e } =
|
|
1675
|
-
Object.values(e).forEach((i) => i[
|
|
1673
|
+
}, e1 = (y) => {
|
|
1674
|
+
const { instances: e } = C;
|
|
1675
|
+
Object.values(e).forEach((i) => i[y]());
|
|
1676
1676
|
};
|
|
1677
1677
|
class U2 {
|
|
1678
1678
|
constructor(e, i = {}) {
|
|
1679
|
-
this.id = k2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({},
|
|
1679
|
+
this.id = k2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, s2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
|
|
1680
1680
|
}
|
|
1681
1681
|
//* Can't be private as it's called from intlTelInput convenience wrapper.
|
|
1682
1682
|
_init() {
|
|
1683
|
-
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
|
|
1683
|
+
this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]");
|
|
1684
1684
|
const e = this.options.allowDropdown || this.options.separateDialCode;
|
|
1685
|
-
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 = { ...
|
|
1685
|
+
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 = { ...n2, ...this.options.i18n };
|
|
1686
1686
|
const i = new Promise((u, a) => {
|
|
1687
1687
|
this.resolveAutoCountryPromise = u, this.rejectAutoCountryPromise = a;
|
|
1688
1688
|
}), s = new Promise((u, a) => {
|
|
@@ -1702,9 +1702,9 @@ class U2 {
|
|
|
1702
1702
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
|
|
1703
1703
|
const { countryOrder: s } = this.options;
|
|
1704
1704
|
if (s) {
|
|
1705
|
-
const u = s.indexOf(e.iso2), a = s.indexOf(i.iso2),
|
|
1706
|
-
if (
|
|
1707
|
-
return
|
|
1705
|
+
const u = s.indexOf(e.iso2), a = s.indexOf(i.iso2), c = u > -1, p = a > -1;
|
|
1706
|
+
if (c || p)
|
|
1707
|
+
return c && p ? u - a : c ? -1 : 1;
|
|
1708
1708
|
}
|
|
1709
1709
|
return e.name.localeCompare(i.name);
|
|
1710
1710
|
});
|
|
@@ -1758,9 +1758,9 @@ class U2 {
|
|
|
1758
1758
|
const s = this.dialCodeToIso2Map[i.dialCode][0];
|
|
1759
1759
|
for (let u = 0; u < i.areaCodes.length; u++) {
|
|
1760
1760
|
const a = i.areaCodes[u];
|
|
1761
|
-
for (let
|
|
1762
|
-
const
|
|
1763
|
-
this._addToDialCodeMap(s,
|
|
1761
|
+
for (let c = 1; c < a.length; c++) {
|
|
1762
|
+
const p = i.dialCode + a.substr(0, c);
|
|
1763
|
+
this._addToDialCodeMap(s, p), this._addToDialCodeMap(i.iso2, p);
|
|
1764
1764
|
}
|
|
1765
1765
|
this._addToDialCodeMap(i.iso2, i.dialCode + a);
|
|
1766
1766
|
}
|
|
@@ -1769,7 +1769,7 @@ class U2 {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1771
1771
|
_generateMarkup() {
|
|
1772
|
-
var
|
|
1772
|
+
var I;
|
|
1773
1773
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1774
1774
|
const {
|
|
1775
1775
|
allowDropdown: e,
|
|
@@ -1777,24 +1777,24 @@ class U2 {
|
|
|
1777
1777
|
showFlags: s,
|
|
1778
1778
|
containerClass: u,
|
|
1779
1779
|
hiddenInput: a,
|
|
1780
|
-
dropdownContainer:
|
|
1781
|
-
fixDropdownWidth:
|
|
1782
|
-
useFullscreenPopup:
|
|
1783
|
-
countrySearch:
|
|
1784
|
-
i18n:
|
|
1780
|
+
dropdownContainer: c,
|
|
1781
|
+
fixDropdownWidth: p,
|
|
1782
|
+
useFullscreenPopup: g,
|
|
1783
|
+
countrySearch: b,
|
|
1784
|
+
i18n: _
|
|
1785
1785
|
} = this.options;
|
|
1786
|
-
let
|
|
1787
|
-
e && (
|
|
1788
|
-
const
|
|
1789
|
-
if ((
|
|
1790
|
-
this.countryContainer =
|
|
1786
|
+
let T = "iti";
|
|
1787
|
+
e && (T += " iti--allow-dropdown"), s && (T += " iti--show-flags"), u && (T += ` ${u}`), g || (T += " iti--inline-dropdown");
|
|
1788
|
+
const S = L("div", { class: T });
|
|
1789
|
+
if ((I = this.telInput.parentNode) == null || I.insertBefore(S, this.telInput), e || s || i) {
|
|
1790
|
+
this.countryContainer = L(
|
|
1791
1791
|
"div",
|
|
1792
1792
|
{
|
|
1793
1793
|
class: "iti__country-container",
|
|
1794
1794
|
style: this.showSelectedCountryOnLeft ? "left: 0" : "right: 0"
|
|
1795
1795
|
},
|
|
1796
|
-
|
|
1797
|
-
), e ? (this.selectedCountry =
|
|
1796
|
+
S
|
|
1797
|
+
), e ? (this.selectedCountry = L(
|
|
1798
1798
|
"button",
|
|
1799
1799
|
{
|
|
1800
1800
|
type: "button",
|
|
@@ -1806,78 +1806,78 @@ class U2 {
|
|
|
1806
1806
|
role: "combobox"
|
|
1807
1807
|
},
|
|
1808
1808
|
this.countryContainer
|
|
1809
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
1809
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = L(
|
|
1810
1810
|
"div",
|
|
1811
1811
|
{ class: "iti__selected-country" },
|
|
1812
1812
|
this.countryContainer
|
|
1813
1813
|
);
|
|
1814
|
-
const
|
|
1815
|
-
if (this.selectedCountryInner =
|
|
1814
|
+
const A = L("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1815
|
+
if (this.selectedCountryInner = L("div", { class: "iti__flag" }, A), this.selectedCountryA11yText = L(
|
|
1816
1816
|
"span",
|
|
1817
1817
|
{ class: "iti__a11y-text" },
|
|
1818
1818
|
this.selectedCountryInner
|
|
1819
|
-
), e && (this.dropdownArrow =
|
|
1819
|
+
), e && (this.dropdownArrow = L(
|
|
1820
1820
|
"div",
|
|
1821
1821
|
{ class: "iti__arrow", "aria-hidden": "true" },
|
|
1822
|
-
|
|
1823
|
-
)), i && (this.selectedDialCode =
|
|
1822
|
+
A
|
|
1823
|
+
)), i && (this.selectedDialCode = L(
|
|
1824
1824
|
"div",
|
|
1825
1825
|
{ class: "iti__selected-dial-code" },
|
|
1826
1826
|
this.selectedCountry
|
|
1827
1827
|
)), e) {
|
|
1828
|
-
const
|
|
1829
|
-
if (this.dropdownContent =
|
|
1828
|
+
const x = p ? "" : "iti--flexible-dropdown-width";
|
|
1829
|
+
if (this.dropdownContent = L("div", {
|
|
1830
1830
|
id: `iti-${this.id}__dropdown-content`,
|
|
1831
|
-
class: `iti__dropdown-content iti__hide ${
|
|
1832
|
-
}),
|
|
1831
|
+
class: `iti__dropdown-content iti__hide ${x}`
|
|
1832
|
+
}), b && (this.searchInput = L(
|
|
1833
1833
|
"input",
|
|
1834
1834
|
{
|
|
1835
1835
|
type: "text",
|
|
1836
1836
|
class: "iti__search-input",
|
|
1837
|
-
placeholder:
|
|
1837
|
+
placeholder: _.searchPlaceholder,
|
|
1838
1838
|
role: "combobox",
|
|
1839
1839
|
"aria-expanded": "true",
|
|
1840
|
-
"aria-label":
|
|
1840
|
+
"aria-label": _.searchPlaceholder,
|
|
1841
1841
|
"aria-controls": `iti-${this.id}__country-listbox`,
|
|
1842
1842
|
"aria-autocomplete": "list",
|
|
1843
1843
|
autocomplete: "off"
|
|
1844
1844
|
},
|
|
1845
1845
|
this.dropdownContent
|
|
1846
|
-
), this.searchResultsA11yText =
|
|
1846
|
+
), this.searchResultsA11yText = L(
|
|
1847
1847
|
"span",
|
|
1848
1848
|
{ class: "iti__a11y-text" },
|
|
1849
1849
|
this.dropdownContent
|
|
1850
|
-
)), this.countryList =
|
|
1850
|
+
)), this.countryList = L(
|
|
1851
1851
|
"ul",
|
|
1852
1852
|
{
|
|
1853
1853
|
class: "iti__country-list",
|
|
1854
1854
|
id: `iti-${this.id}__country-listbox`,
|
|
1855
1855
|
role: "listbox",
|
|
1856
|
-
"aria-label":
|
|
1856
|
+
"aria-label": _.countryListAriaLabel
|
|
1857
1857
|
},
|
|
1858
1858
|
this.dropdownContent
|
|
1859
|
-
), this._appendListItems(),
|
|
1860
|
-
let
|
|
1861
|
-
|
|
1859
|
+
), this._appendListItems(), b && this._updateSearchResultsText(), c) {
|
|
1860
|
+
let O = "iti iti--container";
|
|
1861
|
+
g ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = L("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
|
|
1862
1862
|
} else
|
|
1863
1863
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
|
-
if (
|
|
1867
|
-
const
|
|
1868
|
-
|
|
1866
|
+
if (S.appendChild(this.telInput), this._updateInputPadding(), a) {
|
|
1867
|
+
const A = this.telInput.getAttribute("name") || "", x = a(A);
|
|
1868
|
+
x.phone && (this.hiddenInput = L("input", {
|
|
1869
1869
|
type: "hidden",
|
|
1870
|
-
name:
|
|
1871
|
-
}),
|
|
1870
|
+
name: x.phone
|
|
1871
|
+
}), S.appendChild(this.hiddenInput)), x.country && (this.hiddenInputCountry = L("input", {
|
|
1872
1872
|
type: "hidden",
|
|
1873
|
-
name:
|
|
1874
|
-
}),
|
|
1873
|
+
name: x.country
|
|
1874
|
+
}), S.appendChild(this.hiddenInputCountry));
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
1878
1878
|
_appendListItems() {
|
|
1879
1879
|
for (let e = 0; e < this.countries.length; e++) {
|
|
1880
|
-
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", u =
|
|
1880
|
+
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", u = L(
|
|
1881
1881
|
"li",
|
|
1882
1882
|
{
|
|
1883
1883
|
id: `iti-${this.id}__item-${i.iso2}`,
|
|
@@ -1899,12 +1899,12 @@ class U2 {
|
|
|
1899
1899
|
//* 1. Extracting a dial code from the given number
|
|
1900
1900
|
//* 2. Using explicit initialCountry
|
|
1901
1901
|
_setInitialState(e = !1) {
|
|
1902
|
-
const i = this.telInput.getAttribute("value"), s = this.telInput.value, a = i && i.charAt(0) === "+" && (!s || s.charAt(0) !== "+") ? i : s,
|
|
1903
|
-
if (
|
|
1902
|
+
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), p = i2(a), { initialCountry: g, geoIpLookup: b } = this.options, _ = g === "auto" && b;
|
|
1903
|
+
if (c && !p)
|
|
1904
1904
|
this._updateCountryFromNumber(a);
|
|
1905
|
-
else if (!
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1905
|
+
else if (!_ || e) {
|
|
1906
|
+
const T = g ? g.toLowerCase() : "";
|
|
1907
|
+
T && this._getCountryData(T, !0) ? this._setCountry(T) : c && p ? this._setCountry("us") : this._setCountry();
|
|
1908
1908
|
}
|
|
1909
1909
|
a && this._updateValFromNumber(a);
|
|
1910
1910
|
}
|
|
@@ -1940,16 +1940,16 @@ class U2 {
|
|
|
1940
1940
|
//* Init many requests: utils script / geo ip lookup.
|
|
1941
1941
|
_initRequests() {
|
|
1942
1942
|
const { utilsScript: e, initialCountry: i, geoIpLookup: s } = this.options;
|
|
1943
|
-
e && !
|
|
1944
|
-
|
|
1943
|
+
e && !C.utils ? C.documentReady() ? C.loadUtils(e) : window.addEventListener("load", () => {
|
|
1944
|
+
C.loadUtils(e);
|
|
1945
1945
|
}) : this.resolveUtilsScriptPromise(), i === "auto" && s && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
1946
1946
|
}
|
|
1947
1947
|
//* Perform the geo ip lookup.
|
|
1948
1948
|
_loadAutoCountry() {
|
|
1949
|
-
|
|
1949
|
+
C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
|
|
1950
1950
|
(e = "") => {
|
|
1951
1951
|
const i = e.toLowerCase();
|
|
1952
|
-
i && this._getCountryData(i, !0) ? (
|
|
1952
|
+
i && this._getCountryData(i, !0) ? (C.autoCountry = i, setTimeout(() => e1("handleAutoCountry"))) : (this._setInitialState(!0), e1("rejectAutoCountryPromise"));
|
|
1953
1953
|
},
|
|
1954
1954
|
() => {
|
|
1955
1955
|
this._setInitialState(!0), e1("rejectAutoCountryPromise");
|
|
@@ -1961,31 +1961,31 @@ class U2 {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
//* Initialize the tel input listeners.
|
|
1963
1963
|
_initTelInputListeners() {
|
|
1964
|
-
const { strictMode: e, formatAsYouType: i, separateDialCode: s, formatOnDisplay: u, allowDropdown: a } = this.options;
|
|
1965
|
-
let
|
|
1966
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
1967
|
-
if (this.isAndroid && (
|
|
1968
|
-
const S = this.telInput.selectionStart || 0,
|
|
1969
|
-
this.telInput.value =
|
|
1964
|
+
const { strictMode: e, formatAsYouType: i, separateDialCode: s, formatOnDisplay: u, allowDropdown: a, countrySearch: c } = this.options;
|
|
1965
|
+
let p = !1;
|
|
1966
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (p = !0), this._handleInputEvent = (g) => {
|
|
1967
|
+
if (this.isAndroid && (g == null ? void 0 : g.data) === "+" && s && a && c) {
|
|
1968
|
+
const S = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, S - 1), A = this.telInput.value.substring(S);
|
|
1969
|
+
this.telInput.value = I + A, this._openDropdownWithPlus();
|
|
1970
1970
|
return;
|
|
1971
1971
|
}
|
|
1972
1972
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1975
|
-
const
|
|
1976
|
-
if (i && !
|
|
1977
|
-
const S = this.telInput.selectionStart || 0,
|
|
1978
|
-
this.telInput.value =
|
|
1973
|
+
const b = (g == null ? void 0 : g.data) && /[^+0-9]/.test(g.data), _ = (g == null ? void 0 : g.inputType) === "insertFromPaste" && this.telInput.value;
|
|
1974
|
+
b || _ && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
|
|
1975
|
+
const T = (g == null ? void 0 : g.detail) && g.detail.isSetNumber && !u;
|
|
1976
|
+
if (i && !p && !T) {
|
|
1977
|
+
const S = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, S).replace(/[^+0-9]/g, "").length, x = (g == null ? void 0 : g.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), $1 = G2(A, O, S, x);
|
|
1978
|
+
this.telInput.value = O, this.telInput.setSelectionRange($1, $1);
|
|
1979
1979
|
}
|
|
1980
|
-
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || s) && (this._handleKeydownEvent = (
|
|
1981
|
-
if (
|
|
1982
|
-
if (s && a &&
|
|
1983
|
-
|
|
1980
|
+
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || s) && (this._handleKeydownEvent = (g) => {
|
|
1981
|
+
if (g.key && g.key.length === 1 && !g.altKey && !g.ctrlKey && !g.metaKey) {
|
|
1982
|
+
if (s && a && c && g.key === "+") {
|
|
1983
|
+
g.preventDefault(), this._openDropdownWithPlus();
|
|
1984
1984
|
return;
|
|
1985
1985
|
}
|
|
1986
1986
|
if (e) {
|
|
1987
|
-
const
|
|
1988
|
-
(!
|
|
1987
|
+
const b = this.telInput.selectionStart === 0 && g.key === "+", _ = /^[0-9]$/.test(g.key), T = s ? _ : b || _, S = this._getFullNumber(), I = C.utils.getCoreNumber(S, this.selectedCountryData.iso2), A = this.maxCoreNumberLength && I.length >= this.maxCoreNumberLength, x = this.telInput.value.substring(this.telInput.selectionStart, this.telInput.selectionEnd), O = /\d/.test(x);
|
|
1988
|
+
(!T || A && !O) && g.preventDefault();
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2023,15 +2023,15 @@ class U2 {
|
|
|
2023
2023
|
//* We only bind dropdown listeners when the dropdown is open.
|
|
2024
2024
|
_bindDropdownListeners() {
|
|
2025
2025
|
this._handleMouseoverCountryList = (u) => {
|
|
2026
|
-
var
|
|
2027
|
-
const a = (
|
|
2026
|
+
var c;
|
|
2027
|
+
const a = (c = u.target) == null ? void 0 : c.closest(".iti__country");
|
|
2028
2028
|
a && this._highlightListItem(a, !1);
|
|
2029
2029
|
}, this.countryList.addEventListener(
|
|
2030
2030
|
"mouseover",
|
|
2031
2031
|
this._handleMouseoverCountryList
|
|
2032
2032
|
), this._handleClickCountryList = (u) => {
|
|
2033
|
-
var
|
|
2034
|
-
const a = (
|
|
2033
|
+
var c;
|
|
2034
|
+
const a = (c = u.target) == null ? void 0 : c.closest(".iti__country");
|
|
2035
2035
|
a && this._selectListItem(a);
|
|
2036
2036
|
}, this.countryList.addEventListener("click", this._handleClickCountryList);
|
|
2037
2037
|
let e = !0;
|
|
@@ -2048,15 +2048,15 @@ class U2 {
|
|
|
2048
2048
|
}, 1e3));
|
|
2049
2049
|
}, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
|
|
2050
2050
|
const u = () => {
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2051
|
+
const c = this.searchInput.value.trim();
|
|
2052
|
+
c ? this._filterCountries(c) : this._filterCountries("", !0);
|
|
2053
2053
|
};
|
|
2054
2054
|
let a = null;
|
|
2055
2055
|
this._handleSearchChange = () => {
|
|
2056
2056
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
2057
2057
|
u(), a = null;
|
|
2058
2058
|
}, 100);
|
|
2059
|
-
}, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (
|
|
2059
|
+
}, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
2062
|
//* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
|
|
@@ -2074,12 +2074,12 @@ class U2 {
|
|
|
2074
2074
|
_filterCountries(e, i = !1) {
|
|
2075
2075
|
let s = !0;
|
|
2076
2076
|
this.countryList.innerHTML = "";
|
|
2077
|
-
const u =
|
|
2077
|
+
const u = $2(e);
|
|
2078
2078
|
for (let a = 0; a < this.countries.length; a++) {
|
|
2079
|
-
const
|
|
2080
|
-
if (i ||
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2079
|
+
const c = this.countries[a], p = $2(c.name), g = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((_) => _[0]).join("").toLowerCase(), b = `+${c.dialCode}`;
|
|
2080
|
+
if (i || p.includes(u) || b.includes(u) || c.iso2.includes(u) || g.includes(u)) {
|
|
2081
|
+
const _ = c.nodeById[this.id];
|
|
2082
|
+
_ && this.countryList.appendChild(_), s && (this._highlightListItem(_, !1), s = !1);
|
|
2083
2083
|
}
|
|
2084
2084
|
}
|
|
2085
2085
|
s && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
|
|
@@ -2104,12 +2104,12 @@ class U2 {
|
|
|
2104
2104
|
//* NOTE: this is called from _setInitialState, handleUtils and setNumber.
|
|
2105
2105
|
_updateValFromNumber(e) {
|
|
2106
2106
|
let i = e;
|
|
2107
|
-
if (this.options.formatOnDisplay &&
|
|
2108
|
-
const s = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: u, INTERNATIONAL: a } =
|
|
2109
|
-
i =
|
|
2107
|
+
if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
|
|
2108
|
+
const s = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: u, INTERNATIONAL: a } = C.utils.numberFormat, c = s ? u : a;
|
|
2109
|
+
i = C.utils.formatNumber(
|
|
2110
2110
|
i,
|
|
2111
2111
|
this.selectedCountryData.iso2,
|
|
2112
|
-
|
|
2112
|
+
c
|
|
2113
2113
|
);
|
|
2114
2114
|
}
|
|
2115
2115
|
i = this._beforeSetNumber(i), this.telInput.value = i;
|
|
@@ -2121,19 +2121,19 @@ class U2 {
|
|
|
2121
2121
|
let s = i ? e.substring(i) : e;
|
|
2122
2122
|
const u = this.selectedCountryData.dialCode;
|
|
2123
2123
|
s && u === "1" && s.charAt(0) !== "+" && (s.charAt(0) !== "1" && (s = `1${s}`), s = `+${s}`), this.options.separateDialCode && u && s.charAt(0) !== "+" && (s = `+${u}${s}`);
|
|
2124
|
-
const
|
|
2125
|
-
let
|
|
2126
|
-
if (
|
|
2127
|
-
const
|
|
2128
|
-
if (!(u === "1" &&
|
|
2129
|
-
for (let
|
|
2130
|
-
if (
|
|
2131
|
-
|
|
2124
|
+
const c = this._getDialCode(s, !0), p = c1(s);
|
|
2125
|
+
let g = null;
|
|
2126
|
+
if (c) {
|
|
2127
|
+
const b = this.dialCodeToIso2Map[c1(c)], _ = b.indexOf(this.selectedCountryData.iso2) !== -1 && p.length <= c.length - 1;
|
|
2128
|
+
if (!(u === "1" && i2(p)) && !_) {
|
|
2129
|
+
for (let S = 0; S < b.length; S++)
|
|
2130
|
+
if (b[S]) {
|
|
2131
|
+
g = b[S];
|
|
2132
2132
|
break;
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
2135
|
-
} else s.charAt(0) === "+" &&
|
|
2136
|
-
return
|
|
2135
|
+
} else s.charAt(0) === "+" && p.length ? g = "" : (!s || s === "+") && !this.selectedCountryData.iso2 && (g = this.defaultCountry);
|
|
2136
|
+
return g !== null ? this._setCountry(g) : !1;
|
|
2137
2137
|
}
|
|
2138
2138
|
//* Remove highlighting from other list items and highlight the given item.
|
|
2139
2139
|
_highlightListItem(e, i) {
|
|
@@ -2160,12 +2160,12 @@ class U2 {
|
|
|
2160
2160
|
_setCountry(e) {
|
|
2161
2161
|
const { separateDialCode: i, showFlags: s, i18n: u } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
2162
2162
|
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
|
|
2163
|
-
let
|
|
2164
|
-
e && s ? (
|
|
2163
|
+
let c = "", p = "";
|
|
2164
|
+
e && s ? (c = `iti__flag iti__${e}`, p = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", p = u.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = p;
|
|
2165
2165
|
}
|
|
2166
2166
|
if (this._setSelectedCountryTitleAttribute(e, i), i) {
|
|
2167
|
-
const
|
|
2168
|
-
this.selectedDialCode.innerHTML =
|
|
2167
|
+
const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2168
|
+
this.selectedDialCode.innerHTML = c, this._updateInputPadding();
|
|
2169
2169
|
}
|
|
2170
2170
|
return this._updatePlaceholder(), this._updateMaxLength(), a.iso2 !== e;
|
|
2171
2171
|
}
|
|
@@ -2179,19 +2179,19 @@ class U2 {
|
|
|
2179
2179
|
//* Update the maximum valid number length for the currently selected country.
|
|
2180
2180
|
_updateMaxLength() {
|
|
2181
2181
|
const { strictMode: e, placeholderNumberType: i, validationNumberType: s } = this.options;
|
|
2182
|
-
if (e &&
|
|
2182
|
+
if (e && C.utils)
|
|
2183
2183
|
if (this.selectedCountryData.iso2) {
|
|
2184
|
-
const u =
|
|
2185
|
-
let a =
|
|
2184
|
+
const u = C.utils.numberType[i];
|
|
2185
|
+
let a = C.utils.getExampleNumber(
|
|
2186
2186
|
this.selectedCountryData.iso2,
|
|
2187
2187
|
!1,
|
|
2188
2188
|
u,
|
|
2189
2189
|
!0
|
|
2190
|
-
),
|
|
2191
|
-
for (;
|
|
2192
|
-
|
|
2193
|
-
const
|
|
2194
|
-
this.maxCoreNumberLength =
|
|
2190
|
+
), c = a;
|
|
2191
|
+
for (; C.utils.isPossibleNumber(a, this.selectedCountryData.iso2, s); )
|
|
2192
|
+
c = a, a += "0";
|
|
2193
|
+
const p = C.utils.getCoreNumber(c, this.selectedCountryData.iso2);
|
|
2194
|
+
this.maxCoreNumberLength = p.length;
|
|
2195
2195
|
} else
|
|
2196
2196
|
this.maxCoreNumberLength = null;
|
|
2197
2197
|
}
|
|
@@ -2226,14 +2226,14 @@ class U2 {
|
|
|
2226
2226
|
nationalMode: s,
|
|
2227
2227
|
customPlaceholder: u
|
|
2228
2228
|
} = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2229
|
-
if (
|
|
2230
|
-
const
|
|
2231
|
-
let
|
|
2229
|
+
if (C.utils && a) {
|
|
2230
|
+
const c = C.utils.numberType[i];
|
|
2231
|
+
let p = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
|
|
2232
2232
|
this.selectedCountryData.iso2,
|
|
2233
2233
|
s,
|
|
2234
|
-
|
|
2234
|
+
c
|
|
2235
2235
|
) : "";
|
|
2236
|
-
|
|
2236
|
+
p = this._beforeSetNumber(p), typeof u == "function" && (p = u(p, this.selectedCountryData)), this.telInput.setAttribute("placeholder", p);
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
2239
2239
|
//* Called when the user selects a list item from the dropdown.
|
|
@@ -2255,12 +2255,12 @@ class U2 {
|
|
|
2255
2255
|
}
|
|
2256
2256
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2257
2257
|
_scrollTo(e) {
|
|
2258
|
-
const i = this.countryList, s = document.documentElement.scrollTop, u = i.offsetHeight, a = i.getBoundingClientRect().top + s,
|
|
2259
|
-
if (
|
|
2260
|
-
i.scrollTop =
|
|
2261
|
-
else if (
|
|
2262
|
-
const
|
|
2263
|
-
i.scrollTop =
|
|
2258
|
+
const i = this.countryList, s = document.documentElement.scrollTop, u = i.offsetHeight, a = i.getBoundingClientRect().top + s, c = a + u, p = e.offsetHeight, g = e.getBoundingClientRect().top + s, b = g + p, _ = g - a + i.scrollTop;
|
|
2259
|
+
if (g < a)
|
|
2260
|
+
i.scrollTop = _;
|
|
2261
|
+
else if (b > c) {
|
|
2262
|
+
const T = u - p;
|
|
2263
|
+
i.scrollTop = _ - T;
|
|
2264
2264
|
}
|
|
2265
2265
|
}
|
|
2266
2266
|
//* Replace any existing dial code with the new one
|
|
@@ -2280,9 +2280,9 @@ class U2 {
|
|
|
2280
2280
|
if (e.charAt(0) === "+") {
|
|
2281
2281
|
let u = "";
|
|
2282
2282
|
for (let a = 0; a < e.length; a++) {
|
|
2283
|
-
const
|
|
2284
|
-
if (!isNaN(parseInt(
|
|
2285
|
-
if (u +=
|
|
2283
|
+
const c = e.charAt(a);
|
|
2284
|
+
if (!isNaN(parseInt(c, 10))) {
|
|
2285
|
+
if (u += c, i)
|
|
2286
2286
|
this.dialCodeToIso2Map[u] && (s = e.substr(0, a + 1));
|
|
2287
2287
|
else if (this.dialCodes[u]) {
|
|
2288
2288
|
s = e.substr(0, a + 1);
|
|
@@ -2299,7 +2299,7 @@ class U2 {
|
|
|
2299
2299
|
_getFullNumber() {
|
|
2300
2300
|
const e = this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
|
|
2301
2301
|
let s;
|
|
2302
|
-
const u =
|
|
2302
|
+
const u = c1(e);
|
|
2303
2303
|
return this.options.separateDialCode && e.charAt(0) !== "+" && i && u ? s = `+${i}` : s = "", s + e;
|
|
2304
2304
|
}
|
|
2305
2305
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
@@ -2321,7 +2321,7 @@ class U2 {
|
|
|
2321
2321
|
}
|
|
2322
2322
|
//* Format the number as the user types.
|
|
2323
2323
|
_formatNumberAsYouType() {
|
|
2324
|
-
const e = this._getFullNumber(), i =
|
|
2324
|
+
const e = this._getFullNumber(), i = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: s } = this.selectedCountryData;
|
|
2325
2325
|
return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${s}`) ? (i.split(`+${s}`)[1] || "").trim() : i;
|
|
2326
2326
|
}
|
|
2327
2327
|
//**************************
|
|
@@ -2329,18 +2329,18 @@ class U2 {
|
|
|
2329
2329
|
//**************************
|
|
2330
2330
|
//* This is called when the geoip call returns.
|
|
2331
2331
|
handleAutoCountry() {
|
|
2332
|
-
this.options.initialCountry === "auto" &&
|
|
2332
|
+
this.options.initialCountry === "auto" && C.autoCountry && (this.defaultCountry = C.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
|
|
2333
2333
|
}
|
|
2334
2334
|
//* This is called when the utils request completes.
|
|
2335
2335
|
handleUtils() {
|
|
2336
|
-
|
|
2336
|
+
C.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
|
|
2337
2337
|
}
|
|
2338
2338
|
//********************
|
|
2339
2339
|
//* PUBLIC METHODS
|
|
2340
2340
|
//********************
|
|
2341
2341
|
//* Remove plugin.
|
|
2342
2342
|
destroy() {
|
|
2343
|
-
var a,
|
|
2343
|
+
var a, c;
|
|
2344
2344
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2345
2345
|
if (e) {
|
|
2346
2346
|
this._closeDropdown(), this.selectedCountry.removeEventListener(
|
|
@@ -2350,26 +2350,26 @@ class U2 {
|
|
|
2350
2350
|
"keydown",
|
|
2351
2351
|
this._handleCountryContainerKeydown
|
|
2352
2352
|
);
|
|
2353
|
-
const
|
|
2354
|
-
|
|
2353
|
+
const p = this.telInput.closest("label");
|
|
2354
|
+
p && p.removeEventListener("click", this._handleLabelClick);
|
|
2355
2355
|
}
|
|
2356
2356
|
const { form: s } = this.telInput;
|
|
2357
2357
|
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);
|
|
2358
2358
|
const u = this.telInput.parentNode;
|
|
2359
|
-
(a = u == null ? void 0 : u.parentNode) == null || a.insertBefore(this.telInput, u), (
|
|
2359
|
+
(a = u == null ? void 0 : u.parentNode) == null || a.insertBefore(this.telInput, u), (c = u == null ? void 0 : u.parentNode) == null || c.removeChild(u), delete C.instances[this.id];
|
|
2360
2360
|
}
|
|
2361
2361
|
//* Get the extension from the current number.
|
|
2362
2362
|
getExtension() {
|
|
2363
|
-
return
|
|
2363
|
+
return C.utils ? C.utils.getExtension(
|
|
2364
2364
|
this._getFullNumber(),
|
|
2365
2365
|
this.selectedCountryData.iso2
|
|
2366
2366
|
) : "";
|
|
2367
2367
|
}
|
|
2368
2368
|
//* Format the number to the given format.
|
|
2369
2369
|
getNumber(e) {
|
|
2370
|
-
if (
|
|
2370
|
+
if (C.utils) {
|
|
2371
2371
|
const { iso2: i } = this.selectedCountryData;
|
|
2372
|
-
return
|
|
2372
|
+
return C.utils.formatNumber(
|
|
2373
2373
|
this._getFullNumber(),
|
|
2374
2374
|
i,
|
|
2375
2375
|
e
|
|
@@ -2379,7 +2379,7 @@ class U2 {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
//* Get the type of the entered number e.g. landline/mobile.
|
|
2381
2381
|
getNumberType() {
|
|
2382
|
-
return
|
|
2382
|
+
return C.utils ? C.utils.getNumberType(
|
|
2383
2383
|
this._getFullNumber(),
|
|
2384
2384
|
this.selectedCountryData.iso2
|
|
2385
2385
|
) : -99;
|
|
@@ -2390,9 +2390,9 @@ class U2 {
|
|
|
2390
2390
|
}
|
|
2391
2391
|
//* Get the validation error.
|
|
2392
2392
|
getValidationError() {
|
|
2393
|
-
if (
|
|
2393
|
+
if (C.utils) {
|
|
2394
2394
|
const { iso2: e } = this.selectedCountryData;
|
|
2395
|
-
return
|
|
2395
|
+
return C.utils.getValidationError(this._getFullNumber(), e);
|
|
2396
2396
|
}
|
|
2397
2397
|
return -99;
|
|
2398
2398
|
}
|
|
@@ -2408,7 +2408,7 @@ class U2 {
|
|
|
2408
2408
|
return this._utilsIsPossibleNumber(e);
|
|
2409
2409
|
}
|
|
2410
2410
|
_utilsIsPossibleNumber(e) {
|
|
2411
|
-
return
|
|
2411
|
+
return C.utils ? C.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberType) : null;
|
|
2412
2412
|
}
|
|
2413
2413
|
//* Validate the input val (precise)
|
|
2414
2414
|
isValidNumberPrecise() {
|
|
@@ -2422,7 +2422,7 @@ class U2 {
|
|
|
2422
2422
|
return this._utilsIsValidNumber(e);
|
|
2423
2423
|
}
|
|
2424
2424
|
_utilsIsValidNumber(e) {
|
|
2425
|
-
return
|
|
2425
|
+
return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2) : null;
|
|
2426
2426
|
}
|
|
2427
2427
|
//* Update the selected country, and update the input val accordingly.
|
|
2428
2428
|
setCountry(e) {
|
|
@@ -2442,31 +2442,31 @@ class U2 {
|
|
|
2442
2442
|
this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
|
-
const F2 = (
|
|
2445
|
+
const F2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUtilsScript = !0, new Promise((e, i) => {
|
|
2446
2446
|
import_INTENTIONALLY_BROKEN(
|
|
2447
2447
|
/* webpackIgnore: true */
|
|
2448
2448
|
/* @vite-ignore */
|
|
2449
|
-
|
|
2449
|
+
y
|
|
2450
2450
|
).then(({ default: s }) => {
|
|
2451
|
-
|
|
2451
|
+
C.utils = s, e1("handleUtils"), e(!0);
|
|
2452
2452
|
}).catch(() => {
|
|
2453
2453
|
e1("rejectUtilsScriptPromise"), i();
|
|
2454
2454
|
});
|
|
2455
|
-
})) : null,
|
|
2456
|
-
(
|
|
2457
|
-
const i = new U2(
|
|
2458
|
-
return i._init(),
|
|
2455
|
+
})) : null, C = Object.assign(
|
|
2456
|
+
(y, e) => {
|
|
2457
|
+
const i = new U2(y, e);
|
|
2458
|
+
return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), C.instances[i.id] = i, i;
|
|
2459
2459
|
},
|
|
2460
2460
|
{
|
|
2461
|
-
defaults:
|
|
2461
|
+
defaults: s2,
|
|
2462
2462
|
//* Using a static var like this allows us to mock it in the tests.
|
|
2463
2463
|
documentReady: () => document.readyState === "complete",
|
|
2464
2464
|
//* Get the country data object.
|
|
2465
2465
|
getCountryData: () => H,
|
|
2466
2466
|
//* A getter for the plugin instance.
|
|
2467
|
-
getInstance: (
|
|
2468
|
-
const e =
|
|
2469
|
-
return e ?
|
|
2467
|
+
getInstance: (y) => {
|
|
2468
|
+
const e = y.getAttribute("data-intl-tel-input-id");
|
|
2469
|
+
return e ? C.instances[e] : null;
|
|
2470
2470
|
},
|
|
2471
2471
|
//* A map from instance ID to instance object.
|
|
2472
2472
|
instances: {},
|
|
@@ -2475,10 +2475,10 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2475
2475
|
}
|
|
2476
2476
|
);
|
|
2477
2477
|
(function() {
|
|
2478
|
-
var
|
|
2478
|
+
var y = this || self;
|
|
2479
2479
|
function e(d, t) {
|
|
2480
2480
|
d = d.split(".");
|
|
2481
|
-
var $ =
|
|
2481
|
+
var $ = y;
|
|
2482
2482
|
d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
|
|
2483
2483
|
for (var n; d.length && (n = d.shift()); ) d.length || t === void 0 ? $[n] && $[n] !== Object.prototype[n] ? $ = $[n] : $ = $[n] = {} : $[n] = t;
|
|
2484
2484
|
}
|
|
@@ -2486,7 +2486,7 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2486
2486
|
function $() {
|
|
2487
2487
|
}
|
|
2488
2488
|
$.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(n, r, o) {
|
|
2489
|
-
for (var l = Array(arguments.length - 2),
|
|
2489
|
+
for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
|
|
2490
2490
|
return t.prototype[r].apply(n, l);
|
|
2491
2491
|
};
|
|
2492
2492
|
}
|
|
@@ -2506,52 +2506,52 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2506
2506
|
}
|
|
2507
2507
|
}, a = {};
|
|
2508
2508
|
new u("about:invalid#zClosurez"), new u("about:blank");
|
|
2509
|
-
const
|
|
2510
|
-
class
|
|
2509
|
+
const c = {};
|
|
2510
|
+
class p {
|
|
2511
2511
|
constructor() {
|
|
2512
|
-
if (
|
|
2512
|
+
if (c !== c) throw Error("SafeStyle is not meant to be built directly");
|
|
2513
2513
|
}
|
|
2514
2514
|
toString() {
|
|
2515
2515
|
return "";
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
|
-
new
|
|
2519
|
-
const
|
|
2520
|
-
class
|
|
2518
|
+
new p();
|
|
2519
|
+
const g = {};
|
|
2520
|
+
class b {
|
|
2521
2521
|
constructor() {
|
|
2522
|
-
if (
|
|
2522
|
+
if (g !== g) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
2523
2523
|
}
|
|
2524
2524
|
toString() {
|
|
2525
2525
|
return "";
|
|
2526
2526
|
}
|
|
2527
2527
|
}
|
|
2528
|
-
new
|
|
2529
|
-
const
|
|
2530
|
-
class
|
|
2528
|
+
new b();
|
|
2529
|
+
const _ = {};
|
|
2530
|
+
class T {
|
|
2531
2531
|
constructor() {
|
|
2532
|
-
var t =
|
|
2533
|
-
if (
|
|
2532
|
+
var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
|
|
2533
|
+
if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
|
|
2534
2534
|
this.g = t;
|
|
2535
2535
|
}
|
|
2536
2536
|
toString() {
|
|
2537
2537
|
return this.g.toString();
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
2540
|
-
new
|
|
2541
|
-
function
|
|
2540
|
+
new T();
|
|
2541
|
+
function S(d, t) {
|
|
2542
2542
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2543
|
-
case
|
|
2544
|
-
case
|
|
2545
|
-
case
|
|
2543
|
+
case x:
|
|
2544
|
+
case O:
|
|
2545
|
+
case $1:
|
|
2546
2546
|
case r2:
|
|
2547
2547
|
case o2:
|
|
2548
|
-
case
|
|
2549
|
-
case
|
|
2548
|
+
case A:
|
|
2549
|
+
case I:
|
|
2550
2550
|
this.o = !0;
|
|
2551
2551
|
}
|
|
2552
2552
|
this.j = t.defaultValue;
|
|
2553
2553
|
}
|
|
2554
|
-
var
|
|
2554
|
+
var I = 1, A = 2, x = 3, O = 4, $1 = 6, r2 = 16, o2 = 18;
|
|
2555
2555
|
function u2(d, t) {
|
|
2556
2556
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2557
2557
|
var $ = t[d];
|
|
@@ -2569,33 +2569,33 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2569
2569
|
P.prototype.has = function(d) {
|
|
2570
2570
|
return R(this, d.g);
|
|
2571
2571
|
}, P.prototype.get = function(d, t) {
|
|
2572
|
-
return
|
|
2572
|
+
return f(this, d.g, t);
|
|
2573
2573
|
}, P.prototype.set = function(d, t) {
|
|
2574
2574
|
E(this, d.g, t);
|
|
2575
2575
|
}, P.prototype.add = function(d, t) {
|
|
2576
|
-
|
|
2576
|
+
I1(this, d.g, t);
|
|
2577
2577
|
};
|
|
2578
|
-
function
|
|
2578
|
+
function _1(d, t) {
|
|
2579
2579
|
for (var $ = l2(d.m()), n = 0; n < $.length; n++) {
|
|
2580
2580
|
var r = $[n], o = r.g;
|
|
2581
2581
|
if (R(t, o)) {
|
|
2582
2582
|
d.g && delete d.g[r.g];
|
|
2583
2583
|
var l = r.h == 11 || r.h == 10;
|
|
2584
2584
|
if (r.l) {
|
|
2585
|
-
r =
|
|
2586
|
-
for (var
|
|
2587
|
-
} else r =
|
|
2585
|
+
r = M(t, o);
|
|
2586
|
+
for (var h = 0; h < r.length; h++) I1(d, o, l ? r[h].clone() : r[h]);
|
|
2587
|
+
} else r = i1(t, o), l ? (l = i1(d, o)) ? _1(l, r) : E(d, o, r.clone()) : E(d, o, r);
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
P.prototype.clone = function() {
|
|
2592
2592
|
var d = new this.constructor();
|
|
2593
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
2593
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), _1(d, this)), d;
|
|
2594
2594
|
};
|
|
2595
2595
|
function R(d, t) {
|
|
2596
2596
|
return d.h[t] != null;
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function i1(d, t) {
|
|
2599
2599
|
var $ = d.h[t];
|
|
2600
2600
|
if ($ == null) return null;
|
|
2601
2601
|
if (d.l) {
|
|
@@ -2611,12 +2611,12 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2611
2611
|
}
|
|
2612
2612
|
return $;
|
|
2613
2613
|
}
|
|
2614
|
-
function
|
|
2615
|
-
var n =
|
|
2614
|
+
function f(d, t, $) {
|
|
2615
|
+
var n = i1(d, t);
|
|
2616
2616
|
return d.j[t].l ? n[$ || 0] : n;
|
|
2617
2617
|
}
|
|
2618
2618
|
function v(d, t) {
|
|
2619
|
-
if (R(d, t)) d =
|
|
2619
|
+
if (R(d, t)) d = f(d, t);
|
|
2620
2620
|
else d: {
|
|
2621
2621
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2622
2622
|
else if (t === Number) d.j = 0;
|
|
@@ -2629,8 +2629,8 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2629
2629
|
}
|
|
2630
2630
|
return d;
|
|
2631
2631
|
}
|
|
2632
|
-
function
|
|
2633
|
-
return
|
|
2632
|
+
function M(d, t) {
|
|
2633
|
+
return i1(d, t) || [];
|
|
2634
2634
|
}
|
|
2635
2635
|
function F(d, t) {
|
|
2636
2636
|
return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
|
|
@@ -2638,97 +2638,97 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2638
2638
|
function E(d, t, $) {
|
|
2639
2639
|
d.h[t] = $, d.g && (d.g[t] = $);
|
|
2640
2640
|
}
|
|
2641
|
-
function
|
|
2641
|
+
function I1(d, t, $) {
|
|
2642
2642
|
d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2644
|
+
function n1(d, t) {
|
|
2645
2645
|
var $ = [], n;
|
|
2646
|
-
for (n in t) n != 0 && $.push(new
|
|
2646
|
+
for (n in t) n != 0 && $.push(new S(n, t[n]));
|
|
2647
2647
|
return new u2(d, $);
|
|
2648
2648
|
}
|
|
2649
|
-
function
|
|
2649
|
+
function s1() {
|
|
2650
2650
|
}
|
|
2651
|
-
|
|
2651
|
+
s1.prototype.g = function(d) {
|
|
2652
2652
|
throw new d.h(), Error("Unimplemented");
|
|
2653
|
-
},
|
|
2653
|
+
}, s1.prototype.h = function(d, t) {
|
|
2654
2654
|
if (d.h == 11 || d.h == 10) return t instanceof P ? t : this.g(d.s.prototype.m(), t);
|
|
2655
|
-
if (d.h == 14) return typeof t == "string" &&
|
|
2655
|
+
if (d.h == 14) return typeof t == "string" && v1.test(t) && (d = Number(t), 0 < d) ? d : t;
|
|
2656
2656
|
if (!d.o) return t;
|
|
2657
2657
|
if (d = d.s, d === String) {
|
|
2658
2658
|
if (typeof t == "number") return String(t);
|
|
2659
|
-
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" ||
|
|
2659
|
+
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || v1.test(t))) return Number(t);
|
|
2660
2660
|
return t;
|
|
2661
2661
|
};
|
|
2662
|
-
var
|
|
2663
|
-
function
|
|
2662
|
+
var v1 = /^-?[0-9]+$/;
|
|
2663
|
+
function f1() {
|
|
2664
2664
|
}
|
|
2665
|
-
i(
|
|
2665
|
+
i(f1, s1), f1.prototype.g = function(d, t) {
|
|
2666
2666
|
return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
|
|
2667
2667
|
};
|
|
2668
2668
|
function J() {
|
|
2669
2669
|
}
|
|
2670
|
-
i(J,
|
|
2671
|
-
return d.h == 8 ? !!t :
|
|
2670
|
+
i(J, f1), J.prototype.h = function(d, t) {
|
|
2671
|
+
return d.h == 8 ? !!t : s1.prototype.h.apply(this, arguments);
|
|
2672
2672
|
}, J.prototype.g = function(d, t) {
|
|
2673
2673
|
return J.ma.g.call(this, d, t);
|
|
2674
2674
|
};
|
|
2675
|
-
function
|
|
2675
|
+
function N(d, t) {
|
|
2676
2676
|
d != null && this.g.apply(this, arguments);
|
|
2677
2677
|
}
|
|
2678
|
-
|
|
2678
|
+
N.prototype.h = "", N.prototype.set = function(d) {
|
|
2679
2679
|
this.h = "" + d;
|
|
2680
|
-
},
|
|
2680
|
+
}, N.prototype.g = function(d, t, $) {
|
|
2681
2681
|
if (this.h += String(d), t != null) for (let n = 1; n < arguments.length; n++) this.h += arguments[n];
|
|
2682
2682
|
return this;
|
|
2683
2683
|
};
|
|
2684
2684
|
function B(d) {
|
|
2685
2685
|
d.h = "";
|
|
2686
2686
|
}
|
|
2687
|
-
|
|
2687
|
+
N.prototype.toString = function() {
|
|
2688
2688
|
return this.h;
|
|
2689
2689
|
};
|
|
2690
2690
|
function j() {
|
|
2691
2691
|
P.call(this);
|
|
2692
2692
|
}
|
|
2693
2693
|
i(j, P);
|
|
2694
|
-
var
|
|
2695
|
-
function
|
|
2694
|
+
var S1 = null;
|
|
2695
|
+
function w() {
|
|
2696
2696
|
P.call(this);
|
|
2697
2697
|
}
|
|
2698
|
-
i(
|
|
2699
|
-
var
|
|
2698
|
+
i(w, P);
|
|
2699
|
+
var w1 = null;
|
|
2700
2700
|
function W() {
|
|
2701
2701
|
P.call(this);
|
|
2702
2702
|
}
|
|
2703
2703
|
i(W, P);
|
|
2704
|
-
var
|
|
2704
|
+
var b1 = null;
|
|
2705
2705
|
j.prototype.m = function() {
|
|
2706
|
-
var d = v1;
|
|
2707
|
-
return d || (v1 = d = i1(j, { 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;
|
|
2708
|
-
}, j.m = j.prototype.m, b.prototype.m = function() {
|
|
2709
2706
|
var d = S1;
|
|
2710
|
-
return d || (S1 = d =
|
|
2711
|
-
},
|
|
2707
|
+
return d || (S1 = d = n1(j, { 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;
|
|
2708
|
+
}, j.m = j.prototype.m, w.prototype.m = function() {
|
|
2712
2709
|
var d = w1;
|
|
2713
|
-
return d || (w1 = d =
|
|
2710
|
+
return d || (w1 = d = n1(w, { 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;
|
|
2711
|
+
}, w.m = w.prototype.m, W.prototype.m = function() {
|
|
2712
|
+
var d = b1;
|
|
2713
|
+
return d || (b1 = d = n1(W, {
|
|
2714
2714
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2715
|
-
1: { name: "general_desc", i: 11, type:
|
|
2716
|
-
2: { name: "fixed_line", i: 11, type:
|
|
2717
|
-
3: { name: "mobile", i: 11, type:
|
|
2718
|
-
4: { name: "toll_free", i: 11, type:
|
|
2719
|
-
5: { name: "premium_rate", i: 11, type:
|
|
2720
|
-
6: { name: "shared_cost", i: 11, type:
|
|
2721
|
-
7: { name: "personal_number", i: 11, type:
|
|
2722
|
-
8: { name: "voip", i: 11, type:
|
|
2723
|
-
21: { name: "pager", i: 11, type:
|
|
2724
|
-
25: { name: "uan", i: 11, type:
|
|
2725
|
-
27: { name: "emergency", i: 11, type:
|
|
2726
|
-
28: { name: "voicemail", i: 11, type:
|
|
2727
|
-
29: { name: "short_code", i: 11, type:
|
|
2728
|
-
30: { name: "standard_rate", i: 11, type:
|
|
2729
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
2730
|
-
33: { name: "sms_services", i: 11, type:
|
|
2731
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
2715
|
+
1: { name: "general_desc", i: 11, type: w },
|
|
2716
|
+
2: { name: "fixed_line", i: 11, type: w },
|
|
2717
|
+
3: { name: "mobile", i: 11, type: w },
|
|
2718
|
+
4: { name: "toll_free", i: 11, type: w },
|
|
2719
|
+
5: { name: "premium_rate", i: 11, type: w },
|
|
2720
|
+
6: { name: "shared_cost", i: 11, type: w },
|
|
2721
|
+
7: { name: "personal_number", i: 11, type: w },
|
|
2722
|
+
8: { name: "voip", i: 11, type: w },
|
|
2723
|
+
21: { name: "pager", i: 11, type: w },
|
|
2724
|
+
25: { name: "uan", i: 11, type: w },
|
|
2725
|
+
27: { name: "emergency", i: 11, type: w },
|
|
2726
|
+
28: { name: "voicemail", i: 11, type: w },
|
|
2727
|
+
29: { name: "short_code", i: 11, type: w },
|
|
2728
|
+
30: { name: "standard_rate", i: 11, type: w },
|
|
2729
|
+
31: { name: "carrier_specific", i: 11, type: w },
|
|
2730
|
+
33: { name: "sms_services", i: 11, type: w },
|
|
2731
|
+
24: { name: "no_international_dialling", i: 11, type: w },
|
|
2732
2732
|
9: { name: "id", required: !0, i: 9, type: String },
|
|
2733
2733
|
10: { name: "country_code", i: 5, type: Number },
|
|
2734
2734
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -2752,10 +2752,10 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2752
2752
|
P.call(this);
|
|
2753
2753
|
}
|
|
2754
2754
|
i(V, P);
|
|
2755
|
-
var
|
|
2755
|
+
var T1 = null, a2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
2756
2756
|
V.prototype.m = function() {
|
|
2757
|
-
var d =
|
|
2758
|
-
return d || (
|
|
2757
|
+
var d = T1;
|
|
2758
|
+
return d || (T1 = d = n1(V, { 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: a2 }, 7: {
|
|
2759
2759
|
name: "preferred_domestic_carrier_code",
|
|
2760
2760
|
i: 9,
|
|
2761
2761
|
type: String
|
|
@@ -2977,7 +2977,7 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
2977
2977
|
995: ["GE"],
|
|
2978
2978
|
996: ["KG"],
|
|
2979
2979
|
998: ["UZ"]
|
|
2980
|
-
},
|
|
2980
|
+
}, A1 = {
|
|
2981
2981
|
AC: [, [
|
|
2982
2982
|
,
|
|
2983
2983
|
,
|
|
@@ -7996,7 +7996,7 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
7996
7996
|
D.h = void 0, D.g = function() {
|
|
7997
7997
|
return D.h ? D.h : D.h = new D();
|
|
7998
7998
|
};
|
|
7999
|
-
var
|
|
7999
|
+
var p1 = { 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" }, h2 = {
|
|
8000
8000
|
0: "0",
|
|
8001
8001
|
1: "1",
|
|
8002
8002
|
2: "2",
|
|
@@ -8077,74 +8077,74 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8077
8077
|
X: "9",
|
|
8078
8078
|
Y: "9",
|
|
8079
8079
|
Z: "9"
|
|
8080
|
-
}, f2 = RegExp("[++]+"), X = RegExp("^[++]+"),
|
|
8080
|
+
}, f2 = RegExp("[++]+"), X = RegExp("^[++]+"), N1 = RegExp("([0-90-9٠-٩۰-۹])"), p2 = RegExp("[++0-90-9٠-٩۰-۹]"), g2 = /[\\\/] *x/, C2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), m2 = /(?:.*?[A-Za-z]){3}.*/, y2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), _2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
8081
8081
|
function Z(d) {
|
|
8082
8082
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8083
8083
|
}
|
|
8084
|
-
function
|
|
8084
|
+
function L1() {
|
|
8085
8085
|
return ";ext=" + Z("20") + "|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*" + (Z("20") + "#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*") + (Z("9") + "#?|[- ]+") + (Z("6") + "#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*") + (Z("15") + "#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*") + (Z("9") + "#?");
|
|
8086
8086
|
}
|
|
8087
|
-
var
|
|
8088
|
-
function E1(d) {
|
|
8089
|
-
return 2 > d.length ? !1 : O(I2, d);
|
|
8090
|
-
}
|
|
8087
|
+
var E1 = new RegExp("(?:" + L1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + L1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
|
|
8091
8088
|
function D1(d) {
|
|
8092
|
-
return
|
|
8089
|
+
return 2 > d.length ? !1 : G(I2, d);
|
|
8093
8090
|
}
|
|
8094
8091
|
function M1(d) {
|
|
8095
|
-
|
|
8096
|
-
B(d), d.g(t);
|
|
8092
|
+
return G(m2, d) ? r1(d, c2) : r1(d, p1);
|
|
8097
8093
|
}
|
|
8098
8094
|
function x1(d) {
|
|
8099
|
-
|
|
8095
|
+
var t = M1(d.toString());
|
|
8096
|
+
B(d), d.g(t);
|
|
8100
8097
|
}
|
|
8101
|
-
function
|
|
8102
|
-
|
|
8098
|
+
function P1(d) {
|
|
8099
|
+
return d != null && (F(d, 9) != 1 || M(d, 9)[0] != -1);
|
|
8100
|
+
}
|
|
8101
|
+
function r1(d, t) {
|
|
8102
|
+
for (var $ = new N(), n, r = d.length, o = 0; o < r; ++o) n = d.charAt(o), n = t[n.toUpperCase()], n != null && $.g(n);
|
|
8103
8103
|
return $.toString();
|
|
8104
8104
|
}
|
|
8105
|
-
function
|
|
8105
|
+
function R1(d) {
|
|
8106
8106
|
return d.length == 0 || S2.test(d);
|
|
8107
8107
|
}
|
|
8108
|
-
function
|
|
8109
|
-
return d != null && isNaN(d) && d.toUpperCase() in
|
|
8108
|
+
function o1(d) {
|
|
8109
|
+
return d != null && isNaN(d) && d.toUpperCase() in A1;
|
|
8110
8110
|
}
|
|
8111
8111
|
D.prototype.format = function(d, t) {
|
|
8112
|
-
if (
|
|
8112
|
+
if (f(d, 2) == 0 && R(d, 5)) {
|
|
8113
8113
|
var $ = v(d, 5);
|
|
8114
8114
|
if (0 < $.length) return $;
|
|
8115
8115
|
}
|
|
8116
8116
|
$ = v(d, 1);
|
|
8117
8117
|
var n = d1(d);
|
|
8118
|
-
if (t == 0) return
|
|
8118
|
+
if (t == 0) return B1($, 0, n, "");
|
|
8119
8119
|
if (!($ in q)) return n;
|
|
8120
8120
|
var r = Q(this, $, t1($));
|
|
8121
|
-
d = R(d, 3) &&
|
|
8121
|
+
d = R(d, 3) && f(d, 3).length != 0 ? t == 3 ? ";ext=" + f(d, 3) : R(r, 13) ? f(r, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
|
|
8122
8122
|
d: {
|
|
8123
|
-
r =
|
|
8124
|
-
for (var o, l = r.length,
|
|
8125
|
-
o = r[
|
|
8126
|
-
var
|
|
8127
|
-
if ((
|
|
8123
|
+
r = M(r, 20).length == 0 || t == 2 ? M(r, 19) : M(r, 20);
|
|
8124
|
+
for (var o, l = r.length, h = 0; h < l; ++h) {
|
|
8125
|
+
o = r[h];
|
|
8126
|
+
var m = F(o, 3);
|
|
8127
|
+
if ((m == 0 || n.search(f(o, 3, m - 1)) == 0) && (m = new RegExp(f(o, 1)), G(m, n))) {
|
|
8128
8128
|
r = o;
|
|
8129
8129
|
break d;
|
|
8130
8130
|
}
|
|
8131
8131
|
}
|
|
8132
8132
|
r = null;
|
|
8133
8133
|
}
|
|
8134
|
-
return r != null && (l = r, r = v(l, 2), o = new RegExp(
|
|
8134
|
+
return r != null && (l = r, r = v(l, 2), o = new RegExp(f(l, 1)), v(
|
|
8135
8135
|
l,
|
|
8136
8136
|
5
|
|
8137
|
-
), l = v(l, 4), n = t == 2 && l != null && 0 < l.length ? n.replace(o, r.replace(v2, l)) : n.replace(o, r), t == 3 && (n = n.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), n = n.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))),
|
|
8137
|
+
), l = v(l, 4), n = t == 2 && l != null && 0 < l.length ? n.replace(o, r.replace(v2, l)) : n.replace(o, r), t == 3 && (n = n.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), n = n.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), B1($, t, n, d);
|
|
8138
8138
|
};
|
|
8139
8139
|
function Q(d, t, $) {
|
|
8140
8140
|
return $ == "001" ? K(d, "" + t) : K(d, $);
|
|
8141
8141
|
}
|
|
8142
8142
|
function d1(d) {
|
|
8143
8143
|
if (!R(d, 2)) return "";
|
|
8144
|
-
var t = "" +
|
|
8145
|
-
return R(d, 4) &&
|
|
8144
|
+
var t = "" + f(d, 2);
|
|
8145
|
+
return R(d, 4) && f(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
|
|
8146
8146
|
}
|
|
8147
|
-
function
|
|
8147
|
+
function B1(d, t, $, n) {
|
|
8148
8148
|
switch (t) {
|
|
8149
8149
|
case 0:
|
|
8150
8150
|
return "+" + d + $ + n;
|
|
@@ -8156,51 +8156,51 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8156
8156
|
return $ + n;
|
|
8157
8157
|
}
|
|
8158
8158
|
}
|
|
8159
|
-
function
|
|
8159
|
+
function u1(d, t) {
|
|
8160
8160
|
switch (t) {
|
|
8161
8161
|
case 4:
|
|
8162
|
-
return
|
|
8162
|
+
return f(d, 5);
|
|
8163
8163
|
case 3:
|
|
8164
|
-
return
|
|
8164
|
+
return f(d, 4);
|
|
8165
8165
|
case 1:
|
|
8166
|
-
return
|
|
8166
|
+
return f(d, 3);
|
|
8167
8167
|
case 0:
|
|
8168
8168
|
case 2:
|
|
8169
|
-
return
|
|
8169
|
+
return f(d, 2);
|
|
8170
8170
|
case 5:
|
|
8171
|
-
return
|
|
8171
|
+
return f(d, 6);
|
|
8172
8172
|
case 6:
|
|
8173
|
-
return
|
|
8173
|
+
return f(d, 8);
|
|
8174
8174
|
case 7:
|
|
8175
|
-
return
|
|
8175
|
+
return f(d, 7);
|
|
8176
8176
|
case 8:
|
|
8177
|
-
return
|
|
8177
|
+
return f(d, 21);
|
|
8178
8178
|
case 9:
|
|
8179
|
-
return
|
|
8179
|
+
return f(d, 25);
|
|
8180
8180
|
case 10:
|
|
8181
|
-
return
|
|
8181
|
+
return f(d, 28);
|
|
8182
8182
|
default:
|
|
8183
|
-
return
|
|
8183
|
+
return f(d, 1);
|
|
8184
8184
|
}
|
|
8185
8185
|
}
|
|
8186
|
-
function
|
|
8187
|
-
return k(d,
|
|
8186
|
+
function g1(d, t) {
|
|
8187
|
+
return k(d, f(t, 1)) ? k(d, f(t, 5)) ? 4 : k(d, f(t, 4)) ? 3 : k(d, f(t, 6)) ? 5 : k(d, f(t, 8)) ? 6 : k(d, f(t, 7)) ? 7 : k(d, f(t, 21)) ? 8 : k(d, f(t, 25)) ? 9 : k(d, f(t, 28)) ? 10 : k(d, f(t, 2)) ? f(t, 18) || k(d, f(t, 3)) ? 2 : 0 : !f(t, 18) && k(d, f(t, 3)) ? 1 : -1 : -1;
|
|
8188
8188
|
}
|
|
8189
8189
|
function K(d, t) {
|
|
8190
8190
|
if (t == null) return null;
|
|
8191
8191
|
t = t.toUpperCase();
|
|
8192
8192
|
var $ = d.g[t];
|
|
8193
8193
|
if ($ == null) {
|
|
8194
|
-
if ($ =
|
|
8194
|
+
if ($ = A1[t], $ == null) return null;
|
|
8195
8195
|
$ = new J().g(W.m(), $), d.g[t] = $;
|
|
8196
8196
|
}
|
|
8197
8197
|
return $;
|
|
8198
8198
|
}
|
|
8199
8199
|
function k(d, t) {
|
|
8200
8200
|
var $ = d.length;
|
|
8201
|
-
return 0 < F(t, 9) &&
|
|
8201
|
+
return 0 < F(t, 9) && M(t, 9).indexOf($) == -1 ? !1 : G(v(t, 2), d);
|
|
8202
8202
|
}
|
|
8203
|
-
function
|
|
8203
|
+
function k1(d, t) {
|
|
8204
8204
|
if (t == null) return null;
|
|
8205
8205
|
var $ = v(t, 1);
|
|
8206
8206
|
if ($ = q[$], $ == null) d = null;
|
|
@@ -8211,11 +8211,11 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8211
8211
|
n = $[o];
|
|
8212
8212
|
var l = K(d, n);
|
|
8213
8213
|
if (R(l, 23)) {
|
|
8214
|
-
if (t.search(
|
|
8214
|
+
if (t.search(f(l, 23)) == 0) {
|
|
8215
8215
|
d = n;
|
|
8216
8216
|
break d;
|
|
8217
8217
|
}
|
|
8218
|
-
} else if (
|
|
8218
|
+
} else if (g1(t, l) != -1) {
|
|
8219
8219
|
d = n;
|
|
8220
8220
|
break d;
|
|
8221
8221
|
}
|
|
@@ -8227,100 +8227,100 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8227
8227
|
function t1(d) {
|
|
8228
8228
|
return d = q[d], d == null ? "ZZ" : d[0];
|
|
8229
8229
|
}
|
|
8230
|
-
function
|
|
8230
|
+
function O1(d, t) {
|
|
8231
8231
|
if (d = K(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8232
8232
|
return v(d, 10);
|
|
8233
8233
|
}
|
|
8234
|
-
function
|
|
8235
|
-
var r =
|
|
8236
|
-
if (r =
|
|
8237
|
-
else return
|
|
8234
|
+
function l1(d, t, $, n) {
|
|
8235
|
+
var r = u1($, n), o = F(r, 9) == 0 ? M(f($, 1), 9) : M(r, 9);
|
|
8236
|
+
if (r = M(r, 10), n == 2) if (P1(u1($, 0))) d = u1($, 1), P1(d) && (o = o.concat(F(d, 9) == 0 ? M(f($, 1), 9) : M(d, 9)), o.sort(), r.length == 0 ? r = M(d, 10) : (r = r.concat(M(d, 10)), r.sort()));
|
|
8237
|
+
else return l1(d, t, $, 1);
|
|
8238
8238
|
return o[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = o[0], $ == t ? 0 : $ > t ? 2 : o[o.length - 1] < t ? 3 : -1 < o.indexOf(t, 1) ? 0 : 5));
|
|
8239
8239
|
}
|
|
8240
8240
|
function Y(d, t, $) {
|
|
8241
8241
|
var n = d1(t);
|
|
8242
|
-
return t = v(t, 1), t in q ? (t = Q(d, t, t1(t)),
|
|
8242
|
+
return t = v(t, 1), t in q ? (t = Q(d, t, t1(t)), l1(d, n, t, $)) : 1;
|
|
8243
8243
|
}
|
|
8244
|
-
function
|
|
8244
|
+
function G1(d, t) {
|
|
8245
8245
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
8246
8246
|
for (var $, n = d.length, r = 1; 3 >= r && r <= n; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in q) return t.g(d.substring(r)), $;
|
|
8247
8247
|
return 0;
|
|
8248
8248
|
}
|
|
8249
|
-
function
|
|
8249
|
+
function U1(d, t, $, n, r, o) {
|
|
8250
8250
|
if (t.length == 0) return 0;
|
|
8251
|
-
t = new
|
|
8251
|
+
t = new N(t);
|
|
8252
8252
|
var l;
|
|
8253
|
-
$ != null && (l =
|
|
8254
|
-
var
|
|
8255
|
-
if (
|
|
8256
|
-
else if (X.test(
|
|
8253
|
+
$ != null && (l = f($, 11)), l == null && (l = "NonMatch");
|
|
8254
|
+
var h = t.toString();
|
|
8255
|
+
if (h.length == 0) l = 20;
|
|
8256
|
+
else if (X.test(h)) h = h.replace(X, ""), B(t), t.g(M1(h)), l = 1;
|
|
8257
8257
|
else {
|
|
8258
|
-
if (
|
|
8259
|
-
|
|
8260
|
-
var
|
|
8261
|
-
|
|
8258
|
+
if (h = new RegExp(l), x1(t), l = t.toString(), l.search(h) == 0) {
|
|
8259
|
+
h = l.match(h)[0].length;
|
|
8260
|
+
var m = l.substring(h).match(N1);
|
|
8261
|
+
m && m[1] != null && 0 < m[1].length && r1(m[1], p1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
|
|
8262
8262
|
} else l = !1;
|
|
8263
8263
|
l = l ? 5 : 20;
|
|
8264
8264
|
}
|
|
8265
8265
|
if (r && E(o, 6, l), l != 20) {
|
|
8266
8266
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
8267
|
-
if (d =
|
|
8267
|
+
if (d = G1(t, n), d != 0) return E(o, 1, d), d;
|
|
8268
8268
|
throw Error("Invalid country calling code");
|
|
8269
8269
|
}
|
|
8270
|
-
return $ != null && (l = v($, 10),
|
|
8270
|
+
return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new N(m.substring(h.length)), m = f($, 1), m = new RegExp(v(m, 2)), F1(h, $, null), h = h.toString(), !G(m, t.toString()) && G(m, h) || l1(d, t.toString(), $, -1) == 3)) ? (n.g(h), r && E(o, 6, 10), E(o, 1, l), l) : (E(o, 1, 0), 0);
|
|
8271
8271
|
}
|
|
8272
|
-
function
|
|
8273
|
-
var n = d.toString(), r = n.length, o =
|
|
8272
|
+
function F1(d, t, $) {
|
|
8273
|
+
var n = d.toString(), r = n.length, o = f(t, 15);
|
|
8274
8274
|
if (r != 0 && o != null && o.length != 0) {
|
|
8275
8275
|
var l = new RegExp("^(?:" + o + ")");
|
|
8276
8276
|
if (r = l.exec(n)) {
|
|
8277
|
-
o = new RegExp(v(
|
|
8278
|
-
var
|
|
8279
|
-
t =
|
|
8277
|
+
o = new RegExp(v(f(t, 1), 2));
|
|
8278
|
+
var h = G(o, n), m = r.length - 1;
|
|
8279
|
+
t = f(t, 16), t == null || t.length == 0 || r[m] == null || r[m].length == 0 ? (!h || G(o, n.substring(r[0].length))) && ($ != null && 0 < m && r[m] != null && $.g(r[1]), d.set(n.substring(r[0].length))) : (n = n.replace(l, t), (!h || G(o, n)) && ($ != null && 0 < m && $.g(r[1]), d.set(n)));
|
|
8280
8280
|
}
|
|
8281
8281
|
}
|
|
8282
8282
|
}
|
|
8283
8283
|
function z(d, t, $) {
|
|
8284
|
-
if (!
|
|
8285
|
-
return
|
|
8284
|
+
if (!o1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
8285
|
+
return V1(d, t, $, !0);
|
|
8286
8286
|
}
|
|
8287
|
-
function
|
|
8287
|
+
function V1(d, t, $, n) {
|
|
8288
8288
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8289
8289
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8290
|
-
var r = new
|
|
8290
|
+
var r = new N(), o = t.indexOf(";phone-context=");
|
|
8291
8291
|
if (o === -1) o = null;
|
|
8292
8292
|
else if (o += 15, o >= t.length) o = "";
|
|
8293
8293
|
else {
|
|
8294
8294
|
var l = t.indexOf(";", o);
|
|
8295
8295
|
o = l !== -1 ? t.substring(o, l) : t.substring(o);
|
|
8296
8296
|
}
|
|
8297
|
-
var
|
|
8298
|
-
if (
|
|
8299
|
-
if (o = r.toString(), !(
|
|
8297
|
+
var h = o;
|
|
8298
|
+
if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = y2.exec(h), h = _2.exec(h), l = l !== null || h !== null), !l || (o != null ? (o.charAt(0) === "+" && r.g(o), o = t.indexOf("tel:"), r.g(t.substring(0 <= o ? o + 4 : 0, t.indexOf(";phone-context=")))) : (o = r.g, l = t ?? "", h = l.search(p2), 0 <= h ? (l = l.substring(h), l = l.replace(C2, ""), h = l.search(g2), 0 <= h && (l = l.substring(0, h))) : l = "", o.call(r, l)), o = r.toString(), l = o.indexOf(";isub="), 0 < l && (B(r), r.g(o.substring(0, l))), !D1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8299
|
+
if (o = r.toString(), !(o1($) || o != null && 0 < o.length && X.test(o))) throw Error("Invalid country calling code");
|
|
8300
8300
|
o = new V(), n && E(o, 5, t);
|
|
8301
8301
|
d: {
|
|
8302
|
-
if (t = r.toString(), l = t.search(
|
|
8303
|
-
|
|
8304
|
-
for (var
|
|
8305
|
-
B(r), r.g(t.substring(0, l)), t =
|
|
8302
|
+
if (t = r.toString(), l = t.search(E1), 0 <= l && D1(t.substring(0, l))) {
|
|
8303
|
+
h = t.match(E1);
|
|
8304
|
+
for (var m = h.length, U = 1; U < m; ++U) if (h[U] != null && 0 < h[U].length) {
|
|
8305
|
+
B(r), r.g(t.substring(0, l)), t = h[U];
|
|
8306
8306
|
break d;
|
|
8307
8307
|
}
|
|
8308
8308
|
}
|
|
8309
8309
|
t = "";
|
|
8310
8310
|
}
|
|
8311
|
-
0 < t.length && E(o, 3, t), l = K(d, $), t = new
|
|
8311
|
+
0 < t.length && E(o, 3, t), l = K(d, $), t = new N(), h = 0, m = r.toString();
|
|
8312
8312
|
try {
|
|
8313
|
-
|
|
8314
|
-
} catch (
|
|
8315
|
-
if (
|
|
8316
|
-
if (
|
|
8317
|
-
} else throw
|
|
8313
|
+
h = U1(d, m, l, t, n, o);
|
|
8314
|
+
} catch (m1) {
|
|
8315
|
+
if (m1.message == "Invalid country calling code" && X.test(m)) {
|
|
8316
|
+
if (m = m.replace(X, ""), h = U1(d, m, l, t, n, o), h == 0) throw m1;
|
|
8317
|
+
} else throw m1;
|
|
8318
8318
|
}
|
|
8319
|
-
if (
|
|
8319
|
+
if (h != 0 ? (r = t1(h), r != $ && (l = Q(d, h, r))) : (x1(r), t.g(r.toString()), $ != null ? (h = v(l, 10), E(
|
|
8320
8320
|
o,
|
|
8321
8321
|
1,
|
|
8322
|
-
|
|
8323
|
-
)) : n && (delete o.h[6], o.g && delete o.g[6])), 2 > t.h.length || (l != null && ($ = new
|
|
8322
|
+
h
|
|
8323
|
+
)) : n && (delete o.h[6], o.g && delete o.g[6])), 2 > t.h.length || (l != null && ($ = new N(), r = new N(t.toString()), F1(r, l, $), d = l1(d, r.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = r, n && 0 < $.toString().length && E(o, 7, $.toString()))), n = t.toString(), d = n.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8324
8324
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8325
8325
|
if (1 < n.length && n.charAt(0) == "0") {
|
|
8326
8326
|
for (E(o, 4, !0), d = 1; d < n.length - 1 && n.charAt(d) == "0"; ) d++;
|
|
@@ -8328,47 +8328,47 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8328
8328
|
}
|
|
8329
8329
|
return E(o, 2, parseInt(n, 10)), o;
|
|
8330
8330
|
}
|
|
8331
|
-
function
|
|
8331
|
+
function G(d, t) {
|
|
8332
8332
|
return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
|
|
8333
8333
|
}
|
|
8334
8334
|
function w2(d) {
|
|
8335
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8335
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = j1(this, this.ka);
|
|
8336
8336
|
}
|
|
8337
|
-
var
|
|
8338
|
-
E(
|
|
8339
|
-
var b2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"),
|
|
8340
|
-
function
|
|
8337
|
+
var K1 = new W();
|
|
8338
|
+
E(K1, 11, "NA");
|
|
8339
|
+
var b2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), H1 = /[- ]/;
|
|
8340
|
+
function j1(d, t) {
|
|
8341
8341
|
var $ = d.ga;
|
|
8342
|
-
return t =
|
|
8342
|
+
return t = o1(t) ? O1($, t) : 0, d = K(d.ga, t1(t)), d ?? K1;
|
|
8343
8343
|
}
|
|
8344
|
-
function
|
|
8344
|
+
function W1(d) {
|
|
8345
8345
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8346
8346
|
var n = d.j[$], r = v(n, 1);
|
|
8347
8347
|
if (d.da == r) return !1;
|
|
8348
|
-
var o = d, l = n,
|
|
8348
|
+
var o = d, l = n, h = v(l, 1);
|
|
8349
8349
|
B(o.v);
|
|
8350
|
-
var
|
|
8350
|
+
var m = o;
|
|
8351
8351
|
l = v(l, 2);
|
|
8352
|
-
var
|
|
8353
|
-
if (
|
|
8352
|
+
var U = "999999999999999".match(h)[0];
|
|
8353
|
+
if (U.length < m.g.h.length ? m = "" : (m = U.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (o.v.g(m), o = !0) : o = !1, o) return d.da = r, d.ha = H1.test(f(n, 4)), d.$ = 0, !0;
|
|
8354
8354
|
}
|
|
8355
8355
|
return d.u = !1;
|
|
8356
8356
|
}
|
|
8357
|
-
function
|
|
8357
|
+
function z1(d, t) {
|
|
8358
8358
|
for (var $ = [], n = t.length - 3, r = d.j.length, o = 0; o < r; ++o) {
|
|
8359
8359
|
var l = d.j[o];
|
|
8360
|
-
F(l, 3) == 0 ? $.push(d.j[o]) : (l =
|
|
8360
|
+
F(l, 3) == 0 ? $.push(d.j[o]) : (l = f(l, 3, Math.min(n, F(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[o]));
|
|
8361
8361
|
}
|
|
8362
8362
|
d.j = $;
|
|
8363
8363
|
}
|
|
8364
8364
|
function T2(d, t) {
|
|
8365
8365
|
d.s.g(t);
|
|
8366
8366
|
var $ = t;
|
|
8367
|
-
if (
|
|
8367
|
+
if (N1.test($) || d.s.h.length == 1 && f2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = p1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
|
|
8368
8368
|
if (!d.la) {
|
|
8369
|
-
if (
|
|
8370
|
-
if (
|
|
8371
|
-
} 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 !=
|
|
8369
|
+
if (X1(d)) {
|
|
8370
|
+
if (Q1(d)) return Z1(d);
|
|
8371
|
+
} 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 != q1(d)) return d.h.g(" "), Z1(d);
|
|
8372
8372
|
}
|
|
8373
8373
|
return d.s.toString();
|
|
8374
8374
|
}
|
|
@@ -8378,61 +8378,61 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8378
8378
|
case 2:
|
|
8379
8379
|
return d.s.toString();
|
|
8380
8380
|
case 3:
|
|
8381
|
-
if (
|
|
8382
|
-
else return d.o =
|
|
8381
|
+
if (X1(d)) d.ea = !0;
|
|
8382
|
+
else return d.o = q1(d), C1(d);
|
|
8383
8383
|
default:
|
|
8384
|
-
return d.ea ? (
|
|
8384
|
+
return d.ea ? (Q1(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = d2(d, t), $ = Y1(d), 0 < $.length ? $ : (z1(d, d.g.toString()), W1(d) ? J1(d) : d.u ? a1(d, t) : d.s.toString())) : C1(d);
|
|
8385
8385
|
}
|
|
8386
8386
|
}
|
|
8387
|
-
function z1(d) {
|
|
8388
|
-
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", g1(d);
|
|
8389
|
-
}
|
|
8390
8387
|
function Z1(d) {
|
|
8388
|
+
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", C1(d);
|
|
8389
|
+
}
|
|
8390
|
+
function Y1(d) {
|
|
8391
8391
|
for (var t = d.g.toString(), $ = d.j.length, n = 0; n < $; ++n) {
|
|
8392
8392
|
var r = d.j[n], o = v(r, 1);
|
|
8393
|
-
if (new RegExp("^(?:" + o + ")$").test(t) && (d.ha =
|
|
8393
|
+
if (new RegExp("^(?:" + o + ")$").test(t) && (d.ha = H1.test(f(r, 4)), r = t.replace(new RegExp(o, "g"), f(r, 2)), r = a1(d, r), r1(r, h2) == d.ba)) return r;
|
|
8394
8394
|
}
|
|
8395
8395
|
return "";
|
|
8396
8396
|
}
|
|
8397
|
-
function
|
|
8397
|
+
function a1(d, t) {
|
|
8398
8398
|
var $ = d.h.h.length;
|
|
8399
8399
|
return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
|
|
8400
8400
|
}
|
|
8401
|
-
function
|
|
8401
|
+
function C1(d) {
|
|
8402
8402
|
var t = d.g.toString();
|
|
8403
8403
|
if (3 <= t.length) {
|
|
8404
|
-
for (var $ = d.ca && d.o.length == 0 && 0 < F(d.l, 20) ?
|
|
8404
|
+
for (var $ = d.ca && d.o.length == 0 && 0 < F(d.l, 20) ? M(d.l, 20) : M(d.l, 19), n = $.length, r = 0; r < n; ++r) {
|
|
8405
8405
|
var o = $[r];
|
|
8406
|
-
0 < d.o.length &&
|
|
8406
|
+
0 < d.o.length && R1(v(o, 4)) && !f(o, 6) && !R(o, 5) || (d.o.length != 0 || d.ca || R1(v(o, 4)) || f(o, 6)) && b2.test(v(o, 2)) && d.j.push(o);
|
|
8407
8407
|
}
|
|
8408
|
-
return
|
|
8408
|
+
return z1(d, t), t = Y1(d), 0 < t.length ? t : W1(d) ? J1(d) : d.s.toString();
|
|
8409
8409
|
}
|
|
8410
|
-
return
|
|
8410
|
+
return a1(d, t);
|
|
8411
8411
|
}
|
|
8412
|
-
function
|
|
8412
|
+
function J1(d) {
|
|
8413
8413
|
var t = d.g.toString(), $ = t.length;
|
|
8414
8414
|
if (0 < $) {
|
|
8415
|
-
for (var n = "", r = 0; r < $; r++) n =
|
|
8416
|
-
return d.u ?
|
|
8415
|
+
for (var n = "", r = 0; r < $; r++) n = d2(d, t.charAt(r));
|
|
8416
|
+
return d.u ? a1(d, n) : d.s.toString();
|
|
8417
8417
|
}
|
|
8418
8418
|
return d.h.toString();
|
|
8419
8419
|
}
|
|
8420
|
-
function
|
|
8420
|
+
function q1(d) {
|
|
8421
8421
|
var t = d.g.toString(), $ = 0;
|
|
8422
|
-
if (
|
|
8422
|
+
if (f(d.l, 10) != 1) var n = !1;
|
|
8423
8423
|
else n = d.g.toString(), n = n.charAt(0) == "1" && n.charAt(1) != "0" && n.charAt(1) != "1";
|
|
8424
|
-
return n ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (n = new RegExp("^(?:" +
|
|
8424
|
+
return n ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (n = new RegExp("^(?:" + f(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, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
|
|
8425
8425
|
}
|
|
8426
|
-
function
|
|
8427
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8426
|
+
function X1(d) {
|
|
8427
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + f(d.l, 11) + ")");
|
|
8428
8428
|
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;
|
|
8429
8429
|
}
|
|
8430
|
-
function
|
|
8430
|
+
function Q1(d) {
|
|
8431
8431
|
if (d.g.h.length == 0) return !1;
|
|
8432
|
-
var t = new
|
|
8433
|
-
return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = t1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l =
|
|
8432
|
+
var t = new N(), $ = G1(d.g, t);
|
|
8433
|
+
return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = t1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l = j1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
|
|
8434
8434
|
}
|
|
8435
|
-
function
|
|
8435
|
+
function d2(d, t) {
|
|
8436
8436
|
var $ = d.v.toString();
|
|
8437
8437
|
if (0 <= $.substring(d.$).search(d.fa)) {
|
|
8438
8438
|
var n = $.search(d.fa);
|
|
@@ -8440,7 +8440,7 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8440
8440
|
}
|
|
8441
8441
|
return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
|
|
8442
8442
|
}
|
|
8443
|
-
const
|
|
8443
|
+
const h1 = { 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 };
|
|
8444
8444
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8445
8445
|
try {
|
|
8446
8446
|
const $ = d.replace(/[^+0-9]/g, ""), n = new w2(t);
|
|
@@ -8460,39 +8460,39 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8460
8460
|
}
|
|
8461
8461
|
}), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, n) => {
|
|
8462
8462
|
try {
|
|
8463
|
-
const
|
|
8463
|
+
const m = D.g();
|
|
8464
8464
|
d: {
|
|
8465
|
-
var r =
|
|
8466
|
-
if (
|
|
8467
|
-
var o =
|
|
8465
|
+
var r = m;
|
|
8466
|
+
if (o1(d)) {
|
|
8467
|
+
var o = u1(K(r, d), $);
|
|
8468
8468
|
try {
|
|
8469
8469
|
if (R(o, 6)) {
|
|
8470
|
-
var l =
|
|
8470
|
+
var l = f(o, 6), h = V1(r, l, d, !1);
|
|
8471
8471
|
break d;
|
|
8472
8472
|
}
|
|
8473
8473
|
} catch {
|
|
8474
8474
|
}
|
|
8475
8475
|
}
|
|
8476
|
-
|
|
8476
|
+
h = null;
|
|
8477
8477
|
}
|
|
8478
|
-
return
|
|
8478
|
+
return m.format(h, n ? 0 : t ? 2 : 1);
|
|
8479
8479
|
} catch {
|
|
8480
8480
|
return "";
|
|
8481
8481
|
}
|
|
8482
8482
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8483
8483
|
try {
|
|
8484
|
-
return
|
|
8484
|
+
return f(z(D.g(), d, t), 3);
|
|
8485
8485
|
} catch {
|
|
8486
8486
|
return "";
|
|
8487
8487
|
}
|
|
8488
8488
|
}), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
|
|
8489
8489
|
try {
|
|
8490
|
-
const l = D.g(),
|
|
8491
|
-
var $ =
|
|
8490
|
+
const l = D.g(), h = z(l, d, t);
|
|
8491
|
+
var $ = k1(l, h), n = Q(l, v(h, 1), $);
|
|
8492
8492
|
if (n == null) var r = -1;
|
|
8493
8493
|
else {
|
|
8494
|
-
var o = d1(
|
|
8495
|
-
r =
|
|
8494
|
+
var o = d1(h);
|
|
8495
|
+
r = g1(o, n);
|
|
8496
8496
|
}
|
|
8497
8497
|
return r;
|
|
8498
8498
|
} catch {
|
|
@@ -8508,14 +8508,14 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8508
8508
|
}
|
|
8509
8509
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t) => {
|
|
8510
8510
|
try {
|
|
8511
|
-
const
|
|
8512
|
-
var $ = z(
|
|
8513
|
-
d =
|
|
8511
|
+
const m = D.g();
|
|
8512
|
+
var $ = z(m, d, t), n = k1(m, $);
|
|
8513
|
+
d = m;
|
|
8514
8514
|
var r = v($, 1), o = Q(d, r, n);
|
|
8515
|
-
if (o == null || n != "001" && r !=
|
|
8515
|
+
if (o == null || n != "001" && r != O1(d, n)) var l = !1;
|
|
8516
8516
|
else {
|
|
8517
|
-
var
|
|
8518
|
-
l =
|
|
8517
|
+
var h = d1($);
|
|
8518
|
+
l = g1(h, o) != -1;
|
|
8519
8519
|
}
|
|
8520
8520
|
return l;
|
|
8521
8521
|
} catch {
|
|
@@ -8525,10 +8525,10 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8525
8525
|
try {
|
|
8526
8526
|
const n = D.g(), r = z(n, d, t);
|
|
8527
8527
|
if ($) {
|
|
8528
|
-
const o = Y(n, r,
|
|
8528
|
+
const o = Y(n, r, h1[$]) === 0;
|
|
8529
8529
|
if ($ === "FIXED_LINE_OR_MOBILE") {
|
|
8530
|
-
const l = Y(n, r,
|
|
8531
|
-
return l ||
|
|
8530
|
+
const l = Y(n, r, h1.MOBILE) === 0, h = Y(n, r, h1.FIXED_LINE) === 0;
|
|
8531
|
+
return l || h || o;
|
|
8532
8532
|
}
|
|
8533
8533
|
return o;
|
|
8534
8534
|
}
|
|
@@ -8538,18 +8538,18 @@ const F2 = (m) => !g.utils && !g.startedLoadingUtilsScript ? (g.startedLoadingUt
|
|
|
8538
8538
|
}
|
|
8539
8539
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8540
8540
|
try {
|
|
8541
|
-
return
|
|
8541
|
+
return f(z(D.g(), d, t), 2).toString();
|
|
8542
8542
|
} catch {
|
|
8543
8543
|
return "";
|
|
8544
8544
|
}
|
|
8545
|
-
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType",
|
|
8545
|
+
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", h1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
8546
8546
|
})();
|
|
8547
8547
|
const V2 = window.intlTelInputUtilsTemp;
|
|
8548
8548
|
delete window.intlTelInputUtilsTemp;
|
|
8549
|
-
|
|
8549
|
+
C.utils = V2;
|
|
8550
8550
|
const H2 = {
|
|
8551
8551
|
__name: "IntlTelInputWithUtils",
|
|
8552
|
-
props: /* @__PURE__ */
|
|
8552
|
+
props: /* @__PURE__ */ t2({
|
|
8553
8553
|
options: {
|
|
8554
8554
|
type: Object,
|
|
8555
8555
|
default: () => ({})
|
|
@@ -8568,36 +8568,36 @@ const H2 = {
|
|
|
8568
8568
|
},
|
|
8569
8569
|
modelModifiers: {}
|
|
8570
8570
|
}),
|
|
8571
|
-
emits: /* @__PURE__ */
|
|
8572
|
-
setup(
|
|
8573
|
-
const s = A2(
|
|
8574
|
-
let
|
|
8575
|
-
|
|
8576
|
-
}, S = () => {
|
|
8577
|
-
var _;
|
|
8578
|
-
a("changeNumber", ((_ = h.value) == null ? void 0 : _.getNumber()) ?? ""), I();
|
|
8571
|
+
emits: /* @__PURE__ */ t2(["changeNumber", "changeCountry", "changeValidity", "changeErrorCode"], ["update:modelValue"]),
|
|
8572
|
+
setup(y, { expose: e, emit: i }) {
|
|
8573
|
+
const s = A2(y, "modelValue"), u = y, a = i, c = y1(), p = y1(), g = y1(!1), b = () => p.value ? u.options.strictMode ? p.value.isValidNumberPrecise() : p.value.isValidNumber() : null, _ = () => {
|
|
8574
|
+
let I = b();
|
|
8575
|
+
g.value !== I && (g.value = I, a("changeValidity", !!I), a("changeErrorCode", I ? null : p.value.getValidationError()));
|
|
8579
8576
|
}, T = () => {
|
|
8580
|
-
var
|
|
8581
|
-
a("
|
|
8577
|
+
var I;
|
|
8578
|
+
a("changeNumber", ((I = p.value) == null ? void 0 : I.getNumber()) ?? ""), _();
|
|
8579
|
+
}, S = () => {
|
|
8580
|
+
var I;
|
|
8581
|
+
a("changeCountry", ((I = p.value) == null ? void 0 : I.getSelectedCountryData().iso2) ?? ""), T(), _();
|
|
8582
8582
|
};
|
|
8583
8583
|
return N2(() => {
|
|
8584
|
-
|
|
8584
|
+
c.value && (p.value = C(c.value, u.options), u.value && p.value.setNumber(u.value), u.disabled && p.value.setDisabled(u.disabled));
|
|
8585
8585
|
}), L2(
|
|
8586
8586
|
() => u.disabled,
|
|
8587
|
-
(
|
|
8588
|
-
var
|
|
8589
|
-
return (
|
|
8587
|
+
(I) => {
|
|
8588
|
+
var A;
|
|
8589
|
+
return (A = p.value) == null ? void 0 : A.setDisabled(I);
|
|
8590
8590
|
}
|
|
8591
8591
|
), E2(() => {
|
|
8592
|
-
var
|
|
8593
|
-
return (
|
|
8594
|
-
}), e({ instance:
|
|
8592
|
+
var I;
|
|
8593
|
+
return (I = p.value) == null ? void 0 : I.destroy();
|
|
8594
|
+
}), e({ instance: p, input: c }), (I, A) => D2((M2(), x2("input", {
|
|
8595
8595
|
ref_key: "input",
|
|
8596
|
-
ref:
|
|
8597
|
-
"onUpdate:modelValue":
|
|
8596
|
+
ref: c,
|
|
8597
|
+
"onUpdate:modelValue": A[0] || (A[0] = (x) => s.value = x),
|
|
8598
8598
|
type: "tel",
|
|
8599
|
-
onCountrychange:
|
|
8600
|
-
onInput:
|
|
8599
|
+
onCountrychange: S,
|
|
8600
|
+
onInput: T
|
|
8601
8601
|
}, null, 544)), [
|
|
8602
8602
|
[P2, s.value]
|
|
8603
8603
|
]);
|