intl-tel-input 25.14.1 → 26.0.0-beta.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.
Files changed (231) hide show
  1. package/README.md +27 -43
  2. package/angular/README.md +1 -1
  3. package/angular/build/IntlTelInput.js +78 -324
  4. package/angular/build/IntlTelInputWithUtils.js +78 -324
  5. package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +3 -6
  6. package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +3 -6
  7. package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +3 -6
  8. package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +3 -6
  9. package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +3 -6
  10. package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +3 -6
  11. package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +3 -6
  12. package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +3 -6
  13. package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +3 -6
  14. package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +3 -6
  15. package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +3 -6
  16. package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +3 -6
  17. package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +3 -6
  18. package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +3 -6
  19. package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +3 -6
  20. package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +3 -6
  21. package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +3 -6
  22. package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +3 -6
  23. package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +3 -6
  24. package/angular/build/types/intl-tel-input/i18n/index.d.ts +43 -43
  25. package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +3 -6
  26. package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +3 -6
  27. package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +3 -6
  28. package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +3 -6
  29. package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +3 -6
  30. package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +3 -6
  31. package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +3 -6
  32. package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +3 -6
  33. package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +3 -6
  34. package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +3 -6
  35. package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +3 -6
  36. package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +3 -6
  37. package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +3 -6
  38. package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +3 -6
  39. package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +3 -6
  40. package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +3 -6
  41. package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +3 -6
  42. package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +3 -6
  43. package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +3 -6
  44. package/angular/build/types/intl-tel-input/i18n/types.d.ts +2 -4
  45. package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +3 -6
  46. package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +3 -6
  47. package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +3 -6
  48. package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +3 -6
  49. package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +3 -6
  50. package/angular/build/types/intl-tel-input.d.ts +1 -1
  51. package/angular/build/types/modules/constants.d.ts +1 -1
  52. package/angular/build/types/modules/core/icons.d.ts +2 -0
  53. package/angular/build/types/modules/core/options.d.ts +1 -2
  54. package/angular/build/types/modules/core/ui.d.ts +2 -3
  55. package/angular/build/types/modules/data/country-data.d.ts +2 -2
  56. package/angular/build/types/modules/format/formatting.d.ts +2 -2
  57. package/angular/build/types/modules/types/public-api.d.ts +3 -1
  58. package/build/css/demo.css +1 -3
  59. package/build/css/intlTelInput-no-assets.css +1257 -0
  60. package/build/css/intlTelInput-no-assets.min.css +1 -0
  61. package/build/css/intlTelInput.css +21 -22
  62. package/build/css/intlTelInput.min.css +1 -1
  63. package/build/js/data.js +1 -1
  64. package/build/js/data.min.js +1 -1
  65. package/build/js/i18n/ar/index.js +23 -5
  66. package/build/js/i18n/bg/index.js +17 -5
  67. package/build/js/i18n/bn/index.js +17 -5
  68. package/build/js/i18n/bs/index.js +23 -5
  69. package/build/js/i18n/ca/index.js +17 -5
  70. package/build/js/i18n/cs/index.js +20 -5
  71. package/build/js/i18n/da/index.js +17 -5
  72. package/build/js/i18n/de/index.js +17 -5
  73. package/build/js/i18n/ee/index.js +17 -5
  74. package/build/js/i18n/el/index.js +17 -5
  75. package/build/js/i18n/en/index.js +18 -5
  76. package/build/js/i18n/es/index.js +17 -5
  77. package/build/js/i18n/fa/index.js +17 -5
  78. package/build/js/i18n/fi/index.js +17 -5
  79. package/build/js/i18n/fr/index.js +17 -5
  80. package/build/js/i18n/hi/index.js +17 -5
  81. package/build/js/i18n/hr/index.js +23 -5
  82. package/build/js/i18n/hu/index.js +17 -5
  83. package/build/js/i18n/id/index.js +17 -5
  84. package/build/js/i18n/index.js +43 -43
  85. package/build/js/i18n/it/index.js +17 -5
  86. package/build/js/i18n/ja/index.js +17 -5
  87. package/build/js/i18n/ko/index.js +17 -5
  88. package/build/js/i18n/lt/index.js +26 -5
  89. package/build/js/i18n/mr/index.js +17 -5
  90. package/build/js/i18n/nl/index.js +17 -5
  91. package/build/js/i18n/no/index.js +17 -5
  92. package/build/js/i18n/pl/index.js +21 -5
  93. package/build/js/i18n/pt/index.js +17 -5
  94. package/build/js/i18n/ro/index.js +21 -5
  95. package/build/js/i18n/ru/index.js +23 -5
  96. package/build/js/i18n/sk/index.js +23 -5
  97. package/build/js/i18n/sl/index.js +25 -5
  98. package/build/js/i18n/sq/index.js +18 -5
  99. package/build/js/i18n/sr/index.js +24 -5
  100. package/build/js/i18n/sv/index.js +17 -5
  101. package/build/js/i18n/te/index.js +17 -5
  102. package/build/js/i18n/th/index.js +17 -5
  103. package/build/js/i18n/tr/index.js +17 -5
  104. package/build/js/i18n/uk/index.js +23 -5
  105. package/build/js/i18n/ur/index.js +17 -5
  106. package/build/js/i18n/uz/index.js +17 -5
  107. package/build/js/i18n/vi/index.js +17 -5
  108. package/build/js/i18n/zh/index.js +17 -5
  109. package/build/js/intlTelInput.d.ts +118 -677
  110. package/build/js/intlTelInput.js +79 -329
  111. package/build/js/intlTelInput.min.js +8 -4
  112. package/build/js/intlTelInputWithUtils.js +79 -329
  113. package/build/js/intlTelInputWithUtils.min.js +7 -3
  114. package/package.json +10 -4
  115. package/react/README.md +1 -1
  116. package/react/build/IntlTelInput.cjs +78 -328
  117. package/react/build/IntlTelInput.d.ts +118 -677
  118. package/react/build/IntlTelInput.js +78 -328
  119. package/react/build/IntlTelInputWithUtils.cjs +78 -328
  120. package/react/build/IntlTelInputWithUtils.js +78 -328
  121. package/svelte/README.md +1 -1
  122. package/svelte/build/IntlTelInput.mjs +1170 -1413
  123. package/svelte/build/IntlTelInputWithUtils.mjs +935 -1178
  124. package/vue/README.md +1 -1
  125. package/vue/build/IntlTelInput.vue.d.ts +34 -0
  126. package/vue/build/IntlTelInputWithUtils.vue.d.ts +34 -0
  127. package/vue/build/exports/IntlTelInput.d.ts +3 -0
  128. package/vue/build/exports/IntlTelInput.mjs +66 -0
  129. package/vue/build/exports/IntlTelInputWithUtils.d.ts +3 -0
  130. package/vue/build/{IntlTelInputWithUtils.mjs → exports/IntlTelInputWithUtils.mjs} +533 -3866
  131. package/vue/build/{IntlTelInput.mjs → intl-tel-input-BY4WpieT.mjs} +403 -720
  132. package/vue/build/intl-tel-input.d.ts +97 -0
  133. package/vue/build/modules/constants.d.ts +85 -0
  134. package/vue/build/modules/core/countrySearch.d.ts +17 -0
  135. package/vue/build/modules/core/icons.d.ts +9 -0
  136. package/vue/build/modules/core/options.d.ts +3 -0
  137. package/vue/build/modules/core/ui.d.ts +45 -0
  138. package/vue/build/modules/data/country-data.d.ts +12 -0
  139. package/vue/build/modules/data/nanp-regionless.d.ts +2 -0
  140. package/vue/build/modules/format/caret.d.ts +1 -0
  141. package/vue/build/modules/format/formatting.d.ts +3 -0
  142. package/vue/build/modules/types/events.d.ts +9 -0
  143. package/vue/build/modules/types/public-api.d.ts +79 -0
  144. package/vue/build/modules/utils/dom.d.ts +6 -0
  145. package/vue/build/modules/utils/string.d.ts +2 -0
  146. package/build/js/i18n/ar/countries.js +0 -245
  147. package/build/js/i18n/ar/interface.js +0 -23
  148. package/build/js/i18n/bg/countries.js +0 -245
  149. package/build/js/i18n/bg/interface.js +0 -13
  150. package/build/js/i18n/bn/countries.js +0 -245
  151. package/build/js/i18n/bn/interface.js +0 -13
  152. package/build/js/i18n/bs/countries.js +0 -245
  153. package/build/js/i18n/bs/interface.js +0 -20
  154. package/build/js/i18n/ca/countries.js +0 -245
  155. package/build/js/i18n/ca/interface.js +0 -13
  156. package/build/js/i18n/cs/countries.js +0 -245
  157. package/build/js/i18n/cs/interface.js +0 -20
  158. package/build/js/i18n/da/countries.js +0 -245
  159. package/build/js/i18n/da/interface.js +0 -13
  160. package/build/js/i18n/de/countries.js +0 -245
  161. package/build/js/i18n/de/interface.js +0 -13
  162. package/build/js/i18n/ee/countries.js +0 -245
  163. package/build/js/i18n/ee/interface.js +0 -13
  164. package/build/js/i18n/el/countries.js +0 -245
  165. package/build/js/i18n/el/interface.js +0 -13
  166. package/build/js/i18n/en/countries.js +0 -245
  167. package/build/js/i18n/en/interface.js +0 -14
  168. package/build/js/i18n/es/countries.js +0 -245
  169. package/build/js/i18n/es/interface.js +0 -13
  170. package/build/js/i18n/fa/countries.js +0 -245
  171. package/build/js/i18n/fa/interface.js +0 -13
  172. package/build/js/i18n/fi/countries.js +0 -245
  173. package/build/js/i18n/fi/interface.js +0 -13
  174. package/build/js/i18n/fr/countries.js +0 -245
  175. package/build/js/i18n/fr/interface.js +0 -13
  176. package/build/js/i18n/hi/countries.js +0 -245
  177. package/build/js/i18n/hi/interface.js +0 -13
  178. package/build/js/i18n/hr/countries.js +0 -245
  179. package/build/js/i18n/hr/interface.js +0 -20
  180. package/build/js/i18n/hu/countries.js +0 -245
  181. package/build/js/i18n/hu/interface.js +0 -13
  182. package/build/js/i18n/id/countries.js +0 -245
  183. package/build/js/i18n/id/interface.js +0 -13
  184. package/build/js/i18n/it/countries.js +0 -245
  185. package/build/js/i18n/it/interface.js +0 -13
  186. package/build/js/i18n/ja/countries.js +0 -245
  187. package/build/js/i18n/ja/interface.js +0 -13
  188. package/build/js/i18n/ko/countries.js +0 -245
  189. package/build/js/i18n/ko/interface.js +0 -13
  190. package/build/js/i18n/lt/countries.js +0 -245
  191. package/build/js/i18n/lt/interface.js +0 -26
  192. package/build/js/i18n/mr/countries.js +0 -245
  193. package/build/js/i18n/mr/interface.js +0 -13
  194. package/build/js/i18n/nl/countries.js +0 -245
  195. package/build/js/i18n/nl/interface.js +0 -13
  196. package/build/js/i18n/no/countries.js +0 -245
  197. package/build/js/i18n/no/interface.js +0 -13
  198. package/build/js/i18n/pl/countries.js +0 -245
  199. package/build/js/i18n/pl/interface.js +0 -19
  200. package/build/js/i18n/pt/countries.js +0 -245
  201. package/build/js/i18n/pt/interface.js +0 -13
  202. package/build/js/i18n/ro/countries.js +0 -245
  203. package/build/js/i18n/ro/interface.js +0 -18
  204. package/build/js/i18n/ru/countries.js +0 -245
  205. package/build/js/i18n/ru/interface.js +0 -20
  206. package/build/js/i18n/sk/countries.js +0 -245
  207. package/build/js/i18n/sk/interface.js +0 -20
  208. package/build/js/i18n/sl/countries.js +0 -245
  209. package/build/js/i18n/sl/interface.js +0 -25
  210. package/build/js/i18n/sq/countries.js +0 -245
  211. package/build/js/i18n/sq/interface.js +0 -14
  212. package/build/js/i18n/sr/countries.js +0 -245
  213. package/build/js/i18n/sr/interface.js +0 -21
  214. package/build/js/i18n/sv/countries.js +0 -245
  215. package/build/js/i18n/sv/interface.js +0 -13
  216. package/build/js/i18n/te/countries.js +0 -245
  217. package/build/js/i18n/te/interface.js +0 -13
  218. package/build/js/i18n/th/countries.js +0 -245
  219. package/build/js/i18n/th/interface.js +0 -13
  220. package/build/js/i18n/tr/countries.js +0 -245
  221. package/build/js/i18n/tr/interface.js +0 -13
  222. package/build/js/i18n/uk/countries.js +0 -245
  223. package/build/js/i18n/uk/interface.js +0 -20
  224. package/build/js/i18n/ur/countries.js +0 -245
  225. package/build/js/i18n/ur/interface.js +0 -13
  226. package/build/js/i18n/uz/countries.js +0 -245
  227. package/build/js/i18n/uz/interface.js +0 -13
  228. package/build/js/i18n/vi/countries.js +0 -245
  229. package/build/js/i18n/vi/interface.js +0 -13
  230. package/build/js/i18n/zh/countries.js +0 -245
  231. package/build/js/i18n/zh/interface.js +0 -13
@@ -1,3580 +1,260 @@
1
- import { mergeModels as I0, useModel as Y0, ref as w1, onMounted as z0, watch as Z0, onUnmounted as J0, withDirectives as X0, createElementBlock as q0, openBlock as Q0, mergeProps as d2, vModelText as t2 } from "vue";
2
- const e2 = [
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
- ], t1 = [];
1680
- for (const h of e2)
1681
- t1.push({
1682
- name: "",
1683
- // populated in the plugin
1684
- iso2: h[0],
1685
- dialCode: h[1],
1686
- priority: h[2] || 0,
1687
- areaCodes: h[3] || null,
1688
- nodeById: {},
1689
- // populated by the plugin
1690
- nationalPrefix: h[4] || null,
1691
- normalisedName: "",
1692
- // populated in the plugin
1693
- initials: "",
1694
- // populated in the plugin
1695
- dialCodePlus: ""
1696
- // populated in the plugin
1697
- });
1698
- const $2 = {
1699
- ad: "Andorra",
1700
- ae: "United Arab Emirates",
1701
- af: "Afghanistan",
1702
- ag: "Antigua & Barbuda",
1703
- ai: "Anguilla",
1704
- al: "Albania",
1705
- am: "Armenia",
1706
- ao: "Angola",
1707
- ar: "Argentina",
1708
- as: "American Samoa",
1709
- at: "Austria",
1710
- au: "Australia",
1711
- aw: "Aruba",
1712
- ax: "Åland Islands",
1713
- az: "Azerbaijan",
1714
- ba: "Bosnia & Herzegovina",
1715
- bb: "Barbados",
1716
- bd: "Bangladesh",
1717
- be: "Belgium",
1718
- bf: "Burkina Faso",
1719
- bg: "Bulgaria",
1720
- bh: "Bahrain",
1721
- bi: "Burundi",
1722
- bj: "Benin",
1723
- bl: "St. Barthélemy",
1724
- bm: "Bermuda",
1725
- bn: "Brunei",
1726
- bo: "Bolivia",
1727
- bq: "Caribbean Netherlands",
1728
- br: "Brazil",
1729
- bs: "Bahamas",
1730
- bt: "Bhutan",
1731
- bw: "Botswana",
1732
- by: "Belarus",
1733
- bz: "Belize",
1734
- ca: "Canada",
1735
- cc: "Cocos (Keeling) Islands",
1736
- cd: "Congo - Kinshasa",
1737
- cf: "Central African Republic",
1738
- cg: "Congo - Brazzaville",
1739
- ch: "Switzerland",
1740
- ci: "Côte d’Ivoire",
1741
- ck: "Cook Islands",
1742
- cl: "Chile",
1743
- cm: "Cameroon",
1744
- cn: "China",
1745
- co: "Colombia",
1746
- cr: "Costa Rica",
1747
- cu: "Cuba",
1748
- cv: "Cape Verde",
1749
- cw: "Curaçao",
1750
- cx: "Christmas Island",
1751
- cy: "Cyprus",
1752
- cz: "Czechia",
1753
- de: "Germany",
1754
- dj: "Djibouti",
1755
- dk: "Denmark",
1756
- dm: "Dominica",
1757
- do: "Dominican Republic",
1758
- dz: "Algeria",
1759
- ec: "Ecuador",
1760
- ee: "Estonia",
1761
- eg: "Egypt",
1762
- eh: "Western Sahara",
1763
- er: "Eritrea",
1764
- es: "Spain",
1765
- et: "Ethiopia",
1766
- fi: "Finland",
1767
- fj: "Fiji",
1768
- fk: "Falkland Islands",
1769
- fm: "Micronesia",
1770
- fo: "Faroe Islands",
1771
- fr: "France",
1772
- ga: "Gabon",
1773
- gb: "United Kingdom",
1774
- gd: "Grenada",
1775
- ge: "Georgia",
1776
- gf: "French Guiana",
1777
- gg: "Guernsey",
1778
- gh: "Ghana",
1779
- gi: "Gibraltar",
1780
- gl: "Greenland",
1781
- gm: "Gambia",
1782
- gn: "Guinea",
1783
- gp: "Guadeloupe",
1784
- gq: "Equatorial Guinea",
1785
- gr: "Greece",
1786
- gt: "Guatemala",
1787
- gu: "Guam",
1788
- gw: "Guinea-Bissau",
1789
- gy: "Guyana",
1790
- hk: "Hong Kong SAR China",
1791
- hn: "Honduras",
1792
- hr: "Croatia",
1793
- ht: "Haiti",
1794
- hu: "Hungary",
1795
- id: "Indonesia",
1796
- ie: "Ireland",
1797
- il: "Israel",
1798
- im: "Isle of Man",
1799
- in: "India",
1800
- io: "British Indian Ocean Territory",
1801
- iq: "Iraq",
1802
- ir: "Iran",
1803
- is: "Iceland",
1804
- it: "Italy",
1805
- je: "Jersey",
1806
- jm: "Jamaica",
1807
- jo: "Jordan",
1808
- jp: "Japan",
1809
- ke: "Kenya",
1810
- kg: "Kyrgyzstan",
1811
- kh: "Cambodia",
1812
- ki: "Kiribati",
1813
- km: "Comoros",
1814
- kn: "St. Kitts & Nevis",
1815
- kp: "North Korea",
1816
- kr: "South Korea",
1817
- kw: "Kuwait",
1818
- ky: "Cayman Islands",
1819
- kz: "Kazakhstan",
1820
- la: "Laos",
1821
- lb: "Lebanon",
1822
- lc: "St. Lucia",
1823
- li: "Liechtenstein",
1824
- lk: "Sri Lanka",
1825
- lr: "Liberia",
1826
- ls: "Lesotho",
1827
- lt: "Lithuania",
1828
- lu: "Luxembourg",
1829
- lv: "Latvia",
1830
- ly: "Libya",
1831
- ma: "Morocco",
1832
- mc: "Monaco",
1833
- md: "Moldova",
1834
- me: "Montenegro",
1835
- mf: "St. Martin",
1836
- mg: "Madagascar",
1837
- mh: "Marshall Islands",
1838
- mk: "North Macedonia",
1839
- ml: "Mali",
1840
- mm: "Myanmar (Burma)",
1841
- mn: "Mongolia",
1842
- mo: "Macao SAR China",
1843
- mp: "Northern Mariana Islands",
1844
- mq: "Martinique",
1845
- mr: "Mauritania",
1846
- ms: "Montserrat",
1847
- mt: "Malta",
1848
- mu: "Mauritius",
1849
- mv: "Maldives",
1850
- mw: "Malawi",
1851
- mx: "Mexico",
1852
- my: "Malaysia",
1853
- mz: "Mozambique",
1854
- na: "Namibia",
1855
- nc: "New Caledonia",
1856
- ne: "Niger",
1857
- nf: "Norfolk Island",
1858
- ng: "Nigeria",
1859
- ni: "Nicaragua",
1860
- nl: "Netherlands",
1861
- no: "Norway",
1862
- np: "Nepal",
1863
- nr: "Nauru",
1864
- nu: "Niue",
1865
- nz: "New Zealand",
1866
- om: "Oman",
1867
- pa: "Panama",
1868
- pe: "Peru",
1869
- pf: "French Polynesia",
1870
- pg: "Papua New Guinea",
1871
- ph: "Philippines",
1872
- pk: "Pakistan",
1873
- pl: "Poland",
1874
- pm: "St. Pierre & Miquelon",
1875
- pr: "Puerto Rico",
1876
- ps: "Palestinian Territories",
1877
- pt: "Portugal",
1878
- pw: "Palau",
1879
- py: "Paraguay",
1880
- qa: "Qatar",
1881
- re: "Réunion",
1882
- ro: "Romania",
1883
- rs: "Serbia",
1884
- ru: "Russia",
1885
- rw: "Rwanda",
1886
- sa: "Saudi Arabia",
1887
- sb: "Solomon Islands",
1888
- sc: "Seychelles",
1889
- sd: "Sudan",
1890
- se: "Sweden",
1891
- sg: "Singapore",
1892
- sh: "St. Helena",
1893
- si: "Slovenia",
1894
- sj: "Svalbard & Jan Mayen",
1895
- sk: "Slovakia",
1896
- sl: "Sierra Leone",
1897
- sm: "San Marino",
1898
- sn: "Senegal",
1899
- so: "Somalia",
1900
- sr: "Suriname",
1901
- ss: "South Sudan",
1902
- st: "São Tomé & Príncipe",
1903
- sv: "El Salvador",
1904
- sx: "Sint Maarten",
1905
- sy: "Syria",
1906
- sz: "Eswatini",
1907
- tc: "Turks & Caicos Islands",
1908
- td: "Chad",
1909
- tg: "Togo",
1910
- th: "Thailand",
1911
- tj: "Tajikistan",
1912
- tk: "Tokelau",
1913
- tl: "Timor-Leste",
1914
- tm: "Turkmenistan",
1915
- tn: "Tunisia",
1916
- to: "Tonga",
1917
- tr: "Turkey",
1918
- tt: "Trinidad & Tobago",
1919
- tv: "Tuvalu",
1920
- tw: "Taiwan",
1921
- tz: "Tanzania",
1922
- ua: "Ukraine",
1923
- ug: "Uganda",
1924
- us: "United States",
1925
- uy: "Uruguay",
1926
- uz: "Uzbekistan",
1927
- va: "Vatican City",
1928
- vc: "St. Vincent & Grenadines",
1929
- ve: "Venezuela",
1930
- vg: "British Virgin Islands",
1931
- vi: "U.S. Virgin Islands",
1932
- vn: "Vietnam",
1933
- vu: "Vanuatu",
1934
- wf: "Wallis & Futuna",
1935
- ws: "Samoa",
1936
- ye: "Yemen",
1937
- yt: "Mayotte",
1938
- za: "South Africa",
1939
- zm: "Zambia",
1940
- zw: "Zimbabwe"
1941
- }, n2 = {
1942
- selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
1943
- noCountrySelected: "Select country",
1944
- countryListAriaLabel: "List of countries",
1945
- searchPlaceholder: "Search",
1946
- clearSearchAriaLabel: "Clear search",
1947
- zeroSearchResults: "No results found",
1948
- oneSearchResult: "1 result found",
1949
- multipleSearchResults: "${count} results found",
1950
- // additional countries (not supported by country-list library)
1951
- ac: "Ascension Island",
1952
- xk: "Kosovo"
1953
- }, L0 = { ...$2, ...n2 }, _1 = {
1954
- OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
1955
- CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
1956
- COUNTRY_CHANGE: "countrychange",
1957
- INPUT: "input"
1958
- // used for synthetic input trigger
1959
- }, N = {
1960
- HIDE: "iti__hide",
1961
- V_HIDE: "iti__v-hide",
1962
- ARROW_UP: "iti__arrow--up",
1963
- GLOBE: "iti__globe",
1964
- FLAG: "iti__flag",
1965
- COUNTRY_ITEM: "iti__country",
1966
- HIGHLIGHT: "iti__highlight"
1967
- }, x = {
1968
- ARROW_UP: "ArrowUp",
1969
- ARROW_DOWN: "ArrowDown",
1970
- SPACE: " ",
1971
- ENTER: "Enter",
1972
- ESC: "Escape",
1973
- TAB: "Tab"
1974
- }, _0 = {
1975
- PASTE: "insertFromPaste",
1976
- DELETE_FWD: "deleteContentForward"
1977
- }, d1 = {
1978
- ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
1979
- // any kind of letter from any language
1980
- NON_PLUS_NUMERIC: /[^+0-9]/,
1981
- // chars that are NOT + or digit
1982
- NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,
1983
- // chars that are NOT + or digit (global)
1984
- HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
1985
- // single acceptable hidden-search char
1986
- }, i2 = {
1987
- HIDDEN_SEARCH_RESET_MS: 1e3
1988
- }, N0 = {
1989
- UNKNOWN_NUMBER_TYPE: -99,
1990
- UNKNOWN_VALIDATION_ERROR: -99
1991
- }, D1 = {
1992
- SANE_SELECTED_WITH_DIAL_WIDTH: 78,
1993
- // px width fallback when separateDialCode enabled
1994
- SANE_SELECTED_NO_DIAL_WIDTH: 42,
1995
- // px width fallback when no separate dial code
1996
- INPUT_PADDING_EXTRA_LEFT: 6
1997
- // px gap between selected country container and input text
1998
- }, b0 = {
1999
- NANP: "1"
2000
- // North American Numbering Plan
2001
- }, v1 = {
2002
- DIAL_CODE: "44",
2003
- // +44 United Kingdom
2004
- MOBILE_PREFIX: "7",
2005
- // UK mobile numbers start with 7 after national trunk (0) or core section
2006
- MOBILE_CORE_LENGTH: 10
2007
- // core number length (excluding dial code / national prefix) for mobiles
2008
- }, s2 = {
2009
- ISO2: "us"
2010
- }, x1 = {
2011
- AGGRESSIVE: "aggressive",
2012
- POLITE: "polite"
2013
- }, P1 = {
2014
- AUTO: "auto"
2015
- }, E0 = {
2016
- COUNTRY_CODE: "countryCode",
2017
- DIAL_CODE: "dialCode"
2018
- }, b = {
2019
- EXPANDED: "aria-expanded",
2020
- LABEL: "aria-label",
2021
- SELECTED: "aria-selected",
2022
- ACTIVE_DESCENDANT: "aria-activedescendant",
2023
- HASPOPUP: "aria-haspopup",
2024
- CONTROLS: "aria-controls",
2025
- HIDDEN: "aria-hidden",
2026
- AUTOCOMPLETE: "aria-autocomplete",
2027
- MODAL: "aria-modal"
2028
- }, M1 = (h) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(h).matches, r2 = () => {
2029
- if (typeof navigator < "u" && typeof window < "u") {
2030
- const h = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
2031
- navigator.userAgent
2032
- ), e = M1("(max-width: 500px)"), $ = M1("(max-height: 600px)"), i = M1("(pointer: coarse)");
2033
- return h || e || i && $;
2034
- }
2035
- return !1;
2036
- }, T0 = {
2037
- // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
2038
- allowPhonewords: !1,
2039
- //* Whether or not to allow the dropdown.
2040
- allowDropdown: !0,
2041
- //* Add a placeholder in the input with an example number for the selected country.
2042
- autoPlaceholder: x1.POLITE,
2043
- //* Modify the parentClass.
2044
- containerClass: "",
2045
- //* The order of the countries in the dropdown. Defaults to alphabetical.
2046
- countryOrder: null,
2047
- //* Add a country search input at the top of the dropdown.
2048
- countrySearch: !0,
2049
- //* Modify the auto placeholder.
2050
- customPlaceholder: null,
2051
- //* Append menu to specified element.
2052
- dropdownContainer: null,
2053
- //* Don't display these countries.
2054
- excludeCountries: [],
2055
- //* Fix the dropdown width to the input width (rather than being as wide as the longest country name).
2056
- fixDropdownWidth: !0,
2057
- //* Format the number as the user types
2058
- formatAsYouType: !0,
2059
- //* Format the input value during initialisation and on setNumber.
2060
- formatOnDisplay: !0,
2061
- //* geoIp lookup function.
2062
- geoIpLookup: null,
2063
- //* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.
2064
- hiddenInput: null,
2065
- //* Internationalise the plugin text e.g. search input placeholder, country names.
2066
- i18n: {},
2067
- //* Initial country.
2068
- initialCountry: "",
2069
- //* A function to load the utils script.
2070
- loadUtils: null,
2071
- //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
2072
- nationalMode: !0,
2073
- //* Display only these countries.
2074
- onlyCountries: [],
2075
- //* Number type to use for placeholders.
2076
- placeholderNumberType: "MOBILE",
2077
- //* Show flags - for both the selected country, and in the country dropdown
2078
- showFlags: !0,
2079
- //* Display the international dial code next to the selected flag.
2080
- separateDialCode: !1,
2081
- //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
2082
- strictMode: !1,
2083
- //* Use full screen popup instead of dropdown for country list.
2084
- useFullscreenPopup: r2(),
2085
- //* The number type to enforce during validation.
2086
- validationNumberTypes: ["MOBILE"]
2087
- }, o2 = (h, e) => {
2088
- h.useFullscreenPopup && (h.fixDropdownWidth = !1), h.onlyCountries.length === 1 && (h.initialCountry = h.onlyCountries[0]), h.separateDialCode && (h.nationalMode = !1), h.allowDropdown && !h.showFlags && !h.separateDialCode && (h.nationalMode = !1), h.useFullscreenPopup && !h.dropdownContainer && (h.dropdownContainer = document.body), h.i18n = { ...e, ...h.i18n };
2089
- }, N1 = (h) => h.replace(/\D/g, ""), A0 = (h = "") => h.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), u2 = (h, e) => {
2090
- const $ = A0(e), i = [], s = [], a = [], u = [], f = [], C = [];
2091
- for (const _ of h)
2092
- _.iso2 === $ ? i.push(_) : _.normalisedName.startsWith($) ? s.push(_) : _.normalisedName.includes($) ? a.push(_) : $ === _.dialCode || $ === _.dialCodePlus ? u.push(_) : _.dialCodePlus.includes($) ? f.push(_) : _.initials.includes($) && C.push(_);
2093
- const y = (_, E) => _.priority - E.priority;
2094
- return [
2095
- ...i.sort(y),
2096
- ...s.sort(y),
2097
- ...a.sort(y),
2098
- ...u.sort(y),
2099
- ...f.sort(y),
2100
- ...C.sort(y)
2101
- ];
2102
- }, l2 = (h, e) => {
2103
- const $ = e.toLowerCase();
2104
- for (const i of h)
2105
- if (i.name.toLowerCase().startsWith($))
2106
- return i;
2107
- return null;
2108
- }, R1 = (h) => Object.keys(h).filter((e) => !!h[e]).join(" "), T = (h, e, $) => {
2109
- const i = document.createElement(h);
2110
- return e && Object.entries(e).forEach(
2111
- ([s, a]) => i.setAttribute(s, a)
2112
- ), $ && $.appendChild(i), i;
2113
- }, a2 = () => `
2114
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${b.HIDDEN}="true">
2115
- <circle cx="11" cy="11" r="7" />
2116
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
2117
- </svg>`, c2 = (h) => {
2118
- const e = `iti-${h}-clear-mask`;
2119
- return `
2120
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${b.HIDDEN}="true" focusable="false">
2121
- <mask id="${e}" maskUnits="userSpaceOnUse">
2122
- <rect width="16" height="16" fill="white" />
2123
- <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" />
2124
- </mask>
2125
- <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${e})" />
2126
- </svg>`;
2127
- };
2128
- class h2 {
2129
- constructor(e, $, i) {
2130
- this.highlightedItem = null, this.selectedItem = null, e.dataset.intlTelInputId = i.toString(), this.telInput = e, this.options = $, this.id = i, this.hadInitialPlaceholder = !!e.getAttribute("placeholder"), this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.options.separateDialCode && (this.originalPaddingLeft = this.telInput.style.paddingLeft);
2131
- }
2132
- //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
2133
- generateMarkup(e) {
2134
- this.countries = e, this._prepareTelInput();
2135
- const $ = this._createWrapperAndInsert();
2136
- this._maybeBuildCountryContainer($), $.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs($);
2137
- }
2138
- _prepareTelInput() {
2139
- var e;
2140
- this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !((e = this.telInput.form) != null && e.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
2141
- }
2142
- _createWrapperAndInsert() {
2143
- const { allowDropdown: e, showFlags: $, containerClass: i, useFullscreenPopup: s } = this.options, a = R1({
2144
- iti: !0,
2145
- "iti--allow-dropdown": e,
2146
- "iti--show-flags": $,
2147
- "iti--inline-dropdown": !s,
2148
- [i]: !!i
2149
- }), u = T("div", { class: a });
2150
- return this.isRTL && u.setAttribute("dir", "ltr"), this.telInput.before(u), u;
2151
- }
2152
- _maybeBuildCountryContainer(e) {
2153
- const { allowDropdown: $, separateDialCode: i, showFlags: s } = this.options;
2154
- if ($ || s || i) {
2155
- this.countryContainer = T(
2156
- "div",
2157
- // visibly hidden until we measure it's width to set the input padding correctly
2158
- { class: `iti__country-container ${N.V_HIDE}` },
2159
- e
2160
- ), $ ? (this.selectedCountry = T(
2161
- "button",
2162
- {
2163
- type: "button",
2164
- class: "iti__selected-country",
2165
- [b.EXPANDED]: "false",
2166
- [b.LABEL]: this.options.i18n.noCountrySelected,
2167
- [b.HASPOPUP]: "dialog",
2168
- [b.CONTROLS]: `iti-${this.id}__dropdown-content`
2169
- },
2170
- this.countryContainer
2171
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
2172
- "div",
2173
- { class: "iti__selected-country" },
2174
- this.countryContainer
2175
- );
2176
- const a = T(
2177
- "div",
2178
- { class: "iti__selected-country-primary" },
2179
- this.selectedCountry
2180
- );
2181
- this.selectedCountryInner = T(
2182
- "div",
2183
- { class: N.FLAG },
2184
- a
2185
- ), $ && (this.dropdownArrow = T(
2186
- "div",
2187
- { class: "iti__arrow", [b.HIDDEN]: "true" },
2188
- a
2189
- )), i && (this.selectedDialCode = T(
2190
- "div",
2191
- { class: "iti__selected-dial-code" },
2192
- this.selectedCountry
2193
- )), $ && this._buildDropdownContent();
2194
- }
2195
- }
2196
- _buildDropdownContent() {
2197
- const {
2198
- fixDropdownWidth: e,
2199
- useFullscreenPopup: $,
2200
- countrySearch: i,
2201
- i18n: s,
2202
- dropdownContainer: a,
2203
- containerClass: u
2204
- } = this.options, f = e ? "" : "iti--flexible-dropdown-width";
2205
- if (this.dropdownContent = T("div", {
2206
- id: `iti-${this.id}__dropdown-content`,
2207
- class: `iti__dropdown-content ${N.HIDE} ${f}`,
2208
- role: "dialog",
2209
- [b.MODAL]: "true"
2210
- }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = T(
2211
- "ul",
2212
- {
2213
- class: "iti__country-list",
2214
- id: `iti-${this.id}__country-listbox`,
2215
- role: "listbox",
2216
- [b.LABEL]: s.countryListAriaLabel
2217
- },
2218
- this.dropdownContent
2219
- ), this._appendListItems(), i && this.updateSearchResultsA11yText(), a) {
2220
- const C = R1({
2221
- iti: !0,
2222
- "iti--container": !0,
2223
- "iti--fullscreen-popup": $,
2224
- "iti--inline-dropdown": !$,
2225
- [u]: !!u
2226
- });
2227
- this.dropdown = T("div", { class: C }), this.dropdown.appendChild(this.dropdownContent);
2228
- } else
2229
- this.countryContainer.appendChild(this.dropdownContent);
2230
- }
2231
- _buildSearchUI() {
2232
- const { i18n: e } = this.options, $ = T(
2233
- "div",
2234
- { class: "iti__search-input-wrapper" },
2235
- this.dropdownContent
2236
- );
2237
- this.searchIcon = T(
2238
- "span",
2239
- {
2240
- class: "iti__search-icon",
2241
- [b.HIDDEN]: "true"
2242
- },
2243
- $
2244
- ), this.searchIcon.innerHTML = a2(), this.searchInput = T(
2245
- "input",
2246
- {
2247
- id: `iti-${this.id}__search-input`,
2248
- // Chrome says inputs need either a name or an id
2249
- type: "search",
2250
- class: "iti__search-input",
2251
- placeholder: e.searchPlaceholder,
2252
- // 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
2253
- role: "combobox",
2254
- [b.EXPANDED]: "true",
2255
- [b.LABEL]: e.searchPlaceholder,
2256
- [b.CONTROLS]: `iti-${this.id}__country-listbox`,
2257
- [b.AUTOCOMPLETE]: "list",
2258
- autocomplete: "off"
2259
- },
2260
- $
2261
- ), this.searchClearButton = T(
2262
- "button",
2263
- {
2264
- type: "button",
2265
- class: `iti__search-clear ${N.HIDE}`,
2266
- [b.LABEL]: e.clearSearchAriaLabel,
2267
- tabindex: "-1"
2268
- },
2269
- $
2270
- ), this.searchClearButton.innerHTML = c2(this.id), this.searchResultsA11yText = T(
2271
- "span",
2272
- { class: "iti__a11y-text" },
2273
- this.dropdownContent
2274
- ), this.searchNoResults = T(
2275
- "div",
2276
- {
2277
- class: `iti__no-results ${N.HIDE}`,
2278
- [b.HIDDEN]: "true"
2279
- // all a11y messaging happens in this.searchResultsA11yText
2280
- },
2281
- this.dropdownContent
2282
- ), this.searchNoResults.textContent = e.zeroSearchResults;
2283
- }
2284
- _maybeUpdateInputPaddingAndReveal() {
2285
- this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(N.V_HIDE));
2286
- }
2287
- _maybeBuildHiddenInputs(e) {
2288
- var i, s;
2289
- const { hiddenInput: $ } = this.options;
2290
- if ($) {
2291
- const a = this.telInput.getAttribute("name") || "", u = $(a);
2292
- if (u.phone) {
2293
- const f = (i = this.telInput.form) == null ? void 0 : i.querySelector(
2294
- `input[name="${u.phone}"]`
2295
- );
2296
- f ? this.hiddenInput = f : (this.hiddenInput = T("input", {
2297
- type: "hidden",
2298
- name: u.phone
2299
- }), e.appendChild(this.hiddenInput));
2300
- }
2301
- if (u.country) {
2302
- const f = (s = this.telInput.form) == null ? void 0 : s.querySelector(
2303
- `input[name="${u.country}"]`
2304
- );
2305
- f ? this.hiddenInputCountry = f : (this.hiddenInputCountry = T("input", {
2306
- type: "hidden",
2307
- name: u.country
2308
- }), e.appendChild(this.hiddenInputCountry));
2309
- }
2310
- }
2311
- }
2312
- //* For each country: add a country list item <li> to the countryList <ul> container.
2313
- _appendListItems() {
2314
- const e = document.createDocumentFragment();
2315
- for (let $ = 0; $ < this.countries.length; $++) {
2316
- const i = this.countries[$], s = R1({
2317
- [N.COUNTRY_ITEM]: !0
2318
- }), a = T("li", {
2319
- id: `iti-${this.id}__item-${i.iso2}`,
2320
- class: s,
2321
- tabindex: "-1",
2322
- role: "option",
2323
- [b.SELECTED]: "false"
2324
- });
2325
- a.dataset.dialCode = i.dialCode, a.dataset.countryCode = i.iso2, i.nodeById[this.id] = a, this.options.showFlags && T("div", { class: `${N.FLAG} iti__${i.iso2}` }, a);
2326
- const u = T("span", { class: "iti__country-name" }, a);
2327
- u.textContent = i.name;
2328
- const f = T("span", { class: "iti__dial-code" }, a);
2329
- this.isRTL && f.setAttribute("dir", "ltr"), f.textContent = `+${i.dialCode}`, e.appendChild(a);
2330
- }
2331
- this.countryList.appendChild(e);
2332
- }
2333
- //* Update the input padding to make space for the selected country/dial code.
2334
- updateInputPadding() {
2335
- if (this.selectedCountry) {
2336
- const e = this.options.separateDialCode ? D1.SANE_SELECTED_WITH_DIAL_WIDTH : D1.SANE_SELECTED_NO_DIAL_WIDTH, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + D1.INPUT_PADDING_EXTRA_LEFT;
2337
- this.telInput.style.paddingLeft = `${i}px`;
2338
- }
2339
- }
2340
- //* When input is in a hidden container during init, we cannot calculate the selected country width.
2341
- //* Fix: clone the markup, make it invisible, add it to the end of the DOM, and then measure it's width.
2342
- //* To get the right styling to apply, all we need is a shallow clone of the container,
2343
- //* and then to inject a deep clone of the selectedCountry element.
2344
- _getHiddenSelectedCountryWidth() {
2345
- if (this.telInput.parentNode) {
2346
- let e;
2347
- try {
2348
- e = window.top.document.body;
2349
- } catch {
2350
- e = document.body;
2351
- }
2352
- const $ = this.telInput.parentNode.cloneNode(
2353
- !1
2354
- );
2355
- $.style.visibility = "hidden", e.appendChild($);
2356
- const i = this.countryContainer.cloneNode();
2357
- $.appendChild(i);
2358
- const s = this.selectedCountry.cloneNode(
2359
- !0
2360
- );
2361
- i.appendChild(s);
2362
- const a = s.offsetWidth;
2363
- return e.removeChild($), a;
2364
- }
2365
- return 0;
2366
- }
2367
- //* Update search results text (for a11y).
2368
- updateSearchResultsA11yText() {
2369
- const { i18n: e } = this.options, $ = this.countryList.childElementCount;
2370
- let i;
2371
- $ === 0 ? i = e.zeroSearchResults : e.searchResultsText ? i = e.searchResultsText($) : $ === 1 ? i = e.oneSearchResult : i = e.multipleSearchResults.replace(
2372
- "${count}",
2373
- $.toString()
2374
- ), this.searchResultsA11yText.textContent = i;
2375
- }
2376
- //* Check if an element is visible within it's container, else scroll until it is.
2377
- scrollTo(e) {
2378
- const $ = this.countryList, i = document.documentElement.scrollTop, s = $.offsetHeight, a = $.getBoundingClientRect().top + i, u = a + s, f = e.offsetHeight, C = e.getBoundingClientRect().top + i, y = C + f, _ = C - a + $.scrollTop;
2379
- if (C < a)
2380
- $.scrollTop = _;
2381
- else if (y > u) {
2382
- const E = s - f;
2383
- $.scrollTop = _ - E;
2384
- }
2385
- }
2386
- //* Remove highlighting from the previous list item and highlight the new one.
2387
- highlightListItem(e, $) {
2388
- const i = this.highlightedItem;
2389
- if (i && i.classList.remove(N.HIGHLIGHT), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add(N.HIGHLIGHT), this.options.countrySearch)) {
2390
- const s = this.highlightedItem.getAttribute("id") || "";
2391
- this.searchInput.setAttribute(b.ACTIVE_DESCENDANT, s);
2392
- }
2393
- $ && this.highlightedItem.focus();
2394
- }
2395
- updateSelectedItem(e) {
2396
- if (this.selectedItem && this.selectedItem.dataset.countryCode !== e && (this.selectedItem.setAttribute(b.SELECTED, "false"), this.selectedItem = null), e && !this.selectedItem) {
2397
- const $ = this.countryList.querySelector(
2398
- `[data-country-code="${e}"]`
2399
- );
2400
- $ && ($.setAttribute(b.SELECTED, "true"), this.selectedItem = $);
2401
- }
2402
- }
2403
- //* Country search: Filter the country list to the given array of countries.
2404
- filterCountries(e) {
2405
- this.countryList.innerHTML = "";
2406
- let $ = !0;
2407
- for (const i of e) {
2408
- const s = i.nodeById[this.id];
2409
- s && (this.countryList.appendChild(s), $ && (this.highlightListItem(s, !1), $ = !1));
2410
- }
2411
- $ ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(N.HIDE)) : this.searchNoResults && this.searchNoResults.classList.add(N.HIDE), this.countryList.scrollTop = 0, this.updateSearchResultsA11yText();
2412
- }
2413
- destroy() {
2414
- this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.options.separateDialCode && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
2415
- const e = this.telInput.parentNode;
2416
- e.before(this.telInput), e.remove(), this.telInput = null, this.countryContainer = null, this.selectedCountry = null, this.selectedCountryInner = null, this.selectedDialCode = null, this.dropdownArrow = null, this.dropdownContent = null, this.searchInput = null, this.searchIcon = null, this.searchClearButton = null, this.searchNoResults = null, this.searchResultsA11yText = null, this.countryList = null, this.dropdown = null, this.hiddenInput = null, this.hiddenInputCountry = null, this.highlightedItem = null, this.selectedItem = null;
2417
- for (const $ of this.countries)
2418
- delete $.nodeById[this.id];
2419
- this.countries = null;
2420
- }
2421
- }
2422
- const f2 = (h) => {
2423
- const { onlyCountries: e, excludeCountries: $ } = h;
2424
- if (e.length) {
2425
- const i = e.map(
2426
- (s) => s.toLowerCase()
2427
- );
2428
- return t1.filter(
2429
- (s) => i.includes(s.iso2)
2430
- );
2431
- } else if ($.length) {
2432
- const i = $.map(
2433
- (s) => s.toLowerCase()
2434
- );
2435
- return t1.filter(
2436
- (s) => !i.includes(s.iso2)
2437
- );
2438
- }
2439
- return t1;
2440
- }, p2 = (h, e) => {
2441
- for (const $ of h) {
2442
- const i = $.iso2.toLowerCase();
2443
- e.i18n[i] && ($.name = e.i18n[i]);
2444
- }
2445
- }, C2 = (h) => {
2446
- const e = /* @__PURE__ */ new Set();
2447
- let $ = 0;
2448
- const i = {}, s = (u, f) => {
2449
- if (!u || !f)
2450
- return;
2451
- f.length > $ && ($ = f.length), i.hasOwnProperty(f) || (i[f] = []);
2452
- const C = i[f];
2453
- C.includes(u) || C.push(u);
2454
- }, a = [...h].sort((u, f) => u.priority - f.priority);
2455
- for (const u of a) {
2456
- e.has(u.dialCode) || e.add(u.dialCode);
2457
- for (let f = 1; f < u.dialCode.length; f++) {
2458
- const C = u.dialCode.substring(0, f);
2459
- s(u.iso2, C);
2460
- }
2461
- if (s(u.iso2, u.dialCode), u.areaCodes) {
2462
- const f = i[u.dialCode][0];
2463
- for (const C of u.areaCodes) {
2464
- for (let y = 1; y < C.length; y++) {
2465
- const _ = C.substring(0, y), E = u.dialCode + _;
2466
- s(f, E), s(u.iso2, E);
2467
- }
2468
- s(u.iso2, u.dialCode + C);
2469
- }
2470
- }
2471
- }
2472
- return { dialCodes: e, dialCodeMaxLen: $, dialCodeToIso2Map: i };
2473
- }, g2 = (h, e) => {
2474
- e.countryOrder && (e.countryOrder = e.countryOrder.map(
2475
- ($) => $.toLowerCase()
2476
- )), h.sort(($, i) => {
2477
- const { countryOrder: s } = e;
2478
- if (s) {
2479
- const a = s.indexOf($.iso2), u = s.indexOf(i.iso2), f = a > -1, C = u > -1;
2480
- if (f || C)
2481
- return f && C ? a - u : f ? -1 : 1;
2482
- }
2483
- return $.name.localeCompare(i.name);
2484
- });
2485
- }, m2 = (h) => {
2486
- for (const e of h)
2487
- e.normalisedName = A0(e.name), e.initials = e.normalisedName.split(/[^a-z]/).map(($) => $[0]).join(""), e.dialCodePlus = `+${e.dialCode}`;
2488
- }, y2 = (h, e, $, i) => {
2489
- let s = h;
2490
- if ($ && e) {
2491
- e = `+${i.dialCode}`;
2492
- const a = s[e.length] === " " || s[e.length] === "-" ? e.length + 1 : e.length;
2493
- s = s.substring(a);
2494
- }
2495
- return s;
2496
- }, I2 = (h, e, $, i, s) => {
2497
- const a = $ ? $.formatNumberAsYouType(h, i.iso2) : h, { dialCode: u } = i;
2498
- return s && e.charAt(0) !== "+" && a.includes(`+${u}`) ? (a.split(`+${u}`)[1] || "").trim() : a;
2499
- }, _2 = (h, e, $, i) => {
2500
- if ($ === 0 && !i)
2501
- return 0;
2502
- let s = 0;
2503
- for (let a = 0; a < e.length; a++) {
2504
- if (/[+0-9]/.test(e[a]) && s++, s === h && !i)
2505
- return a + 1;
2506
- if (i && s === h + 1)
2507
- return a;
2508
- }
2509
- return e.length;
2510
- }, N2 = [
2511
- "800",
2512
- "822",
2513
- "833",
2514
- "844",
2515
- "855",
2516
- "866",
2517
- "877",
2518
- "880",
2519
- "881",
2520
- "882",
2521
- "883",
2522
- "884",
2523
- "885",
2524
- "886",
2525
- "887",
2526
- "888",
2527
- "889"
2528
- ], S0 = (h) => {
2529
- const e = N1(h);
2530
- if (e.startsWith(b0.NANP) && e.length >= 4) {
2531
- const $ = e.substring(1, 4);
2532
- return N2.includes($);
2533
- }
2534
- return !1;
2535
- };
2536
- for (const h of t1)
2537
- h.name = L0[h.iso2];
2538
- let E2 = 0;
2539
- const S2 = new Set(t1.map((h) => h.iso2)), O1 = (h) => S2.has(h);
2540
- class B1 {
2541
- constructor(e, $ = {}) {
2542
- this.id = E2++, this.options = { ...T0, ...$ }, o2(this.options, L0), this.ui = new h2(e, this.options, this.id), this.isAndroid = B1._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = f2(this.options);
2543
- const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: a } = C2(
2544
- this.countries
2545
- );
2546
- this.dialCodes = i, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = a, this.countryByIso2 = new Map(this.countries.map((u) => [u.iso2, u])), this._init();
2547
- }
2548
- static _getIsAndroid() {
2549
- return typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1;
2550
- }
2551
- _updateNumeralSet(e) {
2552
- /[\u0660-\u0669]/.test(e) ? this.userNumeralSet = "arabic-indic" : /[\u06F0-\u06F9]/.test(e) ? this.userNumeralSet = "persian" : this.userNumeralSet = "ascii";
2553
- }
2554
- _mapAsciiToUserNumerals(e) {
2555
- if (this.userNumeralSet || this._updateNumeralSet(this.ui.telInput.value), this.userNumeralSet === "ascii")
2556
- return e;
2557
- const $ = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
2558
- return e.replace(/[0-9]/g, (i) => String.fromCharCode($ + Number(i)));
2559
- }
2560
- // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
2561
- _normaliseNumerals(e) {
2562
- if (!e)
2563
- return "";
2564
- if (this._updateNumeralSet(e), this.userNumeralSet === "ascii")
2565
- return e;
2566
- const $ = this.userNumeralSet === "arabic-indic" ? 1632 : 1776, i = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
2567
- return e.replace(i, (s) => String.fromCharCode(48 + (s.charCodeAt(0) - $)));
2568
- }
2569
- _getTelInputValue() {
2570
- const e = this.ui.telInput.value.trim();
2571
- return this._normaliseNumerals(e);
2572
- }
2573
- _setTelInputValue(e) {
2574
- this.ui.telInput.value = this._mapAsciiToUserNumerals(e);
2575
- }
2576
- _createInitPromises() {
2577
- const e = new Promise((i, s) => {
2578
- this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
2579
- }), $ = new Promise((i, s) => {
2580
- this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
2581
- });
2582
- return Promise.all([e, $]);
2583
- }
2584
- //* Can't be private as it's called from intlTelInput convenience wrapper.
2585
- _init() {
2586
- this.selectedCountryData = {}, this.abortController = new AbortController(), this._processCountryData(), this.ui.generateMarkup(this.countries), this._setInitialState(), this._initListeners(), this._initRequests();
2587
- }
2588
- //********************
2589
- //* PRIVATE METHODS
2590
- //********************
2591
- //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
2592
- _processCountryData() {
2593
- p2(this.countries, this.options), g2(this.countries, this.options), m2(this.countries);
2594
- }
2595
- //* Set the initial state of the input value and the selected country by:
2596
- //* 1. Extracting a dial code from the given number
2597
- //* 2. Using explicit initialCountry
2598
- _setInitialState(e = !1) {
2599
- const $ = this.ui.telInput.getAttribute("value"), i = this._normaliseNumerals($), s = this._getTelInputValue(), u = i && i.startsWith("+") && (!s || !s.startsWith("+")) ? i : s, f = this._getDialCode(u), C = S0(u), { initialCountry: y, geoIpLookup: _ } = this.options, E = y === P1.AUTO && _;
2600
- if (f && !C)
2601
- this._updateCountryFromNumber(u);
2602
- else if (!E || e) {
2603
- const B = y ? y.toLowerCase() : "";
2604
- O1(B) ? this._setCountry(B) : f && C ? this._setCountry(s2.ISO2) : this._setCountry("");
2605
- }
2606
- u && this._updateValFromNumber(u);
2607
- }
2608
- //* Initialise the main event listeners: input keyup, and click selected country.
2609
- _initListeners() {
2610
- this._initTelInputListeners(), this.options.allowDropdown && this._initDropdownListeners(), (this.ui.hiddenInput || this.ui.hiddenInputCountry) && this.ui.telInput.form && this._initHiddenInputListener();
2611
- }
2612
- //* Update hidden input on form submit.
2613
- _initHiddenInputListener() {
2614
- var $;
2615
- const e = () => {
2616
- this.ui.hiddenInput && (this.ui.hiddenInput.value = this.getNumber()), this.ui.hiddenInputCountry && (this.ui.hiddenInputCountry.value = this.selectedCountryData.iso2 || "");
2617
- };
2618
- ($ = this.ui.telInput.form) == null || $.addEventListener("submit", e, {
2619
- signal: this.abortController.signal
2620
- });
2621
- }
2622
- //* initialise the dropdown listeners.
2623
- _initDropdownListeners() {
2624
- const e = this.abortController.signal, $ = (u) => {
2625
- this.ui.dropdownContent.classList.contains(N.HIDE) ? this.ui.telInput.focus() : u.preventDefault();
2626
- }, i = this.ui.telInput.closest("label");
2627
- i && i.addEventListener("click", $, { signal: e });
2628
- const s = () => {
2629
- this.ui.dropdownContent.classList.contains(
2630
- N.HIDE
2631
- ) && !this.ui.telInput.disabled && !this.ui.telInput.readOnly && this._openDropdown();
2632
- };
2633
- this.ui.selectedCountry.addEventListener(
2634
- "click",
2635
- s,
2636
- {
2637
- signal: e
2638
- }
2639
- );
2640
- const a = (u) => {
2641
- this.ui.dropdownContent.classList.contains(
2642
- N.HIDE
2643
- ) && [x.ARROW_UP, x.ARROW_DOWN, x.SPACE, x.ENTER].includes(u.key) && (u.preventDefault(), u.stopPropagation(), this._openDropdown()), u.key === x.TAB && this._closeDropdown();
2644
- };
2645
- this.ui.countryContainer.addEventListener(
2646
- "keydown",
2647
- a,
2648
- { signal: e }
2649
- );
2650
- }
2651
- //* Init many requests: utils script / geo ip lookup.
2652
- _initRequests() {
2653
- const { loadUtils: e, initialCountry: $, geoIpLookup: i } = this.options;
2654
- if (e && !m.utils) {
2655
- const a = () => {
2656
- var u;
2657
- (u = m.attachUtils(e)) == null || u.catch(() => {
2658
- });
2659
- };
2660
- if (m.documentReady())
2661
- a();
2662
- else {
2663
- const u = () => {
2664
- a();
2665
- };
2666
- window.addEventListener("load", u, {
2667
- signal: this.abortController.signal
2668
- });
2669
- }
2670
- } else
2671
- this.resolveUtilsScriptPromise();
2672
- $ === P1.AUTO && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2673
- }
2674
- //* Perform the geo ip lookup.
2675
- _loadAutoCountry() {
2676
- m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2677
- (e = "") => {
2678
- const $ = e.toLowerCase();
2679
- O1($) ? (m.autoCountry = $, setTimeout(() => l1("handleAutoCountry"))) : (this._setInitialState(!0), l1("rejectAutoCountryPromise"));
2680
- },
2681
- () => {
2682
- this._setInitialState(!0), l1("rejectAutoCountryPromise");
2683
- }
2684
- ));
2685
- }
2686
- _openDropdownWithPlus() {
2687
- this._openDropdown(), this.ui.searchInput.value = "+", this._filterCountriesByQuery("");
2688
- }
2689
- //* Initialize the tel input listeners.
2690
- _initTelInputListeners() {
2691
- this._bindInputListener(), this._maybeBindKeydownListener(), this._maybeBindPasteListener();
2692
- }
2693
- _bindInputListener() {
2694
- const {
2695
- strictMode: e,
2696
- formatAsYouType: $,
2697
- separateDialCode: i,
2698
- allowDropdown: s,
2699
- countrySearch: a
2700
- } = this.options;
2701
- let u = !1;
2702
- d1.ALPHA_UNICODE.test(this._getTelInputValue()) && (u = !0);
2703
- const f = (C) => {
2704
- const y = this._getTelInputValue();
2705
- if (this.isAndroid && (C == null ? void 0 : C.data) === "+" && i && s && a) {
2706
- const w = this.ui.telInput.selectionStart || 0, H = y.substring(0, w - 1), k = y.substring(w);
2707
- this._setTelInputValue(H + k), this._openDropdownWithPlus();
2708
- return;
2709
- }
2710
- this._updateCountryFromNumber(y) && this._triggerCountryChange();
2711
- const _ = (C == null ? void 0 : C.data) && d1.NON_PLUS_NUMERIC.test(C.data), E = (C == null ? void 0 : C.inputType) === _0.PASTE && y;
2712
- _ || E && !e ? u = !0 : d1.NON_PLUS_NUMERIC.test(y) || (u = !1);
2713
- const B = (C == null ? void 0 : C.detail) && C.detail.isSetNumber, S = this.userNumeralSet === "ascii";
2714
- if ($ && !u && !B && S) {
2715
- const w = this.ui.telInput.selectionStart || 0, k = y.substring(
2716
- 0,
2717
- w
2718
- ).replace(
2719
- d1.NON_PLUS_NUMERIC_GLOBAL,
2720
- ""
2721
- ).length, W = (C == null ? void 0 : C.inputType) === _0.DELETE_FWD, D = this._getFullNumber(), K = I2(
2722
- D,
2723
- y,
2724
- m.utils,
2725
- this.selectedCountryData,
2726
- this.options.separateDialCode
2727
- ), V = _2(
2728
- k,
2729
- K,
2730
- w,
2731
- W
2732
- );
2733
- this._setTelInputValue(K), this.ui.telInput.setSelectionRange(V, V);
2734
- }
2735
- };
2736
- this.ui.telInput.addEventListener(
2737
- "input",
2738
- f,
2739
- {
2740
- signal: this.abortController.signal
2741
- }
2742
- );
2743
- }
2744
- _maybeBindKeydownListener() {
2745
- const { strictMode: e, separateDialCode: $, allowDropdown: i, countrySearch: s } = this.options;
2746
- if (e || $) {
2747
- const a = (u) => {
2748
- if (u.key && u.key.length === 1 && !u.altKey && !u.ctrlKey && !u.metaKey) {
2749
- if ($ && i && s && u.key === "+") {
2750
- u.preventDefault(), this._openDropdownWithPlus();
2751
- return;
2752
- }
2753
- if (e) {
2754
- const f = this._getTelInputValue(), y = !f.startsWith("+") && this.ui.telInput.selectionStart === 0 && u.key === "+", _ = this._normaliseNumerals(u.key), E = /^[0-9]$/.test(_), B = $ ? E : y || E, S = this.ui.telInput, w = S.selectionStart, H = S.selectionEnd, k = f.slice(0, w), W = f.slice(H), D = k + u.key + W, K = this._getFullNumber(D), V = m.utils.getCoreNumber(
2755
- K,
2756
- this.selectedCountryData.iso2
2757
- ), $1 = this.maxCoreNumberLength && V.length > this.maxCoreNumberLength, a1 = this._getNewCountryFromNumber(K) !== null;
2758
- (!B || $1 && !a1 && !y) && u.preventDefault();
2759
- }
2760
- }
2761
- };
2762
- this.ui.telInput.addEventListener("keydown", a, {
2763
- signal: this.abortController.signal
2764
- });
2765
- }
2766
- }
2767
- _maybeBindPasteListener() {
2768
- if (this.options.strictMode) {
2769
- const e = ($) => {
2770
- $.preventDefault();
2771
- const i = this.ui.telInput, s = i.selectionStart, a = i.selectionEnd, u = this._getTelInputValue(), f = u.slice(0, s), C = u.slice(a), y = this.selectedCountryData.iso2, _ = $.clipboardData.getData("text"), E = this._normaliseNumerals(_), B = s === 0 && a > 0, S = !u.startsWith("+") || B, w = E.replace(d1.NON_PLUS_NUMERIC_GLOBAL, ""), H = w.startsWith("+"), k = w.replace(/\+/g, ""), W = H && S ? `+${k}` : k;
2772
- let D = f + W + C;
2773
- if (D.length > 5) {
2774
- let V = m.utils.getCoreNumber(D, y);
2775
- for (; V.length === 0 && D.length > 0; )
2776
- D = D.slice(0, -1), V = m.utils.getCoreNumber(D, y);
2777
- if (!V)
2778
- return;
2779
- if (this.maxCoreNumberLength && V.length > this.maxCoreNumberLength)
2780
- if (i.selectionEnd === u.length) {
2781
- const $1 = V.length - this.maxCoreNumberLength;
2782
- D = D.slice(0, D.length - $1);
2783
- } else
2784
- return;
2785
- }
2786
- this._setTelInputValue(D);
2787
- const K = s + W.length;
2788
- i.setSelectionRange(K, K), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2789
- };
2790
- this.ui.telInput.addEventListener("paste", e, {
2791
- signal: this.abortController.signal
2792
- });
2793
- }
2794
- }
2795
- //* Adhere to the input's maxlength attr.
2796
- _cap(e) {
2797
- const $ = Number(this.ui.telInput.getAttribute("maxlength"));
2798
- return $ && e.length > $ ? e.substring(0, $) : e;
2799
- }
2800
- //* Trigger a custom event on the input (typed via ItiEventMap).
2801
- _trigger(e, $ = {}) {
2802
- const i = new CustomEvent(e, {
2803
- bubbles: !0,
2804
- cancelable: !0,
2805
- detail: $
2806
- });
2807
- this.ui.telInput.dispatchEvent(i);
2808
- }
2809
- //* Open the dropdown.
2810
- _openDropdown() {
2811
- const { fixDropdownWidth: e, countrySearch: $ } = this.options;
2812
- if (this.dropdownAbortController = new AbortController(), e && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(N.HIDE), this.ui.selectedCountry.setAttribute(b.EXPANDED, "true"), this._setDropdownPosition(), $) {
2813
- const i = this.ui.countryList.firstElementChild;
2814
- i && (this.ui.highlightListItem(i, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
2815
- }
2816
- this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(N.ARROW_UP), this._trigger(_1.OPEN_COUNTRY_DROPDOWN);
2817
- }
2818
- //* Set the dropdown position
2819
- _setDropdownPosition() {
2820
- if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.ui.dropdown), !this.options.useFullscreenPopup) {
2821
- const e = this.ui.telInput.getBoundingClientRect(), $ = this.ui.telInput.offsetHeight;
2822
- if (this.options.dropdownContainer) {
2823
- this.ui.dropdown.style.top = `${e.top + $}px`, this.ui.dropdown.style.left = `${e.left}px`;
2824
- const i = () => this._closeDropdown();
2825
- window.addEventListener("scroll", i, {
2826
- signal: this.dropdownAbortController.signal
2827
- });
2828
- }
2829
- }
2830
- }
2831
- //* We only bind dropdown listeners when the dropdown is open.
2832
- _bindDropdownListeners() {
2833
- const e = this.dropdownAbortController.signal;
2834
- this._bindDropdownMouseoverListener(e), this._bindDropdownCountryClickListener(e), this._bindDropdownClickOffListener(e), this._bindDropdownKeydownListener(e), this.options.countrySearch && this._bindDropdownSearchListeners(e);
2835
- }
2836
- //* When mouse over a list item, just highlight that one
2837
- //* we add the class "highlight", so if they hit "enter" we know which one to select.
2838
- _bindDropdownMouseoverListener(e) {
2839
- const $ = (i) => {
2840
- var a;
2841
- const s = (a = i.target) == null ? void 0 : a.closest(
2842
- `.${N.COUNTRY_ITEM}`
2843
- );
2844
- s && this.ui.highlightListItem(s, !1);
2845
- };
2846
- this.ui.countryList.addEventListener(
2847
- "mouseover",
2848
- $,
2849
- {
2850
- signal: e
2851
- }
2852
- );
2853
- }
2854
- //* Listen for country selection.
2855
- _bindDropdownCountryClickListener(e) {
2856
- const $ = (i) => {
2857
- var a;
2858
- const s = (a = i.target) == null ? void 0 : a.closest(
2859
- `.${N.COUNTRY_ITEM}`
2860
- );
2861
- s && this._selectListItem(s);
2862
- };
2863
- this.ui.countryList.addEventListener("click", $, {
2864
- signal: e
2865
- });
2866
- }
2867
- //* Click off to close (except when this initial opening click is bubbling up).
2868
- //* We cannot just stopPropagation as it may be needed to close another instance.
2869
- _bindDropdownClickOffListener(e) {
2870
- const $ = (i) => {
2871
- !!i.target.closest(
2872
- `#iti-${this.id}__dropdown-content`
2873
- ) || this._closeDropdown();
2874
- };
2875
- setTimeout(() => {
2876
- document.documentElement.addEventListener(
2877
- "click",
2878
- $,
2879
- { signal: e }
2880
- );
2881
- }, 0);
2882
- }
2883
- //* Listen for up/down scrolling, enter to select, or escape to close.
2884
- //* Use keydown as keypress doesn't fire for non-char keys and we want to catch if they
2885
- //* just hit down and hold it to scroll down (no keyup event).
2886
- //* Listen on the document because that's where key events are triggered if no input has focus.
2887
- _bindDropdownKeydownListener(e) {
2888
- let $ = "", i = null;
2889
- const s = (a) => {
2890
- [
2891
- x.ARROW_UP,
2892
- x.ARROW_DOWN,
2893
- x.ENTER,
2894
- x.ESC
2895
- ].includes(a.key) && (a.preventDefault(), a.stopPropagation(), a.key === x.ARROW_UP || a.key === x.ARROW_DOWN ? this._handleUpDownKey(a.key) : a.key === x.ENTER ? this._handleEnterKey() : a.key === x.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && d1.HIDDEN_SEARCH_CHAR.test(a.key) && (a.stopPropagation(), i && clearTimeout(i), $ += a.key.toLowerCase(), this._searchForCountry($), i = setTimeout(() => {
2896
- $ = "";
2897
- }, i2.HIDDEN_SEARCH_RESET_MS));
2898
- };
2899
- document.addEventListener("keydown", s, { signal: e });
2900
- }
2901
- //* Search input listeners when countrySearch enabled.
2902
- _bindDropdownSearchListeners(e) {
2903
- const $ = () => {
2904
- const u = this.ui.searchInput.value.trim();
2905
- this._filterCountriesByQuery(u), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(N.HIDE) : this.ui.searchClearButton.classList.add(N.HIDE);
2906
- };
2907
- let i = null;
2908
- const s = () => {
2909
- i && clearTimeout(i), i = setTimeout(() => {
2910
- $(), i = null;
2911
- }, 100);
2912
- };
2913
- this.ui.searchInput.addEventListener("input", s, {
2914
- signal: e
2915
- });
2916
- const a = () => {
2917
- this.ui.searchInput.value = "", this.ui.searchInput.focus(), $();
2918
- };
2919
- this.ui.searchClearButton.addEventListener("click", a, {
2920
- signal: e
2921
- });
2922
- }
2923
- //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2924
- _searchForCountry(e) {
2925
- const $ = l2(this.countries, e);
2926
- if ($) {
2927
- const i = $.nodeById[this.id];
2928
- this.ui.highlightListItem(i, !1), this.ui.scrollTo(i);
2929
- }
2930
- }
2931
- //* Country search: Filter the countries according to the search query.
2932
- _filterCountriesByQuery(e) {
2933
- let $;
2934
- e === "" ? $ = this.countries : $ = u2(this.countries, e), this.ui.filterCountries($);
2935
- }
2936
- //* Highlight the next/prev item in the list (and ensure it is visible).
2937
- _handleUpDownKey(e) {
2938
- var i, s;
2939
- let $ = e === x.ARROW_UP ? (i = this.ui.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.ui.highlightedItem) == null ? void 0 : s.nextElementSibling;
2940
- !$ && this.ui.countryList.childElementCount > 1 && ($ = e === x.ARROW_UP ? this.ui.countryList.lastElementChild : this.ui.countryList.firstElementChild), $ && (this.ui.scrollTo($), this.ui.highlightListItem($, !1));
2941
- }
2942
- //* Select the currently highlighted item.
2943
- _handleEnterKey() {
2944
- this.ui.highlightedItem && this._selectListItem(this.ui.highlightedItem);
2945
- }
2946
- //* Update the input's value to the given val (format first if possible)
2947
- //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2948
- _updateValFromNumber(e) {
2949
- let $ = e;
2950
- if (this.options.formatOnDisplay && m.utils && this.selectedCountryData) {
2951
- const i = this.options.nationalMode || !$.startsWith("+") && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: a } = m.utils.numberFormat, u = i ? s : a;
2952
- $ = m.utils.formatNumber(
2953
- $,
2954
- this.selectedCountryData.iso2,
2955
- u
2956
- );
2957
- }
2958
- $ = this._beforeSetNumber($), this._setTelInputValue($);
2959
- }
2960
- //* Check if need to select a new country based on the given number
2961
- //* Note: called from _setInitialState, keyup handler, setNumber.
2962
- _updateCountryFromNumber(e) {
2963
- const $ = this._getNewCountryFromNumber(e);
2964
- return $ !== null ? this._setCountry($) : !1;
2965
- }
2966
- // if there is a selected country, and the number doesn't start with a dial code, then add it
2967
- _ensureHasDialCode(e) {
2968
- const { dialCode: $, nationalPrefix: i } = this.selectedCountryData;
2969
- if (e.startsWith("+") || !$)
2970
- return e;
2971
- const u = i && e.startsWith(i) && !this.options.separateDialCode ? e.substring(1) : e;
2972
- return `+${$}${u}`;
2973
- }
2974
- // Get the country ISO2 code from the given number
2975
- // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
2976
- // NOTE: consider refactoring this to be more clear
2977
- _getNewCountryFromNumber(e) {
2978
- const $ = e.indexOf("+");
2979
- let i = $ ? e.substring($) : e;
2980
- const s = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
2981
- i = this._ensureHasDialCode(i);
2982
- const u = this._getDialCode(i, !0), f = N1(i);
2983
- if (u) {
2984
- const C = N1(u), y = this.dialCodeToIso2Map[C];
2985
- if (y.length === 1)
2986
- return y[0] === s ? null : y[0];
2987
- if (!s && this.defaultCountry && y.includes(this.defaultCountry))
2988
- return this.defaultCountry;
2989
- if (a === b0.NANP && S0(f))
2990
- return null;
2991
- const { areaCodes: E, priority: B } = this.selectedCountryData;
2992
- if (E) {
2993
- const W = E.map(
2994
- (D) => `${a}${D}`
2995
- );
2996
- for (const D of W)
2997
- if (f.startsWith(D))
2998
- return null;
2999
- }
3000
- const w = E && !(B === 0) && f.length > C.length, H = s && y.includes(s) && !w, k = s === y[0];
3001
- if (!H && !k)
3002
- return y[0];
3003
- } else if (i.startsWith("+") && f.length) {
3004
- const C = this.selectedCountryData.dialCode || "";
3005
- return C && C.startsWith(f) ? null : "";
3006
- } else if ((!i || i === "+") && !s)
3007
- return this.defaultCountry;
3008
- return null;
3009
- }
3010
- //* Update the selected country, dial code (if separateDialCode), placeholder, title, and selected list item.
3011
- //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
3012
- _setCountry(e) {
3013
- const { separateDialCode: $, showFlags: i, i18n: s, allowDropdown: a } = this.options, u = this.selectedCountryData.iso2 || "";
3014
- if (a && this.ui.updateSelectedItem(e), this.selectedCountryData = e ? this.countryByIso2.get(e) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.ui.selectedCountry) {
3015
- const f = e && i ? `${N.FLAG} iti__${e}` : `${N.FLAG} ${N.GLOBE}`;
3016
- let C, y;
3017
- if (e) {
3018
- const { name: _, dialCode: E } = this.selectedCountryData;
3019
- y = _, C = s.selectedCountryAriaLabel.replace("${countryName}", _).replace("${dialCode}", `+${E}`);
3020
- } else
3021
- y = s.noCountrySelected, C = s.noCountrySelected;
3022
- this.ui.selectedCountryInner.className = f, this.ui.selectedCountry.setAttribute("title", y), this.ui.selectedCountry.setAttribute(b.LABEL, C);
3023
- }
3024
- if ($) {
3025
- const f = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
3026
- this.ui.selectedDialCode.textContent = f, this.ui.updateInputPadding();
3027
- }
3028
- return this._updatePlaceholder(), this._updateMaxLength(), u !== e;
3029
- }
3030
- //* Update the maximum valid number length for the currently selected country.
3031
- _updateMaxLength() {
3032
- const { strictMode: e, placeholderNumberType: $, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
3033
- if (e && m.utils)
3034
- if (s) {
3035
- const a = m.utils.numberType[$];
3036
- let u = m.utils.getExampleNumber(
3037
- s,
3038
- !1,
3039
- a,
3040
- !0
3041
- ), f = u;
3042
- for (; m.utils.isPossibleNumber(
3043
- u,
3044
- s,
3045
- i
3046
- ); )
3047
- f = u, u += "0";
3048
- const C = m.utils.getCoreNumber(f, s);
3049
- this.maxCoreNumberLength = C.length, s === "by" && (this.maxCoreNumberLength = C.length + 1);
3050
- } else
3051
- this.maxCoreNumberLength = null;
3052
- }
3053
- //* Update the input placeholder to an example number from the currently selected country.
3054
- _updatePlaceholder() {
3055
- const {
3056
- autoPlaceholder: e,
3057
- placeholderNumberType: $,
3058
- nationalMode: i,
3059
- customPlaceholder: s
3060
- } = this.options, a = e === x1.AGGRESSIVE || !this.ui.hadInitialPlaceholder && e === x1.POLITE;
3061
- if (m.utils && a) {
3062
- const u = m.utils.numberType[$];
3063
- let f = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
3064
- this.selectedCountryData.iso2,
3065
- i,
3066
- u
3067
- ) : "";
3068
- f = this._beforeSetNumber(f), typeof s == "function" && (f = s(f, this.selectedCountryData)), this.ui.telInput.setAttribute("placeholder", f);
3069
- }
3070
- }
3071
- //* Called when the user selects a list item from the dropdown.
3072
- _selectListItem(e) {
3073
- const $ = e.dataset[E0.COUNTRY_CODE], i = this._setCountry($);
3074
- this._closeDropdown();
3075
- const s = e.dataset[E0.DIAL_CODE];
3076
- if (this._updateDialCode(s), this.options.formatOnDisplay) {
3077
- const a = this._getTelInputValue();
3078
- this._updateValFromNumber(a);
3079
- }
3080
- this.ui.telInput.focus(), i && this._triggerCountryChange();
3081
- }
3082
- //* Close the dropdown and unbind any listeners.
3083
- _closeDropdown() {
3084
- this.ui.dropdownContent.classList.contains(N.HIDE) || (this.ui.dropdownContent.classList.add(N.HIDE), this.ui.selectedCountry.setAttribute(b.EXPANDED, "false"), this.options.countrySearch && (this.ui.searchInput.removeAttribute(b.ACTIVE_DESCENDANT), this.ui.highlightedItem && (this.ui.highlightedItem.classList.remove(N.HIGHLIGHT), this.ui.highlightedItem = null)), this.ui.dropdownArrow.classList.remove(N.ARROW_UP), this.dropdownAbortController.abort(), this.dropdownAbortController = null, this.options.dropdownContainer && this.ui.dropdown.remove(), this._trigger(_1.CLOSE_COUNTRY_DROPDOWN));
3085
- }
3086
- //* Replace any existing dial code with the new one
3087
- //* Note: called from _selectListItem and setCountry
3088
- _updateDialCode(e) {
3089
- const $ = this._getTelInputValue(), i = `+${e}`;
3090
- let s;
3091
- if ($.startsWith("+")) {
3092
- const a = this._getDialCode($);
3093
- a ? s = $.replace(a, i) : s = i, this._setTelInputValue(s);
3094
- }
3095
- }
3096
- //* Try and extract a valid international dial code from a full telephone number.
3097
- //* Note: returns the raw string inc plus character and any whitespace/dots etc.
3098
- _getDialCode(e, $) {
3099
- let i = "";
3100
- if (e.startsWith("+")) {
3101
- let s = "", a = !1;
3102
- for (let u = 0; u < e.length; u++) {
3103
- const f = e.charAt(u);
3104
- if (/[0-9]/.test(f)) {
3105
- if (s += f, !!!this.dialCodeToIso2Map[s])
3106
- break;
3107
- if (this.dialCodes.has(s)) {
3108
- if (i = e.substring(0, u + 1), a = !0, !$)
3109
- break;
3110
- } else $ && a && (i = e.substring(0, u + 1));
3111
- if (s.length === this.dialCodeMaxLen)
3112
- break;
3113
- }
3114
- }
3115
- }
3116
- return i;
3117
- }
3118
- //* Get the input val, adding the dial code if separateDialCode is enabled.
3119
- _getFullNumber(e) {
3120
- const $ = e ? this._normaliseNumerals(e) : this._getTelInputValue(), { dialCode: i } = this.selectedCountryData;
3121
- let s;
3122
- const a = N1($);
3123
- return this.options.separateDialCode && !$.startsWith("+") && i && a ? s = `+${i}` : s = "", s + $;
3124
- }
3125
- //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
3126
- _beforeSetNumber(e) {
3127
- const $ = this._getDialCode(e), i = y2(
3128
- e,
3129
- $,
3130
- this.options.separateDialCode,
3131
- this.selectedCountryData
3132
- );
3133
- return this._cap(i);
3134
- }
3135
- //* Trigger the 'countrychange' event.
3136
- _triggerCountryChange() {
3137
- this._trigger(_1.COUNTRY_CHANGE);
3138
- }
3139
- //**************************
3140
- //* SECRET PUBLIC METHODS
3141
- //**************************
3142
- //* This is called when the geoip call returns.
3143
- handleAutoCountry() {
3144
- this.options.initialCountry === P1.AUTO && m.autoCountry && (this.defaultCountry = m.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(N.GLOBE) || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
3145
- }
3146
- //* This is called when the utils request completes.
3147
- handleUtils() {
3148
- if (m.utils) {
3149
- const e = this._getTelInputValue();
3150
- e && this._updateValFromNumber(e), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength());
3151
- }
3152
- this.resolveUtilsScriptPromise();
3153
- }
3154
- //********************
3155
- //* PUBLIC METHODS
3156
- //********************
3157
- //* Remove plugin.
3158
- destroy() {
3159
- this.ui.telInput && (this.options.allowDropdown && this._closeDropdown(), this.abortController.abort(), this.abortController = null, this.ui.destroy(), m.instances instanceof Map ? m.instances.delete(this.id) : delete m.instances[this.id]);
3160
- }
3161
- //* Get the extension from the current number.
3162
- getExtension() {
3163
- return m.utils ? m.utils.getExtension(
3164
- this._getFullNumber(),
3165
- this.selectedCountryData.iso2
3166
- ) : "";
3167
- }
3168
- //* Format the number to the given format.
3169
- getNumber(e) {
3170
- if (m.utils) {
3171
- const { iso2: $ } = this.selectedCountryData, i = this._getFullNumber(), s = m.utils.formatNumber(
3172
- i,
3173
- $,
3174
- e
3175
- );
3176
- return this._mapAsciiToUserNumerals(s);
3177
- }
3178
- return "";
3179
- }
3180
- //* Get the type of the entered number e.g. landline/mobile.
3181
- getNumberType() {
3182
- return m.utils ? m.utils.getNumberType(
3183
- this._getFullNumber(),
3184
- this.selectedCountryData.iso2
3185
- ) : N0.UNKNOWN_NUMBER_TYPE;
3186
- }
3187
- //* Get the country data for the currently selected country.
3188
- getSelectedCountryData() {
3189
- return this.selectedCountryData;
3190
- }
3191
- //* Get the validation error.
3192
- getValidationError() {
3193
- if (m.utils) {
3194
- const { iso2: e } = this.selectedCountryData;
3195
- return m.utils.getValidationError(this._getFullNumber(), e);
3196
- }
3197
- return N0.UNKNOWN_VALIDATION_ERROR;
3198
- }
3199
- //* Validate the input val using number length only
3200
- isValidNumber() {
3201
- const { dialCode: e, iso2: $ } = this.selectedCountryData;
3202
- if (e === v1.DIAL_CODE && m.utils) {
3203
- const i = this._getFullNumber(), s = m.utils.getCoreNumber(i, $);
3204
- if (s[0] === v1.MOBILE_PREFIX && s.length !== v1.MOBILE_CORE_LENGTH)
3205
- return !1;
3206
- }
3207
- return this._validateNumber(!1);
3208
- }
3209
- //* Validate the input val with precise validation
3210
- isValidNumberPrecise() {
3211
- return this._validateNumber(!0);
3212
- }
3213
- _utilsIsPossibleNumber(e) {
3214
- return m.utils ? m.utils.isPossibleNumber(
3215
- e,
3216
- this.selectedCountryData.iso2,
3217
- this.options.validationNumberTypes
3218
- ) : null;
3219
- }
3220
- //* Shared internal validation logic to handle alpha character extension rules.
3221
- _validateNumber(e) {
3222
- if (!m.utils)
3223
- return null;
3224
- if (!this.selectedCountryData.iso2)
3225
- return !1;
3226
- const $ = (u) => e ? this._utilsIsValidNumber(u) : this._utilsIsPossibleNumber(u), i = this._getFullNumber(), s = i.search(d1.ALPHA_UNICODE);
3227
- if (s > -1 && !this.options.allowPhonewords) {
3228
- const u = i.substring(0, s), f = $(u), C = $(i);
3229
- return f && C;
3230
- }
3231
- return $(i);
3232
- }
3233
- _utilsIsValidNumber(e) {
3234
- return m.utils ? m.utils.isValidNumber(
3235
- e,
3236
- this.selectedCountryData.iso2,
3237
- this.options.validationNumberTypes
3238
- ) : null;
3239
- }
3240
- //* Update the selected country, and update the input val accordingly.
3241
- setCountry(e) {
3242
- const $ = e == null ? void 0 : e.toLowerCase();
3243
- if (!O1($))
3244
- throw new Error(`Invalid country code: '${$}'`);
3245
- const i = this.selectedCountryData.iso2;
3246
- if (e && $ !== i || !e && i) {
3247
- if (this._setCountry($), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay) {
3248
- const a = this._getTelInputValue();
3249
- this._updateValFromNumber(a);
3250
- }
3251
- this._triggerCountryChange();
3252
- }
3253
- }
3254
- //* Set the input value and update the country.
3255
- setNumber(e) {
3256
- const $ = this._normaliseNumerals(e), i = this._updateCountryFromNumber($);
3257
- this._updateValFromNumber($), i && this._triggerCountryChange(), this._trigger(_1.INPUT, { isSetNumber: !0 });
3258
- }
3259
- //* Set the placeholder number typ
3260
- setPlaceholderNumberType(e) {
3261
- this.options.placeholderNumberType = e, this._updatePlaceholder();
3262
- }
3263
- setDisabled(e) {
3264
- this.ui.telInput.disabled = e, e ? this.ui.selectedCountry.setAttribute("disabled", "true") : this.ui.selectedCountry.removeAttribute("disabled");
3265
- }
3266
- }
3267
- const L2 = (h) => {
3268
- if (!m.utils && !m.startedLoadingUtilsScript) {
3269
- let e;
3270
- if (typeof h == "function")
3271
- try {
3272
- e = Promise.resolve(h());
3273
- } catch ($) {
3274
- return Promise.reject($);
3275
- }
3276
- else
3277
- return Promise.reject(
3278
- new TypeError(
3279
- `The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof h}`
3280
- )
3281
- );
3282
- return m.startedLoadingUtilsScript = !0, e.then(($) => {
3283
- const i = $ == null ? void 0 : $.default;
3284
- if (!i || typeof i != "object")
3285
- throw new TypeError(
3286
- "The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
3287
- );
3288
- return m.utils = i, l1("handleUtils"), !0;
3289
- }).catch(($) => {
3290
- throw l1("rejectUtilsScriptPromise", $), $;
3291
- });
3292
- }
3293
- return null;
3294
- }, l1 = (h, ...e) => {
3295
- Object.values(m.instances).forEach(($) => {
3296
- const i = $[h];
3297
- typeof i == "function" && i.apply($, e);
3298
- });
3299
- }, m = Object.assign(
3300
- (h, e) => {
3301
- const $ = new B1(h, e);
3302
- return m.instances[$.id] = $, h.iti = $, $;
3303
- },
3304
- {
3305
- defaults: T0,
3306
- //* Using a static var like this allows us to mock it in the tests.
3307
- documentReady: () => document.readyState === "complete",
3308
- //* Get the country data object.
3309
- getCountryData: () => t1,
3310
- //* A getter for the plugin instance.
3311
- getInstance: (h) => {
3312
- const e = h.dataset.intlTelInputId;
3313
- return e ? m.instances[e] : null;
3314
- },
3315
- //* A map from instance ID to instance object.
3316
- instances: {},
3317
- attachUtils: L2,
3318
- startedLoadingUtilsScript: !1,
3319
- startedLoadingAutoCountry: !1,
3320
- version: "25.14.1"
3321
- }
3322
- );
1
+ import { defineComponent as T2, mergeModels as k1, useModel as v2, ref as g1, onMounted as M2, watch as I2, onUnmounted as N2, withDirectives as A2, createElementBlock as R2, openBlock as G2, mergeProps as _2, vModelText as L2 } from "vue";
2
+ import { i as z1 } from "../intl-tel-input-BY4WpieT.mjs";
3323
3
  (function() {
3324
- var h = this || self;
3325
- function e(d, t) {
4
+ var P = this || self;
5
+ function p(d, $) {
3326
6
  d = d.split(".");
3327
- var n = h;
3328
- d[0] in n || typeof n.execScript > "u" || n.execScript("var " + d[0]);
3329
- for (var r; d.length && (r = d.shift()); ) d.length || t === void 0 ? n[r] && n[r] !== Object.prototype[r] ? n = n[r] : n = n[r] = {} : n[r] = t;
7
+ var t = P;
8
+ d[0] in t || typeof t.execScript > "u" || t.execScript("var " + d[0]);
9
+ for (var e; d.length && (e = d.shift()); ) d.length || $ === void 0 ? t[e] && t[e] !== Object.prototype[e] ? t = t[e] : t = t[e] = {} : t[e] = $;
3330
10
  }
3331
- function $(d, t) {
3332
- function n() {
11
+ function I(d, $) {
12
+ function t() {
3333
13
  }
3334
- n.prototype = t.prototype, d.ma = t.prototype, d.prototype = new n(), d.prototype.constructor = d, d.sa = function(r, o, l) {
3335
- for (var c = Array(arguments.length - 2), p = 2; p < arguments.length; p++) c[p - 2] = arguments[p];
3336
- return t.prototype[o].apply(r, c);
14
+ t.prototype = $.prototype, d.ma = $.prototype, d.prototype = new t(), d.prototype.constructor = d, d.sa = function(e, n, r) {
15
+ for (var u = Array(arguments.length - 2), i = 2; i < arguments.length; i++) u[i - 2] = arguments[i];
16
+ return $.prototype[n].apply(e, u);
3337
17
  };
3338
18
  }
3339
- function i(d) {
3340
- const t = [];
3341
- let n = 0;
3342
- for (const r in d) t[n++] = d[r];
3343
- return t;
19
+ function U(d) {
20
+ const $ = [];
21
+ let t = 0;
22
+ for (const e in d) $[t++] = d[e];
23
+ return $;
3344
24
  }
3345
- var s = class {
25
+ var N = class {
3346
26
  constructor(d) {
3347
- if (a !== a) throw Error("SafeUrl is not meant to be built directly");
27
+ if (_ !== _) throw Error("SafeUrl is not meant to be built directly");
3348
28
  this.g = d;
3349
29
  }
3350
30
  toString() {
3351
31
  return this.g.toString();
3352
32
  }
3353
- }, a = {};
3354
- new s("about:invalid#zClosurez"), new s("about:blank");
3355
- const u = {};
3356
- class f {
33
+ }, _ = {};
34
+ new N("about:invalid#zClosurez"), new N("about:blank");
35
+ const L = {};
36
+ class C {
3357
37
  constructor() {
3358
- if (u !== u) throw Error("SafeStyle is not meant to be built directly");
38
+ if (L !== L) throw Error("SafeStyle is not meant to be built directly");
3359
39
  }
3360
40
  toString() {
3361
41
  return "";
3362
42
  }
3363
43
  }
3364
- new f();
3365
- const C = {};
3366
- class y {
44
+ new C();
45
+ const K = {};
46
+ class J {
3367
47
  constructor() {
3368
- if (C !== C) throw Error("SafeStyleSheet is not meant to be built directly");
48
+ if (K !== K) throw Error("SafeStyleSheet is not meant to be built directly");
3369
49
  }
3370
50
  toString() {
3371
51
  return "";
3372
52
  }
3373
53
  }
3374
- new y();
3375
- const _ = {};
3376
- class E {
54
+ new J();
55
+ const V = {};
56
+ class X {
3377
57
  constructor() {
3378
- var t = h.trustedTypes && h.trustedTypes.emptyHTML || "";
3379
- if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
3380
- this.g = t;
58
+ var $ = P.trustedTypes && P.trustedTypes.emptyHTML || "";
59
+ if (V !== V) throw Error("SafeHtml is not meant to be built directly");
60
+ this.g = $;
3381
61
  }
3382
62
  toString() {
3383
63
  return this.g.toString();
3384
64
  }
3385
65
  }
3386
- new E();
3387
- function B(d, t) {
3388
- switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
3389
- case H:
3390
- case k:
3391
- case W:
3392
- case D:
3393
- case K:
3394
- case w:
3395
- case S:
66
+ new X();
67
+ function n1(d, $) {
68
+ switch (this.g = d, this.l = !!$.aa, this.h = $.i, this.s = $.type, this.o = !1, this.h) {
69
+ case r1:
70
+ case b1:
71
+ case d2:
72
+ case $2:
73
+ case t2:
74
+ case B:
75
+ case g:
3396
76
  this.o = !0;
3397
77
  }
3398
- this.j = t.defaultValue;
78
+ this.j = $.defaultValue;
3399
79
  }
3400
- var S = 1, w = 2, H = 3, k = 4, W = 6, D = 16, K = 18;
3401
- function V(d, t) {
3402
- for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
3403
- var n = t[d];
3404
- this.g[n.g] = n;
80
+ var g = 1, B = 2, r1 = 3, b1 = 4, d2 = 6, $2 = 16, t2 = 18;
81
+ function e2(d, $) {
82
+ for (this.h = d, this.g = {}, d = 0; d < $.length; d++) {
83
+ var t = $[d];
84
+ this.g[t.g] = t;
3405
85
  }
3406
86
  }
3407
- function $1(d) {
3408
- return d = i(d.g), d.sort(function(t, n) {
3409
- return t.g - n.g;
87
+ function n2(d) {
88
+ return d = U(d.g), d.sort(function($, t) {
89
+ return $.g - t.g;
3410
90
  }), d;
3411
91
  }
3412
- function R() {
92
+ function S() {
3413
93
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
3414
94
  }
3415
- R.prototype.has = function(d) {
3416
- return U(this, d.g);
3417
- }, R.prototype.get = function(d, t) {
3418
- return g(this, d.g, t);
3419
- }, R.prototype.set = function(d, t) {
3420
- P(this, d.g, t);
3421
- }, R.prototype.add = function(d, t) {
3422
- U1(this, d.g, t);
95
+ S.prototype.has = function(d) {
96
+ return E(this, d.g);
97
+ }, S.prototype.get = function(d, $) {
98
+ return f(this, d.g, $);
99
+ }, S.prototype.set = function(d, $) {
100
+ h(this, d.g, $);
101
+ }, S.prototype.add = function(d, $) {
102
+ h1(this, d.g, $);
3423
103
  };
3424
- function a1(d, t) {
3425
- for (var n = $1(d.m()), r = 0; r < n.length; r++) {
3426
- var o = n[r], l = o.g;
3427
- if (U(t, l)) {
3428
- d.g && delete d.g[o.g];
3429
- var c = o.h == 11 || o.h == 10;
3430
- if (o.l) {
3431
- o = O(t, l);
3432
- for (var p = 0; p < o.length; p++) U1(d, l, c ? o[p].clone() : o[p]);
3433
- } else o = c1(t, l), c ? (c = c1(d, l)) ? a1(c, o) : P(d, l, o.clone()) : P(d, l, o);
104
+ function a1(d, $) {
105
+ for (var t = n2(d.m()), e = 0; e < t.length; e++) {
106
+ var n = t[e], r = n.g;
107
+ if (E($, r)) {
108
+ d.g && delete d.g[n.g];
109
+ var u = n.h == 11 || n.h == 10;
110
+ if (n.l) {
111
+ n = m($, r);
112
+ for (var i = 0; i < n.length; i++) h1(d, r, u ? n[i].clone() : n[i]);
113
+ } else n = Q($, r), u ? (u = Q(d, r)) ? a1(u, n) : h(d, r, n.clone()) : h(d, r, n);
3434
114
  }
3435
115
  }
3436
116
  }
3437
- R.prototype.clone = function() {
117
+ S.prototype.clone = function() {
3438
118
  var d = new this.constructor();
3439
119
  return d != this && (d.h = {}, d.g && (d.g = {}), a1(d, this)), d;
3440
120
  };
3441
- function U(d, t) {
3442
- return d.h[t] != null;
121
+ function E(d, $) {
122
+ return d.h[$] != null;
3443
123
  }
3444
- function c1(d, t) {
3445
- var n = d.h[t];
3446
- if (n == null) return null;
124
+ function Q(d, $) {
125
+ var t = d.h[$];
126
+ if (t == null) return null;
3447
127
  if (d.l) {
3448
- if (!(t in d.g)) {
3449
- var r = d.l, o = d.j[t];
3450
- if (n != null) if (o.l) {
3451
- for (var l = [], c = 0; c < n.length; c++) l[c] = r.h(o, n[c]);
3452
- n = l;
3453
- } else n = r.h(o, n);
3454
- return d.g[t] = n;
128
+ if (!($ in d.g)) {
129
+ var e = d.l, n = d.j[$];
130
+ if (t != null) if (n.l) {
131
+ for (var r = [], u = 0; u < t.length; u++) r[u] = e.h(n, t[u]);
132
+ t = r;
133
+ } else t = e.h(n, t);
134
+ return d.g[$] = t;
3455
135
  }
3456
- return d.g[t];
136
+ return d.g[$];
3457
137
  }
3458
- return n;
138
+ return t;
3459
139
  }
3460
- function g(d, t, n) {
3461
- var r = c1(d, t);
3462
- return d.j[t].l ? r[n || 0] : r;
140
+ function f(d, $, t) {
141
+ var e = Q(d, $);
142
+ return d.j[$].l ? e[t || 0] : e;
3463
143
  }
3464
- function L(d, t) {
3465
- if (U(d, t)) d = g(d, t);
144
+ function l(d, $) {
145
+ if (E(d, $)) d = f(d, $);
3466
146
  else d: {
3467
- if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
3468
- else if (t === Number) d.j = 0;
3469
- else if (t === String) d.j = d.o ? "0" : "";
147
+ if (d = d.j[$], d.j === void 0) if ($ = d.s, $ === Boolean) d.j = !1;
148
+ else if ($ === Number) d.j = 0;
149
+ else if ($ === String) d.j = d.o ? "0" : "";
3470
150
  else {
3471
- d = new t();
151
+ d = new $();
3472
152
  break d;
3473
153
  }
3474
154
  d = d.j;
3475
155
  }
3476
156
  return d;
3477
157
  }
3478
- function O(d, t) {
3479
- return c1(d, t) || [];
158
+ function m(d, $) {
159
+ return Q(d, $) || [];
3480
160
  }
3481
- function z(d, t) {
3482
- return d.j[t].l ? U(d, t) ? d.h[t].length : 0 : U(d, t) ? 1 : 0;
161
+ function A(d, $) {
162
+ return d.j[$].l ? E(d, $) ? d.h[$].length : 0 : E(d, $) ? 1 : 0;
3483
163
  }
3484
- function P(d, t, n) {
3485
- d.h[t] = n, d.g && (d.g[t] = n);
164
+ function h(d, $, t) {
165
+ d.h[$] = t, d.g && (d.g[$] = t);
3486
166
  }
3487
- function U1(d, t, n) {
3488
- d.h[t] || (d.h[t] = []), d.h[t].push(n), d.g && delete d.g[t];
167
+ function h1(d, $, t) {
168
+ d.h[$] || (d.h[$] = []), d.h[$].push(t), d.g && delete d.g[$];
3489
169
  }
3490
- function h1(d, t) {
3491
- var n = [], r;
3492
- for (r in t) r != 0 && n.push(new B(r, t[r]));
3493
- return new V(d, n);
170
+ function k(d, $) {
171
+ var t = [], e;
172
+ for (e in $) e != 0 && t.push(new n1(e, $[e]));
173
+ return new e2(d, t);
3494
174
  }
3495
- function f1() {
175
+ function z() {
3496
176
  }
3497
- f1.prototype.g = function(d) {
177
+ z.prototype.g = function(d) {
3498
178
  throw new d.h(), Error("Unimplemented");
3499
- }, f1.prototype.h = function(d, t) {
3500
- if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
3501
- if (d.h == 14) return typeof t == "string" && G1.test(t) && (d = Number(t), 0 < d) ? d : t;
3502
- if (!d.o) return t;
179
+ }, z.prototype.h = function(d, $) {
180
+ if (d.h == 11 || d.h == 10) return $ instanceof S ? $ : this.g(d.s.prototype.m(), $);
181
+ if (d.h == 14) return typeof $ == "string" && c1.test($) && (d = Number($), 0 < d) ? d : $;
182
+ if (!d.o) return $;
3503
183
  if (d = d.s, d === String) {
3504
- if (typeof t == "number") return String(t);
3505
- } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || G1.test(t))) return Number(t);
3506
- return t;
184
+ if (typeof $ == "number") return String($);
185
+ } else if (d === Number && typeof $ == "string" && ($ === "Infinity" || $ === "-Infinity" || $ === "NaN" || c1.test($))) return Number($);
186
+ return $;
3507
187
  };
3508
- var G1 = /^-?[0-9]+$/;
3509
- function E1() {
188
+ var c1 = /^-?[0-9]+$/;
189
+ function u1() {
3510
190
  }
3511
- $(E1, f1), E1.prototype.g = function(d, t) {
3512
- return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
191
+ I(u1, z), u1.prototype.g = function(d, $) {
192
+ return d = new d.h(), d.l = this, d.h = $, d.g = {}, d;
3513
193
  };
3514
- function n1() {
194
+ function F() {
3515
195
  }
3516
- $(n1, E1), n1.prototype.h = function(d, t) {
3517
- return d.h == 8 ? !!t : f1.prototype.h.apply(this, arguments);
3518
- }, n1.prototype.g = function(d, t) {
3519
- return n1.ma.g.call(this, d, t);
196
+ I(F, u1), F.prototype.h = function(d, $) {
197
+ return d.h == 8 ? !!$ : z.prototype.h.apply(this, arguments);
198
+ }, F.prototype.g = function(d, $) {
199
+ return F.ma.g.call(this, d, $);
3520
200
  };
3521
- function v(d, t) {
201
+ function a(d, $) {
3522
202
  d != null && this.g.apply(this, arguments);
3523
203
  }
3524
- v.prototype.h = "", v.prototype.set = function(d) {
204
+ a.prototype.h = "", a.prototype.set = function(d) {
3525
205
  this.h = "" + d;
3526
- }, v.prototype.g = function(d, t, n) {
3527
- if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
206
+ }, a.prototype.g = function(d, $, t) {
207
+ if (this.h += String(d), $ != null) for (let e = 1; e < arguments.length; e++) this.h += arguments[e];
3528
208
  return this;
3529
209
  };
3530
- function G(d) {
210
+ function y(d) {
3531
211
  d.h = "";
3532
212
  }
3533
- v.prototype.toString = function() {
213
+ a.prototype.toString = function() {
3534
214
  return this.h;
3535
215
  };
3536
- function X() {
3537
- R.call(this);
3538
- }
3539
- $(X, R);
3540
- var H1 = null;
3541
- function A() {
3542
- R.call(this);
3543
- }
3544
- $(A, R);
3545
- var k1 = null;
3546
- function q() {
3547
- R.call(this);
3548
- }
3549
- $(q, R);
3550
- var V1 = null;
3551
- X.prototype.m = function() {
3552
- var d = H1;
3553
- return d || (H1 = d = h1(X, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
3554
- }, X.m = X.prototype.m, A.prototype.m = function() {
3555
- var d = k1;
3556
- return d || (k1 = d = h1(A, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
3557
- }, A.m = A.prototype.m, q.prototype.m = function() {
3558
- var d = V1;
3559
- return d || (V1 = d = h1(q, {
216
+ function O() {
217
+ S.call(this);
218
+ }
219
+ I(O, S);
220
+ var p1 = null;
221
+ function s() {
222
+ S.call(this);
223
+ }
224
+ I(s, S);
225
+ var m1 = null;
226
+ function x() {
227
+ S.call(this);
228
+ }
229
+ I(x, S);
230
+ var C1 = null;
231
+ O.prototype.m = function() {
232
+ var d = p1;
233
+ return d || (p1 = d = k(O, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
234
+ }, O.m = O.prototype.m, s.prototype.m = function() {
235
+ var d = m1;
236
+ return d || (m1 = d = k(s, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
237
+ }, s.m = s.prototype.m, x.prototype.m = function() {
238
+ var d = C1;
239
+ return d || (C1 = d = k(x, {
3560
240
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
3561
- 1: { name: "general_desc", i: 11, type: A },
3562
- 2: { name: "fixed_line", i: 11, type: A },
3563
- 3: { name: "mobile", i: 11, type: A },
3564
- 4: { name: "toll_free", i: 11, type: A },
3565
- 5: { name: "premium_rate", i: 11, type: A },
3566
- 6: { name: "shared_cost", i: 11, type: A },
3567
- 7: { name: "personal_number", i: 11, type: A },
3568
- 8: { name: "voip", i: 11, type: A },
3569
- 21: { name: "pager", i: 11, type: A },
3570
- 25: { name: "uan", i: 11, type: A },
3571
- 27: { name: "emergency", i: 11, type: A },
3572
- 28: { name: "voicemail", i: 11, type: A },
3573
- 29: { name: "short_code", i: 11, type: A },
3574
- 30: { name: "standard_rate", i: 11, type: A },
3575
- 31: { name: "carrier_specific", i: 11, type: A },
3576
- 33: { name: "sms_services", i: 11, type: A },
3577
- 24: { name: "no_international_dialling", i: 11, type: A },
241
+ 1: { name: "general_desc", i: 11, type: s },
242
+ 2: { name: "fixed_line", i: 11, type: s },
243
+ 3: { name: "mobile", i: 11, type: s },
244
+ 4: { name: "toll_free", i: 11, type: s },
245
+ 5: { name: "premium_rate", i: 11, type: s },
246
+ 6: { name: "shared_cost", i: 11, type: s },
247
+ 7: { name: "personal_number", i: 11, type: s },
248
+ 8: { name: "voip", i: 11, type: s },
249
+ 21: { name: "pager", i: 11, type: s },
250
+ 25: { name: "uan", i: 11, type: s },
251
+ 27: { name: "emergency", i: 11, type: s },
252
+ 28: { name: "voicemail", i: 11, type: s },
253
+ 29: { name: "short_code", i: 11, type: s },
254
+ 30: { name: "standard_rate", i: 11, type: s },
255
+ 31: { name: "carrier_specific", i: 11, type: s },
256
+ 33: { name: "sms_services", i: 11, type: s },
257
+ 24: { name: "no_international_dialling", i: 11, type: s },
3578
258
  9: { name: "id", required: !0, i: 9, type: String },
3579
259
  10: { name: "country_code", i: 5, type: Number },
3580
260
  11: { name: "international_prefix", i: 9, type: String },
@@ -3588,26 +268,26 @@ const L2 = (h) => {
3588
268
  },
3589
269
  16: { name: "national_prefix_transform_rule", i: 9, type: String },
3590
270
  18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
3591
- 19: { name: "number_format", aa: !0, i: 11, type: X },
3592
- 20: { name: "intl_number_format", aa: !0, i: 11, type: X },
271
+ 19: { name: "number_format", aa: !0, i: 11, type: O },
272
+ 20: { name: "intl_number_format", aa: !0, i: 11, type: O },
3593
273
  22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
3594
274
  23: { name: "leading_digits", i: 9, type: String }
3595
275
  })), d;
3596
- }, q.m = q.prototype.m;
3597
- function Z() {
3598
- R.call(this);
276
+ }, x.m = x.prototype.m;
277
+ function R() {
278
+ S.call(this);
3599
279
  }
3600
- $(Z, R);
3601
- var F1 = null, D0 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
3602
- Z.prototype.m = function() {
3603
- var d = F1;
3604
- return d || (F1 = d = h1(Z, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: D0 }, 7: {
280
+ I(R, S);
281
+ var S1 = null, r2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
282
+ R.prototype.m = function() {
283
+ var d = S1;
284
+ return d || (S1 = d = k(R, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: r2 }, 7: {
3605
285
  name: "preferred_domestic_carrier_code",
3606
286
  i: 9,
3607
287
  type: String
3608
288
  } })), d;
3609
- }, Z.ctor = Z, Z.ctor.m = Z.prototype.m;
3610
- var i1 = {
289
+ }, R.ctor = R, R.ctor.m = R.prototype.m;
290
+ var Z = {
3611
291
  1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
3612
292
  7: ["RU", "KZ"],
3613
293
  20: ["EG"],
@@ -3823,7 +503,7 @@ const L2 = (h) => {
3823
503
  995: ["GE"],
3824
504
  996: ["KG"],
3825
505
  998: ["UZ"]
3826
- }, W1 = {
506
+ }, E1 = {
3827
507
  AC: [, [
3828
508
  ,
3829
509
  ,
@@ -8906,13 +5586,13 @@ const L2 = (h) => {
8906
5586
  ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
8907
5587
  979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
8908
5588
  };
8909
- function M() {
5589
+ function c() {
8910
5590
  this.g = {};
8911
5591
  }
8912
- M.h = void 0, M.g = function() {
8913
- return M.h ? M.h : M.h = new M();
5592
+ c.h = void 0, c.g = function() {
5593
+ return c.h ? c.h : c.h = new c();
8914
5594
  };
8915
- var S1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, v0 = {
5595
+ var i1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, u2 = {
8916
5596
  0: "0",
8917
5597
  1: "1",
8918
5598
  2: "2",
@@ -8926,7 +5606,7 @@ const L2 = (h) => {
8926
5606
  "+": "+",
8927
5607
  "*": "*",
8928
5608
  "#": "#"
8929
- }, P0 = {
5609
+ }, i2 = {
8930
5610
  0: "0",
8931
5611
  1: "1",
8932
5612
  2: "2",
@@ -8993,154 +5673,154 @@ const L2 = (h) => {
8993
5673
  X: "9",
8994
5674
  Y: "9",
8995
5675
  Z: "9"
8996
- }, M0 = RegExp("[++]+"), s1 = RegExp("^[++]+"), K1 = RegExp("([0-90-9٠-٩۰-۹])"), R0 = RegExp("[++0-90-9٠-٩۰-۹]"), O0 = /[\\\/] *x/, x0 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), B0 = /(?:.*?[A-Za-z]){3}.*/, U0 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), G0 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8997
- function e1(d) {
5676
+ }, f2 = RegExp("[++]+"), H = RegExp("^[++]+"), y1 = RegExp("([0-90-9٠-٩۰-۹])"), o2 = RegExp("[++0-90-9٠-٩۰-۹]"), l2 = /[\\\/] *x/, s2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), g2 = /(?:.*?[A-Za-z]){3}.*/, a2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), h2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
5677
+ function D(d) {
8998
5678
  return "([0-90-9٠-٩۰-۹]{1," + d + "})";
8999
5679
  }
9000
- function j1() {
9001
- return ";ext=" + e1("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (e1("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (e1("9") + "#?|[- ]+") + (e1("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (e1("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (e1("9") + "#?");
5680
+ function T1() {
5681
+ return ";ext=" + D("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (D("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (D("9") + "#?|[- ]+") + (D("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (D("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (D("9") + "#?");
9002
5682
  }
9003
- var Y1 = new RegExp("(?:" + j1() + ")$", "i"), H0 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + j1() + ")?$", "i"), k0 = /(\$\d)/, V0 = /^\(?\$1\)?$/;
9004
- function z1(d) {
9005
- return 2 > d.length ? !1 : j(H0, d);
5683
+ var v1 = new RegExp("(?:" + T1() + ")$", "i"), c2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + T1() + ")?$", "i"), p2 = /(\$\d)/, m2 = /^\(?\$1\)?$/;
5684
+ function M1(d) {
5685
+ return 2 > d.length ? !1 : v(c2, d);
9006
5686
  }
9007
- function Z1(d) {
9008
- return j(B0, d) ? p1(d, P0) : p1(d, S1);
5687
+ function I1(d) {
5688
+ return v(g2, d) ? q(d, i2) : q(d, i1);
9009
5689
  }
9010
- function J1(d) {
9011
- var t = Z1(d.toString());
9012
- G(d), d.g(t);
5690
+ function N1(d) {
5691
+ var $ = I1(d.toString());
5692
+ y(d), d.g($);
9013
5693
  }
9014
- function X1(d) {
9015
- return d != null && (z(d, 9) != 1 || O(d, 9)[0] != -1);
5694
+ function A1(d) {
5695
+ return d != null && (A(d, 9) != 1 || m(d, 9)[0] != -1);
9016
5696
  }
9017
- function p1(d, t) {
9018
- for (var n = new v(), r, o = d.length, l = 0; l < o; ++l) r = d.charAt(l), r = t[r.toUpperCase()], r != null && n.g(r);
9019
- return n.toString();
5697
+ function q(d, $) {
5698
+ for (var t = new a(), e, n = d.length, r = 0; r < n; ++r) e = d.charAt(r), e = $[e.toUpperCase()], e != null && t.g(e);
5699
+ return t.toString();
9020
5700
  }
9021
- function q1(d) {
9022
- return d.length == 0 || V0.test(d);
5701
+ function R1(d) {
5702
+ return d.length == 0 || m2.test(d);
9023
5703
  }
9024
- function C1(d) {
9025
- return d != null && isNaN(d) && d.toUpperCase() in W1;
5704
+ function b(d) {
5705
+ return d != null && isNaN(d) && d.toUpperCase() in E1;
9026
5706
  }
9027
- M.prototype.format = function(d, t) {
9028
- if (g(d, 2) == 0 && U(d, 5)) {
9029
- var n = L(d, 5);
9030
- if (0 < n.length) return n;
5707
+ c.prototype.format = function(d, $) {
5708
+ if (f(d, 2) == 0 && E(d, 5)) {
5709
+ var t = l(d, 5);
5710
+ if (0 < t.length) return t;
9031
5711
  }
9032
- n = L(d, 1);
9033
- var r = o1(d);
9034
- if (t == 0) return Q1(n, 0, r, "");
9035
- if (!(n in i1)) return r;
9036
- var o = r1(this, n, u1(n));
9037
- d = U(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : U(o, 13) ? g(o, 13) + L(d, 3) : " ext. " + L(d, 3) : "";
5712
+ t = l(d, 1);
5713
+ var e = Y(d);
5714
+ if ($ == 0) return G1(t, 0, e, "");
5715
+ if (!(t in Z)) return e;
5716
+ var n = W(this, t, j(t));
5717
+ d = E(d, 3) && f(d, 3).length != 0 ? $ == 3 ? ";ext=" + f(d, 3) : E(n, 13) ? f(n, 13) + l(d, 3) : " ext. " + l(d, 3) : "";
9038
5718
  d: {
9039
- o = O(o, 20).length == 0 || t == 2 ? O(o, 19) : O(o, 20);
9040
- for (var l, c = o.length, p = 0; p < c; ++p) {
9041
- l = o[p];
9042
- var I = z(l, 3);
9043
- if ((I == 0 || r.search(g(l, 3, I - 1)) == 0) && (I = new RegExp(g(l, 1)), j(I, r))) {
9044
- o = l;
5719
+ n = m(n, 20).length == 0 || $ == 2 ? m(n, 19) : m(n, 20);
5720
+ for (var r, u = n.length, i = 0; i < u; ++i) {
5721
+ r = n[i];
5722
+ var o = A(r, 3);
5723
+ if ((o == 0 || e.search(f(r, 3, o - 1)) == 0) && (o = new RegExp(f(r, 1)), v(o, e))) {
5724
+ n = r;
9045
5725
  break d;
9046
5726
  }
9047
5727
  }
9048
- o = null;
5728
+ n = null;
9049
5729
  }
9050
- return o != null && (c = o, o = L(c, 2), l = new RegExp(g(c, 1)), L(
9051
- c,
5730
+ return n != null && (u = n, n = l(u, 2), r = new RegExp(f(u, 1)), l(
5731
+ u,
9052
5732
  5
9053
- ), c = L(c, 4), r = t == 2 && c != null && 0 < c.length ? r.replace(l, o.replace(k0, c)) : r.replace(l, o), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), Q1(n, t, r, d);
5733
+ ), u = l(u, 4), e = $ == 2 && u != null && 0 < u.length ? e.replace(r, n.replace(p2, u)) : e.replace(r, n), $ == 3 && (e = e.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), e = e.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1(t, $, e, d);
9054
5734
  };
9055
- function r1(d, t, n) {
9056
- return n == "001" ? J(d, "" + t) : J(d, n);
5735
+ function W(d, $, t) {
5736
+ return t == "001" ? G(d, "" + $) : G(d, t);
9057
5737
  }
9058
- function o1(d) {
9059
- if (!U(d, 2)) return "";
9060
- var t = "" + g(d, 2);
9061
- return U(d, 4) && g(d, 4) && 0 < L(d, 8) ? Array(L(d, 8) + 1).join("0") + t : t;
5738
+ function Y(d) {
5739
+ if (!E(d, 2)) return "";
5740
+ var $ = "" + f(d, 2);
5741
+ return E(d, 4) && f(d, 4) && 0 < l(d, 8) ? Array(l(d, 8) + 1).join("0") + $ : $;
9062
5742
  }
9063
- function Q1(d, t, n, r) {
9064
- switch (t) {
5743
+ function G1(d, $, t, e) {
5744
+ switch ($) {
9065
5745
  case 0:
9066
- return "+" + d + n + r;
5746
+ return "+" + d + t + e;
9067
5747
  case 1:
9068
- return "+" + d + " " + n + r;
5748
+ return "+" + d + " " + t + e;
9069
5749
  case 3:
9070
- return "tel:+" + d + "-" + n + r;
5750
+ return "tel:+" + d + "-" + t + e;
9071
5751
  default:
9072
- return n + r;
5752
+ return t + e;
9073
5753
  }
9074
5754
  }
9075
- function g1(d, t) {
9076
- switch (t) {
5755
+ function d1(d, $) {
5756
+ switch ($) {
9077
5757
  case 4:
9078
- return g(d, 5);
5758
+ return f(d, 5);
9079
5759
  case 3:
9080
- return g(d, 4);
5760
+ return f(d, 4);
9081
5761
  case 1:
9082
- return g(d, 3);
5762
+ return f(d, 3);
9083
5763
  case 0:
9084
5764
  case 2:
9085
- return g(d, 2);
5765
+ return f(d, 2);
9086
5766
  case 5:
9087
- return g(d, 6);
5767
+ return f(d, 6);
9088
5768
  case 6:
9089
- return g(d, 8);
5769
+ return f(d, 8);
9090
5770
  case 7:
9091
- return g(d, 7);
5771
+ return f(d, 7);
9092
5772
  case 8:
9093
- return g(d, 21);
5773
+ return f(d, 21);
9094
5774
  case 9:
9095
- return g(d, 25);
5775
+ return f(d, 25);
9096
5776
  case 10:
9097
- return g(d, 28);
5777
+ return f(d, 28);
9098
5778
  default:
9099
- return g(d, 1);
5779
+ return f(d, 1);
9100
5780
  }
9101
5781
  }
9102
- function d0(d, t) {
9103
- var n = t0(d, t);
9104
- return d = r1(d, L(t, 1), n), d == null ? -1 : (t = o1(t), L1(t, d));
5782
+ function _1(d, $) {
5783
+ var t = L1(d, $);
5784
+ return d = W(d, l($, 1), t), d == null ? -1 : ($ = Y($), f1($, d));
9105
5785
  }
9106
- function L1(d, t) {
9107
- return F(d, g(t, 1)) ? F(d, g(t, 5)) ? 4 : F(d, g(t, 4)) ? 3 : F(d, g(t, 6)) ? 5 : F(d, g(t, 8)) ? 6 : F(d, g(t, 7)) ? 7 : F(d, g(t, 21)) ? 8 : F(d, g(t, 25)) ? 9 : F(d, g(t, 28)) ? 10 : F(d, g(t, 2)) ? g(t, 18) || F(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && F(d, g(t, 3)) ? 1 : -1 : -1;
5786
+ function f1(d, $) {
5787
+ return T(d, f($, 1)) ? T(d, f($, 5)) ? 4 : T(d, f($, 4)) ? 3 : T(d, f($, 6)) ? 5 : T(d, f($, 8)) ? 6 : T(d, f($, 7)) ? 7 : T(d, f($, 21)) ? 8 : T(d, f($, 25)) ? 9 : T(d, f($, 28)) ? 10 : T(d, f($, 2)) ? f($, 18) || T(d, f($, 3)) ? 2 : 0 : !f($, 18) && T(d, f($, 3)) ? 1 : -1 : -1;
9108
5788
  }
9109
- function J(d, t) {
9110
- if (t == null) return null;
9111
- t = t.toUpperCase();
9112
- var n = d.g[t];
9113
- if (n == null) {
9114
- if (n = W1[t], n == null) return null;
9115
- n = new n1().g(q.m(), n), d.g[t] = n;
5789
+ function G(d, $) {
5790
+ if ($ == null) return null;
5791
+ $ = $.toUpperCase();
5792
+ var t = d.g[$];
5793
+ if (t == null) {
5794
+ if (t = E1[$], t == null) return null;
5795
+ t = new F().g(x.m(), t), d.g[$] = t;
9116
5796
  }
9117
- return n;
5797
+ return t;
9118
5798
  }
9119
- function F(d, t) {
9120
- var n = d.length;
9121
- return 0 < z(t, 9) && O(t, 9).indexOf(n) == -1 ? !1 : j(L(t, 2), d);
5799
+ function T(d, $) {
5800
+ var t = d.length;
5801
+ return 0 < A($, 9) && m($, 9).indexOf(t) == -1 ? !1 : v(l($, 2), d);
9122
5802
  }
9123
- function F0(d, t) {
9124
- var n = t0(d, t), r = L(t, 1), o = r1(d, r, n);
9125
- return o == null || n != "001" && r != e0(d, n) ? o = !1 : (d = o1(t), o = L1(d, o) != -1), o;
5803
+ function C2(d, $) {
5804
+ var t = L1(d, $), e = l($, 1), n = W(d, e, t);
5805
+ return n == null || t != "001" && e != B1(d, t) ? n = !1 : (d = Y($), n = f1(d, n) != -1), n;
9126
5806
  }
9127
- function t0(d, t) {
9128
- if (t == null) return null;
9129
- var n = L(t, 1);
9130
- if (n = i1[n], n == null) d = null;
9131
- else if (n.length == 1) d = n[0];
5807
+ function L1(d, $) {
5808
+ if ($ == null) return null;
5809
+ var t = l($, 1);
5810
+ if (t = Z[t], t == null) d = null;
5811
+ else if (t.length == 1) d = t[0];
9132
5812
  else d: {
9133
- t = o1(t);
9134
- for (var r, o = n.length, l = 0; l < o; l++) {
9135
- r = n[l];
9136
- var c = J(d, r);
9137
- if (U(c, 23)) {
9138
- if (t.search(g(c, 23)) == 0) {
9139
- d = r;
5813
+ $ = Y($);
5814
+ for (var e, n = t.length, r = 0; r < n; r++) {
5815
+ e = t[r];
5816
+ var u = G(d, e);
5817
+ if (E(u, 23)) {
5818
+ if ($.search(f(u, 23)) == 0) {
5819
+ d = e;
9140
5820
  break d;
9141
5821
  }
9142
- } else if (L1(t, c) != -1) {
9143
- d = r;
5822
+ } else if (f1($, u) != -1) {
5823
+ d = e;
9144
5824
  break d;
9145
5825
  }
9146
5826
  }
@@ -9148,151 +5828,151 @@ const L2 = (h) => {
9148
5828
  }
9149
5829
  return d;
9150
5830
  }
9151
- function u1(d) {
9152
- return d = i1[d], d == null ? "ZZ" : d[0];
5831
+ function j(d) {
5832
+ return d = Z[d], d == null ? "ZZ" : d[0];
9153
5833
  }
9154
- function e0(d, t) {
9155
- if (d = J(d, t), d == null) throw Error("Invalid region code: " + t);
9156
- return L(d, 10);
5834
+ function B1(d, $) {
5835
+ if (d = G(d, $), d == null) throw Error("Invalid region code: " + $);
5836
+ return l(d, 10);
9157
5837
  }
9158
- function m1(d, t, n, r) {
9159
- var o = g1(n, r), l = z(o, 9) == 0 ? O(g(n, 1), 9) : O(o, 9);
9160
- if (o = O(o, 10), r == 2) if (X1(g1(n, 0))) d = g1(n, 1), X1(d) && (l = l.concat(z(d, 9) == 0 ? O(g(n, 1), 9) : O(d, 9)), l.sort(), o.length == 0 ? o = O(d, 10) : (o = o.concat(O(d, 10)), o.sort()));
9161
- else return m1(d, t, n, 1);
9162
- return l[0] == -1 ? 5 : (t = t.length, -1 < o.indexOf(t) ? 4 : (n = l[0], n == t ? 0 : n > t ? 2 : l[l.length - 1] < t ? 3 : -1 < l.indexOf(t, 1) ? 0 : 5));
5838
+ function $1(d, $, t, e) {
5839
+ var n = d1(t, e), r = A(n, 9) == 0 ? m(f(t, 1), 9) : m(n, 9);
5840
+ if (n = m(n, 10), e == 2) if (A1(d1(t, 0))) d = d1(t, 1), A1(d) && (r = r.concat(A(d, 9) == 0 ? m(f(t, 1), 9) : m(d, 9)), r.sort(), n.length == 0 ? n = m(d, 10) : (n = n.concat(m(d, 10)), n.sort()));
5841
+ else return $1(d, $, t, 1);
5842
+ return r[0] == -1 ? 5 : ($ = $.length, -1 < n.indexOf($) ? 4 : (t = r[0], t == $ ? 0 : t > $ ? 2 : r[r.length - 1] < $ ? 3 : -1 < r.indexOf($, 1) ? 0 : 5));
9163
5843
  }
9164
- function y1(d, t, n) {
9165
- var r = o1(t);
9166
- return t = L(t, 1), t in i1 ? (t = r1(d, t, u1(t)), m1(d, r, t, n)) : 1;
5844
+ function t1(d, $, t) {
5845
+ var e = Y($);
5846
+ return $ = l($, 1), $ in Z ? ($ = W(d, $, j($)), $1(d, e, $, t)) : 1;
9167
5847
  }
9168
- function $0(d, t) {
5848
+ function O1(d, $) {
9169
5849
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
9170
- for (var n, r = d.length, o = 1; 3 >= o && o <= r; ++o) if (n = parseInt(d.substring(0, o), 10), n in i1) return t.g(d.substring(o)), n;
5850
+ for (var t, e = d.length, n = 1; 3 >= n && n <= e; ++n) if (t = parseInt(d.substring(0, n), 10), t in Z) return $.g(d.substring(n)), t;
9171
5851
  return 0;
9172
5852
  }
9173
- function n0(d, t, n, r, o, l) {
9174
- if (t.length == 0) return 0;
9175
- t = new v(t);
9176
- var c;
9177
- n != null && (c = g(n, 11)), c == null && (c = "NonMatch");
9178
- var p = t.toString();
9179
- if (p.length == 0) c = 20;
9180
- else if (s1.test(p)) p = p.replace(s1, ""), G(t), t.g(Z1(p)), c = 1;
5853
+ function x1(d, $, t, e, n, r) {
5854
+ if ($.length == 0) return 0;
5855
+ $ = new a($);
5856
+ var u;
5857
+ t != null && (u = f(t, 11)), u == null && (u = "NonMatch");
5858
+ var i = $.toString();
5859
+ if (i.length == 0) u = 20;
5860
+ else if (H.test(i)) i = i.replace(H, ""), y($), $.g(I1(i)), u = 1;
9181
5861
  else {
9182
- if (p = new RegExp(c), J1(t), c = t.toString(), c.search(p) == 0) {
9183
- p = c.match(p)[0].length;
9184
- var I = c.substring(p).match(K1);
9185
- I && I[1] != null && 0 < I[1].length && p1(I[1], S1) == "0" ? c = !1 : (G(t), t.g(c.substring(p)), c = !0);
9186
- } else c = !1;
9187
- c = c ? 5 : 20;
5862
+ if (i = new RegExp(u), N1($), u = $.toString(), u.search(i) == 0) {
5863
+ i = u.match(i)[0].length;
5864
+ var o = u.substring(i).match(y1);
5865
+ o && o[1] != null && 0 < o[1].length && q(o[1], i1) == "0" ? u = !1 : (y($), $.g(u.substring(i)), u = !0);
5866
+ } else u = !1;
5867
+ u = u ? 5 : 20;
9188
5868
  }
9189
- if (o && P(l, 6, c), c != 20) {
9190
- if (2 >= t.h.length) throw Error("Phone number too short after IDD");
9191
- if (d = $0(t, r), d != 0) return P(l, 1, d), d;
5869
+ if (n && h(r, 6, u), u != 20) {
5870
+ if (2 >= $.h.length) throw Error("Phone number too short after IDD");
5871
+ if (d = O1($, e), d != 0) return h(r, 1, d), d;
9192
5872
  throw Error("Invalid country calling code");
9193
5873
  }
9194
- return n != null && (c = L(n, 10), p = "" + c, I = t.toString(), I.lastIndexOf(p, 0) == 0 && (p = new v(I.substring(p.length)), I = g(n, 1), I = new RegExp(L(I, 2)), i0(p, n, null), p = p.toString(), !j(I, t.toString()) && j(I, p) || m1(d, t.toString(), n, -1) == 3)) ? (r.g(p), o && P(l, 6, 10), P(l, 1, c), c) : (P(l, 1, 0), 0);
9195
- }
9196
- function i0(d, t, n) {
9197
- var r = d.toString(), o = r.length, l = g(t, 15);
9198
- if (o != 0 && l != null && l.length != 0) {
9199
- var c = new RegExp("^(?:" + l + ")");
9200
- if (o = c.exec(r)) {
9201
- l = new RegExp(L(g(t, 1), 2));
9202
- var p = j(l, r), I = o.length - 1;
9203
- t = g(t, 16), t == null || t.length == 0 || o[I] == null || o[I].length == 0 ? (!p || j(l, r.substring(o[0].length))) && (n != null && 0 < I && o[I] != null && n.g(o[1]), d.set(r.substring(o[0].length))) : (r = r.replace(c, t), (!p || j(l, r)) && (n != null && 0 < I && n.g(o[1]), d.set(r)));
5874
+ return t != null && (u = l(t, 10), i = "" + u, o = $.toString(), o.lastIndexOf(i, 0) == 0 && (i = new a(o.substring(i.length)), o = f(t, 1), o = new RegExp(l(o, 2)), w1(i, t, null), i = i.toString(), !v(o, $.toString()) && v(o, i) || $1(d, $.toString(), t, -1) == 3)) ? (e.g(i), n && h(r, 6, 10), h(r, 1, u), u) : (h(r, 1, 0), 0);
5875
+ }
5876
+ function w1(d, $, t) {
5877
+ var e = d.toString(), n = e.length, r = f($, 15);
5878
+ if (n != 0 && r != null && r.length != 0) {
5879
+ var u = new RegExp("^(?:" + r + ")");
5880
+ if (n = u.exec(e)) {
5881
+ r = new RegExp(l(f($, 1), 2));
5882
+ var i = v(r, e), o = n.length - 1;
5883
+ $ = f($, 16), $ == null || $.length == 0 || n[o] == null || n[o].length == 0 ? (!i || v(r, e.substring(n[0].length))) && (t != null && 0 < o && n[o] != null && t.g(n[1]), d.set(e.substring(n[0].length))) : (e = e.replace(u, $), (!i || v(r, e)) && (t != null && 0 < o && t.g(n[1]), d.set(e)));
9204
5884
  }
9205
5885
  }
9206
5886
  }
9207
- function Q(d, t, n) {
9208
- if (!C1(n) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
9209
- return s0(d, t, n, !0);
5887
+ function w(d, $, t) {
5888
+ if (!b(t) && 0 < $.length && $.charAt(0) != "+") throw Error("Invalid country calling code");
5889
+ return P1(d, $, t, !0);
9210
5890
  }
9211
- function s0(d, t, n, r) {
9212
- if (t == null) throw Error("The string supplied did not seem to be a phone number");
9213
- if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
9214
- var o = new v(), l = t.indexOf(";phone-context=");
9215
- if (l === -1) l = null;
9216
- else if (l += 15, l >= t.length) l = "";
5891
+ function P1(d, $, t, e) {
5892
+ if ($ == null) throw Error("The string supplied did not seem to be a phone number");
5893
+ if (250 < $.length) throw Error("The string supplied is too long to be a phone number");
5894
+ var n = new a(), r = $.indexOf(";phone-context=");
5895
+ if (r === -1) r = null;
5896
+ else if (r += 15, r >= $.length) r = "";
9217
5897
  else {
9218
- var c = t.indexOf(";", l);
9219
- l = c !== -1 ? t.substring(l, c) : t.substring(l);
5898
+ var u = $.indexOf(";", r);
5899
+ r = u !== -1 ? $.substring(r, u) : $.substring(r);
9220
5900
  }
9221
- var p = l;
9222
- if (p == null ? c = !0 : p.length === 0 ? c = !1 : (c = U0.exec(p), p = G0.exec(p), c = c !== null || p !== null), !c || (l != null ? (l.charAt(0) === "+" && o.g(l), l = t.indexOf("tel:"), o.g(t.substring(0 <= l ? l + 4 : 0, t.indexOf(";phone-context=")))) : (l = o.g, c = t ?? "", p = c.search(R0), 0 <= p ? (c = c.substring(p), c = c.replace(x0, ""), p = c.search(O0), 0 <= p && (c = c.substring(0, p))) : c = "", l.call(o, c)), l = o.toString(), c = l.indexOf(";isub="), 0 < c && (G(o), o.g(l.substring(0, c))), !z1(o.toString()))) throw Error("The string supplied did not seem to be a phone number");
9223
- if (l = o.toString(), !(C1(n) || l != null && 0 < l.length && s1.test(l))) throw Error("Invalid country calling code");
9224
- l = new Z(), r && P(l, 5, t);
5901
+ var i = r;
5902
+ if (i == null ? u = !0 : i.length === 0 ? u = !1 : (u = a2.exec(i), i = h2.exec(i), u = u !== null || i !== null), !u || (r != null ? (r.charAt(0) === "+" && n.g(r), r = $.indexOf("tel:"), n.g($.substring(0 <= r ? r + 4 : 0, $.indexOf(";phone-context=")))) : (r = n.g, u = $ ?? "", i = u.search(o2), 0 <= i ? (u = u.substring(i), u = u.replace(s2, ""), i = u.search(l2), 0 <= i && (u = u.substring(0, i))) : u = "", r.call(n, u)), r = n.toString(), u = r.indexOf(";isub="), 0 < u && (y(n), n.g(r.substring(0, u))), !M1(n.toString()))) throw Error("The string supplied did not seem to be a phone number");
5903
+ if (r = n.toString(), !(b(t) || r != null && 0 < r.length && H.test(r))) throw Error("Invalid country calling code");
5904
+ r = new R(), e && h(r, 5, $);
9225
5905
  d: {
9226
- if (t = o.toString(), c = t.search(Y1), 0 <= c && z1(t.substring(0, c))) {
9227
- p = t.match(Y1);
9228
- for (var I = p.length, Y = 1; Y < I; ++Y) if (p[Y] != null && 0 < p[Y].length) {
9229
- G(o), o.g(t.substring(0, c)), t = p[Y];
5906
+ if ($ = n.toString(), u = $.search(v1), 0 <= u && M1($.substring(0, u))) {
5907
+ i = $.match(v1);
5908
+ for (var o = i.length, M = 1; M < o; ++M) if (i[M] != null && 0 < i[M].length) {
5909
+ y(n), n.g($.substring(0, u)), $ = i[M];
9230
5910
  break d;
9231
5911
  }
9232
5912
  }
9233
- t = "";
5913
+ $ = "";
9234
5914
  }
9235
- 0 < t.length && P(l, 3, t), c = J(d, n), t = new v(), p = 0, I = o.toString();
5915
+ 0 < $.length && h(r, 3, $), u = G(d, t), $ = new a(), i = 0, o = n.toString();
9236
5916
  try {
9237
- p = n0(d, I, c, t, r, l);
9238
- } catch (A1) {
9239
- if (A1.message == "Invalid country calling code" && s1.test(I)) {
9240
- if (I = I.replace(s1, ""), p = n0(d, I, c, t, r, l), p == 0) throw A1;
9241
- } else throw A1;
5917
+ i = x1(d, o, u, $, e, r);
5918
+ } catch (s1) {
5919
+ if (s1.message == "Invalid country calling code" && H.test(o)) {
5920
+ if (o = o.replace(H, ""), i = x1(d, o, u, $, e, r), i == 0) throw s1;
5921
+ } else throw s1;
9242
5922
  }
9243
- if (p != 0 ? (o = u1(p), o != n && (c = r1(d, p, o))) : (J1(o), t.g(o.toString()), n != null ? (p = L(c, 10), P(
9244
- l,
5923
+ if (i != 0 ? (n = j(i), n != t && (u = W(d, i, n))) : (N1(n), $.g(n.toString()), t != null ? (i = l(u, 10), h(
5924
+ r,
9245
5925
  1,
9246
- p
9247
- )) : r && (delete l.h[6], l.g && delete l.g[6])), 2 > t.h.length || (c != null && (n = new v(), o = new v(t.toString()), i0(o, c, n), d = m1(d, o.toString(), c, -1), d != 2 && d != 4 && d != 5 && (t = o, r && 0 < n.toString().length && P(l, 7, n.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
5926
+ i
5927
+ )) : e && (delete r.h[6], r.g && delete r.g[6])), 2 > $.h.length || (u != null && (t = new a(), n = new a($.toString()), w1(n, u, t), d = $1(d, n.toString(), u, -1), d != 2 && d != 4 && d != 5 && ($ = n, e && 0 < t.toString().length && h(r, 7, t.toString()))), e = $.toString(), d = e.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
9248
5928
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
9249
- if (1 < r.length && r.charAt(0) == "0") {
9250
- for (P(l, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
9251
- d != 1 && P(l, 8, d);
5929
+ if (1 < e.length && e.charAt(0) == "0") {
5930
+ for (h(r, 4, !0), d = 1; d < e.length - 1 && e.charAt(d) == "0"; ) d++;
5931
+ d != 1 && h(r, 8, d);
9252
5932
  }
9253
- return P(l, 2, parseInt(r, 10)), l;
9254
- }
9255
- function j(d, t) {
9256
- return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
9257
- }
9258
- function W0(d) {
9259
- this.fa = RegExp(" "), this.ja = "", this.v = new v(), this.da = "", this.s = new v(), this.ba = new v(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = M.g(), this.$ = 0, this.h = new v(), this.ha = !1, this.o = "", this.g = new v(), this.j = [], this.ka = d, this.l = u0(this, this.ka);
9260
- }
9261
- var r0 = new q();
9262
- P(r0, 11, "NA");
9263
- var K0 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), o0 = /[- ]/;
9264
- function u0(d, t) {
9265
- var n = d.ga;
9266
- return t = C1(t) ? e0(n, t) : 0, d = J(d.ga, u1(t)), d ?? r0;
9267
- }
9268
- function l0(d) {
9269
- for (var t = d.j.length, n = 0; n < t; ++n) {
9270
- var r = d.j[n], o = L(r, 1);
9271
- if (d.da == o) return !1;
9272
- var l = d, c = r, p = L(c, 1);
9273
- G(l.v);
9274
- var I = l;
9275
- c = L(c, 2);
9276
- var Y = "999999999999999".match(p)[0];
9277
- if (Y.length < I.g.h.length ? I = "" : (I = Y.replace(new RegExp(p, "g"), c), I = I.replace(RegExp("9", "g"), " ")), 0 < I.length ? (l.v.g(I), l = !0) : l = !1, l) return d.da = o, d.ha = o0.test(g(r, 4)), d.$ = 0, !0;
5933
+ return h(r, 2, parseInt(e, 10)), r;
5934
+ }
5935
+ function v(d, $) {
5936
+ return !!((d = $.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == $.length);
5937
+ }
5938
+ function S2(d) {
5939
+ this.fa = RegExp(" "), this.ja = "", this.v = new a(), this.da = "", this.s = new a(), this.ba = new a(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = c.g(), this.$ = 0, this.h = new a(), this.ha = !1, this.o = "", this.g = new a(), this.j = [], this.ka = d, this.l = D1(this, this.ka);
5940
+ }
5941
+ var U1 = new x();
5942
+ h(U1, 11, "NA");
5943
+ var E2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), K1 = /[- ]/;
5944
+ function D1(d, $) {
5945
+ var t = d.ga;
5946
+ return $ = b($) ? B1(t, $) : 0, d = G(d.ga, j($)), d ?? U1;
5947
+ }
5948
+ function V1(d) {
5949
+ for (var $ = d.j.length, t = 0; t < $; ++t) {
5950
+ var e = d.j[t], n = l(e, 1);
5951
+ if (d.da == n) return !1;
5952
+ var r = d, u = e, i = l(u, 1);
5953
+ y(r.v);
5954
+ var o = r;
5955
+ u = l(u, 2);
5956
+ var M = "999999999999999".match(i)[0];
5957
+ if (M.length < o.g.h.length ? o = "" : (o = M.replace(new RegExp(i, "g"), u), o = o.replace(RegExp("9", "g"), " ")), 0 < o.length ? (r.v.g(o), r = !0) : r = !1, r) return d.da = n, d.ha = K1.test(f(e, 4)), d.$ = 0, !0;
9278
5958
  }
9279
5959
  return d.u = !1;
9280
5960
  }
9281
- function a0(d, t) {
9282
- for (var n = [], r = t.length - 3, o = d.j.length, l = 0; l < o; ++l) {
9283
- var c = d.j[l];
9284
- z(c, 3) == 0 ? n.push(d.j[l]) : (c = g(c, 3, Math.min(r, z(c, 3) - 1)), t.search(c) == 0 && n.push(d.j[l]));
5961
+ function F1(d, $) {
5962
+ for (var t = [], e = $.length - 3, n = d.j.length, r = 0; r < n; ++r) {
5963
+ var u = d.j[r];
5964
+ A(u, 3) == 0 ? t.push(d.j[r]) : (u = f(u, 3, Math.min(e, A(u, 3) - 1)), $.search(u) == 0 && t.push(d.j[r]));
9285
5965
  }
9286
- d.j = n;
5966
+ d.j = t;
9287
5967
  }
9288
- function j0(d, t) {
9289
- d.s.g(t);
9290
- var n = t;
9291
- if (K1.test(n) || d.s.h.length == 1 && M0.test(n) ? (t == "+" ? (n = t, d.ba.g(t)) : (n = S1[t], d.ba.g(n), d.g.g(n)), t = n) : (d.u = !1, d.la = !0), !d.u) {
5968
+ function y2(d, $) {
5969
+ d.s.g($);
5970
+ var t = $;
5971
+ if (y1.test(t) || d.s.h.length == 1 && f2.test(t) ? ($ == "+" ? (t = $, d.ba.g($)) : (t = i1[$], d.ba.g(t), d.g.g(t)), $ = t) : (d.u = !1, d.la = !0), !d.u) {
9292
5972
  if (!d.la) {
9293
- if (C0(d)) {
9294
- if (g0(d)) return c0(d);
9295
- } else if (0 < d.o.length && (t = d.g.toString(), G(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), n = t.lastIndexOf(d.o), G(d.h), d.h.g(t.substring(0, n))), d.o != p0(d)) return d.h.g(" "), c0(d);
5973
+ if (j1(d)) {
5974
+ if (J1(d)) return Z1(d);
5975
+ } else if (0 < d.o.length && ($ = d.g.toString(), y(d.g), d.g.g(d.o), d.g.g($), $ = d.h.toString(), t = $.lastIndexOf(d.o), y(d.h), d.h.g($.substring(0, t))), d.o != Y1(d)) return d.h.g(" "), Z1(d);
9296
5976
  }
9297
5977
  return d.s.toString();
9298
5978
  }
@@ -9302,239 +5982,226 @@ const L2 = (h) => {
9302
5982
  case 2:
9303
5983
  return d.s.toString();
9304
5984
  case 3:
9305
- if (C0(d)) d.ea = !0;
9306
- else return d.o = p0(d), b1(d);
5985
+ if (j1(d)) d.ea = !0;
5986
+ else return d.o = Y1(d), o1(d);
9307
5987
  default:
9308
- return d.ea ? (g0(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = m0(d, t), n = h0(d), 0 < n.length ? n : (a0(d, d.g.toString()), l0(d) ? f0(d) : d.u ? I1(d, t) : d.s.toString())) : b1(d);
5988
+ return d.ea ? (J1(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? ($ = X1(d, $), t = H1(d), 0 < t.length ? t : (F1(d, d.g.toString()), V1(d) ? W1(d) : d.u ? e1(d, $) : d.s.toString())) : o1(d);
9309
5989
  }
9310
5990
  }
9311
- function c0(d) {
9312
- return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, G(d.v), d.da = "", b1(d);
5991
+ function Z1(d) {
5992
+ return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, y(d.v), d.da = "", o1(d);
9313
5993
  }
9314
- function h0(d) {
9315
- for (var t = d.g.toString(), n = d.j.length, r = 0; r < n; ++r) {
9316
- var o = d.j[r], l = L(o, 1);
9317
- if (new RegExp("^(?:" + l + ")$").test(t) && (d.ha = o0.test(g(o, 4)), o = t.replace(new RegExp(l, "g"), g(o, 2)), o = I1(d, o), p1(o, v0) == d.ba)) return o;
5994
+ function H1(d) {
5995
+ for (var $ = d.g.toString(), t = d.j.length, e = 0; e < t; ++e) {
5996
+ var n = d.j[e], r = l(n, 1);
5997
+ if (new RegExp("^(?:" + r + ")$").test($) && (d.ha = K1.test(f(n, 4)), n = $.replace(new RegExp(r, "g"), f(n, 2)), n = e1(d, n), q(n, u2) == d.ba)) return n;
9318
5998
  }
9319
5999
  return "";
9320
6000
  }
9321
- function I1(d, t) {
9322
- var n = d.h.h.length;
9323
- return d.ha && 0 < n && d.h.toString().charAt(n - 1) != " " ? d.h + " " + t : d.h + t;
6001
+ function e1(d, $) {
6002
+ var t = d.h.h.length;
6003
+ return d.ha && 0 < t && d.h.toString().charAt(t - 1) != " " ? d.h + " " + $ : d.h + $;
9324
6004
  }
9325
- function b1(d) {
9326
- var t = d.g.toString();
9327
- if (3 <= t.length) {
9328
- for (var n = d.ca && d.o.length == 0 && 0 < z(d.l, 20) ? O(d.l, 20) : O(d.l, 19), r = n.length, o = 0; o < r; ++o) {
9329
- var l = n[o];
9330
- 0 < d.o.length && q1(L(l, 4)) && !g(l, 6) && !U(l, 5) || (d.o.length != 0 || d.ca || q1(L(l, 4)) || g(l, 6)) && K0.test(L(l, 2)) && d.j.push(l);
6005
+ function o1(d) {
6006
+ var $ = d.g.toString();
6007
+ if (3 <= $.length) {
6008
+ for (var t = d.ca && d.o.length == 0 && 0 < A(d.l, 20) ? m(d.l, 20) : m(d.l, 19), e = t.length, n = 0; n < e; ++n) {
6009
+ var r = t[n];
6010
+ 0 < d.o.length && R1(l(r, 4)) && !f(r, 6) && !E(r, 5) || (d.o.length != 0 || d.ca || R1(l(r, 4)) || f(r, 6)) && E2.test(l(r, 2)) && d.j.push(r);
9331
6011
  }
9332
- return a0(d, t), t = h0(d), 0 < t.length ? t : l0(d) ? f0(d) : d.s.toString();
6012
+ return F1(d, $), $ = H1(d), 0 < $.length ? $ : V1(d) ? W1(d) : d.s.toString();
9333
6013
  }
9334
- return I1(d, t);
6014
+ return e1(d, $);
9335
6015
  }
9336
- function f0(d) {
9337
- var t = d.g.toString(), n = t.length;
9338
- if (0 < n) {
9339
- for (var r = "", o = 0; o < n; o++) r = m0(d, t.charAt(o));
9340
- return d.u ? I1(d, r) : d.s.toString();
6016
+ function W1(d) {
6017
+ var $ = d.g.toString(), t = $.length;
6018
+ if (0 < t) {
6019
+ for (var e = "", n = 0; n < t; n++) e = X1(d, $.charAt(n));
6020
+ return d.u ? e1(d, e) : d.s.toString();
9341
6021
  }
9342
6022
  return d.h.toString();
9343
6023
  }
9344
- function p0(d) {
9345
- var t = d.g.toString(), n = 0;
9346
- if (g(d.l, 10) != 1) var r = !1;
9347
- else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
9348
- return r ? (n = 1, d.h.g("1").g(" "), d.ca = !0) : U(d.l, 15) && (r = new RegExp("^(?:" + g(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, n = r[0].length, d.h.g(t.substring(0, n)))), G(d.g), d.g.g(t.substring(n)), t.substring(0, n);
6024
+ function Y1(d) {
6025
+ var $ = d.g.toString(), t = 0;
6026
+ if (f(d.l, 10) != 1) var e = !1;
6027
+ else e = d.g.toString(), e = e.charAt(0) == "1" && e.charAt(1) != "0" && e.charAt(1) != "1";
6028
+ return e ? (t = 1, d.h.g("1").g(" "), d.ca = !0) : E(d.l, 15) && (e = new RegExp("^(?:" + f(d.l, 15) + ")"), e = $.match(e), e != null && e[0] != null && 0 < e[0].length && (d.ca = !0, t = e[0].length, d.h.g($.substring(0, t)))), y(d.g), d.g.g($.substring(t)), $.substring(0, t);
9349
6029
  }
9350
- function C0(d) {
9351
- var t = d.ba.toString(), n = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
9352
- return n = t.match(n), n != null && n[0] != null && 0 < n[0].length ? (d.ca = !0, n = n[0].length, G(d.g), d.g.g(t.substring(n)), G(d.h), d.h.g(t.substring(0, n)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
6030
+ function j1(d) {
6031
+ var $ = d.ba.toString(), t = new RegExp("^(?:\\+|" + f(d.l, 11) + ")");
6032
+ return t = $.match(t), t != null && t[0] != null && 0 < t[0].length ? (d.ca = !0, t = t[0].length, y(d.g), d.g.g($.substring(t)), y(d.h), d.h.g($.substring(0, t)), $.charAt(0) != "+" && d.h.g(" "), !0) : !1;
9353
6033
  }
9354
- function g0(d) {
6034
+ function J1(d) {
9355
6035
  if (d.g.h.length == 0) return !1;
9356
- var t = new v(), n = $0(d.g, t);
9357
- return n == 0 ? !1 : (G(d.g), d.g.g(t.toString()), t = u1(n), t == "001" ? d.l = J(d.ga, "" + n) : t != d.ka && (d.l = u0(d, t)), d.h.g("" + n).g(" "), d.o = "", !0);
9358
- }
9359
- function m0(d, t) {
9360
- var n = d.v.toString();
9361
- if (0 <= n.substring(d.$).search(d.fa)) {
9362
- var r = n.search(d.fa);
9363
- return t = n.replace(d.fa, t), G(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
6036
+ var $ = new a(), t = O1(d.g, $);
6037
+ return t == 0 ? !1 : (y(d.g), d.g.g($.toString()), $ = j(t), $ == "001" ? d.l = G(d.ga, "" + t) : $ != d.ka && (d.l = D1(d, $)), d.h.g("" + t).g(" "), d.o = "", !0);
6038
+ }
6039
+ function X1(d, $) {
6040
+ var t = d.v.toString();
6041
+ if (0 <= t.substring(d.$).search(d.fa)) {
6042
+ var e = t.search(d.fa);
6043
+ return $ = t.replace(d.fa, $), y(d.v), d.v.g($), d.$ = e, $.substring(0, d.$ + 1);
9364
6044
  }
9365
6045
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
9366
6046
  }
9367
- const y0 = (d) => {
9368
- const t = [];
9369
- return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || t.push("MOBILE"), d.includes("FIXED_LINE") || t.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && t.push("FIXED_LINE_OR_MOBILE"), d.concat(t);
9370
- }, T1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
9371
- e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
6047
+ const Q1 = (d) => {
6048
+ const $ = [];
6049
+ return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || $.push("MOBILE"), d.includes("FIXED_LINE") || $.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && $.push("FIXED_LINE_OR_MOBILE"), d.concat($);
6050
+ }, l1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
6051
+ p("intlTelInputUtilsTemp", {}), p("intlTelInputUtilsTemp.formatNumberAsYouType", (d, $) => {
9372
6052
  try {
9373
- const n = d.replace(/[^+0-9]/g, ""), r = new W0(t);
9374
- t = "";
9375
- for (let o = 0; o < n.length; o++) r.ja = j0(r, n.charAt(o)), t = r.ja;
9376
- return t;
6053
+ const t = d.replace(/[^+0-9]/g, ""), e = new S2($);
6054
+ $ = "";
6055
+ for (let n = 0; n < t.length; n++) e.ja = y2(e, t.charAt(n)), $ = e.ja;
6056
+ return $;
9377
6057
  } catch {
9378
6058
  return d;
9379
6059
  }
9380
- }), e("intlTelInputUtilsTemp.formatNumber", (d, t, n) => {
6060
+ }), p("intlTelInputUtilsTemp.formatNumber", (d, $, t) => {
9381
6061
  try {
9382
- const o = M.g(), l = Q(o, d, t);
9383
- var r = y1(o, l, -1);
9384
- return r == 0 || r == 4 ? o.format(l, typeof n > "u" ? 0 : n) : d;
6062
+ const n = c.g(), r = w(n, d, $);
6063
+ var e = t1(n, r, -1);
6064
+ return e == 0 || e == 4 ? n.format(r, typeof t > "u" ? 0 : t) : d;
9385
6065
  } catch {
9386
6066
  return d;
9387
6067
  }
9388
- }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, n, r) => {
6068
+ }), p("intlTelInputUtilsTemp.getExampleNumber", (d, $, t, e) => {
9389
6069
  try {
9390
- const I = M.g();
6070
+ const o = c.g();
9391
6071
  d: {
9392
- var o = I;
9393
- if (C1(d)) {
9394
- var l = g1(J(o, d), n);
6072
+ var n = o;
6073
+ if (b(d)) {
6074
+ var r = d1(G(n, d), t);
9395
6075
  try {
9396
- if (U(l, 6)) {
9397
- var c = g(l, 6), p = s0(o, c, d, !1);
6076
+ if (E(r, 6)) {
6077
+ var u = f(r, 6), i = P1(n, u, d, !1);
9398
6078
  break d;
9399
6079
  }
9400
6080
  } catch {
9401
6081
  }
9402
6082
  }
9403
- p = null;
6083
+ i = null;
9404
6084
  }
9405
- return I.format(p, r ? 0 : t ? 2 : 1);
6085
+ return o.format(i, e ? 0 : $ ? 2 : 1);
9406
6086
  } catch {
9407
6087
  return "";
9408
6088
  }
9409
- }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
6089
+ }), p("intlTelInputUtilsTemp.getExtension", (d, $) => {
9410
6090
  try {
9411
- return g(Q(M.g(), d, t), 3);
6091
+ return f(w(c.g(), d, $), 3);
9412
6092
  } catch {
9413
6093
  return "";
9414
6094
  }
9415
- }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
6095
+ }), p("intlTelInputUtilsTemp.getNumberType", (d, $) => {
9416
6096
  try {
9417
- const n = M.g(), r = Q(n, d, t);
9418
- return d0(n, r);
6097
+ const t = c.g(), e = w(t, d, $);
6098
+ return _1(t, e);
9419
6099
  } catch {
9420
6100
  return -99;
9421
6101
  }
9422
- }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
9423
- if (!t) return 1;
6102
+ }), p("intlTelInputUtilsTemp.getValidationError", (d, $) => {
6103
+ if (!$) return 1;
9424
6104
  try {
9425
- const n = M.g(), r = Q(n, d, t);
9426
- return y1(n, r, -1);
9427
- } catch (n) {
9428
- return n.message === "Invalid country calling code" ? 1 : 3 >= d.length || n.message === "Phone number too short after IDD" || n.message === "The string supplied is too short to be a phone number" ? 2 : n.message === "The string supplied is too long to be a phone number" ? 3 : -99;
6105
+ const t = c.g(), e = w(t, d, $);
6106
+ return t1(t, e, -1);
6107
+ } catch (t) {
6108
+ return t.message === "Invalid country calling code" ? 1 : 3 >= d.length || t.message === "Phone number too short after IDD" || t.message === "The string supplied is too short to be a phone number" ? 2 : t.message === "The string supplied is too long to be a phone number" ? 3 : -99;
9429
6109
  }
9430
- }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, n) => {
6110
+ }), p("intlTelInputUtilsTemp.isValidNumber", (d, $, t) => {
9431
6111
  try {
9432
- const r = M.g(), o = Q(r, d, t), l = F0(r, o);
9433
- if (n) {
9434
- const c = y0(n).map((p) => T1[p]);
9435
- return l && c.includes(d0(r, o));
6112
+ const e = c.g(), n = w(e, d, $), r = C2(e, n);
6113
+ if (t) {
6114
+ const u = Q1(t).map((i) => l1[i]);
6115
+ return r && u.includes(_1(e, n));
9436
6116
  }
9437
- return l;
6117
+ return r;
9438
6118
  } catch {
9439
6119
  return !1;
9440
6120
  }
9441
- }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, n) => {
6121
+ }), p("intlTelInputUtilsTemp.isPossibleNumber", (d, $, t) => {
9442
6122
  try {
9443
- const r = M.g(), o = Q(r, d, t);
9444
- if (n) {
9445
- const l = y0(n);
9446
- for (let c of l) if (y1(r, o, T1[c]) === 0) return !0;
6123
+ const e = c.g(), n = w(e, d, $);
6124
+ if (t) {
6125
+ const r = Q1(t);
6126
+ for (let u of r) if (t1(e, n, l1[u]) === 0) return !0;
9447
6127
  return !1;
9448
6128
  }
9449
- return y1(r, o, -1) === 0;
6129
+ return t1(e, n, -1) === 0;
9450
6130
  } catch {
9451
6131
  return !1;
9452
6132
  }
9453
- }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
6133
+ }), p("intlTelInputUtilsTemp.getCoreNumber", (d, $) => {
9454
6134
  try {
9455
- return g(Q(M.g(), d, t), 2).toString();
6135
+ return f(w(c.g(), d, $), 2).toString();
9456
6136
  } catch {
9457
6137
  return "";
9458
6138
  }
9459
- }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", T1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
6139
+ }), p("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), p("intlTelInputUtilsTemp.numberType", l1), p("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
9460
6140
  })();
9461
- const w0 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, b2 = w0.intlTelInputUtilsTemp;
9462
- delete w0.intlTelInputUtilsTemp;
9463
- m.utils = b2;
9464
- const A2 = {
6141
+ const q1 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, B2 = q1.intlTelInputUtilsTemp;
6142
+ delete q1.intlTelInputUtilsTemp;
6143
+ z1.utils = B2;
6144
+ const w2 = /* @__PURE__ */ T2({
6145
+ inheritAttrs: !1,
9465
6146
  __name: "IntlTelInputWithUtils",
9466
- props: /* @__PURE__ */ I0({
9467
- disabled: {
9468
- type: Boolean,
9469
- default: !1
9470
- },
9471
- inputProps: {
9472
- type: Object,
9473
- default: () => ({})
9474
- },
9475
- options: {
9476
- type: Object,
9477
- default: () => ({})
9478
- },
9479
- value: {
9480
- type: String,
9481
- default: ""
9482
- }
6147
+ props: /* @__PURE__ */ k1({
6148
+ options: { default: () => ({}) },
6149
+ disabled: { type: Boolean, default: !1 },
6150
+ inputProps: { default: () => ({}) }
9483
6151
  }, {
9484
6152
  modelValue: {
9485
- type: String,
9486
6153
  default: ""
9487
6154
  },
9488
6155
  modelModifiers: {}
9489
6156
  }),
9490
- emits: /* @__PURE__ */ I0([
6157
+ emits: /* @__PURE__ */ k1([
9491
6158
  "changeNumber",
9492
6159
  "changeCountry",
9493
6160
  "changeValidity",
9494
6161
  "changeErrorCode"
9495
6162
  ], ["update:modelValue"]),
9496
- setup(h, { expose: e, emit: $ }) {
9497
- const i = Y0(h, "modelValue"), s = h, a = $, u = w1(), f = w1(), C = w1(!1), y = () => f.value ? s.options.strictMode ? f.value.isValidNumberPrecise() : f.value.isValidNumber() : null, _ = () => {
9498
- let S = y();
9499
- C.value !== S && (C.value = S, a("changeValidity", !!S), a(
6163
+ setup(P, { expose: p, emit: I }) {
6164
+ const U = v2(P, "modelValue"), N = P, _ = I, L = g1(), C = g1(), K = g1(!1), J = () => C.value ? N.options.strictMode ? C.value.isValidNumberPrecise() : C.value.isValidNumber() : null, V = () => {
6165
+ let g = J();
6166
+ K.value !== g && (K.value = g, _("changeValidity", !!g), _(
9500
6167
  "changeErrorCode",
9501
- S ? null : f.value.getValidationError()
6168
+ g ? null : C.value.getValidationError()
9502
6169
  ));
9503
- }, E = () => {
9504
- var S;
9505
- a("changeNumber", ((S = f.value) == null ? void 0 : S.getNumber()) ?? ""), _();
9506
- }, B = () => {
9507
- var S;
9508
- a("changeCountry", ((S = f.value) == null ? void 0 : S.getSelectedCountryData().iso2) ?? ""), E(), _();
6170
+ }, X = () => {
6171
+ var g;
6172
+ _("changeNumber", ((g = C.value) == null ? void 0 : g.getNumber()) ?? ""), V();
6173
+ }, n1 = () => {
6174
+ var g;
6175
+ _("changeCountry", ((g = C.value) == null ? void 0 : g.getSelectedCountryData().iso2) ?? ""), X(), V();
9509
6176
  };
9510
- return z0(() => {
9511
- u.value && (f.value = m(u.value, s.options), s.value && f.value.setNumber(s.value), s.disabled && f.value.setDisabled(s.disabled), C.value = y());
9512
- }), Z0(
9513
- () => s.disabled,
9514
- (S) => {
9515
- var w;
9516
- return (w = f.value) == null ? void 0 : w.setDisabled(S);
6177
+ return M2(() => {
6178
+ L.value && (C.value = z1(L.value, N.options), U.value && C.value.setNumber(U.value), N.disabled && C.value.setDisabled(N.disabled), K.value = J());
6179
+ }), I2(
6180
+ () => N.disabled,
6181
+ (g) => {
6182
+ var B;
6183
+ return (B = C.value) == null ? void 0 : B.setDisabled(g);
9517
6184
  }
9518
- ), J0(() => {
9519
- var S;
9520
- return (S = f.value) == null ? void 0 : S.destroy();
9521
- }), e({ instance: f, input: u }), (S, w) => X0((Q0(), q0("input", d2({
6185
+ ), N2(() => {
6186
+ var g;
6187
+ return (g = C.value) == null ? void 0 : g.destroy();
6188
+ }), p({ instance: C, input: L }), (g, B) => A2((G2(), R2("input", _2({
9522
6189
  ref_key: "input",
9523
- ref: u,
9524
- "onUpdate:modelValue": w[0] || (w[0] = (H) => i.value = H),
6190
+ ref: L,
6191
+ "onUpdate:modelValue": B[0] || (B[0] = (r1) => U.value = r1),
9525
6192
  type: "tel",
9526
- onCountrychange: B,
9527
- onInput: E
9528
- }, h.inputProps), null, 16)), [
6193
+ onCountrychange: n1,
6194
+ onInput: X
6195
+ }, g.inputProps), null, 16)), [
9529
6196
  [
9530
- t2,
9531
- i.value,
6197
+ L2,
6198
+ U.value,
9532
6199
  void 0,
9533
6200
  { lazy: !0 }
9534
6201
  ]
9535
6202
  ]);
9536
6203
  }
9537
- };
6204
+ });
9538
6205
  export {
9539
- A2 as default
6206
+ w2 as default
9540
6207
  };