"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=`{ "AO": { "phoneCode": 244, "capitalCity": "Luanda", "flagEmoji": "๐Ÿ‡ฆ๐Ÿ‡ด", "name": "Angola", "currency": "Angolan kwanza", "internetUsers": 606700, "officialLanguage": "Portuguese", "population": 19088106, "altSpellings": "", "subRegion": "", "area": "" }, "BJ": { "phoneCode": 229, "capitalCity": "Porto-Novo", "flagEmoji": "๐Ÿ‡ง๐Ÿ‡ฏ", "name": "Benin", "currency": "West African CFA franc", "internetUsers": 200100, "officialLanguage": "French", "population": 10160556, "altSpellings": "", "subRegion": "", "area": "" }, "BW": { "phoneCode": 267, "capitalCity": "Gaborone", "flagEmoji": "๐Ÿ‡ง๐Ÿ‡ผ", "name": "Botswana", "currency": "Botswana pula", "internetUsers": 120000, "officialLanguage": "Setswana", "population": 2155784, "altSpellings": "", "subRegion": "", "area": "" }, "BF": { "phoneCode": 226, "capitalCity": "Ouagadougou", "flagEmoji": "๐Ÿ‡ง๐Ÿ‡ซ", "name": "Burkina Faso", "currency": "West African CFA franc", "internetUsers": 178100, "officialLanguage": "French", "population": 18365123, "altSpellings": "", "subRegion": "", "area": "" }, "BI": { "phoneCode": 257, "capitalCity": "Bujumbura", "flagEmoji": "๐Ÿ‡ง๐Ÿ‡ฎ", "name": "Burundi", "currency": "Burundi franc", "internetUsers": 157800, "officialLanguage": "Kirundi", "population": 10395931, "altSpellings": "", "subRegion": "", "area": "" }, "CV": { "phoneCode": 238, "capitalCity": "Praia", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ป", "name": "Cabo Verde", "currency": "Cape Verdean escudo", "internetUsers": 150000, "officialLanguage": "Portuguese", "population": 538535, "altSpellings": "", "subRegion": "", "area": "" }, "CM": { "phoneCode": 237, "capitalCity": "Yaoundรฉ", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ฒ", "name": "Cameroon", "currency": "Central African CFA franc", "internetUsers": 749600, "officialLanguage": "Major African languages", "population": 23130708, "altSpellings": "", "subRegion": "", "area": "" }, "CF": { "phoneCode": 236, "capitalCity": "Bangui", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ซ", "name": "Central African Republic", "currency": "Central African CFA franc", "internetUsers": 22600, "officialLanguage": "French", "population": 5277959, "altSpellings": "", "subRegion": "", "area": "" }, "DZ": { "phoneCode": 213, "capitalCity": "Algiers", "flagEmoji": "๐Ÿ‡ฉ๐Ÿ‡ฟ", "name": "Algeria", "currency": "Algerian dinar", "internetUsers": 4700000, "officialLanguage": "Arabic", "population": 38813722, "altSpellings": "", "subRegion": "", "area": "" }, "TD": { "phoneCode": 235, "capitalCity": "N'Djamena", "flagEmoji": "๐Ÿ‡น๐Ÿ‡ฉ", "name": "Chad", "currency": "Central African CFA franc", "internetUsers": 168100, "officialLanguage": "French", "population": 11412107, "altSpellings": "", "subRegion": "", "area": "" }, "KM": { "phoneCode": 269, "capitalCity": "Moroni", "flagEmoji": "๐Ÿ‡ฐ๐Ÿ‡ฒ", "name": "Comoros", "currency": "Comorian franc", "internetUsers": 24300, "officialLanguage": "Arabic", "population": 766865, "altSpellings": "", "subRegion": "", "area": "" }, "CD": { "phoneCode": 243, "capitalCity": "Kinshasa", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ฉ", "name": "Democratic Republic of the Congo", "currency": "Congolese franc", "internetUsers": 290000, "officialLanguage": "French", "population": 77433744, "altSpellings": "", "subRegion": "", "area": "" }, "CG": { "phoneCode": 242, "capitalCity": "Brazzaville", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ฌ", "name": "Republic of the Congo", "currency": "Central African CFA franc", "internetUsers": 245200, "officialLanguage": "French", "population": 4662446, "altSpellings": "", "subRegion": "", "area": "" }, "CI": { "phoneCode": 225, "capitalCity": "Yamoussoukro", "flagEmoji": "๐Ÿ‡จ๐Ÿ‡ฎ", "name": "Cote D'Ivoire", "currency": "West African CFA franc", "internetUsers": 967300, "officialLanguage": "French", "population": 22848945, "altSpellings": "", "subRegion": "", "area": "" }, "DJ": { "phoneCode": 253, "capitalCity": "Djibouti (city)", "flagEmoji": "๐Ÿ‡ฉ๐Ÿ‡ฏ", "name": "Djibouti", "currency": "Djiboutian franc", "internetUsers": 25900, "officialLanguage": "French", "population": 810179, "altSpellings": "", "subRegion": "", "area": "" }, "EG": { "phoneCode": 20, "capitalCity": "Cairo", "flagEmoji": "๐Ÿ‡ช๐Ÿ‡ฌ", "name": "Egypt", "currency": "Egyptian Pound", "internetUsers": 20136000, "officialLanguage": "Arabic", "population": 86895099, "altSpellings": "", "subRegion": "", "area": "" }, "GQ": { "phoneCode": 240, "capitalCity": "Malabo", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ถ", "name": "Equatorial Guinea", "currency": "Central African CFA franc", "internetUsers": 14400, "officialLanguage": "Spanish", "population": 722254, "altSpellings": "", "subRegion": "", "area": "" }, "ER": { "phoneCode": 291, "capitalCity": "Asmara", "flagEmoji": "๐Ÿ‡ช๐Ÿ‡ท", "name": "Eritrea", "currency": "Eritrean nakfa", "internetUsers": 200000, "officialLanguage": "Afar", "population": 6380803, "altSpellings": "", "subRegion": "", "area": "" }, "ET": { "phoneCode": 251, "capitalCity": "Addis Ababa", "flagEmoji": "๐Ÿ‡ช๐Ÿ‡น", "name": "Ethiopia", "currency": "Ethiopian birr", "internetUsers": 447300, "officialLanguage": "Amharic", "population": 96633458, "altSpellings": "", "subRegion": "", "area": "" }, "GA": { "phoneCode": 241, "capitalCity": "Libreville", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ฆ", "name": "Gabon", "currency": "Central African CFA franc", "internetUsers": 98800, "officialLanguage": "French", "population": 1672597, "altSpellings": "", "subRegion": "", "area": "" }, "GH": { "phoneCode": 233, "capitalCity": "Accra", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ญ", "name": "Ghana", "currency": "Ghanaian cedi", "internetUsers": 1297000, "officialLanguage": "English", "population": 25758108, "altSpellings": "", "subRegion": "", "area": "" }, "GM": { "phoneCode": 220, "capitalCity": "Banjul", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ฒ", "name": "Gambia", "currency": "Dalasi", "internetUsers": null, "officialLanguage": "English", "population": 1857181, "altSpellings": "", "subRegion": "", "area": "" }, "GN": { "phoneCode": 224, "capitalCity": "Conakry", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ณ", "name": "Guinea", "currency": "Guinean franc", "internetUsers": 95000, "officialLanguage": "French", "population": 11474383, "altSpellings": "", "subRegion": "", "area": "" }, "GW": { "phoneCode": 245, "capitalCity": "Bissau", "flagEmoji": "๐Ÿ‡ฌ๐Ÿ‡ผ", "name": "Guinea-Bissau", "currency": "West African CFA franc", "internetUsers": 37100, "officialLanguage": "Portuguese", "population": 1693398, "altSpellings": "", "subRegion": "", "area": "" }, "KE": { "phoneCode": 254, "capitalCity": "Nairobi", "flagEmoji": "๐Ÿ‡ฐ๐Ÿ‡ช", "name": "Kenya", "currency": "Kenyan shilling", "internetUsers": 3996000, "officialLanguage": "English", "population": 45010056, "altSpellings": "", "subRegion": "", "area": "" }, "LS": { "phoneCode": 266, "capitalCity": "Maseru", "flagEmoji": "๐Ÿ‡ฑ๐Ÿ‡ธ", "name": "Lesotho", "currency": "Lesotho loti", "internetUsers": 76800, "officialLanguage": "Sesotho", "population": 1942008, "altSpellings": "", "subRegion": "", "area": "" }, "LR": { "phoneCode": 231, "capitalCity": "Monrovia", "flagEmoji": "๐Ÿ‡ฑ๐Ÿ‡ท", "name": "Liberia", "currency": "Liberian Dollar", "internetUsers": 20000, "officialLanguage": "English", "population": 4092310, "altSpellings": "", "subRegion": "", "area": "" }, "LY": { "phoneCode": 218, "capitalCity": "Tripoli", "flagEmoji": "๐Ÿ‡ฑ๐Ÿ‡พ", "name": "Libya", "currency": "Libyan dinar", "internetUsers": 353900, "officialLanguage": "Arabic", "population": 6244174, "altSpellings": "", "subRegion": "", "area": "" }, "MG": { "phoneCode": 261, "capitalCity": "Antananarivo", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ฌ", "name": "Madagascar", "currency": "Malagasy ariary", "internetUsers": 319900, "officialLanguage": "French", "population": 23201926, "altSpellings": "", "subRegion": "", "area": "" }, "MW": { "phoneCode": 265, "capitalCity": "Lilongwe", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ผ", "name": "Malawi", "currency": "Malawian kwacha", "internetUsers": 716400, "officialLanguage": "Chichewa", "population": 17377468, "altSpellings": "", "subRegion": "", "area": "" }, "ML": { "phoneCode": 223, "capitalCity": "Bamako", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ฑ", "name": "Mali", "currency": "West African CFA franc", "internetUsers": 249800, "officialLanguage": "French", "population": 16455903, "altSpellings": "", "subRegion": "", "area": "" }, "MR": { "phoneCode": 222, "capitalCity": "Nouakchott", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ท", "name": "Mauritania", "currency": "Mauritanian ouguiya", "internetUsers": 75000, "officialLanguage": "Arabic", "population": 3516806, "altSpellings": "", "subRegion": "", "area": "" }, "MU": { "phoneCode": 230, "capitalCity": "Port Louis", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡บ", "name": "Mauritius", "currency": "Mauritian rupee", "internetUsers": 290000, "officialLanguage": "Creole", "population": 1331155, "altSpellings": "", "subRegion": "", "area": "" }, "MA": { "phoneCode": 212, "capitalCity": "Rabat", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ฆ", "name": "Morocco", "currency": "Moroccan dirham", "internetUsers": 13213000, "officialLanguage": "Arabic", "population": 32987206, "altSpellings": "", "subRegion": "", "area": "" }, "MZ": { "phoneCode": 258, "capitalCity": "Maputo", "flagEmoji": "๐Ÿ‡ฒ๐Ÿ‡ฟ", "name": "Mozambique", "currency": "Mozambican metical", "internetUsers": 613600, "officialLanguage": "Emakhuwa", "population": 24692144, "altSpellings": "", "subRegion": "", "area": "" }, "NA": { "phoneCode": 264, "capitalCity": "Windhoek", "flagEmoji": "๐Ÿ‡ณ๐Ÿ‡ฆ", "name": "Namibia", "currency": "Namibian Dollar", "internetUsers": 127500, "officialLanguage": null, "population": 2198406, "altSpellings": "", "subRegion": "", "area": "" }, "NE": { "phoneCode": 227, "capitalCity": "Niamey", "flagEmoji": "๐Ÿ‡ณ๐Ÿ‡ช", "name": "Niger", "currency": "West African CFA franc", "internetUsers": 115900, "officialLanguage": "French", "population": 17466172, "altSpellings": "", "subRegion": "", "area": "" }, "NG": { "phoneCode": 234, "capitalCity": "Abuja", "flagEmoji": "๐Ÿ‡ณ๐Ÿ‡ฌ", "name": "Nigeria", "currency": "Nigerian naira", "internetUsers": 43989000, "officialLanguage": "English", "population": 200963599, "altSpellings": "", "subRegion": "", "area": "" }, "RW": { "phoneCode": 250, "capitalCity": "Kigali", "flagEmoji": "๐Ÿ‡ท๐Ÿ‡ผ", "name": "Rwanda", "currency": "Rwandan franc", "internetUsers": 450000, "officialLanguage": "Kinyarwanda", "population": 12337138, "altSpellings": "", "subRegion": "", "area": "" }, "ST": { "phoneCode": 239, "capitalCity": "Sรฃo Tomรฉ", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡น", "name": "Sao Tome And Principe", "currency": "Sao Tome and Principe dobra", "internetUsers": 26700, "officialLanguage": "Portuguese", "population": 190428, "altSpellings": "", "subRegion": "", "area": "" }, "SN": { "phoneCode": 221, "capitalCity": "Dakar", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ณ", "name": "Senegal", "currency": "West African CFA franc", "internetUsers": 1818000, "officialLanguage": "French", "population": 13635927, "altSpellings": "", "subRegion": "", "area": "" }, "SC": { "phoneCode": 248, "capitalCity": "Victoria", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡จ", "name": "Seychelles", "currency": "Seychellois rupee", "internetUsers": 32000, "officialLanguage": "Creole", "population": 91650, "altSpellings": "", "subRegion": "", "area": "" }, "SL": { "phoneCode": 232, "capitalCity": "Freetown", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ฑ", "name": "Sierra Leone", "currency": "Sierra Leonean leone", "internetUsers": 14900, "officialLanguage": "English", "population": 5743725, "altSpellings": "", "subRegion": "", "area": "" }, "SO": { "phoneCode": 252, "capitalCity": "Mogadishu", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ด", "name": "Somalia", "currency": "Somali shilling", "internetUsers": 106000, "officialLanguage": "Somali", "population": 10428043, "altSpellings": "", "subRegion": "", "area": "" }, "ZA": { "phoneCode": 27, "capitalCity": "Pretoria / Cape Town", "flagEmoji": "๐Ÿ‡ฟ๐Ÿ‡ฆ", "name": "South Africa", "currency": "South African rand", "internetUsers": 4420000, "officialLanguage": "IsiZulu", "population": 48375645, "altSpellings": "", "subRegion": "", "area": "" }, "SS": { "phoneCode": 211, "capitalCity": "Juba", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ธ", "name": "South Sudan", "currency": "South Sudanese Pound", "internetUsers": null, "officialLanguage": "Arabic", "population": 11562695, "altSpellings": "", "subRegion": "", "area": "" }, "SD": { "phoneCode": 249, "capitalCity": "Khartoum", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ฉ", "name": "Sudan", "currency": "Sudanese Pound", "internetUsers": 4200000, "officialLanguage": "Arabic", "population": 35482233, "altSpellings": "", "subRegion": "", "area": "" }, "SZ": { "phoneCode": 268, "capitalCity": "Mbabane", "flagEmoji": "๐Ÿ‡ธ๐Ÿ‡ฟ", "name": "Eswatini", "currency": "Swazi lilangeni", "internetUsers": 90100, "officialLanguage": "English", "population": 1419623, "altSpellings": "", "subRegion": "", "area": "" }, "TZ": { "phoneCode": 255, "capitalCity": "Dodoma", "flagEmoji": "๐Ÿ‡น๐Ÿ‡ฟ", "name": "Tanzania", "currency": "Tanzanian shilling", "internetUsers": 678000, "officialLanguage": "Kiswahili or Swahili", "population": 49639138, "altSpellings": "", "subRegion": "", "area": "" }, "TG": { "phoneCode": 228, "capitalCity": "Lomรฉ", "flagEmoji": "๐Ÿ‡น๐Ÿ‡ฌ", "name": "Togo", "currency": "West African CFA franc", "internetUsers": 356300, "officialLanguage": "French", "population": 7351374, "altSpellings": "", "subRegion": "", "area": "" }, "TN": { "phoneCode": 216, "capitalCity": "Tunis", "flagEmoji": "๐Ÿ‡น๐Ÿ‡ณ", "name": "Tunisia", "currency": "Tunisian dinar", "internetUsers": 3500000, "officialLanguage": "Arabic", "population": 10937521, "altSpellings": "", "subRegion": "", "area": "" }, "UG": { "phoneCode": 256, "capitalCity": "Kampala", "flagEmoji": "๐Ÿ‡บ๐Ÿ‡ฌ", "name": "Uganda", "currency": "Ugandan shilling", "internetUsers": 3200000, "officialLanguage": "English", "population": 35918915, "altSpellings": "", "subRegion": "", "area": "" }, "ZM": { "phoneCode": 260, "capitalCity": "Lusaka", "flagEmoji": "๐Ÿ‡ฟ๐Ÿ‡ฒ", "name": "Zambia", "currency": "Zambian kwacha", "internetUsers": 816200, "officialLanguage": "English", "population": 14638505, "altSpellings": "", "subRegion": "", "area": "" }, "ZW": { "phoneCode": 263, "capitalCity": "Harare", "flagEmoji": "๐Ÿ‡ฟ๐Ÿ‡ผ", "name": "Zimbabwe", "currency": "United States Dollar", "internetUsers": 1423000, "officialLanguage": "English", "population": 13771721, "altSpellings": "", "subRegion": "", "area": "" } }`,t=JSON.parse(u);function c(i){const n=Object.values(t);return i&&i.length>0?n.map(e=>{const o={};return i.forEach(a=>{a in e&&(o[a]=e[a])}),o}):n}function s(i,n){const e=t[i.toUpperCase()];return e?n?n==null?void 0:n.reduce((a,r)=>{const l=r;return{...a,[l]:e[l]}},{name:e.name}):e:`Country not found for code: ${i}`}function p(i,n){const e=i.toLowerCase();let o=Object.values(t).filter(a=>{var r,l;return((r=a.name)==null?void 0:r.toLowerCase().includes(e))||((l=a.altSpellings)==null?void 0:l.toLowerCase().includes(e))});return o.length===0?"No country matches your search parameters.":n?o.map(a=>n==null?void 0:n.reduce((r,l)=>{const g=l;return{...r,[g]:a[g]}},{name:a.name})):o}exports.getAllCountries=c;exports.getCountryByCode=s;exports.searchCountryByName=p;