intl-tel-input 25.10.5 → 25.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +64 -53
- package/angular/build/IntlTelInputWithUtils.js +64 -53
- package/build/js/data.js +8 -8
- package/build/js/data.min.js +2 -2
- package/build/js/intlTelInput.js +65 -54
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +65 -54
- package/build/js/intlTelInputWithUtils.min.js +4 -4
- package/package.json +11 -6
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +64 -53
- package/react/build/IntlTelInput.js +64 -53
- package/react/build/IntlTelInputWithUtils.cjs +64 -53
- package/react/build/IntlTelInputWithUtils.js +64 -53
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +142 -130
- package/vue/build/IntlTelInputWithUtils.mjs +203 -191
|
@@ -1226,6 +1226,13 @@ const U2 = [
|
|
|
1226
1226
|
// Tuvalu
|
|
1227
1227
|
"688"
|
|
1228
1228
|
],
|
|
1229
|
+
[
|
|
1230
|
+
"vi",
|
|
1231
|
+
// U.S. Virgin Islands
|
|
1232
|
+
"1",
|
|
1233
|
+
24,
|
|
1234
|
+
["340"]
|
|
1235
|
+
],
|
|
1229
1236
|
[
|
|
1230
1237
|
"ug",
|
|
1231
1238
|
// Uganda
|
|
@@ -1260,13 +1267,6 @@ const U2 = [
|
|
|
1260
1267
|
// Uruguay
|
|
1261
1268
|
"598"
|
|
1262
1269
|
],
|
|
1263
|
-
[
|
|
1264
|
-
"vi",
|
|
1265
|
-
// U.S. Virgin Islands
|
|
1266
|
-
"1",
|
|
1267
|
-
24,
|
|
1268
|
-
["340"]
|
|
1269
|
-
],
|
|
1270
1270
|
[
|
|
1271
1271
|
"uz",
|
|
1272
1272
|
// Uzbekistan
|
|
@@ -1743,6 +1743,8 @@ class p1 {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
//* Add a dial code to this.dialCodeToIso2Map.
|
|
1745
1745
|
_addToDialCodeMap(e, i, n) {
|
|
1746
|
+
if (!e || !i)
|
|
1747
|
+
return;
|
|
1746
1748
|
i.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = i.length), this.dialCodeToIso2Map.hasOwnProperty(i) || (this.dialCodeToIso2Map[i] = []);
|
|
1747
1749
|
const o = this.dialCodeToIso2Map[i];
|
|
1748
1750
|
if (o.includes(e))
|
|
@@ -1782,6 +1784,9 @@ class p1 {
|
|
|
1782
1784
|
this.dialCodes = /* @__PURE__ */ new Set(), this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
|
|
1783
1785
|
for (const e of this.countries)
|
|
1784
1786
|
this.dialCodes.has(e.dialCode) || this.dialCodes.add(e.dialCode), this._addToDialCodeMap(e.iso2, e.dialCode, e.priority);
|
|
1787
|
+
(this.options.onlyCountries.length || this.options.excludeCountries.length) && this.dialCodes.forEach((e) => {
|
|
1788
|
+
this.dialCodeToIso2Map[e] = this.dialCodeToIso2Map[e].filter(Boolean);
|
|
1789
|
+
});
|
|
1785
1790
|
for (const e of this.countries)
|
|
1786
1791
|
if (e.areaCodes) {
|
|
1787
1792
|
const i = this.dialCodeToIso2Map[e.dialCode][0];
|
|
@@ -1796,7 +1801,7 @@ class p1 {
|
|
|
1796
1801
|
}
|
|
1797
1802
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1798
1803
|
_generateMarkup() {
|
|
1799
|
-
var
|
|
1804
|
+
var S, M, O;
|
|
1800
1805
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1801
1806
|
const {
|
|
1802
1807
|
allowDropdown: e,
|
|
@@ -1807,21 +1812,21 @@ class p1 {
|
|
|
1807
1812
|
dropdownContainer: f,
|
|
1808
1813
|
fixDropdownWidth: h,
|
|
1809
1814
|
useFullscreenPopup: _,
|
|
1810
|
-
countrySearch:
|
|
1811
|
-
i18n:
|
|
1812
|
-
} = this.options,
|
|
1815
|
+
countrySearch: v,
|
|
1816
|
+
i18n: w
|
|
1817
|
+
} = this.options, g = p1._buildClassNames({
|
|
1813
1818
|
iti: !0,
|
|
1814
1819
|
"iti--allow-dropdown": e,
|
|
1815
1820
|
"iti--show-flags": n,
|
|
1816
1821
|
"iti--inline-dropdown": !_,
|
|
1817
1822
|
[o]: !!o
|
|
1818
|
-
}),
|
|
1819
|
-
if ((
|
|
1823
|
+
}), I = N("div", { class: g });
|
|
1824
|
+
if ((S = this.telInput.parentNode) == null || S.insertBefore(I, this.telInput), e || n || i) {
|
|
1820
1825
|
this.countryContainer = N(
|
|
1821
1826
|
"div",
|
|
1822
1827
|
// visibly hidden until we measure it's width to set the input padding correctly
|
|
1823
1828
|
{ class: "iti__country-container iti__v-hide" },
|
|
1824
|
-
|
|
1829
|
+
I
|
|
1825
1830
|
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = N(
|
|
1826
1831
|
"button",
|
|
1827
1832
|
{
|
|
@@ -1862,7 +1867,7 @@ class p1 {
|
|
|
1862
1867
|
class: `iti__dropdown-content iti__hide ${F}`,
|
|
1863
1868
|
role: "dialog",
|
|
1864
1869
|
"aria-modal": "true"
|
|
1865
|
-
}),
|
|
1870
|
+
}), v) {
|
|
1866
1871
|
const D = N(
|
|
1867
1872
|
"div",
|
|
1868
1873
|
{ class: "iti__search-input-wrapper" },
|
|
@@ -1886,11 +1891,11 @@ class p1 {
|
|
|
1886
1891
|
// Chrome says inputs need either a name or an id
|
|
1887
1892
|
type: "search",
|
|
1888
1893
|
class: "iti__search-input",
|
|
1889
|
-
placeholder:
|
|
1894
|
+
placeholder: w.searchPlaceholder,
|
|
1890
1895
|
// role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
|
|
1891
1896
|
role: "combobox",
|
|
1892
1897
|
"aria-expanded": "true",
|
|
1893
|
-
"aria-label":
|
|
1898
|
+
"aria-label": w.searchPlaceholder,
|
|
1894
1899
|
"aria-controls": `iti-${this.id}__country-listbox`,
|
|
1895
1900
|
"aria-autocomplete": "list",
|
|
1896
1901
|
autocomplete: "off"
|
|
@@ -1901,7 +1906,7 @@ class p1 {
|
|
|
1901
1906
|
{
|
|
1902
1907
|
type: "button",
|
|
1903
1908
|
class: "iti__search-clear iti__hide",
|
|
1904
|
-
"aria-label":
|
|
1909
|
+
"aria-label": w.clearSearchAriaLabel,
|
|
1905
1910
|
tabindex: "-1"
|
|
1906
1911
|
},
|
|
1907
1912
|
D
|
|
@@ -1926,7 +1931,7 @@ class p1 {
|
|
|
1926
1931
|
// all a11y messaging happens in this.searchResultsA11yText
|
|
1927
1932
|
},
|
|
1928
1933
|
this.dropdownContent
|
|
1929
|
-
), this.searchNoResults.textContent =
|
|
1934
|
+
), this.searchNoResults.textContent = w.zeroSearchResults;
|
|
1930
1935
|
}
|
|
1931
1936
|
if (this.countryList = N(
|
|
1932
1937
|
"ul",
|
|
@@ -1934,10 +1939,10 @@ class p1 {
|
|
|
1934
1939
|
class: "iti__country-list",
|
|
1935
1940
|
id: `iti-${this.id}__country-listbox`,
|
|
1936
1941
|
role: "listbox",
|
|
1937
|
-
"aria-label":
|
|
1942
|
+
"aria-label": w.countryListAriaLabel
|
|
1938
1943
|
},
|
|
1939
1944
|
this.dropdownContent
|
|
1940
|
-
), this._appendListItems(),
|
|
1945
|
+
), this._appendListItems(), v && this._updateSearchResultsA11yText(), f) {
|
|
1941
1946
|
const D = p1._buildClassNames({
|
|
1942
1947
|
iti: !0,
|
|
1943
1948
|
"iti--container": !0,
|
|
@@ -1950,21 +1955,21 @@ class p1 {
|
|
|
1950
1955
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1951
1956
|
}
|
|
1952
1957
|
}
|
|
1953
|
-
if (
|
|
1958
|
+
if (I.appendChild(this.telInput), this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide")), l) {
|
|
1954
1959
|
const G = this.telInput.getAttribute("name") || "", F = l(G);
|
|
1955
1960
|
if (F.phone) {
|
|
1956
|
-
const D = (
|
|
1961
|
+
const D = (M = this.telInput.form) == null ? void 0 : M.querySelector(`input[name="${F.phone}"]`);
|
|
1957
1962
|
D ? this.hiddenInput = D : (this.hiddenInput = N("input", {
|
|
1958
1963
|
type: "hidden",
|
|
1959
1964
|
name: F.phone
|
|
1960
|
-
}),
|
|
1965
|
+
}), I.appendChild(this.hiddenInput));
|
|
1961
1966
|
}
|
|
1962
1967
|
if (F.country) {
|
|
1963
1968
|
const D = (O = this.telInput.form) == null ? void 0 : O.querySelector(`input[name="${F.country}"]`);
|
|
1964
1969
|
D ? this.hiddenInputCountry = D : (this.hiddenInputCountry = N("input", {
|
|
1965
1970
|
type: "hidden",
|
|
1966
1971
|
name: F.country
|
|
1967
|
-
}),
|
|
1972
|
+
}), I.appendChild(this.hiddenInputCountry));
|
|
1968
1973
|
}
|
|
1969
1974
|
}
|
|
1970
1975
|
}
|
|
@@ -1993,12 +1998,12 @@ class p1 {
|
|
|
1993
1998
|
//* 1. Extracting a dial code from the given number
|
|
1994
1999
|
//* 2. Using explicit initialCountry
|
|
1995
2000
|
_setInitialState(e = !1) {
|
|
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:
|
|
2001
|
+
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: v } = this.options, w = _ === "auto" && v;
|
|
1997
2002
|
if (f && !h)
|
|
1998
2003
|
this._updateCountryFromNumber(l);
|
|
1999
|
-
else if (!
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2004
|
+
else if (!w || e) {
|
|
2005
|
+
const g = _ ? _.toLowerCase() : "";
|
|
2006
|
+
g && this._getCountryData(g, !0) ? this._setCountry(g) : f && h ? this._setCountry("us") : this._setCountry();
|
|
2002
2007
|
}
|
|
2003
2008
|
l && this._updateValFromNumber(l);
|
|
2004
2009
|
}
|
|
@@ -2053,7 +2058,7 @@ class p1 {
|
|
|
2053
2058
|
));
|
|
2054
2059
|
}
|
|
2055
2060
|
_openDropdownWithPlus() {
|
|
2056
|
-
this._openDropdown(), this.searchInput.value = "+", this._filterCountries(""
|
|
2061
|
+
this._openDropdown(), this.searchInput.value = "+", this._filterCountries("");
|
|
2057
2062
|
}
|
|
2058
2063
|
//* Initialize the tel input listeners.
|
|
2059
2064
|
_initTelInputListeners() {
|
|
@@ -2061,16 +2066,16 @@ class p1 {
|
|
|
2061
2066
|
let f = !1;
|
|
2062
2067
|
new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (h) => {
|
|
2063
2068
|
if (this.isAndroid && (h == null ? void 0 : h.data) === "+" && n && o && l) {
|
|
2064
|
-
const
|
|
2065
|
-
this.telInput.value =
|
|
2069
|
+
const g = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, g - 1), S = this.telInput.value.substring(g);
|
|
2070
|
+
this.telInput.value = I + S, this._openDropdownWithPlus();
|
|
2066
2071
|
return;
|
|
2067
2072
|
}
|
|
2068
2073
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
2069
|
-
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data),
|
|
2070
|
-
_ ||
|
|
2071
|
-
const
|
|
2072
|
-
if (i && !f && !
|
|
2073
|
-
const
|
|
2074
|
+
const _ = (h == null ? void 0 : h.data) && /[^+0-9]/.test(h.data), v = (h == null ? void 0 : h.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2075
|
+
_ || v && !e ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
|
|
2076
|
+
const w = (h == null ? void 0 : h.detail) && h.detail.isSetNumber;
|
|
2077
|
+
if (i && !f && !w) {
|
|
2078
|
+
const g = this.telInput.selectionStart || 0, S = this.telInput.value.substring(0, g).replace(/[^+0-9]/g, "").length, M = (h == null ? void 0 : h.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), G = z2(S, O, g, M);
|
|
2074
2079
|
this.telInput.value = O, this.telInput.setSelectionRange(G, G);
|
|
2075
2080
|
}
|
|
2076
2081
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || n) && (this._handleKeydownEvent = (h) => {
|
|
@@ -2080,8 +2085,8 @@ class p1 {
|
|
|
2080
2085
|
return;
|
|
2081
2086
|
}
|
|
2082
2087
|
if (e) {
|
|
2083
|
-
const _ = this.telInput.value,
|
|
2084
|
-
(!
|
|
2088
|
+
const _ = this.telInput.value, w = !(_.charAt(0) === "+") && this.telInput.selectionStart === 0 && h.key === "+", g = /^[0-9]$/.test(h.key), I = n ? g : w || g, S = _.slice(0, this.telInput.selectionStart) + h.key + _.slice(this.telInput.selectionEnd), M = this._getFullNumber(S), O = C.utils.getCoreNumber(M, this.selectedCountryData.iso2), G = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength, D = this._getNewCountryFromNumber(M) !== null;
|
|
2089
|
+
(!I || G && !D && !w) && h.preventDefault();
|
|
2085
2090
|
}
|
|
2086
2091
|
}
|
|
2087
2092
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2145,7 +2150,7 @@ class p1 {
|
|
|
2145
2150
|
}, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
|
|
2146
2151
|
const n = () => {
|
|
2147
2152
|
const l = this.searchInput.value.trim();
|
|
2148
|
-
|
|
2153
|
+
this._filterCountries(l), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
|
|
2149
2154
|
};
|
|
2150
2155
|
let o = null;
|
|
2151
2156
|
this._handleSearchChange = () => {
|
|
@@ -2167,25 +2172,31 @@ class p1 {
|
|
|
2167
2172
|
}
|
|
2168
2173
|
}
|
|
2169
2174
|
//* Country search enabled: Filter the countries according to the search query.
|
|
2170
|
-
_filterCountries(e
|
|
2171
|
-
let
|
|
2175
|
+
_filterCountries(e) {
|
|
2176
|
+
let i = !0;
|
|
2172
2177
|
this.countryList.innerHTML = "";
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2178
|
+
const n = o2(e);
|
|
2179
|
+
let o;
|
|
2180
|
+
if (e === "")
|
|
2181
|
+
o = this.countries;
|
|
2182
|
+
else {
|
|
2183
|
+
const l = [], f = [], h = [], _ = [], v = [], w = [];
|
|
2184
|
+
for (const g of this.countries)
|
|
2185
|
+
g.iso2 === n ? l.push(g) : g.normalisedName.startsWith(n) ? f.push(g) : g.normalisedName.includes(n) ? h.push(g) : n === g.dialCode || n === g.dialCodePlus ? _.push(g) : g.dialCodePlus.includes(n) ? v.push(g) : g.initials.includes(n) && w.push(g);
|
|
2186
|
+
o = [
|
|
2187
|
+
...l.sort((g, I) => g.priority - I.priority),
|
|
2188
|
+
...f.sort((g, I) => g.priority - I.priority),
|
|
2189
|
+
...h.sort((g, I) => g.priority - I.priority),
|
|
2190
|
+
..._.sort((g, I) => g.priority - I.priority),
|
|
2191
|
+
...v.sort((g, I) => g.priority - I.priority),
|
|
2192
|
+
...w.sort((g, I) => g.priority - I.priority)
|
|
2193
|
+
];
|
|
2187
2194
|
}
|
|
2188
|
-
|
|
2195
|
+
for (const l of o) {
|
|
2196
|
+
const f = l.nodeById[this.id];
|
|
2197
|
+
f && (this.countryList.appendChild(f), i && (this._highlightListItem(f, !1), i = !1));
|
|
2198
|
+
}
|
|
2199
|
+
i ? (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();
|
|
2189
2200
|
}
|
|
2190
2201
|
//* Update search results text (for a11y).
|
|
2191
2202
|
_updateSearchResultsA11yText() {
|
|
@@ -2240,19 +2251,20 @@ class p1 {
|
|
|
2240
2251
|
n = this._ensureHasDialCode(n);
|
|
2241
2252
|
const f = this._getDialCode(n, !0), h = f1(n);
|
|
2242
2253
|
if (f) {
|
|
2243
|
-
const _ = f1(f),
|
|
2244
|
-
if (
|
|
2254
|
+
const _ = f1(f), v = this.dialCodeToIso2Map[_];
|
|
2255
|
+
if (v.length === 1)
|
|
2256
|
+
return v[0] === o ? null : v[0];
|
|
2257
|
+
if (!o && this.defaultCountry && v.includes(this.defaultCountry))
|
|
2245
2258
|
return this.defaultCountry;
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
}
|
|
2259
|
+
if (l === "1" && a2(h))
|
|
2260
|
+
return null;
|
|
2261
|
+
const g = this.selectedCountryData.areaCodes && h.length > _.length;
|
|
2262
|
+
if (!(o && v.includes(o) && !g))
|
|
2263
|
+
return v[0];
|
|
2252
2264
|
} else {
|
|
2253
2265
|
if (n.charAt(0) === "+" && h.length)
|
|
2254
2266
|
return "";
|
|
2255
|
-
if ((!n || n === "+") && !
|
|
2267
|
+
if ((!n || n === "+") && !o)
|
|
2256
2268
|
return this.defaultCountry;
|
|
2257
2269
|
}
|
|
2258
2270
|
return null;
|
|
@@ -2284,8 +2296,8 @@ class p1 {
|
|
|
2284
2296
|
const f = e && n ? `iti__flag iti__${e}` : "iti__flag iti__globe";
|
|
2285
2297
|
let h, _;
|
|
2286
2298
|
if (e) {
|
|
2287
|
-
const { name:
|
|
2288
|
-
_ =
|
|
2299
|
+
const { name: v, dialCode: w } = this.selectedCountryData;
|
|
2300
|
+
_ = v, h = o.selectedCountryAriaLabel.replace("${countryName}", v).replace("${dialCode}", `+${w}`);
|
|
2289
2301
|
} else
|
|
2290
2302
|
_ = o.noCountrySelected, h = o.noCountrySelected;
|
|
2291
2303
|
this.selectedCountryInner.className = f, this.selectedCountry.setAttribute("title", _), this.selectedCountry.setAttribute("aria-label", h);
|
|
@@ -2382,12 +2394,12 @@ class p1 {
|
|
|
2382
2394
|
}
|
|
2383
2395
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2384
2396
|
_scrollTo(e) {
|
|
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,
|
|
2397
|
+
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, v = _ + h, w = _ - l + i.scrollTop;
|
|
2386
2398
|
if (_ < l)
|
|
2387
|
-
i.scrollTop =
|
|
2388
|
-
else if (
|
|
2389
|
-
const
|
|
2390
|
-
i.scrollTop =
|
|
2399
|
+
i.scrollTop = w;
|
|
2400
|
+
else if (v > f) {
|
|
2401
|
+
const g = o - h;
|
|
2402
|
+
i.scrollTop = w - g;
|
|
2391
2403
|
}
|
|
2392
2404
|
}
|
|
2393
2405
|
//* Replace any existing dial code with the new one
|
|
@@ -2609,7 +2621,7 @@ const Z2 = (m) => {
|
|
|
2609
2621
|
attachUtils: Z2,
|
|
2610
2622
|
startedLoadingUtilsScript: !1,
|
|
2611
2623
|
startedLoadingAutoCountry: !1,
|
|
2612
|
-
version: "25.10.
|
|
2624
|
+
version: "25.10.6"
|
|
2613
2625
|
}
|
|
2614
2626
|
);
|
|
2615
2627
|
(function() {
|
|
@@ -2655,7 +2667,7 @@ const Z2 = (m) => {
|
|
|
2655
2667
|
}
|
|
2656
2668
|
new h();
|
|
2657
2669
|
const _ = {};
|
|
2658
|
-
class
|
|
2670
|
+
class v {
|
|
2659
2671
|
constructor() {
|
|
2660
2672
|
if (_ !== _) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
2661
2673
|
}
|
|
@@ -2663,33 +2675,33 @@ const Z2 = (m) => {
|
|
|
2663
2675
|
return "";
|
|
2664
2676
|
}
|
|
2665
2677
|
}
|
|
2666
|
-
new
|
|
2667
|
-
const
|
|
2668
|
-
class
|
|
2678
|
+
new v();
|
|
2679
|
+
const w = {};
|
|
2680
|
+
class g {
|
|
2669
2681
|
constructor() {
|
|
2670
2682
|
var t = m.trustedTypes && m.trustedTypes.emptyHTML || "";
|
|
2671
|
-
if (
|
|
2683
|
+
if (w !== w) throw Error("SafeHtml is not meant to be built directly");
|
|
2672
2684
|
this.g = t;
|
|
2673
2685
|
}
|
|
2674
2686
|
toString() {
|
|
2675
2687
|
return this.g.toString();
|
|
2676
2688
|
}
|
|
2677
2689
|
}
|
|
2678
|
-
new
|
|
2679
|
-
function
|
|
2690
|
+
new g();
|
|
2691
|
+
function I(d, t) {
|
|
2680
2692
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2681
2693
|
case O:
|
|
2682
2694
|
case G:
|
|
2683
2695
|
case F:
|
|
2684
2696
|
case D:
|
|
2685
2697
|
case i1:
|
|
2686
|
-
case
|
|
2687
|
-
case
|
|
2698
|
+
case M:
|
|
2699
|
+
case S:
|
|
2688
2700
|
this.o = !0;
|
|
2689
2701
|
}
|
|
2690
2702
|
this.j = t.defaultValue;
|
|
2691
2703
|
}
|
|
2692
|
-
var
|
|
2704
|
+
var S = 1, M = 2, O = 3, G = 4, F = 6, D = 16, i1 = 18;
|
|
2693
2705
|
function c2(d, t) {
|
|
2694
2706
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2695
2707
|
var $ = t[d];
|
|
@@ -2707,9 +2719,9 @@ const Z2 = (m) => {
|
|
|
2707
2719
|
x.prototype.has = function(d) {
|
|
2708
2720
|
return R(this, d.g);
|
|
2709
2721
|
}, x.prototype.get = function(d, t) {
|
|
2710
|
-
return
|
|
2722
|
+
return p(this, d.g, t);
|
|
2711
2723
|
}, x.prototype.set = function(d, t) {
|
|
2712
|
-
|
|
2724
|
+
A(this, d.g, t);
|
|
2713
2725
|
}, x.prototype.add = function(d, t) {
|
|
2714
2726
|
b1(this, d.g, t);
|
|
2715
2727
|
};
|
|
@@ -2722,7 +2734,7 @@ const Z2 = (m) => {
|
|
|
2722
2734
|
if (r.l) {
|
|
2723
2735
|
r = P(t, a);
|
|
2724
2736
|
for (var c = 0; c < r.length; c++) b1(d, a, u ? r[c].clone() : r[c]);
|
|
2725
|
-
} else r = n1(t, a), u ? (u = n1(d, a)) ? S1(u, r) :
|
|
2737
|
+
} else r = n1(t, a), u ? (u = n1(d, a)) ? S1(u, r) : A(d, a, r.clone()) : A(d, a, r);
|
|
2726
2738
|
}
|
|
2727
2739
|
}
|
|
2728
2740
|
}
|
|
@@ -2749,12 +2761,12 @@ const Z2 = (m) => {
|
|
|
2749
2761
|
}
|
|
2750
2762
|
return $;
|
|
2751
2763
|
}
|
|
2752
|
-
function
|
|
2764
|
+
function p(d, t, $) {
|
|
2753
2765
|
var s = n1(d, t);
|
|
2754
2766
|
return d.j[t].l ? s[$ || 0] : s;
|
|
2755
2767
|
}
|
|
2756
|
-
function
|
|
2757
|
-
if (R(d, t)) d =
|
|
2768
|
+
function b(d, t) {
|
|
2769
|
+
if (R(d, t)) d = p(d, t);
|
|
2758
2770
|
else d: {
|
|
2759
2771
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2760
2772
|
else if (t === Number) d.j = 0;
|
|
@@ -2773,7 +2785,7 @@ const Z2 = (m) => {
|
|
|
2773
2785
|
function K(d, t) {
|
|
2774
2786
|
return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
|
|
2775
2787
|
}
|
|
2776
|
-
function
|
|
2788
|
+
function A(d, t, $) {
|
|
2777
2789
|
d.h[t] = $, d.g && (d.g[t] = $);
|
|
2778
2790
|
}
|
|
2779
2791
|
function b1(d, t, $) {
|
|
@@ -2781,7 +2793,7 @@ const Z2 = (m) => {
|
|
|
2781
2793
|
}
|
|
2782
2794
|
function s1(d, t) {
|
|
2783
2795
|
var $ = [], s;
|
|
2784
|
-
for (s in t) s != 0 && $.push(new
|
|
2796
|
+
for (s in t) s != 0 && $.push(new I(s, t[s]));
|
|
2785
2797
|
return new c2(d, $);
|
|
2786
2798
|
}
|
|
2787
2799
|
function r1() {
|
|
@@ -2834,21 +2846,21 @@ const Z2 = (m) => {
|
|
|
2834
2846
|
x.call(this);
|
|
2835
2847
|
}
|
|
2836
2848
|
i(L, x);
|
|
2837
|
-
var
|
|
2849
|
+
var T1 = null;
|
|
2838
2850
|
function z() {
|
|
2839
2851
|
x.call(this);
|
|
2840
2852
|
}
|
|
2841
2853
|
i(z, x);
|
|
2842
|
-
var
|
|
2854
|
+
var A1 = null;
|
|
2843
2855
|
W.prototype.m = function() {
|
|
2844
2856
|
var d = N1;
|
|
2845
2857
|
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;
|
|
2846
2858
|
}, W.m = W.prototype.m, L.prototype.m = function() {
|
|
2847
|
-
var d = A1;
|
|
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
2859
|
var d = T1;
|
|
2851
|
-
return d || (T1 = d = s1(
|
|
2860
|
+
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;
|
|
2861
|
+
}, L.m = L.prototype.m, z.prototype.m = function() {
|
|
2862
|
+
var d = A1;
|
|
2863
|
+
return d || (A1 = d = s1(z, {
|
|
2852
2864
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2853
2865
|
1: { name: "general_desc", i: 11, type: L },
|
|
2854
2866
|
2: { name: "fixed_line", i: 11, type: L },
|
|
@@ -8220,11 +8232,11 @@ const Z2 = (m) => {
|
|
|
8220
8232
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
8221
8233
|
979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
|
|
8222
8234
|
};
|
|
8223
|
-
function
|
|
8235
|
+
function E() {
|
|
8224
8236
|
this.g = {};
|
|
8225
8237
|
}
|
|
8226
|
-
|
|
8227
|
-
return
|
|
8238
|
+
E.h = void 0, E.g = function() {
|
|
8239
|
+
return E.h ? E.h : E.h = new E();
|
|
8228
8240
|
};
|
|
8229
8241
|
var C1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, g2 = {
|
|
8230
8242
|
0: "0",
|
|
@@ -8338,41 +8350,41 @@ const Z2 = (m) => {
|
|
|
8338
8350
|
function a1(d) {
|
|
8339
8351
|
return d != null && isNaN(d) && d.toUpperCase() in M1;
|
|
8340
8352
|
}
|
|
8341
|
-
|
|
8342
|
-
if (
|
|
8343
|
-
var $ =
|
|
8353
|
+
E.prototype.format = function(d, t) {
|
|
8354
|
+
if (p(d, 2) == 0 && R(d, 5)) {
|
|
8355
|
+
var $ = b(d, 5);
|
|
8344
8356
|
if (0 < $.length) return $;
|
|
8345
8357
|
}
|
|
8346
|
-
$ =
|
|
8358
|
+
$ = b(d, 1);
|
|
8347
8359
|
var s = t1(d);
|
|
8348
8360
|
if (t == 0) return F1($, 0, s, "");
|
|
8349
8361
|
if (!($ in X)) return s;
|
|
8350
8362
|
var r = d1(this, $, e1($));
|
|
8351
|
-
d = R(d, 3) &&
|
|
8363
|
+
d = R(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : R(r, 13) ? p(r, 13) + b(d, 3) : " ext. " + b(d, 3) : "";
|
|
8352
8364
|
d: {
|
|
8353
8365
|
r = P(r, 20).length == 0 || t == 2 ? P(r, 19) : P(r, 20);
|
|
8354
8366
|
for (var a, u = r.length, c = 0; c < u; ++c) {
|
|
8355
8367
|
a = r[c];
|
|
8356
8368
|
var y = K(a, 3);
|
|
8357
|
-
if ((y == 0 || s.search(
|
|
8369
|
+
if ((y == 0 || s.search(p(a, 3, y - 1)) == 0) && (y = new RegExp(p(a, 1)), U(y, s))) {
|
|
8358
8370
|
r = a;
|
|
8359
8371
|
break d;
|
|
8360
8372
|
}
|
|
8361
8373
|
}
|
|
8362
8374
|
r = null;
|
|
8363
8375
|
}
|
|
8364
|
-
return r != null && (u = r, r =
|
|
8376
|
+
return r != null && (u = r, r = b(u, 2), a = new RegExp(p(u, 1)), b(
|
|
8365
8377
|
u,
|
|
8366
8378
|
5
|
|
8367
|
-
), u =
|
|
8379
|
+
), u = b(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);
|
|
8368
8380
|
};
|
|
8369
8381
|
function d1(d, t, $) {
|
|
8370
8382
|
return $ == "001" ? j(d, "" + t) : j(d, $);
|
|
8371
8383
|
}
|
|
8372
8384
|
function t1(d) {
|
|
8373
8385
|
if (!R(d, 2)) return "";
|
|
8374
|
-
var t = "" +
|
|
8375
|
-
return R(d, 4) &&
|
|
8386
|
+
var t = "" + p(d, 2);
|
|
8387
|
+
return R(d, 4) && p(d, 4) && 0 < b(d, 8) ? Array(b(d, 8) + 1).join("0") + t : t;
|
|
8376
8388
|
}
|
|
8377
8389
|
function F1(d, t, $, s) {
|
|
8378
8390
|
switch (t) {
|
|
@@ -8389,36 +8401,36 @@ const Z2 = (m) => {
|
|
|
8389
8401
|
function u1(d, t) {
|
|
8390
8402
|
switch (t) {
|
|
8391
8403
|
case 4:
|
|
8392
|
-
return
|
|
8404
|
+
return p(d, 5);
|
|
8393
8405
|
case 3:
|
|
8394
|
-
return
|
|
8406
|
+
return p(d, 4);
|
|
8395
8407
|
case 1:
|
|
8396
|
-
return
|
|
8408
|
+
return p(d, 3);
|
|
8397
8409
|
case 0:
|
|
8398
8410
|
case 2:
|
|
8399
|
-
return
|
|
8411
|
+
return p(d, 2);
|
|
8400
8412
|
case 5:
|
|
8401
|
-
return
|
|
8413
|
+
return p(d, 6);
|
|
8402
8414
|
case 6:
|
|
8403
|
-
return
|
|
8415
|
+
return p(d, 8);
|
|
8404
8416
|
case 7:
|
|
8405
|
-
return
|
|
8417
|
+
return p(d, 7);
|
|
8406
8418
|
case 8:
|
|
8407
|
-
return
|
|
8419
|
+
return p(d, 21);
|
|
8408
8420
|
case 9:
|
|
8409
|
-
return
|
|
8421
|
+
return p(d, 25);
|
|
8410
8422
|
case 10:
|
|
8411
|
-
return
|
|
8423
|
+
return p(d, 28);
|
|
8412
8424
|
default:
|
|
8413
|
-
return
|
|
8425
|
+
return p(d, 1);
|
|
8414
8426
|
}
|
|
8415
8427
|
}
|
|
8416
8428
|
function U1(d, t) {
|
|
8417
8429
|
var $ = V1(d, t);
|
|
8418
|
-
return d = d1(d,
|
|
8430
|
+
return d = d1(d, b(t, 1), $), d == null ? -1 : (t = t1(t), m1(t, d));
|
|
8419
8431
|
}
|
|
8420
8432
|
function m1(d, t) {
|
|
8421
|
-
return k(d,
|
|
8433
|
+
return k(d, p(t, 1)) ? k(d, p(t, 5)) ? 4 : k(d, p(t, 4)) ? 3 : k(d, p(t, 6)) ? 5 : k(d, p(t, 8)) ? 6 : k(d, p(t, 7)) ? 7 : k(d, p(t, 21)) ? 8 : k(d, p(t, 25)) ? 9 : k(d, p(t, 28)) ? 10 : k(d, p(t, 2)) ? p(t, 18) || k(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && k(d, p(t, 3)) ? 1 : -1 : -1;
|
|
8422
8434
|
}
|
|
8423
8435
|
function j(d, t) {
|
|
8424
8436
|
if (t == null) return null;
|
|
@@ -8432,15 +8444,15 @@ const Z2 = (m) => {
|
|
|
8432
8444
|
}
|
|
8433
8445
|
function k(d, t) {
|
|
8434
8446
|
var $ = d.length;
|
|
8435
|
-
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(
|
|
8447
|
+
return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(b(t, 2), d);
|
|
8436
8448
|
}
|
|
8437
|
-
function
|
|
8438
|
-
var $ = V1(d, t), s =
|
|
8449
|
+
function T2(d, t) {
|
|
8450
|
+
var $ = V1(d, t), s = b(t, 1), r = d1(d, s, $);
|
|
8439
8451
|
return r == null || $ != "001" && s != K1(d, $) ? r = !1 : (d = t1(t), r = m1(d, r) != -1), r;
|
|
8440
8452
|
}
|
|
8441
8453
|
function V1(d, t) {
|
|
8442
8454
|
if (t == null) return null;
|
|
8443
|
-
var $ =
|
|
8455
|
+
var $ = b(t, 1);
|
|
8444
8456
|
if ($ = X[$], $ == null) d = null;
|
|
8445
8457
|
else if ($.length == 1) d = $[0];
|
|
8446
8458
|
else d: {
|
|
@@ -8449,7 +8461,7 @@ const Z2 = (m) => {
|
|
|
8449
8461
|
s = $[a];
|
|
8450
8462
|
var u = j(d, s);
|
|
8451
8463
|
if (R(u, 23)) {
|
|
8452
|
-
if (t.search(
|
|
8464
|
+
if (t.search(p(u, 23)) == 0) {
|
|
8453
8465
|
d = s;
|
|
8454
8466
|
break d;
|
|
8455
8467
|
}
|
|
@@ -8467,17 +8479,17 @@ const Z2 = (m) => {
|
|
|
8467
8479
|
}
|
|
8468
8480
|
function K1(d, t) {
|
|
8469
8481
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8470
|
-
return
|
|
8482
|
+
return b(d, 10);
|
|
8471
8483
|
}
|
|
8472
8484
|
function l1(d, t, $, s) {
|
|
8473
|
-
var r = u1($, s), a = K(r, 9) == 0 ? P(
|
|
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(
|
|
8485
|
+
var r = u1($, s), a = K(r, 9) == 0 ? P(p($, 1), 9) : P(r, 9);
|
|
8486
|
+
if (r = P(r, 10), s == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), a.sort(), r.length == 0 ? r = P(d, 10) : (r = r.concat(P(d, 10)), r.sort()));
|
|
8475
8487
|
else return l1(d, t, $, 1);
|
|
8476
8488
|
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));
|
|
8477
8489
|
}
|
|
8478
8490
|
function h1(d, t, $) {
|
|
8479
8491
|
var s = t1(t);
|
|
8480
|
-
return t =
|
|
8492
|
+
return t = b(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
|
|
8481
8493
|
}
|
|
8482
8494
|
function H1(d, t) {
|
|
8483
8495
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
@@ -8488,7 +8500,7 @@ const Z2 = (m) => {
|
|
|
8488
8500
|
if (t.length == 0) return 0;
|
|
8489
8501
|
t = new T(t);
|
|
8490
8502
|
var u;
|
|
8491
|
-
$ != null && (u =
|
|
8503
|
+
$ != null && (u = p($, 11)), u == null && (u = "NonMatch");
|
|
8492
8504
|
var c = t.toString();
|
|
8493
8505
|
if (c.length == 0) u = 20;
|
|
8494
8506
|
else if (Q.test(c)) c = c.replace(Q, ""), B(t), t.g(B1(c)), u = 1;
|
|
@@ -8500,21 +8512,21 @@ const Z2 = (m) => {
|
|
|
8500
8512
|
} else u = !1;
|
|
8501
8513
|
u = u ? 5 : 20;
|
|
8502
8514
|
}
|
|
8503
|
-
if (r &&
|
|
8515
|
+
if (r && A(a, 6, u), u != 20) {
|
|
8504
8516
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
8505
|
-
if (d = H1(t, s), d != 0) return
|
|
8517
|
+
if (d = H1(t, s), d != 0) return A(a, 1, d), d;
|
|
8506
8518
|
throw Error("Invalid country calling code");
|
|
8507
8519
|
}
|
|
8508
|
-
return $ != null && (u =
|
|
8520
|
+
return $ != null && (u = b($, 10), c = "" + u, y = t.toString(), y.lastIndexOf(c, 0) == 0 && (c = new T(y.substring(c.length)), y = p($, 1), y = new RegExp(b(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 && A(a, 6, 10), A(a, 1, u), u) : (A(a, 1, 0), 0);
|
|
8509
8521
|
}
|
|
8510
8522
|
function W1(d, t, $) {
|
|
8511
|
-
var s = d.toString(), r = s.length, a =
|
|
8523
|
+
var s = d.toString(), r = s.length, a = p(t, 15);
|
|
8512
8524
|
if (r != 0 && a != null && a.length != 0) {
|
|
8513
8525
|
var u = new RegExp("^(?:" + a + ")");
|
|
8514
8526
|
if (r = u.exec(s)) {
|
|
8515
|
-
a = new RegExp(
|
|
8527
|
+
a = new RegExp(b(p(t, 1), 2));
|
|
8516
8528
|
var c = U(a, s), y = r.length - 1;
|
|
8517
|
-
t =
|
|
8529
|
+
t = p(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)));
|
|
8518
8530
|
}
|
|
8519
8531
|
}
|
|
8520
8532
|
}
|
|
@@ -8535,7 +8547,7 @@ const Z2 = (m) => {
|
|
|
8535
8547
|
var c = a;
|
|
8536
8548
|
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");
|
|
8537
8549
|
if (a = r.toString(), !(a1($) || a != null && 0 < a.length && Q.test(a))) throw Error("Invalid country calling code");
|
|
8538
|
-
a = new H(), s &&
|
|
8550
|
+
a = new H(), s && A(a, 5, t);
|
|
8539
8551
|
d: {
|
|
8540
8552
|
if (t = r.toString(), u = t.search(x1), 0 <= u && R1(t.substring(0, u))) {
|
|
8541
8553
|
c = t.match(x1);
|
|
@@ -8546,7 +8558,7 @@ const Z2 = (m) => {
|
|
|
8546
8558
|
}
|
|
8547
8559
|
t = "";
|
|
8548
8560
|
}
|
|
8549
|
-
0 < t.length &&
|
|
8561
|
+
0 < t.length && A(a, 3, t), u = j(d, $), t = new T(), c = 0, y = r.toString();
|
|
8550
8562
|
try {
|
|
8551
8563
|
c = j1(d, y, u, t, s, a);
|
|
8552
8564
|
} catch (I1) {
|
|
@@ -8554,26 +8566,26 @@ const Z2 = (m) => {
|
|
|
8554
8566
|
if (y = y.replace(Q, ""), c = j1(d, y, u, t, s, a), c == 0) throw I1;
|
|
8555
8567
|
} else throw I1;
|
|
8556
8568
|
}
|
|
8557
|
-
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c =
|
|
8569
|
+
if (c != 0 ? (r = e1(c), r != $ && (u = d1(d, c, r))) : (k1(r), t.g(r.toString()), $ != null ? (c = b(u, 10), A(
|
|
8558
8570
|
a,
|
|
8559
8571
|
1,
|
|
8560
8572
|
c
|
|
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 &&
|
|
8573
|
+
)) : 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 && A(a, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8562
8574
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8563
8575
|
if (1 < s.length && s.charAt(0) == "0") {
|
|
8564
|
-
for (
|
|
8565
|
-
d != 1 &&
|
|
8576
|
+
for (A(a, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
|
|
8577
|
+
d != 1 && A(a, 8, d);
|
|
8566
8578
|
}
|
|
8567
|
-
return
|
|
8579
|
+
return A(a, 2, parseInt(s, 10)), a;
|
|
8568
8580
|
}
|
|
8569
8581
|
function U(d, t) {
|
|
8570
8582
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
8571
8583
|
}
|
|
8572
|
-
function
|
|
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 =
|
|
8584
|
+
function A2(d) {
|
|
8585
|
+
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 = E.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);
|
|
8574
8586
|
}
|
|
8575
8587
|
var Z1 = new z();
|
|
8576
|
-
|
|
8588
|
+
A(Z1, 11, "NA");
|
|
8577
8589
|
var E2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), Y1 = /[- ]/;
|
|
8578
8590
|
function J1(d, t) {
|
|
8579
8591
|
var $ = d.ga;
|
|
@@ -8581,21 +8593,21 @@ const Z2 = (m) => {
|
|
|
8581
8593
|
}
|
|
8582
8594
|
function q1(d) {
|
|
8583
8595
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8584
|
-
var s = d.j[$], r =
|
|
8596
|
+
var s = d.j[$], r = b(s, 1);
|
|
8585
8597
|
if (d.da == r) return !1;
|
|
8586
|
-
var a = d, u = s, c =
|
|
8598
|
+
var a = d, u = s, c = b(u, 1);
|
|
8587
8599
|
B(a.v);
|
|
8588
8600
|
var y = a;
|
|
8589
|
-
u =
|
|
8601
|
+
u = b(u, 2);
|
|
8590
8602
|
var V = "999999999999999".match(c)[0];
|
|
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(
|
|
8603
|
+
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(p(s, 4)), d.$ = 0, !0;
|
|
8592
8604
|
}
|
|
8593
8605
|
return d.u = !1;
|
|
8594
8606
|
}
|
|
8595
8607
|
function X1(d, t) {
|
|
8596
8608
|
for (var $ = [], s = t.length - 3, r = d.j.length, a = 0; a < r; ++a) {
|
|
8597
8609
|
var u = d.j[a];
|
|
8598
|
-
K(u, 3) == 0 ? $.push(d.j[a]) : (u =
|
|
8610
|
+
K(u, 3) == 0 ? $.push(d.j[a]) : (u = p(u, 3, Math.min(s, K(u, 3) - 1)), t.search(u) == 0 && $.push(d.j[a]));
|
|
8599
8611
|
}
|
|
8600
8612
|
d.j = $;
|
|
8601
8613
|
}
|
|
@@ -8627,8 +8639,8 @@ const Z2 = (m) => {
|
|
|
8627
8639
|
}
|
|
8628
8640
|
function d2(d) {
|
|
8629
8641
|
for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
|
|
8630
|
-
var r = d.j[s], a =
|
|
8631
|
-
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(
|
|
8642
|
+
var r = d.j[s], a = b(r, 1);
|
|
8643
|
+
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(p(r, 4)), r = t.replace(new RegExp(a, "g"), p(r, 2)), r = c1(d, r), o1(r, g2) == d.ba)) return r;
|
|
8632
8644
|
}
|
|
8633
8645
|
return "";
|
|
8634
8646
|
}
|
|
@@ -8641,7 +8653,7 @@ const Z2 = (m) => {
|
|
|
8641
8653
|
if (3 <= t.length) {
|
|
8642
8654
|
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) {
|
|
8643
8655
|
var a = $[r];
|
|
8644
|
-
0 < d.o.length && G1(
|
|
8656
|
+
0 < d.o.length && G1(b(a, 4)) && !p(a, 6) && !R(a, 5) || (d.o.length != 0 || d.ca || G1(b(a, 4)) || p(a, 6)) && E2.test(b(a, 2)) && d.j.push(a);
|
|
8645
8657
|
}
|
|
8646
8658
|
return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
|
|
8647
8659
|
}
|
|
@@ -8657,12 +8669,12 @@ const Z2 = (m) => {
|
|
|
8657
8669
|
}
|
|
8658
8670
|
function e2(d) {
|
|
8659
8671
|
var t = d.g.toString(), $ = 0;
|
|
8660
|
-
if (
|
|
8672
|
+
if (p(d.l, 10) != 1) var s = !1;
|
|
8661
8673
|
else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
|
|
8662
|
-
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" +
|
|
8674
|
+
return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" + p(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, $);
|
|
8663
8675
|
}
|
|
8664
8676
|
function $2(d) {
|
|
8665
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8677
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
|
|
8666
8678
|
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;
|
|
8667
8679
|
}
|
|
8668
8680
|
function i2(d) {
|
|
@@ -8684,7 +8696,7 @@ const Z2 = (m) => {
|
|
|
8684
8696
|
}, _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 };
|
|
8685
8697
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8686
8698
|
try {
|
|
8687
|
-
const $ = d.replace(/[^+0-9]/g, ""), s = new
|
|
8699
|
+
const $ = d.replace(/[^+0-9]/g, ""), s = new A2(t);
|
|
8688
8700
|
t = "";
|
|
8689
8701
|
for (let r = 0; r < $.length; r++) s.ja = M2(s, $.charAt(r)), t = s.ja;
|
|
8690
8702
|
return t;
|
|
@@ -8693,7 +8705,7 @@ const Z2 = (m) => {
|
|
|
8693
8705
|
}
|
|
8694
8706
|
}), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
|
|
8695
8707
|
try {
|
|
8696
|
-
const r =
|
|
8708
|
+
const r = E.g(), a = Z(r, d, t);
|
|
8697
8709
|
var s = h1(r, a, -1);
|
|
8698
8710
|
return s == 0 || s == 4 ? r.format(a, typeof $ > "u" ? 0 : $) : d;
|
|
8699
8711
|
} catch {
|
|
@@ -8701,14 +8713,14 @@ const Z2 = (m) => {
|
|
|
8701
8713
|
}
|
|
8702
8714
|
}), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, s) => {
|
|
8703
8715
|
try {
|
|
8704
|
-
const y =
|
|
8716
|
+
const y = E.g();
|
|
8705
8717
|
d: {
|
|
8706
8718
|
var r = y;
|
|
8707
8719
|
if (a1(d)) {
|
|
8708
8720
|
var a = u1(j(r, d), $);
|
|
8709
8721
|
try {
|
|
8710
8722
|
if (R(a, 6)) {
|
|
8711
|
-
var u =
|
|
8723
|
+
var u = p(a, 6), c = z1(r, u, d, !1);
|
|
8712
8724
|
break d;
|
|
8713
8725
|
}
|
|
8714
8726
|
} catch {
|
|
@@ -8722,13 +8734,13 @@ const Z2 = (m) => {
|
|
|
8722
8734
|
}
|
|
8723
8735
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8724
8736
|
try {
|
|
8725
|
-
return
|
|
8737
|
+
return p(Z(E.g(), d, t), 3);
|
|
8726
8738
|
} catch {
|
|
8727
8739
|
return "";
|
|
8728
8740
|
}
|
|
8729
8741
|
}), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
|
|
8730
8742
|
try {
|
|
8731
|
-
const $ =
|
|
8743
|
+
const $ = E.g(), s = Z($, d, t);
|
|
8732
8744
|
return U1($, s);
|
|
8733
8745
|
} catch {
|
|
8734
8746
|
return -99;
|
|
@@ -8736,14 +8748,14 @@ const Z2 = (m) => {
|
|
|
8736
8748
|
}), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
|
|
8737
8749
|
if (!t) return 1;
|
|
8738
8750
|
try {
|
|
8739
|
-
const $ =
|
|
8751
|
+
const $ = E.g(), s = Z($, d, t);
|
|
8740
8752
|
return h1($, s, -1);
|
|
8741
8753
|
} catch ($) {
|
|
8742
8754
|
return $.message === "Invalid country calling code" ? 1 : 3 >= d.length || $.message === "Phone number too short after IDD" || $.message === "The string supplied is too short to be a phone number" ? 2 : $.message === "The string supplied is too long to be a phone number" ? 3 : -99;
|
|
8743
8755
|
}
|
|
8744
8756
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
|
|
8745
8757
|
try {
|
|
8746
|
-
const s =
|
|
8758
|
+
const s = E.g(), r = Z(s, d, t), a = T2(s, r);
|
|
8747
8759
|
if ($) {
|
|
8748
8760
|
const u = s2($).map((c) => _1[c]);
|
|
8749
8761
|
return a && u.includes(U1(s, r));
|
|
@@ -8754,7 +8766,7 @@ const Z2 = (m) => {
|
|
|
8754
8766
|
}
|
|
8755
8767
|
}), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
|
|
8756
8768
|
try {
|
|
8757
|
-
const s =
|
|
8769
|
+
const s = E.g(), r = Z(s, d, t);
|
|
8758
8770
|
if ($) {
|
|
8759
8771
|
const a = s2($);
|
|
8760
8772
|
for (let u of a) if (h1(s, r, _1[u]) === 0) return !0;
|
|
@@ -8766,7 +8778,7 @@ const Z2 = (m) => {
|
|
|
8766
8778
|
}
|
|
8767
8779
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8768
8780
|
try {
|
|
8769
|
-
return
|
|
8781
|
+
return p(Z(E.g(), d, t), 2).toString();
|
|
8770
8782
|
} catch {
|
|
8771
8783
|
return "";
|
|
8772
8784
|
}
|
|
@@ -8808,37 +8820,37 @@ const q2 = {
|
|
|
8808
8820
|
"changeErrorCode"
|
|
8809
8821
|
], ["update:modelValue"]),
|
|
8810
8822
|
setup(m, { expose: e, emit: i }) {
|
|
8811
|
-
const n = D2(m, "modelValue"), o = m, l = i, f = v1(), h = v1(), _ = v1(!1),
|
|
8812
|
-
let
|
|
8813
|
-
_.value !==
|
|
8823
|
+
const n = D2(m, "modelValue"), o = m, l = i, f = v1(), h = v1(), _ = v1(!1), v = () => h.value ? o.options.strictMode ? h.value.isValidNumberPrecise() : h.value.isValidNumber() : null, w = () => {
|
|
8824
|
+
let S = v();
|
|
8825
|
+
_.value !== S && (_.value = S, l("changeValidity", !!S), l(
|
|
8814
8826
|
"changeErrorCode",
|
|
8815
|
-
|
|
8827
|
+
S ? null : h.value.getValidationError()
|
|
8816
8828
|
));
|
|
8817
|
-
},
|
|
8818
|
-
var
|
|
8819
|
-
l("changeNumber", ((
|
|
8820
|
-
},
|
|
8821
|
-
var
|
|
8822
|
-
l("changeCountry", ((
|
|
8829
|
+
}, g = () => {
|
|
8830
|
+
var S;
|
|
8831
|
+
l("changeNumber", ((S = h.value) == null ? void 0 : S.getNumber()) ?? ""), w();
|
|
8832
|
+
}, I = () => {
|
|
8833
|
+
var S;
|
|
8834
|
+
l("changeCountry", ((S = h.value) == null ? void 0 : S.getSelectedCountryData().iso2) ?? ""), g(), w();
|
|
8823
8835
|
};
|
|
8824
8836
|
return P2(() => {
|
|
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 =
|
|
8837
|
+
f.value && (h.value = C(f.value, o.options), o.value && h.value.setNumber(o.value), o.disabled && h.value.setDisabled(o.disabled), _.value = v());
|
|
8826
8838
|
}), x2(
|
|
8827
8839
|
() => o.disabled,
|
|
8828
|
-
(
|
|
8829
|
-
var
|
|
8830
|
-
return (
|
|
8840
|
+
(S) => {
|
|
8841
|
+
var M;
|
|
8842
|
+
return (M = h.value) == null ? void 0 : M.setDisabled(S);
|
|
8831
8843
|
}
|
|
8832
8844
|
), R2(() => {
|
|
8833
|
-
var
|
|
8834
|
-
return (
|
|
8835
|
-
}), e({ instance: h, input: f }), (
|
|
8845
|
+
var S;
|
|
8846
|
+
return (S = h.value) == null ? void 0 : S.destroy();
|
|
8847
|
+
}), e({ instance: h, input: f }), (S, M) => B2((O2(), k2("input", G2({
|
|
8836
8848
|
ref_key: "input",
|
|
8837
8849
|
ref: f,
|
|
8838
|
-
"onUpdate:modelValue":
|
|
8850
|
+
"onUpdate:modelValue": M[0] || (M[0] = (O) => n.value = O),
|
|
8839
8851
|
type: "tel",
|
|
8840
|
-
onCountrychange:
|
|
8841
|
-
onInput:
|
|
8852
|
+
onCountrychange: I,
|
|
8853
|
+
onInput: g
|
|
8842
8854
|
}, m.inputProps), null, 16)), [
|
|
8843
8855
|
[
|
|
8844
8856
|
F2,
|