{"version":3,"sources":["../source/format_.js"],"names":["DEFAULT_OPTIONS","formatExtension","formattedNumber","extension","metadata","ext","formatNumber","input","format","options","Metadata","country","hasCountry","Error","countryCallingCode","chooseCountryByCountryCallingCode","phone","nationalNumber","v2","number","formatNationalNumber","addExtension","fromCountry","IDDPrefix","undefined","humanReadable","formattedForSameCountryCallingCode","formatIDDSameCountryCallingCodeNumber","FIRST_GROUP_PATTERN","formatNationalNumberUsingFormat","useInternationalSeparator","useNationalPrefixFormattingRule","replace","RegExp","pattern","internationalFormat","nationalPrefixFormattingRule","applyInternationalSeparatorStyle","formatAs","chooseFormatForNumber","formats","nationalPrefixIsOptionalWhenFormattingInNationalFormat","nationalPrefix","availableFormats","nationalNnumber","leadingDigitsPatterns","length","lastLeadingDigitsPattern","search","local","VALID_PUNCTUATION","trim","toCountryCallingCode","toCountryMetadata","fromCountryMetadata"],"mappings":";;;;;;;;;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,eAAe,GAAG;AACvBC,EAAAA,eAAe,EAAE,yBAACC,eAAD,EAAkBC,SAAlB,EAA6BC,QAA7B;AAAA,qBAA6CF,eAA7C,SAA+DE,QAAQ,CAACC,GAAT,EAA/D,SAAgFF,SAAhF;AAAA,GADM,CAIxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAhBwB,CAAxB;;AAiBe,SAASG,YAAT,CAAsBC,KAAtB,EAA6BC,MAA7B,EAAqCC,OAArC,EAA8CL,QAA9C,EAAwD;AACtE;AACA,MAAIK,OAAJ,EAAa;AACZA,IAAAA,OAAO,qBAAQT,eAAR,EAA4BS,OAA5B,CAAP;AACA,GAFD,MAEO;AACNA,IAAAA,OAAO,GAAGT,eAAV;AACA;;AAEDI,EAAAA,QAAQ,GAAG,IAAIM,oBAAJ,CAAaN,QAAb,CAAX;;AAEA,MAAIG,KAAK,CAACI,OAAN,IAAiBJ,KAAK,CAACI,OAAN,KAAkB,KAAvC,E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GAA6BhC,oBAAoB,CAACD,MAAD,EAAS,UAAT,EAAqBkC,iBAArB,EAAwC5C,OAAxC,CAAxD;AACA,KALqE,CAMtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,WAAOW,oBAAoB,CAACD,MAAD,EAAS,UAAT,EAAqBkC,iBAArB,EAAwC5C,OAAxC,CAA3B;AACA;AACD","sourcesContent":["// This is a port of Google Android `libphonenumber`'s\r\n// `phonenumberutil.js` of December 31th, 2018.\r\n//\r\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\r\n\r\nimport { VALID_PUNCTUATION } from './constants'\r\nimport { matchesEntirely } from './util'\r\nimport Metadata from './metadata'\r\nimport { getIDDPrefix } from './IDD'\r\nimport { formatRFC3966 } from './RFC3966'\r\n\r\nconst DEFAULT_OPTIONS = {\r\n\tformatExtension: (formattedNumber, extension, metadata) => `${formattedNumber}${metadata.ext()}${extension}`\r\n}\r\n\r\n// Formats a phone number\r\n//\r\n// Example use cases:\r\n//\r\n// ```js\r\n// formatNumber('8005553535', 'RU', 'INTERNATIONAL')\r\n// formatNumber('8005553535', 'RU', 'INTERNATIONAL', metadata)\r\n// formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL')\r\n// formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', metadata)\r\n// formatNumber('+78005553535', 'NATIONAL')\r\n// formatNumber('+78005553535', 'NATIONAL', metadata)\r\n// ```\r\n//\r\nexport default function formatNumber(input, format, options, metadata) {\r\n\t// Apply default options.\r\n\tif (options) {\r\n\t\toptions = { ...DEFAULT_OPTIONS, ...options }\r\n\t} else {\r\n\t\toptions = DEFAULT_OPTIONS\r\n\t}\r\n\r\n\tmetadata = new Metadata(metadata)\r\n\r\n\tif (input.country && input.country !== '001') {\r\n\t\t// Validate `input.country`.\r\n\t\tif (!metadata.hasCountry(input.country)) {\r\n\t\t\tthrow new Error(`Unknown country: ${input.country}`)\r\n\t\t}\r\n\t\tmetadata.country(input.country)\r\n\t}\r\n\telse if (input.countryCallingCode) {\r\n\t\tmetadata.chooseCountryByCountryCallingCode(input.countryCallingCode)\r\n\t}\r\n\telse return input.phone || ''\r\n\r\n\tconst countryCallingCode = metadata.countryCallingCode()\r\n\r\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\r\n\r\n\t// This variable should have been declared inside `case`s\r\n\t// but Babel has a bug and it says \"duplicate variable declaration\".\r\n\tlet number\r\n\r\n\tswitch (format) {\r\n\t\tcase 'NATIONAL':\r\n\t\t\t// Legacy argument support.\r\n\t\t\t// (`{ country: ..., phone: '' }`)\r\n\t\t\tif (!nationalNumber) {\r\n\t\t\t\treturn ''\r\n\t\t\t}\r\n\t\t\tnumber = formatNationalNumber(nationalNumber, 'NATIONAL', metadata, options)\r\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\r\n\r\n\t\tcase 'INTERNATIONAL':\r\n\t\t\t// Legacy argument support.\r\n\t\t\t// (`{ country: ..., phone: '' }`)\r\n\t\t\tif (!nationalNumber) {\r\n\t\t\t\treturn `+${countryCallingCode}`\r\n\t\t\t}\r\n\t\t\tnumber = formatNationalNumber(nationalNumber, 'INTERNATIONAL', metadata, options)\r\n\t\t\tnumber = `+${countryCallingCode} ${number}`\r\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\r\n\r\n\t\tcase 'E.164':\r\n\t\t\t// `E.164` doesn't define \"phone number extensions\".\r\n\t\t\treturn `+${countryCallingCode}${nationalNumber}`\r\n\r\n\t\tcase 'RFC3966':\r\n\t\t\treturn formatRFC3966({\r\n\t\t\t\tnumber: `+${countryCallingCode}${nationalNumber}`,\r\n\t\t\t\text: input.ext\r\n\t\t\t})\r\n\r\n\t\tcase 'IDD':\r\n\t\t\tif (!options.fromCountry) {\r\n\t\t\t\treturn\r\n\t\t\t\t// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\r\n\t\t\t}\r\n\t\t\tconst IDDPrefix = getIDDPrefix(options.fromCountry, undefined, metadata.metadata)\r\n\t\t\tif (!IDDPrefix) {\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tif (options.humanReadable) {\r\n\t\t\t\tconst formattedForSameCountryCallingCode = countryCallingCode && formatIDDSameCountryCallingCodeNumber(\r\n\t\t\t\t\tnationalNumber,\r\n\t\t\t\t\tmetadata.countryCallingCode(),\r\n\t\t\t\t\toptions.fromCountry,\r\n\t\t\t\t\tmetadata,\r\n\t\t\t\t\toptions\r\n\t\t\t\t)\r\n\t\t\t\tif (formattedForSameCountryCallingCode) {\r\n\t\t\t\t\tnumber = formattedForSameCountryCallingCode\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnumber = `${IDDPrefix} ${countryCallingCode} ${formatNationalNumber(nationalNumber, 'INTERNATIONAL', metadata, options)}`\r\n\t\t\t\t}\r\n\t\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\r\n\t\t\t}\r\n\t\t\treturn `${IDDPrefix}${countryCallingCode}${nationalNumber}`\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new Error(`Unknown \"format\" argument passed to \"formatNumber()\": \"${format}\"`)\r\n\t}\r\n}\r\n\r\n// This was originally set to $1 but there are some countries for which the\r\n// first group is not used in the national pattern (e.g. Argentina) so the $1\r\n// group does not match correctly. Therefore, we use \\d, so that the first\r\n// group actually used in the pattern will be matched.\r\nexport const FIRST_GROUP_PATTERN = /(\\$\\d)/\r\n\r\nexport function formatNationalNumberUsingFormat(\r\n\tnumber,\r\n\tformat,\r\n\tuseInternationalSeparator,\r\n\tuseNationalPrefixFormattingRule,\r\n\tmetadata\r\n) {\r\n\tconst formattedNumber = number.replace(\r\n\t\tnew RegExp(format.pattern()),\r\n\t\tuseInternationalSeparator ?\r\n\t\t\tformat.internationalFormat() :\r\n\t\t\tuseNationalPrefixFormattingRule && format.nationalPrefixFormattingRule() ?\r\n\t\t\t\tformat.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) :\r\n\t\t\t\tformat.format()\r\n\t)\r\n\tif (useInternationalSeparator) {\r\n\t\treturn applyInternationalSeparatorStyle(formattedNumber)\r\n\t}\r\n\treturn formattedNumber\r\n}\r\n\r\nfunction formatNationalNumber(number, formatAs, metadata, options) {\r\n\tconst format = chooseFormatForNumber(metadata.formats(), number)\r\n\tif (!format) {\r\n\t\treturn number\r\n\t}\r\n\treturn formatNationalNumberUsingFormat(\r\n\t\tnumber,\r\n\t\tformat,\r\n\t\tformatAs === 'INTERNATIONAL',\r\n\t\tformat.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options.nationalPrefix === false ? false : true,\r\n\t\tmetadata\r\n\t)\r\n}\r\n\r\nfunction chooseFormatForNumber(availableFormats, nationalNnumber) {\r\n\tfor (const format of availableFormats) {\r\n\t\t// Validate leading digits\r\n\t\tif (format.leadingDigitsPatterns().length > 0) {\r\n\t\t\t// The last leading_digits_pattern is used here, as it is the most detailed\r\n\t\t\tconst lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]\r\n\t\t\t// If leading digits don't match then move on to the next phone number format\r\n\t\t\tif (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {\r\n\t\t\t\tcontinue\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check that the national number matches the phone number format regular expression\r\n\t\tif (matchesEntirely(nationalNnumber, format.pattern())) {\r\n\t\t\treturn format\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Removes brackets and replaces dashes with spaces.\r\n//\r\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\r\n//\r\n// For some reason Google's metadata contains ``s with brackets and dashes.\r\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\r\n//\r\n// For example, Google's `` for USA is `+1 213-373-4253`.\r\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\r\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\r\n//\r\n// \"The country calling code for all countries participating in the NANP is 1.\r\n// In international format, an NANP number should be listed as +1 301 555 01 00,\r\n// where 301 is an area code (Maryland).\"\r\n//\r\n// I personally prefer the international format without any punctuation.\r\n// For example, brackets are remnants of the old age, meaning that the\r\n// phone number part in brackets (so called \"area code\") can be omitted\r\n// if dialing within the same \"area\".\r\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\r\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\r\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\r\n// He has a couple of seconds to memorize that number until it passes by.\r\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\r\n// but with hyphens instead of spaces the grouping is more explicit.\r\n// I personally think that hyphens introduce visual clutter,\r\n// so I prefer replacing them with spaces in international numbers.\r\n// In the modern age all output is done on displays where spaces are clearly distinguishable\r\n// so hyphens can be safely replaced with spaces without losing any legibility.\r\n//\r\nexport function applyInternationalSeparatorStyle(local) {\r\n\treturn local.replace(new RegExp(`[${VALID_PUNCTUATION}]+`, 'g'), ' ').trim()\r\n}\r\n\r\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\r\n\treturn ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber\r\n}\r\n\r\nfunction formatIDDSameCountryCallingCodeNumber(\r\n\tnumber,\r\n\ttoCountryCallingCode,\r\n\tfromCountry,\r\n\ttoCountryMetadata,\r\n\toptions\r\n) {\r\n\tconst fromCountryMetadata = new Metadata(toCountryMetadata.metadata)\r\n\tfromCountryMetadata.country(fromCountry)\r\n\t// If calling within the same country calling code.\r\n\tif (toCountryCallingCode === fromCountryMetadata.countryCallingCode()) {\r\n\t\t// For NANPA regions, return the national format for these regions\r\n\t\t// but prefix it with the country calling code.\r\n\t\tif (toCountryCallingCode === '1') {\r\n\t\t\treturn toCountryCallingCode + ' ' + formatNationalNumber(number, 'NATIONAL', toCountryMetadata, options)\r\n\t\t}\r\n\t\t// If regions share a country calling code, the country calling code need\r\n\t\t// not be dialled. This also applies when dialling within a region, so this\r\n\t\t// if clause covers both these cases. Technically this is the case for\r\n\t\t// dialling from La Reunion to other overseas departments of France (French\r\n\t\t// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\r\n\t\t// this edge case for now and for those cases return the version including\r\n\t\t// country calling code. Details here:\r\n\t\t// http://www.petitfute.com/voyage/225-info-pratiques-reunion\r\n\t\t//\r\n\t\treturn formatNationalNumber(number, 'NATIONAL', toCountryMetadata, options)\r\n\t}\r\n}"],"file":"format_.js"}