intl-tel-input 28.0.5 → 28.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/data.js +1 -1
- package/dist/js/data.min.js +1 -1
- package/dist/js/intlTelInput.js +18 -3
- package/dist/js/intlTelInput.min.js +2 -2
- package/dist/js/intlTelInput.mjs +17 -2
- package/dist/js/intlTelInputWithUtils.js +18 -3
- package/dist/js/intlTelInputWithUtils.min.js +2 -2
- package/dist/js/intlTelInputWithUtils.mjs +17 -2
- package/package.json +1 -1
|
@@ -3767,17 +3767,32 @@ var Iti = class _Iti {
|
|
|
3767
3767
|
}
|
|
3768
3768
|
intlTelInput.startedLoadingAutoCountry = true;
|
|
3769
3769
|
if (typeof this.#options.geoIpLookup === "function") {
|
|
3770
|
+
let timeoutId;
|
|
3770
3771
|
try {
|
|
3771
|
-
const iso2 = await
|
|
3772
|
+
const iso2 = await Promise.race([
|
|
3773
|
+
this.#options.geoIpLookup(),
|
|
3774
|
+
new Promise((_, reject) => {
|
|
3775
|
+
timeoutId = setTimeout(
|
|
3776
|
+
() => reject(new Error("intl-tel-input: geoIpLookup timed out after 10s")),
|
|
3777
|
+
1e4
|
|
3778
|
+
);
|
|
3779
|
+
})
|
|
3780
|
+
]);
|
|
3772
3781
|
const iso2Lower = typeof iso2 === "string" ? iso2.toLowerCase() : "";
|
|
3773
3782
|
if (!isIso2(iso2Lower)) {
|
|
3783
|
+
intlTelInput.startedLoadingAutoCountry = false;
|
|
3774
3784
|
_Iti.forEachInstance("handleAutoCountryFailure");
|
|
3775
3785
|
return;
|
|
3776
3786
|
}
|
|
3777
3787
|
intlTelInput.autoCountry = iso2Lower;
|
|
3778
3788
|
setTimeout(() => _Iti.forEachInstance("handleAutoCountryLoaded"));
|
|
3779
3789
|
} catch {
|
|
3790
|
+
intlTelInput.startedLoadingAutoCountry = false;
|
|
3780
3791
|
_Iti.forEachInstance("handleAutoCountryFailure");
|
|
3792
|
+
} finally {
|
|
3793
|
+
if (timeoutId !== void 0) {
|
|
3794
|
+
clearTimeout(timeoutId);
|
|
3795
|
+
}
|
|
3781
3796
|
}
|
|
3782
3797
|
}
|
|
3783
3798
|
}
|
|
@@ -4683,7 +4698,7 @@ var intlTelInput = Object.assign(
|
|
|
4683
4698
|
attachUtils,
|
|
4684
4699
|
startedLoadingUtils: false,
|
|
4685
4700
|
startedLoadingAutoCountry: false,
|
|
4686
|
-
version: "28.0.
|
|
4701
|
+
version: "28.0.6",
|
|
4687
4702
|
NUMBER_FORMAT,
|
|
4688
4703
|
NUMBER_TYPE,
|
|
4689
4704
|
VALIDATION_ERROR
|