{"version":3,"sources":["webpack://libphonenumber/webpack/universalModuleDefinition","webpack://libphonenumber/webpack/bootstrap","webpack://libphonenumber/./es6/metadata.js","webpack://libphonenumber/./es6/constants.js","webpack://libphonenumber/./es6/parse_.js","webpack://libphonenumber/./es6/parsePhoneNumber.js","webpack://libphonenumber/./es6/getNumberType_.js","webpack://libphonenumber/./es6/util.js","webpack://libphonenumber/./es6/findNumbers/util.js","webpack://libphonenumber/./es6/validate_.js","webpack://libphonenumber/./es6/PhoneNumber.js","webpack://libphonenumber/./es6/extension.js","webpack://libphonenumber/./es6/isViablePhoneNumber.js","webpack://libphonenumber/./es6/PhoneNumberMatcher.js","webpack://libphonenumber/./es6/getNumberType.js","webpack://libphonenumber/./es6/format_.js","webpack://libphonenumber/./es6/RFC3966.js","webpack://libphonenumber/./es6/isPossibleNumber_.js","webpack://libphonenumber/./es6/ParseError.js","webpack://libphonenumber/./es6/parseDigits.js","webpack://libphonenumber/./es6/parseIncompletePhoneNumber.js","webpack://libphonenumber/./es6/AsYouType.js","webpack://libphonenumber/./es6/findNumbers/utf-8.js","webpack://libphonenumber/./es6/findNumbers/isValidCandidate.js","webpack://libphonenumber/./es6/findNumbers/isValidPreCandidate.js","webpack://libphonenumber/./es6/findNumbers/parsePreCandidate.js","webpack://libphonenumber/./es6/findPhoneNumbers_.js","webpack://libphonenumber/./es6/parsePhoneNumber_.js","webpack://libphonenumber/./es6/isValidNumberForRegion_.js","webpack://libphonenumber/./es6/IDD.js","webpack://libphonenumber/./es6/getCountryCallingCode.js","webpack://libphonenumber/./es6/formatIncompletePhoneNumber.js","webpack://libphonenumber/./es6/searchNumbers.js","webpack://libphonenumber/./es6/findNumbers/Leniency.js","webpack://libphonenumber/./es6/findNumbers_.js","webpack://libphonenumber/./es6/findNumbers.js","webpack://libphonenumber/./es6/isValidNumberForRegion.js","webpack://libphonenumber/./es6/isPossibleNumber.js","webpack://libphonenumber/./es6/getExampleNumber.js","webpack://libphonenumber/./es6/parsePhoneNumberFromString_.js","webpack://libphonenumber/./es6/parsePhoneNumberFromString.js","webpack://libphonenumber/./es6/findPhoneNumbers.js","webpack://libphonenumber/./es6/validate.js","webpack://libphonenumber/./es6/format.js","webpack://libphonenumber/./es6/parse.js","webpack://libphonenumber/./node_modules/semver-compare/index.js","webpack://libphonenumber/./index.es6.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","validateMetadata","getExtPrefix","country","metadata","Metadata","hasCountry","ext","DEFAULT_EXT_PREFIX","getCountryCallingCode","countryCallingCode","Error","isSupportedCountry","undefined","countries","_semverCompare","_typeof","Symbol","_typeof2","iterator","obj","constructor","_createClass","defineProperties","target","props","length","descriptor","writable","key","Constructor","protoProps","staticProps","_classCallCheck","instance","TypeError","V3","this","v1","version","v2","_semverCompare2","default","v3","_country","country_metadata","countryCallingCodes","_this","formats","_getFormats","getDefaultCountryMetadataForRegion","map","_","Format","_getNationalPrefixFormattingRule","nationalPrefix","_getNationalPrefixIsOptionalWhenFormatting","types","_type","hasTypes","getType","Type","country_phone_code_to_countries","country_calling_codes","country_calling_code","format","_format","nationalPrefixFormattingRule","nationalPrefixIsOptionalWhenFormatting","usesNationalPrefix","test","replace","type","possibleLengths","is_object","keys","join","type_of","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","MAX_LENGTH_COUNTRY_CODE","VALID_DIGITS","WHITESPACE","VALID_PUNCTUATION","PLUS_CHARS","text","options","arguments","_metadata2","defaultCountry","_ParseError2","_parse_input","indexOf","_RFC","parseRFC3966","number","extract_formatted_phone_number","_isViablePhoneNumber2","with_extension_stripped","_extension","extractExtension","parse_input","formatted_phone_number","_parse_phone_number","default_country","_extractCountryCallin","extractCountryCallingCode","chooseCountryByCountryCallingCode","_getCountryCallingCode2","_parse_national_numbe","national_number","_parseIncompletePhoneNumber2","carrier_code","_strip_national_prefi","strip_national_prefix_and_carrier_code","potential_national_number","carrierCode","_getNumberType_","checkNumberLengthForType","_util","matchesEntirely","nationalNumberPattern","parse_national_number","exactCountry","find_country_code","parse_phone_number","nationalNumber","selectedCountry","_constants","phoneNumber","_PhoneNumber2","valid","extended","result","phone","possible","_isPossibleNumber_","is_possible_number","_IDD","MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","RegExp","AFTER_PHONE_NUMBER_END_PATTERN","starts_at","search","slice","nationalPrefixForParsing","national_prefix_pattern","national_prefix_matcher","exec","national_significant_number","captured_groups_count","nationalPrefixTransformRule","national_phone_number","possible_countries","_iterator","_isArray","Array","isArray","_i","_ref","next","done","leadingDigits","_getNumberType_2","_find_country_code","numberWithoutIDD","stripIDDPrefix","_normalizeArguments","normalizeArguments","_parsePhoneNumber_2","_parsePhoneNumber_","_extends","assign","source","_slicedToArray","arr","_arr","_n","_d","_e","_s","push","err","sliceIterator","args","_Array$prototype$slic","_Array$prototype$slic2","arg_1","arg_2","arg_3","arg_4","isObject","input","is_of_type","pattern","NON_FIXED_LINE_PHONE_TYPES","type_info","possible_lengths","mobile_type","mergeArrays","actual_length","minimum_length","_metadata","regular_expression","a","b","merged","element","sort","limit","lower","upper","trimAfterFirstMatch","regexp","string","index","startsWith","substring","endsWith","PhoneNumber","isCountryCode","_metadata3","_isPossibleNumber_2","_validate_2","_format_2","start","EXTN_PATTERN","number_without_extension","matches","match","RFC3966_EXTN_PREFIX","CAPTURING_EXTN_DIGITS","create_extension_pattern","purpose","single_extension_characters","EXTN_PATTERNS_FOR_PARSING","EXTN_PATTERNS_FOR_MATCHING","VALID_PHONE_NUMBER_PATTERN","MIN_LENGTH_PHONE_NUMBER_PATTERN","VALID_PHONE_NUMBER","_utf","_isValidCandidate","INNER_MATCHES","pZ","PZ","leadLimit","punctuationLimit","digitBlockLimit","blockLimit","punctuation","digitSequence","pNd","PATTERN","LEAD_CLASS","UNWANTED_END_CHAR_PATTERN","_pN","_pL","MAX_SAFE_INTEGER","Number","Math","pow","PhoneNumberMatcher","state","searchIndex","leniency","maxTries","_Leniency2","candidate","offset","_parsePreCandidate2","_isValidPreCandidate2","parseAndVerify","extractInnerMatch","startsAt","endsAt","isFirstMatch","possibleInnerMatch","_group","_match","group","_isValidCandidate2","_parse_2","lastMatch","find","hasNext","defaultOptions","addExtension","format_national_number","formatExtension","formatRFC3966","fromCountry","IDDPrefix","getIDDPrefix","humanReadable","formattedForSameCountryCallingCode","formatIDDSameCountryCallingCodeNumber","format_national_number_using_format","choose_format_for_number","changeInternationalFormatStyle","formattedNumber","extension","FIRST_GROUP_PATTERN","useInternationalFormat","includeNationalPrefixForNationalFormat","internationalFormat","format_as","available_formats","leadingDigitsPatterns","last_leading_digits_pattern","local","trim","toCountryCallingCode","toCountryMetadata","fromCountryMetadata","split","part","_part$split","_part$split2","_ref2","_isViablePhoneNumber","is_international","ParseError","code","message","stack","create","parseDigit","character","digit","DIGITS","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9","٠","١","٢","٣","٤","٥","٦","٧","٨","٩","۰","۱","۲","۳","۴","۵","۶","۷","۸","۹","parsePhoneNumberCharacter","_parseDigits","strip_dangling_braces","cut_stripping_dangling_braces","close_dangling_braces","template","cut_before","retained_template","opening_braces","count_occurences","closing_braces","dangling_braces","repeat","_parse_","_format_","LONGEST_DUMMY_PHONE_NUMBER","DIGIT_PLACEHOLDER","DIGIT_PLACEHOLDER_MATCHER","CREATE_CHARACTER_CLASS_PATTERN","CREATE_STANDALONE_DIGIT_PATTERN","ELIGIBLE_FORMAT_PATTERN","VALID_INCOMPLETE_PHONE_NUMBER","VALID_INCOMPLETE_PHONE_NUMBER_PATTERN","AsYouType","reset","extracted_number","processInput","currentOutput","parsedInput","resetCountriness","isInternational","determineTheCountry","initialize_phone_number_formats_for_this_country_calling_code","resetFormat","previous_national_prefix","extractNationalPrefix","matching_formats","format_as_non_formatted_number","match_formats_by_leading_digits","formatted_national_phone_number","formatNationalNumber","formatFullNumber","next_digits","national_number_formatted_with_previous_format","chosenFormat","formatNextNationalNumberDigits","formatted_number","attempt_to_format_complete_phone_number","chooseAnotherFormat","reformatNationalNumber","resetCountry","partially_populated_template","last_match_position","filter","leading_digits","index_of_leading_digits_pattern","had_enough_leading_digits","shouldFormat","leading_digits_patterns_count","leading_digits_pattern_index","min","leading_digits_pattern","isFormatApplicable","createFormattingTemplate","full_number","formattedNationalNumber","isPossibleNumber","_iterator2","_isArray2","_i2","nationalPrefixIsMandatoryWhenFormatting","getTemplateForNumberFormatPattern","number_pattern","dummy_phone_number_matching_format_pattern","number_format","getFormatFormat","strict_pattern","national_number_dummy_digits","digits","_iterator3","_isArray3","_i3","_ref3","pop","cleared_string","_iterator4","_isArray4","_i4","_ref4","cut_before_index","symbol","count","_iterator5","_isArray5","_i5","_ref5","times","isLatinLetter","letter","pL_regexp","pMn_regexp","latinLetterRegexp","isInvalidPunctuationSymbol","pSc_regexp","_pZ","MATCHING_BRACKETS_ENTIRE","PUB_PAGES","LEAD_CLASS_LEADING","previousChar","lastCharIndex","nextChar","BRACKET_PAIR_LIMIT","SLASH_SEPARATED_DATES","TIME_STAMPS","followingText","TIME_STAMPS_SUFFIX_LEADING","SECOND_NUMBER_START_PATTERN","PhoneNumberSearch","phones","searchPhoneNumbers","_defineProperty","WHITESPACE_IN_THE_BEGINNING_PATTERN","PUNCTUATION_IN_THE_END_PATTERN","parseCandidate","last_match","_validate_","countryMetadata","SINGLE_IDD_PREFIX","defaultIDDPrefix","IDDPrefixPattern","matchedGroups","CAPTURING_DIGIT_PATTERN","_AsYouType2","_AsYouType","_parsePhoneNumber","matcher","_PhoneNumberMatcher2","_PhoneNumberMatcher","containsMoreThanOneSlashInNationalNumber","containsOnlyValidXChars","charAtIndex","charAt","charAtNextIndex","util","isNumberMatch","MatchType","NSN_MATCH","_parseDigits2","isNationalPrefixPresentIfRequired","getCountryCodeSource","phoneNumberRegion","getRegionCodeForCountryCode","getCountryCode","getMetadataForRegion","getNationalSignificantNumber","formatRule","chooseFormattingPatternForNumber","numberFormats","getNationalPrefixFormattingRule","getNationalPrefixOptionalWhenFormatting","PhoneNumberUtil","formattingRuleHasFirstGroupOnly","rawInputCopy","normalizeDigitsOnly","getRawInput","maybeStripNationalPrefixAndCarrierCode","firstSlashInBodyIndex","secondSlashInBodyIndex","CountryCodeSource","FROM_NUMBER_WITH_PLUS_SIGN","FROM_NUMBER_WITHOUT_PLUS_SIGN","String","checkNumberGroupingIsValid","checkGroups","normalizedCandidate","normalizeDigits","formattedNumberGroups","getNationalNumberGroups","alternateFormats","MetadataManager","getAlternateFormatsForCountry","formattingPattern","nationalSignificantNumber","formatNsnUsingPattern","rfc3966Format","formatNumber","endIndex","startIndex","allNumberGroupsAreExactlyPresent","candidateGroups","NON_DIGITS_PATTERN","candidateNumberGroupIndex","hasExtension","contains","formattedNumberGroupIndex","allNumberGroupsRemainGrouped","fromIndex","FROM_DEFAULT_COUNTRY","countryCode","region","getNddPrefixForRegion","Character","isDigit","getExtension","POSSIBLE","VALID","toString","STRICT_GROUPING","candidateString","EXACT_GROUPING","results","_findNumbers_2","_findNumbers_","_isValidNumberForRegion_2","_getNumberType","examples","_PhoneNumber","error","_parsePhoneNumberFromString_2","_parsePhoneNumberFromString_","_findPhoneNumbers_2","_normalizeArguments2","_findPhoneNumbers_","arg_5","pa","pb","na","nb","isNaN","parsePhoneNumber","parameters","_metadataMin2","_parsePhoneNumber2","apply","parsePhoneNumberFromString","_parsePhoneNumberFromString2","parseNumber","_parse2","parse","_format2","getNumberType","_getNumberType2","getExampleNumber","_getExampleNumber2","_isPossibleNumber2","isValidNumber","_validate2","isValidNumberForRegion","_isValidNumberForRegion2","findPhoneNumbers","_findPhoneNumbers2","_findPhoneNumbers","findNumbers","_findNumbers2","searchNumbers","_searchNumbers2","formatIncompletePhoneNumber","_formatIncompletePhoneNumber2","_parse","_validate","_getCountryCallingCode","getPhoneCode","getPhoneCodeCustom"],"mappings":"CAAA,SAAAA,EAAAC,GACA,i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ogB,EAAAhjB,SAqBM,SAAS4N,EAAmBjL,EAAMC,GAExCqa,EAAAjd,QAAyB/D,KAAK0D,KAAMgD,EAAMC,EAA1CogB,EAAAhjB,SAMM,SAASgW,EAAUvY,GAEzBof,EAAA7c,QAAgB/D,KAAK0D,KAAMlC,EAA3BulB,EAAAhjB,SA6DM,SAASjC,EAAsBN,GAErC,OAAO,EAAAyG,EAAAlE,SAA4BvC,EAA5BulB,EAAAhjB,SA1FR8b,EAAkB3e,UAAYX,OAAOoV,OAAO2Q,EAAAzG,kBAAwB3e,cACpE2e,EAAkB3e,UAAUwB,YAAcmd,EAqB1ClO,EAAmBzQ,UAAYX,OAAOoV,OAAOqL,EAAAjd,QAAyB7C,cACtEyQ,EAAmBzQ,UAAUwB,YAAciP,EAO3CoI,EAAU7Y,UAAYX,OAAOoV,OAAOiL,EAAA7c,QAAgB7C,cACpD6Y,EAAU7Y,UAAUwB,YAAcqX","file":"libphonenumber-js.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"libphonenumber\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"libphonenumber\"] = factory();\n\telse\n\t\troot[\"libphonenumber\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 45);\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport compare from 'semver-compare';\n\n// Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\nvar V2 = '1.0.18';\n\n// Added \"idd_prefix\" and \"default_idd_prefix\".\nvar V3 = '1.2.0';\n\nvar DEFAULT_EXT_PREFIX = ' ext. ';\n\nvar Metadata = function () {\n\tfunction Metadata(metadata) {\n\t\t_classCallCheck(this, Metadata);\n\n\t\tvalidateMetadata(metadata);\n\n\t\tthis.metadata = metadata;\n\n\t\tthis.v1 = !metadata.version;\n\t\tthis.v2 = metadata.version !== undefined && compare(metadata.version, V3) === -1;\n\t\tthis.v3 = metadata.version !== undefined; // && compare(metadata.version, V4) === -1\n\t}\n\n\t_createClass(Metadata, [{\n\t\tkey: 'hasCountry',\n\t\tvalue: function hasCountry(country) {\n\t\t\treturn this.metadata.countries[country] !== undefined;\n\t\t}\n\t}, {\n\t\tkey: 'country',\n\t\tvalue: function country(_country) {\n\t\t\tif (!_country) {\n\t\t\t\tthis._country = undefined;\n\t\t\t\tthis.country_metadata = undefined;\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (!this.hasCountry(_country)) {\n\t\t\t\tthrow new Error('Unknown country: ' + _country);\n\t\t\t}\n\n\t\t\tthis._country = _country;\n\t\t\tthis.country_metadata = this.metadata.countries[_country];\n\t\t\treturn this;\n\t\t}\n\t}, {\n\t\tkey: 'getDefaultCountryMetadataForRegion',\n\t\tvalue: function getDefaultCountryMetadataForRegion() {\n\t\t\treturn this.metadata.countries[this.countryCallingCodes()[this.countryCallingCode()][0]];\n\t\t}\n\t}, {\n\t\tkey: 'countryCallingCode',\n\t\tvalue: function countryCallingCode() {\n\t\t\treturn this.country_metadata[0];\n\t\t}\n\t}, {\n\t\tkey: 'IDDPrefix',\n\t\tvalue: function IDDPrefix() {\n\t\t\tif (this.v1 || this.v2) return;\n\t\t\treturn this.country_metadata[1];\n\t\t}\n\t}, {\n\t\tkey: 'defaultIDDPrefix',\n\t\tvalue: function defaultIDDPrefix() {\n\t\t\tif (this.v1 || this.v2) return;\n\t\t\treturn this.country_metadata[12];\n\t\t}\n\t}, {\n\t\tkey: 'nationalNumberPattern',\n\t\tvalue: function nationalNumberPattern() {\n\t\t\tif (this.v1 || this.v2) return this.country_metadata[1];\n\t\t\treturn this.country_metadata[2];\n\t\t}\n\t}, {\n\t\tkey: 'possibleLengths',\n\t\tvalue: function possibleLengths() {\n\t\t\tif (this.v1) return;\n\t\t\treturn this.country_metadata[this.v2 ? 2 : 3];\n\t\t}\n\t}, {\n\t\tkey: '_getFormats',\n\t\tvalue: function _getFormats(country_metadata) {\n\t\t\treturn country_metadata[this.v1 ? 2 : this.v2 ? 3 : 4];\n\t\t}\n\n\t\t// For countries of the same region (e.g. NANPA)\n\t\t// formats are all stored in the \"main\" country for that region.\n\t\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n\t}, {\n\t\tkey: 'formats',\n\t\tvalue: function formats() {\n\t\t\tvar _this = this;\n\n\t\t\tvar formats = this._getFormats(this.country_metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];\n\t\t\treturn formats.map(function (_) {\n\t\t\t\treturn new Format(_, _this);\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefix',\n\t\tvalue: function nationalPrefix() {\n\t\t\treturn this.country_metadata[this.v1 ? 3 : this.v2 ? 4 : 5];\n\t\t}\n\t}, {\n\t\tkey: '_getNationalPrefixFormattingRule',\n\t\tvalue: function _getNationalPrefixFormattingRule(country_metadata) {\n\t\t\treturn country_metadata[this.v1 ? 4 : this.v2 ? 5 : 6];\n\t\t}\n\n\t\t// For countries of the same region (e.g. NANPA)\n\t\t// national prefix formatting rule is stored in the \"main\" country for that region.\n\t\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n\t}, {\n\t\tkey: 'nationalPrefixFormattingRule',\n\t\tvalue: function nationalPrefixFormattingRule() {\n\t\t\treturn this._getNationalPrefixFormattingRule(this.country_metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefixForParsing',\n\t\tvalue: function nationalPrefixForParsing() {\n\t\t\t// If `national_prefix_for_parsing` is not set explicitly,\n\t\t\t// then infer it from `national_prefix` (if any)\n\t\t\treturn this.country_metadata[this.v1 ? 5 : this.v2 ? 6 : 7] || this.nationalPrefix();\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefixTransformRule',\n\t\tvalue: function nationalPrefixTransformRule() {\n\t\t\treturn this.country_metadata[this.v1 ? 6 : this.v2 ? 7 : 8];\n\t\t}\n\t}, {\n\t\tkey: '_getNationalPrefixIsOptionalWhenFormatting',\n\t\tvalue: function _getNationalPrefixIsOptionalWhenFormatting() {\n\t\t\treturn !!this.country_metadata[this.v1 ? 7 : this.v2 ? 8 : 9];\n\t\t}\n\n\t\t// For countries of the same region (e.g. NANPA)\n\t\t// \"national prefix is optional when parsing\" flag is\n\t\t// stored in the \"main\" country for that region.\n\t\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n\t}, {\n\t\tkey: 'nationalPrefixIsOptionalWhenFormatting',\n\t\tvalue: function nationalPrefixIsOptionalWhenFormatting() {\n\t\t\treturn this._getNationalPrefixIsOptionalWhenFormatting(this.country_metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());\n\t\t}\n\t}, {\n\t\tkey: 'leadingDigits',\n\t\tvalue: function leadingDigits() {\n\t\t\treturn this.country_metadata[this.v1 ? 8 : this.v2 ? 9 : 10];\n\t\t}\n\t}, {\n\t\tkey: 'types',\n\t\tvalue: function types() {\n\t\t\treturn this.country_metadata[this.v1 ? 9 : this.v2 ? 10 : 11];\n\t\t}\n\t}, {\n\t\tkey: 'hasTypes',\n\t\tvalue: function hasTypes() {\n\t\t\t// Versions 1.2.0 - 1.2.4: can be `[]`.\n\t\t\t/* istanbul ignore next */\n\t\t\tif (this.types() && this.types().length === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Versions <= 1.2.4: can be `undefined`.\n\t\t\t// Version >= 1.2.5: can be `0`.\n\t\t\treturn !!this.types();\n\t\t}\n\t}, {\n\t\tkey: 'type',\n\t\tvalue: function type(_type) {\n\t\t\tif (this.hasTypes() && getType(this.types(), _type)) {\n\t\t\t\treturn new Type(getType(this.types(), _type), this);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'ext',\n\t\tvalue: function ext() {\n\t\t\tif (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;\n\t\t\treturn this.country_metadata[13] || DEFAULT_EXT_PREFIX;\n\t\t}\n\t}, {\n\t\tkey: 'countryCallingCodes',\n\t\tvalue: function countryCallingCodes() {\n\t\t\tif (this.v1) return this.metadata.country_phone_code_to_countries;\n\t\t\treturn this.metadata.country_calling_codes;\n\t\t}\n\n\t\t// Formatting information for regions which share\n\t\t// a country calling code is contained by only one region\n\t\t// for performance reasons. For example, for NANPA region\n\t\t// (\"North American Numbering Plan Administration\",\n\t\t// which includes USA, Canada, Cayman Islands, Bahamas, etc)\n\t\t// it will be contained in the metadata for `US`.\n\t\t//\n\t\t// `country_calling_code` is always valid.\n\t\t// But the actual country may not necessarily be part of the metadata.\n\t\t//\n\n\t}, {\n\t\tkey: 'chooseCountryByCountryCallingCode',\n\t\tvalue: function chooseCountryByCountryCallingCode(country_calling_code) {\n\t\t\tvar country = this.countryCallingCodes()[country_calling_code][0];\n\n\t\t\t// Do not want to test this case.\n\t\t\t// (custom metadata, not all countries).\n\t\t\t/* istanbul ignore else */\n\t\t\tif (this.hasCountry(country)) {\n\t\t\t\tthis.country(country);\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'selectedCountry',\n\t\tvalue: function selectedCountry() {\n\t\t\treturn this._country;\n\t\t}\n\t}]);\n\n\treturn Metadata;\n}();\n\nexport default Metadata;\n\nvar Format = function () {\n\tfunction Format(format, metadata) {\n\t\t_classCallCheck(this, Format);\n\n\t\tthis._format = format;\n\t\tthis.metadata = metadata;\n\t}\n\n\t_createClass(Format, [{\n\t\tkey: 'pattern',\n\t\tvalue: function pattern() {\n\t\t\treturn this._format[0];\n\t\t}\n\t}, {\n\t\tkey: 'format',\n\t\tvalue: function format() {\n\t\t\treturn this._format[1];\n\t\t}\n\t}, {\n\t\tkey: 'leadingDigitsPatterns',\n\t\tvalue: function leadingDigitsPatterns() {\n\t\t\treturn this._format[2] || [];\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefixFormattingRule',\n\t\tvalue: function nationalPrefixFormattingRule() {\n\t\t\treturn this._format[3] || this.metadata.nationalPrefixFormattingRule();\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefixIsOptionalWhenFormatting',\n\t\tvalue: function nationalPrefixIsOptionalWhenFormatting() {\n\t\t\treturn !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormatting();\n\t\t}\n\t}, {\n\t\tkey: 'nationalPrefixIsMandatoryWhenFormatting',\n\t\tvalue: function nationalPrefixIsMandatoryWhenFormatting() {\n\t\t\t// National prefix is omitted if there's no national prefix formatting rule\n\t\t\t// set for this country, or when the national prefix formatting rule\n\t\t\t// contains no national prefix itself, or when this rule is set but\n\t\t\t// national prefix is optional for this phone number format\n\t\t\t// (and it is not enforced explicitly)\n\t\t\treturn this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormatting();\n\t\t}\n\n\t\t// Checks whether national prefix formatting rule contains national prefix.\n\n\t}, {\n\t\tkey: 'usesNationalPrefix',\n\t\tvalue: function usesNationalPrefix() {\n\t\t\treturn this.nationalPrefixFormattingRule() &&\n\t\t\t// Check that national prefix formatting rule is not a dummy one.\n\t\t\tthis.nationalPrefixFormattingRule() !== '$1' &&\n\t\t\t// Check that national prefix formatting rule actually has national prefix digit(s).\n\t\t\t/\\d/.test(this.nationalPrefixFormattingRule().replace('$1', ''));\n\t\t}\n\t}, {\n\t\tkey: 'internationalFormat',\n\t\tvalue: function internationalFormat() {\n\t\t\treturn this._format[5] || this.format();\n\t\t}\n\t}]);\n\n\treturn Format;\n}();\n\nvar Type = function () {\n\tfunction Type(type, metadata) {\n\t\t_classCallCheck(this, Type);\n\n\t\tthis.type = type;\n\t\tthis.metadata = metadata;\n\t}\n\n\t_createClass(Type, [{\n\t\tkey: 'pattern',\n\t\tvalue: function pattern() {\n\t\t\tif (this.metadata.v1) return this.type;\n\t\t\treturn this.type[0];\n\t\t}\n\t}, {\n\t\tkey: 'possibleLengths',\n\t\tvalue: function possibleLengths() {\n\t\t\tif (this.metadata.v1) return;\n\t\t\treturn this.type[1] || this.metadata.possibleLengths();\n\t\t}\n\t}]);\n\n\treturn Type;\n}();\n\nfunction getType(types, type) {\n\tswitch (type) {\n\t\tcase 'FIXED_LINE':\n\t\t\treturn types[0];\n\t\tcase 'MOBILE':\n\t\t\treturn types[1];\n\t\tcase 'TOLL_FREE':\n\t\t\treturn types[2];\n\t\tcase 'PREMIUM_RATE':\n\t\t\treturn types[3];\n\t\tcase 'PERSONAL_NUMBER':\n\t\t\treturn types[4];\n\t\tcase 'VOICEMAIL':\n\t\t\treturn types[5];\n\t\tcase 'UAN':\n\t\t\treturn types[6];\n\t\tcase 'PAGER':\n\t\t\treturn types[7];\n\t\tcase 'VOIP':\n\t\t\treturn types[8];\n\t\tcase 'SHARED_COST':\n\t\t\treturn types[9];\n\t}\n}\n\nexport function validateMetadata(metadata) {\n\tif (!metadata) {\n\t\tthrow new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');\n\t}\n\n\t// `country_phone_code_to_countries` was renamed to\n\t// `country_calling_codes` in `1.0.18`.\n\tif (!is_object(metadata) || !is_object(metadata.countries) || !is_object(metadata.country_calling_codes) && !is_object(metadata.country_phone_code_to_countries)) {\n\t\tthrow new Error('[libphonenumber-js] `metadata` argument was passed but it\\'s not a valid metadata. Must be an object having `.countries` and `.country_calling_codes` child object properties. Got ' + (is_object(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + type_of(metadata) + ': ' + metadata) + '.');\n\t}\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nvar is_object = function is_object(_) {\n\treturn (typeof _ === 'undefined' ? 'undefined' : _typeof(_)) === 'object';\n};\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nvar type_of = function type_of(_) {\n\treturn typeof _ === 'undefined' ? 'undefined' : _typeof(_);\n};\n\n/**\r\n * Returns extension prefix for a country.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string?}\r\n * @example\r\n * // Returns \" ext. \"\r\n * getExtPrefix(\"US\")\r\n */\nexport function getExtPrefix(country, metadata) {\n\tmetadata = new Metadata(metadata);\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.country(country).ext();\n\t}\n\treturn DEFAULT_EXT_PREFIX;\n}\n\n/**\r\n * Returns \"country calling code\" for a country.\r\n * Throws an error if the country doesn't exist or isn't supported by this library.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string}\r\n * @example\r\n * // Returns \"44\"\r\n * getCountryCallingCode(\"GB\")\r\n */\nexport function getCountryCallingCode(country, metadata) {\n\tmetadata = new Metadata(metadata);\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.country(country).countryCallingCode();\n\t}\n\tthrow new Error('Unknown country: ' + country);\n}\n\nexport function isSupportedCountry(country, metadata) {\n\t// metadata = new Metadata(metadata)\n\t// return metadata.hasCountry(country)\n\treturn metadata.countries[country] !== undefined;\n}\n//# sourceMappingURL=metadata.js.map","// The minimum length of the national significant number.\nexport var MIN_LENGTH_FOR_NSN = 2;\n\n// The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\nexport var MAX_LENGTH_FOR_NSN = 17;\n\n// The maximum length of the country calling code.\nexport var MAX_LENGTH_COUNTRY_CODE = 3;\n\n// Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\nexport var VALID_DIGITS = '0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9';\n\n// `DASHES` will be right after the opening square bracket of the \"character class\"\nvar DASHES = '-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D';\nvar SLASHES = '\\uFF0F/';\nvar DOTS = '\\uFF0E.';\nexport var WHITESPACE = ' \\xA0\\xAD\\u200B\\u2060\\u3000';\nvar BRACKETS = '()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]';\n// export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\nvar TILDES = '~\\u2053\\u223C\\uFF5E';\n\n// Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\nexport var VALID_PUNCTUATION = '' + DASHES + SLASHES + DOTS + WHITESPACE + BRACKETS + TILDES;\n\nexport var PLUS_CHARS = '+\\uFF0B';\n// const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')\n//# sourceMappingURL=constants.js.map","// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport { VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN, MAX_LENGTH_COUNTRY_CODE } from './constants';\n\nimport { matchesEntirely } from './util';\nimport ParseError from './ParseError';\nimport Metadata from './metadata';\nimport isViablePhoneNumber from './isViablePhoneNumber';\nimport { extractExtension } from './extension';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber';\nimport getCountryCallingCode from './getCountryCallingCode';\nimport getNumberType, { checkNumberLengthForType } from './getNumberType_';\nimport { is_possible_number } from './isPossibleNumber_';\nimport { stripIDDPrefix } from './IDD';\nimport { parseRFC3966 } from './RFC3966';\nimport PhoneNumber from './PhoneNumber';\n\n// We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\nvar MAX_INPUT_STRING_LENGTH = 250;\n\n// This consists of the plus symbol, digits, and arabic-indic digits.\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');\n\n// Regular expression of trailing characters that we want to remove.\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + ']+$');\n\n// `options`:\n// {\n// country:\n// {\n// restrict - (a two-letter country code)\n// the phone number must be in this country\n//\n// default - (a two-letter country code)\n// default country to use for phone number parsing and validation\n// (if no country code could be derived from the phone number)\n// }\n// }\n//\n// Returns `{ country, number }`\n//\n// Example use cases:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\nexport default function parse(text) {\n\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\tvar metadata = arguments[2];\n\n\tmetadata = new Metadata(metadata);\n\n\t// Validate `defaultCountry`.\n\tif (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n\t\tif (options.v2) {\n\t\t\tthrow new ParseError('INVALID_COUNTRY');\n\t\t}\n\t\tthrow new Error('Unknown country: ' + options.defaultCountry);\n\t}\n\n\t// Parse the phone number.\n\n\tvar _parse_input = parse_input(text, options.v2),\n\t formatted_phone_number = _parse_input.number,\n\t ext = _parse_input.ext;\n\n\t// If the phone number is not viable then return nothing.\n\n\n\tif (!formatted_phone_number) {\n\t\tif (options.v2) {\n\t\t\tthrow new ParseError('NOT_A_NUMBER');\n\t\t}\n\t\treturn {};\n\t}\n\n\tvar _parse_phone_number = parse_phone_number(formatted_phone_number, options.defaultCountry, metadata),\n\t country = _parse_phone_number.country,\n\t nationalNumber = _parse_phone_number.national_number,\n\t countryCallingCode = _parse_phone_number.countryCallingCode,\n\t carrierCode = _parse_phone_number.carrierCode;\n\n\tif (!metadata.selectedCountry()) {\n\t\tif (options.v2) {\n\t\t\tthrow new ParseError('INVALID_COUNTRY');\n\t\t}\n\t\treturn {};\n\t}\n\n\t// Validate national (significant) number length.\n\tif (nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n\t\t// Won't throw here because the regexp already demands length > 1.\n\t\t/* istanbul ignore if */\n\t\tif (options.v2) {\n\t\t\tthrow new ParseError('TOO_SHORT');\n\t\t}\n\t\t// Google's demo just throws an error in this case.\n\t\treturn {};\n\t}\n\n\t// Validate national (significant) number length.\n\t//\n\t// A sidenote:\n\t//\n\t// They say that sometimes national (significant) numbers\n\t// can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n\t// https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n\t// Such numbers will just be discarded.\n\t//\n\tif (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n\t\tif (options.v2) {\n\t\t\tthrow new ParseError('TOO_LONG');\n\t\t}\n\t\t// Google's demo just throws an error in this case.\n\t\treturn {};\n\t}\n\n\tif (options.v2) {\n\t\tvar phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n\n\t\tif (country) {\n\t\t\tphoneNumber.country = country;\n\t\t}\n\t\tif (carrierCode) {\n\t\t\tphoneNumber.carrierCode = carrierCode;\n\t\t}\n\t\tif (ext) {\n\t\t\tphoneNumber.ext = ext;\n\t\t}\n\n\t\treturn phoneNumber;\n\t}\n\n\t// Check if national phone number pattern matches the number.\n\t// National number pattern is different for each country,\n\t// even for those ones which are part of the \"NANPA\" group.\n\tvar valid = country && matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) ? true : false;\n\n\tif (!options.extended) {\n\t\treturn valid ? result(country, nationalNumber, ext) : {};\n\t}\n\n\treturn {\n\t\tcountry: country,\n\t\tcountryCallingCode: countryCallingCode,\n\t\tcarrierCode: carrierCode,\n\t\tvalid: valid,\n\t\tpossible: valid ? true : options.extended === true && metadata.possibleLengths() && is_possible_number(nationalNumber, countryCallingCode !== undefined, metadata),\n\t\tphone: nationalNumber,\n\t\text: ext\n\t};\n}\n\n/**\r\n * Extracts a parseable phone number.\r\n * @param {string} text - Input.\r\n * @return {string}.\r\n */\nexport function extract_formatted_phone_number(text, v2) {\n\tif (!text) {\n\t\treturn;\n\t}\n\n\tif (text.length > MAX_INPUT_STRING_LENGTH) {\n\t\tif (v2) {\n\t\t\tthrow new ParseError('TOO_LONG');\n\t\t}\n\t\treturn;\n\t}\n\n\t// Attempt to extract a possible number from the string passed in\n\n\tvar starts_at = text.search(PHONE_NUMBER_START_PATTERN);\n\n\tif (starts_at < 0) {\n\t\treturn;\n\t}\n\n\treturn text\n\t// Trim everything to the left of the phone number\n\t.slice(starts_at)\n\t// Remove trailing non-numerical characters\n\t.replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n\n// Strips any national prefix (such as 0, 1) present in the number provided.\n// \"Carrier codes\" are only used in Colombia and Brazil,\n// and only when dialing within those countries from a mobile phone to a fixed line number.\nexport function strip_national_prefix_and_carrier_code(number, metadata) {\n\tif (!number || !metadata.nationalPrefixForParsing()) {\n\t\treturn { number: number };\n\t}\n\n\t// Attempt to parse the first digits as a national prefix\n\tvar national_prefix_pattern = new RegExp('^(?:' + metadata.nationalPrefixForParsing() + ')');\n\tvar national_prefix_matcher = national_prefix_pattern.exec(number);\n\n\t// If no national prefix is present in the phone number,\n\t// but the national prefix is optional for this country,\n\t// then consider this phone number valid.\n\t//\n\t// Google's reference `libphonenumber` implementation\n\t// wouldn't recognize such phone numbers as valid,\n\t// but I think it would perfectly make sense\n\t// to consider such phone numbers as valid\n\t// because if a national phone number was originally\n\t// formatted without the national prefix\n\t// then it must be parseable back into the original national number.\n\t// In other words, `parse(format(number))`\n\t// must always be equal to `number`.\n\t//\n\tif (!national_prefix_matcher) {\n\t\treturn { number: number };\n\t}\n\n\tvar national_significant_number = void 0;\n\n\t// `national_prefix_for_parsing` capturing groups\n\t// (used only for really messy cases: Argentina, Brazil, Mexico, Somalia)\n\tvar captured_groups_count = national_prefix_matcher.length - 1;\n\n\t// If the national number tranformation is needed then do it.\n\t//\n\t// `national_prefix_matcher[captured_groups_count]` means that\n\t// the corresponding captured group is not empty.\n\t// It can be empty if it's optional.\n\t// Example: \"0?(?:...)?\" for Argentina.\n\t//\n\tif (metadata.nationalPrefixTransformRule() && national_prefix_matcher[captured_groups_count]) {\n\t\tnational_significant_number = number.replace(national_prefix_pattern, metadata.nationalPrefixTransformRule());\n\t}\n\t// Else, no transformation is necessary,\n\t// and just strip the national prefix.\n\telse {\n\t\t\tnational_significant_number = number.slice(national_prefix_matcher[0].length);\n\t\t}\n\n\tvar carrierCode = void 0;\n\tif (captured_groups_count > 0) {\n\t\tcarrierCode = national_prefix_matcher[1];\n\t}\n\n\t// The following is done in `get_country_and_national_number_for_local_number()` instead.\n\t//\n\t// // Verify the parsed national (significant) number for this country\n\t// const national_number_rule = new RegExp(metadata.nationalNumberPattern())\n\t// //\n\t// // If the original number (before stripping national prefix) was viable,\n\t// // and the resultant number is not, then prefer the original phone number.\n\t// // This is because for some countries (e.g. Russia) the same digit could be both\n\t// // a national prefix and a leading digit of a valid national phone number,\n\t// // like `8` is the national prefix for Russia and both\n\t// // `8 800 555 35 35` and `800 555 35 35` are valid numbers.\n\t// if (matchesEntirely(number, national_number_rule) &&\n\t// \t\t!matchesEntirely(national_significant_number, national_number_rule))\n\t// {\n\t// \treturn number\n\t// }\n\n\t// Return the parsed national (significant) number\n\treturn {\n\t\tnumber: national_significant_number,\n\t\tcarrierCode: carrierCode\n\t};\n}\n\nexport function find_country_code(country_calling_code, national_phone_number, metadata) {\n\t// Is always non-empty, because `country_calling_code` is always valid\n\tvar possible_countries = metadata.countryCallingCodes()[country_calling_code];\n\n\t// If there's just one country corresponding to the country code,\n\t// then just return it, without further phone number digits validation.\n\tif (possible_countries.length === 1) {\n\t\treturn possible_countries[0];\n\t}\n\n\treturn _find_country_code(possible_countries, national_phone_number, metadata.metadata);\n}\n\n// Changes `metadata` `country`.\nfunction _find_country_code(possible_countries, national_phone_number, metadata) {\n\tmetadata = new Metadata(metadata);\n\n\tfor (var _iterator = possible_countries, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar country = _ref;\n\n\t\tmetadata.country(country);\n\n\t\t// Leading digits check would be the simplest one\n\t\tif (metadata.leadingDigits()) {\n\t\t\tif (national_phone_number && national_phone_number.search(metadata.leadingDigits()) === 0) {\n\t\t\t\treturn country;\n\t\t\t}\n\t\t}\n\t\t// Else perform full validation with all of those\n\t\t// fixed-line/mobile/etc regular expressions.\n\t\telse if (getNumberType({ phone: national_phone_number, country: country }, undefined, metadata.metadata)) {\n\t\t\t\treturn country;\n\t\t\t}\n\t}\n}\n\n/**\r\n * @param {string} text - Input.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nfunction parse_input(text, v2) {\n\t// Parse RFC 3966 phone number URI.\n\tif (text && text.indexOf('tel:') === 0) {\n\t\treturn parseRFC3966(text);\n\t}\n\n\tvar number = extract_formatted_phone_number(text, v2);\n\n\t// If the phone number is not viable, then abort.\n\tif (!number || !isViablePhoneNumber(number)) {\n\t\treturn {};\n\t}\n\n\t// Attempt to parse extension first, since it doesn't require region-specific\n\t// data and we want to have the non-normalised number here.\n\tvar with_extension_stripped = extractExtension(number);\n\tif (with_extension_stripped.ext) {\n\t\treturn with_extension_stripped;\n\t}\n\n\treturn { number: number };\n}\n\n/**\r\n * Creates `parse()` result object.\r\n */\nfunction result(country, national_number, ext) {\n\tvar result = {\n\t\tcountry: country,\n\t\tphone: national_number\n\t};\n\n\tif (ext) {\n\t\tresult.ext = ext;\n\t}\n\n\treturn result;\n}\n\n/**\r\n * Parses a viable phone number.\r\n * Returns `{ country, countryCallingCode, national_number }`.\r\n */\nfunction parse_phone_number(formatted_phone_number, default_country, metadata) {\n\tvar _extractCountryCallin = extractCountryCallingCode(formatted_phone_number, default_country, metadata.metadata),\n\t countryCallingCode = _extractCountryCallin.countryCallingCode,\n\t number = _extractCountryCallin.number;\n\n\tif (!number) {\n\t\treturn { countryCallingCode: countryCallingCode };\n\t}\n\n\tvar country = void 0;\n\n\tif (countryCallingCode) {\n\t\tmetadata.chooseCountryByCountryCallingCode(countryCallingCode);\n\t} else if (default_country) {\n\t\tmetadata.country(default_country);\n\t\tcountry = default_country;\n\t\tcountryCallingCode = getCountryCallingCode(default_country, metadata.metadata);\n\t} else return {};\n\n\tvar _parse_national_numbe = parse_national_number(number, metadata),\n\t national_number = _parse_national_numbe.national_number,\n\t carrier_code = _parse_national_numbe.carrier_code;\n\n\t// Sometimes there are several countries\n\t// corresponding to the same country phone code\n\t// (e.g. NANPA countries all having `1` country phone code).\n\t// Therefore, to reliably determine the exact country,\n\t// national (significant) number should have been parsed first.\n\t//\n\t// When `metadata.json` is generated, all \"ambiguous\" country phone codes\n\t// get their countries populated with the full set of\n\t// \"phone number type\" regular expressions.\n\t//\n\n\n\tvar exactCountry = find_country_code(countryCallingCode, national_number, metadata);\n\tif (exactCountry) {\n\t\tcountry = exactCountry;\n\t\tmetadata.country(country);\n\t}\n\n\treturn {\n\t\tcountry: country,\n\t\tcountryCallingCode: countryCallingCode,\n\t\tnational_number: national_number,\n\t\tcarrierCode: carrier_code\n\t};\n}\n\nfunction parse_national_number(number, metadata) {\n\tvar national_number = parseIncompletePhoneNumber(number);\n\tvar carrier_code = void 0;\n\n\t// Parsing national prefixes and carrier codes\n\t// is only required for local phone numbers\n\t// but some people don't understand that\n\t// and sometimes write international phone numbers\n\t// with national prefixes (or maybe even carrier codes).\n\t// http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html\n\t// Google's original library forgives such mistakes\n\t// and so does this library, because it has been requested:\n\t// https://github.com/catamphetamine/libphonenumber-js/issues/127\n\n\tvar _strip_national_prefi = strip_national_prefix_and_carrier_code(national_number, metadata),\n\t potential_national_number = _strip_national_prefi.number,\n\t carrierCode = _strip_national_prefi.carrierCode;\n\n\t// If metadata has \"possible lengths\" then employ the new algorythm.\n\n\n\tif (metadata.possibleLengths()) {\n\t\t// We require that the NSN remaining after stripping the national prefix and\n\t\t// carrier code be long enough to be a possible length for the region.\n\t\t// Otherwise, we don't do the stripping, since the original number could be\n\t\t// a valid short number.\n\t\tswitch (checkNumberLengthForType(potential_national_number, undefined, metadata)) {\n\t\t\tcase 'TOO_SHORT':\n\t\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t\tcase 'INVALID_LENGTH':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnational_number = potential_national_number;\n\t\t\t\tcarrier_code = carrierCode;\n\t\t}\n\t} else {\n\t\t// If the original number (before stripping national prefix) was viable,\n\t\t// and the resultant number is not, then prefer the original phone number.\n\t\t// This is because for some countries (e.g. Russia) the same digit could be both\n\t\t// a national prefix and a leading digit of a valid national phone number,\n\t\t// like `8` is the national prefix for Russia and both\n\t\t// `8 800 555 35 35` and `800 555 35 35` are valid numbers.\n\t\tif (matchesEntirely(national_number, metadata.nationalNumberPattern()) && !matchesEntirely(potential_national_number, metadata.nationalNumberPattern())) {\n\t\t\t// Keep the number without stripping national prefix.\n\t\t} else {\n\t\t\tnational_number = potential_national_number;\n\t\t\tcarrier_code = carrierCode;\n\t\t}\n\t}\n\n\treturn {\n\t\tnational_number: national_number,\n\t\tcarrier_code: carrier_code\n\t};\n}\n\n// Determines the country for a given (possibly incomplete) phone number.\n// export function get_country_from_phone_number(number, metadata)\n// {\n// \treturn parse_phone_number(number, null, metadata).country\n// }\n\n// Parses a formatted phone number\n// and returns `{ countryCallingCode, number }`\n// where `number` is just the \"number\" part\n// which is left after extracting `countryCallingCode`\n// and is not necessarily a \"national (significant) number\"\n// and might as well contain national prefix.\n//\nexport function extractCountryCallingCode(number, country, metadata) {\n\tnumber = parseIncompletePhoneNumber(number);\n\n\tif (!number) {\n\t\treturn {};\n\t}\n\n\t// If this is not an international phone number,\n\t// then don't extract country phone code.\n\tif (number[0] !== '+') {\n\t\t// Convert an \"out-of-country\" dialing phone number\n\t\t// to a proper international phone number.\n\t\tvar numberWithoutIDD = stripIDDPrefix(number, country, metadata);\n\n\t\t// If an IDD prefix was stripped then\n\t\t// convert the number to international one\n\t\t// for subsequent parsing.\n\t\tif (numberWithoutIDD && numberWithoutIDD !== number) {\n\t\t\tnumber = '+' + numberWithoutIDD;\n\t\t} else {\n\t\t\treturn { number: number };\n\t\t}\n\t}\n\n\t// Fast abortion: country codes do not begin with a '0'\n\tif (number[1] === '0') {\n\t\treturn {};\n\t}\n\n\tmetadata = new Metadata(metadata);\n\n\t// The thing with country phone codes\n\t// is that they are orthogonal to each other\n\t// i.e. there's no such country phone code A\n\t// for which country phone code B exists\n\t// where B starts with A.\n\t// Therefore, while scanning digits,\n\t// if a valid country code is found,\n\t// that means that it is the country code.\n\t//\n\tvar i = 2;\n\twhile (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {\n\t\tvar countryCallingCode = number.slice(1, i);\n\n\t\tif (metadata.countryCallingCodes()[countryCallingCode]) {\n\t\t\treturn {\n\t\t\t\tcountryCallingCode: countryCallingCode,\n\t\t\t\tnumber: number.slice(i)\n\t\t\t};\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {};\n}\n//# sourceMappingURL=parse_.js.map","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nimport parsePhoneNumber_ from './parsePhoneNumber_';\n\nexport default function parsePhoneNumber() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn parsePhoneNumber_(text, options, metadata);\n}\n\nexport function normalizeArguments(args) {\n\tvar _Array$prototype$slic = Array.prototype.slice.call(args),\n\t _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n\t arg_1 = _Array$prototype$slic2[0],\n\t arg_2 = _Array$prototype$slic2[1],\n\t arg_3 = _Array$prototype$slic2[2],\n\t arg_4 = _Array$prototype$slic2[3];\n\n\tvar text = void 0;\n\tvar options = void 0;\n\tvar metadata = void 0;\n\n\t// If the phone number is passed as a string.\n\t// `parsePhoneNumber('88005553535', ...)`.\n\tif (typeof arg_1 === 'string') {\n\t\ttext = arg_1;\n\t} else throw new TypeError('A text for parsing must be a string.');\n\n\t// If \"default country\" argument is being passed then move it to `options`.\n\t// `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n\tif (!arg_2 || typeof arg_2 === 'string') {\n\t\tif (arg_4) {\n\t\t\toptions = arg_3;\n\t\t\tmetadata = arg_4;\n\t\t} else {\n\t\t\toptions = undefined;\n\t\t\tmetadata = arg_3;\n\t\t}\n\n\t\tif (arg_2) {\n\t\t\toptions = _extends({ defaultCountry: arg_2 }, options);\n\t\t}\n\t}\n\t// `defaultCountry` is not passed.\n\t// Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n\telse if (isObject(arg_2)) {\n\t\t\tif (arg_3) {\n\t\t\t\toptions = arg_2;\n\t\t\t\tmetadata = arg_3;\n\t\t\t} else {\n\t\t\t\tmetadata = arg_2;\n\t\t\t}\n\t\t} else throw new Error('Invalid second argument: ' + arg_2);\n\n\treturn {\n\t\ttext: text,\n\t\toptions: options,\n\t\tmetadata: metadata\n\t};\n}\n\n// Otherwise istanbul would show this as \"branch not covered\".\n/* istanbul ignore next */\nvar isObject = function isObject(_) {\n\treturn (typeof _ === 'undefined' ? 'undefined' : _typeof(_)) === 'object';\n};\n//# sourceMappingURL=parsePhoneNumber.js.map","import Metadata from './metadata';\nimport { matchesEntirely, mergeArrays } from './util';\n\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType(input) {\n\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\tvar metadata = arguments[2];\n\n\t// When `parse()` returned `{}`\n\t// meaning that the phone number is not a valid one.\n\tif (!input.country) {\n\t\treturn;\n\t}\n\n\tmetadata = new Metadata(metadata);\n\n\tif (!metadata.hasCountry(input.country)) {\n\t\tthrow new Error('Unknown country: ' + input.country);\n\t}\n\n\tvar nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n\tmetadata.country(input.country);\n\n\t// The following is copy-pasted from the original function:\n\t// https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n\n\t// Is this national number even valid for this country\n\tif (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n\t\treturn;\n\t}\n\n\t// Is it fixed line number\n\tif (is_of_type(nationalNumber, 'FIXED_LINE', metadata)) {\n\t\t// Because duplicate regular expressions are removed\n\t\t// to reduce metadata size, if \"mobile\" pattern is \"\"\n\t\t// then it means it was removed due to being a duplicate of the fixed-line pattern.\n\t\t//\n\t\tif (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE';\n\t\t}\n\n\t\t// v1 metadata.\n\t\t// Legacy.\n\t\t// Deprecated.\n\t\tif (!metadata.type('MOBILE')) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE';\n\t\t}\n\n\t\t// Check if the number happens to qualify as both fixed line and mobile.\n\t\t// (no such country in the minimal metadata set)\n\t\t/* istanbul ignore if */\n\t\tif (is_of_type(nationalNumber, 'MOBILE', metadata)) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE';\n\t\t}\n\n\t\treturn 'FIXED_LINE';\n\t}\n\n\tfor (var _iterator = NON_FIXED_LINE_PHONE_TYPES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar _type = _ref;\n\n\t\tif (is_of_type(nationalNumber, _type, metadata)) {\n\t\t\treturn _type;\n\t\t}\n\t}\n}\n\nexport function is_of_type(nationalNumber, type, metadata) {\n\ttype = metadata.type(type);\n\n\tif (!type || !type.pattern()) {\n\t\treturn false;\n\t}\n\n\t// Check if any possible number lengths are present;\n\t// if so, we use them to avoid checking\n\t// the validation pattern if they don't match.\n\t// If they are absent, this means they match\n\t// the general description, which we have\n\t// already checked before a specific number type.\n\tif (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {\n\t\treturn false;\n\t}\n\n\treturn matchesEntirely(nationalNumber, type.pattern());\n}\n\n// Should only be called for the \"new\" metadata which has \"possible lengths\".\nexport function checkNumberLengthForType(nationalNumber, type, metadata) {\n\tvar type_info = metadata.type(type);\n\n\t// There should always be \"\" set for every type element.\n\t// This is declared in the XML schema.\n\t// For size efficiency, where a sub-description (e.g. fixed-line)\n\t// has the same \"\" as the \"general description\", this is missing,\n\t// so we fall back to the \"general description\". Where no numbers of the type\n\t// exist at all, there is one possible length (-1) which is guaranteed\n\t// not to match the length of any real phone number.\n\tvar possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();\n\t// let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n\tif (type === 'FIXED_LINE_OR_MOBILE') {\n\t\t// No such country in metadata.\n\t\t/* istanbul ignore next */\n\t\tif (!metadata.type('FIXED_LINE')) {\n\t\t\t// The rare case has been encountered where no fixedLine data is available\n\t\t\t// (true for some non-geographical entities), so we just check mobile.\n\t\t\treturn checkNumberLengthForType(nationalNumber, 'MOBILE', metadata);\n\t\t}\n\n\t\tvar mobile_type = metadata.type('MOBILE');\n\n\t\tif (mobile_type) {\n\t\t\t// Merge the mobile data in if there was any. \"Concat\" creates a new\n\t\t\t// array, it doesn't edit possible_lengths in place, so we don't need a copy.\n\t\t\t// Note that when adding the possible lengths from mobile, we have\n\t\t\t// to again check they aren't empty since if they are this indicates\n\t\t\t// they are the same as the general desc and should be obtained from there.\n\t\t\tpossible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());\n\t\t\t// The current list is sorted; we need to merge in the new list and\n\t\t\t// re-sort (duplicates are okay). Sorting isn't so expensive because\n\t\t\t// the lists are very small.\n\n\t\t\t// if (local_lengths)\n\t\t\t// {\n\t\t\t// \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n\t\t\t// }\n\t\t\t// else\n\t\t\t// {\n\t\t\t// \tlocal_lengths = mobile_type.possibleLengthsLocal()\n\t\t\t// }\n\t\t}\n\t}\n\t// If the type doesn't exist then return 'INVALID_LENGTH'.\n\telse if (type && !type_info) {\n\t\t\treturn 'INVALID_LENGTH';\n\t\t}\n\n\tvar actual_length = nationalNumber.length;\n\n\t// In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n\t// // This is safe because there is never an overlap beween the possible lengths\n\t// // and the local-only lengths; this is checked at build time.\n\t// if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n\t// {\n\t// \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n\t// }\n\n\tvar minimum_length = possible_lengths[0];\n\n\tif (minimum_length === actual_length) {\n\t\treturn 'IS_POSSIBLE';\n\t}\n\n\tif (minimum_length > actual_length) {\n\t\treturn 'TOO_SHORT';\n\t}\n\n\tif (possible_lengths[possible_lengths.length - 1] < actual_length) {\n\t\treturn 'TOO_LONG';\n\t}\n\n\t// We skip the first element since we've already checked it.\n\treturn possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n//# sourceMappingURL=getNumberType_.js.map","// Checks whether the entire input sequence can be matched\n// against the regular expression.\nexport function matchesEntirely() {\n\tvar text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\tvar regular_expression = arguments[1];\n\n\treturn new RegExp('^(?:' + regular_expression + ')$').test(text);\n}\n\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport function mergeArrays(a, b) {\n\tvar merged = a.slice();\n\n\tfor (var _iterator = b, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar element = _ref;\n\n\t\tif (a.indexOf(element) < 0) {\n\t\t\tmerged.push(element);\n\t\t}\n\t}\n\n\treturn merged.sort(function (a, b) {\n\t\treturn a - b;\n\t});\n\n\t// ES6 version, requires Set polyfill.\n\t// let merged = new Set(a)\n\t// for (const element of b)\n\t// {\n\t// \tmerged.add(i)\n\t// }\n\t// return Array.from(merged).sort((a, b) => a - b)\n}\n//# sourceMappingURL=util.js.map","/** Returns a regular expression quantifier with an upper and lower limit. */\nexport function limit(lower, upper) {\n\tif (lower < 0 || upper <= 0 || upper < lower) {\n\t\tthrow new TypeError();\n\t}\n\treturn \"{\" + lower + \",\" + upper + \"}\";\n}\n\n/**\r\n * Trims away any characters after the first match of {@code pattern} in {@code candidate},\r\n * returning the trimmed version.\r\n */\nexport function trimAfterFirstMatch(regexp, string) {\n\tvar index = string.search(regexp);\n\n\tif (index >= 0) {\n\t\treturn string.slice(0, index);\n\t}\n\n\treturn string;\n}\n\nexport function startsWith(string, substring) {\n\treturn string.indexOf(substring) === 0;\n}\n\nexport function endsWith(string, substring) {\n\treturn string.indexOf(substring, string.length - substring.length) === string.length - substring.length;\n}\n//# sourceMappingURL=util.js.map","import Metadata from './metadata';\nimport { matchesEntirely } from './util';\nimport getNumberType from './getNumberType_';\n\n/**\r\n * Checks if a given phone number is valid.\r\n *\r\n * If the `number` is a string, it will be parsed to an object,\r\n * but only if it contains only valid phone number characters (including punctuation).\r\n * If the `number` is an object, it is used as is.\r\n *\r\n * The optional `defaultCountry` argument is the default country.\r\n * I.e. it does not restrict to just that country,\r\n * e.g. in those cases where several countries share\r\n * the same phone numbering rules (NANPA, Britain, etc).\r\n * For example, even though the number `07624 369230`\r\n * belongs to the Isle of Man (\"IM\" country code)\r\n * calling `isValidNumber('07624369230', 'GB', metadata)`\r\n * still returns `true` because the country is not restricted to `GB`,\r\n * it's just that `GB` is the default one for the phone numbering rules.\r\n * For restricting the country see `isValidNumberForRegion()`\r\n * though restricting a country might not be a good idea.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n *\r\n * Examples:\r\n *\r\n * ```js\r\n * isValidNumber('+78005553535', metadata)\r\n * isValidNumber('8005553535', 'RU', metadata)\r\n * isValidNumber('88005553535', 'RU', metadata)\r\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\r\n * ```\r\n */\nexport default function isValidNumber(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var metadata = arguments[2];\n\n metadata = new Metadata(metadata);\n\n // This is just to support `isValidNumber({})`\n // for cases when `parseNumber()` returns `{}`.\n if (!input.country) {\n return false;\n }\n\n if (!metadata.hasCountry(input.country)) {\n throw new Error('Unknown country: ' + input.country);\n }\n\n metadata.country(input.country);\n\n // By default, countries only have type regexps when it's required for\n // distinguishing different countries having the same `countryCallingCode`.\n if (metadata.hasTypes()) {\n return getNumberType(input, options, metadata.metadata) !== undefined;\n }\n\n // If there are no type regexps for this country in metadata then use\n // `nationalNumberPattern` as a \"better than nothing\" replacement.\n var national_number = options.v2 ? input.nationalNumber : input.phone;\n return matchesEntirely(national_number, metadata.nationalNumberPattern());\n}\n//# sourceMappingURL=validate_.js.map","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport Metadata from './metadata';\nimport isPossibleNumber from './isPossibleNumber_';\nimport isValidNumber from './validate_';\nimport isValidNumberForRegion from './isValidNumberForRegion_';\nimport getNumberType from './getNumberType_';\nimport formatNumber from './format_';\n\nvar PhoneNumber = function () {\n\tfunction PhoneNumber(countryCallingCode, nationalNumber, metadata) {\n\t\t_classCallCheck(this, PhoneNumber);\n\n\t\tif (!countryCallingCode) {\n\t\t\tthrow new TypeError('`countryCallingCode` not passed');\n\t\t}\n\t\tif (!nationalNumber) {\n\t\t\tthrow new TypeError('`nationalNumber` not passed');\n\t\t}\n\t\t// If country code is passed then derive `countryCallingCode` from it.\n\t\t// Also store the country code as `.country`.\n\t\tif (isCountryCode(countryCallingCode)) {\n\t\t\tthis.country = countryCallingCode;\n\t\t\tvar _metadata = new Metadata(metadata);\n\t\t\t_metadata.country(countryCallingCode);\n\t\t\tcountryCallingCode = _metadata.countryCallingCode();\n\t\t}\n\t\tthis.countryCallingCode = countryCallingCode;\n\t\tthis.nationalNumber = nationalNumber;\n\t\tthis.number = '+' + this.countryCallingCode + this.nationalNumber;\n\t\tthis.metadata = metadata;\n\t}\n\n\t_createClass(PhoneNumber, [{\n\t\tkey: 'isPossible',\n\t\tvalue: function isPossible() {\n\t\t\treturn isPossibleNumber(this, { v2: true }, this.metadata);\n\t\t}\n\t}, {\n\t\tkey: 'isValid',\n\t\tvalue: function isValid() {\n\t\t\treturn isValidNumber(this, { v2: true }, this.metadata);\n\t\t}\n\n\t\t// // Is just an alias for `this.isValid() && this.country === country`.\n\t\t// // https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\n\t\t// isValidForRegion(country) {\n\t\t// \treturn isValidNumberForRegion(this, country, { v2: true }, this.metadata)\n\t\t// }\n\n\t}, {\n\t\tkey: 'getType',\n\t\tvalue: function getType() {\n\t\t\treturn getNumberType(this, { v2: true }, this.metadata);\n\t\t}\n\t}, {\n\t\tkey: 'format',\n\t\tvalue: function format(_format, options) {\n\t\t\treturn formatNumber(this, _format, options ? _extends({}, options, { v2: true }) : { v2: true }, this.metadata);\n\t\t}\n\t}, {\n\t\tkey: 'formatNational',\n\t\tvalue: function formatNational(options) {\n\t\t\treturn this.format('NATIONAL', options);\n\t\t}\n\t}, {\n\t\tkey: 'formatInternational',\n\t\tvalue: function formatInternational(options) {\n\t\t\treturn this.format('INTERNATIONAL', options);\n\t\t}\n\t}, {\n\t\tkey: 'getURI',\n\t\tvalue: function getURI(options) {\n\t\t\treturn this.format('RFC3966', options);\n\t\t}\n\t}]);\n\n\treturn PhoneNumber;\n}();\n\nexport default PhoneNumber;\n\n\nvar isCountryCode = function isCountryCode(value) {\n\treturn (/^[A-Z]{2}$/.test(value)\n\t);\n};\n//# sourceMappingURL=PhoneNumber.js.map","import { VALID_DIGITS } from './constants';\n\n// The RFC 3966 format for extensions.\nvar RFC3966_EXTN_PREFIX = ';ext=';\n\n// Pattern to capture digits used in an extension.\n// Places a maximum length of '7' for an extension.\nvar CAPTURING_EXTN_DIGITS = '([' + VALID_DIGITS + ']{1,7})';\n\n/**\r\n * Regexp of all possible ways to write extensions, for use when parsing. This\r\n * will be run as a case-insensitive regexp match. Wide character versions are\r\n * also provided after each ASCII version. There are three regular expressions\r\n * here. The first covers RFC 3966 format, where the extension is added using\r\n * ';ext='. The second more generic one starts with optional white space and\r\n * ends with an optional full stop (.), followed by zero or more spaces/tabs\r\n * /commas and then the numbers themselves. The other one covers the special\r\n * case of American numbers where the extension is written with a hash at the\r\n * end, such as '- 503#'. Note that the only capturing groups should be around\r\n * the digits that you want to capture as part of the extension, or else parsing\r\n * will fail! We allow two options for representing the accented o - the\r\n * character itself, and one in the unicode decomposed form with the combining\r\n * acute accent.\r\n */\nfunction create_extension_pattern(purpose) {\n\t// One-character symbols that can be used to indicate an extension.\n\tvar single_extension_characters = 'x\\uFF58#\\uFF03~\\uFF5E';\n\n\tswitch (purpose) {\n\t\t// For parsing, we are slightly more lenient in our interpretation than for matching. Here we\n\t\t// allow \"comma\" and \"semicolon\" as possible extension indicators. When matching, these are\n\t\tcase 'parsing':\n\t\t\tsingle_extension_characters = ',;' + single_extension_characters;\n\t}\n\n\treturn RFC3966_EXTN_PREFIX + CAPTURING_EXTN_DIGITS + '|' + '[ \\xA0\\\\t,]*' + '(?:e?xt(?:ensi(?:o\\u0301?|\\xF3))?n?|\\uFF45?\\uFF58\\uFF54\\uFF4E?|' +\n\t// \"доб.\"\n\t'\\u0434\\u043E\\u0431|' + '[' + single_extension_characters + ']|int|anexo|\\uFF49\\uFF4E\\uFF54)' + '[:\\\\.\\uFF0E]?[ \\xA0\\\\t,-]*' + CAPTURING_EXTN_DIGITS + '#?|' + '[- ]+([' + VALID_DIGITS + ']{1,5})#';\n}\n\n/**\r\n * Regexp of all possible ways to write extensions, for use when parsing. This\r\n * will be run as a case-insensitive regexp match. Wide character versions are\r\n * also provided after each ASCII version. There are three regular expressions\r\n * here. The first covers RFC 3966 format, where the extension is added using\r\n * ';ext='. The second more generic one starts with optional white space and\r\n * ends with an optional full stop (.), followed by zero or more spaces/tabs\r\n * /commas and then the numbers themselves. The other one covers the special\r\n * case of American numbers where the extension is written with a hash at the\r\n * end, such as '- 503#'. Note that the only capturing groups should be around\r\n * the digits that you want to capture as part of the extension, or else parsing\r\n * will fail! We allow two options for representing the accented o - the\r\n * character itself, and one in the unicode decomposed form with the combining\r\n * acute accent.\r\n */\nexport var EXTN_PATTERNS_FOR_PARSING = create_extension_pattern('parsing');\n\nexport var EXTN_PATTERNS_FOR_MATCHING = create_extension_pattern('matching');\n\n// Regexp of all known extension prefixes used by different regions followed by\n// 1 or more valid digits, for use when parsing.\nvar EXTN_PATTERN = new RegExp('(?:' + EXTN_PATTERNS_FOR_PARSING + ')$', 'i');\n\n// Strips any extension (as in, the part of the number dialled after the call is\n// connected, usually indicated with extn, ext, x or similar) from the end of\n// the number, and returns it.\nexport function extractExtension(number) {\n\tvar start = number.search(EXTN_PATTERN);\n\tif (start < 0) {\n\t\treturn {};\n\t}\n\n\t// If we find a potential extension, and the number preceding this is a viable\n\t// number, we assume it is an extension.\n\tvar number_without_extension = number.slice(0, start);\n\n\tvar matches = number.match(EXTN_PATTERN);\n\tvar i = 1;\n\twhile (i < matches.length) {\n\t\tif (matches[i] != null && matches[i].length > 0) {\n\t\t\treturn {\n\t\t\t\tnumber: number_without_extension,\n\t\t\t\text: matches[i]\n\t\t\t};\n\t\t}\n\t\ti++;\n\t}\n}\n//# sourceMappingURL=extension.js.map","import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from './constants';\n\nimport { EXTN_PATTERNS_FOR_PARSING } from './extension';\n\n// Regular expression of viable phone numbers. This is location independent.\n// Checks we have at least three leading digits, and only valid punctuation,\n// alpha characters and digits in the phone number. Does not include extension\n// data. The symbol 'x' is allowed here as valid punctuation since it is often\n// used as a placeholder for carrier codes, for example in Brazilian phone\n// numbers. We also allow multiple '+' characters at the start.\n//\n// Corresponds to the following:\n// [digits]{minLengthNsn}|\n// plus_sign*\n// (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*\n//\n// The first reg-ex is to allow short numbers (two digits long) to be parsed if\n// they are entered as \"15\" etc, but only if there is no punctuation in them.\n// The second expression restricts the number of digits to three or more, but\n// then allows them to be in international form, and to have alpha-characters\n// and punctuation. We split up the two reg-exes here and combine them when\n// creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it\n// with ^ and append $ to each branch.\n//\n// \"Note VALID_PUNCTUATION starts with a -,\n// so must be the first in the range\" (c) Google devs.\n// (wtf did they mean by saying that; probably nothing)\n//\nvar MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';\n//\n// And this is the second reg-exp:\n// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)\n//\nvar VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';\n\n// The combined regular expression for valid phone numbers:\n//\nvar VALID_PHONE_NUMBER_PATTERN = new RegExp(\n// Either a short two-digit-only phone number\n'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +\n// Or a longer fully parsed phone number (min 3 characters)\n'^' + VALID_PHONE_NUMBER +\n// Phone number extensions\n'(?:' + EXTN_PATTERNS_FOR_PARSING + ')?' + '$', 'i');\n\n// Checks to see if the string of characters could possibly be a phone number at\n// all. At the moment, checks to see that the string begins with at least 2\n// digits, ignoring any punctuation commonly found in phone numbers. This method\n// does not require the number to be normalized in advance - but does assume\n// that leading non-number symbols have been removed, such as by the method\n// `extract_possible_number`.\n//\nexport default function isViablePhoneNumber(number) {\n\treturn number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);\n}\n//# sourceMappingURL=isViablePhoneNumber.js.map","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\r\n * A port of Google's `PhoneNumberMatcher.java`.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java\r\n * Date: 08.03.2018.\r\n */\n\nimport PhoneNumber from './PhoneNumber';\n\nimport { MAX_LENGTH_FOR_NSN, MAX_LENGTH_COUNTRY_CODE, VALID_PUNCTUATION } from './constants';\n\nimport { EXTN_PATTERNS_FOR_MATCHING } from './extension';\n\nimport { limit, trimAfterFirstMatch } from './findNumbers/util';\n\nimport { _pL, _pN, pZ, PZ, pNd } from './findNumbers/utf-8';\n\nimport Leniency from './findNumbers/Leniency';\nimport parsePreCandidate from './findNumbers/parsePreCandidate';\nimport isValidPreCandidate from './findNumbers/isValidPreCandidate';\nimport isValidCandidate, { LEAD_CLASS } from './findNumbers/isValidCandidate';\n\nimport { isSupportedCountry } from './metadata';\n\nimport parseNumber from './parse_';\n\n/**\r\n * Patterns used to extract phone numbers from a larger phone-number-like pattern. These are\r\n * ordered according to specificity. For example, white-space is last since that is frequently\r\n * used in numbers, not just to separate two numbers. We have separate patterns since we don't\r\n * want to break up the phone-number-like text on more than one different kind of symbol at one\r\n * time, although symbols of the same type (e.g. space) can be safely grouped together.\r\n *\r\n * Note that if there is a match, we will always check any text found up to the first match as\r\n * well.\r\n */\nvar INNER_MATCHES = [\n// Breaks on the slash - e.g. \"651-234-2345/332-445-1234\"\n'\\\\/+(.*)/',\n\n// Note that the bracket here is inside the capturing group, since we consider it part of the\n// phone number. Will match a pattern like \"(650) 223 3345 (754) 223 3321\".\n'(\\\\([^(]*)',\n\n// Breaks on a hyphen - e.g. \"12345 - 332-445-1234 is my number.\"\n// We require a space on either side of the hyphen for it to be considered a separator.\n'(?:' + pZ + '-|-' + pZ + ')' + pZ + '*(.+)',\n\n// Various types of wide hyphens. Note we have decided not to enforce a space here, since it's\n// possible that it's supposed to be used to break two numbers without spaces, and we haven't\n// seen many instances of it used within a number.\n'[\\u2012-\\u2015\\uFF0D]' + pZ + '*(.+)',\n\n// Breaks on a full stop - e.g. \"12345. 332-445-1234 is my number.\"\n'\\\\.+' + pZ + '*([^.]+)',\n\n// Breaks on space - e.g. \"3324451234 8002341234\"\npZ + '+(' + PZ + '+)'];\n\n// Limit on the number of leading (plus) characters.\nvar leadLimit = limit(0, 2);\n\n// Limit on the number of consecutive punctuation characters.\nvar punctuationLimit = limit(0, 4);\n\n/* The maximum number of digits allowed in a digit-separated block. As we allow all digits in a\r\n * single block, set high enough to accommodate the entire national number and the international\r\n * country code. */\nvar digitBlockLimit = MAX_LENGTH_FOR_NSN + MAX_LENGTH_COUNTRY_CODE;\n\n// Limit on the number of blocks separated by punctuation.\n// Uses digitBlockLimit since some formats use spaces to separate each digit.\nvar blockLimit = limit(0, digitBlockLimit);\n\n/* A punctuation sequence allowing white space. */\nvar punctuation = '[' + VALID_PUNCTUATION + ']' + punctuationLimit;\n\n// A digits block without punctuation.\nvar digitSequence = pNd + limit(1, digitBlockLimit);\n\n/**\r\n * Phone number pattern allowing optional punctuation.\r\n * The phone number pattern used by `find()`, similar to\r\n * VALID_PHONE_NUMBER, but with the following differences:\r\n * \r\n */\nvar PATTERN = '(?:' + LEAD_CLASS + punctuation + ')' + leadLimit + digitSequence + '(?:' + punctuation + digitSequence + ')' + blockLimit + '(?:' + EXTN_PATTERNS_FOR_MATCHING + ')?';\n\n// Regular expression of trailing characters that we want to remove.\n// We remove all characters that are not alpha or numerical characters.\n// The hash character is retained here, as it may signify\n// the previous block was an extension.\n//\n// // Don't know what does '&&' mean here.\n// const UNWANTED_END_CHAR_PATTERN = new RegExp(`[[\\\\P{N}&&\\\\P{L}]&&[^#]]+$`)\n//\nvar UNWANTED_END_CHAR_PATTERN = new RegExp('[^' + _pN + _pL + '#]+$');\n\nvar NON_DIGITS_PATTERN = /(\\D+)/;\n\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1;\n\n/**\r\n * A stateful class that finds and extracts telephone numbers from {@linkplain CharSequence text}.\r\n * Instances can be created using the {@linkplain PhoneNumberUtil#findNumbers factory methods} in\r\n * {@link PhoneNumberUtil}.\r\n *\r\n *

Vanity numbers (phone numbers using alphabetic digits such as 1-800-SIX-FLAGS are\r\n * not found.\r\n *\r\n *

This class is not thread-safe.\r\n */\n\nvar PhoneNumberMatcher = function () {\n\n /**\r\n * Creates a new instance. See the factory methods in {@link PhoneNumberUtil} on how to obtain a\r\n * new instance.\r\n *\r\n * @param util the phone number util to use\r\n * @param text the character sequence that we will search, null for no text\r\n * @param country the country to assume for phone numbers not written in international format\r\n * (with a leading plus, or with the international dialing prefix of the specified region).\r\n * May be null or \"ZZ\" if only numbers with a leading plus should be\r\n * considered.\r\n * @param leniency the leniency to use when evaluating candidate phone numbers\r\n * @param maxTries the maximum number of invalid numbers to try before giving up on the text.\r\n * This is to cover degenerate cases where the text has a lot of false positives in it. Must\r\n * be {@code >= 0}.\r\n */\n\n /** The iteration tristate. */\n function PhoneNumberMatcher() {\n var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var metadata = arguments[2];\n\n _classCallCheck(this, PhoneNumberMatcher);\n\n this.state = 'NOT_READY';\n this.searchIndex = 0;\n\n options = _extends({}, options, {\n defaultCountry: options.defaultCountry && isSupportedCountry(options.defaultCountry, metadata) ? options.defaultCountry : undefined,\n leniency: options.leniency || options.extended ? 'POSSIBLE' : 'VALID',\n maxTries: options.maxTries || MAX_SAFE_INTEGER\n });\n\n if (!options.leniency) {\n throw new TypeError('`Leniency` not supplied');\n }\n\n if (options.maxTries < 0) {\n throw new TypeError('`maxTries` not supplied');\n }\n\n this.text = text;\n this.options = options;\n this.metadata = metadata;\n\n /** The degree of validation requested. */\n this.leniency = Leniency[options.leniency];\n\n if (!this.leniency) {\n throw new TypeError('Unknown leniency: ' + options.leniency + '.');\n }\n\n /** The maximum number of retries after matching an invalid number. */\n this.maxTries = options.maxTries;\n\n this.PATTERN = new RegExp(PATTERN, 'ig');\n }\n\n /**\r\n * Attempts to find the next subsequence in the searched sequence on or after {@code searchIndex}\r\n * that represents a phone number. Returns the next match, null if none was found.\r\n *\r\n * @param index the search index to start searching at\r\n * @return the phone number match found, null if none can be found\r\n */\n\n\n /** The next index to start searching at. Undefined in {@link State#DONE}. */\n\n\n _createClass(PhoneNumberMatcher, [{\n key: 'find',\n value: function find() // (index)\n {\n // // Reset the regular expression.\n // this.PATTERN.lastIndex = index\n\n var matches = void 0;\n while (this.maxTries > 0 && (matches = this.PATTERN.exec(this.text)) !== null) {\n var candidate = matches[0];\n var offset = matches.index;\n\n candidate = parsePreCandidate(candidate);\n\n if (isValidPreCandidate(candidate, offset, this.text)) {\n var match =\n // Try to come up with a valid match given the entire candidate.\n this.parseAndVerify(candidate, offset, this.text)\n // If that failed, try to find an \"inner match\" -\n // there might be a phone number within this candidate.\n || this.extractInnerMatch(candidate, offset, this.text);\n\n if (match) {\n if (this.options.v2) {\n var phoneNumber = new PhoneNumber(match.country, match.phone, this.metadata);\n if (match.ext) {\n phoneNumber.ext = match.ext;\n }\n return {\n startsAt: match.startsAt,\n endsAt: match.endsAt,\n number: phoneNumber\n };\n }\n return match;\n }\n }\n\n this.maxTries--;\n }\n }\n\n /**\r\n * Attempts to extract a match from `candidate`\r\n * if the whole candidate does not qualify as a match.\r\n */\n\n }, {\n key: 'extractInnerMatch',\n value: function extractInnerMatch(candidate, offset, text) {\n for (var _iterator = INNER_MATCHES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var innerMatchPattern = _ref;\n\n var isFirstMatch = true;\n var matches = void 0;\n var possibleInnerMatch = new RegExp(innerMatchPattern, 'g');\n while ((matches = possibleInnerMatch.exec(candidate)) !== null && this.maxTries > 0) {\n if (isFirstMatch) {\n // We should handle any group before this one too.\n var _group = trimAfterFirstMatch(UNWANTED_END_CHAR_PATTERN, candidate.slice(0, matches.index));\n\n var _match = this.parseAndVerify(_group, offset, text);\n if (_match) {\n return _match;\n }\n\n this.maxTries--;\n isFirstMatch = false;\n }\n\n var group = trimAfterFirstMatch(UNWANTED_END_CHAR_PATTERN, matches[1]);\n\n // Java code does `groupMatcher.start(1)` here,\n // but there's no way in javascript to get a group match start index,\n // therefore using the overall match start index `matches.index`.\n var match = this.parseAndVerify(group, offset + matches.index, text);\n if (match) {\n return match;\n }\n\n this.maxTries--;\n }\n }\n }\n\n /**\r\n * Parses a phone number from the `candidate` using `parseNumber` and\r\n * verifies it matches the requested `leniency`. If parsing and verification succeed,\r\n * a corresponding `PhoneNumberMatch` is returned, otherwise this method returns `null`.\r\n *\r\n * @param candidate the candidate match\r\n * @param offset the offset of {@code candidate} within {@link #text}\r\n * @return the parsed and validated phone number match, or null\r\n */\n\n }, {\n key: 'parseAndVerify',\n value: function parseAndVerify(candidate, offset, text) {\n if (!isValidCandidate(candidate, offset, text, this.options.leniency)) {\n return;\n }\n\n var number = parseNumber(candidate, {\n extended: true,\n defaultCountry: this.options.defaultCountry\n }, this.metadata);\n\n if (!number.possible) {\n return;\n }\n\n if (this.leniency(number, candidate, this.metadata)) {\n // // We used parseAndKeepRawInput to create this number,\n // // but for now we don't return the extra values parsed.\n // // TODO: stop clearing all values here and switch all users over\n // // to using rawInput() rather than the rawString() of PhoneNumberMatch.\n // number.clearCountryCodeSource()\n // number.clearRawInput()\n // number.clearPreferredDomesticCarrierCode()\n\n var result = {\n startsAt: offset,\n endsAt: offset + candidate.length,\n country: number.country,\n phone: number.phone\n };\n\n if (number.ext) {\n result.ext = number.ext;\n }\n\n return result;\n }\n }\n }, {\n key: 'hasNext',\n value: function hasNext() {\n if (this.state === 'NOT_READY') {\n this.lastMatch = this.find(); // (this.searchIndex)\n\n if (this.lastMatch) {\n // this.searchIndex = this.lastMatch.endsAt\n this.state = 'READY';\n } else {\n this.state = 'DONE';\n }\n }\n\n return this.state === 'READY';\n }\n }, {\n key: 'next',\n value: function next() {\n // Check the state and find the next match as a side-effect if necessary.\n if (!this.hasNext()) {\n throw new Error('No next element');\n }\n\n // Don't retain that memory any longer than necessary.\n var result = this.lastMatch;\n this.lastMatch = null;\n this.state = 'NOT_READY';\n return result;\n }\n }]);\n\n return PhoneNumberMatcher;\n}();\n\nexport default PhoneNumberMatcher;\n//# sourceMappingURL=PhoneNumberMatcher.js.map","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nimport isViablePhoneNumber from './isViablePhoneNumber';\nimport _getNumberType from './getNumberType_';\nimport parse from './parse_';\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t input = _normalizeArguments.input,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _getNumberType(input, options, metadata);\n}\n\n// Sort out arguments\nexport function normalizeArguments(args) {\n\tvar _Array$prototype$slic = Array.prototype.slice.call(args),\n\t _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n\t arg_1 = _Array$prototype$slic2[0],\n\t arg_2 = _Array$prototype$slic2[1],\n\t arg_3 = _Array$prototype$slic2[2],\n\t arg_4 = _Array$prototype$slic2[3];\n\n\tvar input = void 0;\n\tvar options = {};\n\tvar metadata = void 0;\n\n\t// If the phone number is passed as a string.\n\t// `getNumberType('88005553535', ...)`.\n\tif (typeof arg_1 === 'string') {\n\t\t// If \"default country\" argument is being passed\n\t\t// then convert it to an `options` object.\n\t\t// `getNumberType('88005553535', 'RU', metadata)`.\n\t\tif ((typeof arg_2 === 'undefined' ? 'undefined' : _typeof(arg_2)) !== 'object') {\n\t\t\tif (arg_4) {\n\t\t\t\toptions = arg_3;\n\t\t\t\tmetadata = arg_4;\n\t\t\t} else {\n\t\t\t\tmetadata = arg_3;\n\t\t\t}\n\n\t\t\t// `parse` extracts phone numbers from raw text,\n\t\t\t// therefore it will cut off all \"garbage\" characters,\n\t\t\t// while this `validate` function needs to verify\n\t\t\t// that the phone number contains no \"garbage\"\n\t\t\t// therefore the explicit `isViablePhoneNumber` check.\n\t\t\tif (isViablePhoneNumber(arg_1)) {\n\t\t\t\tinput = parse(arg_1, { defaultCountry: arg_2 }, metadata);\n\t\t\t} else {\n\t\t\t\tinput = {};\n\t\t\t}\n\t\t}\n\t\t// No \"resrict country\" argument is being passed.\n\t\t// International phone number is passed.\n\t\t// `getNumberType('+78005553535', metadata)`.\n\t\telse {\n\t\t\t\tif (arg_3) {\n\t\t\t\t\toptions = arg_2;\n\t\t\t\t\tmetadata = arg_3;\n\t\t\t\t} else {\n\t\t\t\t\tmetadata = arg_2;\n\t\t\t\t}\n\n\t\t\t\t// `parse` extracts phone numbers from raw text,\n\t\t\t\t// therefore it will cut off all \"garbage\" characters,\n\t\t\t\t// while this `validate` function needs to verify\n\t\t\t\t// that the phone number contains no \"garbage\"\n\t\t\t\t// therefore the explicit `isViablePhoneNumber` check.\n\t\t\t\tif (isViablePhoneNumber(arg_1)) {\n\t\t\t\t\tinput = parse(arg_1, undefined, metadata);\n\t\t\t\t} else {\n\t\t\t\t\tinput = {};\n\t\t\t\t}\n\t\t\t}\n\t}\n\t// If the phone number is passed as a parsed phone number.\n\t// `getNumberType({ phone: '88005553535', country: 'RU' }, ...)`.\n\telse if (is_object(arg_1)) {\n\t\t\tinput = arg_1;\n\n\t\t\tif (arg_3) {\n\t\t\t\toptions = arg_2;\n\t\t\t\tmetadata = arg_3;\n\t\t\t} else {\n\t\t\t\tmetadata = arg_2;\n\t\t\t}\n\t\t} else throw new TypeError('A phone number must either be a string or an object of shape { phone, [country] }.');\n\n\treturn {\n\t\tinput: input,\n\t\toptions: options,\n\t\tmetadata: metadata\n\t};\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nvar is_object = function is_object(_) {\n\treturn (typeof _ === 'undefined' ? 'undefined' : _typeof(_)) === 'object';\n};\n//# sourceMappingURL=getNumberType.js.map","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport { VALID_PUNCTUATION } from './constants';\nimport { matchesEntirely } from './util';\nimport Metadata from './metadata';\nimport { getIDDPrefix } from './IDD';\nimport { formatRFC3966 } from './RFC3966';\n\nvar defaultOptions = {\n\tformatExtension: function formatExtension(formattedNumber, extension, metadata) {\n\t\treturn '' + formattedNumber + metadata.ext() + extension;\n\t}\n\n\t// Formats a phone number\n\t//\n\t// Example use cases:\n\t//\n\t// ```js\n\t// formatNumber('8005553535', 'RU', 'INTERNATIONAL')\n\t// formatNumber('8005553535', 'RU', 'INTERNATIONAL', metadata)\n\t// formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL')\n\t// formatNumber({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', metadata)\n\t// formatNumber('+78005553535', 'NATIONAL')\n\t// formatNumber('+78005553535', 'NATIONAL', metadata)\n\t// ```\n\t//\n};export default function formatNumber(input, format, options, metadata) {\n\t// Apply default options.\n\tif (options) {\n\t\toptions = _extends({}, defaultOptions, options);\n\t} else {\n\t\toptions = defaultOptions;\n\t}\n\n\tmetadata = new Metadata(metadata);\n\n\tif (input.country) {\n\t\t// Validate `input.country`.\n\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\tthrow new Error('Unknown country: ' + input.country);\n\t\t}\n\t\tmetadata.country(input.country);\n\t} else if (input.countryCallingCode) {\n\t\tmetadata.chooseCountryByCountryCallingCode(input.countryCallingCode);\n\t} else return input.phone || '';\n\n\tvar countryCallingCode = metadata.countryCallingCode();\n\n\tvar nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n\n\t// This variable should have been declared inside `case`s\n\t// but Babel has a bug and it says \"duplicate variable declaration\".\n\tvar number = void 0;\n\n\tswitch (format) {\n\t\tcase 'NATIONAL':\n\t\t\t// Legacy argument support.\n\t\t\t// (`{ country: ..., phone: '' }`)\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tnumber = format_national_number(nationalNumber, 'NATIONAL', metadata);\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension);\n\n\t\tcase 'INTERNATIONAL':\n\t\t\t// Legacy argument support.\n\t\t\t// (`{ country: ..., phone: '' }`)\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn '+' + countryCallingCode;\n\t\t\t}\n\t\t\tnumber = format_national_number(nationalNumber, 'INTERNATIONAL', metadata);\n\t\t\tnumber = '+' + countryCallingCode + ' ' + number;\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension);\n\n\t\tcase 'E.164':\n\t\t\t// `E.164` doesn't define \"phone number extensions\".\n\t\t\treturn '+' + countryCallingCode + nationalNumber;\n\n\t\tcase 'RFC3966':\n\t\t\treturn formatRFC3966({\n\t\t\t\tnumber: '+' + countryCallingCode + nationalNumber,\n\t\t\t\text: input.ext\n\t\t\t});\n\n\t\tcase 'IDD':\n\t\t\tif (!options.fromCountry) {\n\t\t\t\treturn;\n\t\t\t\t// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\n\t\t\t}\n\t\t\tvar IDDPrefix = getIDDPrefix(options.fromCountry, metadata.metadata);\n\t\t\tif (!IDDPrefix) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (options.humanReadable) {\n\t\t\t\tvar formattedForSameCountryCallingCode = countryCallingCode && formatIDDSameCountryCallingCodeNumber(nationalNumber, metadata.countryCallingCode(), options.fromCountry, metadata);\n\t\t\t\tif (formattedForSameCountryCallingCode) {\n\t\t\t\t\tnumber = formattedForSameCountryCallingCode;\n\t\t\t\t} else {\n\t\t\t\t\tnumber = IDDPrefix + ' ' + countryCallingCode + ' ' + format_national_number(nationalNumber, 'INTERNATIONAL', metadata);\n\t\t\t\t}\n\t\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension);\n\t\t\t}\n\t\t\treturn '' + IDDPrefix + countryCallingCode + nationalNumber;\n\n\t\tdefault:\n\t\t\tthrow new Error('Unknown \"format\" argument passed to \"formatNumber()\": \"' + format + '\"');\n\t}\n}\n\n// This was originally set to $1 but there are some countries for which the\n// first group is not used in the national pattern (e.g. Argentina) so the $1\n// group does not match correctly. Therefore, we use \\d, so that the first\n// group actually used in the pattern will be matched.\nexport var FIRST_GROUP_PATTERN = /(\\$\\d)/;\n\nexport function format_national_number_using_format(number, format, useInternationalFormat, includeNationalPrefixForNationalFormat, metadata) {\n\tvar formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : format.nationalPrefixFormattingRule() && (!format.nationalPrefixIsOptionalWhenFormatting() || includeNationalPrefixForNationalFormat) ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());\n\n\tif (useInternationalFormat) {\n\t\treturn changeInternationalFormatStyle(formattedNumber);\n\t}\n\n\treturn formattedNumber;\n}\n\nfunction format_national_number(number, format_as, metadata) {\n\tvar format = choose_format_for_number(metadata.formats(), number);\n\tif (!format) {\n\t\treturn number;\n\t}\n\treturn format_national_number_using_format(number, format, format_as === 'INTERNATIONAL', true, metadata);\n}\n\nexport function choose_format_for_number(available_formats, national_number) {\n\tfor (var _iterator = available_formats, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar format = _ref;\n\n\t\t// Validate leading digits\n\t\tif (format.leadingDigitsPatterns().length > 0) {\n\t\t\t// The last leading_digits_pattern is used here, as it is the most detailed\n\t\t\tvar last_leading_digits_pattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1];\n\n\t\t\t// If leading digits don't match then move on to the next phone number format\n\t\t\tif (national_number.search(last_leading_digits_pattern) !== 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Check that the national number matches the phone number format regular expression\n\t\tif (matchesEntirely(national_number, format.pattern())) {\n\t\t\treturn format;\n\t\t}\n\t}\n}\n\n// Removes brackets and replaces dashes with spaces.\n//\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\n//\n// For some reason Google's metadata contains ``s with brackets and dashes.\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\n//\n// For example, Google's `` for USA is `+1 213-373-4253`.\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\n//\n// \"The country calling code for all countries participating in the NANP is 1.\n// In international format, an NANP number should be listed as +1 301 555 01 00,\n// where 301 is an area code (Maryland).\"\n//\n// I personally prefer the international format without any punctuation.\n// For example, brackets are remnants of the old age, meaning that the\n// phone number part in brackets (so called \"area code\") can be omitted\n// if dialing within the same \"area\".\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\n// He has a couple of seconds to memorize that number until it passes by.\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\n// but with hyphens instead of spaces the grouping is more explicit.\n// I personally think that hyphens introduce visual clutter,\n// so I prefer replacing them with spaces in international numbers.\n// In the modern age all output is done on displays where spaces are clearly distinguishable\n// so hyphens can be safely replaced with spaces without losing any legibility.\n//\nexport function changeInternationalFormatStyle(local) {\n\treturn local.replace(new RegExp('[' + VALID_PUNCTUATION + ']+', 'g'), ' ').trim();\n}\n\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\n\treturn ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;\n}\n\nexport function formatIDDSameCountryCallingCodeNumber(number, toCountryCallingCode, fromCountry, toCountryMetadata) {\n\tvar fromCountryMetadata = new Metadata(toCountryMetadata.metadata);\n\tfromCountryMetadata.country(fromCountry);\n\n\t// If calling within the same country calling code.\n\tif (toCountryCallingCode === fromCountryMetadata.countryCallingCode()) {\n\t\t// For NANPA regions, return the national format for these regions\n\t\t// but prefix it with the country calling code.\n\t\tif (toCountryCallingCode === '1') {\n\t\t\treturn toCountryCallingCode + ' ' + format_national_number(number, 'NATIONAL', toCountryMetadata);\n\t\t}\n\n\t\t// If regions share a country calling code, the country calling code need\n\t\t// not be dialled. This also applies when dialling within a region, so this\n\t\t// if clause covers both these cases. Technically this is the case for\n\t\t// dialling from La Reunion to other overseas departments of France (French\n\t\t// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\n\t\t// this edge case for now and for those cases return the version including\n\t\t// country calling code. Details here:\n\t\t// http://www.petitfute.com/voyage/225-info-pratiques-reunion\n\t\t//\n\t\treturn format_national_number(number, 'NATIONAL', toCountryMetadata);\n\t}\n}\n//# sourceMappingURL=format_.js.map","var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nimport isViablePhoneNumber from './isViablePhoneNumber';\n\n// https://www.ietf.org/rfc/rfc3966.txt\n\n/**\r\n * @param {string} text - Phone URI (RFC 3966).\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nexport function parseRFC3966(text) {\n\tvar number = void 0;\n\tvar ext = void 0;\n\n\t// Replace \"tel:\" with \"tel=\" for parsing convenience.\n\ttext = text.replace(/^tel:/, 'tel=');\n\n\tfor (var _iterator = text.split(';'), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar part = _ref;\n\n\t\tvar _part$split = part.split('='),\n\t\t _part$split2 = _slicedToArray(_part$split, 2),\n\t\t name = _part$split2[0],\n\t\t value = _part$split2[1];\n\n\t\tswitch (name) {\n\t\t\tcase 'tel':\n\t\t\t\tnumber = value;\n\t\t\t\tbreak;\n\t\t\tcase 'ext':\n\t\t\t\text = value;\n\t\t\t\tbreak;\n\t\t\tcase 'phone-context':\n\t\t\t\t// Only \"country contexts\" are supported.\n\t\t\t\t// \"Domain contexts\" are ignored.\n\t\t\t\tif (value[0] === '+') {\n\t\t\t\t\tnumber = value + number;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t// If the phone number is not viable, then abort.\n\tif (!isViablePhoneNumber(number)) {\n\t\treturn {};\n\t}\n\n\tvar result = { number: number };\n\tif (ext) {\n\t\tresult.ext = ext;\n\t}\n\treturn result;\n}\n\n/**\r\n * @param {object} - `{ ?number, ?extension }`.\r\n * @return {string} Phone URI (RFC 3966).\r\n */\nexport function formatRFC3966(_ref2) {\n\tvar number = _ref2.number,\n\t ext = _ref2.ext;\n\n\tif (!number) {\n\t\treturn '';\n\t}\n\n\tif (number[0] !== '+') {\n\t\tthrow new Error('\"formatRFC3966()\" expects \"number\" to be in E.164 format.');\n\t}\n\n\treturn 'tel:' + number + (ext ? ';ext=' + ext : '');\n}\n//# sourceMappingURL=RFC3966.js.map","import Metadata from './metadata';\nimport { checkNumberLengthForType } from './getNumberType_';\n\nexport default function isPossibleNumber(input, options, metadata) {\n\t/* istanbul ignore if */\n\tif (options === undefined) {\n\t\toptions = {};\n\t}\n\n\tmetadata = new Metadata(metadata);\n\n\tif (options.v2) {\n\t\tif (!input.countryCallingCode) {\n\t\t\tthrow new Error('Invalid phone number object passed');\n\t\t}\n\t\tmetadata.chooseCountryByCountryCallingCode(input.countryCallingCode);\n\t} else {\n\t\tif (!input.phone) {\n\t\t\treturn false;\n\t\t}\n\t\tif (input.country) {\n\t\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\t\tthrow new Error('Unknown country: ' + input.country);\n\t\t\t}\n\t\t\tmetadata.country(input.country);\n\t\t} else {\n\t\t\tif (!input.countryCallingCode) {\n\t\t\t\tthrow new Error('Invalid phone number object passed');\n\t\t\t}\n\t\t\tmetadata.chooseCountryByCountryCallingCode(input.countryCallingCode);\n\t\t}\n\t}\n\n\tif (!metadata.possibleLengths()) {\n\t\tthrow new Error('Metadata too old');\n\t}\n\n\treturn is_possible_number(input.phone || input.nationalNumber, undefined, metadata);\n}\n\nexport function is_possible_number(national_number, is_international, metadata) {\n\tswitch (checkNumberLengthForType(national_number, undefined, metadata)) {\n\t\tcase 'IS_POSSIBLE':\n\t\t\treturn true;\n\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t// \treturn !is_international\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n//# sourceMappingURL=isPossibleNumber_.js.map","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// https://stackoverflow.com/a/46971044/970769\nvar ParseError = function ParseError(code) {\n _classCallCheck(this, ParseError);\n\n this.name = this.constructor.name;\n this.message = code;\n this.stack = new Error(code).stack;\n};\n\nexport default ParseError;\n\n\nParseError.prototype = Object.create(Error.prototype);\nParseError.prototype.constructor = ParseError;\n//# sourceMappingURL=ParseError.js.map","// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport var DIGITS = {\n\t'0': '0',\n\t'1': '1',\n\t'2': '2',\n\t'3': '3',\n\t'4': '4',\n\t'5': '5',\n\t'6': '6',\n\t'7': '7',\n\t'8': '8',\n\t'9': '9',\n\t'\\uFF10': '0', // Fullwidth digit 0\n\t'\\uFF11': '1', // Fullwidth digit 1\n\t'\\uFF12': '2', // Fullwidth digit 2\n\t'\\uFF13': '3', // Fullwidth digit 3\n\t'\\uFF14': '4', // Fullwidth digit 4\n\t'\\uFF15': '5', // Fullwidth digit 5\n\t'\\uFF16': '6', // Fullwidth digit 6\n\t'\\uFF17': '7', // Fullwidth digit 7\n\t'\\uFF18': '8', // Fullwidth digit 8\n\t'\\uFF19': '9', // Fullwidth digit 9\n\t'\\u0660': '0', // Arabic-indic digit 0\n\t'\\u0661': '1', // Arabic-indic digit 1\n\t'\\u0662': '2', // Arabic-indic digit 2\n\t'\\u0663': '3', // Arabic-indic digit 3\n\t'\\u0664': '4', // Arabic-indic digit 4\n\t'\\u0665': '5', // Arabic-indic digit 5\n\t'\\u0666': '6', // Arabic-indic digit 6\n\t'\\u0667': '7', // Arabic-indic digit 7\n\t'\\u0668': '8', // Arabic-indic digit 8\n\t'\\u0669': '9', // Arabic-indic digit 9\n\t'\\u06F0': '0', // Eastern-Arabic digit 0\n\t'\\u06F1': '1', // Eastern-Arabic digit 1\n\t'\\u06F2': '2', // Eastern-Arabic digit 2\n\t'\\u06F3': '3', // Eastern-Arabic digit 3\n\t'\\u06F4': '4', // Eastern-Arabic digit 4\n\t'\\u06F5': '5', // Eastern-Arabic digit 5\n\t'\\u06F6': '6', // Eastern-Arabic digit 6\n\t'\\u06F7': '7', // Eastern-Arabic digit 7\n\t'\\u06F8': '8', // Eastern-Arabic digit 8\n\t'\\u06F9': '9' // Eastern-Arabic digit 9\n};\n\nexport function parseDigit(character) {\n\treturn DIGITS[character];\n}\n\n/**\r\n * Parses phone number digits from a string.\r\n * Drops all punctuation leaving only digits.\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseDigits('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * ```\r\n */\nexport default function parseDigits(string) {\n\tvar result = '';\n\n\t// Using `.split('')` here instead of normal `for ... of`\n\t// because the importing application doesn't neccessarily include an ES6 polyfill.\n\t// The `.split('')` approach discards \"exotic\" UTF-8 characters\n\t// (the ones consisting of four bytes) but digits\n\t// (including non-European ones) don't fall into that range\n\t// so such \"exotic\" characters would be discarded anyway.\n\tfor (var _iterator = string.split(''), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar character = _ref;\n\n\t\tvar digit = parseDigit(character);\n\t\tif (digit) {\n\t\t\tresult += digit;\n\t\t}\n\t}\n\n\treturn result;\n}\n//# sourceMappingURL=parseDigits.js.map","import { parseDigit } from './parseDigits';\n\n/**\r\n * Parses phone number characters from a string.\r\n * Drops all punctuation leaving only digits and the leading `+` sign (if any).\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseIncompletePhoneNumber('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * parseIncompletePhoneNumber('+7 800 555')\r\n * // Outputs '+7800555'.\r\n * ```\r\n */\nexport default function parseIncompletePhoneNumber(string) {\n\tvar result = '';\n\n\t// Using `.split('')` here instead of normal `for ... of`\n\t// because the importing application doesn't neccessarily include an ES6 polyfill.\n\t// The `.split('')` approach discards \"exotic\" UTF-8 characters\n\t// (the ones consisting of four bytes) but digits\n\t// (including non-European ones) don't fall into that range\n\t// so such \"exotic\" characters would be discarded anyway.\n\tfor (var _iterator = string.split(''), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\tvar _ref;\n\n\t\tif (_isArray) {\n\t\t\tif (_i >= _iterator.length) break;\n\t\t\t_ref = _iterator[_i++];\n\t\t} else {\n\t\t\t_i = _iterator.next();\n\t\t\tif (_i.done) break;\n\t\t\t_ref = _i.value;\n\t\t}\n\n\t\tvar character = _ref;\n\n\t\tresult += parsePhoneNumberCharacter(character, result) || '';\n\t}\n\n\treturn result;\n}\n\n/**\r\n * `input-format` `parse()` function.\r\n * https://github.com/catamphetamine/input-format\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string} value - The value parsed so far.\r\n * @param {object} meta - Optional custom use-case-specific metadata.\r\n * @return {string?} The parsed character.\r\n */\nexport function parsePhoneNumberCharacter(character, value) {\n\t// Only allow a leading `+`.\n\tif (character === '+') {\n\t\t// If this `+` is not the first parsed character\n\t\t// then discard it.\n\t\tif (value) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn '+';\n\t}\n\n\t// Allow digits.\n\treturn parseDigit(character);\n}\n//# sourceMappingURL=parseIncompletePhoneNumber.js.map","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// This is an enhanced port of Google Android `libphonenumber`'s\n// `asyoutypeformatter.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/blob/8d21a365061de2ba0675c878a710a7b24f74d2ae/javascript/i18n/phonenumbers/asyoutypeformatter.js\n//\n// Simplified: does not differentiate between \"local-only\" numbers\n// and \"internationally dialable\" numbers.\n// For example, doesn't include changes like this:\n// https://github.com/googlei18n/libphonenumber/commit/865da605da12b01053c4f053310bac7c5fbb7935\n\nimport Metadata from './metadata';\n\nimport PhoneNumber from './PhoneNumber';\n\nimport { VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from './constants';\n\nimport { matchesEntirely } from './util';\n\nimport { extractCountryCallingCode as _extractCountryCallingCode, extract_formatted_phone_number, find_country_code, strip_national_prefix_and_carrier_code } from './parse_';\n\nimport { FIRST_GROUP_PATTERN, format_national_number_using_format, changeInternationalFormatStyle } from './format_';\n\nimport { checkNumberLengthForType } from './getNumberType_';\n\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber';\n\n// Used in phone number format template creation.\n// Could be any digit, I guess.\nvar DUMMY_DIGIT = '9';\n// I don't know why is it exactly `15`\nvar LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15;\n// Create a phone number consisting only of the digit 9 that matches the\n// `number_pattern` by applying the pattern to the \"longest phone number\" string.\nvar LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH);\n\n// The digits that have not been entered yet will be represented by a \\u2008,\n// the punctuation space.\nexport var DIGIT_PLACEHOLDER = 'x'; // '\\u2008' (punctuation space)\nvar DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER);\n\n// Deprecated: Google has removed some formatting pattern related code from their repo.\n// https://github.com/googlei18n/libphonenumber/commit/a395b4fef3caf57c4bc5f082e1152a4d2bd0ba4c\n// Because this library supports generating custom metadata\n// some users may still be using old metadata so the relevant\n// code seems to stay until some next major version update.\nvar SUPPORT_LEGACY_FORMATTING_PATTERNS = true;\n\n// A pattern that is used to match character classes in regular expressions.\n// An example of a character class is \"[1-4]\".\nvar CREATE_CHARACTER_CLASS_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function () {\n\treturn (/\\[([^\\[\\]])*\\]/g\n\t);\n};\n\n// Any digit in a regular expression that actually denotes a digit. For\n// example, in the regular expression \"80[0-2]\\d{6,10}\", the first 2 digits\n// (8 and 0) are standalone digits, but the rest are not.\n// Two look-aheads are needed because the number following \\\\d could be a\n// two-digit number, since the phone number can be as long as 15 digits.\nvar CREATE_STANDALONE_DIGIT_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function () {\n\treturn (/\\d(?=[^,}][^,}])/g\n\t);\n};\n\n// A pattern that is used to determine if a `format` is eligible\n// to be used by the \"as you type formatter\".\n// It is eligible when the `format` contains groups of the dollar sign\n// followed by a single digit, separated by valid phone number punctuation.\n// This prevents invalid punctuation (such as the star sign in Israeli star numbers)\n// getting into the output of the \"as you type formatter\".\nvar ELIGIBLE_FORMAT_PATTERN = new RegExp('^' + '[' + VALID_PUNCTUATION + ']*' + '(\\\\$\\\\d[' + VALID_PUNCTUATION + ']*)+' + '$');\n\n// This is the minimum length of the leading digits of a phone number\n// to guarantee the first \"leading digits pattern\" for a phone number format\n// to be preemptive.\nvar MIN_LEADING_DIGITS_LENGTH = 3;\n\nvar VALID_INCOMPLETE_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';\n\nvar VALID_INCOMPLETE_PHONE_NUMBER_PATTERN = new RegExp('^' + VALID_INCOMPLETE_PHONE_NUMBER + '$', 'i');\n\nvar AsYouType = function () {\n\n\t/**\r\n * @param {string?} [defaultCountry] - The default country used for parsing non-international phone numbers.\r\n * @param {Object} metadata\r\n */\n\tfunction AsYouType(defaultCountry, metadata) {\n\t\t_classCallCheck(this, AsYouType);\n\n\t\tthis.options = {};\n\n\t\tthis.metadata = new Metadata(metadata);\n\n\t\tif (defaultCountry && this.metadata.hasCountry(defaultCountry)) {\n\t\t\tthis.defaultCountry = defaultCountry;\n\t\t}\n\n\t\tthis.reset();\n\t}\n\t// Not setting `options` to a constructor argument\n\t// not to break backwards compatibility\n\t// for older versions of the library.\n\n\n\t_createClass(AsYouType, [{\n\t\tkey: 'input',\n\t\tvalue: function input(text) {\n\t\t\t// Parse input\n\n\t\t\tvar extracted_number = extract_formatted_phone_number(text) || '';\n\n\t\t\t// Special case for a lone '+' sign\n\t\t\t// since it's not considered a possible phone number.\n\t\t\tif (!extracted_number) {\n\t\t\t\tif (text && text.indexOf('+') >= 0) {\n\t\t\t\t\textracted_number = '+';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Validate possible first part of a phone number\n\t\t\tif (!VALID_INCOMPLETE_PHONE_NUMBER_PATTERN.test(extracted_number)) {\n\t\t\t\treturn this.currentOutput;\n\t\t\t}\n\n\t\t\treturn this.processInput(parseIncompletePhoneNumber(extracted_number));\n\t\t}\n\t}, {\n\t\tkey: 'processInput',\n\t\tvalue: function processInput(input) {\n\t\t\t// If an out of position '+' sign detected\n\t\t\t// (or a second '+' sign),\n\t\t\t// then just drop it from the input.\n\t\t\tif (input[0] === '+') {\n\t\t\t\tif (!this.parsedInput) {\n\t\t\t\t\tthis.parsedInput += '+';\n\n\t\t\t\t\t// If a default country was set\n\t\t\t\t\t// then reset it because an explicitly international\n\t\t\t\t\t// phone number is being entered\n\t\t\t\t\tthis.resetCountriness();\n\t\t\t\t}\n\n\t\t\t\tinput = input.slice(1);\n\t\t\t}\n\n\t\t\t// Raw phone number\n\t\t\tthis.parsedInput += input;\n\n\t\t\t// // Reset phone number validation state\n\t\t\t// this.valid = false\n\n\t\t\t// Add digits to the national number\n\t\t\tthis.nationalNumber += input;\n\n\t\t\t// TODO: Deprecated: rename `this.nationalNumber`\n\t\t\t// to `this.nationalNumber` and remove `.getNationalNumber()`.\n\n\t\t\t// Try to format the parsed input\n\n\t\t\tif (this.isInternational()) {\n\t\t\t\tif (!this.countryCallingCode) {\n\t\t\t\t\t// Extract country calling code from the digits entered so far.\n\n\t\t\t\t\t// There must be some digits in order to extract anything from them.\n\t\t\t\t\tif (!this.nationalNumber) {\n\t\t\t\t\t\t// Return raw phone number\n\t\t\t\t\t\treturn this.parsedInput;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If one looks at country phone codes\n\t\t\t\t\t// then he can notice that no one country phone code\n\t\t\t\t\t// is ever a (leftmost) substring of another country phone code.\n\t\t\t\t\t// So if a valid country code is extracted so far\n\t\t\t\t\t// then it means that this is the country code.\n\n\t\t\t\t\t// If no country phone code could be extracted so far,\n\t\t\t\t\t// then just return the raw phone number,\n\t\t\t\t\t// because it has no way of knowing\n\t\t\t\t\t// how to format the phone number so far.\n\t\t\t\t\tif (!this.extractCountryCallingCode()) {\n\t\t\t\t\t\t// Return raw phone number\n\t\t\t\t\t\treturn this.parsedInput;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Initialize country-specific data\n\t\t\t\t\tthis.initialize_phone_number_formats_for_this_country_calling_code();\n\t\t\t\t\tthis.resetFormat();\n\t\t\t\t\tthis.determineTheCountry();\n\t\t\t\t}\n\t\t\t\t// `this.country` could be `undefined`,\n\t\t\t\t// for instance, when there is ambiguity\n\t\t\t\t// in a form of several different countries\n\t\t\t\t// each corresponding to the same country phone code\n\t\t\t\t// (e.g. NANPA: USA, Canada, etc),\n\t\t\t\t// and there's not enough digits entered\n\t\t\t\t// to reliably determine the country\n\t\t\t\t// the phone number belongs to.\n\t\t\t\t// Therefore, in cases of such ambiguity,\n\t\t\t\t// each time something is input,\n\t\t\t\t// try to determine the country\n\t\t\t\t// (if it's not determined yet).\n\t\t\t\telse if (!this.country) {\n\t\t\t\t\t\tthis.determineTheCountry();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Some national prefixes are substrings of other national prefixes\n\t\t\t\t// (for the same country), therefore try to extract national prefix each time\n\t\t\t\t// because a longer national prefix might be available at some point in time.\n\n\t\t\t\tvar previous_national_prefix = this.nationalPrefix;\n\t\t\t\tthis.nationalNumber = this.nationalPrefix + this.nationalNumber;\n\n\t\t\t\t// Possibly extract a national prefix\n\t\t\t\tthis.extractNationalPrefix();\n\n\t\t\t\tif (this.nationalPrefix !== previous_national_prefix) {\n\t\t\t\t\t// National number has changed\n\t\t\t\t\t// (due to another national prefix been extracted)\n\t\t\t\t\t// therefore national number has changed\n\t\t\t\t\t// therefore reset all previous formatting data.\n\t\t\t\t\t// (and leading digits matching state)\n\t\t\t\t\tthis.matching_formats = undefined;\n\t\t\t\t\tthis.resetFormat();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if (!this.shouldFormat())\n\t\t\t// {\n\t\t\t// \treturn this.format_as_non_formatted_number()\n\t\t\t// }\n\n\t\t\tif (!this.nationalNumber) {\n\t\t\t\treturn this.format_as_non_formatted_number();\n\t\t\t}\n\n\t\t\t// Check the available phone number formats\n\t\t\t// based on the currently available leading digits.\n\t\t\tthis.match_formats_by_leading_digits();\n\n\t\t\t// Format the phone number (given the next digits)\n\t\t\tvar formatted_national_phone_number = this.formatNationalNumber(input);\n\n\t\t\t// If the phone number could be formatted,\n\t\t\t// then return it, possibly prepending with country phone code\n\t\t\t// (for international phone numbers only)\n\t\t\tif (formatted_national_phone_number) {\n\t\t\t\treturn this.formatFullNumber(formatted_national_phone_number);\n\t\t\t}\n\n\t\t\t// If the phone number couldn't be formatted,\n\t\t\t// then just fall back to the raw phone number.\n\t\t\treturn this.format_as_non_formatted_number();\n\t\t}\n\t}, {\n\t\tkey: 'format_as_non_formatted_number',\n\t\tvalue: function format_as_non_formatted_number() {\n\t\t\t// Strip national prefix for incorrectly inputted international phones.\n\t\t\tif (this.isInternational() && this.countryCallingCode) {\n\t\t\t\treturn '+' + this.countryCallingCode + this.nationalNumber;\n\t\t\t}\n\n\t\t\treturn this.parsedInput;\n\t\t}\n\t}, {\n\t\tkey: 'formatNationalNumber',\n\t\tvalue: function formatNationalNumber(next_digits) {\n\t\t\t// Format the next phone number digits\n\t\t\t// using the previously chosen phone number format.\n\t\t\t//\n\t\t\t// This is done here because if `attempt_to_format_complete_phone_number`\n\t\t\t// was placed before this call then the `template`\n\t\t\t// wouldn't reflect the situation correctly (and would therefore be inconsistent)\n\t\t\t//\n\t\t\tvar national_number_formatted_with_previous_format = void 0;\n\t\t\tif (this.chosenFormat) {\n\t\t\t\tnational_number_formatted_with_previous_format = this.formatNextNationalNumberDigits(next_digits);\n\t\t\t}\n\n\t\t\t// See if the input digits can be formatted properly already. If not,\n\t\t\t// use the results from formatNextNationalNumberDigits(), which does formatting\n\t\t\t// based on the formatting pattern chosen.\n\n\t\t\tvar formatted_number = this.attempt_to_format_complete_phone_number();\n\n\t\t\t// Just because a phone number doesn't have a suitable format\n\t\t\t// that doesn't mean that the phone is invalid\n\t\t\t// because phone number formats only format phone numbers,\n\t\t\t// they don't validate them and some (rare) phone numbers\n\t\t\t// are meant to stay non-formatted.\n\t\t\tif (formatted_number) {\n\t\t\t\treturn formatted_number;\n\t\t\t}\n\n\t\t\t// For some phone number formats national prefix\n\n\t\t\t// If the previously chosen phone number format\n\t\t\t// didn't match the next (current) digit being input\n\t\t\t// (leading digits pattern didn't match).\n\t\t\tif (this.chooseAnotherFormat()) {\n\t\t\t\t// And a more appropriate phone number format\n\t\t\t\t// has been chosen for these `leading digits`,\n\t\t\t\t// then format the national phone number (so far)\n\t\t\t\t// using the newly selected phone number pattern.\n\n\t\t\t\t// Will return `undefined` if it couldn't format\n\t\t\t\t// the supplied national number\n\t\t\t\t// using the selected phone number pattern.\n\n\t\t\t\treturn this.reformatNationalNumber();\n\t\t\t}\n\n\t\t\t// If could format the next (current) digit\n\t\t\t// using the previously chosen phone number format\n\t\t\t// then return the formatted number so far.\n\n\t\t\t// If no new phone number format could be chosen,\n\t\t\t// and couldn't format the supplied national number\n\t\t\t// using the selected phone number pattern,\n\t\t\t// then it will return `undefined`.\n\n\t\t\treturn national_number_formatted_with_previous_format;\n\t\t}\n\t}, {\n\t\tkey: 'reset',\n\t\tvalue: function reset() {\n\t\t\t// Input stripped of non-phone-number characters.\n\t\t\t// Can only contain a possible leading '+' sign and digits.\n\t\t\tthis.parsedInput = '';\n\n\t\t\tthis.currentOutput = '';\n\n\t\t\t// This contains the national prefix that has been extracted. It contains only\n\t\t\t// digits without formatting.\n\t\t\tthis.nationalPrefix = '';\n\n\t\t\tthis.nationalNumber = '';\n\t\t\tthis.carrierCode = '';\n\n\t\t\tthis.resetCountriness();\n\n\t\t\tthis.resetFormat();\n\n\t\t\treturn this;\n\t\t}\n\t}, {\n\t\tkey: 'resetCountry',\n\t\tvalue: function resetCountry() {\n\t\t\tif (this.isInternational()) {\n\t\t\t\tthis.country = undefined;\n\t\t\t} else {\n\t\t\t\tthis.country = this.defaultCountry;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'resetCountriness',\n\t\tvalue: function resetCountriness() {\n\t\t\tthis.resetCountry();\n\n\t\t\tif (this.defaultCountry && !this.isInternational()) {\n\t\t\t\tthis.metadata.country(this.defaultCountry);\n\t\t\t\tthis.countryCallingCode = this.metadata.countryCallingCode();\n\n\t\t\t\tthis.initialize_phone_number_formats_for_this_country_calling_code();\n\t\t\t} else {\n\t\t\t\tthis.metadata.country(undefined);\n\t\t\t\tthis.countryCallingCode = undefined;\n\n\t\t\t\t// \"Available formats\" are all formats available for the country.\n\t\t\t\t// \"Matching formats\" are only formats eligible for the national number being entered.\n\t\t\t\tthis.available_formats = [];\n\t\t\t\tthis.matching_formats = undefined;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'resetFormat',\n\t\tvalue: function resetFormat() {\n\t\t\tthis.chosenFormat = undefined;\n\t\t\tthis.template = undefined;\n\t\t\tthis.partially_populated_template = undefined;\n\t\t\tthis.last_match_position = -1;\n\t\t}\n\n\t\t// Format each digit of national phone number (so far)\n\t\t// using the newly selected phone number pattern.\n\n\t}, {\n\t\tkey: 'reformatNationalNumber',\n\t\tvalue: function reformatNationalNumber() {\n\t\t\t// Format each digit of national phone number (so far)\n\t\t\t// using the selected phone number pattern.\n\t\t\treturn this.formatNextNationalNumberDigits(this.nationalNumber);\n\t\t}\n\t}, {\n\t\tkey: 'initialize_phone_number_formats_for_this_country_calling_code',\n\t\tvalue: function initialize_phone_number_formats_for_this_country_calling_code() {\n\t\t\t// Get all \"eligible\" phone number formats for this country\n\t\t\tthis.available_formats = this.metadata.formats().filter(function (format) {\n\t\t\t\treturn ELIGIBLE_FORMAT_PATTERN.test(format.internationalFormat());\n\t\t\t});\n\n\t\t\tthis.matching_formats = undefined;\n\t\t}\n\t}, {\n\t\tkey: 'match_formats_by_leading_digits',\n\t\tvalue: function match_formats_by_leading_digits() {\n\t\t\tvar leading_digits = this.nationalNumber;\n\n\t\t\t// \"leading digits\" pattern list starts with a\n\t\t\t// \"leading digits\" pattern fitting a maximum of 3 leading digits.\n\t\t\t// So, after a user inputs 3 digits of a national (significant) phone number\n\t\t\t// this national (significant) number can already be formatted.\n\t\t\t// The next \"leading digits\" pattern is for 4 leading digits max,\n\t\t\t// and the \"leading digits\" pattern after it is for 5 leading digits max, etc.\n\n\t\t\t// This implementation is different from Google's\n\t\t\t// in that it searches for a fitting format\n\t\t\t// even if the user has entered less than\n\t\t\t// `MIN_LEADING_DIGITS_LENGTH` digits of a national number.\n\t\t\t// Because some leading digits patterns already match for a single first digit.\n\t\t\tvar index_of_leading_digits_pattern = leading_digits.length - MIN_LEADING_DIGITS_LENGTH;\n\t\t\tif (index_of_leading_digits_pattern < 0) {\n\t\t\t\tindex_of_leading_digits_pattern = 0;\n\t\t\t}\n\n\t\t\t// \"Available formats\" are all formats available for the country.\n\t\t\t// \"Matching formats\" are only formats eligible for the national number being entered.\n\n\t\t\t// If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are available\n\t\t\t// then format matching starts narrowing down the list of possible formats\n\t\t\t// (only previously matched formats are considered for next digits).\n\t\t\tvar available_formats = this.had_enough_leading_digits && this.matching_formats || this.available_formats;\n\t\t\tthis.had_enough_leading_digits = this.shouldFormat();\n\n\t\t\tthis.matching_formats = available_formats.filter(function (format) {\n\t\t\t\tvar leading_digits_patterns_count = format.leadingDigitsPatterns().length;\n\n\t\t\t\t// If this format is not restricted to a certain\n\t\t\t\t// leading digits pattern then it fits.\n\t\t\t\tif (leading_digits_patterns_count === 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tvar leading_digits_pattern_index = Math.min(index_of_leading_digits_pattern, leading_digits_patterns_count - 1);\n\t\t\t\tvar leading_digits_pattern = format.leadingDigitsPatterns()[leading_digits_pattern_index];\n\n\t\t\t\t// Brackets are required for `^` to be applied to\n\t\t\t\t// all or-ed (`|`) parts, not just the first one.\n\t\t\t\treturn new RegExp('^(' + leading_digits_pattern + ')').test(leading_digits);\n\t\t\t});\n\n\t\t\t// If there was a phone number format chosen\n\t\t\t// and it no longer holds given the new leading digits then reset it.\n\t\t\t// The test for this `if` condition is marked as:\n\t\t\t// \"Reset a chosen format when it no longer holds given the new leading digits\".\n\t\t\t// To construct a valid test case for this one can find a country\n\t\t\t// in `PhoneNumberMetadata.xml` yielding one format for 3 ``\n\t\t\t// and yielding another format for 4 `` (Australia in this case).\n\t\t\tif (this.chosenFormat && this.matching_formats.indexOf(this.chosenFormat) === -1) {\n\t\t\t\tthis.resetFormat();\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'shouldFormat',\n\t\tvalue: function shouldFormat() {\n\t\t\t// Start matching any formats at all when the national number\n\t\t\t// entered so far is at least 3 digits long,\n\t\t\t// otherwise format matching would give false negatives\n\t\t\t// like when the digits entered so far are `2`\n\t\t\t// and the leading digits pattern is `21` –\n\t\t\t// it's quite obvious in this case that the format could be the one\n\t\t\t// but due to the absence of further digits it would give false negative.\n\t\t\t//\n\t\t\t// Presumably the limitation of \"3 digits min\"\n\t\t\t// is imposed to exclude false matches,\n\t\t\t// e.g. when there are two different formats\n\t\t\t// each one fitting one or two leading digits being input.\n\t\t\t// But for this case I would propose a specific `if/else` condition.\n\t\t\t//\n\t\t\treturn this.nationalNumber.length >= MIN_LEADING_DIGITS_LENGTH;\n\t\t}\n\n\t\t// Check to see if there is an exact pattern match for these digits. If so, we\n\t\t// should use this instead of any other formatting template whose\n\t\t// `leadingDigitsPattern` also matches the input.\n\n\t}, {\n\t\tkey: 'attempt_to_format_complete_phone_number',\n\t\tvalue: function attempt_to_format_complete_phone_number() {\n\t\t\tfor (var _iterator = this.matching_formats, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n\t\t\t\tvar _ref;\n\n\t\t\t\tif (_isArray) {\n\t\t\t\t\tif (_i >= _iterator.length) break;\n\t\t\t\t\t_ref = _iterator[_i++];\n\t\t\t\t} else {\n\t\t\t\t\t_i = _iterator.next();\n\t\t\t\t\tif (_i.done) break;\n\t\t\t\t\t_ref = _i.value;\n\t\t\t\t}\n\n\t\t\t\tvar format = _ref;\n\n\t\t\t\tvar matcher = new RegExp('^(?:' + format.pattern() + ')$');\n\n\t\t\t\tif (!matcher.test(this.nationalNumber)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!this.isFormatApplicable(format)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// To leave the formatter in a consistent state\n\t\t\t\tthis.resetFormat();\n\t\t\t\tthis.chosenFormat = format;\n\n\t\t\t\tvar formatted_number = format_national_number_using_format(this.nationalNumber, format, this.isInternational(), this.nationalPrefix !== '', this.metadata);\n\n\t\t\t\t// Special handling for NANPA countries for AsYouType formatter.\n\t\t\t\t// Copied from Google's `libphonenumber`:\n\t\t\t\t// https://github.com/googlei18n/libphonenumber/blob/66986dbbe443ee8450e2b54dcd44ac384b3bbee8/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L535-L573\n\t\t\t\tif (this.nationalPrefix && this.countryCallingCode === '1') {\n\t\t\t\t\tformatted_number = '1 ' + formatted_number;\n\t\t\t\t}\n\n\t\t\t\t// Set `this.template` and `this.partially_populated_template`.\n\t\t\t\t//\n\t\t\t\t// `else` case doesn't ever happen\n\t\t\t\t// with the current metadata,\n\t\t\t\t// but just in case.\n\t\t\t\t//\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif (this.createFormattingTemplate(format)) {\n\t\t\t\t\t// Populate `this.partially_populated_template`\n\t\t\t\t\tthis.reformatNationalNumber();\n\t\t\t\t} else {\n\t\t\t\t\t// Prepend `+CountryCode` in case of an international phone number\n\t\t\t\t\tvar full_number = this.formatFullNumber(formatted_number);\n\t\t\t\t\tthis.template = full_number.replace(/[\\d\\+]/g, DIGIT_PLACEHOLDER);\n\t\t\t\t\tthis.partially_populated_template = full_number;\n\t\t\t\t}\n\n\t\t\t\treturn formatted_number;\n\t\t\t}\n\t\t}\n\n\t\t// Prepends `+CountryCode` in case of an international phone number\n\n\t}, {\n\t\tkey: 'formatFullNumber',\n\t\tvalue: function formatFullNumber(formattedNationalNumber) {\n\t\t\tif (this.isInternational()) {\n\t\t\t\treturn '+' + this.countryCallingCode + ' ' + formattedNationalNumber;\n\t\t\t}\n\t\t\treturn formattedNationalNumber;\n\t\t}\n\n\t\t// Extracts the country calling code from the beginning\n\t\t// of the entered `national_number` (so far),\n\t\t// and places the remaining input into the `national_number`.\n\n\t}, {\n\t\tkey: 'extractCountryCallingCode',\n\t\tvalue: function extractCountryCallingCode() {\n\t\t\tvar _extractCountryCallin = _extractCountryCallingCode(this.parsedInput, this.defaultCountry, this.metadata.metadata),\n\t\t\t countryCallingCode = _extractCountryCallin.countryCallingCode,\n\t\t\t number = _extractCountryCallin.number;\n\n\t\t\tif (!countryCallingCode) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.countryCallingCode = countryCallingCode;\n\n\t\t\t// Sometimes people erroneously write national prefix\n\t\t\t// as part of an international number, e.g. +44 (0) ....\n\t\t\t// This violates the standards for international phone numbers,\n\t\t\t// so \"As You Type\" formatter assumes no national prefix\n\t\t\t// when parsing a phone number starting from `+`.\n\t\t\t// Even if it did attempt to filter-out that national prefix\n\t\t\t// it would look weird for a user trying to enter a digit\n\t\t\t// because from user's perspective the keyboard \"wouldn't be working\".\n\t\t\tthis.nationalNumber = number;\n\n\t\t\tthis.metadata.chooseCountryByCountryCallingCode(countryCallingCode);\n\t\t\treturn this.metadata.selectedCountry() !== undefined;\n\t\t}\n\t}, {\n\t\tkey: 'extractNationalPrefix',\n\t\tvalue: function extractNationalPrefix() {\n\t\t\tthis.nationalPrefix = '';\n\n\t\t\tif (!this.metadata.selectedCountry()) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Only strip national prefixes for non-international phone numbers\n\t\t\t// because national prefixes can't be present in international phone numbers.\n\t\t\t// While `parseNumber()` is forgiving is such cases, `AsYouType` is not.\n\n\t\t\tvar _strip_national_prefi = strip_national_prefix_and_carrier_code(this.nationalNumber, this.metadata),\n\t\t\t potential_national_number = _strip_national_prefi.number,\n\t\t\t carrierCode = _strip_national_prefi.carrierCode;\n\n\t\t\tif (carrierCode) {\n\t\t\t\tthis.carrierCode = carrierCode;\n\t\t\t}\n\n\t\t\t// We require that the NSN remaining after stripping the national prefix and\n\t\t\t// carrier code be long enough to be a possible length for the region.\n\t\t\t// Otherwise, we don't do the stripping, since the original number could be\n\t\t\t// a valid short number.\n\t\t\tif (!this.metadata.possibleLengths() || this.isPossibleNumber(this.nationalNumber) && !this.isPossibleNumber(potential_national_number)) {\n\t\t\t\t// Verify the parsed national (significant) number for this country\n\t\t\t\t//\n\t\t\t\t// If the original number (before stripping national prefix) was viable,\n\t\t\t\t// and the resultant number is not, then prefer the original phone number.\n\t\t\t\t// This is because for some countries (e.g. Russia) the same digit could be both\n\t\t\t\t// a national prefix and a leading digit of a valid national phone number,\n\t\t\t\t// like `8` is the national prefix for Russia and both\n\t\t\t\t// `8 800 555 35 35` and `800 555 35 35` are valid numbers.\n\t\t\t\tif (matchesEntirely(this.nationalNumber, this.metadata.nationalNumberPattern()) && !matchesEntirely(potential_national_number, this.metadata.nationalNumberPattern())) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.nationalPrefix = this.nationalNumber.slice(0, this.nationalNumber.length - potential_national_number.length);\n\t\t\tthis.nationalNumber = potential_national_number;\n\n\t\t\treturn this.nationalPrefix;\n\t\t}\n\t}, {\n\t\tkey: 'isPossibleNumber',\n\t\tvalue: function isPossibleNumber(number) {\n\t\t\tvar validation_result = checkNumberLengthForType(number, undefined, this.metadata);\n\t\t\tswitch (validation_result) {\n\t\t\t\tcase 'IS_POSSIBLE':\n\t\t\t\t\treturn true;\n\t\t\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t\t\t// \treturn !this.isInternational()\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}, {\n\t\tkey: 'chooseAnotherFormat',\n\t\tvalue: function chooseAnotherFormat() {\n\t\t\t// When there are multiple available formats, the formatter uses the first\n\t\t\t// format where a formatting template could be created.\n\t\t\tfor (var _iterator2 = this.matching_formats, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {\n\t\t\t\tvar _ref2;\n\n\t\t\t\tif (_isArray2) {\n\t\t\t\t\tif (_i2 >= _iterator2.length) break;\n\t\t\t\t\t_ref2 = _iterator2[_i2++];\n\t\t\t\t} else {\n\t\t\t\t\t_i2 = _iterator2.next();\n\t\t\t\t\tif (_i2.done) break;\n\t\t\t\t\t_ref2 = _i2.value;\n\t\t\t\t}\n\n\t\t\t\tvar format = _ref2;\n\n\t\t\t\t// If this format is currently being used\n\t\t\t\t// and is still possible, then stick to it.\n\t\t\t\tif (this.chosenFormat === format) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If this `format` is suitable for \"as you type\",\n\t\t\t\t// then extract the template from this format\n\t\t\t\t// and use it to format the phone number being input.\n\n\t\t\t\tif (!this.isFormatApplicable(format)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!this.createFormattingTemplate(format)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.chosenFormat = format;\n\n\t\t\t\t// With a new formatting template, the matched position\n\t\t\t\t// using the old template needs to be reset.\n\t\t\t\tthis.last_match_position = -1;\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// No format matches the phone number,\n\t\t\t// therefore set `country` to `undefined`\n\t\t\t// (or to the default country).\n\t\t\tthis.resetCountry();\n\n\t\t\t// No format matches the national phone number entered\n\t\t\tthis.resetFormat();\n\t\t}\n\t}, {\n\t\tkey: 'isFormatApplicable',\n\t\tvalue: function isFormatApplicable(format) {\n\t\t\t// If national prefix is mandatory for this phone number format\n\t\t\t// and the user didn't input the national prefix\n\t\t\t// then this phone number format isn't suitable.\n\t\t\tif (!this.isInternational() && !this.nationalPrefix && format.nationalPrefixIsMandatoryWhenFormatting()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// If this format doesn't use national prefix\n\t\t\t// but the user did input national prefix\n\t\t\t// then this phone number format isn't suitable.\n\t\t\tif (this.nationalPrefix && !format.usesNationalPrefix() && !format.nationalPrefixIsOptionalWhenFormatting()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}, {\n\t\tkey: 'createFormattingTemplate',\n\t\tvalue: function createFormattingTemplate(format) {\n\t\t\t// The formatter doesn't format numbers when numberPattern contains '|', e.g.\n\t\t\t// (20|3)\\d{4}. In those cases we quickly return.\n\t\t\t// (Though there's no such format in current metadata)\n\t\t\t/* istanbul ignore if */\n\t\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS && format.pattern().indexOf('|') >= 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Get formatting template for this phone number format\n\t\t\tvar template = this.getTemplateForNumberFormatPattern(format);\n\n\t\t\t// If the national number entered is too long\n\t\t\t// for any phone number format, then abort.\n\t\t\tif (!template) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This one is for national number only\n\t\t\tthis.partially_populated_template = template;\n\n\t\t\t// For convenience, the public `.template` property\n\t\t\t// contains the whole international number\n\t\t\t// if the phone number being input is international:\n\t\t\t// 'x' for the '+' sign, 'x'es for the country phone code,\n\t\t\t// a spacebar and then the template for the formatted national number.\n\t\t\tif (this.isInternational()) {\n\t\t\t\tthis.template = DIGIT_PLACEHOLDER + repeat(DIGIT_PLACEHOLDER, this.countryCallingCode.length) + ' ' + template;\n\t\t\t}\n\t\t\t// For local numbers, replace national prefix\n\t\t\t// with a digit placeholder.\n\t\t\telse {\n\t\t\t\t\tthis.template = template.replace(/\\d/g, DIGIT_PLACEHOLDER);\n\t\t\t\t}\n\n\t\t\t// This one is for the full phone number\n\t\t\treturn this.template;\n\t\t}\n\n\t\t// Generates formatting template for a phone number format\n\n\t}, {\n\t\tkey: 'getTemplateForNumberFormatPattern',\n\t\tvalue: function getTemplateForNumberFormatPattern(format) {\n\t\t\t// A very smart trick by the guys at Google\n\t\t\tvar number_pattern = format.pattern();\n\n\t\t\t/* istanbul ignore else */\n\t\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS) {\n\t\t\t\tnumber_pattern = number_pattern\n\t\t\t\t// Replace anything in the form of [..] with \\d\n\t\t\t\t.replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\\\d')\n\t\t\t\t// Replace any standalone digit (not the one in `{}`) with \\d\n\t\t\t\t.replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\\\d');\n\t\t\t}\n\n\t\t\t// This match will always succeed,\n\t\t\t// because the \"longest dummy phone number\"\n\t\t\t// has enough length to accomodate any possible\n\t\t\t// national phone number format pattern.\n\t\t\tvar dummy_phone_number_matching_format_pattern = LONGEST_DUMMY_PHONE_NUMBER.match(number_pattern)[0];\n\n\t\t\t// If the national number entered is too long\n\t\t\t// for any phone number format, then abort.\n\t\t\tif (this.nationalNumber.length > dummy_phone_number_matching_format_pattern.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare the phone number format\n\t\t\tvar number_format = this.getFormatFormat(format);\n\n\t\t\t// Get a formatting template which can be used to efficiently format\n\t\t\t// a partial number where digits are added one by one.\n\n\t\t\t// Below `strict_pattern` is used for the\n\t\t\t// regular expression (with `^` and `$`).\n\t\t\t// This wasn't originally in Google's `libphonenumber`\n\t\t\t// and I guess they don't really need it\n\t\t\t// because they're not using \"templates\" to format phone numbers\n\t\t\t// but I added `strict_pattern` after encountering\n\t\t\t// South Korean phone number formatting bug.\n\t\t\t//\n\t\t\t// Non-strict regular expression bug demonstration:\n\t\t\t//\n\t\t\t// this.nationalNumber : `111111111` (9 digits)\n\t\t\t//\n\t\t\t// number_pattern : (\\d{2})(\\d{3,4})(\\d{4})\n\t\t\t// number_format : `$1 $2 $3`\n\t\t\t// dummy_phone_number_matching_format_pattern : `9999999999` (10 digits)\n\t\t\t//\n\t\t\t// '9999999999'.replace(new RegExp(/(\\d{2})(\\d{3,4})(\\d{4})/g), '$1 $2 $3') = \"99 9999 9999\"\n\t\t\t//\n\t\t\t// template : xx xxxx xxxx\n\t\t\t//\n\t\t\t// But the correct template in this case is `xx xxx xxxx`.\n\t\t\t// The template was generated incorrectly because of the\n\t\t\t// `{3,4}` variability in the `number_pattern`.\n\t\t\t//\n\t\t\t// The fix is, if `this.nationalNumber` has already sufficient length\n\t\t\t// to satisfy the `number_pattern` completely then `this.nationalNumber` is used\n\t\t\t// instead of `dummy_phone_number_matching_format_pattern`.\n\n\t\t\tvar strict_pattern = new RegExp('^' + number_pattern + '$');\n\t\t\tvar national_number_dummy_digits = this.nationalNumber.replace(/\\d/g, DUMMY_DIGIT);\n\n\t\t\t// If `this.nationalNumber` has already sufficient length\n\t\t\t// to satisfy the `number_pattern` completely then use it\n\t\t\t// instead of `dummy_phone_number_matching_format_pattern`.\n\t\t\tif (strict_pattern.test(national_number_dummy_digits)) {\n\t\t\t\tdummy_phone_number_matching_format_pattern = national_number_dummy_digits;\n\t\t\t}\n\n\t\t\t// Generate formatting template for this phone number format\n\t\t\treturn dummy_phone_number_matching_format_pattern\n\t\t\t// Format the dummy phone number according to the format\n\t\t\t.replace(new RegExp(number_pattern), number_format)\n\t\t\t// Replace each dummy digit with a DIGIT_PLACEHOLDER\n\t\t\t.replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER);\n\t\t}\n\t}, {\n\t\tkey: 'formatNextNationalNumberDigits',\n\t\tvalue: function formatNextNationalNumberDigits(digits) {\n\t\t\t// Using `.split('')` to iterate through a string here\n\t\t\t// to avoid requiring `Symbol.iterator` polyfill.\n\t\t\t// `.split('')` is generally not safe for Unicode,\n\t\t\t// but in this particular case for `digits` it is safe.\n\t\t\t// for (const digit of digits)\n\t\t\tfor (var _iterator3 = digits.split(''), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {\n\t\t\t\tvar _ref3;\n\n\t\t\t\tif (_isArray3) {\n\t\t\t\t\tif (_i3 >= _iterator3.length) break;\n\t\t\t\t\t_ref3 = _iterator3[_i3++];\n\t\t\t\t} else {\n\t\t\t\t\t_i3 = _iterator3.next();\n\t\t\t\t\tif (_i3.done) break;\n\t\t\t\t\t_ref3 = _i3.value;\n\t\t\t\t}\n\n\t\t\t\tvar digit = _ref3;\n\n\t\t\t\t// If there is room for more digits in current `template`,\n\t\t\t\t// then set the next digit in the `template`,\n\t\t\t\t// and return the formatted digits so far.\n\n\t\t\t\t// If more digits are entered than the current format could handle\n\t\t\t\tif (this.partially_populated_template.slice(this.last_match_position + 1).search(DIGIT_PLACEHOLDER_MATCHER) === -1) {\n\t\t\t\t\t// Reset the current format,\n\t\t\t\t\t// so that the new format will be chosen\n\t\t\t\t\t// in a subsequent `this.chooseAnotherFormat()` call\n\t\t\t\t\t// later in code.\n\t\t\t\t\tthis.chosenFormat = undefined;\n\t\t\t\t\tthis.template = undefined;\n\t\t\t\t\tthis.partially_populated_template = undefined;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.last_match_position = this.partially_populated_template.search(DIGIT_PLACEHOLDER_MATCHER);\n\t\t\t\tthis.partially_populated_template = this.partially_populated_template.replace(DIGIT_PLACEHOLDER_MATCHER, digit);\n\t\t\t}\n\n\t\t\t// Return the formatted phone number so far.\n\t\t\treturn cut_stripping_dangling_braces(this.partially_populated_template, this.last_match_position + 1);\n\n\t\t\t// The old way which was good for `input-format` but is not so good\n\t\t\t// for `react-phone-number-input`'s default input (`InputBasic`).\n\t\t\t// return close_dangling_braces(this.partially_populated_template, this.last_match_position + 1)\n\t\t\t// \t.replace(DIGIT_PLACEHOLDER_MATCHER_GLOBAL, ' ')\n\t\t}\n\t}, {\n\t\tkey: 'isInternational',\n\t\tvalue: function isInternational() {\n\t\t\treturn this.parsedInput && this.parsedInput[0] === '+';\n\t\t}\n\t}, {\n\t\tkey: 'getFormatFormat',\n\t\tvalue: function getFormatFormat(format) {\n\t\t\tif (this.isInternational()) {\n\t\t\t\treturn changeInternationalFormatStyle(format.internationalFormat());\n\t\t\t}\n\n\t\t\t// If national prefix formatting rule is set\n\t\t\t// for this phone number format\n\t\t\tif (format.nationalPrefixFormattingRule()) {\n\t\t\t\t// If the user did input the national prefix\n\t\t\t\t// (or if the national prefix formatting rule does not require national prefix)\n\t\t\t\t// then maybe make it part of the phone number template\n\t\t\t\tif (this.nationalPrefix || !format.usesNationalPrefix()) {\n\t\t\t\t\t// Make the national prefix part of the phone number template\n\t\t\t\t\treturn format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Special handling for NANPA countries for AsYouType formatter.\n\t\t\t// Copied from Google's `libphonenumber`:\n\t\t\t// https://github.com/googlei18n/libphonenumber/blob/66986dbbe443ee8450e2b54dcd44ac384b3bbee8/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L535-L573\n\t\t\telse if (this.countryCallingCode === '1' && this.nationalPrefix === '1') {\n\t\t\t\t\treturn '1 ' + format.format();\n\t\t\t\t}\n\n\t\t\treturn format.format();\n\t\t}\n\n\t\t// Determines the country of the phone number\n\t\t// entered so far based on the country phone code\n\t\t// and the national phone number.\n\n\t}, {\n\t\tkey: 'determineTheCountry',\n\t\tvalue: function determineTheCountry() {\n\t\t\tthis.country = find_country_code(this.countryCallingCode, this.nationalNumber, this.metadata);\n\t\t}\n\n\t\t/**\r\n * Returns an instance of `PhoneNumber` class.\r\n * Will return `undefined` if no national (significant) number\r\n * digits have been entered so far, or if no `defaultCountry` has been\r\n * set and the user enters a phone number not in international format.\r\n */\n\n\t}, {\n\t\tkey: 'getNumber',\n\t\tvalue: function getNumber() {\n\t\t\tif (!this.countryCallingCode || !this.nationalNumber) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tvar phoneNumber = new PhoneNumber(this.country || this.countryCallingCode, this.nationalNumber, this.metadata.metadata);\n\t\t\tif (this.carrierCode) {\n\t\t\t\tphoneNumber.carrierCode = this.carrierCode;\n\t\t\t}\n\t\t\t// Phone number extensions are not supported by \"As You Type\" formatter.\n\t\t\treturn phoneNumber;\n\t\t}\n\t}, {\n\t\tkey: 'getNationalNumber',\n\t\tvalue: function getNationalNumber() {\n\t\t\treturn this.nationalNumber;\n\t\t}\n\t}, {\n\t\tkey: 'getTemplate',\n\t\tvalue: function getTemplate() {\n\t\t\tif (!this.template) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar index = -1;\n\n\t\t\tvar i = 0;\n\t\t\twhile (i < this.parsedInput.length) {\n\t\t\t\tindex = this.template.indexOf(DIGIT_PLACEHOLDER, index + 1);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\treturn cut_stripping_dangling_braces(this.template, index + 1);\n\t\t}\n\t}]);\n\n\treturn AsYouType;\n}();\n\nexport default AsYouType;\n\n\nexport function strip_dangling_braces(string) {\n\tvar dangling_braces = [];\n\tvar i = 0;\n\twhile (i < string.length) {\n\t\tif (string[i] === '(') {\n\t\t\tdangling_braces.push(i);\n\t\t} else if (string[i] === ')') {\n\t\t\tdangling_braces.pop();\n\t\t}\n\t\ti++;\n\t}\n\n\tvar start = 0;\n\tvar cleared_string = '';\n\tdangling_braces.push(string.length);\n\tfor (var _iterator4 = dangling_braces, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {\n\t\tvar _ref4;\n\n\t\tif (_isArray4) {\n\t\t\tif (_i4 >= _iterator4.length) break;\n\t\t\t_ref4 = _iterator4[_i4++];\n\t\t} else {\n\t\t\t_i4 = _iterator4.next();\n\t\t\tif (_i4.done) break;\n\t\t\t_ref4 = _i4.value;\n\t\t}\n\n\t\tvar index = _ref4;\n\n\t\tcleared_string += string.slice(start, index);\n\t\tstart = index + 1;\n\t}\n\n\treturn cleared_string;\n}\n\nexport function cut_stripping_dangling_braces(string, cut_before_index) {\n\tif (string[cut_before_index] === ')') {\n\t\tcut_before_index++;\n\t}\n\treturn strip_dangling_braces(string.slice(0, cut_before_index));\n}\n\nexport function close_dangling_braces(template, cut_before) {\n\tvar retained_template = template.slice(0, cut_before);\n\n\tvar opening_braces = count_occurences('(', retained_template);\n\tvar closing_braces = count_occurences(')', retained_template);\n\n\tvar dangling_braces = opening_braces - closing_braces;\n\twhile (dangling_braces > 0 && cut_before < template.length) {\n\t\tif (template[cut_before] === ')') {\n\t\t\tdangling_braces--;\n\t\t}\n\t\tcut_before++;\n\t}\n\n\treturn template.slice(0, cut_before);\n}\n\n// Counts all occurences of a symbol in a string.\n// Unicode-unsafe (because using `.split()`).\nexport function count_occurences(symbol, string) {\n\tvar count = 0;\n\n\t// Using `.split('')` to iterate through a string here\n\t// to avoid requiring `Symbol.iterator` polyfill.\n\t// `.split('')` is generally not safe for Unicode,\n\t// but in this particular case for counting brackets it is safe.\n\t// for (const character of string)\n\tfor (var _iterator5 = string.split(''), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {\n\t\tvar _ref5;\n\n\t\tif (_isArray5) {\n\t\t\tif (_i5 >= _iterator5.length) break;\n\t\t\t_ref5 = _iterator5[_i5++];\n\t\t} else {\n\t\t\t_i5 = _iterator5.next();\n\t\t\tif (_i5.done) break;\n\t\t\t_ref5 = _i5.value;\n\t\t}\n\n\t\tvar character = _ref5;\n\n\t\tif (character === symbol) {\n\t\t\tcount++;\n\t\t}\n\t}\n\n\treturn count;\n}\n\n// Repeats a string (or a symbol) N times.\n// http://stackoverflow.com/questions/202605/repeat-string-javascript\nexport function repeat(string, times) {\n\tif (times < 1) {\n\t\treturn '';\n\t}\n\n\tvar result = '';\n\n\twhile (times > 1) {\n\t\tif (times & 1) {\n\t\t\tresult += string;\n\t\t}\n\n\t\ttimes >>= 1;\n\t\tstring += string;\n\t}\n\n\treturn result + string;\n}\n//# sourceMappingURL=AsYouType.js.map","// Javascript doesn't support UTF-8 regular expressions.\n// So mimicking them here.\n\n// Copy-pasted from `PhoneNumberMatcher.js`.\n\n/**\r\n * \"\\p{Z}\" is any kind of whitespace or invisible separator (\"Separator\").\r\n * http://www.regular-expressions.info/unicode.html\r\n * \"\\P{Z}\" is the reverse of \"\\p{Z}\".\r\n * \"\\p{N}\" is any kind of numeric character in any script (\"Number\").\r\n * \"\\p{Nd}\" is a digit zero through nine in any script except \"ideographic scripts\" (\"Decimal_Digit_Number\").\r\n * \"\\p{Sc}\" is a currency symbol (\"Currency_Symbol\").\r\n * \"\\p{L}\" is any kind of letter from any language (\"Letter\").\r\n * \"\\p{Mn}\" is \"non-spacing mark\".\r\n *\r\n * Javascript doesn't support Unicode Regular Expressions\r\n * so substituting it with this explicit set of characters.\r\n *\r\n * https://stackoverflow.com/questions/13210194/javascript-regex-equivalent-of-a-za-z-using-pl\r\n * https://github.com/danielberndt/babel-plugin-utf-8-regex/blob/master/src/transformer.js\r\n */\n\nvar _pZ = ' \\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000';\nexport var pZ = '[' + _pZ + ']';\nexport var PZ = '[^' + _pZ + ']';\n\nexport var _pN = '0-9\\xB2\\xB3\\xB9\\xBC-\\xBE\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u09F4-\\u09F9\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0B72-\\u0B77\\u0BE6-\\u0BF2\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0CE6-\\u0CEF\\u0D66-\\u0D75\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F33\\u1040-\\u1049\\u1090-\\u1099\\u1369-\\u137C\\u16EE-\\u16F0\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19DA\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u2182\\u2185-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA620-\\uA629\\uA6E6-\\uA6EF\\uA830-\\uA835\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19';\n// const pN = `[${_pN}]`\n\nvar _pNd = '0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19';\nexport var pNd = '[' + _pNd + ']';\n\nexport var _pL = 'A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC';\nvar pL = '[' + _pL + ']';\nvar pL_regexp = new RegExp(pL);\n\nvar _pSc = '$\\xA2-\\xA5\\u058F\\u060B\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20B9\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6';\nvar pSc = '[' + _pSc + ']';\nvar pSc_regexp = new RegExp(pSc);\n\nvar _pMn = '\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u08FE\\u0900-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1DC0-\\u1DE6\\u1DFC-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26';\nvar pMn = '[' + _pMn + ']';\nvar pMn_regexp = new RegExp(pMn);\n\nvar _InBasic_Latin = '\\0-\\x7F';\nvar _InLatin_1_Supplement = '\\x80-\\xFF';\nvar _InLatin_Extended_A = '\\u0100-\\u017F';\nvar _InLatin_Extended_Additional = '\\u1E00-\\u1EFF';\nvar _InLatin_Extended_B = '\\u0180-\\u024F';\nvar _InCombining_Diacritical_Marks = '\\u0300-\\u036F';\n\nvar latinLetterRegexp = new RegExp('[' + _InBasic_Latin + _InLatin_1_Supplement + _InLatin_Extended_A + _InLatin_Extended_Additional + _InLatin_Extended_B + _InCombining_Diacritical_Marks + ']');\n\n/**\r\n * Helper method to determine if a character is a Latin-script letter or not.\r\n * For our purposes, combining marks should also return true since we assume\r\n * they have been added to a preceding Latin character.\r\n */\nexport function isLatinLetter(letter) {\n // Combining marks are a subset of non-spacing-mark.\n if (!pL_regexp.test(letter) && !pMn_regexp.test(letter)) {\n return false;\n }\n\n return latinLetterRegexp.test(letter);\n}\n\nexport function isInvalidPunctuationSymbol(character) {\n return character === '%' || pSc_regexp.test(character);\n}\n//# sourceMappingURL=utf-8.js.map","// Copy-pasted from `PhoneNumberMatcher.js`.\n\nimport { PLUS_CHARS } from '../constants';\nimport { limit } from './util';\n\nimport { isLatinLetter, isInvalidPunctuationSymbol } from './utf-8';\n\nvar OPENING_PARENS = '(\\\\[\\uFF08\\uFF3B';\nvar CLOSING_PARENS = ')\\\\]\\uFF09\\uFF3D';\nvar NON_PARENS = '[^' + OPENING_PARENS + CLOSING_PARENS + ']';\n\nexport var LEAD_CLASS = '[' + OPENING_PARENS + PLUS_CHARS + ']';\n\n// Punctuation that may be at the start of a phone number - brackets and plus signs.\nvar LEAD_CLASS_LEADING = new RegExp('^' + LEAD_CLASS);\n\n// Limit on the number of pairs of brackets in a phone number.\nvar BRACKET_PAIR_LIMIT = limit(0, 3);\n\n/**\r\n * Pattern to check that brackets match. Opening brackets should be closed within a phone number.\r\n * This also checks that there is something inside the brackets. Having no brackets at all is also\r\n * fine.\r\n *\r\n * An opening bracket at the beginning may not be closed, but subsequent ones should be. It's\r\n * also possible that the leading bracket was dropped, so we shouldn't be surprised if we see a\r\n * closing bracket first. We limit the sets of brackets in a phone number to four.\r\n */\nvar MATCHING_BRACKETS_ENTIRE = new RegExp('^' + \"(?:[\" + OPENING_PARENS + \"])?\" + \"(?:\" + NON_PARENS + \"+\" + \"[\" + CLOSING_PARENS + \"])?\" + NON_PARENS + \"+\" + \"(?:[\" + OPENING_PARENS + \"]\" + NON_PARENS + \"+[\" + CLOSING_PARENS + \"])\" + BRACKET_PAIR_LIMIT + NON_PARENS + \"*\" + '$');\n\n/**\r\n * Matches strings that look like publication pages. Example:\r\n *

Computing Complete Answers to Queries in the Presence of Limited Access Patterns.\r\n * Chen Li. VLDB J. 12(3): 211-227 (2003).
\r\n *\r\n * The string \"211-227 (2003)\" is not a telephone number.\r\n */\nvar PUB_PAGES = /\\d{1,5}-+\\d{1,5}\\s{0,4}\\(\\d{1,4}/;\n\nexport default function isValidCandidate(candidate, offset, text, leniency) {\n\t// Check the candidate doesn't contain any formatting\n\t// which would indicate that it really isn't a phone number.\n\tif (!MATCHING_BRACKETS_ENTIRE.test(candidate) || PUB_PAGES.test(candidate)) {\n\t\treturn;\n\t}\n\n\t// If leniency is set to VALID or stricter, we also want to skip numbers that are surrounded\n\t// by Latin alphabetic characters, to skip cases like abc8005001234 or 8005001234def.\n\tif (leniency !== 'POSSIBLE') {\n\t\t// If the candidate is not at the start of the text,\n\t\t// and does not start with phone-number punctuation,\n\t\t// check the previous character.\n\t\tif (offset > 0 && !LEAD_CLASS_LEADING.test(candidate)) {\n\t\t\tvar previousChar = text[offset - 1];\n\t\t\t// We return null if it is a latin letter or an invalid punctuation symbol.\n\t\t\tif (isInvalidPunctuationSymbol(previousChar) || isLatinLetter(previousChar)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar lastCharIndex = offset + candidate.length;\n\t\tif (lastCharIndex < text.length) {\n\t\t\tvar nextChar = text[lastCharIndex];\n\t\t\tif (isInvalidPunctuationSymbol(nextChar) || isLatinLetter(nextChar)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn true;\n}\n//# sourceMappingURL=isValidCandidate.js.map","// Matches strings that look like dates using \"/\" as a separator.\n// Examples: 3/10/2011, 31/10/96 or 08/31/95.\nvar SLASH_SEPARATED_DATES = /(?:(?:[0-3]?\\d\\/[01]?\\d)|(?:[01]?\\d\\/[0-3]?\\d))\\/(?:[12]\\d)?\\d{2}/;\n\n// Matches timestamps.\n// Examples: \"2012-01-02 08:00\".\n// Note that the reg-ex does not include the\n// trailing \":\\d\\d\" -- that is covered by TIME_STAMPS_SUFFIX.\nvar TIME_STAMPS = /[12]\\d{3}[-/]?[01]\\d[-/]?[0-3]\\d +[0-2]\\d$/;\nvar TIME_STAMPS_SUFFIX_LEADING = /^:[0-5]\\d/;\n\nexport default function isValidPreCandidate(candidate, offset, text) {\n\t// Skip a match that is more likely to be a date.\n\tif (SLASH_SEPARATED_DATES.test(candidate)) {\n\t\treturn false;\n\t}\n\n\t// Skip potential time-stamps.\n\tif (TIME_STAMPS.test(candidate)) {\n\t\tvar followingText = text.slice(offset + candidate.length);\n\t\tif (TIME_STAMPS_SUFFIX_LEADING.test(followingText)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n//# sourceMappingURL=isValidPreCandidate.js.map","import { trimAfterFirstMatch } from './util';\n\n// Regular expression of characters typically used to start a second phone number for the purposes\n// of parsing. This allows us to strip off parts of the number that are actually the start of\n// another number, such as for: (530) 583-6985 x302/x2303 -> the second extension here makes this\n// actually two phone numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second\n// extension so that the first number is parsed correctly.\n//\n// Matches a slash (\\ or /) followed by a space followed by an `x`.\n//\nvar SECOND_NUMBER_START_PATTERN = /[\\\\/] *x/;\n\nexport default function parsePreCandidate(candidate) {\n\t// Check for extra numbers at the end.\n\t// TODO: This is the place to start when trying to support extraction of multiple phone number\n\t// from split notations (+41 79 123 45 67 / 68).\n\treturn trimAfterFirstMatch(SECOND_NUMBER_START_PATTERN, candidate);\n}\n//# sourceMappingURL=parsePreCandidate.js.map","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// This is a legacy function.\n// Use `findNumbers()` instead.\n\nimport { PLUS_CHARS, VALID_PUNCTUATION, VALID_DIGITS, WHITESPACE } from './constants';\n\nimport { EXTN_PATTERNS_FOR_PARSING } from './extension';\n\nimport parse from './parse_';\n\nimport parsePreCandidate from './findNumbers/parsePreCandidate';\nimport isValidPreCandidate from './findNumbers/isValidPreCandidate';\nimport isValidCandidate from './findNumbers/isValidCandidate';\n\n// Copy-pasted from `./parse.js`.\nvar VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';\n\nvar WHITESPACE_IN_THE_BEGINNING_PATTERN = new RegExp('^[' + WHITESPACE + ']+');\nvar PUNCTUATION_IN_THE_END_PATTERN = new RegExp('[' + VALID_PUNCTUATION + ']+$');\n\n// // Regular expression for getting opening brackets for a valid number\n// // found using `PHONE_NUMBER_START_PATTERN` for prepending those brackets to the number.\n// const BEFORE_NUMBER_DIGITS_PUNCTUATION = new RegExp('[' + OPENING_BRACKETS + ']+' + '[' + WHITESPACE + ']*' + '$')\n\nvar VALID_PRECEDING_CHARACTER_PATTERN = /[^a-zA-Z0-9]/;\n\nexport default function findPhoneNumbers(text, options, metadata) {\n\t/* istanbul ignore if */\n\tif (options === undefined) {\n\t\toptions = {};\n\t}\n\n\tvar search = new PhoneNumberSearch(text, options, metadata);\n\tvar phones = [];\n\twhile (search.hasNext()) {\n\t\tphones.push(search.next());\n\t}\n\treturn phones;\n}\n\n/**\r\n * @return ES6 `for ... of` iterator.\r\n */\nexport function searchPhoneNumbers(text, options, metadata) {\n\t/* istanbul ignore if */\n\tif (options === undefined) {\n\t\toptions = {};\n\t}\n\n\tvar search = new PhoneNumberSearch(text, options, metadata);\n\n\treturn _defineProperty({}, Symbol.iterator, function () {\n\t\treturn {\n\t\t\tnext: function next() {\n\t\t\t\tif (search.hasNext()) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: search.next()\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tdone: true\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t});\n}\n\n/**\r\n * Extracts a parseable phone number including any opening brackets, etc.\r\n * @param {string} text - Input.\r\n * @return {object} `{ ?number, ?startsAt, ?endsAt }`.\r\n */\nexport var PhoneNumberSearch = function () {\n\tfunction PhoneNumberSearch(text) {\n\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\t\tvar metadata = arguments[2];\n\n\t\t_classCallCheck(this, PhoneNumberSearch);\n\n\t\tthis.state = 'NOT_READY';\n\n\t\tthis.text = text;\n\t\tthis.options = options;\n\t\tthis.metadata = metadata;\n\n\t\tthis.regexp = new RegExp(VALID_PHONE_NUMBER +\n\t\t// Phone number extensions\n\t\t'(?:' + EXTN_PATTERNS_FOR_PARSING + ')?', 'ig');\n\n\t\t// this.searching_from = 0\n\t}\n\t// Iteration tristate.\n\n\n\t_createClass(PhoneNumberSearch, [{\n\t\tkey: 'find',\n\t\tvalue: function find() {\n\t\t\tvar matches = this.regexp.exec(this.text);\n\n\t\t\tif (!matches) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar number = matches[0];\n\t\t\tvar startsAt = matches.index;\n\n\t\t\tnumber = number.replace(WHITESPACE_IN_THE_BEGINNING_PATTERN, '');\n\t\t\tstartsAt += matches[0].length - number.length;\n\t\t\t// Fixes not parsing numbers with whitespace in the end.\n\t\t\t// Also fixes not parsing numbers with opening parentheses in the end.\n\t\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/252\n\t\t\tnumber = number.replace(PUNCTUATION_IN_THE_END_PATTERN, '');\n\n\t\t\tnumber = parsePreCandidate(number);\n\n\t\t\tvar result = this.parseCandidate(number, startsAt);\n\n\t\t\tif (result) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\t// Tail recursion.\n\t\t\t// Try the next one if this one is not a valid phone number.\n\t\t\treturn this.find();\n\t\t}\n\t}, {\n\t\tkey: 'parseCandidate',\n\t\tvalue: function parseCandidate(number, startsAt) {\n\t\t\tif (!isValidPreCandidate(number, startsAt, this.text)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Don't parse phone numbers which are non-phone numbers\n\t\t\t// due to being part of something else (e.g. a UUID).\n\t\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/213\n\t\t\t// Copy-pasted from Google's `PhoneNumberMatcher.js` (`.parseAndValidate()`).\n\t\t\tif (!isValidCandidate(number, startsAt, this.text, this.options.extended ? 'POSSIBLE' : 'VALID')) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// // Prepend any opening brackets left behind by the\n\t\t\t// // `PHONE_NUMBER_START_PATTERN` regexp.\n\t\t\t// const text_before_number = text.slice(this.searching_from, startsAt)\n\t\t\t// const full_number_starts_at = text_before_number.search(BEFORE_NUMBER_DIGITS_PUNCTUATION)\n\t\t\t// if (full_number_starts_at >= 0)\n\t\t\t// {\n\t\t\t// \tnumber = text_before_number.slice(full_number_starts_at) + number\n\t\t\t// \tstartsAt = full_number_starts_at\n\t\t\t// }\n\t\t\t//\n\t\t\t// this.searching_from = matches.lastIndex\n\n\t\t\tvar result = parse(number, this.options, this.metadata);\n\n\t\t\tif (!result.phone) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresult.startsAt = startsAt;\n\t\t\tresult.endsAt = startsAt + number.length;\n\n\t\t\treturn result;\n\t\t}\n\t}, {\n\t\tkey: 'hasNext',\n\t\tvalue: function hasNext() {\n\t\t\tif (this.state === 'NOT_READY') {\n\t\t\t\tthis.last_match = this.find();\n\n\t\t\t\tif (this.last_match) {\n\t\t\t\t\tthis.state = 'READY';\n\t\t\t\t} else {\n\t\t\t\t\tthis.state = 'DONE';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this.state === 'READY';\n\t\t}\n\t}, {\n\t\tkey: 'next',\n\t\tvalue: function next() {\n\t\t\t// Check the state and find the next match as a side-effect if necessary.\n\t\t\tif (!this.hasNext()) {\n\t\t\t\tthrow new Error('No next element');\n\t\t\t}\n\n\t\t\t// Don't retain that memory any longer than necessary.\n\t\t\tvar result = this.last_match;\n\t\t\tthis.last_match = null;\n\t\t\tthis.state = 'NOT_READY';\n\t\t\treturn result;\n\t\t}\n\t}]);\n\n\treturn PhoneNumberSearch;\n}();\n//# sourceMappingURL=findPhoneNumbers_.js.map","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport parseNumber from './parse_';\n\nexport default function parsePhoneNumber(text, options, metadata) {\n\treturn parseNumber(text, _extends({}, options, { v2: true }), metadata);\n}\n//# sourceMappingURL=parsePhoneNumber_.js.map","import isValidNumber from './validate_';\n\n/**\r\n * Checks if a given phone number is valid within a given region.\r\n * Is just an alias for `phoneNumber.isValid() && phoneNumber.country === country`.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n */\nexport default function isValidNumberForRegion(input, country) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var metadata = arguments[3];\n\n return input.country === country && isValidNumber(input, options, metadata);\n}\n//# sourceMappingURL=isValidNumberForRegion_.js.map","import Metadata from './metadata';\nimport { VALID_DIGITS } from './constants';\n\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\n\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\nvar SINGLE_IDD_PREFIX = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/;\n\n// For regions that have multiple IDD prefixes\n// a preferred IDD prefix is returned.\nexport function getIDDPrefix(country, metadata) {\n\tvar countryMetadata = new Metadata(metadata);\n\tcountryMetadata.country(country);\n\n\tif (SINGLE_IDD_PREFIX.test(countryMetadata.IDDPrefix())) {\n\t\treturn countryMetadata.IDDPrefix();\n\t}\n\n\treturn countryMetadata.defaultIDDPrefix();\n}\n\nexport function stripIDDPrefix(number, country, metadata) {\n\tif (!country) {\n\t\treturn;\n\t}\n\n\t// Check if the number is IDD-prefixed.\n\n\tvar countryMetadata = new Metadata(metadata);\n\tcountryMetadata.country(country);\n\n\tvar IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());\n\n\tif (number.search(IDDPrefixPattern) !== 0) {\n\t\treturn;\n\t}\n\n\t// Strip IDD prefix.\n\tnumber = number.slice(number.match(IDDPrefixPattern)[0].length);\n\n\t// Some kind of a weird edge case.\n\t// No explanation from Google given.\n\tvar matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n\t/* istanbul ignore next */\n\tif (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n\t\tif (matchedGroups[1] === '0') {\n\t\t\treturn;\n\t\t}\n\t}\n\n\treturn number;\n}\n//# sourceMappingURL=IDD.js.map","// Deprecated. Import from 'metadata.js' directly instead.\nexport { getCountryCallingCode as default } from './metadata';\n//# sourceMappingURL=getCountryCallingCode.js.map","import AsYouType from './AsYouType';\n\n/**\r\n * Formats a (possibly incomplete) phone number.\r\n * The phone number can be either in E.164 format\r\n * or in a form of national number digits.\r\n * @param {string} value - A possibly incomplete phone number. Either in E.164 format or in a form of national number digits.\r\n * @param {string?} country - Two-letter (\"ISO 3166-1 alpha-2\") country code.\r\n * @return {string} Formatted (possibly incomplete) phone number.\r\n */\nexport default function formatIncompletePhoneNumber(value, country, metadata) {\n if (!metadata) {\n metadata = country;\n country = undefined;\n }\n return new AsYouType(country, metadata).input(value);\n}\n//# sourceMappingURL=formatIncompletePhoneNumber.js.map","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { normalizeArguments } from './parsePhoneNumber';\nimport PhoneNumberMatcher from './PhoneNumberMatcher';\n\n/**\r\n * @return ES6 `for ... of` iterator.\r\n */\nexport default function searchNumbers() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\tvar matcher = new PhoneNumberMatcher(text, options, metadata);\n\n\treturn _defineProperty({}, Symbol.iterator, function () {\n\t\treturn {\n\t\t\tnext: function next() {\n\t\t\t\tif (matcher.hasNext()) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: matcher.next()\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tdone: true\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t});\n}\n//# sourceMappingURL=searchNumbers.js.map","import isValidNumber from '../validate_';\nimport parseDigits from '../parseDigits';\n\nimport { startsWith, endsWith } from './util';\n\n/**\r\n * Leniency when finding potential phone numbers in text segments\r\n * The levels here are ordered in increasing strictness.\r\n */\nexport default {\n /**\r\n * Phone numbers accepted are \"possible\", but not necessarily \"valid\".\r\n */\n POSSIBLE: function POSSIBLE(number, candidate, metadata) {\n return true;\n },\n\n\n /**\r\n * Phone numbers accepted are \"possible\" and \"valid\".\r\n * Numbers written in national format must have their national-prefix\r\n * present if it is usually written for a number of this type.\r\n */\n VALID: function VALID(number, candidate, metadata) {\n if (!isValidNumber(number, undefined, metadata) || !containsOnlyValidXChars(number, candidate.toString(), metadata)) {\n return false;\n }\n\n // Skipped for simplicity.\n // return isNationalPrefixPresentIfRequired(number, metadata)\n return true;\n },\n\n\n /**\r\n * Phone numbers accepted are \"valid\" and\r\n * are grouped in a possible way for this locale. For example, a US number written as\r\n * \"65 02 53 00 00\" and \"650253 0000\" are not accepted at this leniency level, whereas\r\n * \"650 253 0000\", \"650 2530000\" or \"6502530000\" are.\r\n * Numbers with more than one '/' symbol in the national significant number\r\n * are also dropped at this level.\r\n *\r\n * Warning: This level might result in lower coverage especially for regions outside of\r\n * country code \"+1\". If you are not sure about which level to use,\r\n * email the discussion group libphonenumber-discuss@googlegroups.com.\r\n */\n STRICT_GROUPING: function STRICT_GROUPING(number, candidate, metadata) {\n var candidateString = candidate.toString();\n\n if (!isValidNumber(number, undefined, metadata) || !containsOnlyValidXChars(number, candidateString, metadata) || containsMoreThanOneSlashInNationalNumber(number, candidateString) || !isNationalPrefixPresentIfRequired(number, metadata)) {\n return false;\n }\n\n return checkNumberGroupingIsValid(number, candidate, metadata, allNumberGroupsRemainGrouped);\n },\n\n\n /**\r\n * Phone numbers accepted are {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid} and\r\n * are grouped in the same way that we would have formatted it, or as a single block. For\r\n * example, a US number written as \"650 2530000\" is not accepted at this leniency level, whereas\r\n * \"650 253 0000\" or \"6502530000\" are.\r\n * Numbers with more than one '/' symbol are also dropped at this level.\r\n *

\r\n * Warning: This level might result in lower coverage especially for regions outside of country\r\n * code \"+1\". If you are not sure about which level to use, email the discussion group\r\n * libphonenumber-discuss@googlegroups.com.\r\n */\n EXACT_GROUPING: function EXACT_GROUPING(number, candidate, metadata) {\n var candidateString = candidate.toString();\n\n if (!isValidNumber(number, undefined, metadata) || !containsOnlyValidXChars(number, candidateString, metadata) || containsMoreThanOneSlashInNationalNumber(number, candidateString) || !isNationalPrefixPresentIfRequired(number, metadata)) {\n return false;\n }\n\n return checkNumberGroupingIsValid(number, candidate, metadata, allNumberGroupsAreExactlyPresent);\n }\n};\n\nfunction containsOnlyValidXChars(number, candidate, metadata) {\n // The characters 'x' and 'X' can be (1) a carrier code, in which case they always precede the\n // national significant number or (2) an extension sign, in which case they always precede the\n // extension number. We assume a carrier code is more than 1 digit, so the first case has to\n // have more than 1 consecutive 'x' or 'X', whereas the second case can only have exactly 1 'x'\n // or 'X'. We ignore the character if it appears as the last character of the string.\n for (var index = 0; index < candidate.length - 1; index++) {\n var charAtIndex = candidate.charAt(index);\n\n if (charAtIndex === 'x' || charAtIndex === 'X') {\n var charAtNextIndex = candidate.charAt(index + 1);\n\n if (charAtNextIndex === 'x' || charAtNextIndex === 'X') {\n // This is the carrier code case, in which the 'X's always precede the national\n // significant number.\n index++;\n if (util.isNumberMatch(number, candidate.substring(index)) != MatchType.NSN_MATCH) {\n return false;\n }\n // This is the extension sign case, in which the 'x' or 'X' should always precede the\n // extension number.\n } else if (parseDigits(candidate.substring(index)) !== number.ext) {\n return false;\n }\n }\n }\n\n return true;\n}\n\nfunction isNationalPrefixPresentIfRequired(number, _metadata) {\n // First, check how we deduced the country code. If it was written in international format, then\n // the national prefix is not required.\n if (number.getCountryCodeSource() != 'FROM_DEFAULT_COUNTRY') {\n return true;\n }\n\n var phoneNumberRegion = util.getRegionCodeForCountryCode(number.getCountryCode());\n\n var metadata = util.getMetadataForRegion(phoneNumberRegion);\n if (metadata == null) {\n return true;\n }\n\n // Check if a national prefix should be present when formatting this number.\n var nationalNumber = util.getNationalSignificantNumber(number);\n var formatRule = util.chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber);\n\n // To do this, we check that a national prefix formatting rule was present\n // and that it wasn't just the first-group symbol ($1) with punctuation.\n if (formatRule && formatRule.getNationalPrefixFormattingRule().length > 0) {\n if (formatRule.getNationalPrefixOptionalWhenFormatting()) {\n // The national-prefix is optional in these cases, so we don't need to check if it was\n // present.\n return true;\n }\n\n if (PhoneNumberUtil.formattingRuleHasFirstGroupOnly(formatRule.getNationalPrefixFormattingRule())) {\n // National Prefix not needed for this number.\n return true;\n }\n\n // Normalize the remainder.\n var rawInputCopy = PhoneNumberUtil.normalizeDigitsOnly(number.getRawInput());\n\n // Check if we found a national prefix and/or carrier code at the start of the raw input, and\n // return the result.\n return util.maybeStripNationalPrefixAndCarrierCode(rawInputCopy, metadata, null);\n }\n\n return true;\n}\n\nexport function containsMoreThanOneSlashInNationalNumber(number, candidate) {\n var firstSlashInBodyIndex = candidate.indexOf('/');\n if (firstSlashInBodyIndex < 0) {\n // No slashes, this is okay.\n return false;\n }\n\n // Now look for a second one.\n var secondSlashInBodyIndex = candidate.indexOf('/', firstSlashInBodyIndex + 1);\n if (secondSlashInBodyIndex < 0) {\n // Only one slash, this is okay.\n return false;\n }\n\n // If the first slash is after the country calling code, this is permitted.\n var candidateHasCountryCode = number.getCountryCodeSource() === CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN || number.getCountryCodeSource() === CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN;\n\n if (candidateHasCountryCode && PhoneNumberUtil.normalizeDigitsOnly(candidate.substring(0, firstSlashInBodyIndex)) === String(number.getCountryCode())) {\n // Any more slashes and this is illegal.\n return candidate.slice(secondSlashInBodyIndex + 1).indexOf('/') >= 0;\n }\n\n return true;\n}\n\nfunction checkNumberGroupingIsValid(number, candidate, metadata, checkGroups) {\n // TODO: Evaluate how this works for other locales (testing has been limited to NANPA regions)\n // and optimise if necessary.\n var normalizedCandidate = normalizeDigits(candidate, true /* keep non-digits */);\n var formattedNumberGroups = getNationalNumberGroups(metadata, number, null);\n if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) {\n return true;\n }\n\n // If this didn't pass, see if there are any alternate formats, and try them instead.\n var alternateFormats = MetadataManager.getAlternateFormatsForCountry(number.getCountryCode());\n\n if (alternateFormats) {\n for (var _iterator = alternateFormats.numberFormats(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var alternateFormat = _ref;\n\n formattedNumberGroups = getNationalNumberGroups(metadata, number, alternateFormat);\n\n if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\r\n * Helper method to get the national-number part of a number, formatted without any national\r\n * prefix, and return it as a set of digit blocks that would be formatted together.\r\n */\nfunction getNationalNumberGroups(metadata, number, formattingPattern) {\n if (formattingPattern) {\n // We format the NSN only, and split that according to the separator.\n var nationalSignificantNumber = util.getNationalSignificantNumber(number);\n return util.formatNsnUsingPattern(nationalSignificantNumber, formattingPattern, 'RFC3966', metadata).split('-');\n }\n\n // This will be in the format +CC-DG;ext=EXT where DG represents groups of digits.\n var rfc3966Format = formatNumber(number, 'RFC3966', metadata);\n\n // We remove the extension part from the formatted string before splitting it into different\n // groups.\n var endIndex = rfc3966Format.indexOf(';');\n if (endIndex < 0) {\n endIndex = rfc3966Format.length;\n }\n\n // The country-code will have a '-' following it.\n var startIndex = rfc3966Format.indexOf('-') + 1;\n return rfc3966Format.slice(startIndex, endIndex).split('-');\n}\n\nfunction allNumberGroupsAreExactlyPresent(metadata, number, normalizedCandidate, formattedNumberGroups) {\n var candidateGroups = normalizedCandidate.split(NON_DIGITS_PATTERN);\n\n // Set this to the last group, skipping it if the number has an extension.\n var candidateNumberGroupIndex = number.hasExtension() ? candidateGroups.length - 2 : candidateGroups.length - 1;\n\n // First we check if the national significant number is formatted as a block.\n // We use contains and not equals, since the national significant number may be present with\n // a prefix such as a national number prefix, or the country code itself.\n if (candidateGroups.length == 1 || candidateGroups[candidateNumberGroupIndex].contains(util.getNationalSignificantNumber(number))) {\n return true;\n }\n\n // Starting from the end, go through in reverse, excluding the first group, and check the\n // candidate and number groups are the same.\n var formattedNumberGroupIndex = formattedNumberGroups.length - 1;\n while (formattedNumberGroupIndex > 0 && candidateNumberGroupIndex >= 0) {\n if (candidateGroups[candidateNumberGroupIndex] !== formattedNumberGroups[formattedNumberGroupIndex]) {\n return false;\n }\n formattedNumberGroupIndex--;\n candidateNumberGroupIndex--;\n }\n\n // Now check the first group. There may be a national prefix at the start, so we only check\n // that the candidate group ends with the formatted number group.\n return candidateNumberGroupIndex >= 0 && endsWith(candidateGroups[candidateNumberGroupIndex], formattedNumberGroups[0]);\n}\n\nfunction allNumberGroupsRemainGrouped(metadata, number, normalizedCandidate, formattedNumberGroups) {\n var fromIndex = 0;\n if (number.getCountryCodeSource() !== CountryCodeSource.FROM_DEFAULT_COUNTRY) {\n // First skip the country code if the normalized candidate contained it.\n var countryCode = String(number.getCountryCode());\n fromIndex = normalizedCandidate.indexOf(countryCode) + countryCode.length();\n }\n\n // Check each group of consecutive digits are not broken into separate groupings in the\n // {@code normalizedCandidate} string.\n for (var i = 0; i < formattedNumberGroups.length; i++) {\n // Fails if the substring of {@code normalizedCandidate} starting from {@code fromIndex}\n // doesn't contain the consecutive digits in formattedNumberGroups[i].\n fromIndex = normalizedCandidate.indexOf(formattedNumberGroups[i], fromIndex);\n if (fromIndex < 0) {\n return false;\n }\n // Moves {@code fromIndex} forward.\n fromIndex += formattedNumberGroups[i].length();\n if (i == 0 && fromIndex < normalizedCandidate.length()) {\n // We are at the position right after the NDC. We get the region used for formatting\n // information based on the country code in the phone number, rather than the number itself,\n // as we do not need to distinguish between different countries with the same country\n // calling code and this is faster.\n var region = util.getRegionCodeForCountryCode(number.getCountryCode());\n if (util.getNddPrefixForRegion(region, true) != null && Character.isDigit(normalizedCandidate.charAt(fromIndex))) {\n // This means there is no formatting symbol after the NDC. In this case, we only\n // accept the number if there is no formatting symbol at all in the number, except\n // for extensions. This is only important for countries with national prefixes.\n var nationalSignificantNumber = util.getNationalSignificantNumber(number);\n return startsWith(normalizedCandidate.slice(fromIndex - formattedNumberGroups[i].length), nationalSignificantNumber);\n }\n }\n }\n\n // The check here makes sure that we haven't mistakenly already used the extension to\n // match the last group of the subscriber number. Note the extension cannot have\n // formatting in-between digits.\n return normalizedCandidate.slice(fromIndex).contains(number.getExtension());\n}\n//# sourceMappingURL=Leniency.js.map","import PhoneNumberMatcher from './PhoneNumberMatcher';\n\nexport default function findNumbers(text, options, metadata) {\n\tvar matcher = new PhoneNumberMatcher(text, options, metadata);\n\tvar results = [];\n\twhile (matcher.hasNext()) {\n\t\tresults.push(matcher.next());\n\t}\n\treturn results;\n}\n//# sourceMappingURL=findNumbers_.js.map","import _findNumbers from './findNumbers_';\nimport { normalizeArguments } from './parsePhoneNumber';\n\nexport default function findNumbers() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _findNumbers(text, options, metadata);\n}\n//# sourceMappingURL=findNumbers.js.map","import isViablePhoneNumber from './isViablePhoneNumber';\nimport parseNumber from './parse_';\nimport _isValidNumberForRegion from './isValidNumberForRegion_';\n\nexport default function isValidNumberForRegion(number, country, metadata) {\n\tif (typeof number !== 'string') {\n\t\tthrow new TypeError('number must be a string');\n\t}\n\n\tif (typeof country !== 'string') {\n\t\tthrow new TypeError('country must be a string');\n\t}\n\n\t// `parse` extracts phone numbers from raw text,\n\t// therefore it will cut off all \"garbage\" characters,\n\t// while this `validate` function needs to verify\n\t// that the phone number contains no \"garbage\"\n\t// therefore the explicit `isViablePhoneNumber` check.\n\tvar input = void 0;\n\tif (isViablePhoneNumber(number)) {\n\t\tinput = parseNumber(number, { defaultCountry: country }, metadata);\n\t} else {\n\t\tinput = {};\n\t}\n\n\treturn _isValidNumberForRegion(input, country, undefined, metadata);\n}\n//# sourceMappingURL=isValidNumberForRegion.js.map","import { normalizeArguments } from './getNumberType';\nimport _isPossibleNumber from './isPossibleNumber_';\n\n/**\r\n * Checks if a given phone number is possible.\r\n * Which means it only checks phone number length\r\n * and doesn't test any regular expressions.\r\n *\r\n * Examples:\r\n *\r\n * ```js\r\n * isPossibleNumber('+78005553535', metadata)\r\n * isPossibleNumber('8005553535', 'RU', metadata)\r\n * isPossibleNumber('88005553535', 'RU', metadata)\r\n * isPossibleNumber({ phone: '8005553535', country: 'RU' }, metadata)\r\n * ```\r\n */\nexport default function isPossibleNumber() {\n var _normalizeArguments = normalizeArguments(arguments),\n input = _normalizeArguments.input,\n options = _normalizeArguments.options,\n metadata = _normalizeArguments.metadata;\n\n return _isPossibleNumber(input, options, metadata);\n}\n//# sourceMappingURL=isPossibleNumber.js.map","import PhoneNumber from './PhoneNumber';\n\nexport default function getExampleNumber(country, examples, metadata) {\n\tif (examples[country]) {\n\t\treturn new PhoneNumber(country, examples[country], metadata);\n\t}\n}\n//# sourceMappingURL=getExampleNumber.js.map","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport parsePhoneNumber from './parsePhoneNumber_';\nimport ParseError from './ParseError';\nimport { isSupportedCountry } from './metadata';\n\nexport default function parsePhoneNumberFromString(text, options, metadata) {\n\t// Validate `defaultCountry`.\n\tif (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {\n\t\toptions = _extends({}, options, {\n\t\t\tdefaultCountry: undefined\n\t\t});\n\t}\n\t// Parse phone number.\n\ttry {\n\t\treturn parsePhoneNumber(text, options, metadata);\n\t} catch (error) {\n\t\t/* istanbul ignore else */\n\t\tif (error instanceof ParseError) {\n\t\t\t//\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n//# sourceMappingURL=parsePhoneNumberFromString_.js.map","import { normalizeArguments } from './parsePhoneNumber';\nimport parsePhoneNumberFromString_ from './parsePhoneNumberFromString_';\n\nexport default function parsePhoneNumberFromString() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn parsePhoneNumberFromString_(text, options, metadata);\n}\n//# sourceMappingURL=parsePhoneNumberFromString.js.map","// This is a legacy function.\n// Use `findNumbers()` instead.\n\nimport _findPhoneNumbers, { searchPhoneNumbers as _searchPhoneNumbers } from './findPhoneNumbers_';\nimport { normalizeArguments } from './parsePhoneNumber';\n\nexport default function findPhoneNumbers() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _findPhoneNumbers(text, options, metadata);\n}\n\n/**\r\n * @return ES6 `for ... of` iterator.\r\n */\nexport function searchPhoneNumbers() {\n\tvar _normalizeArguments2 = normalizeArguments(arguments),\n\t text = _normalizeArguments2.text,\n\t options = _normalizeArguments2.options,\n\t metadata = _normalizeArguments2.metadata;\n\n\treturn _searchPhoneNumbers(text, options, metadata);\n}\n//# sourceMappingURL=findPhoneNumbers.js.map","import _isValidNumber from './validate_';\nimport { normalizeArguments } from './getNumberType';\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function isValidNumber() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t input = _normalizeArguments.input,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _isValidNumber(input, options, metadata);\n}\n//# sourceMappingURL=validate.js.map","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nimport _formatNumber from './format_';\nimport parse from './parse_';\n\nexport default function formatNumber() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t input = _normalizeArguments.input,\n\t format = _normalizeArguments.format,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _formatNumber(input, format, options, metadata);\n}\n\n// Sort out arguments\nfunction normalizeArguments(args) {\n\tvar _Array$prototype$slic = Array.prototype.slice.call(args),\n\t _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 5),\n\t arg_1 = _Array$prototype$slic2[0],\n\t arg_2 = _Array$prototype$slic2[1],\n\t arg_3 = _Array$prototype$slic2[2],\n\t arg_4 = _Array$prototype$slic2[3],\n\t arg_5 = _Array$prototype$slic2[4];\n\n\tvar input = void 0;\n\tvar format = void 0;\n\tvar options = void 0;\n\tvar metadata = void 0;\n\n\t// Sort out arguments.\n\n\t// If the phone number is passed as a string.\n\t// `format('8005553535', ...)`.\n\tif (typeof arg_1 === 'string') {\n\t\t// If country code is supplied.\n\t\t// `format('8005553535', 'RU', 'NATIONAL', [options], metadata)`.\n\t\tif (typeof arg_3 === 'string') {\n\t\t\tformat = arg_3;\n\n\t\t\tif (arg_5) {\n\t\t\t\toptions = arg_4;\n\t\t\t\tmetadata = arg_5;\n\t\t\t} else {\n\t\t\t\tmetadata = arg_4;\n\t\t\t}\n\n\t\t\tinput = parse(arg_1, { defaultCountry: arg_2, extended: true }, metadata);\n\t\t}\n\t\t// Just an international phone number is supplied\n\t\t// `format('+78005553535', 'NATIONAL', [options], metadata)`.\n\t\telse {\n\t\t\t\tif (typeof arg_2 !== 'string') {\n\t\t\t\t\tthrow new Error('`format` argument not passed to `formatNumber(number, format)`');\n\t\t\t\t}\n\n\t\t\t\tformat = arg_2;\n\n\t\t\t\tif (arg_4) {\n\t\t\t\t\toptions = arg_3;\n\t\t\t\t\tmetadata = arg_4;\n\t\t\t\t} else {\n\t\t\t\t\tmetadata = arg_3;\n\t\t\t\t}\n\n\t\t\t\tinput = parse(arg_1, { extended: true }, metadata);\n\t\t\t}\n\t}\n\t// If the phone number is passed as a parsed number object.\n\t// `format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', [options], metadata)`.\n\telse if (is_object(arg_1)) {\n\t\t\tinput = arg_1;\n\t\t\tformat = arg_2;\n\n\t\t\tif (arg_4) {\n\t\t\t\toptions = arg_3;\n\t\t\t\tmetadata = arg_4;\n\t\t\t} else {\n\t\t\t\tmetadata = arg_3;\n\t\t\t}\n\t\t} else throw new TypeError('A phone number must either be a string or an object of shape { phone, [country] }.');\n\n\t// Legacy lowercase formats.\n\tif (format === 'International') {\n\t\tformat = 'INTERNATIONAL';\n\t} else if (format === 'National') {\n\t\tformat = 'NATIONAL';\n\t}\n\n\treturn {\n\t\tinput: input,\n\t\tformat: format,\n\t\toptions: options,\n\t\tmetadata: metadata\n\t};\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nvar is_object = function is_object(_) {\n\treturn (typeof _ === 'undefined' ? 'undefined' : _typeof(_)) === 'object';\n};\n//# sourceMappingURL=format.js.map","import _parseNumber from './parse_';\nimport { normalizeArguments } from './parsePhoneNumber';\n\n// `options`:\n// {\n// country:\n// {\n// restrict - (a two-letter country code)\n// the phone number must be in this country\n//\n// default - (a two-letter country code)\n// default country to use for phone number parsing and validation\n// (if no country code could be derived from the phone number)\n// }\n// }\n//\n// Returns `{ country, number }`\n//\n// Example use cases:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\nexport default function parseNumber() {\n\tvar _normalizeArguments = normalizeArguments(arguments),\n\t text = _normalizeArguments.text,\n\t options = _normalizeArguments.options,\n\t metadata = _normalizeArguments.metadata;\n\n\treturn _parseNumber(text, options, metadata);\n}\n//# sourceMappingURL=parse.js.map","module.exports = function cmp (a, b) {\n var pa = a.split('.');\n var pb = b.split('.');\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i]);\n var nb = Number(pb[i]);\n if (na > nb) return 1;\n if (nb > na) return -1;\n if (!isNaN(na) && isNaN(nb)) return 1;\n if (isNaN(na) && !isNaN(nb)) return -1;\n }\n return 0;\n};\n","// Deprecated.\r\n// Use `libphonenumber-js/min` or `libphonenumber-js/max` or `libphonenumber-js/core` instead.\r\n\r\nimport metadata from './metadata.min.json'\r\n\r\nimport parsePhoneNumberCustom from './es6/parsePhoneNumber'\r\nimport parsePhoneNumberFromStringCustom from './es6/parsePhoneNumberFromString'\r\n\r\nimport parseNumberCustom from './es6/parse'\r\nimport formatNumberCustom from './es6/format'\r\nimport getNumberTypeCustom from './es6/getNumberType'\r\nimport getExampleNumberCustom from './es6/getExampleNumber'\r\nimport isPossibleNumberCustom from './es6/isPossibleNumber'\r\nimport isValidNumberCustom from './es6/validate'\r\nimport isValidNumberForRegionCustom from './es6/isValidNumberForRegion'\r\n\r\n// Deprecated\r\nimport findPhoneNumbersCustom, { searchPhoneNumbers as searchPhoneNumbersCustom } from './es6/findPhoneNumbers'\r\nimport { PhoneNumberSearch as PhoneNumberSearchCustom } from './es6/findPhoneNumbers_'\r\n\r\nimport findNumbersCustom from './es6/findNumbers'\r\nimport searchNumbersCustom from './es6/searchNumbers'\r\nimport PhoneNumberMatcherCustom from './es6/PhoneNumberMatcher'\r\n\r\nimport AsYouTypeCustom from './es6/AsYouType'\r\n\r\nimport getCountryCallingCodeCustom from './es6/getCountryCallingCode'\r\nexport { default as Metadata } from './es6/metadata'\r\nimport { getExtPrefix as getExtPrefixCustom, isSupportedCountry as isSupportedCountryCustom } from './es6/metadata'\r\nimport { parseRFC3966 as parseRFC3966Custom, formatRFC3966 as formatRFC3966Custom } from './es6/RFC3966'\r\nimport formatIncompletePhoneNumberCustom from './es6/formatIncompletePhoneNumber'\r\nexport { default as parseIncompletePhoneNumber, parsePhoneNumberCharacter } from './es6/parseIncompletePhoneNumber'\r\n// Deprecated: remove DIGITS export in 2.0.0.\r\n// (it was used in `react-phone-number-input`)\r\nexport { DIGITS, default as parseDigits } from './es6/parseDigits'\r\nexport { default as ParseError } from './es6/ParseError'\r\n\r\nexport function parsePhoneNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn parsePhoneNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function parsePhoneNumberFromString()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn parsePhoneNumberFromStringCustom.apply(this, parameters)\r\n}\r\n\r\nexport function parseNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn parseNumberCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated: remove `parse()` export in 2.0.0.\r\n// (renamed to `parseNumber()`)\r\nexport function parse()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn parseNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function formatNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn formatNumberCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated: remove `format()` export in 2.0.0.\r\n// (renamed to `formatNumber()`)\r\nexport function format()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn formatNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function getNumberType()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn getNumberTypeCustom.apply(this, parameters)\r\n}\r\n\r\nexport function getExampleNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn getExampleNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function isPossibleNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn isPossibleNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function isValidNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn isValidNumberCustom.apply(this, parameters)\r\n}\r\n\r\nexport function isValidNumberForRegion()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn isValidNumberForRegionCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated.\r\nexport function findPhoneNumbers()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn findPhoneNumbersCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated.\r\nexport function searchPhoneNumbers()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn searchPhoneNumbersCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated.\r\nexport function PhoneNumberSearch(text, options)\r\n{\r\n\tPhoneNumberSearchCustom.call(this, text, options, metadata)\r\n}\r\n\r\n// Deprecated.\r\nPhoneNumberSearch.prototype = Object.create(PhoneNumberSearchCustom.prototype, {})\r\nPhoneNumberSearch.prototype.constructor = PhoneNumberSearch\r\n\r\nexport function findNumbers()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn findNumbersCustom.apply(this, parameters)\r\n}\r\n\r\nexport function searchNumbers()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn searchNumbersCustom.apply(this, parameters)\r\n}\r\n\r\nexport function PhoneNumberMatcher(text, options)\r\n{\r\n\tPhoneNumberMatcherCustom.call(this, text, options, metadata)\r\n}\r\n\r\nPhoneNumberMatcher.prototype = Object.create(PhoneNumberMatcherCustom.prototype, {})\r\nPhoneNumberMatcher.prototype.constructor = PhoneNumberMatcher\r\n\r\nexport function AsYouType(country)\r\n{\r\n\tAsYouTypeCustom.call(this, country, metadata)\r\n}\r\n\r\nAsYouType.prototype = Object.create(AsYouTypeCustom.prototype, {})\r\nAsYouType.prototype.constructor = AsYouType\r\n\r\nexport function isSupportedCountry()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn isSupportedCountryCustom.apply(this, parameters)\r\n}\r\n\r\nexport function getExtPrefix()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn getExtPrefixCustom.apply(this, parameters)\r\n}\r\n\r\nexport function parseRFC3966()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn parseRFC3966Custom.apply(this, parameters)\r\n}\r\n\r\nexport function formatRFC3966()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn formatRFC3966Custom.apply(this, parameters)\r\n}\r\n\r\nexport function formatIncompletePhoneNumber()\r\n{\r\n\tvar parameters = Array.prototype.slice.call(arguments)\r\n\tparameters.push(metadata)\r\n\treturn formatIncompletePhoneNumberCustom.apply(this, parameters)\r\n}\r\n\r\n// Deprecated: remove this in 2.0.0 and make `custom.js` in ES6\r\n// (the old `custom.js` becomes `custom.commonjs.js`).\r\nexport { default as parseCustom } from './es6/parse'\r\nexport { default as formatCustom } from './es6/format'\r\nexport { default as isValidNumberCustom } from './es6/validate'\r\nexport { default as findPhoneNumbersCustom } from './es6/findPhoneNumbers'\r\nexport { searchPhoneNumbers as searchPhoneNumbersCustom } from './es6/findPhoneNumbers'\r\nexport { PhoneNumberSearch as PhoneNumberSearchCustom } from './es6/findPhoneNumbers_'\r\nexport { default as getNumberTypeCustom } from './es6/getNumberType'\r\nexport { default as getCountryCallingCodeCustom } from './es6/getCountryCallingCode'\r\n\r\nexport\r\n{\r\n\tdefault as AsYouTypeCustom,\r\n\t// Deprecated: `DIGIT_PLACEHOLDER` was used by `react-phone-number-input`.\r\n\t// Seems to be not used anymore.\r\n\tDIGIT_PLACEHOLDER\r\n}\r\nfrom './es6/AsYouType'\r\n\r\nexport function getCountryCallingCode(country)\r\n{\r\n\treturn getCountryCallingCodeCustom(country, metadata)\r\n}\r\n\r\n// `getPhoneCode` name is deprecated, use `getCountryCallingCode` instead.\r\nexport function getPhoneCode(country)\r\n{\r\n\treturn getCountryCallingCode(country)\r\n}\r\n\r\n// `getPhoneCodeCustom` name is deprecated, use `getCountryCallingCodeCustom` instead.\r\nexport function getPhoneCodeCustom(country, metadata)\r\n{\r\n\treturn getCountryCallingCodeCustom(country, metadata)\r\n}"],"sourceRoot":""}