intl-tel-input 25.0.1 → 25.0.2
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 +9 -9
- package/build/js/data.js +3 -3
- package/build/js/data.min.js +2 -2
- package/build/js/intlTelInput.d.ts +5 -1
- package/build/js/intlTelInput.js +38 -9
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +38 -9
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +37 -8
- package/react/build/IntlTelInput.d.ts +5 -1
- package/react/build/IntlTelInput.js +37 -8
- package/react/build/IntlTelInputWithUtils.cjs +37 -8
- package/react/build/IntlTelInputWithUtils.js +37 -8
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +293 -287
- package/vue/build/IntlTelInputWithUtils.mjs +337 -331
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeModels as i2, useModel as
|
|
1
|
+
import { mergeModels as i2, useModel as T2, ref as I1, onMounted as E2, watch as D2, onUnmounted as M2, withDirectives as P2, openBlock as x2, createElementBlock as R2, mergeProps as B2, vModelText as k2 } from "vue";
|
|
2
2
|
const r2 = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
@@ -9,8 +9,7 @@ const r2 = [
|
|
|
9
9
|
"ax",
|
|
10
10
|
// Åland Islands
|
|
11
11
|
"358",
|
|
12
|
-
1
|
|
13
|
-
["18"]
|
|
12
|
+
1
|
|
14
13
|
],
|
|
15
14
|
[
|
|
16
15
|
"al",
|
|
@@ -1315,6 +1314,7 @@ for (let y = 0; y < r2.length; y++) {
|
|
|
1315
1314
|
dialCode: $[1],
|
|
1316
1315
|
priority: $[2] || 0,
|
|
1317
1316
|
areaCodes: $[3] || null,
|
|
1317
|
+
partialAreaCodes: null,
|
|
1318
1318
|
nodeById: {}
|
|
1319
1319
|
};
|
|
1320
1320
|
}
|
|
@@ -1576,7 +1576,7 @@ const O2 = {
|
|
|
1576
1576
|
for (let y = 0; y < W.length; y++)
|
|
1577
1577
|
W[y].name = u2[W[y].iso2];
|
|
1578
1578
|
let F2 = 0;
|
|
1579
|
-
const
|
|
1579
|
+
const a2 = {
|
|
1580
1580
|
//* Whether or not to allow the dropdown.
|
|
1581
1581
|
allowDropdown: !0,
|
|
1582
1582
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
@@ -1660,33 +1660,33 @@ const l2 = {
|
|
|
1660
1660
|
if (n === 0 && !i)
|
|
1661
1661
|
return 0;
|
|
1662
1662
|
let o = 0;
|
|
1663
|
-
for (let
|
|
1664
|
-
if (/[+0-9]/.test($[
|
|
1665
|
-
return
|
|
1663
|
+
for (let l = 0; l < $.length; l++) {
|
|
1664
|
+
if (/[+0-9]/.test($[l]) && o++, o === y && !i)
|
|
1665
|
+
return l + 1;
|
|
1666
1666
|
if (i && o === y + 1)
|
|
1667
|
-
return
|
|
1667
|
+
return l;
|
|
1668
1668
|
}
|
|
1669
1669
|
return $.length;
|
|
1670
|
-
},
|
|
1670
|
+
}, N = (y, $, n) => {
|
|
1671
1671
|
const i = document.createElement(y);
|
|
1672
|
-
return $ && Object.entries($).forEach(([o,
|
|
1672
|
+
return $ && Object.entries($).forEach(([o, l]) => i.setAttribute(o, l)), n && n.appendChild(i), i;
|
|
1673
1673
|
}, $1 = (y, ...$) => {
|
|
1674
1674
|
const { instances: n } = C;
|
|
1675
1675
|
Object.values(n).forEach((i) => i[y](...$));
|
|
1676
1676
|
};
|
|
1677
1677
|
class K2 {
|
|
1678
1678
|
constructor($, n = {}) {
|
|
1679
|
-
this.id = F2++, this.telInput = $, this.highlightedItem = null, this.options = Object.assign({},
|
|
1679
|
+
this.id = F2++, this.telInput = $, this.highlightedItem = null, this.options = Object.assign({}, a2, n), this.hadInitialPlaceholder = !!$.getAttribute("placeholder");
|
|
1680
1680
|
}
|
|
1681
1681
|
//* Can't be private as it's called from intlTelInput convenience wrapper.
|
|
1682
1682
|
_init() {
|
|
1683
1683
|
this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]");
|
|
1684
1684
|
const $ = this.options.allowDropdown || this.options.separateDialCode;
|
|
1685
1685
|
this.showSelectedCountryOnLeft = this.isRTL ? !$ : $, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
|
|
1686
|
-
const n = new Promise((o,
|
|
1687
|
-
this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise =
|
|
1688
|
-
}), i = new Promise((o,
|
|
1689
|
-
this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise =
|
|
1686
|
+
const n = new Promise((o, l) => {
|
|
1687
|
+
this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = l;
|
|
1688
|
+
}), i = new Promise((o, l) => {
|
|
1689
|
+
this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = l;
|
|
1690
1690
|
});
|
|
1691
1691
|
this.promise = Promise.all([n, i]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
|
|
1692
1692
|
}
|
|
@@ -1702,9 +1702,9 @@ class K2 {
|
|
|
1702
1702
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map(($) => $.toLowerCase())), this.countries.sort(($, n) => {
|
|
1703
1703
|
const { countryOrder: i } = this.options;
|
|
1704
1704
|
if (i) {
|
|
1705
|
-
const o = i.indexOf($.iso2),
|
|
1706
|
-
if (c ||
|
|
1707
|
-
return c &&
|
|
1705
|
+
const o = i.indexOf($.iso2), l = i.indexOf(n.iso2), c = o > -1, f = l > -1;
|
|
1706
|
+
if (c || f)
|
|
1707
|
+
return c && f ? o - l : c ? -1 : 1;
|
|
1708
1708
|
}
|
|
1709
1709
|
return $.name.localeCompare(n.name);
|
|
1710
1710
|
});
|
|
@@ -1712,8 +1712,8 @@ class K2 {
|
|
|
1712
1712
|
//* Add a dial code to this.dialCodeToIso2Map.
|
|
1713
1713
|
_addToDialCodeMap($, n, i) {
|
|
1714
1714
|
n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
|
|
1715
|
-
for (let
|
|
1716
|
-
if (this.dialCodeToIso2Map[n][
|
|
1715
|
+
for (let l = 0; l < this.dialCodeToIso2Map[n].length; l++)
|
|
1716
|
+
if (this.dialCodeToIso2Map[n][l] === $)
|
|
1717
1717
|
return;
|
|
1718
1718
|
const o = i !== void 0 ? i : this.dialCodeToIso2Map[n].length;
|
|
1719
1719
|
this.dialCodeToIso2Map[n][o] = $;
|
|
@@ -1745,7 +1745,7 @@ class K2 {
|
|
|
1745
1745
|
this.options.i18n.hasOwnProperty(n) && (this.countries[$].name = this.options.i18n[n]);
|
|
1746
1746
|
}
|
|
1747
1747
|
}
|
|
1748
|
-
//* Generate this.dialCodes and this.dialCodeToIso2Map.
|
|
1748
|
+
//* Generate this.dialCodes and this.dialCodeToIso2Map and country.partialAreaCodes.
|
|
1749
1749
|
_processDialCodes() {
|
|
1750
1750
|
this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
|
|
1751
1751
|
for (let $ = 0; $ < this.countries.length; $++) {
|
|
@@ -1757,41 +1757,41 @@ class K2 {
|
|
|
1757
1757
|
if (n.areaCodes) {
|
|
1758
1758
|
const i = this.dialCodeToIso2Map[n.dialCode][0];
|
|
1759
1759
|
for (let o = 0; o < n.areaCodes.length; o++) {
|
|
1760
|
-
const
|
|
1761
|
-
for (let c = 1; c <
|
|
1762
|
-
const
|
|
1763
|
-
this._addToDialCodeMap(i,
|
|
1760
|
+
const l = n.areaCodes[o];
|
|
1761
|
+
for (let c = 1; c < l.length; c++) {
|
|
1762
|
+
const f = l.substr(0, c), p = n.dialCode + f;
|
|
1763
|
+
this._addToDialCodeMap(i, p), this._addToDialCodeMap(n.iso2, p), n.partialAreaCodes || (n.partialAreaCodes = []), n.partialAreaCodes.includes(f) || n.partialAreaCodes.push(f);
|
|
1764
1764
|
}
|
|
1765
|
-
this._addToDialCodeMap(n.iso2, n.dialCode +
|
|
1765
|
+
this._addToDialCodeMap(n.iso2, n.dialCode + l);
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1771
1771
|
_generateMarkup() {
|
|
1772
|
-
var
|
|
1772
|
+
var _, T, G;
|
|
1773
1773
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1774
1774
|
const {
|
|
1775
1775
|
allowDropdown: $,
|
|
1776
1776
|
separateDialCode: n,
|
|
1777
1777
|
showFlags: i,
|
|
1778
1778
|
containerClass: o,
|
|
1779
|
-
hiddenInput:
|
|
1779
|
+
hiddenInput: l,
|
|
1780
1780
|
dropdownContainer: c,
|
|
1781
|
-
fixDropdownWidth:
|
|
1782
|
-
useFullscreenPopup:
|
|
1783
|
-
countrySearch:
|
|
1784
|
-
i18n:
|
|
1781
|
+
fixDropdownWidth: f,
|
|
1782
|
+
useFullscreenPopup: p,
|
|
1783
|
+
countrySearch: w,
|
|
1784
|
+
i18n: I
|
|
1785
1785
|
} = this.options;
|
|
1786
|
-
let
|
|
1787
|
-
$ && (
|
|
1788
|
-
const
|
|
1789
|
-
if ((
|
|
1790
|
-
this.countryContainer =
|
|
1786
|
+
let S = "iti";
|
|
1787
|
+
$ && (S += " iti--allow-dropdown"), i && (S += " iti--show-flags"), o && (S += ` ${o}`), p || (S += " iti--inline-dropdown");
|
|
1788
|
+
const A = N("div", { class: S });
|
|
1789
|
+
if ((_ = this.telInput.parentNode) == null || _.insertBefore(A, this.telInput), $ || i || n) {
|
|
1790
|
+
this.countryContainer = N(
|
|
1791
1791
|
"div",
|
|
1792
1792
|
{ class: "iti__country-container" },
|
|
1793
|
-
|
|
1794
|
-
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry =
|
|
1793
|
+
A
|
|
1794
|
+
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry = N(
|
|
1795
1795
|
"button",
|
|
1796
1796
|
{
|
|
1797
1797
|
type: "button",
|
|
@@ -1803,85 +1803,85 @@ class K2 {
|
|
|
1803
1803
|
role: "combobox"
|
|
1804
1804
|
},
|
|
1805
1805
|
this.countryContainer
|
|
1806
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
1806
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = N(
|
|
1807
1807
|
"div",
|
|
1808
1808
|
{ class: "iti__selected-country" },
|
|
1809
1809
|
this.countryContainer
|
|
1810
1810
|
);
|
|
1811
|
-
const F =
|
|
1812
|
-
if (this.selectedCountryInner =
|
|
1811
|
+
const F = N("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1812
|
+
if (this.selectedCountryInner = N("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = N(
|
|
1813
1813
|
"span",
|
|
1814
1814
|
{ class: "iti__a11y-text" },
|
|
1815
1815
|
this.selectedCountryInner
|
|
1816
|
-
), $ && (this.dropdownArrow =
|
|
1816
|
+
), $ && (this.dropdownArrow = N(
|
|
1817
1817
|
"div",
|
|
1818
1818
|
{ class: "iti__arrow", "aria-hidden": "true" },
|
|
1819
1819
|
F
|
|
1820
|
-
)), n && (this.selectedDialCode =
|
|
1820
|
+
)), n && (this.selectedDialCode = N(
|
|
1821
1821
|
"div",
|
|
1822
1822
|
{ class: "iti__selected-dial-code" },
|
|
1823
1823
|
this.selectedCountry
|
|
1824
1824
|
)), $) {
|
|
1825
|
-
const M =
|
|
1826
|
-
if (this.dropdownContent =
|
|
1825
|
+
const M = f ? "" : "iti--flexible-dropdown-width";
|
|
1826
|
+
if (this.dropdownContent = N("div", {
|
|
1827
1827
|
id: `iti-${this.id}__dropdown-content`,
|
|
1828
1828
|
class: `iti__dropdown-content iti__hide ${M}`
|
|
1829
|
-
}),
|
|
1829
|
+
}), w && (this.searchInput = N(
|
|
1830
1830
|
"input",
|
|
1831
1831
|
{
|
|
1832
1832
|
type: "text",
|
|
1833
1833
|
class: "iti__search-input",
|
|
1834
|
-
placeholder:
|
|
1834
|
+
placeholder: I.searchPlaceholder,
|
|
1835
1835
|
role: "combobox",
|
|
1836
1836
|
"aria-expanded": "true",
|
|
1837
|
-
"aria-label":
|
|
1837
|
+
"aria-label": I.searchPlaceholder,
|
|
1838
1838
|
"aria-controls": `iti-${this.id}__country-listbox`,
|
|
1839
1839
|
"aria-autocomplete": "list",
|
|
1840
1840
|
autocomplete: "off"
|
|
1841
1841
|
},
|
|
1842
1842
|
this.dropdownContent
|
|
1843
|
-
), this.searchResultsA11yText =
|
|
1843
|
+
), this.searchResultsA11yText = N(
|
|
1844
1844
|
"span",
|
|
1845
1845
|
{ class: "iti__a11y-text" },
|
|
1846
1846
|
this.dropdownContent
|
|
1847
|
-
)), this.countryList =
|
|
1847
|
+
)), this.countryList = N(
|
|
1848
1848
|
"ul",
|
|
1849
1849
|
{
|
|
1850
1850
|
class: "iti__country-list",
|
|
1851
1851
|
id: `iti-${this.id}__country-listbox`,
|
|
1852
1852
|
role: "listbox",
|
|
1853
|
-
"aria-label":
|
|
1853
|
+
"aria-label": I.countryListAriaLabel
|
|
1854
1854
|
},
|
|
1855
1855
|
this.dropdownContent
|
|
1856
|
-
), this._appendListItems(),
|
|
1856
|
+
), this._appendListItems(), w && this._updateSearchResultsText(), c) {
|
|
1857
1857
|
let x = "iti iti--container";
|
|
1858
|
-
|
|
1858
|
+
p ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = N("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
|
|
1859
1859
|
} else
|
|
1860
1860
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
if (
|
|
1864
|
-
const F = this.telInput.getAttribute("name") || "", M =
|
|
1863
|
+
if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
|
|
1864
|
+
const F = this.telInput.getAttribute("name") || "", M = l(F);
|
|
1865
1865
|
if (M.phone) {
|
|
1866
|
-
const x = (
|
|
1867
|
-
x ? this.hiddenInput = x : (this.hiddenInput =
|
|
1866
|
+
const x = (T = this.telInput.form) == null ? void 0 : T.querySelector(`input[name="${M.phone}"]`);
|
|
1867
|
+
x ? this.hiddenInput = x : (this.hiddenInput = N("input", {
|
|
1868
1868
|
type: "hidden",
|
|
1869
1869
|
name: M.phone
|
|
1870
|
-
}),
|
|
1870
|
+
}), A.appendChild(this.hiddenInput));
|
|
1871
1871
|
}
|
|
1872
1872
|
if (M.country) {
|
|
1873
1873
|
const x = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${M.country}"]`);
|
|
1874
|
-
x ? this.hiddenInputCountry = x : (this.hiddenInputCountry =
|
|
1874
|
+
x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = N("input", {
|
|
1875
1875
|
type: "hidden",
|
|
1876
1876
|
name: M.country
|
|
1877
|
-
}),
|
|
1877
|
+
}), A.appendChild(this.hiddenInputCountry));
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
1882
1882
|
_appendListItems() {
|
|
1883
1883
|
for (let $ = 0; $ < this.countries.length; $++) {
|
|
1884
|
-
const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o =
|
|
1884
|
+
const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o = N(
|
|
1885
1885
|
"li",
|
|
1886
1886
|
{
|
|
1887
1887
|
id: `iti-${this.id}__item-${n.iso2}`,
|
|
@@ -1895,22 +1895,22 @@ class K2 {
|
|
|
1895
1895
|
this.countryList
|
|
1896
1896
|
);
|
|
1897
1897
|
n.nodeById[this.id] = o;
|
|
1898
|
-
let
|
|
1899
|
-
this.options.showFlags && (
|
|
1898
|
+
let l = "";
|
|
1899
|
+
this.options.showFlags && (l += `<div class='iti__flag iti__${n.iso2}'></div>`), l += `<span class='iti__country-name'>${n.name}</span>`, l += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", l);
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
1902
|
//* Set the initial state of the input value and the selected country by:
|
|
1903
1903
|
//* 1. Extracting a dial code from the given number
|
|
1904
1904
|
//* 2. Using explicit initialCountry
|
|
1905
1905
|
_setInitialState($ = !1) {
|
|
1906
|
-
const n = this.telInput.getAttribute("value"), i = this.telInput.value,
|
|
1907
|
-
if (c && !
|
|
1908
|
-
this._updateCountryFromNumber(
|
|
1909
|
-
else if (!
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1906
|
+
const n = this.telInput.getAttribute("value"), i = this.telInput.value, l = n && n.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? n : i, c = this._getDialCode(l), f = o2(l), { initialCountry: p, geoIpLookup: w } = this.options, I = p === "auto" && w;
|
|
1907
|
+
if (c && !f)
|
|
1908
|
+
this._updateCountryFromNumber(l);
|
|
1909
|
+
else if (!I || $) {
|
|
1910
|
+
const S = p ? p.toLowerCase() : "";
|
|
1911
|
+
S && this._getCountryData(S, !0) ? this._setCountry(S) : c && f ? this._setCountry("us") : this._setCountry();
|
|
1912
1912
|
}
|
|
1913
|
-
|
|
1913
|
+
l && this._updateValFromNumber(l);
|
|
1914
1914
|
}
|
|
1915
1915
|
//* Initialise the main event listeners: input keyup, and click selected country.
|
|
1916
1916
|
_initListeners() {
|
|
@@ -1945,8 +1945,8 @@ class K2 {
|
|
|
1945
1945
|
_initRequests() {
|
|
1946
1946
|
let { loadUtils: $, initialCountry: n, geoIpLookup: i } = this.options;
|
|
1947
1947
|
$ && !C.utils ? (this._handlePageLoad = () => {
|
|
1948
|
-
var
|
|
1949
|
-
window.removeEventListener("load", this._handlePageLoad), (
|
|
1948
|
+
var l;
|
|
1949
|
+
window.removeEventListener("load", this._handlePageLoad), (l = C.attachUtils($)) == null || l.catch(() => {
|
|
1950
1950
|
});
|
|
1951
1951
|
}, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
1952
1952
|
}
|
|
@@ -1967,36 +1967,36 @@ class K2 {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
//* Initialize the tel input listeners.
|
|
1969
1969
|
_initTelInputListeners() {
|
|
1970
|
-
const { strictMode: $, formatAsYouType: n, separateDialCode: i, formatOnDisplay: o, allowDropdown:
|
|
1971
|
-
let
|
|
1972
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
1973
|
-
if (this.isAndroid && (
|
|
1974
|
-
const
|
|
1975
|
-
this.telInput.value =
|
|
1970
|
+
const { strictMode: $, formatAsYouType: n, separateDialCode: i, formatOnDisplay: o, allowDropdown: l, countrySearch: c } = this.options;
|
|
1971
|
+
let f = !1;
|
|
1972
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (p) => {
|
|
1973
|
+
if (this.isAndroid && (p == null ? void 0 : p.data) === "+" && i && l && c) {
|
|
1974
|
+
const A = this.telInput.selectionStart || 0, _ = this.telInput.value.substring(0, A - 1), T = this.telInput.value.substring(A);
|
|
1975
|
+
this.telInput.value = _ + T, this._openDropdownWithPlus();
|
|
1976
1976
|
return;
|
|
1977
1977
|
}
|
|
1978
1978
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
const
|
|
1982
|
-
if (n && !
|
|
1983
|
-
const
|
|
1979
|
+
const w = (p == null ? void 0 : p.data) && /[^+0-9]/.test(p.data), I = (p == null ? void 0 : p.inputType) === "insertFromPaste" && this.telInput.value;
|
|
1980
|
+
w || I && !$ ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
|
|
1981
|
+
const S = (p == null ? void 0 : p.detail) && p.detail.isSetNumber && !o;
|
|
1982
|
+
if (n && !f && !S) {
|
|
1983
|
+
const A = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, A).replace(/[^+0-9]/g, "").length, G = (p == null ? void 0 : p.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(T, F, A, G);
|
|
1984
1984
|
this.telInput.value = F, this.telInput.setSelectionRange(M, M);
|
|
1985
1985
|
}
|
|
1986
|
-
}, this.telInput.addEventListener("input", this._handleInputEvent), ($ || i) && (this._handleKeydownEvent = (
|
|
1987
|
-
if (
|
|
1988
|
-
if (i &&
|
|
1989
|
-
|
|
1986
|
+
}, this.telInput.addEventListener("input", this._handleInputEvent), ($ || i) && (this._handleKeydownEvent = (p) => {
|
|
1987
|
+
if (p.key && p.key.length === 1 && !p.altKey && !p.ctrlKey && !p.metaKey) {
|
|
1988
|
+
if (i && l && c && p.key === "+") {
|
|
1989
|
+
p.preventDefault(), this._openDropdownWithPlus();
|
|
1990
1990
|
return;
|
|
1991
1991
|
}
|
|
1992
1992
|
if ($) {
|
|
1993
|
-
const
|
|
1993
|
+
const w = this.telInput.value, I = w.charAt(0) === "+", S = !I && this.telInput.selectionStart === 0 && p.key === "+", A = /^[0-9]$/.test(p.key), _ = i ? A : S || A, T = w.slice(0, this.telInput.selectionStart) + p.key + w.slice(this.telInput.selectionEnd), G = this._getFullNumber(T), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
|
|
1994
1994
|
let x = !1;
|
|
1995
|
-
if (
|
|
1995
|
+
if (I) {
|
|
1996
1996
|
const f1 = this.selectedCountryData.iso2;
|
|
1997
1997
|
x = this._getCountryFromNumber(G) !== f1;
|
|
1998
1998
|
}
|
|
1999
|
-
(!
|
|
1999
|
+
(!_ || M && !x && !S) && p.preventDefault();
|
|
2000
2000
|
}
|
|
2001
2001
|
}
|
|
2002
2002
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2035,15 +2035,15 @@ class K2 {
|
|
|
2035
2035
|
_bindDropdownListeners() {
|
|
2036
2036
|
this._handleMouseoverCountryList = (o) => {
|
|
2037
2037
|
var c;
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2038
|
+
const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
|
|
2039
|
+
l && this._highlightListItem(l, !1);
|
|
2040
2040
|
}, this.countryList.addEventListener(
|
|
2041
2041
|
"mouseover",
|
|
2042
2042
|
this._handleMouseoverCountryList
|
|
2043
2043
|
), this._handleClickCountryList = (o) => {
|
|
2044
2044
|
var c;
|
|
2045
|
-
const
|
|
2046
|
-
|
|
2045
|
+
const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
|
|
2046
|
+
l && this._selectListItem(l);
|
|
2047
2047
|
}, this.countryList.addEventListener("click", this._handleClickCountryList);
|
|
2048
2048
|
let $ = !0;
|
|
2049
2049
|
this._handleClickOffToClose = () => {
|
|
@@ -2062,10 +2062,10 @@ class K2 {
|
|
|
2062
2062
|
const c = this.searchInput.value.trim();
|
|
2063
2063
|
c ? this._filterCountries(c) : this._filterCountries("", !0);
|
|
2064
2064
|
};
|
|
2065
|
-
let
|
|
2065
|
+
let l = null;
|
|
2066
2066
|
this._handleSearchChange = () => {
|
|
2067
|
-
|
|
2068
|
-
o(),
|
|
2067
|
+
l && clearTimeout(l), l = setTimeout(() => {
|
|
2068
|
+
o(), l = null;
|
|
2069
2069
|
}, 100);
|
|
2070
2070
|
}, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
|
|
2071
2071
|
}
|
|
@@ -2075,8 +2075,8 @@ class K2 {
|
|
|
2075
2075
|
for (let n = 0; n < this.countries.length; n++) {
|
|
2076
2076
|
const i = this.countries[n];
|
|
2077
2077
|
if (i.name.substr(0, $.length).toLowerCase() === $) {
|
|
2078
|
-
const
|
|
2079
|
-
this._highlightListItem(
|
|
2078
|
+
const l = i.nodeById[this.id];
|
|
2079
|
+
this._highlightListItem(l, !1), this._scrollTo(l);
|
|
2080
2080
|
break;
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
@@ -2086,11 +2086,11 @@ class K2 {
|
|
|
2086
2086
|
let i = !0;
|
|
2087
2087
|
this.countryList.innerHTML = "";
|
|
2088
2088
|
const o = s2($);
|
|
2089
|
-
for (let
|
|
2090
|
-
const c = this.countries[
|
|
2091
|
-
if (n ||
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2089
|
+
for (let l = 0; l < this.countries.length; l++) {
|
|
2090
|
+
const c = this.countries[l], f = s2(c.name), p = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((I) => I[0]).join("").toLowerCase(), w = `+${c.dialCode}`;
|
|
2091
|
+
if (n || f.includes(o) || w.includes(o) || c.iso2.includes(o) || p.includes(o)) {
|
|
2092
|
+
const I = c.nodeById[this.id];
|
|
2093
|
+
I && this.countryList.appendChild(I), i && (this._highlightListItem(I, !1), i = !1);
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
2096
|
i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
|
|
@@ -2116,7 +2116,7 @@ class K2 {
|
|
|
2116
2116
|
_updateValFromNumber($) {
|
|
2117
2117
|
let n = $;
|
|
2118
2118
|
if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
|
|
2119
|
-
const i = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL:
|
|
2119
|
+
const i = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, c = i ? o : l;
|
|
2120
2120
|
n = C.utils.formatNumber(
|
|
2121
2121
|
n,
|
|
2122
2122
|
this.selectedCountryData.iso2,
|
|
@@ -2131,21 +2131,27 @@ class K2 {
|
|
|
2131
2131
|
const n = this._getCountryFromNumber($);
|
|
2132
2132
|
return n !== null ? this._setCountry(n) : !1;
|
|
2133
2133
|
}
|
|
2134
|
+
//* Check if the given number matches an area code from the selected country.
|
|
2135
|
+
_isAreaCodeMatch($, n) {
|
|
2136
|
+
const { areaCodes: i, partialAreaCodes: o, dialCode: l } = this.selectedCountryData, c = $.substring(l.length), f = n.substring(l.length);
|
|
2137
|
+
return !!(i.includes(f) || o.includes(c));
|
|
2138
|
+
}
|
|
2134
2139
|
_getCountryFromNumber($) {
|
|
2135
2140
|
const n = $.indexOf("+");
|
|
2136
2141
|
let i = n ? $.substring(n) : $;
|
|
2137
2142
|
const o = this.selectedCountryData.dialCode;
|
|
2138
2143
|
i && o === "1" && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = `1${i}`), i = `+${i}`), this.options.separateDialCode && o && i.charAt(0) !== "+" && (i = `+${o}${i}`);
|
|
2139
|
-
const c = this._getDialCode(i, !0),
|
|
2144
|
+
const c = this._getDialCode(i, !0), f = c1(i);
|
|
2140
2145
|
if (c) {
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
+
const p = c1(c), w = this.dialCodeToIso2Map[p], I = this.selectedCountryData.iso2 && w.includes(this.selectedCountryData.iso2);
|
|
2147
|
+
let S = !1;
|
|
2148
|
+
if (I && (this.selectedCountryData.areaCodes && f.length > o.length ? S = this._isAreaCodeMatch(f, p) : S = !0), !(o === "1" && o2(f)) && (!I || !S)) {
|
|
2149
|
+
for (let _ = 0; _ < w.length; _++)
|
|
2150
|
+
if (w[_])
|
|
2151
|
+
return w[_];
|
|
2146
2152
|
}
|
|
2147
2153
|
} else {
|
|
2148
|
-
if (i.charAt(0) === "+" &&
|
|
2154
|
+
if (i.charAt(0) === "+" && f.length)
|
|
2149
2155
|
return "";
|
|
2150
2156
|
if ((!i || i === "+") && !this.selectedCountryData.iso2)
|
|
2151
2157
|
return this.defaultCountry;
|
|
@@ -2175,16 +2181,16 @@ class K2 {
|
|
|
2175
2181
|
//* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
|
|
2176
2182
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2177
2183
|
_setCountry($) {
|
|
2178
|
-
const { separateDialCode: n, showFlags: i, i18n: o } = this.options,
|
|
2184
|
+
const { separateDialCode: n, showFlags: i, i18n: o } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
2179
2185
|
if (this.selectedCountryData = $ ? this._getCountryData($, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
|
|
2180
|
-
let c = "",
|
|
2181
|
-
$ && i ? (c = `iti__flag iti__${$}`,
|
|
2186
|
+
let c = "", f = "";
|
|
2187
|
+
$ && i ? (c = `iti__flag iti__${$}`, f = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", f = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = f;
|
|
2182
2188
|
}
|
|
2183
2189
|
if (this._setSelectedCountryTitleAttribute($, n), n) {
|
|
2184
2190
|
const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2185
2191
|
this.selectedDialCode.innerHTML = c, this._updateInputPadding();
|
|
2186
2192
|
}
|
|
2187
|
-
return this._updatePlaceholder(), this._updateMaxLength(),
|
|
2193
|
+
return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== $;
|
|
2188
2194
|
}
|
|
2189
2195
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2190
2196
|
_updateInputPadding() {
|
|
@@ -2198,17 +2204,17 @@ class K2 {
|
|
|
2198
2204
|
const { strictMode: $, placeholderNumberType: n, validationNumberTypes: i } = this.options, { iso2: o } = this.selectedCountryData;
|
|
2199
2205
|
if ($ && C.utils)
|
|
2200
2206
|
if (o) {
|
|
2201
|
-
const
|
|
2207
|
+
const l = C.utils.numberType[n];
|
|
2202
2208
|
let c = C.utils.getExampleNumber(
|
|
2203
2209
|
o,
|
|
2204
2210
|
!1,
|
|
2205
|
-
|
|
2211
|
+
l,
|
|
2206
2212
|
!0
|
|
2207
|
-
),
|
|
2213
|
+
), f = c;
|
|
2208
2214
|
for (; C.utils.isPossibleNumber(c, o, i); )
|
|
2209
|
-
|
|
2210
|
-
const
|
|
2211
|
-
this.maxCoreNumberLength =
|
|
2215
|
+
f = c, c += "0";
|
|
2216
|
+
const p = C.utils.getCoreNumber(f, o);
|
|
2217
|
+
this.maxCoreNumberLength = p.length, o === "by" && (this.maxCoreNumberLength = p.length + 1);
|
|
2212
2218
|
} else
|
|
2213
2219
|
this.maxCoreNumberLength = null;
|
|
2214
2220
|
}
|
|
@@ -2242,15 +2248,15 @@ class K2 {
|
|
|
2242
2248
|
placeholderNumberType: n,
|
|
2243
2249
|
nationalMode: i,
|
|
2244
2250
|
customPlaceholder: o
|
|
2245
|
-
} = this.options,
|
|
2246
|
-
if (C.utils &&
|
|
2251
|
+
} = this.options, l = $ === "aggressive" || !this.hadInitialPlaceholder && $ === "polite";
|
|
2252
|
+
if (C.utils && l) {
|
|
2247
2253
|
const c = C.utils.numberType[n];
|
|
2248
|
-
let
|
|
2254
|
+
let f = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
|
|
2249
2255
|
this.selectedCountryData.iso2,
|
|
2250
2256
|
i,
|
|
2251
2257
|
c
|
|
2252
2258
|
) : "";
|
|
2253
|
-
|
|
2259
|
+
f = this._beforeSetNumber(f), typeof o == "function" && (f = o(f, this.selectedCountryData)), this.telInput.setAttribute("placeholder", f);
|
|
2254
2260
|
}
|
|
2255
2261
|
}
|
|
2256
2262
|
//* Called when the user selects a list item from the dropdown.
|
|
@@ -2272,12 +2278,12 @@ class K2 {
|
|
|
2272
2278
|
}
|
|
2273
2279
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2274
2280
|
_scrollTo($) {
|
|
2275
|
-
const n = this.countryList, i = document.documentElement.scrollTop, o = n.offsetHeight,
|
|
2276
|
-
if (
|
|
2277
|
-
n.scrollTop =
|
|
2278
|
-
else if (
|
|
2279
|
-
const
|
|
2280
|
-
n.scrollTop =
|
|
2281
|
+
const n = this.countryList, i = document.documentElement.scrollTop, o = n.offsetHeight, l = n.getBoundingClientRect().top + i, c = l + o, f = $.offsetHeight, p = $.getBoundingClientRect().top + i, w = p + f, I = p - l + n.scrollTop;
|
|
2282
|
+
if (p < l)
|
|
2283
|
+
n.scrollTop = I;
|
|
2284
|
+
else if (w > c) {
|
|
2285
|
+
const S = o - f;
|
|
2286
|
+
n.scrollTop = I - S;
|
|
2281
2287
|
}
|
|
2282
2288
|
}
|
|
2283
2289
|
//* Replace any existing dial code with the new one
|
|
@@ -2286,8 +2292,8 @@ class K2 {
|
|
|
2286
2292
|
const n = this.telInput.value, i = `+${$}`;
|
|
2287
2293
|
let o;
|
|
2288
2294
|
if (n.charAt(0) === "+") {
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2295
|
+
const l = this._getDialCode(n);
|
|
2296
|
+
l ? o = n.replace(l, i) : o = i, this.telInput.value = o;
|
|
2291
2297
|
}
|
|
2292
2298
|
}
|
|
2293
2299
|
//* Try and extract a valid international dial code from a full telephone number.
|
|
@@ -2296,13 +2302,13 @@ class K2 {
|
|
|
2296
2302
|
let i = "";
|
|
2297
2303
|
if ($.charAt(0) === "+") {
|
|
2298
2304
|
let o = "";
|
|
2299
|
-
for (let
|
|
2300
|
-
const c = $.charAt(
|
|
2305
|
+
for (let l = 0; l < $.length; l++) {
|
|
2306
|
+
const c = $.charAt(l);
|
|
2301
2307
|
if (!isNaN(parseInt(c, 10))) {
|
|
2302
2308
|
if (o += c, n)
|
|
2303
|
-
this.dialCodeToIso2Map[o] && (i = $.substr(0,
|
|
2309
|
+
this.dialCodeToIso2Map[o] && (i = $.substr(0, l + 1));
|
|
2304
2310
|
else if (this.dialCodes[o]) {
|
|
2305
|
-
i = $.substr(0,
|
|
2311
|
+
i = $.substr(0, l + 1);
|
|
2306
2312
|
break;
|
|
2307
2313
|
}
|
|
2308
2314
|
if (o.length === this.dialCodeMaxLen)
|
|
@@ -2316,8 +2322,8 @@ class K2 {
|
|
|
2316
2322
|
_getFullNumber($) {
|
|
2317
2323
|
const n = $ || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
|
|
2318
2324
|
let o;
|
|
2319
|
-
const
|
|
2320
|
-
return this.options.separateDialCode && n.charAt(0) !== "+" && i &&
|
|
2325
|
+
const l = c1(n);
|
|
2326
|
+
return this.options.separateDialCode && n.charAt(0) !== "+" && i && l ? o = `+${i}` : o = "", o + n;
|
|
2321
2327
|
}
|
|
2322
2328
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
2323
2329
|
_beforeSetNumber($) {
|
|
@@ -2357,7 +2363,7 @@ class K2 {
|
|
|
2357
2363
|
//********************
|
|
2358
2364
|
//* Remove plugin.
|
|
2359
2365
|
destroy() {
|
|
2360
|
-
var
|
|
2366
|
+
var l, c;
|
|
2361
2367
|
const { allowDropdown: $, separateDialCode: n } = this.options;
|
|
2362
2368
|
if ($) {
|
|
2363
2369
|
this._closeDropdown(), this.selectedCountry.removeEventListener(
|
|
@@ -2367,13 +2373,13 @@ class K2 {
|
|
|
2367
2373
|
"keydown",
|
|
2368
2374
|
this._handleCountryContainerKeydown
|
|
2369
2375
|
);
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2376
|
+
const f = this.telInput.closest("label");
|
|
2377
|
+
f && f.removeEventListener("click", this._handleLabelClick);
|
|
2372
2378
|
}
|
|
2373
2379
|
const { form: i } = this.telInput;
|
|
2374
2380
|
this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2375
2381
|
const o = this.telInput.parentNode;
|
|
2376
|
-
(
|
|
2382
|
+
(l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
|
|
2377
2383
|
}
|
|
2378
2384
|
//* Get the extension from the current number.
|
|
2379
2385
|
getExtension() {
|
|
@@ -2419,8 +2425,8 @@ class K2 {
|
|
|
2419
2425
|
return !1;
|
|
2420
2426
|
const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
|
|
2421
2427
|
if (n > -1) {
|
|
2422
|
-
const i = $.substring(0, n), o = this._utilsIsPossibleNumber(i),
|
|
2423
|
-
return o &&
|
|
2428
|
+
const i = $.substring(0, n), o = this._utilsIsPossibleNumber(i), l = this._utilsIsPossibleNumber($);
|
|
2429
|
+
return o && l;
|
|
2424
2430
|
}
|
|
2425
2431
|
return this._utilsIsPossibleNumber($);
|
|
2426
2432
|
}
|
|
@@ -2433,8 +2439,8 @@ class K2 {
|
|
|
2433
2439
|
return !1;
|
|
2434
2440
|
const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
|
|
2435
2441
|
if (n > -1) {
|
|
2436
|
-
const i = $.substring(0, n), o = this._utilsIsValidNumber(i),
|
|
2437
|
-
return o &&
|
|
2442
|
+
const i = $.substring(0, n), o = this._utilsIsValidNumber(i), l = this._utilsIsValidNumber($);
|
|
2443
|
+
return o && l;
|
|
2438
2444
|
}
|
|
2439
2445
|
return this._utilsIsValidNumber($);
|
|
2440
2446
|
}
|
|
@@ -2486,7 +2492,7 @@ const H2 = (y) => {
|
|
|
2486
2492
|
return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), C.instances[n.id] = n, n;
|
|
2487
2493
|
},
|
|
2488
2494
|
{
|
|
2489
|
-
defaults:
|
|
2495
|
+
defaults: a2,
|
|
2490
2496
|
//* Using a static var like this allows us to mock it in the tests.
|
|
2491
2497
|
documentReady: () => document.readyState === "complete",
|
|
2492
2498
|
//* Get the country data object.
|
|
@@ -2501,7 +2507,7 @@ const H2 = (y) => {
|
|
|
2501
2507
|
attachUtils: H2,
|
|
2502
2508
|
startedLoadingUtilsScript: !1,
|
|
2503
2509
|
startedLoadingAutoCountry: !1,
|
|
2504
|
-
version: "25.0.
|
|
2510
|
+
version: "25.0.2"
|
|
2505
2511
|
}
|
|
2506
2512
|
);
|
|
2507
2513
|
(function() {
|
|
@@ -2516,8 +2522,8 @@ const H2 = (y) => {
|
|
|
2516
2522
|
function e() {
|
|
2517
2523
|
}
|
|
2518
2524
|
e.prototype = t.prototype, d.ma = t.prototype, d.prototype = new e(), d.prototype.constructor = d, d.sa = function(r, s, u) {
|
|
2519
|
-
for (var
|
|
2520
|
-
return t.prototype[s].apply(r,
|
|
2525
|
+
for (var a = Array(arguments.length - 2), h = 2; h < arguments.length; h++) a[h - 2] = arguments[h];
|
|
2526
|
+
return t.prototype[s].apply(r, a);
|
|
2521
2527
|
};
|
|
2522
2528
|
}
|
|
2523
2529
|
function i(d) {
|
|
@@ -2528,16 +2534,16 @@ const H2 = (y) => {
|
|
|
2528
2534
|
}
|
|
2529
2535
|
var o = class {
|
|
2530
2536
|
constructor(d) {
|
|
2531
|
-
if (
|
|
2537
|
+
if (l !== l) throw Error("SafeUrl is not meant to be built directly");
|
|
2532
2538
|
this.g = d;
|
|
2533
2539
|
}
|
|
2534
2540
|
toString() {
|
|
2535
2541
|
return this.g.toString();
|
|
2536
2542
|
}
|
|
2537
|
-
},
|
|
2543
|
+
}, l = {};
|
|
2538
2544
|
new o("about:invalid#zClosurez"), new o("about:blank");
|
|
2539
2545
|
const c = {};
|
|
2540
|
-
class
|
|
2546
|
+
class f {
|
|
2541
2547
|
constructor() {
|
|
2542
2548
|
if (c !== c) throw Error("SafeStyle is not meant to be built directly");
|
|
2543
2549
|
}
|
|
@@ -2545,50 +2551,50 @@ const H2 = (y) => {
|
|
|
2545
2551
|
return "";
|
|
2546
2552
|
}
|
|
2547
2553
|
}
|
|
2548
|
-
new
|
|
2549
|
-
const
|
|
2550
|
-
class
|
|
2554
|
+
new f();
|
|
2555
|
+
const p = {};
|
|
2556
|
+
class w {
|
|
2551
2557
|
constructor() {
|
|
2552
|
-
if (
|
|
2558
|
+
if (p !== p) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
2553
2559
|
}
|
|
2554
2560
|
toString() {
|
|
2555
2561
|
return "";
|
|
2556
2562
|
}
|
|
2557
2563
|
}
|
|
2558
|
-
new
|
|
2559
|
-
const
|
|
2560
|
-
class
|
|
2564
|
+
new w();
|
|
2565
|
+
const I = {};
|
|
2566
|
+
class S {
|
|
2561
2567
|
constructor() {
|
|
2562
2568
|
var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
|
|
2563
|
-
if (
|
|
2569
|
+
if (I !== I) throw Error("SafeHtml is not meant to be built directly");
|
|
2564
2570
|
this.g = t;
|
|
2565
2571
|
}
|
|
2566
2572
|
toString() {
|
|
2567
2573
|
return this.g.toString();
|
|
2568
2574
|
}
|
|
2569
2575
|
}
|
|
2570
|
-
new
|
|
2571
|
-
function
|
|
2576
|
+
new S();
|
|
2577
|
+
function A(d, t) {
|
|
2572
2578
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2573
2579
|
case G:
|
|
2574
2580
|
case F:
|
|
2575
2581
|
case M:
|
|
2576
2582
|
case x:
|
|
2577
2583
|
case f1:
|
|
2578
|
-
case
|
|
2579
|
-
case
|
|
2584
|
+
case T:
|
|
2585
|
+
case _:
|
|
2580
2586
|
this.o = !0;
|
|
2581
2587
|
}
|
|
2582
2588
|
this.j = t.defaultValue;
|
|
2583
2589
|
}
|
|
2584
|
-
var
|
|
2590
|
+
var _ = 1, T = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
|
|
2585
2591
|
function v1(d, t) {
|
|
2586
2592
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2587
2593
|
var e = t[d];
|
|
2588
2594
|
this.g[e.g] = e;
|
|
2589
2595
|
}
|
|
2590
2596
|
}
|
|
2591
|
-
function
|
|
2597
|
+
function l2(d) {
|
|
2592
2598
|
return d = i(d.g), d.sort(function(t, e) {
|
|
2593
2599
|
return t.g - e.g;
|
|
2594
2600
|
}), d;
|
|
@@ -2599,22 +2605,22 @@ const H2 = (y) => {
|
|
|
2599
2605
|
R.prototype.has = function(d) {
|
|
2600
2606
|
return B(this, d.g);
|
|
2601
2607
|
}, R.prototype.get = function(d, t) {
|
|
2602
|
-
return
|
|
2608
|
+
return g(this, d.g, t);
|
|
2603
2609
|
}, R.prototype.set = function(d, t) {
|
|
2604
2610
|
E(this, d.g, t);
|
|
2605
2611
|
}, R.prototype.add = function(d, t) {
|
|
2606
2612
|
w1(this, d.g, t);
|
|
2607
2613
|
};
|
|
2608
2614
|
function S1(d, t) {
|
|
2609
|
-
for (var e =
|
|
2615
|
+
for (var e = l2(d.m()), r = 0; r < e.length; r++) {
|
|
2610
2616
|
var s = e[r], u = s.g;
|
|
2611
2617
|
if (B(t, u)) {
|
|
2612
2618
|
d.g && delete d.g[s.g];
|
|
2613
|
-
var
|
|
2619
|
+
var a = s.h == 11 || s.h == 10;
|
|
2614
2620
|
if (s.l) {
|
|
2615
2621
|
s = P(t, u);
|
|
2616
|
-
for (var h = 0; h < s.length; h++) w1(d, u,
|
|
2617
|
-
} else s = n1(t, u),
|
|
2622
|
+
for (var h = 0; h < s.length; h++) w1(d, u, a ? s[h].clone() : s[h]);
|
|
2623
|
+
} else s = n1(t, u), a ? (a = n1(d, u)) ? S1(a, s) : E(d, u, s.clone()) : E(d, u, s);
|
|
2618
2624
|
}
|
|
2619
2625
|
}
|
|
2620
2626
|
}
|
|
@@ -2632,7 +2638,7 @@ const H2 = (y) => {
|
|
|
2632
2638
|
if (!(t in d.g)) {
|
|
2633
2639
|
var r = d.l, s = d.j[t];
|
|
2634
2640
|
if (e != null) if (s.l) {
|
|
2635
|
-
for (var u = [],
|
|
2641
|
+
for (var u = [], a = 0; a < e.length; a++) u[a] = r.h(s, e[a]);
|
|
2636
2642
|
e = u;
|
|
2637
2643
|
} else e = r.h(s, e);
|
|
2638
2644
|
return d.g[t] = e;
|
|
@@ -2641,12 +2647,12 @@ const H2 = (y) => {
|
|
|
2641
2647
|
}
|
|
2642
2648
|
return e;
|
|
2643
2649
|
}
|
|
2644
|
-
function
|
|
2650
|
+
function g(d, t, e) {
|
|
2645
2651
|
var r = n1(d, t);
|
|
2646
2652
|
return d.j[t].l ? r[e || 0] : r;
|
|
2647
2653
|
}
|
|
2648
|
-
function
|
|
2649
|
-
if (B(d, t)) d =
|
|
2654
|
+
function v(d, t) {
|
|
2655
|
+
if (B(d, t)) d = g(d, t);
|
|
2650
2656
|
else d: {
|
|
2651
2657
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2652
2658
|
else if (t === Number) d.j = 0;
|
|
@@ -2673,7 +2679,7 @@ const H2 = (y) => {
|
|
|
2673
2679
|
}
|
|
2674
2680
|
function i1(d, t) {
|
|
2675
2681
|
var e = [], r;
|
|
2676
|
-
for (r in t) r != 0 && e.push(new
|
|
2682
|
+
for (r in t) r != 0 && e.push(new A(r, t[r]));
|
|
2677
2683
|
return new v1(d, e);
|
|
2678
2684
|
}
|
|
2679
2685
|
function r1() {
|
|
@@ -2702,63 +2708,63 @@ const H2 = (y) => {
|
|
|
2702
2708
|
}, q.prototype.g = function(d, t) {
|
|
2703
2709
|
return q.ma.g.call(this, d, t);
|
|
2704
2710
|
};
|
|
2705
|
-
function
|
|
2711
|
+
function L(d, t) {
|
|
2706
2712
|
d != null && this.g.apply(this, arguments);
|
|
2707
2713
|
}
|
|
2708
|
-
|
|
2714
|
+
L.prototype.h = "", L.prototype.set = function(d) {
|
|
2709
2715
|
this.h = "" + d;
|
|
2710
|
-
},
|
|
2716
|
+
}, L.prototype.g = function(d, t, e) {
|
|
2711
2717
|
if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
|
|
2712
2718
|
return this;
|
|
2713
2719
|
};
|
|
2714
2720
|
function k(d) {
|
|
2715
2721
|
d.h = "";
|
|
2716
2722
|
}
|
|
2717
|
-
|
|
2723
|
+
L.prototype.toString = function() {
|
|
2718
2724
|
return this.h;
|
|
2719
2725
|
};
|
|
2720
2726
|
function z() {
|
|
2721
2727
|
R.call(this);
|
|
2722
2728
|
}
|
|
2723
2729
|
n(z, R);
|
|
2724
|
-
var
|
|
2725
|
-
function
|
|
2730
|
+
var A1 = null;
|
|
2731
|
+
function b() {
|
|
2726
2732
|
R.call(this);
|
|
2727
2733
|
}
|
|
2728
|
-
n(
|
|
2729
|
-
var
|
|
2734
|
+
n(b, R);
|
|
2735
|
+
var L1 = null;
|
|
2730
2736
|
function Z() {
|
|
2731
2737
|
R.call(this);
|
|
2732
2738
|
}
|
|
2733
2739
|
n(Z, R);
|
|
2734
|
-
var
|
|
2740
|
+
var N1 = null;
|
|
2735
2741
|
z.prototype.m = function() {
|
|
2742
|
+
var d = A1;
|
|
2743
|
+
return d || (A1 = d = i1(z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
|
|
2744
|
+
}, z.m = z.prototype.m, b.prototype.m = function() {
|
|
2736
2745
|
var d = L1;
|
|
2737
|
-
return d || (L1 = d = i1(
|
|
2738
|
-
},
|
|
2746
|
+
return d || (L1 = d = i1(b, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
2747
|
+
}, b.m = b.prototype.m, Z.prototype.m = function() {
|
|
2739
2748
|
var d = N1;
|
|
2740
|
-
return d || (N1 = d = i1(
|
|
2741
|
-
}, w.m = w.prototype.m, Z.prototype.m = function() {
|
|
2742
|
-
var d = T1;
|
|
2743
|
-
return d || (T1 = d = i1(Z, {
|
|
2749
|
+
return d || (N1 = d = i1(Z, {
|
|
2744
2750
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2745
|
-
1: { name: "general_desc", i: 11, type:
|
|
2746
|
-
2: { name: "fixed_line", i: 11, type:
|
|
2747
|
-
3: { name: "mobile", i: 11, type:
|
|
2748
|
-
4: { name: "toll_free", i: 11, type:
|
|
2749
|
-
5: { name: "premium_rate", i: 11, type:
|
|
2750
|
-
6: { name: "shared_cost", i: 11, type:
|
|
2751
|
-
7: { name: "personal_number", i: 11, type:
|
|
2752
|
-
8: { name: "voip", i: 11, type:
|
|
2753
|
-
21: { name: "pager", i: 11, type:
|
|
2754
|
-
25: { name: "uan", i: 11, type:
|
|
2755
|
-
27: { name: "emergency", i: 11, type:
|
|
2756
|
-
28: { name: "voicemail", i: 11, type:
|
|
2757
|
-
29: { name: "short_code", i: 11, type:
|
|
2758
|
-
30: { name: "standard_rate", i: 11, type:
|
|
2759
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
2760
|
-
33: { name: "sms_services", i: 11, type:
|
|
2761
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
2751
|
+
1: { name: "general_desc", i: 11, type: b },
|
|
2752
|
+
2: { name: "fixed_line", i: 11, type: b },
|
|
2753
|
+
3: { name: "mobile", i: 11, type: b },
|
|
2754
|
+
4: { name: "toll_free", i: 11, type: b },
|
|
2755
|
+
5: { name: "premium_rate", i: 11, type: b },
|
|
2756
|
+
6: { name: "shared_cost", i: 11, type: b },
|
|
2757
|
+
7: { name: "personal_number", i: 11, type: b },
|
|
2758
|
+
8: { name: "voip", i: 11, type: b },
|
|
2759
|
+
21: { name: "pager", i: 11, type: b },
|
|
2760
|
+
25: { name: "uan", i: 11, type: b },
|
|
2761
|
+
27: { name: "emergency", i: 11, type: b },
|
|
2762
|
+
28: { name: "voicemail", i: 11, type: b },
|
|
2763
|
+
29: { name: "short_code", i: 11, type: b },
|
|
2764
|
+
30: { name: "standard_rate", i: 11, type: b },
|
|
2765
|
+
31: { name: "carrier_specific", i: 11, type: b },
|
|
2766
|
+
33: { name: "sms_services", i: 11, type: b },
|
|
2767
|
+
24: { name: "no_international_dialling", i: 11, type: b },
|
|
2762
2768
|
9: { name: "id", required: !0, i: 9, type: String },
|
|
2763
2769
|
10: { name: "country_code", i: 5, type: Number },
|
|
2764
2770
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -2782,10 +2788,10 @@ const H2 = (y) => {
|
|
|
2782
2788
|
R.call(this);
|
|
2783
2789
|
}
|
|
2784
2790
|
n(H, R);
|
|
2785
|
-
var
|
|
2791
|
+
var T1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
2786
2792
|
H.prototype.m = function() {
|
|
2787
|
-
var d =
|
|
2788
|
-
return d || (
|
|
2793
|
+
var d = T1;
|
|
2794
|
+
return d || (T1 = d = i1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: h2 }, 7: {
|
|
2789
2795
|
name: "preferred_domestic_carrier_code",
|
|
2790
2796
|
i: 9,
|
|
2791
2797
|
type: String
|
|
@@ -7981,7 +7987,7 @@ const H2 = (y) => {
|
|
|
7981
7987
|
return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
|
|
7982
7988
|
}
|
|
7983
7989
|
function s1(d, t) {
|
|
7984
|
-
for (var e = new
|
|
7990
|
+
for (var e = new L(), r, s = d.length, u = 0; u < s; ++u) r = d.charAt(u), r = t[r.toUpperCase()], r != null && e.g(r);
|
|
7985
7991
|
return e.toString();
|
|
7986
7992
|
}
|
|
7987
7993
|
function O1(d) {
|
|
@@ -7991,40 +7997,40 @@ const H2 = (y) => {
|
|
|
7991
7997
|
return d != null && isNaN(d) && d.toUpperCase() in E1;
|
|
7992
7998
|
}
|
|
7993
7999
|
D.prototype.format = function(d, t) {
|
|
7994
|
-
if (
|
|
7995
|
-
var e =
|
|
8000
|
+
if (g(d, 2) == 0 && B(d, 5)) {
|
|
8001
|
+
var e = v(d, 5);
|
|
7996
8002
|
if (0 < e.length) return e;
|
|
7997
8003
|
}
|
|
7998
|
-
e =
|
|
8004
|
+
e = v(d, 1);
|
|
7999
8005
|
var r = t1(d);
|
|
8000
8006
|
if (t == 0) return G1(e, 0, r, "");
|
|
8001
8007
|
if (!(e in X)) return r;
|
|
8002
8008
|
var s = d1(this, e, e1(e));
|
|
8003
|
-
d = B(d, 3) &&
|
|
8009
|
+
d = B(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : B(s, 13) ? g(s, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
|
|
8004
8010
|
d: {
|
|
8005
8011
|
s = P(s, 20).length == 0 || t == 2 ? P(s, 19) : P(s, 20);
|
|
8006
|
-
for (var u,
|
|
8012
|
+
for (var u, a = s.length, h = 0; h < a; ++h) {
|
|
8007
8013
|
u = s[h];
|
|
8008
8014
|
var m = K(u, 3);
|
|
8009
|
-
if ((m == 0 || r.search(
|
|
8015
|
+
if ((m == 0 || r.search(g(u, 3, m - 1)) == 0) && (m = new RegExp(g(u, 1)), U(m, r))) {
|
|
8010
8016
|
s = u;
|
|
8011
8017
|
break d;
|
|
8012
8018
|
}
|
|
8013
8019
|
}
|
|
8014
8020
|
s = null;
|
|
8015
8021
|
}
|
|
8016
|
-
return s != null && (
|
|
8017
|
-
|
|
8022
|
+
return s != null && (a = s, s = v(a, 2), u = new RegExp(g(a, 1)), v(
|
|
8023
|
+
a,
|
|
8018
8024
|
5
|
|
8019
|
-
),
|
|
8025
|
+
), a = v(a, 4), r = t == 2 && a != null && 0 < a.length ? r.replace(u, s.replace(S2, a)) : r.replace(u, s), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1(e, t, r, d);
|
|
8020
8026
|
};
|
|
8021
8027
|
function d1(d, t, e) {
|
|
8022
8028
|
return e == "001" ? j(d, "" + t) : j(d, e);
|
|
8023
8029
|
}
|
|
8024
8030
|
function t1(d) {
|
|
8025
8031
|
if (!B(d, 2)) return "";
|
|
8026
|
-
var t = "" +
|
|
8027
|
-
return B(d, 4) &&
|
|
8032
|
+
var t = "" + g(d, 2);
|
|
8033
|
+
return B(d, 4) && g(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
|
|
8028
8034
|
}
|
|
8029
8035
|
function G1(d, t, e, r) {
|
|
8030
8036
|
switch (t) {
|
|
@@ -8041,36 +8047,36 @@ const H2 = (y) => {
|
|
|
8041
8047
|
function u1(d, t) {
|
|
8042
8048
|
switch (t) {
|
|
8043
8049
|
case 4:
|
|
8044
|
-
return
|
|
8050
|
+
return g(d, 5);
|
|
8045
8051
|
case 3:
|
|
8046
|
-
return
|
|
8052
|
+
return g(d, 4);
|
|
8047
8053
|
case 1:
|
|
8048
|
-
return
|
|
8054
|
+
return g(d, 3);
|
|
8049
8055
|
case 0:
|
|
8050
8056
|
case 2:
|
|
8051
|
-
return
|
|
8057
|
+
return g(d, 2);
|
|
8052
8058
|
case 5:
|
|
8053
|
-
return
|
|
8059
|
+
return g(d, 6);
|
|
8054
8060
|
case 6:
|
|
8055
|
-
return
|
|
8061
|
+
return g(d, 8);
|
|
8056
8062
|
case 7:
|
|
8057
|
-
return
|
|
8063
|
+
return g(d, 7);
|
|
8058
8064
|
case 8:
|
|
8059
|
-
return
|
|
8065
|
+
return g(d, 21);
|
|
8060
8066
|
case 9:
|
|
8061
|
-
return
|
|
8067
|
+
return g(d, 25);
|
|
8062
8068
|
case 10:
|
|
8063
|
-
return
|
|
8069
|
+
return g(d, 28);
|
|
8064
8070
|
default:
|
|
8065
|
-
return
|
|
8071
|
+
return g(d, 1);
|
|
8066
8072
|
}
|
|
8067
8073
|
}
|
|
8068
8074
|
function F1(d, t) {
|
|
8069
8075
|
var e = U1(d, t);
|
|
8070
|
-
return d = d1(d,
|
|
8076
|
+
return d = d1(d, v(t, 1), e), d == null ? -1 : (t = t1(t), C1(t, d));
|
|
8071
8077
|
}
|
|
8072
8078
|
function C1(d, t) {
|
|
8073
|
-
return O(d,
|
|
8079
|
+
return O(d, g(t, 1)) ? O(d, g(t, 5)) ? 4 : O(d, g(t, 4)) ? 3 : O(d, g(t, 6)) ? 5 : O(d, g(t, 8)) ? 6 : O(d, g(t, 7)) ? 7 : O(d, g(t, 21)) ? 8 : O(d, g(t, 25)) ? 9 : O(d, g(t, 28)) ? 10 : O(d, g(t, 2)) ? g(t, 18) || O(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && O(d, g(t, 3)) ? 1 : -1 : -1;
|
|
8074
8080
|
}
|
|
8075
8081
|
function j(d, t) {
|
|
8076
8082
|
if (t == null) return null;
|
|
@@ -8084,28 +8090,28 @@ const H2 = (y) => {
|
|
|
8084
8090
|
}
|
|
8085
8091
|
function O(d, t) {
|
|
8086
8092
|
var e = d.length;
|
|
8087
|
-
return 0 < K(t, 9) && P(t, 9).indexOf(e) == -1 ? !1 : U(
|
|
8093
|
+
return 0 < K(t, 9) && P(t, 9).indexOf(e) == -1 ? !1 : U(v(t, 2), d);
|
|
8088
8094
|
}
|
|
8089
8095
|
function b2(d, t) {
|
|
8090
|
-
var e = U1(d, t), r =
|
|
8096
|
+
var e = U1(d, t), r = v(t, 1), s = d1(d, r, e);
|
|
8091
8097
|
return s == null || e != "001" && r != V1(d, e) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
|
|
8092
8098
|
}
|
|
8093
8099
|
function U1(d, t) {
|
|
8094
8100
|
if (t == null) return null;
|
|
8095
|
-
var e =
|
|
8101
|
+
var e = v(t, 1);
|
|
8096
8102
|
if (e = X[e], e == null) d = null;
|
|
8097
8103
|
else if (e.length == 1) d = e[0];
|
|
8098
8104
|
else d: {
|
|
8099
8105
|
t = t1(t);
|
|
8100
8106
|
for (var r, s = e.length, u = 0; u < s; u++) {
|
|
8101
8107
|
r = e[u];
|
|
8102
|
-
var
|
|
8103
|
-
if (B(
|
|
8104
|
-
if (t.search(
|
|
8108
|
+
var a = j(d, r);
|
|
8109
|
+
if (B(a, 23)) {
|
|
8110
|
+
if (t.search(g(a, 23)) == 0) {
|
|
8105
8111
|
d = r;
|
|
8106
8112
|
break d;
|
|
8107
8113
|
}
|
|
8108
|
-
} else if (C1(t,
|
|
8114
|
+
} else if (C1(t, a) != -1) {
|
|
8109
8115
|
d = r;
|
|
8110
8116
|
break d;
|
|
8111
8117
|
}
|
|
@@ -8119,17 +8125,17 @@ const H2 = (y) => {
|
|
|
8119
8125
|
}
|
|
8120
8126
|
function V1(d, t) {
|
|
8121
8127
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8122
|
-
return
|
|
8128
|
+
return v(d, 10);
|
|
8123
8129
|
}
|
|
8124
|
-
function
|
|
8125
|
-
var s = u1(e, r), u = K(s, 9) == 0 ? P(
|
|
8126
|
-
if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(
|
|
8127
|
-
else return
|
|
8130
|
+
function a1(d, t, e, r) {
|
|
8131
|
+
var s = u1(e, r), u = K(s, 9) == 0 ? P(g(e, 1), 9) : P(s, 9);
|
|
8132
|
+
if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(g(e, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
|
|
8133
|
+
else return a1(d, t, e, 1);
|
|
8128
8134
|
return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : (e = u[0], e == t ? 0 : e > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
|
|
8129
8135
|
}
|
|
8130
|
-
function
|
|
8136
|
+
function l1(d, t, e) {
|
|
8131
8137
|
var r = t1(t);
|
|
8132
|
-
return t =
|
|
8138
|
+
return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, r, t, e)) : 1;
|
|
8133
8139
|
}
|
|
8134
8140
|
function K1(d, t) {
|
|
8135
8141
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
@@ -8138,35 +8144,35 @@ const H2 = (y) => {
|
|
|
8138
8144
|
}
|
|
8139
8145
|
function H1(d, t, e, r, s, u) {
|
|
8140
8146
|
if (t.length == 0) return 0;
|
|
8141
|
-
t = new
|
|
8142
|
-
var
|
|
8143
|
-
e != null && (
|
|
8147
|
+
t = new L(t);
|
|
8148
|
+
var a;
|
|
8149
|
+
e != null && (a = g(e, 11)), a == null && (a = "NonMatch");
|
|
8144
8150
|
var h = t.toString();
|
|
8145
|
-
if (h.length == 0)
|
|
8146
|
-
else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)),
|
|
8151
|
+
if (h.length == 0) a = 20;
|
|
8152
|
+
else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), a = 1;
|
|
8147
8153
|
else {
|
|
8148
|
-
if (h = new RegExp(
|
|
8149
|
-
h =
|
|
8150
|
-
var m =
|
|
8151
|
-
m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ?
|
|
8152
|
-
} else
|
|
8153
|
-
|
|
8154
|
+
if (h = new RegExp(a), B1(t), a = t.toString(), a.search(h) == 0) {
|
|
8155
|
+
h = a.match(h)[0].length;
|
|
8156
|
+
var m = a.substring(h).match(D1);
|
|
8157
|
+
m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? a = !1 : (k(t), t.g(a.substring(h)), a = !0);
|
|
8158
|
+
} else a = !1;
|
|
8159
|
+
a = a ? 5 : 20;
|
|
8154
8160
|
}
|
|
8155
|
-
if (s && E(u, 6,
|
|
8161
|
+
if (s && E(u, 6, a), a != 20) {
|
|
8156
8162
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
8157
8163
|
if (d = K1(t, r), d != 0) return E(u, 1, d), d;
|
|
8158
8164
|
throw Error("Invalid country calling code");
|
|
8159
8165
|
}
|
|
8160
|
-
return e != null && (
|
|
8166
|
+
return e != null && (a = v(e, 10), h = "" + a, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = g(e, 1), m = new RegExp(v(m, 2)), j1(h, e, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || a1(d, t.toString(), e, -1) == 3)) ? (r.g(h), s && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
|
|
8161
8167
|
}
|
|
8162
8168
|
function j1(d, t, e) {
|
|
8163
|
-
var r = d.toString(), s = r.length, u =
|
|
8169
|
+
var r = d.toString(), s = r.length, u = g(t, 15);
|
|
8164
8170
|
if (s != 0 && u != null && u.length != 0) {
|
|
8165
|
-
var
|
|
8166
|
-
if (s =
|
|
8167
|
-
u = new RegExp(
|
|
8171
|
+
var a = new RegExp("^(?:" + u + ")");
|
|
8172
|
+
if (s = a.exec(r)) {
|
|
8173
|
+
u = new RegExp(v(g(t, 1), 2));
|
|
8168
8174
|
var h = U(u, r), m = s.length - 1;
|
|
8169
|
-
t =
|
|
8175
|
+
t = g(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, r.substring(s[0].length))) && (e != null && 0 < m && s[m] != null && e.g(s[1]), d.set(r.substring(s[0].length))) : (r = r.replace(a, t), (!h || U(u, r)) && (e != null && 0 < m && e.g(s[1]), d.set(r)));
|
|
8170
8176
|
}
|
|
8171
8177
|
}
|
|
8172
8178
|
}
|
|
@@ -8177,40 +8183,40 @@ const H2 = (y) => {
|
|
|
8177
8183
|
function W1(d, t, e, r) {
|
|
8178
8184
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8179
8185
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8180
|
-
var s = new
|
|
8186
|
+
var s = new L(), u = t.indexOf(";phone-context=");
|
|
8181
8187
|
if (u === -1) u = null;
|
|
8182
8188
|
else if (u += 15, u >= t.length) u = "";
|
|
8183
8189
|
else {
|
|
8184
|
-
var
|
|
8185
|
-
u =
|
|
8190
|
+
var a = t.indexOf(";", u);
|
|
8191
|
+
u = a !== -1 ? t.substring(u, a) : t.substring(u);
|
|
8186
8192
|
}
|
|
8187
8193
|
var h = u;
|
|
8188
|
-
if (h == null ?
|
|
8194
|
+
if (h == null ? a = !0 : h.length === 0 ? a = !1 : (a = _2.exec(h), h = I2.exec(h), a = a !== null || h !== null), !a || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, a = t ?? "", h = a.search(g2), 0 <= h ? (a = a.substring(h), a = a.replace(m2, ""), h = a.search(C2), 0 <= h && (a = a.substring(0, h))) : a = "", u.call(s, a)), u = s.toString(), a = u.indexOf(";isub="), 0 < a && (k(s), s.g(u.substring(0, a))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8189
8195
|
if (u = s.toString(), !(o1(e) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
|
|
8190
8196
|
u = new H(), r && E(u, 5, t);
|
|
8191
8197
|
d: {
|
|
8192
|
-
if (t = s.toString(),
|
|
8198
|
+
if (t = s.toString(), a = t.search(P1), 0 <= a && x1(t.substring(0, a))) {
|
|
8193
8199
|
h = t.match(P1);
|
|
8194
8200
|
for (var m = h.length, V = 1; V < m; ++V) if (h[V] != null && 0 < h[V].length) {
|
|
8195
|
-
k(s), s.g(t.substring(0,
|
|
8201
|
+
k(s), s.g(t.substring(0, a)), t = h[V];
|
|
8196
8202
|
break d;
|
|
8197
8203
|
}
|
|
8198
8204
|
}
|
|
8199
8205
|
t = "";
|
|
8200
8206
|
}
|
|
8201
|
-
0 < t.length && E(u, 3, t),
|
|
8207
|
+
0 < t.length && E(u, 3, t), a = j(d, e), t = new L(), h = 0, m = s.toString();
|
|
8202
8208
|
try {
|
|
8203
|
-
h = H1(d, m,
|
|
8209
|
+
h = H1(d, m, a, t, r, u);
|
|
8204
8210
|
} catch (_1) {
|
|
8205
8211
|
if (_1.message == "Invalid country calling code" && Q.test(m)) {
|
|
8206
|
-
if (m = m.replace(Q, ""), h = H1(d, m,
|
|
8212
|
+
if (m = m.replace(Q, ""), h = H1(d, m, a, t, r, u), h == 0) throw _1;
|
|
8207
8213
|
} else throw _1;
|
|
8208
8214
|
}
|
|
8209
|
-
if (h != 0 ? (s = e1(h), s != e && (
|
|
8215
|
+
if (h != 0 ? (s = e1(h), s != e && (a = d1(d, h, s))) : (B1(s), t.g(s.toString()), e != null ? (h = v(a, 10), E(
|
|
8210
8216
|
u,
|
|
8211
8217
|
1,
|
|
8212
8218
|
h
|
|
8213
|
-
)) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (
|
|
8219
|
+
)) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (a != null && (e = new L(), s = new L(t.toString()), j1(s, a, e), d = a1(d, s.toString(), a, -1), d != 2 && d != 4 && d != 5 && (t = s, r && 0 < e.toString().length && E(u, 7, e.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8214
8220
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8215
8221
|
if (1 < r.length && r.charAt(0) == "0") {
|
|
8216
8222
|
for (E(u, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
|
|
@@ -8221,37 +8227,37 @@ const H2 = (y) => {
|
|
|
8221
8227
|
function U(d, t) {
|
|
8222
8228
|
return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
|
|
8223
8229
|
}
|
|
8224
|
-
function
|
|
8225
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
8230
|
+
function A2(d) {
|
|
8231
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new L(), this.da = "", this.s = new L(), this.ba = new L(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new L(), this.ha = !1, this.o = "", this.g = new L(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
|
|
8226
8232
|
}
|
|
8227
8233
|
var z1 = new Z();
|
|
8228
8234
|
E(z1, 11, "NA");
|
|
8229
|
-
var
|
|
8235
|
+
var L2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
|
|
8230
8236
|
function Y1(d, t) {
|
|
8231
8237
|
var e = d.ga;
|
|
8232
8238
|
return t = o1(t) ? V1(e, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
|
|
8233
8239
|
}
|
|
8234
8240
|
function J1(d) {
|
|
8235
8241
|
for (var t = d.j.length, e = 0; e < t; ++e) {
|
|
8236
|
-
var r = d.j[e], s =
|
|
8242
|
+
var r = d.j[e], s = v(r, 1);
|
|
8237
8243
|
if (d.da == s) return !1;
|
|
8238
|
-
var u = d,
|
|
8244
|
+
var u = d, a = r, h = v(a, 1);
|
|
8239
8245
|
k(u.v);
|
|
8240
8246
|
var m = u;
|
|
8241
|
-
|
|
8247
|
+
a = v(a, 2);
|
|
8242
8248
|
var V = "999999999999999".match(h)[0];
|
|
8243
|
-
if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"),
|
|
8249
|
+
if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), a), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(g(r, 4)), d.$ = 0, !0;
|
|
8244
8250
|
}
|
|
8245
8251
|
return d.u = !1;
|
|
8246
8252
|
}
|
|
8247
8253
|
function q1(d, t) {
|
|
8248
8254
|
for (var e = [], r = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
|
|
8249
|
-
var
|
|
8250
|
-
K(
|
|
8255
|
+
var a = d.j[u];
|
|
8256
|
+
K(a, 3) == 0 ? e.push(d.j[u]) : (a = g(a, 3, Math.min(r, K(a, 3) - 1)), t.search(a) == 0 && e.push(d.j[u]));
|
|
8251
8257
|
}
|
|
8252
8258
|
d.j = e;
|
|
8253
8259
|
}
|
|
8254
|
-
function
|
|
8260
|
+
function N2(d, t) {
|
|
8255
8261
|
d.s.g(t);
|
|
8256
8262
|
var e = t;
|
|
8257
8263
|
if (D1.test(e) || d.s.h.length == 1 && p2.test(e) ? (t == "+" ? (e = t, d.ba.g(t)) : (e = g1[t], d.ba.g(e), d.g.g(e)), t = e) : (d.u = !1, d.la = !0), !d.u) {
|
|
@@ -8279,8 +8285,8 @@ const H2 = (y) => {
|
|
|
8279
8285
|
}
|
|
8280
8286
|
function Q1(d) {
|
|
8281
8287
|
for (var t = d.g.toString(), e = d.j.length, r = 0; r < e; ++r) {
|
|
8282
|
-
var s = d.j[r], u =
|
|
8283
|
-
if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(
|
|
8288
|
+
var s = d.j[r], u = v(s, 1);
|
|
8289
|
+
if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(g(s, 4)), s = t.replace(new RegExp(u, "g"), g(s, 2)), s = h1(d, s), s1(s, c2) == d.ba)) return s;
|
|
8284
8290
|
}
|
|
8285
8291
|
return "";
|
|
8286
8292
|
}
|
|
@@ -8293,7 +8299,7 @@ const H2 = (y) => {
|
|
|
8293
8299
|
if (3 <= t.length) {
|
|
8294
8300
|
for (var e = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), r = e.length, s = 0; s < r; ++s) {
|
|
8295
8301
|
var u = e[s];
|
|
8296
|
-
0 < d.o.length && O1(
|
|
8302
|
+
0 < d.o.length && O1(v(u, 4)) && !g(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || g(u, 6)) && L2.test(v(u, 2)) && d.j.push(u);
|
|
8297
8303
|
}
|
|
8298
8304
|
return q1(d, t), t = Q1(d), 0 < t.length ? t : J1(d) ? d2(d) : d.s.toString();
|
|
8299
8305
|
}
|
|
@@ -8309,17 +8315,17 @@ const H2 = (y) => {
|
|
|
8309
8315
|
}
|
|
8310
8316
|
function t2(d) {
|
|
8311
8317
|
var t = d.g.toString(), e = 0;
|
|
8312
|
-
if (
|
|
8318
|
+
if (g(d.l, 10) != 1) var r = !1;
|
|
8313
8319
|
else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
|
|
8314
|
-
return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (r = new RegExp("^(?:" +
|
|
8320
|
+
return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (r = new RegExp("^(?:" + g(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, e = r[0].length, d.h.g(t.substring(0, e)))), k(d.g), d.g.g(t.substring(e)), t.substring(0, e);
|
|
8315
8321
|
}
|
|
8316
8322
|
function e2(d) {
|
|
8317
|
-
var t = d.ba.toString(), e = new RegExp("^(?:\\+|" +
|
|
8323
|
+
var t = d.ba.toString(), e = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
8318
8324
|
return e = t.match(e), e != null && e[0] != null && 0 < e[0].length ? (d.ca = !0, e = e[0].length, k(d.g), d.g.g(t.substring(e)), k(d.h), d.h.g(t.substring(0, e)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
|
|
8319
8325
|
}
|
|
8320
8326
|
function $2(d) {
|
|
8321
8327
|
if (d.g.h.length == 0) return !1;
|
|
8322
|
-
var t = new
|
|
8328
|
+
var t = new L(), e = K1(d.g, t);
|
|
8323
8329
|
return e == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1(e), t == "001" ? d.l = j(d.ga, "" + e) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + e).g(" "), d.o = "", !0);
|
|
8324
8330
|
}
|
|
8325
8331
|
function n2(d, t) {
|
|
@@ -8333,9 +8339,9 @@ const H2 = (y) => {
|
|
|
8333
8339
|
const y1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
|
|
8334
8340
|
$("intlTelInputUtilsTemp", {}), $("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8335
8341
|
try {
|
|
8336
|
-
const e = d.replace(/[^+0-9]/g, ""), r = new
|
|
8342
|
+
const e = d.replace(/[^+0-9]/g, ""), r = new A2(t);
|
|
8337
8343
|
t = "";
|
|
8338
|
-
for (let s = 0; s < e.length; s++) r.ja =
|
|
8344
|
+
for (let s = 0; s < e.length; s++) r.ja = N2(r, e.charAt(s)), t = r.ja;
|
|
8339
8345
|
return t;
|
|
8340
8346
|
} catch {
|
|
8341
8347
|
return d;
|
|
@@ -8343,7 +8349,7 @@ const H2 = (y) => {
|
|
|
8343
8349
|
}), $("intlTelInputUtilsTemp.formatNumber", (d, t, e) => {
|
|
8344
8350
|
try {
|
|
8345
8351
|
const s = D.g(), u = Y(s, d, t);
|
|
8346
|
-
var r =
|
|
8352
|
+
var r = l1(s, u, -1);
|
|
8347
8353
|
return r == 0 || r == 4 ? s.format(u, typeof e > "u" ? 0 : e) : d;
|
|
8348
8354
|
} catch {
|
|
8349
8355
|
return d;
|
|
@@ -8357,7 +8363,7 @@ const H2 = (y) => {
|
|
|
8357
8363
|
var u = u1(j(s, d), e);
|
|
8358
8364
|
try {
|
|
8359
8365
|
if (B(u, 6)) {
|
|
8360
|
-
var
|
|
8366
|
+
var a = g(u, 6), h = W1(s, a, d, !1);
|
|
8361
8367
|
break d;
|
|
8362
8368
|
}
|
|
8363
8369
|
} catch {
|
|
@@ -8371,7 +8377,7 @@ const H2 = (y) => {
|
|
|
8371
8377
|
}
|
|
8372
8378
|
}), $("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8373
8379
|
try {
|
|
8374
|
-
return
|
|
8380
|
+
return g(Y(D.g(), d, t), 3);
|
|
8375
8381
|
} catch {
|
|
8376
8382
|
return "";
|
|
8377
8383
|
}
|
|
@@ -8386,7 +8392,7 @@ const H2 = (y) => {
|
|
|
8386
8392
|
if (!t) return 1;
|
|
8387
8393
|
try {
|
|
8388
8394
|
const e = D.g(), r = Y(e, d, t);
|
|
8389
|
-
return
|
|
8395
|
+
return l1(e, r, -1);
|
|
8390
8396
|
} catch (e) {
|
|
8391
8397
|
return e.message === "Invalid country calling code" ? 1 : 3 >= d.length || e.message === "Phone number too short after IDD" || e.message === "The string supplied is too short to be a phone number" ? 2 : e.message === "The string supplied is too long to be a phone number" ? 3 : -99;
|
|
8392
8398
|
}
|
|
@@ -8394,8 +8400,8 @@ const H2 = (y) => {
|
|
|
8394
8400
|
try {
|
|
8395
8401
|
const r = D.g(), s = Y(r, d, t), u = b2(r, s);
|
|
8396
8402
|
if (e) {
|
|
8397
|
-
const
|
|
8398
|
-
return u &&
|
|
8403
|
+
const a = e.map((h) => y1[h]);
|
|
8404
|
+
return u && a.includes(F1(r, s));
|
|
8399
8405
|
}
|
|
8400
8406
|
return u;
|
|
8401
8407
|
} catch {
|
|
@@ -8406,16 +8412,16 @@ const H2 = (y) => {
|
|
|
8406
8412
|
const r = D.g(), s = Y(r, d, t);
|
|
8407
8413
|
if (e) {
|
|
8408
8414
|
e.includes("FIXED_LINE_OR_MOBILE") && (e.includes("MOBILE") || e.push("MOBILE"), e.includes("FIXED_LINE") || e.push("FIXED_LINE"));
|
|
8409
|
-
for (let u of e) if (
|
|
8415
|
+
for (let u of e) if (l1(r, s, y1[u]) === 0) return !0;
|
|
8410
8416
|
return !1;
|
|
8411
8417
|
}
|
|
8412
|
-
return
|
|
8418
|
+
return l1(r, s, -1) === 0;
|
|
8413
8419
|
} catch {
|
|
8414
8420
|
return !1;
|
|
8415
8421
|
}
|
|
8416
8422
|
}), $("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8417
8423
|
try {
|
|
8418
|
-
return
|
|
8424
|
+
return g(Y(D.g(), d, t), 2).toString();
|
|
8419
8425
|
} catch {
|
|
8420
8426
|
return "";
|
|
8421
8427
|
}
|
|
@@ -8457,37 +8463,37 @@ const z2 = {
|
|
|
8457
8463
|
"changeErrorCode"
|
|
8458
8464
|
], ["update:modelValue"]),
|
|
8459
8465
|
setup(y, { expose: $, emit: n }) {
|
|
8460
|
-
const i =
|
|
8461
|
-
let
|
|
8462
|
-
|
|
8466
|
+
const i = T2(y, "modelValue"), o = y, l = n, c = I1(), f = I1(), p = I1(!1), w = () => f.value ? o.options.strictMode ? f.value.isValidNumberPrecise() : f.value.isValidNumber() : null, I = () => {
|
|
8467
|
+
let _ = w();
|
|
8468
|
+
p.value !== _ && (p.value = _, l("changeValidity", !!_), l(
|
|
8463
8469
|
"changeErrorCode",
|
|
8464
|
-
|
|
8470
|
+
_ ? null : f.value.getValidationError()
|
|
8465
8471
|
));
|
|
8466
|
-
},
|
|
8467
|
-
var
|
|
8468
|
-
|
|
8469
|
-
},
|
|
8470
|
-
var
|
|
8471
|
-
|
|
8472
|
+
}, S = () => {
|
|
8473
|
+
var _;
|
|
8474
|
+
l("changeNumber", ((_ = f.value) == null ? void 0 : _.getNumber()) ?? ""), I();
|
|
8475
|
+
}, A = () => {
|
|
8476
|
+
var _;
|
|
8477
|
+
l("changeCountry", ((_ = f.value) == null ? void 0 : _.getSelectedCountryData().iso2) ?? ""), S(), I();
|
|
8472
8478
|
};
|
|
8473
8479
|
return E2(() => {
|
|
8474
|
-
c.value && (
|
|
8480
|
+
c.value && (f.value = C(c.value, o.options), o.value && f.value.setNumber(o.value), o.disabled && f.value.setDisabled(o.disabled));
|
|
8475
8481
|
}), D2(
|
|
8476
8482
|
() => o.disabled,
|
|
8477
|
-
(
|
|
8478
|
-
var
|
|
8479
|
-
return (
|
|
8483
|
+
(_) => {
|
|
8484
|
+
var T;
|
|
8485
|
+
return (T = f.value) == null ? void 0 : T.setDisabled(_);
|
|
8480
8486
|
}
|
|
8481
8487
|
), M2(() => {
|
|
8482
|
-
var
|
|
8483
|
-
return (
|
|
8484
|
-
}), $({ instance:
|
|
8488
|
+
var _;
|
|
8489
|
+
return (_ = f.value) == null ? void 0 : _.destroy();
|
|
8490
|
+
}), $({ instance: f, input: c }), (_, T) => P2((x2(), R2("input", B2({
|
|
8485
8491
|
ref_key: "input",
|
|
8486
8492
|
ref: c,
|
|
8487
|
-
"onUpdate:modelValue":
|
|
8493
|
+
"onUpdate:modelValue": T[0] || (T[0] = (G) => i.value = G),
|
|
8488
8494
|
type: "tel",
|
|
8489
|
-
onCountrychange:
|
|
8490
|
-
onInput:
|
|
8495
|
+
onCountrychange: A,
|
|
8496
|
+
onInput: S
|
|
8491
8497
|
}, y.inputProps), null, 16)), [
|
|
8492
8498
|
[k2, i.value]
|
|
8493
8499
|
]);
|