intl-tel-input 25.8.6 → 25.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +30 -12
- package/angular/build/IntlTelInputWithUtils.js +30 -12
- 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/intlTelInput.d.ts +1 -0
- package/build/js/intlTelInput.js +27 -13
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +27 -13
- package/build/js/intlTelInputWithUtils.min.js +3 -3
- package/package.json +10 -10
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +26 -12
- package/react/build/IntlTelInput.d.ts +1 -0
- package/react/build/IntlTelInput.js +26 -12
- package/react/build/IntlTelInputWithUtils.cjs +26 -12
- package/react/build/IntlTelInputWithUtils.js +26 -12
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +72 -63
- package/vue/build/IntlTelInputWithUtils.mjs +209 -200
- package/angular/build/types/countryDataManager.d.ts +0 -25
- package/angular/build/types/dropdown.d.ts +0 -56
- package/angular/build/types/types.d.ts +0 -53
|
@@ -1594,13 +1594,15 @@ const V2 = {
|
|
|
1594
1594
|
for (const m of J)
|
|
1595
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.
|
|
@@ -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), f = o > -1, h = l > -1;
|
|
1738
|
+
if (f || h)
|
|
1739
|
+
return f && h ? o - l : f ? -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), f = e.dialCode + l;
|
|
1791
|
+
this._addToDialCodeMap(i, f), this._addToDialCodeMap(e.iso2, f);
|
|
1790
1792
|
}
|
|
1791
1793
|
this._addToDialCodeMap(e.iso2, e.dialCode + n);
|
|
1792
1794
|
}
|
|
@@ -1794,7 +1796,7 @@ class p1 {
|
|
|
1794
1796
|
}
|
|
1795
1797
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1796
1798
|
_generateMarkup() {
|
|
1797
|
-
var
|
|
1799
|
+
var p, I, O;
|
|
1798
1800
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1799
1801
|
const {
|
|
1800
1802
|
allowDropdown: e,
|
|
@@ -1802,23 +1804,24 @@ class p1 {
|
|
|
1802
1804
|
showFlags: n,
|
|
1803
1805
|
containerClass: o,
|
|
1804
1806
|
hiddenInput: l,
|
|
1805
|
-
dropdownContainer:
|
|
1807
|
+
dropdownContainer: f,
|
|
1806
1808
|
fixDropdownWidth: h,
|
|
1807
1809
|
useFullscreenPopup: _,
|
|
1808
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 ((
|
|
1818
|
+
}), A = N("div", { class: w });
|
|
1819
|
+
if ((p = this.telInput.parentNode) == null || p.insertBefore(A, this.telInput), e || n || i) {
|
|
1818
1820
|
this.countryContainer = N(
|
|
1819
1821
|
"div",
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
+
// visibly hidden until we measure it's width to set the input padding correctly
|
|
1823
|
+
{ class: "iti__country-container iti__v-hide" },
|
|
1824
|
+
A
|
|
1822
1825
|
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
|
|
1823
1826
|
"button",
|
|
1824
1827
|
{
|
|
@@ -1934,7 +1937,7 @@ class p1 {
|
|
|
1934
1937
|
"aria-label": v.countryListAriaLabel
|
|
1935
1938
|
},
|
|
1936
1939
|
this.dropdownContent
|
|
1937
|
-
), this._appendListItems(), b && this._updateSearchResultsA11yText(),
|
|
1940
|
+
), this._appendListItems(), b && this._updateSearchResultsA11yText(), f) {
|
|
1938
1941
|
const D = p1._buildClassNames({
|
|
1939
1942
|
iti: !0,
|
|
1940
1943
|
"iti--container": !0,
|
|
@@ -1947,21 +1950,21 @@ class p1 {
|
|
|
1947
1950
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1948
1951
|
}
|
|
1949
1952
|
}
|
|
1950
|
-
if (
|
|
1953
|
+
if (A.appendChild(this.telInput), this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide")), l) {
|
|
1951
1954
|
const G = this.telInput.getAttribute("name") || "", F = l(G);
|
|
1952
1955
|
if (F.phone) {
|
|
1953
1956
|
const D = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${F.phone}"]`);
|
|
1954
1957
|
D ? this.hiddenInput = D : (this.hiddenInput = N("input", {
|
|
1955
1958
|
type: "hidden",
|
|
1956
1959
|
name: F.phone
|
|
1957
|
-
}),
|
|
1960
|
+
}), A.appendChild(this.hiddenInput));
|
|
1958
1961
|
}
|
|
1959
1962
|
if (F.country) {
|
|
1960
1963
|
const D = (O = this.telInput.form) == null ? void 0 : O.querySelector(`input[name="${F.country}"]`);
|
|
1961
1964
|
D ? this.hiddenInputCountry = D : (this.hiddenInputCountry = N("input", {
|
|
1962
1965
|
type: "hidden",
|
|
1963
1966
|
name: F.country
|
|
1964
|
-
}),
|
|
1967
|
+
}), A.appendChild(this.hiddenInputCountry));
|
|
1965
1968
|
}
|
|
1966
1969
|
}
|
|
1967
1970
|
}
|
|
@@ -1990,12 +1993,12 @@ class p1 {
|
|
|
1990
1993
|
//* 1. Extracting a dial code from the given number
|
|
1991
1994
|
//* 2. Using explicit initialCountry
|
|
1992
1995
|
_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 (
|
|
1996
|
+
const i = this.telInput.getAttribute("value"), n = this.telInput.value, l = i && i.charAt(0) === "+" && (!n || n.charAt(0) !== "+") ? i : n, f = this._getDialCode(l), h = a2(l), { initialCountry: _, geoIpLookup: b } = this.options, v = _ === "auto" && b;
|
|
1997
|
+
if (f && !h)
|
|
1995
1998
|
this._updateCountryFromNumber(l);
|
|
1996
1999
|
else if (!v || e) {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
2000
|
+
const w = _ ? _.toLowerCase() : "";
|
|
2001
|
+
w && this._getCountryData(w, !0) ? this._setCountry(w) : f && h ? this._setCountry("us") : this._setCountry();
|
|
1999
2002
|
}
|
|
2000
2003
|
l && this._updateValFromNumber(l);
|
|
2001
2004
|
}
|
|
@@ -2055,19 +2058,19 @@ class p1 {
|
|
|
2055
2058
|
//* Initialize the tel input listeners.
|
|
2056
2059
|
_initTelInputListeners() {
|
|
2057
2060
|
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) && (
|
|
2061
|
+
let f = !1;
|
|
2062
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (h) => {
|
|
2060
2063
|
if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
|
|
2061
|
-
const
|
|
2062
|
-
this.telInput.value =
|
|
2064
|
+
const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w - 1), p = this.telInput.value.substring(w);
|
|
2065
|
+
this.telInput.value = A + p, this._openDropdownWithPlus();
|
|
2063
2066
|
return;
|
|
2064
2067
|
}
|
|
2065
2068
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
2066
2069
|
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), b = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2067
|
-
_ || b && !e ?
|
|
2070
|
+
_ || b && !e ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
|
|
2068
2071
|
const v = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
|
|
2069
|
-
if (i && !
|
|
2070
|
-
const
|
|
2072
|
+
if (i && !f && !v) {
|
|
2073
|
+
const w = this.telInput.selectionStart || 0, p = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, I = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(p, O, w, I);
|
|
2071
2074
|
this.telInput.value = O, this.telInput.setSelectionRange(G, G);
|
|
2072
2075
|
}
|
|
2073
2076
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
|
|
@@ -2077,8 +2080,8 @@ class p1 {
|
|
|
2077
2080
|
return;
|
|
2078
2081
|
}
|
|
2079
2082
|
if (e) {
|
|
2080
|
-
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+",
|
|
2081
|
-
(!
|
|
2083
|
+
const _ = this.telInput.value, v = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", w = /^[0-9]$/.test(h.key), A = n ? w : v || w, p = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), I = this._getFullNumber(p), O = C.utils.getCoreNumber(I, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(I) !== null;
|
|
2084
|
+
(!A || G && !D && !v) && h.preventDefault();
|
|
2082
2085
|
}
|
|
2083
2086
|
}
|
|
2084
2087
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2167,19 +2170,19 @@ class p1 {
|
|
|
2167
2170
|
_filterCountries(e, i = !1) {
|
|
2168
2171
|
let n = !0;
|
|
2169
2172
|
this.countryList.innerHTML = "";
|
|
2170
|
-
const o = o2(e), l = o.length,
|
|
2171
|
-
for (const
|
|
2172
|
-
i || l === 0 ? _.push(
|
|
2173
|
-
const
|
|
2174
|
-
...
|
|
2175
|
-
...h.sort((
|
|
2176
|
-
..._.sort((
|
|
2177
|
-
...b.sort((
|
|
2178
|
-
...v.sort((
|
|
2179
|
-
...
|
|
2173
|
+
const o = o2(e), l = o.length, f = [], h = [], _ = [], b = [], v = [], w = [];
|
|
2174
|
+
for (const p of this.countries)
|
|
2175
|
+
i || l === 0 ? _.push(p) : p.iso2 === o ? f.push(p) : p.normalisedName.startsWith(o) ? h.push(p) : p.normalisedName.includes(o) ? _.push(p) : o === p.dialCode || o === p.dialCodePlus ? b.push(p) : p.dialCodePlus.includes(o) ? v.push(p) : p.initials.includes(o) && w.push(p);
|
|
2176
|
+
const A = [
|
|
2177
|
+
...f.sort((p, I) => p.priority - I.priority),
|
|
2178
|
+
...h.sort((p, I) => p.priority - I.priority),
|
|
2179
|
+
..._.sort((p, I) => p.priority - I.priority),
|
|
2180
|
+
...b.sort((p, I) => p.priority - I.priority),
|
|
2181
|
+
...v.sort((p, I) => p.priority - I.priority),
|
|
2182
|
+
...w.sort((p, I) => p.priority - I.priority)
|
|
2180
2183
|
];
|
|
2181
|
-
for (const
|
|
2182
|
-
const I =
|
|
2184
|
+
for (const p of A) {
|
|
2185
|
+
const I = p.nodeById[this.id];
|
|
2183
2186
|
I && (this.countryList.appendChild(I), n && (this._highlightListItem(I, !1), n = !1));
|
|
2184
2187
|
}
|
|
2185
2188
|
n ? (this._highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove("iti__hide")) : this.searchNoResults && this.searchNoResults.classList.add("iti__hide"), this.countryList.scrollTop = 0, this._updateSearchResultsA11yText();
|
|
@@ -2205,11 +2208,11 @@ class p1 {
|
|
|
2205
2208
|
_updateValFromNumber(e) {
|
|
2206
2209
|
let i = e;
|
|
2207
2210
|
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,
|
|
2211
|
+
const n = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, f = n ? o : l;
|
|
2209
2212
|
i = C.utils.formatNumber(
|
|
2210
2213
|
i,
|
|
2211
2214
|
this.selectedCountryData.iso2,
|
|
2212
|
-
|
|
2215
|
+
f
|
|
2213
2216
|
);
|
|
2214
2217
|
}
|
|
2215
2218
|
i = this._beforeSetNumber(i), this.telInput.value = i;
|
|
@@ -2224,8 +2227,8 @@ class p1 {
|
|
|
2224
2227
|
const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
|
|
2225
2228
|
if (e.charAt(0) === "+" || !i)
|
|
2226
2229
|
return e;
|
|
2227
|
-
const
|
|
2228
|
-
return `+${i}${
|
|
2230
|
+
const f = n && e.charAt(0) === n && !this.options.separateDialCode ? e.substring(1) : e;
|
|
2231
|
+
return `+${i}${f}`;
|
|
2229
2232
|
}
|
|
2230
2233
|
// Get the country ISO2 code from the given number
|
|
2231
2234
|
// BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
|
|
@@ -2235,16 +2238,16 @@ class p1 {
|
|
|
2235
2238
|
let n = i ? e.substring(i) : e;
|
|
2236
2239
|
const o = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
|
|
2237
2240
|
n = this._ensureHasDialCode(n);
|
|
2238
|
-
const
|
|
2239
|
-
if (
|
|
2240
|
-
const _ = f1(
|
|
2241
|
+
const f = this._getDialCode(n, !0), h = f1(n);
|
|
2242
|
+
if (f) {
|
|
2243
|
+
const _ = f1(f), b = this.dialCodeToIso2Map[_];
|
|
2241
2244
|
if (!o && this.defaultCountry && b.includes(this.defaultCountry))
|
|
2242
2245
|
return this.defaultCountry;
|
|
2243
|
-
const v = this.selectedCountryData.areaCodes && h.length > _.length,
|
|
2244
|
-
if (!(l === "1" && a2(h)) && !
|
|
2245
|
-
for (const
|
|
2246
|
-
if (
|
|
2247
|
-
return
|
|
2246
|
+
const v = this.selectedCountryData.areaCodes && h.length > _.length, w = o && b.includes(o) && !v;
|
|
2247
|
+
if (!(l === "1" && a2(h)) && !w) {
|
|
2248
|
+
for (const p of b)
|
|
2249
|
+
if (p)
|
|
2250
|
+
return p;
|
|
2248
2251
|
}
|
|
2249
2252
|
} else {
|
|
2250
2253
|
if (n.charAt(0) === "+" && h.length)
|
|
@@ -2278,26 +2281,26 @@ class p1 {
|
|
|
2278
2281
|
_setCountry(e) {
|
|
2279
2282
|
const { separateDialCode: i, showFlags: n, i18n: o } = this.options, l = this.selectedCountryData.iso2 || "";
|
|
2280
2283
|
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
|
|
2281
|
-
const
|
|
2284
|
+
const f = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
|
|
2282
2285
|
let h, _;
|
|
2283
2286
|
if (e) {
|
|
2284
2287
|
const { name: b, dialCode: v } = this.selectedCountryData;
|
|
2285
2288
|
_ = b, h = o.selectedCountryAriaLabel.replace("${countryName}", b).replace("${dialCode}", `+${v}`);
|
|
2286
2289
|
} else
|
|
2287
2290
|
_ = o.noCountrySelected, h = o.noCountrySelected;
|
|
2288
|
-
this.selectedCountryInner.className =
|
|
2291
|
+
this.selectedCountryInner.className = f, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
|
|
2289
2292
|
}
|
|
2290
2293
|
if (i) {
|
|
2291
|
-
const
|
|
2292
|
-
this.selectedDialCode.innerHTML =
|
|
2294
|
+
const f = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2295
|
+
this.selectedDialCode.innerHTML = f, this._updateInputPadding();
|
|
2293
2296
|
}
|
|
2294
2297
|
return this._updatePlaceholder(), this._updateMaxLength(), l !== e;
|
|
2295
2298
|
}
|
|
2296
2299
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2297
2300
|
_updateInputPadding() {
|
|
2298
2301
|
if (this.selectedCountry) {
|
|
2299
|
-
const
|
|
2300
|
-
this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${
|
|
2302
|
+
const e = this.options.separateDialCode ? 78 : 42, n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + 6;
|
|
2303
|
+
this.showSelectedCountryOnLeft ? this.telInput.style.paddingLeft = `${n}px` : this.telInput.style.paddingRight = `${n}px`;
|
|
2301
2304
|
}
|
|
2302
2305
|
}
|
|
2303
2306
|
//* Update the maximum valid number length for the currently selected country.
|
|
@@ -2306,33 +2309,39 @@ class p1 {
|
|
|
2306
2309
|
if (e && C.utils)
|
|
2307
2310
|
if (o) {
|
|
2308
2311
|
const l = C.utils.numberType[i];
|
|
2309
|
-
let
|
|
2312
|
+
let f = C.utils.getExampleNumber(
|
|
2310
2313
|
o,
|
|
2311
2314
|
!1,
|
|
2312
2315
|
l,
|
|
2313
2316
|
!0
|
|
2314
|
-
), h =
|
|
2315
|
-
for (; C.utils.isPossibleNumber(
|
|
2316
|
-
h =
|
|
2317
|
+
), h = f;
|
|
2318
|
+
for (; C.utils.isPossibleNumber(f, o, n); )
|
|
2319
|
+
h = f, f += "0";
|
|
2317
2320
|
const _ = C.utils.getCoreNumber(h, o);
|
|
2318
2321
|
this.maxCoreNumberLength = _.length, o === "by" && (this.maxCoreNumberLength = _.length + 1);
|
|
2319
2322
|
} else
|
|
2320
2323
|
this.maxCoreNumberLength = null;
|
|
2321
2324
|
}
|
|
2322
|
-
//* When
|
|
2323
|
-
//*
|
|
2324
|
-
//*
|
|
2325
|
-
//*
|
|
2325
|
+
//* When input is in a hidden container during init, we cannot calculate the selected country width.
|
|
2326
|
+
//* Fix: clone the markup, make it invisible, add it to the end of the DOM, and then measure it's width.
|
|
2327
|
+
//* To get the right styling to apply, all we need is a shallow clone of the container,
|
|
2328
|
+
//* and then to inject a deep clone of the selectedCountry element.
|
|
2326
2329
|
_getHiddenSelectedCountryWidth() {
|
|
2327
2330
|
if (this.telInput.parentNode) {
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2331
|
+
let e;
|
|
2332
|
+
try {
|
|
2333
|
+
e = window.top.document.body;
|
|
2334
|
+
} catch {
|
|
2335
|
+
e = document.body;
|
|
2336
|
+
}
|
|
2337
|
+
const i = this.telInput.parentNode.cloneNode(!1);
|
|
2338
|
+
i.style.visibility = "hidden", e.appendChild(i);
|
|
2339
|
+
const n = this.countryContainer.cloneNode();
|
|
2333
2340
|
i.appendChild(n);
|
|
2334
|
-
const o =
|
|
2335
|
-
|
|
2341
|
+
const o = this.selectedCountry.cloneNode(!0);
|
|
2342
|
+
n.appendChild(o);
|
|
2343
|
+
const l = o.offsetWidth;
|
|
2344
|
+
return e.removeChild(i), l;
|
|
2336
2345
|
}
|
|
2337
2346
|
return 0;
|
|
2338
2347
|
}
|
|
@@ -2345,11 +2354,11 @@ class p1 {
|
|
|
2345
2354
|
customPlaceholder: o
|
|
2346
2355
|
} = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2347
2356
|
if (C.utils && l) {
|
|
2348
|
-
const
|
|
2357
|
+
const f = C.utils.numberType[i];
|
|
2349
2358
|
let h = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
|
|
2350
2359
|
this.selectedCountryData.iso2,
|
|
2351
2360
|
n,
|
|
2352
|
-
|
|
2361
|
+
f
|
|
2353
2362
|
) : "";
|
|
2354
2363
|
h = this._beforeSetNumber(h), typeof o == "function" && (h = o(h, this.selectedCountryData)), this.telInput.setAttribute("placeholder", h);
|
|
2355
2364
|
}
|
|
@@ -2373,12 +2382,12 @@ class p1 {
|
|
|
2373
2382
|
}
|
|
2374
2383
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2375
2384
|
_scrollTo(e) {
|
|
2376
|
-
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n,
|
|
2385
|
+
const i = this.countryList, n = document.documentElement.scrollTop, o = i.offsetHeight, l = i.getBoundingClientRect().top + n, f = l + o, h = e.offsetHeight, _ = e.getBoundingClientRect().top + n, b = _ + h, v = _ - l + i.scrollTop;
|
|
2377
2386
|
if (_ < l)
|
|
2378
2387
|
i.scrollTop = v;
|
|
2379
|
-
else if (b >
|
|
2380
|
-
const
|
|
2381
|
-
i.scrollTop = v -
|
|
2388
|
+
else if (b > f) {
|
|
2389
|
+
const w = o - h;
|
|
2390
|
+
i.scrollTop = v - w;
|
|
2382
2391
|
}
|
|
2383
2392
|
}
|
|
2384
2393
|
//* Replace any existing dial code with the new one
|
|
@@ -2398,9 +2407,9 @@ class p1 {
|
|
|
2398
2407
|
if (e.charAt(0) === "+") {
|
|
2399
2408
|
let o = "";
|
|
2400
2409
|
for (let l = 0; l < e.length; l++) {
|
|
2401
|
-
const
|
|
2402
|
-
if (!isNaN(parseInt(
|
|
2403
|
-
if (o +=
|
|
2410
|
+
const f = e.charAt(l);
|
|
2411
|
+
if (!isNaN(parseInt(f, 10))) {
|
|
2412
|
+
if (o += f, i)
|
|
2404
2413
|
this.dialCodeToIso2Map[o] && (n = e.substring(0, l + 1));
|
|
2405
2414
|
else if (this.dialCodes.has(o)) {
|
|
2406
2415
|
n = e.substring(0, l + 1);
|
|
@@ -2458,7 +2467,7 @@ class p1 {
|
|
|
2458
2467
|
//********************
|
|
2459
2468
|
//* Remove plugin.
|
|
2460
2469
|
destroy() {
|
|
2461
|
-
var l,
|
|
2470
|
+
var l, f;
|
|
2462
2471
|
this.telInput.iti = void 0;
|
|
2463
2472
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2464
2473
|
if (e) {
|
|
@@ -2475,7 +2484,7 @@ class p1 {
|
|
|
2475
2484
|
const { form: n } = this.telInput;
|
|
2476
2485
|
this._handleHiddenInputSubmit && n && n.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2477
2486
|
const o = this.telInput.parentNode;
|
|
2478
|
-
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (
|
|
2487
|
+
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (f = o == null ? void 0 : o.parentNode) == null || f.removeChild(o), delete C.instances[this.id];
|
|
2479
2488
|
}
|
|
2480
2489
|
//* Get the extension from the current number.
|
|
2481
2490
|
getExtension() {
|
|
@@ -2530,12 +2539,12 @@ class p1 {
|
|
|
2530
2539
|
_validateNumber(e) {
|
|
2531
2540
|
if (!this.selectedCountryData.iso2)
|
|
2532
2541
|
return !1;
|
|
2533
|
-
const i = this.
|
|
2534
|
-
if (
|
|
2535
|
-
const
|
|
2536
|
-
return
|
|
2542
|
+
const i = (f) => e ? this._utilsIsValidNumber(f) : this._utilsIsPossibleNumber(f), n = this._getFullNumber(), o = n.search(new RegExp("\\p{L}", "u"));
|
|
2543
|
+
if (o > -1 && !this.options.allowPhonewords) {
|
|
2544
|
+
const f = n.substring(0, o), h = i(f), _ = i(n);
|
|
2545
|
+
return h && _;
|
|
2537
2546
|
}
|
|
2538
|
-
return
|
|
2547
|
+
return i(n);
|
|
2539
2548
|
}
|
|
2540
2549
|
_utilsIsValidNumber(e) {
|
|
2541
2550
|
return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
@@ -2600,7 +2609,7 @@ const Z2 = (m) => {
|
|
|
2600
2609
|
attachUtils: Z2,
|
|
2601
2610
|
startedLoadingUtilsScript: !1,
|
|
2602
2611
|
startedLoadingAutoCountry: !1,
|
|
2603
|
-
version: "25.
|
|
2612
|
+
version: "25.10.1"
|
|
2604
2613
|
}
|
|
2605
2614
|
);
|
|
2606
2615
|
(function() {
|
|
@@ -2635,10 +2644,10 @@ const Z2 = (m) => {
|
|
|
2635
2644
|
}
|
|
2636
2645
|
}, l = {};
|
|
2637
2646
|
new o("about:invalid#zClosurez"), new o("about:blank");
|
|
2638
|
-
const
|
|
2647
|
+
const f = {};
|
|
2639
2648
|
class h {
|
|
2640
2649
|
constructor() {
|
|
2641
|
-
if (
|
|
2650
|
+
if (f !== f) throw Error("SafeStyle is not meant to be built directly");
|
|
2642
2651
|
}
|
|
2643
2652
|
toString() {
|
|
2644
2653
|
return "";
|
|
@@ -2656,7 +2665,7 @@ const Z2 = (m) => {
|
|
|
2656
2665
|
}
|
|
2657
2666
|
new b();
|
|
2658
2667
|
const v = {};
|
|
2659
|
-
class
|
|
2668
|
+
class w {
|
|
2660
2669
|
constructor() {
|
|
2661
2670
|
var t = m.trustedTypes && m.trustedTypes.emptyHTML || "";
|
|
2662
2671
|
if (v !== v) throw Error("SafeHtml is not meant to be built directly");
|
|
@@ -2666,8 +2675,8 @@ const Z2 = (m) => {
|
|
|
2666
2675
|
return this.g.toString();
|
|
2667
2676
|
}
|
|
2668
2677
|
}
|
|
2669
|
-
new
|
|
2670
|
-
function
|
|
2678
|
+
new w();
|
|
2679
|
+
function A(d, t) {
|
|
2671
2680
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2672
2681
|
case O:
|
|
2673
2682
|
case G:
|
|
@@ -2675,12 +2684,12 @@ const Z2 = (m) => {
|
|
|
2675
2684
|
case D:
|
|
2676
2685
|
case i1:
|
|
2677
2686
|
case I:
|
|
2678
|
-
case
|
|
2687
|
+
case p:
|
|
2679
2688
|
this.o = !0;
|
|
2680
2689
|
}
|
|
2681
2690
|
this.j = t.defaultValue;
|
|
2682
2691
|
}
|
|
2683
|
-
var
|
|
2692
|
+
var p = 1, I = 2, O = 3, G = 4, F = 6, D = 16, i1 = 18;
|
|
2684
2693
|
function c2(d, t) {
|
|
2685
2694
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2686
2695
|
var $ = t[d];
|
|
@@ -2698,13 +2707,13 @@ const Z2 = (m) => {
|
|
|
2698
2707
|
x.prototype.has = function(d) {
|
|
2699
2708
|
return R(this, d.g);
|
|
2700
2709
|
}, x.prototype.get = function(d, t) {
|
|
2701
|
-
return
|
|
2710
|
+
return g(this, d.g, t);
|
|
2702
2711
|
}, x.prototype.set = function(d, t) {
|
|
2703
2712
|
E(this, d.g, t);
|
|
2704
2713
|
}, x.prototype.add = function(d, t) {
|
|
2705
2714
|
b1(this, d.g, t);
|
|
2706
2715
|
};
|
|
2707
|
-
function
|
|
2716
|
+
function S1(d, t) {
|
|
2708
2717
|
for (var $ = f2(d.m()), s = 0; s < $.length; s++) {
|
|
2709
2718
|
var r = $[s], a = r.g;
|
|
2710
2719
|
if (R(t, a)) {
|
|
@@ -2713,13 +2722,13 @@ const Z2 = (m) => {
|
|
|
2713
2722
|
if (r.l) {
|
|
2714
2723
|
r = P(t, a);
|
|
2715
2724
|
for (var c = 0; c < r.length; c++) b1(d, a, u ? r[c].clone() : r[c]);
|
|
2716
|
-
} else r = n1(t, a), u ? (u = n1(d, a)) ?
|
|
2725
|
+
} else r = n1(t, a), u ? (u = n1(d, a)) ? S1(u, r) : E(d, a, r.clone()) : E(d, a, r);
|
|
2717
2726
|
}
|
|
2718
2727
|
}
|
|
2719
2728
|
}
|
|
2720
2729
|
x.prototype.clone = function() {
|
|
2721
2730
|
var d = new this.constructor();
|
|
2722
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
2731
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
|
|
2723
2732
|
};
|
|
2724
2733
|
function R(d, t) {
|
|
2725
2734
|
return d.h[t] != null;
|
|
@@ -2740,12 +2749,12 @@ const Z2 = (m) => {
|
|
|
2740
2749
|
}
|
|
2741
2750
|
return $;
|
|
2742
2751
|
}
|
|
2743
|
-
function
|
|
2752
|
+
function g(d, t, $) {
|
|
2744
2753
|
var s = n1(d, t);
|
|
2745
2754
|
return d.j[t].l ? s[$ || 0] : s;
|
|
2746
2755
|
}
|
|
2747
|
-
function
|
|
2748
|
-
if (R(d, t)) d =
|
|
2756
|
+
function S(d, t) {
|
|
2757
|
+
if (R(d, t)) d = g(d, t);
|
|
2749
2758
|
else d: {
|
|
2750
2759
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2751
2760
|
else if (t === Number) d.j = 0;
|
|
@@ -2772,7 +2781,7 @@ const Z2 = (m) => {
|
|
|
2772
2781
|
}
|
|
2773
2782
|
function s1(d, t) {
|
|
2774
2783
|
var $ = [], s;
|
|
2775
|
-
for (s in t) s != 0 && $.push(new
|
|
2784
|
+
for (s in t) s != 0 && $.push(new A(s, t[s]));
|
|
2776
2785
|
return new c2(d, $);
|
|
2777
2786
|
}
|
|
2778
2787
|
function r1() {
|
|
@@ -2801,19 +2810,19 @@ const Z2 = (m) => {
|
|
|
2801
2810
|
}, q.prototype.g = function(d, t) {
|
|
2802
2811
|
return q.ma.g.call(this, d, t);
|
|
2803
2812
|
};
|
|
2804
|
-
function
|
|
2813
|
+
function T(d, t) {
|
|
2805
2814
|
d != null && this.g.apply(this, arguments);
|
|
2806
2815
|
}
|
|
2807
|
-
|
|
2816
|
+
T.prototype.h = "", T.prototype.set = function(d) {
|
|
2808
2817
|
this.h = "" + d;
|
|
2809
|
-
},
|
|
2818
|
+
}, T.prototype.g = function(d, t, $) {
|
|
2810
2819
|
if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
|
|
2811
2820
|
return this;
|
|
2812
2821
|
};
|
|
2813
2822
|
function B(d) {
|
|
2814
2823
|
d.h = "";
|
|
2815
2824
|
}
|
|
2816
|
-
|
|
2825
|
+
T.prototype.toString = function() {
|
|
2817
2826
|
return this.h;
|
|
2818
2827
|
};
|
|
2819
2828
|
function W() {
|
|
@@ -2825,21 +2834,21 @@ const Z2 = (m) => {
|
|
|
2825
2834
|
x.call(this);
|
|
2826
2835
|
}
|
|
2827
2836
|
i(L, x);
|
|
2828
|
-
var
|
|
2837
|
+
var A1 = null;
|
|
2829
2838
|
function z() {
|
|
2830
2839
|
x.call(this);
|
|
2831
2840
|
}
|
|
2832
2841
|
i(z, x);
|
|
2833
|
-
var
|
|
2842
|
+
var T1 = null;
|
|
2834
2843
|
W.prototype.m = function() {
|
|
2835
2844
|
var d = N1;
|
|
2836
2845
|
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;
|
|
2837
2846
|
}, W.m = W.prototype.m, L.prototype.m = function() {
|
|
2838
|
-
var d = T1;
|
|
2839
|
-
return d || (T1 = 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;
|
|
2840
|
-
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2841
2847
|
var d = A1;
|
|
2842
|
-
return d || (A1 = d = s1(
|
|
2848
|
+
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;
|
|
2849
|
+
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2850
|
+
var d = T1;
|
|
2851
|
+
return d || (T1 = d = s1(z, {
|
|
2843
2852
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2844
2853
|
1: { name: "general_desc", i: 11, type: L },
|
|
2845
2854
|
2: { name: "fixed_line", i: 11, type: L },
|
|
@@ -8298,7 +8307,7 @@ const Z2 = (m) => {
|
|
|
8298
8307
|
X: "9",
|
|
8299
8308
|
Y: "9",
|
|
8300
8309
|
Z: "9"
|
|
8301
|
-
}, 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}.*/,
|
|
8310
|
+
}, 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٠-٩۰-۹])*\\.?$");
|
|
8302
8311
|
function Y(d) {
|
|
8303
8312
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8304
8313
|
}
|
|
@@ -8320,7 +8329,7 @@ const Z2 = (m) => {
|
|
|
8320
8329
|
return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
|
|
8321
8330
|
}
|
|
8322
8331
|
function o1(d, t) {
|
|
8323
|
-
for (var $ = new
|
|
8332
|
+
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);
|
|
8324
8333
|
return $.toString();
|
|
8325
8334
|
}
|
|
8326
8335
|
function G1(d) {
|
|
@@ -8330,40 +8339,40 @@ const Z2 = (m) => {
|
|
|
8330
8339
|
return d != null && isNaN(d) && d.toUpperCase() in M1;
|
|
8331
8340
|
}
|
|
8332
8341
|
M.prototype.format = function(d, t) {
|
|
8333
|
-
if (
|
|
8334
|
-
var $ =
|
|
8342
|
+
if (g(d, 2) == 0 && R(d, 5)) {
|
|
8343
|
+
var $ = S(d, 5);
|
|
8335
8344
|
if (0 < $.length) return $;
|
|
8336
8345
|
}
|
|
8337
|
-
$ =
|
|
8346
|
+
$ = S(d, 1);
|
|
8338
8347
|
var s = t1(d);
|
|
8339
8348
|
if (t == 0) return F1($, 0, s, "");
|
|
8340
8349
|
if (!($ in X)) return s;
|
|
8341
8350
|
var r = d1(this, $, e1($));
|
|
8342
|
-
d = R(d, 3) &&
|
|
8351
|
+
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) : "";
|
|
8343
8352
|
d: {
|
|
8344
8353
|
r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
|
|
8345
8354
|
for (var a, u = r.length, c = 0; c < u; ++c) {
|
|
8346
8355
|
a = r[c];
|
|
8347
8356
|
var y = K(a, 3);
|
|
8348
|
-
if ((y == 0 || s.search(
|
|
8357
|
+
if ((y == 0 || s.search(g(a, 3, y - 1)) == 0) && (y = new RegExp(g(a, 1)), U(y, s))) {
|
|
8349
8358
|
r = a;
|
|
8350
8359
|
break d;
|
|
8351
8360
|
}
|
|
8352
8361
|
}
|
|
8353
8362
|
r = null;
|
|
8354
8363
|
}
|
|
8355
|
-
return r != null && (u = r, r =
|
|
8364
|
+
return r != null && (u = r, r = S(u, 2), a = new RegExp(g(u, 1)), S(
|
|
8356
8365
|
u,
|
|
8357
8366
|
5
|
|
8358
|
-
), u =
|
|
8367
|
+
), 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);
|
|
8359
8368
|
};
|
|
8360
8369
|
function d1(d, t, $) {
|
|
8361
8370
|
return $ == "001" ? j(d, "" + t) : j(d, $);
|
|
8362
8371
|
}
|
|
8363
8372
|
function t1(d) {
|
|
8364
8373
|
if (!R(d, 2)) return "";
|
|
8365
|
-
var t = "" +
|
|
8366
|
-
return R(d, 4) &&
|
|
8374
|
+
var t = "" + g(d, 2);
|
|
8375
|
+
return R(d, 4) && g(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
|
|
8367
8376
|
}
|
|
8368
8377
|
function F1(d, t, $, s) {
|
|
8369
8378
|
switch (t) {
|
|
@@ -8380,36 +8389,36 @@ const Z2 = (m) => {
|
|
|
8380
8389
|
function u1(d, t) {
|
|
8381
8390
|
switch (t) {
|
|
8382
8391
|
case 4:
|
|
8383
|
-
return
|
|
8392
|
+
return g(d, 5);
|
|
8384
8393
|
case 3:
|
|
8385
|
-
return
|
|
8394
|
+
return g(d, 4);
|
|
8386
8395
|
case 1:
|
|
8387
|
-
return
|
|
8396
|
+
return g(d, 3);
|
|
8388
8397
|
case 0:
|
|
8389
8398
|
case 2:
|
|
8390
|
-
return
|
|
8399
|
+
return g(d, 2);
|
|
8391
8400
|
case 5:
|
|
8392
|
-
return
|
|
8401
|
+
return g(d, 6);
|
|
8393
8402
|
case 6:
|
|
8394
|
-
return
|
|
8403
|
+
return g(d, 8);
|
|
8395
8404
|
case 7:
|
|
8396
|
-
return
|
|
8405
|
+
return g(d, 7);
|
|
8397
8406
|
case 8:
|
|
8398
|
-
return
|
|
8407
|
+
return g(d, 21);
|
|
8399
8408
|
case 9:
|
|
8400
|
-
return
|
|
8409
|
+
return g(d, 25);
|
|
8401
8410
|
case 10:
|
|
8402
|
-
return
|
|
8411
|
+
return g(d, 28);
|
|
8403
8412
|
default:
|
|
8404
|
-
return
|
|
8413
|
+
return g(d, 1);
|
|
8405
8414
|
}
|
|
8406
8415
|
}
|
|
8407
8416
|
function U1(d, t) {
|
|
8408
8417
|
var $ = V1(d, t);
|
|
8409
|
-
return d = d1(d,
|
|
8418
|
+
return d = d1(d, S(t, 1), $), d == null ? -1 : (t = t1(t), m1(t, d));
|
|
8410
8419
|
}
|
|
8411
8420
|
function m1(d, t) {
|
|
8412
|
-
return k(d,
|
|
8421
|
+
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;
|
|
8413
8422
|
}
|
|
8414
8423
|
function j(d, t) {
|
|
8415
8424
|
if (t == null) return null;
|
|
@@ -8423,15 +8432,15 @@ const Z2 = (m) => {
|
|
|
8423
8432
|
}
|
|
8424
8433
|
function k(d, t) {
|
|
8425
8434
|
var $ = d.length;
|
|
8426
|
-
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(
|
|
8435
|
+
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(S(t, 2), d);
|
|
8427
8436
|
}
|
|
8428
|
-
function
|
|
8429
|
-
var $ = V1(d, t), s =
|
|
8437
|
+
function A2(d, t) {
|
|
8438
|
+
var $ = V1(d, t), s = S(t, 1), r = d1(d, s, $);
|
|
8430
8439
|
return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = t1(t), r = m1(d, r) != -1), r;
|
|
8431
8440
|
}
|
|
8432
8441
|
function V1(d, t) {
|
|
8433
8442
|
if (t == null) return null;
|
|
8434
|
-
var $ =
|
|
8443
|
+
var $ = S(t, 1);
|
|
8435
8444
|
if ($ = X[$], $ == null) d = null;
|
|
8436
8445
|
else if ($.length == 1) d = $[0];
|
|
8437
8446
|
else d: {
|
|
@@ -8440,7 +8449,7 @@ const Z2 = (m) => {
|
|
|
8440
8449
|
s = $[a];
|
|
8441
8450
|
var u = j(d, s);
|
|
8442
8451
|
if (R(u, 23)) {
|
|
8443
|
-
if (t.search(
|
|
8452
|
+
if (t.search(g(u, 23)) == 0) {
|
|
8444
8453
|
d = s;
|
|
8445
8454
|
break d;
|
|
8446
8455
|
}
|
|
@@ -8458,17 +8467,17 @@ const Z2 = (m) => {
|
|
|
8458
8467
|
}
|
|
8459
8468
|
function K1(d, t) {
|
|
8460
8469
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8461
|
-
return
|
|
8470
|
+
return S(d, 10);
|
|
8462
8471
|
}
|
|
8463
8472
|
function l1(d, t, $, s) {
|
|
8464
|
-
var r = u1($, s), a = K(r, 9) == 0 ? P(
|
|
8465
|
-
if (r = P(r, 10), s == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? P(
|
|
8473
|
+
var r = u1($, s), a = K(r, 9) == 0 ? P(g($, 1), 9) : P(r, 9);
|
|
8474
|
+
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()));
|
|
8466
8475
|
else return l1(d, t, $, 1);
|
|
8467
8476
|
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));
|
|
8468
8477
|
}
|
|
8469
8478
|
function h1(d, t, $) {
|
|
8470
8479
|
var s = t1(t);
|
|
8471
|
-
return t =
|
|
8480
|
+
return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
|
|
8472
8481
|
}
|
|
8473
8482
|
function H1(d, t) {
|
|
8474
8483
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
@@ -8477,9 +8486,9 @@ const Z2 = (m) => {
|
|
|
8477
8486
|
}
|
|
8478
8487
|
function j1(d, t, $, s, r, a) {
|
|
8479
8488
|
if (t.length == 0) return 0;
|
|
8480
|
-
t = new
|
|
8489
|
+
t = new T(t);
|
|
8481
8490
|
var u;
|
|
8482
|
-
$ != null && (u =
|
|
8491
|
+
$ != null && (u = g($, 11)), u == null && (u = "NonMatch");
|
|
8483
8492
|
var c = t.toString();
|
|
8484
8493
|
if (c.length == 0) u = 20;
|
|
8485
8494
|
else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)), u = 1;
|
|
@@ -8496,16 +8505,16 @@ const Z2 = (m) => {
|
|
|
8496
8505
|
if (d = H1(t, s), d != 0) return E(a, 1, d), d;
|
|
8497
8506
|
throw Error("Invalid country calling code");
|
|
8498
8507
|
}
|
|
8499
|
-
return $ != null && (u =
|
|
8508
|
+
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);
|
|
8500
8509
|
}
|
|
8501
8510
|
function W1(d, t, $) {
|
|
8502
|
-
var s = d.toString(), r = s.length, a =
|
|
8511
|
+
var s = d.toString(), r = s.length, a = g(t, 15);
|
|
8503
8512
|
if (r != 0 && a != null && a.length != 0) {
|
|
8504
8513
|
var u = new RegExp("^(?:" + a + ")");
|
|
8505
8514
|
if (r = u.exec(s)) {
|
|
8506
|
-
a = new RegExp(
|
|
8515
|
+
a = new RegExp(S(g(t, 1), 2));
|
|
8507
8516
|
var c = U(a, s), y = r.length - 1;
|
|
8508
|
-
t =
|
|
8517
|
+
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)));
|
|
8509
8518
|
}
|
|
8510
8519
|
}
|
|
8511
8520
|
}
|
|
@@ -8516,7 +8525,7 @@ const Z2 = (m) => {
|
|
|
8516
8525
|
function z1(d, t, $, s) {
|
|
8517
8526
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8518
8527
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8519
|
-
var r = new
|
|
8528
|
+
var r = new T(), a = t.indexOf(";phone-context=");
|
|
8520
8529
|
if (a === -1) a = null;
|
|
8521
8530
|
else if (a += 15, a >= t.length) a = "";
|
|
8522
8531
|
else {
|
|
@@ -8524,7 +8533,7 @@ const Z2 = (m) => {
|
|
|
8524
8533
|
a = u !== -1 ? t.substring(a, u) : t.substring(a);
|
|
8525
8534
|
}
|
|
8526
8535
|
var c = a;
|
|
8527
|
-
if (c == null ? u = !0 : c.length === 0 ? u = !1 : (u =
|
|
8536
|
+
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");
|
|
8528
8537
|
if (a = r.toString(), !(a1($) || a != null && 0 < a.length && Q.test(a))) throw Error("Invalid country calling code");
|
|
8529
8538
|
a = new H(), s && E(a, 5, t);
|
|
8530
8539
|
d: {
|
|
@@ -8537,7 +8546,7 @@ const Z2 = (m) => {
|
|
|
8537
8546
|
}
|
|
8538
8547
|
t = "";
|
|
8539
8548
|
}
|
|
8540
|
-
0 < t.length && E(a, 3, t), u = j(d, $), t = new
|
|
8549
|
+
0 < t.length && E(a, 3, t), u = j(d, $), t = new T(), c = 0, y = r.toString();
|
|
8541
8550
|
try {
|
|
8542
8551
|
c = j1(d, y, u, t, s, a);
|
|
8543
8552
|
} catch (I1) {
|
|
@@ -8545,11 +8554,11 @@ const Z2 = (m) => {
|
|
|
8545
8554
|
if (y = y.replace(Q, ""), c = j1(d, y, u, t, s, a), c == 0) throw I1;
|
|
8546
8555
|
} else throw I1;
|
|
8547
8556
|
}
|
|
8548
|
-
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c =
|
|
8557
|
+
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c = S(u, 10), E(
|
|
8549
8558
|
a,
|
|
8550
8559
|
1,
|
|
8551
8560
|
c
|
|
8552
|
-
)) : s && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new
|
|
8561
|
+
)) : 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");
|
|
8553
8562
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8554
8563
|
if (1 < s.length && s.charAt(0) == "0") {
|
|
8555
8564
|
for (E(a, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
|
|
@@ -8560,8 +8569,8 @@ const Z2 = (m) => {
|
|
|
8560
8569
|
function U(d, t) {
|
|
8561
8570
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
8562
8571
|
}
|
|
8563
|
-
function
|
|
8564
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8572
|
+
function T2(d) {
|
|
8573
|
+
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);
|
|
8565
8574
|
}
|
|
8566
8575
|
var Z1 = new z();
|
|
8567
8576
|
E(Z1, 11, "NA");
|
|
@@ -8572,21 +8581,21 @@ const Z2 = (m) => {
|
|
|
8572
8581
|
}
|
|
8573
8582
|
function q1(d) {
|
|
8574
8583
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8575
|
-
var s = d.j[$], r =
|
|
8584
|
+
var s = d.j[$], r = S(s, 1);
|
|
8576
8585
|
if (d.da == r) return !1;
|
|
8577
|
-
var a = d, u = s, c =
|
|
8586
|
+
var a = d, u = s, c = S(u, 1);
|
|
8578
8587
|
B(a.v);
|
|
8579
8588
|
var y = a;
|
|
8580
|
-
u =
|
|
8589
|
+
u = S(u, 2);
|
|
8581
8590
|
var V = "999999999999999".match(c)[0];
|
|
8582
|
-
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(
|
|
8591
|
+
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;
|
|
8583
8592
|
}
|
|
8584
8593
|
return d.u = !1;
|
|
8585
8594
|
}
|
|
8586
8595
|
function X1(d, t) {
|
|
8587
8596
|
for (var $ = [], s = t.length - 3, r = d.j.length, a = 0; a < r; ++a) {
|
|
8588
8597
|
var u = d.j[a];
|
|
8589
|
-
K(u, 3) == 0 ? $.push(d.j[a]) : (u =
|
|
8598
|
+
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]));
|
|
8590
8599
|
}
|
|
8591
8600
|
d.j = $;
|
|
8592
8601
|
}
|
|
@@ -8618,8 +8627,8 @@ const Z2 = (m) => {
|
|
|
8618
8627
|
}
|
|
8619
8628
|
function d2(d) {
|
|
8620
8629
|
for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
|
|
8621
|
-
var r = d.j[s], a =
|
|
8622
|
-
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(
|
|
8630
|
+
var r = d.j[s], a = S(r, 1);
|
|
8631
|
+
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;
|
|
8623
8632
|
}
|
|
8624
8633
|
return "";
|
|
8625
8634
|
}
|
|
@@ -8632,7 +8641,7 @@ const Z2 = (m) => {
|
|
|
8632
8641
|
if (3 <= t.length) {
|
|
8633
8642
|
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) {
|
|
8634
8643
|
var a = $[r];
|
|
8635
|
-
0 < d.o.length && G1(
|
|
8644
|
+
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);
|
|
8636
8645
|
}
|
|
8637
8646
|
return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
|
|
8638
8647
|
}
|
|
@@ -8648,17 +8657,17 @@ const Z2 = (m) => {
|
|
|
8648
8657
|
}
|
|
8649
8658
|
function e2(d) {
|
|
8650
8659
|
var t = d.g.toString(), $ = 0;
|
|
8651
|
-
if (
|
|
8660
|
+
if (g(d.l, 10) != 1) var s = !1;
|
|
8652
8661
|
else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
|
|
8653
|
-
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" +
|
|
8662
|
+
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, $);
|
|
8654
8663
|
}
|
|
8655
8664
|
function $2(d) {
|
|
8656
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8665
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
8657
8666
|
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;
|
|
8658
8667
|
}
|
|
8659
8668
|
function i2(d) {
|
|
8660
8669
|
if (d.g.h.length == 0) return !1;
|
|
8661
|
-
var t = new
|
|
8670
|
+
var t = new T(), $ = H1(d.g, t);
|
|
8662
8671
|
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);
|
|
8663
8672
|
}
|
|
8664
8673
|
function n2(d, t) {
|
|
@@ -8675,7 +8684,7 @@ const Z2 = (m) => {
|
|
|
8675
8684
|
}, _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 };
|
|
8676
8685
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8677
8686
|
try {
|
|
8678
|
-
const $ = d.replace(/[^+0-9]/g, ""), s = new
|
|
8687
|
+
const $ = d.replace(/[^+0-9]/g, ""), s = new T2(t);
|
|
8679
8688
|
t = "";
|
|
8680
8689
|
for (let r = 0; r < $.length; r++) s.ja = M2(s, $.charAt(r)), t = s.ja;
|
|
8681
8690
|
return t;
|
|
@@ -8699,7 +8708,7 @@ const Z2 = (m) => {
|
|
|
8699
8708
|
var a = u1(j(r, d), $);
|
|
8700
8709
|
try {
|
|
8701
8710
|
if (R(a, 6)) {
|
|
8702
|
-
var u =
|
|
8711
|
+
var u = g(a, 6), c = z1(r, u, d, !1);
|
|
8703
8712
|
break d;
|
|
8704
8713
|
}
|
|
8705
8714
|
} catch {
|
|
@@ -8713,7 +8722,7 @@ const Z2 = (m) => {
|
|
|
8713
8722
|
}
|
|
8714
8723
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8715
8724
|
try {
|
|
8716
|
-
return
|
|
8725
|
+
return g(Z(M.g(), d, t), 3);
|
|
8717
8726
|
} catch {
|
|
8718
8727
|
return "";
|
|
8719
8728
|
}
|
|
@@ -8734,7 +8743,7 @@ const Z2 = (m) => {
|
|
|
8734
8743
|
}
|
|
8735
8744
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
|
|
8736
8745
|
try {
|
|
8737
|
-
const s = M.g(), r = Z(s, d, t), a =
|
|
8746
|
+
const s = M.g(), r = Z(s, d, t), a = A2(s, r);
|
|
8738
8747
|
if ($) {
|
|
8739
8748
|
const u = s2($).map((c) => _1[c]);
|
|
8740
8749
|
return a && u.includes(U1(s, r));
|
|
@@ -8757,7 +8766,7 @@ const Z2 = (m) => {
|
|
|
8757
8766
|
}
|
|
8758
8767
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8759
8768
|
try {
|
|
8760
|
-
return
|
|
8769
|
+
return g(Z(M.g(), d, t), 2).toString();
|
|
8761
8770
|
} catch {
|
|
8762
8771
|
return "";
|
|
8763
8772
|
}
|
|
@@ -8799,37 +8808,37 @@ const q2 = {
|
|
|
8799
8808
|
"changeErrorCode"
|
|
8800
8809
|
], ["update:modelValue"]),
|
|
8801
8810
|
setup(m, { expose: e, emit: i }) {
|
|
8802
|
-
const n = D2(m, "modelValue"), o = m, l = i,
|
|
8803
|
-
let
|
|
8804
|
-
_.value !==
|
|
8811
|
+
const n = D2(m, "modelValue"), o = m, l = i, f = v1(), h = v1(), _ = v1(!1), b = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, v = () => {
|
|
8812
|
+
let p = b();
|
|
8813
|
+
_.value !== p && (_.value = p, l("changeValidity", !!p), l(
|
|
8805
8814
|
"changeErrorCode",
|
|
8806
|
-
|
|
8815
|
+
p ? null : h.value.getValidationError()
|
|
8807
8816
|
));
|
|
8808
|
-
},
|
|
8809
|
-
var
|
|
8810
|
-
l("changeNumber", ((
|
|
8811
|
-
},
|
|
8812
|
-
var
|
|
8813
|
-
l("changeCountry", ((
|
|
8817
|
+
}, w = () => {
|
|
8818
|
+
var p;
|
|
8819
|
+
l("changeNumber", ((p = h.value) == null ? void 0 : p.getNumber()) ?? ""), v();
|
|
8820
|
+
}, A = () => {
|
|
8821
|
+
var p;
|
|
8822
|
+
l("changeCountry", ((p = h.value) == null ? void 0 : p.getSelectedCountryData().iso2) ?? ""), w(), v();
|
|
8814
8823
|
};
|
|
8815
8824
|
return P2(() => {
|
|
8816
|
-
|
|
8825
|
+
f.value && (h.value = C(f.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = b());
|
|
8817
8826
|
}), x2(
|
|
8818
8827
|
() => o.disabled,
|
|
8819
|
-
(
|
|
8828
|
+
(p) => {
|
|
8820
8829
|
var I;
|
|
8821
|
-
return (I = h.value) == null ? void 0 : I.setDisabled(
|
|
8830
|
+
return (I = h.value) == null ? void 0 : I.setDisabled(p);
|
|
8822
8831
|
}
|
|
8823
8832
|
), R2(() => {
|
|
8824
|
-
var
|
|
8825
|
-
return (
|
|
8826
|
-
}), e({ instance: h, input:
|
|
8833
|
+
var p;
|
|
8834
|
+
return (p = h.value) == null ? void 0 : p.destroy();
|
|
8835
|
+
}), e({ instance: h, input: f }), (p, I) => B2((O2(), k2("input", G2({
|
|
8827
8836
|
ref_key: "input",
|
|
8828
|
-
ref:
|
|
8837
|
+
ref: f,
|
|
8829
8838
|
"onUpdate:modelValue": I[0] || (I[0] = (O) => n.value = O),
|
|
8830
8839
|
type: "tel",
|
|
8831
|
-
onCountrychange:
|
|
8832
|
-
onInput:
|
|
8840
|
+
onCountrychange: A,
|
|
8841
|
+
onInput: w
|
|
8833
8842
|
}, m.inputProps), null, 16)), [
|
|
8834
8843
|
[
|
|
8835
8844
|
F2,
|