From 600c62af614a10affac01150c386d49a3374c04e Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Fri, 27 Aug 2021 23:16:57 +0300 Subject: [PATCH] Get countries list from api --- src/components/appSearchSuper..ts | 3 +- src/components/chat/bubbles.ts | 2 +- src/components/inputField.ts | 5 +- src/components/misc.ts | 41 - src/config/app.ts | 2 +- src/countries.ts | 20 +- src/helpers/dom/clickEvent.ts | 4 +- src/helpers/dom/dispatchEvent.ts | 4 + src/helpers/formatPhoneNumber.ts | 125 + src/layer.d.ts | 3 +- src/lib/appManagers/appUsersManager.ts | 2 +- src/lib/langPack.ts | 46 +- src/pages/pageSignIn.ts | 117 +- src/scripts/format_jsons.js | 67 +- src/scripts/in/countries.mtproto.json | 4205 ++++++++++++++++++ src/scripts/in/schema_additional_params.json | 3 +- src/scripts/out/countries.json | 2 +- src/scss/partials/_document.scss | 8 +- src/vendor/emoji/index.ts | 4 + 19 files changed, 4510 insertions(+), 153 deletions(-) create mode 100644 src/helpers/dom/dispatchEvent.ts create mode 100644 src/helpers/formatPhoneNumber.ts create mode 100644 src/scripts/in/countries.mtproto.json diff --git a/src/components/appSearchSuper..ts b/src/components/appSearchSuper..ts index 6c7c1a6c..5c325cc1 100644 --- a/src/components/appSearchSuper..ts +++ b/src/components/appSearchSuper..ts @@ -21,7 +21,7 @@ import AppMediaViewer from "./appMediaViewer"; import { SearchGroup, SearchGroupType } from "./appSearch"; import { horizontalMenu } from "./horizontalMenu"; import LazyLoadQueue from "./lazyLoadQueue"; -import { putPreloader, formatPhoneNumber } from "./misc"; +import { putPreloader } from "./misc"; import { ripple } from "./ripple"; import Scrollable, { ScrollableX } from "./scrollable"; import { wrapDocument, wrapPhoto, wrapVideo } from "./wrappers"; @@ -41,6 +41,7 @@ import cleanSearchText from "../helpers/cleanSearchText"; import { isTouchSupported } from "../helpers/touchSupport"; import handleTabSwipe from "../helpers/dom/handleTabSwipe"; import windowSize from "../helpers/windowSize"; +import { formatPhoneNumber } from "../helpers/formatPhoneNumber"; //const testScroll = false; diff --git a/src/components/chat/bubbles.ts b/src/components/chat/bubbles.ts index ff3828df..c4a955fe 100644 --- a/src/components/chat/bubbles.ts +++ b/src/components/chat/bubbles.ts @@ -35,7 +35,6 @@ import mediaSizes from "../../helpers/mediaSizes"; import { isAndroid, isApple, isMobile, isSafari } from "../../helpers/userAgent"; import I18n, { i18n, langPack } from "../../lib/langPack"; import AvatarElement from "../avatar"; -import { formatPhoneNumber } from "../misc"; import { ripple } from "../ripple"; import { wrapAlbum, wrapPhoto, wrapVideo, wrapDocument, wrapSticker, wrapPoll, wrapGroupedDocuments } from "../wrappers"; import { MessageRender } from "./messageRender"; @@ -75,6 +74,7 @@ import debounce from "../../helpers/schedulers/debounce"; import { formatNumber } from "../../helpers/number"; import { SEND_WHEN_ONLINE_TIMESTAMP } from "../../lib/mtproto/constants"; import windowSize from "../../helpers/windowSize"; +import { formatPhoneNumber } from "../../helpers/formatPhoneNumber"; const USE_MEDIA_TAILS = false; const IGNORE_ACTIONS: Set = new Set([ diff --git a/src/components/inputField.ts b/src/components/inputField.ts index 0efbeebe..e23995ed 100644 --- a/src/components/inputField.ts +++ b/src/components/inputField.ts @@ -4,10 +4,10 @@ * https://github.com/morethanwords/tweb/blob/master/LICENSE */ +import simulateEvent from "../helpers/dom/dispatchEvent"; import findUpAttribute from "../helpers/dom/findUpAttribute"; import getRichValue from "../helpers/dom/getRichValue"; import isInputEmpty from "../helpers/dom/isInputEmpty"; -import debounce from "../helpers/schedulers/debounce"; import { i18n, LangPackKey, _i18n } from "../lib/langPack"; import RichTextProcessor from "../lib/richtextprocessor"; @@ -240,8 +240,7 @@ class InputField { set value(value: string) { this.setValueSilently(value, false); - const event = new Event('input', {bubbles: true, cancelable: true}); - this.input.dispatchEvent(event); + simulateEvent(this.input, 'input'); } public setValueSilently(value: string, fireFakeInput = true) { diff --git a/src/components/misc.ts b/src/components/misc.ts index a622ff82..ab13e06c 100644 --- a/src/components/misc.ts +++ b/src/components/misc.ts @@ -5,7 +5,6 @@ */ import { MOUNT_CLASS_TO } from "../config/debug"; -import Countries, { Country, PhoneCodesMain } from "../countries"; import { cancelEvent } from "../helpers/dom/cancelEvent"; import { CLICK_EVENT_NAME } from "../helpers/dom/clickEvent"; import ListenerSetter from "../helpers/listenerSetter"; @@ -51,46 +50,6 @@ export function setButtonLoader(elem: HTMLButtonElement, icon = 'check') { }; } -let sortedCountries: Country[]; -export function formatPhoneNumber(originalStr: string) { - let str = originalStr.replace(/\D/g, ''); - let phoneCode = str.slice(0, 6); - - ////console.log('str', str, phoneCode); - if(!sortedCountries) { - sortedCountries = Countries.slice().sort((a, b) => b.phoneCode.length - a.phoneCode.length); - } - - let country = sortedCountries.find((c) => { - return c.phoneCode.split(' and ').find((c) => phoneCode.indexOf(c.replace(/\D/g, '')) === 0); - }); - - if(!country) return {formatted: str, country, leftPattern: ''}; - - country = PhoneCodesMain[country.phoneCode] || country; - - let pattern = country.pattern || country.phoneCode; - pattern.split('').forEach((symbol, idx) => { - if(symbol === ' ' && str[idx] !== ' ' && str.length > idx) { - str = str.slice(0, idx) + ' ' + str.slice(idx); - } - }); - - /* if(country.pattern) { - str = str.slice(0, country.pattern.length); - } */ - - let leftPattern = pattern && pattern.length > str.length ? pattern.slice(str.length) : ''; - if(leftPattern) { - /* const length = str.length; - leftPattern = leftPattern.split('').map((_, idx) => (length + idx).toString().slice(-1)).join(''); */ - leftPattern = leftPattern.replace(/X/g, '‒'); - // leftPattern = leftPattern.replace(/X/g, '0'); - } - - return {formatted: str, country, leftPattern}; -} - /* export function parseMenuButtonsTo(to: {[name: string]: HTMLElement}, elements: HTMLCollection | NodeListOf) { Array.from(elements).forEach(el => { const match = el.className.match(/(?:^|\s)menu-(.+?)(?:$|\s)/); diff --git a/src/config/app.ts b/src/config/app.ts index a8899839..dd04ef0e 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -17,7 +17,7 @@ const App = { id: 1025907, hash: '452b0359b988148995f22ff0f4229750', version: '0.7.2', - langPackVersion: '0.3.2', + langPackVersion: '0.3.3', langPack: 'macos', langPackCode: 'en', domains: [MAIN_DOMAIN] as string[], diff --git a/src/countries.ts b/src/countries.ts index 100db144..2c4e7f0f 100644 --- a/src/countries.ts +++ b/src/countries.ts @@ -4,18 +4,15 @@ * https://github.com/morethanwords/tweb/blob/master/LICENSE */ -import { MOUNT_CLASS_TO } from "./config/debug"; +import type { HelpCountriesList } from "./layer"; -export type Country = { - phoneCode: string, - code: string, - name: string, - pattern: string, - emoji: string +const Countries: HelpCountriesList.helpCountriesList = { + _: 'help.countriesList', + countries: [{"iso2":"AD","default_name":"Andorra","country_codes":[{"country_code":"376","patterns":["XX XX XX"]}]},{"iso2":"AE","default_name":"United Arab Emirates","country_codes":[{"country_code":"971","patterns":["XX XXX XXXX"]}]},{"iso2":"AF","default_name":"Afghanistan","country_codes":[{"country_code":"93","patterns":["XXX XXX XXX"]}]},{"iso2":"AG","default_name":"Antigua & Barbuda","country_codes":[{"country_code":"1268","patterns":["XXX XXXX"]}]},{"iso2":"AI","default_name":"Anguilla","country_codes":[{"country_code":"1264","patterns":["XXX XXXX"]}]},{"iso2":"AL","default_name":"Albania","country_codes":[{"country_code":"355","patterns":["XX XXX XXXX"]}]},{"iso2":"AM","default_name":"Armenia","country_codes":[{"country_code":"374","patterns":["XX XXX XXX"]}]},{"iso2":"AO","default_name":"Angola","country_codes":[{"country_code":"244","patterns":["XXX XXX XXX"]}]},{"iso2":"AR","default_name":"Argentina","country_codes":[{"country_code":"54"}]},{"iso2":"AS","default_name":"American Samoa","country_codes":[{"country_code":"1684","patterns":["XXX XXXX"]}]},{"iso2":"AT","default_name":"Austria","country_codes":[{"country_code":"43","patterns":["X XXXXXXXX"]}]},{"iso2":"AU","default_name":"Australia","country_codes":[{"country_code":"61","patterns":["X XXXX XXXX"]}]},{"iso2":"AW","default_name":"Aruba","country_codes":[{"country_code":"297","patterns":["XXX XXXX"]}]},{"iso2":"AZ","default_name":"Azerbaijan","country_codes":[{"country_code":"994","patterns":["XX XXX XXXX"]}]},{"iso2":"BA","default_name":"Bosnia & Herzegovina","country_codes":[{"country_code":"387","patterns":["XX XXX XXX"]}]},{"iso2":"BB","default_name":"Barbados","country_codes":[{"country_code":"1246","patterns":["XXX XXXX"]}]},{"iso2":"BD","default_name":"Bangladesh","country_codes":[{"country_code":"880","patterns":["XX XXX XXX"]}]},{"iso2":"BE","default_name":"Belgium","country_codes":[{"country_code":"32","patterns":["XXX XX XX XX"]}]},{"iso2":"BF","default_name":"Burkina Faso","country_codes":[{"country_code":"226","patterns":["XX XX XX XX"]}]},{"iso2":"BG","default_name":"Bulgaria","country_codes":[{"country_code":"359"}]},{"iso2":"BH","default_name":"Bahrain","country_codes":[{"country_code":"973","patterns":["XXXX XXXX"]}]},{"iso2":"BI","default_name":"Burundi","country_codes":[{"country_code":"257","patterns":["XX XX XXXX"]}]},{"iso2":"BJ","default_name":"Benin","country_codes":[{"country_code":"229","patterns":["XX XXX XXX"]}]},{"iso2":"BM","default_name":"Bermuda","country_codes":[{"country_code":"1441","patterns":["XXX XXXX"]}]},{"iso2":"BN","default_name":"Brunei Darussalam","country_codes":[{"country_code":"673","patterns":["XXX XXXX"]}]},{"iso2":"BO","default_name":"Bolivia","country_codes":[{"country_code":"591","patterns":["X XXX XXXX"]}]},{"iso2":"BQ","default_name":"Bonaire, Sint Eustatius & Saba","country_codes":[{"country_code":"599"}]},{"iso2":"BR","default_name":"Brazil","country_codes":[{"country_code":"55","patterns":["XX XXXXX XXXX"]}]},{"iso2":"BS","default_name":"Bahamas","country_codes":[{"country_code":"1242","patterns":["XXX XXXX"]}]},{"iso2":"BT","default_name":"Bhutan","country_codes":[{"country_code":"975","patterns":["XX XXX XXX"]}]},{"iso2":"BW","default_name":"Botswana","country_codes":[{"country_code":"267","patterns":["XX XXX XXX"]}]},{"iso2":"BY","default_name":"Belarus","country_codes":[{"country_code":"375","patterns":["XX XXX XXXX"]}]},{"iso2":"BZ","default_name":"Belize","country_codes":[{"country_code":"501"}]},{"iso2":"CA","default_name":"Canada","country_codes":[{"country_code":"1","prefixes":["403","587","780","825","236","250","604","672","778","204","431","506","709","902","782","226","249","289","343","365","416","437","519","548","613","647","705","807","905","418","438","450","514","579","581","819","873","306","639","867"],"patterns":["XXX XXX XXXX"]}]},{"iso2":"CD","default_name":"Congo (Dem. Rep.)","country_codes":[{"country_code":"243","patterns":["XX XXX XXXX"]}]},{"iso2":"CF","default_name":"Central African Rep.","country_codes":[{"country_code":"236","patterns":["XX XX XX XX"]}]},{"iso2":"CG","default_name":"Congo (Rep.)","country_codes":[{"country_code":"242","patterns":["XX XXX XXXX"]}]},{"iso2":"CH","default_name":"Switzerland","country_codes":[{"country_code":"41","patterns":["XX XXX XXXX"]}]},{"iso2":"CI","default_name":"Côte d'Ivoire","country_codes":[{"country_code":"225","patterns":["XX XX XX XXXX"]}]},{"iso2":"CK","default_name":"Cook Islands","country_codes":[{"country_code":"682"}]},{"iso2":"CL","default_name":"Chile","country_codes":[{"country_code":"56","patterns":["X XXXX XXXX"]}]},{"iso2":"CM","default_name":"Cameroon","country_codes":[{"country_code":"237","patterns":["XXXX XXXX"]}]},{"iso2":"CN","default_name":"China","country_codes":[{"country_code":"86","patterns":["XXX XXXX XXXX"]}]},{"iso2":"CO","default_name":"Colombia","country_codes":[{"country_code":"57","patterns":["XXX XXX XXXX"]}]},{"iso2":"CR","default_name":"Costa Rica","country_codes":[{"country_code":"506","patterns":["XXXX XXXX"]}]},{"iso2":"CU","default_name":"Cuba","country_codes":[{"country_code":"53","patterns":["X XXX XXXX"]}]},{"iso2":"CV","default_name":"Cape Verde","country_codes":[{"country_code":"238","patterns":["XXX XXXX"]}]},{"iso2":"CW","default_name":"Curaçao","country_codes":[{"country_code":"599","prefixes":["9"]}]},{"iso2":"CY","default_name":"Cyprus","country_codes":[{"country_code":"357","patterns":["XXXX XXXX"]}]},{"iso2":"CZ","default_name":"Czech Republic","country_codes":[{"country_code":"420","patterns":["XXX XXX XXX"]}]},{"iso2":"DE","default_name":"Germany","country_codes":[{"country_code":"49","patterns":["XXXX XXXXXXX","16X XXXXXXX","17X XXXXXXX","3601 4198XX"]}]},{"iso2":"DJ","default_name":"Djibouti","country_codes":[{"country_code":"253","patterns":["XX XX XX XX"]}]},{"iso2":"DK","default_name":"Denmark","country_codes":[{"country_code":"45","patterns":["XXXX XXXX"]}]},{"iso2":"DM","default_name":"Dominica","country_codes":[{"country_code":"1767","patterns":["XXX XXXX"]}]},{"iso2":"DO","default_name":"Dominican Rep.","country_codes":[{"country_code":"1809","patterns":["XXX XXXX"]},{"country_code":"1829","patterns":["XXX XXXX"]},{"country_code":"1849","patterns":["XXX XXXX"]}]},{"iso2":"DZ","default_name":"Algeria","country_codes":[{"country_code":"213","patterns":["XXX XX XX XX"]}]},{"iso2":"EC","default_name":"Ecuador","country_codes":[{"country_code":"593","patterns":["XX XXX XXXX"]}]},{"iso2":"EE","default_name":"Estonia","country_codes":[{"country_code":"372","patterns":["XXXX XXXX"]}]},{"iso2":"EG","default_name":"Egypt","country_codes":[{"country_code":"20","patterns":["XX XXXX XXXX"]}]},{"iso2":"ER","default_name":"Eritrea","country_codes":[{"country_code":"291","patterns":["X XXX XXX"]}]},{"iso2":"ES","default_name":"Spain","country_codes":[{"country_code":"34","patterns":["XXX XXX XXX"]}]},{"iso2":"ET","default_name":"Ethiopia","country_codes":[{"country_code":"251","patterns":["XX XXX XXXX"]}]},{"iso2":"FI","default_name":"Finland","country_codes":[{"country_code":"358"}]},{"iso2":"FJ","default_name":"Fiji","country_codes":[{"country_code":"679","patterns":["XXX XXXX"]}]},{"iso2":"FK","default_name":"Falkland Islands","country_codes":[{"country_code":"500"}]},{"iso2":"FM","default_name":"Micronesia","country_codes":[{"country_code":"691"}]},{"iso2":"FO","default_name":"Faroe Islands","country_codes":[{"country_code":"298","patterns":["XXX XXX"]}]},{"iso2":"FR","default_name":"France","country_codes":[{"country_code":"33","patterns":["X XX XX XX XX"]}]},{"iso2":"GA","default_name":"Gabon","country_codes":[{"country_code":"241","patterns":["X XX XX XX"]}]},{"iso2":"GB","default_name":"United Kingdom","country_codes":[{"country_code":"44","patterns":["XXXX XXXXXX"]}]},{"iso2":"GD","default_name":"Grenada","country_codes":[{"country_code":"1473","patterns":["XXX XXXX"]}]},{"iso2":"GE","default_name":"Georgia","country_codes":[{"country_code":"995","patterns":["XXX XXX XXX"]}]},{"iso2":"GF","default_name":"French Guiana","country_codes":[{"country_code":"594"}]},{"iso2":"GH","default_name":"Ghana","country_codes":[{"country_code":"233","patterns":["XX XXX XXXX"]}]},{"iso2":"GI","default_name":"Gibraltar","country_codes":[{"country_code":"350","patterns":["XXXX XXXX"]}]},{"iso2":"GL","default_name":"Greenland","country_codes":[{"country_code":"299","patterns":["XXX XXX"]}]},{"iso2":"GM","default_name":"Gambia","country_codes":[{"country_code":"220","patterns":["XXX XXXX"]}]},{"iso2":"GN","default_name":"Guinea","country_codes":[{"country_code":"224","patterns":["XXX XXX XXX"]}]},{"iso2":"GP","default_name":"Guadeloupe","country_codes":[{"country_code":"590","patterns":["XXX XX XX XX"]}]},{"iso2":"GQ","default_name":"Equatorial Guinea","country_codes":[{"country_code":"240","patterns":["XXX XXX XXX"]}]},{"iso2":"GR","default_name":"Greece","country_codes":[{"country_code":"30","patterns":["XXX XXX XXXX"]}]},{"iso2":"GT","default_name":"Guatemala","country_codes":[{"country_code":"502","patterns":["X XXX XXXX"]}]},{"iso2":"GU","default_name":"Guam","country_codes":[{"country_code":"1671","patterns":["XXX XXXX"]}]},{"iso2":"GW","default_name":"Guinea-Bissau","country_codes":[{"country_code":"245","patterns":["XXX XXXX"]}]},{"iso2":"GY","default_name":"Guyana","country_codes":[{"country_code":"592"}]},{"iso2":"HK","default_name":"Hong Kong","country_codes":[{"country_code":"852","patterns":["X XXX XXXX"]}]},{"iso2":"HN","default_name":"Honduras","country_codes":[{"country_code":"504","patterns":["XXXX XXXX"]}]},{"iso2":"HR","default_name":"Croatia","country_codes":[{"country_code":"385","patterns":["XX XXX XXX"]}]},{"iso2":"HT","default_name":"Haiti","country_codes":[{"country_code":"509","patterns":["XXXX XXXX"]}]},{"iso2":"HU","default_name":"Hungary","country_codes":[{"country_code":"36","patterns":["XXX XXX XXX"]}]},{"iso2":"ID","default_name":"Indonesia","country_codes":[{"country_code":"62","patterns":["XXX XXXXXX"]}]},{"iso2":"IE","default_name":"Ireland","country_codes":[{"country_code":"353","patterns":["XX XXX XXXX"]}]},{"iso2":"IL","default_name":"Israel","country_codes":[{"country_code":"972","patterns":["XX XXX XXXX"]}]},{"iso2":"IN","default_name":"India","country_codes":[{"country_code":"91","patterns":["XXXXX XXXXX"]}]},{"iso2":"IO","default_name":"Diego Garcia","country_codes":[{"country_code":"246","patterns":["XXX XXXX"]}]},{"iso2":"IQ","default_name":"Iraq","country_codes":[{"country_code":"964","patterns":["XXX XXX XXXX"]}]},{"iso2":"IR","default_name":"Iran","country_codes":[{"country_code":"98","patterns":["XXX XXX XXXX"]}]},{"iso2":"IS","default_name":"Iceland","country_codes":[{"country_code":"354","patterns":["XXX XXXX"]}]},{"iso2":"IT","default_name":"Italy","country_codes":[{"country_code":"39","patterns":["XXX XXX XXX"]}]},{"iso2":"JM","default_name":"Jamaica","country_codes":[{"country_code":"1876","patterns":["XXX XXXX"]}]},{"iso2":"JO","default_name":"Jordan","country_codes":[{"country_code":"962","patterns":["X XXXX XXXX"]}]},{"iso2":"JP","default_name":"Japan","country_codes":[{"country_code":"81","patterns":["XX XXXX XXXX"]}]},{"iso2":"KE","default_name":"Kenya","country_codes":[{"country_code":"254","patterns":["XXX XXX XXX"]}]},{"iso2":"KG","default_name":"Kyrgyzstan","country_codes":[{"country_code":"996","patterns":["XXX XXXXXX"]}]},{"iso2":"KH","default_name":"Cambodia","country_codes":[{"country_code":"855","patterns":["XX XXX XXX"]}]},{"iso2":"KI","default_name":"Kiribati","country_codes":[{"country_code":"686","patterns":["XXXX XXXX"]}]},{"iso2":"KM","default_name":"Comoros","country_codes":[{"country_code":"269","patterns":["XXX XXXX"]}]},{"iso2":"KN","default_name":"Saint Kitts & Nevis","country_codes":[{"country_code":"1869","patterns":["XXX XXXX"]}]},{"iso2":"KP","default_name":"North Korea","country_codes":[{"country_code":"850"}]},{"iso2":"KR","default_name":"South Korea","country_codes":[{"country_code":"82","patterns":["XX XXXX XXX"]}]},{"iso2":"KW","default_name":"Kuwait","country_codes":[{"country_code":"965","patterns":["XXXX XXXX"]}]},{"iso2":"KY","default_name":"Cayman Islands","country_codes":[{"country_code":"1345","patterns":["XXX XXXX"]}]},{"iso2":"KZ","default_name":"Kazakhstan","country_codes":[{"country_code":"7","prefixes":["6","7"],"patterns":["XXX XXX XX XX"]}]},{"iso2":"LA","default_name":"Laos","country_codes":[{"country_code":"856","patterns":["XX XX XXX XXX"]}]},{"iso2":"LB","default_name":"Lebanon","country_codes":[{"country_code":"961","patterns":["XX XXX XXX"]}]},{"iso2":"LC","default_name":"Saint Lucia","country_codes":[{"country_code":"1758","patterns":["XXX XXXX"]}]},{"iso2":"LI","default_name":"Liechtenstein","country_codes":[{"country_code":"423","patterns":["XXX XXXX"]}]},{"iso2":"LK","default_name":"Sri Lanka","country_codes":[{"country_code":"94","patterns":["XX XXX XXXX"]}]},{"iso2":"LR","default_name":"Liberia","country_codes":[{"country_code":"231","patterns":["XX XXX XXXX"]}]},{"iso2":"LS","default_name":"Lesotho","country_codes":[{"country_code":"266","patterns":["XX XXX XXX"]}]},{"iso2":"LT","default_name":"Lithuania","country_codes":[{"country_code":"370","patterns":["XXX XXXXX"]}]},{"iso2":"LU","default_name":"Luxembourg","country_codes":[{"country_code":"352","patterns":["XXX XXX XXX"]}]},{"iso2":"LV","default_name":"Latvia","country_codes":[{"country_code":"371","patterns":["XXX XXXXX"]}]},{"iso2":"LY","default_name":"Libya","country_codes":[{"country_code":"218","patterns":["XX XXX XXXX"]}]},{"iso2":"MA","default_name":"Morocco","country_codes":[{"country_code":"212","patterns":["XX XXX XXXX"]}]},{"iso2":"MC","default_name":"Monaco","country_codes":[{"country_code":"377","patterns":["XXXX XXXX"]}]},{"iso2":"MD","default_name":"Moldova","country_codes":[{"country_code":"373","patterns":["XX XXX XXX"]}]},{"iso2":"ME","default_name":"Montenegro","country_codes":[{"country_code":"382"}]},{"iso2":"MG","default_name":"Madagascar","country_codes":[{"country_code":"261","patterns":["XX XX XXX XX"]}]},{"iso2":"MH","default_name":"Marshall Islands","country_codes":[{"country_code":"692"}]},{"iso2":"MK","default_name":"North Macedonia","country_codes":[{"country_code":"389","patterns":["XX XXX XXX"]}]},{"iso2":"ML","default_name":"Mali","country_codes":[{"country_code":"223","patterns":["XXXX XXXX"]}]},{"iso2":"MM","default_name":"Myanmar","country_codes":[{"country_code":"95"}]},{"iso2":"MN","default_name":"Mongolia","country_codes":[{"country_code":"976","patterns":["XX XX XXXX"]}]},{"iso2":"MO","default_name":"Macau","country_codes":[{"country_code":"853","patterns":["XXXX XXXX"]}]},{"iso2":"MP","default_name":"Northern Mariana Islands","country_codes":[{"country_code":"1670","patterns":["XXX XXXX"]}]},{"iso2":"MQ","default_name":"Martinique","country_codes":[{"country_code":"596"}]},{"iso2":"MR","default_name":"Mauritania","country_codes":[{"country_code":"222","patterns":["XXXX XXXX"]}]},{"iso2":"MS","default_name":"Montserrat","country_codes":[{"country_code":"1664","patterns":["XXX XXXX"]}]},{"iso2":"MT","default_name":"Malta","country_codes":[{"country_code":"356","patterns":["XX XX XX XX"]}]},{"iso2":"MU","default_name":"Mauritius","country_codes":[{"country_code":"230","patterns":["XXXX XXXX"]}]},{"iso2":"MV","default_name":"Maldives","country_codes":[{"country_code":"960","patterns":["XXX XXXX"]}]},{"iso2":"MW","default_name":"Malawi","country_codes":[{"country_code":"265","patterns":["XX XXX XXXX"]}]},{"iso2":"MX","default_name":"Mexico","country_codes":[{"country_code":"52"}]},{"iso2":"MY","default_name":"Malaysia","country_codes":[{"country_code":"60","patterns":["XX XXXX XXXX"]}]},{"iso2":"MZ","default_name":"Mozambique","country_codes":[{"country_code":"258","patterns":["XX XXX XXXX"]}]},{"iso2":"NA","default_name":"Namibia","country_codes":[{"country_code":"264","patterns":["XX XXX XXXX"]}]},{"iso2":"NC","default_name":"New Caledonia","country_codes":[{"country_code":"687"}]},{"iso2":"NE","default_name":"Niger","country_codes":[{"country_code":"227","patterns":["XX XX XX XX"]}]},{"iso2":"NF","default_name":"Norfolk Island","country_codes":[{"country_code":"672"}]},{"iso2":"NG","default_name":"Nigeria","country_codes":[{"country_code":"234","patterns":["XX XXXX XXXX"]}]},{"iso2":"NI","default_name":"Nicaragua","country_codes":[{"country_code":"505","patterns":["XXXX XXXX"]}]},{"iso2":"NL","default_name":"Netherlands","country_codes":[{"country_code":"31","patterns":["X XX XX XX XX","97 XXXX XXXXX"]}]},{"iso2":"NO","default_name":"Norway","country_codes":[{"country_code":"47","patterns":["XXXX XXXX"]}]},{"iso2":"NP","default_name":"Nepal","country_codes":[{"country_code":"977","patterns":["XX XXXX XXXX"]}]},{"iso2":"NR","default_name":"Nauru","country_codes":[{"country_code":"674"}]},{"iso2":"NU","default_name":"Niue","country_codes":[{"country_code":"683"}]},{"iso2":"NZ","default_name":"New Zealand","country_codes":[{"country_code":"64","patterns":["XXXX XXXX"]}]},{"iso2":"OM","default_name":"Oman","country_codes":[{"country_code":"968","patterns":["XXXX XXXX"]}]},{"iso2":"PA","default_name":"Panama","country_codes":[{"country_code":"507","patterns":["XXXX XXXX"]}]},{"iso2":"PE","default_name":"Peru","country_codes":[{"country_code":"51","patterns":["XXX XXX XXX"]}]},{"iso2":"PF","default_name":"French Polynesia","country_codes":[{"country_code":"689"}]},{"iso2":"PG","default_name":"Papua New Guinea","country_codes":[{"country_code":"675"}]},{"iso2":"PH","default_name":"Philippines","country_codes":[{"country_code":"63","patterns":["XXX XXX XXXX"]}]},{"iso2":"PK","default_name":"Pakistan","country_codes":[{"country_code":"92","patterns":["XXX XXX XXXX"]}]},{"iso2":"PL","default_name":"Poland","country_codes":[{"country_code":"48","patterns":["XXX XXX XXX"]}]},{"iso2":"PM","default_name":"Saint Pierre & Miquelon","country_codes":[{"country_code":"508"}]},{"iso2":"PR","default_name":"Puerto Rico","country_codes":[{"country_code":"1787","patterns":["XXX XXXX"]},{"country_code":"1939","patterns":["XXX XXXX"]}]},{"iso2":"PS","default_name":"Palestine","country_codes":[{"country_code":"970","patterns":["XXX XX XXXX"]}]},{"iso2":"PT","default_name":"Portugal","country_codes":[{"country_code":"351","patterns":["XXX XXX XXX"]}]},{"iso2":"PW","default_name":"Palau","country_codes":[{"country_code":"680"}]},{"iso2":"PY","default_name":"Paraguay","country_codes":[{"country_code":"595","patterns":["XXX XXX XXX"]}]},{"iso2":"QA","default_name":"Qatar","country_codes":[{"country_code":"974","patterns":["XX XXX XXX"]}]},{"iso2":"RE","default_name":"Réunion","country_codes":[{"country_code":"262","patterns":["XXX XXX XXX"]}]},{"iso2":"RO","default_name":"Romania","country_codes":[{"country_code":"40","patterns":["XXX XXX XXX"]}]},{"iso2":"RS","default_name":"Serbia","country_codes":[{"country_code":"381","patterns":["XX XXX XXXX"]}]},{"iso2":"RU","default_name":"Russian Federation","country_codes":[{"country_code":"7","patterns":["XXX XXX XXXX"]}]},{"iso2":"RW","default_name":"Rwanda","country_codes":[{"country_code":"250","patterns":["XXX XXX XXX"]}]},{"iso2":"SA","default_name":"Saudi Arabia","country_codes":[{"country_code":"966","patterns":["XX XXX XXXX"]}]},{"iso2":"SB","default_name":"Solomon Islands","country_codes":[{"country_code":"677"}]},{"iso2":"SC","default_name":"Seychelles","country_codes":[{"country_code":"248","patterns":["X XX XX XX"]}]},{"iso2":"SD","default_name":"Sudan","country_codes":[{"country_code":"249","patterns":["XX XXX XXXX"]}]},{"iso2":"SE","default_name":"Sweden","country_codes":[{"country_code":"46","patterns":["XX XXX XXXX"]}]},{"iso2":"SG","default_name":"Singapore","country_codes":[{"country_code":"65","patterns":["XXXX XXXX"]}]},{"iso2":"SH","default_name":"Saint Helena","country_codes":[{"country_code":"247"},{"country_code":"290","patterns":["XX XXX"]}]},{"iso2":"SI","default_name":"Slovenia","country_codes":[{"country_code":"386","patterns":["XX XXX XXX"]}]},{"iso2":"SK","default_name":"Slovakia","country_codes":[{"country_code":"421","patterns":["XXX XXX XXX"]}]},{"iso2":"SL","default_name":"Sierra Leone","country_codes":[{"country_code":"232","patterns":["XX XXX XXX"]}]},{"iso2":"SM","default_name":"San Marino","country_codes":[{"country_code":"378","patterns":["XXX XXX XXXX"]}]},{"iso2":"SN","default_name":"Senegal","country_codes":[{"country_code":"221","patterns":["XX XXX XXXX"]}]},{"iso2":"SO","default_name":"Somalia","country_codes":[{"country_code":"252","patterns":["XX XXX XXX"]}]},{"iso2":"SR","default_name":"Suriname","country_codes":[{"country_code":"597","patterns":["XXX XXXX"]}]},{"iso2":"SS","default_name":"South Sudan","country_codes":[{"country_code":"211","patterns":["XX XXX XXXX"]}]},{"iso2":"ST","default_name":"São Tomé & Príncipe","country_codes":[{"country_code":"239","patterns":["XX XXXXX"]}]},{"iso2":"SV","default_name":"El Salvador","country_codes":[{"country_code":"503","patterns":["XXXX XXXX"]}]},{"iso2":"SX","default_name":"Sint Maarten","country_codes":[{"country_code":"1721","patterns":["XXX XXXX"]}]},{"iso2":"SY","default_name":"Syria","country_codes":[{"country_code":"963","patterns":["XXX XXX XXX"]}]},{"iso2":"SZ","default_name":"Eswatini","country_codes":[{"country_code":"268","patterns":["XXXX XXXX"]}]},{"iso2":"TC","default_name":"Turks & Caicos Islands","country_codes":[{"country_code":"1649","patterns":["XXX XXXX"]}]},{"iso2":"TD","default_name":"Chad","country_codes":[{"country_code":"235","patterns":["XX XX XX XX"]}]},{"iso2":"TG","default_name":"Togo","country_codes":[{"country_code":"228","patterns":["XX XXX XXX"]}]},{"iso2":"TH","default_name":"Thailand","country_codes":[{"country_code":"66","patterns":["X XXXX XXXX"]}]},{"iso2":"TJ","default_name":"Tajikistan","country_codes":[{"country_code":"992","patterns":["XX XXX XXXX"]}]},{"iso2":"TK","default_name":"Tokelau","country_codes":[{"country_code":"690"}]},{"iso2":"TL","default_name":"Timor-Leste","country_codes":[{"country_code":"670"}]},{"iso2":"TM","default_name":"Turkmenistan","country_codes":[{"country_code":"993","patterns":["XX XXXXXX"]}]},{"iso2":"TN","default_name":"Tunisia","country_codes":[{"country_code":"216","patterns":["XX XXX XXX"]}]},{"iso2":"TO","default_name":"Tonga","country_codes":[{"country_code":"676"}]},{"iso2":"TR","default_name":"Turkey","country_codes":[{"country_code":"90","patterns":["XXX XXX XXXX"]}]},{"iso2":"TT","default_name":"Trinidad & Tobago","country_codes":[{"country_code":"1868","patterns":["XXX XXXX"]}]},{"iso2":"TV","default_name":"Tuvalu","country_codes":[{"country_code":"688"}]},{"iso2":"TW","default_name":"Taiwan","country_codes":[{"country_code":"886","patterns":["XXX XXX XXX"]}]},{"iso2":"TZ","default_name":"Tanzania","country_codes":[{"country_code":"255","patterns":["XX XXX XXXX"]}]},{"iso2":"UA","default_name":"Ukraine","country_codes":[{"country_code":"380","patterns":["XX XXX XX XX"]}]},{"iso2":"UG","default_name":"Uganda","country_codes":[{"country_code":"256","patterns":["XX XXX XXXX"]}]},{"iso2":"US","default_name":"USA","country_codes":[{"country_code":"1","patterns":["XXX XXX XXXX"]}]},{"iso2":"UY","default_name":"Uruguay","country_codes":[{"country_code":"598","patterns":["X XXX XXXX"]}]},{"iso2":"UZ","default_name":"Uzbekistan","country_codes":[{"country_code":"998","patterns":["XX XXX XX XX"]}]},{"iso2":"VC","default_name":"Saint Vincent & the Grenadines","country_codes":[{"country_code":"1784","patterns":["XXX XXXX"]}]},{"iso2":"VE","default_name":"Venezuela","country_codes":[{"country_code":"58","patterns":["XXX XXX XXXX"]}]},{"iso2":"VG","default_name":"British Virgin Islands","country_codes":[{"country_code":"1284","patterns":["XXX XXXX"]}]},{"iso2":"VI","default_name":"US Virgin Islands","country_codes":[{"country_code":"1340","patterns":["XXX XXXX"]}]},{"iso2":"VN","default_name":"Vietnam","country_codes":[{"country_code":"84"}]},{"iso2":"VU","default_name":"Vanuatu","country_codes":[{"country_code":"678"}]},{"iso2":"WF","default_name":"Wallis & Futuna","country_codes":[{"country_code":"681"}]},{"iso2":"WS","default_name":"Samoa","country_codes":[{"country_code":"685"}]},{"iso2":"XK","default_name":"Kosovo","country_codes":[{"country_code":"383","patterns":["XXXX XXXX"]}]},{"iso2":"YE","default_name":"Yemen","country_codes":[{"country_code":"967","patterns":["XXX XXX XXX"]}]},{"iso2":"ZA","default_name":"South Africa","country_codes":[{"country_code":"27","patterns":["XX XXX XXXX"]}]},{"iso2":"ZM","default_name":"Zambia","country_codes":[{"country_code":"260","patterns":["XX XXX XXXX"]}]},{"iso2":"ZW","default_name":"Zimbabwe","country_codes":[{"country_code":"263","patterns":["XX XXX XXXX"]}]}] as any, + hash: 0 }; -const Countries: Country[] = [{"phoneCode":"7 840","code":"AB","name":"Abkhazia","pattern":"","emoji":""},{"phoneCode":"93","code":"AF","name":"Afghanistan","pattern":"93 XXX XXX XXX","emoji":"🇦🇫"},{"phoneCode":"358 18","code":"AX","name":"Aland Islands","pattern":"","emoji":"🇦🇽"},{"phoneCode":"355","code":"AL","name":"Albania","pattern":"355 XX XXX XXXX","emoji":"🇦🇱"},{"phoneCode":"213","code":"DZ","name":"Algeria","pattern":"213 XXX XX XX XX","emoji":"🇩🇿"},{"phoneCode":"1 684","code":"AS","name":"American Samoa","pattern":"1684 XXX XXXX","emoji":"🇦🇸"},{"phoneCode":"376","code":"AD","name":"Andorra","pattern":"376 XX XX XX","emoji":"🇦🇩"},{"phoneCode":"244","code":"AO","name":"Angola","pattern":"244 XXX XXX XXX","emoji":"🇦🇴"},{"phoneCode":"1 264","code":"AI","name":"Anguilla","pattern":"1264 XXX XXXX","emoji":"🇦🇮"},{"phoneCode":"1 268","code":"AG","name":"Antigua & Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"54","code":"AR","name":"Argentina","pattern":"","emoji":"🇦🇷"},{"phoneCode":"374","code":"AM","name":"Armenia","pattern":"374 XX XXX XXX","emoji":"🇦🇲"},{"phoneCode":"297","code":"AW","name":"Aruba","pattern":"297 XXX XXXX","emoji":"🇦🇼"},{"phoneCode":"247","code":"SH","name":"Ascension","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"61","code":"AU","name":"Australia","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"672","code":"AU","name":"Australian External Territories","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"43","code":"AT","name":"Austria","pattern":"","emoji":"🇦🇹"},{"phoneCode":"994","code":"AZ","name":"Azerbaijan","pattern":"994 XX XXX XX XX","emoji":"🇦🇿"},{"phoneCode":"1 242","code":"BS","name":"Bahamas","pattern":"1242 XXX XXXX","emoji":"🇧🇸"},{"phoneCode":"973","code":"BH","name":"Bahrain","pattern":"973 XXXX XXXX","emoji":"🇧🇭"},{"phoneCode":"880","code":"BD","name":"Bangladesh","pattern":"","emoji":"🇧🇩"},{"phoneCode":"1 246","code":"BB","name":"Barbados","pattern":"1246 XXX XXXX","emoji":"🇧🇧"},{"phoneCode":"1 268","code":"AG","name":"Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"375","code":"BY","name":"Belarus","pattern":"375 XX XXX XXXX","emoji":"🇧🇾"},{"phoneCode":"32","code":"BE","name":"Belgium","pattern":"32 XXX XX XX XX","emoji":"🇧🇪"},{"phoneCode":"501","code":"BZ","name":"Belize","pattern":"","emoji":"🇧🇿"},{"phoneCode":"229","code":"BJ","name":"Benin","pattern":"229 XX XXX XXX","emoji":"🇧🇯"},{"phoneCode":"1 441","code":"BM","name":"Bermuda","pattern":"1441 XXX XXXX","emoji":"🇧🇲"},{"phoneCode":"975","code":"BT","name":"Bhutan","pattern":"","emoji":"🇧🇹"},{"phoneCode":"591","code":"BO","name":"Bolivia","pattern":"591 X XXX XXXX","emoji":"🇧🇴"},{"phoneCode":"599 7","code":"BQ","name":"Caribbean Netherlands","pattern":"","emoji":"🇧🇶"},{"phoneCode":"387","code":"BA","name":"Bosnia & Herzegovina","pattern":"","emoji":"🇧🇦"},{"phoneCode":"267","code":"BW","name":"Botswana","pattern":"267 XX XXX XXX","emoji":"🇧🇼"},{"phoneCode":"55","code":"BR","name":"Brazil","pattern":"55 XX XXXXX XXXX","emoji":"🇧🇷"},{"phoneCode":"246","code":"IO","name":"British Indian Ocean Territory","pattern":"246 XXX XXXX","emoji":"🇮🇴"},{"phoneCode":"1 284","code":"VG","name":"British Virgin Islands","pattern":"1284 XXX XXXX","emoji":"🇻🇬"},{"phoneCode":"673","code":"BN","name":"Brunei","pattern":"673 XXX XXXX","emoji":"🇧🇳"},{"phoneCode":"359","code":"BG","name":"Bulgaria","pattern":"","emoji":"🇧🇬"},{"phoneCode":"226","code":"BF","name":"Burkina Faso","pattern":"226 XX XX XX XX","emoji":"🇧🇫"},{"phoneCode":"95","code":"MM","name":"Myanmar (Burma)","pattern":"","emoji":"🇲🇲"},{"phoneCode":"257","code":"BI","name":"Burundi","pattern":"257 XX XX XXXX","emoji":"🇧🇮"},{"phoneCode":"855","code":"KH","name":"Cambodia","pattern":"","emoji":"🇰🇭"},{"phoneCode":"237","code":"CM","name":"Cameroon","pattern":"237 XXXX XXXX","emoji":"🇨🇲"},{"phoneCode":"1","code":"CA","name":"Canada","pattern":"1 XXX XXX XXXX","emoji":"🇨🇦"},{"phoneCode":"238","code":"CV","name":"Cape Verde","pattern":"238 XXX XXXX","emoji":"🇨🇻"},{"phoneCode":"1 345","code":"KY","name":"Cayman Islands","pattern":"1345 XXX XXXX","emoji":"🇰🇾"},{"phoneCode":"236","code":"CF","name":"Central African Republic","pattern":"236 XX XX XX XX","emoji":"🇨🇫"},{"phoneCode":"235","code":"TD","name":"Chad","pattern":"235 XX XX XX XX","emoji":"🇹🇩"},{"phoneCode":"56","code":"CL","name":"Chile","pattern":"56 X XXXX XXXX","emoji":"🇨🇱"},{"phoneCode":"86","code":"CN","name":"China","pattern":"86 XXX XXXX XXXX","emoji":"🇨🇳"},{"phoneCode":"61","code":"CX","name":"Christmas Island","pattern":"","emoji":"🇨🇽"},{"phoneCode":"61","code":"CC","name":"Cocos (Keeling) Islands","pattern":"","emoji":"🇨🇨"},{"phoneCode":"57","code":"CO","name":"Colombia","pattern":"57 XXX XXX XXXX","emoji":"🇨🇴"},{"phoneCode":"269","code":"KM","name":"Comoros","pattern":"269 XXX XXXX","emoji":"🇰🇲"},{"phoneCode":"242","code":"CG","name":"Congo - Brazzaville","pattern":"242 XX XXX XXXX","emoji":"🇨🇬"},{"phoneCode":"243","code":"CD","name":"Congo - Kinshasa","pattern":"243 XX XXX XXXX","emoji":"🇨🇩"},{"phoneCode":"682","code":"CK","name":"Cook Islands","pattern":"","emoji":"🇨🇰"},{"phoneCode":"506","code":"CR","name":"Costa Rica","pattern":"","emoji":"🇨🇷"},{"phoneCode":"225","code":"CI","name":"Cote d’Ivoire","pattern":"225 XX XXX XXX","emoji":"🇨🇮"},{"phoneCode":"385","code":"HR","name":"Croatia","pattern":"","emoji":"🇭🇷"},{"phoneCode":"53","code":"CU","name":"Cuba","pattern":"53 XXXX XXXX","emoji":"🇨🇺"},{"phoneCode":"599 9","code":"CW","name":"Curacao","pattern":"","emoji":"🇨🇼"},{"phoneCode":"357","code":"CY","name":"Cyprus","pattern":"357 XXXX XXXX","emoji":"🇨🇾"},{"phoneCode":"420","code":"CZ","name":"Czech Republic","pattern":"","emoji":"🇨🇿"},{"phoneCode":"45","code":"DK","name":"Denmark","pattern":"45 XXXX XXXX","emoji":"🇩🇰"},{"phoneCode":"246","code":"DG","name":"Diego Garcia","pattern":"","emoji":"🇩🇬"},{"phoneCode":"253","code":"DJ","name":"Djibouti","pattern":"253 XX XX XX XX","emoji":"🇩🇯"},{"phoneCode":"1 767","code":"DM","name":"Dominica","pattern":"1767 XXX XXXX","emoji":"🇩🇲"},{"phoneCode":"1 809 and 1 829","code":"DO","name":"Dominican Republic","pattern":"1 XXX XXX XXXX","emoji":"🇩🇴"},{"phoneCode":"670","code":"TL","name":"Timor-Leste","pattern":"","emoji":"🇹🇱"},{"phoneCode":"593","code":"EC","name":"Ecuador","pattern":"","emoji":"🇪🇨"},{"phoneCode":"20","code":"EG","name":"Egypt","pattern":"20 XX XXX XXXX","emoji":"🇪🇬"},{"phoneCode":"503","code":"SV","name":"El Salvador","pattern":"503 XXXX XXXX","emoji":"🇸🇻"},{"phoneCode":"240","code":"GQ","name":"Equatorial Guinea","pattern":"240 XXX XXX XXX","emoji":"🇬🇶"},{"phoneCode":"291","code":"ER","name":"Eritrea","pattern":"291 X XXX XXX","emoji":"🇪🇷"},{"phoneCode":"372","code":"EE","name":"Estonia","pattern":"","emoji":"🇪🇪"},{"phoneCode":"251","code":"ET","name":"Ethiopia","pattern":"251 XX XXX XXXX","emoji":"🇪🇹"},{"phoneCode":"500","code":"FK","name":"Falkland Islands","pattern":"","emoji":"🇫🇰"},{"phoneCode":"298","code":"FO","name":"Faroe Islands","pattern":"298 XXX XXX","emoji":"🇫🇴"},{"phoneCode":"679","code":"FJ","name":"Fiji","pattern":"","emoji":"🇫🇯"},{"phoneCode":"358","code":"FI","name":"Finland","pattern":"","emoji":"🇫🇮"},{"phoneCode":"33","code":"FR","name":"France","pattern":"33 X XX XX XX XX","emoji":"🇫🇷"},{"phoneCode":"594","code":"GF","name":"French Guiana","pattern":"","emoji":"🇬🇫"},{"phoneCode":"689","code":"PF","name":"French Polynesia","pattern":"","emoji":"🇵🇫"},{"phoneCode":"241","code":"GA","name":"Gabon","pattern":"241 X XX XX XX","emoji":"🇬🇦"},{"phoneCode":"220","code":"GM","name":"Gambia","pattern":"220 XXX XXXX","emoji":"🇬🇲"},{"phoneCode":"995","code":"GE","name":"Georgia","pattern":"","emoji":"🇬🇪"},{"phoneCode":"49","code":"DE","name":"Germany","pattern":"49 XXX XXXXXXXX","emoji":"🇩🇪"},{"phoneCode":"233","code":"GH","name":"Ghana","pattern":"","emoji":"🇬🇭"},{"phoneCode":"350","code":"GI","name":"Gibraltar","pattern":"350 XXXX XXXX","emoji":"🇬🇮"},{"phoneCode":"30","code":"GR","name":"Greece","pattern":"30 XX XXXX XXXX","emoji":"🇬🇷"},{"phoneCode":"299","code":"GL","name":"Greenland","pattern":"299 XXX XXX","emoji":"🇬🇱"},{"phoneCode":"1 473","code":"GD","name":"Grenada","pattern":"1473 XXX XXXX","emoji":"🇬🇩"},{"phoneCode":"590","code":"GP","name":"Guadeloupe","pattern":"","emoji":"🇬🇵"},{"phoneCode":"1 671","code":"GU","name":"Guam","pattern":"1671 XXX XXXX","emoji":"🇬🇺"},{"phoneCode":"502","code":"GT","name":"Guatemala","pattern":"502 X XXX XXXX","emoji":"🇬🇹"},{"phoneCode":"44","code":"GG","name":"Guernsey","pattern":"","emoji":"🇬🇬"},{"phoneCode":"224","code":"GN","name":"Guinea","pattern":"224 XXX XXX XXX","emoji":"🇬🇳"},{"phoneCode":"245","code":"GW","name":"Guinea-Bissau","pattern":"245 XXX XXXX","emoji":"🇬🇼"},{"phoneCode":"592","code":"GY","name":"Guyana","pattern":"","emoji":"🇬🇾"},{"phoneCode":"509","code":"HT","name":"Haiti","pattern":"","emoji":"🇭🇹"},{"phoneCode":"504","code":"HN","name":"Honduras","pattern":"504 XXXX XXXX","emoji":"🇭🇳"},{"phoneCode":"852","code":"HK","name":"Hong Kong SAR China","pattern":"","emoji":"🇭🇰"},{"phoneCode":"36","code":"HU","name":"Hungary","pattern":"36 XX XXX XXXX","emoji":"🇭🇺"},{"phoneCode":"354","code":"IS","name":"Iceland","pattern":"354 XXX XXXX","emoji":"🇮🇸"},{"phoneCode":"91","code":"IN","name":"India","pattern":"91 XXXXX XXXXX","emoji":"🇮🇳"},{"phoneCode":"62","code":"ID","name":"Indonesia","pattern":"","emoji":"🇮🇩"},{"phoneCode":"98","code":"IR","name":"Iran","pattern":"98 XXX XXX XXXX","emoji":"🇮🇷"},{"phoneCode":"964","code":"IQ","name":"Iraq","pattern":"964 XXX XXX XXXX","emoji":"🇮🇶"},{"phoneCode":"353","code":"IE","name":"Ireland","pattern":"353 XX XXX XXXX","emoji":"🇮🇪"},{"phoneCode":"972","code":"IL","name":"Israel","pattern":"972 XX XXX XXXX","emoji":"🇮🇱"},{"phoneCode":"39","code":"IT","name":"Italy","pattern":"39 XXX XXX XXXX","emoji":"🇮🇹"},{"phoneCode":"1 876","code":"JM","name":"Jamaica","pattern":"1876 XXX XXXX","emoji":"🇯🇲"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard & Jan Mayen","pattern":"","emoji":"🇸🇯"},{"phoneCode":"81","code":"JP","name":"Japan","pattern":"81 XX XXXX XXXX","emoji":"🇯🇵"},{"phoneCode":"44","code":"JE","name":"Jersey","pattern":"","emoji":"🇯🇪"},{"phoneCode":"962","code":"JO","name":"Jordan","pattern":"962 X XXXX XXXX","emoji":"🇯🇴"},{"phoneCode":"383","code":"XK","name":"Kosovo","pattern":"383 XXXX XXXX","emoji":"🇽🇰"},{"phoneCode":"7 7","code":"KZ","name":"Kazakhstan","pattern":"7 XXX XXX XX XX","emoji":"🇰🇿"},{"phoneCode":"254","code":"KE","name":"Kenya","pattern":"254 XXX XXX XXX","emoji":"🇰🇪"},{"phoneCode":"686","code":"KI","name":"Kiribati","pattern":"","emoji":"🇰🇮"},{"phoneCode":"850","code":"KP","name":"North Korea","pattern":"","emoji":"🇰🇵"},{"phoneCode":"82","code":"KR","name":"South Korea","pattern":"","emoji":"🇰🇷"},{"phoneCode":"965","code":"KW","name":"Kuwait","pattern":"965 XXXX XXXX","emoji":"🇰🇼"},{"phoneCode":"996","code":"KG","name":"Kyrgyzstan","pattern":"","emoji":"🇰🇬"},{"phoneCode":"856","code":"LA","name":"Laos","pattern":"","emoji":"🇱🇦"},{"phoneCode":"371","code":"LV","name":"Latvia","pattern":"371 XXX XXXXX","emoji":"🇱🇻"},{"phoneCode":"961","code":"LB","name":"Lebanon","pattern":"","emoji":"🇱🇧"},{"phoneCode":"266","code":"LS","name":"Lesotho","pattern":"266 XX XXX XXX","emoji":"🇱🇸"},{"phoneCode":"231","code":"LR","name":"Liberia","pattern":"","emoji":"🇱🇷"},{"phoneCode":"218","code":"LY","name":"Libya","pattern":"218 XX XXX XXXX","emoji":"🇱🇾"},{"phoneCode":"423","code":"LI","name":"Liechtenstein","pattern":"","emoji":"🇱🇮"},{"phoneCode":"370","code":"LT","name":"Lithuania","pattern":"370 XXX XXXXX","emoji":"🇱🇹"},{"phoneCode":"352","code":"LU","name":"Luxembourg","pattern":"","emoji":"🇱🇺"},{"phoneCode":"853","code":"MO","name":"Macau SAR China","pattern":"","emoji":"🇲🇴"},{"phoneCode":"389","code":"MK","name":"Macedonia","pattern":"","emoji":"🇲🇰"},{"phoneCode":"261","code":"MG","name":"Madagascar","pattern":"261 XX XX XXX XX","emoji":"🇲🇬"},{"phoneCode":"265","code":"MW","name":"Malawi","pattern":"","emoji":"🇲🇼"},{"phoneCode":"60","code":"MY","name":"Malaysia","pattern":"","emoji":"🇲🇾"},{"phoneCode":"960","code":"MV","name":"Maldives","pattern":"","emoji":"🇲🇻"},{"phoneCode":"223","code":"ML","name":"Mali","pattern":"223 XXXX XXXX","emoji":"🇲🇱"},{"phoneCode":"356","code":"MT","name":"Malta","pattern":"356 XX XX XX XX","emoji":"🇲🇹"},{"phoneCode":"692","code":"MH","name":"Marshall Islands","pattern":"","emoji":"🇲🇭"},{"phoneCode":"596","code":"MQ","name":"Martinique","pattern":"","emoji":"🇲🇶"},{"phoneCode":"222","code":"MR","name":"Mauritania","pattern":"222 XXXX XXXX","emoji":"🇲🇷"},{"phoneCode":"230","code":"MU","name":"Mauritius","pattern":"","emoji":"🇲🇺"},{"phoneCode":"262","code":"YT","name":"Mayotte","pattern":"","emoji":"🇾🇹"},{"phoneCode":"52","code":"MX","name":"Mexico","pattern":"","emoji":"🇲🇽"},{"phoneCode":"691","code":"FM","name":"Micronesia","pattern":"","emoji":"🇫🇲"},{"phoneCode":"373","code":"MD","name":"Moldova","pattern":"373 XX XXX XXX","emoji":"🇲🇩"},{"phoneCode":"377","code":"MC","name":"Monaco","pattern":"377 XXXX XXXX","emoji":"🇲🇨"},{"phoneCode":"976","code":"MN","name":"Mongolia","pattern":"","emoji":"🇲🇳"},{"phoneCode":"382","code":"ME","name":"Montenegro","pattern":"","emoji":"🇲🇪"},{"phoneCode":"1 664","code":"MS","name":"Montserrat","pattern":"1664 XXX XXXX","emoji":"🇲🇸"},{"phoneCode":"212","code":"MA","name":"Morocco","pattern":"212 XX XXX XXXX","emoji":"🇲🇦"},{"phoneCode":"258","code":"MZ","name":"Mozambique","pattern":"258 XX XXX XXXX","emoji":"🇲🇿"},{"phoneCode":"264","code":"NA","name":"Namibia","pattern":"264 XX XXX XXXX","emoji":"🇳🇦"},{"phoneCode":"674","code":"NR","name":"Nauru","pattern":"","emoji":"🇳🇷"},{"phoneCode":"977","code":"NP","name":"Nepal","pattern":"","emoji":"🇳🇵"},{"phoneCode":"31","code":"NL","name":"Netherlands","pattern":"31 X XX XX XX XX","emoji":"🇳🇱"},{"phoneCode":"687","code":"NC","name":"New Caledonia","pattern":"","emoji":"🇳🇨"},{"phoneCode":"64","code":"NZ","name":"New Zealand","pattern":"","emoji":"🇳🇿"},{"phoneCode":"505","code":"NI","name":"Nicaragua","pattern":"505 XXXX XXXX","emoji":"🇳🇮"},{"phoneCode":"227","code":"NE","name":"Niger","pattern":"227 XX XX XX XX","emoji":"🇳🇪"},{"phoneCode":"234","code":"NG","name":"Nigeria","pattern":"","emoji":"🇳🇬"},{"phoneCode":"683","code":"NU","name":"Niue","pattern":"","emoji":"🇳🇺"},{"phoneCode":"672","code":"NF","name":"Norfolk Island","pattern":"","emoji":"🇳🇫"},{"phoneCode":"1 670","code":"MP","name":"Northern Mariana Islands","pattern":"1670 XXX XXXX","emoji":"🇲🇵"},{"phoneCode":"47","code":"NO","name":"Norway","pattern":"47 XXXX XXXX","emoji":"🇳🇴"},{"phoneCode":"968","code":"OM","name":"Oman","pattern":"968 XXXX XXXX","emoji":"🇴🇲"},{"phoneCode":"92","code":"PK","name":"Pakistan","pattern":"92 XXX XXX XXXX","emoji":"🇵🇰"},{"phoneCode":"680","code":"PW","name":"Palau","pattern":"","emoji":"🇵🇼"},{"phoneCode":"970","code":"PS","name":"Palestinian Territories","pattern":"970 XXX XX XXXX","emoji":"🇵🇸"},{"phoneCode":"507","code":"PA","name":"Panama","pattern":"507 XXXX XXXX","emoji":"🇵🇦"},{"phoneCode":"675","code":"PG","name":"Papua New Guinea","pattern":"","emoji":"🇵🇬"},{"phoneCode":"595","code":"PY","name":"Paraguay","pattern":"595 XXX XXX XXX","emoji":"🇵🇾"},{"phoneCode":"51","code":"PE","name":"Peru","pattern":"51 XXX XXX XXX","emoji":"🇵🇪"},{"phoneCode":"63","code":"PH","name":"Philippines","pattern":"63 XXX XXX XXXX","emoji":"🇵🇭"},{"phoneCode":"64","code":"PN","name":"Pitcairn Islands","pattern":"","emoji":"🇵🇳"},{"phoneCode":"48","code":"PL","name":"Poland","pattern":"48 XXX XXX XXX","emoji":"🇵🇱"},{"phoneCode":"351","code":"PT","name":"Portugal","pattern":"351 X XXXX XXXX","emoji":"🇵🇹"},{"phoneCode":"1 787 and 1 939","code":"PR","name":"Puerto Rico","pattern":"1 XXX XXX XXXX","emoji":"🇵🇷"},{"phoneCode":"974","code":"QA","name":"Qatar","pattern":"","emoji":"🇶🇦"},{"phoneCode":"262","code":"RE","name":"Reunion","pattern":"262 XXX XXX XXX","emoji":"🇷🇪"},{"phoneCode":"40","code":"RO","name":"Romania","pattern":"40 XXX XXX XXX","emoji":"🇷🇴"},{"phoneCode":"7","code":"RU","name":"Russia","pattern":"7 XXX XXX XX XX","emoji":"🇷🇺"},{"phoneCode":"250","code":"RW","name":"Rwanda","pattern":"250 XXX XXX XXX","emoji":"🇷🇼"},{"phoneCode":"590","code":"BL","name":"St. Barthelemy","pattern":"","emoji":"🇧🇱"},{"phoneCode":"290","code":"SH","name":"St. Helena","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"1 869","code":"KN","name":"St. Kitts & Nevis","pattern":"1869 XXX XXXX","emoji":"🇰🇳"},{"phoneCode":"1 758","code":"LC","name":"St. Lucia","pattern":"1758 XXX XXXX","emoji":"🇱🇨"},{"phoneCode":"590","code":"MF","name":"St. Martin (France)","pattern":"","emoji":"🇲🇫"},{"phoneCode":"508","code":"PM","name":"St. Pierre and Miquelon","pattern":"","emoji":"🇵🇲"},{"phoneCode":"1 784","code":"VC","name":"St. Vincent and the Grenadines","pattern":"1784 XXX XXXX","emoji":"🇻🇨"},{"phoneCode":"685","code":"WS","name":"Samoa","pattern":"","emoji":"🇼🇸"},{"phoneCode":"378","code":"SM","name":"San Marino","pattern":"378 XXX XXX XXXX","emoji":"🇸🇲"},{"phoneCode":"239","code":"ST","name":"São Tome & Principe","pattern":"239 XX XXXXX","emoji":"🇸🇹"},{"phoneCode":"966","code":"SA","name":"Saudi Arabia","pattern":"","emoji":"🇸🇦"},{"phoneCode":"221","code":"SN","name":"Senegal","pattern":"221 XX XXX XXXX","emoji":"🇸🇳"},{"phoneCode":"381","code":"RS","name":"Serbia","pattern":"381 XX XXX XXXX","emoji":"🇷🇸"},{"phoneCode":"248","code":"SC","name":"Seychelles","pattern":"248 X XX XX XX","emoji":"🇸🇨"},{"phoneCode":"232","code":"SL","name":"Sierra Leone","pattern":"232 XX XXX XXX","emoji":"🇸🇱"},{"phoneCode":"65","code":"SG","name":"Singapore","pattern":"65 XXXX XXXX","emoji":"🇸🇬"},{"phoneCode":"599 3","code":"BQ","name":"Sint Eustatius","pattern":"","emoji":"🇧🇶"},{"phoneCode":"1 721","code":"SX","name":"Sint Maarten","pattern":"1721 XXX XXXX","emoji":"🇸🇽"},{"phoneCode":"421","code":"SK","name":"Slovakia","pattern":"","emoji":"🇸🇰"},{"phoneCode":"386","code":"SI","name":"Slovenia","pattern":"","emoji":"🇸🇮"},{"phoneCode":"677","code":"SB","name":"Solomon Islands","pattern":"","emoji":"🇸🇧"},{"phoneCode":"252","code":"SO","name":"Somalia","pattern":"252 XX XXX XXX","emoji":"🇸🇴"},{"phoneCode":"27","code":"ZA","name":"South Africa","pattern":"27 XX XXX XXXX","emoji":"🇿🇦"},{"phoneCode":"500","code":"GS","name":"South Georgia & South Sandwich Islands","pattern":"","emoji":"🇬🇸"},{"phoneCode":"995 34","code":"","name":"South Ossetia","pattern":"","emoji":""},{"phoneCode":"211","code":"SS","name":"South Sudan","pattern":"211 XX XXX XXXX","emoji":"🇸🇸"},{"phoneCode":"34","code":"ES","name":"Spain","pattern":"34 XXX XXX XXX","emoji":"🇪🇸"},{"phoneCode":"94","code":"LK","name":"Sri Lanka","pattern":"94 XX XXX XXXX","emoji":"🇱🇰"},{"phoneCode":"249","code":"SD","name":"Sudan","pattern":"249 XX XXX XXXX","emoji":"🇸🇩"},{"phoneCode":"597","code":"SR","name":"Suriname","pattern":"597 XXX XXXX","emoji":"🇸🇷"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard","pattern":"","emoji":"🇸🇯"},{"phoneCode":"268","code":"SZ","name":"Swaziland","pattern":"268 XXXX XXXX","emoji":"🇸🇿"},{"phoneCode":"46","code":"SE","name":"Sweden","pattern":"46 XX XXX XXXX","emoji":"🇸🇪"},{"phoneCode":"41","code":"CH","name":"Switzerland","pattern":"41 XX XXX XXXX","emoji":"🇨🇭"},{"phoneCode":"963","code":"SY","name":"Syria","pattern":"","emoji":"🇸🇾"},{"phoneCode":"886","code":"TW","name":"Taiwan","pattern":"","emoji":"🇹🇼"},{"phoneCode":"992","code":"TJ","name":"Tajikistan","pattern":"","emoji":"🇹🇯"},{"phoneCode":"255","code":"TZ","name":"Tanzania","pattern":"255 XX XXX XXXX","emoji":"🇹🇿"},{"phoneCode":"66","code":"TH","name":"Thailand","pattern":"66 X XXXX XXXX","emoji":"🇹🇭"},{"phoneCode":"228","code":"TG","name":"Togo","pattern":"228 XX XXX XXX","emoji":"🇹🇬"},{"phoneCode":"690","code":"TK","name":"Tokelau","pattern":"","emoji":"🇹🇰"},{"phoneCode":"676","code":"TO","name":"Tonga","pattern":"","emoji":"🇹🇴"},{"phoneCode":"1 868","code":"TT","name":"Trinidad & Tobago","pattern":"1868 XXX XXXX","emoji":"🇹🇹"},{"phoneCode":"216","code":"TN","name":"Tunisia","pattern":"216 XX XXX XXX","emoji":"🇹🇳"},{"phoneCode":"90","code":"TR","name":"Turkey","pattern":"90 XXX XXX XXXX","emoji":"🇹🇷"},{"phoneCode":"993","code":"TM","name":"Turkmenistan","pattern":"993 XX XXXXXX","emoji":"🇹🇲"},{"phoneCode":"1 649","code":"TC","name":"Turks & Caicos Islands","pattern":"1649 XXX XXXX","emoji":"🇹🇨"},{"phoneCode":"688","code":"TV","name":"Tuvalu","pattern":"","emoji":"🇹🇻"},{"phoneCode":"256","code":"UG","name":"Uganda","pattern":"256 XX XXX XXXX","emoji":"🇺🇬"},{"phoneCode":"380","code":"UA","name":"Ukraine","pattern":"380 XX XXX XX XX","emoji":"🇺🇦"},{"phoneCode":"971","code":"AE","name":"United Arab Emirates","pattern":"971 XX XXX XXXX","emoji":"🇦🇪"},{"phoneCode":"44","code":"GB","name":"United Kingdom","pattern":"44 XXXX XXXXXX","emoji":"🇬🇧"},{"phoneCode":"1","code":"US","name":"United States","pattern":"1 XXX XXX XXXX","emoji":"🇺🇸"},{"phoneCode":"598","code":"UY","name":"Uruguay","pattern":"598 XXXX XXXX","emoji":"🇺🇾"},{"phoneCode":"1 340","code":"VI","name":"U.S. Virgin Islands","pattern":"1340 XXX XXXX","emoji":"🇻🇮"},{"phoneCode":"998","code":"UZ","name":"Uzbekistan","pattern":"998 XX XXXXXXX","emoji":"🇺🇿"},{"phoneCode":"678","code":"VU","name":"Vanuatu","pattern":"","emoji":"🇻🇺"},{"phoneCode":"58","code":"VE","name":"Venezuela","pattern":"58 XXX XXX XXXX","emoji":"🇻🇪"},{"phoneCode":"39 06 698","code":"VA","name":"Vatican City","pattern":"","emoji":"🇻🇦"},{"phoneCode":"84","code":"VN","name":"Vietnam","pattern":"","emoji":"🇻🇳"},{"phoneCode":"681","code":"WF","name":"Wallis & Futuna","pattern":"","emoji":"🇼🇫"},{"phoneCode":"967","code":"YE","name":"Yemen","pattern":"967 XXX XXX XXX","emoji":"🇾🇪"},{"phoneCode":"260","code":"ZM","name":"Zambia","pattern":"260 XX XXX XXXX","emoji":"🇿🇲"},{"phoneCode":"255","code":"","name":"Zanzibar","pattern":"","emoji":""},{"phoneCode":"263","code":"ZW","name":"Zimbabwe","pattern":"263 XX XXX XXXX","emoji":"🇿🇼"}]; -const PhoneCodesMain: {[phoneCode: string]: Country} = { +/* const PhoneCodesMain: {[phoneCode: string]: Country} = { '1': Countries.find(c => c.name === 'United States'), '44': Countries.find(c => c.name === 'United Kingdom'), '61': Countries.find(c => c.name === 'Australia'), @@ -27,7 +24,7 @@ const PhoneCodesMain: {[phoneCode: string]: Country} = { '590': Countries.find(c => c.name === 'Guadeloupe'), '672': Countries.find(c => c.name === 'Norfolk Island'), '1 268': Countries.find(c => c.name === 'Antigua & Barbuda'), -}; +}; */ /* const toInt = (str) => { @@ -45,7 +42,4 @@ arr.forEach((el, idx) => { }); */ -MOUNT_CLASS_TO.Countries = Countries; - export default Countries; -export {PhoneCodesMain}; \ No newline at end of file diff --git a/src/helpers/dom/clickEvent.ts b/src/helpers/dom/clickEvent.ts index ce701343..f95ed546 100644 --- a/src/helpers/dom/clickEvent.ts +++ b/src/helpers/dom/clickEvent.ts @@ -6,6 +6,7 @@ import type ListenerSetter from "../listenerSetter"; import { isTouchSupported } from "../touchSupport"; +import simulateEvent from "./dispatchEvent"; export const CLICK_EVENT_NAME: 'mousedown' | 'touchend' | 'click' = (isTouchSupported ? 'mousedown' : 'click') as any; export type AttachClickOptions = AddEventListenerOptions & Partial<{listenerSetter: ListenerSetter, touchMouseDown: true}>; @@ -53,6 +54,5 @@ export function detachClickEvent(elem: HTMLElement, callback: (e: TouchEvent | M } export function simulateClickEvent(elem: HTMLElement) { - const event = new Event(CLICK_EVENT_NAME, {bubbles: true, cancelable: true}); - elem.dispatchEvent(event); + simulateEvent(elem, CLICK_EVENT_NAME); } diff --git a/src/helpers/dom/dispatchEvent.ts b/src/helpers/dom/dispatchEvent.ts new file mode 100644 index 00000000..7b4fdb57 --- /dev/null +++ b/src/helpers/dom/dispatchEvent.ts @@ -0,0 +1,4 @@ +export default function simulateEvent(elem: HTMLElement, name: string) { + const event = new Event(name, {bubbles: true, cancelable: true}); + elem.dispatchEvent(event); +} diff --git a/src/helpers/formatPhoneNumber.ts b/src/helpers/formatPhoneNumber.ts new file mode 100644 index 00000000..2836b859 --- /dev/null +++ b/src/helpers/formatPhoneNumber.ts @@ -0,0 +1,125 @@ +/* + * https://github.com/morethanwords/tweb + * Copyright (C) 2019-2021 Eduard Kuzmenko + * https://github.com/morethanwords/tweb/blob/master/LICENSE + */ + +import { HelpCountry, HelpCountryCode } from "../layer"; +import I18n from "../lib/langPack"; + +let sortedCountries: HelpCountry[]; +type PrefixCountry = {country: HelpCountry, code: HelpCountryCode}; +const prefixes: Map = new Map(); +let maxPrefixLength = 0; +const setPrefix = (country: HelpCountry, code: HelpCountryCode, prefix: string = '') => { + prefix = code.country_code + prefix; + /* if(prefixes.has(prefix)) { + console.error('asdasdasd', prefixes.get(prefix), country, code); + } */ + maxPrefixLength = Math.max(maxPrefixLength, prefix.length); + prefixes.set(prefix, {country, code}); +}; + +export function formatPhoneNumber(originalStr: string): { + formatted: string, + country: HelpCountry, + code: HelpCountryCode, + leftPattern: string +} { + if(!prefixes.size) { + I18n.countriesList.forEach(country => { + country.country_codes.forEach(code => { + const s = {country, code}; + + if(code.prefixes) { + code.prefixes.forEach(prefix => { + setPrefix(country, code, prefix); + }); + } else { + setPrefix(country, code); + } + }); + }); + } + + // return {formatted: originalStr, country: undefined as any, leftPattern: ''}; + let str = originalStr.replace(/\D/g, ''); + let phoneCode = str.slice(0, maxPrefixLength); + + ////console.log('str', str, phoneCode); + // if(!sortedCountries) { + // sortedCountries = I18n.countriesList.slice().sort((a, b) => b.country_codes[0].country_code.length - a.country_codes[0].country_code.length); + // } + + // let country = sortedCountries.find((c) => { + // return c.country_codes.find((c) => phoneCode.indexOf(c.replace(/\D/g, '')) === 0); + // }); + + let prefixCountry: PrefixCountry; + for(let i = phoneCode.length - 1; i >= 0; --i) { // lookup for country by prefix + prefixCountry = prefixes.get(phoneCode.slice(0, i + 1)); + if(prefixCountry) { + break; + } + } + + if(!prefixCountry) { + return { + formatted: str, + country: undefined, + code: undefined, + leftPattern: '' + }; + } + + // country = /* PhoneCodesMain[country.phoneCode] || */country; + const country = prefixCountry.country; + + const patterns = prefixCountry.code.patterns || []; + const searchForPattern = str.slice(prefixCountry.code.country_code.length); // splice country code + let pattern = '', mostMatchedPatternMatches = 0, mostMatchedPattern = ''; + for(let i = patterns.length - 1; i >= 0; --i) { + pattern = patterns[i]; + + const _pattern = pattern.replace(/ /g, ''); + let patternMatches = 0; + for(let k = 0, length = Math.min(searchForPattern.length, _pattern.length); k < length; ++k) { + if(searchForPattern[k] === _pattern[k] || _pattern[k] === 'X') { + ++patternMatches; + } else { + patternMatches = 0; + break; + } + } + + if(patternMatches > mostMatchedPatternMatches) { + mostMatchedPatternMatches = patternMatches; + mostMatchedPattern = pattern; + } + } + + pattern = mostMatchedPattern || pattern; + pattern = pattern.replace(/\d/g, 'X'); + + pattern = prefixCountry.code.country_code + ' ' + pattern; + // let pattern = country.pattern || country.phoneCode; + pattern.split('').forEach((symbol, idx) => { + if(symbol === ' ' && str[idx] !== ' ' && str.length > idx) { + str = str.slice(0, idx) + ' ' + str.slice(idx); + } + }); + + /* if(country.pattern) { + str = str.slice(0, country.pattern.length); + } */ + + let leftPattern = pattern && pattern.length > str.length ? pattern.slice(str.length) : ''; + if(leftPattern) { + /* const length = str.length; + leftPattern = leftPattern.split('').map((_, idx) => (length + idx).toString().slice(-1)).join(''); */ + leftPattern = leftPattern.replace(/X/g, '‒'); + // leftPattern = leftPattern.replace(/X/g, '0'); + } + + return {formatted: str, country, code: prefixCountry.code, leftPattern}; +} diff --git a/src/layer.d.ts b/src/layer.d.ts index 16e82ba4..b4137a46 100644 --- a/src/layer.d.ts +++ b/src/layer.d.ts @@ -6146,7 +6146,8 @@ export namespace LangPackDifference { version: number, strings: Array, local?: boolean, - appVersion?: string + appVersion?: string, + countries?: HelpCountriesList.helpCountriesList }; } diff --git a/src/lib/appManagers/appUsersManager.ts b/src/lib/appManagers/appUsersManager.ts index c279d635..4b3a83ea 100644 --- a/src/lib/appManagers/appUsersManager.ts +++ b/src/lib/appManagers/appUsersManager.ts @@ -9,12 +9,12 @@ * https://github.com/zhukov/webogram/blob/master/LICENSE */ -import { formatPhoneNumber } from "../../components/misc"; import { MOUNT_CLASS_TO } from "../../config/debug"; import { filterUnique } from "../../helpers/array"; import cleanSearchText from "../../helpers/cleanSearchText"; import cleanUsername from "../../helpers/cleanUsername"; import { tsNow } from "../../helpers/date"; +import { formatPhoneNumber } from "../../helpers/formatPhoneNumber"; import { safeReplaceObject, isObject } from "../../helpers/object"; import { Chat, InputUser, User as MTUser, UserProfilePhoto, UserStatus } from "../../layer"; import I18n, { i18n, LangPackKey } from "../langPack"; diff --git a/src/lib/langPack.ts b/src/lib/langPack.ts index 19577972..4ebaf4a1 100644 --- a/src/lib/langPack.ts +++ b/src/lib/langPack.ts @@ -9,7 +9,7 @@ import { safeAssign } from "../helpers/object"; import { capitalizeFirstLetter } from "../helpers/string"; import type lang from "../lang"; import type langSign from "../langSign"; -import { LangPackDifference, LangPackString } from "../layer"; +import { HelpCountriesList, HelpCountry, LangPackDifference, LangPackString } from "../layer"; import apiManager from "./mtproto/mtprotoworker"; import stateStorage from "./stateStorage"; import App from "../config/app"; @@ -66,6 +66,7 @@ export type FormatterArguments = FormatterArgument[]; namespace I18n { export const strings: Map = new Map(); + export const countriesList: HelpCountry[] = []; let pluralRules: Intl.PluralRules; let cacheLangPackPromise: Promise; @@ -101,8 +102,9 @@ namespace I18n { lastRequestedLangCode = defaultCode; return Promise.all([ import('../lang'), - import('../langSign') - ]).then(([lang, langSign]) => { + import('../langSign'), + import('../countries') + ]).then(([lang, langSign, countries]) => { const strings: LangPackString[] = []; formatLocalStrings(lang.default, strings); formatLocalStrings(langSign.default, strings); @@ -113,7 +115,8 @@ namespace I18n { lang_code: defaultCode, strings, version: 0, - local: true + local: true, + countries: countries.default }; return saveLangPack(langPack); }); @@ -132,7 +135,11 @@ namespace I18n { }), import('../lang'), import('../langSign'), - polyfillPromise + apiManager.invokeApiCacheable('help.getCountriesList', { + lang_code: langCode, + hash: 0 + }) as Promise, + polyfillPromise, ]); } @@ -168,21 +175,22 @@ namespace I18n { export function getLangPack(langCode: string) { lastRequestedLangCode = langCode; - return loadLangPack(langCode).then(([langPack, _langPack, __langPack, ___langPack, _]) => { + return loadLangPack(langCode).then(([langPack1, langPack2, localLangPack1, localLangPack2, countries, _]) => { let strings: LangPackString[] = []; - [__langPack, ___langPack].forEach(l => { + [localLangPack1, localLangPack2].forEach(l => { formatLocalStrings(l.default as any, strings); }); - strings = strings.concat(langPack.strings); + strings = strings.concat(langPack1.strings); - for(const string of _langPack.strings) { + for(const string of langPack2.strings) { strings.push(string); } - langPack.strings = strings; - return saveLangPack(langPack); + langPack1.strings = strings; + langPack1.countries = countries; + return saveLangPack(langPack1); }); } @@ -223,6 +231,22 @@ namespace I18n { strings.set(string.key as LangPackKey, string); } + if(langPack.countries) { + countriesList.length = 0; + countriesList.push(...langPack.countries.countries); + + langPack.countries.countries.forEach(country => { + if(country.name) { + const langPackKey: any = country.default_name; + strings.set(langPackKey, { + _: 'langPackString', + key: langPackKey, + value: country.name + }); + } + }); + } + rootScope.dispatchEvent('language_change', langPack.lang_code); const elements = Array.from(document.querySelectorAll(`.i18n`)) as HTMLElement[]; diff --git a/src/pages/pageSignIn.ts b/src/pages/pageSignIn.ts index bdc4d7d6..2501adb2 100644 --- a/src/pages/pageSignIn.ts +++ b/src/pages/pageSignIn.ts @@ -4,9 +4,8 @@ * https://github.com/morethanwords/tweb/blob/master/LICENSE */ -import { formatPhoneNumber, putPreloader } from "../components/misc"; +import { putPreloader } from "../components/misc"; import Scrollable from '../components/scrollable'; -import Countries, { Country as _Country } from "../countries"; import appStateManager from "../lib/appManagers/appStateManager"; import apiManager from "../lib/mtproto/mtprotoworker"; import { RichTextProcessor } from '../lib/richtextprocessor'; @@ -14,12 +13,12 @@ import Page from "./page"; import InputField from "../components/inputField"; import CheckboxField from "../components/checkboxField"; import Button from "../components/button"; -import { isAndroid, isApple, isAppleMobile, isSafari } from "../helpers/userAgent"; +import { isAndroid, isApple, isAppleMobile } from "../helpers/userAgent"; import fastSmoothScroll from "../helpers/fastSmoothScroll"; import { isTouchSupported } from "../helpers/touchSupport"; import App from "../config/app"; import Modes from "../config/modes"; -import { _i18n, i18n } from "../lib/langPack"; +import I18n, { _i18n, i18n } from "../lib/langPack"; import lottieLoader from "../lib/lottieLoader"; import { ripple } from "../components/ripple"; import findUpTag from "../helpers/dom/findUpTag"; @@ -36,39 +35,48 @@ import toggleDisability from "../helpers/dom/toggleDisability"; import sessionStorage from "../lib/sessionStorage"; import { DcAuthKey } from "../types"; import placeCaretAtEnd from "../helpers/dom/placeCaretAtEnd"; - -type Country = _Country & { - li?: HTMLLIElement[] -}; +import { formatPhoneNumber } from "../helpers/formatPhoneNumber"; +import { HelpCountry, HelpCountryCode } from "../layer"; +import { getCountryEmoji } from "../vendor/emoji"; +import simulateEvent from "../helpers/dom/dispatchEvent"; +import stateStorage from "../lib/stateStorage"; //import _countries from '../countries_pretty.json'; let btnNext: HTMLButtonElement = null, btnQr: HTMLButtonElement; let onFirstMount = () => { - if(Modes.test) { + /* if(Modes.test) { Countries.push({ - name: 'Test Country', - phoneCode: '999 66', - code: 'TC', - emoji: '🤔', - pattern: '999 66 XXX XX' + _: 'help.country', + default_name: 'Test Country', + country_codes: [{ + _: 'help.countryCode', + country_code: '999 66', + patterns: ['999 66 XXX XX'] + }], + iso2: 'KK' }); console.log('Added test country to list!'); - } + } */ //const countries: Country[] = _countries.default.filter(c => c.emoji); - const countries: Country[] = Countries.filter(c => c.emoji).sort((a, b) => a.name.localeCompare(b.name)); + // const countries: Country[] = Countries.filter(c => c.emoji).sort((a, b) => a.name.localeCompare(b.name)); + // const countries = I18n.countriesList.filter(country => !country.pFlags?.hidden); + const countries = I18n.countriesList + .filter(country => !country.pFlags?.hidden) + .sort((a, b) => (a.name || a.default_name).localeCompare(b.name || b.default_name)); - let lastCountrySelected: Country = null; + const liMap: Map = new Map(); + + let lastCountrySelected: HelpCountry, lastCountryCodeSelected: HelpCountryCode; const inputWrapper = document.createElement('div'); inputWrapper.classList.add('input-wrapper'); const countryInputField = new InputField({ label: 'Login.CountrySelectorLabel', - name: randomLong(), - plainText: true + name: randomLong() }); countryInputField.container.classList.add('input-select'); @@ -92,10 +100,10 @@ let onFirstMount = () => { initSelect = null; countries.forEach((c) => { - const emoji = c.emoji; + const emoji = getCountryEmoji(c.iso2); const liArr: Array = []; - c.phoneCode.split(' and ').forEach((phoneCode: string) => { + c.country_codes.forEach((countryCode) => { const li = document.createElement('li'); let wrapped = RichTextProcessor.wrapEmojiText(emoji); @@ -107,18 +115,20 @@ let onFirstMount = () => { li.innerHTML = wrapped; } - li.append(c.name); + const el = i18n(c.default_name as any); + el.dataset.defaultName = c.default_name; + li.append(el); const span = document.createElement('span'); span.classList.add('phone-code'); - span.innerText = '+' + phoneCode; + span.innerText = '+' + countryCode.country_code; li.appendChild(span); liArr.push(li); selectList.append(li); }); - c.li = liArr; + liMap.set(c.iso2, liArr); }); selectList.addEventListener('mousedown', (e) => { @@ -126,9 +136,7 @@ let onFirstMount = () => { return; } - let target = e.target as HTMLElement; - if(target.tagName !== 'LI') target = findUpTag(target, 'LI'); - + const target = findUpTag(e.target, 'LI') selectCountryByTarget(target); //console.log('clicked', e, countryName, phoneCode); }); @@ -137,11 +145,12 @@ let onFirstMount = () => { }; const selectCountryByTarget = (target: HTMLElement) => { - const countryName = target.childNodes[1].textContent;//target.innerText.split('\n').shift(); + const defaultName = (target.childNodes[1] as HTMLElement).dataset.defaultName; const phoneCode = target.querySelector('.phone-code').innerText; - countryInput.value = countryName; - lastCountrySelected = countries.find(c => c.name === countryName); + replaceContent(countryInput, i18n(defaultName as any)); + simulateEvent(countryInput, 'input'); + lastCountrySelected = countries.find(c => c.default_name === defaultName); telInputField.value = lastValue = phoneCode; hidePicker(); @@ -160,7 +169,7 @@ let onFirstMount = () => { initSelect(); } else { countries.forEach((c) => { - c.li.forEach(li => li.style.display = ''); + liMap.get(c.iso2).forEach(li => li.style.display = ''); }); } @@ -216,11 +225,11 @@ let onFirstMount = () => { //let i = new RegExp('^' + this.value, 'i'); let _value = this.value.toLowerCase(); - let matches: Country[] = []; + let matches: HelpCountry[] = []; countries.forEach((c) => { - let good = c.name.toLowerCase().indexOf(_value) !== -1/* === 0 */;//i.test(c.name); + let good = !![c.name, c.default_name].filter(Boolean).find(str => str.toLowerCase().indexOf(_value) !== -1)/* === 0 */;//i.test(c.name); - c.li.forEach(li => li.style.display = good ? '' : 'none'); + liMap.get(c.iso2).forEach(li => li.style.display = good ? '' : 'none'); if(good) matches.push(c); }); @@ -235,10 +244,10 @@ let onFirstMount = () => { return false; } else */if(matches.length === 0) { countries.forEach((c) => { - c.li.forEach(li => li.style.display = ''); + liMap.get(c.iso2).forEach(li => li.style.display = ''); }); } else if(matches.length === 1 && e.key === 'Enter') { - selectCountryByTarget(matches[0].li[0]); + selectCountryByTarget(liMap.get(matches[0].iso2)[0]); } }); @@ -302,7 +311,7 @@ let onFirstMount = () => { telInputField.setLabel(); - let formatted: string, country: Country, leftPattern = ''; + let formatted: string, country: HelpCountry, countryCode: HelpCountryCode, leftPattern = ''; if(telInputField.value.replace(/\++/, '+') === '+') { telInputField.setValueSilently('+'); } else { @@ -310,6 +319,7 @@ let onFirstMount = () => { formatted = o.formatted; country = o.country; leftPattern = o.leftPattern; + countryCode = o.code; telInputField.setValueSilently(lastValue = formatted ? '+' + formatted : ''); } @@ -317,10 +327,18 @@ let onFirstMount = () => { //console.log(formatted, country); - let countryName = country ? country.name : ''/* 'Unknown' */; - if(countryName !== countryInput.value && (!lastCountrySelected || !country || lastCountrySelected.phoneCode !== country.phoneCode)) { - countryInput.value = countryName; + let countryName = country ? country.name || country.default_name : ''/* 'Unknown' */; + if(countryName !== countryInputField.value && ( + !lastCountrySelected || + !country || ( + lastCountrySelected !== country && + lastCountryCodeSelected.country_code !== countryCode.country_code + ) + ) + ) { + replaceContent(countryInput, country ? i18n(country.default_name as any) : countryName); lastCountrySelected = country; + lastCountryCodeSelected = countryCode; } //if(country && (telInputField.value.length - 1) >= (country.pattern ? country.pattern.length : 9)) { @@ -468,6 +486,13 @@ let onFirstMount = () => { let tryAgain = () => { apiManager.invokeApi('help.getNearestDc').then((nearestDcResult) => { + const langPack = stateStorage.getFromCache('langPack'); + if(langPack && !langPack.countries?.hash) { + I18n.getLangPack(langPack.lang_code).then(() => { + simulateEvent(telEl, 'input'); + }); + } + const dcs = new Set([1, 2, 3, 4, 5]); const done: number[] = [nearestDcResult.this_dc]; @@ -504,16 +529,8 @@ let onFirstMount = () => { return nearestDcResult; }).then((nearestDcResult) => { - if(!countryInput.value.length && !telInputField.value.length) { - const country = countries.find((c) => c.code === nearestDcResult.country); - if(country) { - countryInput.value = country.name; - lastCountrySelected = country; - const str = '+' + country.phoneCode.split(' and ').shift(); - const {leftPattern} = formatPhoneNumber(str); - telInputField.setValueSilently(lastValue = str); - telEl.dataset.leftPattern = leftPattern; - } + if(!countryInputField.value.length && !telInputField.value.length) { + selectCountryByTarget(liMap.get(nearestDcResult.country)[0]); } //console.log('woohoo', nearestDcResult, country); diff --git a/src/scripts/format_jsons.js b/src/scripts/format_jsons.js index 91c9d3e7..064fe34d 100644 --- a/src/scripts/format_jsons.js +++ b/src/scripts/format_jsons.js @@ -7,7 +7,8 @@ let emoji = require('./in/emoji_pretty.json'); //let countries = require('./countries_pretty.json'); -let countries = require('fs').readFileSync('./in/countries.dat').toString(); +// let countries = require('fs').readFileSync('./in/countries.dat').toString(); +let countries = require('./in/countries.mtproto.json'); //console.log(countries); //console.log(emoji, countries); @@ -188,31 +189,49 @@ if(false) { require('fs').writeFileSync('./emoji.json', JSON.stringify(obj)); } */ -{ - let arr = []; - /* countries.forEach(e => { - let {name, code, phoneCode} = e; +// old countries format +// { +// let arr = []; +// /* countries.forEach(e => { +// let {name, code, phoneCode} = e; - arr.push([name, code, phoneCode]); - }); */ +// arr.push([name, code, phoneCode]); +// }); */ - const lines = countries.split('\n'); - const data2 = []; - lines.forEach(x => { - if(!x.trim()) return; - const split = x.split(';'); - const item = { - phoneCode: split[0], - code: split[1], - name: split[2], - pattern: split[3], - //count: Number(split[4]), - emoji: split[5] - }; +// const lines = countries.split('\n'); +// const data2 = []; +// lines.forEach(x => { +// if(!x.trim()) return; +// const split = x.split(';'); +// const item = { +// phoneCode: split[0], +// code: split[1], +// name: split[2], +// pattern: split[3], +// //count: Number(split[4]), +// emoji: split[5] +// }; + +// arr.push(item); +// //console.log(item); +// }); + +// require('fs').writeFileSync(writePathTo + 'countries.json', JSON.stringify(arr)); +// } - arr.push(item); - //console.log(item); +{ + const c = countries.filter(country => !country.pFlags.hidden); + c.forEach(country => { + delete country._; + delete country.pFlags; + delete country.flags; + + country.country_codes.forEach(countryCode => { + delete countryCode._; + delete countryCode.pFlags; + delete countryCode.flags; + }); }); - - require('fs').writeFileSync(writePathTo + 'countries.json', JSON.stringify(arr)); + + require('fs').writeFileSync(writePathTo + 'countries.json', JSON.stringify(c)); } diff --git a/src/scripts/in/countries.mtproto.json b/src/scripts/in/countries.mtproto.json new file mode 100644 index 00000000..2b66ca07 --- /dev/null +++ b/src/scripts/in/countries.mtproto.json @@ -0,0 +1,4205 @@ +[ + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AD", + "default_name": "Andorra", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "376", + "patterns": [ + "XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AE", + "default_name": "United Arab Emirates", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "971", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AF", + "default_name": "Afghanistan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "93", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AG", + "default_name": "Antigua & Barbuda", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1268", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AI", + "default_name": "Anguilla", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1264", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AL", + "default_name": "Albania", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "355", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AM", + "default_name": "Armenia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "374", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AO", + "default_name": "Angola", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "244", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AR", + "default_name": "Argentina", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "54" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AS", + "default_name": "American Samoa", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1684", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AT", + "default_name": "Austria", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "43", + "patterns": [ + "X XXXXXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AU", + "default_name": "Australia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "61", + "patterns": [ + "X XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AW", + "default_name": "Aruba", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "297", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "AZ", + "default_name": "Azerbaijan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "994", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BA", + "default_name": "Bosnia & Herzegovina", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "387", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BB", + "default_name": "Barbados", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1246", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BD", + "default_name": "Bangladesh", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "880", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BE", + "default_name": "Belgium", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "32", + "patterns": [ + "XXX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BF", + "default_name": "Burkina Faso", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "226", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BG", + "default_name": "Bulgaria", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "359" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BH", + "default_name": "Bahrain", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "973", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BI", + "default_name": "Burundi", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "257", + "patterns": [ + "XX XX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BJ", + "default_name": "Benin", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "229", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BM", + "default_name": "Bermuda", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1441", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BN", + "default_name": "Brunei Darussalam", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "673", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BO", + "default_name": "Bolivia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "591", + "patterns": [ + "X XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BQ", + "default_name": "Bonaire, Sint Eustatius & Saba", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "599" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BR", + "default_name": "Brazil", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "55", + "patterns": [ + "XX XXXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BS", + "default_name": "Bahamas", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1242", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BT", + "default_name": "Bhutan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "975", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BW", + "default_name": "Botswana", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "267", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BY", + "default_name": "Belarus", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "375", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "BZ", + "default_name": "Belize", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "501" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CA", + "default_name": "Canada", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 3, + "country_code": "1", + "prefixes": [ + "403", + "587", + "780", + "825", + "236", + "250", + "604", + "672", + "778", + "204", + "431", + "506", + "709", + "902", + "782", + "226", + "249", + "289", + "343", + "365", + "416", + "437", + "519", + "548", + "613", + "647", + "705", + "807", + "905", + "418", + "438", + "450", + "514", + "579", + "581", + "819", + "873", + "306", + "639", + "867" + ], + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CD", + "default_name": "Congo (Dem. Rep.)", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "243", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CF", + "default_name": "Central African Rep.", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "236", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CG", + "default_name": "Congo (Rep.)", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "242", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CH", + "default_name": "Switzerland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "41", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CI", + "default_name": "Côte d'Ivoire", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "225", + "patterns": [ + "XX XX XX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CK", + "default_name": "Cook Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "682" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CL", + "default_name": "Chile", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "56", + "patterns": [ + "X XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CM", + "default_name": "Cameroon", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "237", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CN", + "default_name": "China", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "86", + "patterns": [ + "XXX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CO", + "default_name": "Colombia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "57", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CR", + "default_name": "Costa Rica", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "506", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CU", + "default_name": "Cuba", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "53", + "patterns": [ + "X XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CV", + "default_name": "Cape Verde", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "238", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CW", + "default_name": "Curaçao", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 1, + "country_code": "599", + "prefixes": [ + "9" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CY", + "default_name": "Cyprus", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "357", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "CZ", + "default_name": "Czech Republic", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "420", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DE", + "default_name": "Germany", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "49", + "patterns": [ + "XXXX XXXXXXX", + "16X XXXXXXX", + "17X XXXXXXX", + "3601 4198XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DJ", + "default_name": "Djibouti", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "253", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DK", + "default_name": "Denmark", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "45", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DM", + "default_name": "Dominica", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1767", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DO", + "default_name": "Dominican Rep.", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1809", + "patterns": [ + "XXX XXXX" + ] + }, + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1829", + "patterns": [ + "XXX XXXX" + ] + }, + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1849", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "DZ", + "default_name": "Algeria", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "213", + "patterns": [ + "XXX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "EC", + "default_name": "Ecuador", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "593", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "EE", + "default_name": "Estonia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "372", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "EG", + "default_name": "Egypt", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "20", + "patterns": [ + "XX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ER", + "default_name": "Eritrea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "291", + "patterns": [ + "X XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ES", + "default_name": "Spain", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "34", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ET", + "default_name": "Ethiopia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "251", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FI", + "default_name": "Finland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "358" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FJ", + "default_name": "Fiji", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "679", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FK", + "default_name": "Falkland Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "500" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FM", + "default_name": "Micronesia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "691" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FO", + "default_name": "Faroe Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "298", + "patterns": [ + "XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "FR", + "default_name": "France", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "33", + "patterns": [ + "X XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GA", + "default_name": "Gabon", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "241", + "patterns": [ + "X XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GB", + "default_name": "United Kingdom", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "44", + "patterns": [ + "XXXX XXXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GD", + "default_name": "Grenada", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1473", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GE", + "default_name": "Georgia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "995", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GF", + "default_name": "French Guiana", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "594" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GH", + "default_name": "Ghana", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "233", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GI", + "default_name": "Gibraltar", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "350", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GL", + "default_name": "Greenland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "299", + "patterns": [ + "XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GM", + "default_name": "Gambia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "220", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GN", + "default_name": "Guinea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "224", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GP", + "default_name": "Guadeloupe", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "590", + "patterns": [ + "XXX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GQ", + "default_name": "Equatorial Guinea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "240", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GR", + "default_name": "Greece", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "30", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GT", + "default_name": "Guatemala", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "502", + "patterns": [ + "X XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GU", + "default_name": "Guam", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1671", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GW", + "default_name": "Guinea-Bissau", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "245", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "GY", + "default_name": "Guyana", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "592" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "HK", + "default_name": "Hong Kong", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "852", + "patterns": [ + "X XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "HN", + "default_name": "Honduras", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "504", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "HR", + "default_name": "Croatia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "385", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "HT", + "default_name": "Haiti", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "509", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "HU", + "default_name": "Hungary", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "36", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ID", + "default_name": "Indonesia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "62", + "patterns": [ + "XXX XXXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IE", + "default_name": "Ireland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "353", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IL", + "default_name": "Israel", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "972", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IN", + "default_name": "India", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "91", + "patterns": [ + "XXXXX XXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IO", + "default_name": "Diego Garcia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "246", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IQ", + "default_name": "Iraq", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "964", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IR", + "default_name": "Iran", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "98", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IS", + "default_name": "Iceland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "354", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "IT", + "default_name": "Italy", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "39", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "JM", + "default_name": "Jamaica", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1876", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "JO", + "default_name": "Jordan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "962", + "patterns": [ + "X XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "JP", + "default_name": "Japan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "81", + "patterns": [ + "XX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KE", + "default_name": "Kenya", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "254", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KG", + "default_name": "Kyrgyzstan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "996", + "patterns": [ + "XXX XXXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KH", + "default_name": "Cambodia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "855", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KI", + "default_name": "Kiribati", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "686", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KM", + "default_name": "Comoros", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "269", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KN", + "default_name": "Saint Kitts & Nevis", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1869", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KP", + "default_name": "North Korea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "850" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KR", + "default_name": "South Korea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "82", + "patterns": [ + "XX XXXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KW", + "default_name": "Kuwait", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "965", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KY", + "default_name": "Cayman Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1345", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "KZ", + "default_name": "Kazakhstan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 3, + "country_code": "7", + "prefixes": [ + "6", + "7" + ], + "patterns": [ + "XXX XXX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LA", + "default_name": "Laos", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "856", + "patterns": [ + "XX XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LB", + "default_name": "Lebanon", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "961", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LC", + "default_name": "Saint Lucia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1758", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LI", + "default_name": "Liechtenstein", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "423", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LK", + "default_name": "Sri Lanka", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "94", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LR", + "default_name": "Liberia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "231", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LS", + "default_name": "Lesotho", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "266", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LT", + "default_name": "Lithuania", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "370", + "patterns": [ + "XXX XXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LU", + "default_name": "Luxembourg", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "352", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LV", + "default_name": "Latvia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "371", + "patterns": [ + "XXX XXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "LY", + "default_name": "Libya", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "218", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MA", + "default_name": "Morocco", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "212", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MC", + "default_name": "Monaco", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "377", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MD", + "default_name": "Moldova", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "373", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ME", + "default_name": "Montenegro", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "382" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MG", + "default_name": "Madagascar", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "261", + "patterns": [ + "XX XX XXX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MH", + "default_name": "Marshall Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "692" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MK", + "default_name": "North Macedonia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "389", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ML", + "default_name": "Mali", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "223", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MM", + "default_name": "Myanmar", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "95" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MN", + "default_name": "Mongolia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "976", + "patterns": [ + "XX XX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MO", + "default_name": "Macau", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "853", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MP", + "default_name": "Northern Mariana Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1670", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MQ", + "default_name": "Martinique", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "596" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MR", + "default_name": "Mauritania", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "222", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MS", + "default_name": "Montserrat", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1664", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MT", + "default_name": "Malta", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "356", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MU", + "default_name": "Mauritius", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "230", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MV", + "default_name": "Maldives", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "960", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MW", + "default_name": "Malawi", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "265", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MX", + "default_name": "Mexico", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "52" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MY", + "default_name": "Malaysia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "60", + "patterns": [ + "XX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "MZ", + "default_name": "Mozambique", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "258", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NA", + "default_name": "Namibia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "264", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NC", + "default_name": "New Caledonia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "687" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NE", + "default_name": "Niger", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "227", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NF", + "default_name": "Norfolk Island", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "672" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NG", + "default_name": "Nigeria", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "234", + "patterns": [ + "XX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NI", + "default_name": "Nicaragua", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "505", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NL", + "default_name": "Netherlands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "31", + "patterns": [ + "X XX XX XX XX", + "97 XXXX XXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NO", + "default_name": "Norway", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "47", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NP", + "default_name": "Nepal", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "977", + "patterns": [ + "XX XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NR", + "default_name": "Nauru", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "674" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NU", + "default_name": "Niue", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "683" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "NZ", + "default_name": "New Zealand", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "64", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "OM", + "default_name": "Oman", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "968", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PA", + "default_name": "Panama", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "507", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PE", + "default_name": "Peru", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "51", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PF", + "default_name": "French Polynesia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "689" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PG", + "default_name": "Papua New Guinea", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "675" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PH", + "default_name": "Philippines", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "63", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PK", + "default_name": "Pakistan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "92", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PL", + "default_name": "Poland", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "48", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PM", + "default_name": "Saint Pierre & Miquelon", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "508" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PR", + "default_name": "Puerto Rico", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1787", + "patterns": [ + "XXX XXXX" + ] + }, + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1939", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PS", + "default_name": "Palestine", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "970", + "patterns": [ + "XXX XX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PT", + "default_name": "Portugal", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "351", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PW", + "default_name": "Palau", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "680" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "PY", + "default_name": "Paraguay", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "595", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "QA", + "default_name": "Qatar", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "974", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "RE", + "default_name": "Réunion", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "262", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "RO", + "default_name": "Romania", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "40", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "RS", + "default_name": "Serbia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "381", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "RU", + "default_name": "Russian Federation", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "7", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "RW", + "default_name": "Rwanda", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "250", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SA", + "default_name": "Saudi Arabia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "966", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SB", + "default_name": "Solomon Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "677" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SC", + "default_name": "Seychelles", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "248", + "patterns": [ + "X XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SD", + "default_name": "Sudan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "249", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SE", + "default_name": "Sweden", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "46", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SG", + "default_name": "Singapore", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "65", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SH", + "default_name": "Saint Helena", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "247" + }, + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "290", + "patterns": [ + "XX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SI", + "default_name": "Slovenia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "386", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SK", + "default_name": "Slovakia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "421", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SL", + "default_name": "Sierra Leone", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "232", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SM", + "default_name": "San Marino", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "378", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SN", + "default_name": "Senegal", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "221", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SO", + "default_name": "Somalia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "252", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SR", + "default_name": "Suriname", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "597", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SS", + "default_name": "South Sudan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "211", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ST", + "default_name": "São Tomé & Príncipe", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "239", + "patterns": [ + "XX XXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SV", + "default_name": "El Salvador", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "503", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SX", + "default_name": "Sint Maarten", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1721", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SY", + "default_name": "Syria", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "963", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "SZ", + "default_name": "Eswatini", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "268", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TC", + "default_name": "Turks & Caicos Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1649", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TD", + "default_name": "Chad", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "235", + "patterns": [ + "XX XX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TG", + "default_name": "Togo", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "228", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TH", + "default_name": "Thailand", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "66", + "patterns": [ + "X XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TJ", + "default_name": "Tajikistan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "992", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TK", + "default_name": "Tokelau", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "690" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TL", + "default_name": "Timor-Leste", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "670" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TM", + "default_name": "Turkmenistan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "993", + "patterns": [ + "XX XXXXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TN", + "default_name": "Tunisia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "216", + "patterns": [ + "XX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TO", + "default_name": "Tonga", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "676" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TR", + "default_name": "Turkey", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "90", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TT", + "default_name": "Trinidad & Tobago", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1868", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TV", + "default_name": "Tuvalu", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "688" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TW", + "default_name": "Taiwan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "886", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "TZ", + "default_name": "Tanzania", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "255", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "UA", + "default_name": "Ukraine", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "380", + "patterns": [ + "XX XXX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "UG", + "default_name": "Uganda", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "256", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "US", + "default_name": "USA", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "UY", + "default_name": "Uruguay", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "598", + "patterns": [ + "X XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "UZ", + "default_name": "Uzbekistan", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "998", + "patterns": [ + "XX XXX XX XX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VC", + "default_name": "Saint Vincent & the Grenadines", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1784", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VE", + "default_name": "Venezuela", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "58", + "patterns": [ + "XXX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VG", + "default_name": "British Virgin Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1284", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VI", + "default_name": "US Virgin Islands", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "1340", + "patterns": [ + "XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VN", + "default_name": "Vietnam", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "84" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "VU", + "default_name": "Vanuatu", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "678" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "WF", + "default_name": "Wallis & Futuna", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "681" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "WS", + "default_name": "Samoa", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "685" + } + ] + }, + { + "_": "help.country", + "pFlags": { + "hidden": true + }, + "flags": 1, + "iso2": "XG", + "default_name": "Global Mobile Satellite System", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "881" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "XK", + "default_name": "Kosovo", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "383", + "patterns": [ + "XXXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": { + "hidden": true + }, + "flags": 1, + "iso2": "XV", + "default_name": "International Networks", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "882" + }, + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 0, + "country_code": "883" + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "YE", + "default_name": "Yemen", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "967", + "patterns": [ + "XXX XXX XXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": { + "hidden": true + }, + "flags": 1, + "iso2": "YL", + "default_name": "Y-land", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 1, + "country_code": "42", + "prefixes": [ + "4", + "7" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ZA", + "default_name": "South Africa", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "27", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ZM", + "default_name": "Zambia", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "260", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + }, + { + "_": "help.country", + "pFlags": {}, + "flags": 0, + "iso2": "ZW", + "default_name": "Zimbabwe", + "country_codes": [ + { + "_": "help.countryCode", + "pFlags": {}, + "flags": 2, + "country_code": "263", + "patterns": [ + "XX XXX XXXX" + ] + } + ] + } +] \ No newline at end of file diff --git a/src/scripts/in/schema_additional_params.json b/src/scripts/in/schema_additional_params.json index d8579c57..4e0dab8a 100644 --- a/src/scripts/in/schema_additional_params.json +++ b/src/scripts/in/schema_additional_params.json @@ -225,7 +225,8 @@ "predicate": "langPackDifference", "params": [ {"name": "local", "type": "boolean"}, - {"name": "appVersion", "type": "string"} + {"name": "appVersion", "type": "string"}, + {"name": "countries", "type": "HelpCountriesList.helpCountriesList"} ] }, { "predicate": "updateNewDiscussionMessage", diff --git a/src/scripts/out/countries.json b/src/scripts/out/countries.json index 35e3a18a..02b0e21b 100644 --- a/src/scripts/out/countries.json +++ b/src/scripts/out/countries.json @@ -1 +1 @@ -[{"phoneCode":"7 840","code":"AB","name":"Abkhazia","pattern":"","emoji":""},{"phoneCode":"93","code":"AF","name":"Afghanistan","pattern":"93 XXX XXX XXX","emoji":"🇦🇫"},{"phoneCode":"358 18","code":"AX","name":"Aland Islands","pattern":"","emoji":"🇦🇽"},{"phoneCode":"355","code":"AL","name":"Albania","pattern":"355 XX XXX XXXX","emoji":"🇦🇱"},{"phoneCode":"213","code":"DZ","name":"Algeria","pattern":"213 XXX XX XX XX","emoji":"🇩🇿"},{"phoneCode":"1 684","code":"AS","name":"American Samoa","pattern":"1684 XXX XXXX","emoji":"🇦🇸"},{"phoneCode":"376","code":"AD","name":"Andorra","pattern":"376 XX XX XX","emoji":"🇦🇩"},{"phoneCode":"244","code":"AO","name":"Angola","pattern":"244 XXX XXX XXX","emoji":"🇦🇴"},{"phoneCode":"1 264","code":"AI","name":"Anguilla","pattern":"1264 XXX XXXX","emoji":"🇦🇮"},{"phoneCode":"1 268","code":"AG","name":"Antigua & Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"54","code":"AR","name":"Argentina","pattern":"","emoji":"🇦🇷"},{"phoneCode":"374","code":"AM","name":"Armenia","pattern":"374 XX XXX XXX","emoji":"🇦🇲"},{"phoneCode":"297","code":"AW","name":"Aruba","pattern":"297 XXX XXXX","emoji":"🇦🇼"},{"phoneCode":"247","code":"SH","name":"Ascension","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"61","code":"AU","name":"Australia","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"672","code":"AU","name":"Australian External Territories","pattern":"61 XXX XXX XXX","emoji":"🇦🇺"},{"phoneCode":"43","code":"AT","name":"Austria","pattern":"","emoji":"🇦🇹"},{"phoneCode":"994","code":"AZ","name":"Azerbaijan","pattern":"994 XX XXX XX XX","emoji":"🇦🇿"},{"phoneCode":"1 242","code":"BS","name":"Bahamas","pattern":"1242 XXX XXXX","emoji":"🇧🇸"},{"phoneCode":"973","code":"BH","name":"Bahrain","pattern":"973 XXXX XXXX","emoji":"🇧🇭"},{"phoneCode":"880","code":"BD","name":"Bangladesh","pattern":"","emoji":"🇧🇩"},{"phoneCode":"1 246","code":"BB","name":"Barbados","pattern":"1246 XXX XXXX","emoji":"🇧🇧"},{"phoneCode":"1 268","code":"AG","name":"Barbuda","pattern":"1268 XXX XXXX","emoji":"🇦🇬"},{"phoneCode":"375","code":"BY","name":"Belarus","pattern":"375 XX XXX XXXX","emoji":"🇧🇾"},{"phoneCode":"32","code":"BE","name":"Belgium","pattern":"32 XXX XX XX XX","emoji":"🇧🇪"},{"phoneCode":"501","code":"BZ","name":"Belize","pattern":"","emoji":"🇧🇿"},{"phoneCode":"229","code":"BJ","name":"Benin","pattern":"229 XX XXX XXX","emoji":"🇧🇯"},{"phoneCode":"1 441","code":"BM","name":"Bermuda","pattern":"1441 XXX XXXX","emoji":"🇧🇲"},{"phoneCode":"975","code":"BT","name":"Bhutan","pattern":"","emoji":"🇧🇹"},{"phoneCode":"591","code":"BO","name":"Bolivia","pattern":"591 X XXX XXXX","emoji":"🇧🇴"},{"phoneCode":"599 7","code":"BQ","name":"Caribbean Netherlands","pattern":"","emoji":"🇧🇶"},{"phoneCode":"387","code":"BA","name":"Bosnia & Herzegovina","pattern":"","emoji":"🇧🇦"},{"phoneCode":"267","code":"BW","name":"Botswana","pattern":"267 XX XXX XXX","emoji":"🇧🇼"},{"phoneCode":"55","code":"BR","name":"Brazil","pattern":"55 XX XXXXX XXXX","emoji":"🇧🇷"},{"phoneCode":"246","code":"IO","name":"British Indian Ocean Territory","pattern":"246 XXX XXXX","emoji":"🇮🇴"},{"phoneCode":"1 284","code":"VG","name":"British Virgin Islands","pattern":"1284 XXX XXXX","emoji":"🇻🇬"},{"phoneCode":"673","code":"BN","name":"Brunei","pattern":"673 XXX XXXX","emoji":"🇧🇳"},{"phoneCode":"359","code":"BG","name":"Bulgaria","pattern":"","emoji":"🇧🇬"},{"phoneCode":"226","code":"BF","name":"Burkina Faso","pattern":"226 XX XX XX XX","emoji":"🇧🇫"},{"phoneCode":"95","code":"MM","name":"Myanmar (Burma)","pattern":"","emoji":"🇲🇲"},{"phoneCode":"257","code":"BI","name":"Burundi","pattern":"257 XX XX XXXX","emoji":"🇧🇮"},{"phoneCode":"855","code":"KH","name":"Cambodia","pattern":"","emoji":"🇰🇭"},{"phoneCode":"237","code":"CM","name":"Cameroon","pattern":"237 XXXX XXXX","emoji":"🇨🇲"},{"phoneCode":"1","code":"CA","name":"Canada","pattern":"1 XXX XXX XXXX","emoji":"🇨🇦"},{"phoneCode":"238","code":"CV","name":"Cape Verde","pattern":"238 XXX XXXX","emoji":"🇨🇻"},{"phoneCode":"1 345","code":"KY","name":"Cayman Islands","pattern":"1345 XXX XXXX","emoji":"🇰🇾"},{"phoneCode":"236","code":"CF","name":"Central African Republic","pattern":"236 XX XX XX XX","emoji":"🇨🇫"},{"phoneCode":"235","code":"TD","name":"Chad","pattern":"235 XX XX XX XX","emoji":"🇹🇩"},{"phoneCode":"56","code":"CL","name":"Chile","pattern":"56 X XXXX XXXX","emoji":"🇨🇱"},{"phoneCode":"86","code":"CN","name":"China","pattern":"86 XXX XXXX XXXX","emoji":"🇨🇳"},{"phoneCode":"61","code":"CX","name":"Christmas Island","pattern":"","emoji":"🇨🇽"},{"phoneCode":"61","code":"CC","name":"Cocos (Keeling) Islands","pattern":"","emoji":"🇨🇨"},{"phoneCode":"57","code":"CO","name":"Colombia","pattern":"57 XXX XXX XXXX","emoji":"🇨🇴"},{"phoneCode":"269","code":"KM","name":"Comoros","pattern":"269 XXX XXXX","emoji":"🇰🇲"},{"phoneCode":"242","code":"CG","name":"Congo - Brazzaville","pattern":"242 XX XXX XXXX","emoji":"🇨🇬"},{"phoneCode":"243","code":"CD","name":"Congo - Kinshasa","pattern":"243 XX XXX XXXX","emoji":"🇨🇩"},{"phoneCode":"682","code":"CK","name":"Cook Islands","pattern":"","emoji":"🇨🇰"},{"phoneCode":"506","code":"CR","name":"Costa Rica","pattern":"","emoji":"🇨🇷"},{"phoneCode":"225","code":"CI","name":"Cote d’Ivoire","pattern":"225 XX XXX XXX","emoji":"🇨🇮"},{"phoneCode":"385","code":"HR","name":"Croatia","pattern":"","emoji":"🇭🇷"},{"phoneCode":"53","code":"CU","name":"Cuba","pattern":"53 XXXX XXXX","emoji":"🇨🇺"},{"phoneCode":"599 9","code":"CW","name":"Curacao","pattern":"","emoji":"🇨🇼"},{"phoneCode":"357","code":"CY","name":"Cyprus","pattern":"357 XXXX XXXX","emoji":"🇨🇾"},{"phoneCode":"420","code":"CZ","name":"Czech Republic","pattern":"","emoji":"🇨🇿"},{"phoneCode":"45","code":"DK","name":"Denmark","pattern":"45 XXXX XXXX","emoji":"🇩🇰"},{"phoneCode":"246","code":"DG","name":"Diego Garcia","pattern":"","emoji":"🇩🇬"},{"phoneCode":"253","code":"DJ","name":"Djibouti","pattern":"253 XX XX XX XX","emoji":"🇩🇯"},{"phoneCode":"1 767","code":"DM","name":"Dominica","pattern":"1767 XXX XXXX","emoji":"🇩🇲"},{"phoneCode":"1 809 and 1 829","code":"DO","name":"Dominican Republic","pattern":"1 XXX XXX XXXX","emoji":"🇩🇴"},{"phoneCode":"670","code":"TL","name":"Timor-Leste","pattern":"","emoji":"🇹🇱"},{"phoneCode":"593","code":"EC","name":"Ecuador","pattern":"","emoji":"🇪🇨"},{"phoneCode":"20","code":"EG","name":"Egypt","pattern":"20 XX XXX XXXX","emoji":"🇪🇬"},{"phoneCode":"503","code":"SV","name":"El Salvador","pattern":"503 XXXX XXXX","emoji":"🇸🇻"},{"phoneCode":"240","code":"GQ","name":"Equatorial Guinea","pattern":"240 XXX XXX XXX","emoji":"🇬🇶"},{"phoneCode":"291","code":"ER","name":"Eritrea","pattern":"291 X XXX XXX","emoji":"🇪🇷"},{"phoneCode":"372","code":"EE","name":"Estonia","pattern":"","emoji":"🇪🇪"},{"phoneCode":"251","code":"ET","name":"Ethiopia","pattern":"251 XX XXX XXXX","emoji":"🇪🇹"},{"phoneCode":"500","code":"FK","name":"Falkland Islands","pattern":"","emoji":"🇫🇰"},{"phoneCode":"298","code":"FO","name":"Faroe Islands","pattern":"298 XXX XXX","emoji":"🇫🇴"},{"phoneCode":"679","code":"FJ","name":"Fiji","pattern":"","emoji":"🇫🇯"},{"phoneCode":"358","code":"FI","name":"Finland","pattern":"","emoji":"🇫🇮"},{"phoneCode":"33","code":"FR","name":"France","pattern":"33 X XX XX XX XX","emoji":"🇫🇷"},{"phoneCode":"594","code":"GF","name":"French Guiana","pattern":"","emoji":"🇬🇫"},{"phoneCode":"689","code":"PF","name":"French Polynesia","pattern":"","emoji":"🇵🇫"},{"phoneCode":"241","code":"GA","name":"Gabon","pattern":"241 X XX XX XX","emoji":"🇬🇦"},{"phoneCode":"220","code":"GM","name":"Gambia","pattern":"220 XXX XXXX","emoji":"🇬🇲"},{"phoneCode":"995","code":"GE","name":"Georgia","pattern":"","emoji":"🇬🇪"},{"phoneCode":"49","code":"DE","name":"Germany","pattern":"49 XXX XXXXXXXX","emoji":"🇩🇪"},{"phoneCode":"233","code":"GH","name":"Ghana","pattern":"","emoji":"🇬🇭"},{"phoneCode":"350","code":"GI","name":"Gibraltar","pattern":"350 XXXX XXXX","emoji":"🇬🇮"},{"phoneCode":"30","code":"GR","name":"Greece","pattern":"30 XX XXXX XXXX","emoji":"🇬🇷"},{"phoneCode":"299","code":"GL","name":"Greenland","pattern":"299 XXX XXX","emoji":"🇬🇱"},{"phoneCode":"1 473","code":"GD","name":"Grenada","pattern":"1473 XXX XXXX","emoji":"🇬🇩"},{"phoneCode":"590","code":"GP","name":"Guadeloupe","pattern":"","emoji":"🇬🇵"},{"phoneCode":"1 671","code":"GU","name":"Guam","pattern":"1671 XXX XXXX","emoji":"🇬🇺"},{"phoneCode":"502","code":"GT","name":"Guatemala","pattern":"502 X XXX XXXX","emoji":"🇬🇹"},{"phoneCode":"44","code":"GG","name":"Guernsey","pattern":"","emoji":"🇬🇬"},{"phoneCode":"224","code":"GN","name":"Guinea","pattern":"224 XXX XXX XXX","emoji":"🇬🇳"},{"phoneCode":"245","code":"GW","name":"Guinea-Bissau","pattern":"245 XXX XXXX","emoji":"🇬🇼"},{"phoneCode":"592","code":"GY","name":"Guyana","pattern":"","emoji":"🇬🇾"},{"phoneCode":"509","code":"HT","name":"Haiti","pattern":"","emoji":"🇭🇹"},{"phoneCode":"504","code":"HN","name":"Honduras","pattern":"504 XXXX XXXX","emoji":"🇭🇳"},{"phoneCode":"852","code":"HK","name":"Hong Kong SAR China","pattern":"","emoji":"🇭🇰"},{"phoneCode":"36","code":"HU","name":"Hungary","pattern":"36 XX XXX XXXX","emoji":"🇭🇺"},{"phoneCode":"354","code":"IS","name":"Iceland","pattern":"354 XXX XXXX","emoji":"🇮🇸"},{"phoneCode":"91","code":"IN","name":"India","pattern":"91 XXXXX XXXXX","emoji":"🇮🇳"},{"phoneCode":"62","code":"ID","name":"Indonesia","pattern":"","emoji":"🇮🇩"},{"phoneCode":"98","code":"IR","name":"Iran","pattern":"98 XXX XXX XXXX","emoji":"🇮🇷"},{"phoneCode":"964","code":"IQ","name":"Iraq","pattern":"964 XXX XXX XXXX","emoji":"🇮🇶"},{"phoneCode":"353","code":"IE","name":"Ireland","pattern":"353 XX XXX XXXX","emoji":"🇮🇪"},{"phoneCode":"972","code":"IL","name":"Israel","pattern":"972 XX XXX XXXX","emoji":"🇮🇱"},{"phoneCode":"39","code":"IT","name":"Italy","pattern":"39 XXX XXX XXXX","emoji":"🇮🇹"},{"phoneCode":"1 876","code":"JM","name":"Jamaica","pattern":"1876 XXX XXXX","emoji":"🇯🇲"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard & Jan Mayen","pattern":"","emoji":"🇸🇯"},{"phoneCode":"81","code":"JP","name":"Japan","pattern":"81 XX XXXX XXXX","emoji":"🇯🇵"},{"phoneCode":"44","code":"JE","name":"Jersey","pattern":"","emoji":"🇯🇪"},{"phoneCode":"962","code":"JO","name":"Jordan","pattern":"962 X XXXX XXXX","emoji":"🇯🇴"},{"phoneCode":"383","code":"XK","name":"Kosovo","pattern":"383 XXXX XXXX","emoji":"🇽🇰"},{"phoneCode":"7 7","code":"KZ","name":"Kazakhstan","pattern":"7 XXX XXX XX XX","emoji":"🇰🇿"},{"phoneCode":"254","code":"KE","name":"Kenya","pattern":"254 XXX XXX XXX","emoji":"🇰🇪"},{"phoneCode":"686","code":"KI","name":"Kiribati","pattern":"","emoji":"🇰🇮"},{"phoneCode":"850","code":"KP","name":"North Korea","pattern":"","emoji":"🇰🇵"},{"phoneCode":"82","code":"KR","name":"South Korea","pattern":"","emoji":"🇰🇷"},{"phoneCode":"965","code":"KW","name":"Kuwait","pattern":"965 XXXX XXXX","emoji":"🇰🇼"},{"phoneCode":"996","code":"KG","name":"Kyrgyzstan","pattern":"","emoji":"🇰🇬"},{"phoneCode":"856","code":"LA","name":"Laos","pattern":"","emoji":"🇱🇦"},{"phoneCode":"371","code":"LV","name":"Latvia","pattern":"371 XXX XXXXX","emoji":"🇱🇻"},{"phoneCode":"961","code":"LB","name":"Lebanon","pattern":"","emoji":"🇱🇧"},{"phoneCode":"266","code":"LS","name":"Lesotho","pattern":"266 XX XXX XXX","emoji":"🇱🇸"},{"phoneCode":"231","code":"LR","name":"Liberia","pattern":"","emoji":"🇱🇷"},{"phoneCode":"218","code":"LY","name":"Libya","pattern":"218 XX XXX XXXX","emoji":"🇱🇾"},{"phoneCode":"423","code":"LI","name":"Liechtenstein","pattern":"","emoji":"🇱🇮"},{"phoneCode":"370","code":"LT","name":"Lithuania","pattern":"370 XXX XXXXX","emoji":"🇱🇹"},{"phoneCode":"352","code":"LU","name":"Luxembourg","pattern":"","emoji":"🇱🇺"},{"phoneCode":"853","code":"MO","name":"Macau SAR China","pattern":"","emoji":"🇲🇴"},{"phoneCode":"389","code":"MK","name":"Macedonia","pattern":"","emoji":"🇲🇰"},{"phoneCode":"261","code":"MG","name":"Madagascar","pattern":"261 XX XX XXX XX","emoji":"🇲🇬"},{"phoneCode":"265","code":"MW","name":"Malawi","pattern":"","emoji":"🇲🇼"},{"phoneCode":"60","code":"MY","name":"Malaysia","pattern":"","emoji":"🇲🇾"},{"phoneCode":"960","code":"MV","name":"Maldives","pattern":"","emoji":"🇲🇻"},{"phoneCode":"223","code":"ML","name":"Mali","pattern":"223 XXXX XXXX","emoji":"🇲🇱"},{"phoneCode":"356","code":"MT","name":"Malta","pattern":"356 XX XX XX XX","emoji":"🇲🇹"},{"phoneCode":"692","code":"MH","name":"Marshall Islands","pattern":"","emoji":"🇲🇭"},{"phoneCode":"596","code":"MQ","name":"Martinique","pattern":"","emoji":"🇲🇶"},{"phoneCode":"222","code":"MR","name":"Mauritania","pattern":"222 XXXX XXXX","emoji":"🇲🇷"},{"phoneCode":"230","code":"MU","name":"Mauritius","pattern":"","emoji":"🇲🇺"},{"phoneCode":"262","code":"YT","name":"Mayotte","pattern":"","emoji":"🇾🇹"},{"phoneCode":"52","code":"MX","name":"Mexico","pattern":"","emoji":"🇲🇽"},{"phoneCode":"691","code":"FM","name":"Micronesia","pattern":"","emoji":"🇫🇲"},{"phoneCode":"373","code":"MD","name":"Moldova","pattern":"373 XX XXX XXX","emoji":"🇲🇩"},{"phoneCode":"377","code":"MC","name":"Monaco","pattern":"377 XXXX XXXX","emoji":"🇲🇨"},{"phoneCode":"976","code":"MN","name":"Mongolia","pattern":"","emoji":"🇲🇳"},{"phoneCode":"382","code":"ME","name":"Montenegro","pattern":"","emoji":"🇲🇪"},{"phoneCode":"1 664","code":"MS","name":"Montserrat","pattern":"1664 XXX XXXX","emoji":"🇲🇸"},{"phoneCode":"212","code":"MA","name":"Morocco","pattern":"212 XX XXX XXXX","emoji":"🇲🇦"},{"phoneCode":"258","code":"MZ","name":"Mozambique","pattern":"258 XX XXX XXXX","emoji":"🇲🇿"},{"phoneCode":"264","code":"NA","name":"Namibia","pattern":"264 XX XXX XXXX","emoji":"🇳🇦"},{"phoneCode":"674","code":"NR","name":"Nauru","pattern":"","emoji":"🇳🇷"},{"phoneCode":"977","code":"NP","name":"Nepal","pattern":"","emoji":"🇳🇵"},{"phoneCode":"31","code":"NL","name":"Netherlands","pattern":"31 X XX XX XX XX","emoji":"🇳🇱"},{"phoneCode":"687","code":"NC","name":"New Caledonia","pattern":"","emoji":"🇳🇨"},{"phoneCode":"64","code":"NZ","name":"New Zealand","pattern":"","emoji":"🇳🇿"},{"phoneCode":"505","code":"NI","name":"Nicaragua","pattern":"505 XXXX XXXX","emoji":"🇳🇮"},{"phoneCode":"227","code":"NE","name":"Niger","pattern":"227 XX XX XX XX","emoji":"🇳🇪"},{"phoneCode":"234","code":"NG","name":"Nigeria","pattern":"","emoji":"🇳🇬"},{"phoneCode":"683","code":"NU","name":"Niue","pattern":"","emoji":"🇳🇺"},{"phoneCode":"672","code":"NF","name":"Norfolk Island","pattern":"","emoji":"🇳🇫"},{"phoneCode":"1 670","code":"MP","name":"Northern Mariana Islands","pattern":"1670 XXX XXXX","emoji":"🇲🇵"},{"phoneCode":"47","code":"NO","name":"Norway","pattern":"47 XXXX XXXX","emoji":"🇳🇴"},{"phoneCode":"968","code":"OM","name":"Oman","pattern":"968 XXXX XXXX","emoji":"🇴🇲"},{"phoneCode":"92","code":"PK","name":"Pakistan","pattern":"92 XXX XXX XXXX","emoji":"🇵🇰"},{"phoneCode":"680","code":"PW","name":"Palau","pattern":"","emoji":"🇵🇼"},{"phoneCode":"970","code":"PS","name":"Palestinian Territories","pattern":"970 XXX XX XXXX","emoji":"🇵🇸"},{"phoneCode":"507","code":"PA","name":"Panama","pattern":"507 XXXX XXXX","emoji":"🇵🇦"},{"phoneCode":"675","code":"PG","name":"Papua New Guinea","pattern":"","emoji":"🇵🇬"},{"phoneCode":"595","code":"PY","name":"Paraguay","pattern":"595 XXX XXX XXX","emoji":"🇵🇾"},{"phoneCode":"51","code":"PE","name":"Peru","pattern":"51 XXX XXX XXX","emoji":"🇵🇪"},{"phoneCode":"63","code":"PH","name":"Philippines","pattern":"63 XXX XXX XXXX","emoji":"🇵🇭"},{"phoneCode":"64","code":"PN","name":"Pitcairn Islands","pattern":"","emoji":"🇵🇳"},{"phoneCode":"48","code":"PL","name":"Poland","pattern":"48 XXX XXX XXX","emoji":"🇵🇱"},{"phoneCode":"351","code":"PT","name":"Portugal","pattern":"351 X XXXX XXXX","emoji":"🇵🇹"},{"phoneCode":"1 787 and 1 939","code":"PR","name":"Puerto Rico","pattern":"1 XXX XXX XXXX","emoji":"🇵🇷"},{"phoneCode":"974","code":"QA","name":"Qatar","pattern":"","emoji":"🇶🇦"},{"phoneCode":"262","code":"RE","name":"Reunion","pattern":"262 XXX XXX XXX","emoji":"🇷🇪"},{"phoneCode":"40","code":"RO","name":"Romania","pattern":"40 XXX XXX XXX","emoji":"🇷🇴"},{"phoneCode":"7","code":"RU","name":"Russia","pattern":"7 XXX XXX XX XX","emoji":"🇷🇺"},{"phoneCode":"250","code":"RW","name":"Rwanda","pattern":"250 XXX XXX XXX","emoji":"🇷🇼"},{"phoneCode":"590","code":"BL","name":"St. Barthelemy","pattern":"","emoji":"🇧🇱"},{"phoneCode":"290","code":"SH","name":"St. Helena","pattern":"290 XX XXX","emoji":"🇸🇭"},{"phoneCode":"1 869","code":"KN","name":"St. Kitts & Nevis","pattern":"1869 XXX XXXX","emoji":"🇰🇳"},{"phoneCode":"1 758","code":"LC","name":"St. Lucia","pattern":"1758 XXX XXXX","emoji":"🇱🇨"},{"phoneCode":"590","code":"MF","name":"St. Martin (France)","pattern":"","emoji":"🇲🇫"},{"phoneCode":"508","code":"PM","name":"St. Pierre and Miquelon","pattern":"","emoji":"🇵🇲"},{"phoneCode":"1 784","code":"VC","name":"St. Vincent and the Grenadines","pattern":"1784 XXX XXXX","emoji":"🇻🇨"},{"phoneCode":"685","code":"WS","name":"Samoa","pattern":"","emoji":"🇼🇸"},{"phoneCode":"378","code":"SM","name":"San Marino","pattern":"378 XXX XXX XXXX","emoji":"🇸🇲"},{"phoneCode":"239","code":"ST","name":"São Tome & Principe","pattern":"239 XX XXXXX","emoji":"🇸🇹"},{"phoneCode":"966","code":"SA","name":"Saudi Arabia","pattern":"","emoji":"🇸🇦"},{"phoneCode":"221","code":"SN","name":"Senegal","pattern":"221 XX XXX XXXX","emoji":"🇸🇳"},{"phoneCode":"381","code":"RS","name":"Serbia","pattern":"381 XX XXX XXXX","emoji":"🇷🇸"},{"phoneCode":"248","code":"SC","name":"Seychelles","pattern":"248 X XX XX XX","emoji":"🇸🇨"},{"phoneCode":"232","code":"SL","name":"Sierra Leone","pattern":"232 XX XXX XXX","emoji":"🇸🇱"},{"phoneCode":"65","code":"SG","name":"Singapore","pattern":"65 XXXX XXXX","emoji":"🇸🇬"},{"phoneCode":"599 3","code":"BQ","name":"Sint Eustatius","pattern":"","emoji":"🇧🇶"},{"phoneCode":"1 721","code":"SX","name":"Sint Maarten","pattern":"1721 XXX XXXX","emoji":"🇸🇽"},{"phoneCode":"421","code":"SK","name":"Slovakia","pattern":"","emoji":"🇸🇰"},{"phoneCode":"386","code":"SI","name":"Slovenia","pattern":"","emoji":"🇸🇮"},{"phoneCode":"677","code":"SB","name":"Solomon Islands","pattern":"","emoji":"🇸🇧"},{"phoneCode":"252","code":"SO","name":"Somalia","pattern":"252 XX XXX XXX","emoji":"🇸🇴"},{"phoneCode":"27","code":"ZA","name":"South Africa","pattern":"27 XX XXX XXXX","emoji":"🇿🇦"},{"phoneCode":"500","code":"GS","name":"South Georgia & South Sandwich Islands","pattern":"","emoji":"🇬🇸"},{"phoneCode":"995 34","code":"","name":"South Ossetia","pattern":"","emoji":""},{"phoneCode":"211","code":"SS","name":"South Sudan","pattern":"211 XX XXX XXXX","emoji":"🇸🇸"},{"phoneCode":"34","code":"ES","name":"Spain","pattern":"34 XXX XXX XXX","emoji":"🇪🇸"},{"phoneCode":"94","code":"LK","name":"Sri Lanka","pattern":"94 XX XXX XXXX","emoji":"🇱🇰"},{"phoneCode":"249","code":"SD","name":"Sudan","pattern":"249 XX XXX XXXX","emoji":"🇸🇩"},{"phoneCode":"597","code":"SR","name":"Suriname","pattern":"597 XXX XXXX","emoji":"🇸🇷"},{"phoneCode":"47 79","code":"SJ","name":"Svalbard","pattern":"","emoji":"🇸🇯"},{"phoneCode":"268","code":"SZ","name":"Swaziland","pattern":"268 XXXX XXXX","emoji":"🇸🇿"},{"phoneCode":"46","code":"SE","name":"Sweden","pattern":"46 XX XXX XXXX","emoji":"🇸🇪"},{"phoneCode":"41","code":"CH","name":"Switzerland","pattern":"41 XX XXX XXXX","emoji":"🇨🇭"},{"phoneCode":"963","code":"SY","name":"Syria","pattern":"","emoji":"🇸🇾"},{"phoneCode":"886","code":"TW","name":"Taiwan","pattern":"","emoji":"🇹🇼"},{"phoneCode":"992","code":"TJ","name":"Tajikistan","pattern":"","emoji":"🇹🇯"},{"phoneCode":"255","code":"TZ","name":"Tanzania","pattern":"255 XX XXX XXXX","emoji":"🇹🇿"},{"phoneCode":"66","code":"TH","name":"Thailand","pattern":"66 X XXXX XXXX","emoji":"🇹🇭"},{"phoneCode":"228","code":"TG","name":"Togo","pattern":"228 XX XXX XXX","emoji":"🇹🇬"},{"phoneCode":"690","code":"TK","name":"Tokelau","pattern":"","emoji":"🇹🇰"},{"phoneCode":"676","code":"TO","name":"Tonga","pattern":"","emoji":"🇹🇴"},{"phoneCode":"1 868","code":"TT","name":"Trinidad & Tobago","pattern":"1868 XXX XXXX","emoji":"🇹🇹"},{"phoneCode":"216","code":"TN","name":"Tunisia","pattern":"216 XX XXX XXX","emoji":"🇹🇳"},{"phoneCode":"90","code":"TR","name":"Turkey","pattern":"90 XXX XXX XXXX","emoji":"🇹🇷"},{"phoneCode":"993","code":"TM","name":"Turkmenistan","pattern":"993 XX XXXXXX","emoji":"🇹🇲"},{"phoneCode":"1 649","code":"TC","name":"Turks & Caicos Islands","pattern":"1649 XXX XXXX","emoji":"🇹🇨"},{"phoneCode":"688","code":"TV","name":"Tuvalu","pattern":"","emoji":"🇹🇻"},{"phoneCode":"256","code":"UG","name":"Uganda","pattern":"256 XX XXX XXXX","emoji":"🇺🇬"},{"phoneCode":"380","code":"UA","name":"Ukraine","pattern":"380 XX XXX XX XX","emoji":"🇺🇦"},{"phoneCode":"971","code":"AE","name":"United Arab Emirates","pattern":"971 XX XXX XXXX","emoji":"🇦🇪"},{"phoneCode":"44","code":"GB","name":"United Kingdom","pattern":"44 XXXX XXXXXX","emoji":"🇬🇧"},{"phoneCode":"1","code":"US","name":"United States","pattern":"1 XXX XXX XXXX","emoji":"🇺🇸"},{"phoneCode":"598","code":"UY","name":"Uruguay","pattern":"598 XXXX XXXX","emoji":"🇺🇾"},{"phoneCode":"1 340","code":"VI","name":"U.S. Virgin Islands","pattern":"1340 XXX XXXX","emoji":"🇻🇮"},{"phoneCode":"998","code":"UZ","name":"Uzbekistan","pattern":"998 XX XXXXXXX","emoji":"🇺🇿"},{"phoneCode":"678","code":"VU","name":"Vanuatu","pattern":"","emoji":"🇻🇺"},{"phoneCode":"58","code":"VE","name":"Venezuela","pattern":"58 XXX XXX XXXX","emoji":"🇻🇪"},{"phoneCode":"39 06 698","code":"VA","name":"Vatican City","pattern":"","emoji":"🇻🇦"},{"phoneCode":"84","code":"VN","name":"Vietnam","pattern":"","emoji":"🇻🇳"},{"phoneCode":"681","code":"WF","name":"Wallis & Futuna","pattern":"","emoji":"🇼🇫"},{"phoneCode":"967","code":"YE","name":"Yemen","pattern":"967 XXX XXX XXX","emoji":"🇾🇪"},{"phoneCode":"260","code":"ZM","name":"Zambia","pattern":"260 XX XXX XXXX","emoji":"🇿🇲"},{"phoneCode":"255","code":"","name":"Zanzibar","pattern":"","emoji":""},{"phoneCode":"263","code":"ZW","name":"Zimbabwe","pattern":"263 XX XXX XXXX","emoji":"🇿🇼"}] \ No newline at end of file +[{"iso2":"AD","default_name":"Andorra","country_codes":[{"country_code":"376","patterns":["XX XX XX"]}]},{"iso2":"AE","default_name":"United Arab Emirates","country_codes":[{"country_code":"971","patterns":["XX XXX XXXX"]}]},{"iso2":"AF","default_name":"Afghanistan","country_codes":[{"country_code":"93","patterns":["XXX XXX XXX"]}]},{"iso2":"AG","default_name":"Antigua & Barbuda","country_codes":[{"country_code":"1268","patterns":["XXX XXXX"]}]},{"iso2":"AI","default_name":"Anguilla","country_codes":[{"country_code":"1264","patterns":["XXX XXXX"]}]},{"iso2":"AL","default_name":"Albania","country_codes":[{"country_code":"355","patterns":["XX XXX XXXX"]}]},{"iso2":"AM","default_name":"Armenia","country_codes":[{"country_code":"374","patterns":["XX XXX XXX"]}]},{"iso2":"AO","default_name":"Angola","country_codes":[{"country_code":"244","patterns":["XXX XXX XXX"]}]},{"iso2":"AR","default_name":"Argentina","country_codes":[{"country_code":"54"}]},{"iso2":"AS","default_name":"American Samoa","country_codes":[{"country_code":"1684","patterns":["XXX XXXX"]}]},{"iso2":"AT","default_name":"Austria","country_codes":[{"country_code":"43","patterns":["X XXXXXXXX"]}]},{"iso2":"AU","default_name":"Australia","country_codes":[{"country_code":"61","patterns":["X XXXX XXXX"]}]},{"iso2":"AW","default_name":"Aruba","country_codes":[{"country_code":"297","patterns":["XXX XXXX"]}]},{"iso2":"AZ","default_name":"Azerbaijan","country_codes":[{"country_code":"994","patterns":["XX XXX XXXX"]}]},{"iso2":"BA","default_name":"Bosnia & Herzegovina","country_codes":[{"country_code":"387","patterns":["XX XXX XXX"]}]},{"iso2":"BB","default_name":"Barbados","country_codes":[{"country_code":"1246","patterns":["XXX XXXX"]}]},{"iso2":"BD","default_name":"Bangladesh","country_codes":[{"country_code":"880","patterns":["XX XXX XXX"]}]},{"iso2":"BE","default_name":"Belgium","country_codes":[{"country_code":"32","patterns":["XXX XX XX XX"]}]},{"iso2":"BF","default_name":"Burkina Faso","country_codes":[{"country_code":"226","patterns":["XX XX XX XX"]}]},{"iso2":"BG","default_name":"Bulgaria","country_codes":[{"country_code":"359"}]},{"iso2":"BH","default_name":"Bahrain","country_codes":[{"country_code":"973","patterns":["XXXX XXXX"]}]},{"iso2":"BI","default_name":"Burundi","country_codes":[{"country_code":"257","patterns":["XX XX XXXX"]}]},{"iso2":"BJ","default_name":"Benin","country_codes":[{"country_code":"229","patterns":["XX XXX XXX"]}]},{"iso2":"BM","default_name":"Bermuda","country_codes":[{"country_code":"1441","patterns":["XXX XXXX"]}]},{"iso2":"BN","default_name":"Brunei Darussalam","country_codes":[{"country_code":"673","patterns":["XXX XXXX"]}]},{"iso2":"BO","default_name":"Bolivia","country_codes":[{"country_code":"591","patterns":["X XXX XXXX"]}]},{"iso2":"BQ","default_name":"Bonaire, Sint Eustatius & Saba","country_codes":[{"country_code":"599"}]},{"iso2":"BR","default_name":"Brazil","country_codes":[{"country_code":"55","patterns":["XX XXXXX XXXX"]}]},{"iso2":"BS","default_name":"Bahamas","country_codes":[{"country_code":"1242","patterns":["XXX XXXX"]}]},{"iso2":"BT","default_name":"Bhutan","country_codes":[{"country_code":"975","patterns":["XX XXX XXX"]}]},{"iso2":"BW","default_name":"Botswana","country_codes":[{"country_code":"267","patterns":["XX XXX XXX"]}]},{"iso2":"BY","default_name":"Belarus","country_codes":[{"country_code":"375","patterns":["XX XXX XXXX"]}]},{"iso2":"BZ","default_name":"Belize","country_codes":[{"country_code":"501"}]},{"iso2":"CA","default_name":"Canada","country_codes":[{"country_code":"1","prefixes":["403","587","780","825","236","250","604","672","778","204","431","506","709","902","782","226","249","289","343","365","416","437","519","548","613","647","705","807","905","418","438","450","514","579","581","819","873","306","639","867"],"patterns":["XXX XXX XXXX"]}]},{"iso2":"CD","default_name":"Congo (Dem. Rep.)","country_codes":[{"country_code":"243","patterns":["XX XXX XXXX"]}]},{"iso2":"CF","default_name":"Central African Rep.","country_codes":[{"country_code":"236","patterns":["XX XX XX XX"]}]},{"iso2":"CG","default_name":"Congo (Rep.)","country_codes":[{"country_code":"242","patterns":["XX XXX XXXX"]}]},{"iso2":"CH","default_name":"Switzerland","country_codes":[{"country_code":"41","patterns":["XX XXX XXXX"]}]},{"iso2":"CI","default_name":"Côte d'Ivoire","country_codes":[{"country_code":"225","patterns":["XX XX XX XXXX"]}]},{"iso2":"CK","default_name":"Cook Islands","country_codes":[{"country_code":"682"}]},{"iso2":"CL","default_name":"Chile","country_codes":[{"country_code":"56","patterns":["X XXXX XXXX"]}]},{"iso2":"CM","default_name":"Cameroon","country_codes":[{"country_code":"237","patterns":["XXXX XXXX"]}]},{"iso2":"CN","default_name":"China","country_codes":[{"country_code":"86","patterns":["XXX XXXX XXXX"]}]},{"iso2":"CO","default_name":"Colombia","country_codes":[{"country_code":"57","patterns":["XXX XXX XXXX"]}]},{"iso2":"CR","default_name":"Costa Rica","country_codes":[{"country_code":"506","patterns":["XXXX XXXX"]}]},{"iso2":"CU","default_name":"Cuba","country_codes":[{"country_code":"53","patterns":["X XXX XXXX"]}]},{"iso2":"CV","default_name":"Cape Verde","country_codes":[{"country_code":"238","patterns":["XXX XXXX"]}]},{"iso2":"CW","default_name":"Curaçao","country_codes":[{"country_code":"599","prefixes":["9"]}]},{"iso2":"CY","default_name":"Cyprus","country_codes":[{"country_code":"357","patterns":["XXXX XXXX"]}]},{"iso2":"CZ","default_name":"Czech Republic","country_codes":[{"country_code":"420","patterns":["XXX XXX XXX"]}]},{"iso2":"DE","default_name":"Germany","country_codes":[{"country_code":"49","patterns":["XXXX XXXXXXX","16X XXXXXXX","17X XXXXXXX","3601 4198XX"]}]},{"iso2":"DJ","default_name":"Djibouti","country_codes":[{"country_code":"253","patterns":["XX XX XX XX"]}]},{"iso2":"DK","default_name":"Denmark","country_codes":[{"country_code":"45","patterns":["XXXX XXXX"]}]},{"iso2":"DM","default_name":"Dominica","country_codes":[{"country_code":"1767","patterns":["XXX XXXX"]}]},{"iso2":"DO","default_name":"Dominican Rep.","country_codes":[{"country_code":"1809","patterns":["XXX XXXX"]},{"country_code":"1829","patterns":["XXX XXXX"]},{"country_code":"1849","patterns":["XXX XXXX"]}]},{"iso2":"DZ","default_name":"Algeria","country_codes":[{"country_code":"213","patterns":["XXX XX XX XX"]}]},{"iso2":"EC","default_name":"Ecuador","country_codes":[{"country_code":"593","patterns":["XX XXX XXXX"]}]},{"iso2":"EE","default_name":"Estonia","country_codes":[{"country_code":"372","patterns":["XXXX XXXX"]}]},{"iso2":"EG","default_name":"Egypt","country_codes":[{"country_code":"20","patterns":["XX XXXX XXXX"]}]},{"iso2":"ER","default_name":"Eritrea","country_codes":[{"country_code":"291","patterns":["X XXX XXX"]}]},{"iso2":"ES","default_name":"Spain","country_codes":[{"country_code":"34","patterns":["XXX XXX XXX"]}]},{"iso2":"ET","default_name":"Ethiopia","country_codes":[{"country_code":"251","patterns":["XX XXX XXXX"]}]},{"iso2":"FI","default_name":"Finland","country_codes":[{"country_code":"358"}]},{"iso2":"FJ","default_name":"Fiji","country_codes":[{"country_code":"679","patterns":["XXX XXXX"]}]},{"iso2":"FK","default_name":"Falkland Islands","country_codes":[{"country_code":"500"}]},{"iso2":"FM","default_name":"Micronesia","country_codes":[{"country_code":"691"}]},{"iso2":"FO","default_name":"Faroe Islands","country_codes":[{"country_code":"298","patterns":["XXX XXX"]}]},{"iso2":"FR","default_name":"France","country_codes":[{"country_code":"33","patterns":["X XX XX XX XX"]}]},{"iso2":"GA","default_name":"Gabon","country_codes":[{"country_code":"241","patterns":["X XX XX XX"]}]},{"iso2":"GB","default_name":"United Kingdom","country_codes":[{"country_code":"44","patterns":["XXXX XXXXXX"]}]},{"iso2":"GD","default_name":"Grenada","country_codes":[{"country_code":"1473","patterns":["XXX XXXX"]}]},{"iso2":"GE","default_name":"Georgia","country_codes":[{"country_code":"995","patterns":["XXX XXX XXX"]}]},{"iso2":"GF","default_name":"French Guiana","country_codes":[{"country_code":"594"}]},{"iso2":"GH","default_name":"Ghana","country_codes":[{"country_code":"233","patterns":["XX XXX XXXX"]}]},{"iso2":"GI","default_name":"Gibraltar","country_codes":[{"country_code":"350","patterns":["XXXX XXXX"]}]},{"iso2":"GL","default_name":"Greenland","country_codes":[{"country_code":"299","patterns":["XXX XXX"]}]},{"iso2":"GM","default_name":"Gambia","country_codes":[{"country_code":"220","patterns":["XXX XXXX"]}]},{"iso2":"GN","default_name":"Guinea","country_codes":[{"country_code":"224","patterns":["XXX XXX XXX"]}]},{"iso2":"GP","default_name":"Guadeloupe","country_codes":[{"country_code":"590","patterns":["XXX XX XX XX"]}]},{"iso2":"GQ","default_name":"Equatorial Guinea","country_codes":[{"country_code":"240","patterns":["XXX XXX XXX"]}]},{"iso2":"GR","default_name":"Greece","country_codes":[{"country_code":"30","patterns":["XXX XXX XXXX"]}]},{"iso2":"GT","default_name":"Guatemala","country_codes":[{"country_code":"502","patterns":["X XXX XXXX"]}]},{"iso2":"GU","default_name":"Guam","country_codes":[{"country_code":"1671","patterns":["XXX XXXX"]}]},{"iso2":"GW","default_name":"Guinea-Bissau","country_codes":[{"country_code":"245","patterns":["XXX XXXX"]}]},{"iso2":"GY","default_name":"Guyana","country_codes":[{"country_code":"592"}]},{"iso2":"HK","default_name":"Hong Kong","country_codes":[{"country_code":"852","patterns":["X XXX XXXX"]}]},{"iso2":"HN","default_name":"Honduras","country_codes":[{"country_code":"504","patterns":["XXXX XXXX"]}]},{"iso2":"HR","default_name":"Croatia","country_codes":[{"country_code":"385","patterns":["XX XXX XXX"]}]},{"iso2":"HT","default_name":"Haiti","country_codes":[{"country_code":"509","patterns":["XXXX XXXX"]}]},{"iso2":"HU","default_name":"Hungary","country_codes":[{"country_code":"36","patterns":["XXX XXX XXX"]}]},{"iso2":"ID","default_name":"Indonesia","country_codes":[{"country_code":"62","patterns":["XXX XXXXXX"]}]},{"iso2":"IE","default_name":"Ireland","country_codes":[{"country_code":"353","patterns":["XX XXX XXXX"]}]},{"iso2":"IL","default_name":"Israel","country_codes":[{"country_code":"972","patterns":["XX XXX XXXX"]}]},{"iso2":"IN","default_name":"India","country_codes":[{"country_code":"91","patterns":["XXXXX XXXXX"]}]},{"iso2":"IO","default_name":"Diego Garcia","country_codes":[{"country_code":"246","patterns":["XXX XXXX"]}]},{"iso2":"IQ","default_name":"Iraq","country_codes":[{"country_code":"964","patterns":["XXX XXX XXXX"]}]},{"iso2":"IR","default_name":"Iran","country_codes":[{"country_code":"98","patterns":["XXX XXX XXXX"]}]},{"iso2":"IS","default_name":"Iceland","country_codes":[{"country_code":"354","patterns":["XXX XXXX"]}]},{"iso2":"IT","default_name":"Italy","country_codes":[{"country_code":"39","patterns":["XXX XXX XXX"]}]},{"iso2":"JM","default_name":"Jamaica","country_codes":[{"country_code":"1876","patterns":["XXX XXXX"]}]},{"iso2":"JO","default_name":"Jordan","country_codes":[{"country_code":"962","patterns":["X XXXX XXXX"]}]},{"iso2":"JP","default_name":"Japan","country_codes":[{"country_code":"81","patterns":["XX XXXX XXXX"]}]},{"iso2":"KE","default_name":"Kenya","country_codes":[{"country_code":"254","patterns":["XXX XXX XXX"]}]},{"iso2":"KG","default_name":"Kyrgyzstan","country_codes":[{"country_code":"996","patterns":["XXX XXXXXX"]}]},{"iso2":"KH","default_name":"Cambodia","country_codes":[{"country_code":"855","patterns":["XX XXX XXX"]}]},{"iso2":"KI","default_name":"Kiribati","country_codes":[{"country_code":"686","patterns":["XXXX XXXX"]}]},{"iso2":"KM","default_name":"Comoros","country_codes":[{"country_code":"269","patterns":["XXX XXXX"]}]},{"iso2":"KN","default_name":"Saint Kitts & Nevis","country_codes":[{"country_code":"1869","patterns":["XXX XXXX"]}]},{"iso2":"KP","default_name":"North Korea","country_codes":[{"country_code":"850"}]},{"iso2":"KR","default_name":"South Korea","country_codes":[{"country_code":"82","patterns":["XX XXXX XXX"]}]},{"iso2":"KW","default_name":"Kuwait","country_codes":[{"country_code":"965","patterns":["XXXX XXXX"]}]},{"iso2":"KY","default_name":"Cayman Islands","country_codes":[{"country_code":"1345","patterns":["XXX XXXX"]}]},{"iso2":"KZ","default_name":"Kazakhstan","country_codes":[{"country_code":"7","prefixes":["6","7"],"patterns":["XXX XXX XX XX"]}]},{"iso2":"LA","default_name":"Laos","country_codes":[{"country_code":"856","patterns":["XX XX XXX XXX"]}]},{"iso2":"LB","default_name":"Lebanon","country_codes":[{"country_code":"961","patterns":["XX XXX XXX"]}]},{"iso2":"LC","default_name":"Saint Lucia","country_codes":[{"country_code":"1758","patterns":["XXX XXXX"]}]},{"iso2":"LI","default_name":"Liechtenstein","country_codes":[{"country_code":"423","patterns":["XXX XXXX"]}]},{"iso2":"LK","default_name":"Sri Lanka","country_codes":[{"country_code":"94","patterns":["XX XXX XXXX"]}]},{"iso2":"LR","default_name":"Liberia","country_codes":[{"country_code":"231","patterns":["XX XXX XXXX"]}]},{"iso2":"LS","default_name":"Lesotho","country_codes":[{"country_code":"266","patterns":["XX XXX XXX"]}]},{"iso2":"LT","default_name":"Lithuania","country_codes":[{"country_code":"370","patterns":["XXX XXXXX"]}]},{"iso2":"LU","default_name":"Luxembourg","country_codes":[{"country_code":"352","patterns":["XXX XXX XXX"]}]},{"iso2":"LV","default_name":"Latvia","country_codes":[{"country_code":"371","patterns":["XXX XXXXX"]}]},{"iso2":"LY","default_name":"Libya","country_codes":[{"country_code":"218","patterns":["XX XXX XXXX"]}]},{"iso2":"MA","default_name":"Morocco","country_codes":[{"country_code":"212","patterns":["XX XXX XXXX"]}]},{"iso2":"MC","default_name":"Monaco","country_codes":[{"country_code":"377","patterns":["XXXX XXXX"]}]},{"iso2":"MD","default_name":"Moldova","country_codes":[{"country_code":"373","patterns":["XX XXX XXX"]}]},{"iso2":"ME","default_name":"Montenegro","country_codes":[{"country_code":"382"}]},{"iso2":"MG","default_name":"Madagascar","country_codes":[{"country_code":"261","patterns":["XX XX XXX XX"]}]},{"iso2":"MH","default_name":"Marshall Islands","country_codes":[{"country_code":"692"}]},{"iso2":"MK","default_name":"North Macedonia","country_codes":[{"country_code":"389","patterns":["XX XXX XXX"]}]},{"iso2":"ML","default_name":"Mali","country_codes":[{"country_code":"223","patterns":["XXXX XXXX"]}]},{"iso2":"MM","default_name":"Myanmar","country_codes":[{"country_code":"95"}]},{"iso2":"MN","default_name":"Mongolia","country_codes":[{"country_code":"976","patterns":["XX XX XXXX"]}]},{"iso2":"MO","default_name":"Macau","country_codes":[{"country_code":"853","patterns":["XXXX XXXX"]}]},{"iso2":"MP","default_name":"Northern Mariana Islands","country_codes":[{"country_code":"1670","patterns":["XXX XXXX"]}]},{"iso2":"MQ","default_name":"Martinique","country_codes":[{"country_code":"596"}]},{"iso2":"MR","default_name":"Mauritania","country_codes":[{"country_code":"222","patterns":["XXXX XXXX"]}]},{"iso2":"MS","default_name":"Montserrat","country_codes":[{"country_code":"1664","patterns":["XXX XXXX"]}]},{"iso2":"MT","default_name":"Malta","country_codes":[{"country_code":"356","patterns":["XX XX XX XX"]}]},{"iso2":"MU","default_name":"Mauritius","country_codes":[{"country_code":"230","patterns":["XXXX XXXX"]}]},{"iso2":"MV","default_name":"Maldives","country_codes":[{"country_code":"960","patterns":["XXX XXXX"]}]},{"iso2":"MW","default_name":"Malawi","country_codes":[{"country_code":"265","patterns":["XX XXX XXXX"]}]},{"iso2":"MX","default_name":"Mexico","country_codes":[{"country_code":"52"}]},{"iso2":"MY","default_name":"Malaysia","country_codes":[{"country_code":"60","patterns":["XX XXXX XXXX"]}]},{"iso2":"MZ","default_name":"Mozambique","country_codes":[{"country_code":"258","patterns":["XX XXX XXXX"]}]},{"iso2":"NA","default_name":"Namibia","country_codes":[{"country_code":"264","patterns":["XX XXX XXXX"]}]},{"iso2":"NC","default_name":"New Caledonia","country_codes":[{"country_code":"687"}]},{"iso2":"NE","default_name":"Niger","country_codes":[{"country_code":"227","patterns":["XX XX XX XX"]}]},{"iso2":"NF","default_name":"Norfolk Island","country_codes":[{"country_code":"672"}]},{"iso2":"NG","default_name":"Nigeria","country_codes":[{"country_code":"234","patterns":["XX XXXX XXXX"]}]},{"iso2":"NI","default_name":"Nicaragua","country_codes":[{"country_code":"505","patterns":["XXXX XXXX"]}]},{"iso2":"NL","default_name":"Netherlands","country_codes":[{"country_code":"31","patterns":["X XX XX XX XX","97 XXXX XXXXX"]}]},{"iso2":"NO","default_name":"Norway","country_codes":[{"country_code":"47","patterns":["XXXX XXXX"]}]},{"iso2":"NP","default_name":"Nepal","country_codes":[{"country_code":"977","patterns":["XX XXXX XXXX"]}]},{"iso2":"NR","default_name":"Nauru","country_codes":[{"country_code":"674"}]},{"iso2":"NU","default_name":"Niue","country_codes":[{"country_code":"683"}]},{"iso2":"NZ","default_name":"New Zealand","country_codes":[{"country_code":"64","patterns":["XXXX XXXX"]}]},{"iso2":"OM","default_name":"Oman","country_codes":[{"country_code":"968","patterns":["XXXX XXXX"]}]},{"iso2":"PA","default_name":"Panama","country_codes":[{"country_code":"507","patterns":["XXXX XXXX"]}]},{"iso2":"PE","default_name":"Peru","country_codes":[{"country_code":"51","patterns":["XXX XXX XXX"]}]},{"iso2":"PF","default_name":"French Polynesia","country_codes":[{"country_code":"689"}]},{"iso2":"PG","default_name":"Papua New Guinea","country_codes":[{"country_code":"675"}]},{"iso2":"PH","default_name":"Philippines","country_codes":[{"country_code":"63","patterns":["XXX XXX XXXX"]}]},{"iso2":"PK","default_name":"Pakistan","country_codes":[{"country_code":"92","patterns":["XXX XXX XXXX"]}]},{"iso2":"PL","default_name":"Poland","country_codes":[{"country_code":"48","patterns":["XXX XXX XXX"]}]},{"iso2":"PM","default_name":"Saint Pierre & Miquelon","country_codes":[{"country_code":"508"}]},{"iso2":"PR","default_name":"Puerto Rico","country_codes":[{"country_code":"1787","patterns":["XXX XXXX"]},{"country_code":"1939","patterns":["XXX XXXX"]}]},{"iso2":"PS","default_name":"Palestine","country_codes":[{"country_code":"970","patterns":["XXX XX XXXX"]}]},{"iso2":"PT","default_name":"Portugal","country_codes":[{"country_code":"351","patterns":["XXX XXX XXX"]}]},{"iso2":"PW","default_name":"Palau","country_codes":[{"country_code":"680"}]},{"iso2":"PY","default_name":"Paraguay","country_codes":[{"country_code":"595","patterns":["XXX XXX XXX"]}]},{"iso2":"QA","default_name":"Qatar","country_codes":[{"country_code":"974","patterns":["XX XXX XXX"]}]},{"iso2":"RE","default_name":"Réunion","country_codes":[{"country_code":"262","patterns":["XXX XXX XXX"]}]},{"iso2":"RO","default_name":"Romania","country_codes":[{"country_code":"40","patterns":["XXX XXX XXX"]}]},{"iso2":"RS","default_name":"Serbia","country_codes":[{"country_code":"381","patterns":["XX XXX XXXX"]}]},{"iso2":"RU","default_name":"Russian Federation","country_codes":[{"country_code":"7","patterns":["XXX XXX XXXX"]}]},{"iso2":"RW","default_name":"Rwanda","country_codes":[{"country_code":"250","patterns":["XXX XXX XXX"]}]},{"iso2":"SA","default_name":"Saudi Arabia","country_codes":[{"country_code":"966","patterns":["XX XXX XXXX"]}]},{"iso2":"SB","default_name":"Solomon Islands","country_codes":[{"country_code":"677"}]},{"iso2":"SC","default_name":"Seychelles","country_codes":[{"country_code":"248","patterns":["X XX XX XX"]}]},{"iso2":"SD","default_name":"Sudan","country_codes":[{"country_code":"249","patterns":["XX XXX XXXX"]}]},{"iso2":"SE","default_name":"Sweden","country_codes":[{"country_code":"46","patterns":["XX XXX XXXX"]}]},{"iso2":"SG","default_name":"Singapore","country_codes":[{"country_code":"65","patterns":["XXXX XXXX"]}]},{"iso2":"SH","default_name":"Saint Helena","country_codes":[{"country_code":"247"},{"country_code":"290","patterns":["XX XXX"]}]},{"iso2":"SI","default_name":"Slovenia","country_codes":[{"country_code":"386","patterns":["XX XXX XXX"]}]},{"iso2":"SK","default_name":"Slovakia","country_codes":[{"country_code":"421","patterns":["XXX XXX XXX"]}]},{"iso2":"SL","default_name":"Sierra Leone","country_codes":[{"country_code":"232","patterns":["XX XXX XXX"]}]},{"iso2":"SM","default_name":"San Marino","country_codes":[{"country_code":"378","patterns":["XXX XXX XXXX"]}]},{"iso2":"SN","default_name":"Senegal","country_codes":[{"country_code":"221","patterns":["XX XXX XXXX"]}]},{"iso2":"SO","default_name":"Somalia","country_codes":[{"country_code":"252","patterns":["XX XXX XXX"]}]},{"iso2":"SR","default_name":"Suriname","country_codes":[{"country_code":"597","patterns":["XXX XXXX"]}]},{"iso2":"SS","default_name":"South Sudan","country_codes":[{"country_code":"211","patterns":["XX XXX XXXX"]}]},{"iso2":"ST","default_name":"São Tomé & Príncipe","country_codes":[{"country_code":"239","patterns":["XX XXXXX"]}]},{"iso2":"SV","default_name":"El Salvador","country_codes":[{"country_code":"503","patterns":["XXXX XXXX"]}]},{"iso2":"SX","default_name":"Sint Maarten","country_codes":[{"country_code":"1721","patterns":["XXX XXXX"]}]},{"iso2":"SY","default_name":"Syria","country_codes":[{"country_code":"963","patterns":["XXX XXX XXX"]}]},{"iso2":"SZ","default_name":"Eswatini","country_codes":[{"country_code":"268","patterns":["XXXX XXXX"]}]},{"iso2":"TC","default_name":"Turks & Caicos Islands","country_codes":[{"country_code":"1649","patterns":["XXX XXXX"]}]},{"iso2":"TD","default_name":"Chad","country_codes":[{"country_code":"235","patterns":["XX XX XX XX"]}]},{"iso2":"TG","default_name":"Togo","country_codes":[{"country_code":"228","patterns":["XX XXX XXX"]}]},{"iso2":"TH","default_name":"Thailand","country_codes":[{"country_code":"66","patterns":["X XXXX XXXX"]}]},{"iso2":"TJ","default_name":"Tajikistan","country_codes":[{"country_code":"992","patterns":["XX XXX XXXX"]}]},{"iso2":"TK","default_name":"Tokelau","country_codes":[{"country_code":"690"}]},{"iso2":"TL","default_name":"Timor-Leste","country_codes":[{"country_code":"670"}]},{"iso2":"TM","default_name":"Turkmenistan","country_codes":[{"country_code":"993","patterns":["XX XXXXXX"]}]},{"iso2":"TN","default_name":"Tunisia","country_codes":[{"country_code":"216","patterns":["XX XXX XXX"]}]},{"iso2":"TO","default_name":"Tonga","country_codes":[{"country_code":"676"}]},{"iso2":"TR","default_name":"Turkey","country_codes":[{"country_code":"90","patterns":["XXX XXX XXXX"]}]},{"iso2":"TT","default_name":"Trinidad & Tobago","country_codes":[{"country_code":"1868","patterns":["XXX XXXX"]}]},{"iso2":"TV","default_name":"Tuvalu","country_codes":[{"country_code":"688"}]},{"iso2":"TW","default_name":"Taiwan","country_codes":[{"country_code":"886","patterns":["XXX XXX XXX"]}]},{"iso2":"TZ","default_name":"Tanzania","country_codes":[{"country_code":"255","patterns":["XX XXX XXXX"]}]},{"iso2":"UA","default_name":"Ukraine","country_codes":[{"country_code":"380","patterns":["XX XXX XX XX"]}]},{"iso2":"UG","default_name":"Uganda","country_codes":[{"country_code":"256","patterns":["XX XXX XXXX"]}]},{"iso2":"US","default_name":"USA","country_codes":[{"country_code":"1","patterns":["XXX XXX XXXX"]}]},{"iso2":"UY","default_name":"Uruguay","country_codes":[{"country_code":"598","patterns":["X XXX XXXX"]}]},{"iso2":"UZ","default_name":"Uzbekistan","country_codes":[{"country_code":"998","patterns":["XX XXX XX XX"]}]},{"iso2":"VC","default_name":"Saint Vincent & the Grenadines","country_codes":[{"country_code":"1784","patterns":["XXX XXXX"]}]},{"iso2":"VE","default_name":"Venezuela","country_codes":[{"country_code":"58","patterns":["XXX XXX XXXX"]}]},{"iso2":"VG","default_name":"British Virgin Islands","country_codes":[{"country_code":"1284","patterns":["XXX XXXX"]}]},{"iso2":"VI","default_name":"US Virgin Islands","country_codes":[{"country_code":"1340","patterns":["XXX XXXX"]}]},{"iso2":"VN","default_name":"Vietnam","country_codes":[{"country_code":"84"}]},{"iso2":"VU","default_name":"Vanuatu","country_codes":[{"country_code":"678"}]},{"iso2":"WF","default_name":"Wallis & Futuna","country_codes":[{"country_code":"681"}]},{"iso2":"WS","default_name":"Samoa","country_codes":[{"country_code":"685"}]},{"iso2":"XK","default_name":"Kosovo","country_codes":[{"country_code":"383","patterns":["XXXX XXXX"]}]},{"iso2":"YE","default_name":"Yemen","country_codes":[{"country_code":"967","patterns":["XXX XXX XXX"]}]},{"iso2":"ZA","default_name":"South Africa","country_codes":[{"country_code":"27","patterns":["XX XXX XXXX"]}]},{"iso2":"ZM","default_name":"Zambia","country_codes":[{"country_code":"260","patterns":["XX XXX XXXX"]}]},{"iso2":"ZW","default_name":"Zimbabwe","country_codes":[{"country_code":"263","patterns":["XX XXX XXXX"]}]}] \ No newline at end of file diff --git a/src/scss/partials/_document.scss b/src/scss/partials/_document.scss index 217ef7ae..56fe535b 100644 --- a/src/scss/partials/_document.scss +++ b/src/scss/partials/_document.scss @@ -109,7 +109,6 @@ &-name { white-space: nowrap; font-weight: 500; - line-height: 1.3; font-size: 1rem; } @@ -118,7 +117,12 @@ color: var(--secondary-text-color); font-size: .875rem; //padding-right: 32px; - line-height: 1.3; + text-overflow: ellipsis; + overflow: hidden; + } + + &-name, &-size { + line-height: var(--line-height); } .preloader-container { diff --git a/src/vendor/emoji/index.ts b/src/vendor/emoji/index.ts index c230beb0..122cc61c 100644 --- a/src/vendor/emoji/index.ts +++ b/src/vendor/emoji/index.ts @@ -40,6 +40,10 @@ export function getEmojiToneIndex(input: string) { return match ? 5 - (57343 - match[0].charCodeAt(0)) : 0; } +export function getCountryEmoji(iso2: string) { + return String.fromCharCode(55356, 56741 + iso2.charCodeAt(0), 55356, 56741 + iso2.charCodeAt(1)); +} + export function emojiFromCodePoints(codePoints: string) { return codePoints.split('-').reduce((prev, curr) => prev + String.fromCodePoint(parseInt(curr, 16)), ''); } \ No newline at end of file