intl-tel-input 26.9.2 → 27.0.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/angular/README.md +1 -1
- package/angular/dist/IntlTelInput.d.ts +97 -0
- package/angular/dist/IntlTelInput.js +4812 -0
- package/angular/dist/IntlTelInputWithUtils.d.ts +3 -0
- package/angular/{build → dist}/IntlTelInputWithUtils.js +2342 -2096
- package/{build → dist}/css/demo.css +1 -1
- package/dist/css/intlTelInput-no-assets.css +1 -0
- package/dist/css/intlTelInput-no-assets.min.css +1 -0
- package/dist/css/intlTelInput.css +1 -0
- package/dist/css/intlTelInput.min.css +1 -0
- package/dist/img/flags.png +0 -0
- package/dist/img/flags.webp +0 -0
- package/dist/img/flags@2x.png +0 -0
- package/dist/img/flags@2x.webp +0 -0
- package/dist/js/data.d.ts +1616 -0
- package/{build → dist}/js/data.js +5 -17
- package/dist/js/data.min.js +7 -0
- package/dist/js/data.mjs +1708 -0
- package/{build/js/i18n/ar/index.js → dist/js/i18n/ar.js} +1 -0
- package/{build/js/i18n/bg/index.js → dist/js/i18n/bg.js} +1 -0
- package/{build/js/i18n/bn/index.js → dist/js/i18n/bn.js} +1 -0
- package/{build/js/i18n/bs/index.js → dist/js/i18n/bs.js} +1 -0
- package/{build/js/i18n/ca/index.js → dist/js/i18n/ca.js} +1 -0
- package/{build/js/i18n/cs/index.js → dist/js/i18n/cs.js} +1 -0
- package/{build/js/i18n/da/index.js → dist/js/i18n/da.js} +1 -0
- package/{build/js/i18n/de/index.js → dist/js/i18n/de.js} +1 -0
- package/{build/js/i18n/el/index.js → dist/js/i18n/el.js} +1 -0
- package/{build/js/i18n/en/index.js → dist/js/i18n/en.js} +3 -2
- package/{build/js/i18n/es/index.js → dist/js/i18n/es.js} +1 -0
- package/{build/js/i18n/et/index.js → dist/js/i18n/et.js} +1 -0
- package/{build/js/i18n/fa/index.js → dist/js/i18n/fa.js} +1 -0
- package/{build/js/i18n/fi/index.js → dist/js/i18n/fi.js} +1 -0
- package/{build/js/i18n/fr/index.js → dist/js/i18n/fr.js} +1 -0
- package/{build/js/i18n/hi/index.js → dist/js/i18n/hi.js} +1 -0
- package/{build/js/i18n/hr/index.js → dist/js/i18n/hr.js} +1 -0
- package/{build/js/i18n/hu/index.js → dist/js/i18n/hu.js} +1 -0
- package/{build/js/i18n/id/index.js → dist/js/i18n/id.js} +1 -0
- package/{build → dist}/js/i18n/index.js +1 -0
- package/{build/js/i18n/it/index.js → dist/js/i18n/it.js} +1 -0
- package/{build/js/i18n/ja/index.js → dist/js/i18n/ja.js} +1 -0
- package/{build/js/i18n/kn/index.js → dist/js/i18n/kn.js} +1 -0
- package/{build/js/i18n/ko/index.js → dist/js/i18n/ko.js} +1 -0
- package/{build/js/i18n/lt/index.js → dist/js/i18n/lt.js} +1 -0
- package/{build/js/i18n/mr/index.js → dist/js/i18n/mr.js} +1 -0
- package/{build/js/i18n/nl/index.js → dist/js/i18n/nl.js} +1 -0
- package/{build/js/i18n/no/index.js → dist/js/i18n/no.js} +1 -0
- package/{build/js/i18n/pl/index.js → dist/js/i18n/pl.js} +1 -0
- package/{build/js/i18n/pt/index.js → dist/js/i18n/pt.js} +1 -0
- package/{build/js/i18n/ro/index.js → dist/js/i18n/ro.js} +1 -0
- package/{build/js/i18n/ru/index.js → dist/js/i18n/ru.js} +1 -0
- package/{build/js/i18n/sk/index.js → dist/js/i18n/sk.js} +1 -0
- package/{build/js/i18n/sl/index.js → dist/js/i18n/sl.js} +1 -0
- package/{build/js/i18n/sq/index.js → dist/js/i18n/sq.js} +1 -0
- package/{build/js/i18n/sr/index.js → dist/js/i18n/sr.js} +1 -0
- package/{build/js/i18n/sv/index.js → dist/js/i18n/sv.js} +1 -0
- package/{build/js/i18n/te/index.js → dist/js/i18n/te.js} +1 -0
- package/{build/js/i18n/th/index.js → dist/js/i18n/th.js} +1 -0
- package/{build/js/i18n/tr/index.js → dist/js/i18n/tr.js} +1 -0
- package/dist/js/i18n/types.js +1 -0
- package/{build/js/i18n/uk/index.js → dist/js/i18n/uk.js} +1 -0
- package/{build/js/i18n/ur/index.js → dist/js/i18n/ur.js} +1 -0
- package/{build/js/i18n/uz/index.js → dist/js/i18n/uz.js} +1 -0
- package/{build/js/i18n/vi/index.js → dist/js/i18n/vi.js} +1 -0
- package/{build/js/i18n/zh-hk/index.js → dist/js/i18n/zh-hk.js} +1 -0
- package/{build/js/i18n/zh/index.js → dist/js/i18n/zh.js} +1 -0
- package/dist/js/i18n.d.ts +1697 -0
- package/dist/js/intlTelInput.d.ts +1773 -0
- package/{build → dist}/js/intlTelInput.js +228 -215
- package/dist/js/intlTelInput.min.js +25 -0
- package/{react/build/IntlTelInput.cjs → dist/js/intlTelInput.mjs} +230 -340
- package/{build → dist}/js/intlTelInputWithUtils.js +531 -498
- package/dist/js/intlTelInputWithUtils.min.js +25 -0
- package/{react/build/IntlTelInputWithUtils.cjs → dist/js/intlTelInputWithUtils.mjs} +530 -621
- package/{build → dist}/js/utils.js +46 -47
- package/package.json +122 -122
- package/react/README.md +1 -1
- package/react/dist/IntlTelInput.d.ts +20 -0
- package/react/{build → dist}/IntlTelInput.js +274 -255
- package/react/dist/IntlTelInputWithUtils.d.ts +4 -0
- package/react/{build → dist}/IntlTelInputWithUtils.js +580 -542
- package/svelte/README.md +1 -1
- package/svelte/src/IntlTelInput.svelte +199 -0
- package/svelte/src/IntlTelInputWithUtils.svelte +15 -0
- package/svelte/src/shims.d.ts +4 -0
- package/vue/README.md +1 -1
- package/vue/dist/IntlTelInput-D7r449B2.js +2577 -0
- package/vue/dist/IntlTelInput.js +5 -0
- package/vue/dist/IntlTelInputWithUtils.js +49385 -0
- package/vue/dist/src/IntlTelInput.vue.d.ts +35 -0
- package/vue/dist/src/index.d.ts +4 -0
- package/vue/dist/src/indexWithUtils.d.ts +3 -0
- package/angular/build/IntlTelInput.js +0 -4501
- package/angular/build/types/intl-tel-input/angular.d.ts +0 -65
- package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +0 -65
- package/angular/build/types/intl-tel-input/data.d.ts +0 -20
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +0 -45
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +0 -10
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/angular/build/types/intl-tel-input/utils.d.ts +0 -2
- package/angular/build/types/intl-tel-input.d.ts +0 -46
- package/angular/build/types/modules/constants.d.ts +0 -94
- package/angular/build/types/modules/core/countrySearch.d.ts +0 -17
- package/angular/build/types/modules/core/icons.d.ts +0 -11
- package/angular/build/types/modules/core/numerals.d.ts +0 -7
- package/angular/build/types/modules/core/options.d.ts +0 -8
- package/angular/build/types/modules/core/ui.d.ts +0 -30
- package/angular/build/types/modules/data/country-data.d.ts +0 -12
- package/angular/build/types/modules/data/intl-regionless.d.ts +0 -2
- package/angular/build/types/modules/data/nanp-regionless.d.ts +0 -2
- package/angular/build/types/modules/format/caret.d.ts +0 -1
- package/angular/build/types/modules/format/formatting.d.ts +0 -3
- package/angular/build/types/modules/types/events.d.ts +0 -10
- package/angular/build/types/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/angular/build/types/modules/types/public-api.d.ts +0 -65
- package/angular/build/types/modules/utils/dom.d.ts +0 -6
- package/angular/build/types/modules/utils/isAndroid.d.ts +0 -1
- package/angular/build/types/modules/utils/string.d.ts +0 -2
- package/build/css/intlTelInput-no-assets.css +0 -1323
- package/build/css/intlTelInput-no-assets.min.css +0 -1
- package/build/css/intlTelInput.css +0 -1327
- package/build/css/intlTelInput.min.css +0 -1
- package/build/img/flags.png +0 -0
- package/build/img/flags.webp +0 -0
- package/build/img/flags@2x.png +0 -0
- package/build/img/flags@2x.webp +0 -0
- package/build/js/data.min.js +0 -20
- package/build/js/i18n/types.js +0 -0
- package/build/js/intlTelInput.d.ts +0 -671
- package/build/js/intlTelInput.min.js +0 -38
- package/build/js/intlTelInputWithUtils.min.js +0 -38
- package/index.js +0 -1
- package/react/build/IntlTelInput.d.ts +0 -721
- package/svelte/build/IntlTelInput.mjs +0 -5294
- package/svelte/build/IntlTelInputWithUtils.mjs +0 -11381
- package/vue/build/IntlTelInput.vue.d.ts +0 -34
- package/vue/build/IntlTelInputWithUtils.vue.d.ts +0 -34
- package/vue/build/exports/IntlTelInput.d.ts +0 -3
- package/vue/build/exports/IntlTelInput.mjs +0 -86
- package/vue/build/exports/IntlTelInputWithUtils.d.ts +0 -3
- package/vue/build/exports/IntlTelInputWithUtils.mjs +0 -6173
- package/vue/build/intl-tel-input/data.d.ts +0 -20
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/index.d.ts +0 -45
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/types.d.ts +0 -10
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/vue/build/intl-tel-input-MeSkUgHd.mjs +0 -3438
- package/vue/build/intl-tel-input.d.ts +0 -46
- package/vue/build/modules/constants.d.ts +0 -94
- package/vue/build/modules/core/countrySearch.d.ts +0 -17
- package/vue/build/modules/core/icons.d.ts +0 -11
- package/vue/build/modules/core/numerals.d.ts +0 -7
- package/vue/build/modules/core/options.d.ts +0 -8
- package/vue/build/modules/core/ui.d.ts +0 -30
- package/vue/build/modules/data/country-data.d.ts +0 -12
- package/vue/build/modules/data/intl-regionless.d.ts +0 -2
- package/vue/build/modules/data/nanp-regionless.d.ts +0 -2
- package/vue/build/modules/format/caret.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +0 -3
- package/vue/build/modules/types/events.d.ts +0 -10
- package/vue/build/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/vue/build/modules/types/public-api.d.ts +0 -65
- package/vue/build/modules/utils/dom.d.ts +0 -6
- package/vue/build/modules/utils/isAndroid.d.ts +0 -1
- package/vue/build/modules/utils/string.d.ts +0 -2
|
@@ -1,4501 +0,0 @@
|
|
|
1
|
-
// angular/build/temp/intl-tel-input/data.js
|
|
2
|
-
var rawCountryData = [
|
|
3
|
-
[
|
|
4
|
-
"af",
|
|
5
|
-
// Afghanistan
|
|
6
|
-
"93",
|
|
7
|
-
0,
|
|
8
|
-
null,
|
|
9
|
-
"0"
|
|
10
|
-
],
|
|
11
|
-
[
|
|
12
|
-
"ax",
|
|
13
|
-
// Åland Islands
|
|
14
|
-
"358",
|
|
15
|
-
1,
|
|
16
|
-
["18", "4"],
|
|
17
|
-
// (4 is a mobile range shared with FI)
|
|
18
|
-
"0"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"al",
|
|
22
|
-
// Albania
|
|
23
|
-
"355",
|
|
24
|
-
0,
|
|
25
|
-
null,
|
|
26
|
-
"0"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"dz",
|
|
30
|
-
// Algeria
|
|
31
|
-
"213",
|
|
32
|
-
0,
|
|
33
|
-
null,
|
|
34
|
-
"0"
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"as",
|
|
38
|
-
// American Samoa
|
|
39
|
-
"1",
|
|
40
|
-
5,
|
|
41
|
-
["684"],
|
|
42
|
-
"1"
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"ad",
|
|
46
|
-
// Andorra
|
|
47
|
-
"376"
|
|
48
|
-
],
|
|
49
|
-
[
|
|
50
|
-
"ao",
|
|
51
|
-
// Angola
|
|
52
|
-
"244"
|
|
53
|
-
],
|
|
54
|
-
[
|
|
55
|
-
"ai",
|
|
56
|
-
// Anguilla
|
|
57
|
-
"1",
|
|
58
|
-
6,
|
|
59
|
-
["264"],
|
|
60
|
-
"1"
|
|
61
|
-
],
|
|
62
|
-
[
|
|
63
|
-
"ag",
|
|
64
|
-
// Antigua and Barbuda
|
|
65
|
-
"1",
|
|
66
|
-
7,
|
|
67
|
-
["268"],
|
|
68
|
-
"1"
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
"ar",
|
|
72
|
-
// Argentina
|
|
73
|
-
"54",
|
|
74
|
-
0,
|
|
75
|
-
null,
|
|
76
|
-
"0"
|
|
77
|
-
],
|
|
78
|
-
[
|
|
79
|
-
"am",
|
|
80
|
-
// Armenia
|
|
81
|
-
"374",
|
|
82
|
-
0,
|
|
83
|
-
null,
|
|
84
|
-
"0"
|
|
85
|
-
],
|
|
86
|
-
[
|
|
87
|
-
"aw",
|
|
88
|
-
// Aruba
|
|
89
|
-
"297"
|
|
90
|
-
],
|
|
91
|
-
[
|
|
92
|
-
"ac",
|
|
93
|
-
// Ascension Island
|
|
94
|
-
"247"
|
|
95
|
-
],
|
|
96
|
-
[
|
|
97
|
-
"au",
|
|
98
|
-
// Australia
|
|
99
|
-
"61",
|
|
100
|
-
0,
|
|
101
|
-
["4"],
|
|
102
|
-
// (mobile range shared with CX and CC)
|
|
103
|
-
"0"
|
|
104
|
-
],
|
|
105
|
-
[
|
|
106
|
-
"at",
|
|
107
|
-
// Austria
|
|
108
|
-
"43",
|
|
109
|
-
0,
|
|
110
|
-
null,
|
|
111
|
-
"0"
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
"az",
|
|
115
|
-
// Azerbaijan
|
|
116
|
-
"994",
|
|
117
|
-
0,
|
|
118
|
-
null,
|
|
119
|
-
"0"
|
|
120
|
-
],
|
|
121
|
-
[
|
|
122
|
-
"bs",
|
|
123
|
-
// Bahamas
|
|
124
|
-
"1",
|
|
125
|
-
8,
|
|
126
|
-
["242"],
|
|
127
|
-
"1"
|
|
128
|
-
],
|
|
129
|
-
[
|
|
130
|
-
"bh",
|
|
131
|
-
// Bahrain
|
|
132
|
-
"973"
|
|
133
|
-
],
|
|
134
|
-
[
|
|
135
|
-
"bd",
|
|
136
|
-
// Bangladesh
|
|
137
|
-
"880",
|
|
138
|
-
0,
|
|
139
|
-
null,
|
|
140
|
-
"0"
|
|
141
|
-
],
|
|
142
|
-
[
|
|
143
|
-
"bb",
|
|
144
|
-
// Barbados
|
|
145
|
-
"1",
|
|
146
|
-
9,
|
|
147
|
-
["246"],
|
|
148
|
-
"1"
|
|
149
|
-
],
|
|
150
|
-
[
|
|
151
|
-
"by",
|
|
152
|
-
// Belarus
|
|
153
|
-
"375",
|
|
154
|
-
0,
|
|
155
|
-
null,
|
|
156
|
-
"8"
|
|
157
|
-
],
|
|
158
|
-
[
|
|
159
|
-
"be",
|
|
160
|
-
// Belgium
|
|
161
|
-
"32",
|
|
162
|
-
0,
|
|
163
|
-
null,
|
|
164
|
-
"0"
|
|
165
|
-
],
|
|
166
|
-
[
|
|
167
|
-
"bz",
|
|
168
|
-
// Belize
|
|
169
|
-
"501"
|
|
170
|
-
],
|
|
171
|
-
[
|
|
172
|
-
"bj",
|
|
173
|
-
// Benin
|
|
174
|
-
"229"
|
|
175
|
-
],
|
|
176
|
-
[
|
|
177
|
-
"bm",
|
|
178
|
-
// Bermuda
|
|
179
|
-
"1",
|
|
180
|
-
10,
|
|
181
|
-
["441"],
|
|
182
|
-
"1"
|
|
183
|
-
],
|
|
184
|
-
[
|
|
185
|
-
"bt",
|
|
186
|
-
// Bhutan
|
|
187
|
-
"975"
|
|
188
|
-
],
|
|
189
|
-
[
|
|
190
|
-
"bo",
|
|
191
|
-
// Bolivia
|
|
192
|
-
"591",
|
|
193
|
-
0,
|
|
194
|
-
null,
|
|
195
|
-
"0"
|
|
196
|
-
],
|
|
197
|
-
[
|
|
198
|
-
"ba",
|
|
199
|
-
// Bosnia and Herzegovina
|
|
200
|
-
"387",
|
|
201
|
-
0,
|
|
202
|
-
null,
|
|
203
|
-
"0"
|
|
204
|
-
],
|
|
205
|
-
[
|
|
206
|
-
"bw",
|
|
207
|
-
// Botswana
|
|
208
|
-
"267"
|
|
209
|
-
],
|
|
210
|
-
[
|
|
211
|
-
"br",
|
|
212
|
-
// Brazil
|
|
213
|
-
"55",
|
|
214
|
-
0,
|
|
215
|
-
null,
|
|
216
|
-
"0"
|
|
217
|
-
],
|
|
218
|
-
[
|
|
219
|
-
"io",
|
|
220
|
-
// British Indian Ocean Territory
|
|
221
|
-
"246"
|
|
222
|
-
],
|
|
223
|
-
[
|
|
224
|
-
"vg",
|
|
225
|
-
// British Virgin Islands
|
|
226
|
-
"1",
|
|
227
|
-
11,
|
|
228
|
-
["284"],
|
|
229
|
-
"1"
|
|
230
|
-
],
|
|
231
|
-
[
|
|
232
|
-
"bn",
|
|
233
|
-
// Brunei
|
|
234
|
-
"673"
|
|
235
|
-
],
|
|
236
|
-
[
|
|
237
|
-
"bg",
|
|
238
|
-
// Bulgaria
|
|
239
|
-
"359",
|
|
240
|
-
0,
|
|
241
|
-
null,
|
|
242
|
-
"0"
|
|
243
|
-
],
|
|
244
|
-
[
|
|
245
|
-
"bf",
|
|
246
|
-
// Burkina Faso
|
|
247
|
-
"226"
|
|
248
|
-
],
|
|
249
|
-
[
|
|
250
|
-
"bi",
|
|
251
|
-
// Burundi
|
|
252
|
-
"257"
|
|
253
|
-
],
|
|
254
|
-
[
|
|
255
|
-
"kh",
|
|
256
|
-
// Cambodia
|
|
257
|
-
"855",
|
|
258
|
-
0,
|
|
259
|
-
null,
|
|
260
|
-
"0"
|
|
261
|
-
],
|
|
262
|
-
[
|
|
263
|
-
"cm",
|
|
264
|
-
// Cameroon
|
|
265
|
-
"237"
|
|
266
|
-
],
|
|
267
|
-
[
|
|
268
|
-
"ca",
|
|
269
|
-
// Canada
|
|
270
|
-
"1",
|
|
271
|
-
1,
|
|
272
|
-
["204", "226", "236", "249", "250", "257", "263", "289", "306", "343", "354", "365", "367", "368", "382", "403", "416", "418", "428", "431", "437", "438", "450", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905", "942"],
|
|
273
|
-
"1"
|
|
274
|
-
],
|
|
275
|
-
[
|
|
276
|
-
"cv",
|
|
277
|
-
// Cape Verde
|
|
278
|
-
"238"
|
|
279
|
-
],
|
|
280
|
-
[
|
|
281
|
-
"bq",
|
|
282
|
-
// Caribbean Netherlands
|
|
283
|
-
"599",
|
|
284
|
-
1,
|
|
285
|
-
["3", "4", "7"]
|
|
286
|
-
],
|
|
287
|
-
[
|
|
288
|
-
"ky",
|
|
289
|
-
// Cayman Islands
|
|
290
|
-
"1",
|
|
291
|
-
12,
|
|
292
|
-
["345"],
|
|
293
|
-
"1"
|
|
294
|
-
],
|
|
295
|
-
[
|
|
296
|
-
"cf",
|
|
297
|
-
// Central African Republic
|
|
298
|
-
"236"
|
|
299
|
-
],
|
|
300
|
-
[
|
|
301
|
-
"td",
|
|
302
|
-
// Chad
|
|
303
|
-
"235"
|
|
304
|
-
],
|
|
305
|
-
[
|
|
306
|
-
"cl",
|
|
307
|
-
// Chile
|
|
308
|
-
"56"
|
|
309
|
-
],
|
|
310
|
-
[
|
|
311
|
-
"cn",
|
|
312
|
-
// China
|
|
313
|
-
"86",
|
|
314
|
-
0,
|
|
315
|
-
null,
|
|
316
|
-
"0"
|
|
317
|
-
],
|
|
318
|
-
[
|
|
319
|
-
"cx",
|
|
320
|
-
// Christmas Island
|
|
321
|
-
"61",
|
|
322
|
-
2,
|
|
323
|
-
["4", "89164"],
|
|
324
|
-
// (4 is a mobile range shared with AU and CC)
|
|
325
|
-
"0"
|
|
326
|
-
],
|
|
327
|
-
[
|
|
328
|
-
"cc",
|
|
329
|
-
// Cocos (Keeling) Islands
|
|
330
|
-
"61",
|
|
331
|
-
1,
|
|
332
|
-
["4", "89162"],
|
|
333
|
-
// (4 is a mobile range shared with AU and CX)
|
|
334
|
-
"0"
|
|
335
|
-
],
|
|
336
|
-
[
|
|
337
|
-
"co",
|
|
338
|
-
// Colombia
|
|
339
|
-
"57",
|
|
340
|
-
0,
|
|
341
|
-
null,
|
|
342
|
-
"0"
|
|
343
|
-
],
|
|
344
|
-
[
|
|
345
|
-
"km",
|
|
346
|
-
// Comoros
|
|
347
|
-
"269"
|
|
348
|
-
],
|
|
349
|
-
[
|
|
350
|
-
"cg",
|
|
351
|
-
// Congo (Brazzaville)
|
|
352
|
-
"242"
|
|
353
|
-
],
|
|
354
|
-
[
|
|
355
|
-
"cd",
|
|
356
|
-
// Congo (Kinshasa)
|
|
357
|
-
"243",
|
|
358
|
-
0,
|
|
359
|
-
null,
|
|
360
|
-
"0"
|
|
361
|
-
],
|
|
362
|
-
[
|
|
363
|
-
"ck",
|
|
364
|
-
// Cook Islands
|
|
365
|
-
"682"
|
|
366
|
-
],
|
|
367
|
-
[
|
|
368
|
-
"cr",
|
|
369
|
-
// Costa Rica
|
|
370
|
-
"506"
|
|
371
|
-
],
|
|
372
|
-
[
|
|
373
|
-
"ci",
|
|
374
|
-
// Côte d'Ivoire
|
|
375
|
-
"225"
|
|
376
|
-
],
|
|
377
|
-
[
|
|
378
|
-
"hr",
|
|
379
|
-
// Croatia
|
|
380
|
-
"385",
|
|
381
|
-
0,
|
|
382
|
-
null,
|
|
383
|
-
"0"
|
|
384
|
-
],
|
|
385
|
-
[
|
|
386
|
-
"cu",
|
|
387
|
-
// Cuba
|
|
388
|
-
"53",
|
|
389
|
-
0,
|
|
390
|
-
null,
|
|
391
|
-
"0"
|
|
392
|
-
],
|
|
393
|
-
[
|
|
394
|
-
"cw",
|
|
395
|
-
// Curaçao
|
|
396
|
-
"599",
|
|
397
|
-
0
|
|
398
|
-
],
|
|
399
|
-
[
|
|
400
|
-
"cy",
|
|
401
|
-
// Cyprus
|
|
402
|
-
"357"
|
|
403
|
-
],
|
|
404
|
-
[
|
|
405
|
-
"cz",
|
|
406
|
-
// Czech Republic
|
|
407
|
-
"420"
|
|
408
|
-
],
|
|
409
|
-
[
|
|
410
|
-
"dk",
|
|
411
|
-
// Denmark
|
|
412
|
-
"45"
|
|
413
|
-
],
|
|
414
|
-
[
|
|
415
|
-
"dj",
|
|
416
|
-
// Djibouti
|
|
417
|
-
"253"
|
|
418
|
-
],
|
|
419
|
-
[
|
|
420
|
-
"dm",
|
|
421
|
-
// Dominica
|
|
422
|
-
"1",
|
|
423
|
-
13,
|
|
424
|
-
["767"],
|
|
425
|
-
"1"
|
|
426
|
-
],
|
|
427
|
-
[
|
|
428
|
-
"do",
|
|
429
|
-
// Dominican Republic
|
|
430
|
-
"1",
|
|
431
|
-
2,
|
|
432
|
-
["809", "829", "849"],
|
|
433
|
-
"1"
|
|
434
|
-
],
|
|
435
|
-
[
|
|
436
|
-
"ec",
|
|
437
|
-
// Ecuador
|
|
438
|
-
"593",
|
|
439
|
-
0,
|
|
440
|
-
null,
|
|
441
|
-
"0"
|
|
442
|
-
],
|
|
443
|
-
[
|
|
444
|
-
"eg",
|
|
445
|
-
// Egypt
|
|
446
|
-
"20",
|
|
447
|
-
0,
|
|
448
|
-
null,
|
|
449
|
-
"0"
|
|
450
|
-
],
|
|
451
|
-
[
|
|
452
|
-
"sv",
|
|
453
|
-
// El Salvador
|
|
454
|
-
"503"
|
|
455
|
-
],
|
|
456
|
-
[
|
|
457
|
-
"gq",
|
|
458
|
-
// Equatorial Guinea
|
|
459
|
-
"240"
|
|
460
|
-
],
|
|
461
|
-
[
|
|
462
|
-
"er",
|
|
463
|
-
// Eritrea
|
|
464
|
-
"291",
|
|
465
|
-
0,
|
|
466
|
-
null,
|
|
467
|
-
"0"
|
|
468
|
-
],
|
|
469
|
-
[
|
|
470
|
-
"ee",
|
|
471
|
-
// Estonia
|
|
472
|
-
"372"
|
|
473
|
-
],
|
|
474
|
-
[
|
|
475
|
-
"sz",
|
|
476
|
-
// Eswatini
|
|
477
|
-
"268"
|
|
478
|
-
],
|
|
479
|
-
[
|
|
480
|
-
"et",
|
|
481
|
-
// Ethiopia
|
|
482
|
-
"251",
|
|
483
|
-
0,
|
|
484
|
-
null,
|
|
485
|
-
"0"
|
|
486
|
-
],
|
|
487
|
-
[
|
|
488
|
-
"fk",
|
|
489
|
-
// Falkland Islands (Malvinas)
|
|
490
|
-
"500"
|
|
491
|
-
],
|
|
492
|
-
[
|
|
493
|
-
"fo",
|
|
494
|
-
// Faroe Islands
|
|
495
|
-
"298"
|
|
496
|
-
],
|
|
497
|
-
[
|
|
498
|
-
"fj",
|
|
499
|
-
// Fiji
|
|
500
|
-
"679"
|
|
501
|
-
],
|
|
502
|
-
[
|
|
503
|
-
"fi",
|
|
504
|
-
// Finland
|
|
505
|
-
"358",
|
|
506
|
-
0,
|
|
507
|
-
["4"],
|
|
508
|
-
// (mobile range shared with AX)
|
|
509
|
-
"0"
|
|
510
|
-
],
|
|
511
|
-
[
|
|
512
|
-
"fr",
|
|
513
|
-
// France
|
|
514
|
-
"33",
|
|
515
|
-
0,
|
|
516
|
-
null,
|
|
517
|
-
"0"
|
|
518
|
-
],
|
|
519
|
-
[
|
|
520
|
-
"gf",
|
|
521
|
-
// French Guiana
|
|
522
|
-
"594",
|
|
523
|
-
0,
|
|
524
|
-
null,
|
|
525
|
-
"0"
|
|
526
|
-
],
|
|
527
|
-
[
|
|
528
|
-
"pf",
|
|
529
|
-
// French Polynesia
|
|
530
|
-
"689"
|
|
531
|
-
],
|
|
532
|
-
[
|
|
533
|
-
"ga",
|
|
534
|
-
// Gabon
|
|
535
|
-
"241"
|
|
536
|
-
],
|
|
537
|
-
[
|
|
538
|
-
"gm",
|
|
539
|
-
// Gambia
|
|
540
|
-
"220"
|
|
541
|
-
],
|
|
542
|
-
[
|
|
543
|
-
"ge",
|
|
544
|
-
// Georgia
|
|
545
|
-
"995",
|
|
546
|
-
0,
|
|
547
|
-
null,
|
|
548
|
-
"0"
|
|
549
|
-
],
|
|
550
|
-
[
|
|
551
|
-
"de",
|
|
552
|
-
// Germany
|
|
553
|
-
"49",
|
|
554
|
-
0,
|
|
555
|
-
null,
|
|
556
|
-
"0"
|
|
557
|
-
],
|
|
558
|
-
[
|
|
559
|
-
"gh",
|
|
560
|
-
// Ghana
|
|
561
|
-
"233",
|
|
562
|
-
0,
|
|
563
|
-
null,
|
|
564
|
-
"0"
|
|
565
|
-
],
|
|
566
|
-
[
|
|
567
|
-
"gi",
|
|
568
|
-
// Gibraltar
|
|
569
|
-
"350"
|
|
570
|
-
],
|
|
571
|
-
[
|
|
572
|
-
"gr",
|
|
573
|
-
// Greece
|
|
574
|
-
"30"
|
|
575
|
-
],
|
|
576
|
-
[
|
|
577
|
-
"gl",
|
|
578
|
-
// Greenland
|
|
579
|
-
"299"
|
|
580
|
-
],
|
|
581
|
-
[
|
|
582
|
-
"gd",
|
|
583
|
-
// Grenada
|
|
584
|
-
"1",
|
|
585
|
-
14,
|
|
586
|
-
["473"],
|
|
587
|
-
"1"
|
|
588
|
-
],
|
|
589
|
-
[
|
|
590
|
-
"gp",
|
|
591
|
-
// Guadeloupe
|
|
592
|
-
"590",
|
|
593
|
-
0,
|
|
594
|
-
null,
|
|
595
|
-
"0"
|
|
596
|
-
],
|
|
597
|
-
[
|
|
598
|
-
"gu",
|
|
599
|
-
// Guam
|
|
600
|
-
"1",
|
|
601
|
-
15,
|
|
602
|
-
["671"],
|
|
603
|
-
"1"
|
|
604
|
-
],
|
|
605
|
-
[
|
|
606
|
-
"gt",
|
|
607
|
-
// Guatemala
|
|
608
|
-
"502"
|
|
609
|
-
],
|
|
610
|
-
[
|
|
611
|
-
"gg",
|
|
612
|
-
// Guernsey
|
|
613
|
-
"44",
|
|
614
|
-
1,
|
|
615
|
-
["1481", "7781", "7839", "7911"],
|
|
616
|
-
"0"
|
|
617
|
-
],
|
|
618
|
-
[
|
|
619
|
-
"gn",
|
|
620
|
-
// Guinea
|
|
621
|
-
"224"
|
|
622
|
-
],
|
|
623
|
-
[
|
|
624
|
-
"gw",
|
|
625
|
-
// Guinea-Bissau
|
|
626
|
-
"245"
|
|
627
|
-
],
|
|
628
|
-
[
|
|
629
|
-
"gy",
|
|
630
|
-
// Guyana
|
|
631
|
-
"592"
|
|
632
|
-
],
|
|
633
|
-
[
|
|
634
|
-
"ht",
|
|
635
|
-
// Haiti
|
|
636
|
-
"509"
|
|
637
|
-
],
|
|
638
|
-
[
|
|
639
|
-
"hn",
|
|
640
|
-
// Honduras
|
|
641
|
-
"504"
|
|
642
|
-
],
|
|
643
|
-
[
|
|
644
|
-
"hk",
|
|
645
|
-
// Hong Kong SAR China
|
|
646
|
-
"852"
|
|
647
|
-
],
|
|
648
|
-
[
|
|
649
|
-
"hu",
|
|
650
|
-
// Hungary
|
|
651
|
-
"36",
|
|
652
|
-
0,
|
|
653
|
-
null,
|
|
654
|
-
"06"
|
|
655
|
-
],
|
|
656
|
-
[
|
|
657
|
-
"is",
|
|
658
|
-
// Iceland
|
|
659
|
-
"354"
|
|
660
|
-
],
|
|
661
|
-
[
|
|
662
|
-
"in",
|
|
663
|
-
// India
|
|
664
|
-
"91",
|
|
665
|
-
0,
|
|
666
|
-
null,
|
|
667
|
-
"0"
|
|
668
|
-
],
|
|
669
|
-
[
|
|
670
|
-
"id",
|
|
671
|
-
// Indonesia
|
|
672
|
-
"62",
|
|
673
|
-
0,
|
|
674
|
-
null,
|
|
675
|
-
"0"
|
|
676
|
-
],
|
|
677
|
-
[
|
|
678
|
-
"ir",
|
|
679
|
-
// Iran
|
|
680
|
-
"98",
|
|
681
|
-
0,
|
|
682
|
-
null,
|
|
683
|
-
"0"
|
|
684
|
-
],
|
|
685
|
-
[
|
|
686
|
-
"iq",
|
|
687
|
-
// Iraq
|
|
688
|
-
"964",
|
|
689
|
-
0,
|
|
690
|
-
null,
|
|
691
|
-
"0"
|
|
692
|
-
],
|
|
693
|
-
[
|
|
694
|
-
"ie",
|
|
695
|
-
// Ireland
|
|
696
|
-
"353",
|
|
697
|
-
0,
|
|
698
|
-
null,
|
|
699
|
-
"0"
|
|
700
|
-
],
|
|
701
|
-
[
|
|
702
|
-
"im",
|
|
703
|
-
// Isle of Man
|
|
704
|
-
"44",
|
|
705
|
-
2,
|
|
706
|
-
["1624", "74576", "7524", "7624", "7924"],
|
|
707
|
-
"0"
|
|
708
|
-
],
|
|
709
|
-
[
|
|
710
|
-
"il",
|
|
711
|
-
// Israel
|
|
712
|
-
"972",
|
|
713
|
-
0,
|
|
714
|
-
null,
|
|
715
|
-
"0"
|
|
716
|
-
],
|
|
717
|
-
[
|
|
718
|
-
"it",
|
|
719
|
-
// Italy
|
|
720
|
-
"39",
|
|
721
|
-
0,
|
|
722
|
-
["3"]
|
|
723
|
-
// (mobile range shared with VA)
|
|
724
|
-
],
|
|
725
|
-
[
|
|
726
|
-
"jm",
|
|
727
|
-
// Jamaica
|
|
728
|
-
"1",
|
|
729
|
-
4,
|
|
730
|
-
["658", "876"],
|
|
731
|
-
"1"
|
|
732
|
-
],
|
|
733
|
-
[
|
|
734
|
-
"jp",
|
|
735
|
-
// Japan
|
|
736
|
-
"81",
|
|
737
|
-
0,
|
|
738
|
-
null,
|
|
739
|
-
"0"
|
|
740
|
-
],
|
|
741
|
-
[
|
|
742
|
-
"je",
|
|
743
|
-
// Jersey
|
|
744
|
-
"44",
|
|
745
|
-
3,
|
|
746
|
-
["1534", "7509", "7700", "7797", "7829", "7937"],
|
|
747
|
-
"0"
|
|
748
|
-
],
|
|
749
|
-
[
|
|
750
|
-
"jo",
|
|
751
|
-
// Jordan
|
|
752
|
-
"962",
|
|
753
|
-
0,
|
|
754
|
-
null,
|
|
755
|
-
"0"
|
|
756
|
-
],
|
|
757
|
-
[
|
|
758
|
-
"kz",
|
|
759
|
-
// Kazakhstan
|
|
760
|
-
"7",
|
|
761
|
-
1,
|
|
762
|
-
["33", "7"],
|
|
763
|
-
// (33 is shared with RU)
|
|
764
|
-
"8"
|
|
765
|
-
],
|
|
766
|
-
[
|
|
767
|
-
"ke",
|
|
768
|
-
// Kenya
|
|
769
|
-
"254",
|
|
770
|
-
0,
|
|
771
|
-
null,
|
|
772
|
-
"0"
|
|
773
|
-
],
|
|
774
|
-
[
|
|
775
|
-
"ki",
|
|
776
|
-
// Kiribati
|
|
777
|
-
"686",
|
|
778
|
-
0,
|
|
779
|
-
null,
|
|
780
|
-
"0"
|
|
781
|
-
],
|
|
782
|
-
[
|
|
783
|
-
"xk",
|
|
784
|
-
// Kosovo
|
|
785
|
-
"383",
|
|
786
|
-
0,
|
|
787
|
-
null,
|
|
788
|
-
"0"
|
|
789
|
-
],
|
|
790
|
-
[
|
|
791
|
-
"kw",
|
|
792
|
-
// Kuwait
|
|
793
|
-
"965"
|
|
794
|
-
],
|
|
795
|
-
[
|
|
796
|
-
"kg",
|
|
797
|
-
// Kyrgyzstan
|
|
798
|
-
"996",
|
|
799
|
-
0,
|
|
800
|
-
null,
|
|
801
|
-
"0"
|
|
802
|
-
],
|
|
803
|
-
[
|
|
804
|
-
"la",
|
|
805
|
-
// Laos
|
|
806
|
-
"856",
|
|
807
|
-
0,
|
|
808
|
-
null,
|
|
809
|
-
"0"
|
|
810
|
-
],
|
|
811
|
-
[
|
|
812
|
-
"lv",
|
|
813
|
-
// Latvia
|
|
814
|
-
"371"
|
|
815
|
-
],
|
|
816
|
-
[
|
|
817
|
-
"lb",
|
|
818
|
-
// Lebanon
|
|
819
|
-
"961",
|
|
820
|
-
0,
|
|
821
|
-
null,
|
|
822
|
-
"0"
|
|
823
|
-
],
|
|
824
|
-
[
|
|
825
|
-
"ls",
|
|
826
|
-
// Lesotho
|
|
827
|
-
"266"
|
|
828
|
-
],
|
|
829
|
-
[
|
|
830
|
-
"lr",
|
|
831
|
-
// Liberia
|
|
832
|
-
"231",
|
|
833
|
-
0,
|
|
834
|
-
null,
|
|
835
|
-
"0"
|
|
836
|
-
],
|
|
837
|
-
[
|
|
838
|
-
"ly",
|
|
839
|
-
// Libya
|
|
840
|
-
"218",
|
|
841
|
-
0,
|
|
842
|
-
null,
|
|
843
|
-
"0"
|
|
844
|
-
],
|
|
845
|
-
[
|
|
846
|
-
"li",
|
|
847
|
-
// Liechtenstein
|
|
848
|
-
"423",
|
|
849
|
-
0,
|
|
850
|
-
null,
|
|
851
|
-
"0"
|
|
852
|
-
],
|
|
853
|
-
[
|
|
854
|
-
"lt",
|
|
855
|
-
// Lithuania
|
|
856
|
-
"370",
|
|
857
|
-
0,
|
|
858
|
-
null,
|
|
859
|
-
"0"
|
|
860
|
-
],
|
|
861
|
-
[
|
|
862
|
-
"lu",
|
|
863
|
-
// Luxembourg
|
|
864
|
-
"352"
|
|
865
|
-
],
|
|
866
|
-
[
|
|
867
|
-
"mo",
|
|
868
|
-
// Macao SAR China
|
|
869
|
-
"853"
|
|
870
|
-
],
|
|
871
|
-
[
|
|
872
|
-
"mg",
|
|
873
|
-
// Madagascar
|
|
874
|
-
"261",
|
|
875
|
-
0,
|
|
876
|
-
null,
|
|
877
|
-
"0"
|
|
878
|
-
],
|
|
879
|
-
[
|
|
880
|
-
"mw",
|
|
881
|
-
// Malawi
|
|
882
|
-
"265",
|
|
883
|
-
0,
|
|
884
|
-
null,
|
|
885
|
-
"0"
|
|
886
|
-
],
|
|
887
|
-
[
|
|
888
|
-
"my",
|
|
889
|
-
// Malaysia
|
|
890
|
-
"60",
|
|
891
|
-
0,
|
|
892
|
-
null,
|
|
893
|
-
"0"
|
|
894
|
-
],
|
|
895
|
-
[
|
|
896
|
-
"mv",
|
|
897
|
-
// Maldives
|
|
898
|
-
"960"
|
|
899
|
-
],
|
|
900
|
-
[
|
|
901
|
-
"ml",
|
|
902
|
-
// Mali
|
|
903
|
-
"223"
|
|
904
|
-
],
|
|
905
|
-
[
|
|
906
|
-
"mt",
|
|
907
|
-
// Malta
|
|
908
|
-
"356"
|
|
909
|
-
],
|
|
910
|
-
[
|
|
911
|
-
"mh",
|
|
912
|
-
// Marshall Islands
|
|
913
|
-
"692",
|
|
914
|
-
0,
|
|
915
|
-
null,
|
|
916
|
-
"1"
|
|
917
|
-
],
|
|
918
|
-
[
|
|
919
|
-
"mq",
|
|
920
|
-
// Martinique
|
|
921
|
-
"596",
|
|
922
|
-
0,
|
|
923
|
-
null,
|
|
924
|
-
"0"
|
|
925
|
-
],
|
|
926
|
-
[
|
|
927
|
-
"mr",
|
|
928
|
-
// Mauritania
|
|
929
|
-
"222"
|
|
930
|
-
],
|
|
931
|
-
[
|
|
932
|
-
"mu",
|
|
933
|
-
// Mauritius
|
|
934
|
-
"230"
|
|
935
|
-
],
|
|
936
|
-
[
|
|
937
|
-
"yt",
|
|
938
|
-
// Mayotte
|
|
939
|
-
"262",
|
|
940
|
-
1,
|
|
941
|
-
["269", "639"],
|
|
942
|
-
"0"
|
|
943
|
-
],
|
|
944
|
-
[
|
|
945
|
-
"mx",
|
|
946
|
-
// Mexico
|
|
947
|
-
"52"
|
|
948
|
-
],
|
|
949
|
-
[
|
|
950
|
-
"fm",
|
|
951
|
-
// Micronesia
|
|
952
|
-
"691"
|
|
953
|
-
],
|
|
954
|
-
[
|
|
955
|
-
"md",
|
|
956
|
-
// Moldova
|
|
957
|
-
"373",
|
|
958
|
-
0,
|
|
959
|
-
null,
|
|
960
|
-
"0"
|
|
961
|
-
],
|
|
962
|
-
[
|
|
963
|
-
"mc",
|
|
964
|
-
// Monaco
|
|
965
|
-
"377",
|
|
966
|
-
0,
|
|
967
|
-
null,
|
|
968
|
-
"0"
|
|
969
|
-
],
|
|
970
|
-
[
|
|
971
|
-
"mn",
|
|
972
|
-
// Mongolia
|
|
973
|
-
"976",
|
|
974
|
-
0,
|
|
975
|
-
null,
|
|
976
|
-
"0"
|
|
977
|
-
],
|
|
978
|
-
[
|
|
979
|
-
"me",
|
|
980
|
-
// Montenegro
|
|
981
|
-
"382",
|
|
982
|
-
0,
|
|
983
|
-
null,
|
|
984
|
-
"0"
|
|
985
|
-
],
|
|
986
|
-
[
|
|
987
|
-
"ms",
|
|
988
|
-
// Montserrat
|
|
989
|
-
"1",
|
|
990
|
-
16,
|
|
991
|
-
["664"],
|
|
992
|
-
"1"
|
|
993
|
-
],
|
|
994
|
-
[
|
|
995
|
-
"ma",
|
|
996
|
-
// Morocco
|
|
997
|
-
"212",
|
|
998
|
-
0,
|
|
999
|
-
["6", "7"],
|
|
1000
|
-
// (mobile ranges shared with EH)
|
|
1001
|
-
"0"
|
|
1002
|
-
],
|
|
1003
|
-
[
|
|
1004
|
-
"mz",
|
|
1005
|
-
// Mozambique
|
|
1006
|
-
"258"
|
|
1007
|
-
],
|
|
1008
|
-
[
|
|
1009
|
-
"mm",
|
|
1010
|
-
// Myanmar (Burma)
|
|
1011
|
-
"95",
|
|
1012
|
-
0,
|
|
1013
|
-
null,
|
|
1014
|
-
"0"
|
|
1015
|
-
],
|
|
1016
|
-
[
|
|
1017
|
-
"na",
|
|
1018
|
-
// Namibia
|
|
1019
|
-
"264",
|
|
1020
|
-
0,
|
|
1021
|
-
null,
|
|
1022
|
-
"0"
|
|
1023
|
-
],
|
|
1024
|
-
[
|
|
1025
|
-
"nr",
|
|
1026
|
-
// Nauru
|
|
1027
|
-
"674"
|
|
1028
|
-
],
|
|
1029
|
-
[
|
|
1030
|
-
"np",
|
|
1031
|
-
// Nepal
|
|
1032
|
-
"977",
|
|
1033
|
-
0,
|
|
1034
|
-
null,
|
|
1035
|
-
"0"
|
|
1036
|
-
],
|
|
1037
|
-
[
|
|
1038
|
-
"nl",
|
|
1039
|
-
// Netherlands
|
|
1040
|
-
"31",
|
|
1041
|
-
0,
|
|
1042
|
-
null,
|
|
1043
|
-
"0"
|
|
1044
|
-
],
|
|
1045
|
-
[
|
|
1046
|
-
"nc",
|
|
1047
|
-
// New Caledonia
|
|
1048
|
-
"687"
|
|
1049
|
-
],
|
|
1050
|
-
[
|
|
1051
|
-
"nz",
|
|
1052
|
-
// New Zealand
|
|
1053
|
-
"64",
|
|
1054
|
-
0,
|
|
1055
|
-
null,
|
|
1056
|
-
"0"
|
|
1057
|
-
],
|
|
1058
|
-
[
|
|
1059
|
-
"ni",
|
|
1060
|
-
// Nicaragua
|
|
1061
|
-
"505"
|
|
1062
|
-
],
|
|
1063
|
-
[
|
|
1064
|
-
"ne",
|
|
1065
|
-
// Niger
|
|
1066
|
-
"227"
|
|
1067
|
-
],
|
|
1068
|
-
[
|
|
1069
|
-
"ng",
|
|
1070
|
-
// Nigeria
|
|
1071
|
-
"234",
|
|
1072
|
-
0,
|
|
1073
|
-
null,
|
|
1074
|
-
"0"
|
|
1075
|
-
],
|
|
1076
|
-
[
|
|
1077
|
-
"nu",
|
|
1078
|
-
// Niue
|
|
1079
|
-
"683"
|
|
1080
|
-
],
|
|
1081
|
-
[
|
|
1082
|
-
"nf",
|
|
1083
|
-
// Norfolk Island
|
|
1084
|
-
"672"
|
|
1085
|
-
],
|
|
1086
|
-
[
|
|
1087
|
-
"kp",
|
|
1088
|
-
// North Korea
|
|
1089
|
-
"850",
|
|
1090
|
-
0,
|
|
1091
|
-
null,
|
|
1092
|
-
"0"
|
|
1093
|
-
],
|
|
1094
|
-
[
|
|
1095
|
-
"mk",
|
|
1096
|
-
// North Macedonia
|
|
1097
|
-
"389",
|
|
1098
|
-
0,
|
|
1099
|
-
null,
|
|
1100
|
-
"0"
|
|
1101
|
-
],
|
|
1102
|
-
[
|
|
1103
|
-
"mp",
|
|
1104
|
-
// Northern Mariana Islands
|
|
1105
|
-
"1",
|
|
1106
|
-
17,
|
|
1107
|
-
["670"],
|
|
1108
|
-
"1"
|
|
1109
|
-
],
|
|
1110
|
-
[
|
|
1111
|
-
"no",
|
|
1112
|
-
// Norway
|
|
1113
|
-
"47",
|
|
1114
|
-
0,
|
|
1115
|
-
["4", "9"]
|
|
1116
|
-
// (mobile ranges shared with SJ)
|
|
1117
|
-
],
|
|
1118
|
-
[
|
|
1119
|
-
"om",
|
|
1120
|
-
// Oman
|
|
1121
|
-
"968"
|
|
1122
|
-
],
|
|
1123
|
-
[
|
|
1124
|
-
"pk",
|
|
1125
|
-
// Pakistan
|
|
1126
|
-
"92",
|
|
1127
|
-
0,
|
|
1128
|
-
null,
|
|
1129
|
-
"0"
|
|
1130
|
-
],
|
|
1131
|
-
[
|
|
1132
|
-
"pw",
|
|
1133
|
-
// Palau
|
|
1134
|
-
"680"
|
|
1135
|
-
],
|
|
1136
|
-
[
|
|
1137
|
-
"ps",
|
|
1138
|
-
// Palestinian Territories
|
|
1139
|
-
"970",
|
|
1140
|
-
0,
|
|
1141
|
-
null,
|
|
1142
|
-
"0"
|
|
1143
|
-
],
|
|
1144
|
-
[
|
|
1145
|
-
"pa",
|
|
1146
|
-
// Panama
|
|
1147
|
-
"507"
|
|
1148
|
-
],
|
|
1149
|
-
[
|
|
1150
|
-
"pg",
|
|
1151
|
-
// Papua New Guinea
|
|
1152
|
-
"675"
|
|
1153
|
-
],
|
|
1154
|
-
[
|
|
1155
|
-
"py",
|
|
1156
|
-
// Paraguay
|
|
1157
|
-
"595",
|
|
1158
|
-
0,
|
|
1159
|
-
null,
|
|
1160
|
-
"0"
|
|
1161
|
-
],
|
|
1162
|
-
[
|
|
1163
|
-
"pe",
|
|
1164
|
-
// Peru
|
|
1165
|
-
"51",
|
|
1166
|
-
0,
|
|
1167
|
-
null,
|
|
1168
|
-
"0"
|
|
1169
|
-
],
|
|
1170
|
-
[
|
|
1171
|
-
"ph",
|
|
1172
|
-
// Philippines
|
|
1173
|
-
"63",
|
|
1174
|
-
0,
|
|
1175
|
-
null,
|
|
1176
|
-
"0"
|
|
1177
|
-
],
|
|
1178
|
-
[
|
|
1179
|
-
"pl",
|
|
1180
|
-
// Poland
|
|
1181
|
-
"48"
|
|
1182
|
-
],
|
|
1183
|
-
[
|
|
1184
|
-
"pt",
|
|
1185
|
-
// Portugal
|
|
1186
|
-
"351"
|
|
1187
|
-
],
|
|
1188
|
-
[
|
|
1189
|
-
"pr",
|
|
1190
|
-
// Puerto Rico
|
|
1191
|
-
"1",
|
|
1192
|
-
3,
|
|
1193
|
-
["787", "939"],
|
|
1194
|
-
"1"
|
|
1195
|
-
],
|
|
1196
|
-
[
|
|
1197
|
-
"qa",
|
|
1198
|
-
// Qatar
|
|
1199
|
-
"974"
|
|
1200
|
-
],
|
|
1201
|
-
[
|
|
1202
|
-
"re",
|
|
1203
|
-
// Réunion
|
|
1204
|
-
"262",
|
|
1205
|
-
0,
|
|
1206
|
-
null,
|
|
1207
|
-
"0"
|
|
1208
|
-
],
|
|
1209
|
-
[
|
|
1210
|
-
"ro",
|
|
1211
|
-
// Romania
|
|
1212
|
-
"40",
|
|
1213
|
-
0,
|
|
1214
|
-
null,
|
|
1215
|
-
"0"
|
|
1216
|
-
],
|
|
1217
|
-
[
|
|
1218
|
-
"ru",
|
|
1219
|
-
// Russia
|
|
1220
|
-
"7",
|
|
1221
|
-
0,
|
|
1222
|
-
["33"],
|
|
1223
|
-
// (shared with KZ)
|
|
1224
|
-
"8"
|
|
1225
|
-
],
|
|
1226
|
-
[
|
|
1227
|
-
"rw",
|
|
1228
|
-
// Rwanda
|
|
1229
|
-
"250",
|
|
1230
|
-
0,
|
|
1231
|
-
null,
|
|
1232
|
-
"0"
|
|
1233
|
-
],
|
|
1234
|
-
[
|
|
1235
|
-
"ws",
|
|
1236
|
-
// Samoa
|
|
1237
|
-
"685"
|
|
1238
|
-
],
|
|
1239
|
-
[
|
|
1240
|
-
"sm",
|
|
1241
|
-
// San Marino
|
|
1242
|
-
"378"
|
|
1243
|
-
],
|
|
1244
|
-
[
|
|
1245
|
-
"st",
|
|
1246
|
-
// São Tomé & Príncipe
|
|
1247
|
-
"239"
|
|
1248
|
-
],
|
|
1249
|
-
[
|
|
1250
|
-
"sa",
|
|
1251
|
-
// Saudi Arabia
|
|
1252
|
-
"966",
|
|
1253
|
-
0,
|
|
1254
|
-
null,
|
|
1255
|
-
"0"
|
|
1256
|
-
],
|
|
1257
|
-
[
|
|
1258
|
-
"sn",
|
|
1259
|
-
// Senegal
|
|
1260
|
-
"221"
|
|
1261
|
-
],
|
|
1262
|
-
[
|
|
1263
|
-
"rs",
|
|
1264
|
-
// Serbia
|
|
1265
|
-
"381",
|
|
1266
|
-
0,
|
|
1267
|
-
null,
|
|
1268
|
-
"0"
|
|
1269
|
-
],
|
|
1270
|
-
[
|
|
1271
|
-
"sc",
|
|
1272
|
-
// Seychelles
|
|
1273
|
-
"248"
|
|
1274
|
-
],
|
|
1275
|
-
[
|
|
1276
|
-
"sl",
|
|
1277
|
-
// Sierra Leone
|
|
1278
|
-
"232",
|
|
1279
|
-
0,
|
|
1280
|
-
null,
|
|
1281
|
-
"0"
|
|
1282
|
-
],
|
|
1283
|
-
[
|
|
1284
|
-
"sg",
|
|
1285
|
-
// Singapore
|
|
1286
|
-
"65"
|
|
1287
|
-
],
|
|
1288
|
-
[
|
|
1289
|
-
"sx",
|
|
1290
|
-
// Sint Maarten
|
|
1291
|
-
"1",
|
|
1292
|
-
21,
|
|
1293
|
-
["721"],
|
|
1294
|
-
"1"
|
|
1295
|
-
],
|
|
1296
|
-
[
|
|
1297
|
-
"sk",
|
|
1298
|
-
// Slovakia
|
|
1299
|
-
"421",
|
|
1300
|
-
0,
|
|
1301
|
-
null,
|
|
1302
|
-
"0"
|
|
1303
|
-
],
|
|
1304
|
-
[
|
|
1305
|
-
"si",
|
|
1306
|
-
// Slovenia
|
|
1307
|
-
"386",
|
|
1308
|
-
0,
|
|
1309
|
-
null,
|
|
1310
|
-
"0"
|
|
1311
|
-
],
|
|
1312
|
-
[
|
|
1313
|
-
"sb",
|
|
1314
|
-
// Solomon Islands
|
|
1315
|
-
"677"
|
|
1316
|
-
],
|
|
1317
|
-
[
|
|
1318
|
-
"so",
|
|
1319
|
-
// Somalia
|
|
1320
|
-
"252",
|
|
1321
|
-
0,
|
|
1322
|
-
null,
|
|
1323
|
-
"0"
|
|
1324
|
-
],
|
|
1325
|
-
[
|
|
1326
|
-
"za",
|
|
1327
|
-
// South Africa
|
|
1328
|
-
"27",
|
|
1329
|
-
0,
|
|
1330
|
-
null,
|
|
1331
|
-
"0"
|
|
1332
|
-
],
|
|
1333
|
-
[
|
|
1334
|
-
"kr",
|
|
1335
|
-
// South Korea
|
|
1336
|
-
"82",
|
|
1337
|
-
0,
|
|
1338
|
-
null,
|
|
1339
|
-
"0"
|
|
1340
|
-
],
|
|
1341
|
-
[
|
|
1342
|
-
"ss",
|
|
1343
|
-
// South Sudan
|
|
1344
|
-
"211",
|
|
1345
|
-
0,
|
|
1346
|
-
null,
|
|
1347
|
-
"0"
|
|
1348
|
-
],
|
|
1349
|
-
[
|
|
1350
|
-
"es",
|
|
1351
|
-
// Spain
|
|
1352
|
-
"34"
|
|
1353
|
-
],
|
|
1354
|
-
[
|
|
1355
|
-
"lk",
|
|
1356
|
-
// Sri Lanka
|
|
1357
|
-
"94",
|
|
1358
|
-
0,
|
|
1359
|
-
null,
|
|
1360
|
-
"0"
|
|
1361
|
-
],
|
|
1362
|
-
[
|
|
1363
|
-
"bl",
|
|
1364
|
-
// St. Barthélemy
|
|
1365
|
-
"590",
|
|
1366
|
-
1,
|
|
1367
|
-
null,
|
|
1368
|
-
"0"
|
|
1369
|
-
],
|
|
1370
|
-
[
|
|
1371
|
-
"sh",
|
|
1372
|
-
// St. Helena
|
|
1373
|
-
"290"
|
|
1374
|
-
],
|
|
1375
|
-
[
|
|
1376
|
-
"kn",
|
|
1377
|
-
// St. Kitts & Nevis
|
|
1378
|
-
"1",
|
|
1379
|
-
18,
|
|
1380
|
-
["869"],
|
|
1381
|
-
"1"
|
|
1382
|
-
],
|
|
1383
|
-
[
|
|
1384
|
-
"lc",
|
|
1385
|
-
// St. Lucia
|
|
1386
|
-
"1",
|
|
1387
|
-
19,
|
|
1388
|
-
["758"],
|
|
1389
|
-
"1"
|
|
1390
|
-
],
|
|
1391
|
-
[
|
|
1392
|
-
"mf",
|
|
1393
|
-
// St. Martin
|
|
1394
|
-
"590",
|
|
1395
|
-
2,
|
|
1396
|
-
null,
|
|
1397
|
-
"0"
|
|
1398
|
-
],
|
|
1399
|
-
[
|
|
1400
|
-
"pm",
|
|
1401
|
-
// St. Pierre & Miquelon
|
|
1402
|
-
"508",
|
|
1403
|
-
0,
|
|
1404
|
-
null,
|
|
1405
|
-
"0"
|
|
1406
|
-
],
|
|
1407
|
-
[
|
|
1408
|
-
"vc",
|
|
1409
|
-
// St. Vincent & Grenadines
|
|
1410
|
-
"1",
|
|
1411
|
-
20,
|
|
1412
|
-
["784"],
|
|
1413
|
-
"1"
|
|
1414
|
-
],
|
|
1415
|
-
[
|
|
1416
|
-
"sd",
|
|
1417
|
-
// Sudan
|
|
1418
|
-
"249",
|
|
1419
|
-
0,
|
|
1420
|
-
null,
|
|
1421
|
-
"0"
|
|
1422
|
-
],
|
|
1423
|
-
[
|
|
1424
|
-
"sr",
|
|
1425
|
-
// Suriname
|
|
1426
|
-
"597"
|
|
1427
|
-
],
|
|
1428
|
-
[
|
|
1429
|
-
"sj",
|
|
1430
|
-
// Svalbard & Jan Mayen
|
|
1431
|
-
"47",
|
|
1432
|
-
1,
|
|
1433
|
-
["4", "79", "9"]
|
|
1434
|
-
// (4 and 9 are mobile ranges shared with NO)
|
|
1435
|
-
],
|
|
1436
|
-
[
|
|
1437
|
-
"se",
|
|
1438
|
-
// Sweden
|
|
1439
|
-
"46",
|
|
1440
|
-
0,
|
|
1441
|
-
null,
|
|
1442
|
-
"0"
|
|
1443
|
-
],
|
|
1444
|
-
[
|
|
1445
|
-
"ch",
|
|
1446
|
-
// Switzerland
|
|
1447
|
-
"41",
|
|
1448
|
-
0,
|
|
1449
|
-
null,
|
|
1450
|
-
"0"
|
|
1451
|
-
],
|
|
1452
|
-
[
|
|
1453
|
-
"sy",
|
|
1454
|
-
// Syria
|
|
1455
|
-
"963",
|
|
1456
|
-
0,
|
|
1457
|
-
null,
|
|
1458
|
-
"0"
|
|
1459
|
-
],
|
|
1460
|
-
[
|
|
1461
|
-
"tw",
|
|
1462
|
-
// Taiwan
|
|
1463
|
-
"886",
|
|
1464
|
-
0,
|
|
1465
|
-
null,
|
|
1466
|
-
"0"
|
|
1467
|
-
],
|
|
1468
|
-
[
|
|
1469
|
-
"tj",
|
|
1470
|
-
// Tajikistan
|
|
1471
|
-
"992"
|
|
1472
|
-
],
|
|
1473
|
-
[
|
|
1474
|
-
"tz",
|
|
1475
|
-
// Tanzania
|
|
1476
|
-
"255",
|
|
1477
|
-
0,
|
|
1478
|
-
null,
|
|
1479
|
-
"0"
|
|
1480
|
-
],
|
|
1481
|
-
[
|
|
1482
|
-
"th",
|
|
1483
|
-
// Thailand
|
|
1484
|
-
"66",
|
|
1485
|
-
0,
|
|
1486
|
-
null,
|
|
1487
|
-
"0"
|
|
1488
|
-
],
|
|
1489
|
-
[
|
|
1490
|
-
"tl",
|
|
1491
|
-
// Timor-Leste
|
|
1492
|
-
"670"
|
|
1493
|
-
],
|
|
1494
|
-
[
|
|
1495
|
-
"tg",
|
|
1496
|
-
// Togo
|
|
1497
|
-
"228"
|
|
1498
|
-
],
|
|
1499
|
-
[
|
|
1500
|
-
"tk",
|
|
1501
|
-
// Tokelau
|
|
1502
|
-
"690"
|
|
1503
|
-
],
|
|
1504
|
-
[
|
|
1505
|
-
"to",
|
|
1506
|
-
// Tonga
|
|
1507
|
-
"676"
|
|
1508
|
-
],
|
|
1509
|
-
[
|
|
1510
|
-
"tt",
|
|
1511
|
-
// Trinidad & Tobago
|
|
1512
|
-
"1",
|
|
1513
|
-
22,
|
|
1514
|
-
["868"],
|
|
1515
|
-
"1"
|
|
1516
|
-
],
|
|
1517
|
-
[
|
|
1518
|
-
"tn",
|
|
1519
|
-
// Tunisia
|
|
1520
|
-
"216"
|
|
1521
|
-
],
|
|
1522
|
-
[
|
|
1523
|
-
"tr",
|
|
1524
|
-
// Turkey
|
|
1525
|
-
"90",
|
|
1526
|
-
0,
|
|
1527
|
-
null,
|
|
1528
|
-
"0"
|
|
1529
|
-
],
|
|
1530
|
-
[
|
|
1531
|
-
"tm",
|
|
1532
|
-
// Turkmenistan
|
|
1533
|
-
"993",
|
|
1534
|
-
0,
|
|
1535
|
-
null,
|
|
1536
|
-
"8"
|
|
1537
|
-
],
|
|
1538
|
-
[
|
|
1539
|
-
"tc",
|
|
1540
|
-
// Turks & Caicos Islands
|
|
1541
|
-
"1",
|
|
1542
|
-
23,
|
|
1543
|
-
["649"],
|
|
1544
|
-
"1"
|
|
1545
|
-
],
|
|
1546
|
-
[
|
|
1547
|
-
"tv",
|
|
1548
|
-
// Tuvalu
|
|
1549
|
-
"688"
|
|
1550
|
-
],
|
|
1551
|
-
[
|
|
1552
|
-
"vi",
|
|
1553
|
-
// U.S. Virgin Islands
|
|
1554
|
-
"1",
|
|
1555
|
-
24,
|
|
1556
|
-
["340"],
|
|
1557
|
-
"1"
|
|
1558
|
-
],
|
|
1559
|
-
[
|
|
1560
|
-
"ug",
|
|
1561
|
-
// Uganda
|
|
1562
|
-
"256",
|
|
1563
|
-
0,
|
|
1564
|
-
null,
|
|
1565
|
-
"0"
|
|
1566
|
-
],
|
|
1567
|
-
[
|
|
1568
|
-
"ua",
|
|
1569
|
-
// Ukraine
|
|
1570
|
-
"380",
|
|
1571
|
-
0,
|
|
1572
|
-
null,
|
|
1573
|
-
"0"
|
|
1574
|
-
],
|
|
1575
|
-
[
|
|
1576
|
-
"ae",
|
|
1577
|
-
// United Arab Emirates
|
|
1578
|
-
"971",
|
|
1579
|
-
0,
|
|
1580
|
-
null,
|
|
1581
|
-
"0"
|
|
1582
|
-
],
|
|
1583
|
-
[
|
|
1584
|
-
"gb",
|
|
1585
|
-
// United Kingdom
|
|
1586
|
-
"44",
|
|
1587
|
-
0,
|
|
1588
|
-
null,
|
|
1589
|
-
"0"
|
|
1590
|
-
],
|
|
1591
|
-
[
|
|
1592
|
-
"us",
|
|
1593
|
-
// United States
|
|
1594
|
-
"1",
|
|
1595
|
-
0,
|
|
1596
|
-
null,
|
|
1597
|
-
"1"
|
|
1598
|
-
],
|
|
1599
|
-
[
|
|
1600
|
-
"uy",
|
|
1601
|
-
// Uruguay
|
|
1602
|
-
"598",
|
|
1603
|
-
0,
|
|
1604
|
-
null,
|
|
1605
|
-
"0"
|
|
1606
|
-
],
|
|
1607
|
-
[
|
|
1608
|
-
"uz",
|
|
1609
|
-
// Uzbekistan
|
|
1610
|
-
"998"
|
|
1611
|
-
],
|
|
1612
|
-
[
|
|
1613
|
-
"vu",
|
|
1614
|
-
// Vanuatu
|
|
1615
|
-
"678"
|
|
1616
|
-
],
|
|
1617
|
-
[
|
|
1618
|
-
"va",
|
|
1619
|
-
// Vatican City
|
|
1620
|
-
"39",
|
|
1621
|
-
1,
|
|
1622
|
-
["06698", "3"]
|
|
1623
|
-
// (3 is a mobile range shared with IT)
|
|
1624
|
-
],
|
|
1625
|
-
[
|
|
1626
|
-
"ve",
|
|
1627
|
-
// Venezuela
|
|
1628
|
-
"58",
|
|
1629
|
-
0,
|
|
1630
|
-
null,
|
|
1631
|
-
"0"
|
|
1632
|
-
],
|
|
1633
|
-
[
|
|
1634
|
-
"vn",
|
|
1635
|
-
// Vietnam
|
|
1636
|
-
"84",
|
|
1637
|
-
0,
|
|
1638
|
-
null,
|
|
1639
|
-
"0"
|
|
1640
|
-
],
|
|
1641
|
-
[
|
|
1642
|
-
"wf",
|
|
1643
|
-
// Wallis & Futuna
|
|
1644
|
-
"681"
|
|
1645
|
-
],
|
|
1646
|
-
[
|
|
1647
|
-
"eh",
|
|
1648
|
-
// Western Sahara
|
|
1649
|
-
"212",
|
|
1650
|
-
1,
|
|
1651
|
-
["5288", "5289", "6", "7"],
|
|
1652
|
-
// (6 and 7 are mobile ranges shared with MA)
|
|
1653
|
-
"0"
|
|
1654
|
-
],
|
|
1655
|
-
[
|
|
1656
|
-
"ye",
|
|
1657
|
-
// Yemen
|
|
1658
|
-
"967",
|
|
1659
|
-
0,
|
|
1660
|
-
null,
|
|
1661
|
-
"0"
|
|
1662
|
-
],
|
|
1663
|
-
[
|
|
1664
|
-
"zm",
|
|
1665
|
-
// Zambia
|
|
1666
|
-
"260",
|
|
1667
|
-
0,
|
|
1668
|
-
null,
|
|
1669
|
-
"0"
|
|
1670
|
-
],
|
|
1671
|
-
[
|
|
1672
|
-
"zw",
|
|
1673
|
-
// Zimbabwe
|
|
1674
|
-
"263",
|
|
1675
|
-
0,
|
|
1676
|
-
null,
|
|
1677
|
-
"0"
|
|
1678
|
-
]
|
|
1679
|
-
];
|
|
1680
|
-
var allCountries = [];
|
|
1681
|
-
for (const c of rawCountryData) {
|
|
1682
|
-
allCountries.push({
|
|
1683
|
-
name: "",
|
|
1684
|
-
// populated in the plugin
|
|
1685
|
-
iso2: c[0],
|
|
1686
|
-
dialCode: c[1],
|
|
1687
|
-
priority: c[2] || 0,
|
|
1688
|
-
areaCodes: c[3] || null,
|
|
1689
|
-
nodeById: {},
|
|
1690
|
-
// populated by the plugin
|
|
1691
|
-
nationalPrefix: c[4] || null,
|
|
1692
|
-
normalisedName: "",
|
|
1693
|
-
// populated in the plugin
|
|
1694
|
-
initials: "",
|
|
1695
|
-
// populated in the plugin
|
|
1696
|
-
dialCodePlus: ""
|
|
1697
|
-
// populated in the plugin
|
|
1698
|
-
});
|
|
1699
|
-
}
|
|
1700
|
-
var iso2Set = new Set(allCountries.map((c) => c.iso2));
|
|
1701
|
-
var isIso2 = (val) => iso2Set.has(val);
|
|
1702
|
-
var data_default = allCountries;
|
|
1703
|
-
|
|
1704
|
-
// angular/build/temp/modules/constants.js
|
|
1705
|
-
var EVENTS = {
|
|
1706
|
-
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
1707
|
-
CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
|
|
1708
|
-
COUNTRY_CHANGE: "countrychange",
|
|
1709
|
-
INPUT: "input"
|
|
1710
|
-
// used for synthetic input trigger
|
|
1711
|
-
};
|
|
1712
|
-
var CLASSES = {
|
|
1713
|
-
HIDE: "iti__hide",
|
|
1714
|
-
V_HIDE: "iti__v-hide",
|
|
1715
|
-
ARROW_UP: "iti__arrow--up",
|
|
1716
|
-
GLOBE: "iti__globe",
|
|
1717
|
-
FLAG: "iti__flag",
|
|
1718
|
-
LOADING: "iti__loading",
|
|
1719
|
-
COUNTRY_ITEM: "iti__country",
|
|
1720
|
-
HIGHLIGHT: "iti__highlight"
|
|
1721
|
-
};
|
|
1722
|
-
var KEYS = {
|
|
1723
|
-
ARROW_UP: "ArrowUp",
|
|
1724
|
-
ARROW_DOWN: "ArrowDown",
|
|
1725
|
-
SPACE: " ",
|
|
1726
|
-
ENTER: "Enter",
|
|
1727
|
-
ESC: "Escape",
|
|
1728
|
-
TAB: "Tab"
|
|
1729
|
-
};
|
|
1730
|
-
var INPUT_TYPES = {
|
|
1731
|
-
PASTE: "insertFromPaste",
|
|
1732
|
-
DELETE_FWD: "deleteContentForward"
|
|
1733
|
-
};
|
|
1734
|
-
var REGEX = {
|
|
1735
|
-
ALPHA_UNICODE: /\p{L}/u,
|
|
1736
|
-
// any kind of letter from any language
|
|
1737
|
-
NON_PLUS_NUMERIC: /[^+0-9]/,
|
|
1738
|
-
// chars that are NOT + or digit
|
|
1739
|
-
NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,
|
|
1740
|
-
// chars that are NOT + or digit (global)
|
|
1741
|
-
HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
|
|
1742
|
-
// single acceptable hidden-search char
|
|
1743
|
-
};
|
|
1744
|
-
var TIMINGS = {
|
|
1745
|
-
SEARCH_DEBOUNCE_MS: 100,
|
|
1746
|
-
HIDDEN_SEARCH_RESET_MS: 1e3,
|
|
1747
|
-
NEXT_TICK: 0
|
|
1748
|
-
};
|
|
1749
|
-
var SENTINELS = {
|
|
1750
|
-
UNKNOWN_NUMBER_TYPE: -99,
|
|
1751
|
-
UNKNOWN_VALIDATION_ERROR: -99
|
|
1752
|
-
};
|
|
1753
|
-
var LAYOUT = {
|
|
1754
|
-
NARROW_VIEWPORT_WIDTH: 500,
|
|
1755
|
-
// keep in sync with .iti__country-list CSS media query
|
|
1756
|
-
SANE_SELECTED_WITH_DIAL_WIDTH: 78,
|
|
1757
|
-
// px width fallback when separateDialCode enabled
|
|
1758
|
-
SANE_SELECTED_NO_DIAL_WIDTH: 42,
|
|
1759
|
-
// px width fallback when no separate dial code
|
|
1760
|
-
INPUT_PADDING_EXTRA_LEFT: 6,
|
|
1761
|
-
// px gap between selected country container and input text
|
|
1762
|
-
DROPDOWN_MARGIN: 3,
|
|
1763
|
-
// px margin between dropdown and tel input
|
|
1764
|
-
SANE_DROPDOWN_HEIGHT: 200
|
|
1765
|
-
// px height fallback for dropdown
|
|
1766
|
-
};
|
|
1767
|
-
var DIAL = {
|
|
1768
|
-
PLUS: "+",
|
|
1769
|
-
NANP: "1"
|
|
1770
|
-
// North American Numbering Plan
|
|
1771
|
-
};
|
|
1772
|
-
var UK = {
|
|
1773
|
-
ISO2: "gb",
|
|
1774
|
-
DIAL_CODE: "44",
|
|
1775
|
-
// +44 United Kingdom
|
|
1776
|
-
MOBILE_PREFIX: "7",
|
|
1777
|
-
// UK mobile numbers start with 7 after national trunk (0) or core section
|
|
1778
|
-
MOBILE_CORE_LENGTH: 10
|
|
1779
|
-
// core number length (excluding dial code / national prefix) for mobiles
|
|
1780
|
-
};
|
|
1781
|
-
var US = {
|
|
1782
|
-
ISO2: "us",
|
|
1783
|
-
DIAL_CODE: "1"
|
|
1784
|
-
// +1 United States
|
|
1785
|
-
};
|
|
1786
|
-
var PLACEHOLDER_MODES = {
|
|
1787
|
-
AGGRESSIVE: "aggressive",
|
|
1788
|
-
POLITE: "polite",
|
|
1789
|
-
OFF: "off"
|
|
1790
|
-
};
|
|
1791
|
-
var INITIAL_COUNTRY = {
|
|
1792
|
-
AUTO: "auto"
|
|
1793
|
-
};
|
|
1794
|
-
var NUMBER_TYPES = [
|
|
1795
|
-
"FIXED_LINE",
|
|
1796
|
-
"MOBILE",
|
|
1797
|
-
"FIXED_LINE_OR_MOBILE",
|
|
1798
|
-
"TOLL_FREE",
|
|
1799
|
-
"PREMIUM_RATE",
|
|
1800
|
-
"SHARED_COST",
|
|
1801
|
-
"VOIP",
|
|
1802
|
-
"PERSONAL_NUMBER",
|
|
1803
|
-
"PAGER",
|
|
1804
|
-
"UAN",
|
|
1805
|
-
"VOICEMAIL",
|
|
1806
|
-
"UNKNOWN"
|
|
1807
|
-
];
|
|
1808
|
-
var NUMBER_TYPE_SET = new Set(NUMBER_TYPES);
|
|
1809
|
-
var DATA_KEYS = {
|
|
1810
|
-
COUNTRY_CODE: "countryCode",
|
|
1811
|
-
DIAL_CODE: "dialCode"
|
|
1812
|
-
};
|
|
1813
|
-
var ARIA = {
|
|
1814
|
-
EXPANDED: "aria-expanded",
|
|
1815
|
-
LABEL: "aria-label",
|
|
1816
|
-
SELECTED: "aria-selected",
|
|
1817
|
-
ACTIVE_DESCENDANT: "aria-activedescendant",
|
|
1818
|
-
HASPOPUP: "aria-haspopup",
|
|
1819
|
-
CONTROLS: "aria-controls",
|
|
1820
|
-
HIDDEN: "aria-hidden",
|
|
1821
|
-
AUTOCOMPLETE: "aria-autocomplete",
|
|
1822
|
-
MODAL: "aria-modal"
|
|
1823
|
-
};
|
|
1824
|
-
|
|
1825
|
-
// angular/build/temp/intl-tel-input/i18n/en/index.js
|
|
1826
|
-
var interfaceTranslations = {
|
|
1827
|
-
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1828
|
-
noCountrySelected: "Select country",
|
|
1829
|
-
countryListAriaLabel: "List of countries",
|
|
1830
|
-
searchPlaceholder: "Search",
|
|
1831
|
-
clearSearchAriaLabel: "Clear search",
|
|
1832
|
-
searchEmptyState: "No results found",
|
|
1833
|
-
searchSummaryAria(count) {
|
|
1834
|
-
if (count === 0) {
|
|
1835
|
-
return "No results found";
|
|
1836
|
-
}
|
|
1837
|
-
if (count === 1) {
|
|
1838
|
-
return "1 result found";
|
|
1839
|
-
}
|
|
1840
|
-
return `${count} results found`;
|
|
1841
|
-
}
|
|
1842
|
-
};
|
|
1843
|
-
var en_default = interfaceTranslations;
|
|
1844
|
-
|
|
1845
|
-
// angular/build/temp/modules/core/options.js
|
|
1846
|
-
var mq = (q) => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(q).matches;
|
|
1847
|
-
var isNarrowViewport = () => mq(`(max-width: ${LAYOUT.NARROW_VIEWPORT_WIDTH}px)`);
|
|
1848
|
-
var computeDefaultUseFullscreenPopup = () => {
|
|
1849
|
-
if (typeof navigator !== "undefined" && typeof window !== "undefined") {
|
|
1850
|
-
const isShortViewport = mq("(max-height: 600px)");
|
|
1851
|
-
const isCoarsePointer = mq("(pointer: coarse)");
|
|
1852
|
-
return isNarrowViewport() || isCoarsePointer && isShortViewport;
|
|
1853
|
-
}
|
|
1854
|
-
return false;
|
|
1855
|
-
};
|
|
1856
|
-
var defaults = {
|
|
1857
|
-
//* Whether or not to allow the dropdown.
|
|
1858
|
-
allowDropdown: true,
|
|
1859
|
-
//* The number type to enforce during validation.
|
|
1860
|
-
allowedNumberTypes: ["MOBILE", "FIXED_LINE"],
|
|
1861
|
-
//* Whether or not to allow extensions after the main number.
|
|
1862
|
-
allowNumberExtensions: false,
|
|
1863
|
-
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1864
|
-
allowPhonewords: false,
|
|
1865
|
-
//* Add a placeholder in the input with an example number for the selected country.
|
|
1866
|
-
autoPlaceholder: PLACEHOLDER_MODES.POLITE,
|
|
1867
|
-
//* Add a custom class to the (injected) container element.
|
|
1868
|
-
containerClass: "",
|
|
1869
|
-
//* Locale for localising country names via Intl.DisplayNames.
|
|
1870
|
-
countryNameLocale: "en",
|
|
1871
|
-
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
1872
|
-
countryOrder: null,
|
|
1873
|
-
//* Add a country search input at the top of the dropdown.
|
|
1874
|
-
countrySearch: true,
|
|
1875
|
-
//* Modify the auto placeholder.
|
|
1876
|
-
customPlaceholder: null,
|
|
1877
|
-
//* Always show the dropdown
|
|
1878
|
-
dropdownAlwaysOpen: false,
|
|
1879
|
-
//* Append menu to specified element.
|
|
1880
|
-
dropdownContainer: null,
|
|
1881
|
-
//* Don't display these countries.
|
|
1882
|
-
excludeCountries: [],
|
|
1883
|
-
//* Fix the dropdown width to the input width (rather than being as wide as the longest country name).
|
|
1884
|
-
fixDropdownWidth: true,
|
|
1885
|
-
//* Format the number as the user types
|
|
1886
|
-
formatAsYouType: true,
|
|
1887
|
-
//* Format the input value during initialisation and on setNumber.
|
|
1888
|
-
formatOnDisplay: true,
|
|
1889
|
-
//* geoIp lookup function.
|
|
1890
|
-
geoIpLookup: null,
|
|
1891
|
-
//* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.
|
|
1892
|
-
hiddenInput: null,
|
|
1893
|
-
//* Internationalise the plugin text e.g. search input placeholder, country names.
|
|
1894
|
-
i18n: {},
|
|
1895
|
-
//* Initial country.
|
|
1896
|
-
initialCountry: "",
|
|
1897
|
-
//* A function to load the utils script.
|
|
1898
|
-
loadUtils: null,
|
|
1899
|
-
//* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
|
|
1900
|
-
nationalMode: true,
|
|
1901
|
-
//* Display only these countries.
|
|
1902
|
-
onlyCountries: [],
|
|
1903
|
-
//* Number type to use for placeholders.
|
|
1904
|
-
placeholderNumberType: "MOBILE",
|
|
1905
|
-
//* Add custom classes to the search input element.
|
|
1906
|
-
searchInputClass: "",
|
|
1907
|
-
//* Display the international dial code next to the selected flag.
|
|
1908
|
-
separateDialCode: false,
|
|
1909
|
-
//* Show flags - for both the selected country, and in the country dropdown
|
|
1910
|
-
showFlags: true,
|
|
1911
|
-
//* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
|
|
1912
|
-
strictMode: false,
|
|
1913
|
-
//* Use full screen popup instead of dropdown for country list.
|
|
1914
|
-
useFullscreenPopup: computeDefaultUseFullscreenPopup()
|
|
1915
|
-
};
|
|
1916
|
-
var toString = (val) => JSON.stringify(val);
|
|
1917
|
-
var isPlainObject = (val) => Boolean(val) && typeof val === "object" && !Array.isArray(val);
|
|
1918
|
-
var isFn = (val) => typeof val === "function";
|
|
1919
|
-
var isElLike = (val) => {
|
|
1920
|
-
if (!val || typeof val !== "object")
|
|
1921
|
-
return false;
|
|
1922
|
-
const v = val;
|
|
1923
|
-
return v.nodeType === 1 && typeof v.tagName === "string" && typeof v.appendChild === "function";
|
|
1924
|
-
};
|
|
1925
|
-
var placeholderModeSet = new Set(Object.values(PLACEHOLDER_MODES));
|
|
1926
|
-
var warn = (message) => {
|
|
1927
|
-
console.warn(`[intl-tel-input] ${message}`);
|
|
1928
|
-
};
|
|
1929
|
-
var warnOption = (optionName, expectedType, actualValue) => {
|
|
1930
|
-
warn(`Option '${optionName}' must be ${expectedType}; got ${toString(actualValue)}. Ignoring.`);
|
|
1931
|
-
};
|
|
1932
|
-
var hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
1933
|
-
var validateIso2Array = (key, value) => {
|
|
1934
|
-
const expectedType = "an array of ISO2 country code strings";
|
|
1935
|
-
if (!Array.isArray(value)) {
|
|
1936
|
-
warnOption(key, expectedType, value);
|
|
1937
|
-
return false;
|
|
1938
|
-
}
|
|
1939
|
-
const valid = [];
|
|
1940
|
-
for (const v of value) {
|
|
1941
|
-
if (typeof v !== "string") {
|
|
1942
|
-
warnOption(key, expectedType, value);
|
|
1943
|
-
return false;
|
|
1944
|
-
}
|
|
1945
|
-
const lower = v.toLowerCase();
|
|
1946
|
-
if (!isIso2(lower)) {
|
|
1947
|
-
warn(`Invalid country code in '${key}': '${v}'. Skipping.`);
|
|
1948
|
-
} else {
|
|
1949
|
-
valid.push(v);
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
return valid;
|
|
1953
|
-
};
|
|
1954
|
-
var validateOptions = (customOptions) => {
|
|
1955
|
-
if (customOptions === void 0) {
|
|
1956
|
-
return {};
|
|
1957
|
-
}
|
|
1958
|
-
if (!isPlainObject(customOptions)) {
|
|
1959
|
-
const error = `The second argument must be an options object; got ${toString(customOptions)}. Using defaults.`;
|
|
1960
|
-
warn(error);
|
|
1961
|
-
return {};
|
|
1962
|
-
}
|
|
1963
|
-
const validatedOptions = {};
|
|
1964
|
-
for (const [key, value] of Object.entries(customOptions)) {
|
|
1965
|
-
if (!hasOwn(defaults, key)) {
|
|
1966
|
-
warn(`Unknown option '${key}'. Ignoring.`);
|
|
1967
|
-
continue;
|
|
1968
|
-
}
|
|
1969
|
-
switch (key) {
|
|
1970
|
-
case "allowDropdown":
|
|
1971
|
-
case "allowNumberExtensions":
|
|
1972
|
-
case "allowPhonewords":
|
|
1973
|
-
case "countrySearch":
|
|
1974
|
-
case "dropdownAlwaysOpen":
|
|
1975
|
-
case "fixDropdownWidth":
|
|
1976
|
-
case "formatAsYouType":
|
|
1977
|
-
case "formatOnDisplay":
|
|
1978
|
-
case "nationalMode":
|
|
1979
|
-
case "showFlags":
|
|
1980
|
-
case "separateDialCode":
|
|
1981
|
-
case "strictMode":
|
|
1982
|
-
case "useFullscreenPopup":
|
|
1983
|
-
if (typeof value !== "boolean") {
|
|
1984
|
-
warnOption(key, "a boolean", value);
|
|
1985
|
-
break;
|
|
1986
|
-
}
|
|
1987
|
-
validatedOptions[key] = value;
|
|
1988
|
-
break;
|
|
1989
|
-
case "autoPlaceholder":
|
|
1990
|
-
if (typeof value !== "string" || !placeholderModeSet.has(value)) {
|
|
1991
|
-
const validModes = Array.from(placeholderModeSet).join(", ");
|
|
1992
|
-
warnOption("autoPlaceholder", `one of ${validModes}`, value);
|
|
1993
|
-
break;
|
|
1994
|
-
}
|
|
1995
|
-
validatedOptions[key] = value;
|
|
1996
|
-
break;
|
|
1997
|
-
case "containerClass":
|
|
1998
|
-
case "searchInputClass":
|
|
1999
|
-
case "countryNameLocale":
|
|
2000
|
-
if (typeof value !== "string") {
|
|
2001
|
-
warnOption(key, "a string", value);
|
|
2002
|
-
break;
|
|
2003
|
-
}
|
|
2004
|
-
validatedOptions[key] = value;
|
|
2005
|
-
break;
|
|
2006
|
-
case "countryOrder": {
|
|
2007
|
-
if (value === null) {
|
|
2008
|
-
validatedOptions[key] = value;
|
|
2009
|
-
} else {
|
|
2010
|
-
const filtered = validateIso2Array(key, value);
|
|
2011
|
-
if (filtered !== false) {
|
|
2012
|
-
validatedOptions[key] = filtered;
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
break;
|
|
2016
|
-
}
|
|
2017
|
-
case "customPlaceholder":
|
|
2018
|
-
case "geoIpLookup":
|
|
2019
|
-
case "hiddenInput":
|
|
2020
|
-
case "loadUtils":
|
|
2021
|
-
if (value !== null && !isFn(value)) {
|
|
2022
|
-
warnOption(key, "a function or null", value);
|
|
2023
|
-
break;
|
|
2024
|
-
}
|
|
2025
|
-
validatedOptions[key] = value;
|
|
2026
|
-
break;
|
|
2027
|
-
case "dropdownContainer":
|
|
2028
|
-
if (value !== null && !isElLike(value)) {
|
|
2029
|
-
warnOption("dropdownContainer", "an HTMLElement or null", value);
|
|
2030
|
-
break;
|
|
2031
|
-
}
|
|
2032
|
-
validatedOptions[key] = value;
|
|
2033
|
-
break;
|
|
2034
|
-
case "excludeCountries":
|
|
2035
|
-
case "onlyCountries": {
|
|
2036
|
-
const filtered = validateIso2Array(key, value);
|
|
2037
|
-
if (filtered !== false) {
|
|
2038
|
-
validatedOptions[key] = filtered;
|
|
2039
|
-
}
|
|
2040
|
-
break;
|
|
2041
|
-
}
|
|
2042
|
-
case "i18n":
|
|
2043
|
-
if (value && !isPlainObject(value)) {
|
|
2044
|
-
warnOption("i18n", "an object", value);
|
|
2045
|
-
break;
|
|
2046
|
-
}
|
|
2047
|
-
validatedOptions[key] = value;
|
|
2048
|
-
break;
|
|
2049
|
-
case "initialCountry": {
|
|
2050
|
-
if (typeof value !== "string") {
|
|
2051
|
-
warnOption("initialCountry", "a string", value);
|
|
2052
|
-
break;
|
|
2053
|
-
}
|
|
2054
|
-
const lower = value.toLowerCase();
|
|
2055
|
-
if (lower && (lower !== INITIAL_COUNTRY.AUTO && !isIso2(lower))) {
|
|
2056
|
-
warnOption("initialCountry", "a valid ISO2 country code or 'auto'", value);
|
|
2057
|
-
break;
|
|
2058
|
-
}
|
|
2059
|
-
validatedOptions[key] = value;
|
|
2060
|
-
break;
|
|
2061
|
-
}
|
|
2062
|
-
case "placeholderNumberType":
|
|
2063
|
-
if (typeof value !== "string" || !NUMBER_TYPE_SET.has(value)) {
|
|
2064
|
-
const validTypes = Array.from(NUMBER_TYPE_SET).join(", ");
|
|
2065
|
-
warnOption("placeholderNumberType", `one of ${validTypes}`, value);
|
|
2066
|
-
break;
|
|
2067
|
-
}
|
|
2068
|
-
validatedOptions[key] = value;
|
|
2069
|
-
break;
|
|
2070
|
-
case "allowedNumberTypes":
|
|
2071
|
-
if (value !== null) {
|
|
2072
|
-
if (!Array.isArray(value)) {
|
|
2073
|
-
warnOption("allowedNumberTypes", "an array of number types or null", value);
|
|
2074
|
-
break;
|
|
2075
|
-
}
|
|
2076
|
-
let allValid = true;
|
|
2077
|
-
for (const v of value) {
|
|
2078
|
-
if (typeof v !== "string" || !NUMBER_TYPE_SET.has(v)) {
|
|
2079
|
-
const validTypes = Array.from(NUMBER_TYPE_SET).join(", ");
|
|
2080
|
-
warnOption("allowedNumberTypes", `an array of valid number types (${validTypes})`, v);
|
|
2081
|
-
allValid = false;
|
|
2082
|
-
break;
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
if (allValid) {
|
|
2086
|
-
validatedOptions[key] = value;
|
|
2087
|
-
}
|
|
2088
|
-
} else {
|
|
2089
|
-
validatedOptions[key] = null;
|
|
2090
|
-
}
|
|
2091
|
-
break;
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
return validatedOptions;
|
|
2095
|
-
};
|
|
2096
|
-
var normaliseOptions = (o) => {
|
|
2097
|
-
var _a3, _b;
|
|
2098
|
-
if (o.initialCountry) {
|
|
2099
|
-
o.initialCountry = o.initialCountry.toLowerCase();
|
|
2100
|
-
}
|
|
2101
|
-
if ((_a3 = o.onlyCountries) === null || _a3 === void 0 ? void 0 : _a3.length) {
|
|
2102
|
-
o.onlyCountries = o.onlyCountries.map((c) => c.toLowerCase());
|
|
2103
|
-
}
|
|
2104
|
-
if ((_b = o.excludeCountries) === null || _b === void 0 ? void 0 : _b.length) {
|
|
2105
|
-
o.excludeCountries = o.excludeCountries.map((c) => c.toLowerCase());
|
|
2106
|
-
}
|
|
2107
|
-
if (o.countryOrder) {
|
|
2108
|
-
o.countryOrder = o.countryOrder.map((c) => c.toLowerCase());
|
|
2109
|
-
}
|
|
2110
|
-
};
|
|
2111
|
-
var applyOptionSideEffects = (o) => {
|
|
2112
|
-
if (o.dropdownAlwaysOpen) {
|
|
2113
|
-
o.useFullscreenPopup = false;
|
|
2114
|
-
o.allowDropdown = true;
|
|
2115
|
-
}
|
|
2116
|
-
if (o.useFullscreenPopup) {
|
|
2117
|
-
o.fixDropdownWidth = false;
|
|
2118
|
-
} else {
|
|
2119
|
-
if (isNarrowViewport()) {
|
|
2120
|
-
o.fixDropdownWidth = true;
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
if (o.onlyCountries.length === 1) {
|
|
2124
|
-
o.initialCountry = o.onlyCountries[0];
|
|
2125
|
-
}
|
|
2126
|
-
if (o.separateDialCode) {
|
|
2127
|
-
o.nationalMode = false;
|
|
2128
|
-
}
|
|
2129
|
-
if (o.allowDropdown && !o.showFlags && !o.separateDialCode) {
|
|
2130
|
-
o.nationalMode = false;
|
|
2131
|
-
}
|
|
2132
|
-
if (o.useFullscreenPopup && !o.dropdownContainer) {
|
|
2133
|
-
o.dropdownContainer = document.body;
|
|
2134
|
-
}
|
|
2135
|
-
o.i18n = Object.assign(Object.assign({}, en_default), o.i18n);
|
|
2136
|
-
};
|
|
2137
|
-
|
|
2138
|
-
// angular/build/temp/modules/utils/string.js
|
|
2139
|
-
var getNumeric = (s) => s.replace(/\D/g, "");
|
|
2140
|
-
var normaliseString = (s = "") => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
2141
|
-
|
|
2142
|
-
// angular/build/temp/modules/utils/isAndroid.js
|
|
2143
|
-
var getIsAndroid = () => typeof navigator !== "undefined" ? /Android/i.test(navigator.userAgent) : false;
|
|
2144
|
-
|
|
2145
|
-
// angular/build/temp/modules/core/countrySearch.js
|
|
2146
|
-
var getMatchedCountries = (countries, query) => {
|
|
2147
|
-
const normalisedQuery = normaliseString(query);
|
|
2148
|
-
const iso2Matches = [];
|
|
2149
|
-
const nameStartWith = [];
|
|
2150
|
-
const nameContains = [];
|
|
2151
|
-
const dialCodeMatches = [];
|
|
2152
|
-
const dialCodeContains = [];
|
|
2153
|
-
const initialsMatches = [];
|
|
2154
|
-
for (const c of countries) {
|
|
2155
|
-
if (c.iso2 === normalisedQuery) {
|
|
2156
|
-
iso2Matches.push(c);
|
|
2157
|
-
} else if (c.normalisedName.startsWith(normalisedQuery)) {
|
|
2158
|
-
nameStartWith.push(c);
|
|
2159
|
-
} else if (c.normalisedName.includes(normalisedQuery)) {
|
|
2160
|
-
nameContains.push(c);
|
|
2161
|
-
} else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
|
|
2162
|
-
dialCodeMatches.push(c);
|
|
2163
|
-
} else if (c.dialCodePlus.includes(normalisedQuery)) {
|
|
2164
|
-
dialCodeContains.push(c);
|
|
2165
|
-
} else if (c.initials.includes(normalisedQuery)) {
|
|
2166
|
-
initialsMatches.push(c);
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
const sortByPriority = (a, b) => a.priority - b.priority;
|
|
2170
|
-
return [
|
|
2171
|
-
...iso2Matches,
|
|
2172
|
-
...nameStartWith,
|
|
2173
|
-
...nameContains,
|
|
2174
|
-
// priority sort is only relevant when showing multiple countries with the same dial code (that's what the priority field is used to distinguish between)
|
|
2175
|
-
...dialCodeMatches.sort(sortByPriority),
|
|
2176
|
-
...dialCodeContains.sort(sortByPriority),
|
|
2177
|
-
...initialsMatches
|
|
2178
|
-
];
|
|
2179
|
-
};
|
|
2180
|
-
var findFirstCountryStartingWith = (countries, query) => {
|
|
2181
|
-
const normalisedQuery = normaliseString(query);
|
|
2182
|
-
for (const c of countries) {
|
|
2183
|
-
if (c.normalisedName.startsWith(normalisedQuery)) {
|
|
2184
|
-
return c;
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
return null;
|
|
2188
|
-
};
|
|
2189
|
-
|
|
2190
|
-
// angular/build/temp/modules/utils/dom.js
|
|
2191
|
-
var buildClassNames = (flags) => Object.keys(flags).filter((k) => Boolean(flags[k])).join(" ");
|
|
2192
|
-
var createEl = (tagName, attrs, container) => {
|
|
2193
|
-
const el = document.createElement(tagName);
|
|
2194
|
-
if (attrs) {
|
|
2195
|
-
Object.entries(attrs).forEach(([key, value]) => el.setAttribute(key, value));
|
|
2196
|
-
}
|
|
2197
|
-
if (container) {
|
|
2198
|
-
container.appendChild(el);
|
|
2199
|
-
}
|
|
2200
|
-
return el;
|
|
2201
|
-
};
|
|
2202
|
-
|
|
2203
|
-
// angular/build/temp/modules/core/icons.js
|
|
2204
|
-
var buildSearchIcon = () => `
|
|
2205
|
-
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${ARIA.HIDDEN}="true">
|
|
2206
|
-
<circle cx="11" cy="11" r="7" />
|
|
2207
|
-
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
2208
|
-
</svg>`;
|
|
2209
|
-
var buildClearIcon = (id2) => {
|
|
2210
|
-
const maskId = `iti-${id2}-clear-mask`;
|
|
2211
|
-
return `
|
|
2212
|
-
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${ARIA.HIDDEN}="true" focusable="false">
|
|
2213
|
-
<mask id="${maskId}" maskUnits="userSpaceOnUse">
|
|
2214
|
-
<rect width="16" height="16" fill="white" />
|
|
2215
|
-
<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" />
|
|
2216
|
-
</mask>
|
|
2217
|
-
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${maskId})" />
|
|
2218
|
-
</svg>`;
|
|
2219
|
-
};
|
|
2220
|
-
var buildCheckIcon = () => `
|
|
2221
|
-
<svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${ARIA.HIDDEN}="true">
|
|
2222
|
-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
|
2223
|
-
</svg>`;
|
|
2224
|
-
var buildGlobeIcon = () => `
|
|
2225
|
-
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
2226
|
-
<path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
|
|
2227
|
-
<path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
|
|
2228
|
-
</svg>`;
|
|
2229
|
-
|
|
2230
|
-
// angular/build/temp/modules/core/ui.js
|
|
2231
|
-
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
2232
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2233
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2234
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2235
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
2236
|
-
};
|
|
2237
|
-
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
2238
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2239
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2240
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2241
|
-
};
|
|
2242
|
-
var _UI_instances;
|
|
2243
|
-
var _a;
|
|
2244
|
-
var _UI_options;
|
|
2245
|
-
var _UI_id;
|
|
2246
|
-
var _UI_isRTL;
|
|
2247
|
-
var _UI_originalPaddingLeft;
|
|
2248
|
-
var _UI_countries;
|
|
2249
|
-
var _UI_searchKeyupTimer;
|
|
2250
|
-
var _UI_inlineDropdownHeight;
|
|
2251
|
-
var _UI_selectedDialCode;
|
|
2252
|
-
var _UI_dropdownArrow;
|
|
2253
|
-
var _UI_dropdownContent;
|
|
2254
|
-
var _UI_searchIcon;
|
|
2255
|
-
var _UI_searchNoResults;
|
|
2256
|
-
var _UI_searchResultsA11yText;
|
|
2257
|
-
var _UI_dropdownForContainer;
|
|
2258
|
-
var _UI_selectedItem;
|
|
2259
|
-
var _UI_createWrapperAndInsert;
|
|
2260
|
-
var _UI_maybeBuildCountryContainer;
|
|
2261
|
-
var _UI_maybeEnsureDropdownWidthSet;
|
|
2262
|
-
var _UI_buildDropdownContent;
|
|
2263
|
-
var _UI_buildSearchUI;
|
|
2264
|
-
var _UI_maybeUpdateInputPaddingAndReveal;
|
|
2265
|
-
var _UI_maybeBuildHiddenInputs;
|
|
2266
|
-
var _UI_appendListItems;
|
|
2267
|
-
var _UI_updateInputPadding;
|
|
2268
|
-
var _UI_getBody;
|
|
2269
|
-
var _UI_getHiddenSelectedCountryWidth;
|
|
2270
|
-
var _UI_getHiddenInlineDropdownHeight;
|
|
2271
|
-
var _UI_updateSearchResultsA11yText;
|
|
2272
|
-
var _UI_doFilter;
|
|
2273
|
-
var _UI_updateSelectedItem;
|
|
2274
|
-
var _UI_filterCountries;
|
|
2275
|
-
var _UI_shouldPositionInlineDropdownBelowInput;
|
|
2276
|
-
var _UI_handleDropdownContainer;
|
|
2277
|
-
var UI = class {
|
|
2278
|
-
constructor(input, options, id2) {
|
|
2279
|
-
_UI_instances.add(this);
|
|
2280
|
-
_UI_options.set(this, void 0);
|
|
2281
|
-
_UI_id.set(this, void 0);
|
|
2282
|
-
_UI_isRTL.set(this, void 0);
|
|
2283
|
-
_UI_originalPaddingLeft.set(this, void 0);
|
|
2284
|
-
_UI_countries.set(this, void 0);
|
|
2285
|
-
_UI_searchKeyupTimer.set(this, null);
|
|
2286
|
-
_UI_inlineDropdownHeight.set(this, null);
|
|
2287
|
-
_UI_selectedDialCode.set(this, void 0);
|
|
2288
|
-
_UI_dropdownArrow.set(this, void 0);
|
|
2289
|
-
_UI_dropdownContent.set(this, void 0);
|
|
2290
|
-
_UI_searchIcon.set(this, void 0);
|
|
2291
|
-
_UI_searchNoResults.set(this, void 0);
|
|
2292
|
-
_UI_searchResultsA11yText.set(this, void 0);
|
|
2293
|
-
_UI_dropdownForContainer.set(this, null);
|
|
2294
|
-
_UI_selectedItem.set(this, null);
|
|
2295
|
-
this.highlightedItem = null;
|
|
2296
|
-
input.dataset.intlTelInputId = id2.toString();
|
|
2297
|
-
this.telInput = input;
|
|
2298
|
-
__classPrivateFieldSet(this, _UI_options, options, "f");
|
|
2299
|
-
__classPrivateFieldSet(this, _UI_id, id2, "f");
|
|
2300
|
-
this.hadInitialPlaceholder = Boolean(input.getAttribute("placeholder"));
|
|
2301
|
-
__classPrivateFieldSet(this, _UI_isRTL, !!this.telInput.closest("[dir=rtl]"), "f");
|
|
2302
|
-
if (__classPrivateFieldGet(this, _UI_options, "f").separateDialCode) {
|
|
2303
|
-
__classPrivateFieldSet(this, _UI_originalPaddingLeft, this.telInput.style.paddingLeft, "f");
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
// Validate that the provided element is an HTMLInputElement.
|
|
2307
|
-
static validateInput(input) {
|
|
2308
|
-
const tagName = input === null || input === void 0 ? void 0 : input.tagName;
|
|
2309
|
-
const isInputEl = Boolean(input) && typeof input === "object" && tagName === "INPUT" && typeof input.setAttribute === "function";
|
|
2310
|
-
if (!isInputEl) {
|
|
2311
|
-
const type = Object.prototype.toString.call(input);
|
|
2312
|
-
throw new TypeError(`The first argument must be an HTMLInputElement, not ${type}`);
|
|
2313
|
-
}
|
|
2314
|
-
}
|
|
2315
|
-
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
2316
|
-
generateMarkup(countries) {
|
|
2317
|
-
__classPrivateFieldSet(this, _UI_countries, countries, "f");
|
|
2318
|
-
this.telInput.classList.add("iti__tel-input");
|
|
2319
|
-
if (!this.telInput.hasAttribute("autocomplete")) {
|
|
2320
|
-
this.telInput.setAttribute("autocomplete", "tel");
|
|
2321
|
-
}
|
|
2322
|
-
if (!this.telInput.hasAttribute("inputmode")) {
|
|
2323
|
-
this.telInput.setAttribute("inputmode", "tel");
|
|
2324
|
-
}
|
|
2325
|
-
const wrapper = __classPrivateFieldGet(this, _UI_instances, "m", _UI_createWrapperAndInsert).call(this);
|
|
2326
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_maybeBuildCountryContainer).call(this, wrapper);
|
|
2327
|
-
wrapper.appendChild(this.telInput);
|
|
2328
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_maybeUpdateInputPaddingAndReveal).call(this);
|
|
2329
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_maybeBuildHiddenInputs).call(this, wrapper);
|
|
2330
|
-
}
|
|
2331
|
-
//* Country search: Filter the countries according to the search query.
|
|
2332
|
-
filterCountriesByQuery(query) {
|
|
2333
|
-
let matchedCountries;
|
|
2334
|
-
if (query === "") {
|
|
2335
|
-
matchedCountries = __classPrivateFieldGet(this, _UI_countries, "f");
|
|
2336
|
-
} else {
|
|
2337
|
-
matchedCountries = getMatchedCountries(__classPrivateFieldGet(this, _UI_countries, "f"), query);
|
|
2338
|
-
}
|
|
2339
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_filterCountries).call(this, matchedCountries);
|
|
2340
|
-
}
|
|
2341
|
-
handleSearchChange() {
|
|
2342
|
-
if (__classPrivateFieldGet(this, _UI_searchKeyupTimer, "f")) {
|
|
2343
|
-
clearTimeout(__classPrivateFieldGet(this, _UI_searchKeyupTimer, "f"));
|
|
2344
|
-
}
|
|
2345
|
-
__classPrivateFieldSet(this, _UI_searchKeyupTimer, setTimeout(() => {
|
|
2346
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_doFilter).call(this);
|
|
2347
|
-
__classPrivateFieldSet(this, _UI_searchKeyupTimer, null, "f");
|
|
2348
|
-
}, TIMINGS.SEARCH_DEBOUNCE_MS), "f");
|
|
2349
|
-
}
|
|
2350
|
-
handleSearchClear() {
|
|
2351
|
-
this.searchInput.value = "";
|
|
2352
|
-
this.searchInput.focus();
|
|
2353
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_doFilter).call(this);
|
|
2354
|
-
}
|
|
2355
|
-
//* Check if a country list item element is visible within it's container (the country list), else scroll until it is.
|
|
2356
|
-
scrollCountryListToItem(element) {
|
|
2357
|
-
const container = this.countryList;
|
|
2358
|
-
const containerRect = container.getBoundingClientRect();
|
|
2359
|
-
const elementRect = element.getBoundingClientRect();
|
|
2360
|
-
const offsetTop = elementRect.top - containerRect.top + container.scrollTop;
|
|
2361
|
-
if (elementRect.top < containerRect.top) {
|
|
2362
|
-
container.scrollTop = offsetTop;
|
|
2363
|
-
} else if (elementRect.bottom > containerRect.bottom) {
|
|
2364
|
-
container.scrollTop = offsetTop - containerRect.height + elementRect.height;
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
//* Remove highlighting from the previous list item and highlight the new one.
|
|
2368
|
-
highlightListItem(listItem, shouldFocus) {
|
|
2369
|
-
const prevItem = this.highlightedItem;
|
|
2370
|
-
if (prevItem) {
|
|
2371
|
-
prevItem.classList.remove(CLASSES.HIGHLIGHT);
|
|
2372
|
-
}
|
|
2373
|
-
this.highlightedItem = listItem;
|
|
2374
|
-
if (this.highlightedItem) {
|
|
2375
|
-
this.highlightedItem.classList.add(CLASSES.HIGHLIGHT);
|
|
2376
|
-
if (__classPrivateFieldGet(this, _UI_options, "f").countrySearch) {
|
|
2377
|
-
const activeDescendant = this.highlightedItem.getAttribute("id") || "";
|
|
2378
|
-
this.searchInput.setAttribute(ARIA.ACTIVE_DESCENDANT, activeDescendant);
|
|
2379
|
-
}
|
|
2380
|
-
if (shouldFocus) {
|
|
2381
|
-
this.highlightedItem.focus();
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
//* Highlight the next/prev item in the list (and ensure it is visible).
|
|
2386
|
-
handleUpDownKey(key) {
|
|
2387
|
-
var _b, _c;
|
|
2388
|
-
let next = key === KEYS.ARROW_UP ? (_b = this.highlightedItem) === null || _b === void 0 ? void 0 : _b.previousElementSibling : (_c = this.highlightedItem) === null || _c === void 0 ? void 0 : _c.nextElementSibling;
|
|
2389
|
-
if (!next && this.countryList.childElementCount > 1) {
|
|
2390
|
-
next = key === KEYS.ARROW_UP ? this.countryList.lastElementChild : this.countryList.firstElementChild;
|
|
2391
|
-
}
|
|
2392
|
-
if (next) {
|
|
2393
|
-
this.scrollCountryListToItem(next);
|
|
2394
|
-
this.highlightListItem(next, false);
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
|
-
destroy() {
|
|
2398
|
-
this.telInput.iti = void 0;
|
|
2399
|
-
delete this.telInput.dataset.intlTelInputId;
|
|
2400
|
-
if (__classPrivateFieldGet(this, _UI_options, "f").separateDialCode) {
|
|
2401
|
-
this.telInput.style.paddingLeft = __classPrivateFieldGet(this, _UI_originalPaddingLeft, "f");
|
|
2402
|
-
}
|
|
2403
|
-
const wrapper = this.telInput.parentNode;
|
|
2404
|
-
wrapper.before(this.telInput);
|
|
2405
|
-
wrapper.remove();
|
|
2406
|
-
this.telInput = null;
|
|
2407
|
-
this.countryContainer = null;
|
|
2408
|
-
this.selectedCountry = null;
|
|
2409
|
-
this.selectedCountryInner = null;
|
|
2410
|
-
this.searchInput = null;
|
|
2411
|
-
this.searchClearButton = null;
|
|
2412
|
-
this.countryList = null;
|
|
2413
|
-
this.hiddenInput = null;
|
|
2414
|
-
this.hiddenInputCountry = null;
|
|
2415
|
-
this.highlightedItem = null;
|
|
2416
|
-
__classPrivateFieldSet(this, _UI_selectedDialCode, null, "f");
|
|
2417
|
-
__classPrivateFieldSet(this, _UI_dropdownArrow, null, "f");
|
|
2418
|
-
__classPrivateFieldSet(this, _UI_dropdownContent, null, "f");
|
|
2419
|
-
__classPrivateFieldSet(this, _UI_searchIcon, null, "f");
|
|
2420
|
-
__classPrivateFieldSet(this, _UI_searchNoResults, null, "f");
|
|
2421
|
-
__classPrivateFieldSet(this, _UI_searchResultsA11yText, null, "f");
|
|
2422
|
-
__classPrivateFieldSet(this, _UI_dropdownForContainer, null, "f");
|
|
2423
|
-
__classPrivateFieldSet(this, _UI_selectedItem, null, "f");
|
|
2424
|
-
for (const c of __classPrivateFieldGet(this, _UI_countries, "f")) {
|
|
2425
|
-
delete c.nodeById[__classPrivateFieldGet(this, _UI_id, "f")];
|
|
2426
|
-
}
|
|
2427
|
-
__classPrivateFieldSet(this, _UI_countries, null, "f");
|
|
2428
|
-
}
|
|
2429
|
-
// UI: Open the dropdown (DOM only).
|
|
2430
|
-
openDropdown() {
|
|
2431
|
-
const { countrySearch, dropdownAlwaysOpen, dropdownContainer } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2432
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_maybeEnsureDropdownWidthSet).call(this);
|
|
2433
|
-
if (dropdownContainer) {
|
|
2434
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_handleDropdownContainer).call(this);
|
|
2435
|
-
} else {
|
|
2436
|
-
const positionBelow = __classPrivateFieldGet(this, _UI_instances, "m", _UI_shouldPositionInlineDropdownBelowInput).call(this);
|
|
2437
|
-
const distance = this.telInput.offsetHeight + LAYOUT.DROPDOWN_MARGIN;
|
|
2438
|
-
if (positionBelow) {
|
|
2439
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.top = `${distance}px`;
|
|
2440
|
-
} else {
|
|
2441
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.bottom = `${distance}px`;
|
|
2442
|
-
}
|
|
2443
|
-
}
|
|
2444
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").classList.remove(CLASSES.HIDE);
|
|
2445
|
-
this.selectedCountry.setAttribute(ARIA.EXPANDED, "true");
|
|
2446
|
-
if (countrySearch) {
|
|
2447
|
-
const firstCountryItem = this.countryList.firstElementChild;
|
|
2448
|
-
if (firstCountryItem) {
|
|
2449
|
-
this.highlightListItem(firstCountryItem, false);
|
|
2450
|
-
this.countryList.scrollTop = 0;
|
|
2451
|
-
}
|
|
2452
|
-
if (!dropdownAlwaysOpen) {
|
|
2453
|
-
this.searchInput.focus();
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
__classPrivateFieldGet(this, _UI_dropdownArrow, "f").classList.add(CLASSES.ARROW_UP);
|
|
2457
|
-
}
|
|
2458
|
-
// UI: Close the dropdown (DOM only).
|
|
2459
|
-
closeDropdown() {
|
|
2460
|
-
const { countrySearch, dropdownContainer } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2461
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").classList.add(CLASSES.HIDE);
|
|
2462
|
-
this.selectedCountry.setAttribute(ARIA.EXPANDED, "false");
|
|
2463
|
-
if (countrySearch) {
|
|
2464
|
-
this.searchInput.removeAttribute(ARIA.ACTIVE_DESCENDANT);
|
|
2465
|
-
if (this.highlightedItem) {
|
|
2466
|
-
this.highlightedItem.classList.remove(CLASSES.HIGHLIGHT);
|
|
2467
|
-
this.highlightedItem = null;
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
__classPrivateFieldGet(this, _UI_dropdownArrow, "f").classList.remove(CLASSES.ARROW_UP);
|
|
2471
|
-
if (dropdownContainer) {
|
|
2472
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").remove();
|
|
2473
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.top = "";
|
|
2474
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.bottom = "";
|
|
2475
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.paddingLeft = "";
|
|
2476
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.paddingRight = "";
|
|
2477
|
-
} else {
|
|
2478
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.top = "";
|
|
2479
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.bottom = "";
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
// UI: Whether the dropdown is currently closed (hidden).
|
|
2483
|
-
isDropdownClosed() {
|
|
2484
|
-
return __classPrivateFieldGet(this, _UI_dropdownContent, "f").classList.contains(CLASSES.HIDE);
|
|
2485
|
-
}
|
|
2486
|
-
setCountry(selectedCountryData) {
|
|
2487
|
-
const { allowDropdown, showFlags, separateDialCode, i18n } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2488
|
-
const { name, dialCode, iso2 = "" } = selectedCountryData;
|
|
2489
|
-
if (allowDropdown) {
|
|
2490
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_updateSelectedItem).call(this, iso2);
|
|
2491
|
-
}
|
|
2492
|
-
if (this.selectedCountry) {
|
|
2493
|
-
const flagClass = iso2 && showFlags ? `${CLASSES.FLAG} iti__${iso2}` : `${CLASSES.FLAG} ${CLASSES.GLOBE}`;
|
|
2494
|
-
let ariaLabel, title, selectedCountryInner;
|
|
2495
|
-
if (iso2) {
|
|
2496
|
-
title = name;
|
|
2497
|
-
ariaLabel = i18n.selectedCountryAriaLabel.replace("${countryName}", name).replace("${dialCode}", `+${dialCode}`);
|
|
2498
|
-
selectedCountryInner = showFlags ? "" : buildGlobeIcon();
|
|
2499
|
-
} else {
|
|
2500
|
-
title = i18n.noCountrySelected;
|
|
2501
|
-
ariaLabel = i18n.noCountrySelected;
|
|
2502
|
-
selectedCountryInner = buildGlobeIcon();
|
|
2503
|
-
}
|
|
2504
|
-
this.selectedCountryInner.className = flagClass;
|
|
2505
|
-
this.selectedCountry.setAttribute("title", title);
|
|
2506
|
-
this.selectedCountry.setAttribute(ARIA.LABEL, ariaLabel);
|
|
2507
|
-
this.selectedCountryInner.innerHTML = selectedCountryInner;
|
|
2508
|
-
}
|
|
2509
|
-
if (separateDialCode) {
|
|
2510
|
-
const fullDialCode = dialCode ? `+${dialCode}` : "";
|
|
2511
|
-
__classPrivateFieldGet(this, _UI_selectedDialCode, "f").textContent = fullDialCode;
|
|
2512
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_updateInputPadding).call(this);
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
};
|
|
2516
|
-
_a = UI, _UI_options = /* @__PURE__ */ new WeakMap(), _UI_id = /* @__PURE__ */ new WeakMap(), _UI_isRTL = /* @__PURE__ */ new WeakMap(), _UI_originalPaddingLeft = /* @__PURE__ */ new WeakMap(), _UI_countries = /* @__PURE__ */ new WeakMap(), _UI_searchKeyupTimer = /* @__PURE__ */ new WeakMap(), _UI_inlineDropdownHeight = /* @__PURE__ */ new WeakMap(), _UI_selectedDialCode = /* @__PURE__ */ new WeakMap(), _UI_dropdownArrow = /* @__PURE__ */ new WeakMap(), _UI_dropdownContent = /* @__PURE__ */ new WeakMap(), _UI_searchIcon = /* @__PURE__ */ new WeakMap(), _UI_searchNoResults = /* @__PURE__ */ new WeakMap(), _UI_searchResultsA11yText = /* @__PURE__ */ new WeakMap(), _UI_dropdownForContainer = /* @__PURE__ */ new WeakMap(), _UI_selectedItem = /* @__PURE__ */ new WeakMap(), _UI_instances = /* @__PURE__ */ new WeakSet(), _UI_createWrapperAndInsert = function _UI_createWrapperAndInsert2() {
|
|
2517
|
-
const { allowDropdown, showFlags, containerClass, useFullscreenPopup } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2518
|
-
const parentClasses = buildClassNames({
|
|
2519
|
-
iti: true,
|
|
2520
|
-
"iti--allow-dropdown": allowDropdown,
|
|
2521
|
-
"iti--show-flags": showFlags,
|
|
2522
|
-
"iti--inline-dropdown": !useFullscreenPopup,
|
|
2523
|
-
[containerClass]: Boolean(containerClass)
|
|
2524
|
-
});
|
|
2525
|
-
const wrapper = createEl("div", { class: parentClasses });
|
|
2526
|
-
if (__classPrivateFieldGet(this, _UI_isRTL, "f")) {
|
|
2527
|
-
wrapper.setAttribute("dir", "ltr");
|
|
2528
|
-
}
|
|
2529
|
-
this.telInput.before(wrapper);
|
|
2530
|
-
return wrapper;
|
|
2531
|
-
}, _UI_maybeBuildCountryContainer = function _UI_maybeBuildCountryContainer2(wrapper) {
|
|
2532
|
-
const { allowDropdown, separateDialCode, showFlags } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2533
|
-
if (allowDropdown || showFlags || separateDialCode) {
|
|
2534
|
-
this.countryContainer = createEl(
|
|
2535
|
-
"div",
|
|
2536
|
-
// visibly hidden until we measure it's width to set the input padding correctly
|
|
2537
|
-
{ class: `iti__country-container ${CLASSES.V_HIDE}` },
|
|
2538
|
-
wrapper
|
|
2539
|
-
);
|
|
2540
|
-
if (allowDropdown) {
|
|
2541
|
-
this.selectedCountry = createEl("button", {
|
|
2542
|
-
type: "button",
|
|
2543
|
-
class: "iti__selected-country",
|
|
2544
|
-
[ARIA.EXPANDED]: "false",
|
|
2545
|
-
[ARIA.LABEL]: __classPrivateFieldGet(this, _UI_options, "f").i18n.noCountrySelected,
|
|
2546
|
-
[ARIA.HASPOPUP]: "dialog",
|
|
2547
|
-
[ARIA.CONTROLS]: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__dropdown-content`
|
|
2548
|
-
}, this.countryContainer);
|
|
2549
|
-
if (this.telInput.disabled) {
|
|
2550
|
-
this.selectedCountry.setAttribute("disabled", "true");
|
|
2551
|
-
}
|
|
2552
|
-
} else {
|
|
2553
|
-
this.selectedCountry = createEl("div", { class: "iti__selected-country" }, this.countryContainer);
|
|
2554
|
-
}
|
|
2555
|
-
const selectedCountryPrimary = createEl("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
|
|
2556
|
-
this.selectedCountryInner = createEl("div", { class: CLASSES.FLAG }, selectedCountryPrimary);
|
|
2557
|
-
if (allowDropdown) {
|
|
2558
|
-
__classPrivateFieldSet(this, _UI_dropdownArrow, createEl("div", { class: "iti__arrow", [ARIA.HIDDEN]: "true" }, selectedCountryPrimary), "f");
|
|
2559
|
-
}
|
|
2560
|
-
if (separateDialCode) {
|
|
2561
|
-
__classPrivateFieldSet(this, _UI_selectedDialCode, createEl("div", { class: "iti__selected-dial-code" }, this.selectedCountry), "f");
|
|
2562
|
-
}
|
|
2563
|
-
if (allowDropdown) {
|
|
2564
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_buildDropdownContent).call(this);
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
}, _UI_maybeEnsureDropdownWidthSet = function _UI_maybeEnsureDropdownWidthSet2() {
|
|
2568
|
-
const { fixDropdownWidth } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2569
|
-
if (fixDropdownWidth && !__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.width) {
|
|
2570
|
-
const inputWidth = this.telInput.offsetWidth;
|
|
2571
|
-
if (inputWidth > 0) {
|
|
2572
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.width = `${inputWidth}px`;
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
}, _UI_buildDropdownContent = function _UI_buildDropdownContent2() {
|
|
2576
|
-
const { fixDropdownWidth, useFullscreenPopup, countrySearch, i18n, dropdownContainer, containerClass } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2577
|
-
const extraClasses = fixDropdownWidth ? "" : "iti--flexible-dropdown-width";
|
|
2578
|
-
__classPrivateFieldSet(this, _UI_dropdownContent, createEl("div", {
|
|
2579
|
-
id: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__dropdown-content`,
|
|
2580
|
-
class: `iti__dropdown-content ${CLASSES.HIDE} ${extraClasses}`,
|
|
2581
|
-
role: "dialog",
|
|
2582
|
-
[ARIA.MODAL]: "true"
|
|
2583
|
-
}), "f");
|
|
2584
|
-
if (__classPrivateFieldGet(this, _UI_isRTL, "f")) {
|
|
2585
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").setAttribute("dir", "rtl");
|
|
2586
|
-
}
|
|
2587
|
-
if (countrySearch) {
|
|
2588
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_buildSearchUI).call(this);
|
|
2589
|
-
}
|
|
2590
|
-
this.countryList = createEl("ul", {
|
|
2591
|
-
class: "iti__country-list",
|
|
2592
|
-
id: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__country-listbox`,
|
|
2593
|
-
role: "listbox",
|
|
2594
|
-
[ARIA.LABEL]: i18n.countryListAriaLabel
|
|
2595
|
-
}, __classPrivateFieldGet(this, _UI_dropdownContent, "f"));
|
|
2596
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_appendListItems).call(this);
|
|
2597
|
-
if (countrySearch) {
|
|
2598
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_updateSearchResultsA11yText).call(this);
|
|
2599
|
-
}
|
|
2600
|
-
if (!useFullscreenPopup) {
|
|
2601
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_maybeEnsureDropdownWidthSet).call(this);
|
|
2602
|
-
__classPrivateFieldSet(this, _UI_inlineDropdownHeight, __classPrivateFieldGet(this, _UI_instances, "m", _UI_getHiddenInlineDropdownHeight).call(this), "f");
|
|
2603
|
-
if (countrySearch) {
|
|
2604
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").style.height = `${__classPrivateFieldGet(this, _UI_inlineDropdownHeight, "f")}px`;
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
if (dropdownContainer) {
|
|
2608
|
-
const dropdownClasses = buildClassNames({
|
|
2609
|
-
iti: true,
|
|
2610
|
-
"iti--container": true,
|
|
2611
|
-
"iti--fullscreen-popup": useFullscreenPopup,
|
|
2612
|
-
"iti--inline-dropdown": !useFullscreenPopup,
|
|
2613
|
-
[containerClass]: Boolean(containerClass)
|
|
2614
|
-
});
|
|
2615
|
-
__classPrivateFieldSet(this, _UI_dropdownForContainer, createEl("div", { class: dropdownClasses }), "f");
|
|
2616
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").appendChild(__classPrivateFieldGet(this, _UI_dropdownContent, "f"));
|
|
2617
|
-
} else {
|
|
2618
|
-
this.countryContainer.appendChild(__classPrivateFieldGet(this, _UI_dropdownContent, "f"));
|
|
2619
|
-
}
|
|
2620
|
-
}, _UI_buildSearchUI = function _UI_buildSearchUI2() {
|
|
2621
|
-
const { i18n, searchInputClass } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2622
|
-
const searchWrapper = createEl("div", { class: "iti__search-input-wrapper" }, __classPrivateFieldGet(this, _UI_dropdownContent, "f"));
|
|
2623
|
-
__classPrivateFieldSet(this, _UI_searchIcon, createEl("span", {
|
|
2624
|
-
class: "iti__search-icon",
|
|
2625
|
-
[ARIA.HIDDEN]: "true"
|
|
2626
|
-
}, searchWrapper), "f");
|
|
2627
|
-
__classPrivateFieldGet(this, _UI_searchIcon, "f").innerHTML = buildSearchIcon();
|
|
2628
|
-
this.searchInput = createEl("input", {
|
|
2629
|
-
id: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__search-input`,
|
|
2630
|
-
// Chrome says inputs need either a name or an id
|
|
2631
|
-
type: "search",
|
|
2632
|
-
class: `iti__search-input ${searchInputClass}`,
|
|
2633
|
-
placeholder: i18n.searchPlaceholder,
|
|
2634
|
-
// 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
|
|
2635
|
-
role: "combobox",
|
|
2636
|
-
[ARIA.EXPANDED]: "true",
|
|
2637
|
-
[ARIA.LABEL]: i18n.searchPlaceholder,
|
|
2638
|
-
[ARIA.CONTROLS]: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__country-listbox`,
|
|
2639
|
-
[ARIA.AUTOCOMPLETE]: "list",
|
|
2640
|
-
autocomplete: "off"
|
|
2641
|
-
}, searchWrapper);
|
|
2642
|
-
this.searchClearButton = createEl("button", {
|
|
2643
|
-
type: "button",
|
|
2644
|
-
class: `iti__search-clear ${CLASSES.HIDE}`,
|
|
2645
|
-
[ARIA.LABEL]: i18n.clearSearchAriaLabel,
|
|
2646
|
-
tabindex: "-1"
|
|
2647
|
-
}, searchWrapper);
|
|
2648
|
-
this.searchClearButton.innerHTML = buildClearIcon(__classPrivateFieldGet(this, _UI_id, "f"));
|
|
2649
|
-
__classPrivateFieldSet(this, _UI_searchResultsA11yText, createEl("span", { class: "iti__a11y-text" }, __classPrivateFieldGet(this, _UI_dropdownContent, "f")), "f");
|
|
2650
|
-
__classPrivateFieldSet(this, _UI_searchNoResults, createEl("div", {
|
|
2651
|
-
class: `iti__no-results ${CLASSES.HIDE}`,
|
|
2652
|
-
[ARIA.HIDDEN]: "true"
|
|
2653
|
-
// all a11y messaging happens in this.#searchResultsA11yText
|
|
2654
|
-
}, __classPrivateFieldGet(this, _UI_dropdownContent, "f")), "f");
|
|
2655
|
-
__classPrivateFieldGet(this, _UI_searchNoResults, "f").textContent = i18n.searchEmptyState;
|
|
2656
|
-
}, _UI_maybeUpdateInputPaddingAndReveal = function _UI_maybeUpdateInputPaddingAndReveal2() {
|
|
2657
|
-
if (this.countryContainer) {
|
|
2658
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_updateInputPadding).call(this);
|
|
2659
|
-
this.countryContainer.classList.remove(CLASSES.V_HIDE);
|
|
2660
|
-
}
|
|
2661
|
-
}, _UI_maybeBuildHiddenInputs = function _UI_maybeBuildHiddenInputs2(wrapper) {
|
|
2662
|
-
var _b, _c;
|
|
2663
|
-
const { hiddenInput } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2664
|
-
if (hiddenInput) {
|
|
2665
|
-
const telInputName = this.telInput.getAttribute("name") || "";
|
|
2666
|
-
const names = hiddenInput(telInputName);
|
|
2667
|
-
if (names.phone) {
|
|
2668
|
-
const existingInput = (_b = this.telInput.form) === null || _b === void 0 ? void 0 : _b.querySelector(`input[name="${names.phone}"]`);
|
|
2669
|
-
if (existingInput) {
|
|
2670
|
-
this.hiddenInput = existingInput;
|
|
2671
|
-
} else {
|
|
2672
|
-
this.hiddenInput = createEl("input", {
|
|
2673
|
-
type: "hidden",
|
|
2674
|
-
name: names.phone
|
|
2675
|
-
});
|
|
2676
|
-
wrapper.appendChild(this.hiddenInput);
|
|
2677
|
-
}
|
|
2678
|
-
}
|
|
2679
|
-
if (names.country) {
|
|
2680
|
-
const existingInput = (_c = this.telInput.form) === null || _c === void 0 ? void 0 : _c.querySelector(`input[name="${names.country}"]`);
|
|
2681
|
-
if (existingInput) {
|
|
2682
|
-
this.hiddenInputCountry = existingInput;
|
|
2683
|
-
} else {
|
|
2684
|
-
this.hiddenInputCountry = createEl("input", {
|
|
2685
|
-
type: "hidden",
|
|
2686
|
-
name: names.country
|
|
2687
|
-
});
|
|
2688
|
-
wrapper.appendChild(this.hiddenInputCountry);
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
}
|
|
2692
|
-
}, _UI_appendListItems = function _UI_appendListItems2() {
|
|
2693
|
-
const frag = document.createDocumentFragment();
|
|
2694
|
-
for (let i = 0; i < __classPrivateFieldGet(this, _UI_countries, "f").length; i++) {
|
|
2695
|
-
const c = __classPrivateFieldGet(this, _UI_countries, "f")[i];
|
|
2696
|
-
const liClass = buildClassNames({
|
|
2697
|
-
[CLASSES.COUNTRY_ITEM]: true
|
|
2698
|
-
});
|
|
2699
|
-
const listItem = createEl("li", {
|
|
2700
|
-
id: `iti-${__classPrivateFieldGet(this, _UI_id, "f")}__item-${c.iso2}`,
|
|
2701
|
-
class: liClass,
|
|
2702
|
-
tabindex: "-1",
|
|
2703
|
-
role: "option",
|
|
2704
|
-
[ARIA.SELECTED]: "false"
|
|
2705
|
-
});
|
|
2706
|
-
listItem.dataset.dialCode = c.dialCode;
|
|
2707
|
-
listItem.dataset.countryCode = c.iso2;
|
|
2708
|
-
c.nodeById[__classPrivateFieldGet(this, _UI_id, "f")] = listItem;
|
|
2709
|
-
if (__classPrivateFieldGet(this, _UI_options, "f").showFlags) {
|
|
2710
|
-
createEl("div", { class: `${CLASSES.FLAG} iti__${c.iso2}` }, listItem);
|
|
2711
|
-
}
|
|
2712
|
-
const nameEl = createEl("span", { class: "iti__country-name" }, listItem);
|
|
2713
|
-
nameEl.textContent = `${c.name} `;
|
|
2714
|
-
const dialEl = createEl("span", { class: "iti__dial-code" }, nameEl);
|
|
2715
|
-
if (__classPrivateFieldGet(this, _UI_isRTL, "f")) {
|
|
2716
|
-
dialEl.setAttribute("dir", "ltr");
|
|
2717
|
-
}
|
|
2718
|
-
dialEl.textContent = `(+${c.dialCode})`;
|
|
2719
|
-
frag.appendChild(listItem);
|
|
2720
|
-
}
|
|
2721
|
-
this.countryList.appendChild(frag);
|
|
2722
|
-
}, _UI_updateInputPadding = function _UI_updateInputPadding2() {
|
|
2723
|
-
if (this.selectedCountry) {
|
|
2724
|
-
const fallbackWidth = __classPrivateFieldGet(this, _UI_options, "f").separateDialCode ? LAYOUT.SANE_SELECTED_WITH_DIAL_WIDTH : LAYOUT.SANE_SELECTED_NO_DIAL_WIDTH;
|
|
2725
|
-
const selectedCountryWidth = this.selectedCountry.offsetWidth || __classPrivateFieldGet(this, _UI_instances, "m", _UI_getHiddenSelectedCountryWidth).call(this) || fallbackWidth;
|
|
2726
|
-
const inputPadding = selectedCountryWidth + LAYOUT.INPUT_PADDING_EXTRA_LEFT;
|
|
2727
|
-
this.telInput.style.paddingLeft = `${inputPadding}px`;
|
|
2728
|
-
}
|
|
2729
|
-
}, _UI_getBody = function _UI_getBody2() {
|
|
2730
|
-
let body;
|
|
2731
|
-
try {
|
|
2732
|
-
body = window.top.document.body;
|
|
2733
|
-
} catch (e) {
|
|
2734
|
-
body = document.body;
|
|
2735
|
-
}
|
|
2736
|
-
return body;
|
|
2737
|
-
}, _UI_getHiddenSelectedCountryWidth = function _UI_getHiddenSelectedCountryWidth2() {
|
|
2738
|
-
if (this.telInput.parentNode) {
|
|
2739
|
-
const body = __classPrivateFieldGet(_a, _a, "m", _UI_getBody).call(_a);
|
|
2740
|
-
const containerClone = this.telInput.parentNode.cloneNode(false);
|
|
2741
|
-
containerClone.style.visibility = "hidden";
|
|
2742
|
-
body.appendChild(containerClone);
|
|
2743
|
-
const countryContainerClone = this.countryContainer.cloneNode();
|
|
2744
|
-
containerClone.appendChild(countryContainerClone);
|
|
2745
|
-
const selectedCountryClone = this.selectedCountry.cloneNode(true);
|
|
2746
|
-
countryContainerClone.appendChild(selectedCountryClone);
|
|
2747
|
-
const width = selectedCountryClone.offsetWidth;
|
|
2748
|
-
body.removeChild(containerClone);
|
|
2749
|
-
return width;
|
|
2750
|
-
}
|
|
2751
|
-
return 0;
|
|
2752
|
-
}, _UI_getHiddenInlineDropdownHeight = function _UI_getHiddenInlineDropdownHeight2() {
|
|
2753
|
-
const body = __classPrivateFieldGet(_a, _a, "m", _UI_getBody).call(_a);
|
|
2754
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").classList.remove(CLASSES.HIDE);
|
|
2755
|
-
const tempContainer = createEl("div", { class: "iti iti--inline-dropdown" });
|
|
2756
|
-
tempContainer.appendChild(__classPrivateFieldGet(this, _UI_dropdownContent, "f"));
|
|
2757
|
-
tempContainer.style.visibility = "hidden";
|
|
2758
|
-
body.appendChild(tempContainer);
|
|
2759
|
-
const height = __classPrivateFieldGet(this, _UI_dropdownContent, "f").offsetHeight;
|
|
2760
|
-
body.removeChild(tempContainer);
|
|
2761
|
-
tempContainer.style.visibility = "";
|
|
2762
|
-
__classPrivateFieldGet(this, _UI_dropdownContent, "f").classList.add(CLASSES.HIDE);
|
|
2763
|
-
return height > 0 ? height : LAYOUT.SANE_DROPDOWN_HEIGHT;
|
|
2764
|
-
}, _UI_updateSearchResultsA11yText = function _UI_updateSearchResultsA11yText2() {
|
|
2765
|
-
const { i18n } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2766
|
-
const count = this.countryList.childElementCount;
|
|
2767
|
-
__classPrivateFieldGet(this, _UI_searchResultsA11yText, "f").textContent = i18n.searchSummaryAria(count);
|
|
2768
|
-
}, _UI_doFilter = function _UI_doFilter2() {
|
|
2769
|
-
const inputQuery = this.searchInput.value.trim();
|
|
2770
|
-
this.filterCountriesByQuery(inputQuery);
|
|
2771
|
-
if (this.searchInput.value) {
|
|
2772
|
-
this.searchClearButton.classList.remove(CLASSES.HIDE);
|
|
2773
|
-
} else {
|
|
2774
|
-
this.searchClearButton.classList.add(CLASSES.HIDE);
|
|
2775
|
-
}
|
|
2776
|
-
}, _UI_updateSelectedItem = function _UI_updateSelectedItem2(iso2) {
|
|
2777
|
-
var _b;
|
|
2778
|
-
if (__classPrivateFieldGet(this, _UI_selectedItem, "f") && __classPrivateFieldGet(this, _UI_selectedItem, "f").dataset.countryCode !== iso2) {
|
|
2779
|
-
__classPrivateFieldGet(this, _UI_selectedItem, "f").setAttribute(ARIA.SELECTED, "false");
|
|
2780
|
-
(_b = __classPrivateFieldGet(this, _UI_selectedItem, "f").querySelector(".iti__country-check")) === null || _b === void 0 ? void 0 : _b.remove();
|
|
2781
|
-
__classPrivateFieldSet(this, _UI_selectedItem, null, "f");
|
|
2782
|
-
}
|
|
2783
|
-
if (iso2 && !__classPrivateFieldGet(this, _UI_selectedItem, "f")) {
|
|
2784
|
-
const newListItem = this.countryList.querySelector(`[data-country-code="${iso2}"]`);
|
|
2785
|
-
if (newListItem) {
|
|
2786
|
-
newListItem.setAttribute(ARIA.SELECTED, "true");
|
|
2787
|
-
const checkIcon = createEl("span", { class: "iti__country-check", [ARIA.HIDDEN]: "true" }, newListItem);
|
|
2788
|
-
checkIcon.innerHTML = buildCheckIcon();
|
|
2789
|
-
__classPrivateFieldSet(this, _UI_selectedItem, newListItem, "f");
|
|
2790
|
-
}
|
|
2791
|
-
}
|
|
2792
|
-
}, _UI_filterCountries = function _UI_filterCountries2(matchedCountries) {
|
|
2793
|
-
this.countryList.replaceChildren();
|
|
2794
|
-
let noCountriesAddedYet = true;
|
|
2795
|
-
for (const c of matchedCountries) {
|
|
2796
|
-
const listItem = c.nodeById[__classPrivateFieldGet(this, _UI_id, "f")];
|
|
2797
|
-
if (listItem) {
|
|
2798
|
-
this.countryList.appendChild(listItem);
|
|
2799
|
-
if (noCountriesAddedYet) {
|
|
2800
|
-
this.highlightListItem(listItem, false);
|
|
2801
|
-
noCountriesAddedYet = false;
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
}
|
|
2805
|
-
if (noCountriesAddedYet) {
|
|
2806
|
-
this.highlightListItem(null, false);
|
|
2807
|
-
if (__classPrivateFieldGet(this, _UI_searchNoResults, "f")) {
|
|
2808
|
-
__classPrivateFieldGet(this, _UI_searchNoResults, "f").classList.remove(CLASSES.HIDE);
|
|
2809
|
-
}
|
|
2810
|
-
} else if (__classPrivateFieldGet(this, _UI_searchNoResults, "f")) {
|
|
2811
|
-
__classPrivateFieldGet(this, _UI_searchNoResults, "f").classList.add(CLASSES.HIDE);
|
|
2812
|
-
}
|
|
2813
|
-
this.countryList.scrollTop = 0;
|
|
2814
|
-
__classPrivateFieldGet(this, _UI_instances, "m", _UI_updateSearchResultsA11yText).call(this);
|
|
2815
|
-
}, _UI_shouldPositionInlineDropdownBelowInput = function _UI_shouldPositionInlineDropdownBelowInput2() {
|
|
2816
|
-
if (__classPrivateFieldGet(this, _UI_options, "f").dropdownAlwaysOpen) {
|
|
2817
|
-
return true;
|
|
2818
|
-
}
|
|
2819
|
-
const inputPos = this.telInput.getBoundingClientRect();
|
|
2820
|
-
const spaceAbove = inputPos.top;
|
|
2821
|
-
const spaceBelow = window.innerHeight - inputPos.bottom;
|
|
2822
|
-
return spaceBelow >= __classPrivateFieldGet(this, _UI_inlineDropdownHeight, "f") || spaceBelow >= spaceAbove;
|
|
2823
|
-
}, _UI_handleDropdownContainer = function _UI_handleDropdownContainer2() {
|
|
2824
|
-
const { dropdownContainer, useFullscreenPopup } = __classPrivateFieldGet(this, _UI_options, "f");
|
|
2825
|
-
if (useFullscreenPopup) {
|
|
2826
|
-
if (window.innerWidth >= LAYOUT.NARROW_VIEWPORT_WIDTH) {
|
|
2827
|
-
const inputPos = this.telInput.getBoundingClientRect();
|
|
2828
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.paddingLeft = `${inputPos.left}px`;
|
|
2829
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.paddingRight = `${window.innerWidth - inputPos.right}px`;
|
|
2830
|
-
}
|
|
2831
|
-
} else {
|
|
2832
|
-
const inputPos = this.telInput.getBoundingClientRect();
|
|
2833
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.left = `${inputPos.left}px`;
|
|
2834
|
-
const positionBelow = __classPrivateFieldGet(this, _UI_instances, "m", _UI_shouldPositionInlineDropdownBelowInput).call(this);
|
|
2835
|
-
if (positionBelow) {
|
|
2836
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.top = `${inputPos.bottom + LAYOUT.DROPDOWN_MARGIN}px`;
|
|
2837
|
-
} else {
|
|
2838
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.top = "unset";
|
|
2839
|
-
__classPrivateFieldGet(this, _UI_dropdownForContainer, "f").style.bottom = `${window.innerHeight - inputPos.top + LAYOUT.DROPDOWN_MARGIN}px`;
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
dropdownContainer.appendChild(__classPrivateFieldGet(this, _UI_dropdownForContainer, "f"));
|
|
2843
|
-
};
|
|
2844
|
-
var ui_default = UI;
|
|
2845
|
-
|
|
2846
|
-
// angular/build/temp/modules/data/country-data.js
|
|
2847
|
-
var processAllCountries = (options) => {
|
|
2848
|
-
const { onlyCountries, excludeCountries } = options;
|
|
2849
|
-
if (onlyCountries === null || onlyCountries === void 0 ? void 0 : onlyCountries.length) {
|
|
2850
|
-
return data_default.filter((country) => onlyCountries.includes(country.iso2));
|
|
2851
|
-
} else if (excludeCountries === null || excludeCountries === void 0 ? void 0 : excludeCountries.length) {
|
|
2852
|
-
return data_default.filter((country) => !excludeCountries.includes(country.iso2));
|
|
2853
|
-
}
|
|
2854
|
-
return data_default;
|
|
2855
|
-
};
|
|
2856
|
-
var generateCountryNames = (countries, options) => {
|
|
2857
|
-
const { countryNameLocale, i18n } = options;
|
|
2858
|
-
let displayNames;
|
|
2859
|
-
try {
|
|
2860
|
-
const hasDisplayNames = typeof Intl !== "undefined" && typeof Intl.DisplayNames === "function";
|
|
2861
|
-
if (hasDisplayNames) {
|
|
2862
|
-
displayNames = new Intl.DisplayNames(countryNameLocale, {
|
|
2863
|
-
type: "region"
|
|
2864
|
-
});
|
|
2865
|
-
} else {
|
|
2866
|
-
displayNames = null;
|
|
2867
|
-
}
|
|
2868
|
-
} catch (e) {
|
|
2869
|
-
console.error(e);
|
|
2870
|
-
displayNames = null;
|
|
2871
|
-
}
|
|
2872
|
-
for (const c of countries) {
|
|
2873
|
-
c.name = i18n[c.iso2] || (displayNames === null || displayNames === void 0 ? void 0 : displayNames.of(c.iso2.toUpperCase())) || "";
|
|
2874
|
-
}
|
|
2875
|
-
};
|
|
2876
|
-
var processDialCodes = (countries) => {
|
|
2877
|
-
const dialCodes = /* @__PURE__ */ new Set();
|
|
2878
|
-
let dialCodeMaxLen = 0;
|
|
2879
|
-
const dialCodeToIso2Map = {};
|
|
2880
|
-
const addToDialCodeMap = (iso2, dialCode) => {
|
|
2881
|
-
if (!iso2 || !dialCode) {
|
|
2882
|
-
return;
|
|
2883
|
-
}
|
|
2884
|
-
if (dialCode.length > dialCodeMaxLen) {
|
|
2885
|
-
dialCodeMaxLen = dialCode.length;
|
|
2886
|
-
}
|
|
2887
|
-
if (!dialCodeToIso2Map.hasOwnProperty(dialCode)) {
|
|
2888
|
-
dialCodeToIso2Map[dialCode] = [];
|
|
2889
|
-
}
|
|
2890
|
-
const iso2List = dialCodeToIso2Map[dialCode];
|
|
2891
|
-
if (iso2List.includes(iso2)) {
|
|
2892
|
-
return;
|
|
2893
|
-
}
|
|
2894
|
-
iso2List.push(iso2);
|
|
2895
|
-
};
|
|
2896
|
-
const countriesSortedByPriority = [...countries].sort((a, b) => a.priority - b.priority);
|
|
2897
|
-
for (const c of countriesSortedByPriority) {
|
|
2898
|
-
if (!dialCodes.has(c.dialCode)) {
|
|
2899
|
-
dialCodes.add(c.dialCode);
|
|
2900
|
-
}
|
|
2901
|
-
for (let k = 1; k < c.dialCode.length; k++) {
|
|
2902
|
-
const partialDialCode = c.dialCode.substring(0, k);
|
|
2903
|
-
addToDialCodeMap(c.iso2, partialDialCode);
|
|
2904
|
-
}
|
|
2905
|
-
addToDialCodeMap(c.iso2, c.dialCode);
|
|
2906
|
-
if (c.areaCodes) {
|
|
2907
|
-
const rootIso2Code = dialCodeToIso2Map[c.dialCode][0];
|
|
2908
|
-
for (const areaCode of c.areaCodes) {
|
|
2909
|
-
for (let k = 1; k < areaCode.length; k++) {
|
|
2910
|
-
const partialAreaCode = areaCode.substring(0, k);
|
|
2911
|
-
const partialDialCode = c.dialCode + partialAreaCode;
|
|
2912
|
-
addToDialCodeMap(rootIso2Code, partialDialCode);
|
|
2913
|
-
addToDialCodeMap(c.iso2, partialDialCode);
|
|
2914
|
-
}
|
|
2915
|
-
addToDialCodeMap(c.iso2, c.dialCode + areaCode);
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
return { dialCodes, dialCodeMaxLen, dialCodeToIso2Map };
|
|
2920
|
-
};
|
|
2921
|
-
var sortCountries = (countries, options) => {
|
|
2922
|
-
const { countryOrder } = options;
|
|
2923
|
-
countries.sort((a, b) => {
|
|
2924
|
-
if (countryOrder) {
|
|
2925
|
-
const aIndex = countryOrder.indexOf(a.iso2);
|
|
2926
|
-
const bIndex = countryOrder.indexOf(b.iso2);
|
|
2927
|
-
const aIndexExists = aIndex > -1;
|
|
2928
|
-
const bIndexExists = bIndex > -1;
|
|
2929
|
-
if (aIndexExists || bIndexExists) {
|
|
2930
|
-
if (aIndexExists && bIndexExists) {
|
|
2931
|
-
return aIndex - bIndex;
|
|
2932
|
-
}
|
|
2933
|
-
return aIndexExists ? -1 : 1;
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
return a.name.localeCompare(b.name);
|
|
2937
|
-
});
|
|
2938
|
-
};
|
|
2939
|
-
var cacheSearchTokens = (countries) => {
|
|
2940
|
-
for (const c of countries) {
|
|
2941
|
-
c.normalisedName = normaliseString(c.name);
|
|
2942
|
-
c.initials = c.normalisedName.split(/[^a-z]/).map((word) => word[0]).join("");
|
|
2943
|
-
c.dialCodePlus = `+${c.dialCode}`;
|
|
2944
|
-
}
|
|
2945
|
-
};
|
|
2946
|
-
|
|
2947
|
-
// angular/build/temp/modules/data/intl-regionless.js
|
|
2948
|
-
var REGIONLESS_DIAL_CODES = /* @__PURE__ */ new Set([
|
|
2949
|
-
"800",
|
|
2950
|
-
"808",
|
|
2951
|
-
"870",
|
|
2952
|
-
"881",
|
|
2953
|
-
"882",
|
|
2954
|
-
"883",
|
|
2955
|
-
"888",
|
|
2956
|
-
"979"
|
|
2957
|
-
]);
|
|
2958
|
-
var hasRegionlessDialCode = (number) => {
|
|
2959
|
-
const dialCode = getNumeric(number).slice(0, 3);
|
|
2960
|
-
return number.startsWith("+") && REGIONLESS_DIAL_CODES.has(dialCode);
|
|
2961
|
-
};
|
|
2962
|
-
|
|
2963
|
-
// angular/build/temp/modules/format/formatting.js
|
|
2964
|
-
var beforeSetNumber = (fullNumber, hasValidDialCode, separateDialCode, selectedCountryData) => {
|
|
2965
|
-
let number = fullNumber;
|
|
2966
|
-
if (separateDialCode) {
|
|
2967
|
-
if (hasValidDialCode) {
|
|
2968
|
-
const dialCode = `+${selectedCountryData.dialCode}`;
|
|
2969
|
-
const start = number[dialCode.length] === " " || number[dialCode.length] === "-" ? dialCode.length + 1 : dialCode.length;
|
|
2970
|
-
number = number.substring(start);
|
|
2971
|
-
}
|
|
2972
|
-
}
|
|
2973
|
-
return number;
|
|
2974
|
-
};
|
|
2975
|
-
var formatNumberAsYouType = (fullNumber, telInputValue, utils, selectedCountryData, separateDialCode) => {
|
|
2976
|
-
const result = utils ? utils.formatNumberAsYouType(fullNumber, selectedCountryData.iso2) : fullNumber;
|
|
2977
|
-
const { dialCode } = selectedCountryData;
|
|
2978
|
-
if (separateDialCode && telInputValue.charAt(0) !== "+" && result.includes(`+${dialCode}`)) {
|
|
2979
|
-
const afterDialCode = result.split(`+${dialCode}`)[1] || "";
|
|
2980
|
-
return afterDialCode.trim();
|
|
2981
|
-
}
|
|
2982
|
-
return result;
|
|
2983
|
-
};
|
|
2984
|
-
|
|
2985
|
-
// angular/build/temp/modules/format/caret.js
|
|
2986
|
-
var translateCursorPosition = (relevantChars, formattedValue, prevCaretPos, isDeleteForwards) => {
|
|
2987
|
-
if (prevCaretPos === 0 && !isDeleteForwards) {
|
|
2988
|
-
return 0;
|
|
2989
|
-
}
|
|
2990
|
-
let relevantCharCount = 0;
|
|
2991
|
-
for (let i = 0; i < formattedValue.length; i++) {
|
|
2992
|
-
if (/[+0-9]/.test(formattedValue[i])) {
|
|
2993
|
-
relevantCharCount++;
|
|
2994
|
-
}
|
|
2995
|
-
if (relevantCharCount === relevantChars && !isDeleteForwards) {
|
|
2996
|
-
return i + 1;
|
|
2997
|
-
}
|
|
2998
|
-
if (isDeleteForwards && relevantCharCount === relevantChars + 1) {
|
|
2999
|
-
return i;
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
return formattedValue.length;
|
|
3003
|
-
};
|
|
3004
|
-
|
|
3005
|
-
// angular/build/temp/modules/data/nanp-regionless.js
|
|
3006
|
-
var regionlessNanpNumbers = /* @__PURE__ */ new Set([
|
|
3007
|
-
"800",
|
|
3008
|
-
"822",
|
|
3009
|
-
"833",
|
|
3010
|
-
"844",
|
|
3011
|
-
"855",
|
|
3012
|
-
"866",
|
|
3013
|
-
"877",
|
|
3014
|
-
"880",
|
|
3015
|
-
"881",
|
|
3016
|
-
"882",
|
|
3017
|
-
"883",
|
|
3018
|
-
"884",
|
|
3019
|
-
"885",
|
|
3020
|
-
"886",
|
|
3021
|
-
"887",
|
|
3022
|
-
"888",
|
|
3023
|
-
"889"
|
|
3024
|
-
]);
|
|
3025
|
-
var isRegionlessNanp = (number) => {
|
|
3026
|
-
const numeric = getNumeric(number);
|
|
3027
|
-
if (numeric.startsWith(DIAL.NANP) && numeric.length >= 4) {
|
|
3028
|
-
const areaCode = numeric.substring(1, 4);
|
|
3029
|
-
return regionlessNanpNumbers.has(areaCode);
|
|
3030
|
-
}
|
|
3031
|
-
return false;
|
|
3032
|
-
};
|
|
3033
|
-
|
|
3034
|
-
// angular/build/temp/modules/core/numerals.js
|
|
3035
|
-
var __classPrivateFieldGet2 = function(receiver, state, kind, f) {
|
|
3036
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3037
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3038
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3039
|
-
};
|
|
3040
|
-
var __classPrivateFieldSet2 = function(receiver, state, value, kind, f) {
|
|
3041
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3042
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3043
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3044
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
3045
|
-
};
|
|
3046
|
-
var _Numerals_instances;
|
|
3047
|
-
var _Numerals_userNumeralSet;
|
|
3048
|
-
var _Numerals_updateNumeralSet;
|
|
3049
|
-
var Numerals = class {
|
|
3050
|
-
constructor(initialValue) {
|
|
3051
|
-
_Numerals_instances.add(this);
|
|
3052
|
-
_Numerals_userNumeralSet.set(this, void 0);
|
|
3053
|
-
if (initialValue) {
|
|
3054
|
-
__classPrivateFieldGet2(this, _Numerals_instances, "m", _Numerals_updateNumeralSet).call(this, initialValue);
|
|
3055
|
-
}
|
|
3056
|
-
}
|
|
3057
|
-
// Denormalise ASCII 0-9 to the user's numeral set. If not yet known, return as-is.
|
|
3058
|
-
// NOTE: normalise is always called before this, so it should be impossible for the numeral set to be unknown at this point.
|
|
3059
|
-
denormalise(str) {
|
|
3060
|
-
if (!__classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") || __classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "ascii") {
|
|
3061
|
-
return str;
|
|
3062
|
-
}
|
|
3063
|
-
const base = __classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "arabic-indic" ? 1632 : 1776;
|
|
3064
|
-
return str.replace(/[0-9]/g, (d) => String.fromCharCode(base + Number(d)));
|
|
3065
|
-
}
|
|
3066
|
-
// Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
|
|
3067
|
-
normalise(str) {
|
|
3068
|
-
if (!str) {
|
|
3069
|
-
return "";
|
|
3070
|
-
}
|
|
3071
|
-
__classPrivateFieldGet2(this, _Numerals_instances, "m", _Numerals_updateNumeralSet).call(this, str);
|
|
3072
|
-
if (__classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "ascii") {
|
|
3073
|
-
return str;
|
|
3074
|
-
}
|
|
3075
|
-
const base = __classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "arabic-indic" ? 1632 : 1776;
|
|
3076
|
-
const regex = __classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
|
|
3077
|
-
return str.replace(regex, (ch) => String.fromCharCode(48 + (ch.charCodeAt(0) - base)));
|
|
3078
|
-
}
|
|
3079
|
-
isAscii() {
|
|
3080
|
-
return !__classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") || __classPrivateFieldGet2(this, _Numerals_userNumeralSet, "f") === "ascii";
|
|
3081
|
-
}
|
|
3082
|
-
};
|
|
3083
|
-
_Numerals_userNumeralSet = /* @__PURE__ */ new WeakMap(), _Numerals_instances = /* @__PURE__ */ new WeakSet(), _Numerals_updateNumeralSet = function _Numerals_updateNumeralSet2(str) {
|
|
3084
|
-
if (/[\u0660-\u0669]/.test(str)) {
|
|
3085
|
-
__classPrivateFieldSet2(this, _Numerals_userNumeralSet, "arabic-indic", "f");
|
|
3086
|
-
} else if (/[\u06F0-\u06F9]/.test(str)) {
|
|
3087
|
-
__classPrivateFieldSet2(this, _Numerals_userNumeralSet, "persian", "f");
|
|
3088
|
-
} else {
|
|
3089
|
-
__classPrivateFieldSet2(this, _Numerals_userNumeralSet, "ascii", "f");
|
|
3090
|
-
}
|
|
3091
|
-
};
|
|
3092
|
-
|
|
3093
|
-
// angular/build/temp/intl-tel-input.js
|
|
3094
|
-
var __classPrivateFieldSet3 = function(receiver, state, value, kind, f) {
|
|
3095
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3096
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
3097
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3098
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
3099
|
-
};
|
|
3100
|
-
var __classPrivateFieldGet3 = function(receiver, state, kind, f) {
|
|
3101
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3102
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3103
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3104
|
-
};
|
|
3105
|
-
var _Iti_instances;
|
|
3106
|
-
var _a2;
|
|
3107
|
-
var _Iti_ui;
|
|
3108
|
-
var _Iti_options;
|
|
3109
|
-
var _Iti_isAndroid;
|
|
3110
|
-
var _Iti_countries;
|
|
3111
|
-
var _Iti_dialCodeMaxLen;
|
|
3112
|
-
var _Iti_dialCodeToIso2Map;
|
|
3113
|
-
var _Iti_dialCodes;
|
|
3114
|
-
var _Iti_countryByIso2;
|
|
3115
|
-
var _Iti_selectedCountryData;
|
|
3116
|
-
var _Iti_maxCoreNumberLength;
|
|
3117
|
-
var _Iti_defaultCountry;
|
|
3118
|
-
var _Iti_abortController;
|
|
3119
|
-
var _Iti_dropdownAbortController;
|
|
3120
|
-
var _Iti_numerals;
|
|
3121
|
-
var _Iti_resolveAutoCountryPromise;
|
|
3122
|
-
var _Iti_rejectAutoCountryPromise;
|
|
3123
|
-
var _Iti_resolveUtilsScriptPromise;
|
|
3124
|
-
var _Iti_rejectUtilsScriptPromise;
|
|
3125
|
-
var _Iti_getTelInputValue;
|
|
3126
|
-
var _Iti_setTelInputValue;
|
|
3127
|
-
var _Iti_createInitPromises;
|
|
3128
|
-
var _Iti_init;
|
|
3129
|
-
var _Iti_processCountryData;
|
|
3130
|
-
var _Iti_setInitialState;
|
|
3131
|
-
var _Iti_initListeners;
|
|
3132
|
-
var _Iti_initHiddenInputListener;
|
|
3133
|
-
var _Iti_initDropdownListeners;
|
|
3134
|
-
var _Iti_initRequests;
|
|
3135
|
-
var _Iti_loadAutoCountry;
|
|
3136
|
-
var _Iti_openDropdownWithPlus;
|
|
3137
|
-
var _Iti_initTelInputListeners;
|
|
3138
|
-
var _Iti_bindInputListener;
|
|
3139
|
-
var _Iti_maybeBindKeydownListener;
|
|
3140
|
-
var _Iti_maybeBindPasteListener;
|
|
3141
|
-
var _Iti_cap;
|
|
3142
|
-
var _Iti_trigger;
|
|
3143
|
-
var _Iti_openDropdown;
|
|
3144
|
-
var _Iti_bindDropdownListeners;
|
|
3145
|
-
var _Iti_bindDropdownMouseoverListener;
|
|
3146
|
-
var _Iti_bindDropdownCountryClickListener;
|
|
3147
|
-
var _Iti_bindDropdownClickOffListener;
|
|
3148
|
-
var _Iti_bindDropdownKeydownListener;
|
|
3149
|
-
var _Iti_bindDropdownSearchListeners;
|
|
3150
|
-
var _Iti_searchForCountry;
|
|
3151
|
-
var _Iti_handleEnterKey;
|
|
3152
|
-
var _Iti_updateValFromNumber;
|
|
3153
|
-
var _Iti_updateCountryFromNumber;
|
|
3154
|
-
var _Iti_ensureHasDialCode;
|
|
3155
|
-
var _Iti_getNewCountryFromNumber;
|
|
3156
|
-
var _Iti_setCountry;
|
|
3157
|
-
var _Iti_updateMaxLength;
|
|
3158
|
-
var _Iti_updatePlaceholder;
|
|
3159
|
-
var _Iti_selectListItem;
|
|
3160
|
-
var _Iti_closeDropdown;
|
|
3161
|
-
var _Iti_updateDialCode;
|
|
3162
|
-
var _Iti_getDialCode;
|
|
3163
|
-
var _Iti_getFullNumber;
|
|
3164
|
-
var _Iti_beforeSetNumber;
|
|
3165
|
-
var _Iti_getPublicCountryData;
|
|
3166
|
-
var _Iti_triggerCountryChange;
|
|
3167
|
-
var _Iti_handleAutoCountry;
|
|
3168
|
-
var _Iti_handleAutoCountryFailure;
|
|
3169
|
-
var _Iti_handleUtils;
|
|
3170
|
-
var _Iti_handleUtilsFailure;
|
|
3171
|
-
var _Iti_utilsIsPossibleNumber;
|
|
3172
|
-
var _Iti_validateNumber;
|
|
3173
|
-
var _Iti_utilsIsValidNumber;
|
|
3174
|
-
var id = 0;
|
|
3175
|
-
var Iti = class {
|
|
3176
|
-
constructor(input, customOptions = {}) {
|
|
3177
|
-
_Iti_instances.add(this);
|
|
3178
|
-
_Iti_ui.set(this, void 0);
|
|
3179
|
-
_Iti_options.set(this, void 0);
|
|
3180
|
-
_Iti_isAndroid.set(this, void 0);
|
|
3181
|
-
_Iti_countries.set(this, void 0);
|
|
3182
|
-
_Iti_dialCodeMaxLen.set(this, void 0);
|
|
3183
|
-
_Iti_dialCodeToIso2Map.set(this, void 0);
|
|
3184
|
-
_Iti_dialCodes.set(this, void 0);
|
|
3185
|
-
_Iti_countryByIso2.set(this, void 0);
|
|
3186
|
-
_Iti_selectedCountryData.set(this, void 0);
|
|
3187
|
-
_Iti_maxCoreNumberLength.set(this, void 0);
|
|
3188
|
-
_Iti_defaultCountry.set(this, void 0);
|
|
3189
|
-
_Iti_abortController.set(this, void 0);
|
|
3190
|
-
_Iti_dropdownAbortController.set(this, void 0);
|
|
3191
|
-
_Iti_numerals.set(this, void 0);
|
|
3192
|
-
_Iti_resolveAutoCountryPromise.set(this, void 0);
|
|
3193
|
-
_Iti_rejectAutoCountryPromise.set(this, void 0);
|
|
3194
|
-
_Iti_resolveUtilsScriptPromise.set(this, void 0);
|
|
3195
|
-
_Iti_rejectUtilsScriptPromise.set(this, void 0);
|
|
3196
|
-
this.id = id++;
|
|
3197
|
-
ui_default.validateInput(input);
|
|
3198
|
-
const validatedOptions = validateOptions(customOptions);
|
|
3199
|
-
__classPrivateFieldSet3(this, _Iti_options, Object.assign(Object.assign({}, defaults), validatedOptions), "f");
|
|
3200
|
-
normaliseOptions(__classPrivateFieldGet3(this, _Iti_options, "f"));
|
|
3201
|
-
applyOptionSideEffects(__classPrivateFieldGet3(this, _Iti_options, "f"));
|
|
3202
|
-
__classPrivateFieldSet3(this, _Iti_ui, new ui_default(input, __classPrivateFieldGet3(this, _Iti_options, "f"), this.id), "f");
|
|
3203
|
-
__classPrivateFieldSet3(this, _Iti_isAndroid, getIsAndroid(), "f");
|
|
3204
|
-
__classPrivateFieldSet3(this, _Iti_numerals, new Numerals(input.value), "f");
|
|
3205
|
-
this.promise = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_createInitPromises).call(this, __classPrivateFieldGet3(this, _Iti_options, "f"));
|
|
3206
|
-
__classPrivateFieldSet3(this, _Iti_countries, processAllCountries(__classPrivateFieldGet3(this, _Iti_options, "f")), "f");
|
|
3207
|
-
const { dialCodes, dialCodeMaxLen, dialCodeToIso2Map } = processDialCodes(__classPrivateFieldGet3(this, _Iti_countries, "f"));
|
|
3208
|
-
__classPrivateFieldSet3(this, _Iti_dialCodes, dialCodes, "f");
|
|
3209
|
-
__classPrivateFieldSet3(this, _Iti_dialCodeMaxLen, dialCodeMaxLen, "f");
|
|
3210
|
-
__classPrivateFieldSet3(this, _Iti_dialCodeToIso2Map, dialCodeToIso2Map, "f");
|
|
3211
|
-
__classPrivateFieldSet3(this, _Iti_countryByIso2, new Map(__classPrivateFieldGet3(this, _Iti_countries, "f").map((c) => [c.iso2, c])), "f");
|
|
3212
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_init).call(this);
|
|
3213
|
-
}
|
|
3214
|
-
//********************
|
|
3215
|
-
//* PUBLIC METHODS
|
|
3216
|
-
//********************
|
|
3217
|
-
//* Remove plugin.
|
|
3218
|
-
destroy() {
|
|
3219
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3220
|
-
return;
|
|
3221
|
-
}
|
|
3222
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").allowDropdown) {
|
|
3223
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this, true);
|
|
3224
|
-
}
|
|
3225
|
-
__classPrivateFieldGet3(this, _Iti_abortController, "f").abort();
|
|
3226
|
-
__classPrivateFieldSet3(this, _Iti_abortController, null, "f");
|
|
3227
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").destroy();
|
|
3228
|
-
delete intlTelInput.instances[this.id];
|
|
3229
|
-
}
|
|
3230
|
-
// check if the instance is still valid (not destroyed/unmounted)
|
|
3231
|
-
isActive() {
|
|
3232
|
-
var _b;
|
|
3233
|
-
return !!((_b = __classPrivateFieldGet3(this, _Iti_ui, "f")) === null || _b === void 0 ? void 0 : _b.telInput);
|
|
3234
|
-
}
|
|
3235
|
-
//* Get the extension from the current number.
|
|
3236
|
-
getExtension() {
|
|
3237
|
-
var _b;
|
|
3238
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3239
|
-
return intlTelInput.utils.getExtension(__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this), (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2);
|
|
3240
|
-
}
|
|
3241
|
-
return "";
|
|
3242
|
-
}
|
|
3243
|
-
//* Format the number to the given format.
|
|
3244
|
-
getNumber(format) {
|
|
3245
|
-
var _b;
|
|
3246
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3247
|
-
const iso2 = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3248
|
-
const fullNumber = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this);
|
|
3249
|
-
const formattedNumber = intlTelInput.utils.formatNumber(fullNumber, iso2, format);
|
|
3250
|
-
return __classPrivateFieldGet3(this, _Iti_numerals, "f").denormalise(formattedNumber);
|
|
3251
|
-
}
|
|
3252
|
-
return "";
|
|
3253
|
-
}
|
|
3254
|
-
//* Get the type of the entered number e.g. landline/mobile.
|
|
3255
|
-
getNumberType() {
|
|
3256
|
-
var _b;
|
|
3257
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3258
|
-
return intlTelInput.utils.getNumberType(__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this), (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2);
|
|
3259
|
-
}
|
|
3260
|
-
return SENTINELS.UNKNOWN_NUMBER_TYPE;
|
|
3261
|
-
}
|
|
3262
|
-
//* Get the country data for the currently selected country.
|
|
3263
|
-
getSelectedCountryData() {
|
|
3264
|
-
return __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getPublicCountryData).call(this);
|
|
3265
|
-
}
|
|
3266
|
-
//* Get the validation error.
|
|
3267
|
-
getValidationError() {
|
|
3268
|
-
var _b;
|
|
3269
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3270
|
-
const iso2 = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3271
|
-
return intlTelInput.utils.getValidationError(__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this), iso2);
|
|
3272
|
-
}
|
|
3273
|
-
return SENTINELS.UNKNOWN_VALIDATION_ERROR;
|
|
3274
|
-
}
|
|
3275
|
-
//* Validate the input val using number length only
|
|
3276
|
-
isValidNumber() {
|
|
3277
|
-
var _b, _c;
|
|
3278
|
-
const dialCode = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.dialCode;
|
|
3279
|
-
const iso2 = (_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.iso2;
|
|
3280
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3281
|
-
const number = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this);
|
|
3282
|
-
const coreNumber = intlTelInput.utils.getCoreNumber(number, iso2);
|
|
3283
|
-
if (coreNumber) {
|
|
3284
|
-
if (dialCode === UK.DIAL_CODE) {
|
|
3285
|
-
if (coreNumber[0] === UK.MOBILE_PREFIX && coreNumber.length !== UK.MOBILE_CORE_LENGTH) {
|
|
3286
|
-
return false;
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
const hasAlphaChar = REGEX.ALPHA_UNICODE.test(number);
|
|
3290
|
-
if (!hasAlphaChar && dialCode) {
|
|
3291
|
-
const nationalPortion = number.startsWith("+") ? number.slice(1 + dialCode.length) : number;
|
|
3292
|
-
const nationalDigitCount = getNumeric(nationalPortion).length;
|
|
3293
|
-
if (coreNumber.length > nationalDigitCount) {
|
|
3294
|
-
return false;
|
|
3295
|
-
}
|
|
3296
|
-
}
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
return __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_validateNumber).call(this, false);
|
|
3300
|
-
}
|
|
3301
|
-
//* Validate the input val with precise validation
|
|
3302
|
-
isValidNumberPrecise() {
|
|
3303
|
-
return __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_validateNumber).call(this, true);
|
|
3304
|
-
}
|
|
3305
|
-
//* Update the selected country, and update the input val accordingly.
|
|
3306
|
-
setCountry(iso2) {
|
|
3307
|
-
var _b, _c;
|
|
3308
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3309
|
-
return;
|
|
3310
|
-
}
|
|
3311
|
-
const iso2Lower = iso2 === null || iso2 === void 0 ? void 0 : iso2.toLowerCase();
|
|
3312
|
-
if (!isIso2(iso2Lower)) {
|
|
3313
|
-
throw new Error(`Invalid country code: '${iso2Lower}'`);
|
|
3314
|
-
}
|
|
3315
|
-
const currentCountry = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3316
|
-
const isCountryChange = iso2 && iso2Lower !== currentCountry || !iso2 && currentCountry;
|
|
3317
|
-
if (isCountryChange) {
|
|
3318
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, iso2Lower);
|
|
3319
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateDialCode).call(this, ((_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.dialCode) || "");
|
|
3320
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").formatOnDisplay) {
|
|
3321
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3322
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateValFromNumber).call(this, inputValue);
|
|
3323
|
-
}
|
|
3324
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_triggerCountryChange).call(this);
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3327
|
-
//* Set the input value and update the country.
|
|
3328
|
-
setNumber(number) {
|
|
3329
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3330
|
-
return;
|
|
3331
|
-
}
|
|
3332
|
-
const normalisedNumber = __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(number);
|
|
3333
|
-
const countryChanged = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateCountryFromNumber).call(this, normalisedNumber);
|
|
3334
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateValFromNumber).call(this, normalisedNumber);
|
|
3335
|
-
if (countryChanged) {
|
|
3336
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_triggerCountryChange).call(this);
|
|
3337
|
-
}
|
|
3338
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_trigger).call(this, EVENTS.INPUT, { isSetNumber: true });
|
|
3339
|
-
}
|
|
3340
|
-
//* Set the placeholder number typ
|
|
3341
|
-
setPlaceholderNumberType(type) {
|
|
3342
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3343
|
-
return;
|
|
3344
|
-
}
|
|
3345
|
-
__classPrivateFieldGet3(this, _Iti_options, "f").placeholderNumberType = type;
|
|
3346
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updatePlaceholder).call(this);
|
|
3347
|
-
}
|
|
3348
|
-
setDisabled(disabled) {
|
|
3349
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
3350
|
-
return;
|
|
3351
|
-
}
|
|
3352
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.disabled = disabled;
|
|
3353
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountry) {
|
|
3354
|
-
if (disabled) {
|
|
3355
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountry.setAttribute("disabled", "true");
|
|
3356
|
-
} else {
|
|
3357
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountry.removeAttribute("disabled");
|
|
3358
|
-
}
|
|
3359
|
-
}
|
|
3360
|
-
}
|
|
3361
|
-
//********************
|
|
3362
|
-
//* STATIC METHODS
|
|
3363
|
-
//********************
|
|
3364
|
-
// Internal instance notification used by utils/geoip loaders.
|
|
3365
|
-
// Kept public so module-level helpers (e.g. attachUtils) can call it, while still allowing
|
|
3366
|
-
// access to private instance methods.
|
|
3367
|
-
static forEachInstance(method, ...args) {
|
|
3368
|
-
const values = Object.values(intlTelInput.instances);
|
|
3369
|
-
const arg = args[0];
|
|
3370
|
-
values.forEach((instance) => {
|
|
3371
|
-
if (!(instance instanceof _a2)) {
|
|
3372
|
-
return;
|
|
3373
|
-
}
|
|
3374
|
-
switch (method) {
|
|
3375
|
-
case "handleUtils":
|
|
3376
|
-
__classPrivateFieldGet3(instance, _Iti_instances, "m", _Iti_handleUtils).call(instance);
|
|
3377
|
-
break;
|
|
3378
|
-
case "handleUtilsFailure":
|
|
3379
|
-
__classPrivateFieldGet3(instance, _Iti_instances, "m", _Iti_handleUtilsFailure).call(instance, arg);
|
|
3380
|
-
break;
|
|
3381
|
-
case "handleAutoCountry":
|
|
3382
|
-
__classPrivateFieldGet3(instance, _Iti_instances, "m", _Iti_handleAutoCountry).call(instance);
|
|
3383
|
-
break;
|
|
3384
|
-
case "handleAutoCountryFailure":
|
|
3385
|
-
__classPrivateFieldGet3(instance, _Iti_instances, "m", _Iti_handleAutoCountryFailure).call(instance);
|
|
3386
|
-
break;
|
|
3387
|
-
}
|
|
3388
|
-
});
|
|
3389
|
-
}
|
|
3390
|
-
};
|
|
3391
|
-
_a2 = Iti, _Iti_ui = /* @__PURE__ */ new WeakMap(), _Iti_options = /* @__PURE__ */ new WeakMap(), _Iti_isAndroid = /* @__PURE__ */ new WeakMap(), _Iti_countries = /* @__PURE__ */ new WeakMap(), _Iti_dialCodeMaxLen = /* @__PURE__ */ new WeakMap(), _Iti_dialCodeToIso2Map = /* @__PURE__ */ new WeakMap(), _Iti_dialCodes = /* @__PURE__ */ new WeakMap(), _Iti_countryByIso2 = /* @__PURE__ */ new WeakMap(), _Iti_selectedCountryData = /* @__PURE__ */ new WeakMap(), _Iti_maxCoreNumberLength = /* @__PURE__ */ new WeakMap(), _Iti_defaultCountry = /* @__PURE__ */ new WeakMap(), _Iti_abortController = /* @__PURE__ */ new WeakMap(), _Iti_dropdownAbortController = /* @__PURE__ */ new WeakMap(), _Iti_numerals = /* @__PURE__ */ new WeakMap(), _Iti_resolveAutoCountryPromise = /* @__PURE__ */ new WeakMap(), _Iti_rejectAutoCountryPromise = /* @__PURE__ */ new WeakMap(), _Iti_resolveUtilsScriptPromise = /* @__PURE__ */ new WeakMap(), _Iti_rejectUtilsScriptPromise = /* @__PURE__ */ new WeakMap(), _Iti_instances = /* @__PURE__ */ new WeakSet(), _Iti_getTelInputValue = function _Iti_getTelInputValue2() {
|
|
3392
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.value.trim();
|
|
3393
|
-
return __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(inputValue);
|
|
3394
|
-
}, _Iti_setTelInputValue = function _Iti_setTelInputValue2(asciiValue) {
|
|
3395
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.value = __classPrivateFieldGet3(this, _Iti_numerals, "f").denormalise(asciiValue);
|
|
3396
|
-
}, _Iti_createInitPromises = function _Iti_createInitPromises2(options) {
|
|
3397
|
-
const { initialCountry, geoIpLookup, loadUtils } = options;
|
|
3398
|
-
const needsAutoCountryPromise = initialCountry === INITIAL_COUNTRY.AUTO && Boolean(geoIpLookup);
|
|
3399
|
-
const needsUtilsScriptPromise = Boolean(loadUtils) && !intlTelInput.utils;
|
|
3400
|
-
let autoCountryPromise;
|
|
3401
|
-
if (needsAutoCountryPromise) {
|
|
3402
|
-
autoCountryPromise = new Promise((resolve, reject) => {
|
|
3403
|
-
__classPrivateFieldSet3(this, _Iti_resolveAutoCountryPromise, resolve, "f");
|
|
3404
|
-
__classPrivateFieldSet3(this, _Iti_rejectAutoCountryPromise, reject, "f");
|
|
3405
|
-
});
|
|
3406
|
-
} else {
|
|
3407
|
-
autoCountryPromise = Promise.resolve(void 0);
|
|
3408
|
-
__classPrivateFieldSet3(this, _Iti_resolveAutoCountryPromise, () => {
|
|
3409
|
-
}, "f");
|
|
3410
|
-
__classPrivateFieldSet3(this, _Iti_rejectAutoCountryPromise, () => {
|
|
3411
|
-
}, "f");
|
|
3412
|
-
}
|
|
3413
|
-
let utilsScriptPromise;
|
|
3414
|
-
if (needsUtilsScriptPromise) {
|
|
3415
|
-
utilsScriptPromise = new Promise((resolve, reject) => {
|
|
3416
|
-
__classPrivateFieldSet3(this, _Iti_resolveUtilsScriptPromise, resolve, "f");
|
|
3417
|
-
__classPrivateFieldSet3(this, _Iti_rejectUtilsScriptPromise, reject, "f");
|
|
3418
|
-
});
|
|
3419
|
-
} else {
|
|
3420
|
-
utilsScriptPromise = Promise.resolve(void 0);
|
|
3421
|
-
__classPrivateFieldSet3(this, _Iti_resolveUtilsScriptPromise, () => {
|
|
3422
|
-
}, "f");
|
|
3423
|
-
__classPrivateFieldSet3(this, _Iti_rejectUtilsScriptPromise, () => {
|
|
3424
|
-
}, "f");
|
|
3425
|
-
}
|
|
3426
|
-
return Promise.all([autoCountryPromise, utilsScriptPromise]).then(() => {
|
|
3427
|
-
});
|
|
3428
|
-
}, _Iti_init = function _Iti_init2() {
|
|
3429
|
-
__classPrivateFieldSet3(this, _Iti_selectedCountryData, null, "f");
|
|
3430
|
-
__classPrivateFieldSet3(this, _Iti_abortController, new AbortController(), "f");
|
|
3431
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_processCountryData).call(this);
|
|
3432
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").generateMarkup(__classPrivateFieldGet3(this, _Iti_countries, "f"));
|
|
3433
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setInitialState).call(this);
|
|
3434
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_initListeners).call(this);
|
|
3435
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_initRequests).call(this);
|
|
3436
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").dropdownAlwaysOpen) {
|
|
3437
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdown).call(this);
|
|
3438
|
-
}
|
|
3439
|
-
}, _Iti_processCountryData = function _Iti_processCountryData2() {
|
|
3440
|
-
generateCountryNames(__classPrivateFieldGet3(this, _Iti_countries, "f"), __classPrivateFieldGet3(this, _Iti_options, "f"));
|
|
3441
|
-
sortCountries(__classPrivateFieldGet3(this, _Iti_countries, "f"), __classPrivateFieldGet3(this, _Iti_options, "f"));
|
|
3442
|
-
cacheSearchTokens(__classPrivateFieldGet3(this, _Iti_countries, "f"));
|
|
3443
|
-
}, _Iti_setInitialState = function _Iti_setInitialState2(overrideAutoCountry = false) {
|
|
3444
|
-
const attributeValueRaw = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.getAttribute("value");
|
|
3445
|
-
const attributeValue = __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(attributeValueRaw);
|
|
3446
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3447
|
-
const useAttribute = attributeValue && attributeValue.startsWith("+") && (!inputValue || !inputValue.startsWith("+"));
|
|
3448
|
-
const val = useAttribute ? attributeValue : inputValue;
|
|
3449
|
-
const dialCode = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getDialCode).call(this, val);
|
|
3450
|
-
const isRegionlessNanpNumber = isRegionlessNanp(val);
|
|
3451
|
-
const { initialCountry, geoIpLookup } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3452
|
-
const isAutoCountry = initialCountry === INITIAL_COUNTRY.AUTO && geoIpLookup;
|
|
3453
|
-
const doingAutoCountryLookup = isAutoCountry && !overrideAutoCountry;
|
|
3454
|
-
const isValidInitialCountry = isIso2(initialCountry);
|
|
3455
|
-
if (dialCode) {
|
|
3456
|
-
if (isRegionlessNanpNumber) {
|
|
3457
|
-
if (isValidInitialCountry) {
|
|
3458
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, initialCountry);
|
|
3459
|
-
} else if (!doingAutoCountryLookup) {
|
|
3460
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, US.ISO2);
|
|
3461
|
-
}
|
|
3462
|
-
} else {
|
|
3463
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateCountryFromNumber).call(this, val);
|
|
3464
|
-
}
|
|
3465
|
-
} else if (isValidInitialCountry) {
|
|
3466
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, initialCountry);
|
|
3467
|
-
} else if (!doingAutoCountryLookup) {
|
|
3468
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, "");
|
|
3469
|
-
}
|
|
3470
|
-
if (val) {
|
|
3471
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateValFromNumber).call(this, val);
|
|
3472
|
-
}
|
|
3473
|
-
}, _Iti_initListeners = function _Iti_initListeners2() {
|
|
3474
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_initTelInputListeners).call(this);
|
|
3475
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").allowDropdown) {
|
|
3476
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_initDropdownListeners).call(this);
|
|
3477
|
-
}
|
|
3478
|
-
if ((__classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInput || __classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInputCountry) && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.form) {
|
|
3479
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_initHiddenInputListener).call(this);
|
|
3480
|
-
}
|
|
3481
|
-
}, _Iti_initHiddenInputListener = function _Iti_initHiddenInputListener2() {
|
|
3482
|
-
var _b;
|
|
3483
|
-
const handleHiddenInputSubmit = () => {
|
|
3484
|
-
var _b2;
|
|
3485
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInput) {
|
|
3486
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInput.value = this.getNumber();
|
|
3487
|
-
}
|
|
3488
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInputCountry) {
|
|
3489
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").hiddenInputCountry.value = ((_b2 = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b2 === void 0 ? void 0 : _b2.iso2) || "";
|
|
3490
|
-
}
|
|
3491
|
-
};
|
|
3492
|
-
(_b = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.form) === null || _b === void 0 ? void 0 : _b.addEventListener("submit", handleHiddenInputSubmit, {
|
|
3493
|
-
signal: __classPrivateFieldGet3(this, _Iti_abortController, "f").signal
|
|
3494
|
-
});
|
|
3495
|
-
}, _Iti_initDropdownListeners = function _Iti_initDropdownListeners2() {
|
|
3496
|
-
const signal = __classPrivateFieldGet3(this, _Iti_abortController, "f").signal;
|
|
3497
|
-
const handleLabelClick = (e) => {
|
|
3498
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").isDropdownClosed()) {
|
|
3499
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.focus();
|
|
3500
|
-
} else {
|
|
3501
|
-
e.preventDefault();
|
|
3502
|
-
}
|
|
3503
|
-
};
|
|
3504
|
-
const label = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.closest("label");
|
|
3505
|
-
if (label) {
|
|
3506
|
-
label.addEventListener("click", handleLabelClick, { signal });
|
|
3507
|
-
}
|
|
3508
|
-
const handleClickSelectedCountry = () => {
|
|
3509
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").isDropdownClosed() && !__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.disabled && !__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.readOnly) {
|
|
3510
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdown).call(this);
|
|
3511
|
-
}
|
|
3512
|
-
};
|
|
3513
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountry.addEventListener("click", handleClickSelectedCountry, {
|
|
3514
|
-
signal
|
|
3515
|
-
});
|
|
3516
|
-
const handleCountryContainerKeydown = (e) => {
|
|
3517
|
-
const allowedKeys = [KEYS.ARROW_UP, KEYS.ARROW_DOWN, KEYS.SPACE, KEYS.ENTER];
|
|
3518
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").isDropdownClosed() && allowedKeys.includes(e.key)) {
|
|
3519
|
-
e.preventDefault();
|
|
3520
|
-
e.stopPropagation();
|
|
3521
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdown).call(this);
|
|
3522
|
-
}
|
|
3523
|
-
if (e.key === KEYS.TAB) {
|
|
3524
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this);
|
|
3525
|
-
}
|
|
3526
|
-
};
|
|
3527
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").countryContainer.addEventListener("keydown", handleCountryContainerKeydown, { signal });
|
|
3528
|
-
}, _Iti_initRequests = function _Iti_initRequests2() {
|
|
3529
|
-
var _b;
|
|
3530
|
-
const { loadUtils, initialCountry, geoIpLookup } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3531
|
-
if (loadUtils && !intlTelInput.utils) {
|
|
3532
|
-
const doAttachUtils = () => {
|
|
3533
|
-
var _b2;
|
|
3534
|
-
(_b2 = intlTelInput.attachUtils(loadUtils)) === null || _b2 === void 0 ? void 0 : _b2.catch(() => {
|
|
3535
|
-
});
|
|
3536
|
-
};
|
|
3537
|
-
if (intlTelInput.documentReady()) {
|
|
3538
|
-
doAttachUtils();
|
|
3539
|
-
} else {
|
|
3540
|
-
window.addEventListener("load", doAttachUtils, {
|
|
3541
|
-
signal: __classPrivateFieldGet3(this, _Iti_abortController, "f").signal
|
|
3542
|
-
});
|
|
3543
|
-
}
|
|
3544
|
-
} else {
|
|
3545
|
-
__classPrivateFieldGet3(this, _Iti_resolveUtilsScriptPromise, "f").call(this);
|
|
3546
|
-
}
|
|
3547
|
-
const isAutoCountry = initialCountry === INITIAL_COUNTRY.AUTO && geoIpLookup;
|
|
3548
|
-
if (isAutoCountry) {
|
|
3549
|
-
if ((_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2) {
|
|
3550
|
-
__classPrivateFieldGet3(this, _Iti_resolveAutoCountryPromise, "f").call(this);
|
|
3551
|
-
} else {
|
|
3552
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_loadAutoCountry).call(this);
|
|
3553
|
-
}
|
|
3554
|
-
}
|
|
3555
|
-
}, _Iti_loadAutoCountry = function _Iti_loadAutoCountry2() {
|
|
3556
|
-
if (intlTelInput.autoCountry) {
|
|
3557
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_handleAutoCountry).call(this);
|
|
3558
|
-
} else {
|
|
3559
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountryInner.classList.add(CLASSES.LOADING);
|
|
3560
|
-
if (!intlTelInput.startedLoadingAutoCountry) {
|
|
3561
|
-
intlTelInput.startedLoadingAutoCountry = true;
|
|
3562
|
-
if (typeof __classPrivateFieldGet3(this, _Iti_options, "f").geoIpLookup === "function") {
|
|
3563
|
-
const successCallback = (iso2 = "") => {
|
|
3564
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountryInner.classList.remove(CLASSES.LOADING);
|
|
3565
|
-
const iso2Lower = iso2.toLowerCase();
|
|
3566
|
-
if (isIso2(iso2Lower)) {
|
|
3567
|
-
intlTelInput.autoCountry = iso2Lower;
|
|
3568
|
-
setTimeout(() => _a2.forEachInstance("handleAutoCountry"));
|
|
3569
|
-
} else {
|
|
3570
|
-
_a2.forEachInstance("handleAutoCountryFailure");
|
|
3571
|
-
}
|
|
3572
|
-
};
|
|
3573
|
-
const failureCallback = () => {
|
|
3574
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountryInner.classList.remove(CLASSES.LOADING);
|
|
3575
|
-
_a2.forEachInstance("handleAutoCountryFailure");
|
|
3576
|
-
};
|
|
3577
|
-
__classPrivateFieldGet3(this, _Iti_options, "f").geoIpLookup(successCallback, failureCallback);
|
|
3578
|
-
}
|
|
3579
|
-
}
|
|
3580
|
-
}
|
|
3581
|
-
}, _Iti_openDropdownWithPlus = function _Iti_openDropdownWithPlus2() {
|
|
3582
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdown).call(this);
|
|
3583
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").searchInput.value = "+";
|
|
3584
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").filterCountriesByQuery("");
|
|
3585
|
-
}, _Iti_initTelInputListeners = function _Iti_initTelInputListeners2() {
|
|
3586
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindInputListener).call(this);
|
|
3587
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_maybeBindKeydownListener).call(this);
|
|
3588
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_maybeBindPasteListener).call(this);
|
|
3589
|
-
}, _Iti_bindInputListener = function _Iti_bindInputListener2() {
|
|
3590
|
-
const { strictMode, formatAsYouType, separateDialCode, allowDropdown, countrySearch } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3591
|
-
let userOverrideFormatting = false;
|
|
3592
|
-
if (REGEX.ALPHA_UNICODE.test(__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this))) {
|
|
3593
|
-
userOverrideFormatting = true;
|
|
3594
|
-
}
|
|
3595
|
-
const handleInputEvent = (e) => {
|
|
3596
|
-
var _b, _c, _d;
|
|
3597
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3598
|
-
if (__classPrivateFieldGet3(this, _Iti_isAndroid, "f") && (e === null || e === void 0 ? void 0 : e.data) === "+" && separateDialCode && allowDropdown && countrySearch) {
|
|
3599
|
-
const currentCaretPos = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.selectionStart || 0;
|
|
3600
|
-
const valueBeforeCaret = inputValue.substring(0, currentCaretPos - 1);
|
|
3601
|
-
const valueAfterCaret = inputValue.substring(currentCaretPos);
|
|
3602
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, valueBeforeCaret + valueAfterCaret);
|
|
3603
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdownWithPlus).call(this);
|
|
3604
|
-
return;
|
|
3605
|
-
}
|
|
3606
|
-
if (__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateCountryFromNumber).call(this, inputValue)) {
|
|
3607
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_triggerCountryChange).call(this);
|
|
3608
|
-
}
|
|
3609
|
-
const isFormattingChar = (e === null || e === void 0 ? void 0 : e.data) && REGEX.NON_PLUS_NUMERIC.test(e.data);
|
|
3610
|
-
const isPaste = (e === null || e === void 0 ? void 0 : e.inputType) === INPUT_TYPES.PASTE && inputValue;
|
|
3611
|
-
if (isFormattingChar || isPaste && !strictMode) {
|
|
3612
|
-
userOverrideFormatting = true;
|
|
3613
|
-
} else if (!REGEX.NON_PLUS_NUMERIC.test(inputValue)) {
|
|
3614
|
-
userOverrideFormatting = false;
|
|
3615
|
-
}
|
|
3616
|
-
const isSetNumber = (e === null || e === void 0 ? void 0 : e.detail) && e.detail["isSetNumber"];
|
|
3617
|
-
const isAscii = __classPrivateFieldGet3(this, _Iti_numerals, "f").isAscii();
|
|
3618
|
-
if (formatAsYouType && !userOverrideFormatting && !isSetNumber && isAscii) {
|
|
3619
|
-
const currentCaretPos = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.selectionStart || 0;
|
|
3620
|
-
const valueBeforeCaret = inputValue.substring(0, currentCaretPos);
|
|
3621
|
-
const relevantCharsBeforeCaret = valueBeforeCaret.replace(REGEX.NON_PLUS_NUMERIC_GLOBAL, "").length;
|
|
3622
|
-
const isDeleteForwards = (e === null || e === void 0 ? void 0 : e.inputType) === INPUT_TYPES.DELETE_FWD;
|
|
3623
|
-
const fullNumber = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this);
|
|
3624
|
-
const formattedValue = formatNumberAsYouType(fullNumber, inputValue, intlTelInput.utils, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) !== null && _b !== void 0 ? _b : {}, separateDialCode);
|
|
3625
|
-
const newCaretPos = translateCursorPosition(relevantCharsBeforeCaret, formattedValue, currentCaretPos, isDeleteForwards);
|
|
3626
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, formattedValue);
|
|
3627
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.setSelectionRange(newCaretPos, newCaretPos);
|
|
3628
|
-
}
|
|
3629
|
-
if (separateDialCode && inputValue.startsWith("+") && ((_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.dialCode)) {
|
|
3630
|
-
const cleanNumber = beforeSetNumber(inputValue, true, separateDialCode, (_d = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) !== null && _d !== void 0 ? _d : {});
|
|
3631
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, cleanNumber);
|
|
3632
|
-
}
|
|
3633
|
-
};
|
|
3634
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.addEventListener("input", handleInputEvent, {
|
|
3635
|
-
signal: __classPrivateFieldGet3(this, _Iti_abortController, "f").signal
|
|
3636
|
-
});
|
|
3637
|
-
}, _Iti_maybeBindKeydownListener = function _Iti_maybeBindKeydownListener2() {
|
|
3638
|
-
const { strictMode, separateDialCode, allowDropdown, countrySearch } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3639
|
-
if (strictMode || separateDialCode) {
|
|
3640
|
-
const handleKeydownEvent = (e) => {
|
|
3641
|
-
var _b;
|
|
3642
|
-
if (e.key && e.key.length === 1 && !e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
3643
|
-
if (separateDialCode && allowDropdown && countrySearch && e.key === "+") {
|
|
3644
|
-
e.preventDefault();
|
|
3645
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_openDropdownWithPlus).call(this);
|
|
3646
|
-
return;
|
|
3647
|
-
}
|
|
3648
|
-
if (strictMode) {
|
|
3649
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3650
|
-
const alreadyHasPlus = inputValue.startsWith("+");
|
|
3651
|
-
const isInitialPlus = !alreadyHasPlus && __classPrivateFieldGet3(this, _Iti_ui, "f").telInput.selectionStart === 0 && e.key === "+";
|
|
3652
|
-
const normalisedKey = __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(e.key);
|
|
3653
|
-
const isNumeric = /^[0-9]$/.test(normalisedKey);
|
|
3654
|
-
const isAllowedChar = separateDialCode ? isNumeric : isInitialPlus || isNumeric;
|
|
3655
|
-
const input = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput;
|
|
3656
|
-
const selStart = input.selectionStart;
|
|
3657
|
-
const selEnd = input.selectionEnd;
|
|
3658
|
-
const before = inputValue.slice(0, selStart);
|
|
3659
|
-
const after = inputValue.slice(selEnd);
|
|
3660
|
-
const newValue = before + e.key + after;
|
|
3661
|
-
const newFullNumber = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this, newValue);
|
|
3662
|
-
let hasExceededMaxLength = false;
|
|
3663
|
-
if (intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_maxCoreNumberLength, "f")) {
|
|
3664
|
-
const coreNumber = intlTelInput.utils.getCoreNumber(newFullNumber, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2);
|
|
3665
|
-
hasExceededMaxLength = coreNumber.length > __classPrivateFieldGet3(this, _Iti_maxCoreNumberLength, "f");
|
|
3666
|
-
}
|
|
3667
|
-
const newCountry = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getNewCountryFromNumber).call(this, newFullNumber);
|
|
3668
|
-
const isChangingDialCode = newCountry !== null;
|
|
3669
|
-
if (!isAllowedChar || hasExceededMaxLength && !isChangingDialCode && !isInitialPlus) {
|
|
3670
|
-
e.preventDefault();
|
|
3671
|
-
}
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
};
|
|
3675
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.addEventListener("keydown", handleKeydownEvent, {
|
|
3676
|
-
signal: __classPrivateFieldGet3(this, _Iti_abortController, "f").signal
|
|
3677
|
-
});
|
|
3678
|
-
}
|
|
3679
|
-
}, _Iti_maybeBindPasteListener = function _Iti_maybeBindPasteListener2() {
|
|
3680
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").strictMode) {
|
|
3681
|
-
const handlePasteEvent = (e) => {
|
|
3682
|
-
var _b;
|
|
3683
|
-
e.preventDefault();
|
|
3684
|
-
const input = __classPrivateFieldGet3(this, _Iti_ui, "f").telInput;
|
|
3685
|
-
const selStart = input.selectionStart;
|
|
3686
|
-
const selEnd = input.selectionEnd;
|
|
3687
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3688
|
-
const before = inputValue.slice(0, selStart);
|
|
3689
|
-
const after = inputValue.slice(selEnd);
|
|
3690
|
-
const iso2 = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3691
|
-
const pastedRaw = e.clipboardData.getData("text");
|
|
3692
|
-
const pasted = __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(pastedRaw);
|
|
3693
|
-
const initialCharSelected = selStart === 0 && selEnd > 0;
|
|
3694
|
-
const allowLeadingPlus = !inputValue.startsWith("+") || initialCharSelected;
|
|
3695
|
-
const allowedChars = pasted.replace(REGEX.NON_PLUS_NUMERIC_GLOBAL, "");
|
|
3696
|
-
const hasLeadingPlus = allowedChars.startsWith("+");
|
|
3697
|
-
const numerics = allowedChars.replace(/\+/g, "");
|
|
3698
|
-
const sanitised = hasLeadingPlus && allowLeadingPlus ? `+${numerics}` : numerics;
|
|
3699
|
-
let newVal = before + sanitised + after;
|
|
3700
|
-
if (newVal.length > 5) {
|
|
3701
|
-
let coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
|
|
3702
|
-
while (coreNumber.length === 0 && newVal.length > 0) {
|
|
3703
|
-
newVal = newVal.slice(0, -1);
|
|
3704
|
-
coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
|
|
3705
|
-
}
|
|
3706
|
-
if (!coreNumber) {
|
|
3707
|
-
return;
|
|
3708
|
-
}
|
|
3709
|
-
if (__classPrivateFieldGet3(this, _Iti_maxCoreNumberLength, "f") && coreNumber.length > __classPrivateFieldGet3(this, _Iti_maxCoreNumberLength, "f")) {
|
|
3710
|
-
if (input.selectionEnd === inputValue.length) {
|
|
3711
|
-
const trimLength = coreNumber.length - __classPrivateFieldGet3(this, _Iti_maxCoreNumberLength, "f");
|
|
3712
|
-
newVal = newVal.slice(0, newVal.length - trimLength);
|
|
3713
|
-
} else {
|
|
3714
|
-
return;
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
|
-
}
|
|
3718
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, newVal);
|
|
3719
|
-
const caretPos = selStart + sanitised.length;
|
|
3720
|
-
input.setSelectionRange(caretPos, caretPos);
|
|
3721
|
-
input.dispatchEvent(new InputEvent("input", { bubbles: true }));
|
|
3722
|
-
};
|
|
3723
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.addEventListener("paste", handlePasteEvent, {
|
|
3724
|
-
signal: __classPrivateFieldGet3(this, _Iti_abortController, "f").signal
|
|
3725
|
-
});
|
|
3726
|
-
}
|
|
3727
|
-
}, _Iti_cap = function _Iti_cap2(number) {
|
|
3728
|
-
const max = Number(__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.getAttribute("maxlength"));
|
|
3729
|
-
return max && number.length > max ? number.substring(0, max) : number;
|
|
3730
|
-
}, _Iti_trigger = function _Iti_trigger2(name, detailProps = {}) {
|
|
3731
|
-
const e = new CustomEvent(name, {
|
|
3732
|
-
bubbles: true,
|
|
3733
|
-
cancelable: true,
|
|
3734
|
-
detail: detailProps
|
|
3735
|
-
});
|
|
3736
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.dispatchEvent(e);
|
|
3737
|
-
}, _Iti_openDropdown = function _Iti_openDropdown2() {
|
|
3738
|
-
const { dropdownContainer, useFullscreenPopup } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3739
|
-
__classPrivateFieldSet3(this, _Iti_dropdownAbortController, new AbortController(), "f");
|
|
3740
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").openDropdown();
|
|
3741
|
-
if (!useFullscreenPopup && dropdownContainer) {
|
|
3742
|
-
const handleWindowScroll = () => __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this);
|
|
3743
|
-
window.addEventListener("scroll", handleWindowScroll, {
|
|
3744
|
-
signal: __classPrivateFieldGet3(this, _Iti_dropdownAbortController, "f").signal
|
|
3745
|
-
});
|
|
3746
|
-
}
|
|
3747
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownListeners).call(this);
|
|
3748
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_trigger).call(this, EVENTS.OPEN_COUNTRY_DROPDOWN);
|
|
3749
|
-
}, _Iti_bindDropdownListeners = function _Iti_bindDropdownListeners2() {
|
|
3750
|
-
const signal = __classPrivateFieldGet3(this, _Iti_dropdownAbortController, "f").signal;
|
|
3751
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownMouseoverListener).call(this, signal);
|
|
3752
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownCountryClickListener).call(this, signal);
|
|
3753
|
-
if (!__classPrivateFieldGet3(this, _Iti_options, "f").dropdownAlwaysOpen) {
|
|
3754
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownClickOffListener).call(this, signal);
|
|
3755
|
-
}
|
|
3756
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownKeydownListener).call(this, signal);
|
|
3757
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").countrySearch) {
|
|
3758
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_bindDropdownSearchListeners).call(this, signal);
|
|
3759
|
-
}
|
|
3760
|
-
}, _Iti_bindDropdownMouseoverListener = function _Iti_bindDropdownMouseoverListener2(signal) {
|
|
3761
|
-
const handleMouseoverCountryList = (e) => {
|
|
3762
|
-
var _b;
|
|
3763
|
-
const listItem = (_b = e.target) === null || _b === void 0 ? void 0 : _b.closest(`.${CLASSES.COUNTRY_ITEM}`);
|
|
3764
|
-
if (listItem) {
|
|
3765
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").highlightListItem(listItem, false);
|
|
3766
|
-
}
|
|
3767
|
-
};
|
|
3768
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").countryList.addEventListener("mouseover", handleMouseoverCountryList, {
|
|
3769
|
-
signal
|
|
3770
|
-
});
|
|
3771
|
-
}, _Iti_bindDropdownCountryClickListener = function _Iti_bindDropdownCountryClickListener2(signal) {
|
|
3772
|
-
const handleClickCountryList = (e) => {
|
|
3773
|
-
var _b;
|
|
3774
|
-
const listItem = (_b = e.target) === null || _b === void 0 ? void 0 : _b.closest(`.${CLASSES.COUNTRY_ITEM}`);
|
|
3775
|
-
if (listItem) {
|
|
3776
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_selectListItem).call(this, listItem);
|
|
3777
|
-
}
|
|
3778
|
-
};
|
|
3779
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").countryList.addEventListener("click", handleClickCountryList, {
|
|
3780
|
-
signal
|
|
3781
|
-
});
|
|
3782
|
-
}, _Iti_bindDropdownClickOffListener = function _Iti_bindDropdownClickOffListener2(signal) {
|
|
3783
|
-
const handleClickOffToClose = (e) => {
|
|
3784
|
-
const target = e.target;
|
|
3785
|
-
const clickedInsideDropdown = !!target.closest(`#iti-${this.id}__dropdown-content`);
|
|
3786
|
-
if (!clickedInsideDropdown) {
|
|
3787
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this);
|
|
3788
|
-
}
|
|
3789
|
-
};
|
|
3790
|
-
setTimeout(() => {
|
|
3791
|
-
document.documentElement.addEventListener("click", handleClickOffToClose, { signal });
|
|
3792
|
-
}, 0);
|
|
3793
|
-
}, _Iti_bindDropdownKeydownListener = function _Iti_bindDropdownKeydownListener2(signal) {
|
|
3794
|
-
let query = "";
|
|
3795
|
-
let queryTimer = null;
|
|
3796
|
-
const handleKeydownOnDropdown = (e) => {
|
|
3797
|
-
const allowedKeys = [
|
|
3798
|
-
KEYS.ARROW_UP,
|
|
3799
|
-
KEYS.ARROW_DOWN,
|
|
3800
|
-
KEYS.ENTER,
|
|
3801
|
-
KEYS.ESC
|
|
3802
|
-
];
|
|
3803
|
-
if (allowedKeys.includes(e.key)) {
|
|
3804
|
-
e.preventDefault();
|
|
3805
|
-
e.stopPropagation();
|
|
3806
|
-
if (e.key === KEYS.ARROW_UP || e.key === KEYS.ARROW_DOWN) {
|
|
3807
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").handleUpDownKey(e.key);
|
|
3808
|
-
} else if (e.key === KEYS.ENTER && !e.isComposing) {
|
|
3809
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_handleEnterKey).call(this);
|
|
3810
|
-
} else if (e.key === KEYS.ESC) {
|
|
3811
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this);
|
|
3812
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountry.focus();
|
|
3813
|
-
}
|
|
3814
|
-
}
|
|
3815
|
-
if (!__classPrivateFieldGet3(this, _Iti_options, "f").countrySearch && REGEX.HIDDEN_SEARCH_CHAR.test(e.key)) {
|
|
3816
|
-
e.stopPropagation();
|
|
3817
|
-
if (queryTimer) {
|
|
3818
|
-
clearTimeout(queryTimer);
|
|
3819
|
-
}
|
|
3820
|
-
query += e.key.toLowerCase();
|
|
3821
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_searchForCountry).call(this, query);
|
|
3822
|
-
queryTimer = setTimeout(() => {
|
|
3823
|
-
query = "";
|
|
3824
|
-
}, TIMINGS.HIDDEN_SEARCH_RESET_MS);
|
|
3825
|
-
}
|
|
3826
|
-
};
|
|
3827
|
-
document.addEventListener("keydown", handleKeydownOnDropdown, { signal });
|
|
3828
|
-
}, _Iti_bindDropdownSearchListeners = function _Iti_bindDropdownSearchListeners2(signal) {
|
|
3829
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").searchInput.addEventListener("input", () => __classPrivateFieldGet3(this, _Iti_ui, "f").handleSearchChange(), { signal });
|
|
3830
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").searchClearButton.addEventListener("click", () => __classPrivateFieldGet3(this, _Iti_ui, "f").handleSearchClear(), { signal });
|
|
3831
|
-
}, _Iti_searchForCountry = function _Iti_searchForCountry2(query) {
|
|
3832
|
-
const match = findFirstCountryStartingWith(__classPrivateFieldGet3(this, _Iti_countries, "f"), query);
|
|
3833
|
-
if (match) {
|
|
3834
|
-
const listItem = match.nodeById[this.id];
|
|
3835
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").highlightListItem(listItem, false);
|
|
3836
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").scrollCountryListToItem(listItem);
|
|
3837
|
-
}
|
|
3838
|
-
}, _Iti_handleEnterKey = function _Iti_handleEnterKey2() {
|
|
3839
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").highlightedItem) {
|
|
3840
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_selectListItem).call(this, __classPrivateFieldGet3(this, _Iti_ui, "f").highlightedItem);
|
|
3841
|
-
}
|
|
3842
|
-
}, _Iti_updateValFromNumber = function _Iti_updateValFromNumber2(fullNumber) {
|
|
3843
|
-
var _b;
|
|
3844
|
-
const { formatOnDisplay, nationalMode, separateDialCode } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3845
|
-
let number = fullNumber;
|
|
3846
|
-
if (formatOnDisplay && intlTelInput.utils && __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) {
|
|
3847
|
-
const isRegionless = hasRegionlessDialCode(fullNumber);
|
|
3848
|
-
const useNational = nationalMode && !isRegionless || !number.startsWith("+") && !separateDialCode;
|
|
3849
|
-
const { NATIONAL, INTERNATIONAL } = intlTelInput.utils.numberFormat;
|
|
3850
|
-
const format = useNational ? NATIONAL : INTERNATIONAL;
|
|
3851
|
-
number = intlTelInput.utils.formatNumber(number, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2, format);
|
|
3852
|
-
}
|
|
3853
|
-
number = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_beforeSetNumber).call(this, number);
|
|
3854
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, number);
|
|
3855
|
-
}, _Iti_updateCountryFromNumber = function _Iti_updateCountryFromNumber2(fullNumber) {
|
|
3856
|
-
const iso2 = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getNewCountryFromNumber).call(this, fullNumber);
|
|
3857
|
-
if (iso2 !== null) {
|
|
3858
|
-
return __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, iso2);
|
|
3859
|
-
}
|
|
3860
|
-
return false;
|
|
3861
|
-
}, _Iti_ensureHasDialCode = function _Iti_ensureHasDialCode2(number) {
|
|
3862
|
-
var _b, _c;
|
|
3863
|
-
const dialCode = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.dialCode;
|
|
3864
|
-
const nationalPrefix = (_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.nationalPrefix;
|
|
3865
|
-
const alreadyHasPlus = number.startsWith("+");
|
|
3866
|
-
if (alreadyHasPlus || !dialCode) {
|
|
3867
|
-
return number;
|
|
3868
|
-
}
|
|
3869
|
-
const hasPrefix = nationalPrefix && number.startsWith(nationalPrefix) && !__classPrivateFieldGet3(this, _Iti_options, "f").separateDialCode;
|
|
3870
|
-
const cleanNumber = hasPrefix ? number.substring(1) : number;
|
|
3871
|
-
return `+${dialCode}${cleanNumber}`;
|
|
3872
|
-
}, _Iti_getNewCountryFromNumber = function _Iti_getNewCountryFromNumber2(fullNumber) {
|
|
3873
|
-
var _b, _c, _d, _e, _f;
|
|
3874
|
-
const plusIndex = fullNumber.indexOf("+");
|
|
3875
|
-
let number = plusIndex ? fullNumber.substring(plusIndex) : fullNumber;
|
|
3876
|
-
const selectedIso2 = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3877
|
-
const selectedDialCode = (_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.dialCode;
|
|
3878
|
-
number = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_ensureHasDialCode).call(this, number);
|
|
3879
|
-
const dialCodeMatch = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getDialCode).call(this, number, true);
|
|
3880
|
-
const numeric = getNumeric(number);
|
|
3881
|
-
if (dialCodeMatch) {
|
|
3882
|
-
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
|
|
3883
|
-
const iso2Codes = __classPrivateFieldGet3(this, _Iti_dialCodeToIso2Map, "f")[dialCodeMatchNumeric];
|
|
3884
|
-
if (iso2Codes.length === 1) {
|
|
3885
|
-
if (iso2Codes[0] === selectedIso2) {
|
|
3886
|
-
return null;
|
|
3887
|
-
}
|
|
3888
|
-
return iso2Codes[0];
|
|
3889
|
-
}
|
|
3890
|
-
if (!selectedIso2 && __classPrivateFieldGet3(this, _Iti_defaultCountry, "f") && iso2Codes.includes(__classPrivateFieldGet3(this, _Iti_defaultCountry, "f"))) {
|
|
3891
|
-
return __classPrivateFieldGet3(this, _Iti_defaultCountry, "f");
|
|
3892
|
-
}
|
|
3893
|
-
const isRegionlessNanpNumber = selectedDialCode === DIAL.NANP && isRegionlessNanp(numeric);
|
|
3894
|
-
if (isRegionlessNanpNumber) {
|
|
3895
|
-
return null;
|
|
3896
|
-
}
|
|
3897
|
-
const areaCodes = (_d = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _d === void 0 ? void 0 : _d.areaCodes;
|
|
3898
|
-
const priority = (_e = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _e === void 0 ? void 0 : _e.priority;
|
|
3899
|
-
if (areaCodes) {
|
|
3900
|
-
const dialCodeAreaCodes = areaCodes.map((areaCode) => `${selectedDialCode}${areaCode}`);
|
|
3901
|
-
for (const dialCodeAreaCode of dialCodeAreaCodes) {
|
|
3902
|
-
if (numeric.startsWith(dialCodeAreaCode)) {
|
|
3903
|
-
return null;
|
|
3904
|
-
}
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
const isMainCountry = priority === 0;
|
|
3908
|
-
const hasAreaCodesButNoneMatched = areaCodes && !isMainCountry && numeric.length > dialCodeMatchNumeric.length;
|
|
3909
|
-
const isValidSelection = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
|
|
3910
|
-
const alreadySelected = selectedIso2 === iso2Codes[0];
|
|
3911
|
-
if (!isValidSelection && !alreadySelected) {
|
|
3912
|
-
return iso2Codes[0];
|
|
3913
|
-
}
|
|
3914
|
-
} else if (number.startsWith("+") && numeric.length) {
|
|
3915
|
-
const currentDial = ((_f = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _f === void 0 ? void 0 : _f.dialCode) || "";
|
|
3916
|
-
if (currentDial && currentDial.startsWith(numeric)) {
|
|
3917
|
-
return null;
|
|
3918
|
-
}
|
|
3919
|
-
return "";
|
|
3920
|
-
} else if ((!number || number === "+") && !selectedIso2 && __classPrivateFieldGet3(this, _Iti_defaultCountry, "f")) {
|
|
3921
|
-
return __classPrivateFieldGet3(this, _Iti_defaultCountry, "f");
|
|
3922
|
-
}
|
|
3923
|
-
return null;
|
|
3924
|
-
}, _Iti_setCountry = function _Iti_setCountry2(iso2) {
|
|
3925
|
-
var _b, _c, _d;
|
|
3926
|
-
const prevIso2 = ((_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2) || "";
|
|
3927
|
-
__classPrivateFieldSet3(this, _Iti_selectedCountryData, iso2 ? __classPrivateFieldGet3(this, _Iti_countryByIso2, "f").get(iso2) : null, "f");
|
|
3928
|
-
if ((_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.iso2) {
|
|
3929
|
-
__classPrivateFieldSet3(this, _Iti_defaultCountry, __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f").iso2, "f");
|
|
3930
|
-
}
|
|
3931
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").setCountry((_d = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) !== null && _d !== void 0 ? _d : {});
|
|
3932
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updatePlaceholder).call(this);
|
|
3933
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateMaxLength).call(this);
|
|
3934
|
-
return prevIso2 !== iso2;
|
|
3935
|
-
}, _Iti_updateMaxLength = function _Iti_updateMaxLength2() {
|
|
3936
|
-
var _b;
|
|
3937
|
-
const { strictMode, placeholderNumberType, allowedNumberTypes } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3938
|
-
const iso2 = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2;
|
|
3939
|
-
if (strictMode && intlTelInput.utils) {
|
|
3940
|
-
if (iso2) {
|
|
3941
|
-
const numberType = intlTelInput.utils.numberType[placeholderNumberType];
|
|
3942
|
-
let exampleNumber = intlTelInput.utils.getExampleNumber(iso2, false, numberType, true);
|
|
3943
|
-
let validNumber = exampleNumber;
|
|
3944
|
-
while (intlTelInput.utils.isPossibleNumber(exampleNumber, iso2, allowedNumberTypes)) {
|
|
3945
|
-
validNumber = exampleNumber;
|
|
3946
|
-
exampleNumber += "0";
|
|
3947
|
-
}
|
|
3948
|
-
const coreNumber = intlTelInput.utils.getCoreNumber(validNumber, iso2);
|
|
3949
|
-
__classPrivateFieldSet3(this, _Iti_maxCoreNumberLength, coreNumber.length, "f");
|
|
3950
|
-
if (iso2 === "by") {
|
|
3951
|
-
__classPrivateFieldSet3(this, _Iti_maxCoreNumberLength, coreNumber.length + 1, "f");
|
|
3952
|
-
}
|
|
3953
|
-
} else {
|
|
3954
|
-
__classPrivateFieldSet3(this, _Iti_maxCoreNumberLength, null, "f");
|
|
3955
|
-
}
|
|
3956
|
-
}
|
|
3957
|
-
}, _Iti_updatePlaceholder = function _Iti_updatePlaceholder2() {
|
|
3958
|
-
var _b, _c;
|
|
3959
|
-
const { autoPlaceholder, placeholderNumberType, nationalMode, customPlaceholder } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
3960
|
-
const shouldSetPlaceholder = autoPlaceholder === PLACEHOLDER_MODES.AGGRESSIVE || !__classPrivateFieldGet3(this, _Iti_ui, "f").hadInitialPlaceholder && autoPlaceholder === PLACEHOLDER_MODES.POLITE;
|
|
3961
|
-
if (intlTelInput.utils && shouldSetPlaceholder) {
|
|
3962
|
-
const numberType = intlTelInput.utils.numberType[placeholderNumberType];
|
|
3963
|
-
let placeholder = ((_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2) ? intlTelInput.utils.getExampleNumber(__classPrivateFieldGet3(this, _Iti_selectedCountryData, "f").iso2, nationalMode, numberType) : "";
|
|
3964
|
-
placeholder = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_beforeSetNumber).call(this, placeholder);
|
|
3965
|
-
if (typeof customPlaceholder === "function") {
|
|
3966
|
-
placeholder = customPlaceholder(placeholder, (_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) !== null && _c !== void 0 ? _c : {});
|
|
3967
|
-
}
|
|
3968
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.setAttribute("placeholder", placeholder);
|
|
3969
|
-
}
|
|
3970
|
-
}, _Iti_selectListItem = function _Iti_selectListItem2(listItem) {
|
|
3971
|
-
const iso2 = listItem.dataset[DATA_KEYS.COUNTRY_CODE];
|
|
3972
|
-
const countryChanged = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setCountry).call(this, iso2);
|
|
3973
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_closeDropdown).call(this);
|
|
3974
|
-
const dialCode = listItem.dataset[DATA_KEYS.DIAL_CODE];
|
|
3975
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateDialCode).call(this, dialCode);
|
|
3976
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").formatOnDisplay) {
|
|
3977
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3978
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateValFromNumber).call(this, inputValue);
|
|
3979
|
-
}
|
|
3980
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").telInput.focus();
|
|
3981
|
-
if (countryChanged) {
|
|
3982
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_triggerCountryChange).call(this);
|
|
3983
|
-
}
|
|
3984
|
-
}, _Iti_closeDropdown = function _Iti_closeDropdown2(isDestroy) {
|
|
3985
|
-
if (__classPrivateFieldGet3(this, _Iti_ui, "f").isDropdownClosed() || __classPrivateFieldGet3(this, _Iti_options, "f").dropdownAlwaysOpen && !isDestroy) {
|
|
3986
|
-
return;
|
|
3987
|
-
}
|
|
3988
|
-
__classPrivateFieldGet3(this, _Iti_ui, "f").closeDropdown();
|
|
3989
|
-
__classPrivateFieldGet3(this, _Iti_dropdownAbortController, "f").abort();
|
|
3990
|
-
__classPrivateFieldSet3(this, _Iti_dropdownAbortController, null, "f");
|
|
3991
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_trigger).call(this, EVENTS.CLOSE_COUNTRY_DROPDOWN);
|
|
3992
|
-
}, _Iti_updateDialCode = function _Iti_updateDialCode2(newDialCodeBare) {
|
|
3993
|
-
const inputVal = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
3994
|
-
const newDialCode = `+${newDialCodeBare}`;
|
|
3995
|
-
let newNumber;
|
|
3996
|
-
if (inputVal.startsWith("+")) {
|
|
3997
|
-
const prevDialCode = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getDialCode).call(this, inputVal);
|
|
3998
|
-
if (prevDialCode) {
|
|
3999
|
-
newNumber = inputVal.replace(prevDialCode, newDialCode);
|
|
4000
|
-
} else {
|
|
4001
|
-
newNumber = newDialCode;
|
|
4002
|
-
}
|
|
4003
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setTelInputValue).call(this, newNumber);
|
|
4004
|
-
}
|
|
4005
|
-
}, _Iti_getDialCode = function _Iti_getDialCode2(number, includeAreaCode) {
|
|
4006
|
-
let dialCode = "";
|
|
4007
|
-
if (number.startsWith("+")) {
|
|
4008
|
-
let numericChars = "";
|
|
4009
|
-
let foundBaseDialCode = false;
|
|
4010
|
-
for (let i = 0; i < number.length; i++) {
|
|
4011
|
-
const c = number.charAt(i);
|
|
4012
|
-
if (/[0-9]/.test(c)) {
|
|
4013
|
-
numericChars += c;
|
|
4014
|
-
const hasMapEntry = Boolean(__classPrivateFieldGet3(this, _Iti_dialCodeToIso2Map, "f")[numericChars]);
|
|
4015
|
-
if (!hasMapEntry) {
|
|
4016
|
-
break;
|
|
4017
|
-
}
|
|
4018
|
-
if (__classPrivateFieldGet3(this, _Iti_dialCodes, "f").has(numericChars)) {
|
|
4019
|
-
dialCode = number.substring(0, i + 1);
|
|
4020
|
-
foundBaseDialCode = true;
|
|
4021
|
-
if (!includeAreaCode) {
|
|
4022
|
-
break;
|
|
4023
|
-
}
|
|
4024
|
-
} else if (includeAreaCode && foundBaseDialCode) {
|
|
4025
|
-
dialCode = number.substring(0, i + 1);
|
|
4026
|
-
}
|
|
4027
|
-
if (numericChars.length === __classPrivateFieldGet3(this, _Iti_dialCodeMaxLen, "f")) {
|
|
4028
|
-
break;
|
|
4029
|
-
}
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
}
|
|
4033
|
-
return dialCode;
|
|
4034
|
-
}, _Iti_getFullNumber = function _Iti_getFullNumber2(overrideVal) {
|
|
4035
|
-
var _b;
|
|
4036
|
-
const val = overrideVal ? __classPrivateFieldGet3(this, _Iti_numerals, "f").normalise(overrideVal) : __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
4037
|
-
const dialCode = (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.dialCode;
|
|
4038
|
-
let prefix;
|
|
4039
|
-
const numericVal = getNumeric(val);
|
|
4040
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").separateDialCode && !val.startsWith("+") && dialCode && numericVal) {
|
|
4041
|
-
prefix = `+${dialCode}`;
|
|
4042
|
-
} else {
|
|
4043
|
-
prefix = "";
|
|
4044
|
-
}
|
|
4045
|
-
return prefix + val;
|
|
4046
|
-
}, _Iti_beforeSetNumber = function _Iti_beforeSetNumber2(fullNumber) {
|
|
4047
|
-
var _b;
|
|
4048
|
-
const hasValidDialCode = Boolean(__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getDialCode).call(this, fullNumber));
|
|
4049
|
-
const number = beforeSetNumber(fullNumber, hasValidDialCode, __classPrivateFieldGet3(this, _Iti_options, "f").separateDialCode, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) !== null && _b !== void 0 ? _b : {});
|
|
4050
|
-
return __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_cap).call(this, number);
|
|
4051
|
-
}, _Iti_getPublicCountryData = function _Iti_getPublicCountryData2() {
|
|
4052
|
-
const d = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f");
|
|
4053
|
-
if (!d)
|
|
4054
|
-
return {};
|
|
4055
|
-
const { iso2, dialCode, name } = d;
|
|
4056
|
-
return { iso2, dialCode, name };
|
|
4057
|
-
}, _Iti_triggerCountryChange = function _Iti_triggerCountryChange2() {
|
|
4058
|
-
const countryData = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getPublicCountryData).call(this);
|
|
4059
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_trigger).call(this, EVENTS.COUNTRY_CHANGE, countryData);
|
|
4060
|
-
}, _Iti_handleAutoCountry = function _Iti_handleAutoCountry2() {
|
|
4061
|
-
var _b, _c;
|
|
4062
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
4063
|
-
(_b = __classPrivateFieldGet3(this, _Iti_resolveAutoCountryPromise, "f")) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
4064
|
-
return;
|
|
4065
|
-
}
|
|
4066
|
-
if (__classPrivateFieldGet3(this, _Iti_options, "f").initialCountry === INITIAL_COUNTRY.AUTO && intlTelInput.autoCountry) {
|
|
4067
|
-
__classPrivateFieldSet3(this, _Iti_defaultCountry, intlTelInput.autoCountry, "f");
|
|
4068
|
-
const hasSelectedCountryOrGlobe = ((_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.iso2) || __classPrivateFieldGet3(this, _Iti_ui, "f").selectedCountryInner.classList.contains(CLASSES.GLOBE);
|
|
4069
|
-
if (!hasSelectedCountryOrGlobe) {
|
|
4070
|
-
this.setCountry(__classPrivateFieldGet3(this, _Iti_defaultCountry, "f"));
|
|
4071
|
-
}
|
|
4072
|
-
__classPrivateFieldGet3(this, _Iti_resolveAutoCountryPromise, "f").call(this);
|
|
4073
|
-
}
|
|
4074
|
-
}, _Iti_handleAutoCountryFailure = function _Iti_handleAutoCountryFailure2() {
|
|
4075
|
-
var _b;
|
|
4076
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
4077
|
-
(_b = __classPrivateFieldGet3(this, _Iti_rejectAutoCountryPromise, "f")) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
4078
|
-
return;
|
|
4079
|
-
}
|
|
4080
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_setInitialState).call(this, true);
|
|
4081
|
-
__classPrivateFieldGet3(this, _Iti_rejectAutoCountryPromise, "f").call(this);
|
|
4082
|
-
}, _Iti_handleUtils = function _Iti_handleUtils2() {
|
|
4083
|
-
var _b, _c;
|
|
4084
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
4085
|
-
(_b = __classPrivateFieldGet3(this, _Iti_resolveUtilsScriptPromise, "f")) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
4086
|
-
return;
|
|
4087
|
-
}
|
|
4088
|
-
if (intlTelInput.utils) {
|
|
4089
|
-
const inputValue = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getTelInputValue).call(this);
|
|
4090
|
-
if (inputValue) {
|
|
4091
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateValFromNumber).call(this, inputValue);
|
|
4092
|
-
}
|
|
4093
|
-
if ((_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.iso2) {
|
|
4094
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updatePlaceholder).call(this);
|
|
4095
|
-
__classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_updateMaxLength).call(this);
|
|
4096
|
-
}
|
|
4097
|
-
}
|
|
4098
|
-
__classPrivateFieldGet3(this, _Iti_resolveUtilsScriptPromise, "f").call(this);
|
|
4099
|
-
}, _Iti_handleUtilsFailure = function _Iti_handleUtilsFailure2(error) {
|
|
4100
|
-
var _b;
|
|
4101
|
-
if (!__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
4102
|
-
(_b = __classPrivateFieldGet3(this, _Iti_rejectUtilsScriptPromise, "f")) === null || _b === void 0 ? void 0 : _b.call(this, error);
|
|
4103
|
-
return;
|
|
4104
|
-
}
|
|
4105
|
-
__classPrivateFieldGet3(this, _Iti_rejectUtilsScriptPromise, "f").call(this, error);
|
|
4106
|
-
}, _Iti_utilsIsPossibleNumber = function _Iti_utilsIsPossibleNumber2(val) {
|
|
4107
|
-
var _b;
|
|
4108
|
-
return intlTelInput.utils ? intlTelInput.utils.isPossibleNumber(val, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2, __classPrivateFieldGet3(this, _Iti_options, "f").allowedNumberTypes) : null;
|
|
4109
|
-
}, _Iti_validateNumber = function _Iti_validateNumber2(precise) {
|
|
4110
|
-
var _b, _c;
|
|
4111
|
-
if (!intlTelInput.utils || !__classPrivateFieldGet3(this, _Iti_ui, "f").telInput) {
|
|
4112
|
-
return null;
|
|
4113
|
-
}
|
|
4114
|
-
const { allowNumberExtensions, allowPhonewords } = __classPrivateFieldGet3(this, _Iti_options, "f");
|
|
4115
|
-
const testValidity = (s) => precise ? __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_utilsIsValidNumber).call(this, s) : __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_utilsIsPossibleNumber).call(this, s);
|
|
4116
|
-
const val = __classPrivateFieldGet3(this, _Iti_instances, "m", _Iti_getFullNumber).call(this);
|
|
4117
|
-
if (!((_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2)) {
|
|
4118
|
-
const isRegionlessDialCode = hasRegionlessDialCode(val);
|
|
4119
|
-
if (!isRegionlessDialCode) {
|
|
4120
|
-
return false;
|
|
4121
|
-
}
|
|
4122
|
-
}
|
|
4123
|
-
if (!testValidity(val)) {
|
|
4124
|
-
return false;
|
|
4125
|
-
}
|
|
4126
|
-
const alphaCharPosition = val.search(REGEX.ALPHA_UNICODE);
|
|
4127
|
-
const hasAlphaChar = alphaCharPosition > -1;
|
|
4128
|
-
if (hasAlphaChar) {
|
|
4129
|
-
const selectedIso2 = (_c = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _c === void 0 ? void 0 : _c.iso2;
|
|
4130
|
-
const hasExtension = Boolean(intlTelInput.utils.getExtension(val, selectedIso2));
|
|
4131
|
-
if (hasExtension) {
|
|
4132
|
-
return allowNumberExtensions;
|
|
4133
|
-
}
|
|
4134
|
-
return allowPhonewords;
|
|
4135
|
-
}
|
|
4136
|
-
return true;
|
|
4137
|
-
}, _Iti_utilsIsValidNumber = function _Iti_utilsIsValidNumber2(val) {
|
|
4138
|
-
var _b;
|
|
4139
|
-
return intlTelInput.utils ? intlTelInput.utils.isValidNumber(val, (_b = __classPrivateFieldGet3(this, _Iti_selectedCountryData, "f")) === null || _b === void 0 ? void 0 : _b.iso2, __classPrivateFieldGet3(this, _Iti_options, "f").allowedNumberTypes) : null;
|
|
4140
|
-
};
|
|
4141
|
-
var attachUtils = (source) => {
|
|
4142
|
-
if (!intlTelInput.utils && !intlTelInput.startedLoadingUtilsScript) {
|
|
4143
|
-
let loadCall;
|
|
4144
|
-
if (typeof source === "function") {
|
|
4145
|
-
try {
|
|
4146
|
-
loadCall = Promise.resolve(source());
|
|
4147
|
-
} catch (error) {
|
|
4148
|
-
return Promise.reject(error);
|
|
4149
|
-
}
|
|
4150
|
-
} else {
|
|
4151
|
-
return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof source}`));
|
|
4152
|
-
}
|
|
4153
|
-
intlTelInput.startedLoadingUtilsScript = true;
|
|
4154
|
-
return loadCall.then((module) => {
|
|
4155
|
-
const utils = module === null || module === void 0 ? void 0 : module.default;
|
|
4156
|
-
if (!utils || typeof utils !== "object") {
|
|
4157
|
-
throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
|
|
4158
|
-
}
|
|
4159
|
-
intlTelInput.utils = utils;
|
|
4160
|
-
Iti.forEachInstance("handleUtils");
|
|
4161
|
-
return true;
|
|
4162
|
-
}).catch((error) => {
|
|
4163
|
-
Iti.forEachInstance("handleUtilsFailure", error);
|
|
4164
|
-
throw error;
|
|
4165
|
-
});
|
|
4166
|
-
}
|
|
4167
|
-
return null;
|
|
4168
|
-
};
|
|
4169
|
-
var intlTelInput = Object.assign((input, options) => {
|
|
4170
|
-
const iti = new Iti(input, options);
|
|
4171
|
-
intlTelInput.instances[iti.id] = iti;
|
|
4172
|
-
input.iti = iti;
|
|
4173
|
-
return iti;
|
|
4174
|
-
}, {
|
|
4175
|
-
defaults,
|
|
4176
|
-
//* Using a static var like this allows us to mock it in the tests.
|
|
4177
|
-
documentReady: () => document.readyState === "complete",
|
|
4178
|
-
//* Get the country data object.
|
|
4179
|
-
getCountryData: () => data_default,
|
|
4180
|
-
//* A getter for the plugin instance.
|
|
4181
|
-
getInstance: (input) => {
|
|
4182
|
-
const id2 = input.dataset.intlTelInputId;
|
|
4183
|
-
return id2 ? intlTelInput.instances[id2] : null;
|
|
4184
|
-
},
|
|
4185
|
-
//* A map from instance ID to instance object.
|
|
4186
|
-
instances: {},
|
|
4187
|
-
attachUtils,
|
|
4188
|
-
startedLoadingUtilsScript: false,
|
|
4189
|
-
startedLoadingAutoCountry: false,
|
|
4190
|
-
version: "26.9.2"
|
|
4191
|
-
});
|
|
4192
|
-
var intl_tel_input_default = intlTelInput;
|
|
4193
|
-
|
|
4194
|
-
// angular/build/temp/intl-tel-input/angular.js
|
|
4195
|
-
import { Component, Input, ViewChild, ElementRef, Output, EventEmitter, forwardRef } from "@angular/core";
|
|
4196
|
-
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from "@angular/forms";
|
|
4197
|
-
import * as i0 from "@angular/core";
|
|
4198
|
-
var _c0 = ["inputRef"];
|
|
4199
|
-
var PHONE_ERROR_MESSAGES = [
|
|
4200
|
-
"invalid",
|
|
4201
|
-
"invalid-country-code",
|
|
4202
|
-
"too-short",
|
|
4203
|
-
"too-long",
|
|
4204
|
-
"invalid-format"
|
|
4205
|
-
];
|
|
4206
|
-
var IntlTelInputComponent = class {
|
|
4207
|
-
constructor() {
|
|
4208
|
-
this.usePreciseValidation = false;
|
|
4209
|
-
this.inputProps = {};
|
|
4210
|
-
this.disabled = false;
|
|
4211
|
-
this.numberChange = new EventEmitter();
|
|
4212
|
-
this.countryChange = new EventEmitter();
|
|
4213
|
-
this.validityChange = new EventEmitter();
|
|
4214
|
-
this.errorCodeChange = new EventEmitter();
|
|
4215
|
-
this.blur = new EventEmitter();
|
|
4216
|
-
this.focus = new EventEmitter();
|
|
4217
|
-
this.keydown = new EventEmitter();
|
|
4218
|
-
this.keyup = new EventEmitter();
|
|
4219
|
-
this.paste = new EventEmitter();
|
|
4220
|
-
this.click = new EventEmitter();
|
|
4221
|
-
this.appliedInputPropKeys = /* @__PURE__ */ new Set();
|
|
4222
|
-
this.countryChangeHandler = () => this.handleInput();
|
|
4223
|
-
this.onChange = () => {
|
|
4224
|
-
};
|
|
4225
|
-
this.onTouched = () => {
|
|
4226
|
-
};
|
|
4227
|
-
this.onValidatorChange = () => {
|
|
4228
|
-
};
|
|
4229
|
-
}
|
|
4230
|
-
ngAfterViewInit() {
|
|
4231
|
-
var _a3, _b;
|
|
4232
|
-
if (this.inputRef.nativeElement) {
|
|
4233
|
-
this.iti = intl_tel_input_default(this.inputRef.nativeElement, this.initOptions);
|
|
4234
|
-
}
|
|
4235
|
-
this.inputRef.nativeElement.addEventListener("countrychange", this.countryChangeHandler);
|
|
4236
|
-
this.applyInputProps();
|
|
4237
|
-
if (this.initialValue) {
|
|
4238
|
-
(_a3 = this.iti) === null || _a3 === void 0 ? void 0 : _a3.setNumber(this.initialValue);
|
|
4239
|
-
}
|
|
4240
|
-
if (this.disabled) {
|
|
4241
|
-
(_b = this.iti) === null || _b === void 0 ? void 0 : _b.setDisabled(this.disabled);
|
|
4242
|
-
}
|
|
4243
|
-
}
|
|
4244
|
-
ngOnChanges(changes) {
|
|
4245
|
-
var _a3;
|
|
4246
|
-
if (changes["disabled"]) {
|
|
4247
|
-
(_a3 = this.iti) === null || _a3 === void 0 ? void 0 : _a3.setDisabled(this.disabled);
|
|
4248
|
-
}
|
|
4249
|
-
if (changes["inputProps"]) {
|
|
4250
|
-
this.applyInputProps();
|
|
4251
|
-
}
|
|
4252
|
-
}
|
|
4253
|
-
handleInput() {
|
|
4254
|
-
if (!this.iti)
|
|
4255
|
-
return;
|
|
4256
|
-
const num = this.iti.getNumber() || "";
|
|
4257
|
-
const countryIso = this.iti.getSelectedCountryData().iso2 || "";
|
|
4258
|
-
let hasChanged = false;
|
|
4259
|
-
if (num !== this.lastEmittedNumber) {
|
|
4260
|
-
this.lastEmittedNumber = num;
|
|
4261
|
-
this.numberChange.emit(num);
|
|
4262
|
-
this.onChange(num);
|
|
4263
|
-
hasChanged = true;
|
|
4264
|
-
}
|
|
4265
|
-
if (countryIso !== this.lastEmittedCountry) {
|
|
4266
|
-
this.lastEmittedCountry = countryIso;
|
|
4267
|
-
this.countryChange.emit(countryIso);
|
|
4268
|
-
hasChanged = true;
|
|
4269
|
-
}
|
|
4270
|
-
const isValid = this.usePreciseValidation ? this.iti.isValidNumberPrecise() : this.iti.isValidNumber();
|
|
4271
|
-
const errorCode = isValid ? null : this.iti.getValidationError();
|
|
4272
|
-
if (isValid !== this.lastEmittedValidity) {
|
|
4273
|
-
this.lastEmittedValidity = isValid;
|
|
4274
|
-
this.validityChange.emit(isValid);
|
|
4275
|
-
hasChanged = true;
|
|
4276
|
-
}
|
|
4277
|
-
if (errorCode !== this.lastEmittedErrorCode) {
|
|
4278
|
-
this.lastEmittedErrorCode = errorCode;
|
|
4279
|
-
this.errorCodeChange.emit(errorCode);
|
|
4280
|
-
hasChanged = true;
|
|
4281
|
-
}
|
|
4282
|
-
if (hasChanged) {
|
|
4283
|
-
this.onValidatorChange();
|
|
4284
|
-
}
|
|
4285
|
-
}
|
|
4286
|
-
handleBlur(event) {
|
|
4287
|
-
this.onTouched();
|
|
4288
|
-
this.blur.emit(event);
|
|
4289
|
-
}
|
|
4290
|
-
handleFocus(event) {
|
|
4291
|
-
this.focus.emit(event);
|
|
4292
|
-
}
|
|
4293
|
-
handleKeyDown(event) {
|
|
4294
|
-
this.keydown.emit(event);
|
|
4295
|
-
}
|
|
4296
|
-
handleKeyUp(event) {
|
|
4297
|
-
this.keyup.emit(event);
|
|
4298
|
-
}
|
|
4299
|
-
handlePaste(event) {
|
|
4300
|
-
this.paste.emit(event);
|
|
4301
|
-
}
|
|
4302
|
-
handleClick(event) {
|
|
4303
|
-
this.click.emit(event);
|
|
4304
|
-
}
|
|
4305
|
-
/**
|
|
4306
|
-
* This method must be called in `ngAfterViewInit` or later lifecycle hooks,
|
|
4307
|
-
* not in `ngOnInit` or the `constructor`, as the component needs to be fully initialized.
|
|
4308
|
-
*/
|
|
4309
|
-
getInstance() {
|
|
4310
|
-
return this.iti;
|
|
4311
|
-
}
|
|
4312
|
-
/**
|
|
4313
|
-
* This method must be called in `ngAfterViewInit` or later lifecycle hooks,
|
|
4314
|
-
* not in `ngOnInit` or the `constructor`, as the component needs to be fully initialized.
|
|
4315
|
-
*/
|
|
4316
|
-
getInput() {
|
|
4317
|
-
return this.inputRef.nativeElement;
|
|
4318
|
-
}
|
|
4319
|
-
ngOnDestroy() {
|
|
4320
|
-
var _a3;
|
|
4321
|
-
(_a3 = this.iti) === null || _a3 === void 0 ? void 0 : _a3.destroy();
|
|
4322
|
-
this.inputRef.nativeElement.removeEventListener("countrychange", this.countryChangeHandler);
|
|
4323
|
-
}
|
|
4324
|
-
applyInputProps() {
|
|
4325
|
-
const currentKeys = /* @__PURE__ */ new Set();
|
|
4326
|
-
Object.entries(this.inputProps).forEach(([key, value]) => {
|
|
4327
|
-
currentKeys.add(key);
|
|
4328
|
-
this.inputRef.nativeElement.setAttribute(key, value);
|
|
4329
|
-
});
|
|
4330
|
-
this.appliedInputPropKeys.forEach((key) => {
|
|
4331
|
-
if (!currentKeys.has(key)) {
|
|
4332
|
-
this.inputRef.nativeElement.removeAttribute(key);
|
|
4333
|
-
}
|
|
4334
|
-
});
|
|
4335
|
-
this.appliedInputPropKeys = currentKeys;
|
|
4336
|
-
}
|
|
4337
|
-
// ============ ControlValueAccessor Implementation ============
|
|
4338
|
-
writeValue(value) {
|
|
4339
|
-
if (this.iti) {
|
|
4340
|
-
this.iti.setNumber(value || "");
|
|
4341
|
-
}
|
|
4342
|
-
}
|
|
4343
|
-
registerOnChange(fn) {
|
|
4344
|
-
this.onChange = fn;
|
|
4345
|
-
}
|
|
4346
|
-
registerOnTouched(fn) {
|
|
4347
|
-
this.onTouched = fn;
|
|
4348
|
-
}
|
|
4349
|
-
setDisabledState(isDisabled) {
|
|
4350
|
-
var _a3;
|
|
4351
|
-
this.disabled = isDisabled;
|
|
4352
|
-
(_a3 = this.iti) === null || _a3 === void 0 ? void 0 : _a3.setDisabled(isDisabled);
|
|
4353
|
-
}
|
|
4354
|
-
// ============ Validator Implementation ============
|
|
4355
|
-
validate(control) {
|
|
4356
|
-
var _a3;
|
|
4357
|
-
if (!control.value || !this.iti) {
|
|
4358
|
-
return null;
|
|
4359
|
-
}
|
|
4360
|
-
const isValid = this.usePreciseValidation ? this.iti.isValidNumberPrecise() : this.iti.isValidNumber();
|
|
4361
|
-
if (isValid) {
|
|
4362
|
-
return null;
|
|
4363
|
-
}
|
|
4364
|
-
const errorCode = this.iti.getValidationError();
|
|
4365
|
-
return {
|
|
4366
|
-
invalidPhone: {
|
|
4367
|
-
errorCode,
|
|
4368
|
-
errorMessage: (_a3 = PHONE_ERROR_MESSAGES[errorCode]) !== null && _a3 !== void 0 ? _a3 : "unknown"
|
|
4369
|
-
}
|
|
4370
|
-
};
|
|
4371
|
-
}
|
|
4372
|
-
registerOnValidatorChange(fn) {
|
|
4373
|
-
this.onValidatorChange = fn;
|
|
4374
|
-
}
|
|
4375
|
-
};
|
|
4376
|
-
IntlTelInputComponent.\u0275fac = function IntlTelInputComponent_Factory(__ngFactoryType__) {
|
|
4377
|
-
return new (__ngFactoryType__ || IntlTelInputComponent)();
|
|
4378
|
-
};
|
|
4379
|
-
IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent({ type: IntlTelInputComponent, selectors: [["intl-tel-input"]], viewQuery: function IntlTelInputComponent_Query(rf, ctx) {
|
|
4380
|
-
if (rf & 1) {
|
|
4381
|
-
i0.\u0275\u0275viewQuery(_c0, 7);
|
|
4382
|
-
}
|
|
4383
|
-
if (rf & 2) {
|
|
4384
|
-
let _t;
|
|
4385
|
-
i0.\u0275\u0275queryRefresh(_t = i0.\u0275\u0275loadQuery()) && (ctx.inputRef = _t.first);
|
|
4386
|
-
}
|
|
4387
|
-
}, inputs: { initialValue: "initialValue", usePreciseValidation: "usePreciseValidation", inputProps: "inputProps", disabled: "disabled", initOptions: "initOptions" }, outputs: { numberChange: "numberChange", countryChange: "countryChange", validityChange: "validityChange", errorCodeChange: "errorCodeChange", blur: "blur", focus: "focus", keydown: "keydown", keyup: "keyup", paste: "paste", click: "click" }, features: [i0.\u0275\u0275ProvidersFeature([
|
|
4388
|
-
{
|
|
4389
|
-
provide: NG_VALUE_ACCESSOR,
|
|
4390
|
-
useExisting: forwardRef(() => IntlTelInputComponent),
|
|
4391
|
-
multi: true
|
|
4392
|
-
},
|
|
4393
|
-
{
|
|
4394
|
-
provide: NG_VALIDATORS,
|
|
4395
|
-
useExisting: forwardRef(() => IntlTelInputComponent),
|
|
4396
|
-
multi: true
|
|
4397
|
-
}
|
|
4398
|
-
]), i0.\u0275\u0275NgOnChangesFeature], decls: 2, vars: 0, consts: [["inputRef", ""], ["type", "tel", 3, "input", "blur", "focus", "keydown", "keyup", "paste", "click"]], template: function IntlTelInputComponent_Template(rf, ctx) {
|
|
4399
|
-
if (rf & 1) {
|
|
4400
|
-
const _r1 = i0.\u0275\u0275getCurrentView();
|
|
4401
|
-
i0.\u0275\u0275elementStart(0, "input", 1, 0);
|
|
4402
|
-
i0.\u0275\u0275listener("input", function IntlTelInputComponent_Template_input_input_0_listener() {
|
|
4403
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4404
|
-
return i0.\u0275\u0275resetView(ctx.handleInput());
|
|
4405
|
-
})("blur", function IntlTelInputComponent_Template_input_blur_0_listener($event) {
|
|
4406
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4407
|
-
return i0.\u0275\u0275resetView(ctx.handleBlur($event));
|
|
4408
|
-
})("focus", function IntlTelInputComponent_Template_input_focus_0_listener($event) {
|
|
4409
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4410
|
-
return i0.\u0275\u0275resetView(ctx.handleFocus($event));
|
|
4411
|
-
})("keydown", function IntlTelInputComponent_Template_input_keydown_0_listener($event) {
|
|
4412
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4413
|
-
return i0.\u0275\u0275resetView(ctx.handleKeyDown($event));
|
|
4414
|
-
})("keyup", function IntlTelInputComponent_Template_input_keyup_0_listener($event) {
|
|
4415
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4416
|
-
return i0.\u0275\u0275resetView(ctx.handleKeyUp($event));
|
|
4417
|
-
})("paste", function IntlTelInputComponent_Template_input_paste_0_listener($event) {
|
|
4418
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4419
|
-
return i0.\u0275\u0275resetView(ctx.handlePaste($event));
|
|
4420
|
-
})("click", function IntlTelInputComponent_Template_input_click_0_listener($event) {
|
|
4421
|
-
i0.\u0275\u0275restoreView(_r1);
|
|
4422
|
-
return i0.\u0275\u0275resetView(ctx.handleClick($event));
|
|
4423
|
-
});
|
|
4424
|
-
i0.\u0275\u0275elementEnd();
|
|
4425
|
-
}
|
|
4426
|
-
}, encapsulation: 2 });
|
|
4427
|
-
(() => {
|
|
4428
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassMetadata(IntlTelInputComponent, [{
|
|
4429
|
-
type: Component,
|
|
4430
|
-
args: [{
|
|
4431
|
-
selector: "intl-tel-input",
|
|
4432
|
-
standalone: true,
|
|
4433
|
-
template: `
|
|
4434
|
-
<input
|
|
4435
|
-
type="tel"
|
|
4436
|
-
#inputRef
|
|
4437
|
-
(input)="handleInput()"
|
|
4438
|
-
(blur)="handleBlur($event)"
|
|
4439
|
-
(focus)="handleFocus($event)"
|
|
4440
|
-
(keydown)="handleKeyDown($event)"
|
|
4441
|
-
(keyup)="handleKeyUp($event)"
|
|
4442
|
-
(paste)="handlePaste($event)"
|
|
4443
|
-
(click)="handleClick($event)"
|
|
4444
|
-
/>
|
|
4445
|
-
`,
|
|
4446
|
-
providers: [
|
|
4447
|
-
{
|
|
4448
|
-
provide: NG_VALUE_ACCESSOR,
|
|
4449
|
-
useExisting: forwardRef(() => IntlTelInputComponent),
|
|
4450
|
-
multi: true
|
|
4451
|
-
},
|
|
4452
|
-
{
|
|
4453
|
-
provide: NG_VALIDATORS,
|
|
4454
|
-
useExisting: forwardRef(() => IntlTelInputComponent),
|
|
4455
|
-
multi: true
|
|
4456
|
-
}
|
|
4457
|
-
]
|
|
4458
|
-
}]
|
|
4459
|
-
}], null, { inputRef: [{
|
|
4460
|
-
type: ViewChild,
|
|
4461
|
-
args: ["inputRef", { static: true }]
|
|
4462
|
-
}], initialValue: [{
|
|
4463
|
-
type: Input
|
|
4464
|
-
}], usePreciseValidation: [{
|
|
4465
|
-
type: Input
|
|
4466
|
-
}], inputProps: [{
|
|
4467
|
-
type: Input
|
|
4468
|
-
}], disabled: [{
|
|
4469
|
-
type: Input
|
|
4470
|
-
}], initOptions: [{
|
|
4471
|
-
type: Input
|
|
4472
|
-
}], numberChange: [{
|
|
4473
|
-
type: Output
|
|
4474
|
-
}], countryChange: [{
|
|
4475
|
-
type: Output
|
|
4476
|
-
}], validityChange: [{
|
|
4477
|
-
type: Output
|
|
4478
|
-
}], errorCodeChange: [{
|
|
4479
|
-
type: Output
|
|
4480
|
-
}], blur: [{
|
|
4481
|
-
type: Output
|
|
4482
|
-
}], focus: [{
|
|
4483
|
-
type: Output
|
|
4484
|
-
}], keydown: [{
|
|
4485
|
-
type: Output
|
|
4486
|
-
}], keyup: [{
|
|
4487
|
-
type: Output
|
|
4488
|
-
}], paste: [{
|
|
4489
|
-
type: Output
|
|
4490
|
-
}], click: [{
|
|
4491
|
-
type: Output
|
|
4492
|
-
}] });
|
|
4493
|
-
})();
|
|
4494
|
-
(() => {
|
|
4495
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInputComponent, { className: "IntlTelInputComponent", filePath: "intl-tel-input/angular.ts", lineNumber: 66 });
|
|
4496
|
-
})();
|
|
4497
|
-
export {
|
|
4498
|
-
IntlTelInputComponent,
|
|
4499
|
-
PHONE_ERROR_MESSAGES,
|
|
4500
|
-
intl_tel_input_default as intlTelInput
|
|
4501
|
-
};
|