@moddi3/ngx-intl-tel-input 16.0.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +119 -103
  3. package/fesm2022/moddi3-ngx-intl-tel-input.mjs +2361 -1201
  4. package/fesm2022/moddi3-ngx-intl-tel-input.mjs.map +1 -1
  5. package/package.json +22 -21
  6. package/types/moddi3-ngx-intl-tel-input.d.ts +497 -0
  7. package/types/moddi3-ngx-intl-tel-input.d.ts.map +1 -0
  8. package/esm2022/lib/data/country-code.mjs +0 -325
  9. package/esm2022/lib/directives/native-element-injector.directive.mjs +0 -33
  10. package/esm2022/lib/enums/country-iso.enum.mjs +0 -247
  11. package/esm2022/lib/enums/phone-number-format.enum.mjs +0 -6
  12. package/esm2022/lib/enums/search-country-field.enum.mjs +0 -8
  13. package/esm2022/lib/interfaces/change-data.mjs +0 -2
  14. package/esm2022/lib/model/country.model.mjs +0 -2
  15. package/esm2022/lib/ngx-intl-tel-input.component.mjs +0 -515
  16. package/esm2022/lib/ngx-intl-tel-input.module.mjs +0 -23
  17. package/esm2022/lib/ngx-intl-tel-input.validator.mjs +0 -59
  18. package/esm2022/moddi3-ngx-intl-tel-input.mjs +0 -5
  19. package/esm2022/public_api.mjs +0 -11
  20. package/index.d.ts +0 -6
  21. package/lib/data/country-code.d.ts +0 -7
  22. package/lib/data/country-code.d.ts.map +0 -1
  23. package/lib/directives/native-element-injector.directive.d.ts +0 -12
  24. package/lib/directives/native-element-injector.directive.d.ts.map +0 -1
  25. package/lib/enums/country-iso.enum.d.ts +0 -246
  26. package/lib/enums/country-iso.enum.d.ts.map +0 -1
  27. package/lib/enums/phone-number-format.enum.d.ts +0 -5
  28. package/lib/enums/phone-number-format.enum.d.ts.map +0 -1
  29. package/lib/enums/search-country-field.enum.d.ts +0 -7
  30. package/lib/enums/search-country-field.enum.d.ts.map +0 -1
  31. package/lib/interfaces/change-data.d.ts +0 -9
  32. package/lib/interfaces/change-data.d.ts.map +0 -1
  33. package/lib/model/country.model.d.ts +0 -12
  34. package/lib/model/country.model.d.ts.map +0 -1
  35. package/lib/ngx-intl-tel-input.component.d.ts +0 -103
  36. package/lib/ngx-intl-tel-input.component.d.ts.map +0 -1
  37. package/lib/ngx-intl-tel-input.module.d.ts +0 -15
  38. package/lib/ngx-intl-tel-input.module.d.ts.map +0 -1
  39. package/lib/ngx-intl-tel-input.validator.d.ts +0 -6
  40. package/lib/ngx-intl-tel-input.validator.d.ts.map +0 -1
  41. package/moddi3-ngx-intl-tel-input-16.0.0.tgz +0 -0
  42. package/moddi3-ngx-intl-tel-input.d.ts.map +0 -1
  43. package/public_api.d.ts +0 -8
  44. package/public_api.d.ts.map +0 -1
@@ -1,1208 +1,2368 @@
1
- import * as lpn from 'google-libphonenumber';
2
- import * as i0 from '@angular/core';
3
- import { Injectable, Directive, EventEmitter, forwardRef, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
4
- import * as i3 from '@angular/forms';
5
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
- import * as i2 from '@angular/common';
7
- import { CommonModule } from '@angular/common';
8
- import * as i4 from 'ngx-bootstrap/dropdown';
9
- import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
10
-
1
+ import { NgClass, NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, EventEmitter, Injectable, Input, NgModule, Output, ViewChild, afterRenderEffect, forwardRef, inject, signal, viewChild, viewChildren } from "@angular/core";
4
+ import * as i1 from "@angular/forms";
5
+ import { FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
6
+ import { Combobox, ComboboxPopup, ComboboxWidget } from "@angular/aria/combobox";
7
+ import { Listbox, Option } from "@angular/aria/listbox";
8
+ import * as lpn from "google-libphonenumber";
11
9
  var CountryISO;
12
- (function (CountryISO) {
13
- CountryISO["Afghanistan"] = "af";
14
- CountryISO["Albania"] = "al";
15
- CountryISO["Algeria"] = "dz";
16
- CountryISO["AmericanSamoa"] = "as";
17
- CountryISO["Andorra"] = "ad";
18
- CountryISO["Angola"] = "ao";
19
- CountryISO["Anguilla"] = "ai";
20
- CountryISO["AntiguaAndBarbuda"] = "ag";
21
- CountryISO["Argentina"] = "ar";
22
- CountryISO["Armenia"] = "am";
23
- CountryISO["Aruba"] = "aw";
24
- CountryISO["Australia"] = "au";
25
- CountryISO["Austria"] = "at";
26
- CountryISO["Azerbaijan"] = "az";
27
- CountryISO["Bahamas"] = "bs";
28
- CountryISO["Bahrain"] = "bh";
29
- CountryISO["Bangladesh"] = "bd";
30
- CountryISO["Barbados"] = "bb";
31
- CountryISO["Belarus"] = "by";
32
- CountryISO["Belgium"] = "be";
33
- CountryISO["Belize"] = "bz";
34
- CountryISO["Benin"] = "bj";
35
- CountryISO["Bermuda"] = "bm";
36
- CountryISO["Bhutan"] = "bt";
37
- CountryISO["Bolivia"] = "bo";
38
- CountryISO["BosniaAndHerzegovina"] = "ba";
39
- CountryISO["Botswana"] = "bw";
40
- CountryISO["Brazil"] = "br";
41
- CountryISO["BritishIndianOceanTerritory"] = "io";
42
- CountryISO["BritishVirginIslands"] = "vg";
43
- CountryISO["Brunei"] = "bn";
44
- CountryISO["Bulgaria"] = "bg";
45
- CountryISO["BurkinaFaso"] = "bf";
46
- CountryISO["Burundi"] = "bi";
47
- CountryISO["Cambodia"] = "kh";
48
- CountryISO["Cameroon"] = "cm";
49
- CountryISO["Canada"] = "ca";
50
- CountryISO["CapeVerde"] = "cv";
51
- CountryISO["CaribbeanNetherlands"] = "bq";
52
- CountryISO["CaymanIslands"] = "ky";
53
- CountryISO["CentralAfricanRepublic"] = "cf";
54
- CountryISO["Chad"] = "td";
55
- CountryISO["Chile"] = "cl";
56
- CountryISO["China"] = "cn";
57
- CountryISO["ChristmasIsland"] = "cx";
58
- CountryISO["Cocos"] = "cc";
59
- CountryISO["Colombia"] = "co";
60
- CountryISO["Comoros"] = "km";
61
- CountryISO["CongoDRCJamhuriYaKidemokrasiaYaKongo"] = "cd";
62
- CountryISO["CongoRepublicCongoBrazzaville"] = "cg";
63
- CountryISO["CookIslands"] = "ck";
64
- CountryISO["CostaRica"] = "cr";
65
- CountryISO["C\u00F4teDIvoire"] = "ci";
66
- CountryISO["Croatia"] = "hr";
67
- CountryISO["Cuba"] = "cu";
68
- CountryISO["Cura\u00E7ao"] = "cw";
69
- CountryISO["Cyprus"] = "cy";
70
- CountryISO["CzechRepublic"] = "cz";
71
- CountryISO["Denmark"] = "dk";
72
- CountryISO["Djibouti"] = "dj";
73
- CountryISO["Dominica"] = "dm";
74
- CountryISO["DominicanRepublic"] = "do";
75
- CountryISO["Ecuador"] = "ec";
76
- CountryISO["Egypt"] = "eg";
77
- CountryISO["ElSalvador"] = "sv";
78
- CountryISO["EquatorialGuinea"] = "gq";
79
- CountryISO["Eritrea"] = "er";
80
- CountryISO["Estonia"] = "ee";
81
- CountryISO["Ethiopia"] = "et";
82
- CountryISO["FalklandIslands"] = "fk";
83
- CountryISO["FaroeIslands"] = "fo";
84
- CountryISO["Fiji"] = "fj";
85
- CountryISO["Finland"] = "fi";
86
- CountryISO["France"] = "fr";
87
- CountryISO["FrenchGuiana"] = "gf";
88
- CountryISO["FrenchPolynesia"] = "pf";
89
- CountryISO["Gabon"] = "ga";
90
- CountryISO["Gambia"] = "gm";
91
- CountryISO["Georgia"] = "ge";
92
- CountryISO["Germany"] = "de";
93
- CountryISO["Ghana"] = "gh";
94
- CountryISO["Gibraltar"] = "gi";
95
- CountryISO["Greece"] = "gr";
96
- CountryISO["Greenland"] = "gl";
97
- CountryISO["Grenada"] = "gd";
98
- CountryISO["Guadeloupe"] = "gp";
99
- CountryISO["Guam"] = "gu";
100
- CountryISO["Guatemala"] = "gt";
101
- CountryISO["Guernsey"] = "gg";
102
- CountryISO["Guinea"] = "gn";
103
- CountryISO["GuineaBissau"] = "gw";
104
- CountryISO["Guyana"] = "gy";
105
- CountryISO["Haiti"] = "ht";
106
- CountryISO["Honduras"] = "hn";
107
- CountryISO["HongKong"] = "hk";
108
- CountryISO["Hungary"] = "hu";
109
- CountryISO["Iceland"] = "is";
110
- CountryISO["India"] = "in";
111
- CountryISO["Indonesia"] = "id";
112
- CountryISO["Iran"] = "ir";
113
- CountryISO["Iraq"] = "iq";
114
- CountryISO["Ireland"] = "ie";
115
- CountryISO["IsleOfMan"] = "im";
116
- CountryISO["Israel"] = "il";
117
- CountryISO["Italy"] = "it";
118
- CountryISO["Jamaica"] = "jm";
119
- CountryISO["Japan"] = "jp";
120
- CountryISO["Jersey"] = "je";
121
- CountryISO["Jordan"] = "jo";
122
- CountryISO["Kazakhstan"] = "kz";
123
- CountryISO["Kenya"] = "ke";
124
- CountryISO["Kiribati"] = "ki";
125
- CountryISO["Kosovo"] = "xk";
126
- CountryISO["Kuwait"] = "kw";
127
- CountryISO["Kyrgyzstan"] = "kg";
128
- CountryISO["Laos"] = "la";
129
- CountryISO["Latvia"] = "lv";
130
- CountryISO["Lebanon"] = "lb";
131
- CountryISO["Lesotho"] = "ls";
132
- CountryISO["Liberia"] = "lr";
133
- CountryISO["Libya"] = "ly";
134
- CountryISO["Liechtenstein"] = "li";
135
- CountryISO["Lithuania"] = "lt";
136
- CountryISO["Luxembourg"] = "lu";
137
- CountryISO["Macau"] = "mo";
138
- CountryISO["Macedonia"] = "mk";
139
- CountryISO["Madagascar"] = "mg";
140
- CountryISO["Malawi"] = "mw";
141
- CountryISO["Malaysia"] = "my";
142
- CountryISO["Maldives"] = "mv";
143
- CountryISO["Mali"] = "ml";
144
- CountryISO["Malta"] = "mt";
145
- CountryISO["MarshallIslands"] = "mh";
146
- CountryISO["Martinique"] = "mq";
147
- CountryISO["Mauritania"] = "mr";
148
- CountryISO["Mauritius"] = "mu";
149
- CountryISO["Mayotte"] = "yt";
150
- CountryISO["Mexico"] = "mx";
151
- CountryISO["Micronesia"] = "fm";
152
- CountryISO["Moldova"] = "md";
153
- CountryISO["Monaco"] = "mc";
154
- CountryISO["Mongolia"] = "mn";
155
- CountryISO["Montenegro"] = "me";
156
- CountryISO["Montserrat"] = "ms";
157
- CountryISO["Morocco"] = "ma";
158
- CountryISO["Mozambique"] = "mz";
159
- CountryISO["Myanmar"] = "mm";
160
- CountryISO["Namibia"] = "na";
161
- CountryISO["Nauru"] = "nr";
162
- CountryISO["Nepal"] = "np";
163
- CountryISO["Netherlands"] = "nl";
164
- CountryISO["NewCaledonia"] = "nc";
165
- CountryISO["NewZealand"] = "nz";
166
- CountryISO["Nicaragua"] = "ni";
167
- CountryISO["Niger"] = "ne";
168
- CountryISO["Nigeria"] = "ng";
169
- CountryISO["Niue"] = "nu";
170
- CountryISO["NorfolkIsland"] = "nf";
171
- CountryISO["NorthKorea"] = "kp";
172
- CountryISO["NorthernMarianaIslands"] = "mp";
173
- CountryISO["Norway"] = "no";
174
- CountryISO["Oman"] = "om";
175
- CountryISO["Pakistan"] = "pk";
176
- CountryISO["Palau"] = "pw";
177
- CountryISO["Palestine"] = "ps";
178
- CountryISO["Panama"] = "pa";
179
- CountryISO["PapuaNewGuinea"] = "pg";
180
- CountryISO["Paraguay"] = "py";
181
- CountryISO["Peru"] = "pe";
182
- CountryISO["Philippines"] = "ph";
183
- CountryISO["Poland"] = "pl";
184
- CountryISO["Portugal"] = "pt";
185
- CountryISO["PuertoRico"] = "pr";
186
- CountryISO["Qatar"] = "qa";
187
- CountryISO["R\u00E9union"] = "re";
188
- CountryISO["Romania"] = "ro";
189
- CountryISO["Russia"] = "ru";
190
- CountryISO["Rwanda"] = "rw";
191
- CountryISO["SaintBarth\u00E9lemy"] = "bl";
192
- CountryISO["SaintHelena"] = "sh";
193
- CountryISO["SaintKittsAndNevis"] = "kn";
194
- CountryISO["SaintLucia"] = "lc";
195
- CountryISO["SaintMartin"] = "mf";
196
- CountryISO["SaintPierreAndMiquelon"] = "pm";
197
- CountryISO["SaintVincentAndTheGrenadines"] = "vc";
198
- CountryISO["Samoa"] = "ws";
199
- CountryISO["SanMarino"] = "sm";
200
- CountryISO["S\u00E3oTom\u00E9AndPr\u00EDncipe"] = "st";
201
- CountryISO["SaudiArabia"] = "sa";
202
- CountryISO["Senegal"] = "sn";
203
- CountryISO["Serbia"] = "rs";
204
- CountryISO["Seychelles"] = "sc";
205
- CountryISO["SierraLeone"] = "sl";
206
- CountryISO["Singapore"] = "sg";
207
- CountryISO["SintMaarten"] = "sx";
208
- CountryISO["Slovakia"] = "sk";
209
- CountryISO["Slovenia"] = "si";
210
- CountryISO["SolomonIslands"] = "sb";
211
- CountryISO["Somalia"] = "so";
212
- CountryISO["SouthAfrica"] = "za";
213
- CountryISO["SouthKorea"] = "kr";
214
- CountryISO["SouthSudan"] = "ss";
215
- CountryISO["Spain"] = "es";
216
- CountryISO["SriLanka"] = "lk";
217
- CountryISO["Sudan"] = "sd";
218
- CountryISO["Suriname"] = "sr";
219
- CountryISO["SvalbardAndJanMayen"] = "sj";
220
- CountryISO["Swaziland"] = "sz";
221
- CountryISO["Sweden"] = "se";
222
- CountryISO["Switzerland"] = "ch";
223
- CountryISO["Syria"] = "sy";
224
- CountryISO["Taiwan"] = "tw";
225
- CountryISO["Tajikistan"] = "tj";
226
- CountryISO["Tanzania"] = "tz";
227
- CountryISO["Thailand"] = "th";
228
- CountryISO["TimorLeste"] = "tl";
229
- CountryISO["Togo"] = "tg";
230
- CountryISO["Tokelau"] = "tk";
231
- CountryISO["Tonga"] = "to";
232
- CountryISO["TrinidadAndTobago"] = "tt";
233
- CountryISO["Tunisia"] = "tn";
234
- CountryISO["Turkey"] = "tr";
235
- CountryISO["Turkmenistan"] = "tm";
236
- CountryISO["TurksAndCaicosIslands"] = "tc";
237
- CountryISO["Tuvalu"] = "tv";
238
- CountryISO["USVirginIslands"] = "vi";
239
- CountryISO["Uganda"] = "ug";
240
- CountryISO["Ukraine"] = "ua";
241
- CountryISO["UnitedArabEmirates"] = "ae";
242
- CountryISO["UnitedKingdom"] = "gb";
243
- CountryISO["UnitedStates"] = "us";
244
- CountryISO["Uruguay"] = "uy";
245
- CountryISO["Uzbekistan"] = "uz";
246
- CountryISO["Vanuatu"] = "vu";
247
- CountryISO["VaticanCity"] = "va";
248
- CountryISO["Venezuela"] = "ve";
249
- CountryISO["Vietnam"] = "vn";
250
- CountryISO["WallisAndFutuna"] = "wf";
251
- CountryISO["WesternSahara"] = "eh";
252
- CountryISO["Yemen"] = "ye";
253
- CountryISO["Zambia"] = "zm";
254
- CountryISO["Zimbabwe"] = "zw";
255
- CountryISO["\u00C5landIslands"] = "ax";
10
+ (function(CountryISO) {
11
+ CountryISO["Afghanistan"] = "af";
12
+ CountryISO["Albania"] = "al";
13
+ CountryISO["Algeria"] = "dz";
14
+ CountryISO["AmericanSamoa"] = "as";
15
+ CountryISO["Andorra"] = "ad";
16
+ CountryISO["Angola"] = "ao";
17
+ CountryISO["Anguilla"] = "ai";
18
+ CountryISO["AntiguaAndBarbuda"] = "ag";
19
+ CountryISO["Argentina"] = "ar";
20
+ CountryISO["Armenia"] = "am";
21
+ CountryISO["Aruba"] = "aw";
22
+ CountryISO["Australia"] = "au";
23
+ CountryISO["Austria"] = "at";
24
+ CountryISO["Azerbaijan"] = "az";
25
+ CountryISO["Bahamas"] = "bs";
26
+ CountryISO["Bahrain"] = "bh";
27
+ CountryISO["Bangladesh"] = "bd";
28
+ CountryISO["Barbados"] = "bb";
29
+ CountryISO["Belarus"] = "by";
30
+ CountryISO["Belgium"] = "be";
31
+ CountryISO["Belize"] = "bz";
32
+ CountryISO["Benin"] = "bj";
33
+ CountryISO["Bermuda"] = "bm";
34
+ CountryISO["Bhutan"] = "bt";
35
+ CountryISO["Bolivia"] = "bo";
36
+ CountryISO["BosniaAndHerzegovina"] = "ba";
37
+ CountryISO["Botswana"] = "bw";
38
+ CountryISO["Brazil"] = "br";
39
+ CountryISO["BritishIndianOceanTerritory"] = "io";
40
+ CountryISO["BritishVirginIslands"] = "vg";
41
+ CountryISO["Brunei"] = "bn";
42
+ CountryISO["Bulgaria"] = "bg";
43
+ CountryISO["BurkinaFaso"] = "bf";
44
+ CountryISO["Burundi"] = "bi";
45
+ CountryISO["Cambodia"] = "kh";
46
+ CountryISO["Cameroon"] = "cm";
47
+ CountryISO["Canada"] = "ca";
48
+ CountryISO["CapeVerde"] = "cv";
49
+ CountryISO["CaribbeanNetherlands"] = "bq";
50
+ CountryISO["CaymanIslands"] = "ky";
51
+ CountryISO["CentralAfricanRepublic"] = "cf";
52
+ CountryISO["Chad"] = "td";
53
+ CountryISO["Chile"] = "cl";
54
+ CountryISO["China"] = "cn";
55
+ CountryISO["ChristmasIsland"] = "cx";
56
+ CountryISO["Cocos"] = "cc";
57
+ CountryISO["Colombia"] = "co";
58
+ CountryISO["Comoros"] = "km";
59
+ CountryISO["CongoDRCJamhuriYaKidemokrasiaYaKongo"] = "cd";
60
+ CountryISO["CongoRepublicCongoBrazzaville"] = "cg";
61
+ CountryISO["CookIslands"] = "ck";
62
+ CountryISO["CostaRica"] = "cr";
63
+ CountryISO["CôteDIvoire"] = "ci";
64
+ CountryISO["Croatia"] = "hr";
65
+ CountryISO["Cuba"] = "cu";
66
+ CountryISO["Curaçao"] = "cw";
67
+ CountryISO["Cyprus"] = "cy";
68
+ CountryISO["CzechRepublic"] = "cz";
69
+ CountryISO["Denmark"] = "dk";
70
+ CountryISO["Djibouti"] = "dj";
71
+ CountryISO["Dominica"] = "dm";
72
+ CountryISO["DominicanRepublic"] = "do";
73
+ CountryISO["Ecuador"] = "ec";
74
+ CountryISO["Egypt"] = "eg";
75
+ CountryISO["ElSalvador"] = "sv";
76
+ CountryISO["EquatorialGuinea"] = "gq";
77
+ CountryISO["Eritrea"] = "er";
78
+ CountryISO["Estonia"] = "ee";
79
+ CountryISO["Ethiopia"] = "et";
80
+ CountryISO["FalklandIslands"] = "fk";
81
+ CountryISO["FaroeIslands"] = "fo";
82
+ CountryISO["Fiji"] = "fj";
83
+ CountryISO["Finland"] = "fi";
84
+ CountryISO["France"] = "fr";
85
+ CountryISO["FrenchGuiana"] = "gf";
86
+ CountryISO["FrenchPolynesia"] = "pf";
87
+ CountryISO["Gabon"] = "ga";
88
+ CountryISO["Gambia"] = "gm";
89
+ CountryISO["Georgia"] = "ge";
90
+ CountryISO["Germany"] = "de";
91
+ CountryISO["Ghana"] = "gh";
92
+ CountryISO["Gibraltar"] = "gi";
93
+ CountryISO["Greece"] = "gr";
94
+ CountryISO["Greenland"] = "gl";
95
+ CountryISO["Grenada"] = "gd";
96
+ CountryISO["Guadeloupe"] = "gp";
97
+ CountryISO["Guam"] = "gu";
98
+ CountryISO["Guatemala"] = "gt";
99
+ CountryISO["Guernsey"] = "gg";
100
+ CountryISO["Guinea"] = "gn";
101
+ CountryISO["GuineaBissau"] = "gw";
102
+ CountryISO["Guyana"] = "gy";
103
+ CountryISO["Haiti"] = "ht";
104
+ CountryISO["Honduras"] = "hn";
105
+ CountryISO["HongKong"] = "hk";
106
+ CountryISO["Hungary"] = "hu";
107
+ CountryISO["Iceland"] = "is";
108
+ CountryISO["India"] = "in";
109
+ CountryISO["Indonesia"] = "id";
110
+ CountryISO["Iran"] = "ir";
111
+ CountryISO["Iraq"] = "iq";
112
+ CountryISO["Ireland"] = "ie";
113
+ CountryISO["IsleOfMan"] = "im";
114
+ CountryISO["Israel"] = "il";
115
+ CountryISO["Italy"] = "it";
116
+ CountryISO["Jamaica"] = "jm";
117
+ CountryISO["Japan"] = "jp";
118
+ CountryISO["Jersey"] = "je";
119
+ CountryISO["Jordan"] = "jo";
120
+ CountryISO["Kazakhstan"] = "kz";
121
+ CountryISO["Kenya"] = "ke";
122
+ CountryISO["Kiribati"] = "ki";
123
+ CountryISO["Kosovo"] = "xk";
124
+ CountryISO["Kuwait"] = "kw";
125
+ CountryISO["Kyrgyzstan"] = "kg";
126
+ CountryISO["Laos"] = "la";
127
+ CountryISO["Latvia"] = "lv";
128
+ CountryISO["Lebanon"] = "lb";
129
+ CountryISO["Lesotho"] = "ls";
130
+ CountryISO["Liberia"] = "lr";
131
+ CountryISO["Libya"] = "ly";
132
+ CountryISO["Liechtenstein"] = "li";
133
+ CountryISO["Lithuania"] = "lt";
134
+ CountryISO["Luxembourg"] = "lu";
135
+ CountryISO["Macau"] = "mo";
136
+ CountryISO["Macedonia"] = "mk";
137
+ CountryISO["Madagascar"] = "mg";
138
+ CountryISO["Malawi"] = "mw";
139
+ CountryISO["Malaysia"] = "my";
140
+ CountryISO["Maldives"] = "mv";
141
+ CountryISO["Mali"] = "ml";
142
+ CountryISO["Malta"] = "mt";
143
+ CountryISO["MarshallIslands"] = "mh";
144
+ CountryISO["Martinique"] = "mq";
145
+ CountryISO["Mauritania"] = "mr";
146
+ CountryISO["Mauritius"] = "mu";
147
+ CountryISO["Mayotte"] = "yt";
148
+ CountryISO["Mexico"] = "mx";
149
+ CountryISO["Micronesia"] = "fm";
150
+ CountryISO["Moldova"] = "md";
151
+ CountryISO["Monaco"] = "mc";
152
+ CountryISO["Mongolia"] = "mn";
153
+ CountryISO["Montenegro"] = "me";
154
+ CountryISO["Montserrat"] = "ms";
155
+ CountryISO["Morocco"] = "ma";
156
+ CountryISO["Mozambique"] = "mz";
157
+ CountryISO["Myanmar"] = "mm";
158
+ CountryISO["Namibia"] = "na";
159
+ CountryISO["Nauru"] = "nr";
160
+ CountryISO["Nepal"] = "np";
161
+ CountryISO["Netherlands"] = "nl";
162
+ CountryISO["NewCaledonia"] = "nc";
163
+ CountryISO["NewZealand"] = "nz";
164
+ CountryISO["Nicaragua"] = "ni";
165
+ CountryISO["Niger"] = "ne";
166
+ CountryISO["Nigeria"] = "ng";
167
+ CountryISO["Niue"] = "nu";
168
+ CountryISO["NorfolkIsland"] = "nf";
169
+ CountryISO["NorthKorea"] = "kp";
170
+ CountryISO["NorthernMarianaIslands"] = "mp";
171
+ CountryISO["Norway"] = "no";
172
+ CountryISO["Oman"] = "om";
173
+ CountryISO["Pakistan"] = "pk";
174
+ CountryISO["Palau"] = "pw";
175
+ CountryISO["Palestine"] = "ps";
176
+ CountryISO["Panama"] = "pa";
177
+ CountryISO["PapuaNewGuinea"] = "pg";
178
+ CountryISO["Paraguay"] = "py";
179
+ CountryISO["Peru"] = "pe";
180
+ CountryISO["Philippines"] = "ph";
181
+ CountryISO["Poland"] = "pl";
182
+ CountryISO["Portugal"] = "pt";
183
+ CountryISO["PuertoRico"] = "pr";
184
+ CountryISO["Qatar"] = "qa";
185
+ CountryISO["Réunion"] = "re";
186
+ CountryISO["Romania"] = "ro";
187
+ CountryISO["Russia"] = "ru";
188
+ CountryISO["Rwanda"] = "rw";
189
+ CountryISO["SaintBarthélemy"] = "bl";
190
+ CountryISO["SaintHelena"] = "sh";
191
+ CountryISO["SaintKittsAndNevis"] = "kn";
192
+ CountryISO["SaintLucia"] = "lc";
193
+ CountryISO["SaintMartin"] = "mf";
194
+ CountryISO["SaintPierreAndMiquelon"] = "pm";
195
+ CountryISO["SaintVincentAndTheGrenadines"] = "vc";
196
+ CountryISO["Samoa"] = "ws";
197
+ CountryISO["SanMarino"] = "sm";
198
+ CountryISO["SãoToméAndPríncipe"] = "st";
199
+ CountryISO["SaudiArabia"] = "sa";
200
+ CountryISO["Senegal"] = "sn";
201
+ CountryISO["Serbia"] = "rs";
202
+ CountryISO["Seychelles"] = "sc";
203
+ CountryISO["SierraLeone"] = "sl";
204
+ CountryISO["Singapore"] = "sg";
205
+ CountryISO["SintMaarten"] = "sx";
206
+ CountryISO["Slovakia"] = "sk";
207
+ CountryISO["Slovenia"] = "si";
208
+ CountryISO["SolomonIslands"] = "sb";
209
+ CountryISO["Somalia"] = "so";
210
+ CountryISO["SouthAfrica"] = "za";
211
+ CountryISO["SouthKorea"] = "kr";
212
+ CountryISO["SouthSudan"] = "ss";
213
+ CountryISO["Spain"] = "es";
214
+ CountryISO["SriLanka"] = "lk";
215
+ CountryISO["Sudan"] = "sd";
216
+ CountryISO["Suriname"] = "sr";
217
+ CountryISO["SvalbardAndJanMayen"] = "sj";
218
+ CountryISO["Swaziland"] = "sz";
219
+ CountryISO["Sweden"] = "se";
220
+ CountryISO["Switzerland"] = "ch";
221
+ CountryISO["Syria"] = "sy";
222
+ CountryISO["Taiwan"] = "tw";
223
+ CountryISO["Tajikistan"] = "tj";
224
+ CountryISO["Tanzania"] = "tz";
225
+ CountryISO["Thailand"] = "th";
226
+ CountryISO["TimorLeste"] = "tl";
227
+ CountryISO["Togo"] = "tg";
228
+ CountryISO["Tokelau"] = "tk";
229
+ CountryISO["Tonga"] = "to";
230
+ CountryISO["TrinidadAndTobago"] = "tt";
231
+ CountryISO["Tunisia"] = "tn";
232
+ CountryISO["Turkey"] = "tr";
233
+ CountryISO["Turkmenistan"] = "tm";
234
+ CountryISO["TurksAndCaicosIslands"] = "tc";
235
+ CountryISO["Tuvalu"] = "tv";
236
+ CountryISO["USVirginIslands"] = "vi";
237
+ CountryISO["Uganda"] = "ug";
238
+ CountryISO["Ukraine"] = "ua";
239
+ CountryISO["UnitedArabEmirates"] = "ae";
240
+ CountryISO["UnitedKingdom"] = "gb";
241
+ CountryISO["UnitedStates"] = "us";
242
+ CountryISO["Uruguay"] = "uy";
243
+ CountryISO["Uzbekistan"] = "uz";
244
+ CountryISO["Vanuatu"] = "vu";
245
+ CountryISO["VaticanCity"] = "va";
246
+ CountryISO["Venezuela"] = "ve";
247
+ CountryISO["Vietnam"] = "vn";
248
+ CountryISO["WallisAndFutuna"] = "wf";
249
+ CountryISO["WesternSahara"] = "eh";
250
+ CountryISO["Yemen"] = "ye";
251
+ CountryISO["Zambia"] = "zm";
252
+ CountryISO["Zimbabwe"] = "zw";
253
+ CountryISO["ÅlandIslands"] = "ax";
256
254
  })(CountryISO || (CountryISO = {}));
257
-
258
- class CountryCode {
259
- constructor() {
260
- this.allCountries = [
261
- ['Afghanistan (‫افغانستان‬‎)', CountryISO.Afghanistan, '93'],
262
- ['Albania (Shqipëri)', CountryISO.Albania, '355'],
263
- ['Algeria (‫الجزائر‬‎)', CountryISO.Algeria, '213'],
264
- ['American Samoa', 'as', '1', 1, ['684']],
265
- ['Andorra', CountryISO.Andorra, '376'],
266
- ['Angola', CountryISO.Angola, '244'],
267
- ['Anguilla', 'ai', '1', 1, ['264']],
268
- ['Antigua and Barbuda', 'ag', '1', 1, ['268']],
269
- ['Argentina', CountryISO.Argentina, '54'],
270
- ['Armenia (Հայաստան)', CountryISO.Armenia, '374'],
271
- ['Aruba', CountryISO.Aruba, '297'],
272
- ['Australia', CountryISO.Australia, '61', 0],
273
- ['Austria (Österreich)', CountryISO.Austria, '43'],
274
- ['Azerbaijan (Azərbaycan)', CountryISO.Azerbaijan, '994'],
275
- ['Bahamas', 'bs', '1', 1, ['242']],
276
- ['Bahrain (‫البحرين‬‎)', CountryISO.Bahrain, '973'],
277
- ['Bangladesh (বাংলাদেশ)', CountryISO.Bangladesh, '880'],
278
- ['Barbados', 'bb', '1', 1, ['246']],
279
- ['Belarus (Беларусь)', CountryISO.Belarus, '375'],
280
- ['Belgium (België)', CountryISO.Belgium, '32'],
281
- ['Belize', CountryISO.Belize, '501'],
282
- ['Benin (Bénin)', CountryISO.Benin, '229'],
283
- ['Bermuda', 'bm', '1', 1, ['441']],
284
- ['Bhutan (འབྲུག)', CountryISO.Bhutan, '975'],
285
- ['Bolivia', CountryISO.Bolivia, '591'],
286
- ['Bosnia and Herzegovina (Босна и Херцеговина)', CountryISO.BosniaAndHerzegovina, '387'],
287
- ['Botswana', CountryISO.Botswana, '267'],
288
- ['Brazil (Brasil)', CountryISO.Brazil, '55'],
289
- ['British Indian Ocean Territory', CountryISO.BritishIndianOceanTerritory, '246'],
290
- ['British Virgin Islands', 'vg', '1', 1, ['284']],
291
- ['Brunei', CountryISO.Brunei, '673'],
292
- ['Bulgaria (България)', CountryISO.Bulgaria, '359'],
293
- ['Burkina Faso', CountryISO.BurkinaFaso, '226'],
294
- ['Burundi (Uburundi)', CountryISO.Burundi, '257'],
295
- ['Cambodia (កម្ពុជា)', CountryISO.Cambodia, '855'],
296
- ['Cameroon (Cameroun)', CountryISO.Cameroon, '237'],
297
- [
298
- 'Canada',
299
- CountryISO.Canada,
300
- '1',
301
- 1,
302
- [
303
- '204',
304
- '226',
305
- '236',
306
- '249',
307
- '250',
308
- '289',
309
- '306',
310
- '343',
311
- '365',
312
- '387',
313
- '403',
314
- '416',
315
- '418',
316
- '431',
317
- '437',
318
- '438',
319
- '450',
320
- '506',
321
- '514',
322
- '519',
323
- '548',
324
- '579',
325
- '581',
326
- '587',
327
- '604',
328
- '613',
329
- '639',
330
- '647',
331
- '672',
332
- '705',
333
- '709',
334
- '742',
335
- '778',
336
- '780',
337
- '782',
338
- '807',
339
- '819',
340
- '825',
341
- '867',
342
- '873',
343
- '902',
344
- '905',
345
- ],
346
- ],
347
- ['Cape Verde (Kabu Verdi)', CountryISO.CapeVerde, '238'],
348
- ['Caribbean Netherlands', CountryISO.CaribbeanNetherlands, '599', 1],
349
- ['Cayman Islands', 'ky', '1', 1, ['345']],
350
- [
351
- 'Central African Republic (République centrafricaine)',
352
- CountryISO.CentralAfricanRepublic,
353
- '236',
354
- ],
355
- ['Chad (Tchad)', CountryISO.Chad, '235'],
356
- ['Chile', CountryISO.Chile, '56'],
357
- ['China (中国)', CountryISO.China, '86'],
358
- ['Christmas Island', CountryISO.ChristmasIsland, '61', 2],
359
- ['Cocos (Keeling) Islands', CountryISO.Cocos, '61', 1],
360
- ['Colombia', CountryISO.Colombia, '57'],
361
- ['Comoros (‫جزر القمر‬‎)', CountryISO.Comoros, '269'],
362
- [
363
- 'Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)',
364
- CountryISO.CongoDRCJamhuriYaKidemokrasiaYaKongo,
365
- '243',
366
- ],
367
- ['Congo (Republic) (Congo-Brazzaville)', CountryISO.CongoRepublicCongoBrazzaville, '242'],
368
- ['Cook Islands', CountryISO.CookIslands, '682'],
369
- ['Costa Rica', CountryISO.CostaRica, '506'],
370
- ['Côte d’Ivoire', CountryISO.CôteDIvoire, '225'],
371
- ['Croatia (Hrvatska)', CountryISO.Croatia, '385'],
372
- ['Cuba', CountryISO.Cuba, '53'],
373
- ['Curaçao', CountryISO.Curaçao, '599', 0],
374
- ['Cyprus (Κύπρος)', CountryISO.Cyprus, '357'],
375
- ['Czech Republic (Česká republika)', CountryISO.CzechRepublic, '420'],
376
- ['Denmark (Danmark)', CountryISO.Denmark, '45'],
377
- ['Djibouti', CountryISO.Djibouti, '253'],
378
- ['Dominica', CountryISO.Dominica, '1767'],
379
- [
380
- 'Dominican Republic (República Dominicana)',
381
- CountryISO.DominicanRepublic,
382
- '1',
383
- 2,
384
- ['809', '829', '849'],
385
- ],
386
- ['Ecuador', CountryISO.Ecuador, '593'],
387
- ['Egypt (‫مصر‬‎)', CountryISO.Egypt, '20'],
388
- ['El Salvador', CountryISO.ElSalvador, '503'],
389
- ['Equatorial Guinea (Guinea Ecuatorial)', CountryISO.EquatorialGuinea, '240'],
390
- ['Eritrea', CountryISO.Eritrea, '291'],
391
- ['Estonia (Eesti)', CountryISO.Estonia, '372'],
392
- ['Ethiopia', CountryISO.Ethiopia, '251'],
393
- ['Falkland Islands (Islas Malvinas)', CountryISO.FalklandIslands, '500'],
394
- ['Faroe Islands (Føroyar)', CountryISO.FaroeIslands, '298'],
395
- ['Fiji', CountryISO.Fiji, '679'],
396
- ['Finland (Suomi)', CountryISO.Finland, '358', 0],
397
- ['France', CountryISO.France, '33'],
398
- ['French Guiana (Guyane française)', CountryISO.FrenchGuiana, '594'],
399
- ['French Polynesia (Polynésie française)', CountryISO.FrenchPolynesia, '689'],
400
- ['Gabon', CountryISO.Gabon, '241'],
401
- ['Gambia', CountryISO.Gambia, '220'],
402
- ['Georgia (საქართველო)', CountryISO.Georgia, '995'],
403
- ['Germany (Deutschland)', CountryISO.Germany, '49'],
404
- ['Ghana (Gaana)', CountryISO.Ghana, '233'],
405
- ['Gibraltar', CountryISO.Gibraltar, '350'],
406
- ['Greece (Ελλάδα)', CountryISO.Greece, '30'],
407
- ['Greenland (Kalaallit Nunaat)', CountryISO.Greenland, '299'],
408
- ['Grenada', CountryISO.Grenada, '1473'],
409
- ['Guadeloupe', CountryISO.Guadeloupe, '590', 0],
410
- ['Guam', 'gu', '1', 1, ['671']],
411
- ['Guatemala', CountryISO.Guatemala, '502'],
412
- ['Guernsey', CountryISO.Guernsey, '44', 1, [1481]],
413
- ['Guinea (Guinée)', CountryISO.Guinea, '224'],
414
- ['Guinea-Bissau (Guiné Bissau)', CountryISO.GuineaBissau, '245'],
415
- ['Guyana', CountryISO.Guyana, '592'],
416
- ['Haiti', CountryISO.Haiti, '509'],
417
- ['Honduras', CountryISO.Honduras, '504'],
418
- ['Hong Kong (香港)', CountryISO.HongKong, '852'],
419
- ['Hungary (Magyarország)', CountryISO.Hungary, '36'],
420
- ['Iceland (Ísland)', CountryISO.Iceland, '354'],
421
- ['India (भारत)', CountryISO.India, '91'],
422
- ['Indonesia', CountryISO.Indonesia, '62'],
423
- ['Iran (‫ایران‬‎)', CountryISO.Iran, '98'],
424
- ['Iraq (‫العراق‬‎)', CountryISO.Iraq, '964'],
425
- ['Ireland', CountryISO.Ireland, '353'],
426
- ['Isle of Man', CountryISO.IsleOfMan, '44', 2, [1624]],
427
- ['Israel (‫ישראל‬‎)', CountryISO.Israel, '972'],
428
- ['Italy (Italia)', CountryISO.Italy, '39', 0],
429
- ['Jamaica', 'jm', '1', 1, ['876']],
430
- ['Japan (日本)', CountryISO.Japan, '81'],
431
- ['Jersey', CountryISO.Jersey, '44', 3, [1534]],
432
- ['Jordan (‫الأردن‬‎)', CountryISO.Jordan, '962'],
433
- ['Kazakhstan (Казахстан)', CountryISO.Kazakhstan, '7', 1],
434
- ['Kenya', CountryISO.Kenya, '254'],
435
- ['Kiribati', CountryISO.Kiribati, '686'],
436
- ['Kosovo', CountryISO.Kosovo, '383'],
437
- ['Kuwait (‫الكويت‬‎)', CountryISO.Kuwait, '965'],
438
- ['Kyrgyzstan (Кыргызстан)', CountryISO.Kyrgyzstan, '996'],
439
- ['Laos (ລາວ)', CountryISO.Laos, '856'],
440
- ['Latvia (Latvija)', CountryISO.Latvia, '371'],
441
- ['Lebanon (‫لبنان‬‎)', CountryISO.Lebanon, '961'],
442
- ['Lesotho', CountryISO.Lesotho, '266'],
443
- ['Liberia', CountryISO.Liberia, '231'],
444
- ['Libya (‫ليبيا‬‎)', CountryISO.Libya, '218'],
445
- ['Liechtenstein', CountryISO.Liechtenstein, '423'],
446
- ['Lithuania (Lietuva)', CountryISO.Lithuania, '370'],
447
- ['Luxembourg', CountryISO.Luxembourg, '352'],
448
- ['Macau (澳門)', CountryISO.Macau, '853'],
449
- ['Macedonia (FYROM) (Македонија)', CountryISO.Macedonia, '389'],
450
- ['Madagascar (Madagasikara)', CountryISO.Madagascar, '261'],
451
- ['Malawi', CountryISO.Malawi, '265'],
452
- ['Malaysia', CountryISO.Malaysia, '60'],
453
- ['Maldives', CountryISO.Maldives, '960'],
454
- ['Mali', CountryISO.Mali, '223'],
455
- ['Malta', CountryISO.Malta, '356'],
456
- ['Marshall Islands', CountryISO.MarshallIslands, '692'],
457
- ['Martinique', CountryISO.Martinique, '596'],
458
- ['Mauritania (‫موريتانيا‬‎)', CountryISO.Mauritania, '222'],
459
- ['Mauritius (Moris)', CountryISO.Mauritius, '230'],
460
- ['Mayotte', CountryISO.Mayotte, '262', 1],
461
- ['Mexico (México)', CountryISO.Mexico, '52'],
462
- ['Micronesia', CountryISO.Micronesia, '691'],
463
- ['Moldova (Republica Moldova)', CountryISO.Moldova, '373'],
464
- ['Monaco', CountryISO.Monaco, '377'],
465
- ['Mongolia (Монгол)', CountryISO.Mongolia, '976'],
466
- ['Montenegro (Crna Gora)', CountryISO.Montenegro, '382'],
467
- ['Montserrat', 'ms', '1', 1, ['664']],
468
- ['Morocco (‫المغرب‬‎)', CountryISO.Morocco, '212', 0],
469
- ['Mozambique (Moçambique)', CountryISO.Mozambique, '258'],
470
- ['Myanmar (Burma) (မြန်မာ)', CountryISO.Myanmar, '95'],
471
- ['Namibia (Namibië)', CountryISO.Namibia, '264'],
472
- ['Nauru', CountryISO.Nauru, '674'],
473
- ['Nepal (नेपाल)', CountryISO.Nepal, '977'],
474
- ['Netherlands (Nederland)', CountryISO.Netherlands, '31'],
475
- ['New Caledonia (Nouvelle-Calédonie)', CountryISO.NewCaledonia, '687'],
476
- ['New Zealand', CountryISO.NewZealand, '64'],
477
- ['Nicaragua', CountryISO.Nicaragua, '505'],
478
- ['Niger (Nijar)', CountryISO.Niger, '227'],
479
- ['Nigeria', CountryISO.Nigeria, '234'],
480
- ['Niue', CountryISO.Niue, '683'],
481
- ['Norfolk Island', CountryISO.NorfolkIsland, '672'],
482
- ['North Korea (조선 민주주의 인민 공화국)', CountryISO.NorthKorea, '850'],
483
- ['Northern Mariana Islands', CountryISO.NorthernMarianaIslands, '1670'],
484
- ['Norway (Norge)', CountryISO.Norway, '47', 0],
485
- ['Oman (‫عُمان‬‎)', CountryISO.Oman, '968'],
486
- ['Pakistan (‫پاکستان‬‎)', CountryISO.Pakistan, '92'],
487
- ['Palau', CountryISO.Palau, '680'],
488
- ['Palestine (‫فلسطين‬‎)', CountryISO.Palestine, '970'],
489
- ['Panama (Panamá)', CountryISO.Panama, '507'],
490
- ['Papua New Guinea', CountryISO.PapuaNewGuinea, '675'],
491
- ['Paraguay', CountryISO.Paraguay, '595'],
492
- ['Peru (Perú)', CountryISO.Peru, '51'],
493
- ['Philippines', CountryISO.Philippines, '63'],
494
- ['Poland (Polska)', CountryISO.Poland, '48'],
495
- ['Portugal', CountryISO.Portugal, '351'],
496
- ['Puerto Rico', CountryISO.PuertoRico, '1', 3, ['787', '939']],
497
- ['Qatar (‫قطر‬‎)', CountryISO.Qatar, '974'],
498
- ['Réunion (La Réunion)', CountryISO.Réunion, '262', 0],
499
- ['Romania (România)', CountryISO.Romania, '40'],
500
- ['Russia (Россия)', CountryISO.Russia, '7', 0],
501
- ['Rwanda', CountryISO.Rwanda, '250'],
502
- ['Saint Barthélemy (Saint-Barthélemy)', CountryISO.SaintBarthélemy, '590', 1],
503
- ['Saint Helena', CountryISO.SaintHelena, '290'],
504
- ['Saint Kitts and Nevis', CountryISO.SaintKittsAndNevis, '1869'],
505
- ['Saint Lucia', 'lc', '1', 1, ['758']],
506
- ['Saint Martin (Saint-Martin (partie française))', CountryISO.SaintMartin, '590', 2],
507
- [
508
- 'Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)',
509
- CountryISO.SaintPierreAndMiquelon,
510
- '508',
511
- ],
512
- ['Saint Vincent and the Grenadines', 'vc', '1', 1, ['784']],
513
- ['Samoa', CountryISO.Samoa, '685'],
514
- ['San Marino', CountryISO.SanMarino, '378'],
515
- ['São Tomé and Príncipe (São Tomé e Príncipe)', CountryISO.SãoToméAndPríncipe, '239'],
516
- ['Saudi Arabia (‫المملكة العربية السعودية‬‎)', CountryISO.SaudiArabia, '966'],
517
- ['Senegal (Sénégal)', CountryISO.Senegal, '221'],
518
- ['Serbia (Србија)', CountryISO.Serbia, '381'],
519
- ['Seychelles', CountryISO.Seychelles, '248'],
520
- ['Sierra Leone', CountryISO.SierraLeone, '232'],
521
- ['Singapore', CountryISO.Singapore, '65'],
522
- ['Sint Maarten', 'sx', '1', 1, ['721']],
523
- ['Slovakia (Slovensko)', CountryISO.Slovakia, '421'],
524
- ['Slovenia (Slovenija)', CountryISO.Slovenia, '386'],
525
- ['Solomon Islands', CountryISO.SolomonIslands, '677'],
526
- ['Somalia (Soomaaliya)', CountryISO.Somalia, '252'],
527
- ['South Africa', CountryISO.SouthAfrica, '27'],
528
- ['South Korea (대한민국)', CountryISO.SouthKorea, '82'],
529
- ['South Sudan (‫جنوب السودان‬‎)', CountryISO.SouthSudan, '211'],
530
- ['Spain (España)', CountryISO.Spain, '34'],
531
- ['Sri Lanka (ශ්‍රී ලංකාව)', CountryISO.SriLanka, '94'],
532
- ['Sudan (‫السودان‬‎)', CountryISO.Sudan, '249'],
533
- ['Suriname', CountryISO.Suriname, '597'],
534
- ['Svalbard and Jan Mayen', CountryISO.SvalbardAndJanMayen, '47', 1],
535
- ['Swaziland', CountryISO.Swaziland, '268'],
536
- ['Sweden (Sverige)', CountryISO.Sweden, '46'],
537
- ['Switzerland (Schweiz)', CountryISO.Switzerland, '41'],
538
- ['Syria (‫سوريا‬‎)', CountryISO.Syria, '963'],
539
- ['Taiwan (台灣)', CountryISO.Taiwan, '886'],
540
- ['Tajikistan', CountryISO.Tajikistan, '992'],
541
- ['Tanzania', CountryISO.Tanzania, '255'],
542
- ['Thailand (ไทย)', CountryISO.Thailand, '66'],
543
- ['Timor-Leste', CountryISO.TimorLeste, '670'],
544
- ['Togo', CountryISO.Togo, '228'],
545
- ['Tokelau', CountryISO.Tokelau, '690'],
546
- ['Tonga', CountryISO.Tonga, '676'],
547
- ['Trinidad and Tobago', 'tt', '1', 1, ['868']],
548
- ['Tunisia (‫تونس‬‎)', CountryISO.Tunisia, '216'],
549
- ['Turkey (Türkiye)', CountryISO.Turkey, '90'],
550
- ['Turkmenistan', CountryISO.Turkmenistan, '993'],
551
- ['Turks and Caicos Islands', CountryISO.TurksAndCaicosIslands, '1649'],
552
- ['Tuvalu', CountryISO.Tuvalu, '688'],
553
- ['U.S. Virgin Islands', 'vi', '1', 1, ['340']],
554
- ['Uganda', CountryISO.Uganda, '256'],
555
- ['Ukraine (Україна)', CountryISO.Ukraine, '380'],
556
- ['United Arab Emirates (‫الإمارات العربية المتحدة‬‎)', CountryISO.UnitedArabEmirates, '971'],
557
- ['United Kingdom', CountryISO.UnitedKingdom, '44', 0],
558
- ['United States', CountryISO.UnitedStates, '1', 0],
559
- ['Uruguay', CountryISO.Uruguay, '598'],
560
- ['Uzbekistan (Oʻzbekiston)', CountryISO.Uzbekistan, '998'],
561
- ['Vanuatu', CountryISO.Vanuatu, '678'],
562
- ['Vatican City (Città del Vaticano)', CountryISO.VaticanCity, '39', 1],
563
- ['Venezuela', CountryISO.Venezuela, '58'],
564
- ['Vietnam (Việt Nam)', CountryISO.Vietnam, '84'],
565
- ['Wallis and Futuna', CountryISO.WallisAndFutuna, '681'],
566
- ['Western Sahara (‫الصحراء الغربية‬‎)', CountryISO.WesternSahara, '212', 1],
567
- ['Yemen (‫اليمن‬‎)', CountryISO.Yemen, '967'],
568
- ['Zambia', CountryISO.Zambia, '260'],
569
- ['Zimbabwe', CountryISO.Zimbabwe, '263'],
570
- ['Åland Islands', CountryISO.ÅlandIslands, '358', 1],
571
- ];
572
- }
573
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CountryCode, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
574
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CountryCode }); }
575
- }
576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CountryCode, decorators: [{
577
- type: Injectable
578
- }] });
579
-
255
+ var CountryCode = class CountryCode {
256
+ constructor() {
257
+ this.allCountries = [
258
+ [
259
+ "Afghanistan (‫افغانستان‬‎)",
260
+ CountryISO.Afghanistan,
261
+ "93"
262
+ ],
263
+ [
264
+ "Albania (Shqipëri)",
265
+ CountryISO.Albania,
266
+ "355"
267
+ ],
268
+ [
269
+ "Algeria (‫الجزائر‬‎)",
270
+ CountryISO.Algeria,
271
+ "213"
272
+ ],
273
+ [
274
+ "American Samoa",
275
+ "as",
276
+ "1",
277
+ 1,
278
+ ["684"]
279
+ ],
280
+ [
281
+ "Andorra",
282
+ CountryISO.Andorra,
283
+ "376"
284
+ ],
285
+ [
286
+ "Angola",
287
+ CountryISO.Angola,
288
+ "244"
289
+ ],
290
+ [
291
+ "Anguilla",
292
+ "ai",
293
+ "1",
294
+ 1,
295
+ ["264"]
296
+ ],
297
+ [
298
+ "Antigua and Barbuda",
299
+ "ag",
300
+ "1",
301
+ 1,
302
+ ["268"]
303
+ ],
304
+ [
305
+ "Argentina",
306
+ CountryISO.Argentina,
307
+ "54"
308
+ ],
309
+ [
310
+ "Armenia (Հայաստան)",
311
+ CountryISO.Armenia,
312
+ "374"
313
+ ],
314
+ [
315
+ "Aruba",
316
+ CountryISO.Aruba,
317
+ "297"
318
+ ],
319
+ [
320
+ "Australia",
321
+ CountryISO.Australia,
322
+ "61",
323
+ 0
324
+ ],
325
+ [
326
+ "Austria (Österreich)",
327
+ CountryISO.Austria,
328
+ "43"
329
+ ],
330
+ [
331
+ "Azerbaijan (Azərbaycan)",
332
+ CountryISO.Azerbaijan,
333
+ "994"
334
+ ],
335
+ [
336
+ "Bahamas",
337
+ "bs",
338
+ "1",
339
+ 1,
340
+ ["242"]
341
+ ],
342
+ [
343
+ "Bahrain (‫البحرين‬‎)",
344
+ CountryISO.Bahrain,
345
+ "973"
346
+ ],
347
+ [
348
+ "Bangladesh (বাংলাদেশ)",
349
+ CountryISO.Bangladesh,
350
+ "880"
351
+ ],
352
+ [
353
+ "Barbados",
354
+ "bb",
355
+ "1",
356
+ 1,
357
+ ["246"]
358
+ ],
359
+ [
360
+ "Belarus (Беларусь)",
361
+ CountryISO.Belarus,
362
+ "375"
363
+ ],
364
+ [
365
+ "Belgium (België)",
366
+ CountryISO.Belgium,
367
+ "32"
368
+ ],
369
+ [
370
+ "Belize",
371
+ CountryISO.Belize,
372
+ "501"
373
+ ],
374
+ [
375
+ "Benin (Bénin)",
376
+ CountryISO.Benin,
377
+ "229"
378
+ ],
379
+ [
380
+ "Bermuda",
381
+ "bm",
382
+ "1",
383
+ 1,
384
+ ["441"]
385
+ ],
386
+ [
387
+ "Bhutan (འབྲུག)",
388
+ CountryISO.Bhutan,
389
+ "975"
390
+ ],
391
+ [
392
+ "Bolivia",
393
+ CountryISO.Bolivia,
394
+ "591"
395
+ ],
396
+ [
397
+ "Bosnia and Herzegovina (Босна и Херцеговина)",
398
+ CountryISO.BosniaAndHerzegovina,
399
+ "387"
400
+ ],
401
+ [
402
+ "Botswana",
403
+ CountryISO.Botswana,
404
+ "267"
405
+ ],
406
+ [
407
+ "Brazil (Brasil)",
408
+ CountryISO.Brazil,
409
+ "55"
410
+ ],
411
+ [
412
+ "British Indian Ocean Territory",
413
+ CountryISO.BritishIndianOceanTerritory,
414
+ "246"
415
+ ],
416
+ [
417
+ "British Virgin Islands",
418
+ "vg",
419
+ "1",
420
+ 1,
421
+ ["284"]
422
+ ],
423
+ [
424
+ "Brunei",
425
+ CountryISO.Brunei,
426
+ "673"
427
+ ],
428
+ [
429
+ "Bulgaria (България)",
430
+ CountryISO.Bulgaria,
431
+ "359"
432
+ ],
433
+ [
434
+ "Burkina Faso",
435
+ CountryISO.BurkinaFaso,
436
+ "226"
437
+ ],
438
+ [
439
+ "Burundi (Uburundi)",
440
+ CountryISO.Burundi,
441
+ "257"
442
+ ],
443
+ [
444
+ "Cambodia (កម្ពុជា)",
445
+ CountryISO.Cambodia,
446
+ "855"
447
+ ],
448
+ [
449
+ "Cameroon (Cameroun)",
450
+ CountryISO.Cameroon,
451
+ "237"
452
+ ],
453
+ [
454
+ "Canada",
455
+ CountryISO.Canada,
456
+ "1",
457
+ 1,
458
+ [
459
+ "204",
460
+ "226",
461
+ "236",
462
+ "249",
463
+ "250",
464
+ "289",
465
+ "306",
466
+ "343",
467
+ "365",
468
+ "387",
469
+ "403",
470
+ "416",
471
+ "418",
472
+ "431",
473
+ "437",
474
+ "438",
475
+ "450",
476
+ "506",
477
+ "514",
478
+ "519",
479
+ "548",
480
+ "579",
481
+ "581",
482
+ "587",
483
+ "604",
484
+ "613",
485
+ "639",
486
+ "647",
487
+ "672",
488
+ "705",
489
+ "709",
490
+ "742",
491
+ "778",
492
+ "780",
493
+ "782",
494
+ "807",
495
+ "819",
496
+ "825",
497
+ "867",
498
+ "873",
499
+ "902",
500
+ "905"
501
+ ]
502
+ ],
503
+ [
504
+ "Cape Verde (Kabu Verdi)",
505
+ CountryISO.CapeVerde,
506
+ "238"
507
+ ],
508
+ [
509
+ "Caribbean Netherlands",
510
+ CountryISO.CaribbeanNetherlands,
511
+ "599",
512
+ 1
513
+ ],
514
+ [
515
+ "Cayman Islands",
516
+ "ky",
517
+ "1",
518
+ 1,
519
+ ["345"]
520
+ ],
521
+ [
522
+ "Central African Republic (République centrafricaine)",
523
+ CountryISO.CentralAfricanRepublic,
524
+ "236"
525
+ ],
526
+ [
527
+ "Chad (Tchad)",
528
+ CountryISO.Chad,
529
+ "235"
530
+ ],
531
+ [
532
+ "Chile",
533
+ CountryISO.Chile,
534
+ "56"
535
+ ],
536
+ [
537
+ "China (中国)",
538
+ CountryISO.China,
539
+ "86"
540
+ ],
541
+ [
542
+ "Christmas Island",
543
+ CountryISO.ChristmasIsland,
544
+ "61",
545
+ 2
546
+ ],
547
+ [
548
+ "Cocos (Keeling) Islands",
549
+ CountryISO.Cocos,
550
+ "61",
551
+ 1
552
+ ],
553
+ [
554
+ "Colombia",
555
+ CountryISO.Colombia,
556
+ "57"
557
+ ],
558
+ [
559
+ "Comoros (‫جزر القمر‬‎)",
560
+ CountryISO.Comoros,
561
+ "269"
562
+ ],
563
+ [
564
+ "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",
565
+ CountryISO.CongoDRCJamhuriYaKidemokrasiaYaKongo,
566
+ "243"
567
+ ],
568
+ [
569
+ "Congo (Republic) (Congo-Brazzaville)",
570
+ CountryISO.CongoRepublicCongoBrazzaville,
571
+ "242"
572
+ ],
573
+ [
574
+ "Cook Islands",
575
+ CountryISO.CookIslands,
576
+ "682"
577
+ ],
578
+ [
579
+ "Costa Rica",
580
+ CountryISO.CostaRica,
581
+ "506"
582
+ ],
583
+ [
584
+ "Côte d’Ivoire",
585
+ CountryISO.CôteDIvoire,
586
+ "225"
587
+ ],
588
+ [
589
+ "Croatia (Hrvatska)",
590
+ CountryISO.Croatia,
591
+ "385"
592
+ ],
593
+ [
594
+ "Cuba",
595
+ CountryISO.Cuba,
596
+ "53"
597
+ ],
598
+ [
599
+ "Curaçao",
600
+ CountryISO.Curaçao,
601
+ "599",
602
+ 0
603
+ ],
604
+ [
605
+ "Cyprus (Κύπρος)",
606
+ CountryISO.Cyprus,
607
+ "357"
608
+ ],
609
+ [
610
+ "Czech Republic (Česká republika)",
611
+ CountryISO.CzechRepublic,
612
+ "420"
613
+ ],
614
+ [
615
+ "Denmark (Danmark)",
616
+ CountryISO.Denmark,
617
+ "45"
618
+ ],
619
+ [
620
+ "Djibouti",
621
+ CountryISO.Djibouti,
622
+ "253"
623
+ ],
624
+ [
625
+ "Dominica",
626
+ CountryISO.Dominica,
627
+ "1767"
628
+ ],
629
+ [
630
+ "Dominican Republic (República Dominicana)",
631
+ CountryISO.DominicanRepublic,
632
+ "1",
633
+ 2,
634
+ [
635
+ "809",
636
+ "829",
637
+ "849"
638
+ ]
639
+ ],
640
+ [
641
+ "Ecuador",
642
+ CountryISO.Ecuador,
643
+ "593"
644
+ ],
645
+ [
646
+ "Egypt (‫مصر‬‎)",
647
+ CountryISO.Egypt,
648
+ "20"
649
+ ],
650
+ [
651
+ "El Salvador",
652
+ CountryISO.ElSalvador,
653
+ "503"
654
+ ],
655
+ [
656
+ "Equatorial Guinea (Guinea Ecuatorial)",
657
+ CountryISO.EquatorialGuinea,
658
+ "240"
659
+ ],
660
+ [
661
+ "Eritrea",
662
+ CountryISO.Eritrea,
663
+ "291"
664
+ ],
665
+ [
666
+ "Estonia (Eesti)",
667
+ CountryISO.Estonia,
668
+ "372"
669
+ ],
670
+ [
671
+ "Ethiopia",
672
+ CountryISO.Ethiopia,
673
+ "251"
674
+ ],
675
+ [
676
+ "Falkland Islands (Islas Malvinas)",
677
+ CountryISO.FalklandIslands,
678
+ "500"
679
+ ],
680
+ [
681
+ "Faroe Islands (Føroyar)",
682
+ CountryISO.FaroeIslands,
683
+ "298"
684
+ ],
685
+ [
686
+ "Fiji",
687
+ CountryISO.Fiji,
688
+ "679"
689
+ ],
690
+ [
691
+ "Finland (Suomi)",
692
+ CountryISO.Finland,
693
+ "358",
694
+ 0
695
+ ],
696
+ [
697
+ "France",
698
+ CountryISO.France,
699
+ "33"
700
+ ],
701
+ [
702
+ "French Guiana (Guyane française)",
703
+ CountryISO.FrenchGuiana,
704
+ "594"
705
+ ],
706
+ [
707
+ "French Polynesia (Polynésie française)",
708
+ CountryISO.FrenchPolynesia,
709
+ "689"
710
+ ],
711
+ [
712
+ "Gabon",
713
+ CountryISO.Gabon,
714
+ "241"
715
+ ],
716
+ [
717
+ "Gambia",
718
+ CountryISO.Gambia,
719
+ "220"
720
+ ],
721
+ [
722
+ "Georgia (საქართველო)",
723
+ CountryISO.Georgia,
724
+ "995"
725
+ ],
726
+ [
727
+ "Germany (Deutschland)",
728
+ CountryISO.Germany,
729
+ "49"
730
+ ],
731
+ [
732
+ "Ghana (Gaana)",
733
+ CountryISO.Ghana,
734
+ "233"
735
+ ],
736
+ [
737
+ "Gibraltar",
738
+ CountryISO.Gibraltar,
739
+ "350"
740
+ ],
741
+ [
742
+ "Greece (Ελλάδα)",
743
+ CountryISO.Greece,
744
+ "30"
745
+ ],
746
+ [
747
+ "Greenland (Kalaallit Nunaat)",
748
+ CountryISO.Greenland,
749
+ "299"
750
+ ],
751
+ [
752
+ "Grenada",
753
+ CountryISO.Grenada,
754
+ "1473"
755
+ ],
756
+ [
757
+ "Guadeloupe",
758
+ CountryISO.Guadeloupe,
759
+ "590",
760
+ 0
761
+ ],
762
+ [
763
+ "Guam",
764
+ "gu",
765
+ "1",
766
+ 1,
767
+ ["671"]
768
+ ],
769
+ [
770
+ "Guatemala",
771
+ CountryISO.Guatemala,
772
+ "502"
773
+ ],
774
+ [
775
+ "Guernsey",
776
+ CountryISO.Guernsey,
777
+ "44",
778
+ 1,
779
+ [1481]
780
+ ],
781
+ [
782
+ "Guinea (Guinée)",
783
+ CountryISO.Guinea,
784
+ "224"
785
+ ],
786
+ [
787
+ "Guinea-Bissau (Guiné Bissau)",
788
+ CountryISO.GuineaBissau,
789
+ "245"
790
+ ],
791
+ [
792
+ "Guyana",
793
+ CountryISO.Guyana,
794
+ "592"
795
+ ],
796
+ [
797
+ "Haiti",
798
+ CountryISO.Haiti,
799
+ "509"
800
+ ],
801
+ [
802
+ "Honduras",
803
+ CountryISO.Honduras,
804
+ "504"
805
+ ],
806
+ [
807
+ "Hong Kong (香港)",
808
+ CountryISO.HongKong,
809
+ "852"
810
+ ],
811
+ [
812
+ "Hungary (Magyarország)",
813
+ CountryISO.Hungary,
814
+ "36"
815
+ ],
816
+ [
817
+ "Iceland (Ísland)",
818
+ CountryISO.Iceland,
819
+ "354"
820
+ ],
821
+ [
822
+ "India (भारत)",
823
+ CountryISO.India,
824
+ "91"
825
+ ],
826
+ [
827
+ "Indonesia",
828
+ CountryISO.Indonesia,
829
+ "62"
830
+ ],
831
+ [
832
+ "Iran (‫ایران‬‎)",
833
+ CountryISO.Iran,
834
+ "98"
835
+ ],
836
+ [
837
+ "Iraq (‫العراق‬‎)",
838
+ CountryISO.Iraq,
839
+ "964"
840
+ ],
841
+ [
842
+ "Ireland",
843
+ CountryISO.Ireland,
844
+ "353"
845
+ ],
846
+ [
847
+ "Isle of Man",
848
+ CountryISO.IsleOfMan,
849
+ "44",
850
+ 2,
851
+ [1624]
852
+ ],
853
+ [
854
+ "Israel (‫ישראל‬‎)",
855
+ CountryISO.Israel,
856
+ "972"
857
+ ],
858
+ [
859
+ "Italy (Italia)",
860
+ CountryISO.Italy,
861
+ "39",
862
+ 0
863
+ ],
864
+ [
865
+ "Jamaica",
866
+ "jm",
867
+ "1",
868
+ 1,
869
+ ["876"]
870
+ ],
871
+ [
872
+ "Japan (日本)",
873
+ CountryISO.Japan,
874
+ "81"
875
+ ],
876
+ [
877
+ "Jersey",
878
+ CountryISO.Jersey,
879
+ "44",
880
+ 3,
881
+ [1534]
882
+ ],
883
+ [
884
+ "Jordan (‫الأردن‬‎)",
885
+ CountryISO.Jordan,
886
+ "962"
887
+ ],
888
+ [
889
+ "Kazakhstan (Казахстан)",
890
+ CountryISO.Kazakhstan,
891
+ "7",
892
+ 1
893
+ ],
894
+ [
895
+ "Kenya",
896
+ CountryISO.Kenya,
897
+ "254"
898
+ ],
899
+ [
900
+ "Kiribati",
901
+ CountryISO.Kiribati,
902
+ "686"
903
+ ],
904
+ [
905
+ "Kosovo",
906
+ CountryISO.Kosovo,
907
+ "383"
908
+ ],
909
+ [
910
+ "Kuwait (‫الكويت‬‎)",
911
+ CountryISO.Kuwait,
912
+ "965"
913
+ ],
914
+ [
915
+ "Kyrgyzstan (Кыргызстан)",
916
+ CountryISO.Kyrgyzstan,
917
+ "996"
918
+ ],
919
+ [
920
+ "Laos (ລາວ)",
921
+ CountryISO.Laos,
922
+ "856"
923
+ ],
924
+ [
925
+ "Latvia (Latvija)",
926
+ CountryISO.Latvia,
927
+ "371"
928
+ ],
929
+ [
930
+ "Lebanon (‫لبنان‬‎)",
931
+ CountryISO.Lebanon,
932
+ "961"
933
+ ],
934
+ [
935
+ "Lesotho",
936
+ CountryISO.Lesotho,
937
+ "266"
938
+ ],
939
+ [
940
+ "Liberia",
941
+ CountryISO.Liberia,
942
+ "231"
943
+ ],
944
+ [
945
+ "Libya (‫ليبيا‬‎)",
946
+ CountryISO.Libya,
947
+ "218"
948
+ ],
949
+ [
950
+ "Liechtenstein",
951
+ CountryISO.Liechtenstein,
952
+ "423"
953
+ ],
954
+ [
955
+ "Lithuania (Lietuva)",
956
+ CountryISO.Lithuania,
957
+ "370"
958
+ ],
959
+ [
960
+ "Luxembourg",
961
+ CountryISO.Luxembourg,
962
+ "352"
963
+ ],
964
+ [
965
+ "Macau (澳門)",
966
+ CountryISO.Macau,
967
+ "853"
968
+ ],
969
+ [
970
+ "Macedonia (FYROM) (Македонија)",
971
+ CountryISO.Macedonia,
972
+ "389"
973
+ ],
974
+ [
975
+ "Madagascar (Madagasikara)",
976
+ CountryISO.Madagascar,
977
+ "261"
978
+ ],
979
+ [
980
+ "Malawi",
981
+ CountryISO.Malawi,
982
+ "265"
983
+ ],
984
+ [
985
+ "Malaysia",
986
+ CountryISO.Malaysia,
987
+ "60"
988
+ ],
989
+ [
990
+ "Maldives",
991
+ CountryISO.Maldives,
992
+ "960"
993
+ ],
994
+ [
995
+ "Mali",
996
+ CountryISO.Mali,
997
+ "223"
998
+ ],
999
+ [
1000
+ "Malta",
1001
+ CountryISO.Malta,
1002
+ "356"
1003
+ ],
1004
+ [
1005
+ "Marshall Islands",
1006
+ CountryISO.MarshallIslands,
1007
+ "692"
1008
+ ],
1009
+ [
1010
+ "Martinique",
1011
+ CountryISO.Martinique,
1012
+ "596"
1013
+ ],
1014
+ [
1015
+ "Mauritania (‫موريتانيا‬‎)",
1016
+ CountryISO.Mauritania,
1017
+ "222"
1018
+ ],
1019
+ [
1020
+ "Mauritius (Moris)",
1021
+ CountryISO.Mauritius,
1022
+ "230"
1023
+ ],
1024
+ [
1025
+ "Mayotte",
1026
+ CountryISO.Mayotte,
1027
+ "262",
1028
+ 1
1029
+ ],
1030
+ [
1031
+ "Mexico (México)",
1032
+ CountryISO.Mexico,
1033
+ "52"
1034
+ ],
1035
+ [
1036
+ "Micronesia",
1037
+ CountryISO.Micronesia,
1038
+ "691"
1039
+ ],
1040
+ [
1041
+ "Moldova (Republica Moldova)",
1042
+ CountryISO.Moldova,
1043
+ "373"
1044
+ ],
1045
+ [
1046
+ "Monaco",
1047
+ CountryISO.Monaco,
1048
+ "377"
1049
+ ],
1050
+ [
1051
+ "Mongolia (Монгол)",
1052
+ CountryISO.Mongolia,
1053
+ "976"
1054
+ ],
1055
+ [
1056
+ "Montenegro (Crna Gora)",
1057
+ CountryISO.Montenegro,
1058
+ "382"
1059
+ ],
1060
+ [
1061
+ "Montserrat",
1062
+ "ms",
1063
+ "1",
1064
+ 1,
1065
+ ["664"]
1066
+ ],
1067
+ [
1068
+ "Morocco (‫المغرب‬‎)",
1069
+ CountryISO.Morocco,
1070
+ "212",
1071
+ 0
1072
+ ],
1073
+ [
1074
+ "Mozambique (Moçambique)",
1075
+ CountryISO.Mozambique,
1076
+ "258"
1077
+ ],
1078
+ [
1079
+ "Myanmar (Burma) (မြန်မာ)",
1080
+ CountryISO.Myanmar,
1081
+ "95"
1082
+ ],
1083
+ [
1084
+ "Namibia (Namibië)",
1085
+ CountryISO.Namibia,
1086
+ "264"
1087
+ ],
1088
+ [
1089
+ "Nauru",
1090
+ CountryISO.Nauru,
1091
+ "674"
1092
+ ],
1093
+ [
1094
+ "Nepal (नेपाल)",
1095
+ CountryISO.Nepal,
1096
+ "977"
1097
+ ],
1098
+ [
1099
+ "Netherlands (Nederland)",
1100
+ CountryISO.Netherlands,
1101
+ "31"
1102
+ ],
1103
+ [
1104
+ "New Caledonia (Nouvelle-Calédonie)",
1105
+ CountryISO.NewCaledonia,
1106
+ "687"
1107
+ ],
1108
+ [
1109
+ "New Zealand",
1110
+ CountryISO.NewZealand,
1111
+ "64"
1112
+ ],
1113
+ [
1114
+ "Nicaragua",
1115
+ CountryISO.Nicaragua,
1116
+ "505"
1117
+ ],
1118
+ [
1119
+ "Niger (Nijar)",
1120
+ CountryISO.Niger,
1121
+ "227"
1122
+ ],
1123
+ [
1124
+ "Nigeria",
1125
+ CountryISO.Nigeria,
1126
+ "234"
1127
+ ],
1128
+ [
1129
+ "Niue",
1130
+ CountryISO.Niue,
1131
+ "683"
1132
+ ],
1133
+ [
1134
+ "Norfolk Island",
1135
+ CountryISO.NorfolkIsland,
1136
+ "672"
1137
+ ],
1138
+ [
1139
+ "North Korea (조선 민주주의 인민 공화국)",
1140
+ CountryISO.NorthKorea,
1141
+ "850"
1142
+ ],
1143
+ [
1144
+ "Northern Mariana Islands",
1145
+ CountryISO.NorthernMarianaIslands,
1146
+ "1670"
1147
+ ],
1148
+ [
1149
+ "Norway (Norge)",
1150
+ CountryISO.Norway,
1151
+ "47",
1152
+ 0
1153
+ ],
1154
+ [
1155
+ "Oman (‫عُمان‬‎)",
1156
+ CountryISO.Oman,
1157
+ "968"
1158
+ ],
1159
+ [
1160
+ "Pakistan (‫پاکستان‬‎)",
1161
+ CountryISO.Pakistan,
1162
+ "92"
1163
+ ],
1164
+ [
1165
+ "Palau",
1166
+ CountryISO.Palau,
1167
+ "680"
1168
+ ],
1169
+ [
1170
+ "Palestine (‫فلسطين‬‎)",
1171
+ CountryISO.Palestine,
1172
+ "970"
1173
+ ],
1174
+ [
1175
+ "Panama (Panamá)",
1176
+ CountryISO.Panama,
1177
+ "507"
1178
+ ],
1179
+ [
1180
+ "Papua New Guinea",
1181
+ CountryISO.PapuaNewGuinea,
1182
+ "675"
1183
+ ],
1184
+ [
1185
+ "Paraguay",
1186
+ CountryISO.Paraguay,
1187
+ "595"
1188
+ ],
1189
+ [
1190
+ "Peru (Perú)",
1191
+ CountryISO.Peru,
1192
+ "51"
1193
+ ],
1194
+ [
1195
+ "Philippines",
1196
+ CountryISO.Philippines,
1197
+ "63"
1198
+ ],
1199
+ [
1200
+ "Poland (Polska)",
1201
+ CountryISO.Poland,
1202
+ "48"
1203
+ ],
1204
+ [
1205
+ "Portugal",
1206
+ CountryISO.Portugal,
1207
+ "351"
1208
+ ],
1209
+ [
1210
+ "Puerto Rico",
1211
+ CountryISO.PuertoRico,
1212
+ "1",
1213
+ 3,
1214
+ ["787", "939"]
1215
+ ],
1216
+ [
1217
+ "Qatar (‫قطر‬‎)",
1218
+ CountryISO.Qatar,
1219
+ "974"
1220
+ ],
1221
+ [
1222
+ "Réunion (La Réunion)",
1223
+ CountryISO.Réunion,
1224
+ "262",
1225
+ 0
1226
+ ],
1227
+ [
1228
+ "Romania (România)",
1229
+ CountryISO.Romania,
1230
+ "40"
1231
+ ],
1232
+ [
1233
+ "Russia (Россия)",
1234
+ CountryISO.Russia,
1235
+ "7",
1236
+ 0
1237
+ ],
1238
+ [
1239
+ "Rwanda",
1240
+ CountryISO.Rwanda,
1241
+ "250"
1242
+ ],
1243
+ [
1244
+ "Saint Barthélemy (Saint-Barthélemy)",
1245
+ CountryISO.SaintBarthélemy,
1246
+ "590",
1247
+ 1
1248
+ ],
1249
+ [
1250
+ "Saint Helena",
1251
+ CountryISO.SaintHelena,
1252
+ "290"
1253
+ ],
1254
+ [
1255
+ "Saint Kitts and Nevis",
1256
+ CountryISO.SaintKittsAndNevis,
1257
+ "1869"
1258
+ ],
1259
+ [
1260
+ "Saint Lucia",
1261
+ "lc",
1262
+ "1",
1263
+ 1,
1264
+ ["758"]
1265
+ ],
1266
+ [
1267
+ "Saint Martin (Saint-Martin (partie française))",
1268
+ CountryISO.SaintMartin,
1269
+ "590",
1270
+ 2
1271
+ ],
1272
+ [
1273
+ "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)",
1274
+ CountryISO.SaintPierreAndMiquelon,
1275
+ "508"
1276
+ ],
1277
+ [
1278
+ "Saint Vincent and the Grenadines",
1279
+ "vc",
1280
+ "1",
1281
+ 1,
1282
+ ["784"]
1283
+ ],
1284
+ [
1285
+ "Samoa",
1286
+ CountryISO.Samoa,
1287
+ "685"
1288
+ ],
1289
+ [
1290
+ "San Marino",
1291
+ CountryISO.SanMarino,
1292
+ "378"
1293
+ ],
1294
+ [
1295
+ "São Tomé and Príncipe (São Tomé e Príncipe)",
1296
+ CountryISO.SãoToméAndPríncipe,
1297
+ "239"
1298
+ ],
1299
+ [
1300
+ "Saudi Arabia (‫المملكة العربية السعودية‬‎)",
1301
+ CountryISO.SaudiArabia,
1302
+ "966"
1303
+ ],
1304
+ [
1305
+ "Senegal (Sénégal)",
1306
+ CountryISO.Senegal,
1307
+ "221"
1308
+ ],
1309
+ [
1310
+ "Serbia (Србија)",
1311
+ CountryISO.Serbia,
1312
+ "381"
1313
+ ],
1314
+ [
1315
+ "Seychelles",
1316
+ CountryISO.Seychelles,
1317
+ "248"
1318
+ ],
1319
+ [
1320
+ "Sierra Leone",
1321
+ CountryISO.SierraLeone,
1322
+ "232"
1323
+ ],
1324
+ [
1325
+ "Singapore",
1326
+ CountryISO.Singapore,
1327
+ "65"
1328
+ ],
1329
+ [
1330
+ "Sint Maarten",
1331
+ "sx",
1332
+ "1",
1333
+ 1,
1334
+ ["721"]
1335
+ ],
1336
+ [
1337
+ "Slovakia (Slovensko)",
1338
+ CountryISO.Slovakia,
1339
+ "421"
1340
+ ],
1341
+ [
1342
+ "Slovenia (Slovenija)",
1343
+ CountryISO.Slovenia,
1344
+ "386"
1345
+ ],
1346
+ [
1347
+ "Solomon Islands",
1348
+ CountryISO.SolomonIslands,
1349
+ "677"
1350
+ ],
1351
+ [
1352
+ "Somalia (Soomaaliya)",
1353
+ CountryISO.Somalia,
1354
+ "252"
1355
+ ],
1356
+ [
1357
+ "South Africa",
1358
+ CountryISO.SouthAfrica,
1359
+ "27"
1360
+ ],
1361
+ [
1362
+ "South Korea (대한민국)",
1363
+ CountryISO.SouthKorea,
1364
+ "82"
1365
+ ],
1366
+ [
1367
+ "South Sudan (‫جنوب السودان‬‎)",
1368
+ CountryISO.SouthSudan,
1369
+ "211"
1370
+ ],
1371
+ [
1372
+ "Spain (España)",
1373
+ CountryISO.Spain,
1374
+ "34"
1375
+ ],
1376
+ [
1377
+ "Sri Lanka (ශ්‍රී ලංකාව)",
1378
+ CountryISO.SriLanka,
1379
+ "94"
1380
+ ],
1381
+ [
1382
+ "Sudan (‫السودان‬‎)",
1383
+ CountryISO.Sudan,
1384
+ "249"
1385
+ ],
1386
+ [
1387
+ "Suriname",
1388
+ CountryISO.Suriname,
1389
+ "597"
1390
+ ],
1391
+ [
1392
+ "Svalbard and Jan Mayen",
1393
+ CountryISO.SvalbardAndJanMayen,
1394
+ "47",
1395
+ 1
1396
+ ],
1397
+ [
1398
+ "Swaziland",
1399
+ CountryISO.Swaziland,
1400
+ "268"
1401
+ ],
1402
+ [
1403
+ "Sweden (Sverige)",
1404
+ CountryISO.Sweden,
1405
+ "46"
1406
+ ],
1407
+ [
1408
+ "Switzerland (Schweiz)",
1409
+ CountryISO.Switzerland,
1410
+ "41"
1411
+ ],
1412
+ [
1413
+ "Syria (‫سوريا‬‎)",
1414
+ CountryISO.Syria,
1415
+ "963"
1416
+ ],
1417
+ [
1418
+ "Taiwan (台灣)",
1419
+ CountryISO.Taiwan,
1420
+ "886"
1421
+ ],
1422
+ [
1423
+ "Tajikistan",
1424
+ CountryISO.Tajikistan,
1425
+ "992"
1426
+ ],
1427
+ [
1428
+ "Tanzania",
1429
+ CountryISO.Tanzania,
1430
+ "255"
1431
+ ],
1432
+ [
1433
+ "Thailand (ไทย)",
1434
+ CountryISO.Thailand,
1435
+ "66"
1436
+ ],
1437
+ [
1438
+ "Timor-Leste",
1439
+ CountryISO.TimorLeste,
1440
+ "670"
1441
+ ],
1442
+ [
1443
+ "Togo",
1444
+ CountryISO.Togo,
1445
+ "228"
1446
+ ],
1447
+ [
1448
+ "Tokelau",
1449
+ CountryISO.Tokelau,
1450
+ "690"
1451
+ ],
1452
+ [
1453
+ "Tonga",
1454
+ CountryISO.Tonga,
1455
+ "676"
1456
+ ],
1457
+ [
1458
+ "Trinidad and Tobago",
1459
+ "tt",
1460
+ "1",
1461
+ 1,
1462
+ ["868"]
1463
+ ],
1464
+ [
1465
+ "Tunisia (‫تونس‬‎)",
1466
+ CountryISO.Tunisia,
1467
+ "216"
1468
+ ],
1469
+ [
1470
+ "Turkey (Türkiye)",
1471
+ CountryISO.Turkey,
1472
+ "90"
1473
+ ],
1474
+ [
1475
+ "Turkmenistan",
1476
+ CountryISO.Turkmenistan,
1477
+ "993"
1478
+ ],
1479
+ [
1480
+ "Turks and Caicos Islands",
1481
+ CountryISO.TurksAndCaicosIslands,
1482
+ "1649"
1483
+ ],
1484
+ [
1485
+ "Tuvalu",
1486
+ CountryISO.Tuvalu,
1487
+ "688"
1488
+ ],
1489
+ [
1490
+ "U.S. Virgin Islands",
1491
+ "vi",
1492
+ "1",
1493
+ 1,
1494
+ ["340"]
1495
+ ],
1496
+ [
1497
+ "Uganda",
1498
+ CountryISO.Uganda,
1499
+ "256"
1500
+ ],
1501
+ [
1502
+ "Ukraine (Україна)",
1503
+ CountryISO.Ukraine,
1504
+ "380"
1505
+ ],
1506
+ [
1507
+ "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)",
1508
+ CountryISO.UnitedArabEmirates,
1509
+ "971"
1510
+ ],
1511
+ [
1512
+ "United Kingdom",
1513
+ CountryISO.UnitedKingdom,
1514
+ "44",
1515
+ 0
1516
+ ],
1517
+ [
1518
+ "United States",
1519
+ CountryISO.UnitedStates,
1520
+ "1",
1521
+ 0
1522
+ ],
1523
+ [
1524
+ "Uruguay",
1525
+ CountryISO.Uruguay,
1526
+ "598"
1527
+ ],
1528
+ [
1529
+ "Uzbekistan (Oʻzbekiston)",
1530
+ CountryISO.Uzbekistan,
1531
+ "998"
1532
+ ],
1533
+ [
1534
+ "Vanuatu",
1535
+ CountryISO.Vanuatu,
1536
+ "678"
1537
+ ],
1538
+ [
1539
+ "Vatican City (Città del Vaticano)",
1540
+ CountryISO.VaticanCity,
1541
+ "39",
1542
+ 1
1543
+ ],
1544
+ [
1545
+ "Venezuela",
1546
+ CountryISO.Venezuela,
1547
+ "58"
1548
+ ],
1549
+ [
1550
+ "Vietnam (Việt Nam)",
1551
+ CountryISO.Vietnam,
1552
+ "84"
1553
+ ],
1554
+ [
1555
+ "Wallis and Futuna",
1556
+ CountryISO.WallisAndFutuna,
1557
+ "681"
1558
+ ],
1559
+ [
1560
+ "Western Sahara (‫الصحراء الغربية‬‎)",
1561
+ CountryISO.WesternSahara,
1562
+ "212",
1563
+ 1
1564
+ ],
1565
+ [
1566
+ "Yemen (‫اليمن‬‎)",
1567
+ CountryISO.Yemen,
1568
+ "967"
1569
+ ],
1570
+ [
1571
+ "Zambia",
1572
+ CountryISO.Zambia,
1573
+ "260"
1574
+ ],
1575
+ [
1576
+ "Zimbabwe",
1577
+ CountryISO.Zimbabwe,
1578
+ "263"
1579
+ ],
1580
+ [
1581
+ "Åland Islands",
1582
+ CountryISO.ÅlandIslands,
1583
+ "358",
1584
+ 1
1585
+ ]
1586
+ ];
1587
+ }
1588
+ static {
1589
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1590
+ minVersion: "12.0.0",
1591
+ version: "22.2.7",
1592
+ ngImport: i0,
1593
+ type: CountryCode,
1594
+ deps: [],
1595
+ target: i0.ɵɵFactoryTarget.Injectable
1596
+ });
1597
+ }
1598
+ static {
1599
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
1600
+ minVersion: "12.0.0",
1601
+ version: "22.2.7",
1602
+ ngImport: i0,
1603
+ type: CountryCode
1604
+ });
1605
+ }
1606
+ };
1607
+ i0.ɵɵngDeclareClassMetadata({
1608
+ minVersion: "12.0.0",
1609
+ version: "22.2.7",
1610
+ ngImport: i0,
1611
+ type: CountryCode,
1612
+ decorators: [{ type: Injectable }]
1613
+ });
1614
+ var PhoneNumberFormat;
1615
+ (function(PhoneNumberFormat) {
1616
+ PhoneNumberFormat["International"] = "INTERNATIONAL";
1617
+ PhoneNumberFormat["National"] = "NATIONAL";
1618
+ })(PhoneNumberFormat || (PhoneNumberFormat = {}));
580
1619
  var SearchCountryField;
581
- (function (SearchCountryField) {
582
- SearchCountryField["DialCode"] = "dialCode";
583
- SearchCountryField["Iso2"] = "iso2";
584
- SearchCountryField["Name"] = "name";
585
- SearchCountryField["All"] = "all";
1620
+ (function(SearchCountryField) {
1621
+ SearchCountryField["DialCode"] = "dialCode";
1622
+ SearchCountryField["Iso2"] = "iso2";
1623
+ SearchCountryField["Name"] = "name";
1624
+ SearchCountryField["All"] = "all";
586
1625
  })(SearchCountryField || (SearchCountryField = {}));
587
-
588
- /*
589
- We use "control: any" instead of "control: FormControl" to silence:
590
- "Property 'nativeElement' does not exist on type 'FormControl'".
591
- This happens because I've expanded control with nativeElement via
592
- 'NativeElementInjectorDirective' to get an access to the element.
593
- More about this approach and reasons for this:
594
- https://github.com/angular/angular/issues/18025
595
- https://stackoverflow.com/a/54075119/1617590
596
- */
597
1626
  const phoneNumberValidator = (control) => {
598
- if (!control.value) {
599
- return;
600
- }
601
- // Find <input> inside injected nativeElement and get its "id".
602
- const el = control.nativeElement;
603
- const inputBox = el ? el.querySelector('input[type="tel"]') : undefined;
604
- if (inputBox) {
605
- const id = inputBox.id;
606
- const isCheckValidation = inputBox.getAttribute('validation');
607
- if (isCheckValidation === 'true') {
608
- const isRequired = control.errors && control.errors.required === true;
609
- const error = { validatePhoneNumber: { valid: false } };
610
- inputBox.setCustomValidity('Invalid field.');
611
- let number;
612
- try {
613
- number = lpn.PhoneNumberUtil.getInstance().parse(control.value.number, control.value.countryCode);
614
- }
615
- catch (e) {
616
- if (isRequired) {
617
- return error;
618
- }
619
- else {
620
- inputBox.setCustomValidity('');
621
- }
622
- }
623
- if (control.value) {
624
- // @ts-ignore
625
- if (!number) {
626
- return error;
627
- }
628
- else {
629
- if (!lpn.PhoneNumberUtil.getInstance().isValidNumberForRegion(number, control.value.countryCode)) {
630
- return error;
631
- }
632
- else {
633
- inputBox.setCustomValidity('');
634
- }
635
- }
636
- }
637
- }
638
- else if (isCheckValidation === 'false') {
639
- inputBox.setCustomValidity('');
640
- control.clearValidators();
641
- }
642
- }
643
- return;
1627
+ if (!control.value) return;
1628
+ const el = control.nativeElement;
1629
+ const inputBox = el ? el.querySelector("input[type=\"tel\"]") : void 0;
1630
+ if (inputBox) {
1631
+ const isCheckValidation = inputBox.getAttribute("validation");
1632
+ if (isCheckValidation === "true") {
1633
+ const isRequired = control.errors && control.errors.required === true;
1634
+ const error = { validatePhoneNumber: { valid: false } };
1635
+ inputBox.setCustomValidity("Invalid field.");
1636
+ let number;
1637
+ try {
1638
+ number = lpn.PhoneNumberUtil.getInstance().parse(control.value.number, control.value.countryCode);
1639
+ } catch (e) {
1640
+ if (isRequired) return error;
1641
+ else inputBox.setCustomValidity("");
1642
+ }
1643
+ if (control.value) {
1644
+ if (!number) return error;
1645
+ else if (!lpn.PhoneNumberUtil.getInstance().isValidNumberForRegion(number, control.value.countryCode)) return error;
1646
+ else inputBox.setCustomValidity("");
1647
+ }
1648
+ } else if (isCheckValidation === "false") {
1649
+ inputBox.setCustomValidity("");
1650
+ control.clearValidators();
1651
+ }
1652
+ }
644
1653
  };
1654
+ let nextInstanceId = 0;
1655
+ var NgxIntlTelInputComponent = class NgxIntlTelInputComponent {
1656
+ constructor() {
1657
+ this.value = "";
1658
+ this.preferredCountries = [];
1659
+ this.enablePlaceholder = true;
1660
+ this.numberFormat = PhoneNumberFormat.International;
1661
+ this.cssClass = "form-control";
1662
+ this.onlyCountries = [];
1663
+ this.enableAutoCountrySelect = true;
1664
+ this.searchCountryFlag = false;
1665
+ this.searchCountryField = [SearchCountryField.All];
1666
+ this.searchCountryPlaceholder = "Search Country";
1667
+ this.selectFirstCountry = true;
1668
+ this.phoneValidation = true;
1669
+ this.inputId = "phone";
1670
+ this.separateDialCode = false;
1671
+ this.excludeCountries = [];
1672
+ this.countryChange = new EventEmitter();
1673
+ this.selectedCountry = {
1674
+ areaCodes: void 0,
1675
+ dialCode: "",
1676
+ htmlId: "",
1677
+ flagClass: "",
1678
+ iso2: "",
1679
+ name: "",
1680
+ placeHolder: "",
1681
+ priority: 0
1682
+ };
1683
+ this.phoneNumber = "";
1684
+ this.allCountries = [];
1685
+ this.preferredCountriesInDropDown = [];
1686
+ this.phoneUtil = lpn.PhoneNumberUtil.getInstance();
1687
+ this.disabled = false;
1688
+ this.countrySearchText = "";
1689
+ this.isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
1690
+ this.dropdownId = `iti-country-dropdown-${nextInstanceId++}`;
1691
+ this.listboxId = `${this.dropdownId}-list`;
1692
+ this.countryOptions = [];
1693
+ this.selectedOptionIds = [];
1694
+ this.openedWithIds = [];
1695
+ this.listbox = viewChild(Listbox, ...ngDevMode ? [{ debugName: "listbox" }] : /* istanbul ignore next */ []);
1696
+ this.options = viewChildren(Option, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
1697
+ this.toggleEl = viewChild("toggleEl", ...ngDevMode ? [{ debugName: "toggleEl" }] : /* istanbul ignore next */ []);
1698
+ this.flagContainerEl = viewChild.required("flagContainer", ...ngDevMode ? [{ debugName: "flagContainerEl" }] : /* istanbul ignore next */ []);
1699
+ this.searchInputEl = viewChild("searchInput", ...ngDevMode ? [{ debugName: "searchInputEl" }] : /* istanbul ignore next */ []);
1700
+ this.focusableEl = viewChild.required("focusable", ...ngDevMode ? [{ debugName: "focusableEl" }] : /* istanbul ignore next */ []);
1701
+ this.countryCodeData = inject(CountryCode);
1702
+ this.onTouched = () => {};
1703
+ this.propagateChange = (_) => {};
1704
+ afterRenderEffect(() => {
1705
+ if (this.isOpen()) this.searchInputEl()?.nativeElement.focus();
1706
+ });
1707
+ afterRenderEffect(() => {
1708
+ const activeId = this.listbox()?.activeDescendant();
1709
+ const option = this.options().find((o) => o.id() === activeId);
1710
+ const listEl = this.countryList?.nativeElement;
1711
+ if (!option || !listEl) return;
1712
+ const top = option.element.offsetTop;
1713
+ const bottom = top + option.element.offsetHeight;
1714
+ if (top < listEl.scrollTop) listEl.scrollTop = top;
1715
+ else if (bottom > listEl.scrollTop + listEl.clientHeight) listEl.scrollTop = bottom - listEl.clientHeight;
1716
+ });
1717
+ }
1718
+ get hasSearch() {
1719
+ return Boolean(this.searchCountryFlag && this.searchCountryField);
1720
+ }
1721
+ get toggleAriaLabel() {
1722
+ if (this.selectedCountry?.name) return `${this.selectedCountry.name} (+${this.selectedCountry.dialCode})`;
1723
+ return "Select country";
1724
+ }
1725
+ ngOnInit() {
1726
+ this.init();
1727
+ }
1728
+ ngOnChanges(changes) {
1729
+ const selectedISO = changes["selectedCountryISO"];
1730
+ if (this.allCountries && selectedISO && selectedISO.currentValue !== selectedISO.previousValue) this.updateSelectedCountry();
1731
+ if (changes["preferredCountries"]) this.updatePreferredCountries();
1732
+ this.checkSeparateDialCodeStyle();
1733
+ }
1734
+ init() {
1735
+ this.fetchCountryData();
1736
+ if (this.excludeCountries.length) this.allCountries = this.allCountries.filter((c) => !this.excludeCountries.includes(c.iso2));
1737
+ if (this.preferredCountries.length) this.updatePreferredCountries();
1738
+ if (this.onlyCountries.length) this.allCountries = this.allCountries.filter((c) => this.onlyCountries.includes(c.iso2));
1739
+ if (this.selectFirstCountry) {
1740
+ if (this.preferredCountriesInDropDown.length) this.setSelectedCountry(this.preferredCountriesInDropDown[0]);
1741
+ else this.setSelectedCountry(this.allCountries[0]);
1742
+ }
1743
+ this.updateSelectedCountry();
1744
+ this.checkSeparateDialCodeStyle();
1745
+ }
1746
+ setSelectedCountry(country) {
1747
+ this.selectedCountry = country;
1748
+ this.countryChange.emit(country);
1749
+ }
1750
+ setOpen(open) {
1751
+ if (open === this.isOpen() || open && this.disabled) return;
1752
+ if (open) {
1753
+ this.countryOptions = [...this.preferredCountriesInDropDown.map((country) => ({
1754
+ id: `${country.htmlId}-preferred`,
1755
+ country,
1756
+ preferred: true
1757
+ })), ...this.allCountries.map((country) => ({
1758
+ id: country.htmlId,
1759
+ country,
1760
+ preferred: false
1761
+ }))];
1762
+ const selected = this.countryOptions.find((o) => o.country.iso2 === this.selectedCountry?.iso2);
1763
+ this.selectedOptionIds = this.openedWithIds = selected ? [selected.id] : [];
1764
+ } else this.countrySearchText = "";
1765
+ this.isOpen.set(open);
1766
+ }
1767
+ onToggleKeydown(event) {
1768
+ if ([
1769
+ "Enter",
1770
+ " ",
1771
+ "ArrowDown"
1772
+ ].includes(event.key)) {
1773
+ event.preventDefault();
1774
+ this.setOpen(true);
1775
+ }
1776
+ }
1777
+ closeDropdown(returnFocus) {
1778
+ this.setOpen(false);
1779
+ if (returnFocus) this.toggleEl()?.nativeElement.focus();
1780
+ }
1781
+ onFlagContainerFocusOut(event) {
1782
+ const next = event.relatedTarget;
1783
+ if (this.hasSearch && !this.flagContainerEl().nativeElement.contains(next)) this.setOpen(false);
1784
+ }
1785
+ commitSelection() {
1786
+ if (this.selectedOptionIds === this.openedWithIds) return;
1787
+ const id = this.selectedOptionIds[0] ?? this.openedWithIds[0];
1788
+ const option = this.countryOptions.find((o) => o.id === id);
1789
+ this.setOpen(false);
1790
+ if (option) this.onCountrySelect(option.country, this.focusableEl().nativeElement);
1791
+ }
1792
+ onSearchChange(text) {
1793
+ this.countrySearchText = text;
1794
+ this.searchCountry();
1795
+ }
1796
+ searchCountry() {
1797
+ const listbox = this.listbox();
1798
+ if (!this.countrySearchText) {
1799
+ listbox?.gotoFirst();
1800
+ return;
1801
+ }
1802
+ const countrySearchTextLower = this.countrySearchText.toLowerCase();
1803
+ const searchAll = this.searchCountryField.includes(SearchCountryField.All);
1804
+ const searchIn = (field) => searchAll || this.searchCountryField.includes(field);
1805
+ const index = this.countryOptions.findIndex(({ country: c, preferred }) => !preferred && (searchIn(SearchCountryField.Iso2) && c.iso2.toLowerCase().startsWith(countrySearchTextLower) || searchIn(SearchCountryField.Name) && c.name.toLowerCase().startsWith(countrySearchTextLower) || searchIn(SearchCountryField.DialCode) && c.dialCode.startsWith(this.countrySearchText)));
1806
+ if (index > -1) listbox?.gotoIndex(index);
1807
+ }
1808
+ onPhoneNumberChange() {
1809
+ let countryCode;
1810
+ if (this.phoneNumber && typeof this.phoneNumber === "object") {
1811
+ const numberObj = this.phoneNumber;
1812
+ this.phoneNumber = numberObj.number;
1813
+ countryCode = numberObj.countryCode;
1814
+ }
1815
+ this.value = this.phoneNumber;
1816
+ countryCode = countryCode || this.selectedCountry.iso2;
1817
+ const number = this.getParsedNumber(this.phoneNumber, countryCode);
1818
+ if (this.enableAutoCountrySelect) {
1819
+ countryCode = number && number.getCountryCode() ? this.getCountryIsoCode(number.getCountryCode(), number) : this.selectedCountry.iso2;
1820
+ if (countryCode && countryCode !== this.selectedCountry.iso2) {
1821
+ const newCountry = this.allCountries.slice().sort((a, b) => {
1822
+ return a.priority - b.priority;
1823
+ }).find((c) => c.iso2 === countryCode);
1824
+ if (newCountry) this.selectedCountry = newCountry;
1825
+ }
1826
+ }
1827
+ countryCode = countryCode ? countryCode : this.selectedCountry.iso2;
1828
+ this.checkSeparateDialCodeStyle();
1829
+ if (!this.value) this.propagateChange(null);
1830
+ else {
1831
+ const intlNo = number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL) : "";
1832
+ if (this.separateDialCode && intlNo) this.value = this.removeDialCode(intlNo);
1833
+ this.propagateChange({
1834
+ number: this.value,
1835
+ internationalNumber: intlNo,
1836
+ nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : "",
1837
+ e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : "",
1838
+ countryCode: countryCode.toUpperCase(),
1839
+ dialCode: "+" + this.selectedCountry.dialCode
1840
+ });
1841
+ }
1842
+ }
1843
+ onCountrySelect(country, el) {
1844
+ this.setSelectedCountry(country);
1845
+ this.checkSeparateDialCodeStyle();
1846
+ if (this.phoneNumber && this.phoneNumber.length > 0) {
1847
+ this.value = this.phoneNumber;
1848
+ const number = this.getParsedNumber(this.phoneNumber, this.selectedCountry.iso2);
1849
+ const intlNo = number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL) : "";
1850
+ if (this.separateDialCode && intlNo) this.value = this.removeDialCode(intlNo);
1851
+ this.propagateChange({
1852
+ number: this.value,
1853
+ internationalNumber: intlNo,
1854
+ nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : "",
1855
+ e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : "",
1856
+ countryCode: this.selectedCountry.iso2.toUpperCase(),
1857
+ dialCode: "+" + this.selectedCountry.dialCode
1858
+ });
1859
+ } else this.propagateChange(null);
1860
+ el.focus();
1861
+ }
1862
+ onInputKeyPress(event) {
1863
+ if (!/[0-9\+\-\(\)\ ]/.test(event.key) && !(event.ctrlKey && /[axcv]/.test(event.key)) && ![
1864
+ "ArrowLeft",
1865
+ "ArrowUp",
1866
+ "ArrowRight",
1867
+ "ArrowDown",
1868
+ "Home",
1869
+ "End",
1870
+ "Insert",
1871
+ "Delete",
1872
+ "Backspace"
1873
+ ].includes(event.key)) event.preventDefault();
1874
+ }
1875
+ registerOnChange(fn) {
1876
+ this.propagateChange = fn;
1877
+ }
1878
+ registerOnTouched(fn) {
1879
+ this.onTouched = fn;
1880
+ }
1881
+ setDisabledState(isDisabled) {
1882
+ this.disabled = isDisabled;
1883
+ if (isDisabled) this.setOpen(false);
1884
+ }
1885
+ writeValue(obj) {
1886
+ if (obj === void 0) this.init();
1887
+ this.phoneNumber = obj;
1888
+ setTimeout(() => {
1889
+ this.onPhoneNumberChange();
1890
+ }, 1);
1891
+ }
1892
+ resolvePlaceholder() {
1893
+ let placeholder = "";
1894
+ if (this.customPlaceholder) placeholder = this.customPlaceholder;
1895
+ else if (this.selectedCountry.placeHolder) {
1896
+ placeholder = this.selectedCountry.placeHolder;
1897
+ placeholder = this.stripDialCode(placeholder);
1898
+ }
1899
+ return placeholder;
1900
+ }
1901
+ getParsedNumber(phoneNumber, countryCode) {
1902
+ let number;
1903
+ try {
1904
+ number = this.phoneUtil.parse(phoneNumber, countryCode.toUpperCase());
1905
+ } catch (e) {}
1906
+ return number;
1907
+ }
1908
+ checkSeparateDialCodeStyle() {
1909
+ if (this.separateDialCode && this.selectedCountry) {
1910
+ const cntryCd = this.selectedCountry.dialCode;
1911
+ this.separateDialCodeClass = "separate-dial-code iti-sdc-" + (cntryCd.length + 1);
1912
+ } else this.separateDialCodeClass = "";
1913
+ }
1914
+ removeDialCode(phoneNumber) {
1915
+ const number = this.getParsedNumber(phoneNumber, this.selectedCountry.iso2);
1916
+ return this.stripDialCode(this.phoneUtil.format(number, lpn.PhoneNumberFormat[this.numberFormat]));
1917
+ }
1918
+ stripDialCode(phoneNumber) {
1919
+ if (phoneNumber.startsWith("+") && this.separateDialCode) return phoneNumber.substring(phoneNumber.indexOf(" ") + 1);
1920
+ return phoneNumber;
1921
+ }
1922
+ getCountryIsoCode(countryCode, number) {
1923
+ const rawNumber = number["values_"]["2"].toString();
1924
+ const countries = this.allCountries.filter((c) => c.dialCode === countryCode.toString());
1925
+ const mainCountry = countries.find((c) => c.areaCodes === void 0);
1926
+ const secondaryCountries = countries.filter((c) => c.areaCodes !== void 0);
1927
+ let matchedCountry = mainCountry ? mainCountry.iso2 : void 0;
1928
+ secondaryCountries.forEach((country) => {
1929
+ country.areaCodes.forEach((areaCode) => {
1930
+ if (rawNumber.startsWith(areaCode)) matchedCountry = country.iso2;
1931
+ });
1932
+ });
1933
+ return matchedCountry;
1934
+ }
1935
+ getPhoneNumberPlaceHolder(countryCode) {
1936
+ try {
1937
+ return this.phoneUtil.format(this.phoneUtil.getExampleNumber(countryCode), lpn.PhoneNumberFormat[this.numberFormat]);
1938
+ } catch (e) {
1939
+ return e;
1940
+ }
1941
+ }
1942
+ fetchCountryData() {
1943
+ this.allCountries = [];
1944
+ this.countryCodeData.allCountries.forEach((c) => {
1945
+ const country = {
1946
+ name: c[0].toString(),
1947
+ iso2: c[1],
1948
+ dialCode: c[2].toString(),
1949
+ priority: +c[3] || 0,
1950
+ areaCodes: c[4] || void 0,
1951
+ htmlId: `iti-0__item-${c[1].toString()}`,
1952
+ flagClass: `iti__${c[1].toString().toLocaleLowerCase()}`,
1953
+ placeHolder: ""
1954
+ };
1955
+ if (this.enablePlaceholder) {
1956
+ country.placeHolder = this.getPhoneNumberPlaceHolder(country.iso2.toUpperCase());
1957
+ if (country.iso2 === "ua") country.placeHolder = "+380 31 123 4567";
1958
+ }
1959
+ this.allCountries.push(country);
1960
+ });
1961
+ }
1962
+ updatePreferredCountries() {
1963
+ if (this.preferredCountries.length) this.preferredCountriesInDropDown = this.allCountries.filter((c) => {
1964
+ return this.preferredCountries.includes(c.iso2) && !this.excludeCountries.includes(c.iso2);
1965
+ });
1966
+ }
1967
+ updateSelectedCountry() {
1968
+ if (this.selectedCountryISO && !this.excludeCountries.includes(this.selectedCountryISO)) {
1969
+ this.selectedCountry = this.allCountries.find((c) => {
1970
+ return c.iso2.toLowerCase() === this.selectedCountryISO.toLowerCase();
1971
+ });
1972
+ if (this.selectedCountry) {
1973
+ if (this.phoneNumber) this.onPhoneNumberChange();
1974
+ else this.propagateChange(null);
1975
+ }
1976
+ }
1977
+ }
1978
+ static {
1979
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1980
+ minVersion: "12.0.0",
1981
+ version: "22.2.7",
1982
+ ngImport: i0,
1983
+ type: NgxIntlTelInputComponent,
1984
+ deps: [],
1985
+ target: i0.ɵɵFactoryTarget.Component
1986
+ });
1987
+ }
1988
+ static {
1989
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1990
+ minVersion: "17.0.0",
1991
+ version: "22.2.7",
1992
+ type: NgxIntlTelInputComponent,
1993
+ isStandalone: true,
1994
+ selector: "ngx-intl-tel-input",
1995
+ inputs: {
1996
+ value: "value",
1997
+ preferredCountries: "preferredCountries",
1998
+ enablePlaceholder: "enablePlaceholder",
1999
+ customPlaceholder: "customPlaceholder",
2000
+ numberFormat: "numberFormat",
2001
+ cssClass: "cssClass",
2002
+ onlyCountries: "onlyCountries",
2003
+ enableAutoCountrySelect: "enableAutoCountrySelect",
2004
+ searchCountryFlag: "searchCountryFlag",
2005
+ searchCountryField: "searchCountryField",
2006
+ searchCountryPlaceholder: "searchCountryPlaceholder",
2007
+ maxLength: "maxLength",
2008
+ selectFirstCountry: "selectFirstCountry",
2009
+ selectedCountryISO: "selectedCountryISO",
2010
+ phoneValidation: "phoneValidation",
2011
+ inputId: "inputId",
2012
+ separateDialCode: "separateDialCode",
2013
+ excludeCountries: "excludeCountries"
2014
+ },
2015
+ outputs: { countryChange: "countryChange" },
2016
+ providers: [
2017
+ CountryCode,
2018
+ {
2019
+ provide: NG_VALUE_ACCESSOR,
2020
+ useExisting: forwardRef(() => NgxIntlTelInputComponent),
2021
+ multi: true
2022
+ },
2023
+ {
2024
+ provide: NG_VALIDATORS,
2025
+ useValue: phoneNumberValidator,
2026
+ multi: true
2027
+ }
2028
+ ],
2029
+ viewQueries: [
2030
+ {
2031
+ propertyName: "listbox",
2032
+ first: true,
2033
+ predicate: Listbox,
2034
+ descendants: true,
2035
+ isSignal: true
2036
+ },
2037
+ {
2038
+ propertyName: "options",
2039
+ predicate: Option,
2040
+ descendants: true,
2041
+ isSignal: true
2042
+ },
2043
+ {
2044
+ propertyName: "toggleEl",
2045
+ first: true,
2046
+ predicate: ["toggleEl"],
2047
+ descendants: true,
2048
+ isSignal: true
2049
+ },
2050
+ {
2051
+ propertyName: "flagContainerEl",
2052
+ first: true,
2053
+ predicate: ["flagContainer"],
2054
+ descendants: true,
2055
+ isSignal: true
2056
+ },
2057
+ {
2058
+ propertyName: "searchInputEl",
2059
+ first: true,
2060
+ predicate: ["searchInput"],
2061
+ descendants: true,
2062
+ isSignal: true
2063
+ },
2064
+ {
2065
+ propertyName: "focusableEl",
2066
+ first: true,
2067
+ predicate: ["focusable"],
2068
+ descendants: true,
2069
+ isSignal: true
2070
+ },
2071
+ {
2072
+ propertyName: "countryList",
2073
+ first: true,
2074
+ predicate: ["countryList"],
2075
+ descendants: true
2076
+ }
2077
+ ],
2078
+ usesOnChanges: true,
2079
+ ngImport: i0,
2080
+ template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n #flagContainer\n class=\"iti__flag-container\"\n [class.disabled]=\"disabled\"\n [class.open]=\"isOpen()\"\n (focusout)=\"onFlagContainerFocusOut($event)\"\n >\n @if (hasSearch) {\n <!-- Search mode: a button opens a dialog whose search box is the only combobox. -->\n <div\n #toggleEl\n class=\"iti__selected-flag dropdown-toggle\"\n role=\"button\"\n aria-haspopup=\"dialog\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? dropdownId : null\"\n [attr.aria-disabled]=\"disabled || null\"\n [attr.aria-label]=\"toggleAriaLabel\"\n (click)=\"setOpen(!isOpen())\"\n (keydown)=\"onToggleKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"selectedFlag\" />\n </div>\n @if (isOpen()) {\n <div\n class=\"dropdown-menu iti__dropdown-content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [id]=\"dropdownId\"\n [attr.aria-label]=\"searchCountryPlaceholder\"\n (keydown.escape)=\"closeDropdown(true)\"\n >\n <div class=\"search-container\">\n <input\n #searchInput\n #searchCombobox=\"ngCombobox\"\n id=\"country-search-box\"\n ngCombobox\n alwaysExpanded\n [value]=\"countrySearchText\"\n (valueChange)=\"onSearchChange($event)\"\n (keydown.escape)=\"closeDropdown(true)\"\n [placeholder]=\"searchCountryPlaceholder\"\n [attr.aria-label]=\"searchCountryPlaceholder\"\n />\n </div>\n <ng-container\n [ngTemplateOutlet]=\"countryPopup\"\n [ngTemplateOutletContext]=\"{ $implicit: searchCombobox }\"\n />\n </div>\n }\n } @else {\n <!-- Select-only mode: the toggle is the combobox. -->\n <div\n #toggleEl\n #toggleCombobox=\"ngCombobox\"\n class=\"iti__selected-flag dropdown-toggle\"\n ngCombobox\n [disabled]=\"disabled\"\n [softDisabled]=\"false\"\n [expanded]=\"isOpen()\"\n (expandedChange)=\"setOpen($event)\"\n [attr.aria-label]=\"toggleAriaLabel\"\n >\n <ng-container [ngTemplateOutlet]=\"selectedFlag\" />\n </div>\n <ng-container\n [ngTemplateOutlet]=\"countryPopup\"\n [ngTemplateOutletContext]=\"{ $implicit: toggleCombobox, menu: true }\"\n />\n }\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n\n<ng-template #selectedFlag>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n @if (separateDialCode) {\n <div class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n }\n <div class=\"iti__arrow\"></div>\n</ng-template>\n\n<!--\n Aria renders the popup only while its combobox is expanded. Select-only mode wraps the list in the\n dropdown menu here; in search mode the list already sits in the dropdown menu next to the search box.\n-->\n<ng-template #countryPopup let-combobox let-menu=\"menu\">\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template #list>\n <ul\n #countryList\n #listbox=\"ngListbox\"\n class=\"iti__country-list\"\n ngListbox\n ngComboboxWidget\n tabindex=\"-1\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [id]=\"listboxId\"\n [(value)]=\"selectedOptionIds\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n (click)=\"commitSelection()\"\n (keydown.enter)=\"commitSelection()\"\n (keydown.space)=\"commitSelection()\"\n >\n @for (option of countryOptions; track option.id; let i = $index) {\n @if (!option.preferred && i > 0 && countryOptions[i - 1].preferred) {\n <li class=\"iti__divider\" role=\"separator\" aria-hidden=\"true\"></li>\n }\n <li\n class=\"iti__country\"\n [class.iti__preferred]=\"option.preferred\"\n [class.iti__standard]=\"!option.preferred\"\n ngOption\n [value]=\"option.id\"\n [label]=\"option.country.name\"\n [id]=\"option.id\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"option.country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ option.country.name }}</span>\n <span class=\"iti__dial-code\">+{{ option.country.dialCode }}</span>\n </li>\n }\n </ul>\n </ng-template>\n @if (menu) {\n <div class=\"dropdown-menu iti__dropdown-content\" (keydown.escape)=\"closeDropdown(true)\">\n <ng-container [ngTemplateOutlet]=\"list\" />\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"list\" />\n }\n </ng-template>\n</ng-template>\n",
2081
+ styles: [".dropdown-toggle:focus:not(:focus-visible){outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d;background-clip:padding-box}.open>.dropdown-menu{display:block}li.iti__country:hover,li.iti__country[data-active=true]{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__selected-flag.dropdown-toggle:focus-visible{outline:2px solid #005fcc;outline-offset:-2px}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"],
2082
+ dependencies: [
2083
+ {
2084
+ kind: "directive",
2085
+ type: NgClass,
2086
+ selector: "[ngClass]",
2087
+ inputs: ["class", "ngClass"]
2088
+ },
2089
+ {
2090
+ kind: "directive",
2091
+ type: NgTemplateOutlet,
2092
+ selector: "[ngTemplateOutlet]",
2093
+ inputs: [
2094
+ "ngTemplateOutletContext",
2095
+ "ngTemplateOutlet",
2096
+ "ngTemplateOutletInjector"
2097
+ ]
2098
+ },
2099
+ {
2100
+ kind: "ngmodule",
2101
+ type: FormsModule
2102
+ },
2103
+ {
2104
+ kind: "directive",
2105
+ type: i1.DefaultValueAccessor,
2106
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
2107
+ },
2108
+ {
2109
+ kind: "directive",
2110
+ type: i1.NgControlStatus,
2111
+ selector: "[formControlName],[ngModel],[formControl]"
2112
+ },
2113
+ {
2114
+ kind: "directive",
2115
+ type: i1.NgModel,
2116
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
2117
+ inputs: [
2118
+ "name",
2119
+ "disabled",
2120
+ "ngModel",
2121
+ "ngModelOptions"
2122
+ ],
2123
+ outputs: ["ngModelChange"],
2124
+ exportAs: ["ngModel"]
2125
+ },
2126
+ {
2127
+ kind: "directive",
2128
+ type: Combobox,
2129
+ selector: "[ngCombobox]",
2130
+ inputs: [
2131
+ "disabled",
2132
+ "readonly",
2133
+ "softDisabled",
2134
+ "alwaysExpanded",
2135
+ "tabindex",
2136
+ "expanded",
2137
+ "value",
2138
+ "inlineSuggestion"
2139
+ ],
2140
+ outputs: ["expandedChange", "valueChange"],
2141
+ exportAs: ["ngCombobox"]
2142
+ },
2143
+ {
2144
+ kind: "directive",
2145
+ type: ComboboxPopup,
2146
+ selector: "ng-template[ngComboboxPopup]",
2147
+ inputs: ["combobox", "popupType"],
2148
+ exportAs: ["ngComboboxPopup"]
2149
+ },
2150
+ {
2151
+ kind: "directive",
2152
+ type: ComboboxWidget,
2153
+ selector: "[ngComboboxWidget]",
2154
+ inputs: ["activeDescendant"],
2155
+ exportAs: ["ngComboboxWidget"]
2156
+ },
2157
+ {
2158
+ kind: "directive",
2159
+ type: Listbox,
2160
+ selector: "[ngListbox]",
2161
+ inputs: [
2162
+ "id",
2163
+ "orientation",
2164
+ "multi",
2165
+ "wrap",
2166
+ "softDisabled",
2167
+ "focusMode",
2168
+ "selectionMode",
2169
+ "typeaheadDelay",
2170
+ "disabled",
2171
+ "readonly",
2172
+ "tabindex",
2173
+ "value"
2174
+ ],
2175
+ outputs: ["valueChange"],
2176
+ exportAs: ["ngListbox"]
2177
+ },
2178
+ {
2179
+ kind: "directive",
2180
+ type: Option,
2181
+ selector: "[ngOption]",
2182
+ inputs: [
2183
+ "id",
2184
+ "value",
2185
+ "disabled",
2186
+ "label"
2187
+ ],
2188
+ exportAs: ["ngOption"]
2189
+ }
2190
+ ],
2191
+ changeDetection: i0.ChangeDetectionStrategy.Eager
2192
+ });
2193
+ }
2194
+ };
2195
+ i0.ɵɵngDeclareClassMetadata({
2196
+ minVersion: "12.0.0",
2197
+ version: "22.2.7",
2198
+ ngImport: i0,
2199
+ type: NgxIntlTelInputComponent,
2200
+ decorators: [{
2201
+ type: Component,
2202
+ args: [{
2203
+ selector: "ngx-intl-tel-input",
2204
+ imports: [
2205
+ NgClass,
2206
+ NgTemplateOutlet,
2207
+ FormsModule,
2208
+ Combobox,
2209
+ ComboboxPopup,
2210
+ ComboboxWidget,
2211
+ Listbox,
2212
+ Option
2213
+ ],
2214
+ changeDetection: ChangeDetectionStrategy.Eager,
2215
+ providers: [
2216
+ CountryCode,
2217
+ {
2218
+ provide: NG_VALUE_ACCESSOR,
2219
+ useExisting: forwardRef(() => NgxIntlTelInputComponent),
2220
+ multi: true
2221
+ },
2222
+ {
2223
+ provide: NG_VALIDATORS,
2224
+ useValue: phoneNumberValidator,
2225
+ multi: true
2226
+ }
2227
+ ],
2228
+ template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n #flagContainer\n class=\"iti__flag-container\"\n [class.disabled]=\"disabled\"\n [class.open]=\"isOpen()\"\n (focusout)=\"onFlagContainerFocusOut($event)\"\n >\n @if (hasSearch) {\n <!-- Search mode: a button opens a dialog whose search box is the only combobox. -->\n <div\n #toggleEl\n class=\"iti__selected-flag dropdown-toggle\"\n role=\"button\"\n aria-haspopup=\"dialog\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? dropdownId : null\"\n [attr.aria-disabled]=\"disabled || null\"\n [attr.aria-label]=\"toggleAriaLabel\"\n (click)=\"setOpen(!isOpen())\"\n (keydown)=\"onToggleKeydown($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"selectedFlag\" />\n </div>\n @if (isOpen()) {\n <div\n class=\"dropdown-menu iti__dropdown-content\"\n role=\"dialog\"\n tabindex=\"-1\"\n [id]=\"dropdownId\"\n [attr.aria-label]=\"searchCountryPlaceholder\"\n (keydown.escape)=\"closeDropdown(true)\"\n >\n <div class=\"search-container\">\n <input\n #searchInput\n #searchCombobox=\"ngCombobox\"\n id=\"country-search-box\"\n ngCombobox\n alwaysExpanded\n [value]=\"countrySearchText\"\n (valueChange)=\"onSearchChange($event)\"\n (keydown.escape)=\"closeDropdown(true)\"\n [placeholder]=\"searchCountryPlaceholder\"\n [attr.aria-label]=\"searchCountryPlaceholder\"\n />\n </div>\n <ng-container\n [ngTemplateOutlet]=\"countryPopup\"\n [ngTemplateOutletContext]=\"{ $implicit: searchCombobox }\"\n />\n </div>\n }\n } @else {\n <!-- Select-only mode: the toggle is the combobox. -->\n <div\n #toggleEl\n #toggleCombobox=\"ngCombobox\"\n class=\"iti__selected-flag dropdown-toggle\"\n ngCombobox\n [disabled]=\"disabled\"\n [softDisabled]=\"false\"\n [expanded]=\"isOpen()\"\n (expandedChange)=\"setOpen($event)\"\n [attr.aria-label]=\"toggleAriaLabel\"\n >\n <ng-container [ngTemplateOutlet]=\"selectedFlag\" />\n </div>\n <ng-container\n [ngTemplateOutlet]=\"countryPopup\"\n [ngTemplateOutletContext]=\"{ $implicit: toggleCombobox, menu: true }\"\n />\n }\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n\n<ng-template #selectedFlag>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n @if (separateDialCode) {\n <div class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n }\n <div class=\"iti__arrow\"></div>\n</ng-template>\n\n<!--\n Aria renders the popup only while its combobox is expanded. Select-only mode wraps the list in the\n dropdown menu here; in search mode the list already sits in the dropdown menu next to the search box.\n-->\n<ng-template #countryPopup let-combobox let-menu=\"menu\">\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <ng-template #list>\n <ul\n #countryList\n #listbox=\"ngListbox\"\n class=\"iti__country-list\"\n ngListbox\n ngComboboxWidget\n tabindex=\"-1\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [id]=\"listboxId\"\n [(value)]=\"selectedOptionIds\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n (click)=\"commitSelection()\"\n (keydown.enter)=\"commitSelection()\"\n (keydown.space)=\"commitSelection()\"\n >\n @for (option of countryOptions; track option.id; let i = $index) {\n @if (!option.preferred && i > 0 && countryOptions[i - 1].preferred) {\n <li class=\"iti__divider\" role=\"separator\" aria-hidden=\"true\"></li>\n }\n <li\n class=\"iti__country\"\n [class.iti__preferred]=\"option.preferred\"\n [class.iti__standard]=\"!option.preferred\"\n ngOption\n [value]=\"option.id\"\n [label]=\"option.country.name\"\n [id]=\"option.id\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"option.country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ option.country.name }}</span>\n <span class=\"iti__dial-code\">+{{ option.country.dialCode }}</span>\n </li>\n }\n </ul>\n </ng-template>\n @if (menu) {\n <div class=\"dropdown-menu iti__dropdown-content\" (keydown.escape)=\"closeDropdown(true)\">\n <ng-container [ngTemplateOutlet]=\"list\" />\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"list\" />\n }\n </ng-template>\n</ng-template>\n",
2229
+ styles: [".dropdown-toggle:focus:not(:focus-visible){outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d;background-clip:padding-box}.open>.dropdown-menu{display:block}li.iti__country:hover,li.iti__country[data-active=true]{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__selected-flag.dropdown-toggle:focus-visible{outline:2px solid #005fcc;outline-offset:-2px}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"]
2230
+ }]
2231
+ }],
2232
+ ctorParameters: () => [],
2233
+ propDecorators: {
2234
+ value: [{ type: Input }],
2235
+ preferredCountries: [{ type: Input }],
2236
+ enablePlaceholder: [{ type: Input }],
2237
+ customPlaceholder: [{ type: Input }],
2238
+ numberFormat: [{ type: Input }],
2239
+ cssClass: [{ type: Input }],
2240
+ onlyCountries: [{ type: Input }],
2241
+ enableAutoCountrySelect: [{ type: Input }],
2242
+ searchCountryFlag: [{ type: Input }],
2243
+ searchCountryField: [{ type: Input }],
2244
+ searchCountryPlaceholder: [{ type: Input }],
2245
+ maxLength: [{ type: Input }],
2246
+ selectFirstCountry: [{ type: Input }],
2247
+ selectedCountryISO: [{ type: Input }],
2248
+ phoneValidation: [{ type: Input }],
2249
+ inputId: [{ type: Input }],
2250
+ separateDialCode: [{ type: Input }],
2251
+ excludeCountries: [{ type: Input }],
2252
+ countryChange: [{ type: Output }],
2253
+ countryList: [{
2254
+ type: ViewChild,
2255
+ args: ["countryList"]
2256
+ }],
2257
+ listbox: [{
2258
+ type: i0.ViewChild,
2259
+ args: [i0.forwardRef(() => Listbox), { isSignal: true }]
2260
+ }],
2261
+ options: [{
2262
+ type: i0.ViewChildren,
2263
+ args: [i0.forwardRef(() => Option), { isSignal: true }]
2264
+ }],
2265
+ toggleEl: [{
2266
+ type: i0.ViewChild,
2267
+ args: ["toggleEl", { isSignal: true }]
2268
+ }],
2269
+ flagContainerEl: [{
2270
+ type: i0.ViewChild,
2271
+ args: ["flagContainer", { isSignal: true }]
2272
+ }],
2273
+ searchInputEl: [{
2274
+ type: i0.ViewChild,
2275
+ args: ["searchInput", { isSignal: true }]
2276
+ }],
2277
+ focusableEl: [{
2278
+ type: i0.ViewChild,
2279
+ args: ["focusable", { isSignal: true }]
2280
+ }]
2281
+ }
2282
+ });
2283
+ var NativeElementInjectorDirective = class NativeElementInjectorDirective {
2284
+ constructor() {
2285
+ this.controlDir = inject(NgControl);
2286
+ this.host = inject(ElementRef);
2287
+ }
2288
+ ngOnInit() {
2289
+ if (this.controlDir.control) this.controlDir.control["nativeElement"] = this.host.nativeElement;
2290
+ }
2291
+ static {
2292
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2293
+ minVersion: "12.0.0",
2294
+ version: "22.2.7",
2295
+ ngImport: i0,
2296
+ type: NativeElementInjectorDirective,
2297
+ deps: [],
2298
+ target: i0.ɵɵFactoryTarget.Directive
2299
+ });
2300
+ }
2301
+ static {
2302
+ this.ɵdir = i0.ɵɵngDeclareDirective({
2303
+ minVersion: "14.0.0",
2304
+ version: "22.2.7",
2305
+ type: NativeElementInjectorDirective,
2306
+ isStandalone: true,
2307
+ selector: "[ngModel], [formControl], [formControlName]",
2308
+ ngImport: i0
2309
+ });
2310
+ }
2311
+ };
2312
+ i0.ɵɵngDeclareClassMetadata({
2313
+ minVersion: "12.0.0",
2314
+ version: "22.2.7",
2315
+ ngImport: i0,
2316
+ type: NativeElementInjectorDirective,
2317
+ decorators: [{
2318
+ type: Directive,
2319
+ args: [{ selector: "[ngModel], [formControl], [formControlName]" }]
2320
+ }]
2321
+ });
2322
+ var NgxIntlTelInputModule = class NgxIntlTelInputModule {
2323
+ static {
2324
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2325
+ minVersion: "12.0.0",
2326
+ version: "22.2.7",
2327
+ ngImport: i0,
2328
+ type: NgxIntlTelInputModule,
2329
+ deps: [],
2330
+ target: i0.ɵɵFactoryTarget.NgModule
2331
+ });
2332
+ }
2333
+ static {
2334
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
2335
+ minVersion: "14.0.0",
2336
+ version: "22.2.7",
2337
+ ngImport: i0,
2338
+ type: NgxIntlTelInputModule,
2339
+ imports: [NgxIntlTelInputComponent, NativeElementInjectorDirective],
2340
+ exports: [NgxIntlTelInputComponent, NativeElementInjectorDirective]
2341
+ });
2342
+ }
2343
+ static {
2344
+ this.ɵinj = i0.ɵɵngDeclareInjector({
2345
+ minVersion: "12.0.0",
2346
+ version: "22.2.7",
2347
+ ngImport: i0,
2348
+ type: NgxIntlTelInputModule,
2349
+ imports: [NgxIntlTelInputComponent]
2350
+ });
2351
+ }
2352
+ };
2353
+ i0.ɵɵngDeclareClassMetadata({
2354
+ minVersion: "12.0.0",
2355
+ version: "22.2.7",
2356
+ ngImport: i0,
2357
+ type: NgxIntlTelInputModule,
2358
+ decorators: [{
2359
+ type: NgModule,
2360
+ args: [{
2361
+ imports: [NgxIntlTelInputComponent, NativeElementInjectorDirective],
2362
+ exports: [NgxIntlTelInputComponent, NativeElementInjectorDirective]
2363
+ }]
2364
+ }]
2365
+ });
2366
+ export { CountryISO, NativeElementInjectorDirective, NgxIntlTelInputComponent, NgxIntlTelInputModule, PhoneNumberFormat, SearchCountryField };
645
2367
 
646
- var PhoneNumberFormat;
647
- (function (PhoneNumberFormat) {
648
- PhoneNumberFormat["International"] = "INTERNATIONAL";
649
- PhoneNumberFormat["National"] = "NATIONAL";
650
- })(PhoneNumberFormat || (PhoneNumberFormat = {}));
651
-
652
- /*
653
- "Property 'nativeElement' does not exist on type 'FormControl'".
654
- 'NativeElementInjectorDirective' injects nativeElement to each control,
655
- so we can access it from inside validator for example.
656
- More about this approach and reasons for this:
657
- https://github.com/angular/angular/issues/18025
658
- https://stackoverflow.com/a/54075119/1617590
659
- */
660
- class NativeElementInjectorDirective {
661
- constructor(controlDir, host) {
662
- this.controlDir = controlDir;
663
- this.host = host;
664
- }
665
- ngOnInit() {
666
- if (this.controlDir.control) {
667
- // @ts-ignore
668
- this.controlDir.control['nativeElement'] = this.host.nativeElement;
669
- }
670
- }
671
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NativeElementInjectorDirective, deps: [{ token: i3.NgControl }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
672
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]", ngImport: i0 }); }
673
- }
674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NativeElementInjectorDirective, decorators: [{
675
- type: Directive,
676
- args: [{
677
- // tslint:disable-next-line: directive-selector
678
- selector: '[ngModel], [formControl], [formControlName]',
679
- }]
680
- }], ctorParameters: function () { return [{ type: i3.NgControl }, { type: i0.ElementRef }]; } });
681
-
682
- class NgxIntlTelInputComponent {
683
- constructor(countryCodeData) {
684
- this.countryCodeData = countryCodeData;
685
- this.value = '';
686
- this.preferredCountries = [];
687
- this.enablePlaceholder = true;
688
- this.numberFormat = PhoneNumberFormat.International;
689
- this.cssClass = 'form-control';
690
- this.onlyCountries = [];
691
- this.enableAutoCountrySelect = true;
692
- this.searchCountryFlag = false;
693
- this.searchCountryField = [SearchCountryField.All];
694
- this.searchCountryPlaceholder = 'Search Country';
695
- this.selectFirstCountry = true;
696
- this.phoneValidation = true;
697
- this.inputId = 'phone';
698
- this.separateDialCode = false;
699
- this.excludeCountries = [];
700
- this.countryChange = new EventEmitter();
701
- this.selectedCountry = {
702
- areaCodes: undefined,
703
- dialCode: '',
704
- htmlId: '',
705
- flagClass: '',
706
- iso2: '',
707
- name: '',
708
- placeHolder: '',
709
- priority: 0,
710
- };
711
- this.phoneNumber = '';
712
- this.allCountries = [];
713
- this.preferredCountriesInDropDown = [];
714
- // Has to be 'any' to prevent a need to install @types/google-libphonenumber by the package user...
715
- this.phoneUtil = lpn.PhoneNumberUtil.getInstance();
716
- this.disabled = false;
717
- this.errors = ['Phone number is required.'];
718
- this.countrySearchText = '';
719
- this.onTouched = () => { };
720
- this.propagateChange = (_) => { };
721
- // If this is not set, ngx-bootstrap will try to use the bs3 CSS (which is not what we've embedded) and will
722
- // Add the wrong classes and such
723
- // setTheme('bs4');
724
- }
725
- ngOnInit() {
726
- this.init();
727
- }
728
- ngOnChanges(changes) {
729
- const selectedISO = changes['selectedCountryISO'];
730
- if (this.allCountries &&
731
- selectedISO &&
732
- selectedISO.currentValue !== selectedISO.previousValue) {
733
- this.updateSelectedCountry();
734
- }
735
- if (changes['preferredCountries']) {
736
- this.updatePreferredCountries();
737
- }
738
- this.checkSeparateDialCodeStyle();
739
- }
740
- /*
741
- This is a wrapper method to avoid calling this.ngOnInit() in writeValue().
742
- Ref: http://codelyzer.com/rules/no-life-cycle-call/
743
- */
744
- init() {
745
- this.fetchCountryData();
746
- if (this.excludeCountries.length) {
747
- this.allCountries = this.allCountries.filter((c) => !this.excludeCountries.includes(c.iso2));
748
- }
749
- if (this.preferredCountries.length) {
750
- this.updatePreferredCountries();
751
- }
752
- if (this.onlyCountries.length) {
753
- this.allCountries = this.allCountries.filter((c) => this.onlyCountries.includes(c.iso2));
754
- }
755
- if (this.selectFirstCountry) {
756
- if (this.preferredCountriesInDropDown.length) {
757
- this.setSelectedCountry(this.preferredCountriesInDropDown[0]);
758
- }
759
- else {
760
- this.setSelectedCountry(this.allCountries[0]);
761
- }
762
- }
763
- this.updateSelectedCountry();
764
- this.checkSeparateDialCodeStyle();
765
- }
766
- setSelectedCountry(country) {
767
- this.selectedCountry = country;
768
- this.countryChange.emit(country);
769
- }
770
- /**
771
- * Search country based on country name, iso2, dialCode or all of them.
772
- */
773
- searchCountry() {
774
- if (!this.countrySearchText) {
775
- this.countryList.nativeElement.querySelector('.iti__country-list li').scrollIntoView({
776
- behavior: 'smooth',
777
- block: 'nearest',
778
- inline: 'nearest',
779
- });
780
- return;
781
- }
782
- const countrySearchTextLower = this.countrySearchText.toLowerCase();
783
- // @ts-ignore
784
- const country = this.allCountries.filter(c => {
785
- if (this.searchCountryField.indexOf(SearchCountryField.All) > -1) {
786
- // Search in all fields
787
- if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) {
788
- return c;
789
- }
790
- if (c.name.toLowerCase().startsWith(countrySearchTextLower)) {
791
- return c;
792
- }
793
- if (c.dialCode.startsWith(this.countrySearchText)) {
794
- return c;
795
- }
796
- }
797
- else {
798
- // Or search by specific SearchCountryField(s)
799
- if (this.searchCountryField.indexOf(SearchCountryField.Iso2) > -1) {
800
- if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) {
801
- return c;
802
- }
803
- }
804
- if (this.searchCountryField.indexOf(SearchCountryField.Name) > -1) {
805
- if (c.name.toLowerCase().startsWith(countrySearchTextLower)) {
806
- return c;
807
- }
808
- }
809
- if (this.searchCountryField.indexOf(SearchCountryField.DialCode) > -1) {
810
- if (c.dialCode.startsWith(this.countrySearchText)) {
811
- return c;
812
- }
813
- }
814
- }
815
- });
816
- if (country.length > 0) {
817
- const el = this.countryList.nativeElement.querySelector('#' + country[0].htmlId);
818
- if (el) {
819
- el.scrollIntoView({
820
- behavior: 'smooth',
821
- block: 'nearest',
822
- inline: 'nearest',
823
- });
824
- }
825
- }
826
- this.checkSeparateDialCodeStyle();
827
- }
828
- onPhoneNumberChange() {
829
- let countryCode;
830
- // Handle the case where the user sets the value programatically based on a persisted ChangeData obj.
831
- if (this.phoneNumber && typeof this.phoneNumber === 'object') {
832
- const numberObj = this.phoneNumber;
833
- this.phoneNumber = numberObj.number;
834
- countryCode = numberObj.countryCode;
835
- }
836
- this.value = this.phoneNumber;
837
- countryCode = countryCode || this.selectedCountry.iso2;
838
- // @ts-ignore
839
- const number = this.getParsedNumber(this.phoneNumber, countryCode);
840
- // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)
841
- if (this.enableAutoCountrySelect) {
842
- countryCode =
843
- number && number.getCountryCode()
844
- ? // @ts-ignore
845
- this.getCountryIsoCode(number.getCountryCode(), number)
846
- : this.selectedCountry.iso2;
847
- if (countryCode && countryCode !== this.selectedCountry.iso2) {
848
- const newCountry = this.allCountries
849
- .slice()
850
- .sort((a, b) => {
851
- return a.priority - b.priority;
852
- })
853
- .find(c => c.iso2 === countryCode);
854
- if (newCountry) {
855
- this.selectedCountry = newCountry;
856
- }
857
- }
858
- }
859
- countryCode = countryCode ? countryCode : this.selectedCountry.iso2;
860
- this.checkSeparateDialCodeStyle();
861
- if (!this.value) {
862
- // Reason: avoid https://stackoverflow.com/a/54358133/1617590
863
- // tslint:disable-next-line: no-null-keyword
864
- // @ts-ignore
865
- this.propagateChange(null);
866
- }
867
- else {
868
- const intlNo = number
869
- ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL)
870
- : '';
871
- // parse phoneNumber if separate dial code is needed
872
- if (this.separateDialCode && intlNo) {
873
- this.value = this.removeDialCode(intlNo);
874
- }
875
- this.propagateChange({
876
- number: this.value,
877
- internationalNumber: intlNo,
878
- nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '',
879
- e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '',
880
- countryCode: countryCode.toUpperCase(),
881
- dialCode: '+' + this.selectedCountry.dialCode,
882
- });
883
- }
884
- }
885
- onCountrySelect(country, el) {
886
- this.setSelectedCountry(country);
887
- this.checkSeparateDialCodeStyle();
888
- if (this.phoneNumber && this.phoneNumber.length > 0) {
889
- this.value = this.phoneNumber;
890
- const number = this.getParsedNumber(this.phoneNumber, this.selectedCountry.iso2);
891
- const intlNo = number
892
- ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL)
893
- : '';
894
- // parse phoneNumber if separate dial code is needed
895
- if (this.separateDialCode && intlNo) {
896
- this.value = this.removeDialCode(intlNo);
897
- }
898
- this.propagateChange({
899
- number: this.value,
900
- internationalNumber: intlNo,
901
- nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '',
902
- e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '',
903
- countryCode: this.selectedCountry.iso2.toUpperCase(),
904
- dialCode: '+' + this.selectedCountry.dialCode,
905
- });
906
- }
907
- else {
908
- // Reason: avoid https://stackoverflow.com/a/54358133/1617590
909
- // tslint:disable-next-line: no-null-keyword
910
- // @ts-ignore
911
- this.propagateChange(null);
912
- }
913
- el.focus();
914
- }
915
- onInputKeyPress(event) {
916
- const allowedChars = /[0-9\+\-\(\)\ ]/;
917
- const allowedCtrlChars = /[axcv]/; // Allows copy-pasting
918
- const allowedOtherKeys = [
919
- 'ArrowLeft',
920
- 'ArrowUp',
921
- 'ArrowRight',
922
- 'ArrowDown',
923
- 'Home',
924
- 'End',
925
- 'Insert',
926
- 'Delete',
927
- 'Backspace',
928
- ];
929
- if (!allowedChars.test(event.key) &&
930
- !(event.ctrlKey && allowedCtrlChars.test(event.key)) &&
931
- !allowedOtherKeys.includes(event.key)) {
932
- event.preventDefault();
933
- }
934
- }
935
- registerOnChange(fn) {
936
- this.propagateChange = fn;
937
- }
938
- registerOnTouched(fn) {
939
- this.onTouched = fn;
940
- }
941
- setDisabledState(isDisabled) {
942
- this.disabled = isDisabled;
943
- }
944
- writeValue(obj) {
945
- if (obj === undefined) {
946
- this.init();
947
- }
948
- this.phoneNumber = obj;
949
- setTimeout(() => {
950
- this.onPhoneNumberChange();
951
- }, 1);
952
- }
953
- resolvePlaceholder() {
954
- let placeholder = '';
955
- if (this.customPlaceholder) {
956
- placeholder = this.customPlaceholder;
957
- }
958
- else if (this.selectedCountry.placeHolder) {
959
- placeholder = this.selectedCountry.placeHolder;
960
- if (this.separateDialCode) {
961
- placeholder = this.removeDialCode(placeholder);
962
- }
963
- }
964
- return placeholder;
965
- }
966
- /* --------------------------------- Helpers -------------------------------- */
967
- /**
968
- * Returns parse PhoneNumber object.
969
- * @param phoneNumber string
970
- * @param countryCode string
971
- */
972
- getParsedNumber(phoneNumber, countryCode) {
973
- let number;
974
- try {
975
- number = this.phoneUtil.parse(phoneNumber, countryCode.toUpperCase());
976
- }
977
- catch (e) { }
978
- // @ts-ignore
979
- return number;
980
- }
981
- /**
982
- * Adjusts input alignment based on the dial code presentation style.
983
- */
984
- checkSeparateDialCodeStyle() {
985
- if (this.separateDialCode && this.selectedCountry) {
986
- const cntryCd = this.selectedCountry.dialCode;
987
- this.separateDialCodeClass = 'separate-dial-code iti-sdc-' + (cntryCd.length + 1);
988
- }
989
- else {
990
- this.separateDialCodeClass = '';
991
- }
992
- }
993
- /**
994
- * Cleans dialcode from phone number string.
995
- * @param phoneNumber string
996
- */
997
- removeDialCode(phoneNumber) {
998
- const number = this.getParsedNumber(phoneNumber, this.selectedCountry.iso2);
999
- phoneNumber = this.phoneUtil.format(number, lpn.PhoneNumberFormat[this.numberFormat]);
1000
- if (this.selectedCountry.iso2 === 'ua') {
1001
- phoneNumber = '+380 31 123 4567';
1002
- }
1003
- if (phoneNumber.startsWith('+') && this.separateDialCode) {
1004
- phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);
1005
- }
1006
- return phoneNumber;
1007
- }
1008
- /**
1009
- * Sifts through all countries and returns iso code of the primary country
1010
- * based on the number provided.
1011
- * @param countryCode country code in number format
1012
- * @param number PhoneNumber object
1013
- */
1014
- getCountryIsoCode(countryCode, number) {
1015
- // Will use this to match area code from the first numbers
1016
- // @ts-ignore
1017
- const rawNumber = number['values_']['2'].toString();
1018
- // List of all countries with countryCode (can be more than one. e.x. US, CA, DO, PR all have +1 countryCode)
1019
- const countries = this.allCountries.filter(c => c.dialCode === countryCode.toString());
1020
- // Main country is the country, which has no areaCodes specified in country-code.ts file.
1021
- const mainCountry = countries.find(c => c.areaCodes === undefined);
1022
- // Secondary countries are all countries, which have areaCodes specified in country-code.ts file.
1023
- const secondaryCountries = countries.filter(c => c.areaCodes !== undefined);
1024
- let matchedCountry = mainCountry ? mainCountry.iso2 : undefined;
1025
- /*
1026
- Iterate over each secondary country and check if nationalNumber starts with any of areaCodes available.
1027
- If no matches found, fallback to the main country.
1028
- */
1029
- secondaryCountries.forEach(country => {
1030
- // @ts-ignore
1031
- country.areaCodes.forEach(areaCode => {
1032
- if (rawNumber.startsWith(areaCode)) {
1033
- matchedCountry = country.iso2;
1034
- }
1035
- });
1036
- });
1037
- return matchedCountry;
1038
- }
1039
- /**
1040
- * Gets formatted example phone number from phoneUtil.
1041
- * @param countryCode string
1042
- */
1043
- getPhoneNumberPlaceHolder(countryCode) {
1044
- try {
1045
- return this.phoneUtil.format(this.phoneUtil.getExampleNumber(countryCode), lpn.PhoneNumberFormat[this.numberFormat]);
1046
- }
1047
- catch (e) {
1048
- // @ts-ignore
1049
- return e;
1050
- }
1051
- }
1052
- /**
1053
- * Clearing the list to avoid duplicates (https://github.com/webcat12345/ngx-intl-tel-input/issues/248)
1054
- */
1055
- fetchCountryData() {
1056
- this.allCountries = [];
1057
- this.countryCodeData.allCountries.forEach((c) => {
1058
- const country = {
1059
- name: c[0].toString(),
1060
- iso2: c[1],
1061
- dialCode: c[2].toString(),
1062
- priority: +c[3] || 0,
1063
- areaCodes: c[4] || undefined,
1064
- htmlId: `iti-0__item-${c[1].toString()}`,
1065
- flagClass: `iti__${c[1].toString().toLocaleLowerCase()}`,
1066
- placeHolder: '',
1067
- };
1068
- if (this.enablePlaceholder) {
1069
- country.placeHolder = this.getPhoneNumberPlaceHolder(country.iso2.toUpperCase());
1070
- if (country.iso2 === 'ua') {
1071
- country.placeHolder = '+380 31 123 4567';
1072
- }
1073
- }
1074
- this.allCountries.push(country);
1075
- });
1076
- }
1077
- /**
1078
- * Populates preferredCountriesInDropDown with prefferred countries.
1079
- */
1080
- updatePreferredCountries() {
1081
- if (this.preferredCountries.length) {
1082
- this.preferredCountriesInDropDown = this.allCountries.filter((c) => {
1083
- return this.preferredCountries.includes(c.iso2) && !this.excludeCountries.includes(c.iso2);
1084
- });
1085
- }
1086
- }
1087
- /**
1088
- * Updates selectedCountry.
1089
- */
1090
- updateSelectedCountry() {
1091
- if (this.selectedCountryISO && !this.excludeCountries.includes(this.selectedCountryISO)) {
1092
- // @ts-ignore
1093
- this.selectedCountry = this.allCountries.find((c) => {
1094
- return c.iso2.toLowerCase() === this.selectedCountryISO.toLowerCase();
1095
- });
1096
- if (this.selectedCountry) {
1097
- if (this.phoneNumber) {
1098
- this.onPhoneNumberChange();
1099
- }
1100
- else {
1101
- // Reason: avoid https://stackoverflow.com/a/54358133/1617590
1102
- // tslint:disable-next-line: no-null-keyword
1103
- // @ts-ignore
1104
- this.propagateChange(null);
1105
- }
1106
- }
1107
- }
1108
- }
1109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputComponent, deps: [{ token: CountryCode }], target: i0.ɵɵFactoryTarget.Component }); }
1110
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NgxIntlTelInputComponent, selector: "ngx-intl-tel-input", inputs: { value: "value", preferredCountries: "preferredCountries", enablePlaceholder: "enablePlaceholder", customPlaceholder: "customPlaceholder", numberFormat: "numberFormat", cssClass: "cssClass", onlyCountries: "onlyCountries", enableAutoCountrySelect: "enableAutoCountrySelect", searchCountryFlag: "searchCountryFlag", searchCountryField: "searchCountryField", searchCountryPlaceholder: "searchCountryPlaceholder", maxLength: "maxLength", selectFirstCountry: "selectFirstCountry", selectedCountryISO: "selectedCountryISO", phoneValidation: "phoneValidation", inputId: "inputId", separateDialCode: "separateDialCode", excludeCountries: "excludeCountries" }, outputs: { countryChange: "countryChange" }, providers: [
1111
- CountryCode,
1112
- {
1113
- provide: NG_VALUE_ACCESSOR,
1114
- // tslint:disable-next-line:no-forward-ref
1115
- useExisting: forwardRef(() => NgxIntlTelInputComponent),
1116
- multi: true,
1117
- },
1118
- {
1119
- provide: NG_VALIDATORS,
1120
- useValue: phoneNumberValidator,
1121
- multi: true,
1122
- },
1123
- ], viewQueries: [{ propertyName: "countryList", first: true, predicate: ["countryList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n class=\"iti__flag-container\"\n dropdown\n [ngClass]=\"{ disabled: disabled }\"\n [isDisabled]=\"disabled\"\n >\n <div class=\"iti__selected-flag dropdown-toggle\" dropdownToggle>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n <div *ngIf=\"separateDialCode\" class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n <div class=\"iti__arrow\"></div>\n </div>\n <div *dropdownMenu class=\"dropdown-menu iti__dropdown-content\">\n <div class=\"search-container\" *ngIf=\"searchCountryFlag && searchCountryField\">\n <input\n id=\"country-search-box\"\n [(ngModel)]=\"countrySearchText\"\n (keyup)=\"searchCountry()\"\n (click)=\"$event.stopPropagation()\"\n [placeholder]=\"searchCountryPlaceholder\"\n autofocus\n />\n </div>\n <ul class=\"iti__country-list\" #countryList>\n <li\n class=\"iti__country iti__preferred\"\n *ngFor=\"let country of preferredCountriesInDropDown\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId + '-preferred'\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n <li class=\"iti__divider\" *ngIf=\"preferredCountriesInDropDown?.length\"></li>\n <li\n class=\"iti__country iti__standard\"\n *ngFor=\"let country of allCountries\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n </ul>\n </div>\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n", styles: [".caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \\\t;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;inset:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \\\t;content:\"\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}\n", "li.iti__country:hover{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:-moz-fit-content;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }] }); }
1124
- }
1125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputComponent, decorators: [{
1126
- type: Component,
1127
- args: [{ selector: 'ngx-intl-tel-input', providers: [
1128
- CountryCode,
1129
- {
1130
- provide: NG_VALUE_ACCESSOR,
1131
- // tslint:disable-next-line:no-forward-ref
1132
- useExisting: forwardRef(() => NgxIntlTelInputComponent),
1133
- multi: true,
1134
- },
1135
- {
1136
- provide: NG_VALIDATORS,
1137
- useValue: phoneNumberValidator,
1138
- multi: true,
1139
- },
1140
- ], template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n class=\"iti__flag-container\"\n dropdown\n [ngClass]=\"{ disabled: disabled }\"\n [isDisabled]=\"disabled\"\n >\n <div class=\"iti__selected-flag dropdown-toggle\" dropdownToggle>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n <div *ngIf=\"separateDialCode\" class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n <div class=\"iti__arrow\"></div>\n </div>\n <div *dropdownMenu class=\"dropdown-menu iti__dropdown-content\">\n <div class=\"search-container\" *ngIf=\"searchCountryFlag && searchCountryField\">\n <input\n id=\"country-search-box\"\n [(ngModel)]=\"countrySearchText\"\n (keyup)=\"searchCountry()\"\n (click)=\"$event.stopPropagation()\"\n [placeholder]=\"searchCountryPlaceholder\"\n autofocus\n />\n </div>\n <ul class=\"iti__country-list\" #countryList>\n <li\n class=\"iti__country iti__preferred\"\n *ngFor=\"let country of preferredCountriesInDropDown\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId + '-preferred'\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n <li class=\"iti__divider\" *ngIf=\"preferredCountriesInDropDown?.length\"></li>\n <li\n class=\"iti__country iti__standard\"\n *ngFor=\"let country of allCountries\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n </ul>\n </div>\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n", styles: [".caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \\\t;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#337ab7}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;inset:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \\\t;content:\"\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}\n", "li.iti__country:hover{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:-moz-fit-content;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"] }]
1141
- }], ctorParameters: function () { return [{ type: CountryCode }]; }, propDecorators: { value: [{
1142
- type: Input
1143
- }], preferredCountries: [{
1144
- type: Input
1145
- }], enablePlaceholder: [{
1146
- type: Input
1147
- }], customPlaceholder: [{
1148
- type: Input
1149
- }], numberFormat: [{
1150
- type: Input
1151
- }], cssClass: [{
1152
- type: Input
1153
- }], onlyCountries: [{
1154
- type: Input
1155
- }], enableAutoCountrySelect: [{
1156
- type: Input
1157
- }], searchCountryFlag: [{
1158
- type: Input
1159
- }], searchCountryField: [{
1160
- type: Input
1161
- }], searchCountryPlaceholder: [{
1162
- type: Input
1163
- }], maxLength: [{
1164
- type: Input
1165
- }], selectFirstCountry: [{
1166
- type: Input
1167
- }], selectedCountryISO: [{
1168
- type: Input
1169
- }], phoneValidation: [{
1170
- type: Input
1171
- }], inputId: [{
1172
- type: Input
1173
- }], separateDialCode: [{
1174
- type: Input
1175
- }], excludeCountries: [{
1176
- type: Input
1177
- }], countryChange: [{
1178
- type: Output
1179
- }], countryList: [{
1180
- type: ViewChild,
1181
- args: ['countryList']
1182
- }] } });
1183
-
1184
- const dropdownModuleForRoot = BsDropdownModule.forRoot();
1185
- class NgxIntlTelInputModule {
1186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1187
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputModule, declarations: [NgxIntlTelInputComponent, NativeElementInjectorDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, i4.BsDropdownModule], exports: [NgxIntlTelInputComponent, NativeElementInjectorDirective] }); }
1188
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputModule, imports: [CommonModule, FormsModule, ReactiveFormsModule, dropdownModuleForRoot] }); }
1189
- }
1190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NgxIntlTelInputModule, decorators: [{
1191
- type: NgModule,
1192
- args: [{
1193
- declarations: [NgxIntlTelInputComponent, NativeElementInjectorDirective],
1194
- imports: [CommonModule, FormsModule, ReactiveFormsModule, dropdownModuleForRoot],
1195
- exports: [NgxIntlTelInputComponent, NativeElementInjectorDirective],
1196
- }]
1197
- }] });
1198
-
1199
- /*
1200
- * Public API Surface of ngx-intl-tel-input
1201
- */
1202
-
1203
- /**
1204
- * Generated bundle index. Do not edit.
1205
- */
1206
-
1207
- export { CountryISO, NativeElementInjectorDirective, NgxIntlTelInputComponent, NgxIntlTelInputModule, PhoneNumberFormat, SearchCountryField, dropdownModuleForRoot };
1208
- //# sourceMappingURL=moddi3-ngx-intl-tel-input.mjs.map
2368
+ //# sourceMappingURL=moddi3-ngx-intl-tel-input.mjs.map