251 lines
10 KiB
TypeScript
251 lines
10 KiB
TypeScript
// Port of `doxa_get_countries()` from marketing-theme/functions.php.
|
||
// Source lists ~240 countries with 3-letter ISO codes. WP sorts by label
|
||
// at the end of the function; we pre-sort here so the array is
|
||
// immutable at module load.
|
||
|
||
export interface Country { value: string; label: string }
|
||
|
||
export const COUNTRIES: Country[] = [
|
||
{ value: "AFG", label: "Afghanistan" },
|
||
{ value: "ALB", label: "Albania" },
|
||
{ value: "DZA", label: "Algeria" },
|
||
{ value: "ASM", label: "American Samoa" },
|
||
{ value: "AND", label: "Andorra" },
|
||
{ value: "AGO", label: "Angola" },
|
||
{ value: "AIA", label: "Anguilla" },
|
||
{ value: "ATG", label: "Antigua and Barbuda" },
|
||
{ value: "ARG", label: "Argentina" },
|
||
{ value: "ARM", label: "Armenia" },
|
||
{ value: "ABW", label: "Aruba" },
|
||
{ value: "AUS", label: "Australia" },
|
||
{ value: "AUT", label: "Austria" },
|
||
{ value: "AZE", label: "Azerbaijan" },
|
||
{ value: "BHR", label: "Bahrain" },
|
||
{ value: "BGD", label: "Bangladesh" },
|
||
{ value: "BRB", label: "Barbados" },
|
||
{ value: "BLR", label: "Belarus" },
|
||
{ value: "BEL", label: "Belgium" },
|
||
{ value: "BLZ", label: "Belize" },
|
||
{ value: "BEN", label: "Benin" },
|
||
{ value: "BMU", label: "Bermuda" },
|
||
{ value: "BTN", label: "Bhutan" },
|
||
{ value: "BOL", label: "Bolivia" },
|
||
{ value: "BES", label: "Bonaire, Sint Eustatius, and Saba" },
|
||
{ value: "BIH", label: "Bosnia and Herzegovina" },
|
||
{ value: "BWA", label: "Botswana" },
|
||
{ value: "BRA", label: "Brazil" },
|
||
{ value: "BRN", label: "Brunei" },
|
||
{ value: "BGR", label: "Bulgaria" },
|
||
{ value: "BFA", label: "Burkina Faso" },
|
||
{ value: "BDI", label: "Burundi" },
|
||
{ value: "CPV", label: "Cabo Verde" },
|
||
{ value: "KHM", label: "Cambodia" },
|
||
{ value: "CMR", label: "Cameroon" },
|
||
{ value: "CAN", label: "Canada" },
|
||
{ value: "CYM", label: "Cayman Islands" },
|
||
{ value: "CAF", label: "Central African Republic" },
|
||
{ value: "TCD", label: "Chad" },
|
||
{ value: "CHL", label: "Chile" },
|
||
{ value: "CHN", label: "China" },
|
||
{ value: "CXR", label: "Christmas Island" },
|
||
{ value: "CCK", label: "Cocos (Keeling) Islands" },
|
||
{ value: "COL", label: "Colombia" },
|
||
{ value: "COM", label: "Comoros" },
|
||
{ value: "COK", label: "Cook Islands" },
|
||
{ value: "CRI", label: "Costa Rica" },
|
||
{ value: "CIV", label: "Côte d’Ivoire" },
|
||
{ value: "HRV", label: "Croatia" },
|
||
{ value: "CUB", label: "Cuba" },
|
||
{ value: "CUW", label: "Curaçao" },
|
||
{ value: "CYP", label: "Cyprus" },
|
||
{ value: "DNK", label: "Denmark" },
|
||
{ value: "DJI", label: "Djibouti" },
|
||
{ value: "DMA", label: "Dominica" },
|
||
{ value: "DOM", label: "Dominican Republic" },
|
||
{ value: "ECU", label: "Ecuador" },
|
||
{ value: "EGY", label: "Egypt" },
|
||
{ value: "SLV", label: "El Salvador" },
|
||
{ value: "GNQ", label: "Equatorial Guinea" },
|
||
{ value: "ERI", label: "Eritrea" },
|
||
{ value: "EST", label: "Estonia" },
|
||
{ value: "SWZ", label: "Eswatini" },
|
||
{ value: "ETH", label: "Ethiopia" },
|
||
{ value: "FLK", label: "Falkland Islands (Islas Malvinas)" },
|
||
{ value: "FRO", label: "Faroe Islands" },
|
||
{ value: "FJI", label: "Fiji" },
|
||
{ value: "FIN", label: "Finland" },
|
||
{ value: "FRA", label: "France" },
|
||
{ value: "GUF", label: "French Guiana" },
|
||
{ value: "PYF", label: "French Polynesia" },
|
||
{ value: "GAB", label: "Gabon" },
|
||
{ value: "GEO", label: "Georgia" },
|
||
{ value: "DEU", label: "Germany" },
|
||
{ value: "GHA", label: "Ghana" },
|
||
{ value: "GIB", label: "Gibraltar" },
|
||
{ value: "GRC", label: "Greece" },
|
||
{ value: "GRL", label: "Greenland" },
|
||
{ value: "GRD", label: "Grenada" },
|
||
{ value: "GLP", label: "Guadeloupe" },
|
||
{ value: "GUM", label: "Guam" },
|
||
{ value: "GTM", label: "Guatemala" },
|
||
{ value: "GGY", label: "Guernsey" },
|
||
{ value: "GIN", label: "Guinea" },
|
||
{ value: "GNB", label: "Guinea-Bissau" },
|
||
{ value: "GUY", label: "Guyana" },
|
||
{ value: "HTI", label: "Haiti" },
|
||
{ value: "HND", label: "Honduras" },
|
||
{ value: "HKG", label: "Hong Kong" },
|
||
{ value: "HUN", label: "Hungary" },
|
||
{ value: "ISL", label: "Iceland" },
|
||
{ value: "IND", label: "India" },
|
||
{ value: "IDN", label: "Indonesia" },
|
||
{ value: "IRN", label: "Iran" },
|
||
{ value: "IRQ", label: "Iraq" },
|
||
{ value: "IRL", label: "Ireland" },
|
||
{ value: "IMN", label: "Isle of Man" },
|
||
{ value: "ISR", label: "Israel" },
|
||
{ value: "ITA", label: "Italy" },
|
||
{ value: "JAM", label: "Jamaica" },
|
||
{ value: "JPN", label: "Japan" },
|
||
{ value: "JEY", label: "Jersey" },
|
||
{ value: "JOR", label: "Jordan" },
|
||
{ value: "KAZ", label: "Kazakhstan" },
|
||
{ value: "KEN", label: "Kenya" },
|
||
{ value: "KIR", label: "Kiribati" },
|
||
{ value: "KOS", label: "Kosovo" },
|
||
{ value: "KWT", label: "Kuwait" },
|
||
{ value: "KGZ", label: "Kyrgyzstan" },
|
||
{ value: "LAO", label: "Laos" },
|
||
{ value: "LVA", label: "Latvia" },
|
||
{ value: "LBN", label: "Lebanon" },
|
||
{ value: "LSO", label: "Lesotho" },
|
||
{ value: "LBR", label: "Liberia" },
|
||
{ value: "LBY", label: "Libya" },
|
||
{ value: "LIE", label: "Liechtenstein" },
|
||
{ value: "LTU", label: "Lithuania" },
|
||
{ value: "LUX", label: "Luxembourg" },
|
||
{ value: "MAC", label: "Macao" },
|
||
{ value: "MDG", label: "Madagascar" },
|
||
{ value: "MWI", label: "Malawi" },
|
||
{ value: "MYS", label: "Malaysia" },
|
||
{ value: "MLI", label: "Mali" },
|
||
{ value: "MLT", label: "Malta" },
|
||
{ value: "MTQ", label: "Martinique" },
|
||
{ value: "MRT", label: "Mauritania" },
|
||
{ value: "MUS", label: "Mauritius" },
|
||
{ value: "MYT", label: "Mayotte" },
|
||
{ value: "MEX", label: "Mexico" },
|
||
{ value: "MDA", label: "Moldova" },
|
||
{ value: "MCO", label: "Monaco" },
|
||
{ value: "MNG", label: "Mongolia" },
|
||
{ value: "MNE", label: "Montenegro" },
|
||
{ value: "MSR", label: "Montserrat" },
|
||
{ value: "MAR", label: "Morocco" },
|
||
{ value: "MOZ", label: "Mozambique" },
|
||
{ value: "MMR", label: "Myanmar" },
|
||
{ value: "NAM", label: "Namibia" },
|
||
{ value: "NRU", label: "Nauru" },
|
||
{ value: "NPL", label: "Nepal" },
|
||
{ value: "NCL", label: "New Caledonia" },
|
||
{ value: "NZL", label: "New Zealand" },
|
||
{ value: "NIC", label: "Nicaragua" },
|
||
{ value: "NER", label: "Niger" },
|
||
{ value: "NGA", label: "Nigeria" },
|
||
{ value: "NIU", label: "Niue" },
|
||
{ value: "NFK", label: "Norfolk Island" },
|
||
{ value: "PRK", label: "North Korea" },
|
||
{ value: "MKD", label: "North Macedonia" },
|
||
{ value: "NOR", label: "Norway" },
|
||
{ value: "OMN", label: "Oman" },
|
||
{ value: "PAK", label: "Pakistan" },
|
||
{ value: "PLW", label: "Palau" },
|
||
{ value: "PSE", label: "Palestine" },
|
||
{ value: "PAN", label: "Panama" },
|
||
{ value: "PNG", label: "Papua New Guinea" },
|
||
{ value: "PRY", label: "Paraguay" },
|
||
{ value: "PER", label: "Peru" },
|
||
{ value: "POL", label: "Poland" },
|
||
{ value: "PRT", label: "Portugal" },
|
||
{ value: "PRI", label: "Puerto Rico" },
|
||
{ value: "QAT", label: "Qatar" },
|
||
{ value: "REU", label: "Reunion" },
|
||
{ value: "ROU", label: "Romania" },
|
||
{ value: "RWA", label: "Rwanda" },
|
||
{ value: "BLM", label: "Saint Barthelemy" },
|
||
{ value: "SHN", label: "Saint Helena, Ascension, and Tristan da Cunha" },
|
||
{ value: "KNA", label: "Saint Kitts and Nevis" },
|
||
{ value: "LCA", label: "Saint Lucia" },
|
||
{ value: "MAF", label: "Saint Martin" },
|
||
{ value: "SPM", label: "Saint Pierre and Miquelon" },
|
||
{ value: "VCT", label: "Saint Vincent and the Grenadines" },
|
||
{ value: "WSM", label: "Samoa" },
|
||
{ value: "SMR", label: "San Marino" },
|
||
{ value: "STP", label: "Sao Tome and Principe" },
|
||
{ value: "SAU", label: "Saudi Arabia" },
|
||
{ value: "SEN", label: "Senegal" },
|
||
{ value: "SRB", label: "Serbia" },
|
||
{ value: "SYC", label: "Seychelles" },
|
||
{ value: "SLE", label: "Sierra Leone" },
|
||
{ value: "SGP", label: "Singapore" },
|
||
{ value: "SXM", label: "Sint Maarten" },
|
||
{ value: "SVK", label: "Slovakia" },
|
||
{ value: "SVN", label: "Slovenia" },
|
||
{ value: "SOM", label: "Somalia" },
|
||
{ value: "ZAF", label: "South Africa" },
|
||
{ value: "KOR", label: "South Korea" },
|
||
{ value: "SSD", label: "South Sudan" },
|
||
{ value: "ESP", label: "Spain" },
|
||
{ value: "LKA", label: "Sri Lanka" },
|
||
{ value: "SDN", label: "Sudan" },
|
||
{ value: "SUR", label: "Suriname" },
|
||
{ value: "SJM", label: "Svalbard" },
|
||
{ value: "SWE", label: "Sweden" },
|
||
{ value: "CHE", label: "Switzerland" },
|
||
{ value: "SYR", label: "Syria" },
|
||
{ value: "TWN", label: "Taiwan" },
|
||
{ value: "TJK", label: "Tajikistan" },
|
||
{ value: "TZA", label: "Tanzania" },
|
||
{ value: "THA", label: "Thailand" },
|
||
{ value: "BHS", label: "The Bahamas" },
|
||
{ value: "VGB", label: "the British Virgin Islands" },
|
||
{ value: "CZE", label: "the Czech Republic" },
|
||
{ value: "COD", label: "the Democratic Republic of the Congo" },
|
||
{ value: "FSM", label: "the Federated States of Micronesia" },
|
||
{ value: "GMB", label: "The Gambia" },
|
||
{ value: "MDV", label: "the Maldives" },
|
||
{ value: "MHL", label: "the Marshall Islands" },
|
||
{ value: "NLD", label: "the Netherlands" },
|
||
{ value: "MNP", label: "the Northern Mariana Islands" },
|
||
{ value: "PHL", label: "the Philippines" },
|
||
{ value: "PCN", label: "the Pitcairn Islands" },
|
||
{ value: "COG", label: "the Republic of the Congo" },
|
||
{ value: "RUS", label: "the Russian Federation" },
|
||
{ value: "SLB", label: "the Solomon Islands" },
|
||
{ value: "TCA", label: "the Turks and Caicos Islands" },
|
||
{ value: "ARE", label: "the United Arab Emirates" },
|
||
{ value: "GBR", label: "the United Kingdom" },
|
||
{ value: "USA", label: "the United States" },
|
||
{ value: "VIR", label: "the Virgin Islands" },
|
||
{ value: "TLS", label: "Timor-Leste" },
|
||
{ value: "TGO", label: "Togo" },
|
||
{ value: "TKL", label: "Tokelau" },
|
||
{ value: "TON", label: "Tonga" },
|
||
{ value: "TTO", label: "Trinidad and Tobago" },
|
||
{ value: "TUN", label: "Tunisia" },
|
||
{ value: "TUR", label: "Turkiye" },
|
||
{ value: "TKM", label: "Turkmenistan" },
|
||
{ value: "TUV", label: "Tuvalu" },
|
||
{ value: "UGA", label: "Uganda" },
|
||
{ value: "UKR", label: "Ukraine" },
|
||
{ value: "URY", label: "Uruguay" },
|
||
{ value: "UZB", label: "Uzbekistan" },
|
||
{ value: "VUT", label: "Vanuatu" },
|
||
{ value: "VAT", label: "Vatican City" },
|
||
{ value: "VEN", label: "Venezuela" },
|
||
{ value: "VNM", label: "Vietnam" },
|
||
{ value: "WLF", label: "Wallis and Futuna" },
|
||
{ value: "ESH", label: "Western Sahara" },
|
||
{ value: "YEM", label: "Yemen" },
|
||
{ value: "ZMB", label: "Zambia" },
|
||
{ value: "ZWE", label: "Zimbabwe" }
|
||
]
|