intl-tel-input 25.10.9 → 25.10.11

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.
@@ -1,32 +1,45 @@
1
- import { mergeModels as S, useModel as E, ref as L, onMounted as M, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as $, vModelText as O } from "vue";
2
- const j = [
1
+ import { mergeModels as A, useModel as E, ref as N, onMounted as M, watch as B, onUnmounted as R, withDirectives as F, createElementBlock as z, openBlock as V, mergeProps as $, vModelText as O } from "vue";
2
+ const U = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
6
- "93"
6
+ "93",
7
+ 0,
8
+ null,
9
+ "0"
7
10
  ],
8
11
  [
9
12
  "ax",
10
13
  // Åland Islands
11
14
  "358",
12
- 1
15
+ 1,
16
+ ["18", "4"],
17
+ // (4 is a mobile range shared with FI)
18
+ "0"
13
19
  ],
14
20
  [
15
21
  "al",
16
22
  // Albania
17
- "355"
23
+ "355",
24
+ 0,
25
+ null,
26
+ "0"
18
27
  ],
19
28
  [
20
29
  "dz",
21
30
  // Algeria
22
- "213"
31
+ "213",
32
+ 0,
33
+ null,
34
+ "0"
23
35
  ],
24
36
  [
25
37
  "as",
26
38
  // American Samoa
27
39
  "1",
28
40
  5,
29
- ["684"]
41
+ ["684"],
42
+ "1"
30
43
  ],
31
44
  [
32
45
  "ad",
@@ -43,24 +56,32 @@ const j = [
43
56
  // Anguilla
44
57
  "1",
45
58
  6,
46
- ["264"]
59
+ ["264"],
60
+ "1"
47
61
  ],
48
62
  [
49
63
  "ag",
50
64
  // Antigua and Barbuda
51
65
  "1",
52
66
  7,
53
- ["268"]
67
+ ["268"],
68
+ "1"
54
69
  ],
55
70
  [
56
71
  "ar",
57
72
  // Argentina
58
- "54"
73
+ "54",
74
+ 0,
75
+ null,
76
+ "0"
59
77
  ],
60
78
  [
61
79
  "am",
62
80
  // Armenia
63
- "374"
81
+ "374",
82
+ 0,
83
+ null,
84
+ "0"
64
85
  ],
65
86
  [
66
87
  "aw",
@@ -77,25 +98,33 @@ const j = [
77
98
  // Australia
78
99
  "61",
79
100
  0,
80
- null,
101
+ ["4"],
102
+ // (mobile range shared with CX and CC)
81
103
  "0"
82
104
  ],
83
105
  [
84
106
  "at",
85
107
  // Austria
86
- "43"
108
+ "43",
109
+ 0,
110
+ null,
111
+ "0"
87
112
  ],
88
113
  [
89
114
  "az",
90
115
  // Azerbaijan
91
- "994"
116
+ "994",
117
+ 0,
118
+ null,
119
+ "0"
92
120
  ],
93
121
  [
94
122
  "bs",
95
123
  // Bahamas
96
124
  "1",
97
125
  8,
98
- ["242"]
126
+ ["242"],
127
+ "1"
99
128
  ],
100
129
  [
101
130
  "bh",
@@ -105,24 +134,34 @@ const j = [
105
134
  [
106
135
  "bd",
107
136
  // Bangladesh
108
- "880"
137
+ "880",
138
+ 0,
139
+ null,
140
+ "0"
109
141
  ],
110
142
  [
111
143
  "bb",
112
144
  // Barbados
113
145
  "1",
114
146
  9,
115
- ["246"]
147
+ ["246"],
148
+ "1"
116
149
  ],
117
150
  [
118
151
  "by",
119
152
  // Belarus
120
- "375"
153
+ "375",
154
+ 0,
155
+ null,
156
+ "8"
121
157
  ],
122
158
  [
123
159
  "be",
124
160
  // Belgium
125
- "32"
161
+ "32",
162
+ 0,
163
+ null,
164
+ "0"
126
165
  ],
127
166
  [
128
167
  "bz",
@@ -139,7 +178,8 @@ const j = [
139
178
  // Bermuda
140
179
  "1",
141
180
  10,
142
- ["441"]
181
+ ["441"],
182
+ "1"
143
183
  ],
144
184
  [
145
185
  "bt",
@@ -149,12 +189,18 @@ const j = [
149
189
  [
150
190
  "bo",
151
191
  // Bolivia
152
- "591"
192
+ "591",
193
+ 0,
194
+ null,
195
+ "0"
153
196
  ],
154
197
  [
155
198
  "ba",
156
199
  // Bosnia and Herzegovina
157
- "387"
200
+ "387",
201
+ 0,
202
+ null,
203
+ "0"
158
204
  ],
159
205
  [
160
206
  "bw",
@@ -164,7 +210,10 @@ const j = [
164
210
  [
165
211
  "br",
166
212
  // Brazil
167
- "55"
213
+ "55",
214
+ 0,
215
+ null,
216
+ "0"
168
217
  ],
169
218
  [
170
219
  "io",
@@ -176,7 +225,8 @@ const j = [
176
225
  // British Virgin Islands
177
226
  "1",
178
227
  11,
179
- ["284"]
228
+ ["284"],
229
+ "1"
180
230
  ],
181
231
  [
182
232
  "bn",
@@ -186,7 +236,10 @@ const j = [
186
236
  [
187
237
  "bg",
188
238
  // Bulgaria
189
- "359"
239
+ "359",
240
+ 0,
241
+ null,
242
+ "0"
190
243
  ],
191
244
  [
192
245
  "bf",
@@ -201,7 +254,10 @@ const j = [
201
254
  [
202
255
  "kh",
203
256
  // Cambodia
204
- "855"
257
+ "855",
258
+ 0,
259
+ null,
260
+ "0"
205
261
  ],
206
262
  [
207
263
  "cm",
@@ -213,7 +269,8 @@ const j = [
213
269
  // Canada
214
270
  "1",
215
271
  1,
216
- ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905"]
272
+ ["204", "226", "236", "249", "250", "257", "263", "289", "306", "343", "354", "365", "367", "368", "382", "403", "416", "418", "428", "431", "437", "438", "450", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905", "942"],
273
+ "1"
217
274
  ],
218
275
  [
219
276
  "cv",
@@ -232,7 +289,8 @@ const j = [
232
289
  // Cayman Islands
233
290
  "1",
234
291
  12,
235
- ["345"]
292
+ ["345"],
293
+ "1"
236
294
  ],
237
295
  [
238
296
  "cf",
@@ -252,14 +310,18 @@ const j = [
252
310
  [
253
311
  "cn",
254
312
  // China
255
- "86"
313
+ "86",
314
+ 0,
315
+ null,
316
+ "0"
256
317
  ],
257
318
  [
258
319
  "cx",
259
320
  // Christmas Island
260
321
  "61",
261
322
  2,
262
- ["89164"],
323
+ ["4", "89164"],
324
+ // (4 is a mobile range shared with AU and CC)
263
325
  "0"
264
326
  ],
265
327
  [
@@ -267,13 +329,17 @@ const j = [
267
329
  // Cocos (Keeling) Islands
268
330
  "61",
269
331
  1,
270
- ["89162"],
332
+ ["4", "89162"],
333
+ // (4 is a mobile range shared with AU and CX)
271
334
  "0"
272
335
  ],
273
336
  [
274
337
  "co",
275
338
  // Colombia
276
- "57"
339
+ "57",
340
+ 0,
341
+ null,
342
+ "0"
277
343
  ],
278
344
  [
279
345
  "km",
@@ -288,7 +354,10 @@ const j = [
288
354
  [
289
355
  "cd",
290
356
  // Congo (Kinshasa)
291
- "243"
357
+ "243",
358
+ 0,
359
+ null,
360
+ "0"
292
361
  ],
293
362
  [
294
363
  "ck",
@@ -308,12 +377,18 @@ const j = [
308
377
  [
309
378
  "hr",
310
379
  // Croatia
311
- "385"
380
+ "385",
381
+ 0,
382
+ null,
383
+ "0"
312
384
  ],
313
385
  [
314
386
  "cu",
315
387
  // Cuba
316
- "53"
388
+ "53",
389
+ 0,
390
+ null,
391
+ "0"
317
392
  ],
318
393
  [
319
394
  "cw",
@@ -346,24 +421,32 @@ const j = [
346
421
  // Dominica
347
422
  "1",
348
423
  13,
349
- ["767"]
424
+ ["767"],
425
+ "1"
350
426
  ],
351
427
  [
352
428
  "do",
353
429
  // Dominican Republic
354
430
  "1",
355
431
  2,
356
- ["809", "829", "849"]
432
+ ["809", "829", "849"],
433
+ "1"
357
434
  ],
358
435
  [
359
436
  "ec",
360
437
  // Ecuador
361
- "593"
438
+ "593",
439
+ 0,
440
+ null,
441
+ "0"
362
442
  ],
363
443
  [
364
444
  "eg",
365
445
  // Egypt
366
- "20"
446
+ "20",
447
+ 0,
448
+ null,
449
+ "0"
367
450
  ],
368
451
  [
369
452
  "sv",
@@ -378,7 +461,10 @@ const j = [
378
461
  [
379
462
  "er",
380
463
  // Eritrea
381
- "291"
464
+ "291",
465
+ 0,
466
+ null,
467
+ "0"
382
468
  ],
383
469
  [
384
470
  "ee",
@@ -393,7 +479,10 @@ const j = [
393
479
  [
394
480
  "et",
395
481
  // Ethiopia
396
- "251"
482
+ "251",
483
+ 0,
484
+ null,
485
+ "0"
397
486
  ],
398
487
  [
399
488
  "fk",
@@ -414,17 +503,26 @@ const j = [
414
503
  "fi",
415
504
  // Finland
416
505
  "358",
417
- 0
506
+ 0,
507
+ ["4"],
508
+ // (mobile range shared with AX)
509
+ "0"
418
510
  ],
419
511
  [
420
512
  "fr",
421
513
  // France
422
- "33"
514
+ "33",
515
+ 0,
516
+ null,
517
+ "0"
423
518
  ],
424
519
  [
425
520
  "gf",
426
521
  // French Guiana
427
- "594"
522
+ "594",
523
+ 0,
524
+ null,
525
+ "0"
428
526
  ],
429
527
  [
430
528
  "pf",
@@ -444,17 +542,26 @@ const j = [
444
542
  [
445
543
  "ge",
446
544
  // Georgia
447
- "995"
545
+ "995",
546
+ 0,
547
+ null,
548
+ "0"
448
549
  ],
449
550
  [
450
551
  "de",
451
552
  // Germany
452
- "49"
553
+ "49",
554
+ 0,
555
+ null,
556
+ "0"
453
557
  ],
454
558
  [
455
559
  "gh",
456
560
  // Ghana
457
- "233"
561
+ "233",
562
+ 0,
563
+ null,
564
+ "0"
458
565
  ],
459
566
  [
460
567
  "gi",
@@ -476,20 +583,24 @@ const j = [
476
583
  // Grenada
477
584
  "1",
478
585
  14,
479
- ["473"]
586
+ ["473"],
587
+ "1"
480
588
  ],
481
589
  [
482
590
  "gp",
483
591
  // Guadeloupe
484
592
  "590",
485
- 0
593
+ 0,
594
+ null,
595
+ "0"
486
596
  ],
487
597
  [
488
598
  "gu",
489
599
  // Guam
490
600
  "1",
491
601
  15,
492
- ["671"]
602
+ ["671"],
603
+ "1"
493
604
  ],
494
605
  [
495
606
  "gt",
@@ -537,7 +648,10 @@ const j = [
537
648
  [
538
649
  "hu",
539
650
  // Hungary
540
- "36"
651
+ "36",
652
+ 0,
653
+ null,
654
+ "06"
541
655
  ],
542
656
  [
543
657
  "is",
@@ -547,58 +661,82 @@ const j = [
547
661
  [
548
662
  "in",
549
663
  // India
550
- "91"
664
+ "91",
665
+ 0,
666
+ null,
667
+ "0"
551
668
  ],
552
669
  [
553
670
  "id",
554
671
  // Indonesia
555
- "62"
672
+ "62",
673
+ 0,
674
+ null,
675
+ "0"
556
676
  ],
557
677
  [
558
678
  "ir",
559
679
  // Iran
560
- "98"
680
+ "98",
681
+ 0,
682
+ null,
683
+ "0"
561
684
  ],
562
685
  [
563
686
  "iq",
564
687
  // Iraq
565
- "964"
688
+ "964",
689
+ 0,
690
+ null,
691
+ "0"
566
692
  ],
567
693
  [
568
694
  "ie",
569
695
  // Ireland
570
- "353"
696
+ "353",
697
+ 0,
698
+ null,
699
+ "0"
571
700
  ],
572
701
  [
573
702
  "im",
574
703
  // Isle of Man
575
704
  "44",
576
705
  2,
577
- ["1624", "74576", "7524", "7924", "7624"],
706
+ ["1624", "74576", "7524", "7624", "7924"],
578
707
  "0"
579
708
  ],
580
709
  [
581
710
  "il",
582
711
  // Israel
583
- "972"
712
+ "972",
713
+ 0,
714
+ null,
715
+ "0"
584
716
  ],
585
717
  [
586
718
  "it",
587
719
  // Italy
588
720
  "39",
589
- 0
721
+ 0,
722
+ ["3"]
723
+ // (mobile range shared with VA)
590
724
  ],
591
725
  [
592
726
  "jm",
593
727
  // Jamaica
594
728
  "1",
595
729
  4,
596
- ["876", "658"]
730
+ ["658", "876"],
731
+ "1"
597
732
  ],
598
733
  [
599
734
  "jp",
600
735
  // Japan
601
- "81"
736
+ "81",
737
+ 0,
738
+ null,
739
+ "0"
602
740
  ],
603
741
  [
604
742
  "je",
@@ -611,7 +749,10 @@ const j = [
611
749
  [
612
750
  "jo",
613
751
  // Jordan
614
- "962"
752
+ "962",
753
+ 0,
754
+ null,
755
+ "0"
615
756
  ],
616
757
  [
617
758
  "kz",
@@ -619,22 +760,32 @@ const j = [
619
760
  "7",
620
761
  1,
621
762
  ["33", "7"],
763
+ // (33 is shared with RU)
622
764
  "8"
623
765
  ],
624
766
  [
625
767
  "ke",
626
768
  // Kenya
627
- "254"
769
+ "254",
770
+ 0,
771
+ null,
772
+ "0"
628
773
  ],
629
774
  [
630
775
  "ki",
631
776
  // Kiribati
632
- "686"
777
+ "686",
778
+ 0,
779
+ null,
780
+ "0"
633
781
  ],
634
782
  [
635
783
  "xk",
636
784
  // Kosovo
637
- "383"
785
+ "383",
786
+ 0,
787
+ null,
788
+ "0"
638
789
  ],
639
790
  [
640
791
  "kw",
@@ -644,12 +795,18 @@ const j = [
644
795
  [
645
796
  "kg",
646
797
  // Kyrgyzstan
647
- "996"
798
+ "996",
799
+ 0,
800
+ null,
801
+ "0"
648
802
  ],
649
803
  [
650
804
  "la",
651
805
  // Laos
652
- "856"
806
+ "856",
807
+ 0,
808
+ null,
809
+ "0"
653
810
  ],
654
811
  [
655
812
  "lv",
@@ -659,7 +816,10 @@ const j = [
659
816
  [
660
817
  "lb",
661
818
  // Lebanon
662
- "961"
819
+ "961",
820
+ 0,
821
+ null,
822
+ "0"
663
823
  ],
664
824
  [
665
825
  "ls",
@@ -669,22 +829,34 @@ const j = [
669
829
  [
670
830
  "lr",
671
831
  // Liberia
672
- "231"
832
+ "231",
833
+ 0,
834
+ null,
835
+ "0"
673
836
  ],
674
837
  [
675
838
  "ly",
676
839
  // Libya
677
- "218"
840
+ "218",
841
+ 0,
842
+ null,
843
+ "0"
678
844
  ],
679
845
  [
680
846
  "li",
681
847
  // Liechtenstein
682
- "423"
848
+ "423",
849
+ 0,
850
+ null,
851
+ "0"
683
852
  ],
684
853
  [
685
854
  "lt",
686
855
  // Lithuania
687
- "370"
856
+ "370",
857
+ 0,
858
+ null,
859
+ "0"
688
860
  ],
689
861
  [
690
862
  "lu",
@@ -699,17 +871,26 @@ const j = [
699
871
  [
700
872
  "mg",
701
873
  // Madagascar
702
- "261"
874
+ "261",
875
+ 0,
876
+ null,
877
+ "0"
703
878
  ],
704
879
  [
705
880
  "mw",
706
881
  // Malawi
707
- "265"
882
+ "265",
883
+ 0,
884
+ null,
885
+ "0"
708
886
  ],
709
887
  [
710
888
  "my",
711
889
  // Malaysia
712
- "60"
890
+ "60",
891
+ 0,
892
+ null,
893
+ "0"
713
894
  ],
714
895
  [
715
896
  "mv",
@@ -729,12 +910,18 @@ const j = [
729
910
  [
730
911
  "mh",
731
912
  // Marshall Islands
732
- "692"
913
+ "692",
914
+ 0,
915
+ null,
916
+ "1"
733
917
  ],
734
918
  [
735
919
  "mq",
736
920
  // Martinique
737
- "596"
921
+ "596",
922
+ 0,
923
+ null,
924
+ "0"
738
925
  ],
739
926
  [
740
927
  "mr",
@@ -767,36 +954,50 @@ const j = [
767
954
  [
768
955
  "md",
769
956
  // Moldova
770
- "373"
957
+ "373",
958
+ 0,
959
+ null,
960
+ "0"
771
961
  ],
772
962
  [
773
963
  "mc",
774
964
  // Monaco
775
- "377"
965
+ "377",
966
+ 0,
967
+ null,
968
+ "0"
776
969
  ],
777
970
  [
778
971
  "mn",
779
972
  // Mongolia
780
- "976"
973
+ "976",
974
+ 0,
975
+ null,
976
+ "0"
781
977
  ],
782
978
  [
783
979
  "me",
784
980
  // Montenegro
785
- "382"
981
+ "382",
982
+ 0,
983
+ null,
984
+ "0"
786
985
  ],
787
986
  [
788
987
  "ms",
789
988
  // Montserrat
790
989
  "1",
791
990
  16,
792
- ["664"]
991
+ ["664"],
992
+ "1"
793
993
  ],
794
994
  [
795
995
  "ma",
796
996
  // Morocco
797
997
  "212",
798
998
  0,
799
- null,
999
+ ["6", "7"],
1000
+ // (mobile ranges shared with EH)
800
1001
  "0"
801
1002
  ],
802
1003
  [
@@ -807,12 +1008,18 @@ const j = [
807
1008
  [
808
1009
  "mm",
809
1010
  // Myanmar (Burma)
810
- "95"
1011
+ "95",
1012
+ 0,
1013
+ null,
1014
+ "0"
811
1015
  ],
812
1016
  [
813
1017
  "na",
814
1018
  // Namibia
815
- "264"
1019
+ "264",
1020
+ 0,
1021
+ null,
1022
+ "0"
816
1023
  ],
817
1024
  [
818
1025
  "nr",
@@ -822,12 +1029,18 @@ const j = [
822
1029
  [
823
1030
  "np",
824
1031
  // Nepal
825
- "977"
1032
+ "977",
1033
+ 0,
1034
+ null,
1035
+ "0"
826
1036
  ],
827
1037
  [
828
1038
  "nl",
829
1039
  // Netherlands
830
- "31"
1040
+ "31",
1041
+ 0,
1042
+ null,
1043
+ "0"
831
1044
  ],
832
1045
  [
833
1046
  "nc",
@@ -837,7 +1050,10 @@ const j = [
837
1050
  [
838
1051
  "nz",
839
1052
  // New Zealand
840
- "64"
1053
+ "64",
1054
+ 0,
1055
+ null,
1056
+ "0"
841
1057
  ],
842
1058
  [
843
1059
  "ni",
@@ -852,7 +1068,10 @@ const j = [
852
1068
  [
853
1069
  "ng",
854
1070
  // Nigeria
855
- "234"
1071
+ "234",
1072
+ 0,
1073
+ null,
1074
+ "0"
856
1075
  ],
857
1076
  [
858
1077
  "nu",
@@ -867,25 +1086,34 @@ const j = [
867
1086
  [
868
1087
  "kp",
869
1088
  // North Korea
870
- "850"
1089
+ "850",
1090
+ 0,
1091
+ null,
1092
+ "0"
871
1093
  ],
872
1094
  [
873
1095
  "mk",
874
1096
  // North Macedonia
875
- "389"
1097
+ "389",
1098
+ 0,
1099
+ null,
1100
+ "0"
876
1101
  ],
877
1102
  [
878
1103
  "mp",
879
1104
  // Northern Mariana Islands
880
1105
  "1",
881
1106
  17,
882
- ["670"]
1107
+ ["670"],
1108
+ "1"
883
1109
  ],
884
1110
  [
885
1111
  "no",
886
1112
  // Norway
887
1113
  "47",
888
- 0
1114
+ 0,
1115
+ ["4", "9"]
1116
+ // (mobile ranges shared with SJ)
889
1117
  ],
890
1118
  [
891
1119
  "om",
@@ -895,7 +1123,10 @@ const j = [
895
1123
  [
896
1124
  "pk",
897
1125
  // Pakistan
898
- "92"
1126
+ "92",
1127
+ 0,
1128
+ null,
1129
+ "0"
899
1130
  ],
900
1131
  [
901
1132
  "pw",
@@ -905,7 +1136,10 @@ const j = [
905
1136
  [
906
1137
  "ps",
907
1138
  // Palestinian Territories
908
- "970"
1139
+ "970",
1140
+ 0,
1141
+ null,
1142
+ "0"
909
1143
  ],
910
1144
  [
911
1145
  "pa",
@@ -920,17 +1154,26 @@ const j = [
920
1154
  [
921
1155
  "py",
922
1156
  // Paraguay
923
- "595"
1157
+ "595",
1158
+ 0,
1159
+ null,
1160
+ "0"
924
1161
  ],
925
1162
  [
926
1163
  "pe",
927
1164
  // Peru
928
- "51"
1165
+ "51",
1166
+ 0,
1167
+ null,
1168
+ "0"
929
1169
  ],
930
1170
  [
931
1171
  "ph",
932
1172
  // Philippines
933
- "63"
1173
+ "63",
1174
+ 0,
1175
+ null,
1176
+ "0"
934
1177
  ],
935
1178
  [
936
1179
  "pl",
@@ -947,7 +1190,8 @@ const j = [
947
1190
  // Puerto Rico
948
1191
  "1",
949
1192
  3,
950
- ["787", "939"]
1193
+ ["787", "939"],
1194
+ "1"
951
1195
  ],
952
1196
  [
953
1197
  "qa",
@@ -965,20 +1209,27 @@ const j = [
965
1209
  [
966
1210
  "ro",
967
1211
  // Romania
968
- "40"
1212
+ "40",
1213
+ 0,
1214
+ null,
1215
+ "0"
969
1216
  ],
970
1217
  [
971
1218
  "ru",
972
1219
  // Russia
973
1220
  "7",
974
1221
  0,
975
- null,
1222
+ ["33"],
1223
+ // (shared with KZ)
976
1224
  "8"
977
1225
  ],
978
1226
  [
979
1227
  "rw",
980
1228
  // Rwanda
981
- "250"
1229
+ "250",
1230
+ 0,
1231
+ null,
1232
+ "0"
982
1233
  ],
983
1234
  [
984
1235
  "ws",
@@ -998,7 +1249,10 @@ const j = [
998
1249
  [
999
1250
  "sa",
1000
1251
  // Saudi Arabia
1001
- "966"
1252
+ "966",
1253
+ 0,
1254
+ null,
1255
+ "0"
1002
1256
  ],
1003
1257
  [
1004
1258
  "sn",
@@ -1008,7 +1262,10 @@ const j = [
1008
1262
  [
1009
1263
  "rs",
1010
1264
  // Serbia
1011
- "381"
1265
+ "381",
1266
+ 0,
1267
+ null,
1268
+ "0"
1012
1269
  ],
1013
1270
  [
1014
1271
  "sc",
@@ -1018,7 +1275,10 @@ const j = [
1018
1275
  [
1019
1276
  "sl",
1020
1277
  // Sierra Leone
1021
- "232"
1278
+ "232",
1279
+ 0,
1280
+ null,
1281
+ "0"
1022
1282
  ],
1023
1283
  [
1024
1284
  "sg",
@@ -1030,17 +1290,24 @@ const j = [
1030
1290
  // Sint Maarten
1031
1291
  "1",
1032
1292
  21,
1033
- ["721"]
1293
+ ["721"],
1294
+ "1"
1034
1295
  ],
1035
1296
  [
1036
1297
  "sk",
1037
1298
  // Slovakia
1038
- "421"
1299
+ "421",
1300
+ 0,
1301
+ null,
1302
+ "0"
1039
1303
  ],
1040
1304
  [
1041
1305
  "si",
1042
1306
  // Slovenia
1043
- "386"
1307
+ "386",
1308
+ 0,
1309
+ null,
1310
+ "0"
1044
1311
  ],
1045
1312
  [
1046
1313
  "sb",
@@ -1050,22 +1317,34 @@ const j = [
1050
1317
  [
1051
1318
  "so",
1052
1319
  // Somalia
1053
- "252"
1320
+ "252",
1321
+ 0,
1322
+ null,
1323
+ "0"
1054
1324
  ],
1055
1325
  [
1056
1326
  "za",
1057
1327
  // South Africa
1058
- "27"
1328
+ "27",
1329
+ 0,
1330
+ null,
1331
+ "0"
1059
1332
  ],
1060
1333
  [
1061
1334
  "kr",
1062
1335
  // South Korea
1063
- "82"
1336
+ "82",
1337
+ 0,
1338
+ null,
1339
+ "0"
1064
1340
  ],
1065
1341
  [
1066
1342
  "ss",
1067
1343
  // South Sudan
1068
- "211"
1344
+ "211",
1345
+ 0,
1346
+ null,
1347
+ "0"
1069
1348
  ],
1070
1349
  [
1071
1350
  "es",
@@ -1075,13 +1354,18 @@ const j = [
1075
1354
  [
1076
1355
  "lk",
1077
1356
  // Sri Lanka
1078
- "94"
1357
+ "94",
1358
+ 0,
1359
+ null,
1360
+ "0"
1079
1361
  ],
1080
1362
  [
1081
1363
  "bl",
1082
1364
  // St. Barthélemy
1083
1365
  "590",
1084
- 1
1366
+ 1,
1367
+ null,
1368
+ "0"
1085
1369
  ],
1086
1370
  [
1087
1371
  "sh",
@@ -1093,37 +1377,48 @@ const j = [
1093
1377
  // St. Kitts & Nevis
1094
1378
  "1",
1095
1379
  18,
1096
- ["869"]
1380
+ ["869"],
1381
+ "1"
1097
1382
  ],
1098
1383
  [
1099
1384
  "lc",
1100
1385
  // St. Lucia
1101
1386
  "1",
1102
1387
  19,
1103
- ["758"]
1388
+ ["758"],
1389
+ "1"
1104
1390
  ],
1105
1391
  [
1106
1392
  "mf",
1107
1393
  // St. Martin
1108
1394
  "590",
1109
- 2
1395
+ 2,
1396
+ null,
1397
+ "0"
1110
1398
  ],
1111
1399
  [
1112
1400
  "pm",
1113
1401
  // St. Pierre & Miquelon
1114
- "508"
1402
+ "508",
1403
+ 0,
1404
+ null,
1405
+ "0"
1115
1406
  ],
1116
1407
  [
1117
1408
  "vc",
1118
1409
  // St. Vincent & Grenadines
1119
1410
  "1",
1120
1411
  20,
1121
- ["784"]
1412
+ ["784"],
1413
+ "1"
1122
1414
  ],
1123
1415
  [
1124
1416
  "sd",
1125
1417
  // Sudan
1126
- "249"
1418
+ "249",
1419
+ 0,
1420
+ null,
1421
+ "0"
1127
1422
  ],
1128
1423
  [
1129
1424
  "sr",
@@ -1135,27 +1430,40 @@ const j = [
1135
1430
  // Svalbard & Jan Mayen
1136
1431
  "47",
1137
1432
  1,
1138
- ["79"]
1433
+ ["4", "79", "9"]
1434
+ // (4 and 9 are mobile ranges shared with NO)
1139
1435
  ],
1140
1436
  [
1141
1437
  "se",
1142
1438
  // Sweden
1143
- "46"
1439
+ "46",
1440
+ 0,
1441
+ null,
1442
+ "0"
1144
1443
  ],
1145
1444
  [
1146
1445
  "ch",
1147
1446
  // Switzerland
1148
- "41"
1447
+ "41",
1448
+ 0,
1449
+ null,
1450
+ "0"
1149
1451
  ],
1150
1452
  [
1151
1453
  "sy",
1152
1454
  // Syria
1153
- "963"
1455
+ "963",
1456
+ 0,
1457
+ null,
1458
+ "0"
1154
1459
  ],
1155
1460
  [
1156
1461
  "tw",
1157
1462
  // Taiwan
1158
- "886"
1463
+ "886",
1464
+ 0,
1465
+ null,
1466
+ "0"
1159
1467
  ],
1160
1468
  [
1161
1469
  "tj",
@@ -1165,12 +1473,18 @@ const j = [
1165
1473
  [
1166
1474
  "tz",
1167
1475
  // Tanzania
1168
- "255"
1476
+ "255",
1477
+ 0,
1478
+ null,
1479
+ "0"
1169
1480
  ],
1170
1481
  [
1171
1482
  "th",
1172
1483
  // Thailand
1173
- "66"
1484
+ "66",
1485
+ 0,
1486
+ null,
1487
+ "0"
1174
1488
  ],
1175
1489
  [
1176
1490
  "tl",
@@ -1197,7 +1511,8 @@ const j = [
1197
1511
  // Trinidad & Tobago
1198
1512
  "1",
1199
1513
  22,
1200
- ["868"]
1514
+ ["868"],
1515
+ "1"
1201
1516
  ],
1202
1517
  [
1203
1518
  "tn",
@@ -1207,19 +1522,26 @@ const j = [
1207
1522
  [
1208
1523
  "tr",
1209
1524
  // Turkey
1210
- "90"
1525
+ "90",
1526
+ 0,
1527
+ null,
1528
+ "0"
1211
1529
  ],
1212
1530
  [
1213
1531
  "tm",
1214
1532
  // Turkmenistan
1215
- "993"
1533
+ "993",
1534
+ 0,
1535
+ null,
1536
+ "8"
1216
1537
  ],
1217
1538
  [
1218
1539
  "tc",
1219
1540
  // Turks & Caicos Islands
1220
1541
  "1",
1221
1542
  23,
1222
- ["649"]
1543
+ ["649"],
1544
+ "1"
1223
1545
  ],
1224
1546
  [
1225
1547
  "tv",
@@ -1231,22 +1553,32 @@ const j = [
1231
1553
  // U.S. Virgin Islands
1232
1554
  "1",
1233
1555
  24,
1234
- ["340"]
1556
+ ["340"],
1557
+ "1"
1235
1558
  ],
1236
1559
  [
1237
1560
  "ug",
1238
1561
  // Uganda
1239
- "256"
1562
+ "256",
1563
+ 0,
1564
+ null,
1565
+ "0"
1240
1566
  ],
1241
1567
  [
1242
1568
  "ua",
1243
1569
  // Ukraine
1244
- "380"
1570
+ "380",
1571
+ 0,
1572
+ null,
1573
+ "0"
1245
1574
  ],
1246
1575
  [
1247
1576
  "ae",
1248
1577
  // United Arab Emirates
1249
- "971"
1578
+ "971",
1579
+ 0,
1580
+ null,
1581
+ "0"
1250
1582
  ],
1251
1583
  [
1252
1584
  "gb",
@@ -1260,12 +1592,17 @@ const j = [
1260
1592
  "us",
1261
1593
  // United States
1262
1594
  "1",
1263
- 0
1595
+ 0,
1596
+ null,
1597
+ "1"
1264
1598
  ],
1265
1599
  [
1266
1600
  "uy",
1267
1601
  // Uruguay
1268
- "598"
1602
+ "598",
1603
+ 0,
1604
+ null,
1605
+ "0"
1269
1606
  ],
1270
1607
  [
1271
1608
  "uz",
@@ -1282,17 +1619,24 @@ const j = [
1282
1619
  // Vatican City
1283
1620
  "39",
1284
1621
  1,
1285
- ["06698"]
1622
+ ["06698", "3"]
1623
+ // (3 is a mobile range shared with IT)
1286
1624
  ],
1287
1625
  [
1288
1626
  "ve",
1289
1627
  // Venezuela
1290
- "58"
1628
+ "58",
1629
+ 0,
1630
+ null,
1631
+ "0"
1291
1632
  ],
1292
1633
  [
1293
1634
  "vn",
1294
1635
  // Vietnam
1295
- "84"
1636
+ "84",
1637
+ 0,
1638
+ null,
1639
+ "0"
1296
1640
  ],
1297
1641
  [
1298
1642
  "wf",
@@ -1304,38 +1648,48 @@ const j = [
1304
1648
  // Western Sahara
1305
1649
  "212",
1306
1650
  1,
1307
- ["5288", "5289"],
1651
+ ["5288", "5289", "6", "7"],
1652
+ // (6 and 7 are mobile ranges shared with MA)
1308
1653
  "0"
1309
1654
  ],
1310
1655
  [
1311
1656
  "ye",
1312
1657
  // Yemen
1313
- "967"
1658
+ "967",
1659
+ 0,
1660
+ null,
1661
+ "0"
1314
1662
  ],
1315
1663
  [
1316
1664
  "zm",
1317
1665
  // Zambia
1318
- "260"
1666
+ "260",
1667
+ 0,
1668
+ null,
1669
+ "0"
1319
1670
  ],
1320
1671
  [
1321
1672
  "zw",
1322
1673
  // Zimbabwe
1323
- "263"
1674
+ "263",
1675
+ 0,
1676
+ null,
1677
+ "0"
1324
1678
  ]
1325
- ], _ = [];
1326
- for (const r of j)
1327
- _.push({
1679
+ ], b = [];
1680
+ for (const l of U)
1681
+ b.push({
1328
1682
  name: "",
1329
1683
  // populated in the plugin
1330
- iso2: r[0],
1331
- dialCode: r[1],
1332
- priority: r[2] || 0,
1333
- areaCodes: r[3] || null,
1684
+ iso2: l[0],
1685
+ dialCode: l[1],
1686
+ priority: l[2] || 0,
1687
+ areaCodes: l[3] || null,
1334
1688
  nodeById: {},
1335
1689
  // populated by the plugin
1336
- nationalPrefix: r[4] || null
1690
+ nationalPrefix: l[4] || null
1337
1691
  });
1338
- const U = {
1692
+ const j = {
1339
1693
  ad: "Andorra",
1340
1694
  ae: "United Arab Emirates",
1341
1695
  af: "Afghanistan",
@@ -1590,13 +1944,13 @@ const U = {
1590
1944
  // additional countries (not supported by country-list library)
1591
1945
  ac: "Ascension Island",
1592
1946
  xk: "Kosovo"
1593
- }, k = { ...U, ...H }, N = (r) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(r).matches, K = () => {
1947
+ }, P = { ...j, ...H }, D = (l) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(l).matches, K = () => {
1594
1948
  if (typeof navigator < "u" && typeof window < "u") {
1595
- const r = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = N("(max-width: 500px)"), e = N("(max-height: 600px)"), i = N("(pointer: coarse)");
1596
- return r || t || i && e;
1949
+ const l = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), t = D("(max-width: 500px)"), e = D("(max-height: 600px)"), i = D("(pointer: coarse)");
1950
+ return l || t || i && e;
1597
1951
  }
1598
1952
  return !1;
1599
- }, P = {
1953
+ }, x = {
1600
1954
  // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
1601
1955
  allowPhonewords: !1,
1602
1956
  //* Whether or not to allow the dropdown.
@@ -1648,98 +2002,104 @@ const U = {
1648
2002
  //* The number type to enforce during validation.
1649
2003
  validationNumberTypes: ["MOBILE"]
1650
2004
  };
1651
- function W(r) {
1652
- r.useFullscreenPopup && (r.fixDropdownWidth = !1), r.onlyCountries.length === 1 && (r.initialCountry = r.onlyCountries[0]), r.separateDialCode && (r.nationalMode = !1), r.allowDropdown && !r.showFlags && !r.separateDialCode && (r.nationalMode = !1), r.useFullscreenPopup && !r.dropdownContainer && (r.dropdownContainer = document.body), r.i18n = { ...k, ...r.i18n };
2005
+ function W(l) {
2006
+ l.useFullscreenPopup && (l.fixDropdownWidth = !1), l.onlyCountries.length === 1 && (l.initialCountry = l.onlyCountries[0]), l.separateDialCode && (l.nationalMode = !1), l.allowDropdown && !l.showFlags && !l.separateDialCode && (l.nationalMode = !1), l.useFullscreenPopup && !l.dropdownContainer && (l.dropdownContainer = document.body), l.i18n = { ...P, ...l.i18n };
1653
2007
  }
1654
- const I = (r) => r.replace(/\D/g, ""), x = (r = "") => r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), m = (r, t, e) => {
1655
- const i = document.createElement(r);
1656
- return t && Object.entries(t).forEach(([s, n]) => i.setAttribute(s, n)), e && e.appendChild(i), i;
2008
+ const v = (l) => l.replace(/\D/g, ""), T = (l = "") => l.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), m = (l, t, e) => {
2009
+ const i = document.createElement(l);
2010
+ return t && Object.entries(t).forEach(([n, s]) => i.setAttribute(n, s)), e && e.appendChild(i), i;
1657
2011
  };
1658
- function G(r) {
1659
- const { onlyCountries: t, excludeCountries: e } = r;
2012
+ function G(l) {
2013
+ const { onlyCountries: t, excludeCountries: e } = l;
1660
2014
  if (t.length) {
1661
- const i = t.map((s) => s.toLowerCase());
1662
- return _.filter((s) => i.includes(s.iso2));
2015
+ const i = t.map((n) => n.toLowerCase());
2016
+ return b.filter((n) => i.includes(n.iso2));
1663
2017
  } else if (e.length) {
1664
- const i = e.map((s) => s.toLowerCase());
1665
- return _.filter((s) => !i.includes(s.iso2));
2018
+ const i = e.map((n) => n.toLowerCase());
2019
+ return b.filter((n) => !i.includes(n.iso2));
1666
2020
  }
1667
- return _;
2021
+ return b;
1668
2022
  }
1669
- function q(r, t) {
1670
- for (const e of r) {
2023
+ function q(l, t) {
2024
+ for (const e of l) {
1671
2025
  const i = e.iso2.toLowerCase();
1672
2026
  t.i18n[i] && (e.name = t.i18n[i]);
1673
2027
  }
1674
2028
  }
1675
- function Y(r, t) {
2029
+ function Y(l, t) {
1676
2030
  const e = /* @__PURE__ */ new Set();
1677
2031
  let i = 0;
1678
- const s = {}, n = (o, a, d) => {
2032
+ const n = {}, s = (o, a, u) => {
1679
2033
  if (!o || !a)
1680
2034
  return;
1681
- a.length > i && (i = a.length), s.hasOwnProperty(a) || (s[a] = []);
1682
- const l = s[a];
1683
- if (l.includes(o))
2035
+ a.length > i && (i = a.length), n.hasOwnProperty(a) || (n[a] = []);
2036
+ const r = n[a];
2037
+ if (r.includes(o))
1684
2038
  return;
1685
- const h = d !== void 0 ? d : l.length;
1686
- l[h] = o;
2039
+ const h = u !== void 0 ? u : r.length;
2040
+ r[h] = o;
1687
2041
  };
1688
- for (const o of r)
1689
- e.has(o.dialCode) || e.add(o.dialCode), n(o.iso2, o.dialCode, o.priority);
2042
+ for (const o of l) {
2043
+ e.has(o.dialCode) || e.add(o.dialCode);
2044
+ for (let a = 1; a < o.dialCode.length; a++) {
2045
+ const u = o.dialCode.substring(0, a);
2046
+ s(o.iso2, u);
2047
+ }
2048
+ s(o.iso2, o.dialCode, o.priority);
2049
+ }
1690
2050
  (t.onlyCountries.length || t.excludeCountries.length) && e.forEach((o) => {
1691
- s[o] = s[o].filter(Boolean);
2051
+ n[o] = n[o].filter(Boolean);
1692
2052
  });
1693
- for (const o of r)
2053
+ for (const o of l)
1694
2054
  if (o.areaCodes) {
1695
- const a = s[o.dialCode][0];
1696
- for (const d of o.areaCodes) {
1697
- for (let l = 1; l < d.length; l++) {
1698
- const h = d.substring(0, l), p = o.dialCode + h;
1699
- n(a, p), n(o.iso2, p);
2055
+ const a = n[o.dialCode][0];
2056
+ for (const u of o.areaCodes) {
2057
+ for (let r = 1; r < u.length; r++) {
2058
+ const h = u.substring(0, r), p = o.dialCode + h;
2059
+ s(a, p), s(o.iso2, p);
1700
2060
  }
1701
- n(o.iso2, o.dialCode + d);
2061
+ s(o.iso2, o.dialCode + u);
1702
2062
  }
1703
2063
  }
1704
- return { dialCodes: e, dialCodeMaxLen: i, dialCodeToIso2Map: s };
2064
+ return { dialCodes: e, dialCodeMaxLen: i, dialCodeToIso2Map: n };
1705
2065
  }
1706
- function J(r, t) {
1707
- t.countryOrder && (t.countryOrder = t.countryOrder.map((e) => e.toLowerCase())), r.sort((e, i) => {
1708
- const { countryOrder: s } = t;
1709
- if (s) {
1710
- const n = s.indexOf(e.iso2), o = s.indexOf(i.iso2), a = n > -1, d = o > -1;
1711
- if (a || d)
1712
- return a && d ? n - o : a ? -1 : 1;
2066
+ function J(l, t) {
2067
+ t.countryOrder && (t.countryOrder = t.countryOrder.map((e) => e.toLowerCase())), l.sort((e, i) => {
2068
+ const { countryOrder: n } = t;
2069
+ if (n) {
2070
+ const s = n.indexOf(e.iso2), o = n.indexOf(i.iso2), a = s > -1, u = o > -1;
2071
+ if (a || u)
2072
+ return a && u ? s - o : a ? -1 : 1;
1713
2073
  }
1714
2074
  return e.name.localeCompare(i.name);
1715
2075
  });
1716
2076
  }
1717
- function Z(r) {
1718
- for (const t of r)
1719
- t.normalisedName = x(t.name), t.initials = t.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((e) => e[0]).join("").toLowerCase(), t.dialCodePlus = `+${t.dialCode}`;
2077
+ function Z(l) {
2078
+ for (const t of l)
2079
+ t.normalisedName = T(t.name), t.initials = t.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((e) => e[0]).join("").toLowerCase(), t.dialCodePlus = `+${t.dialCode}`;
1720
2080
  }
1721
- function Q(r, t, e, i) {
1722
- let s = r;
2081
+ function Q(l, t, e, i) {
2082
+ let n = l;
1723
2083
  if (e && t) {
1724
2084
  t = `+${i.dialCode}`;
1725
- const n = s[t.length] === " " || s[t.length] === "-" ? t.length + 1 : t.length;
1726
- s = s.substring(n);
2085
+ const s = n[t.length] === " " || n[t.length] === "-" ? t.length + 1 : t.length;
2086
+ n = n.substring(s);
1727
2087
  }
1728
- return s;
2088
+ return n;
1729
2089
  }
1730
- function X(r, t, e, i, s) {
1731
- const n = e ? e.formatNumberAsYouType(r, i.iso2) : r, { dialCode: o } = i;
1732
- return s && t.charAt(0) !== "+" && n.includes(`+${o}`) ? (n.split(`+${o}`)[1] || "").trim() : n;
2090
+ function X(l, t, e, i, n) {
2091
+ const s = e ? e.formatNumberAsYouType(l, i.iso2) : l, { dialCode: o } = i;
2092
+ return n && t.charAt(0) !== "+" && s.includes(`+${o}`) ? (s.split(`+${o}`)[1] || "").trim() : s;
1733
2093
  }
1734
- function tt(r, t, e, i) {
2094
+ function tt(l, t, e, i) {
1735
2095
  if (e === 0 && !i)
1736
2096
  return 0;
1737
- let s = 0;
1738
- for (let n = 0; n < t.length; n++) {
1739
- if (/[+0-9]/.test(t[n]) && s++, s === r && !i)
1740
- return n + 1;
1741
- if (i && s === r + 1)
1742
- return n;
2097
+ let n = 0;
2098
+ for (let s = 0; s < t.length; s++) {
2099
+ if (/[+0-9]/.test(t[s]) && n++, n === l && !i)
2100
+ return s + 1;
2101
+ if (i && n === l + 1)
2102
+ return s;
1743
2103
  }
1744
2104
  return t.length;
1745
2105
  }
@@ -1761,22 +2121,22 @@ const et = [
1761
2121
  "887",
1762
2122
  "888",
1763
2123
  "889"
1764
- ], A = (r) => {
1765
- const t = I(r);
2124
+ ], k = (l) => {
2125
+ const t = v(l);
1766
2126
  if (t.charAt(0) === "1") {
1767
2127
  const e = t.substring(1, 4);
1768
2128
  return et.includes(e);
1769
2129
  }
1770
2130
  return !1;
1771
2131
  };
1772
- for (const r of _)
1773
- r.name = k[r.iso2];
2132
+ for (const l of b)
2133
+ l.name = P[l.iso2];
1774
2134
  let it = 0;
1775
- const st = new Set(_.map((r) => r.iso2)), D = (r) => st.has(r), w = (r, ...t) => {
1776
- const { instances: e } = u;
1777
- Object.values(e).forEach((i) => i[r](...t));
2135
+ const nt = new Set(b.map((l) => l.iso2)), S = (l) => nt.has(l), I = (l, ...t) => {
2136
+ const { instances: e } = d;
2137
+ Object.values(e).forEach((i) => i[l](...t));
1778
2138
  };
1779
- class v {
2139
+ class L {
1780
2140
  /**
1781
2141
  * Build a space-delimited class string from an object map of className -> truthy/falsey.
1782
2142
  * Only keys with truthy values are included.
@@ -1785,7 +2145,7 @@ class v {
1785
2145
  return Object.keys(t).filter((e) => !!t[e]).join(" ");
1786
2146
  }
1787
2147
  constructor(t, e = {}) {
1788
- this.id = it++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, P, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
2148
+ this.id = it++, this.telInput = t, this.highlightedItem = null, this.options = Object.assign({}, x, e), this.hadInitialPlaceholder = !!t.getAttribute("placeholder");
1789
2149
  }
1790
2150
  _detectEnvironmentAndLayout() {
1791
2151
  this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.telInput.dir = "ltr";
@@ -1793,10 +2153,10 @@ class v {
1793
2153
  this.showSelectedCountryOnLeft = this.isRTL ? !t : t, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft);
1794
2154
  }
1795
2155
  _createInitPromises() {
1796
- const t = new Promise((i, s) => {
1797
- this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
1798
- }), e = new Promise((i, s) => {
1799
- this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
2156
+ const t = new Promise((i, n) => {
2157
+ this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = n;
2158
+ }), e = new Promise((i, n) => {
2159
+ this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = n;
1800
2160
  });
1801
2161
  this.promise = Promise.all([t, e]);
1802
2162
  }
@@ -1828,23 +2188,23 @@ class v {
1828
2188
  allowDropdown: t,
1829
2189
  showFlags: e,
1830
2190
  containerClass: i,
1831
- useFullscreenPopup: s
1832
- } = this.options, n = v._buildClassNames({
2191
+ useFullscreenPopup: n
2192
+ } = this.options, s = L._buildClassNames({
1833
2193
  iti: !0,
1834
2194
  "iti--allow-dropdown": t,
1835
2195
  "iti--show-flags": e,
1836
- "iti--inline-dropdown": !s,
2196
+ "iti--inline-dropdown": !n,
1837
2197
  [i]: !!i
1838
- }), o = m("div", { class: n });
2198
+ }), o = m("div", { class: s });
1839
2199
  return (a = this.telInput.parentNode) == null || a.insertBefore(o, this.telInput), o;
1840
2200
  }
1841
2201
  _maybeBuildCountryContainer(t) {
1842
2202
  const {
1843
2203
  allowDropdown: e,
1844
2204
  separateDialCode: i,
1845
- showFlags: s
2205
+ showFlags: n
1846
2206
  } = this.options;
1847
- if (e || s || i) {
2207
+ if (e || n || i) {
1848
2208
  this.countryContainer = m(
1849
2209
  "div",
1850
2210
  // visibly hidden until we measure it's width to set the input padding correctly
@@ -1866,7 +2226,7 @@ class v {
1866
2226
  { class: "iti__selected-country" },
1867
2227
  this.countryContainer
1868
2228
  );
1869
- const n = m(
2229
+ const s = m(
1870
2230
  "div",
1871
2231
  { class: "iti__selected-country-primary" },
1872
2232
  this.selectedCountry
@@ -1874,11 +2234,11 @@ class v {
1874
2234
  this.selectedCountryInner = m(
1875
2235
  "div",
1876
2236
  { class: "iti__flag" },
1877
- n
2237
+ s
1878
2238
  ), e && (this.dropdownArrow = m(
1879
2239
  "div",
1880
2240
  { class: "iti__arrow", "aria-hidden": "true" },
1881
- n
2241
+ s
1882
2242
  )), i && (this.selectedDialCode = m(
1883
2243
  "div",
1884
2244
  { class: "iti__selected-dial-code", dir: "ltr" },
@@ -1891,8 +2251,8 @@ class v {
1891
2251
  fixDropdownWidth: t,
1892
2252
  useFullscreenPopup: e,
1893
2253
  countrySearch: i,
1894
- i18n: s,
1895
- dropdownContainer: n,
2254
+ i18n: n,
2255
+ dropdownContainer: s,
1896
2256
  containerClass: o
1897
2257
  } = this.options, a = t ? "" : "iti--flexible-dropdown-width";
1898
2258
  if (this.dropdownContent = m("div", {
@@ -1906,18 +2266,18 @@ class v {
1906
2266
  class: "iti__country-list",
1907
2267
  id: `iti-${this.id}__country-listbox`,
1908
2268
  role: "listbox",
1909
- "aria-label": s.countryListAriaLabel
2269
+ "aria-label": n.countryListAriaLabel
1910
2270
  },
1911
2271
  this.dropdownContent
1912
- ), this._appendListItems(), i && this._updateSearchResultsA11yText(), n) {
1913
- const d = v._buildClassNames({
2272
+ ), this._appendListItems(), i && this._updateSearchResultsA11yText(), s) {
2273
+ const u = L._buildClassNames({
1914
2274
  iti: !0,
1915
2275
  "iti--container": !0,
1916
2276
  "iti--fullscreen-popup": e,
1917
2277
  "iti--inline-dropdown": !e,
1918
2278
  [o]: !!o
1919
2279
  });
1920
- this.dropdown = m("div", { class: d }), this.dropdown.appendChild(this.dropdownContent);
2280
+ this.dropdown = m("div", { class: u }), this.dropdown.appendChild(this.dropdownContent);
1921
2281
  } else
1922
2282
  this.countryContainer.appendChild(this.dropdownContent);
1923
2283
  }
@@ -1991,10 +2351,10 @@ class v {
1991
2351
  this.countryContainer && (this._updateInputPadding(), this.countryContainer.classList.remove("iti__v-hide"));
1992
2352
  }
1993
2353
  _maybeBuildHiddenInputs(t) {
1994
- var i, s;
2354
+ var i, n;
1995
2355
  const { hiddenInput: e } = this.options;
1996
2356
  if (e) {
1997
- const n = this.telInput.getAttribute("name") || "", o = e(n);
2357
+ const s = this.telInput.getAttribute("name") || "", o = e(s);
1998
2358
  if (o.phone) {
1999
2359
  const a = (i = this.telInput.form) == null ? void 0 : i.querySelector(`input[name="${o.phone}"]`);
2000
2360
  a ? this.hiddenInput = a : (this.hiddenInput = m("input", {
@@ -2003,7 +2363,7 @@ class v {
2003
2363
  }), t.appendChild(this.hiddenInput));
2004
2364
  }
2005
2365
  if (o.country) {
2006
- const a = (s = this.telInput.form) == null ? void 0 : s.querySelector(`input[name="${o.country}"]`);
2366
+ const a = (n = this.telInput.form) == null ? void 0 : n.querySelector(`input[name="${o.country}"]`);
2007
2367
  a ? this.hiddenInputCountry = a : (this.hiddenInputCountry = m("input", {
2008
2368
  type: "hidden",
2009
2369
  name: o.country
@@ -2014,7 +2374,7 @@ class v {
2014
2374
  //* For each country: add a country list item <li> to the countryList <ul> container.
2015
2375
  _appendListItems() {
2016
2376
  for (let t = 0; t < this.countries.length; t++) {
2017
- const e = this.countries[t], i = t === 0 ? "iti__highlight" : "", s = m(
2377
+ const e = this.countries[t], i = t === 0 ? "iti__highlight" : "", n = m(
2018
2378
  "li",
2019
2379
  {
2020
2380
  id: `iti-${this.id}__item-${e.iso2}`,
@@ -2027,23 +2387,23 @@ class v {
2027
2387
  },
2028
2388
  this.countryList
2029
2389
  );
2030
- e.nodeById[this.id] = s;
2031
- let n = "";
2032
- this.options.showFlags && (n += `<div class='iti__flag iti__${e.iso2}'></div>`), n += `<span class='iti__country-name'>${e.name}</span>`, n += `<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`, s.insertAdjacentHTML("beforeend", n);
2390
+ e.nodeById[this.id] = n;
2391
+ let s = "";
2392
+ this.options.showFlags && (s += `<div class='iti__flag iti__${e.iso2}'></div>`), s += `<span class='iti__country-name'>${e.name}</span>`, s += `<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`, n.insertAdjacentHTML("beforeend", s);
2033
2393
  }
2034
2394
  }
2035
2395
  //* Set the initial state of the input value and the selected country by:
2036
2396
  //* 1. Extracting a dial code from the given number
2037
2397
  //* 2. Using explicit initialCountry
2038
2398
  _setInitialState(t = !1) {
2039
- const e = this.telInput.getAttribute("value"), i = this.telInput.value, n = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(n), a = A(n), { initialCountry: d, geoIpLookup: l } = this.options, h = d === "auto" && l;
2399
+ const e = this.telInput.getAttribute("value"), i = this.telInput.value, s = e && e.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? e : i, o = this._getDialCode(s), a = k(s), { initialCountry: u, geoIpLookup: r } = this.options, h = u === "auto" && r;
2040
2400
  if (o && !a)
2041
- this._updateCountryFromNumber(n);
2401
+ this._updateCountryFromNumber(s);
2042
2402
  else if (!h || t) {
2043
- const p = d ? d.toLowerCase() : "";
2044
- D(p) ? this._setCountry(p) : o && a ? this._setCountry("us") : this._setCountry("");
2403
+ const p = u ? u.toLowerCase() : "";
2404
+ S(p) ? this._setCountry(p) : o && a ? this._setCountry("us") : this._setCountry("");
2045
2405
  }
2046
- n && this._updateValFromNumber(n);
2406
+ s && this._updateValFromNumber(s);
2047
2407
  }
2048
2408
  //* Initialise the main event listeners: input keyup, and click selected country.
2049
2409
  _initListeners() {
@@ -2077,21 +2437,23 @@ class v {
2077
2437
  //* Init many requests: utils script / geo ip lookup.
2078
2438
  _initRequests() {
2079
2439
  let { loadUtils: t, initialCountry: e, geoIpLookup: i } = this.options;
2080
- t && !u.utils ? (this._handlePageLoad = () => {
2081
- var n;
2082
- window.removeEventListener("load", this._handlePageLoad), (n = u.attachUtils(t)) == null || n.catch(() => {
2440
+ t && !d.utils ? (this._doAttachUtils = () => {
2441
+ var s;
2442
+ (s = d.attachUtils(t)) == null || s.catch(() => {
2083
2443
  });
2084
- }, u.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2444
+ }, d.documentReady() ? this._doAttachUtils() : (this._handlePageLoad = () => {
2445
+ this._doAttachUtils();
2446
+ }, window.addEventListener("load", this._handlePageLoad))) : this.resolveUtilsScriptPromise(), e === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
2085
2447
  }
2086
2448
  //* Perform the geo ip lookup.
2087
2449
  _loadAutoCountry() {
2088
- u.autoCountry ? this.handleAutoCountry() : u.startedLoadingAutoCountry || (u.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2450
+ d.autoCountry ? this.handleAutoCountry() : d.startedLoadingAutoCountry || (d.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
2089
2451
  (t = "") => {
2090
2452
  const e = t.toLowerCase();
2091
- D(e) ? (u.autoCountry = e, setTimeout(() => w("handleAutoCountry"))) : (this._setInitialState(!0), w("rejectAutoCountryPromise"));
2453
+ S(e) ? (d.autoCountry = e, setTimeout(() => I("handleAutoCountry"))) : (this._setInitialState(!0), I("rejectAutoCountryPromise"));
2092
2454
  },
2093
2455
  () => {
2094
- this._setInitialState(!0), w("rejectAutoCountryPromise");
2456
+ this._setInitialState(!0), I("rejectAutoCountryPromise");
2095
2457
  }
2096
2458
  ));
2097
2459
  }
@@ -2103,41 +2465,41 @@ class v {
2103
2465
  this._bindInputListener(), this._maybeBindKeydownListener(), this._maybeBindPasteListener();
2104
2466
  }
2105
2467
  _bindInputListener() {
2106
- const { strictMode: t, formatAsYouType: e, separateDialCode: i, allowDropdown: s, countrySearch: n } = this.options;
2468
+ const { strictMode: t, formatAsYouType: e, separateDialCode: i, allowDropdown: n, countrySearch: s } = this.options;
2107
2469
  let o = !1;
2108
2470
  new RegExp("\\p{L}", "u").test(this.telInput.value) && (o = !0), this._handleInputEvent = (a) => {
2109
- if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && s && n) {
2110
- const p = this.telInput.selectionStart || 0, f = this.telInput.value.substring(0, p - 1), c = this.telInput.value.substring(p);
2111
- this.telInput.value = f + c, this._openDropdownWithPlus();
2471
+ if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && n && s) {
2472
+ const p = this.telInput.selectionStart || 0, g = this.telInput.value.substring(0, p - 1), c = this.telInput.value.substring(p);
2473
+ this.telInput.value = g + c, this._openDropdownWithPlus();
2112
2474
  return;
2113
2475
  }
2114
2476
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
2115
- const d = (a == null ? void 0 : a.data) && /[^+0-9]/.test(a.data), l = (a == null ? void 0 : a.inputType) === "insertFromPaste" && this.telInput.value;
2116
- d || l && !t ? o = !0 : /[^+0-9]/.test(this.telInput.value) || (o = !1);
2477
+ const u = (a == null ? void 0 : a.data) && /[^+0-9]/.test(a.data), r = (a == null ? void 0 : a.inputType) === "insertFromPaste" && this.telInput.value;
2478
+ u || r && !t ? o = !0 : /[^+0-9]/.test(this.telInput.value) || (o = !1);
2117
2479
  const h = (a == null ? void 0 : a.detail) && a.detail.isSetNumber;
2118
2480
  if (e && !o && !h) {
2119
- const p = this.telInput.selectionStart || 0, c = this.telInput.value.substring(0, p).replace(/[^+0-9]/g, "").length, C = (a == null ? void 0 : a.inputType) === "deleteContentForward", y = this._getFullNumber(), g = X(
2120
- y,
2481
+ const p = this.telInput.selectionStart || 0, c = this.telInput.value.substring(0, p).replace(/[^+0-9]/g, "").length, y = (a == null ? void 0 : a.inputType) === "deleteContentForward", C = this._getFullNumber(), f = X(
2482
+ C,
2121
2483
  this.telInput.value,
2122
- u.utils,
2484
+ d.utils,
2123
2485
  this.selectedCountryData,
2124
2486
  this.options.separateDialCode
2125
- ), b = tt(c, g, p, C);
2126
- this.telInput.value = g, this.telInput.setSelectionRange(b, b);
2487
+ ), _ = tt(c, f, p, y);
2488
+ this.telInput.value = f, this.telInput.setSelectionRange(_, _);
2127
2489
  }
2128
2490
  }, this.telInput.addEventListener("input", this._handleInputEvent);
2129
2491
  }
2130
2492
  _maybeBindKeydownListener() {
2131
- const { strictMode: t, separateDialCode: e, allowDropdown: i, countrySearch: s } = this.options;
2132
- (t || e) && (this._handleKeydownEvent = (n) => {
2133
- if (n.key && n.key.length === 1 && !n.altKey && !n.ctrlKey && !n.metaKey) {
2134
- if (e && i && s && n.key === "+") {
2135
- n.preventDefault(), this._openDropdownWithPlus();
2493
+ const { strictMode: t, separateDialCode: e, allowDropdown: i, countrySearch: n } = this.options;
2494
+ (t || e) && (this._handleKeydownEvent = (s) => {
2495
+ if (s.key && s.key.length === 1 && !s.altKey && !s.ctrlKey && !s.metaKey) {
2496
+ if (e && i && n && s.key === "+") {
2497
+ s.preventDefault(), this._openDropdownWithPlus();
2136
2498
  return;
2137
2499
  }
2138
2500
  if (t) {
2139
- const o = this.telInput.value, d = !(o.charAt(0) === "+") && this.telInput.selectionStart === 0 && n.key === "+", l = /^[0-9]$/.test(n.key), h = e ? l : d || l, p = o.slice(0, this.telInput.selectionStart) + n.key + o.slice(this.telInput.selectionEnd), f = this._getFullNumber(p), c = u.utils.getCoreNumber(f, this.selectedCountryData.iso2), C = this.maxCoreNumberLength && c.length > this.maxCoreNumberLength, g = this._getNewCountryFromNumber(f) !== null;
2140
- (!h || C && !g && !d) && n.preventDefault();
2501
+ const o = this.telInput.value, u = !(o.charAt(0) === "+") && this.telInput.selectionStart === 0 && s.key === "+", r = /^[0-9]$/.test(s.key), h = e ? r : u || r, p = o.slice(0, this.telInput.selectionStart) + s.key + o.slice(this.telInput.selectionEnd), g = this._getFullNumber(p), c = d.utils.getCoreNumber(g, this.selectedCountryData.iso2), y = this.maxCoreNumberLength && c.length > this.maxCoreNumberLength, f = this._getNewCountryFromNumber(g) !== null;
2502
+ (!h || y && !f && !u) && s.preventDefault();
2141
2503
  }
2142
2504
  }
2143
2505
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
@@ -2145,21 +2507,21 @@ class v {
2145
2507
  _maybeBindPasteListener() {
2146
2508
  this.options.strictMode && (this._handlePasteEvent = (t) => {
2147
2509
  t.preventDefault();
2148
- const e = this.telInput, i = e.selectionStart, s = e.selectionEnd, n = e.value.slice(0, i), o = e.value.slice(s), a = this.selectedCountryData.iso2, d = t.clipboardData.getData("text"), l = i === 0 && s > 0, h = !e.value.startsWith("+") || l, p = d.replace(/[^0-9+]/g, ""), f = p.startsWith("+"), c = p.replace(/\+/g, ""), C = f && h ? `+${c}` : c;
2149
- let y = n + C + o, g = u.utils.getCoreNumber(y, a);
2150
- for (; g.length === 0 && y.length > 0; )
2151
- y = y.slice(0, -1), g = u.utils.getCoreNumber(y, a);
2152
- if (!g)
2510
+ const e = this.telInput, i = e.selectionStart, n = e.selectionEnd, s = e.value.slice(0, i), o = e.value.slice(n), a = this.selectedCountryData.iso2, u = t.clipboardData.getData("text"), r = i === 0 && n > 0, h = !e.value.startsWith("+") || r, p = u.replace(/[^0-9+]/g, ""), g = p.startsWith("+"), c = p.replace(/\+/g, ""), y = g && h ? `+${c}` : c;
2511
+ let C = s + y + o, f = d.utils.getCoreNumber(C, a);
2512
+ for (; f.length === 0 && C.length > 0; )
2513
+ C = C.slice(0, -1), f = d.utils.getCoreNumber(C, a);
2514
+ if (!f)
2153
2515
  return;
2154
- if (this.maxCoreNumberLength && g.length > this.maxCoreNumberLength)
2516
+ if (this.maxCoreNumberLength && f.length > this.maxCoreNumberLength)
2155
2517
  if (e.selectionEnd === e.value.length) {
2156
- const T = g.length - this.maxCoreNumberLength;
2157
- y = y.slice(0, y.length - T);
2518
+ const w = f.length - this.maxCoreNumberLength;
2519
+ C = C.slice(0, C.length - w);
2158
2520
  } else
2159
2521
  return;
2160
- e.value = y;
2161
- const b = i + C.length;
2162
- e.setSelectionRange(b, b), e.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2522
+ e.value = C;
2523
+ const _ = i + y.length;
2524
+ e.setSelectionRange(_, _), e.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2163
2525
  }, this.telInput.addEventListener("paste", this._handlePasteEvent));
2164
2526
  }
2165
2527
  //* Adhere to the input's maxlength attr.
@@ -2195,16 +2557,16 @@ class v {
2195
2557
  //* We only bind dropdown listeners when the dropdown is open.
2196
2558
  _bindDropdownListeners() {
2197
2559
  this._handleMouseoverCountryList = (i) => {
2198
- var n;
2199
- const s = (n = i.target) == null ? void 0 : n.closest(".iti__country");
2200
- s && this._highlightListItem(s, !1);
2560
+ var s;
2561
+ const n = (s = i.target) == null ? void 0 : s.closest(".iti__country");
2562
+ n && this._highlightListItem(n, !1);
2201
2563
  }, this.countryList.addEventListener(
2202
2564
  "mouseover",
2203
2565
  this._handleMouseoverCountryList
2204
2566
  ), this._handleClickCountryList = (i) => {
2205
- var n;
2206
- const s = (n = i.target) == null ? void 0 : n.closest(".iti__country");
2207
- s && this._selectListItem(s);
2567
+ var s;
2568
+ const n = (s = i.target) == null ? void 0 : s.closest(".iti__country");
2569
+ n && this._selectListItem(n);
2208
2570
  }, this.countryList.addEventListener("click", this._handleClickCountryList), this._handleClickOffToClose = (i) => {
2209
2571
  !!i.target.closest(`#iti-${this.id}__dropdown-content`) || this._closeDropdown();
2210
2572
  }, setTimeout(() => {
@@ -2220,13 +2582,13 @@ class v {
2220
2582
  }, 1e3));
2221
2583
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2222
2584
  const i = () => {
2223
- const n = this.searchInput.value.trim();
2224
- this._filterCountries(n), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2585
+ const s = this.searchInput.value.trim();
2586
+ this._filterCountries(s), this.searchInput.value ? this.searchClearButton.classList.remove("iti__hide") : this.searchClearButton.classList.add("iti__hide");
2225
2587
  };
2226
- let s = null;
2588
+ let n = null;
2227
2589
  this._handleSearchChange = () => {
2228
- s && clearTimeout(s), s = setTimeout(() => {
2229
- i(), s = null;
2590
+ n && clearTimeout(n), n = setTimeout(() => {
2591
+ i(), n = null;
2230
2592
  }, 100);
2231
2593
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this._handleSearchClear = () => {
2232
2594
  this.searchInput.value = "", this.searchInput.focus(), i();
@@ -2237,8 +2599,8 @@ class v {
2237
2599
  _searchForCountry(t) {
2238
2600
  for (const e of this.countries)
2239
2601
  if (e.name.substring(0, t.length).toLowerCase() === t) {
2240
- const s = e.nodeById[this.id];
2241
- this._highlightListItem(s, !1), this._scrollTo(s);
2602
+ const n = e.nodeById[this.id];
2603
+ this._highlightListItem(n, !1), this._scrollTo(n);
2242
2604
  break;
2243
2605
  }
2244
2606
  }
@@ -2248,23 +2610,23 @@ class v {
2248
2610
  let e;
2249
2611
  t === "" ? e = this.countries : e = this._getMatchedCountries(t);
2250
2612
  let i = !0;
2251
- for (const s of e) {
2252
- const n = s.nodeById[this.id];
2253
- n && (this.countryList.appendChild(n), i && (this._highlightListItem(n, !1), i = !1));
2613
+ for (const n of e) {
2614
+ const s = n.nodeById[this.id];
2615
+ s && (this.countryList.appendChild(s), i && (this._highlightListItem(s, !1), i = !1));
2254
2616
  }
2255
2617
  i ? (this._highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove("iti__hide")) : this.searchNoResults && this.searchNoResults.classList.add("iti__hide"), this.countryList.scrollTop = 0, this._updateSearchResultsA11yText();
2256
2618
  }
2257
2619
  _getMatchedCountries(t) {
2258
- const e = x(t), i = [], s = [], n = [], o = [], a = [], d = [];
2259
- for (const l of this.countries)
2260
- l.iso2 === e ? i.push(l) : l.normalisedName.startsWith(e) ? s.push(l) : l.normalisedName.includes(e) ? n.push(l) : e === l.dialCode || e === l.dialCodePlus ? o.push(l) : l.dialCodePlus.includes(e) ? a.push(l) : l.initials.includes(e) && d.push(l);
2620
+ const e = T(t), i = [], n = [], s = [], o = [], a = [], u = [];
2621
+ for (const r of this.countries)
2622
+ r.iso2 === e ? i.push(r) : r.normalisedName.startsWith(e) ? n.push(r) : r.normalisedName.includes(e) ? s.push(r) : e === r.dialCode || e === r.dialCodePlus ? o.push(r) : r.dialCodePlus.includes(e) ? a.push(r) : r.initials.includes(e) && u.push(r);
2261
2623
  return [
2262
- ...i.sort((l, h) => l.priority - h.priority),
2263
- ...s.sort((l, h) => l.priority - h.priority),
2264
- ...n.sort((l, h) => l.priority - h.priority),
2265
- ...o.sort((l, h) => l.priority - h.priority),
2266
- ...a.sort((l, h) => l.priority - h.priority),
2267
- ...d.sort((l, h) => l.priority - h.priority)
2624
+ ...i.sort((r, h) => r.priority - h.priority),
2625
+ ...n.sort((r, h) => r.priority - h.priority),
2626
+ ...s.sort((r, h) => r.priority - h.priority),
2627
+ ...o.sort((r, h) => r.priority - h.priority),
2628
+ ...a.sort((r, h) => r.priority - h.priority),
2629
+ ...u.sort((r, h) => r.priority - h.priority)
2268
2630
  ];
2269
2631
  }
2270
2632
  //* Update search results text (for a11y).
@@ -2275,8 +2637,8 @@ class v {
2275
2637
  }
2276
2638
  //* Highlight the next/prev item in the list (and ensure it is visible).
2277
2639
  _handleUpDownKey(t) {
2278
- var i, s;
2279
- let e = t === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.highlightedItem) == null ? void 0 : s.nextElementSibling;
2640
+ var i, n;
2641
+ let e = t === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (n = this.highlightedItem) == null ? void 0 : n.nextElementSibling;
2280
2642
  !e && this.countryList.childElementCount > 1 && (e = t === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), e && (this._scrollTo(e), this._highlightListItem(e, !1));
2281
2643
  }
2282
2644
  //* Select the currently highlighted item.
@@ -2287,9 +2649,9 @@ class v {
2287
2649
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2288
2650
  _updateValFromNumber(t) {
2289
2651
  let e = t;
2290
- if (this.options.formatOnDisplay && u.utils && this.selectedCountryData) {
2291
- const i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: n } = u.utils.numberFormat, o = i ? s : n;
2292
- e = u.utils.formatNumber(
2652
+ if (this.options.formatOnDisplay && d.utils && this.selectedCountryData) {
2653
+ const i = this.options.nationalMode || e.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: n, INTERNATIONAL: s } = d.utils.numberFormat, o = i ? n : s;
2654
+ e = d.utils.formatNumber(
2293
2655
  e,
2294
2656
  this.selectedCountryData.iso2,
2295
2657
  o
@@ -2303,6 +2665,7 @@ class v {
2303
2665
  const e = this._getNewCountryFromNumber(t);
2304
2666
  return e !== null ? this._setCountry(e) : !1;
2305
2667
  }
2668
+ // if there is a selected country, and the number doesn't start with a dial code, then add it
2306
2669
  _ensureHasDialCode(t) {
2307
2670
  const { dialCode: e, nationalPrefix: i } = this.selectedCountryData;
2308
2671
  if (t.charAt(0) === "+" || !e)
@@ -2316,24 +2679,31 @@ class v {
2316
2679
  _getNewCountryFromNumber(t) {
2317
2680
  const e = t.indexOf("+");
2318
2681
  let i = e ? t.substring(e) : t;
2319
- const s = this.selectedCountryData.iso2, n = this.selectedCountryData.dialCode;
2682
+ const n = this.selectedCountryData.iso2, s = this.selectedCountryData.dialCode;
2320
2683
  i = this._ensureHasDialCode(i);
2321
- const o = this._getDialCode(i, !0), a = I(i);
2684
+ const o = this._getDialCode(i, !0), a = v(i);
2322
2685
  if (o) {
2323
- const d = I(o), l = this.dialCodeToIso2Map[d];
2324
- if (l.length === 1)
2325
- return l[0] === s ? null : l[0];
2326
- if (!s && this.defaultCountry && l.includes(this.defaultCountry))
2686
+ const u = v(o), r = this.dialCodeToIso2Map[u];
2687
+ if (r.length === 1)
2688
+ return r[0] === n ? null : r[0];
2689
+ if (!n && this.defaultCountry && r.includes(this.defaultCountry))
2327
2690
  return this.defaultCountry;
2328
- if (n === "1" && A(a))
2691
+ if (s === "1" && k(a))
2329
2692
  return null;
2330
- const p = this.selectedCountryData.areaCodes && a.length > d.length;
2331
- if (!(s && l.includes(s) && !p))
2332
- return l[0];
2693
+ const { areaCodes: p, priority: g } = this.selectedCountryData;
2694
+ if (p) {
2695
+ const _ = p.map((w) => `${s}${w}`);
2696
+ for (const w of _)
2697
+ if (a.startsWith(w))
2698
+ return null;
2699
+ }
2700
+ const y = p && !(g === 0) && a.length > u.length, C = n && r.includes(n) && !y, f = n === r[0];
2701
+ if (!C && !f)
2702
+ return r[0];
2333
2703
  } else {
2334
2704
  if (i.charAt(0) === "+" && a.length)
2335
2705
  return "";
2336
- if ((!i || i === "+") && !s)
2706
+ if ((!i || i === "+") && !n)
2337
2707
  return this.defaultCountry;
2338
2708
  }
2339
2709
  return null;
@@ -2342,30 +2712,30 @@ class v {
2342
2712
  _highlightListItem(t, e) {
2343
2713
  const i = this.highlightedItem;
2344
2714
  if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = t, this.highlightedItem && (this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true"), this.options.countrySearch)) {
2345
- const s = this.highlightedItem.getAttribute("id") || "";
2346
- this.searchInput.setAttribute("aria-activedescendant", s);
2715
+ const n = this.highlightedItem.getAttribute("id") || "";
2716
+ this.searchInput.setAttribute("aria-activedescendant", n);
2347
2717
  }
2348
2718
  e && this.highlightedItem.focus();
2349
2719
  }
2350
2720
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2351
2721
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2352
2722
  _setCountry(t) {
2353
- const { separateDialCode: e, showFlags: i, i18n: s } = this.options, n = this.selectedCountryData.iso2 || "";
2723
+ const { separateDialCode: e, showFlags: i, i18n: n } = this.options, s = this.selectedCountryData.iso2 || "";
2354
2724
  if (this.selectedCountryData = t ? this.countryByIso2.get(t) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountry) {
2355
2725
  const o = t && i ? `iti__flag iti__${t}` : "iti__flag iti__globe";
2356
- let a, d;
2726
+ let a, u;
2357
2727
  if (t) {
2358
- const { name: l, dialCode: h } = this.selectedCountryData;
2359
- d = l, a = s.selectedCountryAriaLabel.replace("${countryName}", l).replace("${dialCode}", `+${h}`);
2728
+ const { name: r, dialCode: h } = this.selectedCountryData;
2729
+ u = r, a = n.selectedCountryAriaLabel.replace("${countryName}", r).replace("${dialCode}", `+${h}`);
2360
2730
  } else
2361
- d = s.noCountrySelected, a = s.noCountrySelected;
2362
- this.selectedCountryInner.className = o, this.selectedCountry.setAttribute("title", d), this.selectedCountry.setAttribute("aria-label", a);
2731
+ u = n.noCountrySelected, a = n.noCountrySelected;
2732
+ this.selectedCountryInner.className = o, this.selectedCountry.setAttribute("title", u), this.selectedCountry.setAttribute("aria-label", a);
2363
2733
  }
2364
2734
  if (e) {
2365
2735
  const o = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2366
2736
  this.selectedDialCode.innerHTML = o, this._updateInputPadding();
2367
2737
  }
2368
- return this._updatePlaceholder(), this._updateMaxLength(), n !== t;
2738
+ return this._updatePlaceholder(), this._updateMaxLength(), s !== t;
2369
2739
  }
2370
2740
  //* Update the input padding to make space for the selected country/dial code.
2371
2741
  _updateInputPadding() {
@@ -2376,20 +2746,20 @@ class v {
2376
2746
  }
2377
2747
  //* Update the maximum valid number length for the currently selected country.
2378
2748
  _updateMaxLength() {
2379
- const { strictMode: t, placeholderNumberType: e, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
2380
- if (t && u.utils)
2381
- if (s) {
2382
- const n = u.utils.numberType[e];
2383
- let o = u.utils.getExampleNumber(
2384
- s,
2385
- !1,
2749
+ const { strictMode: t, placeholderNumberType: e, validationNumberTypes: i } = this.options, { iso2: n } = this.selectedCountryData;
2750
+ if (t && d.utils)
2751
+ if (n) {
2752
+ const s = d.utils.numberType[e];
2753
+ let o = d.utils.getExampleNumber(
2386
2754
  n,
2755
+ !1,
2756
+ s,
2387
2757
  !0
2388
2758
  ), a = o;
2389
- for (; u.utils.isPossibleNumber(o, s, i); )
2759
+ for (; d.utils.isPossibleNumber(o, n, i); )
2390
2760
  a = o, o += "0";
2391
- const d = u.utils.getCoreNumber(a, s);
2392
- this.maxCoreNumberLength = d.length, s === "by" && (this.maxCoreNumberLength = d.length + 1);
2761
+ const u = d.utils.getCoreNumber(a, n);
2762
+ this.maxCoreNumberLength = u.length, n === "by" && (this.maxCoreNumberLength = u.length + 1);
2393
2763
  } else
2394
2764
  this.maxCoreNumberLength = null;
2395
2765
  }
@@ -2409,10 +2779,10 @@ class v {
2409
2779
  e.style.visibility = "hidden", t.appendChild(e);
2410
2780
  const i = this.countryContainer.cloneNode();
2411
2781
  e.appendChild(i);
2412
- const s = this.selectedCountry.cloneNode(!0);
2413
- i.appendChild(s);
2414
- const n = s.offsetWidth;
2415
- return t.removeChild(e), n;
2782
+ const n = this.selectedCountry.cloneNode(!0);
2783
+ i.appendChild(n);
2784
+ const s = n.offsetWidth;
2785
+ return t.removeChild(e), s;
2416
2786
  }
2417
2787
  return 0;
2418
2788
  }
@@ -2422,42 +2792,42 @@ class v {
2422
2792
  autoPlaceholder: t,
2423
2793
  placeholderNumberType: e,
2424
2794
  nationalMode: i,
2425
- customPlaceholder: s
2426
- } = this.options, n = t === "aggressive" || !this.hadInitialPlaceholder && t === "polite";
2427
- if (u.utils && n) {
2428
- const o = u.utils.numberType[e];
2429
- let a = this.selectedCountryData.iso2 ? u.utils.getExampleNumber(
2795
+ customPlaceholder: n
2796
+ } = this.options, s = t === "aggressive" || !this.hadInitialPlaceholder && t === "polite";
2797
+ if (d.utils && s) {
2798
+ const o = d.utils.numberType[e];
2799
+ let a = this.selectedCountryData.iso2 ? d.utils.getExampleNumber(
2430
2800
  this.selectedCountryData.iso2,
2431
2801
  i,
2432
2802
  o
2433
2803
  ) : "";
2434
- a = this._beforeSetNumber(a), typeof s == "function" && (a = s(a, this.selectedCountryData)), this.telInput.setAttribute("placeholder", a);
2804
+ a = this._beforeSetNumber(a), typeof n == "function" && (a = n(a, this.selectedCountryData)), this.telInput.setAttribute("placeholder", a);
2435
2805
  }
2436
2806
  }
2437
2807
  //* Called when the user selects a list item from the dropdown.
2438
2808
  _selectListItem(t) {
2439
2809
  const e = t.getAttribute("data-country-code"), i = this._setCountry(e);
2440
2810
  this._closeDropdown();
2441
- const s = t.getAttribute("data-dial-code");
2442
- this._updateDialCode(s), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2811
+ const n = t.getAttribute("data-dial-code");
2812
+ this._updateDialCode(n), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this.telInput.focus(), i && this._triggerCountryChange();
2443
2813
  }
2444
2814
  //* Close the dropdown and unbind any listeners.
2445
2815
  _closeDropdown() {
2446
- this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.documentElement.removeEventListener(
2816
+ this.dropdownContent.classList.add("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "false"), this.highlightedItem && this.highlightedItem.setAttribute("aria-selected", "false"), this.options.countrySearch && this.searchInput.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), this.options.countrySearch && (this.searchInput.removeEventListener("input", this._handleSearchChange), this.searchClearButton.removeEventListener("click", this._handleSearchClear)), document.removeEventListener("keydown", this._handleKeydownOnDropdown), document.documentElement.removeEventListener(
2447
2817
  "click",
2448
2818
  this._handleClickOffToClose
2449
2819
  ), this.countryList.removeEventListener(
2450
2820
  "mouseover",
2451
2821
  this._handleMouseoverCountryList
2452
- ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown");
2822
+ ), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._trigger("close:countrydropdown");
2453
2823
  }
2454
2824
  //* Check if an element is visible within it's container, else scroll until it is.
2455
2825
  _scrollTo(t) {
2456
- const e = this.countryList, i = document.documentElement.scrollTop, s = e.offsetHeight, n = e.getBoundingClientRect().top + i, o = n + s, a = t.offsetHeight, d = t.getBoundingClientRect().top + i, l = d + a, h = d - n + e.scrollTop;
2457
- if (d < n)
2826
+ const e = this.countryList, i = document.documentElement.scrollTop, n = e.offsetHeight, s = e.getBoundingClientRect().top + i, o = s + n, a = t.offsetHeight, u = t.getBoundingClientRect().top + i, r = u + a, h = u - s + e.scrollTop;
2827
+ if (u < s)
2458
2828
  e.scrollTop = h;
2459
- else if (l > o) {
2460
- const p = s - a;
2829
+ else if (r > o) {
2830
+ const p = n - a;
2461
2831
  e.scrollTop = h - p;
2462
2832
  }
2463
2833
  }
@@ -2465,10 +2835,10 @@ class v {
2465
2835
  //* Note: called from _selectListItem and setCountry
2466
2836
  _updateDialCode(t) {
2467
2837
  const e = this.telInput.value, i = `+${t}`;
2468
- let s;
2838
+ let n;
2469
2839
  if (e.charAt(0) === "+") {
2470
- const n = this._getDialCode(e);
2471
- n ? s = e.replace(n, i) : s = i, this.telInput.value = s;
2840
+ const s = this._getDialCode(e);
2841
+ s ? n = e.replace(s, i) : n = i, this.telInput.value = n;
2472
2842
  }
2473
2843
  }
2474
2844
  //* Try and extract a valid international dial code from a full telephone number.
@@ -2476,17 +2846,19 @@ class v {
2476
2846
  _getDialCode(t, e) {
2477
2847
  let i = "";
2478
2848
  if (t.charAt(0) === "+") {
2479
- let s = "";
2480
- for (let n = 0; n < t.length; n++) {
2481
- const o = t.charAt(n);
2849
+ let n = "";
2850
+ for (let s = 0; s < t.length; s++) {
2851
+ const o = t.charAt(s);
2482
2852
  if (/[0-9]/.test(o)) {
2483
- if (s += o, e)
2484
- this.dialCodeToIso2Map[s] && (i = t.substring(0, n + 1));
2485
- else if (this.dialCodes.has(s)) {
2486
- i = t.substring(0, n + 1);
2853
+ if (n += o, !!!this.dialCodeToIso2Map[n])
2854
+ break;
2855
+ if (e)
2856
+ i = t.substring(0, s + 1);
2857
+ else if (this.dialCodes.has(n)) {
2858
+ i = t.substring(0, s + 1);
2487
2859
  break;
2488
2860
  }
2489
- if (s.length === this.dialCodeMaxLen)
2861
+ if (n.length === this.dialCodeMaxLen)
2490
2862
  break;
2491
2863
  }
2492
2864
  }
@@ -2496,9 +2868,9 @@ class v {
2496
2868
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2497
2869
  _getFullNumber(t) {
2498
2870
  const e = t || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2499
- let s;
2500
- const n = I(e);
2501
- return this.options.separateDialCode && e.charAt(0) !== "+" && i && n ? s = `+${i}` : s = "", s + e;
2871
+ let n;
2872
+ const s = v(e);
2873
+ return this.options.separateDialCode && e.charAt(0) !== "+" && i && s ? n = `+${i}` : n = "", n + e;
2502
2874
  }
2503
2875
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2504
2876
  _beforeSetNumber(t) {
@@ -2519,18 +2891,18 @@ class v {
2519
2891
  //**************************
2520
2892
  //* This is called when the geoip call returns.
2521
2893
  handleAutoCountry() {
2522
- this.options.initialCountry === "auto" && u.autoCountry && (this.defaultCountry = u.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2894
+ this.options.initialCountry === "auto" && d.autoCountry && (this.defaultCountry = d.autoCountry, this.selectedCountryData.iso2 || this.selectedCountryInner.classList.contains("iti__globe") || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
2523
2895
  }
2524
2896
  //* This is called when the utils request completes.
2525
2897
  handleUtils() {
2526
- u.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2898
+ d.utils && (this.telInput.value && this._updateValFromNumber(this.telInput.value), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength())), this.resolveUtilsScriptPromise();
2527
2899
  }
2528
2900
  //********************
2529
2901
  //* PUBLIC METHODS
2530
2902
  //********************
2531
2903
  //* Remove plugin.
2532
2904
  destroy() {
2533
- var n, o;
2905
+ var s, o;
2534
2906
  this.telInput.iti = void 0;
2535
2907
  const { allowDropdown: t, separateDialCode: e } = this.options;
2536
2908
  if (t) {
@@ -2545,22 +2917,22 @@ class v {
2545
2917
  a && a.removeEventListener("click", this._handleLabelClick);
2546
2918
  }
2547
2919
  const { form: i } = this.telInput;
2548
- this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2549
- const s = this.telInput.parentNode;
2550
- (n = s == null ? void 0 : s.parentNode) == null || n.insertBefore(this.telInput, s), (o = s == null ? void 0 : s.parentNode) == null || o.removeChild(s), delete u.instances[this.id];
2920
+ this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this._handlePasteEvent && this.telInput.removeEventListener("paste", this._handlePasteEvent), this._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this.telInput.removeAttribute("data-intl-tel-input-id"), e && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2921
+ const n = this.telInput.parentNode;
2922
+ (s = n == null ? void 0 : n.parentNode) == null || s.insertBefore(this.telInput, n), (o = n == null ? void 0 : n.parentNode) == null || o.removeChild(n), delete d.instances[this.id];
2551
2923
  }
2552
2924
  //* Get the extension from the current number.
2553
2925
  getExtension() {
2554
- return u.utils ? u.utils.getExtension(
2926
+ return d.utils ? d.utils.getExtension(
2555
2927
  this._getFullNumber(),
2556
2928
  this.selectedCountryData.iso2
2557
2929
  ) : "";
2558
2930
  }
2559
2931
  //* Format the number to the given format.
2560
2932
  getNumber(t) {
2561
- if (u.utils) {
2933
+ if (d.utils) {
2562
2934
  const { iso2: e } = this.selectedCountryData;
2563
- return u.utils.formatNumber(
2935
+ return d.utils.formatNumber(
2564
2936
  this._getFullNumber(),
2565
2937
  e,
2566
2938
  t
@@ -2570,7 +2942,7 @@ class v {
2570
2942
  }
2571
2943
  //* Get the type of the entered number e.g. landline/mobile.
2572
2944
  getNumberType() {
2573
- return u.utils ? u.utils.getNumberType(
2945
+ return d.utils ? d.utils.getNumberType(
2574
2946
  this._getFullNumber(),
2575
2947
  this.selectedCountryData.iso2
2576
2948
  ) : -99;
@@ -2581,9 +2953,9 @@ class v {
2581
2953
  }
2582
2954
  //* Get the validation error.
2583
2955
  getValidationError() {
2584
- if (u.utils) {
2956
+ if (d.utils) {
2585
2957
  const { iso2: t } = this.selectedCountryData;
2586
- return u.utils.getValidationError(this._getFullNumber(), t);
2958
+ return d.utils.getValidationError(this._getFullNumber(), t);
2587
2959
  }
2588
2960
  return -99;
2589
2961
  }
@@ -2596,26 +2968,26 @@ class v {
2596
2968
  return this._validateNumber(!0);
2597
2969
  }
2598
2970
  _utilsIsPossibleNumber(t) {
2599
- return u.utils ? u.utils.isPossibleNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2971
+ return d.utils ? d.utils.isPossibleNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2600
2972
  }
2601
2973
  //* Shared internal validation logic to handle alpha character extension rules.
2602
2974
  _validateNumber(t) {
2603
2975
  if (!this.selectedCountryData.iso2)
2604
2976
  return !1;
2605
- const e = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), i = this._getFullNumber(), s = i.search(new RegExp("\\p{L}", "u"));
2606
- if (s > -1 && !this.options.allowPhonewords) {
2607
- const o = i.substring(0, s), a = e(o), d = e(i);
2608
- return a && d;
2977
+ const e = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), i = this._getFullNumber(), n = i.search(new RegExp("\\p{L}", "u"));
2978
+ if (n > -1 && !this.options.allowPhonewords) {
2979
+ const o = i.substring(0, n), a = e(o), u = e(i);
2980
+ return a && u;
2609
2981
  }
2610
2982
  return e(i);
2611
2983
  }
2612
2984
  _utilsIsValidNumber(t) {
2613
- return u.utils ? u.utils.isValidNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2985
+ return d.utils ? d.utils.isValidNumber(t, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2614
2986
  }
2615
2987
  //* Update the selected country, and update the input val accordingly.
2616
2988
  setCountry(t) {
2617
2989
  const e = t == null ? void 0 : t.toLowerCase();
2618
- if (!D(e))
2990
+ if (!S(e))
2619
2991
  throw new Error(`Invalid country code: '${e}'`);
2620
2992
  const i = this.selectedCountryData.iso2;
2621
2993
  (t && e !== i || !t && i) && (this._setCountry(e), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay && this._updateValFromNumber(this.telInput.value), this._triggerCountryChange());
@@ -2633,53 +3005,53 @@ class v {
2633
3005
  this.telInput.disabled = t, t ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2634
3006
  }
2635
3007
  }
2636
- const nt = (r) => {
2637
- if (!u.utils && !u.startedLoadingUtilsScript) {
3008
+ const st = (l) => {
3009
+ if (!d.utils && !d.startedLoadingUtilsScript) {
2638
3010
  let t;
2639
- if (typeof r == "function")
3011
+ if (typeof l == "function")
2640
3012
  try {
2641
- t = Promise.resolve(r());
3013
+ t = Promise.resolve(l());
2642
3014
  } catch (e) {
2643
3015
  return Promise.reject(e);
2644
3016
  }
2645
3017
  else
2646
- return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));
2647
- return u.startedLoadingUtilsScript = !0, t.then((e) => {
3018
+ return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof l}`));
3019
+ return d.startedLoadingUtilsScript = !0, t.then((e) => {
2648
3020
  const i = e == null ? void 0 : e.default;
2649
3021
  if (!i || typeof i != "object")
2650
3022
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2651
- return u.utils = i, w("handleUtils"), !0;
3023
+ return d.utils = i, I("handleUtils"), !0;
2652
3024
  }).catch((e) => {
2653
- throw w("rejectUtilsScriptPromise", e), e;
3025
+ throw I("rejectUtilsScriptPromise", e), e;
2654
3026
  });
2655
3027
  }
2656
3028
  return null;
2657
- }, u = Object.assign(
2658
- (r, t) => {
2659
- const e = new v(r, t);
2660
- return e._init(), r.setAttribute("data-intl-tel-input-id", e.id.toString()), u.instances[e.id] = e, r.iti = e, e;
3029
+ }, d = Object.assign(
3030
+ (l, t) => {
3031
+ const e = new L(l, t);
3032
+ return e._init(), l.setAttribute("data-intl-tel-input-id", e.id.toString()), d.instances[e.id] = e, l.iti = e, e;
2661
3033
  },
2662
3034
  {
2663
- defaults: P,
3035
+ defaults: x,
2664
3036
  //* Using a static var like this allows us to mock it in the tests.
2665
3037
  documentReady: () => document.readyState === "complete",
2666
3038
  //* Get the country data object.
2667
- getCountryData: () => _,
3039
+ getCountryData: () => b,
2668
3040
  //* A getter for the plugin instance.
2669
- getInstance: (r) => {
2670
- const t = r.getAttribute("data-intl-tel-input-id");
2671
- return t ? u.instances[t] : null;
3041
+ getInstance: (l) => {
3042
+ const t = l.getAttribute("data-intl-tel-input-id");
3043
+ return t ? d.instances[t] : null;
2672
3044
  },
2673
3045
  //* A map from instance ID to instance object.
2674
3046
  instances: {},
2675
- attachUtils: nt,
3047
+ attachUtils: st,
2676
3048
  startedLoadingUtilsScript: !1,
2677
3049
  startedLoadingAutoCountry: !1,
2678
- version: "25.10.9"
3050
+ version: "25.10.11"
2679
3051
  }
2680
3052
  ), at = {
2681
3053
  __name: "IntlTelInput",
2682
- props: /* @__PURE__ */ S({
3054
+ props: /* @__PURE__ */ A({
2683
3055
  disabled: {
2684
3056
  type: Boolean,
2685
3057
  default: !1
@@ -2703,45 +3075,45 @@ const nt = (r) => {
2703
3075
  },
2704
3076
  modelModifiers: {}
2705
3077
  }),
2706
- emits: /* @__PURE__ */ S([
3078
+ emits: /* @__PURE__ */ A([
2707
3079
  "changeNumber",
2708
3080
  "changeCountry",
2709
3081
  "changeValidity",
2710
3082
  "changeErrorCode"
2711
3083
  ], ["update:modelValue"]),
2712
- setup(r, { expose: t, emit: e }) {
2713
- const i = E(r, "modelValue"), s = r, n = e, o = L(), a = L(), d = L(!1), l = () => a.value ? s.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, h = () => {
2714
- let c = l();
2715
- d.value !== c && (d.value = c, n("changeValidity", !!c), n(
3084
+ setup(l, { expose: t, emit: e }) {
3085
+ const i = E(l, "modelValue"), n = l, s = e, o = N(), a = N(), u = N(!1), r = () => a.value ? n.options.strictMode ? a.value.isValidNumberPrecise() : a.value.isValidNumber() : null, h = () => {
3086
+ let c = r();
3087
+ u.value !== c && (u.value = c, s("changeValidity", !!c), s(
2716
3088
  "changeErrorCode",
2717
3089
  c ? null : a.value.getValidationError()
2718
3090
  ));
2719
3091
  }, p = () => {
2720
3092
  var c;
2721
- n("changeNumber", ((c = a.value) == null ? void 0 : c.getNumber()) ?? ""), h();
2722
- }, f = () => {
3093
+ s("changeNumber", ((c = a.value) == null ? void 0 : c.getNumber()) ?? ""), h();
3094
+ }, g = () => {
2723
3095
  var c;
2724
- n("changeCountry", ((c = a.value) == null ? void 0 : c.getSelectedCountryData().iso2) ?? ""), p(), h();
3096
+ s("changeCountry", ((c = a.value) == null ? void 0 : c.getSelectedCountryData().iso2) ?? ""), p(), h();
2725
3097
  };
2726
3098
  return M(() => {
2727
- o.value && (a.value = u(o.value, s.options), s.value && a.value.setNumber(s.value), s.disabled && a.value.setDisabled(s.disabled), d.value = l());
3099
+ o.value && (a.value = d(o.value, n.options), n.value && a.value.setNumber(n.value), n.disabled && a.value.setDisabled(n.disabled), u.value = r());
2728
3100
  }), B(
2729
- () => s.disabled,
3101
+ () => n.disabled,
2730
3102
  (c) => {
2731
- var C;
2732
- return (C = a.value) == null ? void 0 : C.setDisabled(c);
3103
+ var y;
3104
+ return (y = a.value) == null ? void 0 : y.setDisabled(c);
2733
3105
  }
2734
3106
  ), R(() => {
2735
3107
  var c;
2736
3108
  return (c = a.value) == null ? void 0 : c.destroy();
2737
- }), t({ instance: a, input: o }), (c, C) => F((V(), z("input", $({
3109
+ }), t({ instance: a, input: o }), (c, y) => F((V(), z("input", $({
2738
3110
  ref_key: "input",
2739
3111
  ref: o,
2740
- "onUpdate:modelValue": C[0] || (C[0] = (y) => i.value = y),
3112
+ "onUpdate:modelValue": y[0] || (y[0] = (C) => i.value = C),
2741
3113
  type: "tel",
2742
- onCountrychange: f,
3114
+ onCountrychange: g,
2743
3115
  onInput: p
2744
- }, r.inputProps), null, 16)), [
3116
+ }, l.inputProps), null, 16)), [
2745
3117
  [
2746
3118
  O,
2747
3119
  i.value,