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U,KAI/E,OAAgBX,EAAgBgG,EAAKC,UAC9C,C","sources":["webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/isObject.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/mergeArrays.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/parseDigits.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js","webpack://frontend/./node_modules/libphonenumber-js/es6/helpers/getNumberType.js"],"sourcesContent":["var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=isObject.js.map","import Metadata from '../metadata.js';\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\n\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n var _metadata = new Metadata(metadata);\n\n var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return [];\n }\n\n return possibleCountries.filter(function (country) {\n return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);\n });\n}\n\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {\n var _metadata = new Metadata(metadata);\n\n _metadata.selectNumberingPlan(country);\n\n if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {\n return true;\n }\n\n return false;\n}\n//# sourceMappingURL=getPossibleCountriesForNumber.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport default function mergeArrays(a, b) {\n var merged = a.slice();\n\n for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done;) {\n var element = _step.value;\n\n if (a.indexOf(element) < 0) {\n merged.push(element);\n }\n }\n\n return merged.sort(function (a, b) {\n return a - b;\n }); // ES6 version, requires Set polyfill.\n // let merged = new Set(a)\n // for (const element of b) {\n // \tmerged.add(i)\n // }\n // return Array.from(merged).sort((a, b) => a - b)\n}\n//# sourceMappingURL=mergeArrays.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// 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 '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n \"\\uFF10\": '0',\n // Fullwidth digit 0\n \"\\uFF11\": '1',\n // Fullwidth digit 1\n \"\\uFF12\": '2',\n // Fullwidth digit 2\n \"\\uFF13\": '3',\n // Fullwidth digit 3\n \"\\uFF14\": '4',\n // Fullwidth digit 4\n \"\\uFF15\": '5',\n // Fullwidth digit 5\n \"\\uFF16\": '6',\n // Fullwidth digit 6\n \"\\uFF17\": '7',\n // Fullwidth digit 7\n \"\\uFF18\": '8',\n // Fullwidth digit 8\n \"\\uFF19\": '9',\n // Fullwidth digit 9\n \"\\u0660\": '0',\n // Arabic-indic digit 0\n \"\\u0661\": '1',\n // Arabic-indic digit 1\n \"\\u0662\": '2',\n // Arabic-indic digit 2\n \"\\u0663\": '3',\n // Arabic-indic digit 3\n \"\\u0664\": '4',\n // Arabic-indic digit 4\n \"\\u0665\": '5',\n // Arabic-indic digit 5\n \"\\u0666\": '6',\n // Arabic-indic digit 6\n \"\\u0667\": '7',\n // Arabic-indic digit 7\n \"\\u0668\": '8',\n // Arabic-indic digit 8\n \"\\u0669\": '9',\n // Arabic-indic digit 9\n \"\\u06F0\": '0',\n // Eastern-Arabic digit 0\n \"\\u06F1\": '1',\n // Eastern-Arabic digit 1\n \"\\u06F2\": '2',\n // Eastern-Arabic digit 2\n \"\\u06F3\": '3',\n // Eastern-Arabic digit 3\n \"\\u06F4\": '4',\n // Eastern-Arabic digit 4\n \"\\u06F5\": '5',\n // Eastern-Arabic digit 5\n \"\\u06F6\": '6',\n // Eastern-Arabic digit 6\n \"\\u06F7\": '7',\n // Eastern-Arabic digit 7\n \"\\u06F8\": '8',\n // Eastern-Arabic digit 8\n \"\\u06F9\": '9' // Eastern-Arabic digit 9\n\n};\nexport function parseDigit(character) {\n return DIGITS[character];\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 */\n\nexport default function parseDigits(string) {\n var result = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n var digit = parseDigit(character);\n\n if (digit) {\n result += digit;\n }\n }\n\n return result;\n}\n//# sourceMappingURL=parseDigits.js.map","/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regular_expression) {\n // If assigning the `''` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regular_expression + ')$').test(text);\n}\n//# sourceMappingURL=matchesEntirely.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport getNumberType from './getNumberType.js';\nexport default function getCountryByNationalNumber(nationalPhoneNumber, _ref) {\n var countries = _ref.countries,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n // Re-create `metadata` because it will be selecting a `country`.\n metadata = new Metadata(metadata); // const matchingCountries = []\n\n for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {\n var country = _step.value;\n metadata.country(country); // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // condition for a phone number to belong to a country.\n // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n // because of the intended use of that feature.\n\n if (metadata.leadingDigits()) {\n if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {\n return country;\n }\n } // Else perform full validation with all of those\n // fixed-line/mobile/etc regular expressions.\n else if (getNumberType({\n phone: nationalPhoneNumber,\n country: country\n }, undefined, metadata.metadata)) {\n // If both the `defaultCountry` and the \"main\" one match the phone number,\n // don't prefer the `defaultCountry` over the \"main\" one.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n return country; // // If the `defaultCountry` is among the `matchingCountries` then return it.\n // if (defaultCountry) {\n // \tif (country === defaultCountry) {\n // \t\treturn country\n // \t}\n // \tmatchingCountries.push(country)\n // } else {\n // \treturn country\n // }\n }\n } // // Return the first (\"main\") one of the `matchingCountries`.\n // if (matchingCountries.length > 0) {\n // \treturn matchingCountries[0]\n // }\n\n}\n//# sourceMappingURL=getCountryByNationalNumber.js.map","import getCountryByNationalNumber from './getCountryByNationalNumber.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\nexport default function getCountryByCallingCode(callingCode, _ref) {\n var nationalPhoneNumber = _ref.nationalNumber,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(callingCode)) {\n return '001';\n }\n }\n\n var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return;\n } // If there's just one country corresponding to the country code,\n // then just return it, without further phone number digits validation.\n\n\n if (possibleCountries.length === 1) {\n return possibleCountries[0];\n }\n\n return getCountryByNationalNumber(nationalPhoneNumber, {\n countries: possibleCountries,\n defaultCountry: defaultCountry,\n metadata: metadata.metadata\n });\n}\n//# sourceMappingURL=getCountryByCallingCode.js.map","import Metadata from '../metadata.js';\nimport { VALID_DIGITS } from '../constants.js';\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\nexport default function stripIddPrefix(number, country, callingCode, metadata) {\n if (!country) {\n return;\n } // Check if the number is IDD-prefixed.\n\n\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());\n\n if (number.search(IDDPrefixPattern) !== 0) {\n return;\n } // Strip IDD prefix.\n\n\n number = number.slice(number.match(IDDPrefixPattern)[0].length); // If there're any digits after an IDD prefix,\n // then those digits are a country calling code.\n // Since no country code starts with a `0`,\n // the code below validates that the next digit (if present) is not `0`.\n\n var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n\n if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n if (matchedGroups[1] === '0') {\n return;\n }\n }\n\n return number;\n}\n//# sourceMappingURL=stripIddPrefix.js.map","import Metadata from '../metadata.js';\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 */\n\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/; // For regions that have multiple IDD prefixes\n// a preferred IDD prefix is returned.\n\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map","import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from '../constants.js';\nimport createExtensionPattern from './extension/createExtensionPattern.js'; // 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//\n\nvar MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}'; //\n// And this is the second reg-exp:\n// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)\n//\n\nexport var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*'; // This regular expression isn't present in Google's `libphonenumber`\n// and is only used to determine whether the phone number being input\n// is too short for it to even consider it a \"valid\" number.\n// This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nvar VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');\nexport var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions\n'(?:' + createExtensionPattern() + ')?'; // The combined regular expression for valid phone numbers:\n//\n\nvar VALID_PHONE_NUMBER_PATTERN = new RegExp( // Either a short two-digit-only phone number\n'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' + // Or a longer fully parsed phone number (min 3 characters)\n'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i'); // 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//\n\nexport default function isViablePhoneNumber(number) {\n return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);\n} // This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nexport function isViablePhoneNumberStart(number) {\n return VALID_PHONE_NUMBER_START_REG_EXP.test(number);\n}\n//# sourceMappingURL=isViablePhoneNumber.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL']; // Finds out national phone number type (fixed line, mobile, etc)\n\nexport default function getNumberType(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {}; // When `parse()` returns an empty object — `{}` —\n // that means that the phone number is malformed,\n // so it can't possibly be valid.\n\n if (!input.country && !input.countryCallingCode) {\n return;\n }\n\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // The following is copy-pasted from the original function:\n // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n // Is this national number even valid for this country\n\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n return;\n } // Is it fixed line number\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n // Because duplicate regular expressions are removed\n // to reduce metadata size, if \"mobile\" pattern is \"\"\n // then it means it was removed due to being a duplicate of the fixed-line pattern.\n //\n if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n return 'FIXED_LINE_OR_MOBILE';\n } // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n // For example, for \"US\" country.\n // Old metadata (< `1.0.18`) had a specific \"types\" data structure\n // that happened to be `undefined` for `MOBILE` in that case.\n // Newer metadata (>= `1.0.18`) has another data structure that is\n // not `undefined` for `MOBILE` in that case (it's just an empty array).\n // So this `if` is just for backwards compatibility with old metadata.\n\n\n if (!metadata.type('MOBILE')) {\n return 'FIXED_LINE_OR_MOBILE';\n } // Check if the number happens to qualify as both fixed line and mobile.\n // (no such country in the minimal metadata set)\n\n /* istanbul ignore if */\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n return 'FIXED_LINE';\n }\n\n for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {\n var type = _step.value;\n\n if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n return type;\n }\n }\n}\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n type = metadata.type(type);\n\n if (!type || !type.pattern()) {\n return false;\n } // Check if any possible number lengths are present;\n // if so, we use them to avoid checking\n // the validation pattern if they don't match.\n // If they are absent, this means they match\n // the general description, which we have\n // already checked before a specific number type.\n\n\n if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {\n return false;\n }\n\n return matchesEntirely(nationalNumber, type.pattern());\n}\n//# sourceMappingURL=getNumberType.js.map"],"names":["objectConstructor","constructor","isObject","object","getPossibleCountriesForNumber","callingCode","nationalNumber","metadata","possibleCountries","getCountryCodesForCallingCode","filter","country","_metadata","selectNumberingPlan","numberingPlan","possibleLengths","indexOf","length","couldNationalNumberBelongToCountry","_arrayLikeToArray","arr","len","i","arr2","Array","mergeArrays","a","b","_step","merged","slice","_iterator","o","allowArrayLike","it","Symbol","iterator","call","next","bind","isArray","minLen","n","Object","prototype","toString","name","from","test","_unsupportedIterableToArray","done","value","TypeError","_createForOfIteratorHelperLoose","element","push","sort","DIGITS","parseDigit","character","matchesEntirely","text","regular_expression","RegExp","USE_NON_GEOGRAPHIC_COUNTRY_CODE","getCountryByCallingCode","_ref","nationalPhoneNumber","defaultCountry","isNonGeographicCallingCode","countries","leadingDigits","search","getNumberType","phone","undefined","getCountryByNationalNumber","CAPTURING_DIGIT_PATTERN","stripIddPrefix","number","countryMetadata","IDDPrefixPattern","IDDPrefix","matchedGroups","match","SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","defaultIDDPrefix","MIN_LENGTH_PHONE_NUMBER_PATTERN","VALID_PHONE_NUMBER","VALID_PHONE_NUMBER_START_REG_EXP","VALID_PHONE_NUMBER_WITH_EXTENSION","VALID_PHONE_NUMBER_PATTERN","isViablePhoneNumber","isViablePhoneNumberStart","NON_FIXED_LINE_PHONE_TYPES","input","options","countryCallingCode","v2","nationalNumberPattern","isNumberTypeEqualTo","type","pattern"],"sourceRoot":""}