intl-tel-input 25.8.5 → 25.10.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.
- package/README.md +10 -6
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +12 -8
- package/angular/build/IntlTelInputWithUtils.js +12 -8
- package/angular/build/types/intl-tel-input.d.ts +1 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/en/interface.js +1 -1
- package/build/js/intlTelInput.d.ts +1 -0
- package/build/js/intlTelInput.js +13 -9
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +13 -9
- package/build/js/intlTelInputWithUtils.min.js +4 -4
- package/package.json +11 -10
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +12 -8
- package/react/build/IntlTelInput.d.ts +1 -0
- package/react/build/IntlTelInput.js +12 -8
- package/react/build/IntlTelInputWithUtils.cjs +12 -8
- package/react/build/IntlTelInputWithUtils.js +12 -8
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +102 -95
- package/vue/build/IntlTelInputWithUtils.mjs +279 -272
- package/build/js/i18n/index.mjs +0 -0
|
@@ -1579,7 +1579,7 @@ const V2 = {
|
|
|
1579
1579
|
zm: "Zambia",
|
|
1580
1580
|
zw: "Zimbabwe"
|
|
1581
1581
|
}, K2 = {
|
|
1582
|
-
selectedCountryAriaLabel: "Change country, selected ${
|
|
1582
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1583
1583
|
noCountrySelected: "Select country",
|
|
1584
1584
|
countryListAriaLabel: "List of countries",
|
|
1585
1585
|
searchPlaceholder: "Search",
|
|
@@ -1590,17 +1590,19 @@ const V2 = {
|
|
|
1590
1590
|
// additional countries (not supported by country-list library)
|
|
1591
1591
|
ac: "Ascension Island",
|
|
1592
1592
|
xk: "Kosovo"
|
|
1593
|
-
},
|
|
1593
|
+
}, u2 = { ...V2, ...K2 };
|
|
1594
1594
|
for (const m of J)
|
|
1595
|
-
m.name =
|
|
1595
|
+
m.name = u2[m.iso2];
|
|
1596
1596
|
let H2 = 0;
|
|
1597
|
-
const
|
|
1597
|
+
const w1 = (m) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(m).matches, j2 = () => {
|
|
1598
1598
|
if (typeof navigator < "u" && typeof window < "u") {
|
|
1599
|
-
const m = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e =
|
|
1599
|
+
const m = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = w1("(max-width: 500px)"), i = w1("(max-height: 600px)"), n = w1("(pointer: coarse)");
|
|
1600
1600
|
return m || e || n && i;
|
|
1601
1601
|
}
|
|
1602
1602
|
return !1;
|
|
1603
1603
|
}, l2 = {
|
|
1604
|
+
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1605
|
+
allowPhonewords: !1,
|
|
1604
1606
|
//* Whether or not to allow the dropdown.
|
|
1605
1607
|
allowDropdown: !0,
|
|
1606
1608
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
@@ -1667,7 +1669,7 @@ const S1 = (m) => typeof window < "u" && typeof window.matchMedia == "function"
|
|
|
1667
1669
|
"887",
|
|
1668
1670
|
"888",
|
|
1669
1671
|
"889"
|
|
1670
|
-
], f1 = (m) => m.replace(/\D/g, ""), o2 = (m = "") => m.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(),
|
|
1672
|
+
], f1 = (m) => m.replace(/\D/g, ""), o2 = (m = "") => m.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), a2 = (m) => {
|
|
1671
1673
|
const e = f1(m);
|
|
1672
1674
|
if (e.charAt(0) === "1") {
|
|
1673
1675
|
const i = e.substring(1, 4);
|
|
@@ -1707,7 +1709,7 @@ class p1 {
|
|
|
1707
1709
|
_init() {
|
|
1708
1710
|
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";
|
|
1709
1711
|
const e = this.options.allowDropdown || this.options.separateDialCode;
|
|
1710
|
-
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 = { ...
|
|
1712
|
+
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 };
|
|
1711
1713
|
const i = new Promise((o, l) => {
|
|
1712
1714
|
this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = l;
|
|
1713
1715
|
}), n = new Promise((o, l) => {
|
|
@@ -1732,9 +1734,9 @@ class p1 {
|
|
|
1732
1734
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
|
|
1733
1735
|
const { countryOrder: n } = this.options;
|
|
1734
1736
|
if (n) {
|
|
1735
|
-
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2),
|
|
1736
|
-
if (
|
|
1737
|
-
return
|
|
1737
|
+
const o = n.indexOf(e.iso2), l = n.indexOf(i.iso2), p = o > -1, h = l > -1;
|
|
1738
|
+
if (p || h)
|
|
1739
|
+
return p && h ? o - l : p ? -1 : 1;
|
|
1738
1740
|
}
|
|
1739
1741
|
return e.name.localeCompare(i.name);
|
|
1740
1742
|
});
|
|
@@ -1785,8 +1787,8 @@ class p1 {
|
|
|
1785
1787
|
const i = this.dialCodeToIso2Map[e.dialCode][0];
|
|
1786
1788
|
for (const n of e.areaCodes) {
|
|
1787
1789
|
for (let o = 1; o < n.length; o++) {
|
|
1788
|
-
const l = n.substring(0, o),
|
|
1789
|
-
this._addToDialCodeMap(i,
|
|
1790
|
+
const l = n.substring(0, o), p = e.dialCode + l;
|
|
1791
|
+
this._addToDialCodeMap(i, p), this._addToDialCodeMap(e.iso2, p);
|
|
1790
1792
|
}
|
|
1791
1793
|
this._addToDialCodeMap(e.iso2, e.dialCode + n);
|
|
1792
1794
|
}
|
|
@@ -1802,23 +1804,23 @@ class p1 {
|
|
|
1802
1804
|
showFlags: n,
|
|
1803
1805
|
containerClass: o,
|
|
1804
1806
|
hiddenInput: l,
|
|
1805
|
-
dropdownContainer:
|
|
1807
|
+
dropdownContainer: p,
|
|
1806
1808
|
fixDropdownWidth: h,
|
|
1807
1809
|
useFullscreenPopup: _,
|
|
1808
|
-
countrySearch:
|
|
1810
|
+
countrySearch: b,
|
|
1809
1811
|
i18n: v
|
|
1810
|
-
} = this.options,
|
|
1812
|
+
} = this.options, w = p1._buildClassNames({
|
|
1811
1813
|
iti: !0,
|
|
1812
1814
|
"iti--allow-dropdown": e,
|
|
1813
1815
|
"iti--show-flags": n,
|
|
1814
1816
|
"iti--inline-dropdown": !_,
|
|
1815
1817
|
[o]: !!o
|
|
1816
|
-
}),
|
|
1817
|
-
if ((f = this.telInput.parentNode) == null || f.insertBefore(
|
|
1818
|
+
}), A = N("div", { class: w });
|
|
1819
|
+
if ((f = this.telInput.parentNode) == null || f.insertBefore(A, this.telInput), e || n || i) {
|
|
1818
1820
|
this.countryContainer = N(
|
|
1819
1821
|
"div",
|
|
1820
1822
|
{ class: "iti__country-container" },
|
|
1821
|
-
|
|
1823
|
+
A
|
|
1822
1824
|
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
|
|
1823
1825
|
"button",
|
|
1824
1826
|
{
|
|
@@ -1859,7 +1861,7 @@ class p1 {
|
|
|
1859
1861
|
class: `iti__dropdown-content iti__hide ${F}`,
|
|
1860
1862
|
role: "dialog",
|
|
1861
1863
|
"aria-modal": "true"
|
|
1862
|
-
}),
|
|
1864
|
+
}), b) {
|
|
1863
1865
|
const D = N(
|
|
1864
1866
|
"div",
|
|
1865
1867
|
{ class: "iti__search-input-wrapper" },
|
|
@@ -1934,7 +1936,7 @@ class p1 {
|
|
|
1934
1936
|
"aria-label": v.countryListAriaLabel
|
|
1935
1937
|
},
|
|
1936
1938
|
this.dropdownContent
|
|
1937
|
-
), this._appendListItems(),
|
|
1939
|
+
), this._appendListItems(), b && this._updateSearchResultsA11yText(), p) {
|
|
1938
1940
|
const D = p1._buildClassNames({
|
|
1939
1941
|
iti: !0,
|
|
1940
1942
|
"iti--container": !0,
|
|
@@ -1947,21 +1949,21 @@ class p1 {
|
|
|
1947
1949
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1948
1950
|
}
|
|
1949
1951
|
}
|
|
1950
|
-
if (
|
|
1952
|
+
if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
|
|
1951
1953
|
const G = this.telInput.getAttribute("name") || "", F = l(G);
|
|
1952
1954
|
if (F.phone) {
|
|
1953
1955
|
const D = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${F.phone}"]`);
|
|
1954
1956
|
D ? this.hiddenInput = D : (this.hiddenInput = N("input", {
|
|
1955
1957
|
type: "hidden",
|
|
1956
1958
|
name: F.phone
|
|
1957
|
-
}),
|
|
1959
|
+
}), A.appendChild(this.hiddenInput));
|
|
1958
1960
|
}
|
|
1959
1961
|
if (F.country) {
|
|
1960
1962
|
const D = (O = this.telInput.form) == null ? void 0 : O.querySelector(`input[name="${F.country}"]`);
|
|
1961
1963
|
D ? this.hiddenInputCountry = D : (this.hiddenInputCountry = N("input", {
|
|
1962
1964
|
type: "hidden",
|
|
1963
1965
|
name: F.country
|
|
1964
|
-
}),
|
|
1966
|
+
}), A.appendChild(this.hiddenInputCountry));
|
|
1965
1967
|
}
|
|
1966
1968
|
}
|
|
1967
1969
|
}
|
|
@@ -1990,12 +1992,12 @@ class p1 {
|
|
|
1990
1992
|
//* 1. Extracting a dial code from the given number
|
|
1991
1993
|
//* 2. Using explicit initialCountry
|
|
1992
1994
|
_setInitialState(e = !1) {
|
|
1993
|
-
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n,
|
|
1994
|
-
if (
|
|
1995
|
+
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, p = this._getDialCode(l), h = a2(l), { initialCountry: _, geoIpLookup: b } = this.options, v = _ === "auto" && b;
|
|
1996
|
+
if (p && !h)
|
|
1995
1997
|
this._updateCountryFromNumber(l);
|
|
1996
1998
|
else if (!v || e) {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
+
const w = _ ? _.toLowerCase() : "";
|
|
2000
|
+
w && this._getCountryData(w, !0) ? this._setCountry(w) : p && h ? this._setCountry("us") : this._setCountry();
|
|
1999
2001
|
}
|
|
2000
2002
|
l && this._updateValFromNumber(l);
|
|
2001
2003
|
}
|
|
@@ -2055,19 +2057,19 @@ class p1 {
|
|
|
2055
2057
|
//* Initialize the tel input listeners.
|
|
2056
2058
|
_initTelInputListeners() {
|
|
2057
2059
|
const { strictMode: e, formatAsYouType: i, separateDialCode: n, allowDropdown: o, countrySearch: l } = this.options;
|
|
2058
|
-
let
|
|
2059
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
2060
|
+
let p = !1;
|
|
2061
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (p = !0), this._handleInputEvent = (h) => {
|
|
2060
2062
|
if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
|
|
2061
|
-
const
|
|
2062
|
-
this.telInput.value =
|
|
2063
|
+
const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w - 1), f = this.telInput.value.substring(w);
|
|
2064
|
+
this.telInput.value = A + f, this._openDropdownWithPlus();
|
|
2063
2065
|
return;
|
|
2064
2066
|
}
|
|
2065
2067
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
2066
|
-
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data),
|
|
2067
|
-
_ ||
|
|
2068
|
+
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), b = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2069
|
+
_ || b && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
|
|
2068
2070
|
const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
|
|
2069
|
-
if (i && !
|
|
2070
|
-
const
|
|
2071
|
+
if (i && !p && !v) {
|
|
2072
|
+
const w = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(f, O, w, I);
|
|
2071
2073
|
this.telInput.value = O, this.telInput.setSelectionRange(G, G);
|
|
2072
2074
|
}
|
|
2073
2075
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
|
|
@@ -2077,8 +2079,8 @@ class p1 {
|
|
|
2077
2079
|
return;
|
|
2078
2080
|
}
|
|
2079
2081
|
if (e) {
|
|
2080
|
-
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+",
|
|
2081
|
-
(!
|
|
2082
|
+
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", w = /^[0-9]$/.test(h.key), A = n ? w : v || w, f = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(f), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
|
|
2083
|
+
(!A || G && !D && !v) && h.preventDefault();
|
|
2082
2084
|
}
|
|
2083
2085
|
}
|
|
2084
2086
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2167,18 +2169,18 @@ class p1 {
|
|
|
2167
2169
|
_filterCountries(e, i = !1) {
|
|
2168
2170
|
let n = !0;
|
|
2169
2171
|
this.countryList.innerHTML = "";
|
|
2170
|
-
const o = o2(e), l = o.length,
|
|
2172
|
+
const o = o2(e), l = o.length, p = [], h = [], _ = [], b = [], v = [], w = [];
|
|
2171
2173
|
for (const f of this.countries)
|
|
2172
|
-
i || l === 0 ? _.push(f) : f.iso2 === o ?
|
|
2173
|
-
const
|
|
2174
|
-
...
|
|
2174
|
+
i || l === 0 ? _.push(f) : f.iso2 === o ? p.push(f) : f.normalisedName.startsWith(o) ? h.push(f) : f.normalisedName.includes(o) ? _.push(f) : o === f.dialCode || o === f.dialCodePlus ? b.push(f) : f.dialCodePlus.includes(o) ? v.push(f) : f.initials.includes(o) && w.push(f);
|
|
2175
|
+
const A = [
|
|
2176
|
+
...p.sort((f, I) => f.priority - I.priority),
|
|
2175
2177
|
...h.sort((f, I) => f.priority - I.priority),
|
|
2176
2178
|
..._.sort((f, I) => f.priority - I.priority),
|
|
2177
|
-
...
|
|
2179
|
+
...b.sort((f, I) => f.priority - I.priority),
|
|
2178
2180
|
...v.sort((f, I) => f.priority - I.priority),
|
|
2179
|
-
...
|
|
2181
|
+
...w.sort((f, I) => f.priority - I.priority)
|
|
2180
2182
|
];
|
|
2181
|
-
for (const f of
|
|
2183
|
+
for (const f of A) {
|
|
2182
2184
|
const I = f.nodeById[this.id];
|
|
2183
2185
|
I && (this.countryList.appendChild(I), n && (this._highlightListItem(I, !1), n = !1));
|
|
2184
2186
|
}
|
|
@@ -2205,11 +2207,11 @@ class p1 {
|
|
|
2205
2207
|
_updateValFromNumber(e) {
|
|
2206
2208
|
let i = e;
|
|
2207
2209
|
if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
|
|
2208
|
-
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat,
|
|
2210
|
+
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, p = n ? o : l;
|
|
2209
2211
|
i = C.utils.formatNumber(
|
|
2210
2212
|
i,
|
|
2211
2213
|
this.selectedCountryData.iso2,
|
|
2212
|
-
|
|
2214
|
+
p
|
|
2213
2215
|
);
|
|
2214
2216
|
}
|
|
2215
2217
|
i = this._beforeSetNumber(i), this.telInput.value = i;
|
|
@@ -2224,8 +2226,8 @@ class p1 {
|
|
|
2224
2226
|
const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
|
|
2225
2227
|
if (e.charAt(0) === "+" || !i)
|
|
2226
2228
|
return e;
|
|
2227
|
-
const
|
|
2228
|
-
return `+${i}${
|
|
2229
|
+
const p = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
|
|
2230
|
+
return `+${i}${p}`;
|
|
2229
2231
|
}
|
|
2230
2232
|
// Get the country ISO2 code from the given number
|
|
2231
2233
|
// BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
|
|
@@ -2235,14 +2237,14 @@ class p1 {
|
|
|
2235
2237
|
let n = i ? e.substring(i) : e;
|
|
2236
2238
|
const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
|
|
2237
2239
|
n = this._ensureHasDialCode(n);
|
|
2238
|
-
const
|
|
2239
|
-
if (
|
|
2240
|
-
const _ = f1(
|
|
2241
|
-
if (!o && this.defaultCountry &&
|
|
2240
|
+
const p = this._getDialCode(n, !0), h = f1(n);
|
|
2241
|
+
if (p) {
|
|
2242
|
+
const _ = f1(p), b = this.dialCodeToIso2Map[_];
|
|
2243
|
+
if (!o && this.defaultCountry && b.includes(this.defaultCountry))
|
|
2242
2244
|
return this.defaultCountry;
|
|
2243
|
-
const v = this.selectedCountryData.areaCodes && h.length > _.length,
|
|
2244
|
-
if (!(l === "1" &&
|
|
2245
|
-
for (const f of
|
|
2245
|
+
const v = this.selectedCountryData.areaCodes && h.length > _.length, w = o && b.includes(o) && !v;
|
|
2246
|
+
if (!(l === "1" && a2(h)) && !w) {
|
|
2247
|
+
for (const f of b)
|
|
2246
2248
|
if (f)
|
|
2247
2249
|
return f;
|
|
2248
2250
|
}
|
|
@@ -2276,17 +2278,22 @@ class p1 {
|
|
|
2276
2278
|
//* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
|
|
2277
2279
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2278
2280
|
_setCountry(e) {
|
|
2279
|
-
const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2
|
|
2281
|
+
const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 || "";
|
|
2280
2282
|
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
|
|
2281
|
-
const
|
|
2283
|
+
const p = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
|
|
2282
2284
|
let h, _;
|
|
2283
|
-
|
|
2285
|
+
if (e) {
|
|
2286
|
+
const { name: b, dialCode: v } = this.selectedCountryData;
|
|
2287
|
+
_ = b, h = o.selectedCountryAriaLabel.replace("${countryName}", b).replace("${dialCode}", `+${v}`);
|
|
2288
|
+
} else
|
|
2289
|
+
_ = o.noCountrySelected, h = o.noCountrySelected;
|
|
2290
|
+
this.selectedCountryInner.className = p, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
|
|
2284
2291
|
}
|
|
2285
2292
|
if (i) {
|
|
2286
|
-
const
|
|
2287
|
-
this.selectedDialCode.innerHTML =
|
|
2293
|
+
const p = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2294
|
+
this.selectedDialCode.innerHTML = p, this._updateInputPadding();
|
|
2288
2295
|
}
|
|
2289
|
-
return this._updatePlaceholder(), this._updateMaxLength(), l
|
|
2296
|
+
return this._updatePlaceholder(), this._updateMaxLength(), l !== e;
|
|
2290
2297
|
}
|
|
2291
2298
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2292
2299
|
_updateInputPadding() {
|
|
@@ -2301,14 +2308,14 @@ class p1 {
|
|
|
2301
2308
|
if (e && C.utils)
|
|
2302
2309
|
if (o) {
|
|
2303
2310
|
const l = C.utils.numberType[i];
|
|
2304
|
-
let
|
|
2311
|
+
let p = C.utils.getExampleNumber(
|
|
2305
2312
|
o,
|
|
2306
2313
|
!1,
|
|
2307
2314
|
l,
|
|
2308
2315
|
!0
|
|
2309
|
-
), h =
|
|
2310
|
-
for (; C.utils.isPossibleNumber(
|
|
2311
|
-
h =
|
|
2316
|
+
), h = p;
|
|
2317
|
+
for (; C.utils.isPossibleNumber(p, o, n); )
|
|
2318
|
+
h = p, p += "0";
|
|
2312
2319
|
const _ = C.utils.getCoreNumber(h, o);
|
|
2313
2320
|
this.maxCoreNumberLength = _.length, o === "by" && (this.maxCoreNumberLength = _.length + 1);
|
|
2314
2321
|
} else
|
|
@@ -2340,11 +2347,11 @@ class p1 {
|
|
|
2340
2347
|
customPlaceholder: o
|
|
2341
2348
|
} = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2342
2349
|
if (C.utils && l) {
|
|
2343
|
-
const
|
|
2350
|
+
const p = C.utils.numberType[i];
|
|
2344
2351
|
let h = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
|
|
2345
2352
|
this.selectedCountryData.iso2,
|
|
2346
2353
|
n,
|
|
2347
|
-
|
|
2354
|
+
p
|
|
2348
2355
|
) : "";
|
|
2349
2356
|
h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
|
|
2350
2357
|
}
|
|
@@ -2368,12 +2375,12 @@ class p1 {
|
|
|
2368
2375
|
}
|
|
2369
2376
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2370
2377
|
_scrollTo(e) {
|
|
2371
|
-
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n,
|
|
2378
|
+
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, p = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, b = _ + h, v = _ - l + i.scrollTop;
|
|
2372
2379
|
if (_ < l)
|
|
2373
2380
|
i.scrollTop = v;
|
|
2374
|
-
else if (
|
|
2375
|
-
const
|
|
2376
|
-
i.scrollTop = v -
|
|
2381
|
+
else if (b > p) {
|
|
2382
|
+
const w = o - h;
|
|
2383
|
+
i.scrollTop = v - w;
|
|
2377
2384
|
}
|
|
2378
2385
|
}
|
|
2379
2386
|
//* Replace any existing dial code with the new one
|
|
@@ -2393,9 +2400,9 @@ class p1 {
|
|
|
2393
2400
|
if (e.charAt(0) === "+") {
|
|
2394
2401
|
let o = "";
|
|
2395
2402
|
for (let l = 0; l < e.length; l++) {
|
|
2396
|
-
const
|
|
2397
|
-
if (!isNaN(parseInt(
|
|
2398
|
-
if (o +=
|
|
2403
|
+
const p = e.charAt(l);
|
|
2404
|
+
if (!isNaN(parseInt(p, 10))) {
|
|
2405
|
+
if (o += p, i)
|
|
2399
2406
|
this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
|
|
2400
2407
|
else if (this.dialCodes.has(o)) {
|
|
2401
2408
|
n = e.substring(0, l + 1);
|
|
@@ -2453,7 +2460,7 @@ class p1 {
|
|
|
2453
2460
|
//********************
|
|
2454
2461
|
//* Remove plugin.
|
|
2455
2462
|
destroy() {
|
|
2456
|
-
var l,
|
|
2463
|
+
var l, p;
|
|
2457
2464
|
this.telInput.iti = void 0;
|
|
2458
2465
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2459
2466
|
if (e) {
|
|
@@ -2470,7 +2477,7 @@ class p1 {
|
|
|
2470
2477
|
const { form: n } = this.telInput;
|
|
2471
2478
|
this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2472
2479
|
const o = this.telInput.parentNode;
|
|
2473
|
-
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (
|
|
2480
|
+
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (p = o == null ? void 0 : o.parentNode) == null || p.removeChild(o), delete C.instances[this.id];
|
|
2474
2481
|
}
|
|
2475
2482
|
//* Get the extension from the current number.
|
|
2476
2483
|
getExtension() {
|
|
@@ -2525,12 +2532,12 @@ class p1 {
|
|
|
2525
2532
|
_validateNumber(e) {
|
|
2526
2533
|
if (!this.selectedCountryData.iso2)
|
|
2527
2534
|
return !1;
|
|
2528
|
-
const i = this.
|
|
2529
|
-
if (
|
|
2530
|
-
const
|
|
2531
|
-
return
|
|
2535
|
+
const i = (p) => e ? this._utilsIsValidNumber(p) : this._utilsIsPossibleNumber(p), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
|
|
2536
|
+
if (o > -1 && !this.options.allowPhonewords) {
|
|
2537
|
+
const p = n.substring(0, o), h = i(p), _ = i(n);
|
|
2538
|
+
return h && _;
|
|
2532
2539
|
}
|
|
2533
|
-
return
|
|
2540
|
+
return i(n);
|
|
2534
2541
|
}
|
|
2535
2542
|
_utilsIsValidNumber(e) {
|
|
2536
2543
|
return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
@@ -2595,7 +2602,7 @@ const Z2 = (m) => {
|
|
|
2595
2602
|
attachUtils: Z2,
|
|
2596
2603
|
startedLoadingUtilsScript: !1,
|
|
2597
2604
|
startedLoadingAutoCountry: !1,
|
|
2598
|
-
version: "25.
|
|
2605
|
+
version: "25.10.0"
|
|
2599
2606
|
}
|
|
2600
2607
|
);
|
|
2601
2608
|
(function() {
|
|
@@ -2609,9 +2616,9 @@ const Z2 = (m) => {
|
|
|
2609
2616
|
function i(d, t) {
|
|
2610
2617
|
function $() {
|
|
2611
2618
|
}
|
|
2612
|
-
$.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(s, r,
|
|
2613
|
-
for (var
|
|
2614
|
-
return t.prototype[r].apply(s,
|
|
2619
|
+
$.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(s, r, a) {
|
|
2620
|
+
for (var u = Array(arguments.length - 2), c = 2; c < arguments.length; c++) u[c - 2] = arguments[c];
|
|
2621
|
+
return t.prototype[r].apply(s, u);
|
|
2615
2622
|
};
|
|
2616
2623
|
}
|
|
2617
2624
|
function n(d) {
|
|
@@ -2630,10 +2637,10 @@ const Z2 = (m) => {
|
|
|
2630
2637
|
}
|
|
2631
2638
|
}, l = {};
|
|
2632
2639
|
new o("about:invalid#zClosurez"), new o("about:blank");
|
|
2633
|
-
const
|
|
2640
|
+
const p = {};
|
|
2634
2641
|
class h {
|
|
2635
2642
|
constructor() {
|
|
2636
|
-
if (
|
|
2643
|
+
if (p !== p) throw Error("SafeStyle is not meant to be built directly");
|
|
2637
2644
|
}
|
|
2638
2645
|
toString() {
|
|
2639
2646
|
return "";
|
|
@@ -2641,7 +2648,7 @@ const Z2 = (m) => {
|
|
|
2641
2648
|
}
|
|
2642
2649
|
new h();
|
|
2643
2650
|
const _ = {};
|
|
2644
|
-
class
|
|
2651
|
+
class b {
|
|
2645
2652
|
constructor() {
|
|
2646
2653
|
if (_ !== _) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
2647
2654
|
}
|
|
@@ -2649,9 +2656,9 @@ const Z2 = (m) => {
|
|
|
2649
2656
|
return "";
|
|
2650
2657
|
}
|
|
2651
2658
|
}
|
|
2652
|
-
new
|
|
2659
|
+
new b();
|
|
2653
2660
|
const v = {};
|
|
2654
|
-
class
|
|
2661
|
+
class w {
|
|
2655
2662
|
constructor() {
|
|
2656
2663
|
var t = m.trustedTypes && m.trustedTypes.emptyHTML || "";
|
|
2657
2664
|
if (v !== v) throw Error("SafeHtml is not meant to be built directly");
|
|
@@ -2661,8 +2668,8 @@ const Z2 = (m) => {
|
|
|
2661
2668
|
return this.g.toString();
|
|
2662
2669
|
}
|
|
2663
2670
|
}
|
|
2664
|
-
new
|
|
2665
|
-
function
|
|
2671
|
+
new w();
|
|
2672
|
+
function A(d, t) {
|
|
2666
2673
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2667
2674
|
case O:
|
|
2668
2675
|
case G:
|
|
@@ -2693,28 +2700,28 @@ const Z2 = (m) => {
|
|
|
2693
2700
|
x.prototype.has = function(d) {
|
|
2694
2701
|
return R(this, d.g);
|
|
2695
2702
|
}, x.prototype.get = function(d, t) {
|
|
2696
|
-
return
|
|
2703
|
+
return g(this, d.g, t);
|
|
2697
2704
|
}, x.prototype.set = function(d, t) {
|
|
2698
2705
|
E(this, d.g, t);
|
|
2699
2706
|
}, x.prototype.add = function(d, t) {
|
|
2700
2707
|
b1(this, d.g, t);
|
|
2701
2708
|
};
|
|
2702
|
-
function
|
|
2709
|
+
function S1(d, t) {
|
|
2703
2710
|
for (var $ = f2(d.m()), s = 0; s < $.length; s++) {
|
|
2704
|
-
var r = $[s],
|
|
2705
|
-
if (R(t,
|
|
2711
|
+
var r = $[s], a = r.g;
|
|
2712
|
+
if (R(t, a)) {
|
|
2706
2713
|
d.g && delete d.g[r.g];
|
|
2707
|
-
var
|
|
2714
|
+
var u = r.h == 11 || r.h == 10;
|
|
2708
2715
|
if (r.l) {
|
|
2709
|
-
r = P(t,
|
|
2710
|
-
for (var c = 0; c < r.length; c++) b1(d,
|
|
2711
|
-
} else r = n1(t,
|
|
2716
|
+
r = P(t, a);
|
|
2717
|
+
for (var c = 0; c < r.length; c++) b1(d, a, u ? r[c].clone() : r[c]);
|
|
2718
|
+
} else r = n1(t, a), u ? (u = n1(d, a)) ? S1(u, r) : E(d, a, r.clone()) : E(d, a, r);
|
|
2712
2719
|
}
|
|
2713
2720
|
}
|
|
2714
2721
|
}
|
|
2715
2722
|
x.prototype.clone = function() {
|
|
2716
2723
|
var d = new this.constructor();
|
|
2717
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
2724
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
|
|
2718
2725
|
};
|
|
2719
2726
|
function R(d, t) {
|
|
2720
2727
|
return d.h[t] != null;
|
|
@@ -2726,8 +2733,8 @@ const Z2 = (m) => {
|
|
|
2726
2733
|
if (!(t in d.g)) {
|
|
2727
2734
|
var s = d.l, r = d.j[t];
|
|
2728
2735
|
if ($ != null) if (r.l) {
|
|
2729
|
-
for (var
|
|
2730
|
-
$ =
|
|
2736
|
+
for (var a = [], u = 0; u < $.length; u++) a[u] = s.h(r, $[u]);
|
|
2737
|
+
$ = a;
|
|
2731
2738
|
} else $ = s.h(r, $);
|
|
2732
2739
|
return d.g[t] = $;
|
|
2733
2740
|
}
|
|
@@ -2735,12 +2742,12 @@ const Z2 = (m) => {
|
|
|
2735
2742
|
}
|
|
2736
2743
|
return $;
|
|
2737
2744
|
}
|
|
2738
|
-
function
|
|
2745
|
+
function g(d, t, $) {
|
|
2739
2746
|
var s = n1(d, t);
|
|
2740
2747
|
return d.j[t].l ? s[$ || 0] : s;
|
|
2741
2748
|
}
|
|
2742
|
-
function
|
|
2743
|
-
if (R(d, t)) d =
|
|
2749
|
+
function S(d, t) {
|
|
2750
|
+
if (R(d, t)) d = g(d, t);
|
|
2744
2751
|
else d: {
|
|
2745
2752
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2746
2753
|
else if (t === Number) d.j = 0;
|
|
@@ -2767,7 +2774,7 @@ const Z2 = (m) => {
|
|
|
2767
2774
|
}
|
|
2768
2775
|
function s1(d, t) {
|
|
2769
2776
|
var $ = [], s;
|
|
2770
|
-
for (s in t) s != 0 && $.push(new
|
|
2777
|
+
for (s in t) s != 0 && $.push(new A(s, t[s]));
|
|
2771
2778
|
return new c2(d, $);
|
|
2772
2779
|
}
|
|
2773
2780
|
function r1() {
|
|
@@ -2796,19 +2803,19 @@ const Z2 = (m) => {
|
|
|
2796
2803
|
}, q.prototype.g = function(d, t) {
|
|
2797
2804
|
return q.ma.g.call(this, d, t);
|
|
2798
2805
|
};
|
|
2799
|
-
function
|
|
2806
|
+
function T(d, t) {
|
|
2800
2807
|
d != null && this.g.apply(this, arguments);
|
|
2801
2808
|
}
|
|
2802
|
-
|
|
2809
|
+
T.prototype.h = "", T.prototype.set = function(d) {
|
|
2803
2810
|
this.h = "" + d;
|
|
2804
|
-
},
|
|
2811
|
+
}, T.prototype.g = function(d, t, $) {
|
|
2805
2812
|
if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
|
|
2806
2813
|
return this;
|
|
2807
2814
|
};
|
|
2808
2815
|
function B(d) {
|
|
2809
2816
|
d.h = "";
|
|
2810
2817
|
}
|
|
2811
|
-
|
|
2818
|
+
T.prototype.toString = function() {
|
|
2812
2819
|
return this.h;
|
|
2813
2820
|
};
|
|
2814
2821
|
function W() {
|
|
@@ -2816,43 +2823,43 @@ const Z2 = (m) => {
|
|
|
2816
2823
|
}
|
|
2817
2824
|
i(W, x);
|
|
2818
2825
|
var N1 = null;
|
|
2819
|
-
function
|
|
2826
|
+
function L() {
|
|
2820
2827
|
x.call(this);
|
|
2821
2828
|
}
|
|
2822
|
-
i(
|
|
2823
|
-
var
|
|
2829
|
+
i(L, x);
|
|
2830
|
+
var A1 = null;
|
|
2824
2831
|
function z() {
|
|
2825
2832
|
x.call(this);
|
|
2826
2833
|
}
|
|
2827
2834
|
i(z, x);
|
|
2828
|
-
var
|
|
2835
|
+
var T1 = null;
|
|
2829
2836
|
W.prototype.m = function() {
|
|
2830
2837
|
var d = N1;
|
|
2831
2838
|
return d || (N1 = d = s1(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;
|
|
2832
|
-
}, W.m = W.prototype.m,
|
|
2833
|
-
var d = T1;
|
|
2834
|
-
return d || (T1 = d = s1(b, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
2835
|
-
}, b.m = b.prototype.m, z.prototype.m = function() {
|
|
2839
|
+
}, W.m = W.prototype.m, L.prototype.m = function() {
|
|
2836
2840
|
var d = A1;
|
|
2837
|
-
return d || (A1 = d = s1(
|
|
2841
|
+
return d || (A1 = d = s1(L, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
2842
|
+
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2843
|
+
var d = T1;
|
|
2844
|
+
return d || (T1 = d = s1(z, {
|
|
2838
2845
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2839
|
-
1: { name: "general_desc", i: 11, type:
|
|
2840
|
-
2: { name: "fixed_line", i: 11, type:
|
|
2841
|
-
3: { name: "mobile", i: 11, type:
|
|
2842
|
-
4: { name: "toll_free", i: 11, type:
|
|
2843
|
-
5: { name: "premium_rate", i: 11, type:
|
|
2844
|
-
6: { name: "shared_cost", i: 11, type:
|
|
2845
|
-
7: { name: "personal_number", i: 11, type:
|
|
2846
|
-
8: { name: "voip", i: 11, type:
|
|
2847
|
-
21: { name: "pager", i: 11, type:
|
|
2848
|
-
25: { name: "uan", i: 11, type:
|
|
2849
|
-
27: { name: "emergency", i: 11, type:
|
|
2850
|
-
28: { name: "voicemail", i: 11, type:
|
|
2851
|
-
29: { name: "short_code", i: 11, type:
|
|
2852
|
-
30: { name: "standard_rate", i: 11, type:
|
|
2853
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
2854
|
-
33: { name: "sms_services", i: 11, type:
|
|
2855
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
2846
|
+
1: { name: "general_desc", i: 11, type: L },
|
|
2847
|
+
2: { name: "fixed_line", i: 11, type: L },
|
|
2848
|
+
3: { name: "mobile", i: 11, type: L },
|
|
2849
|
+
4: { name: "toll_free", i: 11, type: L },
|
|
2850
|
+
5: { name: "premium_rate", i: 11, type: L },
|
|
2851
|
+
6: { name: "shared_cost", i: 11, type: L },
|
|
2852
|
+
7: { name: "personal_number", i: 11, type: L },
|
|
2853
|
+
8: { name: "voip", i: 11, type: L },
|
|
2854
|
+
21: { name: "pager", i: 11, type: L },
|
|
2855
|
+
25: { name: "uan", i: 11, type: L },
|
|
2856
|
+
27: { name: "emergency", i: 11, type: L },
|
|
2857
|
+
28: { name: "voicemail", i: 11, type: L },
|
|
2858
|
+
29: { name: "short_code", i: 11, type: L },
|
|
2859
|
+
30: { name: "standard_rate", i: 11, type: L },
|
|
2860
|
+
31: { name: "carrier_specific", i: 11, type: L },
|
|
2861
|
+
33: { name: "sms_services", i: 11, type: L },
|
|
2862
|
+
24: { name: "no_international_dialling", i: 11, type: L },
|
|
2856
2863
|
9: { name: "id", required: !0, i: 9, type: String },
|
|
2857
2864
|
10: { name: "country_code", i: 5, type: Number },
|
|
2858
2865
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -8293,7 +8300,7 @@ const Z2 = (m) => {
|
|
|
8293
8300
|
X: "9",
|
|
8294
8301
|
Y: "9",
|
|
8295
8302
|
Z: "9"
|
|
8296
|
-
}, m2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/,
|
|
8303
|
+
}, m2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, w2 = 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٠-٩۰-۹])*\\.?$");
|
|
8297
8304
|
function Y(d) {
|
|
8298
8305
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8299
8306
|
}
|
|
@@ -8315,50 +8322,50 @@ const Z2 = (m) => {
|
|
|
8315
8322
|
return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
|
|
8316
8323
|
}
|
|
8317
8324
|
function o1(d, t) {
|
|
8318
|
-
for (var $ = new
|
|
8325
|
+
for (var $ = new T(), s, r = d.length, a = 0; a < r; ++a) s = d.charAt(a), s = t[s.toUpperCase()], s != null && $.g(s);
|
|
8319
8326
|
return $.toString();
|
|
8320
8327
|
}
|
|
8321
8328
|
function G1(d) {
|
|
8322
8329
|
return d.length == 0 || N2.test(d);
|
|
8323
8330
|
}
|
|
8324
|
-
function
|
|
8331
|
+
function a1(d) {
|
|
8325
8332
|
return d != null && isNaN(d) && d.toUpperCase() in M1;
|
|
8326
8333
|
}
|
|
8327
8334
|
M.prototype.format = function(d, t) {
|
|
8328
|
-
if (
|
|
8329
|
-
var $ =
|
|
8335
|
+
if (g(d, 2) == 0 && R(d, 5)) {
|
|
8336
|
+
var $ = S(d, 5);
|
|
8330
8337
|
if (0 < $.length) return $;
|
|
8331
8338
|
}
|
|
8332
|
-
$ =
|
|
8339
|
+
$ = S(d, 1);
|
|
8333
8340
|
var s = t1(d);
|
|
8334
8341
|
if (t == 0) return F1($, 0, s, "");
|
|
8335
8342
|
if (!($ in X)) return s;
|
|
8336
8343
|
var r = d1(this, $, e1($));
|
|
8337
|
-
d = R(d, 3) &&
|
|
8344
|
+
d = R(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : R(r, 13) ? g(r, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
|
|
8338
8345
|
d: {
|
|
8339
8346
|
r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
|
|
8340
|
-
for (var
|
|
8341
|
-
|
|
8342
|
-
var y = K(
|
|
8343
|
-
if ((y == 0 || s.search(
|
|
8344
|
-
r =
|
|
8347
|
+
for (var a, u = r.length, c = 0; c < u; ++c) {
|
|
8348
|
+
a = r[c];
|
|
8349
|
+
var y = K(a, 3);
|
|
8350
|
+
if ((y == 0 || s.search(g(a, 3, y - 1)) == 0) && (y = new RegExp(g(a, 1)), U(y, s))) {
|
|
8351
|
+
r = a;
|
|
8345
8352
|
break d;
|
|
8346
8353
|
}
|
|
8347
8354
|
}
|
|
8348
8355
|
r = null;
|
|
8349
8356
|
}
|
|
8350
|
-
return r != null && (
|
|
8351
|
-
|
|
8357
|
+
return r != null && (u = r, r = S(u, 2), a = new RegExp(g(u, 1)), S(
|
|
8358
|
+
u,
|
|
8352
8359
|
5
|
|
8353
|
-
),
|
|
8360
|
+
), u = S(u, 4), s = t == 2 && u != null && 0 < u.length ? s.replace(a, r.replace(L2, u)) : s.replace(a, r), t == 3 && (s = s.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), s = s.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), F1($, t, s, d);
|
|
8354
8361
|
};
|
|
8355
8362
|
function d1(d, t, $) {
|
|
8356
8363
|
return $ == "001" ? j(d, "" + t) : j(d, $);
|
|
8357
8364
|
}
|
|
8358
8365
|
function t1(d) {
|
|
8359
8366
|
if (!R(d, 2)) return "";
|
|
8360
|
-
var t = "" +
|
|
8361
|
-
return R(d, 4) &&
|
|
8367
|
+
var t = "" + g(d, 2);
|
|
8368
|
+
return R(d, 4) && g(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
|
|
8362
8369
|
}
|
|
8363
8370
|
function F1(d, t, $, s) {
|
|
8364
8371
|
switch (t) {
|
|
@@ -8372,39 +8379,39 @@ const Z2 = (m) => {
|
|
|
8372
8379
|
return $ + s;
|
|
8373
8380
|
}
|
|
8374
8381
|
}
|
|
8375
|
-
function
|
|
8382
|
+
function u1(d, t) {
|
|
8376
8383
|
switch (t) {
|
|
8377
8384
|
case 4:
|
|
8378
|
-
return
|
|
8385
|
+
return g(d, 5);
|
|
8379
8386
|
case 3:
|
|
8380
|
-
return
|
|
8387
|
+
return g(d, 4);
|
|
8381
8388
|
case 1:
|
|
8382
|
-
return
|
|
8389
|
+
return g(d, 3);
|
|
8383
8390
|
case 0:
|
|
8384
8391
|
case 2:
|
|
8385
|
-
return
|
|
8392
|
+
return g(d, 2);
|
|
8386
8393
|
case 5:
|
|
8387
|
-
return
|
|
8394
|
+
return g(d, 6);
|
|
8388
8395
|
case 6:
|
|
8389
|
-
return
|
|
8396
|
+
return g(d, 8);
|
|
8390
8397
|
case 7:
|
|
8391
|
-
return
|
|
8398
|
+
return g(d, 7);
|
|
8392
8399
|
case 8:
|
|
8393
|
-
return
|
|
8400
|
+
return g(d, 21);
|
|
8394
8401
|
case 9:
|
|
8395
|
-
return
|
|
8402
|
+
return g(d, 25);
|
|
8396
8403
|
case 10:
|
|
8397
|
-
return
|
|
8404
|
+
return g(d, 28);
|
|
8398
8405
|
default:
|
|
8399
|
-
return
|
|
8406
|
+
return g(d, 1);
|
|
8400
8407
|
}
|
|
8401
8408
|
}
|
|
8402
8409
|
function U1(d, t) {
|
|
8403
8410
|
var $ = V1(d, t);
|
|
8404
|
-
return d = d1(d,
|
|
8411
|
+
return d = d1(d, S(t, 1), $), d == null ? -1 : (t = t1(t), m1(t, d));
|
|
8405
8412
|
}
|
|
8406
8413
|
function m1(d, t) {
|
|
8407
|
-
return k(d,
|
|
8414
|
+
return k(d, g(t, 1)) ? k(d, g(t, 5)) ? 4 : k(d, g(t, 4)) ? 3 : k(d, g(t, 6)) ? 5 : k(d, g(t, 8)) ? 6 : k(d, g(t, 7)) ? 7 : k(d, g(t, 21)) ? 8 : k(d, g(t, 25)) ? 9 : k(d, g(t, 28)) ? 10 : k(d, g(t, 2)) ? g(t, 18) || k(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && k(d, g(t, 3)) ? 1 : -1 : -1;
|
|
8408
8415
|
}
|
|
8409
8416
|
function j(d, t) {
|
|
8410
8417
|
if (t == null) return null;
|
|
@@ -8418,28 +8425,28 @@ const Z2 = (m) => {
|
|
|
8418
8425
|
}
|
|
8419
8426
|
function k(d, t) {
|
|
8420
8427
|
var $ = d.length;
|
|
8421
|
-
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(
|
|
8428
|
+
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(S(t, 2), d);
|
|
8422
8429
|
}
|
|
8423
|
-
function
|
|
8424
|
-
var $ = V1(d, t), s =
|
|
8430
|
+
function A2(d, t) {
|
|
8431
|
+
var $ = V1(d, t), s = S(t, 1), r = d1(d, s, $);
|
|
8425
8432
|
return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = t1(t), r = m1(d, r) != -1), r;
|
|
8426
8433
|
}
|
|
8427
8434
|
function V1(d, t) {
|
|
8428
8435
|
if (t == null) return null;
|
|
8429
|
-
var $ =
|
|
8436
|
+
var $ = S(t, 1);
|
|
8430
8437
|
if ($ = X[$], $ == null) d = null;
|
|
8431
8438
|
else if ($.length == 1) d = $[0];
|
|
8432
8439
|
else d: {
|
|
8433
8440
|
t = t1(t);
|
|
8434
|
-
for (var s, r = $.length,
|
|
8435
|
-
s = $[
|
|
8436
|
-
var
|
|
8437
|
-
if (R(
|
|
8438
|
-
if (t.search(
|
|
8441
|
+
for (var s, r = $.length, a = 0; a < r; a++) {
|
|
8442
|
+
s = $[a];
|
|
8443
|
+
var u = j(d, s);
|
|
8444
|
+
if (R(u, 23)) {
|
|
8445
|
+
if (t.search(g(u, 23)) == 0) {
|
|
8439
8446
|
d = s;
|
|
8440
8447
|
break d;
|
|
8441
8448
|
}
|
|
8442
|
-
} else if (m1(t,
|
|
8449
|
+
} else if (m1(t, u) != -1) {
|
|
8443
8450
|
d = s;
|
|
8444
8451
|
break d;
|
|
8445
8452
|
}
|
|
@@ -8453,135 +8460,135 @@ const Z2 = (m) => {
|
|
|
8453
8460
|
}
|
|
8454
8461
|
function K1(d, t) {
|
|
8455
8462
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8456
|
-
return
|
|
8463
|
+
return S(d, 10);
|
|
8457
8464
|
}
|
|
8458
8465
|
function l1(d, t, $, s) {
|
|
8459
|
-
var r =
|
|
8460
|
-
if (r = P(r, 10), s == 2) if (O1(
|
|
8466
|
+
var r = u1($, s), a = K(r, 9) == 0 ? P(g($, 1), 9) : P(r, 9);
|
|
8467
|
+
if (r = P(r, 10), s == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? P(g($, 1), 9) : P(d, 9)), a.sort(), r.length == 0 ? r = P(d, 10) : (r = r.concat(P(d, 10)), r.sort()));
|
|
8461
8468
|
else return l1(d, t, $, 1);
|
|
8462
|
-
return
|
|
8469
|
+
return a[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = a[0], $ == t ? 0 : $ > t ? 2 : a[a.length - 1] < t ? 3 : -1 < a.indexOf(t, 1) ? 0 : 5));
|
|
8463
8470
|
}
|
|
8464
8471
|
function h1(d, t, $) {
|
|
8465
8472
|
var s = t1(t);
|
|
8466
|
-
return t =
|
|
8473
|
+
return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
|
|
8467
8474
|
}
|
|
8468
8475
|
function H1(d, t) {
|
|
8469
8476
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
8470
8477
|
for (var $, s = d.length, r = 1; 3 >= r && r <= s; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in X) return t.g(d.substring(r)), $;
|
|
8471
8478
|
return 0;
|
|
8472
8479
|
}
|
|
8473
|
-
function j1(d, t, $, s, r,
|
|
8480
|
+
function j1(d, t, $, s, r, a) {
|
|
8474
8481
|
if (t.length == 0) return 0;
|
|
8475
|
-
t = new
|
|
8476
|
-
var
|
|
8477
|
-
$ != null && (
|
|
8482
|
+
t = new T(t);
|
|
8483
|
+
var u;
|
|
8484
|
+
$ != null && (u = g($, 11)), u == null && (u = "NonMatch");
|
|
8478
8485
|
var c = t.toString();
|
|
8479
|
-
if (c.length == 0)
|
|
8480
|
-
else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)),
|
|
8486
|
+
if (c.length == 0) u = 20;
|
|
8487
|
+
else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)), u = 1;
|
|
8481
8488
|
else {
|
|
8482
|
-
if (c = new RegExp(
|
|
8483
|
-
c =
|
|
8484
|
-
var y =
|
|
8485
|
-
y && y[1] != null && 0 < y[1].length && o1(y[1], C1) == "0" ?
|
|
8486
|
-
} else
|
|
8487
|
-
|
|
8489
|
+
if (c = new RegExp(u), k1(t), u = t.toString(), u.search(c) == 0) {
|
|
8490
|
+
c = u.match(c)[0].length;
|
|
8491
|
+
var y = u.substring(c).match(D1);
|
|
8492
|
+
y && y[1] != null && 0 < y[1].length && o1(y[1], C1) == "0" ? u = !1 : (B(t), t.g(u.substring(c)), u = !0);
|
|
8493
|
+
} else u = !1;
|
|
8494
|
+
u = u ? 5 : 20;
|
|
8488
8495
|
}
|
|
8489
|
-
if (r && E(
|
|
8496
|
+
if (r && E(a, 6, u), u != 20) {
|
|
8490
8497
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
8491
|
-
if (d = H1(t, s), d != 0) return E(
|
|
8498
|
+
if (d = H1(t, s), d != 0) return E(a, 1, d), d;
|
|
8492
8499
|
throw Error("Invalid country calling code");
|
|
8493
8500
|
}
|
|
8494
|
-
return $ != null && (
|
|
8501
|
+
return $ != null && (u = S($, 10), c = "" + u, y = t.toString(), y.lastIndexOf(c, 0) == 0 && (c = new T(y.substring(c.length)), y = g($, 1), y = new RegExp(S(y, 2)), W1(c, $, null), c = c.toString(), !U(y, t.toString()) && U(y, c) || l1(d, t.toString(), $, -1) == 3)) ? (s.g(c), r && E(a, 6, 10), E(a, 1, u), u) : (E(a, 1, 0), 0);
|
|
8495
8502
|
}
|
|
8496
8503
|
function W1(d, t, $) {
|
|
8497
|
-
var s = d.toString(), r = s.length,
|
|
8498
|
-
if (r != 0 &&
|
|
8499
|
-
var
|
|
8500
|
-
if (r =
|
|
8501
|
-
|
|
8502
|
-
var c = U(
|
|
8503
|
-
t =
|
|
8504
|
+
var s = d.toString(), r = s.length, a = g(t, 15);
|
|
8505
|
+
if (r != 0 && a != null && a.length != 0) {
|
|
8506
|
+
var u = new RegExp("^(?:" + a + ")");
|
|
8507
|
+
if (r = u.exec(s)) {
|
|
8508
|
+
a = new RegExp(S(g(t, 1), 2));
|
|
8509
|
+
var c = U(a, s), y = r.length - 1;
|
|
8510
|
+
t = g(t, 16), t == null || t.length == 0 || r[y] == null || r[y].length == 0 ? (!c || U(a, s.substring(r[0].length))) && ($ != null && 0 < y && r[y] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(u, t), (!c || U(a, s)) && ($ != null && 0 < y && $.g(r[1]), d.set(s)));
|
|
8504
8511
|
}
|
|
8505
8512
|
}
|
|
8506
8513
|
}
|
|
8507
8514
|
function Z(d, t, $) {
|
|
8508
|
-
if (!
|
|
8515
|
+
if (!a1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
8509
8516
|
return z1(d, t, $, !0);
|
|
8510
8517
|
}
|
|
8511
8518
|
function z1(d, t, $, s) {
|
|
8512
8519
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8513
8520
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8514
|
-
var r = new
|
|
8515
|
-
if (
|
|
8516
|
-
else if (
|
|
8521
|
+
var r = new T(), a = t.indexOf(";phone-context=");
|
|
8522
|
+
if (a === -1) a = null;
|
|
8523
|
+
else if (a += 15, a >= t.length) a = "";
|
|
8517
8524
|
else {
|
|
8518
|
-
var
|
|
8519
|
-
|
|
8525
|
+
var u = t.indexOf(";", a);
|
|
8526
|
+
a = u !== -1 ? t.substring(a, u) : t.substring(a);
|
|
8520
8527
|
}
|
|
8521
|
-
var c =
|
|
8522
|
-
if (c == null ?
|
|
8523
|
-
if (
|
|
8524
|
-
|
|
8528
|
+
var c = a;
|
|
8529
|
+
if (c == null ? u = !0 : c.length === 0 ? u = !1 : (u = w2.exec(c), c = S2.exec(c), u = u !== null || c !== null), !u || (a != null ? (a.charAt(0) === "+" && r.g(a), a = t.indexOf("tel:"), r.g(t.substring(0 <= a ? a + 4 : 0, t.indexOf(";phone-context=")))) : (a = r.g, u = t ?? "", c = u.search(y2), 0 <= c ? (u = u.substring(c), u = u.replace(I2, ""), c = u.search(_2), 0 <= c && (u = u.substring(0, c))) : u = "", a.call(r, u)), a = r.toString(), u = a.indexOf(";isub="), 0 < u && (B(r), r.g(a.substring(0, u))), !R1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8530
|
+
if (a = r.toString(), !(a1($) || a != null && 0 < a.length && Q.test(a))) throw Error("Invalid country calling code");
|
|
8531
|
+
a = new H(), s && E(a, 5, t);
|
|
8525
8532
|
d: {
|
|
8526
|
-
if (t = r.toString(),
|
|
8533
|
+
if (t = r.toString(), u = t.search(x1), 0 <= u && R1(t.substring(0, u))) {
|
|
8527
8534
|
c = t.match(x1);
|
|
8528
8535
|
for (var y = c.length, V = 1; V < y; ++V) if (c[V] != null && 0 < c[V].length) {
|
|
8529
|
-
B(r), r.g(t.substring(0,
|
|
8536
|
+
B(r), r.g(t.substring(0, u)), t = c[V];
|
|
8530
8537
|
break d;
|
|
8531
8538
|
}
|
|
8532
8539
|
}
|
|
8533
8540
|
t = "";
|
|
8534
8541
|
}
|
|
8535
|
-
0 < t.length && E(
|
|
8542
|
+
0 < t.length && E(a, 3, t), u = j(d, $), t = new T(), c = 0, y = r.toString();
|
|
8536
8543
|
try {
|
|
8537
|
-
c = j1(d, y,
|
|
8544
|
+
c = j1(d, y, u, t, s, a);
|
|
8538
8545
|
} catch (I1) {
|
|
8539
8546
|
if (I1.message == "Invalid country calling code" && Q.test(y)) {
|
|
8540
|
-
if (y = y.replace(Q, ""), c = j1(d, y,
|
|
8547
|
+
if (y = y.replace(Q, ""), c = j1(d, y, u, t, s, a), c == 0) throw I1;
|
|
8541
8548
|
} else throw I1;
|
|
8542
8549
|
}
|
|
8543
|
-
if (c != 0 ? (r = e1(c), r != $ && (
|
|
8544
|
-
|
|
8550
|
+
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c = S(u, 10), E(
|
|
8551
|
+
a,
|
|
8545
8552
|
1,
|
|
8546
8553
|
c
|
|
8547
|
-
)) : s && (delete
|
|
8554
|
+
)) : s && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new T(), r = new T(t.toString()), W1(r, u, $), d = l1(d, r.toString(), u, -1), d != 2 && d != 4 && d != 5 && (t = r, s && 0 < $.toString().length && E(a, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8548
8555
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8549
8556
|
if (1 < s.length && s.charAt(0) == "0") {
|
|
8550
|
-
for (E(
|
|
8551
|
-
d != 1 && E(
|
|
8557
|
+
for (E(a, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
|
|
8558
|
+
d != 1 && E(a, 8, d);
|
|
8552
8559
|
}
|
|
8553
|
-
return E(
|
|
8560
|
+
return E(a, 2, parseInt(s, 10)), a;
|
|
8554
8561
|
}
|
|
8555
8562
|
function U(d, t) {
|
|
8556
8563
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
8557
8564
|
}
|
|
8558
|
-
function
|
|
8559
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8565
|
+
function T2(d) {
|
|
8566
|
+
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 = J1(this, this.ka);
|
|
8560
8567
|
}
|
|
8561
8568
|
var Z1 = new z();
|
|
8562
8569
|
E(Z1, 11, "NA");
|
|
8563
8570
|
var E2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), Y1 = /[- ]/;
|
|
8564
8571
|
function J1(d, t) {
|
|
8565
8572
|
var $ = d.ga;
|
|
8566
|
-
return t =
|
|
8573
|
+
return t = a1(t) ? K1($, t) : 0, d = j(d.ga, e1(t)), d ?? Z1;
|
|
8567
8574
|
}
|
|
8568
8575
|
function q1(d) {
|
|
8569
8576
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8570
|
-
var s = d.j[$], r =
|
|
8577
|
+
var s = d.j[$], r = S(s, 1);
|
|
8571
8578
|
if (d.da == r) return !1;
|
|
8572
|
-
var
|
|
8573
|
-
B(
|
|
8574
|
-
var y =
|
|
8575
|
-
|
|
8579
|
+
var a = d, u = s, c = S(u, 1);
|
|
8580
|
+
B(a.v);
|
|
8581
|
+
var y = a;
|
|
8582
|
+
u = S(u, 2);
|
|
8576
8583
|
var V = "999999999999999".match(c)[0];
|
|
8577
|
-
if (V.length < y.g.h.length ? y = "" : (y = V.replace(new RegExp(c, "g"),
|
|
8584
|
+
if (V.length < y.g.h.length ? y = "" : (y = V.replace(new RegExp(c, "g"), u), y = y.replace(RegExp("9", "g"), " ")), 0 < y.length ? (a.v.g(y), a = !0) : a = !1, a) return d.da = r, d.ha = Y1.test(g(s, 4)), d.$ = 0, !0;
|
|
8578
8585
|
}
|
|
8579
8586
|
return d.u = !1;
|
|
8580
8587
|
}
|
|
8581
8588
|
function X1(d, t) {
|
|
8582
|
-
for (var $ = [], s = t.length - 3, r = d.j.length,
|
|
8583
|
-
var
|
|
8584
|
-
K(
|
|
8589
|
+
for (var $ = [], s = t.length - 3, r = d.j.length, a = 0; a < r; ++a) {
|
|
8590
|
+
var u = d.j[a];
|
|
8591
|
+
K(u, 3) == 0 ? $.push(d.j[a]) : (u = g(u, 3, Math.min(s, K(u, 3) - 1)), t.search(u) == 0 && $.push(d.j[a]));
|
|
8585
8592
|
}
|
|
8586
8593
|
d.j = $;
|
|
8587
8594
|
}
|
|
@@ -8613,8 +8620,8 @@ const Z2 = (m) => {
|
|
|
8613
8620
|
}
|
|
8614
8621
|
function d2(d) {
|
|
8615
8622
|
for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
|
|
8616
|
-
var r = d.j[s],
|
|
8617
|
-
if (new RegExp("^(?:" +
|
|
8623
|
+
var r = d.j[s], a = S(r, 1);
|
|
8624
|
+
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(g(r, 4)), r = t.replace(new RegExp(a, "g"), g(r, 2)), r = c1(d, r), o1(r, g2) == d.ba)) return r;
|
|
8618
8625
|
}
|
|
8619
8626
|
return "";
|
|
8620
8627
|
}
|
|
@@ -8626,8 +8633,8 @@ const Z2 = (m) => {
|
|
|
8626
8633
|
var t = d.g.toString();
|
|
8627
8634
|
if (3 <= t.length) {
|
|
8628
8635
|
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), s = $.length, r = 0; r < s; ++r) {
|
|
8629
|
-
var
|
|
8630
|
-
0 < d.o.length && G1(
|
|
8636
|
+
var a = $[r];
|
|
8637
|
+
0 < d.o.length && G1(S(a, 4)) && !g(a, 6) && !R(a, 5) || (d.o.length != 0 || d.ca || G1(S(a, 4)) || g(a, 6)) && E2.test(S(a, 2)) && d.j.push(a);
|
|
8631
8638
|
}
|
|
8632
8639
|
return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
|
|
8633
8640
|
}
|
|
@@ -8643,17 +8650,17 @@ const Z2 = (m) => {
|
|
|
8643
8650
|
}
|
|
8644
8651
|
function e2(d) {
|
|
8645
8652
|
var t = d.g.toString(), $ = 0;
|
|
8646
|
-
if (
|
|
8653
|
+
if (g(d.l, 10) != 1) var s = !1;
|
|
8647
8654
|
else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
|
|
8648
|
-
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" +
|
|
8655
|
+
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" + g(d.l, 15) + ")"), s = t.match(s), s != null && s[0] != null && 0 < s[0].length && (d.ca = !0, $ = s[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
|
|
8649
8656
|
}
|
|
8650
8657
|
function $2(d) {
|
|
8651
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8658
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
8652
8659
|
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;
|
|
8653
8660
|
}
|
|
8654
8661
|
function i2(d) {
|
|
8655
8662
|
if (d.g.h.length == 0) return !1;
|
|
8656
|
-
var t = new
|
|
8663
|
+
var t = new T(), $ = H1(d.g, t);
|
|
8657
8664
|
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 = J1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
|
|
8658
8665
|
}
|
|
8659
8666
|
function n2(d, t) {
|
|
@@ -8670,7 +8677,7 @@ const Z2 = (m) => {
|
|
|
8670
8677
|
}, _1 = { 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 };
|
|
8671
8678
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8672
8679
|
try {
|
|
8673
|
-
const $ = d.replace(/[^+0-9]/g, ""), s = new
|
|
8680
|
+
const $ = d.replace(/[^+0-9]/g, ""), s = new T2(t);
|
|
8674
8681
|
t = "";
|
|
8675
8682
|
for (let r = 0; r < $.length; r++) s.ja = M2(s, $.charAt(r)), t = s.ja;
|
|
8676
8683
|
return t;
|
|
@@ -8679,9 +8686,9 @@ const Z2 = (m) => {
|
|
|
8679
8686
|
}
|
|
8680
8687
|
}), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
|
|
8681
8688
|
try {
|
|
8682
|
-
const r = M.g(),
|
|
8683
|
-
var s = h1(r,
|
|
8684
|
-
return s == 0 || s == 4 ? r.format(
|
|
8689
|
+
const r = M.g(), a = Z(r, d, t);
|
|
8690
|
+
var s = h1(r, a, -1);
|
|
8691
|
+
return s == 0 || s == 4 ? r.format(a, typeof $ > "u" ? 0 : $) : d;
|
|
8685
8692
|
} catch {
|
|
8686
8693
|
return d;
|
|
8687
8694
|
}
|
|
@@ -8690,11 +8697,11 @@ const Z2 = (m) => {
|
|
|
8690
8697
|
const y = M.g();
|
|
8691
8698
|
d: {
|
|
8692
8699
|
var r = y;
|
|
8693
|
-
if (
|
|
8694
|
-
var
|
|
8700
|
+
if (a1(d)) {
|
|
8701
|
+
var a = u1(j(r, d), $);
|
|
8695
8702
|
try {
|
|
8696
|
-
if (R(
|
|
8697
|
-
var
|
|
8703
|
+
if (R(a, 6)) {
|
|
8704
|
+
var u = g(a, 6), c = z1(r, u, d, !1);
|
|
8698
8705
|
break d;
|
|
8699
8706
|
}
|
|
8700
8707
|
} catch {
|
|
@@ -8708,7 +8715,7 @@ const Z2 = (m) => {
|
|
|
8708
8715
|
}
|
|
8709
8716
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8710
8717
|
try {
|
|
8711
|
-
return
|
|
8718
|
+
return g(Z(M.g(), d, t), 3);
|
|
8712
8719
|
} catch {
|
|
8713
8720
|
return "";
|
|
8714
8721
|
}
|
|
@@ -8729,12 +8736,12 @@ const Z2 = (m) => {
|
|
|
8729
8736
|
}
|
|
8730
8737
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
|
|
8731
8738
|
try {
|
|
8732
|
-
const s = M.g(), r = Z(s, d, t),
|
|
8739
|
+
const s = M.g(), r = Z(s, d, t), a = A2(s, r);
|
|
8733
8740
|
if ($) {
|
|
8734
|
-
const
|
|
8735
|
-
return
|
|
8741
|
+
const u = s2($).map((c) => _1[c]);
|
|
8742
|
+
return a && u.includes(U1(s, r));
|
|
8736
8743
|
}
|
|
8737
|
-
return
|
|
8744
|
+
return a;
|
|
8738
8745
|
} catch {
|
|
8739
8746
|
return !1;
|
|
8740
8747
|
}
|
|
@@ -8742,8 +8749,8 @@ const Z2 = (m) => {
|
|
|
8742
8749
|
try {
|
|
8743
8750
|
const s = M.g(), r = Z(s, d, t);
|
|
8744
8751
|
if ($) {
|
|
8745
|
-
const
|
|
8746
|
-
for (let
|
|
8752
|
+
const a = s2($);
|
|
8753
|
+
for (let u of a) if (h1(s, r, _1[u]) === 0) return !0;
|
|
8747
8754
|
return !1;
|
|
8748
8755
|
}
|
|
8749
8756
|
return h1(s, r, -1) === 0;
|
|
@@ -8752,7 +8759,7 @@ const Z2 = (m) => {
|
|
|
8752
8759
|
}
|
|
8753
8760
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8754
8761
|
try {
|
|
8755
|
-
return
|
|
8762
|
+
return g(Z(M.g(), d, t), 2).toString();
|
|
8756
8763
|
} catch {
|
|
8757
8764
|
return "";
|
|
8758
8765
|
}
|
|
@@ -8794,21 +8801,21 @@ const q2 = {
|
|
|
8794
8801
|
"changeErrorCode"
|
|
8795
8802
|
], ["update:modelValue"]),
|
|
8796
8803
|
setup(m, { expose: e, emit: i }) {
|
|
8797
|
-
const n = D2(m, "modelValue"), o = m, l = i,
|
|
8798
|
-
let f =
|
|
8804
|
+
const n = D2(m, "modelValue"), o = m, l = i, p = v1(), h = v1(), _ = v1(!1), b = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
|
|
8805
|
+
let f = b();
|
|
8799
8806
|
_.value !== f && (_.value = f, l("changeValidity", !!f), l(
|
|
8800
8807
|
"changeErrorCode",
|
|
8801
8808
|
f ? null : h.value.getValidationError()
|
|
8802
8809
|
));
|
|
8803
|
-
},
|
|
8810
|
+
}, w = () => {
|
|
8804
8811
|
var f;
|
|
8805
8812
|
l("changeNumber", ((f = h.value) == null ? void 0 : f.getNumber()) ?? ""), v();
|
|
8806
|
-
},
|
|
8813
|
+
}, A = () => {
|
|
8807
8814
|
var f;
|
|
8808
|
-
l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""),
|
|
8815
|
+
l("changeCountry", ((f = h.value) == null ? void 0 : f.getSelectedCountryData().iso2) ?? ""), w(), v();
|
|
8809
8816
|
};
|
|
8810
8817
|
return P2(() => {
|
|
8811
|
-
|
|
8818
|
+
p.value && (h.value = C(p.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = b());
|
|
8812
8819
|
}), x2(
|
|
8813
8820
|
() => o.disabled,
|
|
8814
8821
|
(f) => {
|
|
@@ -8818,13 +8825,13 @@ const q2 = {
|
|
|
8818
8825
|
), R2(() => {
|
|
8819
8826
|
var f;
|
|
8820
8827
|
return (f = h.value) == null ? void 0 : f.destroy();
|
|
8821
|
-
}), e({ instance: h, input:
|
|
8828
|
+
}), e({ instance: h, input: p }), (f, I) => B2((O2(), k2("input", G2({
|
|
8822
8829
|
ref_key: "input",
|
|
8823
|
-
ref:
|
|
8830
|
+
ref: p,
|
|
8824
8831
|
"onUpdate:modelValue": I[0] || (I[0] = (O) => n.value = O),
|
|
8825
8832
|
type: "tel",
|
|
8826
|
-
onCountrychange:
|
|
8827
|
-
onInput:
|
|
8833
|
+
onCountrychange: A,
|
|
8834
|
+
onInput: w
|
|
8828
8835
|
}, m.inputProps), null, 16)), [
|
|
8829
8836
|
[
|
|
8830
8837
|
F2,
|