• Home
  • Raw
  • Download

Lines Matching refs:i18n

53 i18n.phonenumbers.PhoneNumberUtil = function() {
60 goog.addSingletonGetter(i18n.phonenumbers.PhoneNumberUtil);
68 i18n.phonenumbers.Error = {
93 i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_ = 1;
103 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ = 2;
114 i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_ = 17;
124 i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ = 3;
135 i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_ = 250;
145 i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ = 'ZZ';
158 i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_ = {
172 i18n.phonenumbers.PhoneNumberUtil.GEO_MOBILE_COUNTRIES_ = [
185 i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN = '+';
193 i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ = '*';
203 i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ = ';ext=';
211 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ = 'tel:';
219 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_ = ';phone-context=';
227 i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_ = ';isub=';
238 i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS = {
291 i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_ = {
302 '+': i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN,
315 i18n.phonenumbers.PhoneNumberUtil.ALPHA_MAPPINGS_ = {
352 i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_ = {
431 i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_ = {
526 i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_ =
542 i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION =
555 i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ =
567 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ = 'A-Za-z';
575 i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ = '+\uFF0B';
582 i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN =
583 new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
591 i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN =
592 new RegExp('^[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
600 i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_ =
601 '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']+';
608 i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN =
609 new RegExp('([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + '])');
625 i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_ =
626 new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ +
627 i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']');
642 i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_ = /[\\\/] *x/;
654 i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_ =
655 new RegExp('[^' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ +
656 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ + '#]+$');
668 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_ =
698 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ =
699 '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{' +
700 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ + '}';
710 i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ =
711 '[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']*(?:[' +
712 i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
713 i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ + ']*[' +
714 i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']){3,}[' +
715 i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
716 i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ +
717 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ +
718 i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']*';
732 i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ = ' ext. ';
739 i18n.phonenumbers.PhoneNumberUtil.RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
746 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_DIGIT_ = '(['
747 + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']|'
748 + i18n.phonenumbers.PhoneNumberUtil.RFC3966_VISUAL_SEPARATOR_ + ')';
755 i18n.phonenumbers.PhoneNumberUtil.RFC3966_GLOBAL_NUMBER_DIGITS_ = '^\\'
756 + i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN
757 + i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_DIGIT_ + '*['
758 + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']'
759 + i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_DIGIT_ + '*$';
769 i18n.phonenumbers.PhoneNumberUtil.RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ =
770 new RegExp(i18n.phonenumbers.PhoneNumberUtil.RFC3966_GLOBAL_NUMBER_DIGITS_);
777 i18n.phonenumbers.PhoneNumberUtil.ALPHANUM_ =
778 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_
779 + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_;
786 i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINLABEL_ = '['
787 + i18n.phonenumbers.PhoneNumberUtil.ALPHANUM_ + ']+((\\-)*['
788 + i18n.phonenumbers.PhoneNumberUtil.ALPHANUM_ + '])*';
795 i18n.phonenumbers.PhoneNumberUtil.RFC3966_TOPLABEL_ = '['
796 + i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ + ']+((\\-)*['
797 + i18n.phonenumbers.PhoneNumberUtil.ALPHANUM_ + '])*';
804 i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINNAME_ = '^('
805 + i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINLABEL_ + '\\.)*'
806 + i18n.phonenumbers.PhoneNumberUtil.RFC3966_TOPLABEL_ + '\\.?$';
816 i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINNAME_PATTERN_ =
817 new RegExp(i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINNAME_);
826 i18n.phonenumbers.PhoneNumberUtil.extnDigits_ =
828 return ('([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']'
839 i18n.phonenumbers.PhoneNumberUtil.createExtnPattern_ =
887 var rfcExtn = i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_
888 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitAfterExplicitLabel);
892 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitAfterExplicitLabel)
897 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitAfterAmbiguousChar)
901 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitWhenNotSure) + "#";
906 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitAfterLikelyLabel)
911 + i18n.phonenumbers.PhoneNumberUtil.extnDigits_(extLimitAfterAmbiguousChar)
943 i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_ =
945 i18n.phonenumbers.PhoneNumberUtil.createExtnPattern_() +
957 i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_ =
960 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ +
962 '^' + i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ +
963 '(?:' + i18n.phonenumbers.PhoneNumberUtil.createExtnPattern_() +
972 i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_ = /\D+/;
984 i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_ = /(\$\d)/;
992 i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_ = /\$NP/;
1000 i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_ = /\$FG/;
1008 i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_ = /\$CC/;
1019 i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_ =
1027 i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY = '001';
1046 i18n.phonenumbers.PhoneNumberFormat = {
1059 i18n.phonenumbers.PhoneNumberType = {
1097 i18n.phonenumbers.PhoneNumberUtil.MatchType = {
1111 i18n.phonenumbers.PhoneNumberUtil.ValidationResult = {
1155 i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber = function(number) {
1161 .search(i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_);
1166 i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_, '');
1171 .search(i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_);
1194 i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber = function(number) {
1195 if (number.length < i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
1198 return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
1199 i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_, number);
1220 i18n.phonenumbers.PhoneNumberUtil.normalize = function(number) {
1221 if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
1222 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_, number)) {
1223 return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1224 i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, true);
1226 return i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(number);
1240 i18n.phonenumbers.PhoneNumberUtil.normalizeSB_ = function(number) {
1242 var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil.normalize(number
1257 i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly = function(number) {
1258 return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1259 i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS, true);
1271 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly =
1274 return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1275 i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_,
1288 i18n.phonenumbers.PhoneNumberUtil.convertAlphaCharactersInNumber =
1291 return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1292 i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, false);
1342 i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfGeographicalAreaCode =
1405 i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfNationalDestinationCode =
1422 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1425 i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_);
1440 if (this.getNumberType(number) == i18n.phonenumbers.PhoneNumberType.MOBILE) {
1448 var mobileToken = i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
1468 i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken =
1470 return i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_[
1481 i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedRegions = function() {
1482 return Object.keys(i18n.phonenumbers.metadata.countryToMetadata)
1495 i18n.phonenumbers.PhoneNumberUtil.prototype
1498 Object.keys(i18n.phonenumbers.metadata.countryToMetadata)
1517 i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedCallingCodes =
1520 Object.keys(i18n.phonenumbers.metadata.countryCodeToRegionCodeMap);
1538 i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_ = function(desc) {
1553 i18n.phonenumbers.PhoneNumberUtil.descHasData_ = function(desc) {
1560 i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(desc) ||
1574 i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_ =
1578 goog.object.forEach(i18n.phonenumbers.PhoneNumberType,
1580 if (type == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE ||
1581 type == i18n.phonenumbers.PhoneNumberType.UNKNOWN) {
1588 var desc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
1590 if (i18n.phonenumbers.PhoneNumberUtil.descHasData_(desc)) {
1610 i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedTypesForRegion =
1615 return i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_(
1635 i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedTypesForNonGeoEntity =
1642 return i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_(
1662 i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_ =
1696 i18n.phonenumbers.PhoneNumberUtil.prototype.formattingRuleHasFirstGroupOnly =
1699 i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_.
1712 i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberGeographical =
1717 return numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE ||
1718 numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE ||
1719 (i18n.phonenumbers.PhoneNumberUtil.GEO_MOBILE_COUNTRIES_.includes(
1721 numberType == i18n.phonenumbers.PhoneNumberType.MOBILE);
1732 i18n.phonenumbers.PhoneNumberUtil.prototype.isValidRegionCode_ =
1745 regionCode.toUpperCase() in i18n.phonenumbers.metadata.countryToMetadata;
1756 i18n.phonenumbers.PhoneNumberUtil.prototype.hasValidCountryCallingCode_ =
1760 i18n.phonenumbers.metadata.countryCodeToRegionCodeMap;
1781 i18n.phonenumbers.PhoneNumberUtil.prototype.format =
1800 if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.E164) {
1805 countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.E164,
1853 i18n.phonenumbers.PhoneNumberUtil.prototype.formatByPattern =
1898 .replace(i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_,
1900 .replace(i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_, '$1');
1936 i18n.phonenumbers.PhoneNumberUtil.prototype.
1959 number, metadata, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1963 i18n.phonenumbers.PhoneNumberFormat.NATIONAL, carrierCode);
1965 countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.NATIONAL,
1976 i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegionOrCallingCode_ =
1978 return i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ==
2005 i18n.phonenumbers.PhoneNumberUtil.prototype.
2033 i18n.phonenumbers.PhoneNumberUtil.prototype.formatNumberForMobileDialing =
2054 var isValidNumber = (numberType != i18n.phonenumbers.PhoneNumberType.UNKNOWN);
2058 (numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) ||
2059 (numberType == i18n.phonenumbers.PhoneNumberType.MOBILE) ||
2060 (numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE);
2076 i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
2086 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT) {
2088 numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2091 numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2098 i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ||
2120 numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2123 numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2132 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL) :
2133 this.format(numberNoExt, i18n.phonenumbers.PhoneNumberFormat.E164);
2137 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
2163 i18n.phonenumbers.PhoneNumberUtil.prototype.formatOutOfCountryCallingNumber =
2168 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2178 i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
2183 this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2196 i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2214 } else if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
2215 i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
2229 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2232 metadataForRegion, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2237 countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
2260 i18n.phonenumbers.PhoneNumberUtil.prototype.formatInOriginalFormat =
2269 return this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2274 case i18n.phonenumbers.PhoneNumber.CountryCodeSource
2277 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2279 case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD:
2283 case i18n.phonenumbers.PhoneNumber.CountryCodeSource
2286 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL).substring(1);
2288 case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY:
2300 this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2350 candidateNationalPrefixRule = i18n.phonenumbers.PhoneNumberUtil
2362 i18n.phonenumbers.PhoneNumberFormat.NATIONAL, [numFormatCopy]);
2373 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
2377 i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(rawInput);
2395 i18n.phonenumbers.PhoneNumberUtil.prototype.rawInputContainsNationalPrefix_ =
2400 i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(rawInput);
2424 i18n.phonenumbers.PhoneNumberUtil.prototype.hasFormattingPatternForNumber_ =
2472 i18n.phonenumbers.PhoneNumberUtil.prototype.
2490 rawInput = i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(
2492 i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_,
2511 if (countryCode == i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
2539 i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2551 i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
2552 i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
2566 i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2575 countryCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
2590 i18n.phonenumbers.PhoneNumberUtil.prototype.getNationalSignificantNumber =
2623 i18n.phonenumbers.PhoneNumberUtil.prototype.
2630 case i18n.phonenumbers.PhoneNumberFormat.E164:
2631 return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2633 case i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL:
2634 return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2636 case i18n.phonenumbers.PhoneNumberFormat.RFC3966:
2637 return i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ +
2638 i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2640 case i18n.phonenumbers.PhoneNumberFormat.NATIONAL:
2663 i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsn_ =
2673 numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL) ?
2693 i18n.phonenumbers.PhoneNumberUtil.prototype.chooseFormattingPatternForNumber_ =
2711 if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(patternToMatch,
2735 i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsnUsingPattern_ =
2747 if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
2753 .replace(i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_,
2758 i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
2767 if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
2772 i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
2779 if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
2782 new RegExp('^' + i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_),
2786 new RegExp(i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_, 'g'),
2803 i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumber =
2807 i18n.phonenumbers.PhoneNumberType.FIXED_LINE);
2823 i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForType =
2831 var desc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
2854 i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForNonGeoEntity =
2893 i18n.phonenumbers.PhoneNumberUtil.prototype.maybeGetFormattedExtension_ =
2899 if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
2900 return i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ +
2907 return i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ +
2921 i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_ =
2925 case i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE:
2927 case i18n.phonenumbers.PhoneNumberType.TOLL_FREE:
2929 case i18n.phonenumbers.PhoneNumberType.MOBILE:
2931 case i18n.phonenumbers.PhoneNumberType.FIXED_LINE:
2932 case i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE:
2934 case i18n.phonenumbers.PhoneNumberType.SHARED_COST:
2936 case i18n.phonenumbers.PhoneNumberType.VOIP:
2938 case i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER:
2940 case i18n.phonenumbers.PhoneNumberType.PAGER:
2942 case i18n.phonenumbers.PhoneNumberType.UAN:
2944 case i18n.phonenumbers.PhoneNumberType.VOICEMAIL:
2960 i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberType =
2969 return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2983 i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberTypeHelper_ =
2987 return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2991 return i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE;
2994 return i18n.phonenumbers.PhoneNumberType.TOLL_FREE;
2997 return i18n.phonenumbers.PhoneNumberType.SHARED_COST;
3000 return i18n.phonenumbers.PhoneNumberType.VOIP;
3004 return i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER;
3007 return i18n.phonenumbers.PhoneNumberType.PAGER;
3010 return i18n.phonenumbers.PhoneNumberType.UAN;
3013 return i18n.phonenumbers.PhoneNumberType.VOICEMAIL;
3021 return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
3024 return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
3026 return i18n.phonenumbers.PhoneNumberType.FIXED_LINE;
3032 return i18n.phonenumbers.PhoneNumberType.MOBILE;
3034 return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
3045 i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegion =
3059 i18n.phonenumbers.metadata.countryToMetadata[regionCode];
3064 serializer.deserialize(i18n.phonenumbers.PhoneMetadata.getDescriptor(),
3076 i18n.phonenumbers.PhoneNumberUtil.prototype.
3089 i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatchingDesc_ =
3100 return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
3121 i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumber = function(number) {
3148 i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumberForRegion =
3157 (i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY !=
3168 i18n.phonenumbers.PhoneNumberType.UNKNOWN;
3182 i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForNumber =
3192 i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCode];
3210 i18n.phonenumbers.PhoneNumberUtil.prototype.
3231 i18n.phonenumbers.PhoneNumberType.UNKNOWN) {
3248 i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForCountryCode =
3253 i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
3255 i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ : regionCodes[0];
3268 i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodesForCountryCode =
3273 i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
3287 i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForRegion =
3309 i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForValidRegion_ =
3340 i18n.phonenumbers.PhoneNumberUtil.prototype.getNddPrefixForRegion = function(
3369 i18n.phonenumbers.PhoneNumberUtil.prototype.isNANPACountry = function(
3372 i18n.phonenumbers.metadata
3373 .countryCodeToRegionCodeMap[i18n.phonenumbers.PhoneNumberUtil
3390 i18n.phonenumbers.PhoneNumberUtil.prototype.isAlphaNumber = function(number) {
3391 if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(number)) {
3398 return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
3399 i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_,
3418 i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumber =
3423 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE ||
3425 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
3444 i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberForType =
3449 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE ||
3451 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
3465 i18n.phonenumbers.PhoneNumberUtil.prototype.testNumberLength_ =
3468 number, metadata, i18n.phonenumbers.PhoneNumberType.UNKNOWN);
3482 i18n.phonenumbers.PhoneNumberUtil.prototype.testNumberLengthForType_ =
3485 i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(metadata, type);
3499 if (type == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE) {
3500 if (!i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(
3501 i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
3502 metadata, i18n.phonenumbers.PhoneNumberType.FIXED_LINE))) {
3507 number, metadata, i18n.phonenumbers.PhoneNumberType.MOBILE);
3509 var mobileDesc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
3510 metadata, i18n.phonenumbers.PhoneNumberType.MOBILE);
3511 if (i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(
3542 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_LENGTH;
3549 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult
3554 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE;
3556 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT;
3558 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG;
3562 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE :
3563 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_LENGTH;
3592 i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberWithReason =
3595 number, i18n.phonenumbers.PhoneNumberType.UNKNOWN);
3622 i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberForTypeWithReason =
3638 return i18n.phonenumbers.PhoneNumberUtil.ValidationResult
3674 i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberString =
3694 i18n.phonenumbers.PhoneNumberUtil.prototype.truncateTooLongNumber =
3709 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT) {
3728 i18n.phonenumbers.PhoneNumberUtil.prototype.extractCountryCode =
3742 i <= i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ &&
3746 i18n.phonenumbers.metadata.countryCodeToRegionCodeMap) {
3795 i18n.phonenumbers.PhoneNumberUtil.prototype.maybeExtractCountryCode =
3821 i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY) {
3823 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
3824 throw new Error(i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD);
3836 throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
3864 if ((!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
3866 i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
3870 i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG) {
3874 i18n.phonenumbers.PhoneNumber.CountryCodeSource
3899 i18n.phonenumbers.PhoneNumberUtil.prototype.parsePrefixAsIdd_ =
3909 i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN);
3914 i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(
3942 i18n.phonenumbers.PhoneNumberUtil.prototype.
3948 return i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
3951 if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
3954 i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
3958 number.append(i18n.phonenumbers.PhoneNumberUtil.normalize(numberStr));
3959 return i18n.phonenumbers.PhoneNumber.CountryCodeSource
3965 i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(number);
3967 i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD :
3968 i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
3984 i18n.phonenumbers.PhoneNumberUtil.prototype.
4010 i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
4027 !i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
4046 !i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
4070 i18n.phonenumbers.PhoneNumberUtil.prototype.maybeStripExtension =
4077 numberStr.search(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
4080 if (mStart >= 0 && i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
4085 numberStr.match(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
4113 i18n.phonenumbers.PhoneNumberUtil.prototype.checkRegionForParsing_ = function(
4118 i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN.test(
4161 i18n.phonenumbers.PhoneNumberUtil.prototype.parse = function(numberToParse,
4184 i18n.phonenumbers.PhoneNumberUtil.prototype.parseAndKeepRawInput =
4189 i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
4190 throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
4206 i18n.phonenumbers.PhoneNumberUtil.setItalianLeadingZerosForPhoneNumber_ =
4249 i18n.phonenumbers.PhoneNumberUtil.prototype.parseHelper_ =
4253 throw new Error(i18n.phonenumbers.Error.NOT_A_NUMBER);
4255 i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_) {
4256 throw new Error(i18n.phonenumbers.Error.TOO_LONG);
4263 if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
4265 throw new Error(i18n.phonenumbers.Error.NOT_A_NUMBER);
4272 throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
4276 var phoneNumber = new i18n.phonenumbers.PhoneNumber();
4302 if (e.message == i18n.phonenumbers.Error.INVALID_COUNTRY_CODE &&
4303 i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
4307 i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
4329 i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(nationalNumber);
4339 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
4340 throw new Error(i18n.phonenumbers.Error.TOO_SHORT_NSN);
4357 var validationResults = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
4372 i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
4373 throw new Error(i18n.phonenumbers.Error.TOO_SHORT_NSN);
4376 i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_) {
4377 throw new Error(i18n.phonenumbers.Error.TOO_LONG);
4379 i18n.phonenumbers.PhoneNumberUtil.setItalianLeadingZerosForPhoneNumber_(
4394 i18n.phonenumbers.PhoneNumberUtil.prototype.extractPhoneContext_ =
4397 var indexOfPhoneContext = numberToExtractFrom.indexOf(i18n
4405 var phoneContextStart = indexOfPhoneContext + i18n
4432 i18n.phonenumbers.PhoneNumberUtil.prototype.isPhoneContextValid_ =
4443 i18n.phonenumbers.PhoneNumberUtil.RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.exec(
4446 i18n.phonenumbers.PhoneNumberUtil.RFC3966_DOMAINNAME_PATTERN_.exec(
4467 i18n.phonenumbers.PhoneNumberUtil.prototype.buildNationalNumberForParsing_ =
4470 i18n.phonenumbers.PhoneNumberUtil.prototype.extractPhoneContext_(
4473 if (!i18n.phonenumbers.PhoneNumberUtil.prototype.isPhoneContextValid_(
4475 throw new Error(i18n.phonenumbers.Error.NOT_A_NUMBER);
4481 i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
4491 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_);
4494 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_.length : 0;
4496 i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_);
4503 i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber(
4513 i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_);
4538 i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_ = function(numberIn) {
4540 var phoneNumber = new i18n.phonenumbers.PhoneNumber();
4579 i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatch =
4594 firstNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
4596 if (e.message != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
4597 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4608 i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_) {
4612 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4617 i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH) {
4618 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
4628 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4637 secondNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
4640 if (e.message != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
4641 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4649 i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_(firstNumber);
4651 i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_(secondNumber);
4658 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4667 return i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH;
4675 return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
4678 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4687 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
4691 return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
4693 return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4708 i18n.phonenumbers.PhoneNumberUtil.prototype.isNationalNumberSuffixOfTheOther_ =
4735 i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
4760 i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) {
4781 i18n.phonenumbers.PhoneNumberUtil.matchesPrefix = function(regex, str) {