intl-tel-input 25.5.2 → 25.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/README.md +15 -15
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +170 -116
- package/angular/build/IntlTelInputWithUtils.js +235 -202
- package/angular/build/types/intl-tel-input/data.d.ts +7 -2
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +1 -0
- package/angular/build/types/intl-tel-input.d.ts +14 -2
- package/build/css/intlTelInput.css +67 -6
- package/build/css/intlTelInput.min.css +1 -1
- package/build/js/data.js +6 -6
- package/build/js/data.min.js +2 -2
- package/build/js/i18n/en/interface.js +1 -0
- package/build/js/intlTelInput.d.ts +22 -4
- package/build/js/intlTelInput.js +187 -119
- package/build/js/intlTelInput.min.js +13 -2
- package/build/js/intlTelInputWithUtils.js +251 -204
- package/build/js/intlTelInputWithUtils.min.js +13 -2
- package/build/js/utils.js +22 -21
- package/package.json +9 -12
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +186 -118
- package/react/build/IntlTelInput.d.ts +22 -4
- package/react/build/IntlTelInput.js +186 -118
- package/react/build/IntlTelInputWithUtils.cjs +250 -203
- package/react/build/IntlTelInputWithUtils.js +250 -203
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +333 -274
- package/vue/build/IntlTelInputWithUtils.mjs +800 -763
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mergeModels as
|
|
2
|
-
const
|
|
1
|
+
import { mergeModels as r2, useModel as D2, ref as v1, onMounted as x2, watch as P2, onUnmounted as R2, withDirectives as B2, createElementBlock as k2, openBlock as O2, mergeProps as G2, vModelText as U2 } from "vue";
|
|
2
|
+
const F2 = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
5
5
|
// Afghanistan
|
|
@@ -1322,21 +1322,20 @@ const s2 = [
|
|
|
1322
1322
|
// Zimbabwe
|
|
1323
1323
|
"263"
|
|
1324
1324
|
]
|
|
1325
|
-
],
|
|
1326
|
-
for (
|
|
1327
|
-
|
|
1328
|
-
W[I] = {
|
|
1325
|
+
], q = [];
|
|
1326
|
+
for (const y of F2)
|
|
1327
|
+
q.push({
|
|
1329
1328
|
name: "",
|
|
1330
|
-
//
|
|
1331
|
-
iso2:
|
|
1332
|
-
dialCode:
|
|
1333
|
-
priority:
|
|
1334
|
-
areaCodes:
|
|
1329
|
+
// populated in the plugin
|
|
1330
|
+
iso2: y[0],
|
|
1331
|
+
dialCode: y[1],
|
|
1332
|
+
priority: y[2] || 0,
|
|
1333
|
+
areaCodes: y[3] || null,
|
|
1335
1334
|
nodeById: {},
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
}
|
|
1339
|
-
const
|
|
1335
|
+
// populated by the plugin
|
|
1336
|
+
nationalPrefix: y[4] || null
|
|
1337
|
+
});
|
|
1338
|
+
const V2 = {
|
|
1340
1339
|
ad: "Andorra",
|
|
1341
1340
|
ae: "United Arab Emirates",
|
|
1342
1341
|
af: "Afghanistan",
|
|
@@ -1579,22 +1578,29 @@ const F2 = {
|
|
|
1579
1578
|
za: "South Africa",
|
|
1580
1579
|
zm: "Zambia",
|
|
1581
1580
|
zw: "Zimbabwe"
|
|
1582
|
-
},
|
|
1581
|
+
}, K2 = {
|
|
1583
1582
|
selectedCountryAriaLabel: "Selected country",
|
|
1584
1583
|
noCountrySelected: "No country selected",
|
|
1585
1584
|
countryListAriaLabel: "List of countries",
|
|
1586
1585
|
searchPlaceholder: "Search",
|
|
1586
|
+
clearSearchAriaLabel: "Clear search",
|
|
1587
1587
|
zeroSearchResults: "No results found",
|
|
1588
1588
|
oneSearchResult: "1 result found",
|
|
1589
1589
|
multipleSearchResults: "${count} results found",
|
|
1590
1590
|
// additional countries (not supported by country-list library)
|
|
1591
1591
|
ac: "Ascension Island",
|
|
1592
1592
|
xk: "Kosovo"
|
|
1593
|
-
}, u2 = { ...
|
|
1594
|
-
for (
|
|
1595
|
-
|
|
1596
|
-
let
|
|
1597
|
-
const
|
|
1593
|
+
}, u2 = { ...V2, ...K2 };
|
|
1594
|
+
for (const y of q)
|
|
1595
|
+
y.name = u2[y.iso2];
|
|
1596
|
+
let H2 = 0;
|
|
1597
|
+
const S1 = (y) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(y).matches, j2 = () => {
|
|
1598
|
+
if (typeof navigator < "u" && typeof window < "u") {
|
|
1599
|
+
const y = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), e = S1("(max-width: 500px)"), i = S1("(max-height: 600px)"), s = S1("(pointer: coarse)");
|
|
1600
|
+
return y || e || s && i;
|
|
1601
|
+
}
|
|
1602
|
+
return !1;
|
|
1603
|
+
}, l2 = {
|
|
1598
1604
|
//* Whether or not to allow the dropdown.
|
|
1599
1605
|
allowDropdown: !0,
|
|
1600
1606
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
@@ -1640,16 +1646,10 @@ const l2 = {
|
|
|
1640
1646
|
//* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
|
|
1641
1647
|
strictMode: !1,
|
|
1642
1648
|
//* Use full screen popup instead of dropdown for country list.
|
|
1643
|
-
useFullscreenPopup:
|
|
1644
|
-
//* We cannot just test screen size as some smartphones/website meta tags will report desktop resolutions.
|
|
1645
|
-
//* Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'
|
|
1646
|
-
/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
1647
|
-
navigator.userAgent
|
|
1648
|
-
) || window.innerWidth <= 500
|
|
1649
|
-
) : !1,
|
|
1649
|
+
useFullscreenPopup: j2(),
|
|
1650
1650
|
//* The number type to enforce during validation.
|
|
1651
1651
|
validationNumberTypes: ["MOBILE"]
|
|
1652
|
-
},
|
|
1652
|
+
}, W2 = [
|
|
1653
1653
|
"800",
|
|
1654
1654
|
"822",
|
|
1655
1655
|
"833",
|
|
@@ -1667,44 +1667,51 @@ const l2 = {
|
|
|
1667
1667
|
"887",
|
|
1668
1668
|
"888",
|
|
1669
1669
|
"889"
|
|
1670
|
-
],
|
|
1671
|
-
const e =
|
|
1670
|
+
], f1 = (y) => y.replace(/\D/g, ""), o2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), a2 = (y) => {
|
|
1671
|
+
const e = f1(y);
|
|
1672
1672
|
if (e.charAt(0) === "1") {
|
|
1673
|
-
const i = e.
|
|
1674
|
-
return
|
|
1673
|
+
const i = e.substring(1, 4);
|
|
1674
|
+
return W2.includes(i);
|
|
1675
1675
|
}
|
|
1676
1676
|
return !1;
|
|
1677
|
-
},
|
|
1677
|
+
}, z2 = (y, e, i, s) => {
|
|
1678
1678
|
if (i === 0 && !s)
|
|
1679
1679
|
return 0;
|
|
1680
|
-
let
|
|
1681
|
-
for (let
|
|
1682
|
-
if (/[+0-9]/.test(e[
|
|
1683
|
-
return
|
|
1684
|
-
if (s &&
|
|
1685
|
-
return
|
|
1680
|
+
let r = 0;
|
|
1681
|
+
for (let l = 0; l < e.length; l++) {
|
|
1682
|
+
if (/[+0-9]/.test(e[l]) && r++, r === y && !s)
|
|
1683
|
+
return l + 1;
|
|
1684
|
+
if (s && r === y + 1)
|
|
1685
|
+
return l;
|
|
1686
1686
|
}
|
|
1687
1687
|
return e.length;
|
|
1688
|
-
},
|
|
1689
|
-
const s = document.createElement(
|
|
1690
|
-
return e && Object.entries(e).forEach(([
|
|
1691
|
-
},
|
|
1692
|
-
const { instances: i } =
|
|
1693
|
-
Object.values(i).forEach((s) => s[
|
|
1688
|
+
}, T = (y, e, i) => {
|
|
1689
|
+
const s = document.createElement(y);
|
|
1690
|
+
return e && Object.entries(e).forEach(([r, l]) => s.setAttribute(r, l)), i && i.appendChild(s), s;
|
|
1691
|
+
}, i1 = (y, ...e) => {
|
|
1692
|
+
const { instances: i } = m;
|
|
1693
|
+
Object.values(i).forEach((s) => s[y](...e));
|
|
1694
1694
|
};
|
|
1695
|
-
class
|
|
1695
|
+
class p1 {
|
|
1696
|
+
/**
|
|
1697
|
+
* Build a space-delimited class string from an object map of className -> truthy/falsey.
|
|
1698
|
+
* Only keys with truthy values are included.
|
|
1699
|
+
*/
|
|
1700
|
+
static _buildClassNames(e) {
|
|
1701
|
+
return Object.keys(e).filter((i) => !!e[i]).join(" ");
|
|
1702
|
+
}
|
|
1696
1703
|
constructor(e, i = {}) {
|
|
1697
|
-
this.id =
|
|
1704
|
+
this.id = H2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, l2, i), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
|
|
1698
1705
|
}
|
|
1699
1706
|
//* Can't be private as it's called from intlTelInput convenience wrapper.
|
|
1700
1707
|
_init() {
|
|
1701
1708
|
this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.telInput.dir = "ltr";
|
|
1702
1709
|
const e = this.options.allowDropdown || this.options.separateDialCode;
|
|
1703
1710
|
this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
|
|
1704
|
-
const i = new Promise((
|
|
1705
|
-
this.resolveAutoCountryPromise =
|
|
1706
|
-
}), s = new Promise((
|
|
1707
|
-
this.resolveUtilsScriptPromise =
|
|
1711
|
+
const i = new Promise((r, l) => {
|
|
1712
|
+
this.resolveAutoCountryPromise = r, this.rejectAutoCountryPromise = l;
|
|
1713
|
+
}), s = new Promise((r, l) => {
|
|
1714
|
+
this.resolveUtilsScriptPromise = r, this.rejectUtilsScriptPromise = l;
|
|
1708
1715
|
});
|
|
1709
1716
|
this.promise = Promise.all([i, s]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
|
|
1710
1717
|
}
|
|
@@ -1713,16 +1720,21 @@ class j2 {
|
|
|
1713
1720
|
//********************
|
|
1714
1721
|
//* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
|
|
1715
1722
|
_processCountryData() {
|
|
1716
|
-
this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries();
|
|
1723
|
+
this._processAllCountries(), this._processDialCodes(), this._translateCountryNames(), this._sortCountries(), this.countryByIso2 = new Map(this.countries.map((e) => [e.iso2, e])), this._cacheSearchTokens();
|
|
1724
|
+
}
|
|
1725
|
+
//* Precompute and cache country search tokens to speed up filtering
|
|
1726
|
+
_cacheSearchTokens() {
|
|
1727
|
+
for (const e of this.countries)
|
|
1728
|
+
e.normalisedName = o2(e.name), e.initials = e.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((i) => i[0]).join("").toLowerCase(), e.dialCodePlus = `+${e.dialCode}`;
|
|
1717
1729
|
}
|
|
1718
1730
|
//* Sort countries by countryOrder option (if present), then name.
|
|
1719
1731
|
_sortCountries() {
|
|
1720
1732
|
this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, i) => {
|
|
1721
1733
|
const { countryOrder: s } = this.options;
|
|
1722
1734
|
if (s) {
|
|
1723
|
-
const
|
|
1724
|
-
if (c ||
|
|
1725
|
-
return c &&
|
|
1735
|
+
const r = s.indexOf(e.iso2), l = s.indexOf(i.iso2), c = r > -1, C = l > -1;
|
|
1736
|
+
if (c || C)
|
|
1737
|
+
return c && C ? r - l : c ? -1 : 1;
|
|
1726
1738
|
}
|
|
1727
1739
|
return e.name.localeCompare(i.name);
|
|
1728
1740
|
});
|
|
@@ -1730,168 +1742,221 @@ class j2 {
|
|
|
1730
1742
|
//* Add a dial code to this.dialCodeToIso2Map.
|
|
1731
1743
|
_addToDialCodeMap(e, i, s) {
|
|
1732
1744
|
i.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = i.length), this.dialCodeToIso2Map.hasOwnProperty(i) || (this.dialCodeToIso2Map[i] = []);
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1745
|
+
const r = this.dialCodeToIso2Map[i];
|
|
1746
|
+
if (r.includes(e))
|
|
1747
|
+
return;
|
|
1748
|
+
const l = s !== void 0 ? s : r.length;
|
|
1749
|
+
r[l] = e;
|
|
1738
1750
|
}
|
|
1739
1751
|
//* Process onlyCountries or excludeCountries array if present.
|
|
1740
1752
|
_processAllCountries() {
|
|
1741
1753
|
const { onlyCountries: e, excludeCountries: i } = this.options;
|
|
1742
1754
|
if (e.length) {
|
|
1743
1755
|
const s = e.map(
|
|
1744
|
-
(
|
|
1756
|
+
(r) => r.toLowerCase()
|
|
1745
1757
|
);
|
|
1746
|
-
this.countries =
|
|
1747
|
-
(
|
|
1758
|
+
this.countries = q.filter(
|
|
1759
|
+
(r) => s.includes(r.iso2)
|
|
1748
1760
|
);
|
|
1749
1761
|
} else if (i.length) {
|
|
1750
1762
|
const s = i.map(
|
|
1751
|
-
(
|
|
1763
|
+
(r) => r.toLowerCase()
|
|
1752
1764
|
);
|
|
1753
|
-
this.countries =
|
|
1754
|
-
(
|
|
1765
|
+
this.countries = q.filter(
|
|
1766
|
+
(r) => !s.includes(r.iso2)
|
|
1755
1767
|
);
|
|
1756
1768
|
} else
|
|
1757
|
-
this.countries =
|
|
1769
|
+
this.countries = q;
|
|
1758
1770
|
}
|
|
1759
1771
|
//* Translate Countries by object literal provided on config.
|
|
1760
1772
|
_translateCountryNames() {
|
|
1761
|
-
for (
|
|
1762
|
-
const i =
|
|
1763
|
-
this.options.i18n.hasOwnProperty(i) && (
|
|
1773
|
+
for (const e of this.countries) {
|
|
1774
|
+
const i = e.iso2.toLowerCase();
|
|
1775
|
+
this.options.i18n.hasOwnProperty(i) && (e.name = this.options.i18n[i]);
|
|
1764
1776
|
}
|
|
1765
1777
|
}
|
|
1766
1778
|
//* Generate this.dialCodes and this.dialCodeToIso2Map.
|
|
1767
1779
|
_processDialCodes() {
|
|
1768
|
-
this.dialCodes =
|
|
1769
|
-
for (
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
const a = i.areaCodes[o];
|
|
1779
|
-
for (let c = 1; c < a.length; c++) {
|
|
1780
|
-
const g = a.substr(0, c), f = i.dialCode + g;
|
|
1781
|
-
this._addToDialCodeMap(s, f), this._addToDialCodeMap(i.iso2, f);
|
|
1780
|
+
this.dialCodes = /* @__PURE__ */ new Set(), this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
|
|
1781
|
+
for (const e of this.countries)
|
|
1782
|
+
this.dialCodes.has(e.dialCode) || this.dialCodes.add(e.dialCode), this._addToDialCodeMap(e.iso2, e.dialCode, e.priority);
|
|
1783
|
+
for (const e of this.countries)
|
|
1784
|
+
if (e.areaCodes) {
|
|
1785
|
+
const i = this.dialCodeToIso2Map[e.dialCode][0];
|
|
1786
|
+
for (const s of e.areaCodes) {
|
|
1787
|
+
for (let r = 1; r < s.length; r++) {
|
|
1788
|
+
const l = s.substring(0, r), c = e.dialCode + l;
|
|
1789
|
+
this._addToDialCodeMap(i, c), this._addToDialCodeMap(e.iso2, c);
|
|
1782
1790
|
}
|
|
1783
|
-
this._addToDialCodeMap(
|
|
1791
|
+
this._addToDialCodeMap(e.iso2, e.dialCode + s);
|
|
1784
1792
|
}
|
|
1785
1793
|
}
|
|
1786
|
-
}
|
|
1787
1794
|
}
|
|
1788
1795
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
1789
1796
|
_generateMarkup() {
|
|
1790
|
-
var
|
|
1797
|
+
var p, I, G;
|
|
1791
1798
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
1792
1799
|
const {
|
|
1793
1800
|
allowDropdown: e,
|
|
1794
1801
|
separateDialCode: i,
|
|
1795
1802
|
showFlags: s,
|
|
1796
|
-
containerClass:
|
|
1797
|
-
hiddenInput:
|
|
1803
|
+
containerClass: r,
|
|
1804
|
+
hiddenInput: l,
|
|
1798
1805
|
dropdownContainer: c,
|
|
1799
|
-
fixDropdownWidth:
|
|
1806
|
+
fixDropdownWidth: C,
|
|
1800
1807
|
useFullscreenPopup: f,
|
|
1801
|
-
countrySearch:
|
|
1802
|
-
i18n:
|
|
1803
|
-
} = this.options
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1808
|
+
countrySearch: S,
|
|
1809
|
+
i18n: w
|
|
1810
|
+
} = this.options, b = p1._buildClassNames({
|
|
1811
|
+
iti: !0,
|
|
1812
|
+
"iti--allow-dropdown": e,
|
|
1813
|
+
"iti--show-flags": s,
|
|
1814
|
+
"iti--inline-dropdown": !f,
|
|
1815
|
+
[r]: !!r
|
|
1816
|
+
}), L = T("div", { class: b });
|
|
1817
|
+
if ((p = this.telInput.parentNode) == null || p.insertBefore(L, this.telInput), e || s || i) {
|
|
1818
|
+
this.countryContainer = T(
|
|
1809
1819
|
"div",
|
|
1810
1820
|
{ class: "iti__country-container" },
|
|
1811
1821
|
L
|
|
1812
|
-
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry =
|
|
1822
|
+
), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
|
|
1813
1823
|
"button",
|
|
1814
1824
|
{
|
|
1815
1825
|
type: "button",
|
|
1816
1826
|
class: "iti__selected-country",
|
|
1817
1827
|
"aria-expanded": "false",
|
|
1818
1828
|
"aria-label": this.options.i18n.selectedCountryAriaLabel,
|
|
1819
|
-
"aria-haspopup": "
|
|
1820
|
-
"aria-controls": `iti-${this.id}__dropdown-content
|
|
1821
|
-
role: "combobox"
|
|
1829
|
+
"aria-haspopup": "dialog",
|
|
1830
|
+
"aria-controls": `iti-${this.id}__dropdown-content`
|
|
1822
1831
|
},
|
|
1823
1832
|
this.countryContainer
|
|
1824
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
1833
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
|
|
1825
1834
|
"div",
|
|
1826
1835
|
{ class: "iti__selected-country" },
|
|
1827
1836
|
this.countryContainer
|
|
1828
1837
|
);
|
|
1829
|
-
const
|
|
1830
|
-
if (this.selectedCountryInner =
|
|
1838
|
+
const U = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
1839
|
+
if (this.selectedCountryInner = T("div", { class: "iti__flag" }, U), this.selectedCountryA11yText = T(
|
|
1831
1840
|
"span",
|
|
1832
1841
|
{ class: "iti__a11y-text" },
|
|
1833
1842
|
this.selectedCountryInner
|
|
1834
|
-
), e && (this.dropdownArrow =
|
|
1843
|
+
), e && (this.dropdownArrow = T(
|
|
1835
1844
|
"div",
|
|
1836
1845
|
{ class: "iti__arrow", "aria-hidden": "true" },
|
|
1837
|
-
|
|
1838
|
-
)), i && (this.selectedDialCode =
|
|
1846
|
+
U
|
|
1847
|
+
)), i && (this.selectedDialCode = T(
|
|
1839
1848
|
"div",
|
|
1840
1849
|
{ class: "iti__selected-dial-code", "aria-hidden": "true", dir: "ltr" },
|
|
1841
1850
|
this.selectedCountry
|
|
1842
1851
|
)), e) {
|
|
1843
|
-
const
|
|
1844
|
-
if (this.dropdownContent =
|
|
1852
|
+
const D = C ? "" : "iti--flexible-dropdown-width";
|
|
1853
|
+
if (this.dropdownContent = T("div", {
|
|
1845
1854
|
id: `iti-${this.id}__dropdown-content`,
|
|
1846
|
-
class: `iti__dropdown-content iti__hide ${
|
|
1847
|
-
|
|
1848
|
-
"
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
"
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1855
|
+
class: `iti__dropdown-content iti__hide ${D}`,
|
|
1856
|
+
role: "dialog",
|
|
1857
|
+
"aria-modal": "true"
|
|
1858
|
+
}), S) {
|
|
1859
|
+
const P = T(
|
|
1860
|
+
"div",
|
|
1861
|
+
{ class: "iti__search-input-wrapper" },
|
|
1862
|
+
this.dropdownContent
|
|
1863
|
+
);
|
|
1864
|
+
this.searchIcon = T(
|
|
1865
|
+
"span",
|
|
1866
|
+
{
|
|
1867
|
+
class: "iti__search-icon",
|
|
1868
|
+
"aria-hidden": "true"
|
|
1869
|
+
},
|
|
1870
|
+
P
|
|
1871
|
+
), this.searchIcon.innerHTML = `
|
|
1872
|
+
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" aria-hidden="true">
|
|
1873
|
+
<circle cx="11" cy="11" r="7" />
|
|
1874
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
1875
|
+
</svg>`, this.searchInput = T(
|
|
1876
|
+
"input",
|
|
1877
|
+
{
|
|
1878
|
+
id: `iti-${this.id}__search-input`,
|
|
1879
|
+
// Chrome says inputs need either a name or an id
|
|
1880
|
+
type: "search",
|
|
1881
|
+
class: "iti__search-input",
|
|
1882
|
+
placeholder: w.searchPlaceholder,
|
|
1883
|
+
// 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
|
|
1884
|
+
role: "combobox",
|
|
1885
|
+
"aria-expanded": "true",
|
|
1886
|
+
"aria-label": w.searchPlaceholder,
|
|
1887
|
+
"aria-controls": `iti-${this.id}__country-listbox`,
|
|
1888
|
+
"aria-autocomplete": "list",
|
|
1889
|
+
autocomplete: "off"
|
|
1890
|
+
},
|
|
1891
|
+
P
|
|
1892
|
+
), this.searchClearButton = T(
|
|
1893
|
+
"button",
|
|
1894
|
+
{
|
|
1895
|
+
type: "button",
|
|
1896
|
+
class: "iti__search-clear iti__hide",
|
|
1897
|
+
"aria-label": w.clearSearchAriaLabel,
|
|
1898
|
+
tabindex: "-1"
|
|
1899
|
+
},
|
|
1900
|
+
P
|
|
1901
|
+
);
|
|
1902
|
+
const Y = `iti-${this.id}-clear-mask`;
|
|
1903
|
+
this.searchClearButton.innerHTML = `
|
|
1904
|
+
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
|
1905
|
+
<mask id="${Y}" maskUnits="userSpaceOnUse">
|
|
1906
|
+
<rect width="16" height="16" fill="white" />
|
|
1907
|
+
<path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
|
|
1908
|
+
</mask>
|
|
1909
|
+
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${Y})" />
|
|
1910
|
+
</svg>`, this.searchResultsA11yText = T(
|
|
1911
|
+
"span",
|
|
1912
|
+
{ class: "iti__a11y-text" },
|
|
1913
|
+
this.dropdownContent
|
|
1914
|
+
), this.searchNoResults = T(
|
|
1915
|
+
"div",
|
|
1916
|
+
{
|
|
1917
|
+
class: "iti__no-results iti__hide",
|
|
1918
|
+
"aria-hidden": "true"
|
|
1919
|
+
// all a11y messaging happens in this.searchResultsA11yText
|
|
1920
|
+
},
|
|
1921
|
+
this.dropdownContent
|
|
1922
|
+
), this.searchNoResults.textContent = w.zeroSearchResults;
|
|
1923
|
+
}
|
|
1924
|
+
if (this.countryList = T(
|
|
1866
1925
|
"ul",
|
|
1867
1926
|
{
|
|
1868
1927
|
class: "iti__country-list",
|
|
1869
1928
|
id: `iti-${this.id}__country-listbox`,
|
|
1870
1929
|
role: "listbox",
|
|
1871
|
-
"aria-label":
|
|
1930
|
+
"aria-label": w.countryListAriaLabel
|
|
1872
1931
|
},
|
|
1873
1932
|
this.dropdownContent
|
|
1874
|
-
), this._appendListItems(),
|
|
1875
|
-
|
|
1876
|
-
|
|
1933
|
+
), this._appendListItems(), S && this._updateSearchResultsA11yText(), c) {
|
|
1934
|
+
const P = p1._buildClassNames({
|
|
1935
|
+
iti: !0,
|
|
1936
|
+
"iti--container": !0,
|
|
1937
|
+
"iti--fullscreen-popup": f,
|
|
1938
|
+
"iti--inline-dropdown": !f,
|
|
1939
|
+
[r]: !!r
|
|
1940
|
+
});
|
|
1941
|
+
this.dropdown = T("div", { class: P }), this.dropdown.appendChild(this.dropdownContent);
|
|
1877
1942
|
} else
|
|
1878
1943
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
1879
1944
|
}
|
|
1880
1945
|
}
|
|
1881
|
-
if (L.appendChild(this.telInput), this._updateInputPadding(),
|
|
1882
|
-
const
|
|
1883
|
-
if (
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1946
|
+
if (L.appendChild(this.telInput), this._updateInputPadding(), l) {
|
|
1947
|
+
const U = this.telInput.getAttribute("name") || "", D = l(U);
|
|
1948
|
+
if (D.phone) {
|
|
1949
|
+
const P = (I = this.telInput.form) == null ? void 0 : I.querySelector(`input[name="${D.phone}"]`);
|
|
1950
|
+
P ? this.hiddenInput = P : (this.hiddenInput = T("input", {
|
|
1886
1951
|
type: "hidden",
|
|
1887
|
-
name:
|
|
1952
|
+
name: D.phone
|
|
1888
1953
|
}), L.appendChild(this.hiddenInput));
|
|
1889
1954
|
}
|
|
1890
|
-
if (
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1955
|
+
if (D.country) {
|
|
1956
|
+
const P = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${D.country}"]`);
|
|
1957
|
+
P ? this.hiddenInputCountry = P : (this.hiddenInputCountry = T("input", {
|
|
1893
1958
|
type: "hidden",
|
|
1894
|
-
name:
|
|
1959
|
+
name: D.country
|
|
1895
1960
|
}), L.appendChild(this.hiddenInputCountry));
|
|
1896
1961
|
}
|
|
1897
1962
|
}
|
|
@@ -1899,7 +1964,7 @@ class j2 {
|
|
|
1899
1964
|
//* For each country: add a country list item <li> to the countryList <ul> container.
|
|
1900
1965
|
_appendListItems() {
|
|
1901
1966
|
for (let e = 0; e < this.countries.length; e++) {
|
|
1902
|
-
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "",
|
|
1967
|
+
const i = this.countries[e], s = e === 0 ? "iti__highlight" : "", r = T(
|
|
1903
1968
|
"li",
|
|
1904
1969
|
{
|
|
1905
1970
|
id: `iti-${this.id}__item-${i.iso2}`,
|
|
@@ -1912,23 +1977,23 @@ class j2 {
|
|
|
1912
1977
|
},
|
|
1913
1978
|
this.countryList
|
|
1914
1979
|
);
|
|
1915
|
-
i.nodeById[this.id] =
|
|
1916
|
-
let
|
|
1917
|
-
this.options.showFlags && (
|
|
1980
|
+
i.nodeById[this.id] = r;
|
|
1981
|
+
let l = "";
|
|
1982
|
+
this.options.showFlags && (l += `<div class='iti__flag iti__${i.iso2}'></div>`), l += `<span class='iti__country-name'>${i.name}</span>`, l += `<span class='iti__dial-code' dir='ltr'>+${i.dialCode}</span>`, r.insertAdjacentHTML("beforeend", l);
|
|
1918
1983
|
}
|
|
1919
1984
|
}
|
|
1920
1985
|
//* Set the initial state of the input value and the selected country by:
|
|
1921
1986
|
//* 1. Extracting a dial code from the given number
|
|
1922
1987
|
//* 2. Using explicit initialCountry
|
|
1923
1988
|
_setInitialState(e = !1) {
|
|
1924
|
-
const i = this.telInput.getAttribute("value"), s = this.telInput.value,
|
|
1925
|
-
if (c && !
|
|
1926
|
-
this._updateCountryFromNumber(
|
|
1927
|
-
else if (!
|
|
1928
|
-
const
|
|
1929
|
-
|
|
1989
|
+
const i = this.telInput.getAttribute("value"), s = this.telInput.value, l = i && i.charAt(0) === "+" && (!s || s.charAt(0) !== "+") ? i : s, c = this._getDialCode(l), C = a2(l), { initialCountry: f, geoIpLookup: S } = this.options, w = f === "auto" && S;
|
|
1990
|
+
if (c && !C)
|
|
1991
|
+
this._updateCountryFromNumber(l);
|
|
1992
|
+
else if (!w || e) {
|
|
1993
|
+
const b = f ? f.toLowerCase() : "";
|
|
1994
|
+
b && this._getCountryData(b, !0) ? this._setCountry(b) : c && C ? this._setCountry("us") : this._setCountry();
|
|
1930
1995
|
}
|
|
1931
|
-
|
|
1996
|
+
l && this._updateValFromNumber(l);
|
|
1932
1997
|
}
|
|
1933
1998
|
//* Initialise the main event listeners: input keyup, and click selected country.
|
|
1934
1999
|
_initListeners() {
|
|
@@ -1962,21 +2027,21 @@ class j2 {
|
|
|
1962
2027
|
//* Init many requests: utils script / geo ip lookup.
|
|
1963
2028
|
_initRequests() {
|
|
1964
2029
|
let { loadUtils: e, initialCountry: i, geoIpLookup: s } = this.options;
|
|
1965
|
-
e && !
|
|
1966
|
-
var
|
|
1967
|
-
window.removeEventListener("load", this._handlePageLoad), (
|
|
2030
|
+
e && !m.utils ? (this._handlePageLoad = () => {
|
|
2031
|
+
var l;
|
|
2032
|
+
window.removeEventListener("load", this._handlePageLoad), (l = m.attachUtils(e)) == null || l.catch(() => {
|
|
1968
2033
|
});
|
|
1969
|
-
},
|
|
2034
|
+
}, m.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), i === "auto" && s && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
1970
2035
|
}
|
|
1971
2036
|
//* Perform the geo ip lookup.
|
|
1972
2037
|
_loadAutoCountry() {
|
|
1973
|
-
|
|
2038
|
+
m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
|
|
1974
2039
|
(e = "") => {
|
|
1975
2040
|
const i = e.toLowerCase();
|
|
1976
|
-
i && this._getCountryData(i, !0) ? (
|
|
2041
|
+
i && this._getCountryData(i, !0) ? (m.autoCountry = i, setTimeout(() => i1("handleAutoCountry"))) : (this._setInitialState(!0), i1("rejectAutoCountryPromise"));
|
|
1977
2042
|
},
|
|
1978
2043
|
() => {
|
|
1979
|
-
this._setInitialState(!0),
|
|
2044
|
+
this._setInitialState(!0), i1("rejectAutoCountryPromise");
|
|
1980
2045
|
}
|
|
1981
2046
|
));
|
|
1982
2047
|
}
|
|
@@ -1985,31 +2050,31 @@ class j2 {
|
|
|
1985
2050
|
}
|
|
1986
2051
|
//* Initialize the tel input listeners.
|
|
1987
2052
|
_initTelInputListeners() {
|
|
1988
|
-
const { strictMode: e, formatAsYouType: i, separateDialCode: s, formatOnDisplay:
|
|
1989
|
-
let
|
|
1990
|
-
new RegExp("\\p{L}", "u").test(this.telInput.value) && (
|
|
1991
|
-
if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && s &&
|
|
1992
|
-
const L = this.telInput.selectionStart || 0,
|
|
1993
|
-
this.telInput.value =
|
|
2053
|
+
const { strictMode: e, formatAsYouType: i, separateDialCode: s, formatOnDisplay: r, allowDropdown: l, countrySearch: c } = this.options;
|
|
2054
|
+
let C = !1;
|
|
2055
|
+
new RegExp("\\p{L}", "u").test(this.telInput.value) && (C = !0), this._handleInputEvent = (f) => {
|
|
2056
|
+
if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && s && l && c) {
|
|
2057
|
+
const L = this.telInput.selectionStart || 0, p = this.telInput.value.substring(0, L - 1), I = this.telInput.value.substring(L);
|
|
2058
|
+
this.telInput.value = p + I, this._openDropdownWithPlus();
|
|
1994
2059
|
return;
|
|
1995
2060
|
}
|
|
1996
2061
|
this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
const
|
|
2000
|
-
if (i && !
|
|
2001
|
-
const L = this.telInput.selectionStart || 0,
|
|
2002
|
-
this.telInput.value =
|
|
2062
|
+
const S = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), w = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
|
|
2063
|
+
S || w && !e ? C = !0 : /[^+0-9]/.test(this.telInput.value) || (C = !1);
|
|
2064
|
+
const b = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !r;
|
|
2065
|
+
if (i && !C && !b) {
|
|
2066
|
+
const L = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, L).replace(/[^+0-9]/g, "").length, G = (f == null ? void 0 : f.inputType) === "deleteContentForward", U = this._formatNumberAsYouType(), D = z2(I, U, L, G);
|
|
2067
|
+
this.telInput.value = U, this.telInput.setSelectionRange(D, D);
|
|
2003
2068
|
}
|
|
2004
2069
|
}, this.telInput.addEventListener("input", this._handleInputEvent), (e || s) && (this._handleKeydownEvent = (f) => {
|
|
2005
2070
|
if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
|
|
2006
|
-
if (s &&
|
|
2071
|
+
if (s && l && c && f.key === "+") {
|
|
2007
2072
|
f.preventDefault(), this._openDropdownWithPlus();
|
|
2008
2073
|
return;
|
|
2009
2074
|
}
|
|
2010
2075
|
if (e) {
|
|
2011
|
-
const
|
|
2012
|
-
(!
|
|
2076
|
+
const S = this.telInput.value, b = !(S.charAt(0) === "+") && this.telInput.selectionStart === 0 && f.key === "+", L = /^[0-9]$/.test(f.key), p = s ? L : b || L, I = S.slice(0, this.telInput.selectionStart) + f.key + S.slice(this.telInput.selectionEnd), G = this._getFullNumber(I), U = m.utils.getCoreNumber(G, this.selectedCountryData.iso2), D = this.maxCoreNumberLength && U.length > this.maxCoreNumberLength, Y = this._getNewCountryFromNumber(G) !== null;
|
|
2077
|
+
(!p || D && !Y && !b) && f.preventDefault();
|
|
2013
2078
|
}
|
|
2014
2079
|
}
|
|
2015
2080
|
}, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
|
|
@@ -2017,7 +2082,7 @@ class j2 {
|
|
|
2017
2082
|
//* Adhere to the input's maxlength attr.
|
|
2018
2083
|
_cap(e) {
|
|
2019
2084
|
const i = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
|
|
2020
|
-
return i && e.length > i ? e.
|
|
2085
|
+
return i && e.length > i ? e.substring(0, i) : e;
|
|
2021
2086
|
}
|
|
2022
2087
|
//* Trigger a custom event on the input.
|
|
2023
2088
|
_trigger(e, i = {}) {
|
|
@@ -2046,17 +2111,17 @@ class j2 {
|
|
|
2046
2111
|
}
|
|
2047
2112
|
//* We only bind dropdown listeners when the dropdown is open.
|
|
2048
2113
|
_bindDropdownListeners() {
|
|
2049
|
-
this._handleMouseoverCountryList = (
|
|
2114
|
+
this._handleMouseoverCountryList = (r) => {
|
|
2050
2115
|
var c;
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2116
|
+
const l = (c = r.target) == null ? void 0 : c.closest(".iti__country");
|
|
2117
|
+
l && this._highlightListItem(l, !1);
|
|
2053
2118
|
}, this.countryList.addEventListener(
|
|
2054
2119
|
"mouseover",
|
|
2055
2120
|
this._handleMouseoverCountryList
|
|
2056
|
-
), this._handleClickCountryList = (
|
|
2121
|
+
), this._handleClickCountryList = (r) => {
|
|
2057
2122
|
var c;
|
|
2058
|
-
const
|
|
2059
|
-
|
|
2123
|
+
const l = (c = r.target) == null ? void 0 : c.closest(".iti__country");
|
|
2124
|
+
l && this._selectListItem(l);
|
|
2060
2125
|
}, this.countryList.addEventListener("click", this._handleClickCountryList);
|
|
2061
2126
|
let e = !0;
|
|
2062
2127
|
this._handleClickOffToClose = () => {
|
|
@@ -2066,67 +2131,65 @@ class j2 {
|
|
|
2066
2131
|
this._handleClickOffToClose
|
|
2067
2132
|
);
|
|
2068
2133
|
let i = "", s = null;
|
|
2069
|
-
if (this._handleKeydownOnDropdown = (
|
|
2070
|
-
["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(
|
|
2134
|
+
if (this._handleKeydownOnDropdown = (r) => {
|
|
2135
|
+
["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(r.key) && (r.preventDefault(), r.stopPropagation(), r.key === "ArrowUp" || r.key === "ArrowDown" ? this._handleUpDownKey(r.key) : r.key === "Enter" ? this._handleEnterKey() : r.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(r.key) && (r.stopPropagation(), s && clearTimeout(s), i += r.key.toLowerCase(), this._searchForCountry(i), s = setTimeout(() => {
|
|
2071
2136
|
i = "";
|
|
2072
2137
|
}, 1e3));
|
|
2073
2138
|
}, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
|
|
2074
|
-
const
|
|
2139
|
+
const r = () => {
|
|
2075
2140
|
const c = this.searchInput.value.trim();
|
|
2076
|
-
c ? this._filterCountries(c) : this._filterCountries("", !0);
|
|
2141
|
+
c ? this._filterCountries(c) : this._filterCountries("", !0), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
|
|
2077
2142
|
};
|
|
2078
|
-
let
|
|
2143
|
+
let l = null;
|
|
2079
2144
|
this._handleSearchChange = () => {
|
|
2080
|
-
|
|
2081
|
-
|
|
2145
|
+
l && clearTimeout(l), l = setTimeout(() => {
|
|
2146
|
+
r(), l = null;
|
|
2082
2147
|
}, 100);
|
|
2083
|
-
}, this.searchInput.addEventListener("input", this._handleSearchChange), this.
|
|
2148
|
+
}, this.searchInput.addEventListener("input", this._handleSearchChange), this._handleSearchClear = (c) => {
|
|
2149
|
+
c.stopPropagation(), this.searchInput.value = "", this.searchInput.focus(), r();
|
|
2150
|
+
}, this.searchClearButton.addEventListener("click", this._handleSearchClear), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
|
|
2084
2151
|
}
|
|
2085
2152
|
}
|
|
2086
2153
|
//* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
|
|
2087
2154
|
_searchForCountry(e) {
|
|
2088
|
-
for (
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
this._highlightListItem(a, !1), this._scrollTo(a);
|
|
2155
|
+
for (const i of this.countries)
|
|
2156
|
+
if (i.name.substring(0, e.length).toLowerCase() === e) {
|
|
2157
|
+
const r = i.nodeById[this.id];
|
|
2158
|
+
this._highlightListItem(r, !1), this._scrollTo(r);
|
|
2093
2159
|
break;
|
|
2094
2160
|
}
|
|
2095
|
-
}
|
|
2096
2161
|
}
|
|
2097
2162
|
//* Country search enabled: Filter the countries according to the search query.
|
|
2098
2163
|
_filterCountries(e, i = !1) {
|
|
2099
2164
|
let s = !0;
|
|
2100
2165
|
this.countryList.innerHTML = "";
|
|
2101
|
-
const
|
|
2102
|
-
for (
|
|
2103
|
-
|
|
2104
|
-
i || a === 0 ? f.push(m) : m.iso2.toLowerCase() === o ? c.push(m) : x.startsWith(o) ? g.push(m) : x.includes(o) ? f.push(m) : o === m.dialCode || o === `+${m.dialCode}` ? v.push(m) : `+${m.dialCode}`.includes(o) ? b.push(m) : O.includes(o) && S.push(m);
|
|
2105
|
-
}
|
|
2166
|
+
const r = o2(e), l = r.length, c = [], C = [], f = [], S = [], w = [], b = [];
|
|
2167
|
+
for (const p of this.countries)
|
|
2168
|
+
i || l === 0 ? f.push(p) : p.iso2 === r ? c.push(p) : p.normalisedName.startsWith(r) ? C.push(p) : p.normalisedName.includes(r) ? f.push(p) : r === p.dialCode || r === p.dialCodePlus ? S.push(p) : p.dialCodePlus.includes(r) ? w.push(p) : p.initials.includes(r) && b.push(p);
|
|
2106
2169
|
const L = [
|
|
2107
|
-
...c.sort((
|
|
2108
|
-
...
|
|
2109
|
-
...f.sort((
|
|
2110
|
-
...
|
|
2111
|
-
...
|
|
2112
|
-
...
|
|
2170
|
+
...c.sort((p, I) => p.priority - I.priority),
|
|
2171
|
+
...C.sort((p, I) => p.priority - I.priority),
|
|
2172
|
+
...f.sort((p, I) => p.priority - I.priority),
|
|
2173
|
+
...S.sort((p, I) => p.priority - I.priority),
|
|
2174
|
+
...w.sort((p, I) => p.priority - I.priority),
|
|
2175
|
+
...b.sort((p, I) => p.priority - I.priority)
|
|
2113
2176
|
];
|
|
2114
|
-
for (const
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2177
|
+
for (const p of L) {
|
|
2178
|
+
const I = p.nodeById[this.id];
|
|
2179
|
+
I && (this.countryList.appendChild(I), s && (this._highlightListItem(I, !1), s = !1));
|
|
2117
2180
|
}
|
|
2118
|
-
s
|
|
2181
|
+
s ? (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();
|
|
2119
2182
|
}
|
|
2120
2183
|
//* Update search results text (for a11y).
|
|
2121
|
-
|
|
2184
|
+
_updateSearchResultsA11yText() {
|
|
2122
2185
|
const { i18n: e } = this.options, i = this.countryList.childElementCount;
|
|
2123
2186
|
let s;
|
|
2124
2187
|
"searchResultsText" in e ? s = e.searchResultsText(i) : i === 0 ? s = e.zeroSearchResults : i === 1 ? s = e.oneSearchResult : s = e.multipleSearchResults.replace("${count}", i.toString()), this.searchResultsA11yText.textContent = s;
|
|
2125
2188
|
}
|
|
2126
2189
|
//* Highlight the next/prev item in the list (and ensure it is visible).
|
|
2127
2190
|
_handleUpDownKey(e) {
|
|
2128
|
-
var s,
|
|
2129
|
-
let i = e === "ArrowUp" ? (s = this.highlightedItem) == null ? void 0 : s.previousElementSibling : (
|
|
2191
|
+
var s, r;
|
|
2192
|
+
let i = e === "ArrowUp" ? (s = this.highlightedItem) == null ? void 0 : s.previousElementSibling : (r = this.highlightedItem) == null ? void 0 : r.nextElementSibling;
|
|
2130
2193
|
!i && this.countryList.childElementCount > 1 && (i = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), i && (this._scrollTo(i), this._highlightListItem(i, !1));
|
|
2131
2194
|
}
|
|
2132
2195
|
//* Select the currently highlighted item.
|
|
@@ -2137,9 +2200,9 @@ class j2 {
|
|
|
2137
2200
|
//* NOTE: this is called from _setInitialState, handleUtils and setNumber.
|
|
2138
2201
|
_updateValFromNumber(e) {
|
|
2139
2202
|
let i = e;
|
|
2140
|
-
if (this.options.formatOnDisplay &&
|
|
2141
|
-
const s = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL:
|
|
2142
|
-
i =
|
|
2203
|
+
if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
|
|
2204
|
+
const s = this.options.nationalMode || i.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: r, INTERNATIONAL: l } = m.utils.numberFormat, c = s ? r : l;
|
|
2205
|
+
i = m.utils.formatNumber(
|
|
2143
2206
|
i,
|
|
2144
2207
|
this.selectedCountryData.iso2,
|
|
2145
2208
|
c
|
|
@@ -2166,21 +2229,21 @@ class j2 {
|
|
|
2166
2229
|
_getNewCountryFromNumber(e) {
|
|
2167
2230
|
const i = e.indexOf("+");
|
|
2168
2231
|
let s = i ? e.substring(i) : e;
|
|
2169
|
-
const
|
|
2232
|
+
const r = this.selectedCountryData.iso2, l = this.selectedCountryData.dialCode;
|
|
2170
2233
|
s = this._ensureHasDialCode(s);
|
|
2171
|
-
const c = this._getDialCode(s, !0),
|
|
2234
|
+
const c = this._getDialCode(s, !0), C = f1(s);
|
|
2172
2235
|
if (c) {
|
|
2173
|
-
const f =
|
|
2174
|
-
if (!
|
|
2236
|
+
const f = f1(c), S = this.dialCodeToIso2Map[f];
|
|
2237
|
+
if (!r && this.defaultCountry && S.includes(this.defaultCountry))
|
|
2175
2238
|
return this.defaultCountry;
|
|
2176
|
-
const
|
|
2177
|
-
if (!(
|
|
2178
|
-
for (
|
|
2179
|
-
if (
|
|
2180
|
-
return
|
|
2239
|
+
const w = this.selectedCountryData.areaCodes && C.length > f.length, b = r && S.includes(r) && !w;
|
|
2240
|
+
if (!(l === "1" && a2(C)) && !b) {
|
|
2241
|
+
for (const p of S)
|
|
2242
|
+
if (p)
|
|
2243
|
+
return p;
|
|
2181
2244
|
}
|
|
2182
2245
|
} else {
|
|
2183
|
-
if (s.charAt(0) === "+" &&
|
|
2246
|
+
if (s.charAt(0) === "+" && C.length)
|
|
2184
2247
|
return "";
|
|
2185
2248
|
if ((!s || s === "+") && !this.selectedCountryData.iso2)
|
|
2186
2249
|
return this.defaultCountry;
|
|
@@ -2190,19 +2253,18 @@ class j2 {
|
|
|
2190
2253
|
//* Remove highlighting from other list items and highlight the given item.
|
|
2191
2254
|
_highlightListItem(e, i) {
|
|
2192
2255
|
const s = this.highlightedItem;
|
|
2193
|
-
if (s && (s.classList.remove("iti__highlight"), s.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
|
|
2194
|
-
this.highlightedItem.
|
|
2195
|
-
|
|
2196
|
-
this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
|
|
2256
|
+
if (s && (s.classList.remove("iti__highlight"), s.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
|
|
2257
|
+
const r = this.highlightedItem.getAttribute("id") || "";
|
|
2258
|
+
this.searchInput.setAttribute("aria-activedescendant", r);
|
|
2197
2259
|
}
|
|
2198
2260
|
i && this.highlightedItem.focus();
|
|
2199
2261
|
}
|
|
2200
2262
|
//* Find the country data for the given iso2 code
|
|
2201
|
-
//* the
|
|
2263
|
+
//* the allowFail option is only used during init() for the initialCountry option, and for the iso2 returned from geoIpLookup - in these 2 cases we don't want to error out
|
|
2202
2264
|
_getCountryData(e, i) {
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2265
|
+
const s = this.countryByIso2.get(e);
|
|
2266
|
+
if (s)
|
|
2267
|
+
return s;
|
|
2206
2268
|
if (i)
|
|
2207
2269
|
return null;
|
|
2208
2270
|
throw new Error(`No country data for '${e}'`);
|
|
@@ -2210,16 +2272,16 @@ class j2 {
|
|
|
2210
2272
|
//* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
|
|
2211
2273
|
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
2212
2274
|
_setCountry(e) {
|
|
2213
|
-
const { separateDialCode: i, showFlags: s, i18n:
|
|
2275
|
+
const { separateDialCode: i, showFlags: s, i18n: r } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
2214
2276
|
if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
|
|
2215
|
-
let c = "",
|
|
2216
|
-
e && s ? (c = `iti__flag iti__${e}`,
|
|
2277
|
+
let c = "", C = "";
|
|
2278
|
+
e && s ? (c = `iti__flag iti__${e}`, C = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", C = r.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = C;
|
|
2217
2279
|
}
|
|
2218
2280
|
if (this._setSelectedCountryTitleAttribute(e, i), i) {
|
|
2219
2281
|
const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
2220
2282
|
this.selectedDialCode.innerHTML = c, this._updateInputPadding();
|
|
2221
2283
|
}
|
|
2222
|
-
return this._updatePlaceholder(), this._updateMaxLength(),
|
|
2284
|
+
return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== e;
|
|
2223
2285
|
}
|
|
2224
2286
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2225
2287
|
_updateInputPadding() {
|
|
@@ -2230,20 +2292,20 @@ class j2 {
|
|
|
2230
2292
|
}
|
|
2231
2293
|
//* Update the maximum valid number length for the currently selected country.
|
|
2232
2294
|
_updateMaxLength() {
|
|
2233
|
-
const { strictMode: e, placeholderNumberType: i, validationNumberTypes: s } = this.options, { iso2:
|
|
2234
|
-
if (e &&
|
|
2235
|
-
if (
|
|
2236
|
-
const
|
|
2237
|
-
let c =
|
|
2238
|
-
|
|
2295
|
+
const { strictMode: e, placeholderNumberType: i, validationNumberTypes: s } = this.options, { iso2: r } = this.selectedCountryData;
|
|
2296
|
+
if (e && m.utils)
|
|
2297
|
+
if (r) {
|
|
2298
|
+
const l = m.utils.numberType[i];
|
|
2299
|
+
let c = m.utils.getExampleNumber(
|
|
2300
|
+
r,
|
|
2239
2301
|
!1,
|
|
2240
|
-
|
|
2302
|
+
l,
|
|
2241
2303
|
!0
|
|
2242
|
-
),
|
|
2243
|
-
for (;
|
|
2244
|
-
|
|
2245
|
-
const f =
|
|
2246
|
-
this.maxCoreNumberLength = f.length,
|
|
2304
|
+
), C = c;
|
|
2305
|
+
for (; m.utils.isPossibleNumber(c, r, s); )
|
|
2306
|
+
C = c, c += "0";
|
|
2307
|
+
const f = m.utils.getCoreNumber(C, r);
|
|
2308
|
+
this.maxCoreNumberLength = f.length, r === "by" && (this.maxCoreNumberLength = f.length + 1);
|
|
2247
2309
|
} else
|
|
2248
2310
|
this.maxCoreNumberLength = null;
|
|
2249
2311
|
}
|
|
@@ -2265,8 +2327,8 @@ class j2 {
|
|
|
2265
2327
|
e.appendChild(i);
|
|
2266
2328
|
const s = this.selectedCountry.cloneNode(!0);
|
|
2267
2329
|
i.appendChild(s);
|
|
2268
|
-
const
|
|
2269
|
-
return document.body.removeChild(e),
|
|
2330
|
+
const r = s.offsetWidth;
|
|
2331
|
+
return document.body.removeChild(e), r;
|
|
2270
2332
|
}
|
|
2271
2333
|
return 0;
|
|
2272
2334
|
}
|
|
@@ -2276,16 +2338,16 @@ class j2 {
|
|
|
2276
2338
|
autoPlaceholder: e,
|
|
2277
2339
|
placeholderNumberType: i,
|
|
2278
2340
|
nationalMode: s,
|
|
2279
|
-
customPlaceholder:
|
|
2280
|
-
} = this.options,
|
|
2281
|
-
if (
|
|
2282
|
-
const c =
|
|
2283
|
-
let
|
|
2341
|
+
customPlaceholder: r
|
|
2342
|
+
} = this.options, l = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
|
|
2343
|
+
if (m.utils && l) {
|
|
2344
|
+
const c = m.utils.numberType[i];
|
|
2345
|
+
let C = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
|
|
2284
2346
|
this.selectedCountryData.iso2,
|
|
2285
2347
|
s,
|
|
2286
2348
|
c
|
|
2287
2349
|
) : "";
|
|
2288
|
-
|
|
2350
|
+
C = this._beforeSetNumber(C), typeof r == "function" && (C = r(C, this.selectedCountryData)), this.telInput.setAttribute("placeholder", C);
|
|
2289
2351
|
}
|
|
2290
2352
|
}
|
|
2291
2353
|
//* Called when the user selects a list item from the dropdown.
|
|
@@ -2297,7 +2359,7 @@ class j2 {
|
|
|
2297
2359
|
}
|
|
2298
2360
|
//* Close the dropdown and unbind any listeners.
|
|
2299
2361
|
_closeDropdown() {
|
|
2300
|
-
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.
|
|
2362
|
+
this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.documentElement.removeEventListener(
|
|
2301
2363
|
"click",
|
|
2302
2364
|
this._handleClickOffToClose
|
|
2303
2365
|
), this.countryList.removeEventListener(
|
|
@@ -2307,22 +2369,22 @@ class j2 {
|
|
|
2307
2369
|
}
|
|
2308
2370
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2309
2371
|
_scrollTo(e) {
|
|
2310
|
-
const i = this.countryList, s = document.documentElement.scrollTop,
|
|
2311
|
-
if (f <
|
|
2312
|
-
i.scrollTop =
|
|
2313
|
-
else if (
|
|
2314
|
-
const
|
|
2315
|
-
i.scrollTop =
|
|
2372
|
+
const i = this.countryList, s = document.documentElement.scrollTop, r = i.offsetHeight, l = i.getBoundingClientRect().top + s, c = l + r, C = e.offsetHeight, f = e.getBoundingClientRect().top + s, S = f + C, w = f - l + i.scrollTop;
|
|
2373
|
+
if (f < l)
|
|
2374
|
+
i.scrollTop = w;
|
|
2375
|
+
else if (S > c) {
|
|
2376
|
+
const b = r - C;
|
|
2377
|
+
i.scrollTop = w - b;
|
|
2316
2378
|
}
|
|
2317
2379
|
}
|
|
2318
2380
|
//* Replace any existing dial code with the new one
|
|
2319
2381
|
//* Note: called from _selectListItem and setCountry
|
|
2320
2382
|
_updateDialCode(e) {
|
|
2321
2383
|
const i = this.telInput.value, s = `+${e}`;
|
|
2322
|
-
let
|
|
2384
|
+
let r;
|
|
2323
2385
|
if (i.charAt(0) === "+") {
|
|
2324
|
-
const
|
|
2325
|
-
|
|
2386
|
+
const l = this._getDialCode(i);
|
|
2387
|
+
l ? r = i.replace(l, s) : r = s, this.telInput.value = r;
|
|
2326
2388
|
}
|
|
2327
2389
|
}
|
|
2328
2390
|
//* Try and extract a valid international dial code from a full telephone number.
|
|
@@ -2330,17 +2392,17 @@ class j2 {
|
|
|
2330
2392
|
_getDialCode(e, i) {
|
|
2331
2393
|
let s = "";
|
|
2332
2394
|
if (e.charAt(0) === "+") {
|
|
2333
|
-
let
|
|
2334
|
-
for (let
|
|
2335
|
-
const c = e.charAt(
|
|
2395
|
+
let r = "";
|
|
2396
|
+
for (let l = 0; l < e.length; l++) {
|
|
2397
|
+
const c = e.charAt(l);
|
|
2336
2398
|
if (!isNaN(parseInt(c, 10))) {
|
|
2337
|
-
if (
|
|
2338
|
-
this.dialCodeToIso2Map[
|
|
2339
|
-
else if (this.dialCodes
|
|
2340
|
-
s = e.
|
|
2399
|
+
if (r += c, i)
|
|
2400
|
+
this.dialCodeToIso2Map[r] && (s = e.substring(0, l + 1));
|
|
2401
|
+
else if (this.dialCodes.has(r)) {
|
|
2402
|
+
s = e.substring(0, l + 1);
|
|
2341
2403
|
break;
|
|
2342
2404
|
}
|
|
2343
|
-
if (
|
|
2405
|
+
if (r.length === this.dialCodeMaxLen)
|
|
2344
2406
|
break;
|
|
2345
2407
|
}
|
|
2346
2408
|
}
|
|
@@ -2350,9 +2412,9 @@ class j2 {
|
|
|
2350
2412
|
//* Get the input val, adding the dial code if separateDialCode is enabled.
|
|
2351
2413
|
_getFullNumber(e) {
|
|
2352
2414
|
const i = e || this.telInput.value.trim(), { dialCode: s } = this.selectedCountryData;
|
|
2353
|
-
let
|
|
2354
|
-
const
|
|
2355
|
-
return this.options.separateDialCode && i.charAt(0) !== "+" && s &&
|
|
2415
|
+
let r;
|
|
2416
|
+
const l = f1(i);
|
|
2417
|
+
return this.options.separateDialCode && i.charAt(0) !== "+" && s && l ? r = `+${s}` : r = "", r + i;
|
|
2356
2418
|
}
|
|
2357
2419
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
2358
2420
|
_beforeSetNumber(e) {
|
|
@@ -2361,8 +2423,8 @@ class j2 {
|
|
|
2361
2423
|
let s = this._getDialCode(i);
|
|
2362
2424
|
if (s) {
|
|
2363
2425
|
s = `+${this.selectedCountryData.dialCode}`;
|
|
2364
|
-
const
|
|
2365
|
-
i = i.
|
|
2426
|
+
const r = i[s.length] === " " || i[s.length] === "-" ? s.length + 1 : s.length;
|
|
2427
|
+
i = i.substring(r);
|
|
2366
2428
|
}
|
|
2367
2429
|
}
|
|
2368
2430
|
return this._cap(i);
|
|
@@ -2373,7 +2435,7 @@ class j2 {
|
|
|
2373
2435
|
}
|
|
2374
2436
|
//* Format the number as the user types.
|
|
2375
2437
|
_formatNumberAsYouType() {
|
|
2376
|
-
const e = this._getFullNumber(), i =
|
|
2438
|
+
const e = this._getFullNumber(), i = m.utils ? m.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: s } = this.selectedCountryData;
|
|
2377
2439
|
return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && i.includes(`+${s}`) ? (i.split(`+${s}`)[1] || "").trim() : i;
|
|
2378
2440
|
}
|
|
2379
2441
|
//**************************
|
|
@@ -2381,18 +2443,18 @@ class j2 {
|
|
|
2381
2443
|
//**************************
|
|
2382
2444
|
//* This is called when the geoip call returns.
|
|
2383
2445
|
handleAutoCountry() {
|
|
2384
|
-
this.options.initialCountry === "auto" &&
|
|
2446
|
+
this.options.initialCountry === "auto" && m.autoCountry && (this.defaultCountry = m.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
|
|
2385
2447
|
}
|
|
2386
2448
|
//* This is called when the utils request completes.
|
|
2387
2449
|
handleUtils() {
|
|
2388
|
-
|
|
2450
|
+
m.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
|
|
2389
2451
|
}
|
|
2390
2452
|
//********************
|
|
2391
2453
|
//* PUBLIC METHODS
|
|
2392
2454
|
//********************
|
|
2393
2455
|
//* Remove plugin.
|
|
2394
2456
|
destroy() {
|
|
2395
|
-
var
|
|
2457
|
+
var l, c;
|
|
2396
2458
|
this.telInput.iti = void 0;
|
|
2397
2459
|
const { allowDropdown: e, separateDialCode: i } = this.options;
|
|
2398
2460
|
if (e) {
|
|
@@ -2403,26 +2465,26 @@ class j2 {
|
|
|
2403
2465
|
"keydown",
|
|
2404
2466
|
this._handleCountryContainerKeydown
|
|
2405
2467
|
);
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2468
|
+
const C = this.telInput.closest("label");
|
|
2469
|
+
C && C.removeEventListener("click", this._handleLabelClick);
|
|
2408
2470
|
}
|
|
2409
2471
|
const { form: s } = this.telInput;
|
|
2410
2472
|
this._handleHiddenInputSubmit && s && s.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), i && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
2411
|
-
const
|
|
2412
|
-
(
|
|
2473
|
+
const r = this.telInput.parentNode;
|
|
2474
|
+
(l = r == null ? void 0 : r.parentNode) == null || l.insertBefore(this.telInput, r), (c = r == null ? void 0 : r.parentNode) == null || c.removeChild(r), delete m.instances[this.id];
|
|
2413
2475
|
}
|
|
2414
2476
|
//* Get the extension from the current number.
|
|
2415
2477
|
getExtension() {
|
|
2416
|
-
return
|
|
2478
|
+
return m.utils ? m.utils.getExtension(
|
|
2417
2479
|
this._getFullNumber(),
|
|
2418
2480
|
this.selectedCountryData.iso2
|
|
2419
2481
|
) : "";
|
|
2420
2482
|
}
|
|
2421
2483
|
//* Format the number to the given format.
|
|
2422
2484
|
getNumber(e) {
|
|
2423
|
-
if (
|
|
2485
|
+
if (m.utils) {
|
|
2424
2486
|
const { iso2: i } = this.selectedCountryData;
|
|
2425
|
-
return
|
|
2487
|
+
return m.utils.formatNumber(
|
|
2426
2488
|
this._getFullNumber(),
|
|
2427
2489
|
i,
|
|
2428
2490
|
e
|
|
@@ -2432,7 +2494,7 @@ class j2 {
|
|
|
2432
2494
|
}
|
|
2433
2495
|
//* Get the type of the entered number e.g. landline/mobile.
|
|
2434
2496
|
getNumberType() {
|
|
2435
|
-
return
|
|
2497
|
+
return m.utils ? m.utils.getNumberType(
|
|
2436
2498
|
this._getFullNumber(),
|
|
2437
2499
|
this.selectedCountryData.iso2
|
|
2438
2500
|
) : -99;
|
|
@@ -2443,39 +2505,36 @@ class j2 {
|
|
|
2443
2505
|
}
|
|
2444
2506
|
//* Get the validation error.
|
|
2445
2507
|
getValidationError() {
|
|
2446
|
-
if (
|
|
2508
|
+
if (m.utils) {
|
|
2447
2509
|
const { iso2: e } = this.selectedCountryData;
|
|
2448
|
-
return
|
|
2510
|
+
return m.utils.getValidationError(this._getFullNumber(), e);
|
|
2449
2511
|
}
|
|
2450
2512
|
return -99;
|
|
2451
2513
|
}
|
|
2452
|
-
//* Validate the input val
|
|
2514
|
+
//* Validate the input val (with precise=false)
|
|
2453
2515
|
isValidNumber() {
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
return o && a;
|
|
2460
|
-
}
|
|
2461
|
-
return this._utilsIsPossibleNumber(e);
|
|
2516
|
+
return this._validateNumber(!1);
|
|
2517
|
+
}
|
|
2518
|
+
//* Validate the input val (with precise=true)
|
|
2519
|
+
isValidNumberPrecise() {
|
|
2520
|
+
return this._validateNumber(!0);
|
|
2462
2521
|
}
|
|
2463
2522
|
_utilsIsPossibleNumber(e) {
|
|
2464
|
-
return
|
|
2523
|
+
return m.utils ? m.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
2465
2524
|
}
|
|
2466
|
-
//*
|
|
2467
|
-
|
|
2525
|
+
//* Shared internal validation logic to handle alpha character extension rules.
|
|
2526
|
+
_validateNumber(e) {
|
|
2468
2527
|
if (!this.selectedCountryData.iso2)
|
|
2469
2528
|
return !1;
|
|
2470
|
-
const
|
|
2471
|
-
if (
|
|
2472
|
-
const
|
|
2473
|
-
return
|
|
2529
|
+
const i = this._getFullNumber(), s = i.search(new RegExp("\\p{L}", "u")), r = (l) => e ? this._utilsIsValidNumber(l) : this._utilsIsPossibleNumber(l);
|
|
2530
|
+
if (s > -1) {
|
|
2531
|
+
const l = i.substring(0, s), c = r(l), C = r(i);
|
|
2532
|
+
return c && C;
|
|
2474
2533
|
}
|
|
2475
|
-
return
|
|
2534
|
+
return r(i);
|
|
2476
2535
|
}
|
|
2477
2536
|
_utilsIsValidNumber(e) {
|
|
2478
|
-
return
|
|
2537
|
+
return m.utils ? m.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
|
|
2479
2538
|
}
|
|
2480
2539
|
//* Update the selected country, and update the input val accordingly.
|
|
2481
2540
|
setCountry(e) {
|
|
@@ -2495,65 +2554,65 @@ class j2 {
|
|
|
2495
2554
|
this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
|
|
2496
2555
|
}
|
|
2497
2556
|
}
|
|
2498
|
-
const
|
|
2499
|
-
if (!
|
|
2557
|
+
const Z2 = (y) => {
|
|
2558
|
+
if (!m.utils && !m.startedLoadingUtilsScript) {
|
|
2500
2559
|
let e;
|
|
2501
|
-
if (typeof
|
|
2560
|
+
if (typeof y == "function")
|
|
2502
2561
|
try {
|
|
2503
|
-
e = Promise.resolve(
|
|
2562
|
+
e = Promise.resolve(y());
|
|
2504
2563
|
} catch (i) {
|
|
2505
2564
|
return Promise.reject(i);
|
|
2506
2565
|
}
|
|
2507
2566
|
else
|
|
2508
|
-
return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof
|
|
2509
|
-
return
|
|
2567
|
+
return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof y}`));
|
|
2568
|
+
return m.startedLoadingUtilsScript = !0, e.then((i) => {
|
|
2510
2569
|
const s = i == null ? void 0 : i.default;
|
|
2511
2570
|
if (!s || typeof s != "object")
|
|
2512
2571
|
throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
|
|
2513
|
-
return
|
|
2572
|
+
return m.utils = s, i1("handleUtils"), !0;
|
|
2514
2573
|
}).catch((i) => {
|
|
2515
|
-
throw
|
|
2574
|
+
throw i1("rejectUtilsScriptPromise", i), i;
|
|
2516
2575
|
});
|
|
2517
2576
|
}
|
|
2518
2577
|
return null;
|
|
2519
|
-
},
|
|
2520
|
-
(
|
|
2521
|
-
const i = new
|
|
2522
|
-
return i._init(),
|
|
2578
|
+
}, m = Object.assign(
|
|
2579
|
+
(y, e) => {
|
|
2580
|
+
const i = new p1(y, e);
|
|
2581
|
+
return i._init(), y.setAttribute("data-intl-tel-input-id", i.id.toString()), m.instances[i.id] = i, y.iti = i, i;
|
|
2523
2582
|
},
|
|
2524
2583
|
{
|
|
2525
2584
|
defaults: l2,
|
|
2526
2585
|
//* Using a static var like this allows us to mock it in the tests.
|
|
2527
2586
|
documentReady: () => document.readyState === "complete",
|
|
2528
2587
|
//* Get the country data object.
|
|
2529
|
-
getCountryData: () =>
|
|
2588
|
+
getCountryData: () => q,
|
|
2530
2589
|
//* A getter for the plugin instance.
|
|
2531
|
-
getInstance: (
|
|
2532
|
-
const e =
|
|
2533
|
-
return e ?
|
|
2590
|
+
getInstance: (y) => {
|
|
2591
|
+
const e = y.getAttribute("data-intl-tel-input-id");
|
|
2592
|
+
return e ? m.instances[e] : null;
|
|
2534
2593
|
},
|
|
2535
2594
|
//* A map from instance ID to instance object.
|
|
2536
2595
|
instances: {},
|
|
2537
|
-
attachUtils:
|
|
2596
|
+
attachUtils: Z2,
|
|
2538
2597
|
startedLoadingUtilsScript: !1,
|
|
2539
2598
|
startedLoadingAutoCountry: !1,
|
|
2540
|
-
version: "25.
|
|
2599
|
+
version: "25.8.0"
|
|
2541
2600
|
}
|
|
2542
2601
|
);
|
|
2543
2602
|
(function() {
|
|
2544
|
-
var
|
|
2603
|
+
var y = this || self;
|
|
2545
2604
|
function e(d, t) {
|
|
2546
2605
|
d = d.split(".");
|
|
2547
|
-
var $ =
|
|
2606
|
+
var $ = y;
|
|
2548
2607
|
d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
|
|
2549
2608
|
for (var n; d.length && (n = d.shift()); ) d.length || t === void 0 ? $[n] && $[n] !== Object.prototype[n] ? $ = $[n] : $ = $[n] = {} : $[n] = t;
|
|
2550
2609
|
}
|
|
2551
2610
|
function i(d, t) {
|
|
2552
2611
|
function $() {
|
|
2553
2612
|
}
|
|
2554
|
-
$.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(n,
|
|
2555
|
-
for (var
|
|
2556
|
-
return t.prototype[
|
|
2613
|
+
$.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(n, o, a) {
|
|
2614
|
+
for (var u = Array(arguments.length - 2), h = 2; h < arguments.length; h++) u[h - 2] = arguments[h];
|
|
2615
|
+
return t.prototype[o].apply(n, u);
|
|
2557
2616
|
};
|
|
2558
2617
|
}
|
|
2559
2618
|
function s(d) {
|
|
@@ -2562,18 +2621,18 @@ const W2 = (I) => {
|
|
|
2562
2621
|
for (const n in d) t[$++] = d[n];
|
|
2563
2622
|
return t;
|
|
2564
2623
|
}
|
|
2565
|
-
var
|
|
2624
|
+
var r = class {
|
|
2566
2625
|
constructor(d) {
|
|
2567
|
-
if (
|
|
2626
|
+
if (l !== l) throw Error("SafeUrl is not meant to be built directly");
|
|
2568
2627
|
this.g = d;
|
|
2569
2628
|
}
|
|
2570
2629
|
toString() {
|
|
2571
2630
|
return this.g.toString();
|
|
2572
2631
|
}
|
|
2573
|
-
},
|
|
2574
|
-
new
|
|
2632
|
+
}, l = {};
|
|
2633
|
+
new r("about:invalid#zClosurez"), new r("about:blank");
|
|
2575
2634
|
const c = {};
|
|
2576
|
-
class
|
|
2635
|
+
class C {
|
|
2577
2636
|
constructor() {
|
|
2578
2637
|
if (c !== c) throw Error("SafeStyle is not meant to be built directly");
|
|
2579
2638
|
}
|
|
@@ -2581,9 +2640,9 @@ const W2 = (I) => {
|
|
|
2581
2640
|
return "";
|
|
2582
2641
|
}
|
|
2583
2642
|
}
|
|
2584
|
-
new
|
|
2643
|
+
new C();
|
|
2585
2644
|
const f = {};
|
|
2586
|
-
class
|
|
2645
|
+
class S {
|
|
2587
2646
|
constructor() {
|
|
2588
2647
|
if (f !== f) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
2589
2648
|
}
|
|
@@ -2591,40 +2650,40 @@ const W2 = (I) => {
|
|
|
2591
2650
|
return "";
|
|
2592
2651
|
}
|
|
2593
2652
|
}
|
|
2594
|
-
new
|
|
2595
|
-
const
|
|
2596
|
-
class
|
|
2653
|
+
new S();
|
|
2654
|
+
const w = {};
|
|
2655
|
+
class b {
|
|
2597
2656
|
constructor() {
|
|
2598
|
-
var t =
|
|
2599
|
-
if (
|
|
2657
|
+
var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
|
|
2658
|
+
if (w !== w) throw Error("SafeHtml is not meant to be built directly");
|
|
2600
2659
|
this.g = t;
|
|
2601
2660
|
}
|
|
2602
2661
|
toString() {
|
|
2603
2662
|
return this.g.toString();
|
|
2604
2663
|
}
|
|
2605
2664
|
}
|
|
2606
|
-
new
|
|
2665
|
+
new b();
|
|
2607
2666
|
function L(d, t) {
|
|
2608
2667
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
2609
|
-
case x:
|
|
2610
|
-
case O:
|
|
2611
|
-
case T:
|
|
2612
2668
|
case G:
|
|
2613
|
-
case
|
|
2614
|
-
case
|
|
2615
|
-
case
|
|
2669
|
+
case U:
|
|
2670
|
+
case D:
|
|
2671
|
+
case P:
|
|
2672
|
+
case Y:
|
|
2673
|
+
case I:
|
|
2674
|
+
case p:
|
|
2616
2675
|
this.o = !0;
|
|
2617
2676
|
}
|
|
2618
2677
|
this.j = t.defaultValue;
|
|
2619
2678
|
}
|
|
2620
|
-
var
|
|
2621
|
-
function
|
|
2679
|
+
var p = 1, I = 2, G = 3, U = 4, D = 6, P = 16, Y = 18;
|
|
2680
|
+
function c2(d, t) {
|
|
2622
2681
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
2623
2682
|
var $ = t[d];
|
|
2624
2683
|
this.g[$.g] = $;
|
|
2625
2684
|
}
|
|
2626
2685
|
}
|
|
2627
|
-
function
|
|
2686
|
+
function f2(d) {
|
|
2628
2687
|
return d = s(d.g), d.sort(function(t, $) {
|
|
2629
2688
|
return t.g - $.g;
|
|
2630
2689
|
}), d;
|
|
@@ -2635,54 +2694,54 @@ const W2 = (I) => {
|
|
|
2635
2694
|
R.prototype.has = function(d) {
|
|
2636
2695
|
return B(this, d.g);
|
|
2637
2696
|
}, R.prototype.get = function(d, t) {
|
|
2638
|
-
return
|
|
2697
|
+
return g(this, d.g, t);
|
|
2639
2698
|
}, R.prototype.set = function(d, t) {
|
|
2640
|
-
|
|
2699
|
+
E(this, d.g, t);
|
|
2641
2700
|
}, R.prototype.add = function(d, t) {
|
|
2642
|
-
|
|
2701
|
+
b1(this, d.g, t);
|
|
2643
2702
|
};
|
|
2644
|
-
function
|
|
2645
|
-
for (var $ =
|
|
2646
|
-
var
|
|
2647
|
-
if (B(t,
|
|
2648
|
-
d.g && delete d.g[
|
|
2649
|
-
var
|
|
2650
|
-
if (
|
|
2651
|
-
|
|
2652
|
-
for (var h = 0; h <
|
|
2653
|
-
} else
|
|
2703
|
+
function w1(d, t) {
|
|
2704
|
+
for (var $ = f2(d.m()), n = 0; n < $.length; n++) {
|
|
2705
|
+
var o = $[n], a = o.g;
|
|
2706
|
+
if (B(t, a)) {
|
|
2707
|
+
d.g && delete d.g[o.g];
|
|
2708
|
+
var u = o.h == 11 || o.h == 10;
|
|
2709
|
+
if (o.l) {
|
|
2710
|
+
o = x(t, a);
|
|
2711
|
+
for (var h = 0; h < o.length; h++) b1(d, a, u ? o[h].clone() : o[h]);
|
|
2712
|
+
} else o = n1(t, a), u ? (u = n1(d, a)) ? w1(u, o) : E(d, a, o.clone()) : E(d, a, o);
|
|
2654
2713
|
}
|
|
2655
2714
|
}
|
|
2656
2715
|
}
|
|
2657
2716
|
R.prototype.clone = function() {
|
|
2658
2717
|
var d = new this.constructor();
|
|
2659
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
2718
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), w1(d, this)), d;
|
|
2660
2719
|
};
|
|
2661
2720
|
function B(d, t) {
|
|
2662
2721
|
return d.h[t] != null;
|
|
2663
2722
|
}
|
|
2664
|
-
function
|
|
2723
|
+
function n1(d, t) {
|
|
2665
2724
|
var $ = d.h[t];
|
|
2666
2725
|
if ($ == null) return null;
|
|
2667
2726
|
if (d.l) {
|
|
2668
2727
|
if (!(t in d.g)) {
|
|
2669
|
-
var n = d.l,
|
|
2670
|
-
if ($ != null) if (
|
|
2671
|
-
for (var
|
|
2672
|
-
$ =
|
|
2673
|
-
} else $ = n.h(
|
|
2728
|
+
var n = d.l, o = d.j[t];
|
|
2729
|
+
if ($ != null) if (o.l) {
|
|
2730
|
+
for (var a = [], u = 0; u < $.length; u++) a[u] = n.h(o, $[u]);
|
|
2731
|
+
$ = a;
|
|
2732
|
+
} else $ = n.h(o, $);
|
|
2674
2733
|
return d.g[t] = $;
|
|
2675
2734
|
}
|
|
2676
2735
|
return d.g[t];
|
|
2677
2736
|
}
|
|
2678
2737
|
return $;
|
|
2679
2738
|
}
|
|
2680
|
-
function
|
|
2681
|
-
var n =
|
|
2739
|
+
function g(d, t, $) {
|
|
2740
|
+
var n = n1(d, t);
|
|
2682
2741
|
return d.j[t].l ? n[$ || 0] : n;
|
|
2683
2742
|
}
|
|
2684
|
-
function
|
|
2685
|
-
if (B(d, t)) d =
|
|
2743
|
+
function v(d, t) {
|
|
2744
|
+
if (B(d, t)) d = g(d, t);
|
|
2686
2745
|
else d: {
|
|
2687
2746
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
2688
2747
|
else if (t === Number) d.j = 0;
|
|
@@ -2695,48 +2754,48 @@ const W2 = (I) => {
|
|
|
2695
2754
|
}
|
|
2696
2755
|
return d;
|
|
2697
2756
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return
|
|
2757
|
+
function x(d, t) {
|
|
2758
|
+
return n1(d, t) || [];
|
|
2700
2759
|
}
|
|
2701
2760
|
function K(d, t) {
|
|
2702
2761
|
return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
|
|
2703
2762
|
}
|
|
2704
|
-
function
|
|
2763
|
+
function E(d, t, $) {
|
|
2705
2764
|
d.h[t] = $, d.g && (d.g[t] = $);
|
|
2706
2765
|
}
|
|
2707
|
-
function
|
|
2766
|
+
function b1(d, t, $) {
|
|
2708
2767
|
d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
|
|
2709
2768
|
}
|
|
2710
|
-
function
|
|
2769
|
+
function s1(d, t) {
|
|
2711
2770
|
var $ = [], n;
|
|
2712
2771
|
for (n in t) n != 0 && $.push(new L(n, t[n]));
|
|
2713
|
-
return new
|
|
2772
|
+
return new c2(d, $);
|
|
2714
2773
|
}
|
|
2715
|
-
function
|
|
2774
|
+
function r1() {
|
|
2716
2775
|
}
|
|
2717
|
-
|
|
2776
|
+
r1.prototype.g = function(d) {
|
|
2718
2777
|
throw new d.h(), Error("Unimplemented");
|
|
2719
|
-
},
|
|
2778
|
+
}, r1.prototype.h = function(d, t) {
|
|
2720
2779
|
if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
|
|
2721
|
-
if (d.h == 14) return typeof t == "string" &&
|
|
2780
|
+
if (d.h == 14) return typeof t == "string" && L1.test(t) && (d = Number(t), 0 < d) ? d : t;
|
|
2722
2781
|
if (!d.o) return t;
|
|
2723
2782
|
if (d = d.s, d === String) {
|
|
2724
2783
|
if (typeof t == "number") return String(t);
|
|
2725
|
-
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" ||
|
|
2784
|
+
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || L1.test(t))) return Number(t);
|
|
2726
2785
|
return t;
|
|
2727
2786
|
};
|
|
2728
|
-
var
|
|
2729
|
-
function
|
|
2787
|
+
var L1 = /^-?[0-9]+$/;
|
|
2788
|
+
function g1() {
|
|
2730
2789
|
}
|
|
2731
|
-
i(
|
|
2790
|
+
i(g1, r1), g1.prototype.g = function(d, t) {
|
|
2732
2791
|
return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
|
|
2733
2792
|
};
|
|
2734
|
-
function
|
|
2793
|
+
function X() {
|
|
2735
2794
|
}
|
|
2736
|
-
i(
|
|
2737
|
-
return d.h == 8 ? !!t :
|
|
2738
|
-
},
|
|
2739
|
-
return
|
|
2795
|
+
i(X, g1), X.prototype.h = function(d, t) {
|
|
2796
|
+
return d.h == 8 ? !!t : r1.prototype.h.apply(this, arguments);
|
|
2797
|
+
}, X.prototype.g = function(d, t) {
|
|
2798
|
+
return X.ma.g.call(this, d, t);
|
|
2740
2799
|
};
|
|
2741
2800
|
function A(d, t) {
|
|
2742
2801
|
d != null && this.g.apply(this, arguments);
|
|
@@ -2753,30 +2812,30 @@ const W2 = (I) => {
|
|
|
2753
2812
|
A.prototype.toString = function() {
|
|
2754
2813
|
return this.h;
|
|
2755
2814
|
};
|
|
2756
|
-
function
|
|
2815
|
+
function W() {
|
|
2757
2816
|
R.call(this);
|
|
2758
2817
|
}
|
|
2759
|
-
i(
|
|
2760
|
-
var
|
|
2818
|
+
i(W, R);
|
|
2819
|
+
var N1 = null;
|
|
2761
2820
|
function N() {
|
|
2762
2821
|
R.call(this);
|
|
2763
2822
|
}
|
|
2764
2823
|
i(N, R);
|
|
2765
|
-
var
|
|
2766
|
-
function
|
|
2824
|
+
var T1 = null;
|
|
2825
|
+
function z() {
|
|
2767
2826
|
R.call(this);
|
|
2768
2827
|
}
|
|
2769
|
-
i(
|
|
2770
|
-
var
|
|
2771
|
-
|
|
2772
|
-
var d = b1;
|
|
2773
|
-
return d || (b1 = d = n1(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;
|
|
2774
|
-
}, z.m = z.prototype.m, N.prototype.m = function() {
|
|
2775
|
-
var d = L1;
|
|
2776
|
-
return d || (L1 = d = n1(N, { 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;
|
|
2777
|
-
}, N.m = N.prototype.m, Z.prototype.m = function() {
|
|
2828
|
+
i(z, R);
|
|
2829
|
+
var A1 = null;
|
|
2830
|
+
W.prototype.m = function() {
|
|
2778
2831
|
var d = N1;
|
|
2779
|
-
return d || (N1 = d =
|
|
2832
|
+
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;
|
|
2833
|
+
}, W.m = W.prototype.m, N.prototype.m = function() {
|
|
2834
|
+
var d = T1;
|
|
2835
|
+
return d || (T1 = d = s1(N, { 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;
|
|
2836
|
+
}, N.m = N.prototype.m, z.prototype.m = function() {
|
|
2837
|
+
var d = A1;
|
|
2838
|
+
return d || (A1 = d = s1(z, {
|
|
2780
2839
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
2781
2840
|
1: { name: "general_desc", i: 11, type: N },
|
|
2782
2841
|
2: { name: "fixed_line", i: 11, type: N },
|
|
@@ -2808,26 +2867,26 @@ const W2 = (I) => {
|
|
|
2808
2867
|
},
|
|
2809
2868
|
16: { name: "national_prefix_transform_rule", i: 9, type: String },
|
|
2810
2869
|
18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
|
|
2811
|
-
19: { name: "number_format", aa: !0, i: 11, type:
|
|
2812
|
-
20: { name: "intl_number_format", aa: !0, i: 11, type:
|
|
2870
|
+
19: { name: "number_format", aa: !0, i: 11, type: W },
|
|
2871
|
+
20: { name: "intl_number_format", aa: !0, i: 11, type: W },
|
|
2813
2872
|
22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
|
|
2814
2873
|
23: { name: "leading_digits", i: 9, type: String }
|
|
2815
2874
|
})), d;
|
|
2816
|
-
},
|
|
2875
|
+
}, z.m = z.prototype.m;
|
|
2817
2876
|
function H() {
|
|
2818
2877
|
R.call(this);
|
|
2819
2878
|
}
|
|
2820
2879
|
i(H, R);
|
|
2821
|
-
var
|
|
2880
|
+
var E1 = null, p2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
2822
2881
|
H.prototype.m = function() {
|
|
2823
|
-
var d =
|
|
2824
|
-
return d || (
|
|
2882
|
+
var d = E1;
|
|
2883
|
+
return d || (E1 = d = s1(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: p2 }, 7: {
|
|
2825
2884
|
name: "preferred_domestic_carrier_code",
|
|
2826
2885
|
i: 9,
|
|
2827
2886
|
type: String
|
|
2828
2887
|
} })), d;
|
|
2829
2888
|
}, H.ctor = H, H.ctor.m = H.prototype.m;
|
|
2830
|
-
var
|
|
2889
|
+
var Q = {
|
|
2831
2890
|
1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
|
|
2832
2891
|
7: ["RU", "KZ"],
|
|
2833
2892
|
20: ["EG"],
|
|
@@ -3043,7 +3102,7 @@ const W2 = (I) => {
|
|
|
3043
3102
|
995: ["GE"],
|
|
3044
3103
|
996: ["KG"],
|
|
3045
3104
|
998: ["UZ"]
|
|
3046
|
-
},
|
|
3105
|
+
}, M1 = {
|
|
3047
3106
|
AC: [, [
|
|
3048
3107
|
,
|
|
3049
3108
|
,
|
|
@@ -3826,37 +3885,12 @@ const W2 = (I) => {
|
|
|
3826
3885
|
,
|
|
3827
3886
|
[-1]
|
|
3828
3887
|
], [, , "242225\\d{4}", , , , "2422250123"], , , [, , , , , , , , , [-1]]],
|
|
3829
|
-
BT: [
|
|
3830
|
-
,
|
|
3831
|
-
[, , "[17]\\d{7}|[2-8]\\d{6}", , , , , , , [7, 8], [6]],
|
|
3832
|
-
[, , "(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", , , , "2345678", , , [7], [6]],
|
|
3833
|
-
[, , "(?:1[67]|77)\\d{6}", , , , "17123456", , , [8]],
|
|
3834
|
-
[, , , , , , , , , [-1]],
|
|
3835
|
-
[, , , , , , , , , [-1]],
|
|
3836
|
-
[, , , , , , , , , [-1]],
|
|
3837
|
-
[, , , , , , , , , [-1]],
|
|
3838
|
-
[, , , , , , , , , [-1]],
|
|
3839
|
-
"BT",
|
|
3840
|
-
975,
|
|
3841
|
-
"00",
|
|
3842
|
-
,
|
|
3843
|
-
,
|
|
3844
|
-
,
|
|
3845
|
-
,
|
|
3846
|
-
,
|
|
3847
|
-
,
|
|
3848
|
-
,
|
|
3849
|
-
[[, "(\\d{3})(\\d{3})", "$1 $2", ["[2-7]"]], [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]],
|
|
3850
|
-
[[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-68]|7[246]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|7"]]],
|
|
3851
|
-
[, , , , , , , , , [-1]],
|
|
3852
|
-
,
|
|
3888
|
+
BT: [, [, , "[178]\\d{7}|[2-8]\\d{6}", , , , , , , [7, 8], [6]], [, , "(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}", , , , "2345678", , , [7], [6]], [, , "(?:1[67]|[78]7)\\d{6}", , , , "17123456", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "BT", 975, "00", , , , , , , , [[, "(\\d{3})(\\d{3})", "$1 $2", ["[2-7]"]], [, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], [
|
|
3853
3889
|
,
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
[, , , , , , , , , [-1]]
|
|
3859
|
-
],
|
|
3890
|
+
"(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
|
|
3891
|
+
"$1 $2 $3 $4",
|
|
3892
|
+
["1[67]|[78]"]
|
|
3893
|
+
]], [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], [, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
3860
3894
|
BW: [, [, , "(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}", , , , , , , [7, 8, 10]], [, , "(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013]|81)|4(?:6[03]|7[1267]|9[0-5])|5(?:3[03489]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[013467]))\\d{4}", , , , "2401234", , , [7]], [
|
|
3861
3895
|
,
|
|
3862
3896
|
,
|
|
@@ -3868,7 +3902,7 @@ const W2 = (I) => {
|
|
|
3868
3902
|
,
|
|
3869
3903
|
,
|
|
3870
3904
|
[8]
|
|
3871
|
-
], [, , "(?:0800|800\\d)\\d{6}", , , , "0800012345", , , [10]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", , , , "79101234", , , [8]], "BW", 267, "00", , , , , , , , [[, "(\\d{2})(\\d{5})", "$1 $2", ["90"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [
|
|
3905
|
+
], [, , "(?:0800|800\\d)\\d{6}", , , , "0800012345", , , [10]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "79(?:1(?:[0-2]\\d|3[0-8])|2[0-7]\\d)\\d{3}", , , , "79101234", , , [8]], "BW", 267, "00", , , , , , , , [[, "(\\d{2})(\\d{5})", "$1 $2", ["90"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[24-6]|3[15-9]"]], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37]"]], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [
|
|
3872
3906
|
,
|
|
3873
3907
|
,
|
|
3874
3908
|
,
|
|
@@ -3879,7 +3913,7 @@ const W2 = (I) => {
|
|
|
3879
3913
|
,
|
|
3880
3914
|
,
|
|
3881
3915
|
[-1]
|
|
3882
|
-
]],
|
|
3916
|
+
], , , [, , , , , , , , , [-1]]],
|
|
3883
3917
|
BY: [, [, , "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", , , , , , , [6, 7, 8, 9, 10, 11], [5]], [, , "(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}", , , , "152450911", , , [9], [5, 6, 7]], [, , "(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}", , , , "294911911", , , [9]], [
|
|
3884
3918
|
,
|
|
3885
3919
|
,
|
|
@@ -4274,7 +4308,7 @@ const W2 = (I) => {
|
|
|
4274
4308
|
,
|
|
4275
4309
|
[5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
|
|
4276
4310
|
[2, 3, 4]
|
|
4277
|
-
], [, , "
|
|
4311
|
+
], [, , "1(?:(?:5(?:[0-25-9]\\d\\d|3(?:10|33))|7[26-9]\\d\\d)\\d{6}|6[023]\\d{7,8})|17\\d{8}", , , , "15123456789", , , [10, 11]], [, , "800\\d{7,12}", , , , "8001234567890", , , [10, 11, 12, 13, 14, 15]], [, , "(?:137[7-9]|900(?:[135]|9\\d))\\d{6}", , , , "9001234567", , , [10, 11]], [, , "180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}", , , , "18012345", , , [7, 8, 9, 10, 11, 12, 13, 14]], [, , "700\\d{8}", , , , "70012345678", , , [11]], [, , , , , , , , , [-1]], "DE", 49, "00", "0", , , "0", , , , [
|
|
4278
4312
|
[
|
|
4279
4313
|
,
|
|
4280
4314
|
"(\\d{2})(\\d{3,13})",
|
|
@@ -4300,7 +4334,7 @@ const W2 = (I) => {
|
|
|
4300
4334
|
[, "(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"],
|
|
4301
4335
|
[, "(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"],
|
|
4302
4336
|
[, "(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"],
|
|
4303
|
-
[, "(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|
|
|
4337
|
+
[, "(\\d{5})(\\d{6})", "$1 $2", ["15[03568]", "15(?:[0568]|3[13])"], "0$1"],
|
|
4304
4338
|
[, "(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"],
|
|
4305
4339
|
[, "(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"],
|
|
4306
4340
|
[, "(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"],
|
|
@@ -5022,7 +5056,7 @@ const W2 = (I) => {
|
|
|
5022
5056
|
,
|
|
5023
5057
|
,
|
|
5024
5058
|
"2201234"
|
|
5025
|
-
], [, , "(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[
|
|
5059
|
+
], [, , "(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[0-39]|70))\\d{4}", , , , "6091234"], [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], [, , "9008\\d{3}", , , , "9008123"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "515\\d{4}", , , , "5151234"], "GY", 592, "001", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
5026
5060
|
HK: [, [, , "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", , , , , , , [5, 6, 7, 8, 9, 11]], [
|
|
5027
5061
|
,
|
|
5028
5062
|
,
|
|
@@ -5185,7 +5219,7 @@ const W2 = (I) => {
|
|
|
5185
5219
|
10,
|
|
5186
5220
|
11,
|
|
5187
5221
|
12
|
|
5188
|
-
]], [, , "153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", , , , "21234567", , , [8, 11, 12], [7]], [, , "55(?:4(?:[01]
|
|
5222
|
+
]], [, , "153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}", , , , "21234567", , , [8, 11, 12], [7]], [, , "55(?:4(?:0[01]|10|5[0-7])|57[0-289])\\d{4}|5(?:(?:[0-2][02-9]|[36]\\d|[49][2-9]|8[3-7])\\d|5(?:01|2\\d|3[0-3]|4[34]|5[0-25689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}", , , , "502345678", , , [9]], [, , "1(?:255|80[019]\\d{3})\\d{3}", , , , "1800123456", , , [7, 10]], [, , "1212\\d{4}|1(?:200|9(?:0[0-2]|19))\\d{6}", , , , "1919123456", , , [8, 10]], [, , "1700\\d{6}", , , , "1700123456", , , [10]], [, , , , , , , , , [-1]], [
|
|
5189
5223
|
,
|
|
5190
5224
|
,
|
|
5191
5225
|
"7(?:38(?:[05]\\d|8[018])|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",
|
|
@@ -6602,7 +6636,7 @@ const W2 = (I) => {
|
|
|
6602
6636
|
,
|
|
6603
6637
|
[, , "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", , , , , , , [7, 8, 9]],
|
|
6604
6638
|
[, , "2[1-6]\\d{6}", , , , "23123456", , , [8]],
|
|
6605
|
-
[, , "1505\\d{4}|(?:7(?:[
|
|
6639
|
+
[, , "1505\\d{4}|(?:7(?:[125-9]\\d|41)|9(?:0[1-9]|[1-9]\\d))\\d{5}", , , , "92123456", , , [8]],
|
|
6606
6640
|
[, , "8007\\d{4,5}|(?:500|800[05])\\d{4}", , , , "80071234"],
|
|
6607
6641
|
[, , "900\\d{5}", , , , "90012345", , , [8]],
|
|
6608
6642
|
[, , , , , , , , , [-1]],
|
|
@@ -6632,7 +6666,7 @@ const W2 = (I) => {
|
|
|
6632
6666
|
PA: [, [, , "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", , , , , , , [7, 8, 10, 11]], [
|
|
6633
6667
|
,
|
|
6634
6668
|
,
|
|
6635
|
-
"(?:1(?:0\\d|1[
|
|
6669
|
+
"(?:1(?:0\\d|1[0479]|2[37]|3[0137]|4[17]|5[05]|6[058]|7[0167]|8[2358]|9[1389])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[02-9])|3(?:[047-9]\\d|1[0-8]|2[0-5]|33|5[0-35]|6[068])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[0156]|7[0-24-9]|8[4-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",
|
|
6636
6670
|
,
|
|
6637
6671
|
,
|
|
6638
6672
|
,
|
|
@@ -7082,7 +7116,7 @@ const W2 = (I) => {
|
|
|
7082
7116
|
,
|
|
7083
7117
|
,
|
|
7084
7118
|
[8]
|
|
7085
|
-
], [, , "
|
|
7119
|
+
], [, , "8980\\d{4}|(?:8(?:0[1-9]|[1-8]\\d|9[0-7])|9[0-8]\\d)\\d{5}", , , , "81234567", , , [8]], [, , "(?:18|8)00\\d{7}", , , , "18001234567", , , [10, 11]], [, , "1900\\d{7}", , , , "19001234567", , , [11]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:3[12]\\d|666)\\d{5}", , , , "31234567", , , [8]], "SG", 65, "0[0-3]\\d", , , , , , , , [[, "(\\d{4,5})", "$1", ["1[013-9]|77", "1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]], [, "(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], [
|
|
7086
7120
|
,
|
|
7087
7121
|
"(\\d{4})(\\d{4})(\\d{3})",
|
|
7088
7122
|
"$1 $2 $3",
|
|
@@ -7255,7 +7289,7 @@ const W2 = (I) => {
|
|
|
7255
7289
|
"$1 $2",
|
|
7256
7290
|
["(?:2|90)4|[67]"]
|
|
7257
7291
|
], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], [, "(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
7258
|
-
SR: [, [, , "(?:[2-5]|
|
|
7292
|
+
SR: [, [, , "(?:[2-5]|[6-8]\\d|90)\\d{5}", , , , , , , [6, 7]], [, , "(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}", , , , "211234", , , [6]], [, , "(?:6[08]|7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], [, , "80\\d{5}", , , , "8012345", , , [7]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [
|
|
7259
7293
|
,
|
|
7260
7294
|
,
|
|
7261
7295
|
"56\\d{4}",
|
|
@@ -7267,37 +7301,13 @@ const W2 = (I) => {
|
|
|
7267
7301
|
,
|
|
7268
7302
|
[6]
|
|
7269
7303
|
], "SR", 597, "00", , , , , , , , [[, "(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], [, "(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
7270
|
-
SS: [
|
|
7271
|
-
,
|
|
7272
|
-
[, , "[19]\\d{8}", , , , , , , [9]],
|
|
7273
|
-
[, , "1[89]\\d{7}", , , , "181234567"],
|
|
7274
|
-
[, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"],
|
|
7275
|
-
[, , , , , , , , , [-1]],
|
|
7276
|
-
[, , , , , , , , , [-1]],
|
|
7277
|
-
[, , , , , , , , , [-1]],
|
|
7278
|
-
[, , , , , , , , , [-1]],
|
|
7279
|
-
[, , , , , , , , , [-1]],
|
|
7280
|
-
"SS",
|
|
7281
|
-
211,
|
|
7282
|
-
"00",
|
|
7283
|
-
"0",
|
|
7304
|
+
SS: [, [, , "[19]\\d{8}", , , , , , , [9]], [, , "1[89]\\d{7}", , , , "181234567"], [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SS", 211, "00", "0", , , "0", , , , [[
|
|
7284
7305
|
,
|
|
7285
|
-
,
|
|
7286
|
-
"
|
|
7287
|
-
,
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
[[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]],
|
|
7291
|
-
,
|
|
7292
|
-
[, , , , , , , , , [-1]],
|
|
7293
|
-
,
|
|
7294
|
-
,
|
|
7295
|
-
[, , , , , , , , , [-1]],
|
|
7296
|
-
[, , , , , , , , , [-1]],
|
|
7297
|
-
,
|
|
7298
|
-
,
|
|
7299
|
-
[, , , , , , , , , [-1]]
|
|
7300
|
-
],
|
|
7306
|
+
"(\\d{3})(\\d{3})(\\d{3})",
|
|
7307
|
+
"$1 $2 $3",
|
|
7308
|
+
["[19]"],
|
|
7309
|
+
"0$1"
|
|
7310
|
+
]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
7301
7311
|
ST: [, [, , "(?:22|9\\d)\\d{5}", , , , , , , [7]], [, , "22\\d{5}", , , , "2221234"], [, , "900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}", , , , "9812345"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "ST", 239, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
7302
7312
|
SV: [, [, , "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", , , , , , , [7, 8, 11]], [
|
|
7303
7313
|
,
|
|
@@ -7710,35 +7720,62 @@ const W2 = (I) => {
|
|
|
7710
7720
|
[, "(\\d{3})(\\d{4})", "$1-$2", ["[24-9]|3(?:[02-9]|1[1-9])"]],
|
|
7711
7721
|
[, "(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], , , 1]
|
|
7712
7722
|
], [[, "(\\d{3})(\\d{4})", "$1-$2", ["310"], , , 1], [, "(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-9]"]]], [, , , , , , , , , [-1]], 1, , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
|
|
7713
|
-
UY: [, [, , "0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}", , , , , , , [6, 7, 8, 9, 10, 11, 12, 13]], [, , "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", , , , "21231234", , , [8], [7]], [
|
|
7723
|
+
UY: [, [, , "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", , , , , , , [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]], [, , "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", , , , "21231234", , , [8], [7]], [
|
|
7714
7724
|
,
|
|
7715
7725
|
,
|
|
7716
|
-
"
|
|
7726
|
+
"9[1-9]\\d{6}",
|
|
7717
7727
|
,
|
|
7718
7728
|
,
|
|
7719
7729
|
,
|
|
7720
|
-
"
|
|
7721
|
-
], [, , "90[0-8]\\d{4}", , , , "9001234", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "UY", 598, "0(?:0|1[3-9]\\d)", "0", " int. ", , "0", , "00", , [[, "(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], [, "(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], [, "(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], [, "(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [
|
|
7730
|
+
"94231234",
|
|
7722
7731
|
,
|
|
7723
7732
|
,
|
|
7733
|
+
[8]
|
|
7734
|
+
], [, , "0004\\d{2,9}|(?:405|80[05])\\d{4}", , , , "8001234", , , [6, 7, 8, 9, 10, 11, 12, 13]], [, , "90[0-8]\\d{4}", , , , "9001234", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "UY", 598, "0(?:0|1[3-9]\\d)", "0", " int. ", , "0", , "00", , [[, "(\\d{4,5})", "$1", ["21"]], [, "(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], [, "(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], [, "(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], [
|
|
7724
7735
|
,
|
|
7736
|
+
"(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})",
|
|
7737
|
+
"$1 $2 $3 $4",
|
|
7738
|
+
["0"]
|
|
7739
|
+
]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "21\\d{2,3}", , , , "21123", , , [4, 5]], , , [, , , , , , , , , [-1]]],
|
|
7740
|
+
UZ: [
|
|
7725
7741
|
,
|
|
7742
|
+
[, , "(?:20|33|[5-9]\\d)\\d{7}", , , , , , , [9]],
|
|
7743
|
+
[, , "(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}", , , , "669050123"],
|
|
7744
|
+
[
|
|
7745
|
+
,
|
|
7746
|
+
,
|
|
7747
|
+
"(?:(?:[25]0|33|8[78]|9[0-57-9])\\d{3}|6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079])))|7(?:[07]\\d{3}|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07]))))\\d{4}",
|
|
7748
|
+
,
|
|
7749
|
+
,
|
|
7750
|
+
,
|
|
7751
|
+
"912345678"
|
|
7752
|
+
],
|
|
7753
|
+
[, , , , , , , , , [-1]],
|
|
7754
|
+
[, , , , , , , , , [-1]],
|
|
7755
|
+
[, , , , , , , , , [-1]],
|
|
7756
|
+
[, , , , , , , , , [-1]],
|
|
7757
|
+
[, , , , , , , , , [-1]],
|
|
7758
|
+
"UZ",
|
|
7759
|
+
998,
|
|
7760
|
+
"00",
|
|
7726
7761
|
,
|
|
7727
7762
|
,
|
|
7728
7763
|
,
|
|
7729
7764
|
,
|
|
7730
7765
|
,
|
|
7731
|
-
[-1]
|
|
7732
|
-
]],
|
|
7733
|
-
UZ: [, [, , "(?:20|33|[5-9]\\d)\\d{7}", , , , , , , [9]], [, , "(?:55\\d\\d|6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|[69]\\d\\d|7(?:[23]\\d|7[69]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|[168]\\d\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|9(?:22|5[1-9])))\\d{5}", , , , "669050123"], [
|
|
7734
7766
|
,
|
|
7735
7767
|
,
|
|
7736
|
-
"(
|
|
7768
|
+
[[, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]],
|
|
7737
7769
|
,
|
|
7770
|
+
[, , , , , , , , , [-1]],
|
|
7771
|
+
,
|
|
7772
|
+
,
|
|
7773
|
+
[, , , , , , , , , [-1]],
|
|
7774
|
+
[, , , , , , , , , [-1]],
|
|
7738
7775
|
,
|
|
7739
7776
|
,
|
|
7740
|
-
|
|
7741
|
-
],
|
|
7777
|
+
[, , , , , , , , , [-1]]
|
|
7778
|
+
],
|
|
7742
7779
|
VA: [, [, , "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", , , , , , , [6, 7, 8, 9, 10, 11, 12]], [, , "06698\\d{1,6}", , , , "0669812345", , , [6, 7, 8, 9, 10, 11]], [, , "3[1-9]\\d{8}|3[2-9]\\d{7}", , , , "3123456789", , , [9, 10]], [
|
|
7743
7780
|
,
|
|
7744
7781
|
,
|
|
@@ -8170,13 +8207,13 @@ const W2 = (I) => {
|
|
|
8170
8207
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
8171
8208
|
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]]]
|
|
8172
8209
|
};
|
|
8173
|
-
function
|
|
8210
|
+
function M() {
|
|
8174
8211
|
this.g = {};
|
|
8175
8212
|
}
|
|
8176
|
-
|
|
8177
|
-
return
|
|
8213
|
+
M.h = void 0, M.g = function() {
|
|
8214
|
+
return M.h ? M.h : M.h = new M();
|
|
8178
8215
|
};
|
|
8179
|
-
var
|
|
8216
|
+
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 = {
|
|
8180
8217
|
0: "0",
|
|
8181
8218
|
1: "1",
|
|
8182
8219
|
2: "2",
|
|
@@ -8190,7 +8227,7 @@ const W2 = (I) => {
|
|
|
8190
8227
|
"+": "+",
|
|
8191
8228
|
"*": "*",
|
|
8192
8229
|
"#": "#"
|
|
8193
|
-
},
|
|
8230
|
+
}, C2 = {
|
|
8194
8231
|
0: "0",
|
|
8195
8232
|
1: "1",
|
|
8196
8233
|
2: "2",
|
|
@@ -8257,74 +8294,74 @@ const W2 = (I) => {
|
|
|
8257
8294
|
X: "9",
|
|
8258
8295
|
Y: "9",
|
|
8259
8296
|
Z: "9"
|
|
8260
|
-
},
|
|
8297
|
+
}, m2 = RegExp("[++]+"), d1 = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), y2 = RegExp("[++0-90-9٠-٩۰-۹]"), _2 = /[\\\/] *x/, I2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), v2 = /(?:.*?[A-Za-z]){3}.*/, S2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), w2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
8261
8298
|
function J(d) {
|
|
8262
8299
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8263
8300
|
}
|
|
8264
|
-
function
|
|
8301
|
+
function x1() {
|
|
8265
8302
|
return ";ext=" + J("20") + "|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*" + (J("20") + "#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*") + (J("9") + "#?|[- ]+") + (J("6") + "#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*") + (J("15") + "#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*") + (J("9") + "#?");
|
|
8266
8303
|
}
|
|
8267
|
-
var
|
|
8268
|
-
function
|
|
8269
|
-
return 2 > d.length ? !1 :
|
|
8304
|
+
var P1 = new RegExp("(?:" + x1() + ")$", "i"), b2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + x1() + ")?$", "i"), L2 = /(\$\d)/, N2 = /^\(?\$1\)?$/;
|
|
8305
|
+
function R1(d) {
|
|
8306
|
+
return 2 > d.length ? !1 : F(b2, d);
|
|
8270
8307
|
}
|
|
8271
|
-
function
|
|
8272
|
-
return
|
|
8308
|
+
function B1(d) {
|
|
8309
|
+
return F(v2, d) ? o1(d, C2) : o1(d, C1);
|
|
8273
8310
|
}
|
|
8274
|
-
function
|
|
8275
|
-
var t =
|
|
8311
|
+
function k1(d) {
|
|
8312
|
+
var t = B1(d.toString());
|
|
8276
8313
|
k(d), d.g(t);
|
|
8277
8314
|
}
|
|
8278
|
-
function
|
|
8279
|
-
return d != null && (K(d, 9) != 1 ||
|
|
8315
|
+
function O1(d) {
|
|
8316
|
+
return d != null && (K(d, 9) != 1 || x(d, 9)[0] != -1);
|
|
8280
8317
|
}
|
|
8281
|
-
function
|
|
8282
|
-
for (var $ = new A(), n,
|
|
8318
|
+
function o1(d, t) {
|
|
8319
|
+
for (var $ = new A(), n, o = d.length, a = 0; a < o; ++a) n = d.charAt(a), n = t[n.toUpperCase()], n != null && $.g(n);
|
|
8283
8320
|
return $.toString();
|
|
8284
8321
|
}
|
|
8285
|
-
function
|
|
8286
|
-
return d.length == 0 ||
|
|
8322
|
+
function G1(d) {
|
|
8323
|
+
return d.length == 0 || N2.test(d);
|
|
8287
8324
|
}
|
|
8288
|
-
function
|
|
8289
|
-
return d != null && isNaN(d) && d.toUpperCase() in
|
|
8325
|
+
function a1(d) {
|
|
8326
|
+
return d != null && isNaN(d) && d.toUpperCase() in M1;
|
|
8290
8327
|
}
|
|
8291
|
-
|
|
8292
|
-
if (
|
|
8293
|
-
var $ =
|
|
8328
|
+
M.prototype.format = function(d, t) {
|
|
8329
|
+
if (g(d, 2) == 0 && B(d, 5)) {
|
|
8330
|
+
var $ = v(d, 5);
|
|
8294
8331
|
if (0 < $.length) return $;
|
|
8295
8332
|
}
|
|
8296
|
-
$ =
|
|
8297
|
-
var n =
|
|
8298
|
-
if (t == 0) return
|
|
8299
|
-
if (!($ in
|
|
8300
|
-
var
|
|
8301
|
-
d = B(d, 3) &&
|
|
8333
|
+
$ = v(d, 1);
|
|
8334
|
+
var n = e1(d);
|
|
8335
|
+
if (t == 0) return U1($, 0, n, "");
|
|
8336
|
+
if (!($ in Q)) return n;
|
|
8337
|
+
var o = t1(this, $, $1($));
|
|
8338
|
+
d = B(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : B(o, 13) ? g(o, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
|
|
8302
8339
|
d: {
|
|
8303
|
-
|
|
8304
|
-
for (var
|
|
8305
|
-
|
|
8306
|
-
var _ = K(
|
|
8307
|
-
if ((_ == 0 || n.search(
|
|
8308
|
-
|
|
8340
|
+
o = x(o, 20).length == 0 || t == 2 ? x(o, 19) : x(o, 20);
|
|
8341
|
+
for (var a, u = o.length, h = 0; h < u; ++h) {
|
|
8342
|
+
a = o[h];
|
|
8343
|
+
var _ = K(a, 3);
|
|
8344
|
+
if ((_ == 0 || n.search(g(a, 3, _ - 1)) == 0) && (_ = new RegExp(g(a, 1)), F(_, n))) {
|
|
8345
|
+
o = a;
|
|
8309
8346
|
break d;
|
|
8310
8347
|
}
|
|
8311
8348
|
}
|
|
8312
|
-
|
|
8349
|
+
o = null;
|
|
8313
8350
|
}
|
|
8314
|
-
return
|
|
8315
|
-
|
|
8351
|
+
return o != null && (u = o, o = v(u, 2), a = new RegExp(g(u, 1)), v(
|
|
8352
|
+
u,
|
|
8316
8353
|
5
|
|
8317
|
-
),
|
|
8354
|
+
), u = v(u, 4), n = t == 2 && u != null && 0 < u.length ? n.replace(a, o.replace(L2, u)) : n.replace(a, o), t == 3 && (n = n.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), n = n.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), U1($, t, n, d);
|
|
8318
8355
|
};
|
|
8319
|
-
function
|
|
8356
|
+
function t1(d, t, $) {
|
|
8320
8357
|
return $ == "001" ? j(d, "" + t) : j(d, $);
|
|
8321
8358
|
}
|
|
8322
|
-
function
|
|
8359
|
+
function e1(d) {
|
|
8323
8360
|
if (!B(d, 2)) return "";
|
|
8324
|
-
var t = "" +
|
|
8325
|
-
return B(d, 4) &&
|
|
8361
|
+
var t = "" + g(d, 2);
|
|
8362
|
+
return B(d, 4) && g(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
|
|
8326
8363
|
}
|
|
8327
|
-
function
|
|
8364
|
+
function U1(d, t, $, n) {
|
|
8328
8365
|
switch (t) {
|
|
8329
8366
|
case 0:
|
|
8330
8367
|
return "+" + d + $ + n;
|
|
@@ -8339,71 +8376,71 @@ const W2 = (I) => {
|
|
|
8339
8376
|
function u1(d, t) {
|
|
8340
8377
|
switch (t) {
|
|
8341
8378
|
case 4:
|
|
8342
|
-
return
|
|
8379
|
+
return g(d, 5);
|
|
8343
8380
|
case 3:
|
|
8344
|
-
return
|
|
8381
|
+
return g(d, 4);
|
|
8345
8382
|
case 1:
|
|
8346
|
-
return
|
|
8383
|
+
return g(d, 3);
|
|
8347
8384
|
case 0:
|
|
8348
8385
|
case 2:
|
|
8349
|
-
return
|
|
8386
|
+
return g(d, 2);
|
|
8350
8387
|
case 5:
|
|
8351
|
-
return
|
|
8388
|
+
return g(d, 6);
|
|
8352
8389
|
case 6:
|
|
8353
|
-
return
|
|
8390
|
+
return g(d, 8);
|
|
8354
8391
|
case 7:
|
|
8355
|
-
return
|
|
8392
|
+
return g(d, 7);
|
|
8356
8393
|
case 8:
|
|
8357
|
-
return
|
|
8394
|
+
return g(d, 21);
|
|
8358
8395
|
case 9:
|
|
8359
|
-
return
|
|
8396
|
+
return g(d, 25);
|
|
8360
8397
|
case 10:
|
|
8361
|
-
return
|
|
8398
|
+
return g(d, 28);
|
|
8362
8399
|
default:
|
|
8363
|
-
return
|
|
8400
|
+
return g(d, 1);
|
|
8364
8401
|
}
|
|
8365
8402
|
}
|
|
8366
|
-
function
|
|
8367
|
-
var $ =
|
|
8368
|
-
return d =
|
|
8403
|
+
function F1(d, t) {
|
|
8404
|
+
var $ = V1(d, t);
|
|
8405
|
+
return d = t1(d, v(t, 1), $), d == null ? -1 : (t = e1(t), m1(t, d));
|
|
8369
8406
|
}
|
|
8370
|
-
function
|
|
8371
|
-
return
|
|
8407
|
+
function m1(d, t) {
|
|
8408
|
+
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;
|
|
8372
8409
|
}
|
|
8373
8410
|
function j(d, t) {
|
|
8374
8411
|
if (t == null) return null;
|
|
8375
8412
|
t = t.toUpperCase();
|
|
8376
8413
|
var $ = d.g[t];
|
|
8377
8414
|
if ($ == null) {
|
|
8378
|
-
if ($ =
|
|
8379
|
-
$ = new
|
|
8415
|
+
if ($ = M1[t], $ == null) return null;
|
|
8416
|
+
$ = new X().g(z.m(), $), d.g[t] = $;
|
|
8380
8417
|
}
|
|
8381
8418
|
return $;
|
|
8382
8419
|
}
|
|
8383
|
-
function
|
|
8420
|
+
function O(d, t) {
|
|
8384
8421
|
var $ = d.length;
|
|
8385
|
-
return 0 < K(t, 9) &&
|
|
8422
|
+
return 0 < K(t, 9) && x(t, 9).indexOf($) == -1 ? !1 : F(v(t, 2), d);
|
|
8386
8423
|
}
|
|
8387
|
-
function
|
|
8388
|
-
var $ =
|
|
8389
|
-
return
|
|
8424
|
+
function T2(d, t) {
|
|
8425
|
+
var $ = V1(d, t), n = v(t, 1), o = t1(d, n, $);
|
|
8426
|
+
return o == null || $ != "001" && n != K1(d, $) ? o = !1 : (d = e1(t), o = m1(d, o) != -1), o;
|
|
8390
8427
|
}
|
|
8391
|
-
function
|
|
8428
|
+
function V1(d, t) {
|
|
8392
8429
|
if (t == null) return null;
|
|
8393
|
-
var $ =
|
|
8394
|
-
if ($ =
|
|
8430
|
+
var $ = v(t, 1);
|
|
8431
|
+
if ($ = Q[$], $ == null) d = null;
|
|
8395
8432
|
else if ($.length == 1) d = $[0];
|
|
8396
8433
|
else d: {
|
|
8397
|
-
t =
|
|
8398
|
-
for (var n,
|
|
8399
|
-
n = $[
|
|
8400
|
-
var
|
|
8401
|
-
if (B(
|
|
8402
|
-
if (t.search(
|
|
8434
|
+
t = e1(t);
|
|
8435
|
+
for (var n, o = $.length, a = 0; a < o; a++) {
|
|
8436
|
+
n = $[a];
|
|
8437
|
+
var u = j(d, n);
|
|
8438
|
+
if (B(u, 23)) {
|
|
8439
|
+
if (t.search(g(u, 23)) == 0) {
|
|
8403
8440
|
d = n;
|
|
8404
8441
|
break d;
|
|
8405
8442
|
}
|
|
8406
|
-
} else if (
|
|
8443
|
+
} else if (m1(t, u) != -1) {
|
|
8407
8444
|
d = n;
|
|
8408
8445
|
break d;
|
|
8409
8446
|
}
|
|
@@ -8412,151 +8449,151 @@ const W2 = (I) => {
|
|
|
8412
8449
|
}
|
|
8413
8450
|
return d;
|
|
8414
8451
|
}
|
|
8415
|
-
function
|
|
8416
|
-
return d =
|
|
8452
|
+
function $1(d) {
|
|
8453
|
+
return d = Q[d], d == null ? "ZZ" : d[0];
|
|
8417
8454
|
}
|
|
8418
|
-
function
|
|
8455
|
+
function K1(d, t) {
|
|
8419
8456
|
if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
8420
|
-
return
|
|
8457
|
+
return v(d, 10);
|
|
8421
8458
|
}
|
|
8422
8459
|
function l1(d, t, $, n) {
|
|
8423
|
-
var
|
|
8424
|
-
if (
|
|
8460
|
+
var o = u1($, n), a = K(o, 9) == 0 ? x(g($, 1), 9) : x(o, 9);
|
|
8461
|
+
if (o = x(o, 10), n == 2) if (O1(u1($, 0))) d = u1($, 1), O1(d) && (a = a.concat(K(d, 9) == 0 ? x(g($, 1), 9) : x(d, 9)), a.sort(), o.length == 0 ? o = x(d, 10) : (o = o.concat(x(d, 10)), o.sort()));
|
|
8425
8462
|
else return l1(d, t, $, 1);
|
|
8426
|
-
return
|
|
8463
|
+
return a[0] == -1 ? 5 : (t = t.length, -1 < o.indexOf(t) ? 4 : ($ = a[0], $ == t ? 0 : $ > t ? 2 : a[a.length - 1] < t ? 3 : -1 < a.indexOf(t, 1) ? 0 : 5));
|
|
8427
8464
|
}
|
|
8428
|
-
function
|
|
8429
|
-
var n =
|
|
8430
|
-
return t =
|
|
8465
|
+
function h1(d, t, $) {
|
|
8466
|
+
var n = e1(t);
|
|
8467
|
+
return t = v(t, 1), t in Q ? (t = t1(d, t, $1(t)), l1(d, n, t, $)) : 1;
|
|
8431
8468
|
}
|
|
8432
|
-
function
|
|
8469
|
+
function H1(d, t) {
|
|
8433
8470
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
8434
|
-
for (var $, n = d.length,
|
|
8471
|
+
for (var $, n = d.length, o = 1; 3 >= o && o <= n; ++o) if ($ = parseInt(d.substring(0, o), 10), $ in Q) return t.g(d.substring(o)), $;
|
|
8435
8472
|
return 0;
|
|
8436
8473
|
}
|
|
8437
|
-
function
|
|
8474
|
+
function j1(d, t, $, n, o, a) {
|
|
8438
8475
|
if (t.length == 0) return 0;
|
|
8439
8476
|
t = new A(t);
|
|
8440
|
-
var
|
|
8441
|
-
$ != null && (
|
|
8477
|
+
var u;
|
|
8478
|
+
$ != null && (u = g($, 11)), u == null && (u = "NonMatch");
|
|
8442
8479
|
var h = t.toString();
|
|
8443
|
-
if (h.length == 0)
|
|
8444
|
-
else if (
|
|
8480
|
+
if (h.length == 0) u = 20;
|
|
8481
|
+
else if (d1.test(h)) h = h.replace(d1, ""), k(t), t.g(B1(h)), u = 1;
|
|
8445
8482
|
else {
|
|
8446
|
-
if (h = new RegExp(
|
|
8447
|
-
h =
|
|
8448
|
-
var _ =
|
|
8449
|
-
_ && _[1] != null && 0 < _[1].length &&
|
|
8450
|
-
} else
|
|
8451
|
-
|
|
8483
|
+
if (h = new RegExp(u), k1(t), u = t.toString(), u.search(h) == 0) {
|
|
8484
|
+
h = u.match(h)[0].length;
|
|
8485
|
+
var _ = u.substring(h).match(D1);
|
|
8486
|
+
_ && _[1] != null && 0 < _[1].length && o1(_[1], C1) == "0" ? u = !1 : (k(t), t.g(u.substring(h)), u = !0);
|
|
8487
|
+
} else u = !1;
|
|
8488
|
+
u = u ? 5 : 20;
|
|
8452
8489
|
}
|
|
8453
|
-
if (
|
|
8490
|
+
if (o && E(a, 6, u), u != 20) {
|
|
8454
8491
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
8455
|
-
if (d =
|
|
8492
|
+
if (d = H1(t, n), d != 0) return E(a, 1, d), d;
|
|
8456
8493
|
throw Error("Invalid country calling code");
|
|
8457
8494
|
}
|
|
8458
|
-
return $ != null && (
|
|
8459
|
-
}
|
|
8460
|
-
function
|
|
8461
|
-
var n = d.toString(),
|
|
8462
|
-
if (
|
|
8463
|
-
var
|
|
8464
|
-
if (
|
|
8465
|
-
|
|
8466
|
-
var h =
|
|
8467
|
-
t =
|
|
8495
|
+
return $ != null && (u = v($, 10), h = "" + u, _ = t.toString(), _.lastIndexOf(h, 0) == 0 && (h = new A(_.substring(h.length)), _ = g($, 1), _ = new RegExp(v(_, 2)), W1(h, $, null), h = h.toString(), !F(_, t.toString()) && F(_, h) || l1(d, t.toString(), $, -1) == 3)) ? (n.g(h), o && E(a, 6, 10), E(a, 1, u), u) : (E(a, 1, 0), 0);
|
|
8496
|
+
}
|
|
8497
|
+
function W1(d, t, $) {
|
|
8498
|
+
var n = d.toString(), o = n.length, a = g(t, 15);
|
|
8499
|
+
if (o != 0 && a != null && a.length != 0) {
|
|
8500
|
+
var u = new RegExp("^(?:" + a + ")");
|
|
8501
|
+
if (o = u.exec(n)) {
|
|
8502
|
+
a = new RegExp(v(g(t, 1), 2));
|
|
8503
|
+
var h = F(a, n), _ = o.length - 1;
|
|
8504
|
+
t = g(t, 16), t == null || t.length == 0 || o[_] == null || o[_].length == 0 ? (!h || F(a, n.substring(o[0].length))) && ($ != null && 0 < _ && o[_] != null && $.g(o[1]), d.set(n.substring(o[0].length))) : (n = n.replace(u, t), (!h || F(a, n)) && ($ != null && 0 < _ && $.g(o[1]), d.set(n)));
|
|
8468
8505
|
}
|
|
8469
8506
|
}
|
|
8470
8507
|
}
|
|
8471
|
-
function
|
|
8472
|
-
if (!
|
|
8473
|
-
return
|
|
8508
|
+
function Z(d, t, $) {
|
|
8509
|
+
if (!a1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
8510
|
+
return z1(d, t, $, !0);
|
|
8474
8511
|
}
|
|
8475
|
-
function
|
|
8512
|
+
function z1(d, t, $, n) {
|
|
8476
8513
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
8477
8514
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
8478
|
-
var
|
|
8479
|
-
if (
|
|
8480
|
-
else if (
|
|
8515
|
+
var o = new A(), a = t.indexOf(";phone-context=");
|
|
8516
|
+
if (a === -1) a = null;
|
|
8517
|
+
else if (a += 15, a >= t.length) a = "";
|
|
8481
8518
|
else {
|
|
8482
|
-
var
|
|
8483
|
-
|
|
8519
|
+
var u = t.indexOf(";", a);
|
|
8520
|
+
a = u !== -1 ? t.substring(a, u) : t.substring(a);
|
|
8484
8521
|
}
|
|
8485
|
-
var h =
|
|
8486
|
-
if (h == null ?
|
|
8487
|
-
if (
|
|
8488
|
-
|
|
8522
|
+
var h = a;
|
|
8523
|
+
if (h == null ? u = !0 : h.length === 0 ? u = !1 : (u = S2.exec(h), h = w2.exec(h), u = u !== null || h !== null), !u || (a != null ? (a.charAt(0) === "+" && o.g(a), a = t.indexOf("tel:"), o.g(t.substring(0 <= a ? a + 4 : 0, t.indexOf(";phone-context=")))) : (a = o.g, u = t ?? "", h = u.search(y2), 0 <= h ? (u = u.substring(h), u = u.replace(I2, ""), h = u.search(_2), 0 <= h && (u = u.substring(0, h))) : u = "", a.call(o, u)), a = o.toString(), u = a.indexOf(";isub="), 0 < u && (k(o), o.g(a.substring(0, u))), !R1(o.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
8524
|
+
if (a = o.toString(), !(a1($) || a != null && 0 < a.length && d1.test(a))) throw Error("Invalid country calling code");
|
|
8525
|
+
a = new H(), n && E(a, 5, t);
|
|
8489
8526
|
d: {
|
|
8490
|
-
if (t =
|
|
8491
|
-
h = t.match(
|
|
8527
|
+
if (t = o.toString(), u = t.search(P1), 0 <= u && R1(t.substring(0, u))) {
|
|
8528
|
+
h = t.match(P1);
|
|
8492
8529
|
for (var _ = h.length, V = 1; V < _; ++V) if (h[V] != null && 0 < h[V].length) {
|
|
8493
|
-
k(
|
|
8530
|
+
k(o), o.g(t.substring(0, u)), t = h[V];
|
|
8494
8531
|
break d;
|
|
8495
8532
|
}
|
|
8496
8533
|
}
|
|
8497
8534
|
t = "";
|
|
8498
8535
|
}
|
|
8499
|
-
0 < t.length &&
|
|
8536
|
+
0 < t.length && E(a, 3, t), u = j(d, $), t = new A(), h = 0, _ = o.toString();
|
|
8500
8537
|
try {
|
|
8501
|
-
h =
|
|
8502
|
-
} catch (
|
|
8503
|
-
if (
|
|
8504
|
-
if (_ = _.replace(
|
|
8505
|
-
} else throw
|
|
8538
|
+
h = j1(d, _, u, t, n, a);
|
|
8539
|
+
} catch (I1) {
|
|
8540
|
+
if (I1.message == "Invalid country calling code" && d1.test(_)) {
|
|
8541
|
+
if (_ = _.replace(d1, ""), h = j1(d, _, u, t, n, a), h == 0) throw I1;
|
|
8542
|
+
} else throw I1;
|
|
8506
8543
|
}
|
|
8507
|
-
if (h != 0 ? (
|
|
8508
|
-
|
|
8544
|
+
if (h != 0 ? (o = $1(h), o != $ && (u = t1(d, h, o))) : (k1(o), t.g(o.toString()), $ != null ? (h = v(u, 10), E(
|
|
8545
|
+
a,
|
|
8509
8546
|
1,
|
|
8510
8547
|
h
|
|
8511
|
-
)) : n && (delete
|
|
8548
|
+
)) : n && (delete a.h[6], a.g && delete a.g[6])), 2 > t.h.length || (u != null && ($ = new A(), o = new A(t.toString()), W1(o, u, $), d = l1(d, o.toString(), u, -1), d != 2 && d != 4 && d != 5 && (t = o, n && 0 < $.toString().length && E(a, 7, $.toString()))), n = t.toString(), d = n.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
8512
8549
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
8513
8550
|
if (1 < n.length && n.charAt(0) == "0") {
|
|
8514
|
-
for (
|
|
8515
|
-
d != 1 &&
|
|
8551
|
+
for (E(a, 4, !0), d = 1; d < n.length - 1 && n.charAt(d) == "0"; ) d++;
|
|
8552
|
+
d != 1 && E(a, 8, d);
|
|
8516
8553
|
}
|
|
8517
|
-
return
|
|
8554
|
+
return E(a, 2, parseInt(n, 10)), a;
|
|
8518
8555
|
}
|
|
8519
|
-
function
|
|
8556
|
+
function F(d, t) {
|
|
8520
8557
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
8521
8558
|
}
|
|
8522
|
-
function
|
|
8523
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new A(), this.da = "", this.s = new A(), this.ba = new A(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga =
|
|
8559
|
+
function A2(d) {
|
|
8560
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new A(), this.da = "", this.s = new A(), this.ba = new A(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = M.g(), this.$ = 0, this.h = new A(), this.ha = !1, this.o = "", this.g = new A(), this.j = [], this.ka = d, this.l = J1(this, this.ka);
|
|
8524
8561
|
}
|
|
8525
|
-
var
|
|
8526
|
-
|
|
8527
|
-
var
|
|
8528
|
-
function
|
|
8562
|
+
var Z1 = new z();
|
|
8563
|
+
E(Z1, 11, "NA");
|
|
8564
|
+
var E2 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), Y1 = /[- ]/;
|
|
8565
|
+
function J1(d, t) {
|
|
8529
8566
|
var $ = d.ga;
|
|
8530
|
-
return t =
|
|
8567
|
+
return t = a1(t) ? K1($, t) : 0, d = j(d.ga, $1(t)), d ?? Z1;
|
|
8531
8568
|
}
|
|
8532
|
-
function
|
|
8569
|
+
function q1(d) {
|
|
8533
8570
|
for (var t = d.j.length, $ = 0; $ < t; ++$) {
|
|
8534
|
-
var n = d.j[$],
|
|
8535
|
-
if (d.da ==
|
|
8536
|
-
var
|
|
8537
|
-
k(
|
|
8538
|
-
var _ =
|
|
8539
|
-
|
|
8571
|
+
var n = d.j[$], o = v(n, 1);
|
|
8572
|
+
if (d.da == o) return !1;
|
|
8573
|
+
var a = d, u = n, h = v(u, 1);
|
|
8574
|
+
k(a.v);
|
|
8575
|
+
var _ = a;
|
|
8576
|
+
u = v(u, 2);
|
|
8540
8577
|
var V = "999999999999999".match(h)[0];
|
|
8541
|
-
if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(h, "g"),
|
|
8578
|
+
if (V.length < _.g.h.length ? _ = "" : (_ = V.replace(new RegExp(h, "g"), u), _ = _.replace(RegExp("9", "g"), " ")), 0 < _.length ? (a.v.g(_), a = !0) : a = !1, a) return d.da = o, d.ha = Y1.test(g(n, 4)), d.$ = 0, !0;
|
|
8542
8579
|
}
|
|
8543
8580
|
return d.u = !1;
|
|
8544
8581
|
}
|
|
8545
|
-
function
|
|
8546
|
-
for (var $ = [], n = t.length - 3,
|
|
8547
|
-
var
|
|
8548
|
-
K(
|
|
8582
|
+
function X1(d, t) {
|
|
8583
|
+
for (var $ = [], n = t.length - 3, o = d.j.length, a = 0; a < o; ++a) {
|
|
8584
|
+
var u = d.j[a];
|
|
8585
|
+
K(u, 3) == 0 ? $.push(d.j[a]) : (u = g(u, 3, Math.min(n, K(u, 3) - 1)), t.search(u) == 0 && $.push(d.j[a]));
|
|
8549
8586
|
}
|
|
8550
8587
|
d.j = $;
|
|
8551
8588
|
}
|
|
8552
|
-
function
|
|
8589
|
+
function M2(d, t) {
|
|
8553
8590
|
d.s.g(t);
|
|
8554
8591
|
var $ = t;
|
|
8555
|
-
if (
|
|
8592
|
+
if (D1.test($) || d.s.h.length == 1 && m2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = C1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
|
|
8556
8593
|
if (!d.la) {
|
|
8557
|
-
if (
|
|
8558
|
-
if (
|
|
8559
|
-
} else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, $))), d.o !=
|
|
8594
|
+
if ($2(d)) {
|
|
8595
|
+
if (i2(d)) return Q1(d);
|
|
8596
|
+
} else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, $))), d.o != e2(d)) return d.h.g(" "), Q1(d);
|
|
8560
8597
|
}
|
|
8561
8598
|
return d.s.toString();
|
|
8562
8599
|
}
|
|
@@ -8566,61 +8603,61 @@ const W2 = (I) => {
|
|
|
8566
8603
|
case 2:
|
|
8567
8604
|
return d.s.toString();
|
|
8568
8605
|
case 3:
|
|
8569
|
-
if (
|
|
8570
|
-
else return d.o =
|
|
8606
|
+
if ($2(d)) d.ea = !0;
|
|
8607
|
+
else return d.o = e2(d), y1(d);
|
|
8571
8608
|
default:
|
|
8572
|
-
return d.ea ? (
|
|
8609
|
+
return d.ea ? (i2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = n2(d, t), $ = d2(d), 0 < $.length ? $ : (X1(d, d.g.toString()), q1(d) ? t2(d) : d.u ? c1(d, t) : d.s.toString())) : y1(d);
|
|
8573
8610
|
}
|
|
8574
8611
|
}
|
|
8575
|
-
function
|
|
8576
|
-
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "",
|
|
8612
|
+
function Q1(d) {
|
|
8613
|
+
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", y1(d);
|
|
8577
8614
|
}
|
|
8578
|
-
function
|
|
8615
|
+
function d2(d) {
|
|
8579
8616
|
for (var t = d.g.toString(), $ = d.j.length, n = 0; n < $; ++n) {
|
|
8580
|
-
var
|
|
8581
|
-
if (new RegExp("^(?:" +
|
|
8617
|
+
var o = d.j[n], a = v(o, 1);
|
|
8618
|
+
if (new RegExp("^(?:" + a + ")$").test(t) && (d.ha = Y1.test(g(o, 4)), o = t.replace(new RegExp(a, "g"), g(o, 2)), o = c1(d, o), o1(o, g2) == d.ba)) return o;
|
|
8582
8619
|
}
|
|
8583
8620
|
return "";
|
|
8584
8621
|
}
|
|
8585
|
-
function
|
|
8622
|
+
function c1(d, t) {
|
|
8586
8623
|
var $ = d.h.h.length;
|
|
8587
8624
|
return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
|
|
8588
8625
|
}
|
|
8589
|
-
function
|
|
8626
|
+
function y1(d) {
|
|
8590
8627
|
var t = d.g.toString();
|
|
8591
8628
|
if (3 <= t.length) {
|
|
8592
|
-
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ?
|
|
8593
|
-
var
|
|
8594
|
-
0 < d.o.length &&
|
|
8629
|
+
for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? x(d.l, 20) : x(d.l, 19), n = $.length, o = 0; o < n; ++o) {
|
|
8630
|
+
var a = $[o];
|
|
8631
|
+
0 < d.o.length && G1(v(a, 4)) && !g(a, 6) && !B(a, 5) || (d.o.length != 0 || d.ca || G1(v(a, 4)) || g(a, 6)) && E2.test(v(a, 2)) && d.j.push(a);
|
|
8595
8632
|
}
|
|
8596
|
-
return
|
|
8633
|
+
return X1(d, t), t = d2(d), 0 < t.length ? t : q1(d) ? t2(d) : d.s.toString();
|
|
8597
8634
|
}
|
|
8598
|
-
return
|
|
8635
|
+
return c1(d, t);
|
|
8599
8636
|
}
|
|
8600
|
-
function
|
|
8637
|
+
function t2(d) {
|
|
8601
8638
|
var t = d.g.toString(), $ = t.length;
|
|
8602
8639
|
if (0 < $) {
|
|
8603
|
-
for (var n = "",
|
|
8604
|
-
return d.u ?
|
|
8640
|
+
for (var n = "", o = 0; o < $; o++) n = n2(d, t.charAt(o));
|
|
8641
|
+
return d.u ? c1(d, n) : d.s.toString();
|
|
8605
8642
|
}
|
|
8606
8643
|
return d.h.toString();
|
|
8607
8644
|
}
|
|
8608
|
-
function
|
|
8645
|
+
function e2(d) {
|
|
8609
8646
|
var t = d.g.toString(), $ = 0;
|
|
8610
|
-
if (
|
|
8647
|
+
if (g(d.l, 10) != 1) var n = !1;
|
|
8611
8648
|
else n = d.g.toString(), n = n.charAt(0) == "1" && n.charAt(1) != "0" && n.charAt(1) != "1";
|
|
8612
|
-
return n ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (n = new RegExp("^(?:" +
|
|
8649
|
+
return n ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (n = new RegExp("^(?:" + g(d.l, 15) + ")"), n = t.match(n), n != null && n[0] != null && 0 < n[0].length && (d.ca = !0, $ = n[0].length, d.h.g(t.substring(0, $)))), k(d.g), d.g.g(t.substring($)), t.substring(0, $);
|
|
8613
8650
|
}
|
|
8614
|
-
function
|
|
8615
|
-
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" +
|
|
8651
|
+
function $2(d) {
|
|
8652
|
+
var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
8616
8653
|
return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, k(d.g), d.g.g(t.substring($)), k(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
|
|
8617
8654
|
}
|
|
8618
|
-
function
|
|
8655
|
+
function i2(d) {
|
|
8619
8656
|
if (d.g.h.length == 0) return !1;
|
|
8620
|
-
var t = new A(), $ =
|
|
8621
|
-
return $ == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t =
|
|
8657
|
+
var t = new A(), $ = H1(d.g, t);
|
|
8658
|
+
return $ == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = $1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = J1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
|
|
8622
8659
|
}
|
|
8623
|
-
function
|
|
8660
|
+
function n2(d, t) {
|
|
8624
8661
|
var $ = d.v.toString();
|
|
8625
8662
|
if (0 <= $.substring(d.$).search(d.fa)) {
|
|
8626
8663
|
var n = $.search(d.fa);
|
|
@@ -8628,36 +8665,37 @@ const W2 = (I) => {
|
|
|
8628
8665
|
}
|
|
8629
8666
|
return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
|
|
8630
8667
|
}
|
|
8631
|
-
const
|
|
8632
|
-
|
|
8633
|
-
|
|
8668
|
+
const s2 = (d) => {
|
|
8669
|
+
const t = [];
|
|
8670
|
+
return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || t.push("MOBILE"), d.includes("FIXED_LINE") || t.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && t.push("FIXED_LINE_OR_MOBILE"), d.concat(t);
|
|
8671
|
+
}, _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 };
|
|
8634
8672
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
8635
8673
|
try {
|
|
8636
|
-
const $ = d.replace(/[^+0-9]/g, ""), n = new
|
|
8674
|
+
const $ = d.replace(/[^+0-9]/g, ""), n = new A2(t);
|
|
8637
8675
|
t = "";
|
|
8638
|
-
for (let
|
|
8676
|
+
for (let o = 0; o < $.length; o++) n.ja = M2(n, $.charAt(o)), t = n.ja;
|
|
8639
8677
|
return t;
|
|
8640
8678
|
} catch {
|
|
8641
8679
|
return d;
|
|
8642
8680
|
}
|
|
8643
8681
|
}), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
|
|
8644
8682
|
try {
|
|
8645
|
-
const
|
|
8646
|
-
var n =
|
|
8647
|
-
return n == 0 || n == 4 ?
|
|
8683
|
+
const o = M.g(), a = Z(o, d, t);
|
|
8684
|
+
var n = h1(o, a, -1);
|
|
8685
|
+
return n == 0 || n == 4 ? o.format(a, typeof $ > "u" ? 0 : $) : d;
|
|
8648
8686
|
} catch {
|
|
8649
8687
|
return d;
|
|
8650
8688
|
}
|
|
8651
8689
|
}), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, n) => {
|
|
8652
8690
|
try {
|
|
8653
|
-
const _ =
|
|
8691
|
+
const _ = M.g();
|
|
8654
8692
|
d: {
|
|
8655
|
-
var
|
|
8656
|
-
if (
|
|
8657
|
-
var
|
|
8693
|
+
var o = _;
|
|
8694
|
+
if (a1(d)) {
|
|
8695
|
+
var a = u1(j(o, d), $);
|
|
8658
8696
|
try {
|
|
8659
|
-
if (B(
|
|
8660
|
-
var
|
|
8697
|
+
if (B(a, 6)) {
|
|
8698
|
+
var u = g(a, 6), h = z1(o, u, d, !1);
|
|
8661
8699
|
break d;
|
|
8662
8700
|
}
|
|
8663
8701
|
} catch {
|
|
@@ -8671,63 +8709,62 @@ const W2 = (I) => {
|
|
|
8671
8709
|
}
|
|
8672
8710
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
8673
8711
|
try {
|
|
8674
|
-
return
|
|
8712
|
+
return g(Z(M.g(), d, t), 3);
|
|
8675
8713
|
} catch {
|
|
8676
8714
|
return "";
|
|
8677
8715
|
}
|
|
8678
8716
|
}), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
|
|
8679
8717
|
try {
|
|
8680
|
-
const $ =
|
|
8681
|
-
return
|
|
8718
|
+
const $ = M.g(), n = Z($, d, t);
|
|
8719
|
+
return F1($, n);
|
|
8682
8720
|
} catch {
|
|
8683
8721
|
return -99;
|
|
8684
8722
|
}
|
|
8685
8723
|
}), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
|
|
8686
8724
|
if (!t) return 1;
|
|
8687
8725
|
try {
|
|
8688
|
-
const $ =
|
|
8689
|
-
return
|
|
8726
|
+
const $ = M.g(), n = Z($, d, t);
|
|
8727
|
+
return h1($, n, -1);
|
|
8690
8728
|
} catch ($) {
|
|
8691
8729
|
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;
|
|
8692
8730
|
}
|
|
8693
8731
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
|
|
8694
8732
|
try {
|
|
8695
|
-
const n =
|
|
8733
|
+
const n = M.g(), o = Z(n, d, t), a = T2(n, o);
|
|
8696
8734
|
if ($) {
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
return u && l.includes(G1(n, r));
|
|
8735
|
+
const u = s2($).map((h) => _1[h]);
|
|
8736
|
+
return a && u.includes(F1(n, o));
|
|
8700
8737
|
}
|
|
8701
|
-
return
|
|
8738
|
+
return a;
|
|
8702
8739
|
} catch {
|
|
8703
8740
|
return !1;
|
|
8704
8741
|
}
|
|
8705
8742
|
}), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
|
|
8706
8743
|
try {
|
|
8707
|
-
const n =
|
|
8744
|
+
const n = M.g(), o = Z(n, d, t);
|
|
8708
8745
|
if ($) {
|
|
8709
|
-
|
|
8710
|
-
for (let u of
|
|
8746
|
+
const a = s2($);
|
|
8747
|
+
for (let u of a) if (h1(n, o, _1[u]) === 0) return !0;
|
|
8711
8748
|
return !1;
|
|
8712
8749
|
}
|
|
8713
|
-
return
|
|
8750
|
+
return h1(n, o, -1) === 0;
|
|
8714
8751
|
} catch {
|
|
8715
8752
|
return !1;
|
|
8716
8753
|
}
|
|
8717
8754
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
8718
8755
|
try {
|
|
8719
|
-
return
|
|
8756
|
+
return g(Z(M.g(), d, t), 2).toString();
|
|
8720
8757
|
} catch {
|
|
8721
8758
|
return "";
|
|
8722
8759
|
}
|
|
8723
|
-
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType",
|
|
8760
|
+
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", _1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
8724
8761
|
})();
|
|
8725
|
-
const
|
|
8726
|
-
delete
|
|
8727
|
-
|
|
8728
|
-
const
|
|
8762
|
+
const h2 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, Y2 = h2.intlTelInputUtilsTemp;
|
|
8763
|
+
delete h2.intlTelInputUtilsTemp;
|
|
8764
|
+
m.utils = Y2;
|
|
8765
|
+
const q2 = {
|
|
8729
8766
|
__name: "IntlTelInputWithUtils",
|
|
8730
|
-
props: /* @__PURE__ */
|
|
8767
|
+
props: /* @__PURE__ */ r2({
|
|
8731
8768
|
disabled: {
|
|
8732
8769
|
type: Boolean,
|
|
8733
8770
|
default: !1
|
|
@@ -8751,47 +8788,47 @@ const Y2 = {
|
|
|
8751
8788
|
},
|
|
8752
8789
|
modelModifiers: {}
|
|
8753
8790
|
}),
|
|
8754
|
-
emits: /* @__PURE__ */
|
|
8791
|
+
emits: /* @__PURE__ */ r2([
|
|
8755
8792
|
"changeNumber",
|
|
8756
8793
|
"changeCountry",
|
|
8757
8794
|
"changeValidity",
|
|
8758
8795
|
"changeErrorCode"
|
|
8759
8796
|
], ["update:modelValue"]),
|
|
8760
|
-
setup(
|
|
8761
|
-
const s =
|
|
8762
|
-
let
|
|
8763
|
-
f.value !==
|
|
8797
|
+
setup(y, { expose: e, emit: i }) {
|
|
8798
|
+
const s = D2(y, "modelValue"), r = y, l = i, c = v1(), C = v1(), f = v1(!1), S = () => C.value ? r.options.strictMode ? C.value.isValidNumberPrecise() : C.value.isValidNumber() : null, w = () => {
|
|
8799
|
+
let p = S();
|
|
8800
|
+
f.value !== p && (f.value = p, l("changeValidity", !!p), l(
|
|
8764
8801
|
"changeErrorCode",
|
|
8765
|
-
|
|
8802
|
+
p ? null : C.value.getValidationError()
|
|
8766
8803
|
));
|
|
8767
|
-
},
|
|
8768
|
-
var
|
|
8769
|
-
|
|
8804
|
+
}, b = () => {
|
|
8805
|
+
var p;
|
|
8806
|
+
l("changeNumber", ((p = C.value) == null ? void 0 : p.getNumber()) ?? ""), w();
|
|
8770
8807
|
}, L = () => {
|
|
8771
|
-
var
|
|
8772
|
-
|
|
8808
|
+
var p;
|
|
8809
|
+
l("changeCountry", ((p = C.value) == null ? void 0 : p.getSelectedCountryData().iso2) ?? ""), b(), w();
|
|
8773
8810
|
};
|
|
8774
|
-
return
|
|
8775
|
-
c.value && (
|
|
8811
|
+
return x2(() => {
|
|
8812
|
+
c.value && (C.value = m(c.value, r.options), r.value && C.value.setNumber(r.value), r.disabled && C.value.setDisabled(r.disabled), f.value = S());
|
|
8776
8813
|
}), P2(
|
|
8777
|
-
() =>
|
|
8778
|
-
(
|
|
8779
|
-
var
|
|
8780
|
-
return (
|
|
8814
|
+
() => r.disabled,
|
|
8815
|
+
(p) => {
|
|
8816
|
+
var I;
|
|
8817
|
+
return (I = C.value) == null ? void 0 : I.setDisabled(p);
|
|
8781
8818
|
}
|
|
8782
|
-
),
|
|
8783
|
-
var
|
|
8784
|
-
return (
|
|
8785
|
-
}), e({ instance:
|
|
8819
|
+
), R2(() => {
|
|
8820
|
+
var p;
|
|
8821
|
+
return (p = C.value) == null ? void 0 : p.destroy();
|
|
8822
|
+
}), e({ instance: C, input: c }), (p, I) => B2((O2(), k2("input", G2({
|
|
8786
8823
|
ref_key: "input",
|
|
8787
8824
|
ref: c,
|
|
8788
|
-
"onUpdate:modelValue":
|
|
8825
|
+
"onUpdate:modelValue": I[0] || (I[0] = (G) => s.value = G),
|
|
8789
8826
|
type: "tel",
|
|
8790
8827
|
onCountrychange: L,
|
|
8791
|
-
onInput:
|
|
8792
|
-
},
|
|
8828
|
+
onInput: b
|
|
8829
|
+
}, y.inputProps), null, 16)), [
|
|
8793
8830
|
[
|
|
8794
|
-
|
|
8831
|
+
U2,
|
|
8795
8832
|
s.value,
|
|
8796
8833
|
void 0,
|
|
8797
8834
|
{ lazy: !0 }
|
|
@@ -8800,5 +8837,5 @@ const Y2 = {
|
|
|
8800
8837
|
}
|
|
8801
8838
|
};
|
|
8802
8839
|
export {
|
|
8803
|
-
|
|
8840
|
+
q2 as default
|
|
8804
8841
|
};
|