UNPKG

ngx-intl-tel-input

Version:

[![Build Status](https://github.com/webcat12345/ngx-intl-tel-input/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/webcat12345/ngx-intl-tel-input/actions/workflows/ci.yml) [![GitHub Pages](https://img.shields.io/badge/Demo-blue?logo=

1 lines 88.9 kB
{"version":3,"file":"ngx-intl-tel-input.mjs","sources":["../../../projects/ngx-intl-tel-input/src/lib/enums/country-iso.enum.ts","../../../projects/ngx-intl-tel-input/src/lib/data/country-code.ts","../../../projects/ngx-intl-tel-input/src/lib/enums/search-country-field.enum.ts","../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.validator.ts","../../../projects/ngx-intl-tel-input/src/lib/enums/phone-number-format.enum.ts","../../../projects/ngx-intl-tel-input/src/lib/directives/native-element-injector.directive.ts","../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts","../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.html","../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.module.ts","../../../projects/ngx-intl-tel-input/src/public_api.ts","../../../projects/ngx-intl-tel-input/src/ngx-intl-tel-input.ts"],"sourcesContent":["export enum CountryISO {\n Afghanistan = 'af',\n Albania = 'al',\n Algeria = 'dz',\n AmericanSamoa = 'as',\n Andorra = 'ad',\n Angola = 'ao',\n Anguilla = 'ai',\n AntiguaAndBarbuda = 'ag',\n Argentina = 'ar',\n Armenia = 'am',\n Aruba = 'aw',\n Australia = 'au',\n Austria = 'at',\n Azerbaijan = 'az',\n Bahamas = 'bs',\n Bahrain = 'bh',\n Bangladesh = 'bd',\n Barbados = 'bb',\n Belarus = 'by',\n Belgium = 'be',\n Belize = 'bz',\n Benin = 'bj',\n Bermuda = 'bm',\n Bhutan = 'bt',\n Bolivia = 'bo',\n BosniaAndHerzegovina = 'ba',\n Botswana = 'bw',\n Brazil = 'br',\n BritishIndianOceanTerritory = 'io',\n BritishVirginIslands = 'vg',\n Brunei = 'bn',\n Bulgaria = 'bg',\n BurkinaFaso = 'bf',\n Burundi = 'bi',\n Cambodia = 'kh',\n Cameroon = 'cm',\n Canada = 'ca',\n CapeVerde = 'cv',\n CaribbeanNetherlands = 'bq',\n CaymanIslands = 'ky',\n CentralAfricanRepublic = 'cf',\n Chad = 'td',\n Chile = 'cl',\n China = 'cn',\n ChristmasIsland = 'cx',\n Cocos = 'cc',\n Colombia = 'co',\n Comoros = 'km',\n CongoDRCJamhuriYaKidemokrasiaYaKongo = 'cd',\n CongoRepublicCongoBrazzaville = 'cg',\n CookIslands = 'ck',\n CostaRica = 'cr',\n CôteDIvoire = 'ci',\n Croatia = 'hr',\n Cuba = 'cu',\n Curaçao = 'cw',\n Cyprus = 'cy',\n CzechRepublic = 'cz',\n Denmark = 'dk',\n Djibouti = 'dj',\n Dominica = 'dm',\n DominicanRepublic = 'do',\n Ecuador = 'ec',\n Egypt = 'eg',\n ElSalvador = 'sv',\n EquatorialGuinea = 'gq',\n Eritrea = 'er',\n Estonia = 'ee',\n Ethiopia = 'et',\n FalklandIslands = 'fk',\n FaroeIslands = 'fo',\n Fiji = 'fj',\n Finland = 'fi',\n France = 'fr',\n FrenchGuiana = 'gf',\n FrenchPolynesia = 'pf',\n Gabon = 'ga',\n Gambia = 'gm',\n Georgia = 'ge',\n Germany = 'de',\n Ghana = 'gh',\n Gibraltar = 'gi',\n Greece = 'gr',\n Greenland = 'gl',\n Grenada = 'gd',\n Guadeloupe = 'gp',\n Guam = 'gu',\n Guatemala = 'gt',\n Guernsey = 'gg',\n Guinea = 'gn',\n GuineaBissau = 'gw',\n Guyana = 'gy',\n Haiti = 'ht',\n Honduras = 'hn',\n HongKong = 'hk',\n Hungary = 'hu',\n Iceland = 'is',\n India = 'in',\n Indonesia = 'id',\n Iran = 'ir',\n Iraq = 'iq',\n Ireland = 'ie',\n IsleOfMan = 'im',\n Israel = 'il',\n Italy = 'it',\n Jamaica = 'jm',\n Japan = 'jp',\n Jersey = 'je',\n Jordan = 'jo',\n Kazakhstan = 'kz',\n Kenya = 'ke',\n Kiribati = 'ki',\n Kosovo = 'xk',\n Kuwait = 'kw',\n Kyrgyzstan = 'kg',\n Laos = 'la',\n Latvia = 'lv',\n Lebanon = 'lb',\n Lesotho = 'ls',\n Liberia = 'lr',\n Libya = 'ly',\n Liechtenstein = 'li',\n Lithuania = 'lt',\n Luxembourg = 'lu',\n Macau = 'mo',\n Macedonia = 'mk',\n Madagascar = 'mg',\n Malawi = 'mw',\n Malaysia = 'my',\n Maldives = 'mv',\n Mali = 'ml',\n Malta = 'mt',\n MarshallIslands = 'mh',\n Martinique = 'mq',\n Mauritania = 'mr',\n Mauritius = 'mu',\n Mayotte = 'yt',\n Mexico = 'mx',\n Micronesia = 'fm',\n Moldova = 'md',\n Monaco = 'mc',\n Mongolia = 'mn',\n Montenegro = 'me',\n Montserrat = 'ms',\n Morocco = 'ma',\n Mozambique = 'mz',\n Myanmar = 'mm',\n Namibia = 'na',\n Nauru = 'nr',\n Nepal = 'np',\n Netherlands = 'nl',\n NewCaledonia = 'nc',\n NewZealand = 'nz',\n Nicaragua = 'ni',\n Niger = 'ne',\n Nigeria = 'ng',\n Niue = 'nu',\n NorfolkIsland = 'nf',\n NorthKorea = 'kp',\n NorthernMarianaIslands = 'mp',\n Norway = 'no',\n Oman = 'om',\n Pakistan = 'pk',\n Palau = 'pw',\n Palestine = 'ps',\n Panama = 'pa',\n PapuaNewGuinea = 'pg',\n Paraguay = 'py',\n Peru = 'pe',\n Philippines = 'ph',\n Poland = 'pl',\n Portugal = 'pt',\n PuertoRico = 'pr',\n Qatar = 'qa',\n Réunion = 're',\n Romania = 'ro',\n Russia = 'ru',\n Rwanda = 'rw',\n SaintBarthélemy = 'bl',\n SaintHelena = 'sh',\n SaintKittsAndNevis = 'kn',\n SaintLucia = 'lc',\n SaintMartin = 'mf',\n SaintPierreAndMiquelon = 'pm',\n SaintVincentAndTheGrenadines = 'vc',\n Samoa = 'ws',\n SanMarino = 'sm',\n SãoToméAndPríncipe = 'st',\n SaudiArabia = 'sa',\n Senegal = 'sn',\n Serbia = 'rs',\n Seychelles = 'sc',\n SierraLeone = 'sl',\n Singapore = 'sg',\n SintMaarten = 'sx',\n Slovakia = 'sk',\n Slovenia = 'si',\n SolomonIslands = 'sb',\n Somalia = 'so',\n SouthAfrica = 'za',\n SouthKorea = 'kr',\n SouthSudan = 'ss',\n Spain = 'es',\n SriLanka = 'lk',\n Sudan = 'sd',\n Suriname = 'sr',\n SvalbardAndJanMayen = 'sj',\n Swaziland = 'sz',\n Sweden = 'se',\n Switzerland = 'ch',\n Syria = 'sy',\n Taiwan = 'tw',\n Tajikistan = 'tj',\n Tanzania = 'tz',\n Thailand = 'th',\n TimorLeste = 'tl',\n Togo = 'tg',\n Tokelau = 'tk',\n Tonga = 'to',\n TrinidadAndTobago = 'tt',\n Tunisia = 'tn',\n Turkey = 'tr',\n Turkmenistan = 'tm',\n TurksAndCaicosIslands = 'tc',\n Tuvalu = 'tv',\n USVirginIslands = 'vi',\n Uganda = 'ug',\n Ukraine = 'ua',\n UnitedArabEmirates = 'ae',\n UnitedKingdom = 'gb',\n UnitedStates = 'us',\n Uruguay = 'uy',\n Uzbekistan = 'uz',\n Vanuatu = 'vu',\n VaticanCity = 'va',\n Venezuela = 've',\n Vietnam = 'vn',\n WallisAndFutuna = 'wf',\n WesternSahara = 'eh',\n Yemen = 'ye',\n Zambia = 'zm',\n Zimbabwe = 'zw',\n ÅlandIslands = 'ax',\n}\n","import { Injectable } from '@angular/core';\nimport { CountryISO } from '../enums/country-iso.enum';\n\n@Injectable()\nexport class CountryCode {\n public allCountries = [\n ['Afghanistan (‫افغانستان‬‎)', CountryISO.Afghanistan, '93'],\n ['Albania (Shqipëri)', CountryISO.Albania, '355'],\n ['Algeria (‫الجزائر‬‎)', CountryISO.Algeria, '213'],\n ['American Samoa', 'as', '1', 1, ['684']],\n ['Andorra', CountryISO.Andorra, '376'],\n ['Angola', CountryISO.Angola, '244'],\n ['Anguilla', 'ai', '1', 1, ['264']],\n ['Antigua and Barbuda', 'ag', '1', 1, ['268']],\n ['Argentina', CountryISO.Argentina, '54'],\n ['Armenia (Հայաստան)', CountryISO.Armenia, '374'],\n ['Aruba', CountryISO.Aruba, '297'],\n ['Australia', CountryISO.Australia, '61', 0],\n ['Austria (Österreich)', CountryISO.Austria, '43'],\n ['Azerbaijan (Azərbaycan)', CountryISO.Azerbaijan, '994'],\n ['Bahamas', 'bs', '1', 1, ['242']],\n ['Bahrain (‫البحرين‬‎)', CountryISO.Bahrain, '973'],\n ['Bangladesh (বাংলাদেশ)', CountryISO.Bangladesh, '880'],\n ['Barbados', 'bb', '1', 1, ['246']],\n ['Belarus (Беларусь)', CountryISO.Belarus, '375'],\n ['Belgium (België)', CountryISO.Belgium, '32'],\n ['Belize', CountryISO.Belize, '501'],\n ['Benin (Bénin)', CountryISO.Benin, '229'],\n ['Bermuda', 'bm', '1', 1, ['441']],\n ['Bhutan (འབྲུག)', CountryISO.Bhutan, '975'],\n ['Bolivia', CountryISO.Bolivia, '591'],\n ['Bosnia and Herzegovina (Босна и Херцеговина)', CountryISO.BosniaAndHerzegovina, '387'],\n ['Botswana', CountryISO.Botswana, '267'],\n ['Brazil (Brasil)', CountryISO.Brazil, '55'],\n ['British Indian Ocean Territory', CountryISO.BritishIndianOceanTerritory, '246'],\n ['British Virgin Islands', 'vg', '1', 1, ['284']],\n ['Brunei', CountryISO.Brunei, '673'],\n ['Bulgaria (България)', CountryISO.Bulgaria, '359'],\n ['Burkina Faso', CountryISO.BurkinaFaso, '226'],\n ['Burundi (Uburundi)', CountryISO.Burundi, '257'],\n ['Cambodia (កម្ពុជា)', CountryISO.Cambodia, '855'],\n ['Cameroon (Cameroun)', CountryISO.Cameroon, '237'],\n [\n 'Canada',\n CountryISO.Canada,\n '1',\n 1,\n [\n '204',\n '226',\n '236',\n '249',\n '250',\n '289',\n '306',\n '343',\n '365',\n '387',\n '403',\n '416',\n '418',\n '431',\n '437',\n '438',\n '450',\n '506',\n '514',\n '519',\n '548',\n '579',\n '581',\n '587',\n '604',\n '613',\n '639',\n '647',\n '672',\n '705',\n '709',\n '742',\n '778',\n '780',\n '782',\n '807',\n '819',\n '825',\n '867',\n '873',\n '902',\n '905',\n ],\n ],\n ['Cape Verde (Kabu Verdi)', CountryISO.CapeVerde, '238'],\n ['Caribbean Netherlands', CountryISO.CaribbeanNetherlands, '599', 1],\n ['Cayman Islands', 'ky', '1', 1, ['345']],\n [\n 'Central African Republic (République centrafricaine)',\n CountryISO.CentralAfricanRepublic,\n '236',\n ],\n ['Chad (Tchad)', CountryISO.Chad, '235'],\n ['Chile', CountryISO.Chile, '56'],\n ['China (中国)', CountryISO.China, '86'],\n ['Christmas Island', CountryISO.ChristmasIsland, '61', 2],\n ['Cocos (Keeling) Islands', CountryISO.Cocos, '61', 1],\n ['Colombia', CountryISO.Colombia, '57'],\n ['Comoros (‫جزر القمر‬‎)', CountryISO.Comoros, '269'],\n [\n 'Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)',\n CountryISO.CongoDRCJamhuriYaKidemokrasiaYaKongo,\n '243',\n ],\n ['Congo (Republic) (Congo-Brazzaville)', CountryISO.CongoRepublicCongoBrazzaville, '242'],\n ['Cook Islands', CountryISO.CookIslands, '682'],\n ['Costa Rica', CountryISO.CostaRica, '506'],\n ['Côte d’Ivoire', CountryISO.CôteDIvoire, '225'],\n ['Croatia (Hrvatska)', CountryISO.Croatia, '385'],\n ['Cuba', CountryISO.Cuba, '53'],\n ['Curaçao', CountryISO.Curaçao, '599', 0],\n ['Cyprus (Κύπρος)', CountryISO.Cyprus, '357'],\n ['Czech Republic (Česká republika)', CountryISO.CzechRepublic, '420'],\n ['Denmark (Danmark)', CountryISO.Denmark, '45'],\n ['Djibouti', CountryISO.Djibouti, '253'],\n ['Dominica', CountryISO.Dominica, '1767'],\n [\n 'Dominican Republic (República Dominicana)',\n CountryISO.DominicanRepublic,\n '1',\n 2,\n ['809', '829', '849'],\n ],\n ['Ecuador', CountryISO.Ecuador, '593'],\n ['Egypt (‫مصر‬‎)', CountryISO.Egypt, '20'],\n ['El Salvador', CountryISO.ElSalvador, '503'],\n ['Equatorial Guinea (Guinea Ecuatorial)', CountryISO.EquatorialGuinea, '240'],\n ['Eritrea', CountryISO.Eritrea, '291'],\n ['Estonia (Eesti)', CountryISO.Estonia, '372'],\n ['Ethiopia', CountryISO.Ethiopia, '251'],\n ['Falkland Islands (Islas Malvinas)', CountryISO.FalklandIslands, '500'],\n ['Faroe Islands (Føroyar)', CountryISO.FaroeIslands, '298'],\n ['Fiji', CountryISO.Fiji, '679'],\n ['Finland (Suomi)', CountryISO.Finland, '358', 0],\n ['France', CountryISO.France, '33'],\n ['French Guiana (Guyane française)', CountryISO.FrenchGuiana, '594'],\n ['French Polynesia (Polynésie française)', CountryISO.FrenchPolynesia, '689'],\n ['Gabon', CountryISO.Gabon, '241'],\n ['Gambia', CountryISO.Gambia, '220'],\n ['Georgia (საქართველო)', CountryISO.Georgia, '995'],\n ['Germany (Deutschland)', CountryISO.Germany, '49'],\n ['Ghana (Gaana)', CountryISO.Ghana, '233'],\n ['Gibraltar', CountryISO.Gibraltar, '350'],\n ['Greece (Ελλάδα)', CountryISO.Greece, '30'],\n ['Greenland (Kalaallit Nunaat)', CountryISO.Greenland, '299'],\n ['Grenada', CountryISO.Grenada, '1473'],\n ['Guadeloupe', CountryISO.Guadeloupe, '590', 0],\n ['Guam', 'gu', '1', 1, ['671']],\n ['Guatemala', CountryISO.Guatemala, '502'],\n ['Guernsey', CountryISO.Guernsey, '44', 1, [1481]],\n ['Guinea (Guinée)', CountryISO.Guinea, '224'],\n ['Guinea-Bissau (Guiné Bissau)', CountryISO.GuineaBissau, '245'],\n ['Guyana', CountryISO.Guyana, '592'],\n ['Haiti', CountryISO.Haiti, '509'],\n ['Honduras', CountryISO.Honduras, '504'],\n ['Hong Kong (香港)', CountryISO.HongKong, '852'],\n ['Hungary (Magyarország)', CountryISO.Hungary, '36'],\n ['Iceland (Ísland)', CountryISO.Iceland, '354'],\n ['India (भारत)', CountryISO.India, '91'],\n ['Indonesia', CountryISO.Indonesia, '62'],\n ['Iran (‫ایران‬‎)', CountryISO.Iran, '98'],\n ['Iraq (‫العراق‬‎)', CountryISO.Iraq, '964'],\n ['Ireland', CountryISO.Ireland, '353'],\n ['Isle of Man', CountryISO.IsleOfMan, '44', 2, [1624]],\n ['Israel (‫ישראל‬‎)', CountryISO.Israel, '972'],\n ['Italy (Italia)', CountryISO.Italy, '39', 0],\n ['Jamaica', 'jm', '1', 1, ['876']],\n ['Japan (日本)', CountryISO.Japan, '81'],\n ['Jersey', CountryISO.Jersey, '44', 3, [1534]],\n ['Jordan (‫الأردن‬‎)', CountryISO.Jordan, '962'],\n ['Kazakhstan (Казахстан)', CountryISO.Kazakhstan, '7', 1],\n ['Kenya', CountryISO.Kenya, '254'],\n ['Kiribati', CountryISO.Kiribati, '686'],\n ['Kosovo', CountryISO.Kosovo, '383'],\n ['Kuwait (‫الكويت‬‎)', CountryISO.Kuwait, '965'],\n ['Kyrgyzstan (Кыргызстан)', CountryISO.Kyrgyzstan, '996'],\n ['Laos (ລາວ)', CountryISO.Laos, '856'],\n ['Latvia (Latvija)', CountryISO.Latvia, '371'],\n ['Lebanon (‫لبنان‬‎)', CountryISO.Lebanon, '961'],\n ['Lesotho', CountryISO.Lesotho, '266'],\n ['Liberia', CountryISO.Liberia, '231'],\n ['Libya (‫ليبيا‬‎)', CountryISO.Libya, '218'],\n ['Liechtenstein', CountryISO.Liechtenstein, '423'],\n ['Lithuania (Lietuva)', CountryISO.Lithuania, '370'],\n ['Luxembourg', CountryISO.Luxembourg, '352'],\n ['Macau (澳門)', CountryISO.Macau, '853'],\n ['Macedonia (FYROM) (Македонија)', CountryISO.Macedonia, '389'],\n ['Madagascar (Madagasikara)', CountryISO.Madagascar, '261'],\n ['Malawi', CountryISO.Malawi, '265'],\n ['Malaysia', CountryISO.Malaysia, '60'],\n ['Maldives', CountryISO.Maldives, '960'],\n ['Mali', CountryISO.Mali, '223'],\n ['Malta', CountryISO.Malta, '356'],\n ['Marshall Islands', CountryISO.MarshallIslands, '692'],\n ['Martinique', CountryISO.Martinique, '596'],\n ['Mauritania (‫موريتانيا‬‎)', CountryISO.Mauritania, '222'],\n ['Mauritius (Moris)', CountryISO.Mauritius, '230'],\n ['Mayotte', CountryISO.Mayotte, '262', 1],\n ['Mexico (México)', CountryISO.Mexico, '52'],\n ['Micronesia', CountryISO.Micronesia, '691'],\n ['Moldova (Republica Moldova)', CountryISO.Moldova, '373'],\n ['Monaco', CountryISO.Monaco, '377'],\n ['Mongolia (Монгол)', CountryISO.Mongolia, '976'],\n ['Montenegro (Crna Gora)', CountryISO.Montenegro, '382'],\n ['Montserrat', 'ms', '1', 1, ['664']],\n ['Morocco (‫المغرب‬‎)', CountryISO.Morocco, '212', 0],\n ['Mozambique (Moçambique)', CountryISO.Mozambique, '258'],\n ['Myanmar (Burma) (မြန်မာ)', CountryISO.Myanmar, '95'],\n ['Namibia (Namibië)', CountryISO.Namibia, '264'],\n ['Nauru', CountryISO.Nauru, '674'],\n ['Nepal (नेपाल)', CountryISO.Nepal, '977'],\n ['Netherlands (Nederland)', CountryISO.Netherlands, '31'],\n ['New Caledonia (Nouvelle-Calédonie)', CountryISO.NewCaledonia, '687'],\n ['New Zealand', CountryISO.NewZealand, '64'],\n ['Nicaragua', CountryISO.Nicaragua, '505'],\n ['Niger (Nijar)', CountryISO.Niger, '227'],\n ['Nigeria', CountryISO.Nigeria, '234'],\n ['Niue', CountryISO.Niue, '683'],\n ['Norfolk Island', CountryISO.NorfolkIsland, '672'],\n ['North Korea (조선 민주주의 인민 공화국)', CountryISO.NorthKorea, '850'],\n ['Northern Mariana Islands', CountryISO.NorthernMarianaIslands, '1670'],\n ['Norway (Norge)', CountryISO.Norway, '47', 0],\n ['Oman (‫عُمان‬‎)', CountryISO.Oman, '968'],\n ['Pakistan (‫پاکستان‬‎)', CountryISO.Pakistan, '92'],\n ['Palau', CountryISO.Palau, '680'],\n ['Palestine (‫فلسطين‬‎)', CountryISO.Palestine, '970'],\n ['Panama (Panamá)', CountryISO.Panama, '507'],\n ['Papua New Guinea', CountryISO.PapuaNewGuinea, '675'],\n ['Paraguay', CountryISO.Paraguay, '595'],\n ['Peru (Perú)', CountryISO.Peru, '51'],\n ['Philippines', CountryISO.Philippines, '63'],\n ['Poland (Polska)', CountryISO.Poland, '48'],\n ['Portugal', CountryISO.Portugal, '351'],\n ['Puerto Rico', CountryISO.PuertoRico, '1', 3, ['787', '939']],\n ['Qatar (‫قطر‬‎)', CountryISO.Qatar, '974'],\n ['Réunion (La Réunion)', CountryISO.Réunion, '262', 0],\n ['Romania (România)', CountryISO.Romania, '40'],\n ['Russia (Россия)', CountryISO.Russia, '7', 0],\n ['Rwanda', CountryISO.Rwanda, '250'],\n ['Saint Barthélemy (Saint-Barthélemy)', CountryISO.SaintBarthélemy, '590', 1],\n ['Saint Helena', CountryISO.SaintHelena, '290'],\n ['Saint Kitts and Nevis', CountryISO.SaintKittsAndNevis, '1869'],\n ['Saint Lucia', 'lc', '1', 1, ['758']],\n ['Saint Martin (Saint-Martin (partie française))', CountryISO.SaintMartin, '590', 2],\n [\n 'Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)',\n CountryISO.SaintPierreAndMiquelon,\n '508',\n ],\n ['Saint Vincent and the Grenadines', 'vc', '1', 1, ['784']],\n ['Samoa', CountryISO.Samoa, '685'],\n ['San Marino', CountryISO.SanMarino, '378'],\n ['São Tomé and Príncipe (São Tomé e Príncipe)', CountryISO.SãoToméAndPríncipe, '239'],\n ['Saudi Arabia (‫المملكة العربية السعودية‬‎)', CountryISO.SaudiArabia, '966'],\n ['Senegal (Sénégal)', CountryISO.Senegal, '221'],\n ['Serbia (Србија)', CountryISO.Serbia, '381'],\n ['Seychelles', CountryISO.Seychelles, '248'],\n ['Sierra Leone', CountryISO.SierraLeone, '232'],\n ['Singapore', CountryISO.Singapore, '65'],\n ['Sint Maarten', 'sx', '1', 1, ['721']],\n ['Slovakia (Slovensko)', CountryISO.Slovakia, '421'],\n ['Slovenia (Slovenija)', CountryISO.Slovenia, '386'],\n ['Solomon Islands', CountryISO.SolomonIslands, '677'],\n ['Somalia (Soomaaliya)', CountryISO.Somalia, '252'],\n ['South Africa', CountryISO.SouthAfrica, '27'],\n ['South Korea (대한민국)', CountryISO.SouthKorea, '82'],\n ['South Sudan (‫جنوب السودان‬‎)', CountryISO.SouthSudan, '211'],\n ['Spain (España)', CountryISO.Spain, '34'],\n ['Sri Lanka (ශ්‍රී ලංකාව)', CountryISO.SriLanka, '94'],\n ['Sudan (‫السودان‬‎)', CountryISO.Sudan, '249'],\n ['Suriname', CountryISO.Suriname, '597'],\n ['Svalbard and Jan Mayen', CountryISO.SvalbardAndJanMayen, '47', 1],\n ['Swaziland', CountryISO.Swaziland, '268'],\n ['Sweden (Sverige)', CountryISO.Sweden, '46'],\n ['Switzerland (Schweiz)', CountryISO.Switzerland, '41'],\n ['Syria (‫سوريا‬‎)', CountryISO.Syria, '963'],\n ['Taiwan (台灣)', CountryISO.Taiwan, '886'],\n ['Tajikistan', CountryISO.Tajikistan, '992'],\n ['Tanzania', CountryISO.Tanzania, '255'],\n ['Thailand (ไทย)', CountryISO.Thailand, '66'],\n ['Timor-Leste', CountryISO.TimorLeste, '670'],\n ['Togo', CountryISO.Togo, '228'],\n ['Tokelau', CountryISO.Tokelau, '690'],\n ['Tonga', CountryISO.Tonga, '676'],\n ['Trinidad and Tobago', 'tt', '1', 1, ['868']],\n ['Tunisia (‫تونس‬‎)', CountryISO.Tunisia, '216'],\n ['Turkey (Türkiye)', CountryISO.Turkey, '90'],\n ['Turkmenistan', CountryISO.Turkmenistan, '993'],\n ['Turks and Caicos Islands', CountryISO.TurksAndCaicosIslands, '1649'],\n ['Tuvalu', CountryISO.Tuvalu, '688'],\n ['U.S. Virgin Islands', 'vi', '1', 1, ['340']],\n ['Uganda', CountryISO.Uganda, '256'],\n ['Ukraine (Україна)', CountryISO.Ukraine, '380'],\n ['United Arab Emirates (‫الإمارات العربية المتحدة‬‎)', CountryISO.UnitedArabEmirates, '971'],\n ['United Kingdom', CountryISO.UnitedKingdom, '44', 0],\n ['United States', CountryISO.UnitedStates, '1', 0],\n ['Uruguay', CountryISO.Uruguay, '598'],\n ['Uzbekistan (Oʻzbekiston)', CountryISO.Uzbekistan, '998'],\n ['Vanuatu', CountryISO.Vanuatu, '678'],\n ['Vatican City (Città del Vaticano)', CountryISO.VaticanCity, '39', 1],\n ['Venezuela', CountryISO.Venezuela, '58'],\n ['Vietnam (Việt Nam)', CountryISO.Vietnam, '84'],\n ['Wallis and Futuna', CountryISO.WallisAndFutuna, '681'],\n ['Western Sahara (‫الصحراء الغربية‬‎)', CountryISO.WesternSahara, '212', 1],\n ['Yemen (‫اليمن‬‎)', CountryISO.Yemen, '967'],\n ['Zambia', CountryISO.Zambia, '260'],\n ['Zimbabwe', CountryISO.Zimbabwe, '263'],\n ['Åland Islands', CountryISO.ÅlandIslands, '358', 1],\n ];\n}\n","export enum SearchCountryField {\n DialCode = 'dialCode',\n Iso2 = 'iso2',\n Name = 'name',\n All = 'all',\n}\n","import * as lpn from 'google-libphonenumber';\n\n/*\nWe use \"control: any\" instead of \"control: FormControl\" to silence:\n\"Property 'nativeElement' does not exist on type 'FormControl'\".\nThis happens because I've expanded control with nativeElement via\n'NativeElementInjectorDirective' to get an access to the element.\nMore about this approach and reasons for this:\nhttps://github.com/angular/angular/issues/18025\nhttps://stackoverflow.com/a/54075119/1617590\n*/\nexport const phoneNumberValidator = (control: any) => {\n if (!control.value) {\n return;\n }\n // Find <input> inside injected nativeElement and get its \"id\".\n const el: HTMLElement = control.nativeElement as HTMLElement;\n const inputBox: HTMLInputElement | any = el ? el.querySelector('input[type=\"tel\"]') : undefined;\n if (inputBox) {\n const id = inputBox.id;\n const isCheckValidation = inputBox.getAttribute('validation');\n if (isCheckValidation === 'true') {\n const isRequired = control.errors && control.errors.required === true;\n const error = { validatePhoneNumber: { valid: false } };\n\n inputBox.setCustomValidity('Invalid field.');\n\n let number: lpn.PhoneNumber;\n\n try {\n number = lpn.PhoneNumberUtil.getInstance().parse(\n control.value.number,\n control.value.countryCode\n );\n } catch (e) {\n if (isRequired) {\n return error;\n } else {\n inputBox.setCustomValidity('');\n }\n }\n\n if (control.value) {\n // @ts-ignore\n if (!number) {\n return error;\n } else {\n if (\n !lpn.PhoneNumberUtil.getInstance().isValidNumberForRegion(\n number,\n control.value.countryCode\n )\n ) {\n return error;\n } else {\n inputBox.setCustomValidity('');\n }\n }\n }\n } else if (isCheckValidation === 'false') {\n inputBox.setCustomValidity('');\n\n control.clearValidators();\n }\n }\n return;\n};\n","export enum PhoneNumberFormat {\n International = 'INTERNATIONAL',\n National = 'NATIONAL',\n}\n","import { Directive, ElementRef, OnInit } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\n/*\n\"Property 'nativeElement' does not exist on type 'FormControl'\".\n'NativeElementInjectorDirective' injects nativeElement to each control,\nso we can access it from inside validator for example.\nMore about this approach and reasons for this:\nhttps://github.com/angular/angular/issues/18025\nhttps://stackoverflow.com/a/54075119/1617590\n*/\n@Directive({\n // tslint:disable-next-line: directive-selector\n selector: '[ngModel], [formControl], [formControlName]',\n})\nexport class NativeElementInjectorDirective implements OnInit {\n constructor(private controlDir: NgControl, private host: ElementRef<HTMLFormElement>) {}\n ngOnInit() {\n if (this.controlDir.control) {\n // @ts-ignore\n this.controlDir.control['nativeElement'] = this.host.nativeElement;\n }\n }\n}\n","import * as lpn from 'google-libphonenumber';\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { setTheme } from 'ngx-bootstrap/utils';\n\nimport { CountryCode } from './data/country-code';\nimport { CountryISO } from './enums/country-iso.enum';\nimport { SearchCountryField } from './enums/search-country-field.enum';\nimport { ChangeData } from './interfaces/change-data';\nimport { Country } from './model/country.model';\nimport { phoneNumberValidator } from './ngx-intl-tel-input.validator';\nimport { PhoneNumberFormat } from './enums/phone-number-format.enum';\n\n@Component({\n // tslint:disable-next-line: component-selector\n selector: 'ngx-intl-tel-input',\n templateUrl: './ngx-intl-tel-input.component.html',\n styleUrls: ['./bootstrap-dropdown.css', './ngx-intl-tel-input.component.css'],\n providers: [\n CountryCode,\n {\n provide: NG_VALUE_ACCESSOR,\n // tslint:disable-next-line:no-forward-ref\n useExisting: forwardRef(() => NgxIntlTelInputComponent),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useValue: phoneNumberValidator,\n multi: true,\n },\n ],\n})\nexport class NgxIntlTelInputComponent implements OnInit, OnChanges {\n @Input() value: string | undefined = '';\n @Input() preferredCountries: Array<string> = [];\n @Input() enablePlaceholder = true;\n @Input() customPlaceholder: string;\n @Input() numberFormat: PhoneNumberFormat = PhoneNumberFormat.International;\n @Input() cssClass = 'form-control';\n @Input() onlyCountries: Array<string> = [];\n @Input() enableAutoCountrySelect = true;\n @Input() searchCountryFlag = false;\n @Input() searchCountryField: SearchCountryField[] = [SearchCountryField.All];\n @Input() searchCountryPlaceholder = 'Search Country';\n @Input() maxLength: number;\n @Input() selectFirstCountry = true;\n @Input() selectedCountryISO: CountryISO;\n @Input() phoneValidation = true;\n @Input() inputId = 'phone';\n @Input() separateDialCode = false;\n separateDialCodeClass: string;\n\n @Output() readonly countryChange = new EventEmitter<Country>();\n\n selectedCountry: Country = {\n areaCodes: undefined,\n dialCode: '',\n htmlId: '',\n flagClass: '',\n iso2: '',\n name: '',\n placeHolder: '',\n priority: 0,\n };\n\n phoneNumber: string | undefined = '';\n allCountries: Array<Country> = [];\n preferredCountriesInDropDown: Array<Country> = [];\n // Has to be 'any' to prevent a need to install @types/google-libphonenumber by the package user...\n phoneUtil: any = lpn.PhoneNumberUtil.getInstance();\n disabled = false;\n errors: Array<any> = ['Phone number is required.'];\n countrySearchText = '';\n\n @ViewChild('countryList') countryList: ElementRef;\n\n onTouched = () => {};\n propagateChange = (_: ChangeData) => {};\n\n constructor(private countryCodeData: CountryCode) {\n // If this is not set, ngx-bootstrap will try to use the bs3 CSS (which is not what we've embedded) and will\n // Add the wrong classes and such\n setTheme('bs4');\n }\n\n ngOnInit() {\n this.init();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const selectedISO = changes['selectedCountryISO'];\n if (\n this.allCountries &&\n selectedISO &&\n selectedISO.currentValue !== selectedISO.previousValue\n ) {\n this.updateSelectedCountry();\n }\n if (changes['preferredCountries']) {\n this.updatePreferredCountries();\n }\n this.checkSeparateDialCodeStyle();\n }\n\n /*\n This is a wrapper method to avoid calling this.ngOnInit() in writeValue().\n Ref: http://codelyzer.com/rules/no-life-cycle-call/\n */\n init() {\n this.fetchCountryData();\n if (this.preferredCountries.length) {\n this.updatePreferredCountries();\n }\n if (this.onlyCountries.length) {\n this.allCountries = this.allCountries.filter(c => this.onlyCountries.includes(c.iso2));\n }\n if (this.selectFirstCountry) {\n if (this.preferredCountriesInDropDown.length) {\n this.setSelectedCountry(this.preferredCountriesInDropDown[0]);\n } else {\n this.setSelectedCountry(this.allCountries[0]);\n }\n }\n this.updateSelectedCountry();\n this.checkSeparateDialCodeStyle();\n }\n\n setSelectedCountry(country: Country) {\n this.selectedCountry = country;\n this.countryChange.emit(country);\n }\n\n /**\n * Search country based on country name, iso2, dialCode or all of them.\n */\n public searchCountry() {\n if (!this.countrySearchText) {\n this.countryList.nativeElement.querySelector('.iti__country-list li').scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n });\n return;\n }\n const countrySearchTextLower = this.countrySearchText.toLowerCase();\n // @ts-ignore\n const country = this.allCountries.filter(c => {\n if (this.searchCountryField.indexOf(SearchCountryField.All) > -1) {\n // Search in all fields\n if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) {\n return c;\n }\n if (c.name.toLowerCase().startsWith(countrySearchTextLower)) {\n return c;\n }\n if (c.dialCode.startsWith(this.countrySearchText)) {\n return c;\n }\n } else {\n // Or search by specific SearchCountryField(s)\n if (this.searchCountryField.indexOf(SearchCountryField.Iso2) > -1) {\n if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) {\n return c;\n }\n }\n if (this.searchCountryField.indexOf(SearchCountryField.Name) > -1) {\n if (c.name.toLowerCase().startsWith(countrySearchTextLower)) {\n return c;\n }\n }\n if (this.searchCountryField.indexOf(SearchCountryField.DialCode) > -1) {\n if (c.dialCode.startsWith(this.countrySearchText)) {\n return c;\n }\n }\n }\n });\n\n if (country.length > 0) {\n const el = this.countryList.nativeElement.querySelector('#' + country[0].htmlId);\n if (el) {\n el.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }\n\n this.checkSeparateDialCodeStyle();\n }\n\n public onPhoneNumberChange(): void {\n let countryCode: string | undefined;\n // Handle the case where the user sets the value programatically based on a persisted ChangeData obj.\n if (this.phoneNumber && typeof this.phoneNumber === 'object') {\n const numberObj: ChangeData = this.phoneNumber;\n this.phoneNumber = numberObj.number;\n countryCode = numberObj.countryCode;\n }\n\n this.value = this.phoneNumber;\n countryCode = countryCode || this.selectedCountry.iso2;\n // @ts-ignore\n const number = this.getParsedNumber(this.phoneNumber, countryCode);\n\n // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)\n if (this.enableAutoCountrySelect) {\n countryCode =\n number && number.getCountryCode()\n ? // @ts-ignore\n this.getCountryIsoCode(number.getCountryCode(), number)\n : this.selectedCountry.iso2;\n if (countryCode && countryCode !== this.selectedCountry.iso2) {\n const newCountry = this.allCountries\n .slice()\n .sort((a, b) => {\n return a.priority - b.priority;\n })\n .find(c => c.iso2 === countryCode);\n if (newCountry) {\n this.selectedCountry = newCountry;\n }\n }\n }\n countryCode = countryCode ? countryCode : this.selectedCountry.iso2;\n\n this.checkSeparateDialCodeStyle();\n\n if (!this.value) {\n // Reason: avoid https://stackoverflow.com/a/54358133/1617590\n // tslint:disable-next-line: no-null-keyword\n // @ts-ignore\n this.propagateChange(null);\n } else {\n const intlNo = number\n ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL)\n : '';\n\n // parse phoneNumber if separate dial code is needed\n if (this.separateDialCode && intlNo) {\n this.value = this.removeDialCode(intlNo);\n }\n\n this.propagateChange({\n number: this.value,\n internationalNumber: intlNo,\n nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '',\n e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '',\n countryCode: countryCode.toUpperCase(),\n dialCode: '+' + this.selectedCountry.dialCode,\n });\n }\n }\n\n public onCountrySelect(country: Country, el: { focus: () => void }): void {\n this.setSelectedCountry(country);\n\n this.checkSeparateDialCodeStyle();\n\n if (this.phoneNumber && this.phoneNumber.length > 0) {\n this.value = this.phoneNumber;\n const number = this.getParsedNumber(this.phoneNumber, this.selectedCountry.iso2);\n const intlNo = number\n ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL)\n : '';\n // parse phoneNumber if separate dial code is needed\n if (this.separateDialCode && intlNo) {\n this.value = this.removeDialCode(intlNo);\n }\n\n this.propagateChange({\n number: this.value,\n internationalNumber: intlNo,\n nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '',\n e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '',\n countryCode: this.selectedCountry.iso2.toUpperCase(),\n dialCode: '+' + this.selectedCountry.dialCode,\n });\n } else {\n // Reason: avoid https://stackoverflow.com/a/54358133/1617590\n // tslint:disable-next-line: no-null-keyword\n // @ts-ignore\n this.propagateChange(null);\n }\n\n el.focus();\n }\n\n public onInputKeyPress(event: KeyboardEvent): void {\n const allowedChars = /[0-9\\+\\-\\(\\)\\ ]/;\n const allowedCtrlChars = /[axcv]/; // Allows copy-pasting\n const allowedOtherKeys = [\n 'ArrowLeft',\n 'ArrowUp',\n 'ArrowRight',\n 'ArrowDown',\n 'Home',\n 'End',\n 'Insert',\n 'Delete',\n 'Backspace',\n ];\n\n if (\n !allowedChars.test(event.key) &&\n !(event.ctrlKey && allowedCtrlChars.test(event.key)) &&\n !allowedOtherKeys.includes(event.key)\n ) {\n event.preventDefault();\n }\n }\n\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n writeValue(obj: any): void {\n if (obj === undefined) {\n this.init();\n }\n this.phoneNumber = obj;\n setTimeout(() => {\n this.onPhoneNumberChange();\n }, 1);\n }\n\n resolvePlaceholder(): string {\n let placeholder = '';\n if (this.customPlaceholder) {\n placeholder = this.customPlaceholder;\n } else if (this.selectedCountry.placeHolder) {\n placeholder = this.selectedCountry.placeHolder;\n if (this.separateDialCode) {\n placeholder = this.removeDialCode(placeholder);\n }\n }\n return placeholder;\n }\n\n /* --------------------------------- Helpers -------------------------------- */\n /**\n * Returns parse PhoneNumber object.\n * @param phoneNumber string\n * @param countryCode string\n */\n private getParsedNumber(phoneNumber: string, countryCode: string): lpn.PhoneNumber {\n let number: lpn.PhoneNumber;\n try {\n number = this.phoneUtil.parse(phoneNumber, countryCode.toUpperCase());\n } catch (e) {}\n // @ts-ignore\n return number;\n }\n\n /**\n * Adjusts input alignment based on the dial code presentation style.\n */\n private checkSeparateDialCodeStyle() {\n if (this.separateDialCode && this.selectedCountry) {\n const cntryCd = this.selectedCountry.dialCode;\n this.separateDialCodeClass = 'separate-dial-code iti-sdc-' + (cntryCd.length + 1);\n } else {\n this.separateDialCodeClass = '';\n }\n }\n\n /**\n * Cleans dialcode from phone number string.\n * @param phoneNumber string\n */\n private removeDialCode(phoneNumber: string): string {\n const number = this.getParsedNumber(phoneNumber, this.selectedCountry.iso2);\n phoneNumber = this.phoneUtil.format(number, lpn.PhoneNumberFormat[this.numberFormat]);\n if (phoneNumber.startsWith('+') && this.separateDialCode) {\n phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);\n }\n return phoneNumber;\n }\n\n /**\n * Sifts through all countries and returns iso code of the primary country\n * based on the number provided.\n * @param countryCode country code in number format\n * @param number PhoneNumber object\n */\n private getCountryIsoCode(countryCode: number, number: lpn.PhoneNumber): string | undefined {\n // Will use this to match area code from the first numbers\n // @ts-ignore\n const rawNumber = number['values_']['2'].toString();\n // List of all countries with countryCode (can be more than one. e.x. US, CA, DO, PR all have +1 countryCode)\n const countries = this.allCountries.filter(c => c.dialCode === countryCode.toString());\n // Main country is the country, which has no areaCodes specified in country-code.ts file.\n const mainCountry = countries.find(c => c.areaCodes === undefined);\n // Secondary countries are all countries, which have areaCodes specified in country-code.ts file.\n const secondaryCountries = countries.filter(c => c.areaCodes !== undefined);\n let matchedCountry = mainCountry ? mainCountry.iso2 : undefined;\n\n /*\n Iterate over each secondary country and check if nationalNumber starts with any of areaCodes available.\n If no matches found, fallback to the main country.\n */\n secondaryCountries.forEach(country => {\n // @ts-ignore\n country.areaCodes.forEach(areaCode => {\n if (rawNumber.startsWith(areaCode)) {\n matchedCountry = country.iso2;\n }\n });\n });\n\n return matchedCountry;\n }\n\n /**\n * Gets formatted example phone number from phoneUtil.\n * @param countryCode string\n */\n protected getPhoneNumberPlaceHolder(countryCode: string): string {\n try {\n return this.phoneUtil.format(\n this.phoneUtil.getExampleNumber(countryCode),\n lpn.PhoneNumberFormat[this.numberFormat]\n );\n } catch (e) {\n // @ts-ignore\n return e;\n }\n }\n\n /**\n * Clearing the list to avoid duplicates (https://github.com/webcat12345/ngx-intl-tel-input/issues/248)\n */\n protected fetchCountryData(): void {\n this.allCountries = [];\n\n this.countryCodeData.allCountries.forEach(c => {\n const country: Country = {\n name: c[0].toString(),\n iso2: c[1].toString(),\n dialCode: c[2].toString(),\n priority: +c[3] || 0,\n areaCodes: (c[4] as string[]) || undefined,\n htmlId: `iti-0__item-${c[1].toString()}`,\n flagClass: `iti__${c[1].toString().toLocaleLowerCase()}`,\n placeHolder: '',\n };\n\n if (this.enablePlaceholder) {\n country.placeHolder = this.getPhoneNumberPlaceHolder(country.iso2.toUpperCase());\n }\n\n this.allCountries.push(country);\n });\n }\n\n /**\n * Populates preferredCountriesInDropDown with prefferred countries.\n */\n private updatePreferredCountries() {\n if (this.preferredCountries.length) {\n this.preferredCountriesInDropDown = [];\n this.preferredCountries.forEach(iso2 => {\n const preferredCountry = this.allCountries.filter(c => {\n return c.iso2 === iso2;\n });\n\n this.preferredCountriesInDropDown.push(preferredCountry[0]);\n });\n }\n }\n\n /**\n * Updates selectedCountry.\n */\n private updateSelectedCountry() {\n if (this.selectedCountryISO) {\n // @ts-ignore\n this.selectedCountry = this.allCountries.find(c => {\n return c.iso2.toLowerCase() === this.selectedCountryISO.toLowerCase();\n });\n if (this.selectedCountry) {\n if (this.phoneNumber) {\n this.onPhoneNumberChange();\n } else {\n // Reason: avoid https://stackoverflow.com/a/54358133/1617590\n // tslint:disable-next-line: no-null-keyword\n // @ts-ignore\n this.propagateChange(null);\n }\n }\n }\n }\n}\n","<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","import { BsDropdownModule } from 'ngx-bootstrap/dropdown';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\nimport { NativeElementInjectorDirective } from './directives/native-element-injector.directive';\nimport { NgxIntlTelInputComponent } from './ngx-intl-tel-input.component';\n\nexport const dropdownModuleForRoot: ModuleWithProviders<BsDropdownModule> =\n BsDropdownModule.forRoot();\n\n@NgModule({\n declarations: [NgxIntlTelInputComponent, NativeElementInjectorDirective],\n imports: [CommonModule, FormsModule, ReactiveFormsModule, dropdownModuleForRoot],\n exports: [NgxIntlTelInputComponent, NativeElementInjectorDirective],\n})\nexport class NgxIntlTelInputModule {}\n","/*\n * Public API Surface of ngx-intl-tel-input\n */\n\nexport * from './lib/ngx-intl-tel-input.component';\nexport * from './lib/directives/native-element-injector.directive';\nexport * from './lib/ngx-intl-tel-input.module';\nexport * from './lib/enums/country-iso.enum';\nexport * from './lib/enums/search-country-field.enum';\nexport * from './lib/enums/phone-number-format.enum';\nexport * from './lib/interfaces/change-data';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i1.CountryCode","i5.NativeElementInjectorDirective"],"mappings":";;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,aAAA,CAAA,GAAA,IAAkB;AAClB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,eAAA,CAAA,GAAA,IAAoB;AACpB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,IAAa;AACb,IAAA,UAAA,CAAA,UAAA,CAAA,GAAA,IAAe;AACf,IAAA,UAAA,CAAA,mBAAA,CAAA,GAAA,IAAwB;AACxB,IAAA,UAAA,CAAA,WAAA,CAAA,GAAA,IAAgB;AAChB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AACZ,IAAA,UAAA,CAAA,WAAA,CAAA,GAAA,IAAgB;AAChB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,YAAA,CAAA,GAAA,IAAiB;AACjB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,IAAc;AACd,IAAA,UAAA,CAAA,SAAA,CAAA,G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