ngx-mat-input-tel
Version:
An Angular Material package for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods.
1 lines • 83.8 kB
Source Map (JSON)
{"version":3,"file":"ngx-mat-input-tel.mjs","sources":["../../../projects/ngx-mat-input-tel/src/lib/data/country-code.const.ts","../../../projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-flag/ngx-mat-input-tel-flag.component.ts","../../../projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts","../../../projects/ngx-mat-input-tel/src/lib/remove-iso.pipe.ts","../../../projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.ts","../../../projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.component.html","../../../projects/ngx-mat-input-tel/src/public-api.ts","../../../projects/ngx-mat-input-tel/src/ngx-mat-input-tel.ts"],"sourcesContent":["export const COUNTRIES_NAME: Record<string, string> = {\n AF: 'Afghanistan (افغانستان)',\n AL: 'Albania (Shqipëri)',\n DZ: 'Algeria (الجزائر)',\n AS: 'American Samoa',\n AD: 'Andorra',\n AO: 'Angola',\n AI: 'Anguilla',\n AG: 'Antigua and Barbuda',\n AR: 'Argentina',\n AM: 'Armenia (Հայաստան)',\n AW: 'Aruba',\n AU: 'Australia',\n AT: 'Austria (Österreich)',\n AZ: 'Azerbaijan (Azərbaycan)',\n BS: 'Bahamas',\n BH: 'Bahrain (البحرين)',\n BD: 'Bangladesh (বাংলাদেশ)',\n BB: 'Barbados',\n BY: 'Belarus (Беларусь)',\n BE: 'Belgium (België)',\n BZ: 'Belize',\n BJ: 'Benin (Bénin)',\n BM: 'Bermuda',\n BT: 'Bhutan (འབྲུག)',\n BO: 'Bolivia',\n BA: 'Bosnia and Herzegovina (Босна и Херцеговина)',\n BW: 'Botswana',\n BR: 'Brazil (Brasil)',\n IO: 'British Indian Ocean Territory',\n VG: 'British Virgin Islands',\n BN: 'Brunei',\n BG: 'Bulgaria (България)',\n BF: 'Burkina Faso',\n BI: 'Burundi (Uburundi)',\n KH: 'Cambodia (កម្ពុជា)',\n CM: 'Cameroon (Cameroun)',\n CA: 'Canada',\n CV: 'Cape Verde (Kabu Verdi)',\n BQ: 'Caribbean Netherlands',\n KY: 'Cayman Islands',\n CF: 'Central African Republic (République centrafricaine)',\n TD: 'Chad (Tchad)',\n CL: 'Chile',\n CN: 'China (中国)',\n CX: 'Christmas Island',\n CC: 'Cocos (Keeling) Islands',\n CO: 'Colombia',\n KM: 'Comoros (جزر القمر)',\n CD: 'Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)',\n CG: 'Congo (Republic) (Congo-Brazzaville)',\n CK: 'Cook Islands',\n CR: 'Costa Rica',\n CI: 'Côte d’Ivoire',\n HR: 'Croatia (Hrvatska)',\n CU: 'Cuba',\n CW: 'Curaçao',\n CY: 'Cyprus (Κύπρος)',\n CZ: 'Czech Republic (Česká republika)',\n DK: 'Denmark (Danmark)',\n DJ: 'Djibouti',\n DM: 'Dominica',\n DO: 'Dominican Republic (República Dominicana)',\n EC: 'Ecuador',\n EG: 'Egypt (مصر)',\n SV: 'El Salvador',\n GQ: 'Equatorial Guinea (Guinea Ecuatorial)',\n ER: 'Eritrea',\n EE: 'Estonia (Eesti)',\n ET: 'Ethiopia',\n FK: 'Falkland Islands (Islas Malvinas)',\n FO: 'Faroe Islands (Føroyar)',\n FJ: 'Fiji',\n FI: 'Finland (Suomi)',\n FR: 'France',\n GF: 'French Guiana (Guyane française)',\n PF: 'French Polynesia (Polynésie française)',\n GA: 'Gabon',\n GM: 'Gambia',\n GE: 'Georgia (საქართველო)',\n DE: 'Germany (Deutschland)',\n GH: 'Ghana (Gaana)',\n GI: 'Gibraltar',\n GR: 'Greece (Ελλάδα)',\n GL: 'Greenland (Kalaallit Nunaat)',\n GD: 'Grenada',\n GP: 'Guadeloupe',\n GU: 'Guam',\n GT: 'Guatemala',\n GG: 'Guernsey',\n GN: 'Guinea (Guinée)',\n GW: 'Guinea-Bissau (Guiné Bissau)',\n GY: 'Guyana',\n HT: 'Haiti',\n HN: 'Honduras',\n HK: 'Hong Kong (香港)',\n HU: 'Hungary (Magyarország)',\n IS: 'Iceland (Ísland)',\n IN: 'India (भारत)',\n ID: 'Indonesia',\n IR: 'Iran (ایران)',\n IQ: 'Iraq (العراق)',\n IE: 'Ireland',\n IM: 'Isle of Man',\n IL: 'Israel (ישראל)',\n IT: 'Italy (Italia)',\n JM: 'Jamaica',\n JP: 'Japan (日本)',\n JE: 'Jersey',\n JO: 'Jordan (الأردن)',\n KZ: 'Kazakhstan (Казахстан)',\n KE: 'Kenya',\n KI: 'Kiribati',\n XK: 'Kosovo',\n KW: 'Kuwait (الكويت)',\n KG: 'Kyrgyzstan (Кыргызстан)',\n LA: 'Laos (ລາວ)',\n LV: 'Latvia (Latvija)',\n LB: 'Lebanon (لبنان)',\n LS: 'Lesotho',\n LR: 'Liberia',\n LY: 'Libya (ليبيا)',\n LI: 'Liechtenstein',\n LT: 'Lithuania (Lietuva)',\n LU: 'Luxembourg',\n MO: 'Macau (澳門)',\n MK: 'Macedonia (FYROM) (Македонија)',\n MG: 'Madagascar (Madagasikara)',\n MW: 'Malawi',\n MY: 'Malaysia',\n MV: 'Maldives',\n ML: 'Mali',\n MT: 'Malta',\n MH: 'Marshall Islands',\n MQ: 'Martinique',\n MR: 'Mauritania (موريتانيا)',\n MU: 'Mauritius (Moris)',\n YT: 'Mayotte',\n MX: 'Mexico (México)',\n FM: 'Micronesia',\n MD: 'Moldova (Republica Moldova)',\n MC: 'Monaco',\n MN: 'Mongolia (Монгол)',\n ME: 'Montenegro (Crna Gora)',\n MS: 'Montserrat',\n MA: 'Morocco (المغرب)',\n MZ: 'Mozambique (Moçambique)',\n MM: 'Myanmar (Burma) (မြန်မာ)',\n NA: 'Namibia (Namibië)',\n NR: 'Nauru',\n NP: 'Nepal (नेपाल)',\n NL: 'Netherlands (Nederland)',\n NC: 'New Caledonia (Nouvelle-Calédonie)',\n NZ: 'New Zealand',\n NI: 'Nicaragua',\n NE: 'Niger (Nijar)',\n NG: 'Nigeria',\n NU: 'Niue',\n NF: 'Norfolk Island',\n KP: 'North Korea (조선 민주주의 인민 공화국)',\n MP: 'Northern Mariana Islands',\n NO: 'Norway (Norge)',\n OM: 'Oman (عُمان)',\n PK: 'Pakistan (پاکستان)',\n PW: 'Palau',\n PS: 'Palestine (فلسطين)',\n PA: 'Panama (Panamá)',\n PG: 'Papua New Guinea',\n PY: 'Paraguay',\n PE: 'Peru (Perú)',\n PH: 'Philippines',\n PL: 'Poland (Polska)',\n PT: 'Portugal',\n PR: 'Puerto Rico',\n QA: 'Qatar (قطر)',\n RE: 'Réunion (La Réunion)',\n RO: 'Romania (România)',\n RU: 'Russia (Россия)',\n RW: 'Rwanda',\n BL: 'Saint Barthélemy',\n SH: 'Saint Helena',\n KN: 'Saint Kitts and Nevis',\n LC: 'Saint Lucia',\n MF: 'Saint Martin (Saint-Martin (partie française))',\n PM: 'Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)',\n VC: 'Saint Vincent and the Grenadines',\n WS: 'Samoa',\n SM: 'San Marino',\n ST: 'São Tomé and Príncipe (São Tomé e Príncipe)',\n SA: 'Saudi Arabia (المملكة العربية السعودية)',\n SN: 'Senegal (Sénégal)',\n RS: 'Serbia (Србија)',\n SC: 'Seychelles',\n SL: 'Sierra Leone',\n SG: 'Singapore',\n SX: 'Sint Maarten',\n SK: 'Slovakia (Slovensko)',\n SI: 'Slovenia (Slovenija)',\n SB: 'Solomon Islands',\n SO: 'Somalia (Soomaaliya)',\n ZA: 'South Africa',\n KR: 'South Korea (대한민국)',\n SS: 'South Sudan (جنوب السودان)',\n ES: 'Spain (España)',\n LK: 'Sri Lanka (ශ්රී ලංකාව)',\n SD: 'Sudan (السودان)',\n SR: 'Suriname',\n SJ: 'Svalbard and Jan Mayen',\n SZ: 'Swaziland',\n SE: 'Sweden (Sverige)',\n CH: 'Switzerland (Schweiz)',\n SY: 'Syria (سوريا)',\n TW: 'Taiwan (台灣)',\n TJ: 'Tajikistan',\n TZ: 'Tanzania',\n TH: 'Thailand (ไทย)',\n TL: 'Timor-Leste',\n TG: 'Togo',\n TK: 'Tokelau',\n TO: 'Tonga',\n TT: 'Trinidad and Tobago',\n TN: 'Tunisia (تونس)',\n TR: 'Turkey (Türkiye)',\n TM: 'Turkmenistan',\n TC: 'Turks and Caicos Islands',\n TV: 'Tuvalu',\n VI: 'U.S. Virgin Islands',\n UG: 'Uganda',\n UA: 'Ukraine (Україна)',\n AE: 'United Arab Emirates (الإمارات العربية المتحدة)',\n GB: 'United Kingdom',\n US: 'United States',\n UY: 'Uruguay',\n UZ: 'Uzbekistan (Oʻzbekiston)',\n VU: 'Vanuatu',\n VA: 'Vatican City (Città del Vaticano)',\n VE: 'Venezuela',\n VN: 'Vietnam (Việt Nam)',\n WF: 'Wallis and Futuna (Wallis-et-Futuna)',\n EH: 'Western Sahara (الصحراء الغربية)',\n YE: 'Yemen (اليمن)',\n ZM: 'Zambia',\n ZW: 'Zimbabwe',\n AX: 'Åland Islands',\n}\n\nexport const COUNTRIES_CODE: Record<\n string,\n [string] | [string, number] | [string, number, string[]]\n> = {\n // 'iso2': 'dialCode', 'priority', 'areaCodes'\n AF: ['93'],\n AL: ['355'],\n DZ: ['213'],\n AS: ['1', 4, ['684']],\n AD: ['376'],\n AO: ['244'],\n AI: ['1', 4, ['264']],\n AG: ['1', 4, ['268']],\n AR: ['54'],\n AM: ['374'],\n AW: ['297'],\n AU: ['61', 0],\n AT: ['43'],\n AZ: ['994'],\n BS: ['1', 4, ['242']],\n BH: ['973'],\n BD: ['880'],\n BB: ['1', 4, ['246']],\n BY: ['375'],\n BE: ['32'],\n BZ: ['501'],\n BJ: ['229'],\n BM: ['1', 4, ['441']],\n BT: ['975'],\n BO: ['591'],\n BA: ['387'],\n BW: ['267'],\n BR: ['55'],\n IO: ['246'],\n VG: ['1', 4, ['284']],\n BN: ['673'],\n BG: ['359'],\n BF: ['226'],\n BI: ['257'],\n KH: ['855'],\n CM: ['237'],\n CA: [\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 CV: ['238'],\n BQ: ['599', 1],\n KY: ['1', 4, ['345']],\n CF: ['236'],\n TD: ['235'],\n CL: ['56'],\n CN: ['86'],\n CX: ['61', 2],\n CC: ['61', 1],\n CO: ['57'],\n KM: ['269'],\n CD: ['243'],\n CG: ['242'],\n CK: ['682'],\n CR: ['506'],\n CI: ['225'],\n HR: ['385'],\n CU: ['53'],\n CW: ['599', 0],\n CY: ['357'],\n CZ: ['420'],\n DK: ['45'],\n DJ: ['253'],\n DM: ['1', 4, ['767']],\n DO: ['1', 2, ['809', '829', '849']],\n EC: ['593'],\n EG: ['20'],\n SV: ['503'],\n GQ: ['240'],\n ER: ['291'],\n EE: ['372'],\n ET: ['251'],\n FK: ['500'],\n FO: ['298'],\n FJ: ['679'],\n FI: ['358', 0],\n FR: ['33'],\n GF: ['594'],\n PF: ['689'],\n GA: ['241'],\n GM: ['220'],\n GE: ['995'],\n DE: ['49'],\n GH: ['233'],\n GI: ['350'],\n GR: ['30'],\n GL: ['299'],\n GD: ['1', 4, ['473']],\n GP: ['590', 0],\n GU: ['1', 4, ['671']],\n GT: ['502'],\n GG: ['44', 1],\n GN: ['224'],\n GW: ['245'],\n GY: ['592'],\n HT: ['509'],\n HN: ['504'],\n HK: ['852'],\n HU: ['36'],\n IS: ['354'],\n IN: ['91'],\n ID: ['62'],\n IR: ['98'],\n IQ: ['964'],\n IE: ['353'],\n IM: ['44', 2],\n IL: ['972'],\n IT: ['39', 0],\n JM: ['1', 4, ['876', '658']],\n JP: ['81'],\n JE: ['44', 3],\n JO: ['962'],\n KZ: ['7', 1],\n KE: ['254'],\n KI: ['686'],\n XK: ['383'],\n KW: ['965'],\n KG: ['996'],\n LA: ['856'],\n LV: ['371'],\n LB: ['961'],\n LS: ['266'],\n LR: ['231'],\n LY: ['218'],\n LI: ['423'],\n LT: ['370'],\n LU: ['352'],\n MO: ['853'],\n MK: ['389'],\n MG: ['261'],\n MW: ['265'],\n MY: ['60'],\n MV: ['960'],\n ML: ['223'],\n MT: ['356'],\n MH: ['692'],\n MQ: ['596'],\n MR: ['222'],\n MU: ['230'],\n YT: ['262', 1],\n MX: ['52'],\n FM: ['691'],\n MD: ['373'],\n MC: ['377'],\n MN: ['976'],\n ME: ['382'],\n MS: ['1664'],\n MA: ['212', 0],\n MZ: ['258'],\n MM: ['95'],\n NA: ['264'],\n NR: ['674'],\n NP: ['977'],\n NL: ['31'],\n NC: ['687'],\n NZ: ['64'],\n NI: ['505'],\n NE: ['227'],\n NG: ['234'],\n NU: ['683'],\n NF: ['672'],\n KP: ['850'],\n MP: ['1670'],\n NO: ['47', 0],\n OM: ['968'],\n PK: ['92'],\n PW: ['680'],\n PS: ['970'],\n PA: ['507'],\n PG: ['675'],\n PY: ['595'],\n PE: ['51'],\n PH: ['63'],\n PL: ['48'],\n PT: ['351'],\n PR: ['1', 3, ['787', '939']],\n QA: ['974'],\n RE: ['262', 0],\n RO: ['40'],\n RU: ['7', 0],\n RW: ['250'],\n BL: ['590', 1],\n SH: ['290'],\n KN: ['1', 4, ['869']],\n LC: ['1', 4, ['758']],\n MF: ['590', 2],\n PM: ['508'],\n VC: ['1784'],\n WS: ['685'],\n SM: ['378'],\n ST: ['239'],\n SA: ['966'],\n SN: ['221'],\n RS: ['381'],\n SC: ['248'],\n SL: ['232'],\n SG: ['65'],\n SX: ['1', 4, ['721']],\n SK: ['421'],\n SI: ['386'],\n SB: ['677'],\n SO: ['252'],\n ZA: ['27'],\n KR: ['82'],\n SS: ['211'],\n ES: ['34'],\n LK: ['94'],\n SD: ['249'],\n SR: ['597'],\n SJ: ['47', 1],\n SZ: ['268'],\n SE: ['46'],\n CH: ['41'],\n SY: ['963'],\n TW: ['886'],\n TJ: ['992'],\n TZ: ['255'],\n TH: ['66'],\n TL: ['670'],\n TG: ['228'],\n TK: ['690'],\n TO: ['676'],\n TT: ['1', 4, ['868']],\n TN: ['216'],\n TR: ['90'],\n TM: ['993'],\n TC: ['1', 4, ['649']],\n TV: ['688'],\n VI: ['1', 4, ['340']],\n UG: ['256'],\n UA: ['380'],\n AE: ['971'],\n GB: ['44', 0],\n US: ['1', 0],\n UY: ['598'],\n UZ: ['998'],\n VU: ['678'],\n VA: ['39', 1],\n VE: ['58'],\n VN: ['84'],\n WF: ['681'],\n EH: ['212', 1],\n YE: ['967'],\n ZM: ['260'],\n ZW: ['263'],\n AX: ['358', 1],\n}\n\nexport const EXAMPLES: any = {\n // Examples\n '001': '001',\n AC: '40123',\n AD: '312345',\n AE: '501234567',\n AF: '701234567',\n AG: '2684641234',\n AI: '2642351234',\n AL: '662123456',\n AM: '77123456',\n AO: '923123456',\n AR: '91123456789',\n AS: '6847331234',\n AT: '664123456',\n AU: '412345678',\n AW: '5601234',\n AX: '412345678',\n AZ: '401234567',\n BA: '61123456',\n BB: '2462501234',\n BD: '1812345678',\n BE: '470123456',\n BF: '70123456',\n BG: '48123456',\n BH: '36001234',\n BI: '79561234',\n BJ: '90011234',\n BL: '690001234',\n BM: '4413701234',\n BN: '7123456',\n BO: '71234567',\n BQ: '3181234',\n BR: '11961234567',\n BS: '2423591234',\n BT: '17123456',\n BW: '71123456',\n BY: '294911911',\n BZ: '6221234',\n CA: '5062345678',\n CC: '412345678',\n CD: '991234567',\n CF: '70012345',\n CG: '061234567',\n CH: '781234567',\n CI: '01234567',\n CK: '71234',\n CL: '221234567',\n CM: '671234567',\n CN: '13123456789',\n CO: '3211234567',\n CR: '83123456',\n CU: '51234567',\n CV: '9911234',\n CW: '95181234',\n CX: '412345678',\n CY: '96123456',\n CZ: '601123456',\n DE: '15123456789',\n DJ: '77831001',\n DK: '32123456',\n DM: '7672251234',\n DO: '8092345678',\n DZ: '551234567',\n EC: '991234567',\n EE: '51234567',\n EG: '1001234567',\n EH: '650123456',\n ER: '7123456',\n ES: '612345678',\n ET: '911234567',\n FI: '412345678',\n FJ: '7012345',\n FK: '51234',\n FM: '3501234',\n FO: '211234',\n FR: '612345678',\n GA: '06031234',\n GB: '7400123456',\n GD: '4734031234',\n GE: '555123456',\n GF: '694201234',\n GG: '7781123456',\n GH: '231234567',\n GI: '57123456',\n GL: '221234',\n GM: '3012345',\n GN: '601123456',\n GP: '690001234',\n GQ: '222123456',\n GR: '6912345678',\n GT: '51234567',\n GU: '6713001234',\n GW: '955012345',\n GY: '6091234',\n HK: '51234567',\n HN: '91234567',\n HR: '921234567',\n HT: '34101234',\n HU: '201234567',\n ID: '812345678',\n IE: '850123456',\n IL: '502345678',\n IM: '7924123456',\n IN: '8123456789',\n IO: '3801234',\n IQ: '7912345678',\n IR: '9123456789',\n IS: '6111234',\n IT: '3123456789',\n JE: '7797712345',\n JM: '8762101234',\n JO: '790123456',\n JP: '9012345678',\n KE: '712123456',\n KG: '700123456',\n KH: '91234567',\n KI: '72001234',\n KM: '3212345',\n KN: '8697652917',\n KP: '1921234567',\n KR: '1000000000',\n KW: '50012345',\n KY: '3453231234',\n KZ: '7710009998',\n LA: '2023123456',\n LB: '71123456',\n LC: '7582845678',\n LI: '660234567',\n LK: '712345678',\n LR: '770123456',\n LS: '50123456',\n LT: '61234567',\n LU: '628123456',\n LV: '21234567',\n LY: '912345678',\n MA: '650123456',\n MC: '612345678',\n MD: '62112345',\n ME: '67622901',\n MF: '690001234',\n MG: '321234567',\n MH: '2351234',\n MK: '72345678',\n ML: '65012345',\n MM: '92123456',\n MN: '88123456',\n MO: '66123456',\n MP: '6702345678',\n MQ: '696201234',\n MR: '22123456',\n MS: '6644923456',\n MT: '96961234',\n MU: '52512345',\n MV: '7712345',\n MW: '991234567',\n MX: '12221234567',\n MY: '123456789',\n MZ: '821234567',\n NA: '811234567',\n NC: '751234',\n NE: '93123456',\n NF: '381234',\n NG: '8021234567',\n NI: '81234567',\n NL: '612345678',\n NO: '40612345',\n NP: '9841234567',\n NR: '5551234',\n NU: '8884012',\n NZ: '211234567',\n OM: '92123456',\n PA: '61234567',\n PE: '912345678',\n PF: '87123456',\n PG: '70123456',\n PH: '9051234567',\n PK: '3012345678',\n PL: '512345678',\n PM: '551234',\n PR: '7872345678',\n PS: '599123456',\n PT: '912345678',\n PW: '6201234',\n PY: '961456789',\n QA: '33123456',\n RE: '692123456',\n RO: '712034567',\n RS: '601234567',\n RU: '9123456789',\n RW: '720123456',\n SA: '512345678',\n SB: '7421234',\n SC: '2510123',\n SD: '911231234',\n SE: '701234567',\n SG: '81234567',\n SH: '51234',\n SI: '31234567',\n SJ: '41234567',\n SK: '912123456',\n SL: '25123456',\n SM: '66661212',\n SN: '701234567',\n SO: '71123456',\n SR: '7412345',\n SS: '977123456',\n ST: '9812345',\n SV: '70123456',\n SX: '7215205678',\n SY: '944567890',\n SZ: '76123456',\n TA: '8999',\n TC: '6492311234',\n TD: '63012345',\n TG: '90112345',\n TH: '812345678',\n TJ: '917123456',\n TK: '7290',\n TL: '77212345',\n TM: '66123456',\n TN: '20123456',\n TO: '7715123',\n TR: '5012345678',\n TT: '8682911234',\n TV: '901234',\n TW: '912345678',\n TZ: '621234567',\n UA: '501234567',\n UG: '712345678',\n US: '2015550123',\n UY: '94231234',\n UZ: '912345678',\n VA: '3123456789',\n VC: '7844301234',\n VE: '4121234567',\n VG: '2843001234',\n VI: '3406421234',\n VN: '912345678',\n VU: '5912345',\n WF: '501234',\n WS: '7212345',\n XK: '43201234',\n YE: '712345678',\n YT: '639012345',\n ZA: '711234567',\n ZM: '955123456',\n ZW: '712345678',\n}\n","import { NgClass } from '@angular/common'\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core'\nimport { CountryFlag } from '../model/country.model'\n\n@Component({\n selector: 'ngx-mat-input-tel-flag',\n imports: [NgClass],\n template: `\n <div class=\"flag\" [ngClass]=\"country.iso2\"></div>\n\n @if (country.name) {\n <span class=\"country-selector-name\">\n {{ country.name }}\n </span>\n }\n\n @if (country.dialCode) {\n <span class=\"country-selector-code\"\n >+{{ country.dialCode }}\n\n @if (country.areaCodes) {\n {{ country.areaCodes.join(', ') }}\n }\n </span>\n }\n `,\n styleUrl: './ngx-mat-input-tel-flag.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgxMatInputTelFlagComponent {\n @Input({ required: true }) country!: CountryFlag\n}\n","import { AbstractControl, ValidationErrors } from '@angular/forms'\nimport { parsePhoneNumber, PhoneNumber } from 'libphonenumber-js'\n\nexport const ngxMatInputTelValidator = (control: AbstractControl): ValidationErrors | null => {\n const error = { validatePhoneNumber: true }\n let numberInstance: PhoneNumber\n\n if (control.value) {\n try {\n numberInstance = parsePhoneNumber(control.value)\n } catch (e) {\n console.error(e)\n return error\n }\n\n if (numberInstance && !numberInstance.isValid()) {\n if (!control.touched) {\n control.markAsTouched()\n }\n return error\n }\n }\n return null\n}\n","import { Pipe, PipeTransform } from '@angular/core'\nimport { Country } from './model/country.model'\n\n@Pipe({\n name: 'removeIso',\n})\nexport class RemoveIsoPipe implements PipeTransform {\n transform(country: Country): string {\n if (!country?.placeholder || !country?.dialCode) return country?.placeholder || ''\n\n return country.placeholder.replace(`+${country.dialCode}`, '')\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y'\nimport { coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { KeyValuePipe, NgClass } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n booleanAttribute,\n computed,\n model,\n signal,\n} from '@angular/core'\nimport {\n FormControl,\n FormGroupDirective,\n FormsModule,\n NG_VALIDATORS,\n NgControl,\n NgForm,\n ReactiveFormsModule,\n} from '@angular/forms'\nimport { ErrorStateMatcher, MatRippleModule } from '@angular/material/core'\nimport { MatDividerModule } from '@angular/material/divider'\nimport { MatFormFieldControl } from '@angular/material/form-field'\nimport { MatInputModule } from '@angular/material/input'\nimport { MatMenu, MatMenuModule } from '@angular/material/menu'\nimport {\n AsYouType,\n CountryCode as CC,\n CountryCode,\n E164Number,\n NationalNumber,\n PhoneNumber,\n getExampleNumber,\n parsePhoneNumberFromString,\n} from 'libphonenumber-js'\nimport { Subject } from 'rxjs'\nimport { COUNTRIES_CODE, COUNTRIES_NAME, EXAMPLES } from './data/country-code.const'\nimport { Country } from './model/country.model'\nimport { PhoneNumberFormat } from './model/phone-number-format.model'\nimport { NgxMatInputTelFlagComponent } from './ngx-mat-input-tel-flag/ngx-mat-input-tel-flag.component'\nimport { ngxMatInputTelValidator } from './ngx-mat-input-tel.validator'\nimport { RemoveIsoPipe } from './remove-iso.pipe'\n\nclass ngxMatInputTelBase {\n constructor(\n public _defaultErrorStateMatcher: ErrorStateMatcher,\n public _parentForm: NgForm,\n public _parentFormGroup: FormGroupDirective,\n public ngControl: NgControl,\n ) {}\n}\n\n@Component({\n selector: 'ngx-mat-input-tel',\n templateUrl: './ngx-mat-input-tel.component.html',\n styleUrls: ['./ngx-mat-input-tel.component.scss'],\n providers: [\n { provide: MatFormFieldControl, useExisting: NgxMatInputTelComponent },\n {\n provide: NG_VALIDATORS,\n useValue: ngxMatInputTelValidator,\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n\n // Forms\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n\n // Mat\n MatMenuModule,\n MatRippleModule,\n MatDividerModule,\n\n // Pipes\n KeyValuePipe,\n RemoveIsoPipe,\n\n // Components\n NgxMatInputTelFlagComponent,\n ],\n})\nexport class NgxMatInputTelComponent\n extends ngxMatInputTelBase\n implements OnInit, DoCheck, OnDestroy\n{\n static nextId = 0\n @ViewChild(MatMenu) matMenu!: MatMenu\n @ViewChild('menuSearchInput', { static: false }) menuSearchInput?: ElementRef<HTMLInputElement>\n @ViewChild('focusable', { static: false }) focusable!: ElementRef\n\n @HostBinding()\n id = `ngx-mat-input-tel-${NgxMatInputTelComponent.nextId++}`\n @HostBinding('class.ngx-floating')\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty\n }\n\n @Input() autocomplete: 'off' | 'tel' = 'off'\n @Input() ariaLabel = 'Select country'\n @Input() cssClass?: string\n @Input() defaultCountry?: CountryCode\n @Input() errorStateMatcher: ErrorStateMatcher = this._defaultErrorStateMatcher\n @Input() maxLength: string | number = 15\n @Input() name?: string\n @Input() placeholder = ''\n\n @Input() countriesName = COUNTRIES_NAME\n\n private _preferredCountries: string[] = []\n @Input() set preferredCountries(value: string[]) {\n this._preferredCountries = value.map((v) => v.toUpperCase())\n }\n\n @Input() set onlyCountries(countryCodes: string[]) {\n if (countryCodes.length) {\n const codes = countryCodes.map((c) => c.toUpperCase())\n this.$availableCountries.set(this._getFilteredCountries(codes))\n }\n\n this._setPreferredCountriesInDropDown()\n this._setDefaultCountry()\n }\n\n @Input() searchPlaceholder = 'Search ...'\n @Input() validation: 'isValid' | 'isPossible' = 'isValid'\n @Input({ transform: booleanAttribute }) enablePlaceholder = false\n @Input({ transform: booleanAttribute }) enableSearch = false\n @Input({ transform: booleanAttribute }) resetOnChange = false\n\n private _format: PhoneNumberFormat = 'default'\n @Input() set format(value: PhoneNumberFormat) {\n this._format = value\n this.phoneNumber = this.formattedPhoneNumber()\n this.stateChanges.next()\n }\n get format(): PhoneNumberFormat {\n return this._format\n }\n\n private _required = false\n @Input({ transform: booleanAttribute })\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value)\n this.stateChanges.next(undefined)\n }\n get required(): boolean {\n return this._required\n }\n\n private _disabled = false\n @Input({ transform: booleanAttribute })\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value)\n this.stateChanges.next(undefined)\n }\n get disabled(): boolean {\n return this._disabled\n }\n\n get empty(): boolean {\n return !this.phoneNumber\n }\n\n @Output()\n countryChanged: EventEmitter<Country> = new EventEmitter<Country>()\n\n stateChanges = new Subject<void>()\n focused = false\n describedBy = ''\n phoneNumber?: E164Number | NationalNumber = '' as E164Number | NationalNumber\n private _allCountries: Record<string, Country> = {}\n $availableCountries = signal<Record<string, Country>>(this._initAllCountries())\n $selectableCountries = computed(() => {\n if (!this.$searchCriteria() || this.$searchCriteria() === '') return this.$availableCountries()\n\n return this._getOnSearchCountries(\n this.$searchCriteria().toLowerCase(),\n this.$availableCountries(),\n )\n })\n $preferredCountriesInDropDown = signal<Record<string, Country>>({})\n $selectablePreferredCountriesInDropDown = computed(() => {\n if (!this.$searchCriteria() || this.$searchCriteria() === '')\n return this.$preferredCountriesInDropDown()\n\n return this._getOnSearchCountries(\n this.$searchCriteria().toLowerCase(),\n this.$preferredCountriesInDropDown(),\n )\n })\n $showDivider = computed(() => {\n return (\n Object.entries(this.$preferredCountriesInDropDown()).length > 0 &&\n Object.entries(this.$selectableCountries()).length > 0\n )\n })\n $selectedCountry = signal<Country>({} as Country)\n numberInstance?: PhoneNumber\n value?: any\n $searchCriteria = model<string>('')\n\n private _previousFormattedNumber?: string\n\n onTouched = () => {}\n propagateChange = (_: any) => {}\n\n private errorState?: boolean\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n @Optional() @Self() _ngControl: NgControl,\n @Optional() _parentForm: NgForm,\n @Optional() _parentFormGroup: FormGroupDirective,\n _defaultErrorStateMatcher: ErrorStateMatcher,\n ) {\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, _ngControl)\n\n _focusMonitor.monitor(_elementRef, true).subscribe((origin: any) => {\n if (this.focused && !origin) {\n this.onTouched()\n }\n this.focused = !!origin\n this.stateChanges.next()\n })\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this\n }\n }\n\n ngOnInit() {\n this.$availableCountries.set(this._initAllCountries())\n this._setPreferredCountriesInDropDown()\n this._setDefaultCountry()\n\n this._changeDetectorRef.markForCheck()\n this.stateChanges.next()\n }\n\n ngOnDestroy() {\n this.stateChanges.complete()\n this._focusMonitor.stopMonitoring(this._elementRef)\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n const oldState = this.errorState\n const newState = this.errorStateMatcher.isErrorState(this.ngControl.control, this._parentForm)\n\n this.errorState =\n (newState && (!this.ngControl.control?.value || this.ngControl.control?.touched)) ||\n (!this.focused ? newState : false)\n\n if (oldState !== newState) {\n this.errorState = newState\n this.stateChanges.next()\n }\n }\n }\n\n onMenuOpened() {\n setTimeout(() => {\n this.menuSearchInput?.nativeElement?.focus()\n }, 0)\n }\n\n updateErrorState() {\n if (\n this.ngControl &&\n this.ngControl.invalid &&\n (this.ngControl.touched || (this._parentForm && this._parentForm.submitted))\n ) {\n const currentState = this.errorStateMatcher.isErrorState(\n this.ngControl.control as FormControl,\n this.ngControl?.value,\n )\n if (currentState !== this.errorState) {\n this.errorState = currentState\n this._changeDetectorRef.markForCheck()\n }\n }\n }\n\n private _setPreferredCountriesInDropDown(countries = this._preferredCountries) {\n this.$preferredCountriesInDropDown.set(this._getFilteredCountries(countries))\n }\n\n private _setDefaultCountry() {\n let country: Country\n\n if (this.numberInstance?.country) {\n // If an existing number is present, we use it to determine country\n country = this.getCountry(this.numberInstance.country)\n } else if (this.defaultCountry) {\n country = this.getCountry(this.defaultCountry)\n } else if (this.$preferredCountriesInDropDown().length) {\n country = this.$preferredCountriesInDropDown()[0]\n } else {\n const firstKeyValue = Object.entries(this._allCountries)[0]\n country = { ...firstKeyValue[1], iso2: firstKeyValue[0] }\n }\n\n this.$selectedCountry.set(country)\n this.countryChanged.emit(country)\n }\n\n private _getFilteredCountries(countryCodes: string[]): Record<string, Country> {\n return Object.values(this._allCountries)\n .filter((c) => countryCodes.includes(c.iso2))\n .sort((a, b) => countryCodes.indexOf(a.name) - countryCodes.indexOf(b.name))\n .reduce<Record<string, Country>>((acc, country) => {\n acc[country.iso2] = country\n return acc\n }, {})\n }\n\n private _getOnSearchCountries(\n searchTerm: string,\n countries: Record<string, Country>,\n ): Record<string, Country> {\n const result: Record<string, Country> = {}\n for (const country of Object.values(countries)) {\n if (\n country.name.toLowerCase().includes(searchTerm) ||\n country.dialCode.includes(searchTerm) ||\n (country.areaCodes && country.areaCodes.join(',').includes(searchTerm))\n ) {\n result[country.iso2] = country\n }\n }\n return result\n }\n\n public onPhoneNumberChange(): void {\n try {\n this._setCountry()\n } catch {\n // Pass a value to trigger the validator error\n this.value = this.formattedPhoneNumber().toString()\n }\n\n this.propagateChange(this.value)\n this._changeDetectorRef.markForCheck()\n }\n\n private _setCountry() {\n if (!this.phoneNumber) {\n this.value = null\n return\n }\n\n const numberInstance = parsePhoneNumberFromString(\n this.phoneNumber.toString(),\n this.$selectedCountry().iso2.toUpperCase() as CC,\n )\n if (!numberInstance) return\n this.numberInstance = numberInstance\n\n this.formatAsYouTypeIfEnabled()\n this.value = this.numberInstance?.number\n\n if (!this.value) throw new Error('Incorrect phone number')\n\n if (\n this.numberInstance &&\n (this.validation === 'isPossible'\n ? this.numberInstance.isPossible()\n : this.numberInstance.isValid())\n ) {\n if (this.phoneNumber !== this.formattedPhoneNumber()) {\n this.phoneNumber = this.formattedPhoneNumber()\n }\n if (\n this.$selectedCountry().iso2 !== this.numberInstance.country &&\n this.numberInstance.country\n ) {\n this.$selectedCountry.set(this.getCountry(this.numberInstance.country))\n this.countryChanged.emit(this.$selectedCountry())\n }\n }\n }\n\n public onCountrySelect(country: { key: string; value: Country }): void {\n if (this.phoneNumber) {\n this.phoneNumber = this.numberInstance?.nationalNumber\n }\n if (this.resetOnChange && this.$selectedCountry().iso2 !== country.key) {\n this.reset()\n }\n\n this.$selectedCountry.set({\n ...country.value,\n iso2: country.key,\n })\n this.countryChanged.emit(this.$selectedCountry())\n\n this.onPhoneNumberChange()\n\n setTimeout(() => {\n this.focusable.nativeElement.focus()\n }, 0)\n }\n\n public getCountry(code: CC): Country {\n const targetCountry = this._allCountries[code]\n if (targetCountry) {\n return { ...targetCountry, iso2: code }\n }\n return {\n name: 'UN',\n iso2: 'UN',\n dialCode: '',\n priority: 0,\n areaCodes: undefined,\n placeholder: '',\n }\n }\n\n public onInputKeyPress(event: any): void {\n const pattern = /[0-9+\\- ]/\n if (!pattern.test(event.key)) {\n event.preventDefault()\n }\n }\n\n protected _initAllCountries(): Record<string, Country> {\n this._allCountries = {}\n Object.entries(COUNTRIES_CODE).forEach(([iso2, codes]) => {\n const country: Country = {\n name: this.countriesName[iso2] || iso2,\n iso2: iso2,\n dialCode: codes[0].toString(),\n priority: +codes || 0,\n areaCodes: codes.length > 2 && Array.isArray(codes[2]) ? codes[2] : undefined,\n placeholder: '',\n }\n if (this.enablePlaceholder) {\n country.placeholder = this._getPhoneNumberPlaceHolder(iso2)\n }\n this._allCountries[iso2] = country\n })\n return this._allCountries\n }\n\n private _getPhoneNumberPlaceHolder(countryISOCode: any): string | undefined {\n try {\n return getExampleNumber(countryISOCode, EXAMPLES)?.number\n } catch (e) {\n return e as any\n }\n }\n\n registerOnChange(fn: any): void {\n this.propagateChange = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n this._changeDetectorRef.markForCheck()\n this.stateChanges.next(undefined)\n }\n\n writeValue(value: any): void {\n if (value) {\n this.numberInstance = parsePhoneNumberFromString(value)\n if (this.numberInstance) {\n const countryCode = this.numberInstance.country\n this.phoneNumber = this.formattedPhoneNumber()\n\n if (!countryCode) return\n\n this.$selectedCountry.set(this.getCountry(countryCode))\n\n if (\n this.$selectedCountry().dialCode &&\n !this._preferredCountries.includes(this.$selectedCountry().iso2)\n ) {\n this.$preferredCountriesInDropDown.update((values) => {\n return { ...values, ...{ [this.$selectedCountry().iso2]: this.$selectedCountry() } }\n })\n }\n this.countryChanged.emit(this.$selectedCountry())\n\n // Initial value is set\n this.stateChanges.next()\n } else {\n this.phoneNumber = value\n this.stateChanges.next(undefined)\n }\n }\n\n // Value is set from outside using setValue()\n this.onPhoneNumberChange()\n this._changeDetectorRef.markForCheck()\n }\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ')\n }\n\n onContainerClick(event: MouseEvent): void {\n if ((event.target as Element).tagName.toLowerCase() !== 'input') {\n this._elementRef.nativeElement.querySelector('input')!.focus()\n }\n }\n\n reset() {\n this.phoneNumber = '' as E164Number | NationalNumber\n this.propagateChange(null)\n\n this._changeDetectorRef.markForCheck()\n this.stateChanges.next(undefined)\n }\n\n private formattedPhoneNumber(): E164Number | NationalNumber {\n if (!this.numberInstance) {\n return (this.phoneNumber?.toString() || '') as E164Number | NationalNumber\n }\n switch (this.format) {\n case 'national':\n return this.numberInstance.formatNational() as E164Number | NationalNumber\n case 'international':\n return this.numberInstance.formatInternational() as E164Number | NationalNumber\n default:\n return this.numberInstance.nationalNumber.toString() as E164Number | NationalNumber\n }\n }\n\n private formatAsYouTypeIfEnabled(): void {\n if (this.format === 'default') {\n return\n }\n const asYouType: AsYouType = new AsYouType(this.$selectedCountry().iso2.toUpperCase() as CC)\n // To avoid caret positioning we apply formatting only if the caret is at the end:\n if (!this.phoneNumber) return\n\n if (this.phoneNumber?.toString().startsWith(this._previousFormattedNumber || '')) {\n this.phoneNumber = asYouType.input(this.phoneNumber.toString()) as E164Number | NationalNumber\n }\n this._previousFormattedNumber = this.phoneNumber.toString()\n }\n}\n","<div class=\"ngx-mat-input-tel-container\">\n <button\n type=\"button\"\n matRipple\n [matMenuTriggerFor]=\"menu\"\n class=\"country-selector\"\n [disabled]=\"disabled\"\n (menuOpened)=\"onMenuOpened()\"\n [attr.aria-label]=\"ariaLabel\"\n >\n <ngx-mat-input-tel-flag\n class=\"main-flag\"\n [country]=\"{\n iso2: $selectedCountry().iso2,\n dialCode: $selectedCountry().dialCode,\n }\"\n ></ngx-mat-input-tel-flag>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @if (enableSearch) {\n <input\n #menuSearchInput\n class=\"country-search\"\n [(ngModel)]=\"$searchCriteria\"\n [placeholder]=\"searchPlaceholder\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\"\n style=\"\n width: calc(100% - 4px);\n height: 34px;\n border-top: none;\n border-right: none;\n border-left: none;\n border-image: initial;\n border-bottom: 1px solid rgb(221, 221, 221);\n font-size: 14px;\n padding: 20px 10px 24px;\n box-sizing: border-box;\n background: transparent;\n margin: 2px;\n \"\n />\n }\n @for (\n country of $selectablePreferredCountriesInDropDown() | keyvalue: null;\n track country.key\n ) {\n <button\n type=\"button\"\n mat-menu-item\n class=\"country-list-button\"\n (click)=\"onCountrySelect(country)\"\n >\n <ngx-mat-input-tel-flag\n class=\"menu-flag\"\n [country]=\"country.value\"\n ></ngx-mat-input-tel-flag>\n </button>\n }\n @if ($showDivider()) {\n <mat-divider></mat-divider>\n }\n @for (country of $selectableCountries() | keyvalue: null; track country.key) {\n <button\n type=\"button\"\n mat-menu-item\n class=\"country-list-button\"\n (click)=\"onCountrySelect(country)\"\n >\n <ngx-mat-input-tel-flag\n class=\"menu-flag\"\n [country]=\"country.value\"\n ></ngx-mat-input-tel-flag>\n </button>\n }\n </ng-template>\n </mat-menu>\n\n <input\n class=\"ngx-mat-input-tel-input\"\n matInput\n type=\"tel\"\n inputmode=\"tel\"\n name=\"tel\"\n [autocomplete]=\"autocomplete\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [placeholder]=\"placeholder || ($selectedCountry() | removeIso) || ''\"\n [disabled]=\"disabled\"\n #focusable\n [maxlength]=\"maxLength\"\n />\n</div>\n","/*\n * Public API Surface of ngx-mat-input-tel\n */\n\nexport * from './lib/ngx-mat-input-tel.component'\nexport * from './lib/ngx-mat-input-tel.validator'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAO,MAAM,cAAc,GAA2B;AACpD,IAAA,EAAE,EAAE,4BAA4B;AAChC,IAAA,EAAE,EAAE,oBAAoB;AACxB,IAAA,EAAE,EAAE,sBAAsB;AAC1B,IAAA,EAAE,EAAE,gBAAgB;AACpB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,UAAU;AACd,IAAA,EAAE,EAAE,qBAAqB;AACzB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,oBAAoB;AACxB,IAAA,EAAE,EAAE,OAAO;AACX,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,EAAE,EAAE,sBAAsB;AAC1B,IAAA,EAAE,EAAE,yBAAyB;AAC7B,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,sBAAsB;AAC1B,IAAA,EAAE,EAAE,uBAAuB;AAC3B,IAAA,EAAE,EAAE,UAAU;AACd,IAAA,EAAE,EAAE,oBAAoB;AACxB,IAAA,EAAE,EAAE,kBAAkB;AACtB,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,gBAAgB;AACpB,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,8CAA8C;AAClD,IAAA,EAAE,EAAE,UAAU;AACd,IAAA,EAAE,EAAE,iBAAiB;AACrB,IAAA,EAAE,EAAE,gCAAgC;AACpC,IAAA,EAAE,EAAE,wBAAwB;AAC5B,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,qBAAqB;AACzB,IAAA,EAAE,EAAE,cAAc;AAClB,IAAA,EAAE,EAAE,oBAAoB;AACxB,IAAA,EAAE,EA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