code
stringlengths 1
1.05M
| repo_name
stringlengths 6
83
| path
stringlengths 3
242
| language
stringclasses 222
values | license
stringclasses 20
values | size
int64 1
1.05M
|
|---|---|---|---|---|---|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#ifndef I18N_PHONENUMBERS_REGEXP_ADAPTER_RE2_H_
#define I18N_PHONENUMBERS_REGEXP_ADAPTER_RE2_H_
#include <string>
#include "phonenumbers/regexp_adapter.h"
namespace i18n {
namespace phonenumbers {
// RE2 regexp factory that lets the user instantiate the underlying
// implementation of RegExp and RegExpInput classes based on RE2.
class RE2RegExpFactory : public AbstractRegExpFactory {
public:
virtual ~RE2RegExpFactory() {}
virtual RegExpInput* CreateInput(const string& utf8_input) const;
virtual RegExp* CreateRegExp(const string& utf8_regexp) const;
};
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_REGEXP_ADAPTER_RE2_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/regexp_adapter_re2.h
|
C++
|
unknown
| 1,304
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Fredrik Roubert
#include "phonenumbers/regexp_cache.h"
#include <cstddef>
#include <string>
#include <utility>
#include "phonenumbers/base/synchronization/lock.h"
#include "phonenumbers/regexp_adapter.h"
using std::string;
namespace i18n {
namespace phonenumbers {
RegExpCache::RegExpCache(const AbstractRegExpFactory& regexp_factory,
size_t min_items)
: regexp_factory_(regexp_factory),
#ifdef I18N_PHONENUMBERS_USE_TR1_UNORDERED_MAP
cache_impl_(new CacheImpl(min_items))
#else
cache_impl_(new CacheImpl())
#endif
{}
RegExpCache::~RegExpCache() {
AutoLock l(lock_);
for (CacheImpl::const_iterator
it = cache_impl_->begin(); it != cache_impl_->end(); ++it) {
delete it->second;
}
}
const RegExp& RegExpCache::GetRegExp(const string& pattern) {
AutoLock l(lock_);
CacheImpl::const_iterator it = cache_impl_->find(pattern);
if (it != cache_impl_->end()) return *it->second;
const RegExp* regexp = regexp_factory_.CreateRegExp(pattern);
cache_impl_->insert(std::make_pair(pattern, regexp));
return *regexp;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/regexp_cache.cc
|
C++
|
unknown
| 1,751
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Fredrik Roubert
// RegExpCache is a simple wrapper around hash_map<> to store RegExp objects.
//
// To get a cached RegExp object for a regexp pattern string, call the
// GetRegExp() method of the class RegExpCache providing the pattern string. If
// a RegExp object corresponding to the pattern string doesn't already exist, it
// will be created by the GetRegExp() method.
//
// RegExpCache cache;
// const RegExp& regexp = cache.GetRegExp("\d");
#ifndef I18N_PHONENUMBERS_REGEXP_CACHE_H_
#define I18N_PHONENUMBERS_REGEXP_CACHE_H_
#include <cstddef>
#include <string>
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/base/synchronization/lock.h"
#ifdef I18N_PHONENUMBERS_USE_TR1_UNORDERED_MAP
# include <tr1/unordered_map>
#else
# include <map>
#endif
namespace i18n {
namespace phonenumbers {
using std::string;
class AbstractRegExpFactory;
class RegExp;
class RegExpCache {
private:
#ifdef I18N_PHONENUMBERS_USE_TR1_UNORDERED_MAP
typedef std::tr1::unordered_map<string, const RegExp*> CacheImpl;
#else
typedef std::map<string, const RegExp*> CacheImpl;
#endif
public:
explicit RegExpCache(const AbstractRegExpFactory& regexp_factory,
size_t min_items);
~RegExpCache();
const RegExp& GetRegExp(const string& pattern);
private:
const AbstractRegExpFactory& regexp_factory_;
Lock lock_; // protects cache_impl_
scoped_ptr<CacheImpl> cache_impl_; // protected by lock_
friend class RegExpCacheTest_CacheConstructor_Test;
DISALLOW_COPY_AND_ASSIGN(RegExpCache);
};
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_REGEXP_CACHE_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/regexp_cache.h
|
C++
|
unknown
| 2,302
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#ifndef I18N_PHONENUMBERS_REGEXP_ADAPTER_FACTORY_H_
#define I18N_PHONENUMBERS_REGEXP_ADAPTER_FACTORY_H_
// This file selects the right implementation of the abstract regexp factory at
// compile time depending on the compilation flags (I18N_PHONENUMBERS_USE_RE2).
// The default abstract regexp factory implementation can be obtained using the
// type RegExpFactory. This will be set to RE2RegExpFactory if RE2 is used or
// ICURegExpFactory otherwise.
#ifdef I18N_PHONENUMBERS_USE_RE2
#include "phonenumbers/regexp_adapter_re2.h"
#else
#include "phonenumbers/regexp_adapter_icu.h"
#endif // I18N_PHONENUMBERS_USE_RE2
namespace i18n {
namespace phonenumbers {
#ifdef I18N_PHONENUMBERS_USE_RE2
typedef RE2RegExpFactory RegExpFactory;
#else
typedef ICURegExpFactory RegExpFactory;
#endif // I18N_PHONENUMBERS_USE_RE2
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_REGEXP_ADAPTER_FACTORY_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/regexp_factory.h
|
C++
|
unknown
| 1,559
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef I18N_PHONENUMBERS_REGION_CODE_H_
#define I18N_PHONENUMBERS_REGION_CODE_H_
#include <string>
namespace i18n {
namespace phonenumbers {
using std::string;
class RegionCode {
public:
// Returns a region code string representing the "unknown" region.
static const char* GetUnknown() {
return ZZ();
}
static const char* ZZ() {
return "ZZ";
}
};
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_REGION_CODE_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/region_code.h
|
C++
|
unknown
| 1,072
|
/*
* Copyright (C) 2013 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "phonenumbers/short_metadata.h"
namespace i18n {
namespace phonenumbers {
namespace {
static const unsigned char data[] = {
0x0A, 0x81, 0x01, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48,
0x03, 0x22, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39,
0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x43, 0xDA, 0x01,
0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29,
0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F,
0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x0A, 0x7B, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64,
0x48, 0x03, 0x22, 0x0F, 0x12, 0x08, 0x31, 0x31, 0x5B, 0x30, 0x32, 0x36, 0x38,
0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x44, 0xDA, 0x01, 0x0F,
0x12, 0x08, 0x31, 0x31, 0x5B, 0x30, 0x32, 0x36, 0x38, 0x5D, 0x32, 0x03, 0x31,
0x31, 0x30, 0xEA, 0x01, 0x0F, 0x12, 0x08, 0x31, 0x31, 0x5B, 0x30, 0x32, 0x36,
0x38, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x9D, 0x01,
0x0A, 0x12, 0x12, 0x0C, 0x5B, 0x31, 0x34, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x14, 0x12, 0x0B, 0x31, 0x31,
0x32, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x45, 0xDA, 0x01, 0x14, 0x12, 0x0B, 0x31,
0x31, 0x32, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x32, 0x03, 0x31,
0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x1A, 0x12, 0x13, 0x31, 0x31, 0x32, 0x7C,
0x34, 0x34, 0x35, 0x5B, 0x31, 0x36, 0x5D, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D,
0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0F, 0x12,
0x05, 0x34, 0x34, 0x35, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x34, 0x35, 0x30, 0x48,
0x04, 0x0A, 0xB1, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x34, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F,
0x48, 0x03, 0x48, 0x05, 0x22, 0x16, 0x12, 0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x31, 0x39, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x41, 0x46, 0xDA, 0x01, 0x16, 0x12, 0x0D, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x31, 0x39, 0x29, 0x32, 0x03,
0x31, 0x30, 0x30, 0x48, 0x03, 0xEA, 0x01, 0x1A, 0x12, 0x13, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x31, 0x39, 0x29, 0x7C, 0x34, 0x30,
0x34, 0x30, 0x34, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12,
0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34,
0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C,
0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A,
0x86, 0x01, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C,
0x64, 0x48, 0x03, 0x22, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x47,
0xDA, 0x01, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39,
0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x15, 0x12, 0x0E, 0x31,
0x37, 0x36, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29,
0x32, 0x03, 0x31, 0x37, 0x36, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x37,
0x36, 0x32, 0x03, 0x31, 0x37, 0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37,
0x36, 0x32, 0x03, 0x31, 0x37, 0x36, 0x0A, 0x71, 0x0A, 0x0C, 0x12, 0x08, 0x5B,
0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03,
0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x49, 0xDA,
0x01, 0x0A, 0x12, 0x03, 0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA,
0x01, 0x0E, 0x12, 0x07, 0x31, 0x37, 0x36, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03,
0x31, 0x37, 0x36, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32,
0x03, 0x31, 0x37, 0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32,
0x03, 0x31, 0x37, 0x36, 0x0A, 0x87, 0x02, 0x0A, 0x15, 0x12, 0x0B, 0x5B, 0x31,
0x35, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04,
0x48, 0x05, 0x48, 0x06, 0x22, 0x30, 0x12, 0x25, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x5B, 0x30, 0x31, 0x5D, 0x5C, 0x64, 0x5C,
0x64, 0x29, 0x7C, 0x32, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x33, 0x5B, 0x31,
0x35, 0x5D, 0x7C, 0x34, 0x31, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03,
0x48, 0x06, 0x2A, 0x11, 0x12, 0x06, 0x35, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x32,
0x05, 0x35, 0x30, 0x30, 0x30, 0x30, 0x48, 0x05, 0x4A, 0x02, 0x41, 0x4C, 0xDA,
0x01, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x32, 0x5B,
0x37, 0x2D, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA,
0x01, 0x55, 0x12, 0x4E, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x36,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x36,
0x7C, 0x31, 0x31, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C, 0x38, 0x5C, 0x64, 0x5C,
0x64, 0x29, 0x7C, 0x36, 0x35, 0x5C, 0x64, 0x7C, 0x38, 0x39, 0x5B, 0x31, 0x32,
0x5D, 0x29, 0x7C, 0x35, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x5B, 0x31, 0x33, 0x34, 0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x32, 0x5B, 0x32,
0x2D, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0C,
0x12, 0x03, 0x31, 0x32, 0x33, 0x32, 0x03, 0x31, 0x32, 0x33, 0x48, 0x03, 0x8A,
0x02, 0x15, 0x12, 0x0A, 0x31, 0x33, 0x31, 0x7C, 0x35, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x32, 0x03, 0x31, 0x33, 0x31, 0x48, 0x03, 0x48, 0x05, 0x0A, 0xA4, 0x01,
0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31, 0x34, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x10, 0x12, 0x07,
0x31, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48,
0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A, 0x02, 0x41, 0x4D, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x30, 0x5B,
0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0xEA, 0x01,
0x1D, 0x12, 0x16, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x38, 0x5B, 0x31, 0x2D, 0x37,
0x5D, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x32,
0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05,
0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x78, 0x0A, 0x09, 0x12,
0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0E, 0x12, 0x07, 0x31,
0x31, 0x5B, 0x32, 0x33, 0x35, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B,
0x48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A, 0x01, 0x14, 0x12, 0x0B, 0x31, 0x30, 0x5B,
0x30, 0x31, 0x37, 0x5D, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x30, 0x30,
0x48, 0x03, 0xEA, 0x01, 0x37, 0x12, 0x31, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x2D, 0x37, 0x5D, 0x7C, 0x31,
0x5B, 0x30, 0x32, 0x2D, 0x35, 0x5D, 0x7C, 0x32, 0x5B, 0x31, 0x35, 0x5D, 0x7C,
0x39, 0x29, 0x7C, 0x33, 0x33, 0x37, 0x32, 0x7C, 0x38, 0x39, 0x33, 0x33, 0x38,
0x7C, 0x39, 0x31, 0x31, 0x32, 0x02, 0x31, 0x39, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12,
0x07, 0x38, 0x39, 0x33, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x38, 0x39, 0x33,
0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x1B, 0x12, 0x0F, 0x28, 0x3F, 0x3A, 0x33,
0x33, 0x37, 0x7C, 0x38, 0x39, 0x33, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x04,
0x33, 0x33, 0x37, 0x30, 0x48, 0x04, 0x48, 0x05, 0x0A, 0x8C, 0x01, 0x0A, 0x18,
0x12, 0x12, 0x5B, 0x34, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A,
0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x0C,
0x12, 0x03, 0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x41, 0x53, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x39, 0x31, 0x31, 0x32, 0x03,
0x39, 0x31, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x10, 0x12, 0x09, 0x34, 0x30, 0x34,
0x30, 0x34, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0xF2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xC3, 0x01, 0x0A, 0x15,
0x12, 0x0F, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x06, 0x22, 0x20, 0x12, 0x19, 0x31,
0x31, 0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B,
0x31, 0x32, 0x5D, 0x32, 0x7C, 0x33, 0x33, 0x7C, 0x34, 0x34, 0x29, 0x32, 0x03,
0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x54, 0xDA, 0x01, 0x19, 0x12, 0x10, 0x31,
0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x32, 0x7C, 0x33, 0x33, 0x7C, 0x34,
0x34, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x30, 0x12,
0x29, 0x31, 0x31, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D,
0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x37, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x32, 0x7C, 0x33, 0x33, 0x7C,
0x34, 0x34, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xE9,
0x02, 0x0A, 0x1B, 0x12, 0x0D, 0x5B, 0x30, 0x2D, 0x32, 0x37, 0x5D, 0x5C, 0x64,
0x7B, 0x32, 0x2C, 0x37, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06,
0x48, 0x07, 0x48, 0x08, 0x22, 0x2B, 0x12, 0x1E, 0x30, 0x30, 0x30, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x36, 0x7C, 0x31, 0x32, 0x7C, 0x32, 0x35, 0x38, 0x38,
0x38, 0x35, 0x7C, 0x35, 0x35, 0x5C, 0x64, 0x29, 0x7C, 0x37, 0x33, 0x33, 0x32,
0x03, 0x30, 0x30, 0x30, 0x48, 0x03, 0x48, 0x04, 0x48, 0x07, 0x2A, 0x2B, 0x12,
0x19, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x28, 0x3F, 0x3A, 0x33, 0x34, 0x7C, 0x34,
0x35, 0x36, 0x29, 0x7C, 0x39, 0x5C, 0x64, 0x7B, 0x34, 0x2C, 0x36, 0x7D, 0x29,
0x32, 0x04, 0x31, 0x32, 0x33, 0x34, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48,
0x07, 0x48, 0x08, 0x4A, 0x02, 0x41, 0x55, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x30,
0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x36, 0x7C, 0x31, 0x32, 0x29,
0x32, 0x03, 0x30, 0x30, 0x30, 0x48, 0x03, 0xEA, 0x01, 0x6C, 0x12, 0x65, 0x30,
0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x36, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x7C, 0x32, 0x7C, 0x39, 0x5B, 0x34, 0x36, 0x5D, 0x29, 0x7C,
0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x33, 0x5D, 0x5C, 0x64, 0x7C, 0x28, 0x3F,
0x3A, 0x34, 0x7C, 0x35, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33,
0x7D, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x7C, 0x32, 0x29, 0x29, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x39, 0x5C,
0x64, 0x7B, 0x34, 0x2C, 0x36, 0x7D, 0x29, 0x7C, 0x32, 0x32, 0x35, 0x7C, 0x37,
0x28, 0x3F, 0x3A, 0x33, 0x33, 0x7C, 0x36, 0x37, 0x29, 0x32, 0x03, 0x30, 0x30,
0x30, 0xF2, 0x01, 0x27, 0x12, 0x1A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30,
0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x32, 0x34, 0x37, 0x33, 0x33, 0x29, 0x7C, 0x32,
0x32, 0x35, 0x7C, 0x37, 0x36, 0x37, 0x32, 0x03, 0x32, 0x32, 0x35, 0x48, 0x03,
0x48, 0x04, 0x48, 0x06, 0xFA, 0x01, 0x1C, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A,
0x32, 0x35, 0x38, 0x38, 0x38, 0x35, 0x7C, 0x35, 0x35, 0x5C, 0x64, 0x29, 0x32,
0x04, 0x31, 0x35, 0x35, 0x30, 0x48, 0x04, 0x48, 0x07, 0x8A, 0x02, 0x19, 0x12,
0x09, 0x31, 0x39, 0x5C, 0x64, 0x7B, 0x34, 0x2C, 0x36, 0x7D, 0x32, 0x06, 0x31,
0x39, 0x30, 0x30, 0x30, 0x30, 0x48, 0x06, 0x48, 0x07, 0x48, 0x08, 0x0A, 0x86,
0x01, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64,
0x48, 0x03, 0x22, 0x0E, 0x12, 0x07, 0x31, 0x30, 0x30, 0x7C, 0x39, 0x31, 0x31,
0x32, 0x03, 0x31, 0x30, 0x30, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x57, 0xDA, 0x01, 0x0E, 0x12,
0x07, 0x31, 0x30, 0x30, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x30, 0x30,
0xEA, 0x01, 0x1B, 0x12, 0x14, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31,
0x38, 0x7C, 0x37, 0x36, 0x29, 0x7C, 0x39, 0x31, 0x5B, 0x31, 0x33, 0x5D, 0x32,
0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36,
0x32, 0x03, 0x31, 0x37, 0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36,
0x32, 0x03, 0x31, 0x37, 0x36, 0x0A, 0x8A, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B,
0x31, 0x37, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x0C, 0x12, 0x03, 0x31,
0x31, 0x32, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x58,
0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x31, 0x32, 0x32, 0x03, 0x31, 0x31, 0x32,
0x48, 0x03, 0xEA, 0x01, 0x15, 0x12, 0x0E, 0x31, 0x31, 0x32, 0x7C, 0x37, 0x35,
0x5B, 0x31, 0x32, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x32,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x0A, 0xBF, 0x01, 0x0A, 0x12, 0x12, 0x0C, 0x5B, 0x31, 0x34,
0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04,
0x22, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33,
0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x41, 0x5A, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30,
0x31, 0x48, 0x03, 0xEA, 0x01, 0x22, 0x12, 0x1B, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x7C, 0x28, 0x3F, 0x3A,
0x34, 0x30, 0x34, 0x7C, 0x38, 0x38, 0x30, 0x29, 0x30, 0x32, 0x03, 0x31, 0x30,
0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x17, 0x12, 0x0D, 0x28, 0x3F, 0x3A, 0x34, 0x30, 0x34,
0x7C, 0x38, 0x38, 0x30, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34, 0x30,
0x48, 0x04, 0x8A, 0x02, 0x17, 0x12, 0x0D, 0x28, 0x3F, 0x3A, 0x34, 0x30, 0x34,
0x7C, 0x38, 0x38, 0x30, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34, 0x30,
0x48, 0x04, 0x0A, 0xEA, 0x01, 0x0A, 0x12, 0x12, 0x08, 0x31, 0x5C, 0x64, 0x7B,
0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22,
0x1E, 0x12, 0x13, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x36, 0x5C, 0x64, 0x7B, 0x33,
0x7D, 0x7C, 0x32, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x32,
0x32, 0x48, 0x03, 0x48, 0x06, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x41, 0xDA, 0x01, 0x10, 0x12,
0x07, 0x31, 0x32, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x32, 0x03, 0x31, 0x32, 0x32,
0x48, 0x03, 0xEA, 0x01, 0x65, 0x12, 0x5E, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x36,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C, 0x32,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x37, 0x5D, 0x7C, 0x5B, 0x32, 0x2D,
0x35, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D, 0x32, 0x36, 0x5D, 0x29, 0x7C, 0x28,
0x3F, 0x3A, 0x5B, 0x33, 0x2D, 0x35, 0x5D, 0x7C, 0x37, 0x5C, 0x64, 0x29, 0x5C,
0x64, 0x5C, 0x64, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x38, 0x7C, 0x32,
0x5B, 0x37, 0x38, 0x5D, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x32, 0x03, 0x31,
0x32, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xF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,
0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x18,
0x12, 0x0F, 0x31, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x36, 0x5D, 0x7C, 0x5B, 0x31,
0x39, 0x5D, 0x39, 0x39, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48, 0x03, 0x2A, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02,
0x42, 0x44, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x30, 0x5B, 0x30, 0x2D, 0x32,
0x5D, 0x7C, 0x5B, 0x31, 0x39, 0x5D, 0x39, 0x39, 0x32, 0x03, 0x31, 0x30, 0x30,
0x48, 0x03, 0xEA, 0x01, 0x97, 0x01, 0x12, 0x8F, 0x01, 0x31, 0x28, 0x3F, 0x3A,
0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x33, 0x36, 0x39, 0x5D, 0x7C, 0x35,
0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x2D, 0x34, 0x5D, 0x7C,
0x38, 0x5B, 0x30, 0x2D, 0x32, 0x39, 0x5D, 0x29, 0x7C, 0x31, 0x5B, 0x31, 0x36,
0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x33, 0x34, 0x5D,
0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x35, 0x5D, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A,
0x31, 0x5C, 0x64, 0x3F, 0x7C, 0x36, 0x5B, 0x33, 0x2D, 0x36, 0x5D, 0x29, 0x7C,
0x35, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x35, 0x30, 0x31, 0x32, 0x7C,
0x37, 0x38, 0x36, 0x7C, 0x39, 0x35, 0x39, 0x34, 0x7C, 0x5B, 0x31, 0x39, 0x5D,
0x39, 0x39, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x35, 0x30,
0x7C, 0x36, 0x5C, 0x64, 0x29, 0x7C, 0x33, 0x33, 0x7C, 0x34, 0x28, 0x3F, 0x3A,
0x30, 0x7C, 0x31, 0x5C, 0x64, 0x29, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x30,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x2A, 0x12, 0x1F, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x32, 0x5B, 0x31, 0x33, 0x5D, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x35, 0x30,
0x31, 0x7C, 0x39, 0x35, 0x39, 0x29, 0x5C, 0x64, 0x7C, 0x37, 0x38, 0x36, 0x32,
0x03, 0x31, 0x31, 0x31, 0x48, 0x03, 0x48, 0x04, 0x8A, 0x02, 0x0F, 0x12, 0x05,
0x39, 0x35, 0x39, 0x5C, 0x64, 0x32, 0x04, 0x39, 0x35, 0x39, 0x30, 0x48, 0x04,
0x0A, 0xB2, 0x03, 0x0A, 0x22, 0x12, 0x1A, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x04, 0x48, 0x06,
0x22, 0x39, 0x12, 0x32, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32,
0x35, 0x2D, 0x38, 0x5D, 0x7C, 0x31, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x37, 0x28,
0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x38, 0x31, 0x33, 0x29,
0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x36, 0x7C, 0x38, 0x29, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x32, 0x03, 0x31, 0x30, 0x30, 0x2A, 0x3A, 0x12, 0x30, 0x31, 0x28,
0x3F, 0x3A, 0x32, 0x5B, 0x30, 0x33, 0x5D, 0x7C, 0x34, 0x30, 0x29, 0x34, 0x7C,
0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x34, 0x5D, 0x31, 0x7C,
0x33, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x7C, 0x5B, 0x32, 0x2D, 0x37, 0x39, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x32, 0x30, 0x34,
0x48, 0x04, 0x4A, 0x02, 0x42, 0x45, 0xDA, 0x01, 0x16, 0x12, 0x0D, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03,
0x31, 0x30, 0x30, 0x48, 0x03, 0xEA, 0x01, 0xC3, 0x01, 0x12, 0xBB, 0x01, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x38, 0x5D, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x5B, 0x30, 0x32, 0x37, 0x5D, 0x7C, 0x36, 0x31, 0x31, 0x37, 0x29, 0x7C,
0x32, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x33, 0x5B, 0x30, 0x2D, 0x32, 0x34,
0x5D, 0x29, 0x7C, 0x33, 0x31, 0x33, 0x7C, 0x34, 0x31, 0x34, 0x7C, 0x35, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x35, 0x5D, 0x7C, 0x35, 0x5B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0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x32, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x5B, 0x30, 0x36, 0x5D, 0x29, 0x32, 0x03,
0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x28, 0x12, 0x21, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30,
0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x29, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x5B,
0x30, 0x36, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A,
0x8D, 0x02, 0x0A, 0x1A, 0x12, 0x14, 0x5B, 0x30, 0x31, 0x38, 0x39, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F,
0x48, 0x03, 0x48, 0x05, 0x22, 0x20, 0x12, 0x19, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x31, 0x36, 0x37, 0x5D, 0x7C, 0x38, 0x31, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x7C, 0x5B, 0x31, 0x39, 0x5D, 0x39, 0x39, 0x32, 0x03, 0x31, 0x39, 0x39, 0x2A,
0x16, 0x12, 0x0B, 0x39, 0x5B, 0x31, 0x34, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x33,
0x7D, 0x32, 0x05, 0x39, 0x31, 0x30, 0x30, 0x30, 0x48, 0x05, 0x4A, 0x02, 0x42,
0x48, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x5B, 0x31, 0x39, 0x5D, 0x39, 0x39, 0x32,
0x03, 0x31, 0x39, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x53, 0x12, 0x4C, 0x31, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x5D, 0x5C, 0x64, 0x7C, 0x31, 0x32, 0x7C, 0x34,
0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x35, 0x31, 0x7C, 0x38, 0x5B, 0x31, 0x38, 0x5D,
0x7C, 0x39, 0x5B, 0x31, 0x36, 0x39, 0x5D, 0x29, 0x7C, 0x39, 0x39, 0x5B, 0x30,
0x32, 0x34, 0x38, 0x39, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x36,
0x37, 0x5D, 0x7C, 0x38, 0x5B, 0x31, 0x35, 0x38, 0x5D, 0x7C, 0x39, 0x5B, 0x31,
0x34, 0x38, 0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x31, 0x30,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x21, 0x12, 0x16, 0x30, 0x5B, 0x36, 0x37, 0x5D, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x38, 0x38, 0x30, 0x30, 0x30, 0x7C, 0x39, 0x38,
0x35, 0x35, 0x35, 0x32, 0x05, 0x30, 0x36, 0x30, 0x30, 0x30, 0x48, 0x05, 0x8A,
0x02, 0x16, 0x12, 0x0B, 0x38, 0x38, 0x30, 0x30, 0x30, 0x7C, 0x39, 0x38, 0x35,
0x35, 0x35, 0x32, 0x05, 0x38, 0x38, 0x30, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xD5,
0x01, 0x0A, 0x13, 0x12, 0x0D, 0x5B, 0x31, 0x36, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x14, 0x12, 0x0B,
0x31, 0x31, 0x5B, 0x32, 0x33, 0x37, 0x5D, 0x7C, 0x36, 0x31, 0x31, 0x32, 0x03,
0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x49, 0xDA, 0x01, 0x10, 0x12,
0x07, 0x31, 0x31, 0x5B, 0x32, 0x33, 0x37, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32,
0x48, 0x03, 0xEA, 0x01, 0x3D, 0x12, 0x36, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5C,
0x64, 0x7C, 0x35, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D,
0x32, 0x35, 0x36, 0x5D, 0x29, 0x7C, 0x36, 0x31, 0x31, 0x7C, 0x37, 0x28, 0x3F,
0x3A, 0x31, 0x30, 0x7C, 0x37, 0x37, 0x7C, 0x39, 0x37, 0x39, 0x29, 0x7C, 0x38,
0x5B, 0x32, 0x38, 0x5D, 0x38, 0x7C, 0x39, 0x30, 0x30, 0x32, 0x03, 0x31, 0x31,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x1F, 0x12, 0x16, 0x36, 0x31, 0x31, 0x7C, 0x37, 0x28,
0x3F, 0x3A, 0x31, 0x30, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x38, 0x38, 0x38, 0x7C,
0x39, 0x30, 0x30, 0x32, 0x03, 0x36, 0x31, 0x31, 0x48, 0x03, 0x8A, 0x02, 0x13,
0x12, 0x0A, 0x28, 0x3F, 0x3A, 0x37, 0x31, 0x7C, 0x39, 0x30, 0x29, 0x30, 0x32,
0x03, 0x37, 0x31, 0x30, 0x48, 0x03, 0x0A, 0xAA, 0x01, 0x0A, 0x11, 0x12, 0x0B,
0x5B, 0x31, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03,
0x48, 0x04, 0x22, 0x18, 0x12, 0x11, 0x31, 0x31, 0x5B, 0x37, 0x38, 0x5D, 0x7C,
0x37, 0x5B, 0x33, 0x2D, 0x35, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31,
0x31, 0x37, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x42, 0x4A, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x31,
0x5B, 0x37, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x37, 0x48, 0x03, 0xEA, 0x01,
0x27, 0x12, 0x20, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x37, 0x38, 0x5D, 0x7C,
0x32, 0x5B, 0x30, 0x32, 0x2D, 0x35, 0x5D, 0x7C, 0x36, 0x30, 0x29, 0x7C, 0x37,
0x5B, 0x30, 0x2D, 0x35, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31,
0x37, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x11, 0x12, 0x08, 0x31, 0x32, 0x5B, 0x30, 0x32, 0x2D,
0x35, 0x5D, 0x32, 0x03, 0x31, 0x32, 0x30, 0x48, 0x03, 0x8A, 0x02, 0x0B, 0x48,
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 0x03, 0x48,
0x05, 0x22, 0x10, 0x12, 0x07, 0x31, 0x31, 0x5B, 0x30, 0x38, 0x39, 0x5D, 0x32,
0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x4F, 0xDA, 0x01, 0x10,
0x12, 0x07, 0x31, 0x31, 0x5B, 0x30, 0x38, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x30, 0x48, 0x03, 0xEA, 0x01, 0x14, 0x12, 0x0D, 0x31, 0x31, 0x5B, 0x30, 0x38,
0x39, 0x5D, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x32, 0x03, 0x31, 0x31, 0x30,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x80, 0x01,
0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48,
0x03, 0x22, 0x0E, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x51, 0xDA, 0x01, 0x0E, 0x12, 0x07,
0x31, 0x31, 0x32, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0xEA,
0x01, 0x15, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x37, 0x36,
0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01,
0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31, 0x37, 0x36, 0x8A, 0x02,
0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31, 0x37, 0x36, 0x0A, 0xFA,
0x04, 0x0A, 0x17, 0x12, 0x0D, 0x5B, 0x31, 0x2D, 0x36, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06,
0x22, 0x3A, 0x12, 0x2F, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x32,
0x7C, 0x32, 0x38, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x39, 0x5B,
0x30, 0x2D, 0x34, 0x37, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A,
0x35, 0x37, 0x7C, 0x38, 0x32, 0x5C, 0x64, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x31, 0x30, 0x30, 0x48, 0x03, 0x48, 0x04, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x52, 0xDA,
0x01, 0x1E, 0x12, 0x15, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x32, 0x38,
0x7C, 0x39, 0x5B, 0x30, 0x32, 0x33, 0x5D, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0xD8, 0x02, 0x12, 0xD0, 0x02,
0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x5D, 0x7C,
0x33, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x32, 0x2D, 0x35, 0x37, 0x39, 0x5D, 0x7C,
0x32, 0x5B, 0x31, 0x33, 0x2D, 0x39, 0x5D, 0x7C, 0x33, 0x5B, 0x31, 0x32, 0x34,
0x2D, 0x39, 0x5D, 0x7C, 0x34, 0x5B, 0x31, 0x2D, 0x33, 0x35, 0x37, 0x38, 0x5D,
0x7C, 0x35, 0x5B, 0x31, 0x2D, 0x34, 0x36, 0x38, 0x5D, 0x7C, 0x36, 0x5B, 0x31,
0x33, 0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x31, 0x34, 0x39, 0x5D, 0x7C, 0x39, 0x5B,
0x31, 0x36, 0x38, 0x5D, 0x29, 0x7C, 0x35, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x2D,
0x39, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x7C, 0x31, 0x5B, 0x30, 0x2D,
0x33, 0x35, 0x2D, 0x38, 0x5D, 0x3F, 0x7C, 0x32, 0x5B, 0x30, 0x31, 0x34, 0x35,
0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x31, 0x33, 0x37, 0x5D, 0x3F, 0x7C, 0x34, 0x5B,
0x33, 0x37, 0x2D, 0x39, 0x5D, 0x3F, 0x7C, 0x35, 0x5B, 0x30, 0x2D, 0x33, 0x35,
0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x31, 0x36, 0x5D, 0x3F, 0x7C, 0x37, 0x5B, 0x31,
0x33, 0x37, 0x5D, 0x3F, 0x7C, 0x38, 0x5B, 0x35, 0x2D, 0x38, 0x5D, 0x7C, 0x39,
0x5B, 0x31, 0x33, 0x35, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x31, 0x5B, 0x32, 0x35,
0x2D, 0x38, 0x5D, 0x7C, 0x32, 0x5B, 0x33, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x7C,
0x33, 0x5B, 0x30, 0x32, 0x34, 0x2D, 0x36, 0x38, 0x5D, 0x7C, 0x34, 0x5B, 0x31,
0x32, 0x35, 0x36, 0x38, 0x5D, 0x7C, 0x35, 0x5C, 0x64, 0x7C, 0x36, 0x5B, 0x30,
0x2D, 0x38, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x39, 0x5B,
0x30, 0x2D, 0x34, 0x37, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A,
0x37, 0x28, 0x3F, 0x3A, 0x33, 0x33, 0x30, 0x7C, 0x38, 0x37, 0x38, 0x29, 0x7C,
0x38, 0x35, 0x39, 0x35, 0x39, 0x3F, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x32,
0x7C, 0x39, 0x31, 0x29, 0x31, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x34, 0x30,
0x34, 0x3F, 0x7C, 0x35, 0x37, 0x7C, 0x38, 0x32, 0x38, 0x29, 0x7C, 0x35, 0x35,
0x35, 0x35, 0x35, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x7C, 0x31, 0x30, 0x30, 0x30, 0x30, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x31,
0x33, 0x33, 0x7C, 0x34, 0x31, 0x31, 0x29, 0x5B, 0x31, 0x32, 0x5D, 0x32, 0x03,
0x31, 0x30, 0x30, 0xF2, 0x01, 0x1A, 0x12, 0x0F, 0x31, 0x30, 0x32, 0x7C, 0x32,
0x37, 0x33, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x33, 0x32, 0x31, 0x32, 0x03, 0x31,
0x30, 0x32, 0x48, 0x03, 0x48, 0x05, 0xFA, 0x01, 0x35, 0x12, 0x28, 0x31, 0x35,
0x31, 0x7C, 0x28, 0x3F, 0x3A, 0x32, 0x37, 0x38, 0x7C, 0x35, 0x35, 0x35, 0x29,
0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x34, 0x5C, 0x64,
0x5C, 0x64, 0x3F, 0x7C, 0x31, 0x31, 0x5C, 0x64, 0x7C, 0x35, 0x37, 0x29, 0x32,
0x03, 0x31, 0x35, 0x31, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02, 0x3F,
0x12, 0x38, 0x32, 0x38, 0x35, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C,
0x33, 0x32, 0x31, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x28, 0x3F, 0x3A,
0x32, 0x37, 0x5B, 0x33, 0x38, 0x5D, 0x5C, 0x64, 0x7C, 0x34, 0x38, 0x32, 0x29,
0x5C, 0x64, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7C, 0x31, 0x30,
0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x33, 0x32, 0x31, 0x0A, 0x75,
0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0D,
0x12, 0x06, 0x39, 0x31, 0x5B, 0x31, 0x39, 0x5D, 0x32, 0x03, 0x39, 0x31, 0x31,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x42, 0x53, 0xDA, 0x01, 0x0D, 0x12, 0x06, 0x39, 0x31, 0x5B, 0x31,
0x39,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48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C,
0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A,
0x9F, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C,
0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03,
0x48, 0x05, 0x22, 0x10, 0x12, 0x07, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D,
0x32, 0x03, 0x39, 0x39, 0x37, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x42, 0x57, 0xDA, 0x01,
0x10, 0x12, 0x07, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x32, 0x03, 0x39,
0x39, 0x37, 0x48, 0x03, 0xEA, 0x01, 0x14, 0x12, 0x0D, 0x31, 0x33, 0x31, 0x32,
0x33, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x32, 0x03, 0x39, 0x39,
0x37, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x31, 0x33, 0x31, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x31, 0x33, 0x31, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12,
0x12, 0x07, 0x31, 0x33, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31, 0x33,
0x31, 0x30, 0x30,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x32, 0x7C,
0x5B, 0x32, 0x39, 0x5D, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x43, 0x41, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C,
0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x2D,
0x12, 0x26, 0x31, 0x31, 0x32, 0x7C, 0x33, 0x30, 0x30, 0x30, 0x30, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x7C, 0x5B, 0x31, 0x2D, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x34, 0x2C, 0x35, 0x7D, 0x7C, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x31,
0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x09, 0x5B,
0x32, 0x33, 0x35, 0x2D, 0x37, 0x5D, 0x31, 0x31, 0x32, 0x03, 0x32, 0x31, 0x31,
0x48, 0x03, 0x8A, 0x02, 0x27, 0x12, 0x18, 0x33, 0x30, 0x30, 0x5C, 0x64, 0x7B,
0x35, 0x7D, 0x7C, 0x5B, 0x31, 0x2D, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x34, 0x2C, 0x35, 0x7D, 0x32, 0x05, 0x31, 0x30, 0x30, 0x30, 0x30, 0x48,
0x05, 0x48, 0x06, 0x48, 0x08, 0x0A, 0x7B, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x30,
0x31, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48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0x12,
0x11, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x33, 0x34, 0x38, 0x5D, 0x7C, 0x37,
0x37, 0x7C, 0x38, 0x38, 0x29, 0x32, 0x03, 0x31, 0x31, 0x33, 0x48, 0x03, 0xEA,
0x01, 0x21, 0x12, 0x1A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x33, 0x34, 0x38,
0x5D, 0x7C, 0x32, 0x33, 0x7C, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x29, 0x7C, 0x34,
0x30, 0x34, 0x30, 0x34, 0x32, 0x03, 0x31, 0x31, 0x33, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12,
0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30,
0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05,
0x0A, 0x94, 0x01, 0x0A, 0x0E, 0x12, 0x08, 0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C,
0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x16, 0x12, 0x0F, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x5B, 0x37, 0x38, 0x5D, 0x7C, 0x32, 0x32, 0x5C, 0x64, 0x29, 0x32,
0x03, 0x31, 0x31, 0x37, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x46, 0xDA, 0x01, 0x15, 0x12, 0x0E,
0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x37, 0x38, 0x5D,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A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x0A, 0xF3, 0x02, 0x0A, 0x16, 0x12, 0x0C, 0x5B, 0x31, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05,
0x48, 0x06, 0x22, 0x2E, 0x12, 0x21, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F,
0x3A, 0x5B, 0x32, 0x37, 0x38, 0x5D, 0x7C, 0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x7C, 0x34, 0x5B, 0x34, 0x37, 0x5D, 0x29, 0x7C, 0x35, 0x32, 0x30, 0x30,
0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x04, 0x48, 0x06, 0x2A, 0x29,
0x12, 0x1C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x34, 0x7C, 0x38, 0x5B, 0x30, 0x31,
0x35, 0x38, 0x39, 0x5D, 0x29, 0x5C, 0x64, 0x7C, 0x35, 0x34, 0x33, 0x7C, 0x38,
0x33, 0x31, 0x31, 0x31, 0x32, 0x03, 0x35, 0x34, 0x33, 0x48, 0x03, 0x48, 0x04,
0x48, 0x05, 0x4A, 0x02, 0x43, 0x48, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x32, 0x37, 0x38, 0x5D, 0x7C, 0x34, 0x34, 0x29, 0x32,
0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x7C, 0x12, 0x75, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x37, 0x38, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x37, 0x38, 0x5D, 0x7C, 0x34, 0x35, 0x7C, 0x36,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x29, 0x7C,
0x34, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x33, 0x2D, 0x35, 0x37, 0x5D, 0x7C, 0x31,
0x5B, 0x34, 0x35, 0x5D, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C,
0x5B, 0x31, 0x2D, 0x34, 0x36, 0x5D, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x30,
0x32, 0x7C, 0x31, 0x5B, 0x31, 0x38, 0x39, 0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x37,
0x7C, 0x38, 0x5B, 0x30, 0x38, 0x5D, 0x7C, 0x39, 0x39, 0x29, 0x29, 0x7C, 0x5B,
0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x32, 0x03,
0x31, 0x31, 0x32, 0xF2, 0x01, 0x2B, 0x12, 0x20, 0x31, 0x28, 0x3F, 0x3A, 0x34,
0x5B, 0x30, 0x33, 0x35, 0x5D, 0x7C, 0x36, 0x5B, 0x31, 0x2D, 0x34, 0x36, 0x5D,
0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x34, 0x31, 0x7C, 0x36, 0x30, 0x29, 0x5C,
0x64, 0x32, 0x03, 0x31, 0x34, 0x30, 0x48, 0x03, 0x48, 0x04, 0xFA, 0x01, 0x16,
0x12, 0x0B, 0x35, 0x28, 0x3F, 0x3A, 0x32, 0x30, 0x30, 0x7C, 0x33, 0x35, 0x29,
0x32, 0x03, 0x35, 0x33, 0x35, 0x48, 0x03, 0x48, 0x04, 0x8A, 0x02, 0x19, 0x12,
0x0C, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D,
0x32, 0x03, 0x32, 0x30, 0x30, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x0A, 0xAC,
0x01, 0x0A, 0x11, 0x12, 0x0B, 0x5B, 0x31, 0x34, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x19, 0x12, 0x10, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x5B, 0x37, 0x38, 0x5D, 0x30,
0x29, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x49, 0xDA,
0x01, 0x19, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x31, 0x5D,
0x7C, 0x5B, 0x37, 0x38, 0x5D, 0x30, 0x29, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48,
0x03, 0xEA, 0x01, 0x1C, 0x12, 0x15, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30,
0x31, 0x5D, 0x7C, 0x5B, 0x37, 0x38, 0x5D, 0x30, 0x29, 0x7C, 0x34, 0x34, 0x34,
0x33, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12, 0x05, 0x34,
0x34, 0x34, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x34, 0x34, 0x30, 0x48, 0x04, 0x8A,
0x02, 0x0F, 0x12, 0x05, 0x34, 0x34, 0x34, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x34,
0x34, 0x30, 0x48, 0x04, 0x0A, 0x78, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64,
0x5C, 0x64, 0x48, 0x03, 0x22, 0x0E, 0x12, 0x07, 0x39, 0x39, 0x5B, 0x36, 0x38,
0x39, 0x5D, 0x32, 0x03, 0x39, 0x39, 0x36, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x4B, 0xDA, 0x01,
0x0E, 0x12, 0x07, 0x39, 0x39, 0x5B, 0x36, 0x38, 0x39, 0x5D, 0x32, 0x03, 0x39,
0x39, 0x36, 0xEA, 0x01, 0x0E, 0x12, 0x07, 0x39, 0x39, 0x5B, 0x36, 0x38, 0x39,
0x5D, 0x32, 0x03, 0x39, 0x39, 0x36, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xB1, 0x07, 0x0A,
0x14, 0x12, 0x0C, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C,
0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x24, 0x12, 0x19, 0x31,
0x28, 0x3F, 0x3A, 0x32, 0x31, 0x33, 0x7C, 0x33, 0x5B, 0x31, 0x2D, 0x33, 0x5D,
0x29, 0x7C, 0x34, 0x33, 0x34, 0x5C, 0x64, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03,
0x31, 0x33, 0x31, 0x48, 0x03, 0x48, 0x04, 0x2A, 0xE7, 0x01, 0x12, 0xDA, 0x01,
0x31, 0x28, 0x3F, 0x3A, 0x32, 0x31, 0x31, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x31,
0x33, 0x7C, 0x5B, 0x33, 0x34, 0x38, 0x5D, 0x30, 0x7C, 0x35, 0x5B, 0x30, 0x31,
0x5D, 0x29, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30,
0x35, 0x5D, 0x36, 0x7C, 0x5B, 0x34, 0x38, 0x5D, 0x31, 0x7C, 0x39, 0x5B, 0x31,
0x38, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x5C, 0x64, 0x7C,
0x5B, 0x32, 0x33, 0x5D, 0x32, 0x7C, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x29, 0x7C,
0x33, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x35, 0x39, 0x5D, 0x7C, 0x31, 0x33, 0x7C,
0x33, 0x5B, 0x32, 0x37, 0x39, 0x5D, 0x7C, 0x36, 0x36, 0x29, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x34, 0x7C, 0x33, 0x36, 0x5C, 0x64, 0x7C,
0x34, 0x5B, 0x30, 0x31, 0x37, 0x5D, 0x7C, 0x35, 0x35, 0x29, 0x7C, 0x35, 0x28,
0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x34, 0x31, 0x5C, 0x64, 0x7C, 0x35, 0x5B, 0x36,
0x37, 0x5D, 0x7C, 0x39, 0x39, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x37,
0x5C, 0x64, 0x7C, 0x31, 0x33, 0x7C, 0x32, 0x32, 0x7C, 0x33, 0x5B, 0x30, 0x36,
0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x39, 0x29, 0x7C, 0x37, 0x38, 0x37, 0x7C,
0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x5D, 0x31, 0x7C, 0x5B, 0x34, 0x38,
0x5D, 0x38, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x5B, 0x31,
0x32, 0x5D, 0x30, 0x7C, 0x33, 0x33, 0x29, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x31,
0x30, 0x36, 0x30, 0x48, 0x04, 0x48, 0x05, 0x4A, 0x02, 0x43, 0x4C, 0xDA, 0x01,
0x14, 0x12, 0x0B, 0x31, 0x33, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x39, 0x31,
0x31, 0x32, 0x03, 0x31, 0x33, 0x31, 0x48, 0x03, 0xEA, 0x01, 0xD0, 0x02, 0x12,
0xC8, 0x02, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x32, 0x31, 0x5B, 0x31,
0x33, 0x5D, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x31, 0x33, 0x7C, 0x5B, 0x33, 0x34,
0x38, 0x5D, 0x30, 0x7C, 0x35, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x32, 0x2D, 0x36, 0x5D, 0x7C, 0x31, 0x37, 0x7C,
0x5B, 0x33, 0x37, 0x39, 0x5D, 0x29, 0x7C, 0x38, 0x31, 0x38, 0x7C, 0x39, 0x31,
0x39, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x31,
0x7C, 0x31, 0x32, 0x32, 0x29, 0x7C, 0x32, 0x32, 0x5B, 0x34, 0x37, 0x5D, 0x7C,
0x33, 0x32, 0x33, 0x7C, 0x37, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x32, 0x29, 0x7C,
0x33, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x35, 0x31, 0x7C, 0x39, 0x39,
0x29, 0x7C, 0x31, 0x33, 0x32, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x32, 0x39, 0x7C,
0x5B, 0x33, 0x37, 0x5D, 0x37, 0x29, 0x7C, 0x36, 0x36, 0x35, 0x29, 0x7C, 0x34,
0x33, 0x36, 0x35, 0x36, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x30,
0x30, 0x7C, 0x34, 0x31, 0x35, 0x29, 0x34, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x36,
0x36, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x39, 0x39, 0x35, 0x29, 0x7C, 0x36, 0x28,
0x3F, 0x3A, 0x31, 0x33, 0x31, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x33, 0x36, 0x36,
0x7C, 0x36, 0x39, 0x39, 0x29, 0x7C, 0x37, 0x38, 0x37, 0x38, 0x7C, 0x38, 0x28,
0x3F, 0x3A, 0x30, 0x31, 0x31, 0x7C, 0x31, 0x31, 0x5B, 0x32, 0x38, 0x5D, 0x7C,
0x34, 0x38, 0x32, 0x7C, 0x38, 0x38, 0x39, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A,
0x30, 0x31, 0x7C, 0x31, 0x29, 0x31, 0x7C, 0x31, 0x33, 0x5C, 0x64, 0x7C, 0x34,
0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x33, 0x5D, 0x34, 0x32, 0x7C, 0x32, 0x34, 0x33,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x7C, 0x31, 0x35, 0x7C, 0x37, 0x37,
0x29, 0x7C, 0x35, 0x35, 0x34, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F,
0x3A, 0x5B, 0x30, 0x35, 0x5D, 0x36, 0x7C, 0x39, 0x38, 0x29, 0x7C, 0x33, 0x33,
0x39, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x5B, 0x33, 0x35, 0x5D,
0x29, 0x30, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x30, 0x7C,
0x33, 0x33, 0x29, 0x29, 0x30, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x17,
0x12, 0x0D, 0x28, 0x3F, 0x3A, 0x32, 0x30, 0x30, 0x7C, 0x33, 0x33, 0x33, 0x29,
0x5C, 0x64, 0x32, 0x04, 0x32, 0x30, 0x30, 0x30, 0x48, 0x04, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0xF0, 0x01, 0x12, 0xE3, 0x01, 0x31, 0x33, 0x28, 0x3F, 0x3A, 0x31, 0x33, 0x7C,
0x5B, 0x33, 0x34, 0x38, 0x5D, 0x30, 0x7C, 0x35, 0x5B, 0x30, 0x31, 0x5D, 0x29,
0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x35, 0x5D, 0x36,
0x7C, 0x5B, 0x32, 0x38, 0x5D, 0x31, 0x7C, 0x34, 0x5B, 0x30, 0x31, 0x5D, 0x7C,
0x39, 0x5B, 0x31, 0x38, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x28,
0x3F, 0x3A, 0x30, 0x7C, 0x31, 0x5C, 0x64, 0x29, 0x7C, 0x5B, 0x32, 0x33, 0x5D,
0x32, 0x7C, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x35, 0x39, 0x5D, 0x7C, 0x31, 0x33, 0x7C, 0x33, 0x5B, 0x32, 0x33,
0x37, 0x39, 0x5D, 0x7C, 0x36, 0x36, 0x29, 0x7C, 0x34, 0x33, 0x36, 0x5C, 0x64,
0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x34, 0x31, 0x5C, 0x64, 0x7C,
0x35, 0x5B, 0x36, 0x37, 0x5D, 0x7C, 0x39, 0x39, 0x29, 0x7C, 0x36, 0x28, 0x3F,
0x3A, 0x30, 0x37, 0x5C, 0x64, 0x7C, 0x31, 0x33, 0x7C, 0x32, 0x32, 0x7C, 0x33,
0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x39, 0x29, 0x7C, 0x37,
0x38, 0x37, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x5D, 0x31, 0x7C,
0x5B, 0x34, 0x38, 0x5D, 0x38, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x31,
0x7C, 0x5B, 0x31, 0x32, 0x5D, 0x30, 0x7C, 0x33, 0x33, 0x29, 0x29, 0x5C, 0x64,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x34, 0x7C, 0x34,
0x5B, 0x30, 0x31, 0x37, 0x5D, 0x7C, 0x35, 0x35, 0x29, 0x5C, 0x64, 0x32, 0x04,
0x31, 0x30, 0x36, 0x30, 0x48, 0x04, 0x48, 0x05, 0x0A, 0xAC, 0x01, 0x0A, 0x13,
0x12, 0x0B, 0x5B, 0x31, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x33, 0x7D,
0x48, 0x02, 0x48, 0x03, 0x48, 0x04, 0x22, 0x19, 0x12, 0x0F, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x5B, 0x33, 0x37, 0x5D, 0x7C, 0x5B, 0x33, 0x37, 0x5D, 0x29, 0x32,
0x02, 0x31, 0x33, 0x48, 0x02, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x4D, 0xDA, 0x01,
0x19, 0x12, 0x0F, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x33, 0x37, 0x5D, 0x7C,
0x5B, 0x33, 0x37, 0x5D, 0x29, 0x32, 0x02, 0x31, 0x33, 0x48, 0x02, 0x48, 0x03,
0xEA, 0x01, 0x1A, 0x12, 0x14, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x33, 0x37,
0x5D, 0x7C, 0x5B, 0x33, 0x37, 0x5D, 0x29, 0x7C, 0x38, 0x37, 0x31, 0x31, 0x32,
0x02, 0x31, 0x33, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12, 0x05, 0x38, 0x37, 0x31, 0x5C,
0x64, 0x32, 0x04, 0x38, 0x37, 0x31, 0x30, 0x48, 0x04, 0x8A, 0x02, 0x0F, 0x12,
0x05, 0x38, 0x37, 0x31, 0x5C, 0x64, 0x32, 0x04, 0x38, 0x37, 0x31, 0x30, 0x48,
0x04, 0x0A, 0xC7, 0x01, 0x0A, 0x1C, 0x12, 0x14, 0x5B, 0x31, 0x39, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D,
0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x48, 0x06, 0x22, 0x16, 0x12, 0x0D, 0x31,
0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x39, 0x5D, 0x7C, 0x32, 0x30, 0x29, 0x32,
0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x4E, 0xDA, 0x01, 0x16,
0x12, 0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x39, 0x5D, 0x7C, 0x32,
0x30, 0x29, 0x32, 0x03, 0x31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12, 0x13, 0x31,
0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x32, 0x39, 0x5D, 0x7C, 0x32, 0x33, 0x7C, 0x33,
0x32, 0x7C, 0x35, 0x36, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA,
0x01, 0x46, 0x12, 0x3F, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x36, 0x7C, 0x31, 0x5B,
0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x5B, 0x33, 0x35, 0x2D, 0x37, 0x5D, 0x7C,
0x33, 0x5B, 0x32, 0x37, 0x5D, 0x7C, 0x34, 0x5B, 0x34, 0x36, 0x37, 0x5D, 0x7C,
0x35, 0x5B, 0x33, 0x36, 0x5D, 0x7C, 0x36, 0x5B, 0x34, 0x2D, 0x37, 0x5D, 0x7C,
0x39, 0x35, 0x29, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x38, 0x35, 0x34,
0x33, 0x32, 0x32, 0x03, 0x31, 0x30, 0x36, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x19, 0x12, 0x0E,
0x28, 0x3F, 0x3A, 0x34, 0x30, 0x7C, 0x38, 0x35, 0x29, 0x34, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x19,
0x12, 0x0E, 0x28, 0x3F, 0x3A, 0x34, 0x30, 0x7C, 0x38, 0x35, 0x29, 0x34, 0x5C,
0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A,
0xDE, 0x02, 0x0A, 0x13, 0x12, 0x0D, 0x5B, 0x31, 0x33, 0x35, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x10, 0x12,
0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x43, 0x52, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x31,
0x32, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA,
0x01, 0xCF, 0x01, 0x12, 0xC7, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x7C, 0x31, 0x35, 0x7C, 0x32, 0x5B, 0x32, 0x2D, 0x34, 0x36,
0x37, 0x39, 0x5D, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x2D,
0x33, 0x35, 0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x7C, 0x33, 0x37, 0x7C, 0x5B, 0x34,
0x36, 0x5D, 0x36, 0x7C, 0x37, 0x5B, 0x35, 0x37, 0x5D, 0x7C, 0x38, 0x5B, 0x37,
0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x33, 0x37, 0x39, 0x5D, 0x29, 0x7C,
0x32, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x5B, 0x31, 0x32, 0x5D, 0x32, 0x7C,
0x33, 0x34, 0x7C, 0x35, 0x35, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x32, 0x31,
0x7C, 0x33, 0x33, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x36,
0x5D, 0x7C, 0x31, 0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x29, 0x7C, 0x35, 0x28, 0x3F,
0x3A, 0x31, 0x35, 0x7C, 0x35, 0x5B, 0x31, 0x35, 0x5D, 0x29, 0x7C, 0x36, 0x39,
0x33, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x37, 0x2D,
0x39, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x5B, 0x36, 0x37, 0x5D,
0x37, 0x29, 0x7C, 0x39, 0x37, 0x35, 0x29, 0x7C, 0x33, 0x38, 0x35, 0x35, 0x7C,
0x35, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x33, 0x30, 0x7C, 0x34, 0x39,
0x29, 0x7C, 0x35, 0x31, 0x30, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31,
0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x21, 0x12, 0x17, 0x28, 0x3F, 0x3A, 0x33,
0x38, 0x35, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x33, 0x34, 0x5D, 0x7C,
0x35, 0x31, 0x29, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x33, 0x38, 0x35, 0x30, 0x48,
0x04, 0x0A, 0xBB, 0x01, 0x0A, 0x1C, 0x12, 0x14, 0x5B, 0x31, 0x32, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x34, 0x7D,
0x29, 0x3F, 0x48, 0x03, 0x48, 0x06, 0x48, 0x07, 0x22, 0x21, 0x12, 0x1A, 0x31,
0x30, 0x5B, 0x34, 0x2D, 0x37, 0x5D, 0x7C, 0x28, 0x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x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31,
0x37, 0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31,
0x37, 0x36, 0x0A, 0x7B, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x30, 0x31, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0E, 0x12, 0x07, 0x30, 0x30, 0x30, 0x7C,
0x31, 0x31, 0x32, 0x32, 0x03, 0x30, 0x30, 0x30, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x43, 0x58, 0xDA,
0x01, 0x0E, 0x12, 0x07, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x32, 0x32, 0x03,
0x30, 0x30, 0x30, 0xEA, 0x01, 0x0E, 0x12, 0x07, 0x30, 0x30, 0x30, 0x7C, 0x31,
0x31, 0x32, 0x32, 0x03, 0x30, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xAB, 0x01,
0x0A, 0x15, 0x12, 0x0F, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x06, 0x22, 0x1C, 0x12,
0x15, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x5C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0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x7F, 0x0A, 0x0F, 0x12,
0x09, 0x5B, 0x31, 0x37, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x48, 0x02, 0x48,
0x03, 0x22, 0x0D, 0x12, 0x05, 0x31, 0x5B, 0x34, 0x37, 0x5D, 0x32, 0x02, 0x31,
0x34, 0x48, 0x02, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x44, 0x5A, 0xDA, 0x01, 0x0D, 0x12, 0x05, 0x31,
0x5B, 0x34, 0x37, 0x5D, 0x32, 0x02, 0x31, 0x34, 0x48, 0x02, 0xEA, 0x01, 0x0F,
0x12, 0x09, 0x31, 0x5B, 0x34, 0x37, 0x5D, 0x7C, 0x37, 0x33, 0x30, 0x32, 0x02,
0x31, 0x34, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0C, 0x12, 0x03, 0x37, 0x33, 0x30, 0x32, 0x03,
0x37, 0x33, 0x30, 0x48, 0x03, 0x8A, 0x02, 0x0C, 0x12, 0x03, 0x37, 0x33, 0x30,
0x32, 0x03, 0x37, 0x33, 0x30, 0x48, 0x03, 0x0A, 0x99, 0x01, 0x0A, 0x0C, 0x12,
0x08, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x18,
0x12, 0x11, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x31,
0x32, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x30, 0x31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 0x31, 0x7C, 0x35, 0x5C, 0x64, 0x3F, 0x29, 0x7C, 0x36, 0x36,
0x30, 0x29, 0x7C, 0x34, 0x39, 0x32, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x31, 0x5B,
0x30, 0x33, 0x5D, 0x7C, 0x34, 0x31, 0x30, 0x7C, 0x35, 0x30, 0x31, 0x29, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x32, 0x7C, 0x33, 0x33, 0x33, 0x7C, 0x36,
0x34, 0x34, 0x29, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x32, 0x7C, 0x31,
0x32, 0x37, 0x7C, 0x38, 0x39, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x31, 0x30,
0x7C, 0x38, 0x5B, 0x35, 0x37, 0x5D, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x31, 0x33, 0x34, 0x5D, 0x7C, 0x31, 0x34, 0x29, 0x29, 0x32, 0x03, 0x31,
0x31, 0x30, 0x2A, 0xFC, 0x05, 0x12, 0xEE, 0x05, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x38, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x5B, 0x31, 0x32, 0x34, 0x35, 0x38,
0x5D, 0x5C, 0x64, 0x3F, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F,
0x3A, 0x5B, 0x30, 0x32, 0x2D, 0x34, 0x36, 0x2D, 0x38, 0x5D, 0x5C, 0x64, 0x3F,
0x7C, 0x31, 0x5B, 0x30, 0x2D, 0x33, 0x36, 0x5D, 0x29, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x5B, 0x30, 0x2D, 0x34, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x36, 0x5B, 0x30,
0x36, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x34, 0x5D,
0x5C, 0x64, 0x3F, 0x7C, 0x35, 0x5B, 0x32, 0x35, 0x5D, 0x29, 0x7C, 0x5B, 0x33,
0x36, 0x37, 0x5D, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x34, 0x5D,
0x7C, 0x5B, 0x31, 0x32, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x34, 0x5B, 0x32, 0x34,
0x5D, 0x7C, 0x35, 0x34, 0x29, 0x7C, 0x35, 0x35, 0x5B, 0x31, 0x32, 0x34, 0x35,
0x37, 0x5D, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x5B,
0x30, 0x32, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x31, 0x5B, 0x31, 0x33, 0x35, 0x37,
0x38, 0x5D, 0x7C, 0x33, 0x5B, 0x33, 0x35, 0x36, 0x5D, 0x29, 0x7C, 0x31, 0x5B,
0x31, 0x33, 0x34, 0x37, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x2D, 0x35, 0x5D,
0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x34, 0x37, 0x5D, 0x5C,
0x64, 0x3F, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x33, 0x5D, 0x7C, 0x38, 0x38, 0x29,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x5B, 0x33, 0x35, 0x5D, 0x5C, 0x64, 0x3F, 0x7C,
0x34, 0x5B, 0x33, 0x34, 0x5D, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x33, 0x5B,
0x31, 0x33, 0x34, 0x5D, 0x7C, 0x35, 0x5B, 0x30, 0x33, 0x35, 0x5D, 0x29, 0x7C,
0x36, 0x36, 0x36, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x32, 0x28, 0x3F, 0x3A,
0x30, 0x30, 0x7C, 0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, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x38, 0x5D, 0x7C,
0x32, 0x5C, 0x64, 0x3F, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x37, 0x38, 0x5D, 0x29,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x39, 0x37, 0x29, 0x29, 0x7C,
0x38, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x32, 0x37, 0x5D, 0x7C, 0x38, 0x5B,
0x31, 0x32, 0x36, 0x38, 0x5D, 0x7C, 0x39, 0x5B, 0x32, 0x36, 0x39, 0x5D, 0x29,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x5D,
0x5C, 0x64, 0x3F, 0x7C, 0x36, 0x39, 0x7C, 0x39, 0x5B, 0x30, 0x32, 0x36, 0x39,
0x5D, 0x29, 0x7C, 0x31, 0x5B, 0x31, 0x2D, 0x33, 0x36, 0x38, 0x39, 0x5D, 0x7C,
0x32, 0x31, 0x29, 0x29, 0x32, 0x03, 0x31, 0x32, 0x33, 0x48, 0x03, 0x48, 0x04,
0x48, 0x05, 0x4A, 0x02, 0x45, 0x45, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x31,
0x5B, 0x30, 0x32, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0xEA, 0x01,
0xC0, 0x01, 0x12, 0xB8, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A,
0x5B, 0x30, 0x32, 0x2D, 0x35, 0x37, 0x39, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A,
0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x5B, 0x30, 0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x5B, 0x31, 0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31,
0x38, 0x5B, 0x31, 0x32, 0x35, 0x38, 0x5D, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30,
0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x33, 0x36, 0x5D, 0x7C, 0x5B, 0x34, 0x36,
0x5D, 0x5C, 0x64, 0x3F, 0x29, 0x7C, 0x31, 0x36, 0x36, 0x7C, 0x32, 0x31, 0x7C,
0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x34, 0x5D, 0x7C, 0x31, 0x5C, 0x64,
0x3F, 0x7C, 0x35, 0x5B, 0x34, 0x37, 0x5D, 0x29, 0x7C, 0x5B, 0x36, 0x37, 0x5D,
0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x31,
0x33, 0x2D, 0x35, 0x37, 0x38, 0x5D, 0x7C, 0x32, 0x5C, 0x64, 0x3F, 0x7C, 0x33,
0x5B, 0x35, 0x36, 0x5D, 0x29, 0x7C, 0x31, 0x5B, 0x31, 0x35, 0x5D, 0x7C, 0x32,
0x5B, 0x30, 0x34, 0x35, 0x5D, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x33,
0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x32, 0x5B, 0x31, 0x33, 0x5D, 0x29, 0x7C, 0x34,
0x33, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x33, 0x5B, 0x33, 0x34,
0x5D, 0x7C, 0x35, 0x33, 0x29, 0x29, 0x7C, 0x34, 0x34, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x30, 0x31, 0x33, 0x35, 0x5D, 0x7C, 0x31, 0x34, 0x7C, 0x35, 0x30, 0x7C,
0x37, 0x5C, 0x64, 0x3F, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x35, 0x7C,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x35,
0x5B, 0x31, 0x32, 0x34, 0x36, 0x5D, 0x7C, 0x38, 0x5B, 0x31, 0x32, 0x5D, 0x29,
0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x5D, 0x5C, 0x64, 0x3F, 0x7C,
0x32, 0x32, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x33, 0x5B,
0x30, 0x33, 0x5D, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x35, 0x7C, 0x35,
0x5C, 0x64, 0x3F, 0x29, 0x7C, 0x35, 0x30, 0x30, 0x7C, 0x39, 0x28, 0x3F, 0x3A,
0x35, 0x5C, 0x64, 0x3F, 0x7C, 0x37, 0x37, 0x7C, 0x38, 0x30, 0x29, 0x29, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x33, 0x35, 0x2D, 0x38, 0x5D, 0x7C, 0x32,
0x32, 0x36, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x32, 0x32, 0x7C, 0x33, 0x5B, 0x33,
0x36, 0x5D, 0x7C, 0x36, 0x36, 0x29, 0x7C, 0x36, 0x34, 0x34, 0x7C, 0x37, 0x28,
0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x37, 0x5C, 0x64, 0x3F, 0x7C, 0x38, 0x39, 0x29,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x36, 0x39, 0x29, 0x29, 0x7C,
0x37, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x5B, 0x32, 0x35, 0x38, 0x5D, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x5B, 0x31, 0x35, 0x5D, 0x5C, 0x64, 0x3F,
0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x34, 0x34, 0x7C, 0x37, 0x5C, 0x64, 0x3F,
0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x38, 0x37, 0x7C, 0x39,
0x5C, 0x64, 0x3F, 0x29, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x31,
0x32, 0x38, 0x5D, 0x7C, 0x38, 0x5B, 0x35, 0x36, 0x5D, 0x7C, 0x39, 0x28, 0x3F,
0x3A, 0x5B, 0x32, 0x36, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x37, 0x37, 0x29, 0x29,
0x7C, 0x39, 0x30, 0x28, 0x3F, 0x3A, 0x32, 0x5C, 0x64, 0x3F, 0x7C, 0x36, 0x39,
0x7C, 0x39, 0x32, 0x29, 0x29, 0x32, 0x03, 0x31, 0x32, 0x36, 0x48, 0x03, 0x48,
0x04, 0x48, 0x05, 0x0A, 0xBB, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x33,
0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D,
0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x16, 0x12, 0x0D, 0x31, 0x28, 0x3F,
0x3A, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x38, 0x30, 0x29, 0x32, 0x03, 0x31,
0x32, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x45, 0x47, 0xDA, 0x01, 0x16, 0x12, 0x0D,
0x31, 0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x38, 0x30, 0x29,
0x32, 0x03, 0x31, 0x32, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x24, 0x12, 0x1D, 0x31,
0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x5B, 0x36, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x38, 0x30, 0x29, 0x7C, 0x33, 0x34, 0x34,
0x30, 0x30, 0x32, 0x03, 0x31, 0x32, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07,
0x33, 0x34, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x33, 0x34, 0x34, 0x30,
0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x33, 0x34, 0x34, 0x5C, 0x64,
0x5C, 0x64, 0x32, 0x05, 0x33, 0x34, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x87,
0x01, 0x0A, 0x0C, 0x12, 0x06, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x48, 0x02,
0x48, 0x03, 0x22, 0x12, 0x12, 0x0C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x35, 0x39,
0x5D, 0x7C, 0x37, 0x37, 0x29, 0x32, 0x02, 0x31, 0x35, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x45, 0x48,
0xDA, 0x01, 0x12, 0x12, 0x0C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x35, 0x39, 0x5D,
0x7C, 0x37, 0x37, 0x29, 0x32, 0x02, 0x31, 0x35, 0xEA, 0x01, 0x12, 0x12, 0x0C,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x35, 0x39, 0x5D, 0x7C, 0x37, 0x37, 0x29, 0x32,
0x02, 0x31, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x84, 0x02, 0x0A, 0x18, 0x12, 0x12,
0x5B, 0x31, 0x32, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x06, 0x22, 0x26, 0x12, 0x1F,
0x31, 0x31, 0x5B, 0x32, 0x2D, 0x34, 0x36, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x31,
0x32, 0x5B, 0x34, 0x37, 0x5D, 0x7C, 0x32, 0x30, 0x5B, 0x31, 0x32, 0x5D, 0x29,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x45,
0x52, 0xDA, 0x01, 0x41, 0x12, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x32,
0x2D, 0x34, 0x36, 0x5D, 0x7C, 0x32, 0x34, 0x34, 0x32, 0x32, 0x29, 0x7C, 0x32,
0x30, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x36, 0x30, 0x36, 0x7C, 0x39,
0x31, 0x37, 0x29, 0x7C, 0x32, 0x39, 0x31, 0x34, 0x29, 0x7C, 0x28, 0x3F, 0x3A,
0x31, 0x32, 0x37, 0x37, 0x7C, 0x32, 0x30, 0x32, 0x30, 0x29, 0x39, 0x39, 0x32,
0x03, 0x31, 0x31, 0x32, 0xEA, 0x01, 0x40, 0x12, 0x39, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x5B, 0x32, 0x2D, 0x36, 0x5D, 0x7C, 0x32, 0x34, 0x34, 0x32, 0x32, 0x29,
0x7C, 0x32, 0x30, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x36, 0x30, 0x36,
0x7C, 0x39, 0x31, 0x37, 0x29, 0x7C, 0x32, 0x39, 0x31, 0x34, 0x29, 0x7C, 0x28,
0x3F, 0x3A, 0x31, 0x32, 0x37, 0x37, 0x7C, 0x32, 0x30, 0x32, 0x30, 0x29, 0x39,
0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xBA, 0x04, 0x0A,
0x18, 0x12, 0x0E, 0x5B, 0x30, 0x2D, 0x33, 0x37, 0x39, 0x5D, 0x5C, 0x64, 0x7B,
0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22,
0x48, 0x12, 0x3B, 0x30, 0x28, 0x3F, 0x3A, 0x31, 0x36, 0x7C, 0x36, 0x5B, 0x35,
0x37, 0x5D, 0x7C, 0x38, 0x5B, 0x35, 0x38, 0x5D, 0x29, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x36, 0x7C, 0x31, 0x32, 0x7C, 0x5B, 0x33, 0x2D, 0x37, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x36, 0x7C,
0x32, 0x30, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x30,
0x31, 0x36, 0x48, 0x03, 0x48, 0x04, 0x48, 0x06, 0x2A, 0x53, 0x12, 0x4C, 0x5B,
0x31, 0x32, 0x5D, 0x32, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x7C, 0x39,
0x30, 0x28, 0x3F, 0x3A, 0x35, 0x5C, 0x64, 0x7C, 0x37, 0x29, 0x7C, 0x28, 0x3F,
0x3A, 0x31, 0x31, 0x38, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x33, 0x35, 0x37,
0x5D, 0x5C, 0x64, 0x7C, 0x38, 0x30, 0x29, 0x7C, 0x33, 0x5B, 0x33, 0x35, 0x37,
0x5D, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x5B, 0x37, 0x39, 0x5D,
0x39, 0x5B, 0x35, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x31,
0x32, 0x30, 0x4A, 0x02, 0x45, 0x53, 0xDA, 0x01, 0x13, 0x12, 0x0A, 0x30, 0x38,
0x5B, 0x35, 0x38, 0x5D, 0x7C, 0x31, 0x31, 0x32, 0x32, 0x03, 0x30, 0x38, 0x35,
0x48, 0x03, 0xEA, 0x01, 0xCB, 0x01, 0x12, 0xC3, 0x01, 0x30, 0x28, 0x3F, 0x3A,
0x31, 0x5B, 0x30, 0x2D, 0x32, 0x36, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D, 0x32,
0x35, 0x37, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x35, 0x38, 0x5D, 0x7C, 0x39, 0x5B,
0x31, 0x32, 0x5D, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x33,
0x2D, 0x35, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x33, 0x7D, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C,
0x31, 0x31, 0x31, 0x29, 0x7C, 0x38, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x32,
0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x7C, 0x5B, 0x33, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x32, 0x5C, 0x64,
0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x7C, 0x38, 0x30, 0x5C, 0x64, 0x5C, 0x64, 0x29,
0x7C, 0x39, 0x30, 0x28, 0x3F, 0x3A, 0x35, 0x5B, 0x31, 0x32, 0x34, 0x35, 0x37,
0x38, 0x5D, 0x7C, 0x37, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x33, 0x5B, 0x33,
0x34, 0x5D, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x30,
0x31, 0x5D, 0x5C, 0x64, 0x7C, 0x5B, 0x37, 0x39, 0x5D, 0x39, 0x5B, 0x35, 0x37,
0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x5B, 0x32, 0x33, 0x5D, 0x5B,
0x33, 0x35, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x03, 0x30, 0x31,
0x30, 0xF2, 0x01, 0x2A, 0x12, 0x1F, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x36,
0x5D, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C, 0x38, 0x30, 0x7C, 0x39, 0x5B, 0x31,
0x32, 0x5D, 0x29, 0x7C, 0x32, 0x31, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x32, 0x03,
0x30, 0x31, 0x30, 0x48, 0x03, 0x48, 0x06, 0xFA, 0x01, 0x21, 0x12, 0x1A, 0x31,
0x28, 0x3F, 0x3A, 0x33, 0x5B, 0x33, 0x34, 0x5D, 0x7C, 0x37, 0x37, 0x29, 0x7C,
0x5B, 0x31, 0x32, 0x5D, 0x32, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x32,
0x03, 0x31, 0x32, 0x30, 0x8A, 0x02, 0x44, 0x12, 0x37, 0x28, 0x3F, 0x3A, 0x32,
0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x5C, 0x64, 0x7C, 0x33, 0x5B, 0x33, 0x35, 0x37,
0x5D, 0x7C, 0x5B, 0x37, 0x39, 0x5D, 0x39, 0x5B, 0x35, 0x37, 0x5D, 0x29, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x33, 0x35,
0x37, 0x5D, 0x5C, 0x64, 0x7C, 0x38, 0x30, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x05, 0x32, 0x32, 0x30, 0x30, 0x30, 0x48, 0x05, 0x48, 0x06, 0x0A, 0xA8, 0x01,
0x0A, 0x0C, 0x12, 0x06, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x48, 0x02, 0x48,
0x03, 0x22, 0x1D, 0x12, 0x17, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x31,
0x31, 0x3F, 0x7C, 0x32, 0x7C, 0x33, 0x39, 0x3F, 0x7C, 0x39, 0x5B, 0x31, 0x37,
0x5D, 0x29, 0x32, 0x02, 0x39, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x45, 0x54, 0xDA, 0x01, 0x1A,
0x12, 0x14, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x3F, 0x7C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C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x5B, 0x32, 0x35, 0x5D, 0x39, 0x29, 0x7C, 0x32,
0x5B, 0x32, 0x38, 0x39, 0x5D, 0x7C, 0x33, 0x30, 0x7C, 0x34, 0x30, 0x34, 0x30,
0x34, 0x7C, 0x39, 0x31, 0x5B, 0x31, 0x33, 0x37, 0x5D, 0x7C, 0x5B, 0x34, 0x35,
0x5D, 0x34, 0x7C, 0x37, 0x35, 0x32, 0x02, 0x32, 0x32, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34,
0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x75, 0x0A, 0x0C, 0x12, 0x08, 0x5B,
0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03,
0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x46, 0x4B, 0xDA,
0x01, 0x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0xEA,
0x01, 0x10, 0x12, 0x09, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x39, 0x39, 0x39,
0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xF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0x53, 0x12, 0x4D, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x5B, 0x31, 0x33,
0x5D, 0x33, 0x29, 0x7C, 0x31, 0x5B, 0x30, 0x32, 0x34, 0x35, 0x39, 0x5D, 0x7C,
0x5B, 0x35, 0x37, 0x38, 0x5D, 0x7C, 0x39, 0x5B, 0x31, 0x36, 0x37, 0x5D, 0x29,
0x7C, 0x32, 0x32, 0x34, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x33, 0x37, 0x30, 0x7C,
0x37, 0x34, 0x29, 0x30, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x36, 0x5C, 0x64,
0x7C, 0x33, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x02,
0x31, 0x35, 0x2A, 0x27, 0x12, 0x1A, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x38, 0x7C,
0x5B, 0x34, 0x2D, 0x38, 0x5D, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x7C, 0x33, 0x36, 0x36, 0x36, 0x35, 0x32, 0x05, 0x33, 0x36, 0x36, 0x36, 0x35,
0x48, 0x05, 0x48, 0x06, 0x4A, 0x02, 0x46, 0x52, 0xDA, 0x01, 0x17, 0x12, 0x0D,
0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x29,
0x32, 0x02, 0x31, 0x35, 0x48, 0x02, 0x48, 0x03, 0xEA, 0x01, 0x82, 0x01, 0x12,
0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x31, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x34, 0x35, 0x39, 0x5D, 0x7C, 0x36, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x7C, 0x38, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x7C, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x7C, 0x39, 0x5B,
0x31, 0x36, 0x37, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x7C, 0x32, 0x29, 0x30, 0x7C, 0x32, 0x34, 0x29, 0x7C, 0x5B,
0x33, 0x2D, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x7C, 0x33, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x34, 0x5D,
0x7C, 0x33, 0x34, 0x29, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x36,
0x5D, 0x7C, 0x32, 0x32, 0x7C, 0x34, 0x30, 0x29, 0x32, 0x02, 0x31, 0x35, 0xF2,
0x01, 0x54, 0x12, 0x49, 0x31, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x33, 0x34,
0x5D, 0x34, 0x7C, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x35, 0x5C, 0x64, 0x7C,
0x39, 0x39, 0x29, 0x7C, 0x32, 0x30, 0x32, 0x5C, 0x64, 0x7C, 0x33, 0x28, 0x3F,
0x3A, 0x36, 0x34, 0x36, 0x7C, 0x39, 0x5B, 0x30, 0x37, 0x5D, 0x30, 0x29, 0x7C,
0x36, 0x33, 0x34, 0x7C, 0x37, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x28, 0x3F,
0x3A, 0x31, 0x30, 0x36, 0x7C, 0x36, 0x31, 0x29, 0x5B, 0x31, 0x34, 0x5D, 0x32,
0x03, 0x36, 0x31, 0x31, 0x48, 0x03, 0x48, 0x04, 0xFA, 0x01, 0x46, 0x12, 0x37,
0x31, 0x31, 0x38, 0x37, 0x37, 0x37, 0x7C, 0x32, 0x32, 0x34, 0x7C, 0x36, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x34, 0x5D, 0x7C, 0x33, 0x34, 0x29, 0x7C, 0x37,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x32, 0x32, 0x7C, 0x34,
0x30, 0x29, 0x7C, 0x32, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7C, 0x32,
0x29, 0x5C, 0x64, 0x32, 0x03, 0x32, 0x32, 0x34, 0x48, 0x03, 0x48, 0x04, 0x48,
0x05, 0x48, 0x06, 0x8A, 0x02, 0x19, 0x12, 0x0E, 0x31, 0x31, 0x34, 0x7C, 0x5B,
0x33, 0x2D, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x32, 0x03, 0x31, 0x31,
0x34, 0x48, 0x03, 0x48, 0x05, 0x0A, 0x9A, 0x01, 0x0A, 0x13, 0x12, 0x0D, 0x31,
0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48,
0x02, 0x48, 0x04, 0x22, 0x16, 0x12, 0x10, 0x31, 0x38, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x33, 0x5C, 0x64, 0x7C, 0x37, 0x33, 0x29, 0x5C, 0x64, 0x32, 0x02, 0x31,
0x38, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A, 0x02, 0x47, 0x41, 0xDA, 0x01, 0x16, 0x12, 0x10, 0x31, 0x28, 0x3F,
0x3A, 0x33, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x37, 0x33, 0x30, 0x7C, 0x38, 0x29,
0x32, 0x02, 0x31, 0x38, 0xEA, 0x01, 0x16, 0x12, 0x10, 0x31, 0x28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0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x80, 0x02, 0x12, 0xF8,
0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30,
0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x33, 0x29,
0x29, 0x7C, 0x38, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x7C, 0x32, 0x28, 0x3F,
0x3A, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x35, 0x30, 0x29, 0x7C, 0x33, 0x33,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x37, 0x5C, 0x64, 0x29, 0x7C, 0x35,
0x37, 0x31, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7C, 0x5B, 0x35,
0x36, 0x5D, 0x30, 0x29, 0x7C, 0x38, 0x30, 0x30, 0x5C, 0x64, 0x7C, 0x39, 0x5B,
0x31, 0x35, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x30, 0x32,
0x7C, 0x31, 0x33, 0x30, 0x30, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x7C,
0x31, 0x31, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x7C, 0x33, 0x33,
0x36, 0x7C, 0x34, 0x35, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x32, 0x35, 0x7C,
0x38, 0x29, 0x29, 0x7C, 0x33, 0x5B, 0x31, 0x33, 0x5D, 0x33, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x33, 0x35, 0x5B, 0x30, 0x31,
0x5D, 0x7C, 0x34, 0x34, 0x5B, 0x34, 0x35, 0x5D, 0x7C, 0x35, 0x5C, 0x64, 0x29,
0x7C, 0x28, 0x3F, 0x3A, 0x5B, 0x36, 0x38, 0x5D, 0x5C, 0x64, 0x7C, 0x37, 0x5B,
0x30, 0x38, 0x39, 0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x31, 0x35,
0x5C, 0x64, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x5D, 0x32, 0x7C, 0x36, 0x35, 0x30,
0x7C, 0x37, 0x38, 0x39, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x39,
0x39, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x4C, 0x12, 0x3F,
0x31, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x32, 0x35, 0x7C, 0x37, 0x5B, 0x35,
0x36, 0x5D, 0x29, 0x5C, 0x64, 0x7C, 0x35, 0x37, 0x31, 0x29, 0x7C, 0x32, 0x28,
0x3F, 0x3A, 0x30, 0x32, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29,
0x3F, 0x7C, 0x5B, 0x31, 0x33, 0x5D, 0x33, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x34,
0x38, 0x29, 0x7C, 0x34, 0x34, 0x34, 0x34, 0x7C, 0x39, 0x30, 0x31, 0x32, 0x03,
0x32, 0x30, 0x32, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02, 0x38, 0x12,
0x2C, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x35, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x30,
0x32, 0x30, 0x7C, 0x31, 0x33, 0x5C, 0x64, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x37,
0x5B, 0x30, 0x38, 0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x5C,
0x64, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x32, 0x35, 0x30, 0x48,
0x04, 0x48, 0x05, 0x0A, 0x71, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x31, 0x39, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03, 0x39, 0x31, 0x31,
0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x47, 0x44, 0xDA, 0x01, 0x0A, 0x12,
0x03, 0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x0E, 0x12,
0x07, 0x31, 0x37, 0x36, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x37, 0x36,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31, 0x37,
0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03, 0x31, 0x37,
0x36, 0x0A, 0xD6, 0x01, 0x0A, 0x19, 0x12, 0x13, 0x5B, 0x30, 0x31, 0x34, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29,
0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x22, 0x12, 0x19, 0x30, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x33, 0x33, 0x29, 0x7C, 0x31, 0x31, 0x5B, 0x31, 0x2D, 0x33,
0x5D, 0x7C, 0x5B, 0x30, 0x31, 0x5D, 0x32, 0x32, 0x32, 0x03, 0x30, 0x31, 0x31,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x47, 0x45, 0xDA, 0x01, 0x22, 0x12, 0x19, 0x30, 0x28,
0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x33, 0x33, 0x29, 0x7C, 0x31, 0x31, 0x5B, 0x31,
0x2D, 0x33, 0x5D, 0x7C, 0x5B, 0x30, 0x31, 0x5D, 0x32, 0x32, 0x32, 0x03, 0x30,
0x31, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x26, 0x12, 0x1F, 0x30, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x33, 0x33, 0x29, 0x7C, 0x31, 0x31, 0x5B, 0x31, 0x2D, 0x33,
0x5D, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x5B, 0x30, 0x31, 0x5D, 0x32,
0x32, 0x32, 0x03, 0x30, 0x31, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34,
0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30,
0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x70, 0x0A,
0x07, 0x12, 0x03, 0x31, 0x5C, 0x64, 0x48, 0x02, 0x22, 0x0C, 0x12, 0x06, 0x31,
0x5B, 0x35, 0x37, 0x38, 0x5D, 0x32, 0x02, 0x31, 0x35, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x47, 0x46,
0xDA, 0x01, 0x0C, 0x12, 0x06, 0x31, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x32, 0x02,
0x31, 0x35, 0xEA, 0x01, 0x0C, 0x12, 0x06, 0x31, 0x5B, 0x35, 0x37, 0x38, 0x5D,
0x32, 0x02, 0x31, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xBC, 0x01, 0x0A, 0x15, 0x12,
0x0B, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48,
0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x10, 0x12, 0x07, 0x31, 0x31,
0x32, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x47, 0x47, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C, 0x39,
0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x42, 0x12,
0x3B, 0x31, 0x28, 0x3F, 0x3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, 0x39, 0x31, 0x48,
0x03, 0xEA, 0x01, 0x24, 0x12, 0x1D, 0x31, 0x39, 0x5B, 0x31, 0x2D, 0x33, 0x5D,
0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x28, 0x3F, 0x3A, 0x35, 0x34, 0x7C,
0x38, 0x33, 0x29, 0x30, 0x30, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x39,
0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x20, 0x12, 0x14, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C,
0x64, 0x7C, 0x28, 0x3F, 0x3A, 0x35, 0x34, 0x7C, 0x38, 0x33, 0x29, 0x30, 0x5C,
0x64, 0x32, 0x04, 0x35, 0x34, 0x30, 0x30, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02,
0x20, 0x12, 0x14, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x28, 0x3F,
0x3A, 0x35, 0x34, 0x7C, 0x38, 0x33, 0x29, 0x30, 0x5C, 0x64, 0x32, 0x04, 0x35,
0x34, 0x30, 0x30, 0x48, 0x04, 0x48, 0x05, 0x0A, 0x90, 0x03, 0x0A, 0x16, 0x12,
0x0C, 0x5B, 0x31, 0x35, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D,
0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x4C, 0x12, 0x3F, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x32, 0x35, 0x5D, 0x7C, 0x32,
0x33, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x37, 0x5C, 0x64, 0x29, 0x7C,
0x35, 0x5B, 0x31, 0x35, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x32, 0x2D, 0x34, 0x39,
0x5D, 0x29, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x36,
0x5C, 0x64, 0x7C, 0x38, 0x30, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31,
0x30, 0x30, 0x48, 0x03, 0x48, 0x04, 0x48, 0x06, 0x2A, 0x15, 0x12, 0x0B, 0x38,
0x5B, 0x31, 0x2D, 0x36, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x04, 0x38,
0x31, 0x30, 0x30, 0x48, 0x04, 0x4A, 0x02, 0x47, 0x49, 0xDA, 0x01, 0x16, 0x12,
0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x39, 0x5B, 0x30, 0x39, 0x5D,
0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x81, 0x01, 0x12,
0x7A, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B,
0x32, 0x35, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36,
0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32,
0x33, 0x29, 0x29, 0x7C, 0x38, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x33,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x37, 0x5B, 0x30, 0x31, 0x34, 0x5D,
0x29, 0x7C, 0x35, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x32,
0x2D, 0x34, 0x39, 0x5D, 0x29, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x38, 0x5B, 0x30,
0x2D, 0x37, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x30, 0x30, 0x7C, 0x34, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C, 0x38, 0x5B, 0x30,
0x2D, 0x35, 0x38, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01,
0x15, 0x12, 0x0A, 0x31, 0x35, 0x30, 0x7C, 0x38, 0x37, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x03, 0x31, 0x35, 0x30, 0x48, 0x03, 0x48, 0x04, 0xFA, 0x01, 0x48, 0x12,
0x3D, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x35,
0x7C, 0x38, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x33, 0x7C, 0x35, 0x31,
0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x29, 0x7C, 0x35, 0x35, 0x35, 0x7C,
0x38, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x34, 0x5B, 0x30, 0x2D, 0x32, 0x5D,
0x7C, 0x38, 0x5B, 0x30, 0x2D, 0x35, 0x38, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31,
0x30, 0x30, 0x48, 0x03, 0x48, 0x05, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x6C, 0x0A, 0x09, 0x12, 0x05,
0x31, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03, 0x31, 0x31,
0x32, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x47, 0x4C, 0x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x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x47, 0x52,
0xDA, 0x01, 0x19, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31,
0x32, 0x7C, 0x36, 0x36, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30,
0x48, 0x03, 0xEA, 0x01, 0x42, 0x12, 0x3B, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x30, 0x38, 0x39, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x33, 0x32,
0x30, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x29, 0x7C,
0x28, 0x3F, 0x3A, 0x33, 0x38, 0x39, 0x7C, 0x39, 0x29, 0x39, 0x7C, 0x36, 0x36,
0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x12, 0x12, 0x07, 0x31, 0x31,
0x33, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31, 0x31, 0x33, 0x30, 0x30, 0x48,
0x05, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x0A, 0xB2, 0x01, 0x0A, 0x13, 0x12, 0x0B, 0x5B, 0x31, 0x34,
0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48,
0x05, 0x22, 0x16, 0x12, 0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x30, 0x7C, 0x32,
0x5B, 0x30, 0x33, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x47, 0x54, 0xDA, 0x01, 0x16, 0x12, 0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x30, 0x7C, 0x32, 0x5B, 0x30, 0x33, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x30,
0x48, 0x03, 0xEA, 0x01, 0x20, 0x12, 0x19, 0x31, 0x31, 0x30, 0x7C, 0x34, 0x30,
0x34, 0x30, 0x34, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x5B, 0x35, 0x37,
0x5D, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05,
0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34,
0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30,
0x48, 0x05, 0x0A, 0x6C, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64,
0x48, 0x03, 0x22, 0x0A, 0x12, 0x03, 0x39, 0x31, 0x31, 0x32, 0x03, 0x39, 0x31,
0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A,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FF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x0A, 0xD3, 0x01, 0x0A, 0x12, 0x12, 0x0C, 0x5B, 0x30, 0x31, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x10, 0x12,
0x07, 0x39, 0x31, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x39, 0x31, 0x31,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x47, 0x59, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x39, 0x31,
0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x39, 0x31, 0x31, 0x48, 0x03, 0xEA,
0x01, 0x54, 0x12, 0x4D, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x7C, 0x28, 0x3F,
0x3A, 0x31, 0x37, 0x7C, 0x38, 0x30, 0x29, 0x31, 0x7C, 0x34, 0x34, 0x34, 0x7C,
0x37, 0x28, 0x3F, 0x3A, 0x5B, 0x36, 0x37, 0x5D, 0x37, 0x7C, 0x39, 0x29, 0x7C,
0x39, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x37, 0x38, 0x5D, 0x7C, 0x5B, 0x32, 0x2D,
0x34, 0x37, 0x5D, 0x29, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x34, 0x34, 0x33,
0x7C, 0x35, 0x5B, 0x35, 0x36, 0x38, 0x5D, 0x29, 0x7C, 0x39, 0x31, 0x5B, 0x31,
0x2D, 0x33, 0x5D, 0x32, 0x03, 0x30, 0x30, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12,
0x05, 0x31, 0x34, 0x34, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x34, 0x34, 0x30, 0x48,
0x04, 0x8A, 0x02, 0x0F, 0x12, 0x05, 0x31, 0x34, 0x34, 0x5C, 0x64, 0x32, 0x04,
0x31, 0x34, 0x34, 0x30, 0x48, 0x04, 0x0A, 0xBA, 0x03, 0x0A, 0x17, 0x12, 0x0B,
0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x36, 0x7D, 0x48, 0x03,
0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48, 0x07, 0x22, 0x13, 0x12, 0x0A, 0x31,
0x31, 0x32, 0x7C, 0x39, 0x39, 0x5B, 0x32, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x48, 0x4B, 0xDA, 0x01, 0x13, 0x12, 0x0A, 0x31,
0x31, 0x32, 0x7C, 0x39, 0x39, 0x5B, 0x32, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x32, 0x48, 0x03, 0xEA, 0x01, 0xA2, 0x02, 0x12, 0x9A, 0x02, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x36,
0x5D, 0x5C, 0x64, 0x7C, 0x32, 0x5B, 0x31, 0x34, 0x5D, 0x29, 0x5C, 0x64, 0x7B,
0x30, 0x2C, 0x33, 0x7D, 0x7C, 0x38, 0x5B, 0x31, 0x33, 0x38, 0x5D, 0x29, 0x7C,
0x31, 0x32, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x33, 0x5D, 0x5C,
0x64, 0x7B, 0x30, 0x2C, 0x34, 0x7D, 0x7C, 0x28, 0x3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 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x38, 0x36, 0x29, 0x7C, 0x38,
0x29, 0x29, 0x29, 0x7C, 0x39, 0x39, 0x5B, 0x32, 0x39, 0x5D, 0x7C, 0x31, 0x30,
0x5B, 0x30, 0x31, 0x33, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x1F, 0x12, 0x12, 0x31, 0x30, 0x39, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x38, 0x7C, 0x38, 0x35, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x30,
0x39, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02, 0x0C, 0x12, 0x03, 0x39,
0x39, 0x32, 0x32, 0x03, 0x39, 0x39, 0x32, 0x48, 0x03, 0x0A, 0x93, 0x01, 0x0A,
0x18, 0x12, 0x12, 0x5B, 0x31, 0x34, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F,
0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22,
0x0C, 0x12, 0x03, 0x31, 0x39, 0x39, 0x32, 0x03, 0x31, 0x39, 0x39, 0x48, 0x03,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x48, 0x4E, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x39, 0x39, 0x32,
0x03, 0x31, 0x39, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x10, 0x12, 0x09, 0x31, 0x39,
0x39, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x32, 0x03, 0x31, 0x39, 0x39, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07,
0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30,
0x30, 0x48, 0x05, 0x0A, 0x8C, 0x02, 0x0A, 0x17, 0x12, 0x0B, 0x5B, 0x31, 0x39,
0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x35, 0x7D, 0x48, 0x02, 0x48, 0x03, 0x48,
0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x33, 0x12, 0x25, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x32, 0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x29, 0x7C, 0x39, 0x5B,
0x33, 0x34, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x36, 0x5C, 0x64, 0x7C,
0x33, 0x39, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x02, 0x39, 0x33, 0x48, 0x02,
0x48, 0x03, 0x48, 0x05, 0x48, 0x06, 0x2A, 0x12, 0x12, 0x07, 0x31, 0x31, 0x38,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31, 0x31, 0x38, 0x30, 0x30, 0x48, 0x05,
0x4A, 0x02, 0x48, 0x52, 0xDA, 0x01, 0x1E, 0x12, 0x14, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x32, 0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x29, 0x7C, 0x39, 0x5B,
0x33, 0x34, 0x5D, 0x32, 0x02, 0x39, 0x33, 0x48, 0x02, 0x48, 0x03, 0xEA, 0x01,
0x4A, 0x12, 0x44, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C,
0x38, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x33, 0x39, 0x37, 0x37, 0x7C, 0x39,
0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x2D, 0x35, 0x5D, 0x7C, 0x38, 0x37, 0x29, 0x29,
0x7C, 0x39, 0x5B, 0x33, 0x34, 0x5D, 0x32, 0x02, 0x39, 0x33, 0xF2, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01,
0x12, 0x12, 0x07, 0x31, 0x33, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31,
0x33, 0x39, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x31, 0x33,
0x39, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31, 0x33, 0x39, 0x30, 0x30, 0x48,
0x05, 0x0A, 0x9C, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x34, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F,
0x48, 0x03, 0x48, 0x05, 0x22, 0x0F, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x34, 0x38,
0x5D, 0x32, 0x03, 0x31, 0x31, 0x34, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x48, 0x54, 0xDA,
0x01, 0x0F, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x34, 0x38, 0x5D, 0x32, 0x03, 0x31,
0x31, 0x34, 0x48, 0x03, 0xEA, 0x01, 0x13, 0x12, 0x0C, 0x31, 0x31, 0x5B, 0x34,
0x38, 0x5D, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x32, 0x03, 0x31, 0x31, 0x34,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12,
0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34,
0x30, 0x30, 0x48, 0x05, 0x0A, 0xBE, 0x01, 0x0A, 0x15, 0x12, 0x0F, 0x31, 0x5C,
0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x3F,
0x48, 0x03, 0x48, 0x06, 0x22, 0x20, 0x12, 0x19, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x34, 0x35, 0x37, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x29, 0x32, 0x03, 0x31, 0x30, 0x34, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x48, 0x55, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x34, 0x35, 0x37, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30,
0x34, 0x48, 0x03, 0xEA, 0x01, 0x2D, 0x12, 0x26, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x34, 0x35, 0x37, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36,
0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x32, 0x33, 0x29, 0x29, 0x29, 0x29, 0x32, 0x03, 0x31, 0x30, 0x34, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x0A, 0xBF, 0x01, 0x0A, 0x19, 0x12, 0x13, 0x5B, 0x31, 0x37, 0x38,
0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D,
0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x12, 0x12, 0x09, 0x31, 0x31, 0x5B,
0x30, 0x32, 0x33, 0x38, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x49, 0x44, 0xDA, 0x01, 0x12, 0x12, 0x09, 0x31, 0x31, 0x5B, 0x30,
0x32, 0x33, 0x38, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0xEA,
0x01, 0x27, 0x12, 0x20, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x32, 0x33,
0x38, 0x39, 0x5D, 0x7C, 0x34, 0x30, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x37,
0x31, 0x34, 0x30, 0x30, 0x7C, 0x38, 0x39, 0x38, 0x38, 0x37, 0x32, 0x03, 0x31,
0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x1A, 0x12, 0x0F, 0x28, 0x3F, 0x3A, 0x37, 0x31,
0x34, 0x7C, 0x38, 0x39, 0x38, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x37,
0x31, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x37, 0x31,
0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x37, 0x31, 0x34, 0x30, 0x30, 0x48,
0x05, 0x0A, 0x80, 0x02, 0x0A, 0x16, 0x12, 0x0C, 0x5B, 0x31, 0x35, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05,
0x48, 0x06, 0x22, 0x1D, 0x12, 0x12, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C,
0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03,
0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x06, 0x2A, 0x15, 0x12, 0x0A, 0x35, 0x5B,
0x33, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x05, 0x35, 0x33, 0x30,
0x30, 0x30, 0x48, 0x05, 0x4A, 0x02, 0x49, 0x45, 0xDA, 0x01, 0x10, 0x12, 0x07,
0x31, 0x31, 0x32, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48,
0x03, 0xEA, 0x01, 0x48, 0x12, 0x41, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x29,
0x7C, 0x39, 0x39, 0x39, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x38, 0x7C, 0x39, 0x29, 0x7C, 0x35, 0x5B, 0x30, 0x31, 0x33, 0x37, 0x5D, 0x5C,
0x64, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01,
0x12, 0x12, 0x07, 0x35, 0x31, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x05, 0x35,
0x31, 0x30, 0x30, 0x30, 0x48, 0x05, 0xFA, 0x01, 0x10, 0x12, 0x05, 0x35, 0x31,
0x32, 0x31, 0x30, 0x32, 0x05, 0x35, 0x31, 0x32, 0x31, 0x30, 0x48, 0x05, 0x8A,
0x02, 0x25, 0x12, 0x1A, 0x35, 0x31, 0x32, 0x31, 0x30, 0x7C, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x38, 0x7C, 0x35, 0x5B, 0x30, 0x33, 0x37, 0x5D, 0x5C, 0x64, 0x29,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31, 0x31, 0x38, 0x30, 0x30, 0x48, 0x05,
0x0A, 0xD3, 0x01, 0x0A, 0x13, 0x12, 0x0B, 0x5B, 0x31, 0x32, 0x5D, 0x5C, 0x64,
0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x17,
0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C,
0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48, 0x03, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x49,
0x4C, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30,
0x2D, 0x32, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48,
0x03, 0xEA, 0x01, 0x3F, 0x12, 0x38, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30,
0x2D, 0x32, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x2D,
0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x32, 0x29, 0x7C, 0x5B, 0x32, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x34, 0x30, 0x37, 0x7C, 0x28, 0x3F,
0x3A, 0x31, 0x30, 0x34, 0x7C, 0x32, 0x37, 0x29, 0x30, 0x30, 0x32, 0x03, 0x31,
0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x31, 0x30, 0x34, 0x5C, 0x64,
0x5C, 0x64, 0x32, 0x05, 0x31, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02,
0x12, 0x12, 0x07, 0x31, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x31,
0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xB1, 0x01, 0x0A, 0x1D, 0x12, 0x15,
0x5B, 0x31, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x48,
0x06, 0x22, 0x0C, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x49, 0x4D, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x39, 0x39,
0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x29, 0x12, 0x22,
0x31, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x3F, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x36, 0x34, 0x34, 0x34, 0x7C, 0x39,
0x38, 0x38, 0x37, 0x29, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x30, 0x30,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x8A, 0x02, 0x19, 0x12, 0x0E, 0x38, 0x28, 0x3F, 0x3A, 0x36, 0x34,
0x7C, 0x39, 0x38, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x38, 0x36, 0x34,
0x30, 0x30, 0x48, 0x05, 0x0A, 0x9B, 0x0B, 0x0A, 0x1E, 0x12, 0x0E, 0x5B, 0x31,
0x32, 0x35, 0x37, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x38, 0x7D, 0x48,
0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48, 0x07, 0x48, 0x08, 0x48, 0x09,
0x22, 0xAC, 0x01, 0x12, 0x9C, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30,
0x2D, 0x32, 0x34, 0x38, 0x5D, 0x7C, 0x31, 0x5B, 0x32, 0x38, 0x39, 0x5D, 0x7C,
0x32, 0x31, 0x7C, 0x5B, 0x33, 0x39, 0x5D, 0x5B, 0x38, 0x39, 0x5D, 0x7C, 0x34,
0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x36, 0x5C,
0x64, 0x3F, 0x29, 0x7C, 0x38, 0x5B, 0x31, 0x32, 0x5D, 0x29, 0x7C, 0x37, 0x37,
0x37, 0x7C, 0x38, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x30, 0x35, 0x5D, 0x35, 0x5C,
0x64, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x35, 0x31, 0x7C, 0x39,
0x34, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x35, 0x5D, 0x35, 0x5C, 0x64, 0x7C, 0x37, 0x30, 0x29,
0x5C, 0x64, 0x7C, 0x32, 0x36, 0x31, 0x29, 0x5C, 0x64, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x5B, 0x33, 0x36, 0x39, 0x5D, 0x7C, 0x31, 0x30, 0x7C, 0x32, 0x39,
0x7C, 0x33, 0x5B, 0x31, 0x32, 0x36, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x32,
0x35, 0x36, 0x5D, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48, 0x03,
0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x2A, 0x23, 0x12, 0x14, 0x31, 0x31, 0x5B,
0x36, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x7C, 0x35, 0x36, 0x31, 0x36,
0x31, 0x35, 0x36, 0x31, 0x32, 0x07, 0x31, 0x31, 0x36, 0x30, 0x30, 0x30, 0x30,
0x48, 0x07, 0x48, 0x08, 0x4A, 0x02, 0x49, 0x4E, 0xDA, 0x01, 0x23, 0x12, 0x18,
0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x38, 0x5D, 0x7C, 0x31,
0x32, 0x7C, 0x32, 0x39, 0x38, 0x29, 0x7C, 0x32, 0x36, 0x31, 0x31, 0x32, 0x03,
0x31, 0x30, 0x30, 0x48, 0x03, 0x48, 0x04, 0xEA, 0x01, 0x86, 0x07, 0x12, 0xFE,
0x06, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x32,
0x34, 0x38, 0x5D, 0x7C, 0x33, 0x5B, 0x33, 0x39, 0x5D, 0x7C, 0x35, 0x28, 0x3F,
0x3A, 0x30, 0x31, 0x30, 0x7C, 0x36, 0x29, 0x7C, 0x36, 0x5B, 0x33, 0x34, 0x36,
0x38, 0x5D, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x35, 0x37,
0x5D, 0x7C, 0x5B, 0x32, 0x38, 0x5D, 0x30, 0x3F, 0x7C, 0x34, 0x5B, 0x30, 0x31,
0x5D, 0x29, 0x7C, 0x39, 0x5B, 0x30, 0x31, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x29,
0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x5B, 0x32, 0x38, 0x39, 0x5D,
0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x39, 0x38, 0x29, 0x7C, 0x33,
0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C,
0x36, 0x33, 0x7C, 0x5B, 0x38, 0x39, 0x5D, 0x29, 0x7C, 0x34, 0x5B, 0x30, 0x31,
0x5D, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30,
0x2D, 0x33, 0x36, 0x5D, 0x7C, 0x5B, 0x31, 0x32, 0x37, 0x5D, 0x29, 0x7C, 0x35,
0x34, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x36, 0x5B, 0x30, 0x31,
0x5D, 0x3F, 0x29, 0x7C, 0x37, 0x30, 0x30, 0x30, 0x7C, 0x38, 0x5B, 0x31, 0x32,
0x5D, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x35,
0x39, 0x5D, 0x7C, 0x31, 0x32, 0x7C, 0x32, 0x35, 0x7C, 0x34, 0x5B, 0x34, 0x2D,
0x39, 0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x5B, 0x31, 0x33,
0x34, 0x37, 0x5D, 0x7C, 0x5B, 0x38, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x32, 0x36,
0x31, 0x31, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x28,
0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7C, 0x31, 0x7C, 0x32, 0x30, 0x3F, 0x29, 0x7C,
0x33, 0x32, 0x35, 0x7C, 0x35, 0x5B, 0x32, 0x2D, 0x37, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x33, 0x2C, 0x35, 0x7D, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x33,
0x34, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x37, 0x31, 0x37, 0x7C, 0x38, 0x31, 0x38,
0x7C, 0x39, 0x36, 0x5B, 0x34, 0x39, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A,
0x30, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x5B, 0x31, 0x34,
0x5D, 0x30, 0x29, 0x7C, 0x31, 0x35, 0x31, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x36,
0x36, 0x36, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x36,
0x7C, 0x39, 0x39, 0x5C, 0x64, 0x3F, 0x29, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x30, 0x31, 0x5D, 0x30, 0x7C, 0x31, 0x33, 0x31, 0x7C, 0x35, 0x35,
0x33, 0x7C, 0x28, 0x3F, 0x3A, 0x36, 0x36, 0x7C, 0x37, 0x37, 0x29, 0x36, 0x29,
0x7C, 0x28, 0x3F, 0x3A, 0x34, 0x36, 0x34, 0x7C, 0x35, 0x35, 0x5B, 0x30, 0x35,
0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x33, 0x7D, 0x7C, 0x36, 0x28, 0x3F,
0x3A, 0x30, 0x37, 0x30, 0x7C, 0x33, 0x5B, 0x36, 0x38, 0x5D, 0x7C, 0x34, 0x33,
0x29, 0x7C, 0x37, 0x31, 0x37, 0x5C, 0x64, 0x29, 0x7C, 0x37, 0x37, 0x37, 0x7C,
0x38, 0x30, 0x30, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x35, 0x28, 0x3F, 0x3A,
0x30, 0x7C, 0x31, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x32, 0x31, 0x7C, 0x33, 0x28,
0x3F, 0x3A, 0x30, 0x33, 0x7C, 0x33, 0x5B, 0x32, 0x33, 0x5D, 0x29, 0x29, 0x5C,
0x64, 0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x28, 0x3F,
0x3A, 0x30, 0x34, 0x7C, 0x38, 0x38, 0x29, 0x30, 0x7C, 0x32, 0x28, 0x3F, 0x3A,
0x32, 0x5B, 0x30, 0x32, 0x36, 0x37, 0x5D, 0x7C, 0x33, 0x5B, 0x31, 0x36, 0x5D,
0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x34, 0x5D, 0x7C, 0x32,
0x30, 0x7C, 0x33, 0x5B, 0x30, 0x32, 0x5D, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A,
0x33, 0x5B, 0x31, 0x36, 0x5D, 0x7C, 0x36, 0x37, 0x29, 0x7C, 0x36, 0x28, 0x3F,
0x3A, 0x30, 0x36, 0x7C, 0x5B, 0x36, 0x37, 0x5D, 0x5C, 0x64, 0x29, 0x7C, 0x37,
0x38, 0x37, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x36, 0x34, 0x7C, 0x39, 0x30, 0x29,
0x29, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x35, 0x5B, 0x37, 0x39, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x5B,
0x36, 0x37, 0x5D, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C, 0x38, 0x30, 0x32, 0x29,
0x5C, 0x64, 0x7C, 0x35, 0x35, 0x5B, 0x32, 0x33, 0x5D, 0x29, 0x5C, 0x64, 0x7C,
0x35, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x28, 0x3F, 0x3A, 0x30,
0x5C, 0x64, 0x7C, 0x31, 0x29, 0x7C, 0x28, 0x3F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38, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x39, 0x29, 0x7C, 0x39, 0x39, 0x29, 0x7C,
0x39, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x7C, 0x32, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x7C, 0x35, 0x35, 0x7C, 0x36, 0x5B, 0x36, 0x37, 0x5D,
0x7C, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x29, 0x29, 0x29, 0x5C, 0x64, 0x32, 0x03,
0x31, 0x30, 0x30, 0xF2, 0x01, 0x2C, 0x12, 0x1F, 0x35, 0x28, 0x3F, 0x3A, 0x31,
0x34, 0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x35, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x33,
0x34, 0x5D, 0x5C, 0x64, 0x29, 0x7C, 0x37, 0x35, 0x37, 0x35, 0x35, 0x35, 0x29,
0x32, 0x05, 0x35, 0x31, 0x34, 0x32, 0x35, 0x48, 0x05, 0x48, 0x07, 0xFA, 0x01,
0x6B, 0x12, 0x58, 0x31, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x36,
0x37, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x37, 0x30, 0x29, 0x5C, 0x64, 0x5C,
0x64, 0x7C, 0x35, 0x35, 0x33, 0x33, 0x30, 0x7C, 0x39, 0x30, 0x39, 0x29, 0x7C,
0x35, 0x28, 0x3F, 0x3A, 0x33, 0x30, 0x30, 0x5C, 0x64, 0x7C, 0x36, 0x31, 0x36,
0x31, 0x28, 0x3F, 0x3A, 0x31, 0x37, 0x5B, 0x38, 0x39, 0x5D, 0x7C, 0x35, 0x36,
0x31, 0x29, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x39, 0x5D, 0x5B,
0x38, 0x39, 0x5D, 0x7C, 0x32, 0x31, 0x7C, 0x34, 0x5B, 0x30, 0x31, 0x5D, 0x29,
0x32, 0x03, 0x31, 0x31, 0x38, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06,
0x48, 0x07, 0x48, 0x08, 0x8A, 0x02, 0x53, 0x12, 0x42, 0x31, 0x28, 0x3F, 0x3A,
0x33, 0x39, 0x7C, 0x39, 0x30, 0x5B, 0x30, 0x31, 0x39, 0x5D, 0x29, 0x7C, 0x35,
0x28, 0x3F, 0x3A, 0x31, 0x34, 0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x35, 0x2D, 0x39,
0x5D, 0x7C, 0x5B, 0x33, 0x34, 0x5D, 0x5C, 0x64, 0x29, 0x7C, 0x36, 0x31, 0x36,
0x31, 0x28, 0x3F, 0x3A, 0x31, 0x37, 0x5B, 0x38, 0x39, 0x5D, 0x7C, 0x35, 0x36,
0x31, 0x29, 0x7C, 0x37, 0x35, 0x37, 0x35, 0x35, 0x35, 0x29, 0x32, 0x03, 0x31,
0x33, 0x39, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x07, 0x48, 0x08, 0x0A,
0xDB, 0x01, 0x0A, 0x15, 0x12, 0x0D, 0x5B, 0x31, 0x34, 0x37, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22,
0x19, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x34, 0x5D, 0x7C,
0x31, 0x35, 0x7C, 0x32, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48, 0x03,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x49, 0x51, 0xDA, 0x01, 0x19, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x30, 0x34, 0x5D, 0x7C, 0x31, 0x35, 0x7C, 0x32, 0x32, 0x29, 0x32,
0x03, 0x31, 0x30, 0x30, 0x48, 0x03, 0xEA, 0x01, 0x27, 0x12, 0x20, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x34, 0x5D, 0x7C, 0x31, 0x35, 0x7C, 0x32, 0x32,
0x29, 0x7C, 0x34, 0x34, 0x33, 0x32, 0x7C, 0x37, 0x31, 0x31, 0x31, 0x37, 0x7C,
0x39, 0x39, 0x38, 0x38, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x1F,
0x12, 0x13, 0x28, 0x3F, 0x3A, 0x34, 0x34, 0x33, 0x7C, 0x37, 0x31, 0x31, 0x5C,
0x64, 0x7C, 0x39, 0x39, 0x38, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x34, 0x33,
0x30, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02, 0x1F, 0x12, 0x13, 0x28, 0x3F, 0x3A,
0x34, 0x34, 0x33, 0x7C, 0x37, 0x31, 0x31, 0x5C, 0x64, 0x7C, 0x39, 0x39, 0x38,
0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x34, 0x33, 0x30, 0x48, 0x04, 0x48, 0x05,
0x0A, 0xCC, 0x03, 0x0A, 0x16, 0x12, 0x0C, 0x5B, 0x31, 0x32, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48,
0x06, 0x22, 0x2A, 0x12, 0x21, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x2D,
0x36, 0x38, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x35, 0x39, 0x5D, 0x7C, 0x39,
0x5B, 0x30, 0x2D, 0x35, 0x37, 0x39, 0x5D, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x31, 0x31, 0x30, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x49, 0x52, 0xDA, 0x01, 0x1B,
0x12, 0x12, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x32, 0x35, 0x5D, 0x7C,
0x32, 0x35, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48,
0x03, 0xEA, 0x01, 0xE0, 0x01, 0x12, 0xD8, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x5B, 0x30, 0x2D, 0x36, 0x38, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x35, 0x39,
0x5D, 0x7C, 0x33, 0x5B, 0x33, 0x34, 0x36, 0x2D, 0x38, 0x5D, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x34, 0x37, 0x5D, 0x7C, 0x5B, 0x32, 0x38, 0x39,
0x5D, 0x30, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x34, 0x5D,
0x7C, 0x31, 0x5B, 0x30, 0x32, 0x34, 0x37, 0x39, 0x5D, 0x7C, 0x32, 0x5B, 0x30,
0x2D, 0x33, 0x5D, 0x7C, 0x33, 0x39, 0x7C, 0x5B, 0x34, 0x39, 0x5D, 0x30, 0x7C,
0x36, 0x35, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x36, 0x5D, 0x36,
0x7C, 0x5B, 0x32, 0x37, 0x5D, 0x7C, 0x39, 0x30, 0x29, 0x7C, 0x38, 0x28, 0x3F,
0x3A, 0x30, 0x33, 0x7C, 0x31, 0x5B, 0x31, 0x38, 0x5D, 0x7C, 0x32, 0x32, 0x7C,
0x33, 0x5B, 0x33, 0x37, 0x5D, 0x7C, 0x34, 0x5B, 0x32, 0x38, 0x5D, 0x7C, 0x38,
0x38, 0x7C, 0x39, 0x39, 0x29, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x35, 0x37, 0x39,
0x5D, 0x29, 0x7C, 0x32, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x39, 0x5D, 0x30,
0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x33, 0x38, 0x5D, 0x7C, 0x31, 0x5B,
0x30, 0x37, 0x39, 0x5D, 0x7C, 0x32, 0x36, 0x7C, 0x39, 0x5B, 0x36, 0x39, 0x5D,
0x29, 0x7C, 0x32, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x39, 0x7C, 0x39,
0x30, 0x29, 0x29, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01, 0x22, 0x12, 0x18,
0x31, 0x28, 0x3F, 0x3A, 0x35, 0x5B, 0x30, 0x2D, 0x34, 0x36, 0x39, 0x5D, 0x7C,
0x38, 0x5B, 0x30, 0x2D, 0x34, 0x38, 0x39, 0x5D, 0x29, 0x5C, 0x64, 0x32, 0x04,
0x31, 0x35, 0x30, 0x30, 0x48, 0x04, 0xFA, 0x01, 0x36, 0x12, 0x2A, 0x28, 0x3F,
0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x35, 0x5B, 0x30, 0x2D, 0x34, 0x36, 0x39, 0x5D,
0x7C, 0x38, 0x5B, 0x30, 0x2D, 0x34, 0x38, 0x39, 0x5D, 0x29, 0x7C, 0x39, 0x39,
0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x39, 0x29, 0x29, 0x5C,
0x64, 0x32, 0x04, 0x31, 0x35, 0x30, 0x30, 0x48, 0x04, 0x48, 0x06, 0x8A, 0x02,
0x14, 0x12, 0x08, 0x39, 0x39, 0x30, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x06,
0x39, 0x39, 0x30, 0x30, 0x30, 0x30, 0x48, 0x06, 0x0A, 0x85, 0x02, 0x0A, 0x1E,
0x12, 0x16, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28,
0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x03,
0x48, 0x04, 0x48, 0x06, 0x22, 0x17, 0x12, 0x0C, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x32, 0x7C, 0x37, 0x31, 0x5C, 0x64, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48,
0x03, 0x48, 0x04, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x49, 0x53, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31,
0x31, 0x32, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x68, 0x12,
0x61, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x38, 0x5D,
0x7C, 0x36, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x36, 0x7C, 0x32, 0x33, 0x29, 0x29,
0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x31, 0x34, 0x35,
0x5D, 0x7C, 0x34, 0x5B, 0x30, 0x31, 0x34, 0x36, 0x5D, 0x29, 0x7C, 0x35, 0x35,
0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x37, 0x7C, 0x37, 0x5B,
0x30, 0x37, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30,
0x32, 0x5D, 0x30, 0x7C, 0x31, 0x5B, 0x31, 0x36, 0x2D, 0x39, 0x5D, 0x7C, 0x38,
0x38, 0x29, 0x7C, 0x39, 0x30, 0x30, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x16, 0x12, 0x0C, 0x31, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64,
0x7C, 0x34, 0x31, 0x29, 0x32, 0x04, 0x31, 0x34, 0x30, 0x30, 0x48, 0x04, 0x8A,
0x02, 0x17, 0x12, 0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x34, 0x31, 0x35, 0x7C, 0x39,
0x30, 0x5C, 0x64, 0x29, 0x32, 0x04, 0x31, 0x34, 0x31, 0x35, 0x48, 0x04, 0x0A,
0xE1, 0x03, 0x0A, 0x17, 0x12, 0x0B, 0x5B, 0x31, 0x34, 0x5D, 0x5C, 0x64, 0x7B,
0x32, 0x2C, 0x36, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48,
0x07, 0x22, 0x25, 0x12, 0x1A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A,
0x5B, 0x32, 0x33, 0x35, 0x38, 0x5D, 0x7C, 0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x7C, 0x38, 0x37, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48,
0x06, 0x2A, 0x39, 0x12, 0x2B, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x5B, 0x34, 0x37, 0x38, 0x5D, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D,
0x34, 0x5D, 0x7C, 0x5B, 0x35, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x29,
0x7C, 0x35, 0x35, 0x29, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x32,
0x30, 0x30, 0x48, 0x04, 0x48, 0x05, 0x48, 0x07, 0x4A, 0x02, 0x49, 0x54, 0xDA,
0x01, 0x11, 0x12, 0x08, 0x31, 0x31, 0x5B, 0x32, 0x33, 0x35, 0x38, 0x5D, 0x32,
0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0xE4, 0x01, 0x12, 0xDC, 0x01,
0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x29,
0x7C, 0x33, 0x5B, 0x33, 0x39, 0x5D, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x38, 0x32,
0x7C, 0x39, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x33, 0x7D, 0x29, 0x7C, 0x35, 0x28,
0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x35, 0x38, 0x5D, 0x7C, 0x32, 0x5B,
0x32, 0x35, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x33, 0x5D, 0x7C, 0x34, 0x34, 0x7C,
0x5B, 0x35, 0x39, 0x5D, 0x29, 0x7C, 0x36, 0x30, 0x7C, 0x38, 0x5B, 0x36, 0x37,
0x5D, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x32, 0x5B,
0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x34, 0x5C, 0x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D, 0x29,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x33, 0x30, 0x30, 0x30, 0x48, 0x05,
0x48, 0x07, 0x0A, 0xE8, 0x01, 0x0A, 0x22, 0x12, 0x1A, 0x5B, 0x31, 0x32, 0x39,
0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28, 0x3F, 0x3A,
0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x04,
0x48, 0x06, 0x22, 0x10, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x39, 0x39,
0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4A, 0x45, 0xDA, 0x01,
0x10, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31,
0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x61, 0x12, 0x5A, 0x31, 0x28, 0x3F, 0x3A,
0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x38, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x7C, 0x32, 0x33, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x5B, 0x31,
0x34, 0x5D, 0x7C, 0x32, 0x38, 0x7C, 0x37, 0x5C, 0x64, 0x29, 0x7C, 0x35, 0x5C,
0x64, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x5B,
0x31, 0x32, 0x38, 0x5D, 0x7C, 0x33, 0x35, 0x3F, 0x29, 0x7C, 0x38, 0x30, 0x38,
0x7C, 0x39, 0x5B, 0x30, 0x31, 0x33, 0x35, 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 0x03,
0x31, 0x37, 0x36, 0x8A, 0x02, 0x0A, 0x12, 0x03, 0x31, 0x37, 0x36, 0x32, 0x03,
0x31, 0x37, 0x36, 0x0A, 0xE6, 0x01, 0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x39,
0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D,
0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x1E, 0x12, 0x15, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x5B, 0x32, 0x34, 0x5D, 0x7C, 0x39, 0x5B, 0x31, 0x32, 0x37, 0x5D,
0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x4A, 0x4F, 0xDA, 0x01, 0x1B, 0x12, 0x12, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x32, 0x7C, 0x39, 0x5B, 0x31, 0x32, 0x37, 0x5D, 0x29, 0x7C, 0x39, 0x31, 0x31,
0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x34, 0x12, 0x2D, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x39, 0x7C, 0x31, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x38,
0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x2D, 0x37, 0x39, 0x5D, 0x29,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x39, 0x30, 0x33, 0x7C, 0x31, 0x31, 0x7C,
0x38, 0x37, 0x38, 0x38, 0x29, 0x32, 0x03, 0x31, 0x30, 0x39, 0xF2, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01,
0x19, 0x12, 0x0E, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x39, 0x7C, 0x38, 0x37, 0x29,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x39, 0x30, 0x39, 0x30, 0x30, 0x48, 0x05,
0x8A, 0x02, 0x19, 0x12, 0x0E, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x39, 0x7C, 0x38,
0x37, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x39, 0x30, 0x39, 0x30, 0x30,
0x48, 0x05, 0x0A, 0x75, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64,
0x48, 0x03, 0x22, 0x0D, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x30, 0x39, 0x5D, 0x32,
0x03, 0x31, 0x31, 0x30, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4A, 0x50, 0xDA, 0x01, 0x0D, 0x12, 0x06,
0x31, 0x31, 0x5B, 0x30, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0xEA, 0x01,
0x0D, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x30, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xE7, 0x04, 0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31,
0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48,
0x04, 0x48, 0x05, 0x22, 0x35, 0x12, 0x2E, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28,
0x3F, 0x3A, 0x5B, 0x32, 0x34, 0x36, 0x5D, 0x7C, 0x39, 0x5C, 0x64, 0x29, 0x7C,
0x35, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x32, 0x5B, 0x31, 0x32, 0x37, 0x5D,
0x7C, 0x36, 0x5B, 0x32, 0x36, 0x5D, 0x5C, 0x64, 0x29, 0x29, 0x7C, 0x39, 0x39,
0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x12, 0x12, 0x07, 0x39, 0x30, 0x39,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x39, 0x30, 0x39, 0x30, 0x30, 0x48, 0x05,
0x4A, 0x02, 0x4B, 0x45, 0xDA, 0x01, 0x13, 0x12, 0x0A, 0x31, 0x31, 0x5B, 0x32,
0x34, 0x5D, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03,
0xEA, 0x01, 0x85, 0x02, 0x12, 0xFD, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x31, 0x5B, 0x30, 0x2D,
0x32, 0x35, 0x5D, 0x7C, 0x34, 0x30, 0x30, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A,
0x5B, 0x30, 0x32, 0x34, 0x2D, 0x36, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x35,
0x37, 0x39, 0x5D, 0x29, 0x7C, 0x32, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x33,
0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x34, 0x5B, 0x31, 0x34, 0x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35, 0x28, 0x3F, 0x3A, 0x30, 0x31,
0x7C, 0x35, 0x35, 0x7C, 0x36, 0x5B, 0x32, 0x36, 0x5D, 0x5C, 0x64, 0x29, 0x29,
0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x38, 0x39, 0x38, 0x38, 0x7C, 0x39,
0x30, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x34, 0x31, 0x0A, 0x91,
0x01, 0x0A, 0x11, 0x12, 0x0B, 0x5B, 0x31, 0x34, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x10, 0x12, 0x07, 0x31, 0x30,
0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x4B, 0x47, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x30, 0x5B, 0x31, 0x2D,
0x33, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x13, 0x12,
0x0C, 0x31, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x34, 0x30, 0x34, 0x30,
0x32, 0x03, 0x31, 0x30, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12, 0x05, 0x34, 0x30,
0x34, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34, 0x30, 0x48, 0x04, 0x8A, 0x02,
0x0F, 0x12, 0x05, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34,
0x30, 0x48, 0x04, 0x0A, 0xAC, 0x01, 0x0A, 0x19, 0x12, 0x13, 0x5B, 0x31, 0x34,
0x36, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32,
0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x14, 0x12, 0x0B, 0x31, 0x31,
0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x36, 0x36, 0x36, 0x32, 0x03, 0x31, 0x31,
0x37, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4B, 0x48, 0xDA, 0x01, 0x14, 0x12, 0x0B, 0x31,
0x31, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x36, 0x36, 0x36, 0x32, 0x03, 0x31,
0x31, 0x37, 0x48, 0x03, 0xEA, 0x01, 0x18, 0x12, 0x11, 0x31, 0x31, 0x5B, 0x37,
0x2D, 0x39, 0x5D, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x36, 0x36, 0x36,
0x32, 0x03, 0x31, 0x31, 0x37, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30,
0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48,
0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xBB, 0x01, 0x0A,
0x12, 0x12, 0x0C, 0x5B, 0x31, 0x37, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C,
0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x18, 0x12, 0x0F, 0x31, 0x39, 0x5B,
0x32, 0x2D, 0x35, 0x5D, 0x7C, 0x39, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x32,
0x03, 0x31, 0x39, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4B, 0x49, 0xDA, 0x01, 0x18,
0x12, 0x0F, 0x31, 0x39, 0x5B, 0x32, 0x2D, 0x35, 0x5D, 0x7C, 0x39, 0x39, 0x5B,
0x32, 0x2D, 0x34, 0x5D, 0x32, 0x03, 0x31, 0x39, 0x32, 0x48, 0x03, 0xEA, 0x01,
0x33, 0x12, 0x2C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x35, 0x5B, 0x30, 0x2D, 0x32,
0x35, 0x39, 0x5D, 0x7C, 0x38, 0x38, 0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x35, 0x5D,
0x29, 0x7C, 0x37, 0x37, 0x37, 0x7C, 0x39, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D,
0x7C, 0x31, 0x30, 0x5B, 0x30, 0x2D, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x30, 0x30,
0xF2, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x30, 0x33, 0x32, 0x03, 0x31, 0x30, 0x33,
0x48, 0x03, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x6D, 0x0A, 0x07, 0x12, 0x03, 0x31, 0x5C, 0x64,
0x48, 0x02, 0x22, 0x0B, 0x12, 0x05, 0x31, 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F, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xA7, 0x02, 0x0A, 0x10, 0x12,
0x08, 0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04,
0x48, 0x05, 0x22, 0x21, 0x12, 0x16, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x32,
0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x38, 0x7C, 0x33, 0x33, 0x30, 0x7C, 0x38,
0x32, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x04, 0x2A, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02,
0x4B, 0x52, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x32, 0x39, 0x5D,
0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x79, 0x12, 0x72, 0x31,
0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x36, 0x2D, 0x39, 0x5D, 0x31, 0x31, 0x34,
0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x32, 0x7C,
0x33, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x7C, 0x34, 0x35, 0x3F,
0x7C, 0x35, 0x5B, 0x30, 0x35, 0x37, 0x5D, 0x7C, 0x36, 0x5B, 0x35, 0x36, 0x39,
0x5D, 0x7C, 0x37, 0x5B, 0x37, 0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x32, 0x35, 0x38,
0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x31, 0x38, 0x39, 0x5D, 0x29, 0x29, 0x7C,
0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x31, 0x5C,
0x64, 0x7C, 0x32, 0x5B, 0x30, 0x31, 0x33, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x7C,
0x34, 0x31, 0x7C, 0x38, 0x5B, 0x32, 0x38, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x30,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x34, 0x12, 0x29, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x30, 0x31, 0x5D, 0x7C, 0x31, 0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x7C, 0x34, 0x31,
0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x36, 0x2D, 0x39, 0x5D, 0x31,
0x5C, 0x64, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x30,
0x30, 0x48, 0x03, 0x48, 0x05, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x91, 0x01, 0x0A, 0x18, 0x12, 0x12,
0x5B, 0x31, 0x38, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x0C, 0x12, 0x03,
0x31, 0x31, 0x32, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4B,
0x57, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x31, 0x32, 0x32, 0x03, 0x31, 0x31,
0x32, 0x48, 0x03, 0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 0x14, 0x12, 0x0C, 0x5B, 0x31,
0x33, 0x34, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48,
0x04, 0x48, 0x05, 0x22, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x31,
0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x4B, 0x5A, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32,
0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x23, 0x12, 0x1C, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x7C,
0x28, 0x3F, 0x3A, 0x33, 0x30, 0x34, 0x30, 0x7C, 0x34, 0x30, 0x34, 0x29, 0x30,
0x32, 0x03, 0x31, 0x30, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x1B, 0x12, 0x0F, 0x28, 0x3F,
0x3A, 0x33, 0x30, 0x34, 0x5C, 0x64, 0x7C, 0x34, 0x30, 0x34, 0x29, 0x5C, 0x64,
0x32, 0x04, 0x34, 0x30, 0x34, 0x30, 0x48, 0x04, 0x48, 0x05, 0x8A, 0x02, 0x1B,
0x12, 0x0F, 0x28, 0x3F, 0x3A, 0x33, 0x30, 0x34, 0x5C, 0x64, 0x7C, 0x34, 0x30,
0x34, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34, 0x30, 0x48, 0x04, 0x48,
0x05, 0x0A, 0x78, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x48,
0x03, 0x22, 0x0E, 0x12, 0x07, 0x31, 0x39, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x32,
0x03, 0x31, 0x39, 0x30, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4C, 0x41, 0xDA, 0x01, 0x0E, 0x12, 0x07,
0x31, 0x39, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x32, 0x03, 0x31, 0x39, 0x30, 0xEA,
0x01, 0x0E, 0x12, 0x07, 0x31, 0x39, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x32, 0x03,
0x31, 0x39, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x99, 0x01, 0x0A, 0x0C, 0x12, 0x08,
0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x18, 0x12,
0x11, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x34, 0x30, 0x7C, 0x37, 0x35,
0x29, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4C,
0x42, 0xDA, 0x01, 0x18, 0x12, 0x11, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C,
0x34, 0x30, 0x7C, 0x37, 0x35, 0x29, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31,
0x31, 0x32, 0xEA, 0x01, 0x18, 0x12, 0x11, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32,
0x7C, 0x34, 0x30, 0x7C, 0x37, 0x35, 0x29, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03,
0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x81, 0x01, 0x0A, 0x09, 0x12, 0x05,
0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x11, 0x12, 0x0A, 0x39, 0x28,
0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x4C, 0x43, 0xDA, 0x01, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01,
0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29,
0x32, 0x03, 0x39,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,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x35, 0x38, 0x39, 0x5D, 0x7C,
0x31, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x5B,
0x30, 0x2D, 0x32, 0x35, 0x36, 0x38, 0x39, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x33,
0x38, 0x39, 0x5D, 0x7C, 0x34, 0x5B, 0x30, 0x34, 0x38, 0x39, 0x5D, 0x7C, 0x35,
0x5B, 0x30, 0x31, 0x34, 0x2D, 0x36, 0x39, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D,
0x32, 0x36, 0x38, 0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x33, 0x35, 0x37, 0x39,
0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x32, 0x34, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x7C,
0x39, 0x5B, 0x30, 0x2D, 0x32, 0x35, 0x36, 0x39, 0x5D, 0x29, 0x29, 0x32, 0x03,
0x31, 0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xBE, 0x01, 0x0A, 0x13, 0x12, 0x0D,
0x5B, 0x33, 0x34, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D,
0x48, 0x03, 0x48, 0x04, 0x22, 0x10, 0x12, 0x07, 0x33, 0x35, 0x35, 0x7C, 0x39,
0x31, 0x31, 0x32, 0x03, 0x33, 0x35, 0x35, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4C, 0x52,
0xDA, 0x01, 0x10, 0x12, 0x07, 0x33, 0x35, 0x35, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x33, 0x35, 0x35, 0x48, 0x03, 0xEA, 0x01, 0x20, 0x12, 0x19, 0x33, 0x35,
0x35, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x34, 0x30,
0x30, 0x7C, 0x39, 0x33, 0x33, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x33,
0x35, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x1E, 0x12, 0x14, 0x28, 0x3F, 0x3A, 0x34, 0x30,
0x34, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x34, 0x30, 0x7C, 0x39, 0x33, 0x29, 0x29,
0x5C, 0x64, 0x32, 0x04, 0x34, 0x30, 0x34, 0x30, 0x48, 0x04, 0x8A, 0x02, 0x1E,
0x12, 0x14, 0x28, 0x3F, 0x3A, 0x34, 0x30, 0x34, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x34, 0x30, 0x7C, 0x39, 0x33, 0x29, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x34, 0x30,
0x34, 0x30, 0x48, 0x04, 0x0A, 0x78, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64,
0x5C, 0x64, 0x48, 0x03, 0x22, 0x0E, 0x12, 0x07, 0x31, 0x31, 0x5B, 0x32, 0x35,
0x37, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xF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2C, 0x35, 0x7D, 0x48, 0x02, 0x48, 0x03, 0x48, 0x04, 0x48,
0x05, 0x48, 0x06, 0x22, 0x25, 0x12, 0x19, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D,
0x7C, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x33, 0x5D, 0x7C, 0x36,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x32, 0x02, 0x30, 0x31, 0x48, 0x02, 0x48,
0x03, 0x48, 0x06, 0x2A, 0x18, 0x12, 0x0C, 0x31, 0x31, 0x38, 0x30, 0x7C, 0x38,
0x32, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x31, 0x38, 0x30, 0x48,
0x04, 0x48, 0x05, 0x4A, 0x02, 0x4C, 0x56, 0xDA, 0x01, 0x18, 0x12, 0x0E, 0x30,
0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x31, 0x5B, 0x30, 0x32, 0x33, 0x5D,
0x32, 0x02, 0x30, 0x31, 0x48, 0x02, 0x48, 0x03, 0xEA, 0x01, 0x48, 0x12, 0x42,
0x30, 0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28,
0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x2D, 0x34, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A,
0x30, 0x30, 0x30, 0x7C, 0x31, 0x31, 0x31, 0x29, 0x7C, 0x38, 0x5B, 0x30, 0x31,
0x38, 0x39, 0x5D, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x35, 0x7C, 0x36, 0x35, 0x29,
0x35, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x38, 0x32, 0x31, 0x5B, 0x35, 0x37, 0x5D,
0x34, 0x32, 0x02, 0x30, 0x31, 0xF2, 0x01, 0x0E, 0x12, 0x04, 0x31, 0x31, 0x38,
0x31, 0x32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x02, 0x31,
0x35, 0xEA, 0x01, 0x16, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C,
0x34, 0x31, 0x7C, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x29, 0x32, 0x02, 0x31, 0x35,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x0A, 0x81, 0x02, 0x0A, 0x15, 0x12, 0x0B, 0x5B, 0x31, 0x39,
0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48,
0x05, 0x48, 0x06, 0x22, 0x2F, 0x12, 0x24, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32,
0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x32, 0x5C, 0x64, 0x29, 0x29, 0x29, 0x7C, 0x39, 0x30, 0x5B,
0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x06,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x4D, 0x44, 0xDA, 0x01, 0x14, 0x12, 0x0B, 0x31, 0x31, 0x32, 0x7C,
0x39, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48,
0x03, 0xEA, 0x01, 0x64, 0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B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x0A, 0xC6, 0x03, 0x0A, 0x18, 0x12, 0x0E, 0x5B, 0x31, 0x33, 0x36, 0x2D,
0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x34, 0x7D, 0x48, 0x02, 0x48, 0x03,
0x48, 0x04, 0x48, 0x05, 0x22, 0x37, 0x12, 0x2B, 0x31, 0x5B, 0x35, 0x37, 0x38,
0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x35, 0x32, 0x7C, 0x36, 0x37, 0x29, 0x30,
0x30, 0x7C, 0x37, 0x34, 0x30, 0x32, 0x7C, 0x28, 0x3F, 0x3A, 0x36, 0x37, 0x37,
0x7C, 0x37, 0x34, 0x34, 0x7C, 0x38, 0x30, 0x30, 0x30, 0x29, 0x5C, 0x64, 0x32,
0x02, 0x31, 0x35, 0x48, 0x02, 0x48, 0x04, 0x48, 0x05, 0x2A, 0x3D, 0x12, 0x31,
0x28, 0x3F, 0x3A, 0x31, 0x32, 0x7C, 0x38, 0x30, 0x30, 0x29, 0x32, 0x5C, 0x64,
0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x35, 0x32, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C,
0x32, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x34, 0x2D, 0x36, 0x5D,
0x7C, 0x39, 0x39, 0x29, 0x7C, 0x37, 0x35, 0x37, 0x34, 0x29, 0x32, 0x04, 0x31,
0x32, 0x32, 0x30, 0x48, 0x04, 0x48, 0x05, 0x4A, 0x02, 0x4D, 0x4C, 0xDA, 0x01,
0x0E, 0x12, 0x06, 0x31, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x32, 0x02, 0x31, 0x35,
0x48, 0x02, 0xEA, 0x01, 0x91, 0x01, 0x12, 0x8A, 0x01, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7C, 0x32, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x32, 0x2D,
0x34, 0x36, 0x39, 0x5D, 0x7C, 0x32, 0x5B, 0x31, 0x33, 0x5D, 0x29, 0x7C, 0x5B,
0x35, 0x37, 0x38, 0x5D, 0x29, 0x7C, 0x33, 0x35, 0x30, 0x28, 0x3F, 0x3A, 0x33,
0x35, 0x7C, 0x35, 0x37, 0x29, 0x7C, 0x36, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x30, 0x39, 0x5D, 0x7C, 0x5B, 0x35, 0x39, 0x5D, 0x39, 0x7C, 0x37, 0x37, 0x7C,
0x38, 0x5B, 0x38, 0x39, 0x5D, 0x29, 0x7C, 0x37, 0x34, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x34, 0x34, 0x7C, 0x35, 0x35, 0x29, 0x7C, 0x38,
0x30, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x33,
0x28, 0x3F, 0x3A, 0x35, 0x32, 0x7C, 0x5B, 0x36, 0x37, 0x5D, 0x5C, 0x64, 0x29,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x02, 0x31, 0x35, 0xF2, 0x01, 0x25, 0x12, 0x19,
0x33, 0x37, 0x28, 0x3F, 0x3A, 0x34, 0x33, 0x33, 0x7C, 0x35, 0x37, 0x35, 0x29,
0x7C, 0x37, 0x34, 0x30, 0x30, 0x7C, 0x38, 0x30, 0x30, 0x31, 0x5C, 0x64, 0x32,
0x04, 0x37, 0x34, 0x30, 0x30, 0x48, 0x04, 0x48, 0x05, 0xFA, 0x01, 0x25, 0x12,
0x1A, 0x33, 0x35, 0x30, 0x33, 0x5C, 0x64, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x5B,
0x36, 0x37, 0x5D, 0x5C, 0x64, 0x7C, 0x38, 0x30, 0x30, 0x29, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x33, 0x35, 0x30, 0x33, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x37,
0x12, 0x2B, 0x33, 0x37, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x32, 0x34, 0x2D,
0x39, 0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x29, 0x7C, 0x37,
0x34, 0x30, 0x30, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x36, 0x5C, 0x64, 0x7C, 0x37,
0x35, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x04, 0x37, 0x34, 0x30, 0x30, 0x48,
0x04, 0x48, 0x05, 0x0A, 0x6C, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C,
0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03, 0x31, 0x39, 0x39, 0x32, 0x03, 0x31,
0x39, 0x39, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x4D, 0x4D, 0xDA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x39,
0x39, 0x32, 0x03, 0x31, 0x39, 0x39, 0xEA, 0x01, 0x0A, 0x12, 0x03, 0x31, 0x39,
0x39, 0x32, 0x03, 0x31, 0x39, 0x39, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0x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x12, 0x0D, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x32, 0x7C, 0x31, 0x5B, 0x38, 0x39, 0x5D, 0x29, 0x32, 0x03,
0x31, 0x30, 0x32, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4D, 0x56, 0xDA, 0x01, 0x16, 0x12,
0x0D, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x32, 0x7C, 0x31, 0x5B, 0x38, 0x39, 0x5D,
0x29, 0x32, 0x03, 0x31, 0x30, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x2A, 0x12, 0x23,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x33, 0x37, 0x2D, 0x39, 0x5D, 0x7C,
0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x7C, 0x34, 0x30,
0x34, 0x30, 0x7C, 0x31, 0x5B, 0x34, 0x35, 0x5D, 0x31, 0x32, 0x03, 0x31, 0x30,
0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x5B, 0x34, 0x35, 0x5D, 0x31,
0x32, 0x03, 0x31, 0x34, 0x31, 0x48, 0x03, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xAC, 0x01, 0x0A, 0x19,
0x12, 0x13, 0x5B, 0x31, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F,
0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22,
0x14, 0x12, 0x0B, 0x31, 0x39, 0x39, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D, 0x39,
0x5D, 0x32, 0x03, 0x31, 0x39, 0x39, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4D, 0x57, 0xDA,
0x01, 0x14, 0x12, 0x0B, 0x31, 0x39, 0x39, 0x7C, 0x39, 0x39, 0x5B, 0x37, 0x2D,
0x39, 0x5D, 0x32, 0x03, 0x31, 0x39, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x18, 0x12,
0x11, 0x31, 0x39, 0x39, 0x7C, 0x38, 0x30, 0x34, 0x30, 0x30, 0x7C, 0x39, 0x39,
0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x39, 0x39, 0xF2, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01,
0x12, 0x12, 0x07, 0x38, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x38,
0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x38, 0x30,
0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x38, 0x30, 0x34, 0x30, 0x30, 0x48,
0x05, 0x0A, 0xD2, 0x01, 0x0A, 0x15, 0x12, 0x0D, 0x5B, 0x30, 0x35, 0x37, 0x39,
0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48,
0x05, 0x22, 0x1C, 0x12, 0x13, 0x30, 0x28, 0x3F, 0x3A, 0x36, 0x5B, 0x30, 0x35,
0x36, 0x38, 0x5D, 0x7C, 0x38, 0x30, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03,
0x30, 0x36, 0x30, 0x48, 0x03, 0x2A, 0x1B, 0x12, 0x0F, 0x28, 0x3F, 0x3A, 0x35,
0x33, 0x30, 0x5C, 0x64, 0x7C, 0x37, 0x37, 0x36, 0x29, 0x5C, 0x64, 0x32, 0x04,
0x37, 0x37, 0x36, 0x30, 0x48, 0x04, 0x48, 0x05, 0x4A, 0x02, 0x4D, 0x58, 0xDA,
0x01, 0x1C, 0x12, 0x13, 0x30, 0x28, 0x3F, 0x3A, 0x36, 0x5B, 0x30, 0x35, 0x36,
0x38, 0x5D, 0x7C, 0x38, 0x30, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x30,
0x36, 0x30, 0x48, 0x03, 0xEA, 0x01, 0x1E, 0x12, 0x17, 0x30, 0x5B, 0x31, 0x2D,
0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x35, 0x33, 0x30, 0x35, 0x33, 0x7C, 0x37, 0x37,
0x36, 0x36, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x30, 0x31, 0x30, 0xF2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x1D, 0x12, 0x14, 0x30, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x34, 0x39, 0x5D,
0x30, 0x7C, 0x5B, 0x33, 0x35, 0x5D, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x32, 0x03,
0x30, 0x32, 0x30, 0x48, 0x03, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x91, 0x03, 0x0A, 0x15, 0x12, 0x0D,
0x5B, 0x31, 0x33, 0x36, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D,
0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x10, 0x12, 0x07, 0x31, 0x31, 0x32,
0x7C, 0x39, 0x39, 0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02,
0x4D, 0x59, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x39,
0x39, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0xF9, 0x01, 0x12,
0xF1, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x33, 0x34, 0x38,
0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x31, 0x5B,
0x31, 0x32, 0x38, 0x5D, 0x7C, 0x33, 0x31, 0x31, 0x29, 0x7C, 0x32, 0x28, 0x3F,
0x3A, 0x30, 0x5B, 0x31, 0x32, 0x35, 0x5D, 0x7C, 0x5B, 0x31, 0x33, 0x2D, 0x36,
0x5D, 0x7C, 0x32, 0x5C, 0x64, 0x7B, 0x30, 0x2C, 0x32, 0x7D, 0x29, 0x7C, 0x28,
0x3F, 0x3A, 0x33, 0x5B, 0x31, 0x2D, 0x33, 0x35, 0x2D, 0x37, 0x39, 0x5D, 0x7C,
0x37, 0x5B, 0x34, 0x35, 0x5D, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x7C, 0x35,
0x28, 0x3F, 0x3A, 0x34, 0x35, 0x34, 0x7C, 0x35, 0x5C, 0x64, 0x5C, 0x64, 0x3F,
0x7C, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x39, 0x39, 0x3F, 0x29,
0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x31, 0x38, 0x3F, 0x7C, 0x32, 0x7C, 0x38, 0x5B,
0x31, 0x38, 0x5D, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x34,
0x5D, 0x5C, 0x64, 0x3F, 0x7C, 0x36, 0x38, 0x7C, 0x37, 0x31, 0x7C, 0x39, 0x5B,
0x30, 0x36, 0x37, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x36, 0x36, 0x36, 0x32, 0x38,
0x7C, 0x39, 0x39, 0x5B, 0x31, 0x2D, 0x34, 0x36, 0x39, 0x5D, 0x7C, 0x31, 0x33,
0x5B, 0x35, 0x2D, 0x37, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x35, 0x36, 0x39, 0x5D, 0x7C, 0x33, 0x30, 0x39, 0x7C, 0x35, 0x5B,
0x31, 0x32, 0x5D, 0x7C, 0x37, 0x5B, 0x31, 0x33, 0x36, 0x2D, 0x39, 0x5D, 0x7C,
0x39, 0x5B, 0x30, 0x33, 0x5D, 0x29, 0x7C, 0x33, 0x5B, 0x32, 0x33, 0x36, 0x37,
0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x30,
0x30, 0xF2, 0x01, 0x12, 0x12, 0x07, 0x36, 0x36, 0x36, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x05, 0x36, 0x36, 0x36, 0x30, 0x30, 0x48, 0x05, 0xFA, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x21,
0x12, 0x16, 0x28, 0x3F, 0x3A, 0x33, 0x5B, 0x32, 0x33, 0x36, 0x37, 0x39, 0x5D,
0x5C, 0x64, 0x7C, 0x36, 0x36, 0x36, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05,
0x33, 0x32, 0x30, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xA7, 0x01, 0x0A, 0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 0x04, 0x48, 0x05, 0x22, 0x10, 0x12, 0x05, 0x31, 0x30, 0x31,
0x31, 0x31, 0x32, 0x05, 0x31, 0x30, 0x31, 0x31, 0x31, 0x48, 0x05, 0x2A, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02,
0x4E, 0x41, 0xDA, 0x01, 0x10, 0x12, 0x05, 0x31, 0x30, 0x31, 0x31, 0x31, 0x32,
0x05, 0x31, 0x30, 0x31, 0x31, 0x31, 0x48, 0x05, 0xEA, 0x01, 0x21, 0x12, 0x1A,
0x28, 0x3F, 0x3A, 0x31, 0x30, 0x7C, 0x39, 0x33, 0x29, 0x31, 0x31, 0x31, 0x7C,
0x28, 0x3F, 0x3A, 0x31, 0x5C, 0x64, 0x7C, 0x39, 0x29, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x03, 0x39, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xEF, 0x01, 0x0A, 0x14,
0x12, 0x0C, 0x5B, 0x31, 0x33, 0x35, 0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x33,
0x7D, 0x48, 0x02, 0x48, 0x03, 0x48, 0x04, 0x22, 0x33, 0x12, 0x2D, 0x31, 0x28,
0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x32, 0x33,
0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C, 0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 0x01, 0x0A, 0x97, 0x02, 0x0A, 0x23, 0x12, 0x1B, 0x5B, 0x31, 0x2D,
0x33, 0x35, 0x37, 0x38, 0x5D, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28,
0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x02,
0x48, 0x03, 0x48, 0x06, 0x22, 0x19, 0x12, 0x0F, 0x31, 0x5B, 0x35, 0x37, 0x38,
0x5D, 0x7C, 0x37, 0x32, 0x33, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x02, 0x31,
0x35, 0x48, 0x02, 0x48, 0x06, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4E, 0x45, 0xDA, 0x01, 0x17, 0x12,
0x0D, 0x31, 0x5B, 0x35, 0x37, 0x38, 0x5D, 0x7C, 0x37, 0x32, 0x33, 0x31, 0x34,
0x31, 0x32, 0x02, 0x31, 0x35, 0x48, 0x02, 0x48, 0x06, 0xEA, 0x01, 0x4A, 0x12,
0x44, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x31, 0x5B,
0x31, 0x32, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x33, 0x34, 0x5D, 0x7C, 0x33, 0x5B,
0x30, 0x31, 0x33, 0x5D, 0x7C, 0x5B, 0x34, 0x36, 0x5D, 0x30, 0x7C, 0x35, 0x35,
0x3F, 0x7C, 0x5B, 0x37, 0x38, 0x5D, 0x29, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x33,
0x33, 0x33, 0x7C, 0x35, 0x35, 0x35, 0x7C, 0x37, 0x32, 0x33, 0x31, 0x34, 0x31,
0x7C, 0x38, 0x38, 0x38, 0x32, 0x02, 0x31, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x40, 0x12,
0x37, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x31, 0x5B,
0x31, 0x32, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x33, 0x34, 0x5D, 0x7C, 0x33, 0x5B,
0x30, 0x31, 0x33, 0x5D, 0x7C, 0x5B, 0x34, 0x36, 0x5D, 0x30, 0x7C, 0x35, 0x35,
0x29, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x33, 0x33, 0x33, 0x7C, 0x35, 0x35, 0x35,
0x7C, 0x38, 0x38, 0x38, 0x32, 0x03, 0x31, 0x30, 0x30, 0x48, 0x03, 0x8A, 0x02,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A,
0x8A, 0x01, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03,
0x22, 0x14, 0x12, 0x0D, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x35, 0x35,
0x7C, 0x37, 0x37, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4E, 0x46,
0xDA, 0x01, 0x14, 0x12, 0x0D, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x35,
0x35, 0x7C, 0x37, 0x37, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x14,
0x12, 0x0D, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x35, 0x35, 0x7C, 0x37,
0x37, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x93, 0x01,
0x0A, 0x18, 0x12, 0x12, 0x5B, 0x31, 0x34, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28,
0x3F, 0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05,
0x22, 0x0C, 0x12, 0x03, 0x31, 0x39, 0x39, 0x32, 0x03, 0x31, 0x39, 0x39, 0x48,
0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A, 0x02, 0x4E, 0x47, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x39, 0x39,
0x32, 0x03, 0x31, 0x39, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x10, 0x12, 0x09, 0x31,
0x39, 0x39, 0x7C, 0x34, 0x30, 0x37, 0x30, 0x30, 0x32, 0x03, 0x31, 0x39, 0x39,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x37, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x05, 0x34, 0x30, 0x37, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12,
0x07, 0x34, 0x30, 0x37, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x37,
0x30, 0x30, 0x48, 0x05, 0x0A, 0xCF, 0x01, 0x0A, 0x14, 0x12, 0x0E, 0x5B, 0x31,
0x32, 0x34, 0x36, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48,
0x03, 0x48, 0x04, 0x22, 0x1D, 0x12, 0x16, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B,
0x35, 0x38, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x38, 0x5D, 0x29, 0x7C, 0x37, 0x33,
0x37, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x35, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4E, 0x49, 0xDA,
0x01, 0x19, 0x12, 0x10, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x35, 0x38, 0x5D,
0x7C, 0x32, 0x5B, 0x30, 0x38, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x35, 0x48,
0x03, 0xEA, 0x01, 0x40, 0x12, 0x39, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x35,
0x38, 0x5D, 0x7C, 0x32, 0x30, 0x30, 0x29, 0x7C, 0x34, 0x38, 0x37, 0x38, 0x7C,
0x37, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x30, 0x7C, 0x33, 0x37, 0x33, 0x29, 0x7C,
0x31, 0x32, 0x5B, 0x30, 0x31, 0x35, 0x38, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x31,
0x39, 0x7C, 0x5B, 0x32, 0x36, 0x37, 0x5D, 0x31, 0x29, 0x30, 0x30, 0x32, 0x03,
0x31, 0x31, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0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0x7C,
0x34, 0x34, 0x29, 0x7C, 0x33, 0x5B, 0x30, 0x33, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7C, 0x34, 0x30, 0x30, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x2D,
0x39, 0x5D, 0x5C, 0x64, 0x7C, 0x31, 0x5B, 0x30, 0x2D, 0x37, 0x39, 0x5D, 0x29,
0x29, 0x7C, 0x5B, 0x33, 0x34, 0x5D, 0x30, 0x30, 0x30, 0x7C, 0x39, 0x31, 0x31,
0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x12, 0x05, 0x31, 0x32,
0x30, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x32, 0x30, 0x30, 0x48, 0x04, 0x8A, 0x02,
0x12, 0x12, 0x08, 0x5B, 0x33, 0x34, 0x5D, 0x30, 0x30, 0x5C, 0x64, 0x32, 0x04,
0x33, 0x30, 0x30, 0x30, 0x48, 0x04, 0x0A, 0xDC, 0x01, 0x0A, 0x1E, 0x12, 0x16,
0x31, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28, 0x3F, 0x3A,
0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x04,
0x48, 0x06, 0x22, 0x1D, 0x12, 0x12, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30,
0x32, 0x33, 0x5D, 0x7C, 0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x32, 0x03,
0x31, 0x31, 0x30, 0x48, 0x03, 0x48, 0x06, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01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0x0A, 0x12, 0x03, 0x30, 0x31,
0x30, 0x32, 0x03, 0x30, 0x31, 0x30, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xF2, 0x01, 0x0A, 0x0D, 0x12,
0x07, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22,
0x0C, 0x12, 0x03, 0x31, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x31, 0x48, 0x03,
0x2A, 0x0C, 0x12, 0x03, 0x30, 0x31, 0x38, 0x32, 0x03, 0x30, 0x31, 0x38, 0x48,
0x03, 0x4A, 0x02, 0x4E, 0x5A, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x31, 0x31,
0x32, 0x03, 0x31, 0x31, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x50, 0x12, 0x49, 0x30,
0x31, 0x38, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x31, 0x7C, 0x33,
0x37, 0x29, 0x31, 0x7C, 0x28, 0x3F, 0x3A, 0x32, 0x33, 0x7C, 0x39, 0x34, 0x29,
0x34, 0x7C, 0x37, 0x5B, 0x30, 0x33, 0x5D, 0x37, 0x29, 0x7C, 0x5B, 0x32, 0x2D,
0x35, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x31, 0x36, 0x31, 0x7C, 0x32, 0x36, 0x5B, 0x30, 0x2D,
0x33, 0x5D, 0x7C, 0x37, 0x34, 0x32, 0x29, 0x32, 0x03, 0x30, 0x31, 0x38, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x8A, 0x02, 0x42, 0x12, 0x3B, 0x30, 0x31, 0x38, 0x7C, 0x28, 0x3F, 0x3A,
0x31, 0x28, 0x3F, 0x3A, 0x32, 0x33, 0x7C, 0x33, 0x37, 0x7C, 0x37, 0x5B, 0x30,
0x33, 0x5D, 0x7C, 0x39, 0x34, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x5B, 0x31,
0x32, 0x5D, 0x36, 0x7C, 0x37, 0x34, 0x29, 0x29, 0x5C, 0x64, 0x7C, 0x5B, 0x32,
0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D,
0x32, 0x03, 0x30, 0x31, 0x38, 0x0A, 0xC7, 0x01, 0x0A, 0x0D, 0x12, 0x09, 0x5B,
0x31, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x48, 0x04, 0x22, 0x12, 0x12,
0x0A, 0x31, 0x34, 0x34, 0x34, 0x7C, 0x39, 0x39, 0x39, 0x5C, 0x64, 0x32, 0x04,
0x31, 0x34, 0x34, 0x34, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4F, 0x4D, 0xDA, 0x01, 0x11, 0x12, 0x09,
0x31, 0x34, 0x34, 0x34, 0x7C, 0x39, 0x39, 0x39, 0x39, 0x32, 0x04, 0x31, 0x34,
0x34, 0x34, 0xEA, 0x01, 0x52, 0x12, 0x4A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x31, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x34, 0x5B, 0x30,
0x2D, 0x35, 0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x36, 0x7C, 0x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 0x12, 0x1D,
0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x31, 0x5D,
0x7C, 0x35, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x36, 0x5C, 0x64, 0x7B, 0x32, 0x2C,
0x35, 0x7D, 0x29, 0x32, 0x03, 0x30, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x19,
0x12, 0x09, 0x31, 0x36, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x32, 0x04,
0x31, 0x36, 0x30, 0x30, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48, 0x07, 0x0A,
0x84, 0x01, 0x0A, 0x0C, 0x12, 0x08, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x5C,
0x64, 0x48, 0x03, 0x22, 0x11, 0x12, 0x0A, 0x31, 0x31, 0x5B, 0x32, 0x37, 0x5D,
0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x50, 0x48,
0xDA, 0x01, 0x11, 0x12, 0x0A, 0x31, 0x31, 0x5B, 0x32, 0x37, 0x5D, 0x7C, 0x39,
0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32, 0xEA, 0x01, 0x11, 0x12, 0x0A, 0x31,
0x31, 0x5B, 0x32, 0x37, 0x5D, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31,
0x32, 0xF2, 0x01, 0x0B, 0x48, 0x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, 0x50, 0x54, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x32,
0x35, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x9C, 0x01,
0x12, 0x94, 0x01, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x34, 0x35,
0x7C, 0x35, 0x5B, 0x30, 0x31, 0x5D, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x5B,
0x32, 0x35, 0x37, 0x38, 0x5D, 0x7C, 0x36, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D,
0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x34, 0x35, 0x5D, 0x7C, 0x34,
0x29, 0x7C, 0x35, 0x38, 0x33, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30,
0x32, 0x33, 0x36, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x32, 0x5D, 0x7C, 0x39, 0x5B,
0x31, 0x36, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x36,
0x31, 0x31, 0x7C, 0x35, 0x39, 0x29, 0x31, 0x7C, 0x31, 0x5B, 0x30, 0x36, 0x38,
0x5D, 0x37, 0x38, 0x7C, 0x31, 0x5B, 0x30, 0x38, 0x5D, 0x39, 0x5B, 0x31, 0x36,
0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x38, 0x5D,
0x7C, 0x34, 0x30, 0x7C, 0x35, 0x5B, 0x31, 0x35, 0x5D, 0x7C, 0x36, 0x5B, 0x32,
0x35, 0x38, 0x5D, 0x7C, 0x38, 0x32, 0x29, 0x30, 0x32, 0x03, 0x31, 0x31, 0x32,
0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,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0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x50, 0x59, 0xDA, 0x01, 0x0E, 0x12, 0x07, 0x31,
0x32, 0x38, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x32, 0x38, 0xEA, 0x01,
0x13, 0x12, 0x0C, 0x31, 0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x5C, 0x64, 0x7C, 0x39,
0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x90, 0x01,
0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31, 0x32, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x0C, 0x12, 0x03,
0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0x48, 0x03, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x51,
0x41, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39,
0x39, 0x48, 0x03, 0xEA, 0x01, 0x1F, 0x12, 0x18, 0x39, 0x39, 0x39, 0x7C, 0x28,
0x3F, 0x3A, 0x31, 0x7C, 0x32, 0x30, 0x7C, 0x39, 0x5B, 0x32, 0x37, 0x5D, 0x5C,
0x64, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x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, 0xFF, 0xFF, 0x01, 0x0A,
0xB2, 0x02, 0x0A, 0x15, 0x12, 0x0B, 0x5B, 0x31, 0x38, 0x5D, 0x5C, 0x64, 0x7B,
0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22,
0x19, 0x12, 0x0E, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x06,
0x2A, 0x2A, 0x12, 0x1E, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x38,
0x5B, 0x33, 0x39, 0x5D, 0x7C, 0x5B, 0x32, 0x34, 0x5D, 0x29, 0x7C, 0x38, 0x5B,
0x34, 0x38, 0x5D, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x32, 0x30,
0x30, 0x48, 0x04, 0x48, 0x06, 0x4A, 0x02, 0x52, 0x4F, 0xDA, 0x01, 0x0C, 0x12,
0x03, 0x31, 0x31, 0x32, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01,
0x81, 0x01, 0x12, 0x7A, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x32,
0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x28,
0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x38, 0x5B, 0x31, 0x38, 0x5D, 0x29, 0x31, 0x7C,
0x31, 0x31, 0x39, 0x7C, 0x5B, 0x32, 0x33, 0x5D, 0x30, 0x30, 0x7C, 0x39, 0x33,
0x32, 0x29, 0x29, 0x7C, 0x5B, 0x32, 0x34, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x7C,
0x39, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x39,
0x29, 0x7C, 0x31, 0x5B, 0x31, 0x39, 0x5D, 0x7C, 0x32, 0x31, 0x7C, 0x33, 0x5B,
0x30, 0x32, 0x5D, 0x7C, 0x35, 0x5B, 0x31, 0x37, 0x38, 0x5D, 0x29, 0x29, 0x7C,
0x38, 0x5B, 0x34, 0x38, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31,
0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x1D, 0x12, 0x13, 0x28, 0x3F, 0x3A, 0x31, 0x5B,
0x32, 0x34, 0x5D, 0x7C, 0x38, 0x5B, 0x34, 0x38, 0x5D, 0x29, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x04, 0x31, 0x32, 0x30, 0x30, 0x48, 0x04, 0x0A, 0x9E, 0x01, 0x0A,
0x17, 0x12, 0x0B, 0x5B, 0x31, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x31, 0x2C, 0x35,
0x7D, 0x48, 0x02, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x14,
0x12, 0x0A, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x32,
0x02, 0x39, 0x32, 0x48, 0x02, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x52, 0x53,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, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x0A, 0xA1, 0x02, 0x0A, 0x15, 0x12, 0x0B, 0x5B, 0x31, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48,
0x06, 0x22, 0x2B, 0x12, 0x20, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x33, 0x37, 0x7C, 0x39, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x29, 0x32, 0x03,
0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x06, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x41, 0xDA, 0x01,
0x1A, 0x12, 0x11, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x39, 0x5B, 0x37, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48,
0x03, 0xEA, 0x01, 0x68, 0x12, 0x61, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x30, 0x7C, 0x32, 0x7C, 0x36, 0x31, 0x31, 0x31, 0x29, 0x7C, 0x34,
0x31, 0x30, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x31, 0x5B, 0x38,
0x39, 0x5D, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x39, 0x39, 0x7C, 0x32, 0x32,
0x7C, 0x39, 0x31, 0x29, 0x29, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x5B,
0x32, 0x34, 0x2D, 0x37, 0x39, 0x5D, 0x7C, 0x31, 0x31, 0x7C, 0x33, 0x5B, 0x33,
0x37, 0x39, 0x5D, 0x7C, 0x34, 0x30, 0x7C, 0x36, 0x36, 0x7C, 0x38, 0x5B, 0x35,
0x2D, 0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x29, 0x32,
0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0F, 0x12, 0x05, 0x31, 0x34, 0x31, 0x5C,
0x64, 0x32, 0x04, 0x31, 0x34, 0x31, 0x30, 0x48, 0x04, 0xFA, 0x01, 0x21, 0x12,
0x16, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x30, 0x7C, 0x34, 0x31, 0x29, 0x5C, 0x64,
0x7C, 0x39, 0x30, 0x5B, 0x32, 0x34, 0x36, 0x37, 0x39, 0x5D, 0x32, 0x03, 0x39,
0x30, 0x32, 0x48, 0x03, 0x48, 0x04, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xD1, 0x01, 0x0A, 0x0F, 0x12,
0x0B, 0x5B, 0x31, 0x32, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48,
0x03, 0x22, 0x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x53, 0x42, 0xDA, 0x01, 0x0A, 0x12, 0x03, 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x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03,
0x39, 0x39, 0x39, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x44, 0xDA, 0x01, 0x0A, 0x12, 0x03, 0x39,
0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0xEA, 0x01, 0x0A, 0x12, 0x03, 0x39,
0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xAA, 0x03,
0x0A, 0x19, 0x12, 0x0F, 0x5B, 0x31, 0x2D, 0x33, 0x37, 0x2D, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48,
0x06, 0x22, 0x22, 0x12, 0x15, 0x31, 0x31, 0x32, 0x7C, 0x28, 0x3F, 0x3A, 0x31,
0x31, 0x36, 0x5C, 0x64, 0x7C, 0x39, 0x30, 0x30, 0x29, 0x5C, 0x64, 0x5C, 0x64,
0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x05, 0x48, 0x06, 0x2A, 0x1E,
0x12, 0x11, 0x31, 0x31, 0x38, 0x31, 0x31, 0x5B, 0x38, 0x39, 0x5D, 0x7C, 0x37,
0x32, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x05, 0x37, 0x32, 0x30, 0x30, 0x30,
0x48, 0x05, 0x48, 0x06, 0x4A, 0x02, 0x53, 0x45, 0xDA, 0x01, 0x14, 0x12, 0x09,
0x31, 0x31, 0x32, 0x7C, 0x39, 0x30, 0x30, 0x30, 0x30, 0x32, 0x03, 0x31, 0x31,
0x32, 0x48, 0x03, 0x48, 0x05, 0xEA, 0x01, 0xC8, 0x01, 0x12, 0xC0, 0x01, 0x31,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x35, 0x5D, 0x7C, 0x33, 0x31, 0x33, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x31, 0x37, 0x5D, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C,
0x37, 0x5B, 0x30, 0x2D, 0x38, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x32,
0x5B, 0x30, 0x32, 0x33, 0x35, 0x38, 0x5D, 0x7C, 0x33, 0x33, 0x7C, 0x34, 0x5B,
0x30, 0x31, 0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x5B, 0x31, 0x2D, 0x34, 0x5D,
0x29, 0x7C, 0x33, 0x32, 0x5B, 0x31, 0x33, 0x5D, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x32, 0x32, 0x7C, 0x38, 0x38, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x28,
0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x35, 0x31, 0x29, 0x30, 0x7C, 0x31, 0x32, 0x29,
0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x34, 0x7C, 0x38, 0x5B,
0x30, 0x32, 0x2D, 0x34, 0x36, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x37, 0x5C, 0x64,
0x5C, 0x64, 0x7C, 0x39, 0x30, 0x5B, 0x32, 0x2D, 0x34, 0x5D, 0x29, 0x5C, 0x64,
0x5C, 0x64, 0x7C, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x38, 0x7C, 0x39, 0x30, 0x29,
0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7C,
0x31, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31,
0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xFA, 0x01, 0x3F, 0x12, 0x36, 0x32, 0x28, 0x3F, 0x3A, 0x32, 0x5B,
0x30, 0x32, 0x33, 0x35, 0x38, 0x5D, 0x7C, 0x33, 0x33, 0x7C, 0x34, 0x5B, 0x30,
0x31, 0x5D, 0x7C, 0x35, 0x30, 0x7C, 0x36, 0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x29,
0x7C, 0x33, 0x32, 0x5B, 0x31, 0x33, 0x5D, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x32,
0x32, 0x7C, 0x38, 0x38, 0x29, 0x7C, 0x39, 0x31, 0x32, 0x32, 0x03, 0x32, 0x32,
0x30, 0x48, 0x03, 0x8A, 0x02, 0x11, 0x12, 0x06, 0x37, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x32, 0x05, 0x37, 0x30, 0x30, 0x30, 0x30, 0x48, 0x05, 0x0A, 0xD1, 0x01,
0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31, 0x37, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x10, 0x12, 0x07,
0x39, 0x39, 0x5B, 0x33, 0x35, 0x39, 0x5D, 0x32, 0x03, 0x39, 0x39, 0x33, 0x48,
0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A, 0x02, 0x53, 0x47, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x39, 0x39, 0x5B,
0x33, 0x35, 0x39, 0x5D, 0x32, 0x03, 0x39, 0x39, 0x33, 0x48, 0x03, 0xEA, 0x01,
0x51, 0x12, 0x4A, 0x31, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x31,
0x33, 0x36, 0x38, 0x5D, 0x5C, 0x64, 0x7C, 0x34, 0x34, 0x29, 0x5C, 0x64, 0x7C,
0x5B, 0x35, 0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C, 0x39,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x31, 0x2D,
0x39, 0x5D, 0x5C, 0x64, 0x29, 0x29, 0x7C, 0x37, 0x37, 0x32, 0x32, 0x32, 0x7C,
0x39, 0x39, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x31, 0x30, 0x30, 0x32,
0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x37, 0x37,
0x32, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x37, 0x37, 0x32, 0x30, 0x30, 0x48,
0x05, 0x0A, 0xA4, 0x01, 0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31, 0x32, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05,
0x22, 0x13, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39,
0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x48, 0xDA,
0x01, 0x13, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39,
0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x25, 0x12, 0x1E,
0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C, 0x32, 0x36, 0x5B, 0x30,
0x31, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A,
0x87, 0x02, 0x0A, 0x12, 0x12, 0x08, 0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35,
0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x26, 0x12, 0x1F,
0x31, 0x31, 0x28, 0x3F, 0x3A, 0x28, 0x3F, 0x3A, 0x30, 0x7C, 0x36, 0x5C, 0x64,
0x29, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x38, 0x5C,
0x64, 0x5C, 0x64, 0x3F, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53,
0x49, 0xDA, 0x01, 0x0F, 0x12, 0x06, 0x31, 0x31, 0x5B, 0x32, 0x33, 0x5D, 0x32,
0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0xEA, 0x01, 0x7B, 0x12, 0x74, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x5B, 0x31, 0x34, 0x36, 0x5D,
0x7C, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x30,
0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x33, 0x29, 0x29, 0x7C,
0x38, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x38, 0x5D, 0x7C, 0x39, 0x39, 0x29, 0x29,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x35, 0x39, 0x7C, 0x31, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x31, 0x36, 0x29, 0x7C, 0x35, 0x7C, 0x37,
0x30, 0x7C, 0x38, 0x37, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x5B,
0x31, 0x34, 0x39, 0x5D, 0x29, 0x29, 0x29, 0x7C, 0x31, 0x39, 0x28, 0x3F, 0x3A,
0x30, 0x38, 0x7C, 0x38, 0x31, 0x29, 0x5B, 0x30, 0x39, 0x5D, 0x32, 0x03, 0x31,
0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,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D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F,
0x3A, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22,
0x13, 0x12, 0x0A, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x39,
0x32, 0x03, 0x30, 0x31, 0x39, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x4C, 0xDA, 0x01,
0x13, 0x12, 0x0A, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x39,
0x32, 0x03, 0x30, 0x31, 0x39, 0x48, 0x03, 0xEA, 0x01, 0x17, 0x12, 0x10, 0x28,
0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x39, 0x7C, 0x36, 0x30, 0x34,
0x30, 0x30, 0x32, 0x03, 0x30, 0x31, 0x39, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07,
0x36, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x36, 0x30, 0x34, 0x30,
0x30, 0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x36, 0x30, 0x34, 0x5C, 0x64,
0x5C, 0x64, 0x32, 0x05, 0x36, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x78,
0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0E,
0x12, 0x07, 0x31, 0x31, 0x5B, 0x33, 0x35, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x31,
0x33, 0x2A, 0x0B, 0x48, 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, 0x32, 0x05, 0x32,
0x34, 0x30, 0x30, 0x30, 0x48, 0x05, 0x48, 0x06, 0x4A, 0x02, 0x53, 0x4E, 0xDA,
0x01, 0x0D, 0x12, 0x05, 0x31, 0x5B, 0x37, 0x38, 0x5D, 0x32, 0x02, 0x31, 0x37,
0x48, 0x02, 0xEA, 0x01, 0x43, 0x12, 0x3D, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x5B,
0x36, 0x39, 0x5D, 0x7C, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x34, 0x36, 0x5D, 0x5C,
0x64, 0x7C, 0x35, 0x31, 0x29, 0x5C, 0x64, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x36, 0x5D, 0x7C, 0x5B, 0x31, 0x32, 0x34,
0x36, 0x38, 0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x31, 0x5B, 0x32,
0x37, 0x38, 0x5D, 0x32, 0x02, 0x31, 0x32, 0xF2, 0x01, 0x1B, 0x12, 0x0E, 0x32,
0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x32, 0x29, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x32, 0x05, 0x32, 0x32, 0x30, 0x30, 0x30, 0x48, 0x05, 0x48, 0x06, 0xFA, 0x01,
0x13, 0x12, 0x09, 0x31, 0x5B, 0x34, 0x36, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x04, 0x31, 0x34, 0x30, 0x30, 0x48, 0x04, 0x8A, 0x02, 0x16, 0x12, 0x0B, 0x32,
0x5B, 0x34, 0x36, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x05, 0x32,
0x34, 0x30, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x8D, 0x01, 0x0A, 0x0E, 0x12, 0x0A,
0x5B, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22,
0x12, 0x12, 0x0B, 0x35, 0x35, 0x35, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x39,
0x39, 0x32, 0x03, 0x35, 0x35, 0x35, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x4F, 0xDA, 0x01, 0x12,
0x12, 0x0B, 0x35, 0x35, 0x35, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x39, 0x39,
0x32, 0x03, 0x35, 0x35, 0x35, 0xEA, 0x01, 0x16, 0x12, 0x0F, 0x35, 0x35, 0x35,
0x7C, 0x37, 0x37, 0x37, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x39, 0x39, 0x32,
0x03, 0x35, 0x35, 0x35, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x7A, 0x0A, 0x0E, 0x12, 0x08,
0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22,
0x0C, 0x12, 0x03, 0x31, 0x31, 0x35, 0x32, 0x03, 0x31, 0x31, 0x35, 0x48, 0x03,
0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x4A, 0x02, 0x53, 0x52, 0xDA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x31, 0x35, 0x32,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D, 0x32, 0x03, 0x39, 0x31,
0x31, 0x48, 0x03, 0xEA, 0x01, 0x3F, 0x12, 0x38, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x31, 0x31, 0x31, 0x29, 0x7C, 0x32, 0x5B,
0x31, 0x33, 0x36, 0x2D, 0x38, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x2D, 0x36, 0x5D,
0x7C, 0x39, 0x5B, 0x30, 0x35, 0x5D, 0x29, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34,
0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x5C, 0x64, 0x7C, 0x32, 0x39, 0x29, 0x32,
0x03, 0x31, 0x31, 0x32, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34,
0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05,
0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x30, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32,
0x05, 0x34, 0x30, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x6C, 0x0A, 0x09, 0x12,
0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0A, 0x12, 0x03, 0x39,
0x31, 0x39, 0x32, 0x03, 0x39, 0x31, 0x39, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x58, 0xDA, 0x01,
0x0A, 0x12, 0x03, 0x39, 0x31, 0x39, 0x32, 0x03, 0x39, 0x31, 0x39, 0xEA, 0x01,
0x0A, 0x12, 0x03, 0x39, 0x31, 0x39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, 0x03, 0x39, 0x39, 0x39,
0x32, 0x03, 0x39, 0x39, 0x39, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x5A, 0xDA, 0x01, 0x0A, 0x12,
0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0xEA, 0x01, 0x0A, 0x12,
0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A,
0x81, 0x01, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03,
0x22, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39,
0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x54, 0x43, 0xDA, 0x01, 0x11,
0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x32,
0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A,
0x31, 0x31, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xF2, 0x01,
0x0B, 0x48, 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 0x5B, 0x30, 0x32, 0x34,
0x36, 0x5D, 0x29, 0x7C, 0x35, 0x37, 0x38, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x34,
0x34, 0x7C, 0x36, 0x5B, 0x37, 0x39, 0x5D, 0x7C, 0x38, 0x38, 0x7C, 0x39, 0x5B,
0x31, 0x36, 0x5D, 0x29, 0x7C, 0x38, 0x38, 0x5C, 0x64, 0x7C, 0x39, 0x5B, 0x31,
0x39, 0x5D, 0x29, 0x7C, 0x31, 0x5B, 0x31, 0x35, 0x5D, 0x35, 0x35, 0x32, 0x03,
0x31, 0x39, 0x31, 0x2A, 0x25, 0x12, 0x1B, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31,
0x33, 0x7C, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x5C, 0x64, 0x7C, 0x35, 0x28, 0x3F,
0x3A, 0x30, 0x39, 0x7C, 0x35, 0x36, 0x29, 0x29, 0x32, 0x04, 0x31, 0x31, 0x31,
0x33, 0x48, 0x04, 0x4A, 0x02, 0x54, 0x48, 0xDA, 0x01, 0x15, 0x12, 0x0E, 0x31,
0x28, 0x3F, 0x3A, 0x36, 0x36, 0x39, 0x7C, 0x39, 0x5B, 0x31, 0x39, 0x5D, 0x29,
0x32, 0x03, 0x31, 0x39, 0x31, 0xEA, 0x01, 0xC0, 0x02, 0x12, 0xB8, 0x02, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x7C, 0x31, 0x28, 0x3F,
0x3A, 0x30, 0x5B, 0x30, 0x33, 0x5D, 0x7C, 0x31, 0x5B, 0x31, 0x2D, 0x33, 0x35,
0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x33, 0x35, 0x38, 0x5D, 0x7C, 0x33, 0x5B, 0x30,
0x33, 0x2D, 0x37, 0x39, 0x5D, 0x7C, 0x34, 0x5B, 0x30, 0x32, 0x2D, 0x34, 0x38,
0x39, 0x5D, 0x7C, 0x35, 0x5B, 0x30, 0x34, 0x2D, 0x39, 0x5D, 0x7C, 0x36, 0x5B,
0x30, 0x34, 0x2D, 0x37, 0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x33, 0x2D, 0x39,
0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x32, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x39, 0x5B,
0x30, 0x32, 0x2D, 0x37, 0x39, 0x5D, 0x29, 0x7C, 0x32, 0x28, 0x3F, 0x3A, 0x32,
0x32, 0x7C, 0x33, 0x5B, 0x38, 0x39, 0x5D, 0x7C, 0x36, 0x36, 0x29, 0x7C, 0x33,
0x28, 0x3F, 0x3A, 0x31, 0x38, 0x7C, 0x32, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x33,
0x5B, 0x30, 0x31, 0x33, 0x5D, 0x7C, 0x35, 0x5B, 0x35, 0x36, 0x5D, 0x7C, 0x36,
0x5B, 0x34, 0x35, 0x5D, 0x7C, 0x37, 0x33, 0x29, 0x7C, 0x34, 0x37, 0x37, 0x7C,
0x35, 0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7C, 0x34, 0x5B, 0x30, 0x2D, 0x33,
0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x35, 0x5B, 0x31, 0x2D, 0x38, 0x5D, 0x7C, 0x36,
0x5B, 0x30, 0x31, 0x36, 0x37, 0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x31, 0x32, 0x35,
0x36, 0x38, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x35, 0x38, 0x39,
0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x31, 0x33, 0x35, 0x38, 0x39, 0x5D, 0x29, 0x7C,
0x36, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x32, 0x39, 0x5D, 0x7C, 0x32,
0x5B, 0x30, 0x33, 0x5D, 0x7C, 0x34, 0x5B, 0x33, 0x2D, 0x36, 0x5D, 0x7C, 0x36,
0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x32, 0x35, 0x37, 0x2D,
0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x35, 0x38, 0x5D, 0x7C, 0x39, 0x5B,
0x30, 0x31, 0x34, 0x2D, 0x39, 0x5D, 0x29, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x5B,
0x31, 0x34, 0x5D, 0x39, 0x7C, 0x37, 0x5B, 0x32, 0x37, 0x5D, 0x7C, 0x39, 0x30,
0x29, 0x7C, 0x38, 0x38, 0x38, 0x7C, 0x39, 0x5B, 0x31, 0x39, 0x5D, 0x29, 0x32,
0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0xCB, 0x01, 0x12, 0xC0, 0x01, 0x31, 0x28,
0x3F, 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x33, 0x7C, 0x31, 0x5B, 0x31, 0x35,
0x5D, 0x7C, 0x32, 0x5B, 0x35, 0x38, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x35, 0x36,
0x5D, 0x7C, 0x34, 0x5B, 0x30, 0x32, 0x2D, 0x34, 0x39, 0x5D, 0x7C, 0x35, 0x5B,
0x30, 0x34, 0x36, 0x2D, 0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x33, 0x2D, 0x35,
0x38, 0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x35, 0x37, 0x39, 0x5D, 0x29, 0x7C, 0x35,
0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x2D, 0x38, 0x5D, 0x7C, 0x34, 0x5B, 0x30,
0x2D, 0x33, 0x37, 0x38, 0x5D, 0x7C, 0x35, 0x5B, 0x31, 0x2D, 0x34, 0x37, 0x38,
0x5D, 0x7C, 0x37, 0x5B, 0x31, 0x35, 0x36, 0x5D, 0x29, 0x7C, 0x36, 0x28, 0x3F,
0x3A, 0x32, 0x30, 0x7C, 0x34, 0x5B, 0x33, 0x35, 0x36, 0x5D, 0x7C, 0x36, 0x5B,
0x31, 0x2D, 0x36, 0x38, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x35, 0x37, 0x2D, 0x39,
0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x31, 0x35, 0x5D, 0x7C, 0x39, 0x5B, 0x30, 0x34,
0x35, 0x37, 0x2D, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31,
0x5B, 0x36, 0x38, 0x5D, 0x7C, 0x32, 0x36, 0x7C, 0x33, 0x5B, 0x31, 0x2D, 0x33,
0x35, 0x5D, 0x7C, 0x35, 0x5B, 0x36, 0x38, 0x39, 0x5D, 0x7C, 0x36, 0x30, 0x7C,
0x37, 0x5B, 0x31, 0x37, 0x5D, 0x29, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x31, 0x30,
0x33, 0x48, 0x04, 0xFA, 0x01, 0x11, 0x12, 0x07, 0x31, 0x31, 0x34, 0x5B, 0x38,
0x39, 0x5D, 0x32, 0x04, 0x31, 0x31, 0x34, 0x38, 0x48, 0x04, 0x8A, 0x02, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x8D,
0x01, 0x0A, 0x09, 0x12, 0x05, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22,
0x15, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D,
0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x31, 0x2A, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x54, 0x4A,
0xDA, 0x01, 0x15, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31,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 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x54, 0x4E, 0xDA, 0x01, 0x0E, 0x12,
0x07, 0x31, 0x39, 0x5B, 0x30, 0x37, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x39, 0x30,
0xEA, 0x01, 0x0E, 0x12, 0x07, 0x31, 0x39, 0x5B, 0x30, 0x37, 0x38, 0x5D, 0x32,
0x03, 0x31, 0x39, 0x30, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x93, 0x01, 0x0A, 0x09, 0x12,
0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x17, 0x12, 0x10, 0x39,
0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x32, 0x7C, 0x33, 0x33, 0x7C, 0x39,
0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x54, 0x4F, 0xDA, 0x01,
0x17, 0x12, 0x10, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x32, 0x7C,
0x33, 0x33, 0x7C, 0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01,
0x17, 0x12, 0x10, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x32, 0x32, 0x7C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 0x3A, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32,
0x2D, 0x37, 0x39, 0x5D, 0x7C, 0x38, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x31,
0x38, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x34, 0x35, 0x5D, 0x7C, 0x33, 0x5B,
0x32, 0x2D, 0x34, 0x5D, 0x7C, 0x34, 0x32, 0x7C, 0x35, 0x5B, 0x30, 0x35, 0x38,
0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x36, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x37, 0x5D,
0x7C, 0x38, 0x5B, 0x30, 0x31, 0x33, 0x38, 0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x30,
0x38, 0x39, 0x5D, 0x29, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x33, 0x37, 0x7C,
0x5B, 0x35, 0x38, 0x5D, 0x36, 0x7C, 0x36, 0x35, 0x29, 0x7C, 0x34, 0x37, 0x31,
0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x37, 0x38, 0x29, 0x7C, 0x36,
0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x5D, 0x36, 0x7C, 0x39, 0x39, 0x29, 0x7C,
0x38, 0x28, 0x3F, 0x3A, 0x36, 0x33, 0x7C, 0x39, 0x35, 0x29, 0x29, 0x7C, 0x32,
0x28, 0x3F, 0x3A, 0x30, 0x37, 0x37, 0x7C, 0x32, 0x36, 0x38, 0x7C, 0x34, 0x28,
0x3F, 0x3A, 0x31, 0x37, 0x7C, 0x32, 0x33, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A,
0x37, 0x5B, 0x32, 0x36, 0x5D, 0x7C, 0x38, 0x32, 0x29, 0x7C, 0x36, 0x5B, 0x31,
0x34, 0x5D, 0x34, 0x7C, 0x38, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x39, 0x28, 0x3F,
0x3A, 0x33, 0x30, 0x7C, 0x38, 0x39, 0x29, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A,
0x30, 0x28, 0x3F, 0x3A, 0x30, 0x35, 0x7C, 0x37, 0x32, 0x29, 0x7C, 0x33, 0x35,
0x33, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30, 0x36, 0x7C, 0x33, 0x30, 0x7C, 0x36,
0x34, 0x29, 0x7C, 0x35, 0x30, 0x32, 0x7C, 0x36, 0x37, 0x34, 0x7C, 0x37, 0x34,
0x37, 0x7C, 0x38, 0x35, 0x31, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x5B, 0x32,
0x39, 0x5D, 0x7C, 0x36, 0x30, 0x29, 0x29, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x30,
0x28, 0x3F, 0x3A, 0x32, 0x35, 0x7C, 0x33, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x5B,
0x34, 0x37, 0x5D, 0x32, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x33, 0x5B, 0x31,
0x33, 0x5D, 0x7C, 0x5B, 0x38, 0x39, 0x5D, 0x31, 0x29, 0x7C, 0x34, 0x33, 0x39,
0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x34, 0x33, 0x7C, 0x35, 0x35, 0x29, 0x7C, 0x37,
0x31, 0x37, 0x7C, 0x38, 0x33, 0x32, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A, 0x31,
0x34, 0x35, 0x7C, 0x32, 0x39, 0x30, 0x7C, 0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x5C,
0x64, 0x5C, 0x64, 0x7C, 0x37, 0x37, 0x32, 0x7C, 0x38, 0x33, 0x33, 0x7C, 0x39,
0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x36, 0x5D, 0x31, 0x7C, 0x39, 0x32, 0x29, 0x29,
0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x32, 0x33, 0x36, 0x7C, 0x36, 0x28, 0x3F, 0x3A,
0x31, 0x32, 0x7C, 0x33, 0x39, 0x7C, 0x38, 0x5B, 0x35, 0x39, 0x5D, 0x29, 0x7C,
0x37, 0x36, 0x39, 0x29, 0x7C, 0x37, 0x38, 0x39, 0x30, 0x7C, 0x38, 0x28, 0x3F,
0x3A, 0x36, 0x38, 0x38, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x32, 0x38, 0x7C, 0x36,
0x35, 0x29, 0x7C, 0x38, 0x35, 0x5B, 0x30, 0x36, 0x5D, 0x29, 0x7C, 0x39, 0x28,
0x3F, 0x3A, 0x31, 0x35, 0x39, 0x7C, 0x32, 0x39, 0x30, 0x29, 0x7C, 0x31, 0x5B,
0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x30, 0xF2, 0x01,
0x16, 0x12, 0x0C, 0x28, 0x3F, 0x3A, 0x32, 0x38, 0x35, 0x7C, 0x35, 0x34, 0x32,
0x29, 0x30, 0x32, 0x04, 0x32, 0x38, 0x35, 0x30, 0x48, 0x04, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x9A, 0x02, 0x12, 0x8E, 0x02, 0x31, 0x28, 0x3F, 0x3A, 0x33, 0x28, 0x3F, 0x3A,
0x33, 0x37, 0x7C, 0x5B, 0x35, 0x38, 0x5D, 0x36, 0x7C, 0x36, 0x35, 0x29, 0x7C,
0x34, 0x28, 0x3F, 0x3A, 0x34, 0x7C, 0x37, 0x31, 0x29, 0x7C, 0x35, 0x28, 0x3F,
0x3A, 0x30, 0x37, 0x7C, 0x37, 0x38, 0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x5B,
0x30, 0x32, 0x5D, 0x36, 0x7C, 0x39, 0x39, 0x29, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x33, 0x7C, 0x36, 0x33, 0x7C, 0x39, 0x35, 0x29, 0x29, 0x7C, 0x28, 0x3F, 0x3A,
0x32, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x7C, 0x32, 0x36, 0x7C, 0x34, 0x5B, 0x31,
0x32, 0x5D, 0x7C, 0x35, 0x5B, 0x37, 0x38, 0x5D, 0x7C, 0x36, 0x5B, 0x31, 0x34,
0x5D, 0x7C, 0x38, 0x5C, 0x64, 0x7C, 0x39, 0x5B, 0x33, 0x38, 0x5D, 0x29, 0x7C,
0x33, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x37, 0x5D, 0x7C, 0x5B, 0x33, 0x38,
0x5D, 0x35, 0x7C, 0x34, 0x5B, 0x30, 0x33, 0x36, 0x5D, 0x7C, 0x35, 0x30, 0x7C,
0x36, 0x37, 0x7C, 0x37, 0x34, 0x7C, 0x39, 0x5B, 0x31, 0x36, 0x5D, 0x29, 0x7C,
0x34, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x32, 0x2D, 0x34, 0x37, 0x5D, 0x7C, 0x33,
0x5B, 0x33, 0x38, 0x39, 0x5D, 0x7C, 0x5B, 0x34, 0x38, 0x5D, 0x33, 0x7C, 0x35,
0x5B, 0x34, 0x35, 0x5D, 0x7C, 0x37, 0x31, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A,
0x31, 0x34, 0x7C, 0x32, 0x39, 0x7C, 0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x5C, 0x64,
0x7C, 0x37, 0x37, 0x7C, 0x38, 0x33, 0x7C, 0x39, 0x5B, 0x30, 0x36, 0x39, 0x5D,
0x29, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x32, 0x33, 0x7C, 0x36, 0x5B, 0x31, 0x33,
0x38, 0x5D, 0x7C, 0x37, 0x36, 0x29, 0x7C, 0x37, 0x38, 0x39, 0x7C, 0x38, 0x28,
0x3F, 0x3A, 0x36, 0x38, 0x7C, 0x37, 0x5B, 0x32, 0x36, 0x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0x4A, 0x02, 0x54, 0x56, 0xDA, 0x01, 0x0A, 0x12, 0x03, 0x39, 0x31,
0x31, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA, 0x01, 0x10, 0x12, 0x09, 0x31, 0x5C,
0x64, 0x5C, 0x64, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x0A, 0xF8, 0x01, 0x0A, 0x0E, 0x12, 0x08, 0x31, 0x5C, 0x64, 0x7B,
0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x22, 0x1C, 0x12, 0x15, 0x31,
0x31, 0x5B, 0x30, 0x32, 0x38, 0x39, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x38,
0x31, 0x7C, 0x39, 0x32, 0x29, 0x5C, 0x64, 0x32, 0x03, 0x31, 0x31, 0x30, 0x2A,
0x0F, 0x12, 0x06, 0x31, 0x30, 0x5B, 0x35, 0x36, 0x5D, 0x32, 0x03, 0x31, 0x30,
0x35, 0x48, 0x03, 0x4A, 0x02, 0x54, 0x57, 0xDA, 0x01, 0x10, 0x12, 0x07, 0x31,
0x31, 0x5B, 0x30, 0x32, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x30, 0x48, 0x03,
0xEA, 0x01, 0x60, 0x12, 0x59, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x30, 0x34,
0x2D, 0x36, 0x5D, 0x7C, 0x31, 0x5B, 0x30, 0x32, 0x33, 0x37, 0x2D, 0x39, 0x5D,
0x7C, 0x33, 0x5B, 0x33, 0x38, 0x39, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x35, 0x2D,
0x38, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x37, 0x5D, 0x7C, 0x38, 0x28, 0x3F, 0x3A,
0x30, 0x7C, 0x31, 0x31, 0x29, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x39, 0x7C,
0x32, 0x32, 0x7C, 0x35, 0x5B, 0x30, 0x35, 0x37, 0x5D, 0x7C, 0x36, 0x38, 0x7C,
0x38, 0x5B, 0x30, 0x35, 0x5D, 0x7C, 0x39, 0x5B, 0x31, 0x35, 0x36, 0x38, 0x39,
0x5D, 0x29, 0x29, 0x32, 0x03, 0x31, 0x30, 0x30, 0xF2, 0x01, 0x20, 0x12, 0x19,
0x31, 0x28, 0x3F, 0x3A, 0x36, 0x35, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x5C,
0x64, 0x7C, 0x35, 0x30, 0x7C, 0x38, 0x35, 0x7C, 0x39, 0x38, 0x29, 0x29, 0x32,
0x03, 0x31, 0x36, 0x35, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xAA, 0x01, 0x0A, 0x19, 0x12, 0x13,
0x5B, 0x31, 0x34, 0x39, 0x5D, 0x5C, 0x64, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C,
0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x48, 0x03, 0x48, 0x05, 0x22, 0x13, 0x12,
0x0A, 0x31, 0x31, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03,
0x31, 0x31, 0x31, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x54, 0x5A, 0xDA, 0x01, 0x13, 0x12,
0x0A, 0x31, 0x31, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x39, 0x39, 0x39, 0x32, 0x03,
0x31, 0x31, 0x31, 0x48, 0x03, 0xEA, 0x01, 0x18, 0x12, 0x11, 0x31, 0x31, 0x5B,
0x31, 0x32, 0x38, 0x5D, 0x7C, 0x34, 0x36, 0x34, 0x30, 0x30, 0x7C, 0x39, 0x39,
0x39, 0x32, 0x03, 0x31, 0x31, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34,
0x36, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34, 0x36, 0x34, 0x30, 0x30,
0x48, 0x05, 0x8A, 0x02, 0x12, 0x12, 0x07, 0x34, 0x36, 0x34, 0x5C, 0x64, 0x5C,
0x64, 0x32, 0x05, 0x34, 0x36, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x91, 0x02,
0x0A, 0x16, 0x12, 0x0C, 0x5B, 0x31, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32,
0x2C, 0x35, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x24,
0x12, 0x19, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C,
0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29,
0x29, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48, 0x03, 0x48, 0x06, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x55,
0x41, 0xDA, 0x01, 0x17, 0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31,
0x2D, 0x33, 0x5D, 0x7C, 0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x30, 0x31, 0x48,
0x03, 0xEA, 0x01, 0x67, 0x12, 0x60, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31,
0x2D, 0x34, 0x39, 0x5D, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x36, 0x28,
0x3F, 0x3A, 0x30, 0x30, 0x30, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C,
0x32, 0x33, 0x29, 0x29, 0x7C, 0x38, 0x5C, 0x64, 0x5C, 0x64, 0x3F, 0x29, 0x7C,
0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x37, 0x38, 0x5D, 0x7C, 0x35, 0x5C, 0x64, 0x29,
0x5C, 0x64, 0x29, 0x7C, 0x5B, 0x38, 0x39, 0x5D, 0x30, 0x30, 0x5C, 0x64, 0x5C,
0x64, 0x3F, 0x7C, 0x31, 0x35, 0x31, 0x7C, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x36,
0x7C, 0x34, 0x5C, 0x64, 0x7C, 0x36, 0x29, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x03,
0x31, 0x30, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x1F, 0x12, 0x13, 0x28, 0x3F, 0x3A, 0x31,
0x31, 0x38, 0x7C, 0x5B, 0x38, 0x39, 0x5D, 0x30, 0x30, 0x29, 0x5C, 0x64, 0x5C,
0x64, 0x3F, 0x32, 0x04, 0x31, 0x31, 0x38, 0x30, 0x48, 0x04, 0x48, 0x05, 0x8A,
0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x0A, 0x6C, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03,
0x22, 0x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03, 0x39, 0x39, 0x39, 0x2A,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A,
0x02, 0x55, 0x47, 0xDA, 0x01, 0x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03,
0x39, 0x39, 0x39, 0xEA, 0x01, 0x0A, 0x12, 0x03, 0x39, 0x39, 0x39, 0x32, 0x03,
0x39, 0x39, 0x39, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xF9, 0x04, 0x0A, 0x16, 0x12, 0x0C,
0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x35, 0x7D, 0x48,
0x03, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x22, 0x13, 0x12, 0x0A, 0x31, 0x31,
0x32, 0x7C, 0x5B, 0x36, 0x39, 0x5D, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32,
0x48, 0x03, 0x2A, 0x84, 0x02, 0x12, 0xF8, 0x01, 0x32, 0x34, 0x32, 0x38, 0x30,
0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x38, 0x31, 0x7C, 0x39, 0x36, 0x38, 0x29, 0x33,
0x35, 0x7C, 0x34, 0x28, 0x3F, 0x3A, 0x33, 0x33, 0x35, 0x35, 0x7C, 0x37, 0x35,
0x35, 0x33, 0x7C, 0x38, 0x32, 0x32, 0x31, 0x29, 0x7C, 0x35, 0x28, 0x3F, 0x3A,
0x28, 0x3F, 0x3A, 0x34, 0x38, 0x39, 0x7C, 0x39, 0x33, 0x34, 0x29, 0x32, 0x7C,
0x35, 0x39, 0x32, 0x38, 0x29, 0x7C, 0x37, 0x32, 0x30, 0x37, 0x38, 0x7C, 0x28,
0x3F, 0x3A, 0x33, 0x32, 0x33, 0x7C, 0x39, 0x36, 0x30, 0x29, 0x34, 0x30, 0x7C,
0x28, 0x3F, 0x3A, 0x32, 0x37, 0x36, 0x7C, 0x34, 0x31, 0x34, 0x29, 0x36, 0x33,
0x7C, 0x28, 0x3F, 0x3A, 0x32, 0x28, 0x3F, 0x3A, 0x35, 0x32, 0x30, 0x7C, 0x37,
0x34, 0x34, 0x29, 0x7C, 0x37, 0x33, 0x39, 0x30, 0x7C, 0x39, 0x39, 0x36, 0x38,
0x29, 0x39, 0x7C, 0x28, 0x3F, 0x3A, 0x36, 0x39, 0x33, 0x7C, 0x37, 0x33, 0x32,
0x7C, 0x39, 0x37, 0x36, 0x29, 0x38, 0x38, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x28,
0x3F, 0x3A, 0x35, 0x35, 0x36, 0x7C, 0x38, 0x32, 0x35, 0x29, 0x7C, 0x35, 0x32,
0x39, 0x34, 0x7C, 0x38, 0x36, 0x32, 0x33, 0x7C, 0x39, 0x37, 0x32, 0x39, 0x29,
0x34, 0x7C, 0x28, 0x3F, 0x3A, 0x33, 0x33, 0x37, 0x38, 0x7C, 0x34, 0x31, 0x33,
0x36, 0x7C, 0x37, 0x36, 0x34, 0x32, 0x7C, 0x38, 0x39, 0x36, 0x31, 0x7C, 0x39,
0x39, 0x37, 0x39, 0x29, 0x36, 0x7C, 0x28, 0x3F, 0x3A, 0x34, 0x28, 0x3F, 0x3A,
0x36, 0x28, 0x3F, 0x3A, 0x31, 0x35, 0x7C, 0x33, 0x32, 0x29, 0x7C, 0x38, 0x32,
0x37, 0x29, 0x7C, 0x28, 0x3F, 0x3A, 0x35, 0x39, 0x31, 0x7C, 0x37, 0x32, 0x30,
0x29, 0x38, 0x7C, 0x39, 0x35, 0x32, 0x39, 0x29, 0x37, 0x32, 0x05, 0x32, 0x34,
0x32, 0x38, 0x30, 0x48, 0x05, 0x4A, 0x02, 0x55, 0x53, 0xDA, 0x01, 0x10, 0x12,
0x07, 0x31, 0x31, 0x32, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x32,
0x48, 0x03, 0xEA, 0x01, 0x3D, 0x12, 0x36, 0x31, 0x31, 0x28, 0x3F, 0x3A, 0x32,
0x7C, 0x35, 0x5B, 0x31, 0x2D, 0x34, 0x37, 0x5D, 0x7C, 0x5B, 0x36, 0x38, 0x5D,
0x5C, 0x64, 0x7C, 0x37, 0x5B, 0x30, 0x2D, 0x35, 0x37, 0x5D, 0x7C, 0x39, 0x38,
0x29, 0x7C, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x35,
0x7D, 0x7C, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31,
0x32, 0xF2, 0x01, 0xA3, 0x01, 0x12, 0x95, 0x01, 0x32, 0x28, 0x3F, 0x3A, 0x33,
0x33, 0x33, 0x33, 0x7C, 0x28, 0x3F, 0x3A, 0x34, 0x32, 0x32, 0x34, 0x7C, 0x37,
0x35, 0x36, 0x32, 0x7C, 0x39, 0x30, 0x30, 0x29, 0x32, 0x7C, 0x35, 0x36, 0x34,
0x34, 0x37, 0x7C, 0x36, 0x36, 0x38, 0x38, 0x29, 0x7C, 0x33, 0x28, 0x3F, 0x3A,
0x31, 0x30, 0x31, 0x30, 0x7C, 0x32, 0x36, 0x36, 0x35, 0x7C, 0x37, 0x34, 0x30,
0x34, 0x29, 0x7C, 0x34, 0x30, 0x34, 0x30, 0x34, 0x7C, 0x35, 0x36, 0x30, 0x35,
0x36, 0x30, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x36, 0x30, 0x7C, 0x32,
0x32, 0x36, 0x33, 0x39, 0x7C, 0x35, 0x32, 0x34, 0x36, 0x7C, 0x37, 0x36, 0x32,
0x32, 0x29, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x37, 0x30, 0x31, 0x7C, 0x33,
0x38, 0x32, 0x32, 0x7C, 0x34, 0x36, 0x36, 0x36, 0x29, 0x7C, 0x38, 0x28, 0x3F,
0x3A, 0x28, 0x3F, 0x3A, 0x33, 0x38, 0x32, 0x35, 0x7C, 0x37, 0x32, 0x32, 0x36,
0x29, 0x35, 0x7C, 0x34, 0x38, 0x31, 0x36, 0x29, 0x7C, 0x39, 0x39, 0x30, 0x39,
0x39, 0x32, 0x05, 0x32, 0x33, 0x33, 0x33, 0x33, 0x48, 0x05, 0x48, 0x06, 0xFA,
0x01, 0x28, 0x12, 0x1B, 0x33, 0x33, 0x36, 0x5C, 0x64, 0x5C, 0x64, 0x7C, 0x5B,
0x32, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x5B, 0x32, 0x33,
0x35, 0x36, 0x5D, 0x31, 0x31, 0x32, 0x03, 0x32, 0x31, 0x31, 0x48, 0x03, 0x48,
0x04, 0x48, 0x05, 0x8A, 0x02, 0x19, 0x12, 0x0C, 0x5B, 0x32, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x34, 0x2C, 0x35, 0x7D, 0x32, 0x05, 0x32, 0x30, 0x30, 0x30,
0x30, 0x48, 0x05, 0x48, 0x06, 0x0A, 0xA6, 0x01, 0x0A, 0x11, 0x12, 0x0B, 0x5B,
0x31, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x48, 0x03, 0x48,
0x04, 0x22, 0x10, 0x12, 0x07, 0x31, 0x32, 0x38, 0x7C, 0x39, 0x31, 0x31, 0x32,
0x03, 0x31, 0x32, 0x38, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x55, 0x59, 0xDA, 0x01, 0x10,
0x12, 0x07, 0x31, 0x32, 0x38, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x32,
0x38, 0x48, 0x03, 0xEA, 0x01, 0x2C, 0x12, 0x25, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x5B, 0x34, 0x2D, 0x39, 0x5D, 0x7C, 0x31, 0x5B, 0x32, 0x33, 0x36, 0x38, 0x5D,
0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x36, 0x38, 0x5D, 0x7C, 0x37, 0x38,
0x37, 0x29, 0x7C, 0x39, 0x31, 0x31, 0x32, 0x03, 0x31, 0x30, 0x34, 0xF2, 0x01,
0x0F, 0x12, 0x05, 0x31, 0x37, 0x38, 0x5C, 0x64, 0x32, 0x04, 0x31, 0x37, 0x38,
0x30, 0x48, 0x04, 0xFA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xCE, 0x01, 0x0A, 0x1F, 0x12, 0x17, 0x5B,
0x30, 0x34, 0x5D, 0x5C, 0x64, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x28, 0x3F, 0x3A,
0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x29, 0x3F, 0x48, 0x02, 0x48, 0x03,
0x48, 0x05, 0x22, 0x1E, 0x12, 0x14, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31,
0x2D, 0x33, 0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x35, 0x30, 0x29,
0x32, 0x02, 0x30, 0x31, 0x48, 0x02, 0x48, 0x03, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x55, 0x5A, 0xDA,
0x01, 0x1E, 0x12, 0x14, 0x30, 0x28, 0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33,
0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x35, 0x30, 0x29, 0x32, 0x02,
0x30, 0x31, 0x48, 0x02, 0x48, 0x03, 0xEA, 0x01, 0x20, 0x12, 0x1A, 0x30, 0x28,
0x3F, 0x3A, 0x30, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x33,
0x5D, 0x7C, 0x35, 0x30, 0x29, 0x7C, 0x34, 0x35, 0x34, 0x30, 0x30, 0x32, 0x02,
0x30, 0x31, 0xF2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x12, 0x12, 0x07, 0x34, 0x35, 0x34, 0x5C, 0x64,
0x5C, 0x64, 0x32, 0x05, 0x34, 0x35, 0x34, 0x30, 0x30, 0x48, 0x05, 0x8A, 0x02,
0x12, 0x12, 0x07, 0x34, 0x35, 0x34, 0x5C, 0x64, 0x5C, 0x64, 0x32, 0x05, 0x34,
0x35, 0x34, 0x30, 0x30, 0x48, 0x05, 0x0A, 0x7B, 0x0A, 0x09, 0x12, 0x05, 0x31,
0x5C, 0x64, 0x5C, 0x64, 0x48, 0x03, 0x22, 0x0F, 0x12, 0x08, 0x31, 0x31, 0x5B,
0x32, 0x33, 0x35, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x2A, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x56,
0x41, 0xDA, 0x01, 0x0F, 0x12, 0x08, 0x31, 0x31, 0x5B, 0x32, 0x33, 0x35, 0x38,
0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0xEA, 0x01, 0x0F, 0x12, 0x08, 0x31, 0x31,
0x5B, 0x32, 0x33, 0x35, 0x38, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x8A, 0x02, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x0A, 0x81, 0x01, 0x0A, 0x09, 0x12, 0x05, 0x39, 0x5C, 0x64, 0x5C, 0x64,
0x48, 0x03, 0x22, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C,
0x39, 0x39, 0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x56, 0x43, 0xDA,
0x01, 0x11, 0x12, 0x0A, 0x39, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x39, 0x39,
0x29, 0x32, 0x03, 0x39, 0x31, 0x31, 0xEA,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0x35, 0x29,
0x32, 0x02, 0x31, 0x35, 0xEA, 0x01, 0x0F, 0x12, 0x09, 0x31, 0x28, 0x3F, 0x3A,
0x31, 0x32, 0x7C, 0x35, 0x29, 0x32, 0x02, 0x31, 0x35, 0xF2, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFA, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x8A, 0x02,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A,
0xB5, 0x02, 0x0A, 0x14, 0x12, 0x0C, 0x5B, 0x31, 0x33, 0x34, 0x5D, 0x5C, 0x64,
0x7B, 0x32, 0x2C, 0x34, 0x7D, 0x48, 0x03, 0x48, 0x04, 0x48, 0x05, 0x22, 0x19,
0x12, 0x0E, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x5C, 0x64, 0x5C, 0x64, 0x7C,
0x31, 0x32, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x05, 0x2A,
0x18, 0x12, 0x0D, 0x34, 0x31, 0x28, 0x3F, 0x3A, 0x33, 0x34, 0x38, 0x7C, 0x38,
0x35, 0x31, 0x29, 0x32, 0x05, 0x34, 0x31, 0x33, 0x34, 0x38, 0x48, 0x05, 0x4A,
0x02, 0x5A, 0x41, 0xDA, 0x01, 0x1E, 0x12, 0x13, 0x31, 0x28, 0x3F, 0x3A, 0x30,
0x31, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x31, 0x32,
0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x48, 0x05, 0xEA, 0x01, 0x50,
0x12, 0x49, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x28, 0x3F, 0x3A, 0x31, 0x28, 0x3F,
0x3A, 0x31, 0x31, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x32, 0x30, 0x7C, 0x37, 0x29,
0x7C, 0x31, 0x5B, 0x31, 0x32, 0x5D, 0x7C, 0x37, 0x37, 0x28, 0x3F, 0x3A, 0x33,
0x5B, 0x32, 0x33, 0x37, 0x5D, 0x7C, 0x5B, 0x34, 0x35, 0x5D, 0x37, 0x7C, 0x36,
0x5B, 0x32, 0x37, 0x39, 0x5D, 0x7C, 0x39, 0x5B, 0x32, 0x36, 0x5D, 0x29, 0x29,
0x7C, 0x5B, 0x33, 0x34, 0x5D, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x32, 0x03, 0x31,
0x30, 0x37, 0xF2, 0x01, 0x49, 0x12, 0x3E, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x37,
0x38, 0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x37, 0x28, 0x3F, 0x3A, 0x30, 0x36, 0x34,
0x7C, 0x35, 0x36, 0x37, 0x29, 0x7C, 0x38, 0x31, 0x32, 0x36, 0x29, 0x7C, 0x34,
0x28, 0x3F, 0x3A, 0x33, 0x39, 0x34, 0x5B, 0x31, 0x36, 0x5D, 0x7C, 0x37, 0x37,
0x35, 0x31, 0x7C, 0x38, 0x38, 0x33, 0x37, 0x29, 0x7C, 0x34, 0x5B, 0x32, 0x33,
0x5D, 0x36, 0x39, 0x39, 0x32, 0x05, 0x33, 0x30, 0x37, 0x38, 0x32, 0x48, 0x05,
0xFA, 0x01, 0x0C, 0x12, 0x03, 0x31, 0x31, 0x31, 0x32, 0x03, 0x31, 0x31, 0x31,
0x48, 0x03, 0x8A, 0x02, 0x14, 0x12, 0x09, 0x5B, 0x33, 0x34, 0x5D, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x32, 0x05, 0x33, 0x30, 0x30, 0x30, 0x30, 0x48, 0x05, 0x0A,
0x87, 0x01, 0x0A, 0x0C,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x33, 0x2D, 0x35, 0x39,
0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48, 0x03, 0x2A, 0x1B, 0x12, 0x10,
0x33, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x32, 0x05, 0x33, 0x30, 0x30, 0x30, 0x30, 0x48, 0x05, 0x4A,
0x02, 0x5A, 0x57, 0xDA, 0x01, 0x15, 0x12, 0x0C, 0x31, 0x31, 0x32, 0x7C, 0x39,
0x39, 0x5B, 0x33, 0x2D, 0x35, 0x39, 0x5D, 0x32, 0x03, 0x31, 0x31, 0x32, 0x48,
0x03, 0xEA, 0x01, 0x3C, 0x12, 0x35, 0x31, 0x31, 0x5B, 0x32, 0x34, 0x36, 0x39,
0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x31, 0x33, 0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x39, 0x28, 0x3F, 0x3A, 0x35, 0x5B, 0x30,
0x32, 0x33, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D, 0x32, 0x35, 0x5D, 0x7C, 0x39,
0x5B, 0x33, 0x2D, 0x35, 0x39, 0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x32, 0xF2,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xFA, 0x01, 0x20, 0x12, 0x17, 0x31, 0x31, 0x34, 0x7C, 0x39, 0x28, 0x3F, 0x3A,
0x35, 0x5B, 0x30, 0x32, 0x33, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D, 0x32, 0x35,
0x5D, 0x29, 0x32, 0x03, 0x31, 0x31, 0x34, 0x48, 0x03, 0x8A, 0x02, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01
};
} // namespace
int short_metadata_size() {
return sizeof(data) / sizeof(data[0]);
}
const void* short_metadata_get() {
return data;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/short_metadata.cc
|
C++
|
unknown
| 313,402
|
/*
* Copyright (C) 2013 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef I18N_PHONENUMBERS_SHORT_METADATA_H_
#define I18N_PHONENUMBERS_SHORT_METADATA_H_
namespace i18n {
namespace phonenumbers {
int short_metadata_size();
const void* short_metadata_get();
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_SHORT_METADATA_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/short_metadata.h
|
C++
|
unknown
| 903
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "phonenumbers/shortnumberinfo.h"
#include <algorithm>
#include <string.h>
#include <iterator>
#include <map>
#include "phonenumbers/default_logger.h"
#include "phonenumbers/matcher_api.h"
#include "phonenumbers/phonemetadata.pb.h"
#include "phonenumbers/phonenumberutil.h"
#include "phonenumbers/regex_based_matcher.h"
#include "phonenumbers/region_code.h"
#include "phonenumbers/short_metadata.h"
namespace i18n {
namespace phonenumbers {
using google::protobuf::RepeatedField;
using std::map;
using std::string;
bool LoadCompiledInMetadata(PhoneMetadataCollection* metadata) {
if (!metadata->ParseFromArray(short_metadata_get(), short_metadata_size())) {
LOG(ERROR) << "Could not parse binary data.";
return false;
}
return true;
}
ShortNumberInfo::ShortNumberInfo()
: phone_util_(*PhoneNumberUtil::GetInstance()),
matcher_api_(new RegexBasedMatcher()),
region_to_short_metadata_map_(new map<string, PhoneMetadata>()),
regions_where_emergency_numbers_must_be_exact_(new set<string>()) {
PhoneMetadataCollection metadata_collection;
if (!LoadCompiledInMetadata(&metadata_collection)) {
LOG(DFATAL) << "Could not parse compiled-in metadata.";
return;
}
for (RepeatedPtrField<PhoneMetadata>::const_iterator it =
metadata_collection.metadata().begin();
it != metadata_collection.metadata().end();
++it) {
const string& region_code = it->id();
region_to_short_metadata_map_->insert(std::make_pair(region_code, *it));
}
regions_where_emergency_numbers_must_be_exact_->insert("BR");
regions_where_emergency_numbers_must_be_exact_->insert("CL");
regions_where_emergency_numbers_must_be_exact_->insert("NI");
}
ShortNumberInfo::~ShortNumberInfo() {}
// Returns a pointer to the phone metadata for the appropriate region or NULL
// if the region code is invalid or unknown.
const PhoneMetadata* ShortNumberInfo::GetMetadataForRegion(
const string& region_code) const {
map<string, PhoneMetadata>::const_iterator it =
region_to_short_metadata_map_->find(region_code);
if (it != region_to_short_metadata_map_->end()) {
return &it->second;
}
return NULL;
}
namespace {
// TODO: Once we have benchmarked ShortNumberInfo, consider if it is
// worth keeping this performance optimization.
bool MatchesPossibleNumberAndNationalNumber(
const MatcherApi& matcher_api,
const string& number,
const PhoneNumberDesc& desc) {
const RepeatedField<int>& lengths = desc.possible_length();
if (desc.possible_length_size() > 0 &&
std::find(lengths.begin(), lengths.end(), number.length()) ==
lengths.end()) {
return false;
}
return matcher_api.MatchNationalNumber(number, desc, false);
}
} // namespace
// Helper method to check that the country calling code of the number matches
// the region it's being dialed from.
bool ShortNumberInfo::RegionDialingFromMatchesNumber(const PhoneNumber& number,
const string& region_dialing_from) const {
list<string> region_codes;
phone_util_.GetRegionCodesForCountryCallingCode(number.country_code(),
®ion_codes);
return std::find(region_codes.begin(),
region_codes.end(),
region_dialing_from) != region_codes.end();
}
bool ShortNumberInfo::IsPossibleShortNumberForRegion(const PhoneNumber& number,
const string& region_dialing_from) const {
if (!RegionDialingFromMatchesNumber(number, region_dialing_from)) {
return false;
}
const PhoneMetadata* phone_metadata =
GetMetadataForRegion(region_dialing_from);
if (!phone_metadata) {
return false;
}
string short_number;
phone_util_.GetNationalSignificantNumber(number, &short_number);
const RepeatedField<int>& lengths =
phone_metadata->general_desc().possible_length();
return (std::find(lengths.begin(), lengths.end(), short_number.length()) !=
lengths.end());
}
bool ShortNumberInfo::IsPossibleShortNumber(const PhoneNumber& number) const {
list<string> region_codes;
phone_util_.GetRegionCodesForCountryCallingCode(number.country_code(),
®ion_codes);
string short_number;
phone_util_.GetNationalSignificantNumber(number, &short_number);
for (list<string>::const_iterator it = region_codes.begin();
it != region_codes.end(); ++it) {
const PhoneMetadata* phone_metadata = GetMetadataForRegion(*it);
if (!phone_metadata) {
continue;
}
const RepeatedField<int>& lengths =
phone_metadata->general_desc().possible_length();
if (std::find(lengths.begin(), lengths.end(), short_number.length()) !=
lengths.end()) {
return true;
}
}
return false;
}
bool ShortNumberInfo::IsValidShortNumberForRegion(
const PhoneNumber& number, const string& region_dialing_from) const {
if (!RegionDialingFromMatchesNumber(number, region_dialing_from)) {
return false;
}
const PhoneMetadata* phone_metadata =
GetMetadataForRegion(region_dialing_from);
if (!phone_metadata) {
return false;
}
string short_number;
phone_util_.GetNationalSignificantNumber(number, &short_number);
const PhoneNumberDesc& general_desc = phone_metadata->general_desc();
if (!MatchesPossibleNumberAndNationalNumber(*matcher_api_, short_number,
general_desc)) {
return false;
}
const PhoneNumberDesc& short_number_desc = phone_metadata->short_code();
return MatchesPossibleNumberAndNationalNumber(*matcher_api_, short_number,
short_number_desc);
}
bool ShortNumberInfo::IsValidShortNumber(const PhoneNumber& number) const {
list<string> region_codes;
phone_util_.GetRegionCodesForCountryCallingCode(number.country_code(),
®ion_codes);
string region_code;
GetRegionCodeForShortNumberFromRegionList(number, region_codes, ®ion_code);
if (region_codes.size() > 1 && region_code != RegionCode::GetUnknown()) {
return true;
}
return IsValidShortNumberForRegion(number, region_code);
}
ShortNumberInfo::ShortNumberCost ShortNumberInfo::GetExpectedCostForRegion(
const PhoneNumber& number, const string& region_dialing_from) const {
if (!RegionDialingFromMatchesNumber(number, region_dialing_from)) {
return ShortNumberInfo::UNKNOWN_COST;
}
const PhoneMetadata* phone_metadata =
GetMetadataForRegion(region_dialing_from);
if (!phone_metadata) {
return ShortNumberInfo::UNKNOWN_COST;
}
string short_number;
phone_util_.GetNationalSignificantNumber(number, &short_number);
// The possible lengths are not present for a particular sub-type if they
// match the general description; for this reason, we check the possible
// lengths against the general description first to allow an early exit if
// possible.
const RepeatedField<int>& lengths =
phone_metadata->general_desc().possible_length();
if (std::find(lengths.begin(), lengths.end(), short_number.length()) ==
lengths.end()) {
return ShortNumberInfo::UNKNOWN_COST;
}
// The cost categories are tested in order of decreasing expense, since if
// for some reason the patterns overlap the most expensive matching cost
// category should be returned.
if (MatchesPossibleNumberAndNationalNumber(*matcher_api_, short_number,
phone_metadata->premium_rate())) {
return ShortNumberInfo::PREMIUM_RATE;
}
if (MatchesPossibleNumberAndNationalNumber(*matcher_api_, short_number,
phone_metadata->standard_rate())) {
return ShortNumberInfo::STANDARD_RATE;
}
if (MatchesPossibleNumberAndNationalNumber(*matcher_api_, short_number,
phone_metadata->toll_free())) {
return ShortNumberInfo::TOLL_FREE;
}
if (IsEmergencyNumber(short_number, region_dialing_from)) {
// Emergency numbers are implicitly toll-free.
return ShortNumberInfo::TOLL_FREE;
}
return ShortNumberInfo::UNKNOWN_COST;
}
ShortNumberInfo::ShortNumberCost ShortNumberInfo::GetExpectedCost(
const PhoneNumber& number) const {
list<string> region_codes;
phone_util_.GetRegionCodesForCountryCallingCode(number.country_code(),
®ion_codes);
if (region_codes.size() == 0) {
return ShortNumberInfo::UNKNOWN_COST;
}
if (region_codes.size() == 1) {
return GetExpectedCostForRegion(number, region_codes.front());
}
ShortNumberInfo::ShortNumberCost cost = ShortNumberInfo::TOLL_FREE;
for (list<string>::const_iterator it = region_codes.begin();
it != region_codes.end(); ++it) {
ShortNumberInfo::ShortNumberCost cost_for_region =
GetExpectedCostForRegion(number, *it);
switch (cost_for_region) {
case ShortNumberInfo::PREMIUM_RATE:
return ShortNumberInfo::PREMIUM_RATE;
case ShortNumberInfo::UNKNOWN_COST:
return ShortNumberInfo::UNKNOWN_COST;
case ShortNumberInfo::STANDARD_RATE:
if (cost != ShortNumberInfo::UNKNOWN_COST) {
cost = ShortNumberInfo::STANDARD_RATE;
}
break;
case ShortNumberInfo::TOLL_FREE:
// Do nothing.
break;
default:
LOG(ERROR) << "Unrecognised cost for region: "
<< static_cast<int>(cost_for_region);
break;
}
}
return cost;
}
void ShortNumberInfo::GetRegionCodeForShortNumberFromRegionList(
const PhoneNumber& number, const list<string>& region_codes,
string* region_code) const {
if (region_codes.size() == 0) {
region_code->assign(RegionCode::GetUnknown());
return;
} else if (region_codes.size() == 1) {
region_code->assign(region_codes.front());
return;
}
string national_number;
phone_util_.GetNationalSignificantNumber(number, &national_number);
for (list<string>::const_iterator it = region_codes.begin();
it != region_codes.end(); ++it) {
const PhoneMetadata* phone_metadata = GetMetadataForRegion(*it);
if (phone_metadata != NULL &&
MatchesPossibleNumberAndNationalNumber(*matcher_api_, national_number,
phone_metadata->short_code())) {
// The number is valid for this region.
region_code->assign(*it);
return;
}
}
region_code->assign(RegionCode::GetUnknown());
}
string ShortNumberInfo::GetExampleShortNumber(const string& region_code) const {
const PhoneMetadata* phone_metadata = GetMetadataForRegion(region_code);
if (!phone_metadata) {
return "";
}
const PhoneNumberDesc& desc = phone_metadata->short_code();
if (desc.has_example_number()) {
return desc.example_number();
}
return "";
}
string ShortNumberInfo::GetExampleShortNumberForCost(const string& region_code,
ShortNumberInfo::ShortNumberCost cost) const {
const PhoneMetadata* phone_metadata = GetMetadataForRegion(region_code);
if (!phone_metadata) {
return "";
}
const PhoneNumberDesc* desc = NULL;
switch (cost) {
case TOLL_FREE:
desc = &(phone_metadata->toll_free());
break;
case STANDARD_RATE:
desc = &(phone_metadata->standard_rate());
break;
case PREMIUM_RATE:
desc = &(phone_metadata->premium_rate());
break;
default:
// UNKNOWN_COST numbers are computed by the process of elimination from
// the other cost categories.
break;
}
if (desc != NULL && desc->has_example_number()) {
return desc->example_number();
}
return "";
}
bool ShortNumberInfo::ConnectsToEmergencyNumber(const string& number,
const string& region_code) const {
return MatchesEmergencyNumberHelper(number, region_code,
true /* allows prefix match */);
}
bool ShortNumberInfo::IsEmergencyNumber(const string& number,
const string& region_code) const {
return MatchesEmergencyNumberHelper(number, region_code,
false /* doesn't allow prefix match */);
}
bool ShortNumberInfo::MatchesEmergencyNumberHelper(const string& number,
const string& region_code, bool allow_prefix_match) const {
string extracted_number;
phone_util_.ExtractPossibleNumber(number, &extracted_number);
if (phone_util_.StartsWithPlusCharsPattern(extracted_number)) {
// Returns false if the number starts with a plus sign. We don't believe
// dialing the country code before emergency numbers (e.g. +1911) works,
// but later, if that proves to work, we can add additional logic here to
// handle it.
return false;
}
const PhoneMetadata* metadata = GetMetadataForRegion(region_code);
if (!metadata || !metadata->has_emergency()) {
return false;
}
phone_util_.NormalizeDigitsOnly(&extracted_number);
bool allow_prefix_match_for_region =
allow_prefix_match &&
regions_where_emergency_numbers_must_be_exact_->find(region_code) ==
regions_where_emergency_numbers_must_be_exact_->end();
return matcher_api_->MatchNationalNumber(
extracted_number, metadata->emergency(), allow_prefix_match_for_region);
}
bool ShortNumberInfo::IsCarrierSpecific(const PhoneNumber& number) const {
list<string> region_codes;
phone_util_.GetRegionCodesForCountryCallingCode(number.country_code(),
®ion_codes);
string region_code;
GetRegionCodeForShortNumberFromRegionList(number, region_codes, ®ion_code);
string national_number;
phone_util_.GetNationalSignificantNumber(number, &national_number);
const PhoneMetadata* phone_metadata = GetMetadataForRegion(region_code);
return phone_metadata &&
MatchesPossibleNumberAndNationalNumber(*matcher_api_, national_number,
phone_metadata->carrier_specific());
}
bool ShortNumberInfo::IsCarrierSpecificForRegion(const PhoneNumber& number,
const string& region_dialing_from) const {
if (!RegionDialingFromMatchesNumber(number, region_dialing_from)) {
return false;
}
string national_number;
phone_util_.GetNationalSignificantNumber(number, &national_number);
const PhoneMetadata* phone_metadata =
GetMetadataForRegion(region_dialing_from);
return phone_metadata &&
MatchesPossibleNumberAndNationalNumber(*matcher_api_, national_number,
phone_metadata->carrier_specific());
}
bool ShortNumberInfo::IsSmsServiceForRegion(const PhoneNumber& number,
const string& region_dialing_from) const {
if (!RegionDialingFromMatchesNumber(number, region_dialing_from)) {
return false;
}
string national_number;
phone_util_.GetNationalSignificantNumber(number, &national_number);
const PhoneMetadata* phone_metadata =
GetMetadataForRegion(region_dialing_from);
return phone_metadata &&
MatchesPossibleNumberAndNationalNumber(*matcher_api_, national_number,
phone_metadata->sms_services());
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/shortnumberinfo.cc
|
C++
|
unknown
| 15,573
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Library for obtaining information about international short phone numbers,
// such as short codes and emergency numbers. Note most commercial short
// numbers are not handled here, but by the phonenumberutil.
#ifndef I18N_PHONENUMBERS_SHORTNUMBERINFO_H_
#define I18N_PHONENUMBERS_SHORTNUMBERINFO_H_
#include <list>
#include <map>
#include <set>
#include <string>
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/base/memory/scoped_ptr.h"
namespace i18n {
namespace phonenumbers {
using std::list;
using std::map;
using std::set;
using std::string;
class MatcherApi;
class PhoneMetadata;
class PhoneNumber;
class PhoneNumberUtil;
class ShortNumberInfo {
public:
ShortNumberInfo();
~ShortNumberInfo();
// Cost categories of short numbers.
enum ShortNumberCost {
TOLL_FREE,
STANDARD_RATE,
PREMIUM_RATE,
UNKNOWN_COST
};
// Check whether a short number is a possible number when dialled from a
// region, given the number in the form of a string, and the region where the
// number is dialed from. This provides a more lenient check than
// IsValidShortNumberForRegion.
bool IsPossibleShortNumberForRegion(
const PhoneNumber& short_number,
const string& region_dialing_from) const;
// Check whether a short number is a possible number. If a country calling
// code is shared by multiple regions, this returns true if it's possible in
// any of them. This provides a more lenient check than IsValidShortNumber.
// See IsPossibleShortNumberForRegion for details.
bool IsPossibleShortNumber(const PhoneNumber& number) const;
// Tests whether a short number matches a valid pattern in a region. Note
// that this doesn't verify the number is actually in use, which is
// impossible to tell by just looking at the number itself.
bool IsValidShortNumberForRegion(
const PhoneNumber& short_number,
const string& region_dialing_from) const;
// Tests whether a short number matches a valid pattern. If a country calling
// code is shared by multiple regions, this returns true if it's valid in any
// of them. Note that this doesn't verify the number is actually in use,
// which is impossible to tell by just looking at the number itself. See
// IsValidShortNumberForRegion for details.
bool IsValidShortNumber(const PhoneNumber& number) const;
// Gets the expected cost category of a short number when dialled from a
// region (however, nothing is implied about its validity). If it is
// important that the number is valid, then its validity must first be
// checked using IsValidShortNumberForRegion. Note that emergency numbers are
// always considered toll-free. Example usage:
//
// PhoneNumber number;
// phone_util.Parse("110", "US", &number);
// ...
// string region_code("CA");
// ShortNumberInfo short_info;
// if (short_info.IsValidShortNumberForRegion(number, region_code)) {
// ShortNumberInfo::ShortNumberCost cost =
// short_info.GetExpectedCostForRegion(number, region_code);
// // Do something with the cost information here.
// }
ShortNumberCost GetExpectedCostForRegion(
const PhoneNumber& short_number,
const string& region_dialing_from) const;
// Gets the expected cost category of a short number (however, nothing is
// implied about its validity). If the country calling code is unique to a
// region, this method behaves exactly the same as GetExpectedCostForRegion.
// However, if the country calling code is shared by multiple regions, then
// it returns the highest cost in the sequence PREMIUM_RATE, UNKNOWN_COST,
// STANDARD_RATE, TOLL_FREE. The reason for the position of UNKNOWN_COST in
// this order is that if a number is UNKNOWN_COST in one region but
// STANDARD_RATE or TOLL_FREE in another, its expected cost cannot be
// estimated as one of the latter since it might be a PREMIUM_RATE number.
//
// For example, if a number is STANDARD_RATE in the US, but TOLL_FREE in
// Canada, the expected cost returned by this method will be STANDARD_RATE,
// since the NANPA countries share the same country calling code.
//
// Note: If the region from which the number is dialed is known, it is highly
// preferable to call GetExpectedCostForRegion instead.
ShortNumberCost GetExpectedCost(const PhoneNumber& number) const;
// Gets a valid short number for the specified region.
string GetExampleShortNumber(const string& region_code) const;
// Gets a valid short number for the specified cost category.
string GetExampleShortNumberForCost(const string& region_code,
ShortNumberCost cost) const;
// Returns true if the number might be used to connect to an emergency service
// in the given region.
//
// This method takes into account cases where the number might contain
// formatting, or might have additional digits appended (when it is okay to do
// that in the region specified).
bool ConnectsToEmergencyNumber(const string& number,
const string& region_code) const;
// Returns true if the number exactly matches an emergency service number in
// the given region.
//
// This method takes into account cases where the number might contain
// formatting, but doesn't allow additional digits to be appended.
bool IsEmergencyNumber(const string& number,
const string& region_code) const;
// Given a valid short number, determines whether it is carrier-specific
// (however, nothing is implied about its validity). Carrier-specific numbers
// may connect to a different end-point, or not connect at all, depending on
// the user's carrier. If it is important that the number is valid, then its
// validity must first be checked using IsValidShortNumber or
// IsValidShortNumberForRegion.
bool IsCarrierSpecific(const PhoneNumber& number) const;
// Given a valid short number, determines whether it is carrier-specific when
// dialed from the given region (however, nothing is implied about its
// validity). Carrier-specific numbers may connect to a different end-point,
// or not connect at all, depending on the user's carrier. If it is important
// that the number is valid, then its validity must first be checked using
// IsValidShortNumber or IsValidShortNumberForRegion. Returns false if the
// number doesn't match the region provided.
bool IsCarrierSpecificForRegion(
const PhoneNumber& number,
const string& region_dialing_from) const;
// Given a valid short number, determines whether it is an SMS service
// (however, nothing is implied about its validity). An SMS service is where
// the primary or only intended usage is to receive and/or send text messages
// (SMSs). This includes MMS as MMS numbers downgrade to SMS if the other
// party isn't MMS-capable. If it is important that the number is valid, then
// its validity must first be checked using IsValidShortNumber or
// IsValidShortNumberForRegion. Returns false if the number doesn't match the
// region provided.
bool IsSmsServiceForRegion(
const PhoneNumber& number,
const string& region_dialing_from) const;
private:
const PhoneNumberUtil& phone_util_;
const scoped_ptr<const MatcherApi> matcher_api_;
// A mapping from a RegionCode to the PhoneMetadata for that region.
scoped_ptr<map<string, PhoneMetadata> >
region_to_short_metadata_map_;
// In these countries, if extra digits are added to an emergency number, it no
// longer connects to the emergency service.
scoped_ptr<set<string> >
regions_where_emergency_numbers_must_be_exact_;
const i18n::phonenumbers::PhoneMetadata* GetMetadataForRegion(
const string& region_code) const;
bool RegionDialingFromMatchesNumber(const PhoneNumber& number,
const string& region_dialing_from) const;
// Helper method to get the region code for a given phone number, from a list
// of possible region codes. If the list contains more than one region, the
// first region for which the number is valid is returned.
void GetRegionCodeForShortNumberFromRegionList(
const PhoneNumber& number,
const list<string>& region_codes,
string* region_code) const;
bool MatchesEmergencyNumberHelper(const string& number,
const string& region_code,
bool allow_prefix_match) const;
DISALLOW_COPY_AND_ASSIGN(ShortNumberInfo);
};
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_SHORTNUMBERINFO_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/shortnumberinfo.h
|
C++
|
unknown
| 9,228
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef I18N_PHONENUMBERS_STL_UTIL_H_
#define I18N_PHONENUMBERS_STL_UTIL_H_
namespace i18n {
namespace phonenumbers {
namespace gtl {
// Compares the first attribute of two pairs.
struct OrderByFirst {
template <typename T>
bool operator()(const T& p1, const T& p2) const {
return p1.first < p2.first;
}
};
// Deletes the second attribute (pointer type expected) of the pairs contained
// in the provided range.
template <typename ForwardIterator>
void STLDeleteContainerPairSecondPointers(const ForwardIterator& begin,
const ForwardIterator& end) {
for (ForwardIterator it = begin; it != end; ++it) {
delete it->second;
}
}
// Deletes the pointers contained in the provided container.
template <typename T>
void STLDeleteElements(T* container) {
for (typename T::iterator it = container->begin(); it != container->end();
++it) {
delete *it;
}
}
} // namespace gtl
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_STL_UTIL_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/stl_util.h
|
C++
|
unknown
| 1,641
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "phonenumbers/string_byte_sink.h"
#include <string>
using std::string;
namespace i18n {
namespace phonenumbers {
StringByteSink::StringByteSink(string* dest) : dest_(dest) {}
StringByteSink::~StringByteSink() {}
void StringByteSink::Append(const char* data, int32_t n) {
dest_->append(data, n);
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/string_byte_sink.cc
|
C++
|
unknown
| 969
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// We need this because when ICU is built without std::string support,
// UnicodeString::toUTF8String() is not available. The alternative,
// UnicodeString::toUTF8(), requires an implementation of a string byte sink.
// See unicode/unistr.h and unicode/bytestream.h in ICU for more details.
#include <string>
#include <unicode/unistr.h>
namespace i18n {
namespace phonenumbers {
class StringByteSink : public icu::ByteSink {
public:
// Constructs a ByteSink that will append bytes to the dest string.
explicit StringByteSink(std::string* dest);
virtual ~StringByteSink();
virtual void Append(const char* data, int32_t n);
private:
std::string* const dest_;
};
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/string_byte_sink.h
|
C++
|
unknown
| 1,333
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include <algorithm>
#include <cassert>
#include <cstring>
#include <sstream>
#include "phonenumbers/stringutil.h"
namespace i18n {
namespace phonenumbers {
using std::equal;
using std::stringstream;
string operator+(const string& s, int n) { // NOLINT(runtime/string)
stringstream stream;
stream << s << n;
string result;
stream >> result;
return result;
}
template <typename T>
string GenericSimpleItoa(const T& n) {
stringstream stream;
stream << n;
string result;
stream >> result;
return result;
}
string SimpleItoa(int n) {
return GenericSimpleItoa(n);
}
string SimpleItoa(uint64 n) {
return GenericSimpleItoa(n);
}
string SimpleItoa(int64 n) {
return GenericSimpleItoa(n);
}
bool HasPrefixString(const string& s, const string& prefix) {
return s.size() >= prefix.size() &&
equal(s.begin(), s.begin() + prefix.size(), prefix.begin());
}
size_t FindNth(const string& s, char c, int n) {
size_t pos = string::npos;
for (int i = 0; i < n; ++i) {
pos = s.find_first_of(c, pos + 1);
if (pos == string::npos) {
break;
}
}
return pos;
}
void SplitStringUsing(const string& s, const string& delimiter,
vector<string>* result) {
assert(result);
size_t start_pos = 0;
size_t find_pos = string::npos;
if (delimiter.empty()) {
return;
}
while ((find_pos = s.find(delimiter, start_pos)) != string::npos) {
const string substring = s.substr(start_pos, find_pos - start_pos);
if (!substring.empty()) {
result->push_back(substring);
}
start_pos = find_pos + delimiter.length();
}
if (start_pos != s.length()) {
result->push_back(s.substr(start_pos));
}
}
void StripString(string* s, const char* remove, char replacewith) {
const char* str_start = s->c_str();
const char* str = str_start;
for (str = strpbrk(str, remove);
str != NULL;
str = strpbrk(str + 1, remove)) {
(*s)[str - str_start] = replacewith;
}
}
bool TryStripPrefixString(const string& in, const string& prefix, string* out) {
assert(out);
const bool has_prefix = in.compare(0, prefix.length(), prefix) == 0;
out->assign(has_prefix ? in.substr(prefix.length()) : in);
return has_prefix;
}
bool HasSuffixString(const string& s, const string& suffix) {
if (s.length() < suffix.length()) {
return false;
}
return s.compare(s.length() - suffix.length(), suffix.length(), suffix) == 0;
}
template <typename T>
void GenericAtoi(const string& s, T* out) {
stringstream stream;
stream << s;
stream >> *out;
}
void safe_strto32(const string& s, int32 *n) {
GenericAtoi(s, n);
}
void safe_strtou64(const string& s, uint64 *n) {
GenericAtoi(s, n);
}
void safe_strto64(const string& s, int64* n) {
GenericAtoi(s, n);
}
void strrmm(string* s, const string& chars) {
for (string::iterator it = s->begin(); it != s->end(); ) {
const char current_char = *it;
if (chars.find(current_char) != string::npos) {
it = s->erase(it);
} else {
++it;
}
}
}
int GlobalReplaceSubstring(const string& substring,
const string& replacement,
string* s) {
assert(s != NULL);
if (s->empty() || substring.empty())
return 0;
string tmp;
int num_replacements = 0;
int pos = 0;
for (size_t match_pos = s->find(substring.data(), pos, substring.length());
match_pos != string::npos;
pos = match_pos + substring.length(),
match_pos = s->find(substring.data(), pos, substring.length())) {
++num_replacements;
// Append the original content before the match.
tmp.append(*s, pos, match_pos - pos);
// Append the replacement for the match.
tmp.append(replacement.begin(), replacement.end());
}
// Append the content after the last match.
tmp.append(*s, pos, s->length() - pos);
s->swap(tmp);
return num_replacements;
}
// StringHolder class
StringHolder::StringHolder(const string& s)
: string_(&s),
cstring_(NULL),
len_(s.size())
{}
StringHolder::StringHolder(const char* s)
: string_(NULL),
cstring_(s),
len_(std::strlen(s))
{}
StringHolder::StringHolder(uint64 n)
: converted_string_(SimpleItoa(n)),
string_(&converted_string_),
cstring_(NULL),
len_(converted_string_.length())
{}
StringHolder::~StringHolder() {}
// StrCat
// Implements s += sh; (s: string, sh: StringHolder)
string& operator+=(string& lhs, const StringHolder& rhs) {
const string* const s = rhs.GetString();
if (s) {
lhs += *s;
} else {
const char* const cs = rhs.GetCString();
if (cs)
lhs.append(cs, rhs.Length());
}
return lhs;
}
string StrCat(const StringHolder& s1, const StringHolder& s2) {
string result;
result.reserve(s1.Length() + s2.Length() + 1);
result += s1;
result += s2;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + 1);
result += s1;
result += s2;
result += s3;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + 1);
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length() + s12.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
result += s12;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length() + s12.Length() +
s13.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
result += s12;
result += s13;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length() + s12.Length() +
s13.Length() + s14.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
result += s12;
result += s13;
result += s14;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14,
const StringHolder& s15) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length() + s12.Length() +
s13.Length() + s14.Length() + s15.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
result += s12;
result += s13;
result += s14;
result += s15;
return result;
}
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14,
const StringHolder& s15, const StringHolder& s16) {
string result;
result.reserve(s1.Length() + s2.Length() + s3.Length() + s4.Length() +
s5.Length() + s6.Length() + s7.Length() + s8.Length() +
s9.Length() + s10.Length() + s11.Length() + s12.Length() +
s13.Length() + s14.Length() + s15.Length() + s16.Length());
result += s1;
result += s2;
result += s3;
result += s4;
result += s5;
result += s6;
result += s7;
result += s8;
result += s9;
result += s10;
result += s11;
result += s12;
result += s13;
result += s14;
result += s15;
result += s16;
return result;
}
// StrAppend
void StrAppend(string* dest, const StringHolder& s1) {
assert(dest);
dest->reserve(dest->length() + s1.Length() + 1);
*dest += s1;
}
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2) {
assert(dest);
dest->reserve(dest->length() + s1.Length() + s2.Length() + 1);
*dest += s1;
*dest += s2;
}
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3) {
assert(dest);
dest->reserve(dest->length() + s1.Length() + s2.Length() + s3.Length() + 1);
*dest += s1;
*dest += s2;
*dest += s3;
}
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4) {
assert(dest);
dest->reserve(dest->length() + s1.Length() + s2.Length() + s3.Length() +
s4.Length() + 1);
*dest += s1;
*dest += s2;
*dest += s3;
*dest += s4;
}
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5) {
assert(dest);
dest->reserve(dest->length() + s1.Length() + s2.Length() + s3.Length() +
s4.Length() + s5.Length() + 1);
*dest += s1;
*dest += s2;
*dest += s3;
*dest += s4;
*dest += s5;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/stringutil.cc
|
C++
|
unknown
| 15,627
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#ifndef I18N_PHONENUMBERS_STRINGUTIL_H_
#define I18N_PHONENUMBERS_STRINGUTIL_H_
#include <cstddef>
#include <string>
#include <vector>
#include "phonenumbers/base/basictypes.h"
namespace i18n {
namespace phonenumbers {
using std::string;
using std::vector;
// Supports string("hello") + 10.
string operator+(const string& s, int n); // NOLINT(runtime/string)
// Converts integer to string.
string SimpleItoa(uint64 n);
string SimpleItoa(int64 n);
string SimpleItoa(int n);
// Returns whether the provided string starts with the supplied prefix.
bool HasPrefixString(const string& s, const string& prefix);
// Returns the index of the nth occurence of c in s or string::npos if less than
// n occurrences are present.
size_t FindNth(const string& s, char c, int n);
// Splits a string using a character delimiter. Appends the components to the
// provided vector. Note that empty tokens are ignored.
void SplitStringUsing(const string& s, const string& delimiter,
vector<string>* result);
// Replaces any occurrence of the character 'remove' (or the characters
// in 'remove') with the character 'replacewith'.
void StripString(string* s, const char* remove, char replacewith);
// Returns true if 'in' starts with 'prefix' and writes 'in' minus 'prefix' into
// 'out'.
bool TryStripPrefixString(const string& in, const string& prefix, string* out);
// Returns true if 's' ends with 'suffix'.
bool HasSuffixString(const string& s, const string& suffix);
// Converts string to int32.
void safe_strto32(const string& s, int32 *n);
// Converts string to uint64.
void safe_strtou64(const string& s, uint64 *n);
// Converts string to int64.
void safe_strto64(const string& s, int64* n);
// Remove all occurrences of a given set of characters from a string.
void strrmm(string* s, const string& chars);
// Replaces all instances of 'substring' in 's' with 'replacement'. Returns the
// number of instances replaced. Replacements are not subject to re-matching.
int GlobalReplaceSubstring(const string& substring, const string& replacement,
string* s);
// Holds a reference to a std::string or C string. It can also be constructed
// from an integer which is converted to a string.
class StringHolder {
public:
// Don't make the constructors explicit to make the StrCat usage convenient.
StringHolder(const string& s); // NOLINT(runtime/explicit)
StringHolder(const char* s); // NOLINT(runtime/explicit)
StringHolder(uint64 n); // NOLINT(runtime/explicit)
~StringHolder();
const string* GetString() const {
return string_;
}
const char* GetCString() const {
return cstring_;
}
size_t Length() const {
return len_;
}
private:
const string converted_string_; // Stores the string converted from integer.
const string* const string_;
const char* const cstring_;
const size_t len_;
};
string& operator+=(string& lhs, const StringHolder& rhs);
// Efficient string concatenation.
string StrCat(const StringHolder& s1, const StringHolder& s2);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14,
const StringHolder& s15);
string StrCat(const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5, const StringHolder& s6,
const StringHolder& s7, const StringHolder& s8,
const StringHolder& s9, const StringHolder& s10,
const StringHolder& s11, const StringHolder& s12,
const StringHolder& s13, const StringHolder& s14,
const StringHolder& s15, const StringHolder& s16);
void StrAppend(string* dest, const StringHolder& s1);
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2);
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3);
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4);
void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
const StringHolder& s3, const StringHolder& s4,
const StringHolder& s5);
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_STRINGUTIL_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/stringutil.h
|
C++
|
unknown
| 8,276
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "phonenumbers/metadata.h"
namespace i18n {
namespace phonenumbers {
namespace {
static const unsigned char data[] = {
0x0A, 0xAD, 0x01, 0x0A, 0x09, 0x12, 0x05, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x48,
0x06, 0x12, 0x0F, 0x12, 0x05, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x32, 0x06, 0x31,
0x32, 0x33, 0x34, 0x35, 0x36, 0x1A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x22, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0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7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32,
0x20, 0x24, 0x33, 0xAA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xC0, 0x06, 0x0A, 0x1E, 0x12,
0x10, 0x5B, 0x31, 0x2D, 0x33, 0x36, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x39,
0x2C, 0x31, 0x30, 0x7D, 0x48, 0x06, 0x48, 0x07, 0x48, 0x08, 0x48, 0x09, 0x48,
0x0A, 0x48, 0x0B, 0x12, 0x24, 0x12, 0x0C, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x5C,
0x64, 0x7B, 0x35, 0x2C, 0x39, 0x7D, 0x32, 0x0A, 0x31, 0x32, 0x33, 0x34, 0x35,
0x36, 0x37, 0x38, 0x39, 0x30, 0x48, 0x06, 0x48, 0x07, 0x48, 0x08, 0x48, 0x09,
0x48, 0x0A, 0x1A, 0x24, 0x12, 0x12, 0x39, 0x5C, 0x64, 0x7B, 0x31, 0x30, 0x7D,
0x7C, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x5C, 0x64, 0x7B, 0x39, 0x7D, 0x32, 0x0A,
0x39, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x48, 0x0A, 0x48,
0x0B, 0x22, 0x17, 0x12, 0x07, 0x38, 0x30, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32,
0x0A, 0x38, 0x30, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x48, 0x0A,
0x2A, 0x1E, 0x12, 0x0E, 0x36, 0x28, 0x30, 0x5C, 0x64, 0x7C, 0x31, 0x30, 0x29,
0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0A, 0x36, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x39, 0x30, 0x48, 0x0A, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x52, 0x50, 0x36, 0x5A,
0x02, 0x30, 0x30, 0x62, 0x01, 0x30, 0x7A, 0x15, 0x30, 0x28, 0x3F, 0x3A, 0x28,
0x31, 0x31, 0x7C, 0x33, 0x34, 0x33, 0x7C, 0x33, 0x37, 0x31, 0x35, 0x29, 0x31,
0x35, 0x29, 0x3F, 0x82, 0x01, 0x03, 0x39, 0x24, 0x31, 0x9A, 0x01, 0x2A, 0x0A,
0x15, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31,
0x20, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x02, 0x31, 0x31, 0x22, 0x03, 0x30,
0x24, 0x31, 0x9A, 0x01, 0x34, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A,
0x0C, 0x31, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x32, 0x33, 0x5D,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x32, 0x0A, 0x19, 0x28, 0x5C, 0x64,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x32,
0x20, 0x31, 0x35, 0x20, 0x24, 0x33, 0x2D, 0x24, 0x34, 0x1A, 0x03, 0x39, 0x31,
0x31, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x46, 0x0A, 0x19, 0x28, 0x5C,
0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24,
0x32, 0x20, 0x24, 0x33, 0x2D, 0x24, 0x34, 0x1A, 0x11, 0x39, 0x28, 0x3F, 0x3A,
0x31, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x32, 0x33, 0x5D, 0x29,
0x22, 0x03, 0x30, 0x24, 0x31, 0x2A, 0x07, 0x30, 0x24, 0x31, 0x20, 0x24, 0x43,
0x43, 0x9A, 0x01, 0x2C, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x12, 0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x04,
0x5B, 0x36, 0x38, 0x5D, 0x22, 0x03, 0x30, 0x24, 0x31, 0xA2, 0x01, 0x2A, 0x0A,
0x15, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31,
0x20, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x02, 0x31, 0x31, 0x22, 0x03, 0x30,
0x24, 0x31, 0xA2, 0x01, 0x34, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A,
0x0C, 0x31, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x32, 0x33, 0x5D,
0x22, 0x03, 0x30, 0x24, 0x31, 0xA2, 0x01, 0x2D, 0x0A, 0x19, 0x28, 0x5C, 0x64,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x31,
0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x20, 0x24, 0x34, 0x1A, 0x03, 0x39, 0x31,
0x31, 0xA2, 0x01, 0x3B, 0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C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0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x48, 0x09, 0x1A,
0x15, 0x12, 0x06, 0x34, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32, 0x09, 0x34, 0x31,
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x48, 0x09, 0x22, 0x19, 0x12, 0x09,
0x31, 0x38, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x32, 0x0A, 0x31, 0x38,
0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x48, 0x0A, 0x2A, 0x1E, 0x12,
0x0E, 0x31, 0x39, 0x30, 0x5B, 0x30, 0x31, 0x32, 0x36, 0x5D, 0x5C, 0x64, 0x7B,
0x36, 0x7D, 0x32, 0x0A, 0x31, 0x39, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
0x36, 0x48, 0x0A, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x41, 0x55, 0x50, 0x3D, 0x5A, 0x07, 0x30, 0x30,
0x31, 0x5B, 0x31, 0x32, 0x5D, 0x62, 0x01, 0x30, 0x7A, 0x01, 0x30, 0x8A, 0x01,
0x04, 0x30, 0x30, 0x31, 0x31, 0x9A, 0x01, 0x28, 0x0A, 0x15, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20,
0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 0x34, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x2D, 0x39, 0x5D,
0x7C, 0x35, 0x5B, 0x30, 0x2D, 0x36, 0x38, 0x5D, 0x7C, 0x37, 0x5B, 0x33, 0x2D,
0x35, 0x37, 0x5D, 0x7C, 0x39, 0x5B, 0x32, 0x2D, 0x35, 0x5D, 0x29, 0x7C, 0x34,
0x28, 0x3F, 0x3A, 0x32, 0x5B, 0x32, 0x33, 0x37, 0x5D, 0x7C, 0x35, 0x31, 0x7C,
0x36, 0x34, 0x7C, 0x37, 0x37, 0x29, 0x7C, 0x35, 0x30, 0x32, 0x7C, 0x36, 0x33,
0x36, 0x7C, 0x37, 0x30, 0x32, 0x29, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x32, 0x0A,
0x32, 0x34, 0x32, 0x35, 0x30, 0x32, 0x37, 0x38, 0x39, 0x30, 0x50, 0x07, 0x1A,
0x27, 0x12, 0x19, 0x32, 0x34, 0x32, 0x28, 0x33, 0x35, 0x37, 0x7C, 0x33, 0x35,
0x39, 0x7C, 0x34, 0x35, 0x37, 0x7C, 0x35, 0x35, 0x37, 0x29, 0x5C, 0x64, 0x7B,
0x34, 0x7D, 0x32, 0x0A, 0x32, 0x34, 0x32, 0x33, 0x35, 0x37, 0x37, 0x38, 0x39,
0x30, 0x22, 0x21, 0x12, 0x13, 0x38, 0x28, 0x30, 0x30, 0x7C, 0x36, 0x36, 0x7C,
0x37, 0x37, 0x7C, 0x38, 0x38, 0x29, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0A,
0x38, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x2A, 0x16, 0x12,
0x08, 0x39, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0A, 0x39, 0x30,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x32, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0x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0x32, 0x33, 0x34, 0x35, 0x36, 0x50, 0x02, 0x50, 0x03, 0x1A, 0x36,
0x12, 0x23, 0x31, 0x28, 0x35, 0x5C, 0x64, 0x7B, 0x39, 0x7D, 0x7C, 0x37, 0x5C,
0x64, 0x7B, 0x38, 0x7D, 0x7C, 0x36, 0x5B, 0x30, 0x32, 0x5D, 0x5C, 0x64, 0x7B,
0x38, 0x7D, 0x7C, 0x36, 0x33, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x29, 0x32, 0x0B,
0x31, 0x35, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x48, 0x0A,
0x48, 0x0B, 0x22, 0x18, 0x12, 0x08, 0x38, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x32, 0x0A, 0x38, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x48, 0x0A, 0x2A, 0x28, 0x12, 0x16, 0x39, 0x30, 0x30, 0x28, 0x5B, 0x31, 0x33,
0x35, 0x5D, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x7C, 0x39, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x29, 0x32, 0x0A, 0x39, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x48, 0x0A, 0x48, 0x0B, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x44, 0x45, 0x50, 0x31, 0x5A, 0x02,
0x30, 0x30, 0x62, 0x01, 0x30, 0x7A, 0x01, 0x30, 0x9A, 0x01, 0x38, 0x0A, 0x10,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x2C,
0x38, 0x7D, 0x29, 0x12, 0x05, 0x24, 0x31, 0x20, 0x24, 0x32, 0x1A, 0x18, 0x32,
0x7C, 0x33, 0x5B, 0x33, 0x2D, 0x39, 0x5D, 0x7C, 0x39, 0x30, 0x36, 0x7C, 0x5B,
0x34, 0x2D, 0x39, 0x5D, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x31, 0x22, 0x03, 0x30,
0x24, 0x31, 0x9A, 0x01, 0x2C, 0x0A, 0x11, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x2C, 0x31, 0x31, 0x7D, 0x29, 0x12, 0x05,
0x24, 0x31, 0x2F, 0x24, 0x32, 0x1A, 0x0B, 0x5B, 0x33, 0x34, 0x5D, 0x30, 0x7C,
0x5B, 0x36, 0x38, 0x5D, 0x39, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x43,
0x0A, 0x0E, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x12, 0x05, 0x24, 0x31, 0x20, 0x24, 0x32, 0x1A, 0x05, 0x5B,
0x34, 0x2D, 0x39, 0x5D, 0x1A, 0x1E, 0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x7C, 0x5B,
0x37, 0x2D, 0x39, 0x5D, 0x28, 0x3F, 0x3A, 0x5C, 0x64, 0x5B, 0x31, 0x2D, 0x39,
0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x29, 0x22, 0x03, 0x30,
0x24, 0x31, 0x9A, 0x01, 0x45, 0x0A, 0x10, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x37, 0x7D, 0x29, 0x12, 0x05, 0x24,
0x31, 0x20, 0x24, 0x32, 0x1A, 0x05, 0x5B, 0x34, 0x2D, 0x39, 0x5D, 0x1A, 0x1E,
0x5B, 0x34, 0x2D, 0x36, 0x5D, 0x7C, 0x5B, 0x37, 0x2D, 0x39, 0x5D, 0x28, 0x3F,
0x3A, 0x5C, 0x64, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x31, 0x2D, 0x39,
0x5D, 0x5C, 0x64, 0x29, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x2B, 0x0A,
0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x31,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31,
0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x03, 0x38, 0x30, 0x30, 0x22, 0x03,
0x30, 0x24, 0x31, 0x9A, 0x01, 0x2D, 0x0A, 0x17, 0x28, 0x5C, 0x64, 0x7B, 0x33,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x34, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20,
0x24, 0x33, 0x1A, 0x03, 0x39, 0x30, 0x30, 0x22, 0x03, 0x30, 0x24, 0x31, 0xAA,
0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x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20,
0x24, 0x33, 0x20, 0x24, 0x34, 0x1A, 0x01, 0x33, 0x22, 0x03, 0x30, 0x24, 0x31,
0xAA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0x92, 0x04, 0x0A, 0x12, 0x12, 0x06, 0x5C, 0x64,
0x7B, 0x31, 0x30, 0x7D, 0x48, 0x09, 0x48, 0x0A, 0x50, 0x06, 0x50, 0x07, 0x50,
0x08, 0x12, 0x1E, 0x12, 0x0A, 0x5B, 0x31, 0x2D, 0x36, 0x5D, 0x5C, 0x64, 0x7B,
0x39, 0x7D, 0x32, 0x0A, 0x33, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x39, 0x50, 0x06, 0x50, 0x07, 0x50, 0x08, 0x1A, 0x1E, 0x12, 0x0E, 0x37, 0x5B,
0x31, 0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32,
0x0A, 0x37, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x48, 0x0A,
0x22, 0x17, 0x12, 0x07, 0x38, 0x30, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32, 0x0A,
0x38, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x48, 0x0A, 0x2A,
0x1B, 0x12, 0x0B, 0x39, 0x5B, 0x30, 0x31, 0x38, 0x5D, 0x5C, 0x64, 0x7B, 0x38,
0x7D, 0x32, 0x0A, 0x39, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x48, 0x0A, 0x32, 0x27, 0x12, 0x17, 0x38, 0x28, 0x3F, 0x3A, 0x34, 0x5B, 0x33,
0x2D, 0x35, 0x5D, 0x7C, 0x37, 0x5B, 0x30, 0x2D, 0x32, 0x5D, 0x29, 0x5C, 0x64,
0x7B, 0x37, 0x7D, 0x32, 0x0A, 0x38, 0x34, 0x33, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x39, 0x48, 0x0A, 0x3A, 0x17, 0x12, 0x07, 0x37, 0x30, 0x5C, 0x64, 0x7B,
0x38, 0x7D, 0x32, 0x0A, 0x37, 0x30, 0x33, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x39, 0x48, 0x0A, 0x42, 0x17, 0x12, 0x07, 0x35, 0x36, 0x5C, 0x64, 0x7B, 0x38,
0x7D, 0x32, 0x0A, 0x35, 0x36, 0x33, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x48, 0x0A, 0x4A, 0x02, 0x47, 0x42, 0x50, 0x2C, 0x5A, 0x02, 0x30, 0x30, 0x62,
0x01, 0x30, 0x7A, 0x01, 0x30, 0x9A, 0x01, 0x36, 0x0A, 0x15, 0x28, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20,
0x24, 0x33, 0x1A, 0x0C, 0x5B, 0x31, 0x2D, 0x35, 0x39, 0x5D, 0x7C, 0x5B, 0x37,
0x38, 0x5D, 0x30, 0x22, 0x05, 0x28, 0x30, 0x24, 0x31, 0x29, 0x9A, 0x01, 0x32,
0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x12, 0x0B, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x20, 0x24,
0x34, 0x1A, 0x01, 0x36, 0x22, 0x05, 0x28, 0x30, 0x24, 0x31, 0x29, 0x9A, 0x01,
0x33, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x12, 0x08,
0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x09, 0x37, 0x5B, 0x31,
0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x22, 0x05, 0x28, 0x30, 0x24, 0x31, 0x29,
0x9A, 0x01, 0x2F, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29,
0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x05, 0x38,
0x5B, 0x34, 0x37, 0x5D, 0x22, 0x05, 0x28, 0x30, 0x24, 0x31, 0x29, 0xAA, 0x01,
0x17, 0x12, 0x07, 0x37, 0x36, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32, 0x0A, 0x37,
0x36, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x48, 0x0A, 0xC2, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xCA,
0x01, 0x0B, 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, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B,
0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xAA,
0x03, 0x0A, 0x18, 0x12, 0x0E, 0x5B, 0x30, 0x33, 0x38, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x35, 0x2C, 0x31, 0x30, 0x7D, 0x48, 0x06, 0x48, 0x09, 0x48, 0x0A, 0x48,
0x0B, 0x12, 0x1B, 0x12, 0x09, 0x30, 0x5C, 0x64, 0x7B, 0x39, 0x2C, 0x31, 0x30,
0x7D, 0x32, 0x0A, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x48, 0x0A, 0x48, 0x0B, 0x1A, 0x1A, 0x12, 0x08, 0x33, 0x5C, 0x64, 0x7B, 0x38,
0x2C, 0x39, 0x7D, 0x32, 0x0A, 0x33, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x39, 0x48, 0x09, 0x48, 0x0A, 0x22, 0x24, 0x12, 0x13, 0x38, 0x30, 0x28,
0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x7C, 0x33, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x32, 0x09, 0x38, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
0x36, 0x48, 0x06, 0x48, 0x09, 0x2A, 0x21, 0x12, 0x13, 0x38, 0x39, 0x28, 0x3F,
0x3A, 0x32, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x7C, 0x39, 0x5C, 0x64, 0x7B, 0x36,
0x7D, 0x29, 0x32, 0x06, 0x38, 0x39, 0x32, 0x31, 0x32, 0x33, 0x48, 0x06, 0x48,
0x09, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0x4A, 0x02, 0x49, 0x54, 0x50, 0x27, 0x5A, 0x02, 0x30, 0x30, 0x9A, 0x01,
0x28, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08,
0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x05, 0x30, 0x5B, 0x32,
0x36, 0x5D, 0x9A, 0x01, 0x2F, 0x0A, 0x17, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33,
0x2C, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24,
0x33, 0x1A, 0x0A, 0x30, 0x5B, 0x31, 0x33, 0x2D, 0x35, 0x37, 0x2D, 0x39, 0x5D,
0x9A, 0x01, 0x26, 0x0A, 0x17, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A,
0x01, 0x33, 0x9A, 0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0x1A, 0x12, 0x0D, 0x30, 0x37, 0x37,
0x37, 0x5B, 0x30, 0x31, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x32, 0x07, 0x30,
0x37, 0x37, 0x37, 0x30, 0x31, 0x32, 0x48, 0x07, 0x2A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x32, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4A, 0x50, 0x50,
0x51, 0x5A, 0x03, 0x30, 0x31, 0x30, 0x62, 0x01, 0x30, 0x7A, 0x01, 0x30, 0x9A,
0x01, 0x2F, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12,
0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x07, 0x5B, 0x35,
0x37, 0x2D, 0x39, 0x5D, 0x30, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x39,
0x0A, 0x1C, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24,
0x33, 0x20, 0x24, 0x34, 0x1A, 0x07, 0x5B, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x30,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x58, 0x0A, 0x15, 0x28, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20,
0x24, 0x33, 0x1A, 0x0B, 0x31, 0x31, 0x31, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x33,
0x33, 0x33, 0x1A, 0x10, 0x28, 0x3F, 0x3A, 0x31, 0x31, 0x31, 0x7C, 0x32, 0x32,
0x32, 0x7C, 0x33, 0x33, 0x33, 0x29, 0x31, 0x1A, 0x11, 0x28, 0x3F, 0x3A, 0x31,
0x31, 0x31, 0x7C, 0x32, 0x32, 0x32, 0x7C, 0x33, 0x33, 0x33, 0x29, 0x31, 0x31,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x50, 0x0A, 0x12, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A,
0x07, 0x32, 0x32, 0x32, 0x7C, 0x33, 0x33, 0x33, 0x1A, 0x09, 0x32, 0x32, 0x32,
0x31, 0x7C, 0x33, 0x33, 0x33, 0x32, 0x1A, 0x0A, 0x32, 0x32, 0x32, 0x31, 0x32,
0x7C, 0x33, 0x33, 0x33, 0x32, 0x1A, 0x0B, 0x32, 0x32, 0x32, 0x31, 0x32, 0x30,
0x7C, 0x33, 0x33, 0x33, 0x32, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x2C,
0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24,
0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x04, 0x5B, 0x32, 0x33, 0x5D,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x21, 0x0A, 0x0E, 0x28, 0x5C, 0x64,
0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x05,
0x24, 0x31, 0x2D, 0x24, 0x32, 0x1A, 0x03, 0x30, 0x37, 0x37, 0x22, 0x03, 0x30,
0x24, 0x31, 0x9A, 0x01, 0x18, 0x0A, 0x07, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x12, 0x03, 0x2A, 0x24, 0x31, 0x1A, 0x04, 0x5B, 0x32, 0x33, 0x5D, 0x22,
0x02, 0x24, 0x31, 0xAA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xC2, 0x01, 0x13, 0x12, 0x09, 0x5B, 0x32, 0x33, 0x5D,
0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x32, 0x04, 0x32, 0x31, 0x32, 0x33, 0x48, 0x04,
0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x0A, 0x9C, 0x0B, 0x0A, 0x23, 0x12, 0x13, 0x5B, 0x31, 0x2D, 0x37,
0x5D, 0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x39, 0x7D, 0x7C, 0x38, 0x5C, 0x64, 0x7B,
0x38, 0x7D, 0x48, 0x04, 0x48, 0x05, 0x48, 0x06, 0x48, 0x07, 0x48, 0x08, 0x48,
0x09, 0x48, 0x0A, 0x12, 0x42, 0x12, 0x36, 0x28, 0x3F, 0x3A, 0x32, 0x7C, 0x5B,
0x33, 0x34, 0x5D, 0x5B, 0x31, 0x2D, 0x33, 0x5D, 0x7C, 0x35, 0x5B, 0x31, 0x2D,
0x35, 0x5D, 0x7C, 0x36, 0x5B, 0x31, 0x2D, 0x34, 0x5D, 0x29, 0x28, 0x3F, 0x3A,
0x31, 0x5C, 0x64, 0x7B, 0x32, 0x2C, 0x33, 0x7D, 0x7C, 0x5B, 0x32, 0x2D, 0x39,
0x5D, 0x5C, 0x64, 0x7B, 0x36, 0x2C, 0x37, 0x7D, 0x29, 0x32, 0x08, 0x32, 0x32,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x1A, 0x22, 0x12, 0x10, 0x31, 0x5B, 0x30,
0x2D, 0x32, 0x35, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x37, 0x2C, 0x38, 0x7D,
0x32, 0x0A, 0x31, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x48,
0x09, 0x48, 0x0A, 0x22, 0x16, 0x12, 0x07, 0x38, 0x30, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x32, 0x09, 0x38, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x48,
0x09, 0x2A, 0x1B, 0x12, 0x0C, 0x36, 0x30, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x5C,
0x64, 0x7B, 0x36, 0x7D, 0x32, 0x09, 0x36, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36,
0x37, 0x38, 0x48, 0x09, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x17, 0x12, 0x07, 0x35, 0x30, 0x5C, 0x64, 0x7B,
0x38, 0x7D, 0x32, 0x0A, 0x35, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x38, 0x48, 0x0A, 0x42, 0x17, 0x12, 0x07, 0x37, 0x30, 0x5C, 0x64, 0x7B, 0x38,
0x7D, 0x32, 0x0A, 0x37, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x48, 0x0A, 0x4A, 0x02, 0x4B, 0x52, 0x50, 0x52, 0x5A, 0x18, 0x30, 0x30, 0x28,
0x3F, 0x3A, 0x5B, 0x31, 0x32, 0x34, 0x2D, 0x36, 0x38, 0x5D, 0x7C, 0x5B, 0x33,
0x37, 0x5D, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x62, 0x01, 0x30, 0x7A, 0x15,
0x30, 0x28, 0x38, 0x5B, 0x31, 0x2D, 0x34, 0x36, 0x2D, 0x38, 0x5D, 0x7C, 0x38,
0x35, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x3F, 0x9A, 0x01, 0x6E, 0x0A, 0x15,
0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D,
0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x1F, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x7C,
0x31, 0x5B, 0x31, 0x39, 0x5D, 0x7C, 0x5B, 0x36, 0x39, 0x5D, 0x39, 0x7C, 0x35,
0x5B, 0x34, 0x35, 0x38, 0x5D, 0x29, 0x7C, 0x5B, 0x35, 0x37, 0x5D, 0x30, 0x1A,
0x25, 0x31, 0x28, 0x3F, 0x3A, 0x30, 0x7C, 0x31, 0x5B, 0x31, 0x39,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0x01, 0x2E, 0x0A, 0x12, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12,
0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x03, 0x31, 0x33,
0x31, 0x1A, 0x04, 0x31, 0x33, 0x31, 0x32, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A,
0x01, 0x36, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12,
0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x03, 0x31, 0x33,
0x31, 0x1A, 0x09, 0x31, 0x33, 0x31, 0x5B, 0x31, 0x33, 0x2D, 0x39, 0x5D, 0x22,
0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x2F, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x2D, 0x24,
0x33, 0x1A, 0x07, 0x31, 0x33, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x22, 0x03, 0x30,
0x24, 0x31, 0x9A, 0x01, 0x34, 0x0A, 0x1C, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x31,
0x2D, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x2D, 0x24, 0x34, 0x1A, 0x02, 0x33, 0x30,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x6A, 0x0A, 0x12, 0x28, 0x5C, 0x64,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A,
0x12, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x32, 0x36, 0x5D, 0x7C, 0x33, 0x5B, 0x30,
0x2D, 0x34, 0x36, 0x37, 0x5D, 0x29, 0x1A, 0x31, 0x32, 0x28, 0x3F, 0x3A, 0x5B,
0x32, 0x36, 0x5D, 0x7C, 0x33, 0x28, 0x3F, 0x3A, 0x30, 0x31, 0x7C, 0x31, 0x5B,
0x34, 0x35, 0x5D, 0x7C, 0x32, 0x5B, 0x31, 0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x33,
0x39, 0x7C, 0x34, 0x7C, 0x36, 0x5B, 0x36, 0x37, 0x5D, 0x7C, 0x37, 0x5B, 0x30,
0x37, 0x38, 0x5D, 0x29, 0x29, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x86,
0x01, 0x0A, 0x12, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D,
0x24, 0x32, 0x2D, 0x24, 0x33, 0x1A, 0x16, 0x32, 0x28, 0x3F, 0x3A, 0x33, 0x5B,
0x30, 0x2D, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x7C, 0x5B, 0x34, 0x35, 0x37, 0x2D,
0x39, 0x5D, 0x29, 0x1A, 0x49, 0x32, 0x28, 0x3F, 0x3A, 0x33, 0x28, 0x3F, 0x3A,
0x30, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x7C, 0x31, 0x5B, 0x30, 0x2D, 0x33,
0x36, 0x2D, 0x39, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x32, 0x2D, 0x36, 0x5D, 0x7C,
0x33, 0x5B, 0x30, 0x2D, 0x38, 0x5D, 0x7C, 0x36, 0x5B, 0x30, 0x2D, 0x35, 0x38,
0x39, 0x5D, 0x7C, 0x37, 0x5B, 0x31, 0x2D, 0x36, 0x39, 0x5D, 0x7C, 0x5B, 0x35,
0x38, 0x39, 0x5D, 0x29, 0x7C, 0x5B, 0x34, 0x35, 0x37, 0x2D, 0x39, 0x5D, 0x29,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x45, 0x0A, 0x0B, 0x28, 0x5C, 0x64,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x12, 0x05, 0x24, 0x31, 0x2D,
0x24, 0x32, 0x1A, 0x0A, 0x32, 0x31, 0x5B, 0x30, 0x2D, 0x34, 0x36, 0x2D, 0x39,
0x5D, 0x1A, 0x1E, 0x32, 0x31, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x2D, 0x32, 0x34,
0x37, 0x2D, 0x39, 0x5D, 0x7C, 0x33, 0x5B, 0x31, 0x32, 0x34, 0x5D, 0x7C, 0x36,
0x5B, 0x31, 0x32, 0x36, 0x39, 0x5D, 0x29, 0x22, 0x03, 0x30, 0x24, 0x31, 0x9A,
0x01, 0x3B, 0x0A, 0x0B, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x05, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x1A, 0x06, 0x32, 0x31,
0x5B, 0x33, 0x36, 0x5D, 0x1A, 0x18, 0x32, 0x31, 0x28, 0x3F, 0x3A, 0x33, 0x5B,
0x30, 0x33, 0x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,
0x7D, 0x32, 0x0A, 0x38, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x48, 0x0A, 0x2A, 0x18, 0x12, 0x08, 0x39, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x32, 0x0A, 0x39, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x48, 0x0A, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x4A, 0x02, 0x4D, 0x58, 0x50, 0x34, 0x5A, 0x02, 0x30, 0x30, 0x62,
0x02, 0x30, 0x31, 0x7A, 0x11, 0x30, 0x31, 0x7C, 0x30, 0x34, 0x5B, 0x34, 0x35,
0x5D, 0x28, 0x5C, 0x64, 0x7B, 0x31, 0x30, 0x7D, 0x29, 0x82, 0x01, 0x03, 0x31,
0x24, 0x31, 0x9A, 0x01, 0x32, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34,
0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A,
0x06, 0x5B, 0x38, 0x39, 0x5D, 0x30, 0x30, 0x22, 0x05, 0x30, 0x31, 0x20, 0x24,
0x31, 0x30, 0x01, 0x9A, 0x01, 0x34, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x32,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33,
0x1A, 0x08, 0x33, 0x33, 0x7C, 0x35, 0x35, 0x7C, 0x38, 0x31, 0x22, 0x05, 0x30,
0x31, 0x20, 0x24, 0x31, 0x30, 0x01, 0x9A, 0x01, 0x54, 0x0A, 0x15, 0x28, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28,
0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32,
0x20, 0x24, 0x33, 0x1A, 0x28, 0x5B, 0x32, 0x34, 0x36, 0x37, 0x5D, 0x7C, 0x33,
0x5B, 0x30, 0x2D, 0x32, 0x34, 0x2D, 0x39, 0x5D, 0x7C, 0x35, 0x5B, 0x30, 0x2D,
0x34, 0x36, 0x2D, 0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x32, 0x2D, 0x39, 0x5D, 0x7C,
0x39, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x22, 0x05, 0x30, 0x31, 0x20, 0x24, 0x31,
0x30, 0x01, 0x9A, 0x01, 0x3E, 0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28,
0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0C, 0x30, 0x34, 0x35, 0x20, 0x24,
0x32, 0x20, 0x24, 0x33, 0x20, 0x24, 0x34, 0x1A, 0x0D, 0x31, 0x28, 0x3F, 0x3A,
0x33, 0x33, 0x7C, 0x35, 0x35, 0x7C, 0x38, 0x31, 0x29, 0x22, 0x02, 0x24, 0x31,
0x30, 0x01, 0x9A, 0x01, 0x5A, 0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28,
0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0C, 0x30, 0x34, 0x35, 0x20, 0x24,
0x32, 0x20, 0x24, 0x33, 0x20, 0x24, 0x34, 0x1A, 0x29, 0x31, 0x28, 0x3F, 0x3A,
0x5B, 0x31, 0x32, 0x34, 0x35, 0x37, 0x39, 0x5D, 0x7C, 0x33, 0x5B, 0x30, 0x2D,
0x32, 0x34, 0x2D, 0x39, 0x5D, 0x7C, 0x35, 0x5B, 0x30, 0x2D, 0x34, 0x36, 0x2D,
0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x30, 0x32, 0x2D, 0x39, 0x5D, 0x29, 0x22, 0x02,
0x24, 0x31, 0x30, 0x01, 0xA2, 0x01, 0x32, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24,
0x33, 0x1A, 0x06, 0x5B, 0x38, 0x39, 0x5D, 0x30, 0x30, 0x22, 0x05, 0x30, 0x31,
0x20, 0x24, 0x31, 0x30, 0x01, 0xA2, 0x01, 0x34, 0x0A, 0x15, 0x28, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20,
0x24, 0x33, 0x1A, 0x08, 0x33, 0x33, 0x7C, 0x35, 0x35, 0x7C, 0x38, 0x31, 0x22,
0x05, 0x30, 0x31, 0x20, 0x24, 0x31, 0x30, 0x01, 0xA2, 0x01, 0x54, 0x0A, 0x15,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20,
0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x28, 0x5B, 0x32, 0x34, 0x36, 0x37, 0x5D,
0x7C, 0x33, 0x5B, 0x30, 0x2D, 0x32, 0x34, 0x2D, 0x39, 0x5D, 0x7C, 0x35, 0x5B,
0x30, 0x2D, 0x34, 0x36, 0x2D, 0x39, 0x5D, 0x7C, 0x38, 0x5B, 0x32, 0x2D, 0x39,
0x5D, 0x7C, 0x39, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x22, 0x05, 0x30, 0x31, 0x20,
0x24, 0x31, 0x30, 0x01, 0xA2, 0x01, 0x37, 0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29,
0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x31, 0x20,
0x24, 0x32, 0x20, 0x24, 0x33, 0x20, 0x24, 0x34, 0x1A, 0x0D, 0x31, 0x28, 0x3F,
0x3A, 0x33, 0x33, 0x7C, 0x35, 0x35, 0x7C, 0x38, 0x31, 0x29, 0xA2, 0x01, 0x53,
0x0A, 0x19, 0x28, 0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D,
0x29, 0x12, 0x0B, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x20, 0x24,
0x34,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 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x32, 0x08, 0x32, 0x34,
0x30, 0x39, 0x39, 0x31, 0x32, 0x33, 0x48, 0x07, 0x48, 0x08, 0x1A, 0x65, 0x12,
0x52, 0x32, 0x28, 0x3F, 0x3A, 0x5B, 0x30, 0x32, 0x37, 0x5D, 0x5C, 0x64, 0x7B,
0x37, 0x7D, 0x7C, 0x39, 0x5C, 0x64, 0x7B, 0x36, 0x2C, 0x37, 0x7D, 0x7C, 0x31,
0x28, 0x3F, 0x3A, 0x30, 0x5C, 0x64, 0x7B, 0x35, 0x2C, 0x37, 0x7D, 0x7C, 0x5B,
0x31, 0x32, 0x5D, 0x5C, 0x64, 0x7B, 0x35, 0x2C, 0x36, 0x7D, 0x7C, 0x5B, 0x33,
0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x35, 0x7D, 0x29, 0x7C, 0x34, 0x5B, 0x31,
0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x7C, 0x38, 0x5C, 0x64, 0x7B,
0x37, 0x2C, 0x38, 0x7D, 0x29, 0x32, 0x09, 0x32, 0x30, 0x31, 0x32, 0x33, 0x34,
0x35, 0x36, 0x37, 0x48, 0x08, 0x48, 0x09, 0x48, 0x0A, 0x22, 0x1C, 0x12, 0x0A,
0x38, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x36, 0x2C, 0x37, 0x7D, 0x32, 0x0A, 0x38,
0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x48, 0x09, 0x48, 0x0A,
0x2A, 0x1C, 0x12, 0x0A, 0x39, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x36, 0x2C, 0x37,
0x7D, 0x32, 0x0A, 0x39, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x48, 0x09, 0x48, 0x0A, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x4E, 0x5A, 0x50, 0x40, 0x5A, 0x02, 0x30,
0x30, 0x62, 0x01, 0x30, 0x7A, 0x01, 0x30, 0x9A, 0x01, 0x2F, 0x0A, 0x12, 0x28,
0x5C, 0x64, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x20, 0x24,
0x33, 0x1A, 0x0A, 0x32, 0x34, 0x7C, 0x5B, 0x33, 0x34, 0x36, 0x37, 0x39, 0x5D,
0x22, 0x03, 0x30, 0x24, 0x31, 0x9A, 0x01, 0x2D, 0x0A, 0x14, 0x28, 0x5C, 0x64,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33,
0x2C, 0x35, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x2D, 0x24, 0x32, 0x20, 0x24,
0x33, 0x1A, 0x06, 0x32, 0x5B, 0x31, 0x37, 0x39, 0x5D, 0x22, 0x03, 0x30, 0x24,
0x31, 0x9A, 0x01, 0x2E, 0x0A, 0x17, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29,
0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x2C,
0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33,
0x1A, 0x04, 0x5B, 0x38, 0x39, 0x5D, 0x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x32, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x32, 0x09, 0x32, 0x36, 0x32, 0x31, 0x36,
0x31, 0x32, 0x33, 0x34, 0x1A, 0x1F, 0x12, 0x12, 0x36, 0x28, 0x3F, 0x3A, 0x39,
0x5B, 0x32, 0x33, 0x5D, 0x7C, 0x34, 0x37, 0x29, 0x5C, 0x64, 0x7B, 0x36, 0x7D,
0x32, 0x09, 0x36, 0x39, 0x32, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x22, 0x14,
0x12, 0x07, 0x38, 0x30, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x09, 0x38, 0x30,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x2A, 0x31, 0x12, 0x24, 0x38, 0x28,
0x3F, 0x3A, 0x31, 0x5B, 0x30, 0x31, 0x5D, 0x7C, 0x32, 0x5B, 0x30, 0x31, 0x35,
0x36, 0x5D, 0x7C, 0x38, 0x34, 0x7C, 0x39, 0x5B, 0x30, 0x2D, 0x33, 0x37, 0x2D,
0x39, 0x5D, 0x29, 0x5C, 0x64, 0x7B, 0x36, 0x7D, 0x32, 0x09, 0x38, 0x31, 0x30,
0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x52, 0x45, 0x50, 0x86, 0x02,
0x5A, 0x02, 0x30, 0x30, 0x62, 0x01, 0x30, 0x7A, 0x01, 0x30, 0x9A, 0x01, 0x30,
0x0A, 0x1C, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x32, 0x7D, 0x29, 0x28, 0x5C, 0x64,
0x7B, 0x32, 0x7D, 0x29, 0x12, 0x0B, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24,
0x33, 0x20, 0x24, 0x34, 0x22, 0x03, 0x30, 0x24, 0x31, 0xAA, 0x01, 0x0B, 0x48,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xBA, 0x01, 0x13,
0x32, 0x36, 0x32, 0x7C, 0x36, 0x28, 0x3F, 0x3A, 0x39, 0x5B, 0x32, 0x33, 0x5D,
0x7C, 0x34, 0x37, 0x29, 0x7C, 0x38, 0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xCC, 0x01, 0x0A,
0x10, 0x12, 0x0C, 0x5B, 0x33, 0x34, 0x37, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B,
0x39, 0x7D, 0x48, 0x0A, 0x12, 0x18, 0x12, 0x0A, 0x5B, 0x33, 0x34, 0x38, 0x5D,
0x5C, 0x64, 0x7B, 0x39, 0x7D, 0x32, 0x0A, 0x33, 0x30, 0x31, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x1A, 0x14, 0x12, 0x06, 0x39, 0x5C, 0x64, 0x7B, 0x39,
0x7D, 0x32, 0x0A, 0x39, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
0x22, 0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x08, 0x1A, 0x17, 0x12, 0x09, 0x5B, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x32, 0x08, 0x38, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x48, 0x08,
0x22, 0x1C, 0x12, 0x0A, 0x31, 0x3F, 0x38, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37,
0x7D, 0x32, 0x0A, 0x38, 0x30, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x48, 0x0A, 0x48, 0x0B, 0x2A, 0x1A, 0x12, 0x09, 0x31, 0x39, 0x30, 0x30, 0x5C,
0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0B, 0x31, 0x39, 0x30, 0x30, 0x31, 0x32, 0x33,
0x34, 0x35, 0x36, 0x37, 0x48, 0x0B, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x53, 0x47, 0x50, 0x41, 0x5A,
0x0B, 0x30, 0x5B, 0x30, 0x2D, 0x33, 0x5D, 0x5B, 0x30, 0x2D, 0x39, 0x5D, 0x7A,
0x06, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x9A, 0x01, 0x25, 0x0A, 0x0E, 0x28,
0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29,
0x12, 0x05, 0x24, 0x31, 0x20, 0x24, 0x32, 0x1A, 0x0C, 0x5B, 0x33, 0x36, 0x39,
0x5D, 0x7C, 0x38, 0x5B, 0x31, 0x2D, 0x39, 0x5D, 0x9A, 0x01, 0x28, 0x0A, 0x15,
0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D,
0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31, 0x20,
0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x05, 0x31, 0x5B, 0x38, 0x39, 0x5D, 0x9A,
0x01, 0x26, 0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C,
0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12,
0x08, 0x24, 0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x1A, 0x03, 0x38, 0x30,
0x30, 0xAA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x0A, 0xC5, 0x01, 0x0A, 0x10, 0x12, 0x08, 0x38,
0x5C, 0x64, 0x7B, 0x33, 0x2C, 0x37, 0x7D, 0x48, 0x04, 0x48, 0x06, 0x48, 0x08,
0x12, 0x12, 0x12, 0x06, 0x38, 0x5C, 0x64, 0x7B, 0x35, 0x7D, 0x32, 0x06, 0x38,
0x31, 0x32, 0x33, 0x34, 0x35, 0x48, 0x06, 0x1A, 0x10, 0x12, 0x06, 0x38, 0x5C,
0x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5C, 0x64, 0x7B, 0x38, 0x7D, 0x48, 0x0A, 0x50, 0x07, 0x12, 0x2C, 0x12,
0x1C, 0x5B, 0x31, 0x33, 0x2D, 0x36, 0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x39,
0x7D, 0x7C, 0x32, 0x5B, 0x30, 0x2D, 0x33, 0x35, 0x2D, 0x39, 0x5D, 0x5C, 0x64,
0x7B, 0x38, 0x7D, 0x32, 0x0A, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
0x39, 0x30, 0x50, 0x07, 0x1A, 0x2C, 0x12, 0x1C, 0x5B, 0x31, 0x33, 0x2D, 0x36,
0x38, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x39, 0x7D, 0x7C, 0x32, 0x5B, 0x30, 0x2D,
0x33, 0x35, 0x2D, 0x39, 0x5D, 0x5C, 0x64, 0x7B, 0x38, 0x7D, 0x32, 0x0A, 0x31,
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x50, 0x07, 0x22, 0x23,
0x12, 0x15, 0x38, 0x28, 0x3F, 0x3A, 0x30, 0x30, 0x7C, 0x36, 0x36, 0x7C, 0x37,
0x37, 0x7C, 0x38, 0x38, 0x29, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0A, 0x38,
0x30, 0x30, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x2A, 0x16, 0x12, 0x08,
0x39, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32, 0x0A, 0x39, 0x30, 0x30,
0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x32, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x3A, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x42, 0x0B, 0x48, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x4A, 0x02, 0x55, 0x53, 0x50, 0x01,
0x5A, 0x03, 0x30, 0x31, 0x31, 0x62, 0x01, 0x31, 0x6A, 0x07, 0x20, 0x65, 0x78,
0x74, 0x6E, 0x2E, 0x20, 0x7A, 0x01, 0x31, 0x90, 0x01, 0x01, 0x9A, 0x01, 0x17,
0x0A, 0x0E, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x34, 0x7D, 0x29, 0x12, 0x05, 0x24, 0x31, 0x20, 0x24, 0x32, 0x9A, 0x01, 0x23,
0x0A, 0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B,
0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24,
0x31, 0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x30, 0x01, 0xA2, 0x01, 0x23, 0x0A,
0x15, 0x28, 0x5C, 0x64, 0x7B, 0x33, 0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x33,
0x7D, 0x29, 0x28, 0x5C, 0x64, 0x7B, 0x34, 0x7D, 0x29, 0x12, 0x08, 0x24, 0x31,
0x20, 0x24, 0x32, 0x20, 0x24, 0x33, 0x30, 0x01, 0xAA, 0x01, 0x0B, 0x48, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xB0, 0x01, 0x01, 0xC2,
0x01, 0x16, 0x12, 0x08, 0x38, 0x30, 0x30, 0x5C, 0x64, 0x7B, 0x37, 0x7D, 0x32,
0x0A, 0x38, 0x30, 0x30, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0xCA, 0x01,
0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0x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, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0xC2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x01, 0xCA, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0x01, 0xE2, 0x01, 0x0B, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x01
};
} // namespace
int metadata_size() {
return sizeof(data) / sizeof(data[0]);
}
const void* metadata_get() {
return data;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/test_metadata.cc
|
C++
|
unknown
| 79,914
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include "phonenumbers/unicodestring.h"
#include <algorithm>
#include <cassert>
#include <iterator>
using std::advance;
using std::equal;
namespace i18n {
namespace phonenumbers {
UnicodeString& UnicodeString::operator=(const UnicodeString& src) {
if (&src != this) {
invalidateCachedIndex();
text_ = src.text_;
}
return *this;
}
bool UnicodeString::operator==(const UnicodeString& rhs) const {
return equal(text_.begin(), text_.end(), rhs.text_.begin());
}
void UnicodeString::append(const UnicodeString& unicode_string) {
invalidateCachedIndex();
for (UnicodeString::const_iterator it = unicode_string.begin();
it != unicode_string.end(); ++it) {
append(*it);
}
}
int UnicodeString::indexOf(char32 codepoint) const {
int pos = 0;
for (UnicodeText::const_iterator it = text_.begin(); it != text_.end();
++it, ++pos) {
if (*it == codepoint) {
return pos;
}
}
return -1;
}
void UnicodeString::replace(int start, int length, const UnicodeString& src) {
assert(length >= 0 && length <= this->length());
invalidateCachedIndex();
UnicodeText::const_iterator start_it = text_.begin();
advance(start_it, start);
UnicodeText unicode_text;
unicode_text.append(text_.begin(), start_it);
unicode_text.append(src.text_);
advance(start_it, length);
unicode_text.append(start_it, text_.end());
text_ = unicode_text;
}
void UnicodeString::setCharAt(int pos, char32 c) {
assert(pos < length());
invalidateCachedIndex();
UnicodeText::const_iterator pos_it = text_.begin();
advance(pos_it, pos);
UnicodeText unicode_text;
unicode_text.append(text_.begin(), pos_it);
unicode_text.push_back(c);
++pos_it;
unicode_text.append(pos_it, text_.end());
text_ = unicode_text;
}
UnicodeString UnicodeString::tempSubString(int start, int length) const {
const int unicodestring_length = this->length();
if (length == std::numeric_limits<int>::max()) {
length = unicodestring_length - start;
}
if (start > unicodestring_length || length > unicodestring_length) {
return UnicodeString("");
}
UnicodeText::const_iterator start_it = text_.begin();
advance(start_it, start);
UnicodeText::const_iterator end_it = start_it;
advance(end_it, length);
UnicodeString substring;
substring.text_.PointTo(start_it, end_it);
return substring;
}
char32 UnicodeString::operator[](int index) const {
assert(index < length());
if (cached_index_ == -1 || cached_index_ > index) {
cached_it_ = text_.begin();
cached_index_ = 0;
}
for (; cached_index_ < index; ++cached_index_, ++cached_it_) {}
return *cached_it_;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/unicodestring.cc
|
C++
|
unknown
| 3,311
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#ifndef I18N_PHONENUMBERS_UNICODESTRING_H_
#define I18N_PHONENUMBERS_UNICODESTRING_H_
#include "phonenumbers/utf/unicodetext.h"
#include <cstring>
#include <limits>
namespace i18n {
namespace phonenumbers {
// This class supports the minimal subset of icu::UnicodeString needed by
// AsYouTypeFormatter in order to let the libphonenumber not depend on ICU
// which is not available by default on some systems, such as iOS.
class UnicodeString {
public:
UnicodeString() : cached_index_(-1) {}
// Constructs a new unicode string copying the provided C string.
explicit UnicodeString(const char* utf8)
: text_(UTF8ToUnicodeText(utf8, std::strlen(utf8))),
cached_index_(-1) {}
// Constructs a new unicode string containing the provided codepoint.
explicit UnicodeString(char32 codepoint) : cached_index_(-1) {
append(codepoint);
}
UnicodeString(const UnicodeString& src)
: text_(src.text_), cached_index_(-1) {}
UnicodeString& operator=(const UnicodeString& src);
bool operator==(const UnicodeString& rhs) const;
void append(const UnicodeString& unicode_string);
inline void append(char32 codepoint) {
invalidateCachedIndex();
text_.push_back(codepoint);
}
typedef UnicodeText::const_iterator const_iterator;
inline const_iterator begin() const {
return text_.begin();
}
inline const_iterator end() const {
return text_.end();
}
// Returns the index of the provided codepoint or -1 if not found.
int indexOf(char32 codepoint) const;
// Returns the number of codepoints contained in the unicode string.
inline int length() const {
return text_.size();
}
// Clears the unicode string.
inline void remove() {
invalidateCachedIndex();
text_.clear();
}
// Replaces the substring located at [ start, start + length - 1 ] with the
// provided unicode string.
void replace(int start, int length, const UnicodeString& src);
void setCharAt(int pos, char32 c);
// Copies the provided C string.
inline void setTo(const char* s, size_t len) {
invalidateCachedIndex();
text_.CopyUTF8(s, len);
}
// Returns the substring located at [ start, start + length - 1 ] without
// copying the underlying C string. If one of the provided parameters is out
// of range, the function returns an empty unicode string.
UnicodeString tempSubString(
int start,
int length = std::numeric_limits<int>::max()) const;
inline void toUTF8String(string& out) const {
out = UnicodeTextToUTF8(text_);
}
char32 operator[](int index) const;
private:
UnicodeText text_;
// As UnicodeText doesn't provide random access, an operator[] implementation
// would naively iterate from the beginning of the string to the supplied
// index which would be inefficient.
// As operator[] is very likely to be called in a loop with consecutive
// indexes, we save the corresponding iterator so we can reuse it the next
// time it is called.
// The following function which invalidates the cached index corresponding to
// the iterator position must be called every time the unicode string is
// modified (i.e. in all the non-const methods).
inline void invalidateCachedIndex() {
cached_index_ = -1;
}
// Iterator corresponding to the cached index below, used by operator[].
mutable UnicodeText::const_iterator cached_it_;
mutable int cached_index_;
};
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_UNICODESTRING_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/unicodestring.h
|
C++
|
unknown
| 4,139
|
/*
* The authors of this software are Rob Pike and Ken Thompson.
* Copyright (c) 2002 by Lucent Technologies.
* Portions Copyright (c) 2009 The Go Authors. All rights reserved.
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#include "phonenumbers/utf/utf.h"
#include "phonenumbers/utf/utfdef.h"
enum
{
Bit1 = 7,
Bitx = 6,
Bit2 = 5,
Bit3 = 4,
Bit4 = 3,
Bit5 = 2,
T1 = ((1<<(Bit1+1))-1) ^ 0xFF, /* 0000 0000 */
Tx = ((1<<(Bitx+1))-1) ^ 0xFF, /* 1000 0000 */
T2 = ((1<<(Bit2+1))-1) ^ 0xFF, /* 1100 0000 */
T3 = ((1<<(Bit3+1))-1) ^ 0xFF, /* 1110 0000 */
T4 = ((1<<(Bit4+1))-1) ^ 0xFF, /* 1111 0000 */
T5 = ((1<<(Bit5+1))-1) ^ 0xFF, /* 1111 1000 */
Rune1 = (1<<(Bit1+0*Bitx))-1, /* 0000 0000 0111 1111 */
Rune2 = (1<<(Bit2+1*Bitx))-1, /* 0000 0111 1111 1111 */
Rune3 = (1<<(Bit3+2*Bitx))-1, /* 1111 1111 1111 1111 */
Rune4 = (1<<(Bit4+3*Bitx))-1, /* 0001 1111 1111 1111 1111 1111 */
Maskx = (1<<Bitx)-1, /* 0011 1111 */
Testx = Maskx ^ 0xFF, /* 1100 0000 */
SurrogateMin = 0xD800,
SurrogateMax = 0xDFFF,
Bad = Runeerror,
};
/*
* Modified by Wei-Hwa Huang, Google Inc., on 2004-09-24
* This is a slower but "safe" version of the old chartorune
* that works on strings that are not necessarily null-terminated.
*
* If you know for sure that your string is null-terminated,
* chartorune will be a bit faster.
*
* It is guaranteed not to attempt to access "length"
* past the incoming pointer. This is to avoid
* possible access violations. If the string appears to be
* well-formed but incomplete (i.e., to get the whole Rune
* we'd need to read past str+length) then we'll set the Rune
* to Bad and return 0.
*
* Note that if we have decoding problems for other
* reasons, we return 1 instead of 0.
*/
int
charntorune(Rune *rune, const char *str, int length)
{
int c, c1, c2, c3;
long l;
/* When we're not allowed to read anything */
if(length <= 0) {
goto badlen;
}
/*
* one character sequence (7-bit value)
* 00000-0007F => T1
*/
c = *(uchar*)str;
if(c < Tx) {
*rune = (Rune)c;
return 1;
}
// If we can't read more than one character we must stop
if(length <= 1) {
goto badlen;
}
/*
* two character sequence (11-bit value)
* 0080-07FF => T2 Tx
*/
c1 = *(uchar*)(str+1) ^ Tx;
if(c1 & Testx)
goto bad;
if(c < T3) {
if(c < T2)
goto bad;
l = ((c << Bitx) | c1) & Rune2;
if(l <= Rune1)
goto bad;
*rune = (Rune)l;
return 2;
}
// If we can't read more than two characters we must stop
if(length <= 2) {
goto badlen;
}
/*
* three character sequence (16-bit value)
* 0800-FFFF => T3 Tx Tx
*/
c2 = *(uchar*)(str+2) ^ Tx;
if(c2 & Testx)
goto bad;
if(c < T4) {
l = ((((c << Bitx) | c1) << Bitx) | c2) & Rune3;
if(l <= Rune2)
goto bad;
if (SurrogateMin <= l && l <= SurrogateMax)
goto bad;
*rune = (Rune)l;
return 3;
}
if (length <= 3)
goto badlen;
/*
* four character sequence (21-bit value)
* 10000-1FFFFF => T4 Tx Tx Tx
*/
c3 = *(uchar*)(str+3) ^ Tx;
if (c3 & Testx)
goto bad;
if (c < T5) {
l = ((((((c << Bitx) | c1) << Bitx) | c2) << Bitx) | c3) & Rune4;
if (l <= Rune3 || l > Runemax)
goto bad;
*rune = (Rune)l;
return 4;
}
// Support for 5-byte or longer UTF-8 would go here, but
// since we don't have that, we'll just fall through to bad.
/*
* bad decoding
*/
bad:
*rune = Bad;
return 1;
badlen:
*rune = Bad;
return 0;
}
/*
* This is the older "unsafe" version, which works fine on
* null-terminated strings.
*/
int
chartorune(Rune *rune, const char *str)
{
int c, c1, c2, c3;
long l;
/*
* one character sequence
* 00000-0007F => T1
*/
c = *(uchar*)str;
if(c < Tx) {
*rune = (Rune)c;
return 1;
}
/*
* two character sequence
* 0080-07FF => T2 Tx
*/
c1 = *(uchar*)(str+1) ^ Tx;
if(c1 & Testx)
goto bad;
if(c < T3) {
if(c < T2)
goto bad;
l = ((c << Bitx) | c1) & Rune2;
if(l <= Rune1)
goto bad;
*rune = (Rune)l;
return 2;
}
/*
* three character sequence
* 0800-FFFF => T3 Tx Tx
*/
c2 = *(uchar*)(str+2) ^ Tx;
if(c2 & Testx)
goto bad;
if(c < T4) {
l = ((((c << Bitx) | c1) << Bitx) | c2) & Rune3;
if(l <= Rune2)
goto bad;
if (SurrogateMin <= l && l <= SurrogateMax)
goto bad;
*rune = (Rune)l;
return 3;
}
/*
* four character sequence (21-bit value)
* 10000-1FFFFF => T4 Tx Tx Tx
*/
c3 = *(uchar*)(str+3) ^ Tx;
if (c3 & Testx)
goto bad;
if (c < T5) {
l = ((((((c << Bitx) | c1) << Bitx) | c2) << Bitx) | c3) & Rune4;
if (l <= Rune3 || l > Runemax)
goto bad;
*rune = (Rune)l;
return 4;
}
/*
* Support for 5-byte or longer UTF-8 would go here, but
* since we don't have that, we'll just fall through to bad.
*/
/*
* bad decoding
*/
bad:
*rune = Bad;
return 1;
}
int
isvalidcharntorune(const char* str, int length, Rune* rune, int* consumed)
{
*consumed = charntorune(rune, str, length);
return *rune != Runeerror || *consumed == 3;
}
int
runetochar(char *str, const Rune *rune)
{
/* Runes are signed, so convert to unsigned for range check. */
unsigned long c;
/*
* one character sequence
* 00000-0007F => 00-7F
*/
c = *rune;
if(c <= Rune1) {
str[0] = (char)c;
return 1;
}
/*
* two character sequence
* 0080-07FF => T2 Tx
*/
if(c <= Rune2) {
str[0] = (char)(T2 | (c >> 1*Bitx));
str[1] = (char)(Tx | (c & Maskx));
return 2;
}
/*
* If the Rune is out of range or a surrogate half, convert it to the error rune.
* Do this test here because the error rune encodes to three bytes.
* Doing it earlier would duplicate work, since an out of range
* Rune wouldn't have fit in one or two bytes.
*/
if (c > Runemax)
c = Runeerror;
if (SurrogateMin <= c && c <= SurrogateMax)
c = Runeerror;
/*
* three character sequence
* 0800-FFFF => T3 Tx Tx
*/
if (c <= Rune3) {
str[0] = (char)(T3 | (c >> 2*Bitx));
str[1] = (char)(Tx | ((c >> 1*Bitx) & Maskx));
str[2] = (char)(Tx | (c & Maskx));
return 3;
}
/*
* four character sequence (21-bit value)
* 10000-1FFFFF => T4 Tx Tx Tx
*/
str[0] = (char)(T4 | (c >> 3*Bitx));
str[1] = (char)(Tx | ((c >> 2*Bitx) & Maskx));
str[2] = (char)(Tx | ((c >> 1*Bitx) & Maskx));
str[3] = (char)(Tx | (c & Maskx));
return 4;
}
int
runelen(Rune rune)
{
char str[10];
return runetochar(str, &rune);
}
int
runenlen(const Rune *r, int nrune)
{
int nb, c;
nb = 0;
while(nrune--) {
c = (int)*r++;
if (c <= Rune1)
nb++;
else if (c <= Rune2)
nb += 2;
else if (c <= Rune3)
nb += 3;
else /* assert(c <= Rune4) */
nb += 4;
}
return nb;
}
int
fullrune(const char *str, int n)
{
if (n > 0) {
int c = *(uchar*)str;
if (c < Tx)
return 1;
if (n > 1) {
if (c < T3)
return 1;
if (n > 2) {
if (c < T4 || n > 3)
return 1;
}
}
}
return 0;
}
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/rune.c
|
C
|
unknown
| 7,405
|
/**
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef STRINGS_STRINGPIECE_H_
#define STRINGS_STRINGPIECE_H_
#include "phonenumbers/base/strings/string_piece.h"
using i18n::phonenumbers::StringPiece;
#endif // STRINGS_STRINGPIECE_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/stringpiece.h
|
C
|
unknown
| 787
|
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Jim Meehan
#include <algorithm>
#include <sstream>
#include <cassert>
#include <cstdio>
#include "phonenumbers/utf/unicodetext.h"
#include "phonenumbers/utf/stringpiece.h"
#include "phonenumbers/utf/utf.h"
#include "phonenumbers/utf/unilib.h"
namespace i18n {
namespace phonenumbers {
using std::stringstream;
using std::max;
using std::hex;
using std::dec;
static int CodepointDistance(const char* start, const char* end) {
int n = 0;
// Increment n on every non-trail-byte.
for (const char* p = start; p < end; ++p) {
n += (*reinterpret_cast<const signed char*>(p) >= -0x40);
}
return n;
}
static int CodepointCount(const char* utf8, int len) {
return CodepointDistance(utf8, utf8 + len);
}
UnicodeText::const_iterator::difference_type
distance(const UnicodeText::const_iterator& first,
const UnicodeText::const_iterator& last) {
return CodepointDistance(first.it_, last.it_);
}
// ---------- Utility ----------
static int ConvertToInterchangeValid(char* start, int len) {
// This routine is called only when we've discovered that a UTF-8 buffer
// that was passed to CopyUTF8, TakeOwnershipOfUTF8, or PointToUTF8
// was not interchange valid. This indicates a bug in the caller, and
// a LOG(WARNING) is done in that case.
// This is similar to CoerceToInterchangeValid, but it replaces each
// structurally valid byte with a space, and each non-interchange
// character with a space, even when that character requires more
// than one byte in UTF8. E.g., "\xEF\xB7\x90" (U+FDD0) is
// structurally valid UTF8, but U+FDD0 is not an interchange-valid
// code point. The result should contain one space, not three.
//
// Since the conversion never needs to write more data than it
// reads, it is safe to change the buffer in place. It returns the
// number of bytes written.
char* const in = start;
char* out = start;
char* const end = start + len;
while (start < end) {
int good = UniLib::SpanInterchangeValid(start, end - start);
if (good > 0) {
if (out != start) {
memmove(out, start, good);
}
out += good;
start += good;
if (start == end) {
break;
}
}
// Is the current string invalid UTF8 or just non-interchange UTF8?
Rune rune;
int n;
if (isvalidcharntorune(start, end - start, &rune, &n)) {
// structurally valid UTF8, but not interchange valid
start += n; // Skip over the whole character.
} else { // bad UTF8
start += 1; // Skip over just one byte
}
*out++ = ' ';
}
return out - in;
}
// *************** Data representation **********
// Note: the copy constructor is undefined.
// After reserve(), resize(), or clear(), we're an owner, not an alias.
void UnicodeText::Repr::reserve(int new_capacity) {
// If there's already enough capacity, and we're an owner, do nothing.
if (capacity_ >= new_capacity && ours_) return;
// Otherwise, allocate a new buffer.
capacity_ = max(new_capacity, (3 * capacity_) / 2 + 20);
char* new_data = new char[capacity_];
// If there is an old buffer, copy it into the new buffer.
if (data_) {
memcpy(new_data, data_, size_);
if (ours_) delete[] data_; // If we owned the old buffer, free it.
}
data_ = new_data;
ours_ = true; // We own the new buffer.
// size_ is unchanged.
}
void UnicodeText::Repr::resize(int new_size) {
if (new_size == 0) {
clear();
} else {
if (!ours_ || new_size > capacity_) reserve(new_size);
// Clear the memory in the expanded part.
if (size_ < new_size) memset(data_ + size_, 0, new_size - size_);
size_ = new_size;
ours_ = true;
}
}
// This implementation of clear() deallocates the buffer if we're an owner.
// That's not strictly necessary; we could just set size_ to 0.
void UnicodeText::Repr::clear() {
if (ours_) delete[] data_;
data_ = NULL;
size_ = capacity_ = 0;
ours_ = true;
}
void UnicodeText::Repr::Copy(const char* data, int size) {
resize(size);
memcpy(data_, data, size);
}
void UnicodeText::Repr::TakeOwnershipOf(char* data, int size, int capacity) {
if (data == data_) return; // We already own this memory. (Weird case.)
if (ours_ && data_) delete[] data_; // If we owned the old buffer, free it.
data_ = data;
size_ = size;
capacity_ = capacity;
ours_ = true;
}
void UnicodeText::Repr::PointTo(const char* data, int size) {
if (ours_ && data_) delete[] data_; // If we owned the old buffer, free it.
data_ = const_cast<char*>(data);
size_ = size;
capacity_ = size;
ours_ = false;
}
void UnicodeText::Repr::append(const char* bytes, int byte_length) {
reserve(size_ + byte_length);
memcpy(data_ + size_, bytes, byte_length);
size_ += byte_length;
}
string UnicodeText::Repr::DebugString() const {
stringstream ss;
ss << "{Repr " << hex << this << " data=" << data_ << " size=" << dec
<< size_ << " capacity=" << capacity_ << " "
<< (ours_ ? "Owned" : "Alias") << "}";
string result;
ss >> result;
return result;
}
// *************** UnicodeText ******************
// ----- Constructors -----
// Default constructor
UnicodeText::UnicodeText() {
}
// Copy constructor
UnicodeText::UnicodeText(const UnicodeText& src) {
Copy(src);
}
// Substring constructor
UnicodeText::UnicodeText(const UnicodeText::const_iterator& first,
const UnicodeText::const_iterator& last) {
assert(first <= last && "Incompatible iterators");
repr_.append(first.it_, last.it_ - first.it_);
}
string UnicodeText::UTF8Substring(const const_iterator& first,
const const_iterator& last) {
assert(first <= last && "Incompatible iterators");
return string(first.it_, last.it_ - first.it_);
}
// ----- Copy -----
UnicodeText& UnicodeText::operator=(const UnicodeText& src) {
if (this != &src) {
Copy(src);
}
return *this;
}
UnicodeText& UnicodeText::Copy(const UnicodeText& src) {
repr_.Copy(src.repr_.data_, src.repr_.size_);
return *this;
}
UnicodeText& UnicodeText::CopyUTF8(const char* buffer, int byte_length) {
repr_.Copy(buffer, byte_length);
if (!UniLib:: IsInterchangeValid(buffer, byte_length)) {
fprintf(stderr, "UTF-8 buffer is not interchange-valid.\n");
repr_.size_ = ConvertToInterchangeValid(repr_.data_, byte_length);
}
return *this;
}
UnicodeText& UnicodeText::UnsafeCopyUTF8(const char* buffer,
int byte_length) {
repr_.Copy(buffer, byte_length);
return *this;
}
// ----- TakeOwnershipOf -----
UnicodeText& UnicodeText::TakeOwnershipOfUTF8(char* buffer,
int byte_length,
int byte_capacity) {
repr_.TakeOwnershipOf(buffer, byte_length, byte_capacity);
if (!UniLib:: IsInterchangeValid(buffer, byte_length)) {
fprintf(stderr, "UTF-8 buffer is not interchange-valid.\n");
repr_.size_ = ConvertToInterchangeValid(repr_.data_, byte_length);
}
return *this;
}
UnicodeText& UnicodeText::UnsafeTakeOwnershipOfUTF8(char* buffer,
int byte_length,
int byte_capacity) {
repr_.TakeOwnershipOf(buffer, byte_length, byte_capacity);
return *this;
}
// ----- PointTo -----
UnicodeText& UnicodeText::PointToUTF8(const char* buffer, int byte_length) {
if (UniLib:: IsInterchangeValid(buffer, byte_length)) {
repr_.PointTo(buffer, byte_length);
} else {
fprintf(stderr, "UTF-8 buffer is not interchange-valid.");
repr_.Copy(buffer, byte_length);
repr_.size_ = ConvertToInterchangeValid(repr_.data_, byte_length);
}
return *this;
}
UnicodeText& UnicodeText::UnsafePointToUTF8(const char* buffer,
int byte_length) {
repr_.PointTo(buffer, byte_length);
return *this;
}
UnicodeText& UnicodeText::PointTo(const UnicodeText& src) {
repr_.PointTo(src.repr_.data_, src.repr_.size_);
return *this;
}
UnicodeText& UnicodeText::PointTo(const const_iterator &first,
const const_iterator &last) {
assert(first <= last && " Incompatible iterators");
repr_.PointTo(first.utf8_data(), last.utf8_data() - first.utf8_data());
return *this;
}
// ----- Append -----
UnicodeText& UnicodeText::append(const UnicodeText& u) {
repr_.append(u.repr_.data_, u.repr_.size_);
return *this;
}
UnicodeText& UnicodeText::append(const const_iterator& first,
const const_iterator& last) {
assert(first <= last && "Incompatible iterators");
repr_.append(first.it_, last.it_ - first.it_);
return *this;
}
UnicodeText& UnicodeText::UnsafeAppendUTF8(const char* utf8, int len) {
repr_.append(utf8, len);
return *this;
}
// ----- substring searching -----
UnicodeText::const_iterator UnicodeText::find(const UnicodeText& look,
const_iterator start_pos) const {
assert(start_pos.utf8_data() >= utf8_data());
assert(start_pos.utf8_data() <= utf8_data() + utf8_length());
return UnsafeFind(look, start_pos);
}
UnicodeText::const_iterator UnicodeText::find(const UnicodeText& look) const {
return UnsafeFind(look, begin());
}
UnicodeText::const_iterator UnicodeText::UnsafeFind(
const UnicodeText& look, const_iterator start_pos) const {
// Due to the magic of the UTF8 encoding, searching for a sequence of
// letters is equivalent to substring search.
StringPiece searching(utf8_data(), utf8_length());
StringPiece look_piece(look.utf8_data(), look.utf8_length());
StringPiece::size_type found =
searching.find(look_piece, start_pos.utf8_data() - utf8_data());
if (found == StringPiece::npos) return end();
return const_iterator(utf8_data() + found);
}
bool UnicodeText::HasReplacementChar() const {
// Equivalent to:
// UnicodeText replacement_char;
// replacement_char.push_back(0xFFFD);
// return find(replacement_char) != end();
StringPiece searching(utf8_data(), utf8_length());
StringPiece looking_for("\xEF\xBF\xBD", 3);
return searching.find(looking_for) != StringPiece::npos;
}
// ----- other methods -----
// Clear operator
void UnicodeText::clear() {
repr_.clear();
}
// Destructor
UnicodeText::~UnicodeText() {}
void UnicodeText::push_back(char32 c) {
if (UniLib::IsValidCodepoint(c)) {
char buf[UTFmax];
Rune rune = c;
int len = runetochar(buf, &rune);
if (UniLib::IsInterchangeValid(buf, len)) {
repr_.append(buf, len);
} else {
fprintf(stderr, "Unicode value 0x%x is not valid for interchange\n", c);
repr_.append(" ", 1);
}
} else {
fprintf(stderr, "Illegal Unicode value: 0x%x\n", c);
repr_.append(" ", 1);
}
}
int UnicodeText::size() const {
return CodepointCount(repr_.data_, repr_.size_);
}
bool operator==(const UnicodeText& lhs, const UnicodeText& rhs) {
if (&lhs == &rhs) return true;
if (lhs.repr_.size_ != rhs.repr_.size_) return false;
return memcmp(lhs.repr_.data_, rhs.repr_.data_, lhs.repr_.size_) == 0;
}
string UnicodeText::DebugString() const {
stringstream ss;
ss << "{UnicodeText " << hex << this << dec << " chars="
<< size() << " repr=" << repr_.DebugString() << "}";
#if 0
return StringPrintf("{UnicodeText %p chars=%d repr=%s}",
this,
size(),
repr_.DebugString().c_str());
#endif
string result;
ss >> result;
return result;
}
// ******************* UnicodeText::const_iterator *********************
// The implementation of const_iterator would be nicer if it
// inherited from boost::iterator_facade
// (http://boost.org/libs/iterator/doc/iterator_facade.html).
UnicodeText::const_iterator::const_iterator() : it_(0) {}
UnicodeText::const_iterator::const_iterator(const const_iterator& other)
: it_(other.it_) {
}
UnicodeText::const_iterator&
UnicodeText::const_iterator::operator=(const const_iterator& other) {
if (&other != this)
it_ = other.it_;
return *this;
}
UnicodeText::const_iterator UnicodeText::begin() const {
return const_iterator(repr_.data_);
}
UnicodeText::const_iterator UnicodeText::end() const {
return const_iterator(repr_.data_ + repr_.size_);
}
bool operator<(const UnicodeText::const_iterator& lhs,
const UnicodeText::const_iterator& rhs) {
return lhs.it_ < rhs.it_;
}
char32 UnicodeText::const_iterator::operator*() const {
// (We could call chartorune here, but that does some
// error-checking, and we're guaranteed that our data is valid
// UTF-8. Also, we expect this routine to be called very often. So
// for speed, we do the calculation ourselves.)
// Convert from UTF-8
uint8 byte1 = static_cast<uint8>(it_[0]);
if (byte1 < 0x80)
return byte1;
uint8 byte2 = static_cast<uint8>(it_[1]);
if (byte1 < 0xE0)
return ((byte1 & 0x1F) << 6)
| (byte2 & 0x3F);
uint8 byte3 = static_cast<uint8>(it_[2]);
if (byte1 < 0xF0)
return ((byte1 & 0x0F) << 12)
| ((byte2 & 0x3F) << 6)
| (byte3 & 0x3F);
uint8 byte4 = static_cast<uint8>(it_[3]);
return ((byte1 & 0x07) << 18)
| ((byte2 & 0x3F) << 12)
| ((byte3 & 0x3F) << 6)
| (byte4 & 0x3F);
}
UnicodeText::const_iterator& UnicodeText::const_iterator::operator++() {
it_ += UniLib::OneCharLen(it_);
return *this;
}
UnicodeText::const_iterator& UnicodeText::const_iterator::operator--() {
while (UniLib::IsTrailByte(*--it_)) { }
return *this;
}
int UnicodeText::const_iterator::get_utf8(char* utf8_output) const {
utf8_output[0] = it_[0];
if (static_cast<unsigned char>(it_[0]) < 0x80)
return 1;
utf8_output[1] = it_[1];
if (static_cast<unsigned char>(it_[0]) < 0xE0)
return 2;
utf8_output[2] = it_[2];
if (static_cast<unsigned char>(it_[0]) < 0xF0)
return 3;
utf8_output[3] = it_[3];
return 4;
}
UnicodeText::const_iterator UnicodeText::MakeIterator(const char* p) const {
#ifndef NDEBUG
assert(p != NULL);
const char* start = utf8_data();
int len = utf8_length();
const char* end = start + len;
assert(p >= start);
assert(p <= end);
assert(p == end || !UniLib::IsTrailByte(*p));
#endif
return const_iterator(p);
}
string UnicodeText::const_iterator::DebugString() const {
stringstream ss;
ss << "{iter " << hex << it_ << "}";
string result;
ss >> result;
return result;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/unicodetext.cc
|
C++
|
unknown
| 15,095
|
// Copyright (C) 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Jim Meehan
#ifndef UTIL_UTF8_UNICODETEXT_H__
#define UTIL_UTF8_UNICODETEXT_H__
#include <iterator>
#include <string>
#include <utility>
#include "phonenumbers/base/basictypes.h"
namespace i18n {
namespace phonenumbers {
using std::string;
using std::bidirectional_iterator_tag;
using std::pair;
// ***************************** UnicodeText **************************
//
// A UnicodeText object is a container for a sequence of Unicode
// codepoint values. It has default, copy, and assignment constructors.
// Data can be appended to it from another UnicodeText, from
// iterators, or from a single codepoint.
//
// The internal representation of the text is UTF-8. Since UTF-8 is a
// variable-width format, UnicodeText does not provide random access
// to the text, and changes to the text are permitted only at the end.
//
// The UnicodeText class defines a const_iterator. The dereferencing
// operator (*) returns a codepoint (char32). The iterator is a
// bidirectional, read-only iterator. It becomes invalid if the text
// is changed.
//
// There are methods for appending and retrieving UTF-8 data directly.
// The 'utf8_data' method returns a const char* that contains the
// UTF-8-encoded version of the text; 'utf8_length' returns the number
// of bytes in the UTF-8 data. An iterator's 'get' method stores up to
// 4 bytes of UTF-8 data in a char array and returns the number of
// bytes that it stored.
//
// Codepoints are integers in the range [0, 0xD7FF] or [0xE000,
// 0x10FFFF], but UnicodeText has the additional restriction that it
// can contain only those characters that are valid for interchange on
// the Web. This excludes all of the control codes except for carriage
// return, line feed, and horizontal tab. It also excludes
// non-characters, but codepoints that are in the Private Use regions
// are allowed, as are codepoints that are unassigned. (See the
// Unicode reference for details.) The function UniLib::IsInterchangeValid
// can be used as a test for this property.
//
// UnicodeTexts are safe. Every method that constructs or modifies a
// UnicodeText tests for interchange-validity, and will substitute a
// space for the invalid data. Such cases are reported via
// LOG(WARNING).
//
// MEMORY MANAGEMENT: copy, take ownership, or point to
//
// A UnicodeText is either an "owner", meaning that it owns the memory
// for the data buffer and will free it when the UnicodeText is
// destroyed, or it is an "alias", meaning that it does not.
//
// There are three methods for storing UTF-8 data in a UnicodeText:
//
// CopyUTF8(buffer, len) copies buffer.
//
// TakeOwnershipOfUTF8(buffer, size, capacity) takes ownership of buffer.
//
// PointToUTF8(buffer, size) creates an alias pointing to buffer.
//
// All three methods perform a validity check on the buffer. There are
// private, "unsafe" versions of these functions that bypass the
// validity check. They are used internally and by friend-functions
// that are handling UTF-8 data that has already been validated.
//
// The purpose of an alias is to avoid making an unnecessary copy of a
// UTF-8 buffer while still providing access to the Unicode values
// within that text through iterators or the fast scanners that are
// based on UTF-8 state tables. The lifetime of an alias must not
// exceed the lifetime of the buffer from which it was constructed.
//
// The semantics of an alias might be described as "copy on write or
// repair." The source data is never modified. If push_back() or
// append() is called on an alias, a copy of the data will be created,
// and the UnicodeText will become an owner. If clear() is called on
// an alias, it becomes an (empty) owner.
//
// The copy constructor and the assignment operator produce an owner.
// That is, after direct initialization ("UnicodeText x(y);") or copy
// initialization ("UnicodeText x = y;") x will be an owner, even if y
// was an alias. The assignment operator ("x = y;") also produces an
// owner unless x and y are the same object and y is an alias.
//
// Aliases should be used with care. If the source from which an alias
// was created is freed, or if the contents are changed, while the
// alias is still in use, fatal errors could result. But it can be
// quite useful to have a UnicodeText "window" through which to see a
// UTF-8 buffer without having to pay the price of making a copy.
//
// UTILITIES
//
// The interfaces in util/utf8/public/textutils.h provide higher-level
// utilities for dealing with UnicodeTexts, including routines for
// creating UnicodeTexts (both owners and aliases) from UTF-8 buffers or
// strings, creating strings from UnicodeTexts, normalizing text for
// efficient matching or display, and others.
class UnicodeText {
public:
class const_iterator;
typedef char32 value_type;
// Constructors. These always produce owners.
UnicodeText(); // Create an empty text.
UnicodeText(const UnicodeText& src); // copy constructor
// Construct a substring (copies the data).
UnicodeText(const const_iterator& first, const const_iterator& last);
// Assignment operator. This copies the data and produces an owner
// unless this == &src, e.g., "x = x;", which is a no-op.
UnicodeText& operator=(const UnicodeText& src);
// x.Copy(y) copies the data from y into x.
UnicodeText& Copy(const UnicodeText& src);
inline UnicodeText& assign(const UnicodeText& src) { return Copy(src); }
// x.PointTo(y) changes x so that it points to y's data.
// It does not copy y or take ownership of y's data.
UnicodeText& PointTo(const UnicodeText& src);
UnicodeText& PointTo(const const_iterator& first,
const const_iterator& last);
~UnicodeText();
void clear(); // Clear text.
bool empty() { return repr_.size_ == 0; } // Test if text is empty.
// Add a codepoint to the end of the text.
// If the codepoint is not interchange-valid, add a space instead
// and log a warning.
void push_back(char32 codepoint);
// Generic appending operation.
// iterator_traits<ForwardIterator>::value_type must be implicitly
// convertible to char32. Typical uses of this method might include:
// char32 chars[] = {0x1, 0x2, ...};
// vector<char32> more_chars = ...;
// utext.append(chars, chars+arraysize(chars));
// utext.append(more_chars.begin(), more_chars.end());
template<typename ForwardIterator>
UnicodeText& append(ForwardIterator first, const ForwardIterator last) {
while (first != last) { push_back(*first++); }
return *this;
}
// A specialization of the generic append() method.
UnicodeText& append(const const_iterator& first, const const_iterator& last);
// An optimization of append(source.begin(), source.end()).
UnicodeText& append(const UnicodeText& source);
int size() const; // the number of Unicode characters (codepoints)
friend bool operator==(const UnicodeText& lhs, const UnicodeText& rhs);
friend bool operator!=(const UnicodeText& lhs, const UnicodeText& rhs);
class const_iterator {
typedef const_iterator CI;
public:
typedef bidirectional_iterator_tag iterator_category;
typedef char32 value_type;
typedef ptrdiff_t difference_type;
typedef void pointer; // (Not needed.)
typedef const char32 reference; // (Needed for const_reverse_iterator)
// Iterators are default-constructible.
const_iterator();
// It's safe to make multiple passes over a UnicodeText.
const_iterator(const const_iterator& other);
const_iterator& operator=(const const_iterator& other);
char32 operator*() const; // Dereference
const_iterator& operator++(); // Advance (++iter)
const_iterator operator++(int) { // (iter++)
const_iterator result(*this);
++*this;
return result;
}
const_iterator& operator--(); // Retreat (--iter)
const_iterator operator--(int) { // (iter--)
const_iterator result(*this);
--*this;
return result;
}
// We love relational operators.
friend bool operator==(const CI& lhs, const CI& rhs) {
return lhs.it_ == rhs.it_; }
friend bool operator!=(const CI& lhs, const CI& rhs) {
return !(lhs == rhs); }
friend bool operator<(const CI& lhs, const CI& rhs);
friend bool operator>(const CI& lhs, const CI& rhs) {
return rhs < lhs; }
friend bool operator<=(const CI& lhs, const CI& rhs) {
return !(rhs < lhs); }
friend bool operator>=(const CI& lhs, const CI& rhs) {
return !(lhs < rhs); }
friend difference_type distance(const CI& first, const CI& last);
// UTF-8-specific methods
// Store the UTF-8 encoding of the current codepoint into buf,
// which must be at least 4 bytes long. Return the number of
// bytes written.
int get_utf8(char* buf) const;
// Return the iterator's pointer into the UTF-8 data.
const char* utf8_data() const { return it_; }
string DebugString() const;
private:
friend class UnicodeText;
friend class UnicodeTextUtils;
friend class UTF8StateTableProperty;
explicit const_iterator(const char* it) : it_(it) {}
const char* it_;
};
const_iterator begin() const;
const_iterator end() const;
class const_reverse_iterator : public std::reverse_iterator<const_iterator> {
public:
const_reverse_iterator(const_iterator it) :
std::reverse_iterator<const_iterator>(it) {}
const char* utf8_data() const {
const_iterator tmp_it = base();
return (--tmp_it).utf8_data();
}
int get_utf8(char* buf) const {
const_iterator tmp_it = base();
return (--tmp_it).get_utf8(buf);
}
};
const_reverse_iterator rbegin() const {
return const_reverse_iterator(end());
}
const_reverse_iterator rend() const {
return const_reverse_iterator(begin());
}
// Substring searching. Returns the beginning of the first
// occurrence of "look", or end() if not found.
const_iterator find(const UnicodeText& look, const_iterator start_pos) const;
// Equivalent to find(look, begin())
const_iterator find(const UnicodeText& look) const;
// Returns whether this contains the character U+FFFD. This can
// occur, for example, if the input to Encodings::Decode() had byte
// sequences that were invalid in the source encoding.
bool HasReplacementChar() const;
// UTF-8-specific methods
//
// Return the data, length, and capacity of UTF-8-encoded version of
// the text. Length and capacity are measured in bytes.
const char* utf8_data() const { return repr_.data_; }
int utf8_length() const { return repr_.size_; }
int utf8_capacity() const { return repr_.capacity_; }
// Return the UTF-8 data as a string.
static string UTF8Substring(const const_iterator& first,
const const_iterator& last);
// There are three methods for initializing a UnicodeText from UTF-8
// data. They vary in details of memory management. In all cases,
// the data is tested for interchange-validity. If it is not
// interchange-valid, a LOG(WARNING) is issued, and each
// structurally invalid byte and each interchange-invalid codepoint
// is replaced with a space.
// x.CopyUTF8(buf, len) copies buf into x.
UnicodeText& CopyUTF8(const char* utf8_buffer, int byte_length);
// x.TakeOwnershipOfUTF8(buf, len, capacity). x takes ownership of
// buf. buf is not copied.
UnicodeText& TakeOwnershipOfUTF8(char* utf8_buffer,
int byte_length,
int byte_capacity);
// x.PointToUTF8(buf,len) changes x so that it points to buf
// ("becomes an alias"). It does not take ownership or copy buf.
// If the buffer is not valid, this has the same effect as
// CopyUTF8(utf8_buffer, byte_length).
UnicodeText& PointToUTF8(const char* utf8_buffer, int byte_length);
// Occasionally it is necessary to use functions that operate on the
// pointer returned by utf8_data(). MakeIterator(p) provides a way
// to get back to the UnicodeText level. It uses CHECK to ensure
// that p is a pointer within this object's UTF-8 data, and that it
// points to the beginning of a character.
const_iterator MakeIterator(const char* p) const;
string DebugString() const;
private:
friend class const_iterator;
friend class UnicodeTextUtils;
class Repr { // A byte-string.
public:
char* data_;
int size_;
int capacity_;
bool ours_; // Do we own data_?
Repr() : data_(NULL), size_(0), capacity_(0), ours_(true) {}
~Repr() { if (ours_) delete[] data_; }
void clear();
void reserve(int capacity);
void resize(int size);
void append(const char* bytes, int byte_length);
void Copy(const char* data, int size);
void TakeOwnershipOf(char* data, int size, int capacity);
void PointTo(const char* data, int size);
string DebugString() const;
private:
Repr& operator=(const Repr&);
Repr(const Repr& other);
};
Repr repr_;
// UTF-8-specific private methods.
// These routines do not perform a validity check when compiled
// in opt mode.
// It is an error to call these methods with UTF-8 data that
// is not interchange-valid.
//
UnicodeText& UnsafeCopyUTF8(const char* utf8_buffer, int byte_length);
UnicodeText& UnsafeTakeOwnershipOfUTF8(
char* utf8_buffer, int byte_length, int byte_capacity);
UnicodeText& UnsafePointToUTF8(const char* utf8_buffer, int byte_length);
UnicodeText& UnsafeAppendUTF8(const char* utf8_buffer, int byte_length);
const_iterator UnsafeFind(const UnicodeText& look,
const_iterator start_pos) const;
};
bool operator==(const UnicodeText& lhs, const UnicodeText& rhs);
inline bool operator!=(const UnicodeText& lhs, const UnicodeText& rhs) {
return !(lhs == rhs);
}
// UnicodeTextRange is a pair of iterators, useful for specifying text
// segments. If the iterators are ==, the segment is empty.
typedef pair<UnicodeText::const_iterator,
UnicodeText::const_iterator> UnicodeTextRange;
inline bool UnicodeTextRangeIsEmpty(const UnicodeTextRange& r) {
return r.first == r.second;
}
// *************************** Utilities *************************
// A factory function for creating a UnicodeText from a buffer of
// UTF-8 data. The new UnicodeText takes ownership of the buffer. (It
// is an "owner.")
//
// Each byte that is structurally invalid will be replaced with a
// space. Each codepoint that is interchange-invalid will also be
// replaced with a space, even if the codepoint was represented with a
// multibyte sequence in the UTF-8 data.
//
inline UnicodeText MakeUnicodeTextAcceptingOwnership(
char* utf8_buffer, int byte_length, int byte_capacity) {
return UnicodeText().TakeOwnershipOfUTF8(
utf8_buffer, byte_length, byte_capacity);
}
// A factory function for creating a UnicodeText from a buffer of
// UTF-8 data. The new UnicodeText does not take ownership of the
// buffer. (It is an "alias.")
//
inline UnicodeText MakeUnicodeTextWithoutAcceptingOwnership(
const char* utf8_buffer, int byte_length) {
return UnicodeText().PointToUTF8(utf8_buffer, byte_length);
}
// Create a UnicodeText from a UTF-8 string or buffer.
//
// If do_copy is true, then a copy of the string is made. The copy is
// owned by the resulting UnicodeText object and will be freed when
// the object is destroyed. This UnicodeText object is referred to
// as an "owner."
//
// If do_copy is false, then no copy is made. The resulting
// UnicodeText object does NOT take ownership of the string; in this
// case, the lifetime of the UnicodeText object must not exceed the
// lifetime of the string. This Unicodetext object is referred to as
// an "alias." This is the same as MakeUnicodeTextWithoutAcceptingOwnership.
//
// If the input string does not contain valid UTF-8, then a copy is
// made (as if do_copy were true) and coerced to valid UTF-8 by
// replacing each invalid byte with a space.
//
inline UnicodeText UTF8ToUnicodeText(const char* utf8_buf, int len,
bool do_copy) {
UnicodeText t;
if (do_copy) {
t.CopyUTF8(utf8_buf, len);
} else {
t.PointToUTF8(utf8_buf, len);
}
return t;
}
inline UnicodeText UTF8ToUnicodeText(const string& utf_string, bool do_copy) {
return UTF8ToUnicodeText(utf_string.data(), utf_string.size(), do_copy);
}
inline UnicodeText UTF8ToUnicodeText(const char* utf8_buf, int len) {
return UTF8ToUnicodeText(utf8_buf, len, true);
}
inline UnicodeText UTF8ToUnicodeText(const string& utf8_string) {
return UTF8ToUnicodeText(utf8_string, true);
}
// Return a string containing the UTF-8 encoded version of all the
// Unicode characters in t.
inline string UnicodeTextToUTF8(const UnicodeText& t) {
return string(t.utf8_data(), t.utf8_length());
}
} // namespace phonenumbers
} // namespace i18n
#endif // UTIL_UTF8_UNICODETEXT_H__
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/unicodetext.h
|
C++
|
unknown
| 17,534
|
/**
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: Shawn Ligocki
#include "phonenumbers/utf/unilib.h"
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/utf/utf.h"
namespace i18n {
namespace phonenumbers {
namespace UniLib {
namespace {
// MOE: start_strip
// MOE: end_strip
// Codepoints not allowed for interchange are:
// C0 (ASCII) controls: U+0000 to U+001F excluding Space (SP, U+0020),
// Horizontal Tab (HT, U+0009), Line-Feed (LF, U+000A),
// Form Feed (FF, U+000C) and Carriage-Return (CR, U+000D)
// C1 controls: U+007F to U+009F
// Surrogates: U+D800 to U+DFFF
// Non-characters: U+FDD0 to U+FDEF and U+xxFFFE to U+xxFFFF for all xx
inline bool IsInterchangeValidCodepoint(char32 c) {
return !((c >= 0x00 && c <= 0x08) || c == 0x0B || (c >= 0x0E && c <= 0x1F) ||
(c >= 0x7F && c <= 0x9F) ||
(c >= 0xD800 && c <= 0xDFFF) ||
(c >= 0xFDD0 && c <= 0xFDEF) || (c&0xFFFE) == 0xFFFE);
}
} // namespace
int SpanInterchangeValid(const char* begin, int byte_length) {
Rune rune;
const char* p = begin;
const char* end = begin + byte_length;
while (p < end) {
int bytes_consumed = charntorune(&rune, p, end - p);
// We want to accept Runeerror == U+FFFD as a valid char, but it is used
// by chartorune to indicate error. Luckily, the real codepoint is size 3
// while errors return bytes_consumed <= 1.
if ((rune == Runeerror && bytes_consumed <= 1) ||
!IsInterchangeValidCodepoint(rune)) {
break; // Found
}
p += bytes_consumed;
}
return p - begin;
}
} // namespace UniLib
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/unilib.cc
|
C++
|
unknown
| 2,218
|
/**
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Routines to do manipulation of Unicode characters or text
//
// The StructurallyValid routines accept buffers of arbitrary bytes.
// For CoerceToStructurallyValid(), the input buffer and output buffers may
// point to exactly the same memory.
//
// In all other cases, the UTF-8 string must be structurally valid and
// have all codepoints in the range U+0000 to U+D7FF or U+E000 to U+10FFFF.
// Debug builds take a fatal error for invalid UTF-8 input.
// The input and output buffers may not overlap at all.
//
// The char32 routines are here only for convenience; they convert to UTF-8
// internally and use the UTF-8 routines.
#ifndef UTIL_UTF8_UNILIB_H__
#define UTIL_UTF8_UNILIB_H__
#include <string>
#include "phonenumbers/base/basictypes.h"
namespace i18n {
namespace phonenumbers {
namespace UniLib {
// Returns true unless a surrogate code point
inline bool IsValidCodepoint(char32 c) {
// In the range [0, 0xD800) or [0xE000, 0x10FFFF]
return (static_cast<uint32>(c) < 0xD800)
|| (c >= 0xE000 && c <= 0x10FFFF);
}
// Table of UTF-8 character lengths, based on first byte
static const unsigned char kUTF8LenTbl[256] = {
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,
3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4, 4,4,4,4,4,4,4,4
};
// Return length of a single UTF-8 source character
inline int OneCharLen(const char* src) {
return kUTF8LenTbl[*reinterpret_cast<const uint8*>(src)];
}
// Return length of a single UTF-8 source character
inline int OneCharLen(const uint8* src) {
return kUTF8LenTbl[*src];
}
// Return true if this byte is a trailing UTF-8 byte (10xx xxxx)
inline bool IsTrailByte(char x) {
// return (x & 0xC0) == 0x80;
// Since trail bytes are always in [0x80, 0xBF], we can optimize:
return static_cast<signed char>(x) < -0x40;
}
// Returns the length in bytes of the prefix of src that is all
// interchange valid UTF-8
int SpanInterchangeValid(const char* src, int byte_length);
inline int SpanInterchangeValid(const std::string& src) {
return SpanInterchangeValid(src.data(), src.size());
}
// Returns true if the source is all interchange valid UTF-8
// "Interchange valid" is a stronger than structurally valid --
// no C0 or C1 control codes (other than CR LF HT FF) and no non-characters.
inline bool IsInterchangeValid(const char* src, int byte_length) {
return (byte_length == SpanInterchangeValid(src, byte_length));
}
inline bool IsInterchangeValid(const std::string& src) {
return IsInterchangeValid(src.data(), src.size());
}
} // namespace UniLib
} // namespace phonenumbers
} // namespace i18n
#endif // UTIL_UTF8_PUBLIC_UNILIB_H_
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/unilib.h
|
C++
|
unknown
| 3,667
|
/*
* The authors of this software are Rob Pike and Ken Thompson.
* Copyright (c) 1998-2002 by Lucent Technologies.
* Portions Copyright (c) 2009 The Go Authors. All rights reserved.
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#ifndef _UTFH_
#define _UTFH_ 1
typedef unsigned int Rune; /* Code-point values in Unicode 4.0 are 21 bits wide.*/
enum
{
UTFmax = 4, /* maximum bytes per rune */
Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */
Runeself = 0x80, /* rune and UTF sequences are the same (<) */
Runeerror = 0xFFFD, /* decoding error in UTF */
Runemax = 0x10FFFF, /* maximum rune value */
};
#ifdef __cplusplus
extern "C" {
#endif
/*
* rune routines
*/
/*
* These routines were written by Rob Pike and Ken Thompson
* and first appeared in Plan 9.
* SEE ALSO
* utf (7)
* tcs (1)
*/
// runetochar copies (encodes) one rune, pointed to by r, to at most
// UTFmax bytes starting at s and returns the number of bytes generated.
int runetochar(char* s, const Rune* r);
// chartorune copies (decodes) at most UTFmax bytes starting at s to
// one rune, pointed to by r, and returns the number of bytes consumed.
// If the input is not exactly in UTF format, chartorune will set *r
// to Runeerror and return 1.
//
// Note: There is no special case for a "null-terminated" string. A
// string whose first byte has the value 0 is the UTF8 encoding of the
// Unicode value 0 (i.e., ASCII NULL). A byte value of 0 is illegal
// anywhere else in a UTF sequence.
int chartorune(Rune* r, const char* s);
// charntorune is like chartorune, except that it will access at most
// n bytes of s. If the UTF sequence is incomplete within n bytes,
// charntorune will set *r to Runeerror and return 0. If it is complete
// but not in UTF format, it will set *r to Runeerror and return 1.
//
// Added 2004-09-24 by Wei-Hwa Huang
int charntorune(Rune* r, const char* s, int n);
// isvalidcharntorune(str, n, r, consumed)
// is a convenience function that calls "*consumed = charntorune(r, str, n)"
// and returns an int (logically boolean) indicating whether the first
// n bytes of str was a valid and complete UTF sequence.
int isvalidcharntorune(const char* str, int n, Rune* r, int* consumed);
// runelen returns the number of bytes required to convert r into UTF.
int runelen(Rune r);
// runenlen returns the number of bytes required to convert the n
// runes pointed to by r into UTF.
int runenlen(const Rune* r, int n);
// fullrune returns 1 if the string s of length n is long enough to be
// decoded by chartorune, and 0 otherwise. This does not guarantee
// that the string contains a legal UTF encoding. This routine is used
// by programs that obtain input one byte at a time and need to know
// when a full rune has arrived.
int fullrune(const char* s, int n);
// The following routines are analogous to the corresponding string
// routines with "utf" substituted for "str", and "rune" substituted
// for "chr".
// utflen returns the number of runes that are represented by the UTF
// string s. (cf. strlen)
int utflen(const char* s);
// utfnlen returns the number of complete runes that are represented
// by the first n bytes of the UTF string s. If the last few bytes of
// the string contain an incompletely coded rune, utfnlen will not
// count them; in this way, it differs from utflen, which includes
// every byte of the string. (cf. strnlen)
int utfnlen(const char* s, long n);
// utfrune returns a pointer to the first occurrence of rune r in the
// UTF string s, or 0 if r does not occur in the string. The NULL
// byte terminating a string is considered to be part of the string s.
// (cf. strchr)
/*const*/ char* utfrune(const char* s, Rune r);
// utfrrune returns a pointer to the last occurrence of rune r in the
// UTF string s, or 0 if r does not occur in the string. The NULL
// byte terminating a string is considered to be part of the string s.
// (cf. strrchr)
/*const*/ char* utfrrune(const char* s, Rune r);
// utfutf returns a pointer to the first occurrence of the UTF string
// s2 as a UTF substring of s1, or 0 if there is none. If s2 is the
// null string, utfutf returns s1. (cf. strstr)
const char* utfutf(const char* s1, const char* s2);
// utfecpy copies UTF sequences until a null sequence has been copied,
// but writes no sequences beyond es1. If any sequences are copied,
// s1 is terminated by a null sequence, and a pointer to that sequence
// is returned. Otherwise, the original s1 is returned. (cf. strecpy)
char* utfecpy(char *s1, char *es1, const char *s2);
// These functions are rune-string analogues of the corresponding
// functions in strcat (3).
//
// These routines first appeared in Plan 9.
// SEE ALSO
// memmove (3)
// rune (3)
// strcat (2)
//
// BUGS: The outcome of overlapping moves varies among implementations.
Rune* runestrcat(Rune* s1, const Rune* s2);
Rune* runestrncat(Rune* s1, const Rune* s2, long n);
const Rune* runestrchr(const Rune* s, Rune c);
int runestrcmp(const Rune* s1, const Rune* s2);
int runestrncmp(const Rune* s1, const Rune* s2, long n);
Rune* runestrcpy(Rune* s1, const Rune* s2);
Rune* runestrncpy(Rune* s1, const Rune* s2, long n);
Rune* runestrecpy(Rune* s1, Rune* es1, const Rune* s2);
Rune* runestrdup(const Rune* s);
const Rune* runestrrchr(const Rune* s, Rune c);
long runestrlen(const Rune* s);
const Rune* runestrstr(const Rune* s1, const Rune* s2);
// The following routines test types and modify cases for Unicode
// characters. Unicode defines some characters as letters and
// specifies three cases: upper, lower, and title. Mappings among the
// cases are also defined, although they are not exhaustive: some
// upper case letters have no lower case mapping, and so on. Unicode
// also defines several character properties, a subset of which are
// checked by these routines. These routines are based on Unicode
// version 3.0.0.
//
// NOTE: The routines are implemented in C, so the boolean functions
// (e.g., isupperrune) return 0 for false and 1 for true.
//
//
// toupperrune, tolowerrune, and totitlerune are the Unicode case
// mappings. These routines return the character unchanged if it has
// no defined mapping.
Rune toupperrune(Rune r);
Rune tolowerrune(Rune r);
Rune totitlerune(Rune r);
// isupperrune tests for upper case characters, including Unicode
// upper case letters and targets of the toupper mapping. islowerrune
// and istitlerune are defined analogously.
int isupperrune(Rune r);
int islowerrune(Rune r);
int istitlerune(Rune r);
// isalpharune tests for Unicode letters; this includes ideographs in
// addition to alphabetic characters.
int isalpharune(Rune r);
// isdigitrune tests for digits. Non-digit numbers, such as Roman
// numerals, are not included.
int isdigitrune(Rune r);
// isspacerune tests for whitespace characters, including "C" locale
// whitespace, Unicode defined whitespace, and the "zero-width
// non-break space" character.
int isspacerune(Rune r);
// (The comments in this file were copied from the manpage files rune.3,
// isalpharune.3, and runestrcat.3. Some formatting changes were also made
// to conform to Google style. /JRM 11/11/05)
#ifdef __cplusplus
}
#endif
#endif
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/utf.h
|
C
|
unknown
| 7,849
|
/*
* The authors of this software are Rob Pike and Ken Thompson.
* Copyright (c) 1998-2002 by Lucent Technologies.
* Permission to use, copy, modify, and distribute this software for any
* purpose without fee is hereby granted, provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#define uchar _utfuchar
#define ushort _utfushort
#define uint _utfuint
#define ulong _utfulong
#define vlong _utfvlong
#define uvlong _utfuvlong
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
#define nelem(x) (sizeof(x)/sizeof((x)[0]))
|
2301_81045437/third_party_libphonenumber
|
cpp/src/phonenumbers/utf/utfdef.h
|
C
|
unknown
| 1,069
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Unit tests for asyoutypeformatter.cc, ported from AsYouTypeFormatterTest.java
//
// Note that these tests use the test metadata, not the normal metadata file,
// so should not be used for regression test purposes - these tests are
// illustrative only and test functionality.
#include "phonenumbers/asyoutypeformatter.h"
#include <gtest/gtest.h>
#include "phonenumbers/base/logging.h"
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/default_logger.h"
#include "phonenumbers/phonenumberutil.h"
#include "phonenumbers/test_util.h"
namespace i18n {
namespace phonenumbers {
class PhoneMetadata;
class AsYouTypeFormatterTest : public testing::Test {
protected:
AsYouTypeFormatterTest() : phone_util_(*PhoneNumberUtil::GetInstance()) {
PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
}
const PhoneMetadata* GetCurrentMetadata() const {
return formatter_->current_metadata_;
}
const string& GetExtractedNationalPrefix() const {
return formatter_->GetExtractedNationalPrefix();
}
int ConvertUnicodeStringPosition(const UnicodeString& s, int pos) const {
return AsYouTypeFormatter::ConvertUnicodeStringPosition(s, pos);
}
const PhoneNumberUtil& phone_util_;
scoped_ptr<AsYouTypeFormatter> formatter_;
string result_;
private:
DISALLOW_COPY_AND_ASSIGN(AsYouTypeFormatterTest);
};
TEST_F(AsYouTypeFormatterTest, ConvertUnicodeStringPosition) {
EXPECT_EQ(-1, ConvertUnicodeStringPosition(UnicodeString("12345"), 10));
EXPECT_EQ(3, ConvertUnicodeStringPosition(UnicodeString("12345"), 3));
EXPECT_EQ(0, ConvertUnicodeStringPosition(
UnicodeString("\xEF\xBC\x95" /* "5" */), 0));
EXPECT_EQ(4, ConvertUnicodeStringPosition(
UnicodeString("0\xEF\xBC\x95""3" /* "053" */), 2));
EXPECT_EQ(5, ConvertUnicodeStringPosition(
UnicodeString("0\xEF\xBC\x95""3" /* "053" */), 3));
}
TEST_F(AsYouTypeFormatterTest, Constructor) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_TRUE(GetCurrentMetadata() != NULL);
}
TEST_F(AsYouTypeFormatterTest, InvalidPlusSign) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GetUnknown()));
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+48 ", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 88", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 88 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+48 88 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+48 88 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+48 88 123 1", formatter_->InputDigit('1', &result_));
// A plus sign can only appear at the beginning of the number; otherwise, no
// formatting is applied.
EXPECT_EQ("+48881231+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+48881231+2", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, TooLongNumberMatchingMultipleLeadingDigits) {
// See https://github.com/google/libphonenumber/issues/36
// The bug occurred last time for countries which have two formatting rules
// with exactly the same leading digits pattern but differ in length.
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GetUnknown()));
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("+81 90", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+81 90 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 90 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 90 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+81 90 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+81 90 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+81 90 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+81 90 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+81 90 1234 5678", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 90 12 345 6789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("+81901234567890", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+819012345678901", formatter_->InputDigit('1', &result_));
}
TEST_F(AsYouTypeFormatterTest, CountryWithSpaceInNationalPrefixFormattingRule) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::BY()));
EXPECT_EQ("8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("88", formatter_->InputDigit('8', &result_));
EXPECT_EQ("881", formatter_->InputDigit('1', &result_));
EXPECT_EQ("8 819", formatter_->InputDigit('9', &result_));
EXPECT_EQ("8 8190", formatter_->InputDigit('0', &result_));
// The formatting rule for 5 digit numbers states that no space should be
// present after the national prefix.
EXPECT_EQ("881 901", formatter_->InputDigit('1', &result_));
EXPECT_EQ("8 819 012", formatter_->InputDigit('2', &result_));
// Too long, no formatting rule applies.
EXPECT_EQ("88190123", formatter_->InputDigit('3', &result_));
}
TEST_F(AsYouTypeFormatterTest,
CountryWithSpaceInNationalPrefixFormattingRuleAndLongNdd) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::BY()));
EXPECT_EQ("9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("99", formatter_->InputDigit('9', &result_));
EXPECT_EQ("999", formatter_->InputDigit('9', &result_));
EXPECT_EQ("9999", formatter_->InputDigit('9', &result_));
EXPECT_EQ("99999 ", formatter_->InputDigit('9', &result_));
EXPECT_EQ("99999 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("99999 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("99999 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("99999 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("99999 12 345", formatter_->InputDigit('5', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_US) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_EQ("6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("650 253", formatter_->InputDigit('3', &result_));
// Note this is how a US local number (without area code) should be formatted.
EXPECT_EQ("650 2532", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650 253 2222", formatter_->InputDigit('2', &result_));
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("16", formatter_->InputDigit('6', &result_));
EXPECT_EQ("1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 2222", formatter_->InputDigit('2', &result_));
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011 44 ", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011 44 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("011 44 61", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 44 6 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 44 6 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 44 6 123 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 44 6 123 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 44 6 123 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 44 6 123 123 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 44 6 123 123 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 44 6 123 123 123", formatter_->InputDigit('3', &result_));
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("011 54 ", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011 54 9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("011 54 91", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 54 9 11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 54 9 11 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 54 9 11 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 54 9 11 231", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 54 9 11 2312", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 54 9 11 2312 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 54 9 11 2312 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 54 9 11 2312 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 54 9 11 2312 1234", formatter_->InputDigit('4', &result_));
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 24", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011 244 ", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011 244 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 244 28", formatter_->InputDigit('8', &result_));
EXPECT_EQ("011 244 280", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 000", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 000 0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 000 00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 244 280 000 000", formatter_->InputDigit('0', &result_));
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+48 ", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 88", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+48 88 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+48 88 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+48 88 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+48 88 123 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+48 88 123 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+48 88 123 12 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+48 88 123 12 12", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_USFullWidthCharacters) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_EQ("\xEF\xBC\x96" /* "6" */,
formatter_->InputDigit(UnicodeString("\xEF\xBC\x96" /* "6" */)[0],
&result_));
EXPECT_EQ("\xEF\xBC\x96\xEF\xBC\x95" /* "65" */,
formatter_->InputDigit(UnicodeString("\xEF\xBC\x95" /* "5" */)[0],
&result_));
EXPECT_EQ("650",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x90" /* "0" */)[0],
&result_));
EXPECT_EQ("650 2",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x92" /* "2" */)[0],
&result_));
EXPECT_EQ("650 25",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x95" /* "5" */)[0],
&result_));
EXPECT_EQ("650 253",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x93" /* "3" */)[0],
&result_));
EXPECT_EQ("650 2532",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x92" /* "2" */)[0],
&result_));
EXPECT_EQ("650 253 22",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x92" /* "2" */)[0],
&result_));
EXPECT_EQ("650 253 222",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x92" /* "2" */)[0],
&result_));
EXPECT_EQ("650 253 2222",
formatter_->InputDigit(UnicodeString("\xEF\xBC\x92" /* "2" */)[0],
&result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_USMobileShortCode) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_EQ("*", formatter_->InputDigit('*', &result_));
EXPECT_EQ("*1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("*12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("*121", formatter_->InputDigit('1', &result_));
EXPECT_EQ("*121#", formatter_->InputDigit('#', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_USVanityNumber) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_EQ("8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("80", formatter_->InputDigit('0', &result_));
EXPECT_EQ("800", formatter_->InputDigit('0', &result_));
EXPECT_EQ("800 ", formatter_->InputDigit(' ', &result_));
EXPECT_EQ("800 M", formatter_->InputDigit('M', &result_));
EXPECT_EQ("800 MY", formatter_->InputDigit('Y', &result_));
EXPECT_EQ("800 MY ", formatter_->InputDigit(' ', &result_));
EXPECT_EQ("800 MY A", formatter_->InputDigit('A', &result_));
EXPECT_EQ("800 MY AP", formatter_->InputDigit('P', &result_));
EXPECT_EQ("800 MY APP", formatter_->InputDigit('P', &result_));
EXPECT_EQ("800 MY APPL", formatter_->InputDigit('L', &result_));
EXPECT_EQ("800 MY APPLE", formatter_->InputDigit('E', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTFAndRememberPositionUS) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
EXPECT_EQ("1", formatter_->InputDigitAndRememberPosition('1', &result_));
EXPECT_EQ(1, formatter_->GetRememberedPosition());
EXPECT_EQ("16", formatter_->InputDigit('6', &result_));
EXPECT_EQ("1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ(1, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650", formatter_->InputDigitAndRememberPosition('0', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 25", formatter_->InputDigit('5', &result_));
// Note the remembered position for digit "0" changes from 4 to 5, because a
// space is now inserted in the front.
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 253 222", formatter_->InputDigitAndRememberPosition('2',
&result_));
EXPECT_EQ(13, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 253 2222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(13, formatter_->GetRememberedPosition());
EXPECT_EQ("165025322222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(10, formatter_->GetRememberedPosition());
EXPECT_EQ("1650253222222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(10, formatter_->GetRememberedPosition());
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("16", formatter_->InputDigitAndRememberPosition('6', &result_));
EXPECT_EQ(2, formatter_->GetRememberedPosition());
EXPECT_EQ("1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ(3, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ(3, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ(3, formatter_->GetRememberedPosition());
EXPECT_EQ("1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 650 253 2222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("165025322222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(2, formatter_->GetRememberedPosition());
EXPECT_EQ("1650253222222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(2, formatter_->GetRememberedPosition());
formatter_->Clear();
EXPECT_EQ("6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("650 2532",
formatter_->InputDigitAndRememberPosition('2', &result_));
EXPECT_EQ(8, formatter_->GetRememberedPosition());
EXPECT_EQ("650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ(9, formatter_->GetRememberedPosition());
EXPECT_EQ("650 253 222", formatter_->InputDigit('2', &result_));
// No more formatting when semicolon is entered.
EXPECT_EQ("650253222;", formatter_->InputDigit(';', &result_));
EXPECT_EQ(7, formatter_->GetRememberedPosition());
EXPECT_EQ("650253222;2", formatter_->InputDigit('2', &result_));
formatter_->Clear();
EXPECT_EQ("6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("650", formatter_->InputDigit('0', &result_));
// No more formatting when users choose to do their own formatting.
EXPECT_EQ("650-", formatter_->InputDigit('-', &result_));
EXPECT_EQ("650-2", formatter_->InputDigitAndRememberPosition('2', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("650-25", formatter_->InputDigit('5', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("650-253", formatter_->InputDigit('3', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("650-253-", formatter_->InputDigit('-', &result_));
EXPECT_EQ("650-253-2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650-253-22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650-253-222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("650-253-2222", formatter_->InputDigit('2', &result_));
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 4", formatter_->InputDigitAndRememberPosition('4', &result_));
EXPECT_EQ("011 48 ", formatter_->InputDigit('8', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("011 48 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("011 48 88", formatter_->InputDigit('8', &result_));
EXPECT_EQ("011 48 88 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 48 88 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("011 48 88 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 48 88 123 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 48 88 123 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("011 48 88 123 12 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 48 88 123 12 12", formatter_->InputDigit('2', &result_));
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+1 6", formatter_->InputDigitAndRememberPosition('6', &result_));
EXPECT_EQ("+1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ(4, formatter_->GetRememberedPosition());
EXPECT_EQ("+1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ(4, formatter_->GetRememberedPosition());
EXPECT_EQ("+1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+1 650 253",
formatter_->InputDigitAndRememberPosition('3', &result_));
EXPECT_EQ("+1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ(10, formatter_->GetRememberedPosition());
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+1 6", formatter_->InputDigitAndRememberPosition('6', &result_));
EXPECT_EQ("+1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ(4, formatter_->GetRememberedPosition());
EXPECT_EQ("+1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ(4, formatter_->GetRememberedPosition());
EXPECT_EQ("+1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+1650253222;", formatter_->InputDigit(';', &result_));
EXPECT_EQ(3, formatter_->GetRememberedPosition());
}
TEST_F(AsYouTypeFormatterTest, AYTF_GBFixedLine) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GB()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02", formatter_->InputDigit('2', &result_));
EXPECT_EQ("020", formatter_->InputDigit('0', &result_));
EXPECT_EQ("020 7", formatter_->InputDigitAndRememberPosition('7', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("020 70", formatter_->InputDigit('0', &result_));
EXPECT_EQ("020 703", formatter_->InputDigit('3', &result_));
EXPECT_EQ(5, formatter_->GetRememberedPosition());
EXPECT_EQ("020 7031", formatter_->InputDigit('1', &result_));
EXPECT_EQ("020 7031 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("020 7031 30", formatter_->InputDigit('0', &result_));
EXPECT_EQ("020 7031 300", formatter_->InputDigit('0', &result_));
EXPECT_EQ("020 7031 3000", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_GBTollFree) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GB()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08", formatter_->InputDigit('8', &result_));
EXPECT_EQ("080", formatter_->InputDigit('0', &result_));
EXPECT_EQ("080 7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("080 70", formatter_->InputDigit('0', &result_));
EXPECT_EQ("080 703", formatter_->InputDigit('3', &result_));
EXPECT_EQ("080 7031", formatter_->InputDigit('1', &result_));
EXPECT_EQ("080 7031 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("080 7031 30", formatter_->InputDigit('0', &result_));
EXPECT_EQ("080 7031 300", formatter_->InputDigit('0', &result_));
EXPECT_EQ("080 7031 3000", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_GBPremiumRate) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GB()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("09", formatter_->InputDigit('9', &result_));
EXPECT_EQ("090", formatter_->InputDigit('0', &result_));
EXPECT_EQ("090 7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("090 70", formatter_->InputDigit('0', &result_));
EXPECT_EQ("090 703", formatter_->InputDigit('3', &result_));
EXPECT_EQ("090 7031", formatter_->InputDigit('1', &result_));
EXPECT_EQ("090 7031 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("090 7031 30", formatter_->InputDigit('0', &result_));
EXPECT_EQ("090 7031 300", formatter_->InputDigit('0', &result_));
EXPECT_EQ("090 7031 3000", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_NZMobile) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::NZ()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02", formatter_->InputDigit('2', &result_));
EXPECT_EQ("021", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02-11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02-112", formatter_->InputDigit('2', &result_));
// Note the unittest is using fake metadata which might produce non-ideal
// results.
EXPECT_EQ("02-112 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("02-112 34", formatter_->InputDigit('4', &result_));
EXPECT_EQ("02-112 345", formatter_->InputDigit('5', &result_));
EXPECT_EQ("02-112 3456", formatter_->InputDigit('6', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_DE) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::DE()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("03", formatter_->InputDigit('3', &result_));
EXPECT_EQ("030", formatter_->InputDigit('0', &result_));
EXPECT_EQ("030/1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("030/12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("030/123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("030/1234", formatter_->InputDigit('4', &result_));
// 08021 2345
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08", formatter_->InputDigit('8', &result_));
EXPECT_EQ("080", formatter_->InputDigit('0', &result_));
EXPECT_EQ("080 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("080 21", formatter_->InputDigit('1', &result_));
EXPECT_EQ("08021 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("08021 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("08021 234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("08021 2345", formatter_->InputDigit('5', &result_));
// 00 1 650 253 2250
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00 1 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("00 1 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("00 1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("00 1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00 1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00 1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("00 1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("00 1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00 1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00 1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00 1 650 253 2222", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_AR) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::AR()));
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("011 70", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 703", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 7031", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 7031-3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("011 7031-30", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 7031-300", formatter_->InputDigit('0', &result_));
EXPECT_EQ("011 7031-3000", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ARMobile) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::AR()));
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+54 ", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+54 9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("+54 91", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+54 9 11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+54 9 11 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+54 9 11 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+54 9 11 231", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+54 9 11 2312", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+54 9 11 2312 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+54 9 11 2312 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+54 9 11 2312 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+54 9 11 2312 1234", formatter_->InputDigit('4', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_KR) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::KR()));
// +82 51 234 5678
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+82 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 51", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+82 51-2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 51-23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+82 51-234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+82 51-234-5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 51-234-56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+82 51-234-567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+82 51-234-5678", formatter_->InputDigit('8', &result_));
// +82 2 531 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+82 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 2-53", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+82 2-531", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+82 2-531-5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 2-531-56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+82 2-531-567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+82 2-531-5678", formatter_->InputDigit('8', &result_));
// +82 2 3665 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+82 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+82 2-36", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+82 2-366", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+82 2-3665", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 2-3665-5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+82 2-3665-56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+82 2-3665-567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+82 2-3665-5678", formatter_->InputDigit('8', &result_));
// 02-114
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02", formatter_->InputDigit('2', &result_));
EXPECT_EQ("021", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02-11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02-114", formatter_->InputDigit('4', &result_));
// 02-1300
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02", formatter_->InputDigit('2', &result_));
EXPECT_EQ("021", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02-13", formatter_->InputDigit('3', &result_));
EXPECT_EQ("02-130", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02-1300", formatter_->InputDigit('0', &result_));
// 011-456-7890
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011-4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("011-45", formatter_->InputDigit('5', &result_));
EXPECT_EQ("011-456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("011-456-7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("011-456-78", formatter_->InputDigit('8', &result_));
EXPECT_EQ("011-456-789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("011-456-7890", formatter_->InputDigit('0', &result_));
// 011-9876-7890
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011-9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("011-98", formatter_->InputDigit('8', &result_));
EXPECT_EQ("011-987", formatter_->InputDigit('7', &result_));
EXPECT_EQ("011-9876", formatter_->InputDigit('6', &result_));
EXPECT_EQ("011-9876-7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("011-9876-78", formatter_->InputDigit('8', &result_));
EXPECT_EQ("011-9876-789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("011-9876-7890", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_MX) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::MX()));
// +52 800 123 4567
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+52 80", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+52 800", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+52 800 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 800 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 800 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 800 123 4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 800 123 45", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 800 123 456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 800 123 4567", formatter_->InputDigit('7', &result_));
// +52 55 1234 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 55", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 55 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 55 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 55 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 55 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 55 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 55 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 55 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+52 55 1234 5678", formatter_->InputDigit('8', &result_));
// +52 212 345 6789
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 21", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 212", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 212 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 212 34", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 212 345", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 212 345 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 212 345 67", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+52 212 345 678", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+52 212 345 6789", formatter_->InputDigit('9', &result_));
// +52 1 55 1234 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 15", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 1 55", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 1 55 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 1 55 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 1 55 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 1 55 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 1 55 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 1 55 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 1 55 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+52 1 55 1234 5678", formatter_->InputDigit('8', &result_));
// +52 1 541 234 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 15", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 1 54", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 1 541", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 1 541 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 1 541 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 1 541 234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 1 541 234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 1 541 234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 1 541 234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+52 1 541 234 5678", formatter_->InputDigit('8', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_International_Toll_Free) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
// +800 1234 5678
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+80", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+800 ", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+800 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+800 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+800 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+800 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+800 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+800 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+800 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+800 1234 5678", formatter_->InputDigit('8', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_MultipleLeadingDigitPatterns) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::JP()));
// +81 50 2345 6789
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+81 50", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+81 50 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 50 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+81 50 234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+81 50 2345", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+81 50 2345 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+81 50 2345 67", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+81 50 2345 678", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 50 2345 6789", formatter_->InputDigit('9', &result_));
// +81 222 12 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 22 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 22 21", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 2221 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 222 12 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+81 222 12 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+81 222 12 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+81 222 12 5678", formatter_->InputDigit('8', &result_));
// 011113
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("01", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011 11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("011113", formatter_->InputDigit('3', &result_));
// +81 3332 2 5678
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+81 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+81 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+81 33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+81 33 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+81 3332", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 3332 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+81 3332 2 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+81 3332 2 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+81 3332 2 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+81 3332 2 5678", formatter_->InputDigit('8', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_LongIDD_AU) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::AU()));
// 0011 1 650 253 2250
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("001", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011 1 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011 1 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("0011 1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0011 1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("0011 1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0011 1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0011 1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 1 650 253 2222", formatter_->InputDigit('2', &result_));
// 0011 81 3332 2 5678
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("001", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("00118", formatter_->InputDigit('8', &result_));
EXPECT_EQ("0011 81 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011 81 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0011 81 33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0011 81 33 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0011 81 3332", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 81 3332 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 81 3332 2 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0011 81 3332 2 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("0011 81 3332 2 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("0011 81 3332 2 5678", formatter_->InputDigit('8', &result_));
// 0011 244 250 253 222
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("001", formatter_->InputDigit('1', &result_));
EXPECT_EQ("0011", formatter_->InputDigit('1', &result_));
EXPECT_EQ("00112", formatter_->InputDigit('2', &result_));
EXPECT_EQ("001124", formatter_->InputDigit('4', &result_));
EXPECT_EQ("0011 244 ", formatter_->InputDigit('4', &result_));
EXPECT_EQ("0011 244 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 244 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0011 244 250", formatter_->InputDigit('0', &result_));
EXPECT_EQ("0011 244 250 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 244 250 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0011 244 250 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0011 244 250 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 244 250 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("0011 244 250 253 222", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_LongIDD_KR) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::KR()));
// 00300 1 650 253 2250
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("003", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0030", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00300", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00300 1 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("00300 1 6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("00300 1 65", formatter_->InputDigit('5', &result_));
EXPECT_EQ("00300 1 650", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00300 1 650 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00300 1 650 25", formatter_->InputDigit('5', &result_));
EXPECT_EQ("00300 1 650 253", formatter_->InputDigit('3', &result_));
EXPECT_EQ("00300 1 650 253 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00300 1 650 253 22", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00300 1 650 253 222", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00300 1 650 253 2222", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_LongNDD_KR) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::KR()));
// 08811-9876-7890
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08", formatter_->InputDigit('8', &result_));
EXPECT_EQ("088", formatter_->InputDigit('8', &result_));
EXPECT_EQ("0881", formatter_->InputDigit('1', &result_));
EXPECT_EQ("08811", formatter_->InputDigit('1', &result_));
EXPECT_EQ("08811-9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("08811-98", formatter_->InputDigit('8', &result_));
EXPECT_EQ("08811-987", formatter_->InputDigit('7', &result_));
EXPECT_EQ("08811-9876", formatter_->InputDigit('6', &result_));
EXPECT_EQ("08811-9876-7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("08811-9876-78", formatter_->InputDigit('8', &result_));
EXPECT_EQ("08811-9876-789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("08811-9876-7890", formatter_->InputDigit('0', &result_));
// 08500 11-9876-7890
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08", formatter_->InputDigit('8', &result_));
EXPECT_EQ("085", formatter_->InputDigit('5', &result_));
EXPECT_EQ("0850", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08500 ", formatter_->InputDigit('0', &result_));
EXPECT_EQ("08500 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("08500 11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("08500 11-9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("08500 11-98", formatter_->InputDigit('8', &result_));
EXPECT_EQ("08500 11-987", formatter_->InputDigit('7', &result_));
EXPECT_EQ("08500 11-9876", formatter_->InputDigit('6', &result_));
EXPECT_EQ("08500 11-9876-7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("08500 11-9876-78", formatter_->InputDigit('8', &result_));
EXPECT_EQ("08500 11-9876-789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("08500 11-9876-7890", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_LongNDD_SG) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::SG()));
// 777777 9876 7890
EXPECT_EQ("7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("77", formatter_->InputDigit('7', &result_));
EXPECT_EQ("777", formatter_->InputDigit('7', &result_));
EXPECT_EQ("7777", formatter_->InputDigit('7', &result_));
EXPECT_EQ("77777", formatter_->InputDigit('7', &result_));
EXPECT_EQ("777777 ", formatter_->InputDigit('7', &result_));
EXPECT_EQ("777777 9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("777777 98", formatter_->InputDigit('8', &result_));
EXPECT_EQ("777777 987", formatter_->InputDigit('7', &result_));
EXPECT_EQ("777777 9876", formatter_->InputDigit('6', &result_));
EXPECT_EQ("777777 9876 7", formatter_->InputDigit('7', &result_));
EXPECT_EQ("777777 9876 78", formatter_->InputDigit('8', &result_));
EXPECT_EQ("777777 9876 789", formatter_->InputDigit('9', &result_));
EXPECT_EQ("777777 9876 7890", formatter_->InputDigit('0', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ShortNumberFormattingFix_AU) {
// For Australia, the national prefix is not optional when formatting.
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::AU()));
// 1234567890 - For leading digit 1, the national prefix formatting rule has
// first group only.
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("1234 567 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("1234 567 89", formatter_->InputDigit('9', &result_));
EXPECT_EQ("1234 567 890", formatter_->InputDigit('0', &result_));
// +61 1234 567 890 - Test the same number, but with the country code.
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+61 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+61 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+61 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+61 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+61 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+61 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+61 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+61 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+61 1234 567 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+61 1234 567 89", formatter_->InputDigit('9', &result_));
EXPECT_EQ("+61 1234 567 890", formatter_->InputDigit('0', &result_));
// 212345678 - For leading digit 2, the national prefix formatting rule puts
// the national prefix before the first group.
formatter_->Clear();
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("02", formatter_->InputDigit('2', &result_));
EXPECT_EQ("021", formatter_->InputDigit('1', &result_));
EXPECT_EQ("02 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("02 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("02 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("02 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("02 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("02 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("02 1234 5678", formatter_->InputDigit('8', &result_));
// 212345678 - Test the same number, but without the leading 0.
formatter_->Clear();
EXPECT_EQ("2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("21", formatter_->InputDigit('1', &result_));
EXPECT_EQ("212", formatter_->InputDigit('2', &result_));
EXPECT_EQ("2123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("21234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("212345", formatter_->InputDigit('5', &result_));
EXPECT_EQ("2123456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("21234567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("212345678", formatter_->InputDigit('8', &result_));
// +61 2 1234 5678 - Test the same number, but with the country code.
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+6", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+61 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+61 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+61 21", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+61 2 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+61 2 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+61 2 1234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+61 2 1234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+61 2 1234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+61 2 1234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("+61 2 1234 5678", formatter_->InputDigit('8', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ShortNumberFormattingFix_KR) {
// For Korea, the national prefix is not optional when formatting, and the
// national prefix formatting rule doesn't consist of only the first group.
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::KR()));
// 111
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("111", formatter_->InputDigit('1', &result_));
// 114
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("114", formatter_->InputDigit('4', &result_));
// 131212345 - Test a mobile number without the national prefix. Even though
// it is not an emergency number, it should be formatted as a block.
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("13", formatter_->InputDigit('3', &result_));
EXPECT_EQ("131", formatter_->InputDigit('1', &result_));
EXPECT_EQ("1312", formatter_->InputDigit('2', &result_));
EXPECT_EQ("13121", formatter_->InputDigit('1', &result_));
EXPECT_EQ("131212", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1312123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("13121234", formatter_->InputDigit('4', &result_));
// +82 131-2-1234 - Test the same number, but with the country code.
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+82 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+82 13", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+82 131", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+82 131-2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 131-2-1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+82 131-2-12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+82 131-2-123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+82 131-2-1234", formatter_->InputDigit('4', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ShortNumberFormattingFix_MX) {
// For Mexico, the national prefix is optional when formatting.
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::MX()));
// 911
EXPECT_EQ("9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("91", formatter_->InputDigit('1', &result_));
EXPECT_EQ("911", formatter_->InputDigit('1', &result_));
// 800 123 4567 - Test a toll-free number, which should have a formatting rule
// applied to it even though it doesn't begin with the national prefix.
formatter_->Clear();
EXPECT_EQ("8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("80", formatter_->InputDigit('0', &result_));
EXPECT_EQ("800", formatter_->InputDigit('0', &result_));
EXPECT_EQ("800 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("800 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("800 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("800 123 4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("800 123 45", formatter_->InputDigit('5', &result_));
EXPECT_EQ("800 123 456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("800 123 4567", formatter_->InputDigit('7', &result_));
// +52 800 123 4567 - Test the same number, but with the country code.
formatter_->Clear();
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 ", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+52 80", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+52 800", formatter_->InputDigit('0', &result_));
EXPECT_EQ("+52 800 1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("+52 800 12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+52 800 123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+52 800 123 4", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+52 800 123 45", formatter_->InputDigit('5', &result_));
EXPECT_EQ("+52 800 123 456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+52 800 123 4567", formatter_->InputDigit('7', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_NoNationalPrefix) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::IT()));
EXPECT_EQ("3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 333", formatter_->InputDigit('3', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_NoNationalPrefixFormattingRule) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::AO()));
EXPECT_EQ("3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 3", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 33", formatter_->InputDigit('3', &result_));
EXPECT_EQ("333 333", formatter_->InputDigit('3', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ShortNumberFormattingFix_US) {
// For the US, an initial 1 is treated specially.
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US()));
// 101 - Test that the initial 1 is not treated as a national prefix.
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("10", formatter_->InputDigit('0', &result_));
EXPECT_EQ("101", formatter_->InputDigit('1', &result_));
// 112 - Test that the initial 1 is not treated as a national prefix.
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("11", formatter_->InputDigit('1', &result_));
EXPECT_EQ("112", formatter_->InputDigit('2', &result_));
// 122 - Test that the initial 1 is treated as a national prefix.
formatter_->Clear();
EXPECT_EQ("1", formatter_->InputDigit('1', &result_));
EXPECT_EQ("12", formatter_->InputDigit('2', &result_));
EXPECT_EQ("1 22", formatter_->InputDigit('2', &result_));
}
TEST_F(AsYouTypeFormatterTest, AYTF_ClearNDDAfterIDDExtraction) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::KR()));
// Check that when we have successfully extracted an IDD, the previously
// extracted NDD is cleared since it is no longer valid.
EXPECT_EQ("0", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00", formatter_->InputDigit('0', &result_));
EXPECT_EQ("007", formatter_->InputDigit('7', &result_));
EXPECT_EQ("0070", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00700", formatter_->InputDigit('0', &result_));
EXPECT_EQ("0", GetExtractedNationalPrefix());
// Once the IDD "00700" has been extracted, it no longer makes sense for the
// initial "0" to be treated as an NDD.
EXPECT_EQ("00700 1 ", formatter_->InputDigit('1', &result_));
EXPECT_EQ("", GetExtractedNationalPrefix());
EXPECT_EQ("00700 1 2", formatter_->InputDigit('2', &result_));
EXPECT_EQ("00700 1 23", formatter_->InputDigit('3', &result_));
EXPECT_EQ("00700 1 234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("00700 1 234 5", formatter_->InputDigit('5', &result_));
EXPECT_EQ("00700 1 234 56", formatter_->InputDigit('6', &result_));
EXPECT_EQ("00700 1 234 567", formatter_->InputDigit('7', &result_));
EXPECT_EQ("00700 1 234 567 8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("00700 1 234 567 89", formatter_->InputDigit('9', &result_));
EXPECT_EQ("00700 1 234 567 890", formatter_->InputDigit('0', &result_));
EXPECT_EQ("00700 1 234 567 8901", formatter_->InputDigit('1', &result_));
EXPECT_EQ("00700123456789012", formatter_->InputDigit('2', &result_));
EXPECT_EQ("007001234567890123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("0070012345678901234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("00700123456789012345", formatter_->InputDigit('5', &result_));
EXPECT_EQ("007001234567890123456", formatter_->InputDigit('6', &result_));
EXPECT_EQ("0070012345678901234567", formatter_->InputDigit('7', &result_));
}
TEST_F(AsYouTypeFormatterTest,
NumberPatternsBecomingInvalidShouldNotResultInDigitLoss) {
formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::CN()));
EXPECT_EQ("+", formatter_->InputDigit('+', &result_));
EXPECT_EQ("+8", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+86 ", formatter_->InputDigit('6', &result_));
EXPECT_EQ("+86 9", formatter_->InputDigit('9', &result_));
EXPECT_EQ("+86 98", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+86 988", formatter_->InputDigit('8', &result_));
EXPECT_EQ("+86 988 1", formatter_->InputDigit('1', &result_));
// Now the number pattern is no longer valid because there are multiple
// leading digit patterns; when we try again to extract a country code we
// should ensure we use the last leading digit pattern, rather than the first
// one such that it *thinks* it's found a valid formatting rule again.
// https://github.com/google/libphonenumber/issues/437
EXPECT_EQ("+8698812", formatter_->InputDigit('2', &result_));
EXPECT_EQ("+86988123", formatter_->InputDigit('3', &result_));
EXPECT_EQ("+869881234", formatter_->InputDigit('4', &result_));
EXPECT_EQ("+8698812345", formatter_->InputDigit('5', &result_));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/asyoutypeformatter_test.cc
|
C++
|
unknown
| 64,786
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Patrick Mezard
//
// Basic test cases for MappingFileProvider.
#include "phonenumbers/geocoding/area_code_map.h"
#include <cstddef>
#include <vector>
#include <gtest/gtest.h> // NOLINT(build/include_order)
#include "phonenumbers/geocoding/geocoding_data.h"
#include "phonenumbers/phonenumber.pb.h"
namespace i18n {
namespace phonenumbers {
namespace {
void MakeCodeMap(const PrefixDescriptions* descriptions,
scoped_ptr<AreaCodeMap>* code_map) {
scoped_ptr<AreaCodeMap> cm(new AreaCodeMap());
cm->ReadAreaCodeMap(descriptions);
code_map->swap(cm);
}
const int32 prefix_1_us_prefixes[] = {
1212,
1480,
1650,
1907,
1201664,
1480893,
1501372,
1626308,
1650345,
1867993,
1972480,
};
const char* prefix_1_us_descriptions[] = {
"New York",
"Arizona",
"California",
"Alaska",
"Westwood, NJ",
"Phoenix, AZ",
"Little Rock, AR",
"Alhambra, CA",
"San Mateo, CA",
"Dawson, YT",
"Richardson, TX",
};
const int32 prefix_1_us_lengths[] = {
4, 7,
};
const PrefixDescriptions prefix_1_us = {
prefix_1_us_prefixes,
sizeof(prefix_1_us_prefixes) / sizeof(*prefix_1_us_prefixes),
prefix_1_us_descriptions,
prefix_1_us_lengths,
sizeof(prefix_1_us_lengths) / sizeof(*prefix_1_us_lengths),
};
const int32 prefix_39_it_prefixes[] = {
3902,
3906,
39010,
390131,
390321,
390975,
};
const char* prefix_39_it_descriptions[] = {
"Milan",
"Rome",
"Genoa",
"Alessandria",
"Novara",
"Potenza",
};
const int32 prefix_39_it_lengths[] = {
4, 5, 6,
};
const PrefixDescriptions prefix_39_it = {
prefix_39_it_prefixes,
sizeof(prefix_39_it_prefixes) / sizeof(*prefix_39_it_prefixes),
prefix_39_it_descriptions,
prefix_39_it_lengths,
sizeof(prefix_39_it_lengths) / sizeof(*prefix_1_us_lengths),
};
void MakeCodeMapUS(scoped_ptr<AreaCodeMap>* code_map) {
MakeCodeMap(&prefix_1_us, code_map);
}
void MakeCodeMapIT(scoped_ptr<AreaCodeMap>* code_map) {
MakeCodeMap(&prefix_39_it, code_map);
}
PhoneNumber MakePhoneNumber(int32 country_code, uint64 national_number) {
PhoneNumber number;
number.set_country_code(country_code);
number.set_national_number(national_number);
return number;
}
} // namespace
class AreaCodeMapTest : public testing::Test {
protected:
virtual void SetUp() {
MakeCodeMapUS(&map_US_);
MakeCodeMapIT(&map_IT_);
}
scoped_ptr<AreaCodeMap> map_US_;
scoped_ptr<AreaCodeMap> map_IT_;
};
TEST_F(AreaCodeMapTest, TestLookupInvalidNumberUS) {
EXPECT_STREQ("New York", map_US_->Lookup(MakePhoneNumber(1, 2121234567L)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberNJ) {
EXPECT_STREQ("Westwood, NJ",
map_US_->Lookup(MakePhoneNumber(1, 2016641234L)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberNY) {
EXPECT_STREQ("New York", map_US_->Lookup(MakePhoneNumber(1, 2126641234L)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberCA1) {
EXPECT_STREQ("San Mateo, CA",
map_US_->Lookup(MakePhoneNumber(1, 6503451234LL)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberCA2) {
EXPECT_STREQ("California", map_US_->Lookup(MakePhoneNumber(1, 6502531234LL)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberTX) {
EXPECT_STREQ("Richardson, TX",
map_US_->Lookup(MakePhoneNumber(1, 9724801234LL)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberNotFoundTX) {
EXPECT_STREQ(NULL, map_US_->Lookup(MakePhoneNumber(1, 9724811234LL)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberCH) {
EXPECT_STREQ(NULL, map_US_->Lookup(MakePhoneNumber(41, 446681300L)));
}
TEST_F(AreaCodeMapTest, TestLookupNumberIT) {
PhoneNumber number = MakePhoneNumber(39, 212345678L);
number.set_italian_leading_zero(true);
EXPECT_STREQ("Milan", map_IT_->Lookup(number));
number.set_national_number(612345678L);
EXPECT_STREQ("Rome", map_IT_->Lookup(number));
number.set_national_number(3211234L);
EXPECT_STREQ("Novara", map_IT_->Lookup(number));
// A mobile number
number.set_national_number(321123456L);
number.set_italian_leading_zero(false);
EXPECT_STREQ(NULL, map_IT_->Lookup(number));
// An invalid number (too short)
number.set_national_number(321123L);
number.set_italian_leading_zero(true);
EXPECT_STREQ("Novara", map_IT_->Lookup(number));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/area_code_map_test.cc
|
C++
|
unknown
| 4,879
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Patrick Mezard
#include <cmath>
#include <set>
#include <string>
#include <gtest/gtest.h> // NOLINT(build/include_order)
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/geocoding/geocoding_data.h"
#include "phonenumbers/geocoding/geocoding_test_data.h"
namespace i18n {
namespace phonenumbers {
using std::set;
using std::string;
namespace {
typedef const CountryLanguages* (*country_languages_getter)(int index);
typedef const PrefixDescriptions* (*prefix_descriptions_getter)(int index);
void TestCountryLanguages(const CountryLanguages* languages) {
EXPECT_GT(languages->available_languages_size, 0);
for (int i = 0; i < languages->available_languages_size; ++i) {
string language(languages->available_languages[i]);
EXPECT_GT(language.size(), 0);
if (i > 0) {
EXPECT_LT(string(languages->available_languages[i - 1]),
language);
}
}
}
void TestCountryCallingCodeLanguages(
const int* country_calling_codes, int country_calling_codes_size,
country_languages_getter get_country_languages) {
EXPECT_GT(country_calling_codes_size, 0);
for (int i = 0; i < country_calling_codes_size; ++i) {
int code = country_calling_codes[i];
EXPECT_GT(code, 0);
if (i > 0) {
EXPECT_LT(country_calling_codes[i-1], code);
}
TestCountryLanguages(get_country_languages(i));
}
}
void TestPrefixDescriptions(const PrefixDescriptions* descriptions) {
EXPECT_GT(descriptions->prefixes_size, 0);
set<int> possible_lengths;
for (int i = 0; i < descriptions->prefixes_size; ++i) {
int prefix = descriptions->prefixes[i];
EXPECT_GT(prefix, 0);
if (i > 0) {
EXPECT_LT(descriptions->prefixes[i - 1], prefix);
}
possible_lengths.insert(log10(prefix) + 1);
}
EXPECT_GT(descriptions->possible_lengths_size, 0);
for (int i = 0; i < descriptions->possible_lengths_size; ++i) {
int possible_length = descriptions->possible_lengths[i];
EXPECT_GT(possible_length, 0);
if (i > 0) {
EXPECT_LT(descriptions->possible_lengths[i - 1], possible_length);
}
EXPECT_TRUE(
possible_lengths.find(possible_length) != possible_lengths.end());
}
}
void TestAllPrefixDescriptions(
const char** prefix_language_code_pairs,
int prefix_language_code_pairs_size,
prefix_descriptions_getter get_prefix_descriptions) {
EXPECT_GT(prefix_language_code_pairs_size, 0);
for (int i = 0; i < prefix_language_code_pairs_size; ++i) {
string language_code_pair(prefix_language_code_pairs[i]);
EXPECT_GT(language_code_pair.size(), 0);
if (i > 0) {
EXPECT_LT(string(prefix_language_code_pairs[i - 1]),
language_code_pair);
}
TestPrefixDescriptions(get_prefix_descriptions(i));
}
}
} // namespace
TEST(GeocodingDataTest, TestCountryCallingCodeLanguages) {
TestCountryCallingCodeLanguages(get_country_calling_codes(),
get_country_calling_codes_size(),
get_country_languages);
}
TEST(GeocodingDataTest, TestTestCountryCallingCodeLanguages) {
TestCountryCallingCodeLanguages(get_test_country_calling_codes(),
get_test_country_calling_codes_size(),
get_test_country_languages);
}
TEST(GeocodingDataTest, TestPrefixDescriptions) {
TestAllPrefixDescriptions(get_prefix_language_code_pairs(),
get_prefix_language_code_pairs_size(),
get_prefix_descriptions);
}
TEST(GeocodingDataTest, TestTestPrefixDescriptions) {
TestAllPrefixDescriptions(get_test_prefix_language_code_pairs(),
get_test_prefix_language_code_pairs_size(),
get_test_prefix_descriptions);
}
TEST(GeocodingDataTest, TestTestGeocodingData) {
ASSERT_EQ(3, get_test_country_calling_codes_size());
const int* country_calling_codes = get_test_country_calling_codes();
const int expected_calling_codes[] = {1, 54, 82};
for (int i = 0; i < get_test_country_calling_codes_size(); ++i) {
EXPECT_EQ(expected_calling_codes[i], country_calling_codes[i]);
}
const CountryLanguages* langs_1 = get_test_country_languages(0);
ASSERT_EQ(2, langs_1->available_languages_size);
const char* expected_languages[] = {"de", "en"};
for (int i = 0; i < langs_1->available_languages_size; ++i) {
EXPECT_STREQ(expected_languages[i], langs_1->available_languages[i]);
}
ASSERT_EQ(5, get_test_prefix_language_code_pairs_size());
const char** language_code_pairs = get_test_prefix_language_code_pairs();
const char* expected_language_code_pairs[] = {
"1_de", "1_en", "54_en", "82_en", "82_ko",
};
for (int i = 0; i < get_test_prefix_language_code_pairs_size(); ++i) {
EXPECT_STREQ(expected_language_code_pairs[i], language_code_pairs[i]);
}
const PrefixDescriptions* desc_1_de = get_test_prefix_descriptions(0);
ASSERT_EQ(2, desc_1_de->prefixes_size);
const int32 expected_prefixes[] = {1201, 1650};
const char* expected_descriptions[] = {
"New Jersey",
"Kalifornien",
};
for (int i = 0; i < desc_1_de->prefixes_size; ++i) {
EXPECT_EQ(expected_prefixes[i], desc_1_de->prefixes[i]);
EXPECT_STREQ(expected_descriptions[i], desc_1_de->descriptions[i]);
}
ASSERT_EQ(1, desc_1_de->possible_lengths_size);
const int expected_lengths[] = {4};
for (int i = 0; i < desc_1_de->possible_lengths_size; ++i) {
EXPECT_EQ(expected_lengths[i], desc_1_de->possible_lengths[i]);
}
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/geocoding_data_test.cc
|
C++
|
unknown
| 6,195
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef I18N_PHONENUMBERS_GEOCODING_TEST_DATA
#define I18N_PHONENUMBERS_GEOCODING_TEST_DATA
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/geocoding/geocoding_data.h"
namespace i18n {
namespace phonenumbers {
// Returns a sorted array of country calling codes.
const int* get_test_country_calling_codes();
// Returns the number of country calling codes in
// get_test_country_calling_codes() array.
int get_test_country_calling_codes_size();
// Returns the CountryLanguages record for country at index, index
// being in [0, get_test_country_calling_codes_size()).
const CountryLanguages* get_test_country_languages(int index);
// Returns a sorted array of prefix language code pairs like
// "1_de" or "82_ko".
const char** get_test_prefix_language_code_pairs();
// Returns the number of elements in
// get_prefix_language_code_pairs()
int get_test_prefix_language_code_pairs_size();
// Returns the PrefixDescriptions for language/code pair at index,
// index being in [0, get_prefix_language_code_pairs_size()).
const PrefixDescriptions* get_test_prefix_descriptions(int index);
} // namespace phonenumbers
} // namespace i18n
#endif // I18N_PHONENUMBERS_GEOCODING_TEST_DATA
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/geocoding_test_data.h
|
C++
|
unknown
| 1,811
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Sample program using the geocoding functionality. This is used to test that
// the geocoding library is compiled correctly.
#include <iostream>
#include <string>
#include "phonenumbers/base/logging.h"
#include "phonenumbers/geocoding/phonenumber_offline_geocoder.h"
#include "phonenumbers/phonenumber.pb.h"
#include "phonenumbers/phonenumberutil.h"
using i18n::phonenumbers::PhoneNumber;
using i18n::phonenumbers::PhoneNumberOfflineGeocoder;
using i18n::phonenumbers::PhoneNumberUtil;
int main() {
PhoneNumber number;
const PhoneNumberUtil& phone_util = *PhoneNumberUtil::GetInstance();
const PhoneNumberUtil::ErrorType status = phone_util.Parse(
"16502530000", "US", &number);
CHECK_EQ(status, PhoneNumberUtil::NO_PARSING_ERROR);
IGNORE_UNUSED(status);
const std::string description =
PhoneNumberOfflineGeocoder().GetDescriptionForNumber(
number, icu::Locale("en", "GB"));
std::cout << description << std::endl;
CHECK_EQ(description, "Mountain View, CA");
return 0;
}
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/geocoding_test_program.cc
|
C++
|
unknown
| 1,621
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Patrick Mezard
#include "phonenumbers/geocoding/mapping_file_provider.h"
#include <gtest/gtest.h> // NOLINT(build/include_order)
#include "phonenumbers/geocoding/geocoding_data.h"
namespace i18n {
namespace phonenumbers {
using std::string;
namespace {
#define COUNTRY_LANGUAGES(code, languagelist) \
const char* country_languages_##code[] = languagelist; \
const CountryLanguages country_##code = { \
country_languages_##code, \
sizeof(country_languages_##code) / sizeof(*country_languages_##code), \
};
// Array literals cannot be passed as regular macro arguments, the separating
// commas are interpreted as macro arguments separators. The following dummy
// variadic macro wraps the array commas, and appears as a single argument to an
// outer macro call.
#define ARRAY_WRAPPER(...) __VA_ARGS__
const int country_calling_codes[] = {1, 41, 65, 86};
const int country_calling_codes_size =
sizeof(country_calling_codes) / sizeof(*country_calling_codes);
COUNTRY_LANGUAGES(1, ARRAY_WRAPPER({"en"}));
COUNTRY_LANGUAGES(41, ARRAY_WRAPPER({"de", "fr", "it", "rm"}));
COUNTRY_LANGUAGES(65, ARRAY_WRAPPER({"en", "ms", "ta", "zh_Hans"}));
COUNTRY_LANGUAGES(86, ARRAY_WRAPPER({"en", "zh", "zh_Hant"}));
const CountryLanguages* country_languages[] = {
&country_1,
&country_41,
&country_65,
&country_86,
};
const CountryLanguages* test_get_country_languages(int index) {
return country_languages[index];
}
} // namespace
TEST(MappingFileProviderTest, TestGetFileName) {
MappingFileProvider provider(country_calling_codes,
country_calling_codes_size,
test_get_country_languages);
string filename;
EXPECT_EQ("1_en", provider.GetFileName(1, "en", "", "", &filename));
EXPECT_EQ("1_en", provider.GetFileName(1, "en", "", "US", &filename));
EXPECT_EQ("1_en", provider.GetFileName(1, "en", "", "GB", &filename));
EXPECT_EQ("41_de", provider.GetFileName(41, "de", "", "CH", &filename));
EXPECT_EQ("", provider.GetFileName(44, "en", "", "GB", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "", "", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "Hans", "", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "", "CN", &filename));
EXPECT_EQ("", provider.GetFileName(86, "", "", "CN", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "Hans", "CN", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "Hans", "SG", &filename));
EXPECT_EQ("86_zh", provider.GetFileName(86, "zh", "", "SG", &filename));
EXPECT_EQ("86_zh_Hant", provider.GetFileName(86, "zh", "", "TW", &filename));
EXPECT_EQ("86_zh_Hant", provider.GetFileName(86, "zh", "", "HK", &filename));
EXPECT_EQ("86_zh_Hant", provider.GetFileName(86, "zh", "Hant", "TW",
&filename));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/mapping_file_provider_test.cc
|
C++
|
unknown
| 3,668
|
// Copyright (C) 2012 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Patrick Mezard
#include "phonenumbers/geocoding/phonenumber_offline_geocoder.h"
#include <gtest/gtest.h>
#include <unicode/locid.h>
#include "phonenumbers/geocoding/geocoding_test_data.h"
#include "phonenumbers/phonenumber.h"
#include "phonenumbers/phonenumber.pb.h"
namespace i18n {
namespace phonenumbers {
using icu::Locale;
namespace {
PhoneNumber MakeNumber(int32 country_code, uint64 national_number) {
PhoneNumber n;
n.set_country_code(country_code);
n.set_national_number(national_number);
return n;
}
const Locale kEnglishLocale = Locale("en", "GB");
const Locale kFrenchLocale = Locale("fr", "FR");
const Locale kGermanLocale = Locale("de", "DE");
const Locale kItalianLocale = Locale("it", "IT");
const Locale kKoreanLocale = Locale("ko", "KR");
const Locale kSimplifiedChineseLocale = Locale("zh", "CN");
} // namespace
class PhoneNumberOfflineGeocoderTest : public testing::Test {
protected:
PhoneNumberOfflineGeocoderTest() :
KO_NUMBER1(MakeNumber(82, 22123456UL)),
KO_NUMBER2(MakeNumber(82, 322123456UL)),
KO_NUMBER3(MakeNumber(82, 6421234567ULL)),
KO_INVALID_NUMBER(MakeNumber(82, 1234UL)),
KO_MOBILE(MakeNumber(82, 101234567ULL)),
US_NUMBER1(MakeNumber(1, 6502530000ULL)),
US_NUMBER2(MakeNumber(1, 6509600000ULL)),
US_NUMBER3(MakeNumber(1, 2128120000UL)),
US_NUMBER4(MakeNumber(1, 6174240000ULL)),
US_INVALID_NUMBER(MakeNumber(1, 123456789UL)),
BS_NUMBER1(MakeNumber(1, 2423651234UL)),
AU_NUMBER(MakeNumber(61, 236618300UL)),
NUMBER_WITH_INVALID_COUNTRY_CODE(MakeNumber(999, 2423651234UL)),
INTERNATIONAL_TOLL_FREE(MakeNumber(800, 12345678UL)) {
}
virtual void SetUp() {
geocoder_.reset(
new PhoneNumberOfflineGeocoder(
get_test_country_calling_codes(),
get_test_country_calling_codes_size(),
get_test_country_languages,
get_test_prefix_language_code_pairs(),
get_test_prefix_language_code_pairs_size(),
get_test_prefix_descriptions));
}
protected:
scoped_ptr<PhoneNumberOfflineGeocoder> geocoder_;
const PhoneNumber KO_NUMBER1;
const PhoneNumber KO_NUMBER2;
const PhoneNumber KO_NUMBER3;
const PhoneNumber KO_INVALID_NUMBER;
const PhoneNumber KO_MOBILE;
const PhoneNumber US_NUMBER1;
const PhoneNumber US_NUMBER2;
const PhoneNumber US_NUMBER3;
const PhoneNumber US_NUMBER4;
const PhoneNumber US_INVALID_NUMBER;
const PhoneNumber BS_NUMBER1;
const PhoneNumber AU_NUMBER;
const PhoneNumber NUMBER_WITH_INVALID_COUNTRY_CODE;
const PhoneNumber INTERNATIONAL_TOLL_FREE;
};
TEST_F(PhoneNumberOfflineGeocoderTest,
TestGetDescriptionForNumberWithNoDataFile) {
// No data file containing mappings for US numbers is available in Chinese for
// the unittests. As a result, the country name of United States in simplified
// Chinese is returned.
// "\u7F8E\u56FD" (unicode escape sequences are not always supported)
EXPECT_EQ("\xe7""\xbe""\x8e""\xe5""\x9b""\xbd",
geocoder_->GetDescriptionForNumber(US_NUMBER1,
kSimplifiedChineseLocale));
EXPECT_EQ("Bahamas",
geocoder_->GetDescriptionForNumber(BS_NUMBER1, Locale("en", "US")));
EXPECT_EQ("Australia",
geocoder_->GetDescriptionForNumber(AU_NUMBER, Locale("en", "US")));
EXPECT_EQ("",
geocoder_->GetDescriptionForNumber(NUMBER_WITH_INVALID_COUNTRY_CODE,
Locale("en", "US")));
EXPECT_EQ("",
geocoder_->GetDescriptionForNumber(INTERNATIONAL_TOLL_FREE,
Locale("en", "US")));
}
TEST_F(PhoneNumberOfflineGeocoderTest,
TestGetDescriptionForNumberWithMissingPrefix) {
// Test that the name of the country is returned when the number passed in is
// valid but not covered by the geocoding data file.
EXPECT_EQ("United States",
geocoder_->GetDescriptionForNumber(US_NUMBER4, Locale("en", "US")));
}
TEST_F(PhoneNumberOfflineGeocoderTest, TestGetDescriptionForNumber_en_US) {
EXPECT_EQ("CA",
geocoder_->GetDescriptionForNumber(US_NUMBER1, Locale("en", "US")));
EXPECT_EQ("Mountain View, CA",
geocoder_->GetDescriptionForNumber(US_NUMBER2, Locale("en", "US")));
EXPECT_EQ("New York, NY",
geocoder_->GetDescriptionForNumber(US_NUMBER3, Locale("en", "US")));
}
TEST_F(PhoneNumberOfflineGeocoderTest, TestGetDescriptionForKoreanNumber) {
EXPECT_EQ("Seoul",
geocoder_->GetDescriptionForNumber(KO_NUMBER1, kEnglishLocale));
EXPECT_EQ("Incheon",
geocoder_->GetDescriptionForNumber(KO_NUMBER2, kEnglishLocale));
EXPECT_EQ("Jeju",
geocoder_->GetDescriptionForNumber(KO_NUMBER3, kEnglishLocale));
// "\uC11C\uC6B8"
EXPECT_EQ("\xec""\x84""\x9c""\xec""\x9a""\xb8",
geocoder_->GetDescriptionForNumber(KO_NUMBER1, kKoreanLocale));
// "\uC778\uCC9C"
EXPECT_EQ("\xec""\x9d""\xb8""\xec""\xb2""\x9c",
geocoder_->GetDescriptionForNumber(KO_NUMBER2, kKoreanLocale));
}
TEST_F(PhoneNumberOfflineGeocoderTest, TestGetDescriptionForFallBack) {
// No fallback, as the location name for the given phone number is available
// in the requested language.
EXPECT_EQ("Kalifornien",
geocoder_->GetDescriptionForNumber(US_NUMBER1, kGermanLocale));
// German falls back to English.
EXPECT_EQ("New York, NY",
geocoder_->GetDescriptionForNumber(US_NUMBER3, kGermanLocale));
// Italian falls back to English.
EXPECT_EQ("CA",
geocoder_->GetDescriptionForNumber(US_NUMBER1, kItalianLocale));
// Korean doesn't fall back to English.
// "\uB300\uD55C\uBBFC\uAD6D"
EXPECT_EQ("\xeb""\x8c""\x80""\xed""\x95""\x9c""\xeb""\xaf""\xbc""\xea""\xb5"
"\xad",
geocoder_->GetDescriptionForNumber(KO_NUMBER3, kKoreanLocale));
}
TEST_F(PhoneNumberOfflineGeocoderTest,
TestGetDescriptionForNumberWithUserRegion) {
// User in Italy, American number. We should just show United States, in
// Spanish, and not more detailed information.
EXPECT_EQ("Estados Unidos",
geocoder_->GetDescriptionForNumber(US_NUMBER1, Locale("es", "ES"),
"IT"));
// Unknown region - should just show country name.
EXPECT_EQ("Estados Unidos",
geocoder_->GetDescriptionForNumber(US_NUMBER1, Locale("es", "ES"),
"ZZ"));
// User in the States, language German, should show detailed data.
EXPECT_EQ("Kalifornien",
geocoder_->GetDescriptionForNumber(US_NUMBER1, kGermanLocale,
"US"));
// User in the States, language French, no data for French, so we fallback to
// English detailed data.
EXPECT_EQ("CA",
geocoder_->GetDescriptionForNumber(US_NUMBER1, kFrenchLocale,
"US"));
// Invalid number - return an empty string.
EXPECT_EQ("",
geocoder_->GetDescriptionForNumber(US_INVALID_NUMBER,
kEnglishLocale,
"US"));
}
TEST_F(PhoneNumberOfflineGeocoderTest, TestGetDescriptionForInvalidNumber) {
EXPECT_EQ("", geocoder_->GetDescriptionForNumber(KO_INVALID_NUMBER,
kEnglishLocale));
EXPECT_EQ("", geocoder_->GetDescriptionForNumber(US_INVALID_NUMBER,
kEnglishLocale));
}
TEST_F(PhoneNumberOfflineGeocoderTest,
TestGetDescriptionForNonGeographicalNumberWithGeocodingPrefix) {
// We have a geocoding prefix, but we shouldn't use it since this is not
// geographical.
EXPECT_EQ("South Korea",
geocoder_->GetDescriptionForNumber(KO_MOBILE, kEnglishLocale));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc
|
C++
|
unknown
| 8,539
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include <string>
#include <gtest/gtest.h>
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/default_logger.h"
#include "phonenumbers/logger.h"
namespace i18n {
namespace phonenumbers {
// String logger implementation used for testing. Messages are output to a
// string for convenience.
class StringLogger : public Logger {
public:
virtual ~StringLogger() {}
const string& message() const {
return msg_;
}
virtual void WriteMessage(const string& msg) {
msg_ += msg;
}
private:
string msg_;
};
class LoggerTest : public ::testing::Test {
protected:
virtual void SetUp() {
test_logger_.reset(new StringLogger());
test_logger_->set_level(LOG_INFO);
// Save the current logger implementation and restore it when the test is
// done to avoid side-effects in other tests (including phonenumberutil
// tests) as the logger implementation is global.
old_logger_ = Logger::mutable_logger_impl();
Logger::set_logger_impl(test_logger_.get());
}
virtual void TearDown() {
// Restore the previous logger implementation to avoid side-effects in other
// tests as mentioned above.
Logger::set_logger_impl(old_logger_);
}
scoped_ptr<StringLogger> test_logger_;
Logger* old_logger_;
};
TEST_F(LoggerTest, LoggerIgnoresHigherVerbosity) {
// The logger verbosity is set to LOG_INFO, therefore LOG_DEBUG messages
// should be ignored.
LOG(LOG_DEBUG) << "Hello";
EXPECT_EQ("", test_logger_->message());
}
TEST_F(LoggerTest, LoggerOutputsNewline) {
LOG(LOG_INFO) << "Hello";
EXPECT_EQ("Hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerLogsEqualVerbosity) {
LOG(LOG_INFO) << "Hello";
EXPECT_EQ("Hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerLogsMoreSeriousMessages) {
// The logger verbosity is set to LOG_INFO, therefore LOG_WARNING messages
// should still be printed.
LOG(LOG_WARNING) << "Hello";
EXPECT_EQ("Hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerConcatenatesMessages) {
LOG(LOG_INFO) << "Hello";
ASSERT_EQ("Hello\n", test_logger_->message());
LOG(LOG_INFO) << " World";
EXPECT_EQ("Hello\n World\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerHandlesDifferentTypes) {
LOG(LOG_INFO) << "Hello " << 42;
EXPECT_EQ("Hello 42\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerIgnoresVerboseLogs) {
// VLOG is always lower verbosity than LOG, so with LOG_INFO set as the
// verbosity level, no VLOG call should result in anything.
VLOG(1) << "Hello";
EXPECT_EQ("", test_logger_->message());
// VLOG(0) is the same as LOG_DEBUG.
VLOG(0) << "Hello";
EXPECT_EQ("", test_logger_->message());
// With LOG_DEBUG as the current verbosity level, VLOG(1) should still not
// result in anything.
test_logger_->set_level(LOG_DEBUG);
VLOG(1) << "Hello";
EXPECT_EQ("", test_logger_->message());
// However, VLOG(0) does.
VLOG(0) << "Hello";
EXPECT_EQ("Hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerShowsDebugLogsAtDebugLevel) {
test_logger_->set_level(LOG_DEBUG);
// Debug logs should still be seen.
LOG(LOG_DEBUG) << "Debug hello";
EXPECT_EQ("Debug hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerOutputsDebugLogsWhenVerbositySet) {
// This should now output LOG_DEBUG.
int verbose_log_level = 2;
test_logger_->set_verbosity_level(verbose_log_level);
LOG(LOG_DEBUG) << "Debug hello";
EXPECT_EQ("Debug hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerOutputsErrorLogsWhenVerbositySet) {
// This should now output LOG_ERROR.
int verbose_log_level = 2;
test_logger_->set_verbosity_level(verbose_log_level);
LOG(ERROR) << "Error hello";
EXPECT_EQ("Error hello\n", test_logger_->message());
}
TEST_F(LoggerTest, LoggerOutputsLogsAccordingToVerbosity) {
int verbose_log_level = 2;
test_logger_->set_verbosity_level(verbose_log_level);
// More verbose than the current limit.
VLOG(verbose_log_level + 1) << "Hello 3";
EXPECT_EQ("", test_logger_->message());
// Less verbose than the current limit.
VLOG(verbose_log_level - 1) << "Hello";
EXPECT_EQ("Hello\n", test_logger_->message());
// At the current limit. This will be appended to the previous log output.
VLOG(verbose_log_level) << "Hello 2";
EXPECT_EQ("Hello\nHello 2\n", test_logger_->message());
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/logger_test.cc
|
C++
|
unknown
| 5,056
|
// Copyright (C) 2017 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Tests that all implementations of MatcherApi are consistent.
#include "phonenumbers/matcher_api.h"
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "phonenumbers/regex_based_matcher.h"
#include "phonenumbers/phonemetadata.pb.h"
namespace i18n {
namespace phonenumbers {
namespace {
string ToString(const PhoneNumberDesc& desc) {
string str = "pattern: ";
if (desc.has_national_number_pattern()) {
str += desc.national_number_pattern();
} else {
str += "none";
}
return str;
}
void ExpectMatched(
const MatcherApi& matcher,
const string& number,
const PhoneNumberDesc& desc) {
EXPECT_TRUE(matcher.MatchNationalNumber(number, desc, false))
<< number << " should have matched " << ToString(desc);
EXPECT_TRUE(matcher.MatchNationalNumber(number, desc, true))
<< number << " should have matched " << ToString(desc);
}
void ExpectInvalid(
const MatcherApi& matcher,
const string& number,
const PhoneNumberDesc& desc) {
EXPECT_FALSE(matcher.MatchNationalNumber(number, desc, false))
<< number << " should not have matched " << ToString(desc);
EXPECT_FALSE(matcher.MatchNationalNumber(number, desc, true))
<< number << " should not have matched " << ToString(desc);
}
void ExpectTooLong(
const MatcherApi& matcher,
const string& number,
const PhoneNumberDesc& desc) {
EXPECT_FALSE(matcher.MatchNationalNumber(number, desc, false))
<< number << " should have been too long for " << ToString(desc);
EXPECT_TRUE(matcher.MatchNationalNumber(number, desc, true))
<< number << " should have been too long for " << ToString(desc);
}
} // namespace
class MatcherTest : public testing::Test {
protected:
void CheckMatcherBehavesAsExpected(const MatcherApi& matcher) const {
PhoneNumberDesc desc;
desc = CreateDesc("");
// Test if there is no matcher data.
ExpectInvalid(matcher, "1", desc);
desc = CreateDesc("9\\d{2}");
ExpectInvalid(matcher, "91", desc);
ExpectInvalid(matcher, "81", desc);
ExpectMatched(matcher, "911", desc);
ExpectInvalid(matcher, "811", desc);
ExpectTooLong(matcher, "9111", desc);
ExpectInvalid(matcher, "8111", desc);
desc = CreateDesc("\\d{1,2}");
ExpectMatched(matcher, "2", desc);
ExpectMatched(matcher, "20", desc);
desc = CreateDesc("20?");
ExpectMatched(matcher, "2", desc);
ExpectMatched(matcher, "20", desc);
desc = CreateDesc("2|20");
ExpectMatched(matcher, "2", desc);
// Subtle case where lookingAt() and matches() result in different end()s.
ExpectMatched(matcher, "20", desc);
}
private:
// Helper method to set national number fields in the PhoneNumberDesc proto.
// Empty fields won't be set.
PhoneNumberDesc CreateDesc(
const string& national_number_pattern) const {
PhoneNumberDesc desc;
if (!national_number_pattern.empty()) {
desc.set_national_number_pattern(national_number_pattern);
}
return desc;
}
};
TEST_F(MatcherTest, RegexBasedMatcher) {
RegexBasedMatcher matcher;
CheckMatcherBehavesAsExpected(matcher);
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/matcher_test.cc
|
C++
|
unknown
| 3,773
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Tao Huang
//
// Basic test cases for PhoneNumberMatch.
#include "phonenumbers/phonenumber.h"
#include "phonenumbers/phonenumbermatch.h"
#include <gtest/gtest.h>
#include "phonenumbers/phonenumber.pb.h"
namespace i18n {
namespace phonenumbers {
TEST(PhoneNumberMatch, TestGetterMethods) {
PhoneNumber number;
const int start_index = 10;
const string raw_phone_number("1 800 234 45 67");
PhoneNumberMatch match1(start_index, raw_phone_number, number);
EXPECT_EQ(start_index, match1.start());
EXPECT_EQ(start_index + static_cast<int>(raw_phone_number.length()),
match1.end());
EXPECT_EQ(static_cast<int>(raw_phone_number.length()), match1.length());
EXPECT_EQ(raw_phone_number, match1.raw_string());
EXPECT_EQ("PhoneNumberMatch [10,25) 1 800 234 45 67", match1.ToString());
}
TEST(PhoneNumberMatch, TestEquals) {
PhoneNumber number;
PhoneNumberMatch match1(10, "1 800 234 45 67", number);
PhoneNumberMatch match2(10, "1 800 234 45 67", number);
match2.set_start(11);
ASSERT_FALSE(match1.Equals(match2));
match2.set_start(match1.start());
EXPECT_TRUE(match1.Equals(match2));
PhoneNumber number2;
number2.set_raw_input("123");
match2.set_number(number2);
ASSERT_FALSE(match1.Equals(match2));
match2.set_number(match1.number());
EXPECT_TRUE(ExactlySameAs(match1.number(), match2.number()));
EXPECT_TRUE(match1.Equals(match2));
match2.set_raw_string("123");
ASSERT_FALSE(match1.Equals(match2));
}
TEST(PhoneNumberMatch, TestAssignmentOverload) {
PhoneNumber number;
PhoneNumberMatch match1(10, "1 800 234 45 67", number);
PhoneNumberMatch match2;
ASSERT_FALSE(match1.Equals(match2));
match2.CopyFrom(match1);
ASSERT_TRUE(match1.Equals(match2));
PhoneNumberMatch match3;
PhoneNumberMatch match4;
match4.CopyFrom(match2);
match3.CopyFrom(match2);
ASSERT_TRUE(match3.Equals(match4));
ASSERT_TRUE(match4.Equals(match2));
}
TEST(PhoneNumberMatch, TestCopyConstructor) {
PhoneNumber number;
PhoneNumberMatch match1(10, "1 800 234 45 67", number);
PhoneNumberMatch match2;
match2.CopyFrom(match1);
ASSERT_TRUE(match1.Equals(match2));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/phonenumbermatch_test.cc
|
C++
|
unknown
| 2,801
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "phonenumbers/phonenumbermatcher.h"
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include <unicode/unistr.h>
#include "phonenumbers/base/basictypes.h"
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/base/memory/singleton.h"
#include "phonenumbers/default_logger.h"
#include "phonenumbers/phonenumber.h"
#include "phonenumbers/phonenumber.pb.h"
#include "phonenumbers/phonenumbermatch.h"
#include "phonenumbers/phonenumberutil.h"
#include "phonenumbers/stringutil.h"
#include "phonenumbers/test_util.h"
namespace i18n {
namespace phonenumbers {
using std::string;
using icu::UnicodeString;
namespace {
// Small class that holds the context of the number we are testing against. The
// test will insert the phone number to be found between leading_text and
// trailing_text.
struct NumberContext {
string leading_text_;
string trailing_text_;
NumberContext(const string& leading_text, const string& trailing_text)
: leading_text_(leading_text),
trailing_text_(trailing_text) {
}
};
// Small class that holds the number we want to test and the region for which it
// should be valid.
struct NumberTest {
string raw_string_;
string region_;
string ToString() const {
return StrCat(raw_string_, " (", region_, ")");
}
NumberTest(const string& raw_string, const string& region)
: raw_string_(raw_string),
region_(region) {
}
};
} // namespace
class PhoneNumberMatcherTest : public testing::Test {
protected:
PhoneNumberMatcherTest()
: phone_util_(*PhoneNumberUtil::GetInstance()),
matcher_(phone_util_, "",
RegionCode::US(),
PhoneNumberMatcher::VALID, 5),
offset_(0) {
PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
}
bool IsLatinLetter(char32 letter) {
return PhoneNumberMatcher::IsLatinLetter(letter);
}
bool ContainsMoreThanOneSlashInNationalNumber(
const PhoneNumber& phone_number, const string& candidate) {
return PhoneNumberMatcher::ContainsMoreThanOneSlashInNationalNumber(
phone_number, candidate, phone_util_);
}
bool ExtractMatch(const string& text, PhoneNumberMatch* match) {
return matcher_.ExtractMatch(text, offset_, match);
}
PhoneNumberMatcher* GetMatcherWithLeniency(
const string& text, const string& region,
PhoneNumberMatcher::Leniency leniency) const {
return new PhoneNumberMatcher(phone_util_, text, region, leniency,
100 /* max_tries */);
}
// Tests each number in the test cases provided is found in its entirety for
// the specified leniency level.
void DoTestNumberMatchesForLeniency(
const std::vector<NumberTest>& test_cases,
PhoneNumberMatcher::Leniency leniency) const {
scoped_ptr<PhoneNumberMatcher> matcher;
for (std::vector<NumberTest>::const_iterator test = test_cases.begin();
test != test_cases.end(); ++test) {
matcher.reset(GetMatcherWithLeniency(
test->raw_string_, test->region_, leniency));
EXPECT_TRUE(matcher->HasNext())
<< "No match found in " << test->ToString()
<< " for leniency: " << leniency;
if (matcher->HasNext()) {
PhoneNumberMatch match;
matcher->Next(&match);
EXPECT_EQ(test->raw_string_, match.raw_string())
<< "Found wrong match in test " << test->ToString()
<< ". Found " << match.raw_string();
}
}
}
// Tests no number in the test cases provided is found for the specified
// leniency level.
void DoTestNumberNonMatchesForLeniency(
const std::vector<NumberTest>& test_cases,
PhoneNumberMatcher::Leniency leniency) const {
scoped_ptr<PhoneNumberMatcher> matcher;
for (std::vector<NumberTest>::const_iterator test = test_cases.begin();
test != test_cases.end(); ++test) {
matcher.reset(GetMatcherWithLeniency(
test->raw_string_, test->region_, leniency));
EXPECT_FALSE(matcher->HasNext()) << "Match found in " << test->ToString()
<< " for leniency: " << leniency;
}
}
// Asserts that the raw string and expected proto buffer for a match are set
// appropriately.
void AssertMatchProperties(const PhoneNumberMatch& match, const string& text,
const string& number, const string& region_code) {
PhoneNumber expected_result;
phone_util_.Parse(number, region_code, &expected_result);
EXPECT_EQ(expected_result, match.number());
EXPECT_EQ(number, match.raw_string()) << " Wrong number found in " << text;
}
// Asserts that another number can be found in "text" starting at "index", and
// that its corresponding range is [start, end).
void AssertEqualRange(const string& text, int index, int start, int end) {
string sub = text.substr(index);
PhoneNumberMatcher matcher(phone_util_, sub, RegionCode::NZ(),
PhoneNumberMatcher::POSSIBLE,
1000000 /* max_tries */);
PhoneNumberMatch match;
ASSERT_TRUE(matcher.HasNext());
matcher.Next(&match);
EXPECT_EQ(start - index, match.start());
EXPECT_EQ(end - index, match.end());
EXPECT_EQ(sub.substr(match.start(), match.length()), match.raw_string());
}
// Tests numbers found by the PhoneNumberMatcher in various textual contexts.
void DoTestFindInContext(const string& number,
const string& default_country) {
FindPossibleInContext(number, default_country);
PhoneNumber parsed;
phone_util_.Parse(number, default_country, &parsed);
if (phone_util_.IsValidNumber(parsed)) {
FindValidInContext(number, default_country);
}
}
// Helper method which tests the contexts provided and ensures that:
// -- if is_valid is true, they all find a test number inserted in the middle
// when leniency of matching is set to VALID; else no test number should be
// extracted at that leniency level
// -- if is_possible is true, they all find a test number inserted in the
// middle when leniency of matching is set to POSSIBLE; else no test number
// should be extracted at that leniency level
void FindMatchesInContexts(const std::vector<NumberContext>& contexts,
bool is_valid, bool is_possible,
const string& region, const string& number) {
if (is_valid) {
DoTestInContext(number, region, contexts, PhoneNumberMatcher::VALID);
} else {
for (std::vector<NumberContext>::const_iterator it = contexts.begin();
it != contexts.end(); ++it) {
string text = StrCat(it->leading_text_, number, it->trailing_text_);
PhoneNumberMatcher matcher(text, region);
EXPECT_FALSE(matcher.HasNext());
}
}
if (is_possible) {
DoTestInContext(number, region, contexts, PhoneNumberMatcher::POSSIBLE);
} else {
for (std::vector<NumberContext>::const_iterator it = contexts.begin();
it != contexts.end(); ++it) {
string text = StrCat(it->leading_text_, number, it->trailing_text_);
PhoneNumberMatcher matcher(phone_util_, text, region,
PhoneNumberMatcher::POSSIBLE,
10000); // Number of matches.
EXPECT_FALSE(matcher.HasNext());
}
}
}
// Variant of FindMatchesInContexts that uses a default number and region.
void FindMatchesInContexts(const std::vector<NumberContext>& contexts,
bool is_valid, bool is_possible) {
const string& region = RegionCode::US();
const string number("415-666-7777");
FindMatchesInContexts(contexts, is_valid, is_possible, region, number);
}
// Tests valid numbers in contexts that should pass for
// PhoneNumberMatcher::POSSIBLE.
void FindPossibleInContext(const string& number,
const string& default_country) {
std::vector<NumberContext> context_pairs;
context_pairs.push_back(NumberContext("", "")); // no context
context_pairs.push_back(NumberContext(" ", "\t")); // whitespace only
context_pairs.push_back(NumberContext("Hello ", "")); // no context at end
// No context at start.
context_pairs.push_back(NumberContext("", " to call me!"));
context_pairs.push_back(NumberContext("Hi there, call ", " to reach me!"));
// With commas.
context_pairs.push_back(NumberContext("Hi there, call ", ", or don't"));
// Three examples without whitespace around the number.
context_pairs.push_back(NumberContext("Hi call", ""));
context_pairs.push_back(NumberContext("", "forme"));
context_pairs.push_back(NumberContext("Hi call", "forme"));
// With other small numbers.
context_pairs.push_back(NumberContext("It's cheap! Call ", " before 6:30"));
// With a second number later.
context_pairs.push_back(NumberContext("Call ", " or +1800-123-4567!"));
// With a Month-Day date.
context_pairs.push_back(NumberContext("Call me on June 2 at", ""));
// With publication pages.
context_pairs.push_back(NumberContext(
"As quoted by Alfonso 12-15 (2009), you may call me at ", ""));
context_pairs.push_back(NumberContext(
"As quoted by Alfonso et al. 12-15 (2009), you may call me at ", ""));
// With dates, written in the American style.
context_pairs.push_back(NumberContext(
"As I said on 03/10/2011, you may call me at ", ""));
// With trailing numbers after a comma. The 45 should not be considered an
// extension.
context_pairs.push_back(NumberContext("", ", 45 days a year"));
// When matching we don't consider semicolon along with legitimate extension
// symbol to indicate an extension. The 7246433 should not be considered an
// extension.
context_pairs.push_back(NumberContext("", ";x 7246433"));
// With a postfix stripped off as it looks like the start of another number.
context_pairs.push_back(NumberContext("Call ", "/x12 more"));
DoTestInContext(number, default_country, context_pairs,
PhoneNumberMatcher::POSSIBLE);
}
// Tests valid numbers in contexts that fail for PhoneNumberMatcher::POSSIBLE
// but are valid for PhoneNumberMatcher::VALID.
void FindValidInContext(const string& number, const string& default_country) {
std::vector<NumberContext> context_pairs;
// With other small numbers.
context_pairs.push_back(NumberContext("It's only 9.99! Call ", " to buy"));
// With a number Day.Month.Year date.
context_pairs.push_back(NumberContext("Call me on 21.6.1984 at ", ""));
// With a number Month/Day date.
context_pairs.push_back(NumberContext("Call me on 06/21 at ", ""));
// With a number Day.Month date.
context_pairs.push_back(NumberContext("Call me on 21.6. at ", ""));
// With a number Month/Day/Year date.
context_pairs.push_back(NumberContext("Call me on 06/21/84 at ", ""));
DoTestInContext(number, default_country, context_pairs,
PhoneNumberMatcher::VALID);
}
void DoTestInContext(const string& number, const string& default_country,
const std::vector<NumberContext>& context_pairs,
PhoneNumberMatcher::Leniency leniency) {
for (std::vector<NumberContext>::const_iterator it = context_pairs.begin();
it != context_pairs.end(); ++it) {
string prefix = it->leading_text_;
string text = StrCat(prefix, number, it->trailing_text_);
int start = prefix.length();
int end = start + number.length();
PhoneNumberMatcher matcher(phone_util_, text, default_country, leniency,
1000000 /* max_tries */);
PhoneNumberMatch match;
ASSERT_TRUE(matcher.HasNext())
<< "Did not find a number in '" << text << "'; expected '"
<< number << "'";
matcher.Next(&match);
string extracted = text.substr(match.start(), match.length());
EXPECT_EQ(start, match.start());
EXPECT_EQ(end, match.end());
EXPECT_EQ(number, extracted);
EXPECT_EQ(extracted, match.raw_string())
<< "Unexpected phone region in '" << text << "'; extracted '"
<< extracted << "'";
EnsureTermination(text, default_country, leniency);
}
}
// Exhaustively searches for phone numbers from each index within "text" to
// test that finding matches always terminates.
void EnsureTermination(const string& text, const string& default_country,
PhoneNumberMatcher::Leniency leniency) {
for (size_t index = 0; index <= text.length(); ++index) {
string sub = text.substr(index);
// Iterates over all matches.
PhoneNumberMatcher matcher(phone_util_, text, default_country, leniency,
1000000 /* max_tries */);
string matches;
PhoneNumberMatch match;
int match_count = 0;
while (matcher.HasNext()) {
matcher.Next(&match);
StrAppend(&matches, ",", match.ToString());
++match_count;
}
// We should not ever find more than 10 matches in a single candidate text
// in these test cases, so we check here that the matcher was limited by
// the number of matches, rather than by max_tries.
ASSERT_LT(match_count, 10);
}
}
const PhoneNumberUtil& phone_util_;
private:
PhoneNumberMatcher matcher_;
int offset_;
};
TEST_F(PhoneNumberMatcherTest, ContainsMoreThanOneSlashInNationalNumber) {
// A date should return true.
PhoneNumber number;
number.set_country_code(1);
number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
string candidate = "1/05/2013";
EXPECT_TRUE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
// Here, the country code source thinks it started with a country calling
// code, but this is not the same as the part before the slash, so it's still
// true.
number.Clear();
number.set_country_code(274);
number.set_country_code_source(PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN);
candidate = "27/4/2013";
EXPECT_TRUE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
// Now it should be false, because the first slash is after the country
// calling code.
number.Clear();
number.set_country_code(49);
number.set_country_code_source(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
candidate = "49/69/2013";
EXPECT_FALSE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
number.Clear();
number.set_country_code(49);
number.set_country_code_source(PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN);
candidate = "+49/69/2013";
EXPECT_FALSE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
candidate = "+ 49/69/2013";
EXPECT_FALSE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
candidate = "+ 49/69/20/13";
EXPECT_TRUE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
// Here, the first group is not assumed to be the country calling code, even
// though it is the same as it, so this should return true.
number.Clear();
number.set_country_code(49);
number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
candidate = "49/69/2013";
EXPECT_TRUE(ContainsMoreThanOneSlashInNationalNumber(number, candidate));
}
// See PhoneNumberUtilTest::ParseNationalNumber.
TEST_F(PhoneNumberMatcherTest, FindNationalNumber) {
// Same cases as in ParseNationalNumber.
DoTestFindInContext("033316005", RegionCode::NZ());
// "33316005", RegionCode::NZ() is omitted since the national-prefix is
// obligatory for these types of numbers in New Zealand.
// National prefix attached and some formatting present.
DoTestFindInContext("03-331 6005", RegionCode::NZ());
DoTestFindInContext("03 331 6005", RegionCode::NZ());
// Testing international prefixes.
// Should strip country code.
DoTestFindInContext("0064 3 331 6005", RegionCode::NZ());
// Try again, but this time we have an international number with Region Code
// US. It should recognize the country code and parse accordingly.
DoTestFindInContext("01164 3 331 6005", RegionCode::US());
DoTestFindInContext("+64 3 331 6005", RegionCode::US());
DoTestFindInContext("64(0)64123456", RegionCode::NZ());
// Check that using a "/" is fine in a phone number.
// Note that real Polish numbers do *not* start with a 0.
DoTestFindInContext("0123/456789", RegionCode::PL());
DoTestFindInContext("123-456-7890", RegionCode::US());
}
// See PhoneNumberUtilTest::ParseWithInternationalPrefixes.
TEST_F(PhoneNumberMatcherTest, FindWithInternationalPrefixes) {
DoTestFindInContext("+1 (650) 333-6000", RegionCode::NZ());
DoTestFindInContext("1-650-333-6000", RegionCode::US());
// Calling the US number from Singapore by using different service providers
// 1st test: calling using SingTel IDD service (IDD is 001)
DoTestFindInContext("0011-650-333-6000", RegionCode::SG());
// 2nd test: calling using StarHub IDD service (IDD is 008)
DoTestFindInContext("0081-650-333-6000", RegionCode::SG());
// 3rd test: calling using SingTel V019 service (IDD is 019)
DoTestFindInContext("0191-650-333-6000", RegionCode::SG());
// Calling the US number from Poland
DoTestFindInContext("0~01-650-333-6000", RegionCode::PL());
// Using "++" at the start.
DoTestFindInContext("++1 (650) 333-6000", RegionCode::PL());
// Using a full-width plus sign.
DoTestFindInContext(
"\xEF\xBC\x8B""1 (650) 333-6000" /* "+1 (650) 333-6000" */,
RegionCode::SG());
// The whole number, including punctuation, is here represented in full-width
// form.
DoTestFindInContext(
/* "+1 (650) 333-6000" */
"\xEF\xBC\x8B\xEF\xBC\x91\xE3\x80\x80\xEF\xBC\x88\xEF\xBC\x96\xEF\xBC\x95"
"\xEF\xBC\x90\xEF\xBC\x89\xE3\x80\x80\xEF\xBC\x93\xEF\xBC\x93\xEF\xBC\x93"
"\xEF\xBC\x8D\xEF\xBC\x96\xEF\xBC\x90\xEF\xBC\x90\xEF\xBC\x90",
RegionCode::SG());
}
// See PhoneNumberUtilTest::ParseWithLeadingZero.
TEST_F(PhoneNumberMatcherTest, FindWithLeadingZero) {
DoTestFindInContext("+39 02-36618 300", RegionCode::NZ());
DoTestFindInContext("02-36618 300", RegionCode::IT());
DoTestFindInContext("312 345 678", RegionCode::IT());
}
// See PhoneNumberUtilTest::ParseNationalNumberArgentina.
TEST_F(PhoneNumberMatcherTest, FindNationalNumberArgentina) {
// Test parsing mobile numbers of Argentina.
DoTestFindInContext("+54 9 343 555 1212", RegionCode::AR());
DoTestFindInContext("0343 15 555 1212", RegionCode::AR());
DoTestFindInContext("+54 9 3715 65 4320", RegionCode::AR());
DoTestFindInContext("03715 15 65 4320", RegionCode::AR());
// Test parsing fixed-line numbers of Argentina.
DoTestFindInContext("+54 11 3797 0000", RegionCode::AR());
DoTestFindInContext("011 3797 0000", RegionCode::AR());
DoTestFindInContext("+54 3715 65 4321", RegionCode::AR());
DoTestFindInContext("03715 65 4321", RegionCode::AR());
DoTestFindInContext("+54 23 1234 0000", RegionCode::AR());
DoTestFindInContext("023 1234 0000", RegionCode::AR());
}
// See PhoneNumberMatcherTest::ParseWithXInNumber.
TEST_F(PhoneNumberMatcherTest, FindWithXInNumber) {
DoTestFindInContext("(0xx) 123456789", RegionCode::AR());
// A case where x denotes both carrier codes and extension symbol.
DoTestFindInContext("(0xx) 123456789 x 1234", RegionCode::AR());
// This test is intentionally constructed such that the number of digit after
// xx is larger than 7, so that the number won't be mistakenly treated as an
// extension, as we allow extensions up to 7 digits. This assumption is okay
// for now as all the countries where a carrier selection code is written in
// the form of xx have a national significant number of length larger than 7.
DoTestFindInContext("011xx5481429712", RegionCode::US());
}
// See PhoneNumberUtilTest::ParseNumbersMexico.
TEST_F(PhoneNumberMatcherTest, FindNumbersMexico) {
// Test parsing fixed-line numbers of Mexico.
DoTestFindInContext("+52 (449)978-0001", RegionCode::MX());
DoTestFindInContext("01 (449)978-0001", RegionCode::MX());
DoTestFindInContext("(449)978-0001", RegionCode::MX());
// Test parsing mobile numbers of Mexico.
DoTestFindInContext("+52 1 33 1234-5678", RegionCode::MX());
DoTestFindInContext("044 (33) 1234-5678", RegionCode::MX());
DoTestFindInContext("045 33 1234-5678", RegionCode::MX());
}
// See PhoneNumberUtilTest::ParseNumbersWithPlusWithNoRegion.
TEST_F(PhoneNumberMatcherTest, FindNumbersWithPlusWithNoRegion) {
// RegionCode::ZZ() is allowed only if the number starts with a '+' - then the
// country code can be calculated.
DoTestFindInContext("+64 3 331 6005", RegionCode::ZZ());
}
// See PhoneNumberUtilTest::ParseExtensions.
TEST_F(PhoneNumberMatcherTest, FindExtensions) {
DoTestFindInContext("03 331 6005 ext 3456", RegionCode::NZ());
DoTestFindInContext("03-3316005x3456", RegionCode::NZ());
DoTestFindInContext("03-3316005 int.3456", RegionCode::NZ());
DoTestFindInContext("03 3316005 #3456", RegionCode::NZ());
DoTestFindInContext("0~0 1800 7493 524", RegionCode::PL());
DoTestFindInContext("(1800) 7493.524", RegionCode::US());
// Check that the last instance of an extension token is matched.
DoTestFindInContext("0~0 1800 7493 524 ~1234", RegionCode::PL());
// Verifying bug-fix where the last digit of a number was previously omitted
// if it was a 0 when extracting the extension. Also verifying a few different
// cases of extensions.
DoTestFindInContext("+44 2034567890x456", RegionCode::NZ());
DoTestFindInContext("+44 2034567890x456", RegionCode::GB());
DoTestFindInContext("+44 2034567890 x456", RegionCode::GB());
DoTestFindInContext("+44 2034567890 X456", RegionCode::GB());
DoTestFindInContext("+44 2034567890 X 456", RegionCode::GB());
DoTestFindInContext("+44 2034567890 X 456", RegionCode::GB());
DoTestFindInContext("+44 2034567890 X 456", RegionCode::GB());
DoTestFindInContext("(800) 901-3355 x 7246433", RegionCode::US());
DoTestFindInContext("(800) 901-3355 , ext 7246433", RegionCode::US());
DoTestFindInContext("(800) 901-3355 ,extension 7246433", RegionCode::US());
// The next test differs from PhoneNumberUtil -> when matching we don't
// consider a lone comma to indicate an extension, although we accept it when
// parsing.
DoTestFindInContext("(800) 901-3355 ,x 7246433", RegionCode::US());
DoTestFindInContext("(800) 901-3355 ext: 7246433", RegionCode::US());
}
TEST_F(PhoneNumberMatcherTest, FindInterspersedWithSpace) {
DoTestFindInContext("0 3 3 3 1 6 0 0 5", RegionCode::NZ());
}
// Test matching behavior when starting in the middle of a phone number.
TEST_F(PhoneNumberMatcherTest, IntermediateParsePositions) {
string text = "Call 033316005 or 032316005!";
// | | | | | |
// 0 5 10 15 20 25
// Iterate over all possible indices.
for (int i = 0; i <= 5; ++i) {
AssertEqualRange(text, i, 5, 14);
}
// 7 and 8 digits in a row are still parsed as number.
AssertEqualRange(text, 6, 6, 14);
AssertEqualRange(text, 7, 7, 14);
// Anything smaller is skipped to the second instance.
for (int i = 8; i <= 19; ++i) {
AssertEqualRange(text, i, 19, 28);
}
}
TEST_F(PhoneNumberMatcherTest, FourMatchesInARow) {
string number1 = "415-666-7777";
string number2 = "800-443-1223";
string number3 = "212-443-1223";
string number4 = "650-443-1223";
string text = StrCat(number1, " - ", number2, " - ", number3, " - ", number4);
PhoneNumberMatcher matcher(text, RegionCode::US());
PhoneNumberMatch match;
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number1, RegionCode::US());
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number2, RegionCode::US());
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number3, RegionCode::US());
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number4, RegionCode::US());
}
TEST_F(PhoneNumberMatcherTest, MatchesFoundWithMultipleSpaces) {
string number1 = "415-666-7777";
string number2 = "800-443-1223";
string text = StrCat(number1, " ", number2);
PhoneNumberMatcher matcher(text, RegionCode::US());
PhoneNumberMatch match;
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number1, RegionCode::US());
EXPECT_TRUE(matcher.HasNext());
EXPECT_TRUE(matcher.Next(&match));
AssertMatchProperties(match, text, number2, RegionCode::US());
}
TEST_F(PhoneNumberMatcherTest, MatchWithSurroundingZipcodes) {
string number = "415-666-7777";
string zip_preceding =
StrCat("My address is CA 34215 - ", number, " is my number.");
PhoneNumber expected_result;
phone_util_.Parse(number, RegionCode::US(), &expected_result);
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency(zip_preceding, RegionCode::US(),
PhoneNumberMatcher::VALID));
PhoneNumberMatch match;
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->Next(&match));
AssertMatchProperties(match, zip_preceding, number, RegionCode::US());
// Now repeat, but this time the phone number has spaces in it. It should
// still be found.
number = "(415) 666 7777";
string zip_following =
StrCat("My number is ", number, ". 34215 is my zip-code.");
matcher.reset(
GetMatcherWithLeniency(zip_following, RegionCode::US(),
PhoneNumberMatcher::VALID));
PhoneNumberMatch match_with_spaces;
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->Next(&match_with_spaces));
AssertMatchProperties(
match_with_spaces, zip_following, number, RegionCode::US());
}
TEST_F(PhoneNumberMatcherTest, IsLatinLetter) {
EXPECT_TRUE(IsLatinLetter('c'));
EXPECT_TRUE(IsLatinLetter('C'));
EXPECT_TRUE(IsLatinLetter(UnicodeString::fromUTF8("\xC3\x89" /* "É" */)[0]));
// Combining acute accent.
EXPECT_TRUE(IsLatinLetter(UnicodeString::fromUTF8("\xCC\x81")[0]));
EXPECT_FALSE(IsLatinLetter(':'));
EXPECT_FALSE(IsLatinLetter('5'));
EXPECT_FALSE(IsLatinLetter('-'));
EXPECT_FALSE(IsLatinLetter('.'));
EXPECT_FALSE(IsLatinLetter(' '));
EXPECT_FALSE(
IsLatinLetter(UnicodeString::fromUTF8("\xE6\x88\x91" /* "我" */)[0]));
/* Hiragana letter no (の) - this should neither seem to start or end with a
Latin letter. */
EXPECT_FALSE(IsLatinLetter(UnicodeString::fromUTF8("\xE3\x81\xAE")[0]));
EXPECT_FALSE(IsLatinLetter(UnicodeString::fromUTF8("\xE3\x81\xAE")[2]));
}
TEST_F(PhoneNumberMatcherTest, MatchesWithSurroundingLatinChars) {
std::vector<NumberContext> possible_only_contexts;
possible_only_contexts.push_back(NumberContext("abc", "def"));
possible_only_contexts.push_back(NumberContext("abc", ""));
possible_only_contexts.push_back(NumberContext("", "def"));
possible_only_contexts.push_back(NumberContext("\xC3\x89" /* "É" */, ""));
// e with an acute accent decomposed (with combining mark).
possible_only_contexts.push_back(
NumberContext("\x20\x22\xCC\x81""e\xCC\x81" /* "́e\xCC\x81" */, ""));
// Numbers should not be considered valid, if they are surrounded by Latin
// characters, but should be considered possible.
FindMatchesInContexts(possible_only_contexts, false, true);
}
TEST_F(PhoneNumberMatcherTest, MoneyNotSeenAsPhoneNumber) {
std::vector<NumberContext> possible_only_contexts;
possible_only_contexts.push_back(NumberContext("$", ""));
possible_only_contexts.push_back(NumberContext("", "$"));
possible_only_contexts.push_back(NumberContext("\xC2\xA3" /* "£" */, ""));
possible_only_contexts.push_back(NumberContext("\xC2\xA5" /* "¥" */, ""));
FindMatchesInContexts(possible_only_contexts, false, true);
}
TEST_F(PhoneNumberMatcherTest, PercentageNotSeenAsPhoneNumber) {
std::vector<NumberContext> possible_only_contexts;
possible_only_contexts.push_back(NumberContext("", "%"));
// Numbers followed by % should be dropped.
FindMatchesInContexts(possible_only_contexts, false, true);
}
TEST_F(PhoneNumberMatcherTest, PhoneNumberWithLeadingOrTrailingMoneyMatches) {
std::vector<NumberContext> contexts;
contexts.push_back(NumberContext("$20 ", ""));
contexts.push_back(NumberContext("", " 100$"));
// Because of the space after the 20 (or before the 100) these dollar amounts
// should not stop the actual number from being found.
FindMatchesInContexts(contexts, true, true);
}
TEST_F(PhoneNumberMatcherTest,
MatchesWithSurroundingLatinCharsAndLeadingPunctuation) {
std::vector<NumberContext> possible_only_contexts;
// Contexts with trailing characters. Leading characters are okay here since
// the numbers we will insert start with punctuation, but trailing characters
// are still not allowed.
possible_only_contexts.push_back(NumberContext("abc", "def"));
possible_only_contexts.push_back(NumberContext("", "def"));
possible_only_contexts.push_back(NumberContext("", "\xC3\x89" /* "É" */));
// Numbers should not be considered valid, if they have trailing Latin
// characters, but should be considered possible.
string number_with_plus = "+14156667777";
string number_with_brackets = "(415)6667777";
FindMatchesInContexts(possible_only_contexts, false, true, RegionCode::US(),
number_with_plus);
FindMatchesInContexts(possible_only_contexts, false, true, RegionCode::US(),
number_with_brackets);
std::vector<NumberContext> valid_contexts;
valid_contexts.push_back(NumberContext("abc", ""));
valid_contexts.push_back(NumberContext("\xC3\x89" /* "É" */, ""));
valid_contexts.push_back(
NumberContext("\xC3\x89" /* "É" */, ".")); // Trailing punctuation.
// Trailing white-space.
valid_contexts.push_back(NumberContext("\xC3\x89" /* "É" */, " def"));
// Numbers should be considered valid, since they start with punctuation.
FindMatchesInContexts(valid_contexts, true, true, RegionCode::US(),
number_with_plus);
FindMatchesInContexts(valid_contexts, true, true, RegionCode::US(),
number_with_brackets);
}
TEST_F(PhoneNumberMatcherTest, MatchesWithSurroundingChineseChars) {
std::vector<NumberContext> valid_contexts;
valid_contexts.push_back(NumberContext(
/* "我的电话号码是" */
"\xE6\x88\x91\xE7\x9A\x84\xE7\x94\xB5\xE8\xAF\x9D\xE5\x8F\xB7\xE7\xA0\x81"
"\xE6\x98\xAF", ""));
valid_contexts.push_back(NumberContext(
"",
/* "是我的电话号码" */
"\xE6\x98\xAF\xE6\x88\x91\xE7\x9A\x84\xE7\x94\xB5\xE8\xAF\x9D\xE5\x8F\xB7"
"\xE7\xA0\x81"));
valid_contexts.push_back(NumberContext(
"\xE8\xAF\xB7\xE6\x8B\xA8\xE6\x89\x93" /* "请拨打" */,
"\xE6\x88\x91\xE5\x9C\xA8\xE6\x98\x8E\xE5\xA4\xA9" /* "我在明天" */));
// Numbers should be considered valid, since they are surrounded by Chinese.
FindMatchesInContexts(valid_contexts, true, true);
}
TEST_F(PhoneNumberMatcherTest, MatchesWithSurroundingPunctuation) {
std::vector<NumberContext> valid_contexts;
// At end of text.
valid_contexts.push_back(NumberContext("My number-", ""));
// At start of text.
valid_contexts.push_back(NumberContext("", ".Nice day."));
// Punctuation surround number.
valid_contexts.push_back(NumberContext("Tel:", "."));
// White-space is also fine.
valid_contexts.push_back(NumberContext("Tel: ", " on Saturdays."));
// Numbers should be considered valid, since they are surrounded by
// punctuation.
FindMatchesInContexts(valid_contexts, true, true);
}
TEST_F(PhoneNumberMatcherTest,
MatchesMultiplePhoneNumbersSeparatedByPhoneNumberPunctuation) {
const string text = "Call 650-253-4561 -- 455-234-3451";
const string& region = RegionCode::US();
PhoneNumber number1;
number1.set_country_code(phone_util_.GetCountryCodeForRegion(region));
number1.set_national_number(6502534561ULL);
PhoneNumberMatch match1(5, "650-253-4561", number1);
PhoneNumber number2;
number2.set_country_code(phone_util_.GetCountryCodeForRegion(region));
number2.set_national_number(4552343451ULL);
PhoneNumberMatch match2(21, "455-234-3451", number2);
PhoneNumberMatcher matcher(
phone_util_, text, region, PhoneNumberMatcher::VALID, 100);
PhoneNumberMatch actual_match1;
PhoneNumberMatch actual_match2;
matcher.Next(&actual_match1);
matcher.Next(&actual_match2);
EXPECT_TRUE(match1.Equals(actual_match1))
<< "Got: " << actual_match1.ToString();
EXPECT_TRUE(match2.Equals(actual_match2))
<< "Got: " << actual_match2.ToString();
}
TEST_F(PhoneNumberMatcherTest,
DoesNotMatchMultiplePhoneNumbersSeparatedWithNoWhiteSpace) {
const string text = "Call 650-253-4561--455-234-3451";
const string& region = RegionCode::US();
PhoneNumberMatcher matcher(
phone_util_, text, region, PhoneNumberMatcher::VALID, 100);
EXPECT_FALSE(matcher.HasNext());
}
// Strings with number-like things that shouldn't be found under any level.
static const NumberTest kImpossibleCases[] = {
NumberTest("12345", RegionCode::US()),
NumberTest("23456789", RegionCode::US()),
NumberTest("234567890112", RegionCode::US()),
NumberTest("650+253+1234", RegionCode::US()),
NumberTest("3/10/1984", RegionCode::CA()),
NumberTest("03/27/2011", RegionCode::US()),
NumberTest("31/8/2011", RegionCode::US()),
NumberTest("1/12/2011", RegionCode::US()),
NumberTest("10/12/82", RegionCode::DE()),
NumberTest("650x2531234", RegionCode::US()),
NumberTest("2012-01-02 08:00", RegionCode::US()),
NumberTest("2012/01/02 08:00", RegionCode::US()),
NumberTest("20120102 08:00", RegionCode::US()),
NumberTest("2014-04-12 04:04 PM", RegionCode::US()),
NumberTest("2014-04-12 04:04 PM", RegionCode::US()),
NumberTest("2014-04-12 04:04 PM", RegionCode::US()),
NumberTest("2014-04-12 04:04 PM", RegionCode::US()),
};
// Strings with number-like things that should only be found under "possible".
static const NumberTest kPossibleOnlyCases[] = {
// US numbers cannot start with 7 in the test metadata to be valid.
NumberTest("7121115678", RegionCode::US()),
// 'X' should not be found in numbers at leniencies stricter than POSSIBLE,
// unless it represents a carrier code or extension.
NumberTest("1650 x 253 - 1234", RegionCode::US()),
NumberTest("650 x 253 - 1234", RegionCode::US()),
NumberTest("6502531x234", RegionCode::US()),
NumberTest("(20) 3346 1234", RegionCode::GB()), // Non-optional NP omitted
};
// Strings with number-like things that should only be found up to and including
// the "valid" leniency level.
static const NumberTest kValidCases[] = {
NumberTest("65 02 53 00 00", RegionCode::US()),
NumberTest("6502 538365", RegionCode::US()),
// 2 slashes are illegal at higher levels.
NumberTest("650//253-1234", RegionCode::US()),
NumberTest("650/253/1234", RegionCode::US()),
NumberTest("9002309. 158", RegionCode::US()),
NumberTest("12 7/8 - 14 12/34 - 5", RegionCode::US()),
NumberTest("12.1 - 23.71 - 23.45", RegionCode::US()),
NumberTest("800 234 1 111x1111", RegionCode::US()),
NumberTest("1979-2011 100", RegionCode::US()),
// National number in wrong format.
NumberTest("+494949-4-94", RegionCode::DE()),
NumberTest(
/* "415666-7777" */
"\xEF\xBC\x94\xEF\xBC\x91\xEF\xBC\x95\xEF\xBC\x96\xEF\xBC\x96\xEF\xBC\x96"
"\x2D\xEF\xBC\x97\xEF\xBC\x97\xEF\xBC\x97\xEF\xBC\x97", RegionCode::US()),
NumberTest("2012-0102 08", RegionCode::US()), // Very strange formatting.
NumberTest("2012-01-02 08", RegionCode::US()),
// Breakdown assistance number with unexpected formatting.
NumberTest("1800-1-0-10 22", RegionCode::AU()),
NumberTest("030-3-2 23 12 34", RegionCode::DE()),
NumberTest("03 0 -3 2 23 12 34", RegionCode::DE()),
NumberTest("(0)3 0 -3 2 23 12 34", RegionCode::DE()),
NumberTest("0 3 0 -3 2 23 12 34", RegionCode::DE()),
#ifdef I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
// Fits an alternate pattern, but the leading digits don't match.
NumberTest("+52 332 123 23 23", RegionCode::MX()),
#endif // I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
};
// Strings with number-like things that should only be found up to and including
// the "strict_grouping" leniency level.
static const NumberTest kStrictGroupingCases[] = {
NumberTest("(415) 6667777", RegionCode::US()),
NumberTest("415-6667777", RegionCode::US()),
// Should be found by strict grouping but not exact grouping, as the last two
// groups are formatted together as a block.
NumberTest("0800-2491234", RegionCode::DE()),
// If the user is using alternate formats, test that numbers formatted in
// that way are found.
#ifdef I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
// Doesn't match any formatting in the test file, but almost matches an
// alternate format (the last two groups have been squashed together here).
NumberTest("0900-1 123123", RegionCode::DE()),
NumberTest("(0)900-1 123123", RegionCode::DE()),
NumberTest("0 900-1 123123", RegionCode::DE()),
#endif // I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
// NDC also found as part of the country calling code; this shouldn't ruin the
// grouping expectations.
NumberTest("+33 3 34 2312", RegionCode::FR()),
};
// Strings with number-like things that should be found at all levels.
static const NumberTest kExactGroupingCases[] = {
NumberTest(
/* "4156667777" */
"\xEF\xBC\x94\xEF\xBC\x91\xEF\xBC\x95\xEF\xBC\x96\xEF\xBC\x96\xEF\xBC\x96"
"\xEF\xBC\x97\xEF\xBC\x97\xEF\xBC\x97\xEF\xBC\x97", RegionCode::US()),
NumberTest(
/* "415-666-7777" */
"\xEF\xBC\x94\xEF\xBC\x91\xEF\xBC\x95\xEF\xBC\x8D\xEF\xBC\x96\xEF\xBC\x96"
"\xEF\xBC\x96\xEF\xBC\x8D\xEF\xBC\x97\xEF\xBC\x97\xEF\xBC\x97"
"\xEF\xBC\x97", RegionCode::US()),
NumberTest("4156667777", RegionCode::US()),
NumberTest("4156667777 x 123", RegionCode::US()),
NumberTest("415-666-7777", RegionCode::US()),
NumberTest("415/666-7777", RegionCode::US()),
NumberTest("415-666-7777 ext. 503", RegionCode::US()),
NumberTest("1 415 666 7777 x 123", RegionCode::US()),
NumberTest("+1 415-666-7777", RegionCode::US()),
NumberTest("+494949 49", RegionCode::DE()),
NumberTest("+49-49-34", RegionCode::DE()),
NumberTest("+49-4931-49", RegionCode::DE()),
NumberTest("04931-49", RegionCode::DE()), // With National Prefix
NumberTest("+49-494949", RegionCode::DE()), // One group with country code
NumberTest("+49-494949 ext. 49", RegionCode::DE()),
NumberTest("+49494949 ext. 49", RegionCode::DE()),
NumberTest("0494949", RegionCode::DE()),
NumberTest("0494949 ext. 49", RegionCode::DE()),
NumberTest("01 (33) 3461 2234", RegionCode::MX()), // Optional NP present
NumberTest("(33) 3461 2234", RegionCode::MX()), // Optional NP omitted
// If the user is using alternate formats, test that numbers formatted in
// that way are found.
#ifdef I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
// Breakdown assistance number using alternate formatting pattern.
NumberTest("1800-10-10 22", RegionCode::AU()),
// Doesn't match any formatting in the test file, but matches an alternate
// format exactly.
NumberTest("0900-1 123 123", RegionCode::DE()),
NumberTest("(0)900-1 123 123", RegionCode::DE()),
NumberTest("0 900-1 123 123", RegionCode::DE()),
#endif // I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS
NumberTest("+33 3 34 23 12", RegionCode::FR()),
};
TEST_F(PhoneNumberMatcherTest, MatchesWithPossibleLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kPossibleOnlyCases,
kPossibleOnlyCases + arraysize(kPossibleOnlyCases));
test_cases.insert(test_cases.begin(), kValidCases,
kValidCases + arraysize(kValidCases));
test_cases.insert(
test_cases.begin(), kStrictGroupingCases,
kStrictGroupingCases + arraysize(kStrictGroupingCases));
test_cases.insert(test_cases.begin(), kExactGroupingCases,
kExactGroupingCases + arraysize(kExactGroupingCases));
DoTestNumberMatchesForLeniency(test_cases, PhoneNumberMatcher::POSSIBLE);
}
TEST_F(PhoneNumberMatcherTest, NonMatchesWithPossibleLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kImpossibleCases,
kImpossibleCases + arraysize(kImpossibleCases));
DoTestNumberNonMatchesForLeniency(test_cases, PhoneNumberMatcher::POSSIBLE);
}
TEST_F(PhoneNumberMatcherTest, MatchesWithValidLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kValidCases,
kValidCases + arraysize(kValidCases));
test_cases.insert(
test_cases.begin(), kStrictGroupingCases,
kStrictGroupingCases + arraysize(kStrictGroupingCases));
test_cases.insert(test_cases.begin(), kExactGroupingCases,
kExactGroupingCases + arraysize(kExactGroupingCases));
DoTestNumberMatchesForLeniency(test_cases, PhoneNumberMatcher::VALID);
}
TEST_F(PhoneNumberMatcherTest, NonMatchesWithValidLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kImpossibleCases,
kImpossibleCases + arraysize(kImpossibleCases));
test_cases.insert(test_cases.begin(), kPossibleOnlyCases,
kPossibleOnlyCases + arraysize(kPossibleOnlyCases));
DoTestNumberNonMatchesForLeniency(test_cases, PhoneNumberMatcher::VALID);
}
TEST_F(PhoneNumberMatcherTest, MatchesWithStrictGroupingLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(
test_cases.begin(), kStrictGroupingCases,
kStrictGroupingCases + arraysize(kStrictGroupingCases));
test_cases.insert(test_cases.begin(), kExactGroupingCases,
kExactGroupingCases + arraysize(kExactGroupingCases));
DoTestNumberMatchesForLeniency(test_cases,
PhoneNumberMatcher::STRICT_GROUPING);
}
TEST_F(PhoneNumberMatcherTest, NonMatchesWithStrictGroupingLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kImpossibleCases,
kImpossibleCases + arraysize(kImpossibleCases));
test_cases.insert(test_cases.begin(), kPossibleOnlyCases,
kPossibleOnlyCases + arraysize(kPossibleOnlyCases));
test_cases.insert(test_cases.begin(), kValidCases,
kValidCases + arraysize(kValidCases));
DoTestNumberNonMatchesForLeniency(test_cases,
PhoneNumberMatcher::STRICT_GROUPING);
}
TEST_F(PhoneNumberMatcherTest, MatchesWithExactGroupingLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kExactGroupingCases,
kExactGroupingCases + arraysize(kExactGroupingCases));
DoTestNumberMatchesForLeniency(test_cases,
PhoneNumberMatcher::EXACT_GROUPING);
}
TEST_F(PhoneNumberMatcherTest, NonMatchesWithExactGroupingLeniency) {
std::vector<NumberTest> test_cases;
test_cases.insert(test_cases.begin(), kImpossibleCases,
kImpossibleCases + arraysize(kImpossibleCases));
test_cases.insert(test_cases.begin(), kPossibleOnlyCases,
kPossibleOnlyCases + arraysize(kPossibleOnlyCases));
test_cases.insert(test_cases.begin(), kValidCases,
kValidCases + arraysize(kValidCases));
test_cases.insert(
test_cases.begin(), kStrictGroupingCases,
kStrictGroupingCases + arraysize(kStrictGroupingCases));
DoTestNumberNonMatchesForLeniency(test_cases,
PhoneNumberMatcher::EXACT_GROUPING);
}
TEST_F(PhoneNumberMatcherTest, ExtractMatchIgnoresAmericanDates) {
PhoneNumberMatch match;
string text = "As I said on 03/10/2011, you may call me at ";
EXPECT_FALSE(ExtractMatch(text, &match));
text = "As I said on 03/27/2011, you may call me at ";
EXPECT_FALSE(ExtractMatch(text, &match));
text = "As I said on 31/8/2011, you may call me at ";
EXPECT_FALSE(ExtractMatch(text, &match));
text = "As I said on 1/12/2011, you may call me at ";
EXPECT_FALSE(ExtractMatch(text, &match));
text = "I was born on 10/12/82. Please call me at ";
EXPECT_FALSE(ExtractMatch(text, &match));
}
TEST_F(PhoneNumberMatcherTest, NonMatchingBracketsAreInvalid) {
// The digits up to the ", " form a valid US number, but it shouldn't be
// matched as one since there was a non-matching bracket present.
scoped_ptr<PhoneNumberMatcher> matcher(GetMatcherWithLeniency(
"80.585 [79.964, 81.191]", RegionCode::US(),
PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
// The trailing "]" is thrown away before parsing, so the resultant number,
// while a valid US number, does not have matching brackets.
matcher.reset(GetMatcherWithLeniency(
"80.585 [79.964]", RegionCode::US(), PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
matcher.reset(GetMatcherWithLeniency(
"80.585 ((79.964)", RegionCode::US(), PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
// This case has too many sets of brackets to be valid.
matcher.reset(GetMatcherWithLeniency(
"(80).(585) (79).(9)64", RegionCode::US(), PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, NoMatchIfRegionIsUnknown) {
// Fail on non-international prefix if region code is ZZ.
scoped_ptr<PhoneNumberMatcher> matcher(GetMatcherWithLeniency(
"Random text body - number is 0331 6005, see you there",
RegionCode::ZZ(), PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, NoMatchInEmptyString) {
scoped_ptr<PhoneNumberMatcher> matcher(GetMatcherWithLeniency(
"", RegionCode::US(), PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
matcher.reset(GetMatcherWithLeniency(" ", RegionCode::US(),
PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, NoMatchIfNoNumber) {
scoped_ptr<PhoneNumberMatcher> matcher(GetMatcherWithLeniency(
"Random text body - number is foobar, see you there", RegionCode::US(),
PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, Sequences) {
// Test multiple occurrences.
const string text = "Call 033316005 or 032316005!";
const string& region = RegionCode::NZ();
PhoneNumber number1;
number1.set_country_code(phone_util_.GetCountryCodeForRegion(region));
number1.set_national_number(33316005ULL);
PhoneNumberMatch match1(5, "033316005", number1);
PhoneNumber number2;
number2.set_country_code(phone_util_.GetCountryCodeForRegion(region));
number2.set_national_number(32316005ULL);
PhoneNumberMatch match2(19, "032316005", number2);
PhoneNumberMatcher matcher(
phone_util_, text, region, PhoneNumberMatcher::POSSIBLE, 100);
PhoneNumberMatch actual_match1;
PhoneNumberMatch actual_match2;
matcher.Next(&actual_match1);
matcher.Next(&actual_match2);
EXPECT_TRUE(match1.Equals(actual_match1));
EXPECT_TRUE(match2.Equals(actual_match2));
}
TEST_F(PhoneNumberMatcherTest, MaxMatches) {
// Set up text with 100 valid phone numbers.
string numbers;
for (int i = 0; i < 100; ++i) {
numbers.append("My info: 415-666-7777,");
}
// Matches all 100. Max only applies to failed cases.
PhoneNumber number;
phone_util_.Parse("+14156667777", RegionCode::US(), &number);
std::vector<PhoneNumber> expected(100, number);
PhoneNumberMatcher matcher(
phone_util_, numbers, RegionCode::US(), PhoneNumberMatcher::VALID, 10);
std::vector<PhoneNumber> actual;
PhoneNumberMatch match;
while (matcher.HasNext()) {
matcher.Next(&match);
actual.push_back(match.number());
}
EXPECT_EQ(expected, actual);
}
TEST_F(PhoneNumberMatcherTest, MaxMatchesInvalid) {
// Set up text with 10 invalid phone numbers followed by 100 valid.
string numbers;
for (int i = 0; i < 10; ++i) {
numbers.append("My address 949-8945-0");
}
for (int i = 0; i < 100; ++i) {
numbers.append("My info: 415-666-7777,");
}
PhoneNumberMatcher matcher(
phone_util_, numbers, RegionCode::US(), PhoneNumberMatcher::VALID, 10);
EXPECT_FALSE(matcher.HasNext());
}
TEST_F(PhoneNumberMatcherTest, MaxMatchesMixed) {
// Set up text with 100 valid numbers inside an invalid number.
string numbers;
for (int i = 0; i < 100; ++i) {
numbers.append("My info: 415-666-7777 123 fake street");
}
PhoneNumber number;
phone_util_.Parse("+14156667777", RegionCode::ZZ(), &number);
std::vector<PhoneNumber> expected(10, number);
PhoneNumberMatcher matcher(
phone_util_, numbers, RegionCode::US(), PhoneNumberMatcher::VALID, 10);
std::vector<PhoneNumber> actual;
PhoneNumberMatch match;
while (matcher.HasNext()) {
matcher.Next(&match);
actual.push_back(match.number());
}
EXPECT_EQ(expected, actual);
}
TEST_F(PhoneNumberMatcherTest, NonPlusPrefixedNumbersNotFoundForInvalidRegion) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("1 456 764 156", RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
EXPECT_FALSE(matcher->Next(&match));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, EmptyIteration) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("", RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
EXPECT_FALSE(matcher->HasNext());
EXPECT_FALSE(matcher->HasNext());
EXPECT_FALSE(matcher->Next(&match));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, SingleIteration) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("+14156667777", RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
// Try HasNext() twice to ensure it does not advance.
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->Next(&match));
EXPECT_FALSE(matcher->HasNext());
EXPECT_FALSE(matcher->Next(&match));
}
TEST_F(PhoneNumberMatcherTest, SingleIteration_WithNextOnly) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("+14156667777", RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
EXPECT_TRUE(matcher->Next(&match));
EXPECT_FALSE(matcher->Next(&match));
}
TEST_F(PhoneNumberMatcherTest, DoubleIteration) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("+14156667777 foobar +14156667777 ",
RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
// Double HasNext() to ensure it does not advance.
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->Next(&match));
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->HasNext());
EXPECT_TRUE(matcher->Next(&match));
EXPECT_FALSE(matcher->HasNext());
EXPECT_FALSE(matcher->Next(&match));
EXPECT_FALSE(matcher->HasNext());
}
TEST_F(PhoneNumberMatcherTest, DoubleIteration_WithNextOnly) {
PhoneNumberMatch match;
scoped_ptr<PhoneNumberMatcher> matcher(
GetMatcherWithLeniency("+14156667777 foobar +14156667777 ",
RegionCode::GetUnknown(),
PhoneNumberMatcher::VALID));
EXPECT_TRUE(matcher->Next(&match));
EXPECT_TRUE(matcher->Next(&match));
EXPECT_FALSE(matcher->Next(&match));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/phonenumbermatcher_test.cc
|
C++
|
unknown
| 52,662
|
// Copyright (C) 2009 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Shaopeng Jia
// Author: Lara Rennie
// Open-sourced by: Philippe Liard
//
// Note that these tests use the metadata contained in the test metadata file,
// not the normal metadata file, so should not be used for regression test
// purposes - these tests are illustrative only and test functionality.
#include "phonenumbers/phonenumberutil.h"
#include <algorithm>
#include <iostream>
#include <list>
#include <set>
#include <string>
#include <gtest/gtest.h>
#include "phonenumbers/default_logger.h"
#include "phonenumbers/phonemetadata.pb.h"
#include "phonenumbers/phonenumber.h"
#include "phonenumbers/phonenumber.pb.h"
#include "phonenumbers/test_util.h"
namespace i18n {
namespace phonenumbers {
using std::find;
using std::ostream;
using google::protobuf::RepeatedPtrField;
static const int kInvalidCountryCode = 2;
class PhoneNumberUtilTest : public testing::Test {
protected:
PhoneNumberUtilTest() : phone_util_(*PhoneNumberUtil::GetInstance()) {
PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
}
// Wrapper functions for private functions that we want to test.
const PhoneMetadata* GetPhoneMetadata(const string& region_code) const {
return phone_util_.GetMetadataForRegion(region_code);
}
const PhoneMetadata* GetMetadataForNonGeographicalRegion(
int country_code) const {
return phone_util_.GetMetadataForNonGeographicalRegion(country_code);
}
void ExtractPossibleNumber(const string& number,
string* extracted_number) const {
phone_util_.ExtractPossibleNumber(number, extracted_number);
}
bool IsViablePhoneNumber(const string& number) const {
return phone_util_.IsViablePhoneNumber(number);
}
void Normalize(string* number) const {
phone_util_.Normalize(number);
}
PhoneNumber::CountryCodeSource MaybeStripInternationalPrefixAndNormalize(
const string& possible_idd_prefix,
string* number) const {
return phone_util_.MaybeStripInternationalPrefixAndNormalize(
possible_idd_prefix,
number);
}
void MaybeStripNationalPrefixAndCarrierCode(const PhoneMetadata& metadata,
string* number,
string* carrier_code) const {
phone_util_.MaybeStripNationalPrefixAndCarrierCode(metadata, number,
carrier_code);
}
bool MaybeStripExtension(string* number, string* extension) const {
return phone_util_.MaybeStripExtension(number, extension);
}
PhoneNumberUtil::ErrorType MaybeExtractCountryCode(
const PhoneMetadata* default_region_metadata,
bool keep_raw_input,
string* national_number,
PhoneNumber* phone_number) const {
return phone_util_.MaybeExtractCountryCode(default_region_metadata,
keep_raw_input,
national_number,
phone_number);
}
bool ContainsOnlyValidDigits(const string& s) const {
return phone_util_.ContainsOnlyValidDigits(s);
}
const PhoneNumberUtil& phone_util_;
private:
DISALLOW_COPY_AND_ASSIGN(PhoneNumberUtilTest);
};
TEST_F(PhoneNumberUtilTest, ContainsOnlyValidDigits) {
EXPECT_TRUE(ContainsOnlyValidDigits(""));
EXPECT_TRUE(ContainsOnlyValidDigits("2"));
EXPECT_TRUE(ContainsOnlyValidDigits("25"));
EXPECT_TRUE(ContainsOnlyValidDigits("\xEF\xBC\x96" /* "6" */));
EXPECT_FALSE(ContainsOnlyValidDigits("a"));
EXPECT_FALSE(ContainsOnlyValidDigits("2a"));
}
TEST_F(PhoneNumberUtilTest, GetSupportedRegions) {
std::set<string> regions;
phone_util_.GetSupportedRegions(®ions);
EXPECT_GT(regions.size(), 0U);
}
TEST_F(PhoneNumberUtilTest, GetSupportedGlobalNetworkCallingCodes) {
std::set<int> calling_codes;
phone_util_.GetSupportedGlobalNetworkCallingCodes(&calling_codes);
EXPECT_GT(calling_codes.size(), 0U);
for (std::set<int>::const_iterator it = calling_codes.begin();
it != calling_codes.end(); ++it) {
EXPECT_GT(*it, 0);
string region_code;
phone_util_.GetRegionCodeForCountryCode(*it, ®ion_code);
EXPECT_EQ(RegionCode::UN001(), region_code);
}
}
TEST_F(PhoneNumberUtilTest, GetSupportedCallingCodes) {
std::set<int> calling_codes;
phone_util_.GetSupportedCallingCodes(&calling_codes);
EXPECT_GT(calling_codes.size(), 0U);
for (std::set<int>::const_iterator it = calling_codes.begin();
it != calling_codes.end(); ++it) {
EXPECT_GT(*it, 0);
string region_code;
phone_util_.GetRegionCodeForCountryCode(*it, ®ion_code);
EXPECT_NE(RegionCode::ZZ(), region_code);
}
std::set<int> supported_global_network_calling_codes;
phone_util_.GetSupportedGlobalNetworkCallingCodes(
&supported_global_network_calling_codes);
// There should be more than just the global network calling codes in this
// set.
EXPECT_GT(calling_codes.size(),
supported_global_network_calling_codes.size());
// But they should be included. Testing one of them.
EXPECT_NE(calling_codes.find(979), calling_codes.end());
}
TEST_F(PhoneNumberUtilTest, GetSupportedTypesForRegion) {
std::set<PhoneNumberUtil::PhoneNumberType> types;
phone_util_.GetSupportedTypesForRegion(RegionCode::BR(), &types);
EXPECT_NE(types.find(PhoneNumberUtil::FIXED_LINE), types.end());
// Our test data has no mobile numbers for Brazil.
EXPECT_EQ(types.find(PhoneNumberUtil::MOBILE), types.end());
// UNKNOWN should never be returned.
EXPECT_EQ(types.find(PhoneNumberUtil::UNKNOWN), types.end());
types.clear();
// In the US, many numbers are classified as FIXED_LINE_OR_MOBILE; but we
// don't want to expose this as a supported type, instead we say FIXED_LINE
// and MOBILE are both present.
phone_util_.GetSupportedTypesForRegion(RegionCode::US(), &types);
EXPECT_NE(types.find(PhoneNumberUtil::FIXED_LINE), types.end());
EXPECT_NE(types.find(PhoneNumberUtil::MOBILE), types.end());
EXPECT_EQ(types.find(PhoneNumberUtil::FIXED_LINE_OR_MOBILE), types.end());
types.clear();
phone_util_.GetSupportedTypesForRegion(RegionCode::ZZ(), &types);
// Test the invalid region code.
EXPECT_EQ(0u, types.size());
}
TEST_F(PhoneNumberUtilTest, GetSupportedTypesForNonGeoEntity) {
std::set<PhoneNumberUtil::PhoneNumberType> types;
// No data exists for 999 at all, no types should be returned.
phone_util_.GetSupportedTypesForNonGeoEntity(999, &types);
EXPECT_EQ(0u, types.size());
types.clear();
phone_util_.GetSupportedTypesForNonGeoEntity(979, &types);
EXPECT_NE(types.find(PhoneNumberUtil::PREMIUM_RATE), types.end());
EXPECT_EQ(types.find(PhoneNumberUtil::MOBILE), types.end());
EXPECT_EQ(types.find(PhoneNumberUtil::UNKNOWN), types.end());
}
TEST_F(PhoneNumberUtilTest, GetRegionCodesForCountryCallingCode) {
std::list<string> regions;
phone_util_.GetRegionCodesForCountryCallingCode(1, ®ions);
EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::US())
!= regions.end());
EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::BS())
!= regions.end());
regions.clear();
phone_util_.GetRegionCodesForCountryCallingCode(44, ®ions);
EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::GB())
!= regions.end());
regions.clear();
phone_util_.GetRegionCodesForCountryCallingCode(49, ®ions);
EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::DE())
!= regions.end());
regions.clear();
phone_util_.GetRegionCodesForCountryCallingCode(800, ®ions);
EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::UN001())
!= regions.end());
regions.clear();
phone_util_.GetRegionCodesForCountryCallingCode(
kInvalidCountryCode, ®ions);
EXPECT_TRUE(regions.empty());
}
TEST_F(PhoneNumberUtilTest, GetInstanceLoadUSMetadata) {
const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::US());
EXPECT_EQ("US", metadata->id());
EXPECT_EQ(1, metadata->country_code());
EXPECT_EQ("011", metadata->international_prefix());
EXPECT_TRUE(metadata->has_national_prefix());
ASSERT_EQ(2, metadata->number_format_size());
EXPECT_EQ("(\\d{3})(\\d{3})(\\d{4})",
metadata->number_format(1).pattern());
EXPECT_EQ("$1 $2 $3", metadata->number_format(1).format());
EXPECT_EQ("[13-689]\\d{9}|2[0-35-9]\\d{8}",
metadata->general_desc().national_number_pattern());
EXPECT_EQ("[13-689]\\d{9}|2[0-35-9]\\d{8}",
metadata->fixed_line().national_number_pattern());
EXPECT_EQ(1, metadata->general_desc().possible_length_size());
EXPECT_EQ(10, metadata->general_desc().possible_length(0));
// Possible lengths are the same as the general description, so aren't stored
// separately in the toll free element as well.
EXPECT_EQ(0, metadata->toll_free().possible_length_size());
EXPECT_EQ("900\\d{7}", metadata->premium_rate().national_number_pattern());
// No shared-cost data is available, so its national number data should not be
// set.
EXPECT_FALSE(metadata->shared_cost().has_national_number_pattern());
}
TEST_F(PhoneNumberUtilTest, GetInstanceLoadDEMetadata) {
const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::DE());
EXPECT_EQ("DE", metadata->id());
EXPECT_EQ(49, metadata->country_code());
EXPECT_EQ("00", metadata->international_prefix());
EXPECT_EQ("0", metadata->national_prefix());
ASSERT_EQ(6, metadata->number_format_size());
EXPECT_EQ(1, metadata->number_format(5).leading_digits_pattern_size());
EXPECT_EQ("900", metadata->number_format(5).leading_digits_pattern(0));
EXPECT_EQ("(\\d{3})(\\d{3,4})(\\d{4})",
metadata->number_format(5).pattern());
EXPECT_EQ(2, metadata->general_desc().possible_length_local_only_size());
EXPECT_EQ(8, metadata->general_desc().possible_length_size());
// Nothing is present for fixed-line, since it is the same as the general
// desc, so for efficiency reasons we don't store an extra value.
EXPECT_EQ(0, metadata->fixed_line().possible_length_size());
EXPECT_EQ(2, metadata->mobile().possible_length_size());
EXPECT_EQ("$1 $2 $3", metadata->number_format(5).format());
EXPECT_EQ("(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:0[2-9]|[1-9]\\d))\\d{1,8}",
metadata->fixed_line().national_number_pattern());
EXPECT_EQ("30123456", metadata->fixed_line().example_number());
EXPECT_EQ(10, metadata->toll_free().possible_length(0));
EXPECT_EQ("900([135]\\d{6}|9\\d{7})",
metadata->premium_rate().national_number_pattern());
}
TEST_F(PhoneNumberUtilTest, GetInstanceLoadARMetadata) {
const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::AR());
EXPECT_EQ("AR", metadata->id());
EXPECT_EQ(54, metadata->country_code());
EXPECT_EQ("00", metadata->international_prefix());
EXPECT_EQ("0", metadata->national_prefix());
EXPECT_EQ("0(?:(11|343|3715)15)?", metadata->national_prefix_for_parsing());
EXPECT_EQ("9$1", metadata->national_prefix_transform_rule());
ASSERT_EQ(5, metadata->number_format_size());
EXPECT_EQ("$2 15 $3-$4", metadata->number_format(2).format());
EXPECT_EQ("(\\d)(\\d{4})(\\d{2})(\\d{4})",
metadata->number_format(3).pattern());
EXPECT_EQ("(\\d)(\\d{4})(\\d{2})(\\d{4})",
metadata->intl_number_format(3).pattern());
EXPECT_EQ("$1 $2 $3 $4", metadata->intl_number_format(3).format());
}
TEST_F(PhoneNumberUtilTest, GetInstanceLoadInternationalTollFreeMetadata) {
const PhoneMetadata* metadata = GetMetadataForNonGeographicalRegion(800);
EXPECT_FALSE(metadata == NULL);
EXPECT_EQ("001", metadata->id());
EXPECT_EQ(800, metadata->country_code());
EXPECT_EQ("$1 $2", metadata->number_format(0).format());
EXPECT_EQ("(\\d{4})(\\d{4})", metadata->number_format(0).pattern());
EXPECT_EQ(0, metadata->general_desc().possible_length_local_only_size());
EXPECT_EQ(1, metadata->general_desc().possible_length_size());
EXPECT_EQ("12345678", metadata->toll_free().example_number());
}
TEST_F(PhoneNumberUtilTest, GetNationalSignificantNumber) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(6502530000ULL);
string national_significant_number;
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("6502530000", national_significant_number);
// An Italian mobile number.
national_significant_number.clear();
number.set_country_code(39);
number.set_national_number(312345678ULL);
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("312345678", national_significant_number);
// An Italian fixed line number.
national_significant_number.clear();
number.set_country_code(39);
number.set_national_number(236618300ULL);
number.set_italian_leading_zero(true);
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("0236618300", national_significant_number);
national_significant_number.clear();
number.Clear();
number.set_country_code(800);
number.set_national_number(12345678ULL);
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("12345678", national_significant_number);
}
TEST_F(PhoneNumberUtilTest, GetNationalSignificantNumber_ManyLeadingZeros) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(650ULL);
number.set_italian_leading_zero(true);
number.set_number_of_leading_zeros(2);
string national_significant_number;
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("00650", national_significant_number);
// Set a bad value; we shouldn't crash, we shouldn't output any leading zeros
// at all.
number.set_number_of_leading_zeros(-3);
national_significant_number.clear();
phone_util_.GetNationalSignificantNumber(number,
&national_significant_number);
EXPECT_EQ("650", national_significant_number);
}
TEST_F(PhoneNumberUtilTest, GetExampleNumber) {
PhoneNumber de_number;
de_number.set_country_code(49);
de_number.set_national_number(30123456ULL);
PhoneNumber test_number;
bool success = phone_util_.GetExampleNumber(RegionCode::DE(), &test_number);
EXPECT_TRUE(success);
EXPECT_EQ(de_number, test_number);
success = phone_util_.GetExampleNumberForType(
RegionCode::DE(), PhoneNumberUtil::FIXED_LINE, &test_number);
EXPECT_TRUE(success);
EXPECT_EQ(de_number, test_number);
// Should return the same response if asked for FIXED_LINE_OR_MOBILE too.
success = phone_util_.GetExampleNumberForType(
RegionCode::DE(), PhoneNumberUtil::FIXED_LINE_OR_MOBILE, &test_number);
EXPECT_EQ(de_number, test_number);
success = phone_util_.GetExampleNumberForType(
RegionCode::DE(), PhoneNumberUtil::MOBILE, &test_number);
// We have data for the US, but no data for VOICEMAIL, so the number passed in
// should be left empty.
success = phone_util_.GetExampleNumberForType(
RegionCode::US(), PhoneNumberUtil::VOICEMAIL, &test_number);
test_number.Clear();
EXPECT_FALSE(success);
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
success = phone_util_.GetExampleNumberForType(
RegionCode::US(), PhoneNumberUtil::FIXED_LINE, &test_number);
// Here we test that the call to get an example number succeeded, and that the
// number passed in was modified.
EXPECT_TRUE(success);
EXPECT_NE(PhoneNumber::default_instance(), test_number);
success = phone_util_.GetExampleNumberForType(
RegionCode::US(), PhoneNumberUtil::MOBILE, &test_number);
EXPECT_TRUE(success);
EXPECT_NE(PhoneNumber::default_instance(), test_number);
// CS is an invalid region, so we have no data for it. We should return false.
test_number.Clear();
EXPECT_FALSE(phone_util_.GetExampleNumberForType(
RegionCode::CS(), PhoneNumberUtil::MOBILE, &test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
// RegionCode 001 is reserved for supporting non-geographical country calling
// code. We don't support getting an example number for it with this method.
EXPECT_FALSE(phone_util_.GetExampleNumber(RegionCode::UN001(), &test_number));
}
TEST_F(PhoneNumberUtilTest, GetInvalidExampleNumber) {
// RegionCode 001 is reserved for supporting non-geographical country calling
// codes. We don't support getting an invalid example number for it with
// GetInvalidExampleNumber.
PhoneNumber test_number;
EXPECT_FALSE(phone_util_.GetInvalidExampleNumber(RegionCode::UN001(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_FALSE(phone_util_.GetInvalidExampleNumber(RegionCode::CS(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_TRUE(phone_util_.GetInvalidExampleNumber(RegionCode::US(),
&test_number));
// At least the country calling code should be set correctly.
EXPECT_EQ(1, test_number.country_code());
EXPECT_NE(0u, test_number.national_number());
}
TEST_F(PhoneNumberUtilTest, GetExampleNumberForNonGeoEntity) {
PhoneNumber toll_free_number;
toll_free_number.set_country_code(800);
toll_free_number.set_national_number(12345678ULL);
PhoneNumber test_number;
bool success =
phone_util_.GetExampleNumberForNonGeoEntity(800 , &test_number);
EXPECT_TRUE(success);
EXPECT_EQ(toll_free_number, test_number);
PhoneNumber universal_premium_rate;
universal_premium_rate.set_country_code(979);
universal_premium_rate.set_national_number(123456789ULL);
success = phone_util_.GetExampleNumberForNonGeoEntity(979 , &test_number);
EXPECT_TRUE(success);
EXPECT_EQ(universal_premium_rate, test_number);
}
TEST_F(PhoneNumberUtilTest, GetExampleNumberWithoutRegion) {
// In our test metadata we don't cover all types: in our real metadata, we do.
PhoneNumber test_number;
bool success = phone_util_.GetExampleNumberForType(
PhoneNumberUtil::FIXED_LINE,
&test_number);
// We test that the call to get an example number succeeded, and that the
// number passed in was modified.
EXPECT_TRUE(success);
EXPECT_NE(PhoneNumber::default_instance(), test_number);
test_number.Clear();
success = phone_util_.GetExampleNumberForType(PhoneNumberUtil::MOBILE,
&test_number);
EXPECT_TRUE(success);
EXPECT_NE(PhoneNumber::default_instance(), test_number);
test_number.Clear();
success = phone_util_.GetExampleNumberForType(PhoneNumberUtil::PREMIUM_RATE,
&test_number);
EXPECT_TRUE(success);
EXPECT_NE(PhoneNumber::default_instance(), test_number);
}
TEST_F(PhoneNumberUtilTest, FormatUSNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(6502530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("650 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 650 253 0000", formatted_number);
test_number.set_national_number(8002530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("800 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 800 253 0000", formatted_number);
test_number.set_national_number(9002530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("900 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 900 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::RFC3966, &formatted_number);
EXPECT_EQ("tel:+1-900-253-0000", formatted_number);
test_number.set_national_number(0ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("0", formatted_number);
// Numbers with all zeros in the national number part will be formatted by
// using the raw_input if that is available no matter which format is
// specified.
test_number.set_raw_input("000-000-0000");
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("000-000-0000", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatBSNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(2421234567ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("242 123 4567", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 242 123 4567", formatted_number);
test_number.set_national_number(8002530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("800 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 800 253 0000", formatted_number);
test_number.set_national_number(9002530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("900 253 0000", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+1 900 253 0000", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatGBNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(44);
test_number.set_national_number(2087389353ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("(020) 8738 9353", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+44 20 8738 9353", formatted_number);
test_number.set_national_number(7912345678ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("(07912) 345 678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+44 7912 345 678", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatDENumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(49);
test_number.set_national_number(301234ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("030/1234", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 30/1234", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::RFC3966, &formatted_number);
EXPECT_EQ("tel:+49-30-1234", formatted_number);
test_number.set_national_number(291123ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("0291 123", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 291 123", formatted_number);
test_number.set_national_number(29112345678ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("0291 12345678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 291 12345678", formatted_number);
test_number.set_national_number(9123123ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("09123 123", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 9123 123", formatted_number);
test_number.set_national_number(80212345ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("08021 2345", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 8021 2345", formatted_number);
test_number.set_national_number(1234ULL);
// Note this number is correctly formatted without national prefix. Most of
// the numbers that are treated as invalid numbers by the library are short
// numbers, and they are usually not dialed with national prefix.
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("1234", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+49 1234", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatITNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(39);
test_number.set_national_number(236618300ULL);
test_number.set_italian_leading_zero(true);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("02 3661 8300", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+39 02 3661 8300", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+390236618300", formatted_number);
test_number.set_national_number(345678901ULL);
test_number.set_italian_leading_zero(false);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("345 678 901", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+39 345 678 901", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+39345678901", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatAUNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(61);
test_number.set_national_number(236618300ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("02 3661 8300", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+61 2 3661 8300", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+61236618300", formatted_number);
test_number.set_national_number(1800123456ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("1800 123 456", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+61 1800 123 456", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+611800123456", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatARNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(54);
test_number.set_national_number(1187654321ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("011 8765-4321", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+54 11 8765-4321", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+541187654321", formatted_number);
test_number.set_national_number(91187654321ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("011 15 8765-4321", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+54 9 11 8765 4321", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+5491187654321", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatMXNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(52);
test_number.set_national_number(12345678900ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("045 234 567 8900", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+52 1 234 567 8900", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+5212345678900", formatted_number);
test_number.set_national_number(15512345678ULL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("045 55 1234 5678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+52 1 55 1234 5678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+5215512345678", formatted_number);
test_number.set_national_number(3312345678LL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("01 33 1234 5678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+52 33 1234 5678", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+523312345678", formatted_number);
test_number.set_national_number(8211234567LL);
phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("01 821 123 4567", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+52 821 123 4567", formatted_number);
phone_util_.Format(test_number, PhoneNumberUtil::E164,
&formatted_number);
EXPECT_EQ("+528211234567", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatOutOfCountryCallingNumber) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(9002530000ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::DE(),
&formatted_number);
EXPECT_EQ("00 1 900 253 0000", formatted_number);
test_number.set_national_number(6502530000ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::BS(),
&formatted_number);
EXPECT_EQ("1 650 253 0000", formatted_number);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::PL(),
&formatted_number);
EXPECT_EQ("00 1 650 253 0000", formatted_number);
test_number.set_country_code(44);
test_number.set_national_number(7912345678ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 44 7912 345 678", formatted_number);
test_number.set_country_code(49);
test_number.set_national_number(1234ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("00 49 1234", formatted_number);
// Note this number is correctly formatted without national prefix. Most of
// the numbers that are treated as invalid numbers by the library are short
// numbers, and they are usually not dialed with national prefix.
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::DE(),
&formatted_number);
EXPECT_EQ("1234", formatted_number);
test_number.set_country_code(39);
test_number.set_national_number(236618300ULL);
test_number.set_italian_leading_zero(true);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 39 02 3661 8300", formatted_number);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::IT(),
&formatted_number);
EXPECT_EQ("02 3661 8300", formatted_number);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::SG(),
&formatted_number);
EXPECT_EQ("+39 02 3661 8300", formatted_number);
test_number.set_country_code(65);
test_number.set_national_number(94777892ULL);
test_number.set_italian_leading_zero(false);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::SG(),
&formatted_number);
EXPECT_EQ("9477 7892", formatted_number);
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 800 1234 5678", formatted_number);
test_number.set_country_code(54);
test_number.set_national_number(91187654321ULL);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 54 9 11 8765 4321", formatted_number);
test_number.set_extension("1234");
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 54 9 11 8765 4321 ext. 1234", formatted_number);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 54 9 11 8765 4321 ext. 1234", formatted_number);
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AR(),
&formatted_number);
EXPECT_EQ("011 15 8765-4321 ext. 1234", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatOutOfCountryWithInvalidRegion) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(6502530000ULL);
// AQ/Antarctica isn't a valid region code for phone number formatting,
// so this falls back to intl formatting.
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AQ(),
&formatted_number);
EXPECT_EQ("+1 650 253 0000", formatted_number);
// For region code 001, the out-of-country format always turns into the
// international format.
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::UN001(),
&formatted_number);
EXPECT_EQ("+1 650 253 0000", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatOutOfCountryWithPreferredIntlPrefix) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(39);
test_number.set_national_number(236618300ULL);
test_number.set_italian_leading_zero(true);
// This should use 0011, since that is the preferred international prefix
// (both 0011 and 0012 are accepted as possible international prefixes in our
// test metadta.)
phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 39 02 3661 8300", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatOutOfCountryKeepingAlphaChars) {
PhoneNumber alpha_numeric_number;
string formatted_number;
alpha_numeric_number.set_country_code(1);
alpha_numeric_number.set_national_number(8007493524ULL);
alpha_numeric_number.set_raw_input("1800 six-flag");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
formatted_number.clear();
alpha_numeric_number.set_raw_input("1-800-SIX-flag");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 1 800-SIX-FLAG", formatted_number);
formatted_number.clear();
alpha_numeric_number.set_raw_input("Call us from UK: 00 1 800 SIX-flag");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
formatted_number.clear();
alpha_numeric_number.set_raw_input("800 SIX-flag");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
// Formatting from within the NANPA region.
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::US(),
&formatted_number);
EXPECT_EQ("1 800 SIX-FLAG", formatted_number);
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::BS(),
&formatted_number);
EXPECT_EQ("1 800 SIX-FLAG", formatted_number);
// Testing that if the raw input doesn't exist, it is formatted using
// FormatOutOfCountryCallingNumber.
alpha_numeric_number.clear_raw_input();
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::DE(),
&formatted_number);
EXPECT_EQ("00 1 800 749 3524", formatted_number);
// Testing AU alpha number formatted from Australia.
alpha_numeric_number.set_country_code(61);
alpha_numeric_number.set_national_number(827493524ULL);
alpha_numeric_number.set_raw_input("+61 82749-FLAG");
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
// This number should have the national prefix prefixed.
EXPECT_EQ("082749-FLAG", formatted_number);
alpha_numeric_number.set_raw_input("082749-FLAG");
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("082749-FLAG", formatted_number);
alpha_numeric_number.set_national_number(18007493524ULL);
alpha_numeric_number.set_raw_input("1-800-SIX-flag");
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
// This number should not have the national prefix prefixed, in accordance
// with the override for this specific formatting rule.
EXPECT_EQ("1-800-SIX-FLAG", formatted_number);
// The metadata should not be permanently changed, since we copied it before
// modifying patterns. Here we check this.
formatted_number.clear();
alpha_numeric_number.set_national_number(1800749352ULL);
phone_util_.FormatOutOfCountryCallingNumber(alpha_numeric_number,
RegionCode::AU(),
&formatted_number);
EXPECT_EQ("1800 749 352", formatted_number);
// Testing a country with multiple international prefixes.
formatted_number.clear();
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::SG(),
&formatted_number);
EXPECT_EQ("+61 1-800-SIX-FLAG", formatted_number);
// Testing the case of calling from a non-supported region.
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AQ(),
&formatted_number);
EXPECT_EQ("+61 1-800-SIX-FLAG", formatted_number);
// Testing the case with an invalid country code.
formatted_number.clear();
alpha_numeric_number.set_country_code(0);
alpha_numeric_number.set_national_number(18007493524ULL);
alpha_numeric_number.set_raw_input("1-800-SIX-flag");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::DE(),
&formatted_number);
// Uses the raw input only.
EXPECT_EQ("1-800-SIX-flag", formatted_number);
// Testing the case of an invalid alpha number.
formatted_number.clear();
alpha_numeric_number.set_country_code(1);
alpha_numeric_number.set_national_number(80749ULL);
alpha_numeric_number.set_raw_input("180-SIX");
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::DE(),
&formatted_number);
// No country-code stripping can be done.
EXPECT_EQ("00 1 180-SIX", formatted_number);
// Testing the case of calling from a non-supported region.
phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
RegionCode::AQ(),
&formatted_number);
// No country-code stripping can be done since the number is invalid.
EXPECT_EQ("+1 180-SIX", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatWithCarrierCode) {
// We only support this for AR in our test metadata.
PhoneNumber ar_number;
string formatted_number;
ar_number.set_country_code(54);
ar_number.set_national_number(91234125678ULL);
phone_util_.Format(ar_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("01234 12-5678", formatted_number);
// Test formatting with a carrier code.
phone_util_.FormatNationalNumberWithCarrierCode(ar_number, "15",
&formatted_number);
EXPECT_EQ("01234 15 12-5678", formatted_number);
phone_util_.FormatNationalNumberWithCarrierCode(ar_number, "",
&formatted_number);
EXPECT_EQ("01234 12-5678", formatted_number);
// Here the international rule is used, so no carrier code should be present.
phone_util_.Format(ar_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+5491234125678", formatted_number);
// We don't support this for the US so there should be no change.
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(4241231234ULL);
phone_util_.Format(us_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("424 123 1234", formatted_number);
phone_util_.FormatNationalNumberWithCarrierCode(us_number, "15",
&formatted_number);
EXPECT_EQ("424 123 1234", formatted_number);
// Invalid country code should just get the NSN.
PhoneNumber invalid_number;
invalid_number.set_country_code(kInvalidCountryCode);
invalid_number.set_national_number(12345ULL);
phone_util_.FormatNationalNumberWithCarrierCode(invalid_number, "89",
&formatted_number);
EXPECT_EQ("12345", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatWithPreferredCarrierCode) {
// We only support this for AR in our test metadata.
PhoneNumber ar_number;
string formatted_number;
ar_number.set_country_code(54);
ar_number.set_national_number(91234125678ULL);
// Test formatting with no preferred carrier code stored in the number itself.
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
&formatted_number);
EXPECT_EQ("01234 15 12-5678", formatted_number);
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "",
&formatted_number);
EXPECT_EQ("01234 12-5678", formatted_number);
// Test formatting with preferred carrier code present.
ar_number.set_preferred_domestic_carrier_code("19");
phone_util_.Format(ar_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("01234 12-5678", formatted_number);
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
&formatted_number);
EXPECT_EQ("01234 19 12-5678", formatted_number);
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "",
&formatted_number);
EXPECT_EQ("01234 19 12-5678", formatted_number);
// When the preferred_domestic_carrier_code is present (even when it is just a
// space), use it instead of the default carrier code passed in.
ar_number.set_preferred_domestic_carrier_code(" ");
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
&formatted_number);
EXPECT_EQ("01234 12-5678", formatted_number);
// When the preferred_domestic_carrier_code is present but empty, treat it as
// unset and use instead the default carrier code passed in.
ar_number.set_preferred_domestic_carrier_code("");
phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
&formatted_number);
EXPECT_EQ("01234 15 12-5678", formatted_number);
// We don't support this for the US so there should be no change.
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(4241231234ULL);
us_number.set_preferred_domestic_carrier_code("99");
phone_util_.Format(us_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("424 123 1234", formatted_number);
phone_util_.FormatNationalNumberWithPreferredCarrierCode(us_number, "15",
&formatted_number);
EXPECT_EQ("424 123 1234", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatNumberForMobileDialing) {
PhoneNumber test_number;
string formatted_number;
// Numbers are normally dialed in national format in-country, and
// international format from outside the country.
test_number.set_country_code(49);
test_number.set_national_number(30123456ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::DE(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("030123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CH(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("+4930123456", formatted_number);
test_number.set_extension("1234");
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::DE(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("030123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CH(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("+4930123456", formatted_number);
test_number.set_country_code(1);
test_number.clear_extension();
// US toll free numbers are marked as noInternationalDialling in the test
// metadata for testing purposes. For such numbers, we expect nothing to be
// returned when the region code is not the same one.
test_number.set_national_number(8002530000ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), true, /* keep formatting */
&formatted_number);
EXPECT_EQ("800 253 0000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CN(), true, &formatted_number);
EXPECT_EQ("", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, /* remove formatting */
&formatted_number);
EXPECT_EQ("8002530000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CN(), false, &formatted_number);
EXPECT_EQ("", formatted_number);
test_number.set_national_number(6502530000ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), true, &formatted_number);
EXPECT_EQ("+1 650 253 0000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
test_number.set_extension("1234");
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), true, &formatted_number);
EXPECT_EQ("+1 650 253 0000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
// An invalid US number, which is one digit too long.
test_number.set_national_number(65025300001ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), true, &formatted_number);
EXPECT_EQ("+1 65025300001", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+165025300001", formatted_number);
// Star numbers. In real life they appear in Israel, but we have them in JP
// in our test metadata.
test_number.set_country_code(81);
test_number.set_national_number(2345ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::JP(), true, &formatted_number);
EXPECT_EQ("*2345", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::JP(), false, &formatted_number);
EXPECT_EQ("*2345", formatted_number);
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::JP(), false, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::JP(), true, &formatted_number);
EXPECT_EQ("+800 1234 5678", formatted_number);
// UAE numbers beginning with 600 (classified as UAN) need to be dialled
// without +971 locally.
test_number.set_country_code(971);
test_number.set_national_number(600123456ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::JP(), false, &formatted_number);
EXPECT_EQ("+971600123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::AE(), true, &formatted_number);
EXPECT_EQ("600123456", formatted_number);
test_number.set_country_code(52);
test_number.set_national_number(3312345678ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::MX(), false, &formatted_number);
EXPECT_EQ("+523312345678", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+523312345678", formatted_number);
// Test whether Uzbek phone numbers are returned in international format even
// when dialled from same region or other regions.
// Fixed-line number
test_number.set_country_code(998);
test_number.set_national_number(612201234ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::UZ(), false, &formatted_number);
EXPECT_EQ("+998612201234", formatted_number);
// Mobile number
test_number.set_country_code(998);
test_number.set_national_number(950123456ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::UZ(), false, &formatted_number);
EXPECT_EQ("+998950123456", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+998950123456", formatted_number);
// Non-geographical numbers should always be dialed in international format.
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::UN001(), false, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
// Test that a short number is formatted correctly for mobile dialing within
// the region, and is not diallable from outside the region.
test_number.set_country_code(49);
test_number.set_national_number(123L);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::DE(), false, &formatted_number);
EXPECT_EQ("123", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::IT(), false, &formatted_number);
EXPECT_EQ("", formatted_number);
// Test the special logic for NANPA countries, for which regular length phone
// numbers are always output in international format, but short numbers are
// in national format.
test_number.set_country_code(1);
test_number.set_national_number(6502530000ULL);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CA(), false, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::BR(), false, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
test_number.set_national_number(911L);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::US(), false, &formatted_number);
EXPECT_EQ("911", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::CA(), false, &formatted_number);
EXPECT_EQ("", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::BR(), false, &formatted_number);
EXPECT_EQ("", formatted_number);
// Test that the Australian emergency number 000 is formatted correctly.
test_number.set_country_code(61);
test_number.set_national_number(0L);
test_number.set_italian_leading_zero(true);
test_number.set_number_of_leading_zeros(2);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::AU(), false, &formatted_number);
EXPECT_EQ("000", formatted_number);
phone_util_.FormatNumberForMobileDialing(
test_number, RegionCode::NZ(), false, &formatted_number);
EXPECT_EQ("", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatByPattern) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(6502530000ULL);
RepeatedPtrField<NumberFormat> number_formats;
NumberFormat* number_format = number_formats.Add();
number_format->set_pattern("(\\d{3})(\\d{3})(\\d{4})");
number_format->set_format("($1) $2-$3");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("(650) 253-0000", formatted_number);
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("+1 (650) 253-0000", formatted_number);
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::RFC3966,
number_formats,
&formatted_number);
EXPECT_EQ("tel:+1-650-253-0000", formatted_number);
// $NP is set to '1' for the US. Here we check that for other NANPA countries
// the US rules are followed.
number_format->set_national_prefix_formatting_rule("$NP ($FG)");
number_format->set_format("$1 $2-$3");
test_number.set_country_code(1);
test_number.set_national_number(4168819999ULL);
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("1 (416) 881-9999", formatted_number);
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("+1 416 881-9999", formatted_number);
test_number.set_country_code(39);
test_number.set_national_number(236618300ULL);
test_number.set_italian_leading_zero(true);
number_format->set_pattern("(\\d{2})(\\d{5})(\\d{3})");
number_format->set_format("$1-$2 $3");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("02-36618 300", formatted_number);
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("+39 02-36618 300", formatted_number);
test_number.set_country_code(44);
test_number.set_national_number(2012345678ULL);
test_number.set_italian_leading_zero(false);
number_format->set_national_prefix_formatting_rule("$NP$FG");
number_format->set_pattern("(\\d{2})(\\d{4})(\\d{4})");
number_format->set_format("$1 $2 $3");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("020 1234 5678", formatted_number);
number_format->set_national_prefix_formatting_rule("($NP$FG)");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("(020) 1234 5678", formatted_number);
number_format->set_national_prefix_formatting_rule("");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("20 1234 5678", formatted_number);
number_format->set_national_prefix_formatting_rule("");
phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
number_formats,
&formatted_number);
EXPECT_EQ("+44 20 1234 5678", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatE164Number) {
PhoneNumber test_number;
string formatted_number;
test_number.set_country_code(1);
test_number.set_national_number(6502530000ULL);
phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+16502530000", formatted_number);
test_number.set_country_code(49);
test_number.set_national_number(301234ULL);
phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+49301234", formatted_number);
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+80012345678", formatted_number);
}
TEST_F(PhoneNumberUtilTest, FormatNumberWithExtension) {
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
nz_number.set_extension("1234");
string formatted_number;
// Uses default extension prefix:
phone_util_.Format(nz_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("03-331 6005 ext. 1234", formatted_number);
// Uses RFC 3966 syntax.
phone_util_.Format(nz_number, PhoneNumberUtil::RFC3966, &formatted_number);
EXPECT_EQ("tel:+64-3-331-6005;ext=1234", formatted_number);
// Extension prefix overridden in the territory information for the US:
PhoneNumber us_number_with_extension;
us_number_with_extension.set_country_code(1);
us_number_with_extension.set_national_number(6502530000ULL);
us_number_with_extension.set_extension("4567");
phone_util_.Format(us_number_with_extension,
PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("650 253 0000 extn. 4567", formatted_number);
}
TEST_F(PhoneNumberUtilTest, GetLengthOfGeographicalAreaCode) {
PhoneNumber number;
// Google MTV, which has area code "650".
number.set_country_code(1);
number.set_national_number(6502530000ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfGeographicalAreaCode(number));
// A North America toll-free number, which has no area code.
number.set_country_code(1);
number.set_national_number(8002530000ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
// An invalid US number (1 digit shorter), which has no area code.
number.set_country_code(1);
number.set_national_number(650253000ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
// Google London, which has area code "20".
number.set_country_code(44);
number.set_national_number(2070313000ULL);
EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
// A mobile number in the UK does not have an area code (by default, mobile
// numbers do not, unless they have been added to our list of exceptions).
number.set_country_code(44);
number.set_national_number(7912345678ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
// Google Buenos Aires, which has area code "11".
number.set_country_code(54);
number.set_national_number(1155303000ULL);
EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
// A mobile number in Argentina also has an area code.
number.set_country_code(54);
number.set_national_number(91187654321ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfGeographicalAreaCode(number));
// Google Sydney, which has area code "2".
number.set_country_code(61);
number.set_national_number(293744000ULL);
EXPECT_EQ(1, phone_util_.GetLengthOfGeographicalAreaCode(number));
// Italian numbers - there is no national prefix, but it still has an area
// code.
number.set_country_code(39);
number.set_national_number(236618300ULL);
number.set_italian_leading_zero(true);
EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
// Google Singapore. Singapore has no area code and no national prefix.
number.set_country_code(65);
number.set_national_number(65218000ULL);
number.set_italian_leading_zero(false);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
// An international toll free number, which has no area code.
number.set_country_code(800);
number.set_national_number(12345678ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
// A mobile number from China is geographical, but does not have an area code.
PhoneNumber cn_mobile;
cn_mobile.set_country_code(86);
cn_mobile.set_national_number(18912341234ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(cn_mobile));
}
TEST_F(PhoneNumberUtilTest, GetLengthOfNationalDestinationCode) {
PhoneNumber number;
// Google MTV, which has national destination code (NDC) "650".
number.set_country_code(1);
number.set_national_number(6502530000ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
// A North America toll-free number, which has NDC "800".
number.set_country_code(1);
number.set_national_number(8002530000ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
// Google London, which has NDC "20".
number.set_country_code(44);
number.set_national_number(2070313000ULL);
EXPECT_EQ(2, phone_util_.GetLengthOfNationalDestinationCode(number));
// A UK mobile phone, which has NDC "7912"
number.set_country_code(44);
number.set_national_number(7912345678ULL);
EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
// Google Buenos Aires, which has NDC "11".
number.set_country_code(54);
number.set_national_number(1155303000ULL);
EXPECT_EQ(2, phone_util_.GetLengthOfNationalDestinationCode(number));
// An Argentinian mobile which has NDC "911".
number.set_country_code(54);
number.set_national_number(91187654321ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
// Google Sydney, which has NDC "2".
number.set_country_code(61);
number.set_national_number(293744000ULL);
EXPECT_EQ(1, phone_util_.GetLengthOfNationalDestinationCode(number));
// Google Singapore. Singapore has NDC "6521".
number.set_country_code(65);
number.set_national_number(65218000ULL);
EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
// An invalid US number (1 digit shorter), which has no NDC.
number.set_country_code(1);
number.set_national_number(650253000ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
// A number containing an invalid country code, which shouldn't have any NDC.
number.set_country_code(123);
number.set_national_number(650253000ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
// A number that has only one group of digits after country code when
// formatted in the international format.
number.set_country_code(376);
number.set_national_number(12345ULL);
EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
// The same number above, but with an extension.
number.set_country_code(376);
number.set_national_number(12345ULL);
number.set_extension("321");
EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
// An international toll free number, which has NDC "1234".
number.Clear();
number.set_country_code(800);
number.set_national_number(12345678ULL);
EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
// A mobile number from China is geographical, but does not have an area code:
// however it still can be considered to have a national destination code.
PhoneNumber cn_mobile;
cn_mobile.set_country_code(86);
cn_mobile.set_national_number(18912341234ULL);
EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(cn_mobile));
}
TEST_F(PhoneNumberUtilTest, GetCountryMobileToken) {
int country_calling_code;
string mobile_token;
country_calling_code = phone_util_.GetCountryCodeForRegion(RegionCode::AR());
phone_util_.GetCountryMobileToken(country_calling_code, &mobile_token);
EXPECT_EQ("9", mobile_token);
// Country calling code for Sweden, which has no mobile token.
country_calling_code = phone_util_.GetCountryCodeForRegion(RegionCode::SE());
phone_util_.GetCountryMobileToken(country_calling_code, &mobile_token);
EXPECT_EQ("", mobile_token);
}
TEST_F(PhoneNumberUtilTest, ExtractPossibleNumber) {
// Removes preceding funky punctuation and letters but leaves the rest
// untouched.
string extracted_number;
ExtractPossibleNumber("Tel:0800-345-600", &extracted_number);
EXPECT_EQ("0800-345-600", extracted_number);
ExtractPossibleNumber("Tel:0800 FOR PIZZA", &extracted_number);
EXPECT_EQ("0800 FOR PIZZA", extracted_number);
// Should not remove plus sign.
ExtractPossibleNumber("Tel:+800-345-600", &extracted_number);
EXPECT_EQ("+800-345-600", extracted_number);
// Should recognise wide digits as possible start values.
ExtractPossibleNumber("\xEF\xBC\x90\xEF\xBC\x92\xEF\xBC\x93" /* "023" */,
&extracted_number);
EXPECT_EQ("\xEF\xBC\x90\xEF\xBC\x92\xEF\xBC\x93" /* "023" */,
extracted_number);
// Dashes are not possible start values and should be removed.
ExtractPossibleNumber("Num-\xEF\xBC\x91\xEF\xBC\x92\xEF\xBC\x93"
/* "Num-123" */, &extracted_number);
EXPECT_EQ("\xEF\xBC\x91\xEF\xBC\x92\xEF\xBC\x93" /* "123" */,
extracted_number);
// If not possible number present, return empty string.
ExtractPossibleNumber("Num-....", &extracted_number);
EXPECT_EQ("", extracted_number);
// Leading brackets are stripped - these are not used when parsing.
ExtractPossibleNumber("(650) 253-0000", &extracted_number);
EXPECT_EQ("650) 253-0000", extracted_number);
// Trailing non-alpha-numeric characters should be removed.
ExtractPossibleNumber("(650) 253-0000..- ..", &extracted_number);
EXPECT_EQ("650) 253-0000", extracted_number);
ExtractPossibleNumber("(650) 253-0000.", &extracted_number);
EXPECT_EQ("650) 253-0000", extracted_number);
// This case has a trailing RTL char.
ExtractPossibleNumber("(650) 253-0000\xE2\x80\x8F"
/* "(650) 253-0000" */, &extracted_number);
EXPECT_EQ("650) 253-0000", extracted_number);
}
TEST_F(PhoneNumberUtilTest, IsNANPACountry) {
EXPECT_TRUE(phone_util_.IsNANPACountry(RegionCode::US()));
EXPECT_TRUE(phone_util_.IsNANPACountry(RegionCode::BS()));
EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::DE()));
EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::GetUnknown()));
EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::UN001()));
}
TEST_F(PhoneNumberUtilTest, IsValidNumber) {
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(6502530000ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(us_number));
PhoneNumber it_number;
it_number.set_country_code(39);
it_number.set_national_number(236618300ULL);
it_number.set_italian_leading_zero(true);
EXPECT_TRUE(phone_util_.IsValidNumber(it_number));
PhoneNumber gb_number;
gb_number.set_country_code(44);
gb_number.set_national_number(7912345678ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(gb_number));
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(21387835ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(nz_number));
PhoneNumber intl_toll_free_number;
intl_toll_free_number.set_country_code(800);
intl_toll_free_number.set_national_number(12345678ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(intl_toll_free_number));
PhoneNumber universal_premium_rate;
universal_premium_rate.set_country_code(979);
universal_premium_rate.set_national_number(123456789ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(universal_premium_rate));
}
TEST_F(PhoneNumberUtilTest, IsValidForRegion) {
// This number is valid for the Bahamas, but is not a valid US number.
PhoneNumber bs_number;
bs_number.set_country_code(1);
bs_number.set_national_number(2423232345ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(bs_number));
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(bs_number, RegionCode::BS()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(bs_number, RegionCode::US()));
bs_number.set_national_number(2421232345ULL);
// This number is no longer valid.
EXPECT_FALSE(phone_util_.IsValidNumber(bs_number));
// La Mayotte and Réunion use 'leadingDigits' to differentiate them.
PhoneNumber re_number;
re_number.set_country_code(262);
re_number.set_national_number(262123456ULL);
EXPECT_TRUE(phone_util_.IsValidNumber(re_number));
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
// Now change the number to be a number for La Mayotte.
re_number.set_national_number(269601234ULL);
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
// This number is no longer valid.
re_number.set_national_number(269123456ULL);
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
EXPECT_FALSE(phone_util_.IsValidNumber(re_number));
// However, it should be recognised as from La Mayotte.
string region_code;
phone_util_.GetRegionCodeForNumber(re_number, ®ion_code);
EXPECT_EQ(RegionCode::YT(), region_code);
// This number is valid in both places.
re_number.set_national_number(800123456ULL);
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
PhoneNumber intl_toll_free_number;
intl_toll_free_number.set_country_code(800);
intl_toll_free_number.set_national_number(12345678ULL);
EXPECT_TRUE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
RegionCode::UN001()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
RegionCode::US()));
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
RegionCode::ZZ()));
PhoneNumber invalid_number;
// Invalid country calling codes.
invalid_number.set_country_code(3923);
invalid_number.set_national_number(2366ULL);
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
RegionCode::ZZ()));
invalid_number.set_country_code(3923);
invalid_number.set_national_number(2366ULL);
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
RegionCode::UN001()));
invalid_number.set_country_code(0);
invalid_number.set_national_number(2366ULL);
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
RegionCode::UN001()));
invalid_number.set_country_code(0);
EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
RegionCode::ZZ()));
}
TEST_F(PhoneNumberUtilTest, IsNotValidNumber) {
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(2530000ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(us_number));
PhoneNumber it_number;
it_number.set_country_code(39);
it_number.set_national_number(23661830000ULL);
it_number.set_italian_leading_zero(true);
EXPECT_FALSE(phone_util_.IsValidNumber(it_number));
PhoneNumber gb_number;
gb_number.set_country_code(44);
gb_number.set_national_number(791234567ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(gb_number));
PhoneNumber de_number;
de_number.set_country_code(49);
de_number.set_national_number(1234ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(de_number));
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(3316005ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(nz_number));
PhoneNumber invalid_number;
// Invalid country calling codes.
invalid_number.set_country_code(3923);
invalid_number.set_national_number(2366ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
invalid_number.set_country_code(0);
EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
PhoneNumber intl_toll_free_number_too_long;
intl_toll_free_number_too_long.set_country_code(800);
intl_toll_free_number_too_long.set_national_number(123456789ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(intl_toll_free_number_too_long));
}
TEST_F(PhoneNumberUtilTest, GetRegionCodeForCountryCode) {
string region_code;
phone_util_.GetRegionCodeForCountryCode(1, ®ion_code);
EXPECT_EQ(RegionCode::US(), region_code);
phone_util_.GetRegionCodeForCountryCode(44, ®ion_code);
EXPECT_EQ(RegionCode::GB(), region_code);
phone_util_.GetRegionCodeForCountryCode(49, ®ion_code);
EXPECT_EQ(RegionCode::DE(), region_code);
phone_util_.GetRegionCodeForCountryCode(800, ®ion_code);
EXPECT_EQ(RegionCode::UN001(), region_code);
phone_util_.GetRegionCodeForCountryCode(979, ®ion_code);
EXPECT_EQ(RegionCode::UN001(), region_code);
}
TEST_F(PhoneNumberUtilTest, GetRegionCodeForNumber) {
string region_code;
PhoneNumber bs_number;
bs_number.set_country_code(1);
bs_number.set_national_number(2423232345ULL);
phone_util_.GetRegionCodeForNumber(bs_number, ®ion_code);
EXPECT_EQ(RegionCode::BS(), region_code);
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(4241231234ULL);
phone_util_.GetRegionCodeForNumber(us_number, ®ion_code);
EXPECT_EQ(RegionCode::US(), region_code);
PhoneNumber gb_mobile;
gb_mobile.set_country_code(44);
gb_mobile.set_national_number(7912345678ULL);
phone_util_.GetRegionCodeForNumber(gb_mobile, ®ion_code);
EXPECT_EQ(RegionCode::GB(), region_code);
PhoneNumber intl_toll_free_number;
intl_toll_free_number.set_country_code(800);
intl_toll_free_number.set_national_number(12345678ULL);
phone_util_.GetRegionCodeForNumber(intl_toll_free_number, ®ion_code);
EXPECT_EQ(RegionCode::UN001(), region_code);
PhoneNumber universal_premium_rate;
universal_premium_rate.set_country_code(979);
universal_premium_rate.set_national_number(123456789ULL);
phone_util_.GetRegionCodeForNumber(universal_premium_rate, ®ion_code);
EXPECT_EQ(RegionCode::UN001(), region_code);
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumber) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(6502530000ULL);
EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
number.set_country_code(1);
number.set_national_number(2530000ULL);
EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
number.set_country_code(44);
number.set_national_number(2070313000ULL);
EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
number.set_country_code(800);
number.set_national_number(12345678ULL);
EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 253 0000",
RegionCode::US()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 GOO OGLE",
RegionCode::US()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("(650) 253-0000",
RegionCode::US()));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForString("253-0000", RegionCode::US()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 253 0000",
RegionCode::GB()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+44 20 7031 3000",
RegionCode::GB()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("(020) 7031 300",
RegionCode::GB()));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForString("7031 3000", RegionCode::GB()));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForString("3331 6005", RegionCode::NZ()));
EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+800 1234 5678",
RegionCode::UN001()));
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumberForType_DifferentTypeLengths) {
// We use Argentinian numbers since they have different possible lengths for
// different types.
PhoneNumber number;
number.set_country_code(54);
number.set_national_number(12345ULL);
// Too short for any Argentinian number, including fixed-line.
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
// 6-digit numbers are okay for fixed-line.
number.set_national_number(123456ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
// But too short for mobile.
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
// And too short for toll-free.
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::TOLL_FREE));
// The same applies to 9-digit numbers.
number.set_national_number(123456789ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::TOLL_FREE));
// 10-digit numbers are universally possible.
number.set_national_number(1234567890ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::TOLL_FREE));
// 11-digit numbers are only possible for mobile numbers. Note we don't
// require the leading 9, which all mobile numbers start with, and would be
// required for a valid mobile number.
number.set_national_number(12345678901ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::TOLL_FREE));
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumberForType_LocalOnly) {
PhoneNumber number;
// Here we test a number length which matches a local-only length.
number.set_country_code(49);
number.set_national_number(12ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
// Mobile numbers must be 10 or 11 digits, and there are no local-only
// lengths.
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumberForType_DataMissingForSizeReasons) {
PhoneNumber number;
// Here we test something where the possible lengths match the possible
// lengths of the country as a whole, and hence aren't present in the binary
// for size reasons - this should still work.
// Local-only number.
number.set_country_code(55);
number.set_national_number(12345678ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
number.set_national_number(1234567890ULL);
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::UNKNOWN));
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
}
TEST_F(PhoneNumberUtilTest,
IsPossibleNumberForType_NumberTypeNotSupportedForRegion) {
PhoneNumber number;
// There are *no* mobile numbers for this region at all, so we return false.
number.set_country_code(55);
number.set_national_number(12345678L);
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
// This matches a fixed-line length though.
EXPECT_TRUE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_TRUE(phone_util_.IsPossibleNumberForType(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
// There are *no* fixed-line OR mobile numbers for this country calling code
// at all, so we return false for these.
number.set_country_code(979);
number.set_national_number(123456789L);
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::MOBILE));
EXPECT_FALSE(
phone_util_.IsPossibleNumberForType(number, PhoneNumberUtil::FIXED_LINE));
EXPECT_FALSE(phone_util_.IsPossibleNumberForType(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
EXPECT_TRUE(phone_util_.IsPossibleNumberForType(
number, PhoneNumberUtil::PREMIUM_RATE));
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumberWithReason) {
// FYI, national numbers for country code +1 that are within 7 to 10 digits
// are possible.
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(6502530000ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(1);
number.set_national_number(2530000ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(0);
number.set_national_number(2530000ULL);
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(1);
number.set_national_number(253000ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(1);
number.set_national_number(65025300000ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(44);
number.set_national_number(2070310000ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(49);
number.set_national_number(30123456ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(65);
number.set_national_number(1234567890ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberWithReason(number));
number.set_country_code(800);
number.set_national_number(123456789ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberWithReason(number));
}
TEST_F(PhoneNumberUtilTest,
IsPossibleNumberForTypeWithReason_DifferentTypeLengths) {
// We use Argentinian numbers since they have different possible lengths for
// different types.
PhoneNumber number;
number.set_country_code(54);
number.set_national_number(12345ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// 6-digit numbers are okay for fixed-line.
number.set_national_number(123456ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// But too short for mobile.
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
// And too short for toll-free.
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::TOLL_FREE));
// The same applies to 9-digit numbers.
number.set_national_number(123456789ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::TOLL_FREE));
// 10-digit numbers are universally possible.
number.set_national_number(1234567890ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::TOLL_FREE));
// 11-digit numbers are possible for mobile numbers. Note we don't require the
// leading 9, which all mobile numbers start with, and would be required for a
// valid mobile number.
number.set_national_number(12345678901ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::TOLL_FREE));
}
TEST_F(PhoneNumberUtilTest, IsPossibleNumberForTypeWithReason_LocalOnly) {
PhoneNumber number;
// Here we test a number length which matches a local-only length.
number.set_country_code(49);
number.set_national_number(12ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// Mobile numbers must be 10 or 11 digits, and there are no local-only
// lengths.
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
}
TEST_F(PhoneNumberUtilTest,
IsPossibleNumberForTypeWithReason_DataMissingForSizeReasons) {
PhoneNumber number;
// Here we test something where the possible lengths match the possible
// lengths of the country as a whole, and hence aren't present in the binary
// for size reasons - this should still work.
// Local-only number.
number.set_country_code(55);
number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// Normal-length number.
number.set_national_number(1234567890ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::UNKNOWN));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
}
TEST_F(PhoneNumberUtilTest,
IsPossibleNumberForTypeWithReason_NumberTypeNotSupportedForRegion) {
PhoneNumber number;
// There are *no* mobile numbers for this region at all, so we return
// INVALID_LENGTH.
number.set_country_code(55);
number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
// This matches a fixed-line length though.
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE_LOCAL_ONLY,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
// This is too short for fixed-line, and no mobile numbers exist.
number.set_national_number(1234567ULL);
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// This is too short for mobile, and no fixed-line number exist.
number.set_country_code(882);
number.set_national_number(1234567ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
// There are *no* fixed-line OR mobile numbers for this country calling code
// at all, so we return INVALID_LENGTH.
number.set_country_code(979);
number.set_national_number(123456789ULL);
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::PREMIUM_RATE));
}
TEST_F(PhoneNumberUtilTest,
IsPossibleNumberForTypeWithReason_FixedLineOrMobile) {
PhoneNumber number;
// For FIXED_LINE_OR_MOBILE, a number should be considered valid if it matches
// the possible lengths for mobile *or* fixed-line numbers.
number.set_country_code(290);
number.set_national_number(1234ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
number.set_national_number(12345ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::INVALID_LENGTH,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
number.set_national_number(123456ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
number.set_national_number(1234567ULL);
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::MOBILE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::TOLL_FREE));
EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
phone_util_.IsPossibleNumberForTypeWithReason(
number, PhoneNumberUtil::FIXED_LINE_OR_MOBILE));
}
TEST_F(PhoneNumberUtilTest, IsNotPossibleNumber) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(65025300000ULL);
EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
number.set_country_code(800);
number.set_national_number(123456789ULL);
EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
number.set_country_code(1);
number.set_national_number(253000ULL);
EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
number.set_country_code(44);
number.set_national_number(300ULL);
EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+1 650 253 00000",
RegionCode::US()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("(650) 253-00000",
RegionCode::US()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("I want a Pizza",
RegionCode::US()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("253-000",
RegionCode::US()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("1 3000",
RegionCode::GB()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+44 300",
RegionCode::GB()));
EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+800 1234 5678 9",
RegionCode::UN001()));
}
TEST_F(PhoneNumberUtilTest, TruncateTooLongNumber) {
// US number 650-253-0000, but entered with one additional digit at the end.
PhoneNumber too_long_number;
too_long_number.set_country_code(1);
too_long_number.set_national_number(65025300001ULL);
PhoneNumber valid_number;
valid_number.set_country_code(1);
valid_number.set_national_number(6502530000ULL);
EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
EXPECT_EQ(valid_number, too_long_number);
too_long_number.set_country_code(800);
too_long_number.set_national_number(123456789ULL);
valid_number.set_country_code(800);
valid_number.set_national_number(12345678ULL);
EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
EXPECT_EQ(valid_number, too_long_number);
// GB number 080 1234 5678, but entered with 4 extra digits at the end.
too_long_number.set_country_code(44);
too_long_number.set_national_number(80123456780123ULL);
valid_number.set_country_code(44);
valid_number.set_national_number(8012345678ULL);
EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
EXPECT_EQ(valid_number, too_long_number);
// IT number 022 3456 7890, but entered with 3 extra digits at the end.
too_long_number.set_country_code(39);
too_long_number.set_national_number(2234567890123ULL);
too_long_number.set_italian_leading_zero(true);
valid_number.set_country_code(39);
valid_number.set_national_number(2234567890ULL);
valid_number.set_italian_leading_zero(true);
EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
EXPECT_EQ(valid_number, too_long_number);
// Tests what happens when a valid number is passed in.
PhoneNumber valid_number_copy(valid_number);
EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&valid_number));
// Tests the number is not modified.
EXPECT_EQ(valid_number_copy, valid_number);
// Tests what happens when a number with invalid prefix is passed in.
PhoneNumber number_with_invalid_prefix;
number_with_invalid_prefix.set_country_code(1);
// The test metadata says US numbers cannot have prefix 240.
number_with_invalid_prefix.set_national_number(2401234567ULL);
PhoneNumber invalid_number_copy(number_with_invalid_prefix);
EXPECT_FALSE(phone_util_.TruncateTooLongNumber(&number_with_invalid_prefix));
// Tests the number is not modified.
EXPECT_EQ(invalid_number_copy, number_with_invalid_prefix);
// Tests what happens when a too short number is passed in.
PhoneNumber too_short_number;
too_short_number.set_country_code(1);
too_short_number.set_national_number(1234ULL);
PhoneNumber too_short_number_copy(too_short_number);
EXPECT_FALSE(phone_util_.TruncateTooLongNumber(&too_short_number));
// Tests the number is not modified.
EXPECT_EQ(too_short_number_copy, too_short_number);
}
TEST_F(PhoneNumberUtilTest, IsNumberGeographical) {
PhoneNumber number;
// Bahamas, mobile phone number.
number.set_country_code(1);
number.set_national_number(2423570000ULL);
EXPECT_FALSE(phone_util_.IsNumberGeographical(number));
// Australian fixed line number.
number.set_country_code(61);
number.set_national_number(236618300ULL);
EXPECT_TRUE(phone_util_.IsNumberGeographical(number));
// International toll free number.
number.set_country_code(800);
number.set_national_number(12345678ULL);
EXPECT_FALSE(phone_util_.IsNumberGeographical(number));
// We test that mobile phone numbers in relevant regions are indeed considered
// geographical.
// Argentina, mobile phone number.
number.set_country_code(54);
number.set_national_number(91187654321ULL);
EXPECT_TRUE(phone_util_.IsNumberGeographical(number));
// Mexico, mobile phone number.
number.set_country_code(52);
number.set_national_number(12345678900ULL);
EXPECT_TRUE(phone_util_.IsNumberGeographical(number));
// Mexico, another mobile phone number.
number.set_country_code(52);
number.set_national_number(15512345678ULL);
EXPECT_TRUE(phone_util_.IsNumberGeographical(number));
}
TEST_F(PhoneNumberUtilTest, FormatInOriginalFormat) {
PhoneNumber phone_number;
string formatted_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("+442087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("+44 20 8765 4321", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("02087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("(020) 8765 4321", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("011442087654321",
RegionCode::US(), &phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 44 20 8765 4321", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("442087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("44 20 8765 4321", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+442087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("(020) 8765 4321", formatted_number);
// Invalid numbers that we have a formatting pattern for should be formatted
// properly. Note area codes starting with 7 are intentionally excluded in
// the test metadata for testing purposes.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("7345678901", RegionCode::US(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("734 567 8901", formatted_number);
// US is not a leading zero country, and the presence of the leading zero
// leads us to format the number using raw_input.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("0734567 8901", RegionCode::US(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("0734567 8901", formatted_number);
// This number is valid, but we don't have a formatting pattern for it. Fall
// back to the raw input.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("02-4567-8900", RegionCode::KR(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::KR(),
&formatted_number);
EXPECT_EQ("02-4567-8900", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("01180012345678",
RegionCode::US(), &phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("011 800 1234 5678", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("+80012345678", RegionCode::KR(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::KR(),
&formatted_number);
EXPECT_EQ("+800 1234 5678", formatted_number);
// US local numbers are formatted correctly, as we have formatting patterns
// for them.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("2530000", RegionCode::US(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("253 0000", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number with national prefix in the US.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("18003456789", RegionCode::US(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("1 800 345 6789", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number without national prefix in the UK.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("2087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("20 8765 4321", formatted_number);
// Make sure no metadata is modified as a result of the previous function
// call.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+442087654321", RegionCode::GB(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
&formatted_number);
EXPECT_EQ("(020) 8765 4321", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number with national prefix in Mexico.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("013312345678", RegionCode::MX(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
&formatted_number);
EXPECT_EQ("01 33 1234 5678", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number without national prefix in Mexico.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("3312345678", RegionCode::MX(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
&formatted_number);
EXPECT_EQ("33 1234 5678", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Italian fixed-line number.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("0212345678", RegionCode::IT(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::IT(),
&formatted_number);
EXPECT_EQ("02 1234 5678", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number with national prefix in Japan.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("00777012", RegionCode::JP(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
&formatted_number);
EXPECT_EQ("0077-7012", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number without national prefix in Japan.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("0777012", RegionCode::JP(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
&formatted_number);
EXPECT_EQ("0777012", formatted_number);
phone_number.Clear();
formatted_number.clear();
// Number with carrier code in Brazil.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("012 3121286979", RegionCode::BR(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::BR(),
&formatted_number);
EXPECT_EQ("012 3121286979", formatted_number);
phone_number.Clear();
formatted_number.clear();
// The default national prefix used in this case is 045. When a number with
// national prefix 044 is entered, we return the raw input as we don't want to
// change the number entered.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("044(33)1234-5678",
RegionCode::MX(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
&formatted_number);
EXPECT_EQ("044(33)1234-5678", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("045(33)1234-5678",
RegionCode::MX(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
&formatted_number);
EXPECT_EQ("045 33 1234 5678", formatted_number);
// The default international prefix used in this case is 0011. When a number
// with international prefix 0012 is entered, we return the raw input as we
// don't want to change the number entered.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("0012 16502530000",
RegionCode::AU(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0012 16502530000", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("0011 16502530000",
RegionCode::AU(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::AU(),
&formatted_number);
EXPECT_EQ("0011 1 650 253 0000", formatted_number);
// Test the star sign is not removed from or added to the original input by
// this method.
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("*1234",
RegionCode::JP(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
&formatted_number);
EXPECT_EQ("*1234", formatted_number);
phone_number.Clear();
formatted_number.clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("1234",
RegionCode::JP(),
&phone_number));
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
&formatted_number);
EXPECT_EQ("1234", formatted_number);
// Test that an invalid national number without raw input is just formatted
// as the national number.
phone_number.Clear();
formatted_number.clear();
phone_number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
phone_number.set_country_code(1);
phone_number.set_national_number(650253000ULL);
phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
&formatted_number);
EXPECT_EQ("650253000", formatted_number);
}
TEST_F(PhoneNumberUtilTest, IsPremiumRate) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(9004433030ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
number.set_country_code(39);
number.set_national_number(892123ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
number.set_country_code(44);
number.set_national_number(9187654321ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
number.set_country_code(49);
number.set_national_number(9001654321ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
number.set_country_code(49);
number.set_national_number(90091234567ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
number.set_country_code(979);
number.set_national_number(123456789ULL);
EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsTollFree) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(8881234567ULL);
EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
number.set_country_code(39);
number.set_national_number(803123ULL);
EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
number.set_country_code(44);
number.set_national_number(8012345678ULL);
EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
number.set_country_code(49);
number.set_national_number(8001234567ULL);
EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
number.set_country_code(800);
number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsMobile) {
PhoneNumber number;
// A Bahama mobile number
number.set_country_code(1);
number.set_national_number(2423570000ULL);
EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
number.set_country_code(39);
number.set_national_number(312345678ULL);
EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
number.set_country_code(44);
number.set_national_number(7912345678ULL);
EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
number.set_country_code(49);
number.set_national_number(15123456789ULL);
EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
number.set_country_code(54);
number.set_national_number(91187654321ULL);
EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsFixedLine) {
PhoneNumber number;
// A Bahama fixed-line number
number.set_country_code(1);
number.set_national_number(2423651234ULL);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
// An Italian fixed-line number
number.Clear();
number.set_country_code(39);
number.set_national_number(236618300ULL);
number.set_italian_leading_zero(true);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
number.Clear();
number.set_country_code(44);
number.set_national_number(2012345678ULL);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
number.set_country_code(49);
number.set_national_number(301234ULL);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsFixedLineAndMobile) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(6502531111ULL);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE_OR_MOBILE,
phone_util_.GetNumberType(number));
number.set_country_code(54);
number.set_national_number(1987654321ULL);
EXPECT_EQ(PhoneNumberUtil::FIXED_LINE_OR_MOBILE,
phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsSharedCost) {
PhoneNumber number;
number.set_country_code(44);
number.set_national_number(8431231234ULL);
EXPECT_EQ(PhoneNumberUtil::SHARED_COST, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsVoip) {
PhoneNumber number;
number.set_country_code(44);
number.set_national_number(5631231234ULL);
EXPECT_EQ(PhoneNumberUtil::VOIP, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsPersonalNumber) {
PhoneNumber number;
number.set_country_code(44);
number.set_national_number(7031231234ULL);
EXPECT_EQ(PhoneNumberUtil::PERSONAL_NUMBER,
phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, IsUnknown) {
PhoneNumber number;
number.set_country_code(1);
number.set_national_number(65025311111ULL);
EXPECT_EQ(PhoneNumberUtil::UNKNOWN, phone_util_.GetNumberType(number));
}
TEST_F(PhoneNumberUtilTest, GetCountryCodeForRegion) {
EXPECT_EQ(1, phone_util_.GetCountryCodeForRegion(RegionCode::US()));
EXPECT_EQ(64, phone_util_.GetCountryCodeForRegion(RegionCode::NZ()));
EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::GetUnknown()));
EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::UN001()));
// CS is already deprecated so the library doesn't support it.
EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::CS()));
}
TEST_F(PhoneNumberUtilTest, GetNationalDiallingPrefixForRegion) {
string ndd_prefix;
phone_util_.GetNddPrefixForRegion(RegionCode::US(), false, &ndd_prefix);
EXPECT_EQ("1", ndd_prefix);
// Test non-main country to see it gets the national dialling prefix for the
// main country with that country calling code.
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::BS(), false, &ndd_prefix);
EXPECT_EQ("1", ndd_prefix);
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::NZ(), false, &ndd_prefix);
EXPECT_EQ("0", ndd_prefix);
ndd_prefix.clear();
// Test case with non digit in the national prefix.
phone_util_.GetNddPrefixForRegion(RegionCode::AO(), false, &ndd_prefix);
EXPECT_EQ("0~0", ndd_prefix);
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::AO(), true, &ndd_prefix);
EXPECT_EQ("00", ndd_prefix);
// Test cases with invalid regions.
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::GetUnknown(), false,
&ndd_prefix);
EXPECT_EQ("", ndd_prefix);
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::UN001(), false, &ndd_prefix);
EXPECT_EQ("", ndd_prefix);
// CS is already deprecated so the library doesn't support it.
ndd_prefix.clear();
phone_util_.GetNddPrefixForRegion(RegionCode::CS(), false, &ndd_prefix);
EXPECT_EQ("", ndd_prefix);
}
TEST_F(PhoneNumberUtilTest, IsViablePhoneNumber) {
EXPECT_FALSE(IsViablePhoneNumber("1"));
// Only one or two digits before strange non-possible punctuation.
EXPECT_FALSE(IsViablePhoneNumber("1+1+1"));
EXPECT_FALSE(IsViablePhoneNumber("80+0"));
// Two digits is viable.
EXPECT_TRUE(IsViablePhoneNumber("00"));
EXPECT_TRUE(IsViablePhoneNumber("111"));
// Alpha numbers.
EXPECT_TRUE(IsViablePhoneNumber("0800-4-pizza"));
EXPECT_TRUE(IsViablePhoneNumber("0800-4-PIZZA"));
// We need at least three digits before any alpha characters.
EXPECT_FALSE(IsViablePhoneNumber("08-PIZZA"));
EXPECT_FALSE(IsViablePhoneNumber("8-PIZZA"));
EXPECT_FALSE(IsViablePhoneNumber("12. March"));
}
TEST_F(PhoneNumberUtilTest, IsViablePhoneNumberNonAscii) {
// Only one or two digits before possible punctuation followed by more digits.
// The punctuation used here is the unicode character u+3000.
EXPECT_TRUE(IsViablePhoneNumber("1\xE3\x80\x80" "34" /* "1 34" */));
EXPECT_FALSE(IsViablePhoneNumber("1\xE3\x80\x80" "3+4" /* "1 3+4" */));
// Unicode variants of possible starting character and other allowed
// punctuation/digits.
EXPECT_TRUE(IsViablePhoneNumber("\xEF\xBC\x88" "1\xEF\xBC\x89\xE3\x80\x80"
"3456789" /* "(1) 3456789" */));
// Testing a leading + is okay.
EXPECT_TRUE(IsViablePhoneNumber("+1\xEF\xBC\x89\xE3\x80\x80"
"3456789" /* "+1) 3456789" */));
}
TEST_F(PhoneNumberUtilTest, ConvertAlphaCharactersInNumber) {
string input("1800-ABC-DEF");
phone_util_.ConvertAlphaCharactersInNumber(&input);
// Alpha chars are converted to digits; everything else is left untouched.
static const string kExpectedOutput = "1800-222-333";
EXPECT_EQ(kExpectedOutput, input);
// Try with some non-ASCII characters.
input.assign("1\xE3\x80\x80\xEF\xBC\x88" "800) ABC-DEF"
/* "1 (800) ABC-DEF" */);
static const string kExpectedFullwidthOutput =
"1\xE3\x80\x80\xEF\xBC\x88" "800) 222-333" /* "1 (800) 222-333" */;
phone_util_.ConvertAlphaCharactersInNumber(&input);
EXPECT_EQ(kExpectedFullwidthOutput, input);
}
TEST_F(PhoneNumberUtilTest, NormaliseRemovePunctuation) {
string input_number("034-56&+#2" "\xC2\xAD" "34");
Normalize(&input_number);
static const string kExpectedOutput("03456234");
EXPECT_EQ(kExpectedOutput, input_number)
<< "Conversion did not correctly remove punctuation";
}
TEST_F(PhoneNumberUtilTest, NormaliseReplaceAlphaCharacters) {
string input_number("034-I-am-HUNGRY");
Normalize(&input_number);
static const string kExpectedOutput("034426486479");
EXPECT_EQ(kExpectedOutput, input_number)
<< "Conversion did not correctly replace alpha characters";
}
TEST_F(PhoneNumberUtilTest, NormaliseOtherDigits) {
// The first digit is a full-width 2, the last digit is an Arabic-indic digit
// 5.
string input_number("\xEF\xBC\x92" "5\xD9\xA5" /* "25٥" */);
Normalize(&input_number);
static const string kExpectedOutput("255");
EXPECT_EQ(kExpectedOutput, input_number)
<< "Conversion did not correctly replace non-latin digits";
// The first digit is an Eastern-Arabic 5, the latter an Eastern-Arabic 0.
string eastern_arabic_input_number("\xDB\xB5" "2\xDB\xB0" /* "۵2۰" */);
Normalize(&eastern_arabic_input_number);
static const string kExpectedOutput2("520");
EXPECT_EQ(kExpectedOutput2, eastern_arabic_input_number)
<< "Conversion did not correctly replace non-latin digits";
}
TEST_F(PhoneNumberUtilTest, NormaliseStripAlphaCharacters) {
string input_number("034-56&+a#234");
phone_util_.NormalizeDigitsOnly(&input_number);
static const string kExpectedOutput("03456234");
EXPECT_EQ(kExpectedOutput, input_number)
<< "Conversion did not correctly remove alpha characters";
}
TEST_F(PhoneNumberUtilTest, NormaliseStripNonDiallableCharacters) {
string input_number("03*4-56&+1a#234");
phone_util_.NormalizeDiallableCharsOnly(&input_number);
static const string kExpectedOutput("03*456+1#234");
EXPECT_EQ(kExpectedOutput, input_number)
<< "Conversion did not correctly remove non-diallable characters";
}
TEST_F(PhoneNumberUtilTest, MaybeStripInternationalPrefix) {
string international_prefix("00[39]");
string number_to_strip("0034567700-3898003");
// Note the dash is removed as part of the normalization.
string stripped_number("45677003898003");
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
EXPECT_EQ(stripped_number, number_to_strip)
<< "The number was not stripped of its international prefix.";
// Now the number no longer starts with an IDD prefix, so it should now report
// FROM_DEFAULT_COUNTRY.
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
number_to_strip.assign("00945677003898003");
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
EXPECT_EQ(stripped_number, number_to_strip)
<< "The number was not stripped of its international prefix.";
// Test it works when the international prefix is broken up by spaces.
number_to_strip.assign("00 9 45677003898003");
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
EXPECT_EQ(stripped_number, number_to_strip)
<< "The number was not stripped of its international prefix.";
// Now the number no longer starts with an IDD prefix, so it should now report
// FROM_DEFAULT_COUNTRY.
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
// Test the + symbol is also recognised and stripped.
number_to_strip.assign("+45677003898003");
stripped_number.assign("45677003898003");
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
EXPECT_EQ(stripped_number, number_to_strip)
<< "The number supplied was not stripped of the plus symbol.";
// If the number afterwards is a zero, we should not strip this - no country
// code begins with 0.
number_to_strip.assign("0090112-3123");
stripped_number.assign("00901123123");
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
EXPECT_EQ(stripped_number, number_to_strip)
<< "The number had a 0 after the match so shouldn't be stripped.";
// Here the 0 is separated by a space from the IDD.
number_to_strip.assign("009 0-112-3123");
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
MaybeStripInternationalPrefixAndNormalize(international_prefix,
&number_to_strip));
}
TEST_F(PhoneNumberUtilTest, MaybeStripNationalPrefixAndCarrierCode) {
PhoneMetadata metadata;
metadata.set_national_prefix_for_parsing("34");
metadata.mutable_general_desc()->set_national_number_pattern("\\d{4,8}");
string number_to_strip("34356778");
string stripped_number("356778");
string carrier_code;
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ(stripped_number, number_to_strip)
<< "Should have had national prefix stripped.";
EXPECT_EQ("", carrier_code) << "Should have had no carrier code stripped.";
// Retry stripping - now the number should not start with the national prefix,
// so no more stripping should occur.
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ(stripped_number, number_to_strip)
<< "Should have had no change - no national prefix present.";
// Some countries have no national prefix. Repeat test with none specified.
metadata.clear_national_prefix_for_parsing();
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ(stripped_number, number_to_strip)
<< "Should have had no change - empty national prefix.";
// If the resultant number doesn't match the national rule, it shouldn't be
// stripped.
metadata.set_national_prefix_for_parsing("3");
number_to_strip.assign("3123");
stripped_number.assign("3123");
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ(stripped_number, number_to_strip)
<< "Should have had no change - after stripping, it wouldn't have "
<< "matched the national rule.";
// Test extracting carrier selection code.
metadata.set_national_prefix_for_parsing("0(81)?");
number_to_strip.assign("08122123456");
stripped_number.assign("22123456");
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ("81", carrier_code) << "Should have had carrier code stripped.";
EXPECT_EQ(stripped_number, number_to_strip)
<< "Should have had national prefix and carrier code stripped.";
// If there was a transform rule, check it was applied.
metadata.set_national_prefix_transform_rule("5$15");
// Note that a capturing group is present here.
metadata.set_national_prefix_for_parsing("0(\\d{2})");
number_to_strip.assign("031123");
string transformed_number("5315123");
MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
&carrier_code);
EXPECT_EQ(transformed_number, number_to_strip)
<< "Was not successfully transformed.";
}
TEST_F(PhoneNumberUtilTest, MaybeStripExtension) {
// One with extension.
string number("1234576 ext. 1234");
string extension;
string expected_extension("1234");
string stripped_number("1234576");
EXPECT_TRUE(MaybeStripExtension(&number, &extension));
EXPECT_EQ(stripped_number, number);
EXPECT_EQ(expected_extension, extension);
// One without extension.
number.assign("1234-576");
extension.clear();
stripped_number.assign("1234-576");
EXPECT_FALSE(MaybeStripExtension(&number, &extension));
EXPECT_EQ(stripped_number, number);
EXPECT_TRUE(extension.empty());
// One with an extension caught by the second capturing group in
// kKnownExtnPatterns.
number.assign("1234576-123#");
extension.clear();
expected_extension.assign("123");
stripped_number.assign("1234576");
EXPECT_TRUE(MaybeStripExtension(&number, &extension));
EXPECT_EQ(stripped_number, number);
EXPECT_EQ(expected_extension, extension);
number.assign("1234576 ext.123#");
extension.clear();
EXPECT_TRUE(MaybeStripExtension(&number, &extension));
EXPECT_EQ(stripped_number, number);
EXPECT_EQ(expected_extension, extension);
}
TEST_F(PhoneNumberUtilTest, MaybeExtractCountryCode) {
PhoneNumber number;
const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::US());
// Note that for the US, the IDD is 011.
string phone_number("011112-3456789");
string stripped_number("123456789");
int expected_country_code = 1;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD, number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
number.Clear();
phone_number.assign("+80012345678");
stripped_number.assign("12345678");
expected_country_code = 800;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
number.Clear();
phone_number.assign("+6423456789");
stripped_number.assign("23456789");
expected_country_code = 64;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
// Should not have extracted a country code - no international prefix present.
number.Clear();
expected_country_code = 0;
phone_number.assign("2345-6789");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY, number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
expected_country_code = 0;
phone_number.assign("0119991123456789");
stripped_number.assign(phone_number);
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
number.Clear();
phone_number.assign("(1 610) 619 4466");
stripped_number.assign("6106194466");
expected_country_code = 1;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN,
number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
number.Clear();
phone_number.assign("(1 610) 619 4466");
stripped_number.assign("6106194466");
expected_country_code = 1;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, false, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_FALSE(number.has_country_code_source());
EXPECT_EQ(stripped_number, phone_number);
// Should not have extracted a country code - invalid number after extraction
// of uncertain country code.
number.Clear();
phone_number.assign("(1 610) 619 446");
stripped_number.assign("1610619446");
expected_country_code = 0;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, false, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_FALSE(number.has_country_code_source());
EXPECT_EQ(stripped_number, phone_number);
number.Clear();
phone_number.assign("(1 610) 619");
stripped_number.assign("1610619");
expected_country_code = 0;
// Should not have extracted a country code - invalid number both before and
// after extraction of uncertain country code.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
MaybeExtractCountryCode(metadata, true, &phone_number, &number));
EXPECT_EQ(expected_country_code, number.country_code());
EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY, number.country_code_source());
EXPECT_EQ(stripped_number, phone_number);
}
TEST_F(PhoneNumberUtilTest, CountryWithNoNumberDesc) {
string formatted_number;
// Andorra is a country where we don't have PhoneNumberDesc info in the
// metadata.
PhoneNumber ad_number;
ad_number.set_country_code(376);
ad_number.set_national_number(12345ULL);
phone_util_.Format(ad_number, PhoneNumberUtil::INTERNATIONAL,
&formatted_number);
EXPECT_EQ("+376 12345", formatted_number);
phone_util_.Format(ad_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+37612345", formatted_number);
phone_util_.Format(ad_number, PhoneNumberUtil::NATIONAL, &formatted_number);
EXPECT_EQ("12345", formatted_number);
EXPECT_EQ(PhoneNumberUtil::UNKNOWN, phone_util_.GetNumberType(ad_number));
EXPECT_FALSE(phone_util_.IsValidNumber(ad_number));
// Test dialing a US number from within Andorra.
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(6502530000ULL);
phone_util_.FormatOutOfCountryCallingNumber(us_number, RegionCode::AD(),
&formatted_number);
EXPECT_EQ("00 1 650 253 0000", formatted_number);
}
TEST_F(PhoneNumberUtilTest, UnknownCountryCallingCode) {
PhoneNumber invalid_number;
invalid_number.set_country_code(kInvalidCountryCode);
invalid_number.set_national_number(12345ULL);
EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
// It's not very well defined as to what the E164 representation for a number
// with an invalid country calling code is, but just prefixing the country
// code and national number is about the best we can do.
string formatted_number;
phone_util_.Format(invalid_number, PhoneNumberUtil::E164, &formatted_number);
EXPECT_EQ("+212345", formatted_number);
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchMatches) {
// Test simple matches where formatting is different, or leading zeros, or
// country code has been specified.
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331 6005",
"+64 03 331 6005"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+800 1234 5678",
"+80012345678"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 03 331-6005",
"+64 03331 6005"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+643 331-6005",
"+64033316005"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+643 331-6005",
"+6433316005"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"+6433316005"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005", "tel:+64-3-331-6005;isub=123"));
// Test alpha numbers.
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+1800 siX-Flags",
"+1 800 7493 5247"));
// Test numbers with extensions.
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 extn 1234",
"+6433316005#1234"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 extn 1234",
"+6433316005;1234"));
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+7 423 202-25-11 ext 100",
"+7 4232022511 \xd0\xb4\xd0\xbe\xd0\xb1. 100"));
// Test proto buffers.
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
nz_number.set_extension("3456");
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithOneString(nz_number,
"+643 331 6005 ext 3456"));
nz_number.clear_extension();
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithOneString(nz_number,
"+643 331 6005"));
// Check empty extensions are ignored.
nz_number.set_extension("");
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatchWithOneString(nz_number,
"+643 331 6005"));
// Check variant with two proto buffers.
PhoneNumber nz_number_2;
nz_number_2.set_country_code(64);
nz_number_2.set_national_number(33316005ULL);
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatch(nz_number, nz_number_2));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchShortMatchIfDiffNumLeadingZeros) {
PhoneNumber nz_number_one;
nz_number_one.set_country_code(64);
nz_number_one.set_national_number(33316005ULL);
nz_number_one.set_italian_leading_zero(true);
PhoneNumber nz_number_two;
nz_number_two.set_country_code(64);
nz_number_two.set_national_number(33316005ULL);
nz_number_two.set_italian_leading_zero(true);
nz_number_two.set_number_of_leading_zeros(2);
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatch(nz_number_one, nz_number_two));
nz_number_one.set_italian_leading_zero(false);
nz_number_one.set_number_of_leading_zeros(1);
nz_number_two.set_italian_leading_zero(true);
nz_number_two.set_number_of_leading_zeros(1);
// Since one doesn't have the "italian_leading_zero" set to true, we ignore
// the number of leading zeros present (1 is in any case the default value).
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatch(nz_number_one, nz_number_two));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchAcceptsProtoDefaultsAsMatch) {
PhoneNumber nz_number_one;
nz_number_one.set_country_code(64);
nz_number_one.set_national_number(33316005ULL);
nz_number_one.set_italian_leading_zero(true);
PhoneNumber nz_number_two;
nz_number_two.set_country_code(64);
nz_number_two.set_national_number(33316005ULL);
nz_number_two.set_italian_leading_zero(true);
// The default for number_of_leading_zeros is 1, so it shouldn't normally be
// set, however if it is it should be considered equivalent.
nz_number_two.set_number_of_leading_zeros(1);
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatch(nz_number_one, nz_number_two));
}
TEST_F(PhoneNumberUtilTest,
IsNumberMatchMatchesDiffLeadingZerosIfItalianLeadingZeroFalse) {
PhoneNumber nz_number_one;
nz_number_one.set_country_code(64);
nz_number_one.set_national_number(33316005ULL);
PhoneNumber nz_number_two;
nz_number_two.set_country_code(64);
nz_number_two.set_national_number(33316005ULL);
// The default for number_of_leading_zeros is 1, so it shouldn't normally be
// set, however if it is it should be considered equivalent.
nz_number_two.set_number_of_leading_zeros(1);
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatch(nz_number_one, nz_number_two));
// Even if it is set to ten, it is still equivalent because in both cases
// italian_leading_zero is not true.
nz_number_two.set_number_of_leading_zeros(10);
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatch(nz_number_one, nz_number_two));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchIgnoresSomeFields) {
// Check raw_input, country_code_source and preferred_domestic_carrier_code
// are ignored.
PhoneNumber br_number_1;
PhoneNumber br_number_2;
br_number_1.set_country_code(55);
br_number_1.set_national_number(3121286979ULL);
br_number_1.set_country_code_source(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
br_number_1.set_preferred_domestic_carrier_code("12");
br_number_1.set_raw_input("012 3121286979");
br_number_2.set_country_code(55);
br_number_2.set_national_number(3121286979ULL);
br_number_2.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
br_number_2.set_preferred_domestic_carrier_code("14");
br_number_2.set_raw_input("143121286979");
EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
phone_util_.IsNumberMatch(br_number_1, br_number_2));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchNonMatches) {
// NSN matches.
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("03 331 6005",
"03 331 6006"));
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+800 1234 5678",
"+1 800 1234 5678"));
// Different country code, partial number match.
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"+16433316005"));
// Different country code, same number.
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"+6133316005"));
// Extension different, all else the same.
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 extn 1234",
"+0116433316005#1235"));
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005 extn 1234", "tel:+64-3-331-6005;ext=1235"));
// NSN matches, but extension is different - not the same number.
EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 ext.1235",
"3 331 6005#1234"));
// Invalid numbers that can't be parsed.
EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
phone_util_.IsNumberMatchWithTwoStrings("4", "3 331 6043"));
// Invalid numbers that can't be parsed.
EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
phone_util_.IsNumberMatchWithTwoStrings("+43", "+64 3 331 6005"));
EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
phone_util_.IsNumberMatchWithTwoStrings("+43", "64 3 331 6005"));
EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
phone_util_.IsNumberMatchWithTwoStrings("Dog", "64 3 331 6005"));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchNsnMatches) {
// NSN matches.
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"03 331 6005"));
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005",
"tel:03-331-6005;isub=1234;phone-context=abc.nz"));
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
nz_number.set_extension("");
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithOneString(nz_number, "03 331 6005"));
// Here the second number possibly starts with the country code for New
// Zealand, although we are unsure.
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithOneString(nz_number,
"(64-3) 331 6005"));
// Here, the 1 might be a national prefix, if we compare it to the US number,
// so the resultant match is an NSN match.
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(2345678901ULL);
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithOneString(us_number,
"1-234-567-8901"));
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithOneString(us_number, "2345678901"));
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+1 234-567 8901",
"1 234 567 8901"));
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("1 234-567 8901",
"1 234 567 8901"));
EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("1 234-567 8901",
"+1 234 567 8901"));
// For this case, the match will be a short NSN match, because we cannot
// assume that the 1 might be a national prefix, so don't remove it when
// parsing.
PhoneNumber random_number;
random_number.set_country_code(41);
random_number.set_national_number(2345678901ULL);
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithOneString(random_number,
"1-234-567-8901"));
}
TEST_F(PhoneNumberUtilTest, IsNumberMatchShortNsnMatches) {
// Short NSN matches with the country not specified for either one or both
// numbers.
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"331 6005"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005", "tel:331-6005;phone-context=abc.nz"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005",
"tel:331-6005;isub=1234;phone-context=abc.nz"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"+64 3 331-6005",
"tel:331-6005;isub=1234;phone-context=abc.nz;a=%A1"));
// We did not know that the "0" was a national prefix since neither number has
// a country code, so this is considered a SHORT_NSN_MATCH.
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
"03 331 6005"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
"331 6005"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings(
"3 331-6005", "tel:331-6005;phone-context=abc.nz"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
"+64 331 6005"));
// Short NSN match with the country specified.
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("03 331-6005",
"331 6005"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("1 234 345 6789",
"345 6789"));
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+1 (234) 345 6789",
"345 6789"));
// NSN matches, country code omitted for one number, extension missing for
// one.
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
"3 331 6005#1234"));
// One has Italian leading zero, one does not.
PhoneNumber it_number_1, it_number_2;
it_number_1.set_country_code(39);
it_number_1.set_national_number(1234ULL);
it_number_1.set_italian_leading_zero(true);
it_number_2.set_country_code(39);
it_number_2.set_national_number(1234ULL);
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatch(it_number_1, it_number_2));
// One has an extension, the other has an extension of "".
it_number_1.set_extension("1234");
it_number_1.clear_italian_leading_zero();
it_number_2.set_extension("");
EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
phone_util_.IsNumberMatch(it_number_1, it_number_2));
}
TEST_F(PhoneNumberUtilTest, ParseNationalNumber) {
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
PhoneNumber test_number;
// National prefix attached.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("033316005", RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Some fields are not filled in by Parse, but only by ParseAndKeepRawInput.
EXPECT_FALSE(nz_number.has_country_code_source());
EXPECT_EQ(PhoneNumber::UNSPECIFIED, nz_number.country_code_source());
// National prefix missing.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("33316005", RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// National prefix attached and some formatting present.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03-331 6005", RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03 331 6005", RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Test parsing RFC3966 format with a phone context.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:03-331-6005;phone-context=+64",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:331-6005;phone-context=+64-3",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:331-6005;phone-context=+64-3",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("My number is tel:03-331-6005;phone-context=+64",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Test parsing RFC3966 format with optional user-defined parameters. The
// parameters will appear after the context if present.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:03-331-6005;phone-context=+64;a=%A1",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Test parsing RFC3966 with an ISDN subaddress.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:03-331-6005;isub=12345;phone-context=+64",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:+64-3-331-6005;isub=12345",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03-331-6005;phone-context=+64",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Testing international prefixes.
// Should strip country code.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0064 3 331 6005",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Try again, but this time we have an international number with Region Code
// US. It should recognise the country code and parse accordingly.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("01164 3 331 6005",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+64 3 331 6005",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
// We should ignore the leading plus here, since it is not followed by a valid
// country code but instead is followed by the IDD for the US.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+01164 3 331 6005",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+0064 3 331 6005",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+ 00 64 3 331 6005",
RegionCode::NZ(), &test_number));
EXPECT_EQ(nz_number, test_number);
PhoneNumber us_local_number;
us_local_number.set_country_code(1);
us_local_number.set_national_number(2530000ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:253-0000;phone-context=www.google.com",
RegionCode::US(), &test_number));
EXPECT_EQ(us_local_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"tel:253-0000;isub=12345;phone-context=www.google.com",
RegionCode::US(), &test_number));
EXPECT_EQ(us_local_number, test_number);
// This is invalid because no "+" sign is present as part of phone-context.
// The phone context is simply ignored in this case just as if it contains a
// domain.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:2530000;isub=12345;phone-context=1-650",
RegionCode::US(), &test_number));
EXPECT_EQ(us_local_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:2530000;isub=12345;phone-context=1234.com",
RegionCode::US(), &test_number));
EXPECT_EQ(us_local_number, test_number);
// Test for http://b/issue?id=2247493
nz_number.Clear();
nz_number.set_country_code(64);
nz_number.set_national_number(64123456ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+64(0)64123456",
RegionCode::US(), &test_number));
EXPECT_EQ(nz_number, test_number);
// Check that using a "/" is fine in a phone number.
PhoneNumber de_number;
de_number.set_country_code(49);
de_number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("123/45678", RegionCode::DE(), &test_number));
EXPECT_EQ(de_number, test_number);
PhoneNumber us_number;
us_number.set_country_code(1);
// Check it doesn't use the '1' as a country code when parsing if the phone
// number was already possible.
us_number.set_national_number(1234567890ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("123-456-7890", RegionCode::US(), &test_number));
EXPECT_EQ(us_number, test_number);
// Test star numbers. Although this is not strictly valid, we would like to
// make sure we can parse the output we produce when formatting the number.
PhoneNumber star_number;
star_number.set_country_code(81);
star_number.set_national_number(2345ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+81 *2345", RegionCode::JP(), &test_number));
EXPECT_EQ(star_number, test_number);
PhoneNumber short_number;
short_number.set_country_code(64);
short_number.set_national_number(12ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("12", RegionCode::NZ(), &test_number));
EXPECT_EQ(short_number, test_number);
// Test for short-code with leading zero for a country which has 0 as
// national prefix. Ensure it's not interpreted as national prefix if the
// remaining number length is local-only in terms of length. Example: In GB,
// length 6-7 are only possible local-only.
short_number.set_country_code(44);
short_number.set_national_number(123456);
short_number.set_italian_leading_zero(true);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0123456", RegionCode::GB(), &test_number));
EXPECT_EQ(short_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseNumberWithAlphaCharacters) {
// Test case with alpha characters.
PhoneNumber test_number;
PhoneNumber tollfree_number;
tollfree_number.set_country_code(64);
tollfree_number.set_national_number(800332005ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0800 DDA 005", RegionCode::NZ(), &test_number));
EXPECT_EQ(tollfree_number, test_number);
PhoneNumber premium_number;
premium_number.set_country_code(64);
premium_number.set_national_number(9003326005ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0900 DDA 6005", RegionCode::NZ(), &test_number));
EXPECT_EQ(premium_number, test_number);
// Not enough alpha characters for them to be considered intentional, so they
// are stripped.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0900 332 6005a",
RegionCode::NZ(), &test_number));
EXPECT_EQ(premium_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0900 332 600a5",
RegionCode::NZ(), &test_number));
EXPECT_EQ(premium_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0900 332 600A5",
RegionCode::NZ(), &test_number));
EXPECT_EQ(premium_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0900 a332 600A5",
RegionCode::NZ(), &test_number));
EXPECT_EQ(premium_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseWithInternationalPrefixes) {
PhoneNumber us_number;
us_number.set_country_code(1);
us_number.set_national_number(6503336000ULL);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+1 (650) 333-6000",
RegionCode::US(), &test_number));
EXPECT_EQ(us_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+1-650-333-6000",
RegionCode::US(), &test_number));
EXPECT_EQ(us_number, test_number);
// Calling the US number from Singapore by using different service providers
// 1st test: calling using SingTel IDD service (IDD is 001)
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0011-650-333-6000",
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
// 2nd test: calling using StarHub IDD service (IDD is 008)
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0081-650-333-6000",
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
// 3rd test: calling using SingTel V019 service (IDD is 019)
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0191-650-333-6000",
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
// Calling the US number from Poland
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0~01-650-333-6000",
RegionCode::PL(), &test_number));
EXPECT_EQ(us_number, test_number);
// Using "++" at the start.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("++1 (650) 333-6000",
RegionCode::PL(), &test_number));
EXPECT_EQ(us_number, test_number);
// Using a full-width plus sign.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("\xEF\xBC\x8B" "1 (650) 333-6000",
/* "+1 (650) 333-6000" */
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
// Using a soft hyphen U+00AD.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("1 (650) 333" "\xC2\xAD" "-6000",
/* "1 (650) 333-6000" */
RegionCode::US(), &test_number));
EXPECT_EQ(us_number, test_number);
// The whole number, including punctuation, is here represented in full-width
// form.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("\xEF\xBC\x8B\xEF\xBC\x91\xE3\x80\x80\xEF\xBC\x88"
"\xEF\xBC\x96\xEF\xBC\x95\xEF\xBC\x90\xEF\xBC\x89"
"\xE3\x80\x80\xEF\xBC\x93\xEF\xBC\x93\xEF\xBC\x93"
"\xEF\xBC\x8D\xEF\xBC\x96\xEF\xBC\x90\xEF\xBC\x90"
"\xEF\xBC\x90",
/* "+1 (650) 333-6000" */
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
// Using the U+30FC dash.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("\xEF\xBC\x8B\xEF\xBC\x91\xE3\x80\x80\xEF\xBC\x88"
"\xEF\xBC\x96\xEF\xBC\x95\xEF\xBC\x90\xEF\xBC\x89"
"\xE3\x80\x80\xEF\xBC\x93\xEF\xBC\x93\xEF\xBC\x93"
"\xE3\x83\xBC\xEF\xBC\x96\xEF\xBC\x90\xEF\xBC\x90"
"\xEF\xBC\x90",
/* "+1 (650) 333ー6000" */
RegionCode::SG(), &test_number));
EXPECT_EQ(us_number, test_number);
PhoneNumber toll_free_number;
toll_free_number.set_country_code(800);
toll_free_number.set_national_number(12345678ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("011 800 1234 5678",
RegionCode::US(), &test_number));
EXPECT_EQ(toll_free_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseWithLeadingZero) {
PhoneNumber it_number;
it_number.set_country_code(39);
it_number.set_national_number(236618300ULL);
it_number.set_italian_leading_zero(true);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+39 02-36618 300",
RegionCode::NZ(), &test_number));
EXPECT_EQ(it_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("02-36618 300", RegionCode::IT(), &test_number));
EXPECT_EQ(it_number, test_number);
it_number.Clear();
it_number.set_country_code(39);
it_number.set_national_number(312345678ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("312 345 678", RegionCode::IT(), &test_number));
EXPECT_EQ(it_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseNationalNumberArgentina) {
// Test parsing mobile numbers of Argentina.
PhoneNumber ar_number;
ar_number.set_country_code(54);
ar_number.set_national_number(93435551212ULL);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+54 9 343 555 1212", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0343 15 555 1212", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
ar_number.set_national_number(93715654320ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+54 9 3715 65 4320", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03715 15 65 4320", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
// Test parsing fixed-line numbers of Argentina.
ar_number.set_national_number(1137970000ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+54 11 3797 0000", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("011 3797 0000", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
ar_number.set_national_number(3715654321ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+54 3715 65 4321", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03715 65 4321", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
ar_number.set_national_number(2312340000ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+54 23 1234 0000", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("023 1234 0000", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseWithXInNumber) {
// Test that having an 'x' in the phone number at the start is ok and that it
// just gets removed.
PhoneNumber ar_number;
ar_number.set_country_code(54);
ar_number.set_national_number(123456789ULL);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0123456789", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(0) 123456789", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0 123456789", RegionCode::AR(), &test_number));
EXPECT_EQ(ar_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(0xx) 123456789", RegionCode::AR(),
&test_number));
EXPECT_EQ(ar_number, test_number);
PhoneNumber ar_from_us;
ar_from_us.set_country_code(54);
ar_from_us.set_national_number(81429712ULL);
// This test is intentionally constructed such that the number of digit after
// xx is larger than 7, so that the number won't be mistakenly treated as an
// extension, as we allow extensions up to 7 digits. This assumption is okay
// for now as all the countries where a carrier selection code is written in
// the form of xx have a national significant number of length larger than 7.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("011xx5481429712", RegionCode::US(),
&test_number));
EXPECT_EQ(ar_from_us, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseNumbersMexico) {
// Test parsing fixed-line numbers of Mexico.
PhoneNumber mx_number;
mx_number.set_country_code(52);
mx_number.set_national_number(4499780001ULL);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+52 (449)978-0001", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("01 (449)978-0001", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(449)978-0001", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
// Test parsing mobile numbers of Mexico.
mx_number.Clear();
mx_number.set_country_code(52);
mx_number.set_national_number(13312345678ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+52 1 33 1234-5678", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("044 (33) 1234-5678", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("045 33 1234-5678", RegionCode::MX(),
&test_number));
EXPECT_EQ(mx_number, test_number);
}
TEST_F(PhoneNumberUtilTest, FailedParseOnInvalidNumbers) {
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("This is not a phone number", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("1 Still not a number", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("1 MICROSOFT", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("12 MICROSOFT", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_LONG_NSN,
phone_util_.Parse("01495 72553301873 810104", RegionCode::GB(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("+---", RegionCode::DE(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("+***", RegionCode::DE(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse("+*******91", RegionCode::DE(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_NSN,
phone_util_.Parse("+49 0", RegionCode::DE(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("+210 3456 56789", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
// 00 is a correct IDD, but 210 is not a valid country code.
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("+ 00 210 3 331 6005", RegionCode::NZ(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("123 456 7890", RegionCode::GetUnknown(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("123 456 7890", RegionCode::CS(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
phone_util_.Parse("0044-----", RegionCode::GB(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
phone_util_.Parse("0044", RegionCode::GB(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
phone_util_.Parse("011", RegionCode::US(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
phone_util_.Parse("0119", RegionCode::US(),
&test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
// RFC3966 phone-context is a website.
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("tel:555-1234;phone-context=www.google.com",
RegionCode::ZZ(), &test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
// This is invalid because no "+" sign is present as part of phone-context.
// This should not succeed in being parsed.
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("tel:555-1234;phone-context=1-331",
RegionCode::ZZ(), &test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
// Only the phone-context symbol is present, but no data.
EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
phone_util_.Parse(";phone-context=",
RegionCode::ZZ(), &test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
}
TEST_F(PhoneNumberUtilTest, ParseNumbersWithPlusWithNoRegion) {
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
// RegionCode::GetUnknown() is allowed only if the number starts with a '+' -
// then the country code can be calculated.
PhoneNumber result_proto;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+64 3 331 6005", RegionCode::GetUnknown(),
&result_proto));
EXPECT_EQ(nz_number, result_proto);
// Test with full-width plus.
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("\xEF\xBC\x8B" "64 3 331 6005",
/* "+64 3 331 6005" */
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(nz_number, result_proto);
// Test with normal plus but leading characters that need to be stripped.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(" +64 3 331 6005", RegionCode::GetUnknown(),
&result_proto));
EXPECT_EQ(nz_number, result_proto);
PhoneNumber toll_free_number;
toll_free_number.set_country_code(800);
toll_free_number.set_national_number(12345678ULL);
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+800 1234 5678",
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(toll_free_number, result_proto);
PhoneNumber universal_premium_rate;
universal_premium_rate.set_country_code(979);
universal_premium_rate.set_national_number(123456789ULL);
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+979 123 456 789",
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(universal_premium_rate, result_proto);
result_proto.Clear();
// Test parsing RFC3966 format with a phone context.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:03-331-6005;phone-context=+64",
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(nz_number, result_proto);
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(" tel:03-331-6005;phone-context=+64",
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(nz_number, result_proto);
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:03-331-6005;isub=12345;phone-context=+64",
RegionCode::GetUnknown(), &result_proto));
EXPECT_EQ(nz_number, result_proto);
nz_number.set_raw_input("+64 3 331 6005");
nz_number.set_country_code_source(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
result_proto.Clear();
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("+64 3 331 6005",
RegionCode::GetUnknown(),
&result_proto));
EXPECT_EQ(nz_number, result_proto);
}
TEST_F(PhoneNumberUtilTest, ParseNumberTooShortIfNationalPrefixStripped) {
PhoneNumber test_number;
// Test that a number whose first digits happen to coincide with the national
// prefix does not get them stripped if doing so would result in a number too
// short to be a possible (regular length) phone number for that region.
PhoneNumber by_number;
by_number.set_country_code(375);
by_number.set_national_number(8123L);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("8123", RegionCode::BY(),
&test_number));
EXPECT_EQ(by_number, test_number);
by_number.set_national_number(81234L);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("81234", RegionCode::BY(),
&test_number));
EXPECT_EQ(by_number, test_number);
// The prefix doesn't get stripped, since the input is a viable 6-digit
// number, whereas the result of stripping is only 5 digits.
by_number.set_national_number(812345L);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("812345", RegionCode::BY(),
&test_number));
EXPECT_EQ(by_number, test_number);
// The prefix gets stripped, since only 6-digit numbers are possible.
by_number.set_national_number(123456L);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("8123456", RegionCode::BY(),
&test_number));
EXPECT_EQ(by_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseExtensions) {
PhoneNumber nz_number;
nz_number.set_country_code(64);
nz_number.set_national_number(33316005ULL);
nz_number.set_extension("3456");
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03 331 6005 ext 3456", RegionCode::NZ(),
&test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03 331 6005x3456", RegionCode::NZ(),
&test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03-331 6005 int.3456", RegionCode::NZ(),
&test_number));
EXPECT_EQ(nz_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("03 331 6005 #3456", RegionCode::NZ(),
&test_number));
EXPECT_EQ(nz_number, test_number);
// Test the following do not extract extensions:
PhoneNumber non_extn_number;
non_extn_number.set_country_code(1);
non_extn_number.set_national_number(80074935247ULL);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("1800 six-flags", RegionCode::US(),
&test_number));
EXPECT_EQ(non_extn_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("1800 SIX-FLAGS", RegionCode::US(),
&test_number));
EXPECT_EQ(non_extn_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0~0 1800 7493 5247", RegionCode::PL(),
&test_number));
EXPECT_EQ(non_extn_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(1800) 7493.5247", RegionCode::US(),
&test_number));
EXPECT_EQ(non_extn_number, test_number);
// Check that the last instance of an extension token is matched.
PhoneNumber extn_number;
extn_number.set_country_code(1);
extn_number.set_national_number(80074935247ULL);
extn_number.set_extension("1234");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0~0 1800 7493 5247 ~1234", RegionCode::PL(),
&test_number));
EXPECT_EQ(extn_number, test_number);
// Verifying bug-fix where the last digit of a number was previously omitted
// if it was a 0 when extracting the extension. Also verifying a few different
// cases of extensions.
PhoneNumber uk_number;
uk_number.set_country_code(44);
uk_number.set_national_number(2034567890ULL);
uk_number.set_extension("456");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890x456", RegionCode::NZ(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890x456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 x456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 X456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 x 456 ", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44-2034567890;ext=456", RegionCode::GB(),
&test_number));
EXPECT_EQ(uk_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("tel:2034567890;ext=456;phone-context=+44",
RegionCode::ZZ(), &test_number));
EXPECT_EQ(uk_number, test_number);
// Full-width extension, "extn" only.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"+442034567890\xEF\xBD\x85\xEF\xBD\x98\xEF\xBD\x94\xEF\xBD\x8E"
"456", RegionCode::GB(), &test_number));
EXPECT_EQ(uk_number, test_number);
// "xtn" only.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"+44-2034567890\xEF\xBD\x98\xEF\xBD\x94\xEF\xBD\x8E""456",
RegionCode::GB(), &test_number));
EXPECT_EQ(uk_number, test_number);
// "xt" only.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+44-2034567890\xEF\xBD\x98\xEF\xBD\x94""456",
RegionCode::GB(), &test_number));
EXPECT_EQ(uk_number, test_number);
PhoneNumber us_with_extension;
us_with_extension.set_country_code(1);
us_with_extension.set_national_number(8009013355ULL);
us_with_extension.set_extension("7246433");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 x 7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 , ext 7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 ; 7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
// To test an extension character without surrounding spaces.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355;7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 ,extension 7246433",
RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 ,extensi\xC3\xB3n 7246433",
/* "(800) 901-3355 ,extensión 7246433" */
RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
// Repeat with the small letter o with acute accent created by combining
// characters.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 ,extensio\xCC\x81n 7246433",
/* "(800) 901-3355 ,extensión 7246433" */
RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 , 7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(800) 901-3355 ext: 7246433", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
// Testing Russian extension "доб" with variants found onli
PhoneNumber ru_with_extension;
ru_with_extension.set_country_code(7);
ru_with_extension.set_national_number(4232022511L);
ru_with_extension.set_extension("100");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11, \xd0\xb4\xd0\xbe\xd0\xb1. 100",
RegionCode::RU(), &test_number));
EXPECT_EQ(ru_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11 \xd0\xb4\xd0\xbe\xd0\xb1. 100",
RegionCode::RU(), &test_number));
EXPECT_EQ(ru_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11, \xd0\xb4\xd0\xbe\xd0\xb1 100",
RegionCode::RU(), &test_number));
EXPECT_EQ(ru_with_extension, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11 \xd0\xb4\xd0\xbe\xd0\xb1 100",
RegionCode::RU(), &test_number));
EXPECT_EQ(ru_with_extension, test_number);
// We are suppose to test input without spaces before and after this extension
// character. As hex escape sequence becomes out of range, postfixed a space
// to extension character here.
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11\xd0\xb4\xd0\xbe\xd0\xb1 100",
RegionCode::RU(), &test_number));
// In upper case
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse(
"8 (423) 202-25-11 \xd0\x94\xd0\x9e\xd0\x91 100",
RegionCode::RU(), &test_number));
EXPECT_EQ(ru_with_extension, test_number);
// Test that if a number has two extensions specified, we ignore the second.
PhoneNumber us_with_two_extensions_number;
us_with_two_extensions_number.set_country_code(1);
us_with_two_extensions_number.set_national_number(2121231234ULL);
us_with_two_extensions_number.set_extension("508");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(212)123-1234 x508/x1234", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_two_extensions_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(212)123-1234 x508/ x1234", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_two_extensions_number, test_number);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("(212)123-1234 x508\\x1234", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_two_extensions_number, test_number);
// Test parsing numbers in the form (645) 123-1234-910# works, where the last
// 3 digits before the # are an extension.
us_with_extension.Clear();
us_with_extension.set_country_code(1);
us_with_extension.set_national_number(6451231234ULL);
us_with_extension.set_extension("910");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("+1 (645) 123 1234-910#", RegionCode::US(),
&test_number));
EXPECT_EQ(us_with_extension, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseAndKeepRaw) {
PhoneNumber alpha_numeric_number;
alpha_numeric_number.set_country_code(1);
alpha_numeric_number.set_national_number(80074935247ULL);
alpha_numeric_number.set_raw_input("800 six-flags");
alpha_numeric_number.set_country_code_source(
PhoneNumber::FROM_DEFAULT_COUNTRY);
PhoneNumber test_number;
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("800 six-flags", RegionCode::US(),
&test_number));
EXPECT_EQ(alpha_numeric_number, test_number);
alpha_numeric_number.set_national_number(8007493524ULL);
alpha_numeric_number.set_raw_input("1800 six-flag");
alpha_numeric_number.set_country_code_source(
PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("1800 six-flag", RegionCode::US(),
&test_number));
EXPECT_EQ(alpha_numeric_number, test_number);
alpha_numeric_number.set_raw_input("+1800 six-flag");
alpha_numeric_number.set_country_code_source(
PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("+1800 six-flag", RegionCode::CN(),
&test_number));
EXPECT_EQ(alpha_numeric_number, test_number);
alpha_numeric_number.set_raw_input("001800 six-flag");
alpha_numeric_number.set_country_code_source(
PhoneNumber::FROM_NUMBER_WITH_IDD);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("001800 six-flag",
RegionCode::NZ(),
&test_number));
EXPECT_EQ(alpha_numeric_number, test_number);
// Try with invalid region - expect failure. We clear the test number first
// because if parsing isn't successful, the number parsed in won't be changed.
test_number.Clear();
EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
phone_util_.Parse("123 456 7890", RegionCode::CS(), &test_number));
EXPECT_EQ(PhoneNumber::default_instance(), test_number);
PhoneNumber korean_number;
korean_number.set_country_code(82);
korean_number.set_national_number(22123456);
korean_number.set_raw_input("08122123456");
korean_number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
korean_number.set_preferred_domestic_carrier_code("81");
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.ParseAndKeepRawInput("08122123456",
RegionCode::KR(),
&test_number));
EXPECT_EQ(korean_number, test_number);
}
TEST_F(PhoneNumberUtilTest, ParseItalianLeadingZeros) {
PhoneNumber zeros_number;
zeros_number.set_country_code(61);
PhoneNumber test_number;
// Test the number "011".
zeros_number.set_national_number(11L);
zeros_number.set_italian_leading_zero(true);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("011", RegionCode::AU(),
&test_number));
EXPECT_EQ(zeros_number, test_number);
// Test the number "001".
zeros_number.set_national_number(1L);
zeros_number.set_italian_leading_zero(true);
zeros_number.set_number_of_leading_zeros(2);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("001", RegionCode::AU(),
&test_number));
EXPECT_EQ(zeros_number, test_number);
// Test the number "000". This number has 2 leading zeros.
zeros_number.set_national_number(0L);
zeros_number.set_italian_leading_zero(true);
zeros_number.set_number_of_leading_zeros(2);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("000", RegionCode::AU(),
&test_number));
EXPECT_EQ(zeros_number, test_number);
// Test the number "0000". This number has 3 leading zeros.
zeros_number.set_national_number(0L);
zeros_number.set_italian_leading_zero(true);
zeros_number.set_number_of_leading_zeros(3);
EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
phone_util_.Parse("0000", RegionCode::AU(),
&test_number));
EXPECT_EQ(zeros_number, test_number);
}
TEST_F(PhoneNumberUtilTest, CanBeInternationallyDialled) {
PhoneNumber test_number;
test_number.set_country_code(1);
// We have no-international-dialling rules for the US in our test metadata
// that say that toll-free numbers cannot be dialled internationally.
test_number.set_national_number(8002530000ULL);
EXPECT_FALSE(phone_util_.CanBeInternationallyDialled(test_number));
// Normal US numbers can be internationally dialled.
test_number.set_national_number(6502530000ULL);
EXPECT_TRUE(phone_util_.CanBeInternationallyDialled(test_number));
// Invalid number.
test_number.set_national_number(2530000ULL);
EXPECT_TRUE(phone_util_.CanBeInternationallyDialled(test_number));
// We have no data for NZ - should return true.
test_number.set_country_code(64);
test_number.set_national_number(33316005ULL);
EXPECT_TRUE(phone_util_.CanBeInternationallyDialled(test_number));
test_number.set_country_code(800);
test_number.set_national_number(12345678ULL);
EXPECT_TRUE(phone_util_.CanBeInternationallyDialled(test_number));
}
TEST_F(PhoneNumberUtilTest, IsAlphaNumber) {
EXPECT_TRUE(phone_util_.IsAlphaNumber("1800 six-flags"));
EXPECT_TRUE(phone_util_.IsAlphaNumber("1800 six-flags ext. 1234"));
EXPECT_TRUE(phone_util_.IsAlphaNumber("+800 six-flags"));
EXPECT_TRUE(phone_util_.IsAlphaNumber("180 six-flags"));
EXPECT_FALSE(phone_util_.IsAlphaNumber("1800 123-1234"));
EXPECT_FALSE(phone_util_.IsAlphaNumber("1 six-flags"));
EXPECT_FALSE(phone_util_.IsAlphaNumber("18 six-flags"));
EXPECT_FALSE(phone_util_.IsAlphaNumber("1800 123-1234 extension: 1234"));
EXPECT_FALSE(phone_util_.IsAlphaNumber("+800 1234-1234"));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/phonenumberutil_test.cc
|
C++
|
unknown
| 203,888
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: George Yakovlev
// Philippe Liard
#include "phonenumbers/regexp_adapter.h"
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/stl_util.h"
#include "phonenumbers/stringutil.h"
#ifdef I18N_PHONENUMBERS_USE_RE2
#include "phonenumbers/regexp_adapter_re2.h"
#else
#include "phonenumbers/regexp_adapter_icu.h"
#endif // I18N_PHONENUMBERS_USE_RE2
namespace i18n {
namespace phonenumbers {
using std::vector;
// Structure that contains the attributes used to test an implementation of the
// regexp adapter.
struct RegExpTestContext {
explicit RegExpTestContext(const string& name,
const AbstractRegExpFactory* factory)
: name(name),
factory(factory),
digits(factory->CreateRegExp("\\d+")),
parentheses_digits(factory->CreateRegExp("\\((\\d+)\\)")),
single_digit(factory->CreateRegExp("\\d")),
two_digit_groups(factory->CreateRegExp("(\\d+)-(\\d+)")) {}
const string name;
const scoped_ptr<const AbstractRegExpFactory> factory;
const scoped_ptr<const RegExp> digits;
const scoped_ptr<const RegExp> parentheses_digits;
const scoped_ptr<const RegExp> single_digit;
const scoped_ptr<const RegExp> two_digit_groups;
};
class RegExpAdapterTest : public testing::Test {
protected:
RegExpAdapterTest() {
#ifdef I18N_PHONENUMBERS_USE_RE2
contexts_.push_back(
new RegExpTestContext("RE2", new RE2RegExpFactory()));
#else
contexts_.push_back(
new RegExpTestContext("ICU Regex", new ICURegExpFactory()));
#endif // I18N_PHONENUMBERS_USE_RE2
}
~RegExpAdapterTest() { gtl::STLDeleteElements(&contexts_); }
static string ErrorMessage(const RegExpTestContext& context) {
return StrCat("Test failed with ", context.name, " implementation.");
}
typedef vector<const RegExpTestContext*>::const_iterator TestContextIterator;
vector<const RegExpTestContext*> contexts_;
};
TEST_F(RegExpAdapterTest, TestConsumeNoMatch) {
for (vector<const RegExpTestContext*>::const_iterator it = contexts_.begin();
it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const scoped_ptr<RegExpInput> input(
context.factory->CreateInput("+1-123-456-789"));
// When 'true' is passed to Consume(), the match occurs from the beginning
// of the input.
ASSERT_FALSE(context.digits->Consume(input.get(), true, NULL, NULL, NULL))
<< ErrorMessage(context);
ASSERT_EQ("+1-123-456-789", input->ToString()) << ErrorMessage(context);
string res1;
ASSERT_FALSE(context.parentheses_digits->Consume(
input.get(), true, &res1, NULL, NULL)) << ErrorMessage(context);
ASSERT_EQ("+1-123-456-789", input->ToString()) << ErrorMessage(context);
ASSERT_EQ("", res1) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestConsumeWithNull) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const AbstractRegExpFactory& factory = *context.factory;
const scoped_ptr<RegExpInput> input(factory.CreateInput("+123"));
const scoped_ptr<const RegExp> plus_sign(factory.CreateRegExp("(\\+)"));
ASSERT_TRUE(plus_sign->Consume(input.get(), true, NULL, NULL, NULL))
<< ErrorMessage(context);
ASSERT_EQ("123", input->ToString()) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestConsumeRetainsMatches) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const scoped_ptr<RegExpInput> input(
context.factory->CreateInput("1-123-456-789"));
string res1, res2;
ASSERT_TRUE(context.two_digit_groups->Consume(
input.get(), true, &res1, &res2, NULL)) << ErrorMessage(context);
ASSERT_EQ("-456-789", input->ToString()) << ErrorMessage(context);
ASSERT_EQ("1", res1) << ErrorMessage(context);
ASSERT_EQ("123", res2) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestFindAndConsume) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const scoped_ptr<RegExpInput> input(
context.factory->CreateInput("+1-123-456-789"));
// When 'false' is passed to Consume(), the match can occur from any place
// in the input.
ASSERT_TRUE(context.digits->Consume(input.get(), false, NULL, NULL, NULL))
<< ErrorMessage(context);
ASSERT_EQ("-123-456-789", input->ToString()) << ErrorMessage(context);
ASSERT_TRUE(context.digits->Consume(input.get(), false, NULL, NULL, NULL))
<< ErrorMessage(context);
ASSERT_EQ("-456-789", input->ToString()) << ErrorMessage(context);
ASSERT_FALSE(context.parentheses_digits->Consume(
input.get(), false, NULL, NULL, NULL)) << ErrorMessage(context);
ASSERT_EQ("-456-789", input->ToString()) << ErrorMessage(context);
string res1, res2;
ASSERT_TRUE(context.two_digit_groups->Consume(
input.get(), false, &res1, &res2, NULL)) << ErrorMessage(context);
ASSERT_EQ("", input->ToString()) << ErrorMessage(context);
ASSERT_EQ("456", res1) << ErrorMessage(context);
ASSERT_EQ("789", res2) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestPartialMatch) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const AbstractRegExpFactory& factory = *context.factory;
const scoped_ptr<const RegExp> reg_exp(factory.CreateRegExp("([\\da-z]+)"));
string matched;
EXPECT_TRUE(reg_exp->PartialMatch("12345af", &matched))
<< ErrorMessage(context);
EXPECT_EQ("12345af", matched) << ErrorMessage(context);
EXPECT_TRUE(reg_exp->PartialMatch("12345af", NULL))
<< ErrorMessage(context);
EXPECT_TRUE(reg_exp->PartialMatch("[12]", &matched))
<< ErrorMessage(context);
EXPECT_EQ("12", matched) << ErrorMessage(context);
matched.clear();
EXPECT_FALSE(reg_exp->PartialMatch("[]", &matched))
<< ErrorMessage(context);
EXPECT_EQ("", matched) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestFullMatch) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const AbstractRegExpFactory& factory = *context.factory;
const scoped_ptr<const RegExp> reg_exp(factory.CreateRegExp("([\\da-z]+)"));
string matched;
EXPECT_TRUE(reg_exp->FullMatch("12345af", &matched))
<< ErrorMessage(context);
EXPECT_EQ("12345af", matched) << ErrorMessage(context);
EXPECT_TRUE(reg_exp->FullMatch("12345af", NULL)) << ErrorMessage(context);
matched.clear();
EXPECT_FALSE(reg_exp->FullMatch("[12]", &matched)) << ErrorMessage(context);
EXPECT_EQ("", matched) << ErrorMessage(context);
matched.clear();
EXPECT_FALSE(reg_exp->FullMatch("[]", &matched)) << ErrorMessage(context);
EXPECT_EQ("", matched) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestReplace) {
for (vector<const RegExpTestContext*>::const_iterator it = contexts_.begin();
it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
string input("123-4567 ");
ASSERT_TRUE(context.single_digit->Replace(&input, "+"))
<< ErrorMessage(context);
ASSERT_EQ("+23-4567 ", input) << ErrorMessage(context);
ASSERT_TRUE(context.single_digit->Replace(&input, "+"))
<< ErrorMessage(context);
ASSERT_EQ("++3-4567 ", input) << ErrorMessage(context);
const scoped_ptr<const RegExp> single_letter(
context.factory->CreateRegExp("[a-z]"));
ASSERT_FALSE(single_letter->Replace(&input, "+")) << ErrorMessage(context);
ASSERT_EQ("++3-4567 ", input) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestReplaceWithGroup) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
// Make sure referencing groups in the regexp in the replacement string
// works. $[0-9] notation is used.
string input = "123-4567 abc";
ASSERT_TRUE(context.two_digit_groups->Replace(&input, "$2"))
<< ErrorMessage(context);
ASSERT_EQ("4567 abc", input) << ErrorMessage(context);
input = "123-4567";
ASSERT_TRUE(context.two_digit_groups->Replace(&input, "$1"))
<< ErrorMessage(context);
ASSERT_EQ("123", input) << ErrorMessage(context);
input = "123-4567";
ASSERT_TRUE(context.two_digit_groups->Replace(&input, "$2"))
<< ErrorMessage(context);
ASSERT_EQ("4567", input) << ErrorMessage(context);
input = "123-4567";
ASSERT_TRUE(context.two_digit_groups->Replace(&input, "$1 $2"))
<< ErrorMessage(context);
ASSERT_EQ("123 4567", input) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestReplaceWithDollarSign) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
// Make sure '$' can be used in the replacement string when escaped.
string input = "123-4567";
ASSERT_TRUE(context.two_digit_groups->Replace(&input, "\\$1 \\$2"))
<< ErrorMessage(context);
ASSERT_EQ("$1 $2", input) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestGlobalReplace) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
string input("123-4567 ");
ASSERT_TRUE(context.single_digit->GlobalReplace(&input, "*"))
<< ErrorMessage(context);
ASSERT_EQ("***-**** ", input) << ErrorMessage(context);
ASSERT_FALSE(context.single_digit->GlobalReplace(&input, "*"))
<< ErrorMessage(context);
ASSERT_EQ("***-**** ", input) << ErrorMessage(context);
}
}
TEST_F(RegExpAdapterTest, TestUtf8) {
for (TestContextIterator it = contexts_.begin(); it != contexts_.end();
++it) {
const RegExpTestContext& context = **it;
const AbstractRegExpFactory& factory = *context.factory;
const scoped_ptr<const RegExp> reg_exp(factory.CreateRegExp(
"\xE2\x84\xA1\xE2\x8A\x8F([\xCE\xB1-\xCF\x89]*)\xE2\x8A\x90"
/* "℡⊏([α-ω]*)⊐" */));
string matched;
EXPECT_FALSE(reg_exp->Match(
"\xE2\x84\xA1\xE2\x8A\x8F" "123\xE2\x8A\x90" /* "℡⊏123⊐" */, true,
&matched)) << ErrorMessage(context);
EXPECT_TRUE(reg_exp->Match(
"\xE2\x84\xA1\xE2\x8A\x8F\xCE\xB1\xCE\xB2\xE2\x8A\x90"
/* "℡⊏αβ⊐" */, true, &matched)) << ErrorMessage(context);
EXPECT_EQ("\xCE\xB1\xCE\xB2" /* "αβ" */, matched) << ErrorMessage(context);
}
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/regexp_adapter_test.cc
|
C++
|
unknown
| 11,492
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Fredrik Roubert
#include <cstddef>
#include <string>
#include <gtest/gtest.h>
#include "phonenumbers/base/synchronization/lock.h"
#include "phonenumbers/regexp_cache.h"
#include "phonenumbers/regexp_factory.h"
namespace i18n {
namespace phonenumbers {
using std::string;
class RegExpCacheTest : public testing::Test {
protected:
static const size_t min_items_ = 2;
RegExpCacheTest() : cache_(regexp_factory_, min_items_) {}
virtual ~RegExpCacheTest() {}
RegExpFactory regexp_factory_;
RegExpCache cache_;
};
TEST_F(RegExpCacheTest, CacheConstructor) {
AutoLock l(cache_.lock_);
ASSERT_TRUE(cache_.cache_impl_ != NULL);
EXPECT_TRUE(cache_.cache_impl_->empty());
}
TEST_F(RegExpCacheTest, GetRegExp) {
static const string pattern1("foo");
static const string pattern2("foo");
const RegExp& regexp1 = cache_.GetRegExp(pattern1);
// "foo" has been cached therefore we must get the same object.
const RegExp& regexp2 = cache_.GetRegExp(pattern2);
EXPECT_TRUE(®exp1 == ®exp2);
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/regexp_cache_test.cc
|
C++
|
unknown
| 1,688
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <gtest/gtest.h>
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/run_tests.cc
|
C++
|
unknown
| 735
|
// Copyright (C) 2009 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: David Yonge-Mallo
// Note that these tests use the test metadata, not the normal metadata file, so
// should not be used for regression test purposes - these tests are
// illustrative only and test functionality.
#include "phonenumbers/shortnumberinfo.h"
#include <gtest/gtest.h>
#include "phonenumbers/base/logging.h"
#include "phonenumbers/default_logger.h"
#include "phonenumbers/phonenumberutil.h"
#include "phonenumbers/stringutil.h"
#include "phonenumbers/test_util.h"
namespace i18n {
namespace phonenumbers {
class ShortNumberInfoTest : public testing::Test {
protected:
PhoneNumber ParseNumberForTesting(const string& number,
const string& region_code) {
PhoneNumber phone_number;
PhoneNumberUtil::ErrorType error_type = phone_util_.Parse(
number, region_code, &phone_number);
CHECK_EQ(error_type, PhoneNumberUtil::NO_PARSING_ERROR);
IGNORE_UNUSED(error_type);
return phone_number;
}
ShortNumberInfoTest() : short_info_() {
PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
}
const PhoneNumberUtil phone_util_;
const ShortNumberInfo short_info_;
private:
DISALLOW_COPY_AND_ASSIGN(ShortNumberInfoTest);
};
TEST_F(ShortNumberInfoTest, IsPossibleShortNumber) {
PhoneNumber possible_number;
possible_number.set_country_code(33);
possible_number.set_national_number(123456ULL);
EXPECT_TRUE(short_info_.IsPossibleShortNumber(possible_number));
EXPECT_TRUE(short_info_.IsPossibleShortNumberForRegion(
ParseNumberForTesting("123456", RegionCode::FR()), RegionCode::FR()));
PhoneNumber impossible_number;
impossible_number.set_country_code(33);
impossible_number.set_national_number(9ULL);
EXPECT_FALSE(short_info_.IsPossibleShortNumber(impossible_number));
// Note that GB and GG share the country calling code 44, and that this
// number is possible but not valid.
PhoneNumber shared_number;
shared_number.set_country_code(44);
shared_number.set_national_number(11001ULL);
EXPECT_TRUE(short_info_.IsPossibleShortNumber(shared_number));
}
TEST_F(ShortNumberInfoTest, IsValidShortNumber) {
PhoneNumber valid_number;
valid_number.set_country_code(33);
valid_number.set_national_number(1010ULL);
EXPECT_TRUE(short_info_.IsValidShortNumber(valid_number));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("1010", RegionCode::FR()), RegionCode::FR()));
PhoneNumber invalid_number;
invalid_number.set_country_code(33);
invalid_number.set_national_number(123456ULL);
EXPECT_FALSE(short_info_.IsValidShortNumber(invalid_number));
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("123456", RegionCode::FR()), RegionCode::FR()));
// Note that GB and GG share the country calling code 44.
PhoneNumber shared_number;
shared_number.set_country_code(44);
shared_number.set_national_number(18001ULL);
EXPECT_TRUE(short_info_.IsValidShortNumber(shared_number));
}
TEST_F(ShortNumberInfoTest, IsCarrierSpecific) {
PhoneNumber carrier_specific_number;
carrier_specific_number.set_country_code(1);
carrier_specific_number.set_national_number(33669ULL);
EXPECT_TRUE(short_info_.IsCarrierSpecific(carrier_specific_number));
EXPECT_TRUE(short_info_.IsCarrierSpecificForRegion(
ParseNumberForTesting("33669", RegionCode::US()), RegionCode::US()));
PhoneNumber not_carrier_specific_number;
not_carrier_specific_number.set_country_code(1);
not_carrier_specific_number.set_national_number(911ULL);
EXPECT_FALSE(short_info_.IsCarrierSpecific(not_carrier_specific_number));
EXPECT_FALSE(short_info_.IsCarrierSpecificForRegion(
ParseNumberForTesting("911", RegionCode::US()), RegionCode::US()));
PhoneNumber carrier_specific_number_for_some_region;
carrier_specific_number_for_some_region.set_country_code(1);
carrier_specific_number_for_some_region.set_national_number(211ULL);
EXPECT_TRUE(short_info_.IsCarrierSpecific(
carrier_specific_number_for_some_region));
EXPECT_TRUE(short_info_.IsCarrierSpecificForRegion(
carrier_specific_number_for_some_region, RegionCode::US()));
EXPECT_FALSE(short_info_.IsCarrierSpecificForRegion(
carrier_specific_number_for_some_region, RegionCode::BB()));
}
TEST_F(ShortNumberInfoTest, IsSmsService) {
PhoneNumber sms_service_number_for_some_region;
sms_service_number_for_some_region.set_country_code(1);
sms_service_number_for_some_region.set_national_number(21234ULL);
EXPECT_TRUE(short_info_.IsSmsServiceForRegion(
sms_service_number_for_some_region, RegionCode::US()));
EXPECT_FALSE(short_info_.IsSmsServiceForRegion(
sms_service_number_for_some_region, RegionCode::BB()));
}
TEST_F(ShortNumberInfoTest, GetExpectedCost) {
uint64 national_number;
const string& premium_rate_example =
short_info_.GetExampleShortNumberForCost(
RegionCode::FR(), ShortNumberInfo::PREMIUM_RATE);
EXPECT_EQ(ShortNumberInfo::PREMIUM_RATE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(premium_rate_example, RegionCode::FR()),
RegionCode::FR()));
PhoneNumber premium_rate_number;
premium_rate_number.set_country_code(33);
safe_strtou64(premium_rate_example, &national_number);
premium_rate_number.set_national_number(national_number);
EXPECT_EQ(ShortNumberInfo::PREMIUM_RATE,
short_info_.GetExpectedCost(premium_rate_number));
const string& standard_rate_example =
short_info_.GetExampleShortNumberForCost(
RegionCode::FR(), ShortNumberInfo::STANDARD_RATE);
EXPECT_EQ(ShortNumberInfo::STANDARD_RATE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(standard_rate_example, RegionCode::FR()),
RegionCode::FR()));
PhoneNumber standard_rate_number;
standard_rate_number.set_country_code(33);
safe_strtou64(standard_rate_example, &national_number);
standard_rate_number.set_national_number(national_number);
EXPECT_EQ(ShortNumberInfo::STANDARD_RATE,
short_info_.GetExpectedCost(standard_rate_number));
const string& toll_free_example =
short_info_.GetExampleShortNumberForCost(
RegionCode::FR(), ShortNumberInfo::TOLL_FREE);
EXPECT_EQ(ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(toll_free_example, RegionCode::FR()),
RegionCode::FR()));
PhoneNumber toll_free_number;
toll_free_number.set_country_code(33);
safe_strtou64(toll_free_example, &national_number);
toll_free_number.set_national_number(national_number);
EXPECT_EQ(ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCost(toll_free_number));
EXPECT_EQ(
ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("12345", RegionCode::FR()), RegionCode::FR()));
PhoneNumber unknown_cost_number;
unknown_cost_number.set_country_code(33);
unknown_cost_number.set_national_number(12345ULL);
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCost(unknown_cost_number));
// Test that an invalid number may nevertheless have a cost other than
// UNKNOWN_COST.
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("116123", RegionCode::FR()), RegionCode::FR()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("116123", RegionCode::FR()), RegionCode::FR()));
PhoneNumber invalid_number;
invalid_number.set_country_code(33);
invalid_number.set_national_number(116123ULL);
EXPECT_FALSE(short_info_.IsValidShortNumber(invalid_number));
EXPECT_EQ(ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCost(invalid_number));
// Test a nonexistent country code.
EXPECT_EQ(
ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("911", RegionCode::US()), RegionCode::ZZ()));
unknown_cost_number.Clear();
unknown_cost_number.set_country_code(123);
unknown_cost_number.set_national_number(911ULL);
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCost(unknown_cost_number));
}
TEST_F(ShortNumberInfoTest, GetExpectedCostForSharedCountryCallingCode) {
// Test some numbers which have different costs in countries sharing the same
// country calling code. In Australia, 1234 is premium-rate, 1194 is
// standard-rate, and 733 is toll-free. These are not known to be valid
// numbers in the Christmas Islands.
string ambiguous_premium_rate_string("1234");
PhoneNumber ambiguous_premium_rate_number;
ambiguous_premium_rate_number.set_country_code(61);
ambiguous_premium_rate_number.set_national_number(1234ULL);
string ambiguous_standard_rate_string("1194");
PhoneNumber ambiguous_standard_rate_number;
ambiguous_standard_rate_number.set_country_code(61);
ambiguous_standard_rate_number.set_national_number(1194ULL);
string ambiguous_toll_free_string("733");
PhoneNumber ambiguous_toll_free_number;
ambiguous_toll_free_number.set_country_code(61);
ambiguous_toll_free_number.set_national_number(733ULL);
EXPECT_TRUE(short_info_.IsValidShortNumber(ambiguous_premium_rate_number));
EXPECT_TRUE(short_info_.IsValidShortNumber(ambiguous_standard_rate_number));
EXPECT_TRUE(short_info_.IsValidShortNumber(ambiguous_toll_free_number));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_premium_rate_string, RegionCode::AU()),
RegionCode::AU()));
EXPECT_EQ(ShortNumberInfo::PREMIUM_RATE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_premium_rate_string,
RegionCode::AU()),
RegionCode::AU()));
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_premium_rate_string, RegionCode::CX()),
RegionCode::CX()));
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_premium_rate_string,
RegionCode::CX()),
RegionCode::CX()));
// PREMIUM_RATE takes precedence over UNKNOWN_COST.
EXPECT_EQ(ShortNumberInfo::PREMIUM_RATE,
short_info_.GetExpectedCost(ambiguous_premium_rate_number));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_standard_rate_string, RegionCode::AU()),
RegionCode::AU()));
EXPECT_EQ(ShortNumberInfo::STANDARD_RATE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_standard_rate_string,
RegionCode::AU()),
RegionCode::AU()));
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_standard_rate_string, RegionCode::CX()),
RegionCode::CX()));
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_standard_rate_string,
RegionCode::CX()),
RegionCode::CX()));
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCost(ambiguous_standard_rate_number));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_toll_free_string, RegionCode::AU()),
RegionCode::AU()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_toll_free_string, RegionCode::AU()),
RegionCode::AU()));
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting(ambiguous_toll_free_string, RegionCode::CX()),
RegionCode::CX()));
EXPECT_EQ(
ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting(ambiguous_toll_free_string, RegionCode::CX()),
RegionCode::CX()));
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCost(ambiguous_toll_free_number));
}
TEST_F(ShortNumberInfoTest, GetExampleShortNumber) {
EXPECT_FALSE(short_info_.GetExampleShortNumber(RegionCode::AD()).empty());
EXPECT_FALSE(short_info_.GetExampleShortNumber(RegionCode::FR()).empty());
EXPECT_TRUE(short_info_.GetExampleShortNumber(RegionCode::UN001()).empty());
EXPECT_TRUE(
short_info_.GetExampleShortNumber(RegionCode::GetUnknown()).empty());
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumber_US) {
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("911", RegionCode::US()));
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("112", RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("999", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumberLongNumber_US) {
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("9116666666",
RegionCode::US()));
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("1126666666",
RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("9996666666",
RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumberWithFormatting_US) {
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("9-1-1", RegionCode::US()));
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("1-1-2", RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("9-9-9",
RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumberWithPlusSign_US) {
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("+911", RegionCode::US()));
// This hex sequence is the full-width plus sign U+FF0B.
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("\xEF\xBC\x8B" "911",
RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber(" +911",
RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("+112", RegionCode::US()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("+999", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumber_BR) {
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("911", RegionCode::BR()));
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("190", RegionCode::BR()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("999", RegionCode::BR()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumberLongNumber_BR) {
// Brazilian emergency numbers don't work when additional digits are appended.
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("9111", RegionCode::BR()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("1900", RegionCode::BR()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("9996", RegionCode::BR()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumber_CL) {
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("131", RegionCode::CL()));
EXPECT_TRUE(short_info_.ConnectsToEmergencyNumber("133", RegionCode::CL()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumberLongNumber_CL) {
// Chilean emergency numbers don't work when additional digits are appended.
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("1313", RegionCode::CL()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("1330", RegionCode::CL()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumber_AO) {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("911", RegionCode::AO()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("222123456",
RegionCode::AO()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("923123456",
RegionCode::AO()));
}
TEST_F(ShortNumberInfoTest, ConnectsToEmergencyNumber_ZW) {
// Zimbabwe doesn't have any metadata in the test metadata.
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("911", RegionCode::ZW()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("01312345",
RegionCode::ZW()));
EXPECT_FALSE(short_info_.ConnectsToEmergencyNumber("0711234567",
RegionCode::ZW()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumber_US) {
EXPECT_TRUE(short_info_.IsEmergencyNumber("911", RegionCode::US()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("112", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("999", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumberLongNumber_US) {
EXPECT_FALSE(short_info_.IsEmergencyNumber("9116666666", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("1126666666", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("9996666666", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumberWithFormatting_US) {
EXPECT_TRUE(short_info_.IsEmergencyNumber("9-1-1", RegionCode::US()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("*911", RegionCode::US()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("1-1-2", RegionCode::US()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("*112", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("9-9-9", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("*999", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumberWithPlusSign_US) {
EXPECT_FALSE(short_info_.IsEmergencyNumber("+911", RegionCode::US()));
// This hex sequence is the full-width plus sign U+FF0B.
EXPECT_FALSE(short_info_.IsEmergencyNumber("\xEF\xBC\x8B" "911",
RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber(" +911", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("+112", RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("+999", RegionCode::US()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumber_BR) {
EXPECT_TRUE(short_info_.IsEmergencyNumber("911", RegionCode::BR()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("190", RegionCode::BR()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("999", RegionCode::BR()));
}
TEST_F(ShortNumberInfoTest, EmergencyNumberLongNumber_BR) {
EXPECT_FALSE(short_info_.IsEmergencyNumber("9111", RegionCode::BR()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("1900", RegionCode::BR()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("9996", RegionCode::BR()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumber_AO) {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
EXPECT_FALSE(short_info_.IsEmergencyNumber("911", RegionCode::AO()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("222123456", RegionCode::AO()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("923123456", RegionCode::AO()));
}
TEST_F(ShortNumberInfoTest, IsEmergencyNumber_ZW) {
// Zimbabwe doesn't have any metadata in the test metadata.
EXPECT_FALSE(short_info_.IsEmergencyNumber("911", RegionCode::ZW()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("01312345", RegionCode::ZW()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("0711234567", RegionCode::ZW()));
}
TEST_F(ShortNumberInfoTest, EmergencyNumberForSharedCountryCallingCode) {
// Test the emergency number 112, which is valid in both Australia and the
// Christmas Islands.
EXPECT_TRUE(short_info_.IsEmergencyNumber("112", RegionCode::AU()));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("112", RegionCode::AU()), RegionCode::AU()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("112", RegionCode::AU()), RegionCode::AU()));
EXPECT_TRUE(short_info_.IsEmergencyNumber("112", RegionCode::CX()));
EXPECT_TRUE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("112", RegionCode::CX()), RegionCode::CX()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("112", RegionCode::CX()), RegionCode::CX()));
PhoneNumber shared_emergency_number;
shared_emergency_number.set_country_code(61);
shared_emergency_number.set_national_number(112ULL);
EXPECT_TRUE(short_info_.IsValidShortNumber(shared_emergency_number));
EXPECT_EQ(ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCost(shared_emergency_number));
}
TEST_F(ShortNumberInfoTest, OverlappingNANPANumber) {
// 211 is an emergency number in Barbados, while it is a toll-free
// information line in Canada and the USA.
EXPECT_TRUE(short_info_.IsEmergencyNumber("211", RegionCode::BB()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("211", RegionCode::BB()), RegionCode::BB()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("211", RegionCode::US()));
EXPECT_EQ(
ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("211", RegionCode::US()), RegionCode::US()));
EXPECT_FALSE(short_info_.IsEmergencyNumber("211", RegionCode::CA()));
EXPECT_EQ(
ShortNumberInfo::TOLL_FREE,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("211", RegionCode::CA()), RegionCode::CA()));
}
TEST_F(ShortNumberInfoTest, CountryCallingCodeIsNotIgnored) {
// +46 is the country calling code for Sweden (SE), and 40404 is a valid short
// number in the US.
EXPECT_FALSE(short_info_.IsPossibleShortNumberForRegion(
ParseNumberForTesting("+4640404", RegionCode::SE()), RegionCode::US()));
EXPECT_FALSE(short_info_.IsValidShortNumberForRegion(
ParseNumberForTesting("+4640404", RegionCode::SE()), RegionCode::US()));
EXPECT_EQ(ShortNumberInfo::UNKNOWN_COST,
short_info_.GetExpectedCostForRegion(
ParseNumberForTesting("+4640404", RegionCode::SE()),
RegionCode::US()));
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/shortnumberinfo_test.cc
|
C++
|
unknown
| 22,489
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include "phonenumbers/stringutil.h"
#include <string>
#include <vector>
#include <gtest/gtest.h>
using std::string;
using std::vector;
namespace i18n {
namespace phonenumbers {
// Test operator+(const string&, int).
TEST(StringUtilTest, OperatorPlus) {
EXPECT_EQ("hello10", string("hello") + 10);
}
// Test SimpleItoa implementation.
TEST(StringUtilTest, SimpleItoa) {
EXPECT_EQ("10", SimpleItoa(10));
}
TEST(StringUtilTest, HasPrefixString) {
EXPECT_TRUE(HasPrefixString("hello world", "hello"));
EXPECT_FALSE(HasPrefixString("hello world", "hellO"));
}
TEST(StringUtilTest, FindNthWithEmptyString) {
EXPECT_EQ(string::npos, FindNth("", 'a', 1));
}
TEST(StringUtilTest, FindNthWithNNegative) {
EXPECT_EQ(string::npos, FindNth("hello world", 'o', -1));
}
TEST(StringUtilTest, FindNthWithNTooHigh) {
EXPECT_EQ(string::npos, FindNth("hello world", 'o', 3));
}
TEST(StringUtilTest, FindNth) {
EXPECT_EQ(7U, FindNth("hello world", 'o', 2));
}
TEST(StringUtilTest, SplitStringUsingWithEmptyString) {
vector<string> result;
SplitStringUsing("", ":", &result);
EXPECT_EQ(0U, result.size());
}
TEST(StringUtilTest, SplitStringUsingWithEmptyDelimiter) {
vector<string> result;
SplitStringUsing("hello", "", &result);
EXPECT_EQ(0U, result.size());
}
TEST(StringUtilTest, SplitStringUsing) {
vector<string> result;
SplitStringUsing(":hello:world:", ":", &result);
EXPECT_EQ(2U, result.size());
EXPECT_EQ("hello", result[0]);
EXPECT_EQ("world", result[1]);
}
TEST(StringUtilTest, SplitStringUsingIgnoresEmptyToken) {
vector<string> result;
SplitStringUsing("hello::world", ":", &result);
EXPECT_EQ(2U, result.size());
EXPECT_EQ("hello", result[0]);
EXPECT_EQ("world", result[1]);
}
// Test TryStripPrefixString.
TEST(StringUtilTest, TryStripPrefixString) {
string s;
EXPECT_TRUE(TryStripPrefixString("hello world", "hello", &s));
EXPECT_EQ(" world", s);
s.clear();
EXPECT_FALSE(TryStripPrefixString("hello world", "helloa", &s));
s.clear();
EXPECT_TRUE(TryStripPrefixString("hello world", "", &s));
EXPECT_EQ("hello world", s);
s.clear();
EXPECT_FALSE(TryStripPrefixString("", "hello", &s));
s.clear();
}
// Test HasSuffixString.
TEST(StringUtilTest, HasSuffixString) {
EXPECT_TRUE(HasSuffixString("hello world", "hello world"));
EXPECT_TRUE(HasSuffixString("hello world", "world"));
EXPECT_FALSE(HasSuffixString("hello world", "world!"));
EXPECT_TRUE(HasSuffixString("hello world", ""));
EXPECT_FALSE(HasSuffixString("", "hello"));
}
// Test safe_strto32.
TEST(StringUtilTest, safe_strto32) {
int32 n;
safe_strto32("0", &n);
EXPECT_EQ(0, n);
safe_strto32("16", &n);
EXPECT_EQ(16, n);
safe_strto32("2147483647", &n);
EXPECT_EQ(2147483647, n);
safe_strto32("-2147483648", &n);
EXPECT_EQ(-2147483648LL, n);
}
// Test safe_strtou64.
TEST(StringUtilTest, safe_strtou64) {
uint64 n;
safe_strtou64("0", &n);
EXPECT_EQ(0U, n);
safe_strtou64("16", &n);
EXPECT_EQ(16U, n);
safe_strtou64("18446744073709551615UL", &n);
EXPECT_EQ(18446744073709551615ULL, n);
}
// Test strrmm.
TEST(StringUtilTest, strrmm) {
string input("hello");
strrmm(&input, "");
EXPECT_EQ(input, input);
string empty;
strrmm(&empty, "");
EXPECT_EQ("", empty);
strrmm(&empty, "aa");
EXPECT_EQ("", empty);
strrmm(&input, "h");
EXPECT_EQ("ello", input);
strrmm(&input, "el");
EXPECT_EQ("o", input);
}
// Test GlobalReplaceSubstring.
TEST(StringUtilTest, GlobalReplaceSubstring) {
string input("hello");
EXPECT_EQ(0, GlobalReplaceSubstring("aaa", "", &input));
EXPECT_EQ("hello", input);
EXPECT_EQ(0, GlobalReplaceSubstring("", "aaa", &input));
EXPECT_EQ("hello", input);
EXPECT_EQ(0, GlobalReplaceSubstring("", "", &input));
EXPECT_EQ("hello", input);
EXPECT_EQ(0, GlobalReplaceSubstring("aaa", "bbb", &input));
EXPECT_EQ("hello", input);
EXPECT_EQ(1, GlobalReplaceSubstring("o", "o world", &input));
ASSERT_EQ("hello world", input);
EXPECT_EQ(2, GlobalReplaceSubstring("o", "O", &input));
EXPECT_EQ("hellO wOrld", input);
}
// Test the StringHolder class.
TEST(StringUtilTest, StringHolder) {
// Test with C string.
static const char cstring[] = "aaa";
StringHolder sh1(cstring);
EXPECT_EQ(cstring, sh1.GetCString());
EXPECT_EQ(NULL, sh1.GetString());
// Test with std::string.
string s = "bbb";
StringHolder sh2(s);
EXPECT_EQ(NULL, sh2.GetCString());
EXPECT_EQ(&s, sh2.GetString());
// Test GetLength().
string s2 = "hello";
StringHolder sh3(s2);
EXPECT_EQ(5U, sh3.Length());
// Test with uint64.
StringHolder sh4(42);
EXPECT_TRUE(sh4.GetCString() == NULL);
EXPECT_EQ(2U, sh4.Length());
EXPECT_EQ("42", *sh4.GetString());
}
// Test the operator+=(string& lhs, const StringHolder& rhs) implementation.
TEST(StringUtilTest, OperatorPlusEquals) {
// Test with a const char* string to append.
string s = "h";
static const char append1[] = "ello";
s += StringHolder(append1); // force StringHolder usage
EXPECT_EQ("hello", s);
// Test with a std::string to append.
s = "h";
string append2 = "ello";
s += StringHolder(append2); // force StringHolder usage
EXPECT_EQ("hello", s);
}
// Test the StrCat implementations
TEST(StringUtilTest, StrCat) {
string s;
// Test with 2 arguments.
s = StrCat("a", "b");
EXPECT_EQ("ab", s);
// Test with 3 arguments.
s = StrCat("a", "b", "c");
EXPECT_EQ("abc", s);
// Test with 4 arguments.
s = StrCat("a", "b", "c", "d");
EXPECT_EQ("abcd", s);
// Test with 5 arguments.
s = StrCat("a", "b", "c", "d", "e");
EXPECT_EQ("abcde", s);
// Test with 6 arguments.
s = StrCat("a", "b", "c", "d", "e", "f");
EXPECT_EQ("abcdef", s);
// Test with 7 arguments.
s = StrCat("a", "b", "c", "d", "e", "f", "g");
EXPECT_EQ("abcdefg", s);
// Test with 8 arguments.
s = StrCat("a", "b", "c", "d", "e", "f", "g", "h");
EXPECT_EQ("abcdefgh", s);
// Test with 9 arguments.
s = StrCat("a", "b", "c", "d", "e", "f", "g", "h", "i");
EXPECT_EQ("abcdefghi", s);
// Test with 11 arguments.
s = StrCat("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k");
EXPECT_EQ("abcdefghijk", s);
}
// Test the StrAppend implementations.
TEST(StringUtilTest, StrAppend) {
string s;
// Test with 1 argument.
StrAppend(&s, "a");
ASSERT_EQ("a", s);
// Test with 2 arguments.
StrAppend(&s, "b", "c");
ASSERT_EQ("abc", s);
// Test with 3 arguments.
StrAppend(&s, "d", "e", "f");
ASSERT_EQ("abcdef", s);
// Test with 4 arguments.
StrAppend(&s, "g", "h", "i", "j");
ASSERT_EQ("abcdefghij", s);
// Test with 5 arguments.
StrAppend(&s, "k", "l", "m", "n", "o");
ASSERT_EQ("abcdefghijklmno", s);
// Test with int argument.
StrAppend(&s, 42);
ASSERT_EQ("abcdefghijklmno42", s);
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/stringutil_test.cc
|
C++
|
unknown
| 7,475
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include <iostream>
#include <vector>
#include "phonenumbers/phonenumber.pb.h"
#include "phonenumbers/test_util.h"
namespace i18n {
namespace phonenumbers {
ostream& operator<<(ostream& os, const PhoneNumber& number) {
os << std::endl
<< "country_code: " << number.country_code() << std::endl
<< "national_number: " << number.national_number() << std::endl;
if (number.has_extension()) {
os << "extension: " << number.extension() << std::endl;
}
if (number.has_italian_leading_zero()) {
os << "italian_leading_zero: " << number.italian_leading_zero() << std::endl;
}
if (number.has_raw_input()) {
os << "raw_input: " << number.raw_input() << std::endl;
}
if (number.has_country_code_source()) {
os << "country_code_source: " << number.country_code_source() << std::endl;
}
if (number.has_preferred_domestic_carrier_code()) {
os << "preferred_domestic_carrier_code: "
<< number.preferred_domestic_carrier_code() << std::endl;
}
return os;
}
ostream& operator<<(ostream& os, const vector<PhoneNumber>& numbers) {
os << "[" << std::endl;
for (vector<PhoneNumber>::const_iterator it = numbers.begin();
it != numbers.end(); ++it) {
os << *it;
}
os << std::endl << "]" << std::endl;
return os;
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/test_util.cc
|
C++
|
unknown
| 1,964
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include <string>
#include <ostream>
#include <vector>
#include "phonenumbers/phonenumber.h"
namespace i18n {
namespace phonenumbers {
using std::string;
using std::ostream;
using std::vector;
class PhoneNumber;
// Provides PhoneNumber comparison operators to support the use of EXPECT_EQ and
// EXPECT_NE in the unittests.
inline bool operator==(const PhoneNumber& number1, const PhoneNumber& number2) {
return ExactlySameAs(number1, number2);
}
inline bool operator!=(const PhoneNumber& number1, const PhoneNumber& number2) {
return !(number1 == number2);
}
// Needed by Google Test to display errors.
ostream& operator<<(ostream& os, const PhoneNumber& number);
ostream& operator<<(ostream& os, const vector<PhoneNumber>& numbers);
// Class containing string constants of region codes for easier testing. Note
// that another private RegionCode class is defined in
// cpp/src/phonenumbers/region_code.h. This one contains more constants.
class RegionCode {
public:
static const char* AD() {
return "AD";
}
static const char* AE() {
return "AE";
}
static const char* AM() {
return "AM";
}
static const char* AO() {
return "AO";
}
static const char* AQ() {
return "AQ";
}
static const char* AR() {
return "AR";
}
static const char* AU() {
return "AU";
}
static const char* BB() {
return "BB";
}
static const char* BR() {
return "BR";
}
static const char* BS() {
return "BS";
}
static const char* BY() {
return "BY";
}
static const char* CA() {
return "CA";
}
static const char* CH() {
return "CH";
}
static const char* CL() {
return "CL";
}
static const char* CN() {
return "CN";
}
static const char* CS() {
return "CS";
}
static const char* CX() {
return "CX";
}
static const char* DE() {
return "DE";
}
static const char* FR() {
return "FR";
}
static const char* GB() {
return "GB";
}
static const char* HU() {
return "HU";
}
static const char* IT() {
return "IT";
}
static const char* JP() {
return "JP";
}
static const char* KR() {
return "KR";
}
static const char* MX() {
return "MX";
}
static const char* NZ() {
return "NZ";
}
static const char* PL() {
return "PL";
}
static const char* RE() {
return "RE";
}
static const char* RU() {
return "RU";
}
static const char* SE() {
return "SE";
}
static const char* SG() {
return "SG";
}
static const char* UN001() {
return "001";
}
static const char* US() {
return "US";
}
static const char* UZ() {
return "UZ";
}
static const char* YT() {
return "YT";
}
static const char* ZW() {
return "ZW";
}
// Returns a region code string representing the "unknown" region.
static const char* GetUnknown() {
return "ZZ";
}
static const char* ZZ() {
return GetUnknown();
}
};
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/test_util.h
|
C++
|
unknown
| 3,655
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Author: Philippe Liard
#include <iostream>
#include <gtest/gtest.h>
#include "phonenumbers/unicodestring.h"
using std::ostream;
namespace i18n {
namespace phonenumbers {
// Used by GTest to print the expected and actual results in case of failure.
ostream& operator<<(ostream& out, const UnicodeString& s) {
string utf8;
s.toUTF8String(utf8);
out << utf8;
return out;
}
TEST(UnicodeString, ToUTF8StringWithEmptyString) {
UnicodeString s;
string utf8;
s.toUTF8String(utf8);
EXPECT_EQ("", utf8);
}
TEST(UnicodeString, ToUTF8String) {
UnicodeString s("hello");
string utf8;
s.toUTF8String(utf8);
EXPECT_EQ("hello", utf8);
}
TEST(UnicodeString, ToUTF8StringWithNonAscii) {
UnicodeString s("\xEF\xBC\x95\xEF\xBC\x93" /* "53" */);
string utf8;
s.toUTF8String(utf8);
EXPECT_EQ("\xEF\xBC\x95\xEF\xBC\x93", utf8);
}
TEST(UnicodeString, AppendCodepoint) {
UnicodeString s;
s.append('h');
ASSERT_EQ(UnicodeString("h"), s);
s.append('e');
EXPECT_EQ(UnicodeString("he"), s);
}
TEST(UnicodeString, AppendCodepointWithNonAscii) {
UnicodeString s;
s.append(0xFF15 /* 5 */);
ASSERT_EQ(UnicodeString("\xEF\xBC\x95" /* 5 */), s);
s.append(0xFF13 /* 3 */);
EXPECT_EQ(UnicodeString("\xEF\xBC\x95\xEF\xBC\x93" /* 53 */), s);
}
TEST(UnicodeString, AppendUnicodeString) {
UnicodeString s;
s.append(UnicodeString("he"));
ASSERT_EQ(UnicodeString("he"), s);
s.append(UnicodeString("llo"));
EXPECT_EQ(UnicodeString("hello"), s);
}
TEST(UnicodeString, AppendUnicodeStringWithNonAscii) {
UnicodeString s;
s.append(UnicodeString("\xEF\xBC\x95" /* 5 */));
ASSERT_EQ(UnicodeString("\xEF\xBC\x95"), s);
s.append(UnicodeString("\xEF\xBC\x93" /* 3 */));
EXPECT_EQ(UnicodeString("\xEF\xBC\x95\xEF\xBC\x93" /* 53 */), s);
}
TEST(UnicodeString, IndexOf) {
UnicodeString s("hello");
EXPECT_EQ(0, s.indexOf('h'));
EXPECT_EQ(2, s.indexOf('l'));
EXPECT_EQ(4, s.indexOf('o'));
}
TEST(UnicodeString, IndexOfWithNonAscii) {
UnicodeString s("\xEF\xBC\x95\xEF\xBC\x93" /* 53 */);
EXPECT_EQ(1, s.indexOf(0xFF13 /* 3 */));
}
TEST(UnicodeString, ReplaceWithEmptyInputs) {
UnicodeString s;
s.replace(0, 0, UnicodeString(""));
EXPECT_EQ(UnicodeString(""), s);
}
TEST(UnicodeString, ReplaceWithEmptyReplacement) {
UnicodeString s("hello");
s.replace(0, 5, UnicodeString(""));
EXPECT_EQ(UnicodeString(""), s);
}
TEST(UnicodeString, ReplaceBegining) {
UnicodeString s("hello world");
s.replace(0, 5, UnicodeString("HELLO"));
EXPECT_EQ(UnicodeString("HELLO world"), s);
}
TEST(UnicodeString, ReplaceMiddle) {
UnicodeString s("hello world");
s.replace(5, 1, UnicodeString("AB"));
EXPECT_EQ(UnicodeString("helloABworld"), s);
}
TEST(UnicodeString, ReplaceEnd) {
UnicodeString s("hello world");
s.replace(10, 1, UnicodeString("AB"));
EXPECT_EQ(UnicodeString("hello worlAB"), s);
}
TEST(UnicodeString, ReplaceWithNonAscii) {
UnicodeString s("hello world");
s.replace(3, 2, UnicodeString("\xEF\xBC\x91\xEF\xBC\x90" /* 10 */));
EXPECT_EQ(UnicodeString("hel\xEF\xBC\x91\xEF\xBC\x90 world"), s);
}
TEST(UnicodeString, SetCharBegining) {
UnicodeString s("hello");
s.setCharAt(0, 'H');
EXPECT_EQ(UnicodeString("Hello"), s);
}
TEST(UnicodeString, SetCharMiddle) {
UnicodeString s("hello");
s.setCharAt(2, 'L');
EXPECT_EQ(UnicodeString("heLlo"), s);
}
TEST(UnicodeString, SetCharEnd) {
UnicodeString s("hello");
s.setCharAt(4, 'O');
EXPECT_EQ(UnicodeString("hellO"), s);
}
TEST(UnicodeString, SetCharWithNonAscii) {
UnicodeString s("hello");
s.setCharAt(4, 0xFF10 /* 0 */);
EXPECT_EQ(UnicodeString("hell\xEF\xBC\x90" /* 0 */), s);
}
TEST(UnicodeString, TempSubStringWithEmptyString) {
EXPECT_EQ(UnicodeString(""), UnicodeString().tempSubString(0, 0));
}
TEST(UnicodeString, TempSubStringWithInvalidInputs) {
UnicodeString s("hello");
// tempSubString() returns an empty unicode string if one of the provided
// paramaters is out of range.
EXPECT_EQ(UnicodeString(""), s.tempSubString(6));
EXPECT_EQ(UnicodeString(""), s.tempSubString(2, 6));
}
TEST(UnicodeString, TempSubString) {
UnicodeString s("hello");
EXPECT_EQ(UnicodeString(""), s.tempSubString(0, 0));
EXPECT_EQ(UnicodeString("h"), s.tempSubString(0, 1));
EXPECT_EQ(UnicodeString("hello"), s.tempSubString(0, 5));
EXPECT_EQ(UnicodeString("llo"), s.tempSubString(2, 3));
}
TEST(UnicodeString, TempSubStringWithNoLength) {
UnicodeString s("hello");
EXPECT_EQ(UnicodeString("hello"), s.tempSubString(0));
EXPECT_EQ(UnicodeString("llo"), s.tempSubString(2));
}
TEST(UnicodeString, TempSubStringWithNonAscii) {
UnicodeString s("hel\xEF\xBC\x91\xEF\xBC\x90" /* 10 */);
EXPECT_EQ(UnicodeString("\xEF\xBC\x91" /* 1 */), s.tempSubString(3, 1));
}
TEST(UnicodeString, OperatorEqual) {
UnicodeString s("hello");
s = UnicodeString("Hello");
EXPECT_EQ(UnicodeString("Hello"), s);
}
TEST(UnicodeString, OperatorEqualWithNonAscii) {
UnicodeString s("hello");
s = UnicodeString("hel\xEF\xBC\x91\xEF\xBC\x90" /* 10 */);
EXPECT_EQ(UnicodeString("hel\xEF\xBC\x91\xEF\xBC\x90"), s);
}
TEST(UnicodeString, OperatorBracket) {
UnicodeString s("hello");
EXPECT_EQ('h', s[0]);
EXPECT_EQ('e', s[1]);
EXPECT_EQ('l', s[2]);
EXPECT_EQ('l', s[3]);
EXPECT_EQ('o', s[4]);
}
TEST(UnicodeString, OperatorBracketWithNonAscii) {
UnicodeString s("hel\xEF\xBC\x91\xEF\xBC\x90" /* 10 */);
EXPECT_EQ('h', s[0]);
EXPECT_EQ('e', s[1]);
EXPECT_EQ('l', s[2]);
EXPECT_EQ(0xFF11 /* 1 */, s[3]);
EXPECT_EQ(0xFF10 /* 0 */, s[4]);
}
TEST(UnicodeString, OperatorBracketWithIteratorCacheInvalidation) {
UnicodeString s("hello");
EXPECT_EQ('h', s[0]);
EXPECT_EQ('e', s[1]);
// Modify the string which should invalidate the iterator cache.
s.setCharAt(1, 'E');
EXPECT_EQ(UnicodeString("hEllo"), s);
EXPECT_EQ('E', s[1]);
// Get the previous character which should invalidate the iterator cache.
EXPECT_EQ('h', s[0]);
EXPECT_EQ('o', s[4]);
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/unicodestring_test.cc
|
C++
|
unknown
| 6,656
|
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
//
// Author: Ben Gertzfield
#include <gtest/gtest.h>
#include "phonenumbers/utf/unicodetext.h"
namespace i18n {
namespace phonenumbers {
TEST(UnicodeTextTest, Iterator) {
struct value {
const char* utf8;
char32 code_point;
} values[] = {
{ "\x31", 0x31 }, // U+0031 DIGIT ONE
{ "\xC2\xBD", 0x00BD }, // U+00BD VULGAR FRACTION ONE HALF
{ "\xEF\xBC\x91", 0xFF11 }, // U+FF11 FULLWIDTH DIGIT ONE
{ "\xF0\x9F\x80\x80", 0x1F000 }, // U+1F000 MAHJONG TILE EAST WIND
};
for (size_t i = 0; i < sizeof values / sizeof values[0]; i++) {
string number(values[i].utf8);
UnicodeText number_as_unicode;
number_as_unicode.PointToUTF8(number.data(), number.size());
UnicodeText::const_iterator it = number_as_unicode.begin();
EXPECT_EQ(values[i].code_point, *it);
}
}
} // namespace phonenumbers
} // namespace i18n
|
2301_81045437/third_party_libphonenumber
|
cpp/test/phonenumbers/utf/unicodetext_test.cc
|
C++
|
unknown
| 1,464
|
/*
* Copyright (C) 2013 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.prefixmapper.PrefixFileReader;
import java.util.Locale;
/**
* A phone prefix mapper which provides carrier information related to a phone number.
*
* @author Cecilia Roes
*/
public class PhoneNumberToCarrierMapper {
private static PhoneNumberToCarrierMapper instance = null;
private static final String MAPPING_DATA_DIRECTORY =
"/com/google/i18n/phonenumbers/carrier/data/";
private PrefixFileReader prefixFileReader = null;
private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
// @VisibleForTesting
PhoneNumberToCarrierMapper(String phonePrefixDataDirectory) {
prefixFileReader = new PrefixFileReader(phonePrefixDataDirectory);
}
/**
* Gets a {@link PhoneNumberToCarrierMapper} instance to carry out international carrier lookup.
*
* <p> The {@link PhoneNumberToCarrierMapper} is implemented as a singleton. Therefore, calling
* this method multiple times will only result in one instance being created.
*
* @return a {@link PhoneNumberToCarrierMapper} instance
*/
public static synchronized PhoneNumberToCarrierMapper getInstance() {
if (instance == null) {
instance = new PhoneNumberToCarrierMapper(MAPPING_DATA_DIRECTORY);
}
return instance;
}
/**
* Returns a carrier name for the given phone number, in the language provided. The carrier name
* is the one the number was originally allocated to, however if the country supports mobile
* number portability the number might not belong to the returned carrier anymore. If no mapping
* is found an empty string is returned.
*
* <p>This method assumes the validity of the number passed in has already been checked, and that
* the number is suitable for carrier lookup. We consider mobile and pager numbers possible
* candidates for carrier lookup.
*
* @param number a valid phone number for which we want to get a carrier name
* @param languageCode the language code in which the name should be written
* @return a carrier name for the given phone number
*/
public String getNameForValidNumber(PhoneNumber number, Locale languageCode) {
String langStr = languageCode.getLanguage();
String scriptStr = ""; // No script is specified
String regionStr = languageCode.getCountry();
return prefixFileReader.getDescriptionForNumber(number, langStr, scriptStr, regionStr);
}
/**
* Gets the name of the carrier for the given phone number, in the language provided. As per
* {@link #getNameForValidNumber(PhoneNumber, Locale)} but explicitly checks the validity of
* the number passed in.
*
* @param number the phone number for which we want to get a carrier name
* @param languageCode the language code in which the name should be written
* @return a carrier name for the given phone number, or empty string if the number passed in is
* invalid
*/
public String getNameForNumber(PhoneNumber number, Locale languageCode) {
PhoneNumberType numberType = phoneUtil.getNumberType(number);
if (isMobile(numberType)) {
return getNameForValidNumber(number, languageCode);
}
return "";
}
/**
* Gets the name of the carrier for the given phone number only when it is 'safe' to display to
* users. A carrier name is considered safe if the number is valid and for a region that doesn't
* support
* <a href="http://en.wikipedia.org/wiki/Mobile_number_portability">mobile number portability</a>.
*
* @param number the phone number for which we want to get a carrier name
* @param languageCode the language code in which the name should be written
* @return a carrier name that is safe to display to users, or the empty string
*/
public String getSafeDisplayName(PhoneNumber number, Locale languageCode) {
if (phoneUtil.isMobileNumberPortableRegion(phoneUtil.getRegionCodeForNumber(number))) {
return "";
}
return getNameForNumber(number, languageCode);
}
/**
* Checks if the supplied number type supports carrier lookup.
*/
private boolean isMobile(PhoneNumberType numberType) {
return (numberType == PhoneNumberType.MOBILE
|| numberType == PhoneNumberType.FIXED_LINE_OR_MOBILE
|| numberType == PhoneNumberType.PAGER);
}
}
|
2301_81045437/third_party_libphonenumber
|
java/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java
|
Java
|
unknown
| 5,137
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author Shaopeng Jia
*/
package com.google.phonenumbers;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Locale.ENGLISH;
import com.google.i18n.phonenumbers.AsYouTypeFormatter;
import com.google.i18n.phonenumbers.NumberParseException;
import com.google.i18n.phonenumbers.PhoneNumberToCarrierMapper;
import com.google.i18n.phonenumbers.PhoneNumberToTimeZonesMapper;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.ShortNumberInfo;
import com.google.i18n.phonenumbers.geocoding.PhoneNumberOfflineGeocoder;
import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.fileupload.util.Streams;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringEscapeUtils;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.StringTokenizer;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* A servlet that accepts requests that contain strings representing a phone number and a default
* country, and responds with results from parsing, validating and formatting the number. The
* default country is a two-letter region code representing the country that we are expecting the
* number to be from.
*/
@SuppressWarnings("serial")
public class PhoneNumberParserServlet extends HttpServlet {
private PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
private ShortNumberInfo shortInfo = ShortNumberInfo.getInstance();
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String phoneNumber = null;
String defaultCountry = null;
String languageCode = "en"; // Default languageCode to English if nothing is entered.
String regionCode = "";
String fileContents = null;
ServletFileUpload upload = new ServletFileUpload();
upload.setSizeMax(50000);
try {
FileItemIterator iterator = upload.getItemIterator(req);
while (iterator.hasNext()) {
FileItemStream item = iterator.next();
InputStream in = item.openStream();
if (item.isFormField()) {
String fieldName = item.getFieldName();
if (fieldName.equals("phoneNumber")) {
phoneNumber = Streams.asString(in, UTF_8.name());
} else if (fieldName.equals("defaultCountry")) {
defaultCountry = Streams.asString(in).toUpperCase();
} else if (fieldName.equals("languageCode")) {
String languageEntered = Streams.asString(in).toLowerCase();
if (languageEntered.length() > 0) {
languageCode = languageEntered;
}
} else if (fieldName.equals("regionCode")) {
regionCode = Streams.asString(in).toUpperCase();
}
} else {
try {
fileContents = IOUtils.toString(in);
} finally {
IOUtils.closeQuietly(in);
}
}
}
} catch (FileUploadException e1) {
e1.printStackTrace();
}
StringBuilder output;
resp.setContentType("text/html");
resp.setCharacterEncoding(UTF_8.name());
if (fileContents == null || fileContents.length() == 0) {
// Redirect to a URL with the given input encoded in the query parameters.
Locale geocodingLocale = new Locale(languageCode, regionCode);
resp.sendRedirect(getPermaLinkURL(phoneNumber, defaultCountry, geocodingLocale,
false /* absoluteURL */));
} else {
resp.getWriter().println(getOutputForFile(defaultCountry, fileContents));
}
}
/**
* Handle the get request to get information about a number based on query parameters.
*/
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String phoneNumber = req.getParameter("number");
if (phoneNumber == null) {
phoneNumber = "";
}
String defaultCountry = req.getParameter("country");
if (defaultCountry == null) {
defaultCountry = "";
}
String geocodingParam = req.getParameter("geocodingLocale");
Locale geocodingLocale;
if (geocodingParam == null) {
geocodingLocale = ENGLISH; // Default languageCode to English if nothing is entered.
} else {
geocodingLocale = Locale.forLanguageTag(geocodingParam);
}
resp.setContentType("text/html");
resp.setCharacterEncoding(UTF_8.name());
resp.getWriter().println(
getOutputForSingleNumber(phoneNumber, defaultCountry, geocodingLocale));
}
private StringBuilder getOutputForFile(String defaultCountry, String fileContents) {
StringBuilder output = new StringBuilder(
"<HTML><HEAD><TITLE>Results generated from phone numbers in the file provided:"
+ "</TITLE></HEAD><BODY>");
output.append("<TABLE align=center border=1>");
output.append("<TH align=center>ID</TH>");
output.append("<TH align=center>Raw phone number</TH>");
output.append("<TH align=center>Pretty formatting</TH>");
output.append("<TH align=center>International format</TH>");
int phoneNumberId = 0;
StringTokenizer tokenizer = new StringTokenizer(fileContents, ",");
while (tokenizer.hasMoreTokens()) {
String numberStr = tokenizer.nextToken();
phoneNumberId++;
output.append("<TR>");
output.append("<TD align=center>").append(phoneNumberId).append(" </TD> \n");
output.append("<TD align=center>").append(
StringEscapeUtils.escapeHtml(numberStr)).append(" </TD> \n");
try {
PhoneNumber number = phoneUtil.parseAndKeepRawInput(numberStr, defaultCountry);
boolean isNumberValid = phoneUtil.isValidNumber(number);
String prettyFormat = isNumberValid
? phoneUtil.formatInOriginalFormat(number, defaultCountry)
: "invalid";
String internationalFormat = isNumberValid
? phoneUtil.format(number, PhoneNumberFormat.INTERNATIONAL)
: "invalid";
output.append("<TD align=center>").append(
StringEscapeUtils.escapeHtml(prettyFormat)).append(" </TD> \n");
output.append("<TD align=center>").append(
StringEscapeUtils.escapeHtml(internationalFormat)).append(" </TD> \n");
} catch (NumberParseException e) {
output.append("<TD align=center colspan=2>").append(
StringEscapeUtils.escapeHtml(e.toString())).append(" </TD> \n");
}
output.append("</TR>");
}
output.append("</BODY></HTML>");
return output;
}
private void appendLine(String title, String data, StringBuilder output) {
output.append("<TR>");
output.append("<TH>").append(title).append("</TH>");
output.append("<TD>").append(data.length() > 0 ? data : " ").append("</TD>");
output.append("</TR>");
}
/**
* Returns a stable URL pointing to the result page for the given input.
*/
private String getPermaLinkURL(
String phoneNumber, String defaultCountry, Locale geocodingLocale, boolean absoluteURL) {
// If absoluteURL is false, generate a relative path. Otherwise, produce an absolute URL.
StringBuilder permaLink = new StringBuilder(
absoluteURL ? "http://libphonenumber.appspot.com/phonenumberparser" : "/phonenumberparser");
try {
permaLink.append(
"?number=" + URLEncoder.encode(phoneNumber != null ? phoneNumber : "", UTF_8.name()));
if (defaultCountry != null && !defaultCountry.isEmpty()) {
permaLink.append("&country=" + URLEncoder.encode(defaultCountry, UTF_8.name()));
}
if (!geocodingLocale.getLanguage().equals(ENGLISH.getLanguage()) ||
!geocodingLocale.getCountry().isEmpty()) {
permaLink.append("&geocodingLocale=" +
URLEncoder.encode(geocodingLocale.toLanguageTag(), UTF_8.name()));
}
} catch(UnsupportedEncodingException e) {
// UTF-8 is guaranteed in Java, so this should be impossible.
throw new AssertionError(e);
}
return permaLink.toString();
}
private static final String NEW_ISSUE_BASE_URL =
"https://issuetracker.google.com/issues/new?component=192347&title=";
/**
* Returns a link to create a new github issue with the relevant information.
*/
private String getNewIssueLink(
String phoneNumber, String defaultCountry, Locale geocodingLocale) {
boolean hasDefaultCountry = !defaultCountry.isEmpty() && defaultCountry != "ZZ";
String issueTitle = "Validation issue with " + phoneNumber
+ (hasDefaultCountry ? " (" + defaultCountry + ")" : "");
String newIssueLink = NEW_ISSUE_BASE_URL;
try {
newIssueLink += URLEncoder.encode(issueTitle, UTF_8.name());
} catch(UnsupportedEncodingException e) {
// UTF-8 is guaranteed in Java, so this should be impossible.
throw new AssertionError(e);
}
return newIssueLink;
}
/**
* The defaultCountry here is used for parsing phoneNumber. The geocodingLocale is used to specify
* the language used for displaying the area descriptions generated from phone number geocoding.
*/
private StringBuilder getOutputForSingleNumber(
String phoneNumber, String defaultCountry, Locale geocodingLocale) {
StringBuilder output = new StringBuilder("<HTML><HEAD>");
output.append(
"<LINK type=\"text/css\" rel=\"stylesheet\" href=\"/stylesheets/main.css\" />");
output.append("</HEAD>");
output.append("<BODY>");
output.append("Phone Number entered: " + StringEscapeUtils.escapeHtml(phoneNumber) + "<BR>");
output.append("defaultCountry entered: " + StringEscapeUtils.escapeHtml(defaultCountry)
+ "<BR>");
output.append("Language entered: "
+ StringEscapeUtils.escapeHtml(geocodingLocale.toLanguageTag()) + "<BR>");
try {
PhoneNumber number = phoneUtil.parseAndKeepRawInput(phoneNumber, defaultCountry);
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>Parsing Result (parseAndKeepRawInput())</TD></TR>");
appendLine("country_code", Integer.toString(number.getCountryCode()), output);
appendLine("national_number", Long.toString(number.getNationalNumber()), output);
appendLine("extension", number.getExtension(), output);
appendLine("country_code_source", number.getCountryCodeSource().toString(), output);
appendLine("italian_leading_zero", Boolean.toString(number.isItalianLeadingZero()), output);
appendLine("raw_input", number.getRawInput(), output);
output.append("</TABLE>");
output.append("</DIV>");
boolean isPossible = phoneUtil.isPossibleNumber(number);
boolean isNumberValid = phoneUtil.isValidNumber(number);
PhoneNumberType numberType = phoneUtil.getNumberType(number);
boolean hasDefaultCountry = !defaultCountry.isEmpty() && defaultCountry != "ZZ";
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>Validation Results</TD></TR>");
appendLine("Result from isPossibleNumber()", Boolean.toString(isPossible), output);
if (!isPossible) {
appendLine("Result from isPossibleNumberWithReason()",
phoneUtil.isPossibleNumberWithReason(number).toString(), output);
output.append("<TR><TD colspan=2>Note: numbers that are not possible have type " +
"UNKNOWN, an unknown region, and are considered invalid.</TD></TR>");
} else {
appendLine("Result from isValidNumber()", Boolean.toString(isNumberValid), output);
if (isNumberValid) {
if (hasDefaultCountry) {
appendLine(
"Result from isValidNumberForRegion()",
Boolean.toString(phoneUtil.isValidNumberForRegion(number, defaultCountry)),
output);
}
}
String region = phoneUtil.getRegionCodeForNumber(number);
appendLine("Phone Number region", region == null ? "" : region, output);
appendLine("Result from getNumberType()", numberType.toString(), output);
}
output.append("</TABLE>");
output.append("</DIV>");
if (!isNumberValid) {
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>Short Number Results</TD></TR>");
boolean isPossibleShort = shortInfo.isPossibleShortNumber(number);
appendLine("Result from isPossibleShortNumber()",
Boolean.toString(isPossibleShort), output);
if (isPossibleShort) {
appendLine("Result from isValidShortNumber()",
Boolean.toString(shortInfo.isValidShortNumber(number)), output);
if (hasDefaultCountry) {
boolean isPossibleShortForRegion =
shortInfo.isPossibleShortNumberForRegion(number, defaultCountry);
appendLine("Result from isPossibleShortNumberForRegion()",
Boolean.toString(isPossibleShortForRegion), output);
if (isPossibleShortForRegion) {
appendLine("Result from isValidShortNumberForRegion()",
Boolean.toString(shortInfo.isValidShortNumberForRegion(number,
defaultCountry)), output);
}
}
}
output.append("</TABLE>");
output.append("</DIV>");
}
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>Formatting Results</TD></TR>");
appendLine("E164 format",
isNumberValid ? phoneUtil.format(number, PhoneNumberFormat.E164) : "invalid",
output);
appendLine("Original format",
phoneUtil.formatInOriginalFormat(number, defaultCountry), output);
appendLine("National format", phoneUtil.format(number, PhoneNumberFormat.NATIONAL), output);
appendLine(
"International format",
isNumberValid ? phoneUtil.format(number, PhoneNumberFormat.INTERNATIONAL) : "invalid",
output);
appendLine(
"Out-of-country format from US",
isNumberValid ? phoneUtil.formatOutOfCountryCallingNumber(number, "US") : "invalid",
output);
appendLine(
"Out-of-country format from CH",
isNumberValid ? phoneUtil.formatOutOfCountryCallingNumber(number, "CH") : "invalid",
output);
output.append("</TABLE>");
output.append("</DIV>");
AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(defaultCountry);
int rawNumberLength = phoneNumber.length();
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>AsYouTypeFormatter Results</TD></TR>");
for (int i = 0; i < rawNumberLength; i++) {
// Note this doesn't handle supplementary characters, but it shouldn't be a big deal as
// there are no dial-pad characters in the supplementary range.
char inputChar = phoneNumber.charAt(i);
appendLine("Char entered: '" + inputChar + "' Output: ",
formatter.inputDigit(inputChar), output);
}
output.append("</TABLE>");
output.append("</DIV>");
if (isNumberValid) {
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>PhoneNumberOfflineGeocoder Results</TD></TR>");
appendLine(
"Location",
PhoneNumberOfflineGeocoder.getInstance().getDescriptionForNumber(
number, geocodingLocale),
output);
output.append("</TABLE>");
output.append("</DIV>");
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>PhoneNumberToTimeZonesMapper Results</TD></TR>");
appendLine(
"Time zone(s)",
PhoneNumberToTimeZonesMapper.getInstance().getTimeZonesForNumber(number).toString(),
output);
output.append("</TABLE>");
output.append("</DIV>");
if (numberType == PhoneNumberType.MOBILE ||
numberType == PhoneNumberType.FIXED_LINE_OR_MOBILE ||
numberType == PhoneNumberType.PAGER) {
output.append("<DIV>");
output.append("<TABLE border=1>");
output.append("<TR><TD colspan=2>PhoneNumberToCarrierMapper Results</TD></TR>");
appendLine(
"Carrier",
PhoneNumberToCarrierMapper.getInstance().getNameForNumber(number, geocodingLocale),
output);
output.append("</TABLE>");
output.append("</DIV>");
}
}
String newIssueLink = getNewIssueLink(phoneNumber, defaultCountry, geocodingLocale);
String guidelinesLink =
"https://github.com/google/libphonenumber/blob/master/CONTRIBUTING.md";
output.append("<b style=\"color:red\">File an issue</b>: by clicking on "
+ "<a target=\"_blank\" href=\"" + newIssueLink + "\">this link</a>, I confirm that I "
+ "have read the <a target=\"_blank\" href=\"" + guidelinesLink
+ "\">contributor's guidelines</a>.");
} catch (NumberParseException e) {
output.append(StringEscapeUtils.escapeHtml(e.toString()));
}
output.append("</BODY></HTML>");
return output;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/demo/src/com/google/phonenumbers/PhoneNumberParserServlet.java
|
Java
|
unknown
| 18,398
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
<h2>Phone Number Parser Demo</h2>
<form action="/phonenumberparser" method="post" accept-charset="UTF-8"
enctype="multipart/form-data">
<h2>Step 1</h2>
<p>
Specify a Phone Number: <input type="text" name="phoneNumber" size="25">
<p>
<b>Or</b> Upload a file containing phone numbers separated by comma.
<p>
<input type="file" name="numberFile" size="30">
<p>
<h2>Step 2</h2>
<p>
Specify a Default Country:
<input type="text" name="defaultCountry" size="2">
(<a href="http://www.iso.org/iso/english_country_names_and_code_elements">
CLDR two-letter region code</a>)
<h2>Step 3</h2>
<p>
Specify a locale for phone number geocoding (Optional, defaults to en):
<p>
<input type="text" name="languageCode" size="2">-<input type="text" name="regionCode"
size="2">
(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Locale.html">A valid ISO
Language Code and optionally a region to more precisely define the language.</a>)
<p></p>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
<p></p>
<a href="https://github.com/google/libphonenumber/">Back to libphonenumber</a>
</form>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
java/demo/war/phonenumberparser.jsp
|
Java Server Pages
|
unknown
| 1,557
|
body {
font-family: "Trebuchet MS", Arial, sans-serif;
}
table, th, td {
border: 1px solid #D4E0EE;
border-collapse: collapse;
color: #555;
}
td, th {
padding: 4px;
}
thead {
text-align: center;
background: #E6EDF5;
color: #4F76A3
}
th {
text-align: left;
}
div {
padding: 10px;
}
|
2301_81045437/third_party_libphonenumber
|
java/demo/war/stylesheets/main.css
|
CSS
|
unknown
| 305
|
/*
* Copyright (C) 2012 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.prefixmapper.PrefixTimeZonesMap;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* An offline mapper from phone numbers to time zones.
*/
public class PhoneNumberToTimeZonesMapper {
private static final String MAPPING_DATA_DIRECTORY =
"/com/google/i18n/phonenumbers/timezones/data/";
private static final String MAPPING_DATA_FILE_NAME = "map_data";
// This is defined by ICU as the unknown time zone.
private static final String UNKNOWN_TIMEZONE = "Etc/Unknown";
// A list with the ICU unknown time zone as single element.
// @VisibleForTesting
static final List<String> UNKNOWN_TIME_ZONE_LIST = new ArrayList<String>(1);
static {
UNKNOWN_TIME_ZONE_LIST.add(UNKNOWN_TIMEZONE);
}
private static final Logger logger =
Logger.getLogger(PhoneNumberToTimeZonesMapper.class.getName());
private PrefixTimeZonesMap prefixTimeZonesMap = null;
// @VisibleForTesting
PhoneNumberToTimeZonesMapper(String prefixTimeZonesMapDataDirectory) {
this.prefixTimeZonesMap = loadPrefixTimeZonesMapFromFile(
prefixTimeZonesMapDataDirectory + MAPPING_DATA_FILE_NAME);
}
private PhoneNumberToTimeZonesMapper(PrefixTimeZonesMap prefixTimeZonesMap) {
this.prefixTimeZonesMap = prefixTimeZonesMap;
}
private static PrefixTimeZonesMap loadPrefixTimeZonesMapFromFile(String path) {
InputStream source = PhoneNumberToTimeZonesMapper.class.getResourceAsStream(path);
ObjectInputStream in = null;
PrefixTimeZonesMap map = new PrefixTimeZonesMap();
try {
in = new ObjectInputStream(source);
map.readExternal(in);
} catch (IOException e) {
logger.log(Level.WARNING, e.toString());
} finally {
close(in);
}
return map;
}
private static void close(InputStream in) {
if (in != null) {
try {
in.close();
} catch (IOException e) {
logger.log(Level.WARNING, e.toString());
}
}
}
/**
* Helper class used for lazy instantiation of a PhoneNumberToTimeZonesMapper. This also loads the
* map data in a thread-safe way.
*/
private static class LazyHolder {
private static final PhoneNumberToTimeZonesMapper INSTANCE;
static {
PrefixTimeZonesMap map =
loadPrefixTimeZonesMapFromFile(MAPPING_DATA_DIRECTORY + MAPPING_DATA_FILE_NAME);
INSTANCE = new PhoneNumberToTimeZonesMapper(map);
}
}
/**
* Gets a {@link PhoneNumberToTimeZonesMapper} instance.
*
* <p> The {@link PhoneNumberToTimeZonesMapper} is implemented as a singleton. Therefore, calling
* this method multiple times will only result in one instance being created.
*
* @return a {@link PhoneNumberToTimeZonesMapper} instance
*/
public static synchronized PhoneNumberToTimeZonesMapper getInstance() {
return LazyHolder.INSTANCE;
}
/**
* Returns a list of time zones to which a phone number belongs.
*
* <p>This method assumes the validity of the number passed in has already been checked, and that
* the number is geo-localizable. We consider fixed-line and mobile numbers possible candidates
* for geo-localization.
*
* @param number a valid phone number for which we want to get the time zones to which it belongs
* @return a list of the corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found or if the number was invalid
*/
public List<String> getTimeZonesForGeographicalNumber(PhoneNumber number) {
return getTimeZonesForGeocodableNumber(number);
}
/**
* As per {@link #getTimeZonesForGeographicalNumber(PhoneNumber)} but explicitly checks
* the validity of the number passed in.
*
* @param number the phone number for which we want to get the time zones to which it belongs
* @return a list of the corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found or if the number was invalid
*/
public List<String> getTimeZonesForNumber(PhoneNumber number) {
PhoneNumberType numberType = PhoneNumberUtil.getInstance().getNumberType(number);
if (numberType == PhoneNumberType.UNKNOWN) {
return UNKNOWN_TIME_ZONE_LIST;
} else if (!PhoneNumberUtil.getInstance().isNumberGeographical(
numberType, number.getCountryCode())) {
return getCountryLevelTimeZonesforNumber(number);
}
return getTimeZonesForGeographicalNumber(number);
}
/**
* Returns a String with the ICU unknown time zone.
*/
public static String getUnknownTimeZone() {
return UNKNOWN_TIMEZONE;
}
/**
* Returns a list of time zones to which a geocodable phone number belongs.
*
* @param number the phone number for which we want to get the time zones to which it belongs
* @return the list of corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found or if the number was invalid
*/
private List<String> getTimeZonesForGeocodableNumber(PhoneNumber number) {
List<String> timezones = prefixTimeZonesMap.lookupTimeZonesForNumber(number);
return Collections.unmodifiableList(timezones.isEmpty() ? UNKNOWN_TIME_ZONE_LIST
: timezones);
}
/**
* Returns the list of time zones corresponding to the country calling code of {@code number}.
*
* @param number the phone number to look up
* @return the list of corresponding time zones or a single element list with the default
* unknown time zone if no other time zone was found
*/
private List<String> getCountryLevelTimeZonesforNumber(PhoneNumber number) {
List<String> timezones = prefixTimeZonesMap.lookupCountryLevelTimeZonesForNumber(number);
return Collections.unmodifiableList(timezones.isEmpty() ? UNKNOWN_TIME_ZONE_LIST
: timezones);
}
}
|
2301_81045437/third_party_libphonenumber
|
java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java
|
Java
|
unknown
| 6,945
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.geocoding;
import com.google.i18n.phonenumbers.NumberParseException;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.prefixmapper.PrefixFileReader;
import java.util.List;
import java.util.Locale;
/**
* An offline geocoder which provides geographical information related to a phone number.
*
* @author Shaopeng Jia
*/
public class PhoneNumberOfflineGeocoder {
private static PhoneNumberOfflineGeocoder instance = null;
private static final String MAPPING_DATA_DIRECTORY =
"/com/google/i18n/phonenumbers/geocoding/data/";
private PrefixFileReader prefixFileReader = null;
private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
// @VisibleForTesting
PhoneNumberOfflineGeocoder(String phonePrefixDataDirectory) {
prefixFileReader = new PrefixFileReader(phonePrefixDataDirectory);
}
/**
* Gets a {@link PhoneNumberOfflineGeocoder} instance to carry out international phone number
* geocoding.
*
* <p> The {@link PhoneNumberOfflineGeocoder} is implemented as a singleton. Therefore, calling
* this method multiple times will only result in one instance being created.
*
* @return a {@link PhoneNumberOfflineGeocoder} instance
*/
public static synchronized PhoneNumberOfflineGeocoder getInstance() {
if (instance == null) {
instance = new PhoneNumberOfflineGeocoder(MAPPING_DATA_DIRECTORY);
}
return instance;
}
/**
* Returns the customary display name in the given language for the given territory the phone
* number is from. If it could be from many territories, nothing is returned.
*/
private String getCountryNameForNumber(PhoneNumber number, Locale language) {
List<String> regionCodes =
phoneUtil.getRegionCodesForCountryCode(number.getCountryCode());
if (regionCodes.size() == 1) {
return getRegionDisplayName(regionCodes.get(0), language);
} else {
String regionWhereNumberIsValid = "ZZ";
for (String regionCode : regionCodes) {
if (phoneUtil.isValidNumberForRegion(number, regionCode)) {
// If the number has already been found valid for one region, then we don't know which
// region it belongs to so we return nothing.
if (!regionWhereNumberIsValid.equals("ZZ")) {
return "";
}
regionWhereNumberIsValid = regionCode;
}
}
return getRegionDisplayName(regionWhereNumberIsValid, language);
}
}
/**
* Returns the customary display name in the given language for the given region.
*/
private String getRegionDisplayName(String regionCode, Locale language) {
return (regionCode == null || regionCode.equals("ZZ")
|| regionCode.equals(PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY))
? "" : new Locale("", regionCode).getDisplayCountry(language);
}
/**
* Returns a text description for the given phone number, in the language provided. The
* description might consist of the name of the country where the phone number is from, or the
* name of the geographical area the phone number is from if more detailed information is
* available.
*
* <p>This method assumes the validity of the number passed in has already been checked, and that
* the number is suitable for geocoding. We consider fixed-line and mobile numbers possible
* candidates for geocoding.
*
* @param number a valid phone number for which we want to get a text description
* @param languageCode the language code for which the description should be written
* @return a text description for the given language code for the given phone number, or an
* empty string if the number could come from multiple countries, or the country code is
* in fact invalid
*/
public String getDescriptionForValidNumber(PhoneNumber number, Locale languageCode) {
String langStr = languageCode.getLanguage();
String scriptStr = ""; // No script is specified
String regionStr = languageCode.getCountry();
String areaDescription;
String mobileToken = PhoneNumberUtil.getCountryMobileToken(number.getCountryCode());
String nationalNumber = phoneUtil.getNationalSignificantNumber(number);
if (!mobileToken.equals("") && nationalNumber.startsWith(mobileToken)) {
// In some countries, eg. Argentina, mobile numbers have a mobile token before the national
// destination code, this should be removed before geocoding.
nationalNumber = nationalNumber.substring(mobileToken.length());
String region = phoneUtil.getRegionCodeForCountryCode(number.getCountryCode());
PhoneNumber copiedNumber;
try {
copiedNumber = phoneUtil.parse(nationalNumber, region);
} catch (NumberParseException e) {
// If this happens, just reuse what we had.
copiedNumber = number;
}
areaDescription = prefixFileReader.getDescriptionForNumber(copiedNumber, langStr, scriptStr,
regionStr);
} else {
areaDescription = prefixFileReader.getDescriptionForNumber(number, langStr, scriptStr,
regionStr);
}
return (areaDescription.length() > 0)
? areaDescription : getCountryNameForNumber(number, languageCode);
}
/**
* As per {@link #getDescriptionForValidNumber(PhoneNumber, Locale)} but also considers the
* region of the user. If the phone number is from the same region as the user, only a lower-level
* description will be returned, if one exists. Otherwise, the phone number's region will be
* returned, with optionally some more detailed information.
*
* <p>For example, for a user from the region "US" (United States), we would show "Mountain View,
* CA" for a particular number, omitting the United States from the description. For a user from
* the United Kingdom (region "GB"), for the same number we may show "Mountain View, CA, United
* States" or even just "United States".
*
* <p>This method assumes the validity of the number passed in has already been checked.
*
* @param number the phone number for which we want to get a text description
* @param languageCode the language code for which the description should be written
* @param userRegion the region code for a given user. This region will be omitted from the
* description if the phone number comes from this region. It should be a two-letter
* upper-case CLDR region code.
* @return a text description for the given language code for the given phone number, or an
* empty string if the number could come from multiple countries, or the country code is
* in fact invalid
*/
public String getDescriptionForValidNumber(PhoneNumber number, Locale languageCode,
String userRegion) {
// If the user region matches the number's region, then we just show the lower-level
// description, if one exists - if no description exists, we will show the region(country) name
// for the number.
String regionCode = phoneUtil.getRegionCodeForNumber(number);
if (userRegion.equals(regionCode)) {
return getDescriptionForValidNumber(number, languageCode);
}
// Otherwise, we just show the region(country) name for now.
return getRegionDisplayName(regionCode, languageCode);
// TODO: Concatenate the lower-level and country-name information in an appropriate
// way for each language.
}
/**
* As per {@link #getDescriptionForValidNumber(PhoneNumber, Locale)} but explicitly checks
* the validity of the number passed in.
*
* @param number the phone number for which we want to get a text description
* @param languageCode the language code for which the description should be written
* @return a text description for the given language code for the given phone number, or empty
* string if the number passed in is invalid or could belong to multiple countries
*/
public String getDescriptionForNumber(PhoneNumber number, Locale languageCode) {
PhoneNumberType numberType = phoneUtil.getNumberType(number);
if (numberType == PhoneNumberType.UNKNOWN) {
return "";
} else if (!phoneUtil.isNumberGeographical(numberType, number.getCountryCode())) {
return getCountryNameForNumber(number, languageCode);
}
return getDescriptionForValidNumber(number, languageCode);
}
/**
* As per {@link #getDescriptionForValidNumber(PhoneNumber, Locale, String)} but
* explicitly checks the validity of the number passed in.
*
* @param number the phone number for which we want to get a text description
* @param languageCode the language code for which the description should be written
* @param userRegion the region code for a given user. This region will be omitted from the
* description if the phone number comes from this region. It should be a two-letter
* upper-case CLDR region code.
* @return a text description for the given language code for the given phone number, or empty
* string if the number passed in is invalid or could belong to multiple countries
*/
public String getDescriptionForNumber(PhoneNumber number, Locale languageCode,
String userRegion) {
PhoneNumberType numberType = phoneUtil.getNumberType(number);
if (numberType == PhoneNumberType.UNKNOWN) {
return "";
} else if (!phoneUtil.isNumberGeographical(numberType, number.getCountryCode())) {
return getCountryNameForNumber(number, languageCode);
}
return getDescriptionForValidNumber(number, languageCode, userRegion);
}
}
|
2301_81045437/third_party_libphonenumber
|
java/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java
|
Java
|
unknown
| 10,542
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.SortedMap;
/**
* Default phone prefix map storage strategy that is used for data not containing description
* duplications. It is mainly intended to avoid the overhead of the string table management when it
* is actually unnecessary (i.e no string duplication).
*
* @author Shaopeng Jia
*/
class DefaultMapStorage extends PhonePrefixMapStorageStrategy {
public DefaultMapStorage() {}
private int[] phoneNumberPrefixes;
private String[] descriptions;
@Override
public int getPrefix(int index) {
return phoneNumberPrefixes[index];
}
@Override
public String getDescription(int index) {
return descriptions[index];
}
@Override
public void readFromSortedMap(SortedMap<Integer, String> sortedPhonePrefixMap) {
numOfEntries = sortedPhonePrefixMap.size();
phoneNumberPrefixes = new int[numOfEntries];
descriptions = new String[numOfEntries];
int index = 0;
for (int prefix : sortedPhonePrefixMap.keySet()) {
phoneNumberPrefixes[index++] = prefix;
possibleLengths.add((int) Math.log10(prefix) + 1);
}
sortedPhonePrefixMap.values().toArray(descriptions);
}
@Override
public void readExternal(ObjectInput objectInput) throws IOException {
numOfEntries = objectInput.readInt();
if (phoneNumberPrefixes == null || phoneNumberPrefixes.length < numOfEntries) {
phoneNumberPrefixes = new int[numOfEntries];
}
if (descriptions == null || descriptions.length < numOfEntries) {
descriptions = new String[numOfEntries];
}
for (int i = 0; i < numOfEntries; i++) {
phoneNumberPrefixes[i] = objectInput.readInt();
descriptions[i] = objectInput.readUTF();
}
int sizeOfLengths = objectInput.readInt();
possibleLengths.clear();
for (int i = 0; i < sizeOfLengths; i++) {
possibleLengths.add(objectInput.readInt());
}
}
@Override
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeInt(numOfEntries);
for (int i = 0; i < numOfEntries; i++) {
objectOutput.writeInt(phoneNumberPrefixes[i]);
objectOutput.writeUTF(descriptions[i]);
}
int sizeOfLengths = possibleLengths.size();
objectOutput.writeInt(sizeOfLengths);
for (Integer length : possibleLengths) {
objectOutput.writeInt(length);
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/DefaultMapStorage.java
|
Java
|
unknown
| 3,086
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* Flyweight phone prefix map storage strategy that uses a table to store unique strings and shorts
* to store the prefix and description indexes when possible. It is particularly space-efficient
* when the provided phone prefix map contains a lot of redundant descriptions.
*
* @author Philippe Liard
*/
final class FlyweightMapStorage extends PhonePrefixMapStorageStrategy {
// Size of short and integer types in bytes.
private static final int SHORT_NUM_BYTES = Short.SIZE / 8;
private static final int INT_NUM_BYTES = Integer.SIZE / 8;
// The number of bytes used to store a phone number prefix.
private int prefixSizeInBytes;
// The number of bytes used to store a description index. It is computed from the size of the
// description pool containing all the strings.
private int descIndexSizeInBytes;
private ByteBuffer phoneNumberPrefixes;
private ByteBuffer descriptionIndexes;
// Sorted string array of unique description strings.
private String[] descriptionPool;
@Override
public int getPrefix(int index) {
return readWordFromBuffer(phoneNumberPrefixes, prefixSizeInBytes, index);
}
/**
* This implementation returns the same string (same identity) when called for multiple indexes
* corresponding to prefixes that have the same description.
*/
@Override
public String getDescription(int index) {
int indexInDescriptionPool =
readWordFromBuffer(descriptionIndexes, descIndexSizeInBytes, index);
return descriptionPool[indexInDescriptionPool];
}
@Override
public void readFromSortedMap(SortedMap<Integer, String> phonePrefixMap) {
SortedSet<String> descriptionsSet = new TreeSet<String>();
numOfEntries = phonePrefixMap.size();
prefixSizeInBytes = getOptimalNumberOfBytesForValue(phonePrefixMap.lastKey());
phoneNumberPrefixes = ByteBuffer.allocate(numOfEntries * prefixSizeInBytes);
// Fill the phone number prefixes byte buffer, the set of possible lengths of prefixes and the
// description set.
int index = 0;
for (Entry<Integer, String> entry : phonePrefixMap.entrySet()) {
int prefix = entry.getKey();
storeWordInBuffer(phoneNumberPrefixes, prefixSizeInBytes, index, prefix);
possibleLengths.add((int) Math.log10(prefix) + 1);
descriptionsSet.add(entry.getValue());
++index;
}
createDescriptionPool(descriptionsSet, phonePrefixMap);
}
/**
* Creates the description pool from the provided set of string descriptions and phone prefix map.
*/
private void createDescriptionPool(SortedSet<String> descriptionsSet,
SortedMap<Integer, String> phonePrefixMap) {
descIndexSizeInBytes = getOptimalNumberOfBytesForValue(descriptionsSet.size() - 1);
descriptionIndexes = ByteBuffer.allocate(numOfEntries * descIndexSizeInBytes);
descriptionPool = new String[descriptionsSet.size()];
descriptionsSet.toArray(descriptionPool);
// Map the phone number prefixes to the descriptions.
int index = 0;
for (int i = 0; i < numOfEntries; i++) {
int prefix = readWordFromBuffer(phoneNumberPrefixes, prefixSizeInBytes, i);
String description = phonePrefixMap.get(prefix);
int positionInDescriptionPool = Arrays.binarySearch(descriptionPool, description);
storeWordInBuffer(descriptionIndexes, descIndexSizeInBytes, index, positionInDescriptionPool);
++index;
}
}
@Override
public void readExternal(ObjectInput objectInput) throws IOException {
// Read binary words sizes.
prefixSizeInBytes = objectInput.readInt();
descIndexSizeInBytes = objectInput.readInt();
// Read possible lengths.
int sizeOfLengths = objectInput.readInt();
possibleLengths.clear();
for (int i = 0; i < sizeOfLengths; i++) {
possibleLengths.add(objectInput.readInt());
}
// Read description pool size.
int descriptionPoolSize = objectInput.readInt();
// Read description pool.
if (descriptionPool == null || descriptionPool.length < descriptionPoolSize) {
descriptionPool = new String[descriptionPoolSize];
}
for (int i = 0; i < descriptionPoolSize; i++) {
String description = objectInput.readUTF();
descriptionPool[i] = description;
}
readEntries(objectInput);
}
/**
* Reads the phone prefix entries from the provided input stream and stores them to the internal
* byte buffers.
*/
private void readEntries(ObjectInput objectInput) throws IOException {
numOfEntries = objectInput.readInt();
if (phoneNumberPrefixes == null || phoneNumberPrefixes.capacity() < numOfEntries) {
phoneNumberPrefixes = ByteBuffer.allocate(numOfEntries * prefixSizeInBytes);
}
if (descriptionIndexes == null || descriptionIndexes.capacity() < numOfEntries) {
descriptionIndexes = ByteBuffer.allocate(numOfEntries * descIndexSizeInBytes);
}
for (int i = 0; i < numOfEntries; i++) {
readExternalWord(objectInput, prefixSizeInBytes, phoneNumberPrefixes, i);
readExternalWord(objectInput, descIndexSizeInBytes, descriptionIndexes, i);
}
}
@Override
public void writeExternal(ObjectOutput objectOutput) throws IOException {
// Write binary words sizes.
objectOutput.writeInt(prefixSizeInBytes);
objectOutput.writeInt(descIndexSizeInBytes);
// Write possible lengths.
int sizeOfLengths = possibleLengths.size();
objectOutput.writeInt(sizeOfLengths);
for (Integer length : possibleLengths) {
objectOutput.writeInt(length);
}
// Write description pool size.
objectOutput.writeInt(descriptionPool.length);
// Write description pool.
for (String description : descriptionPool) {
objectOutput.writeUTF(description);
}
// Write entries.
objectOutput.writeInt(numOfEntries);
for (int i = 0; i < numOfEntries; i++) {
writeExternalWord(objectOutput, prefixSizeInBytes, phoneNumberPrefixes, i);
writeExternalWord(objectOutput, descIndexSizeInBytes, descriptionIndexes, i);
}
}
/**
* Gets the minimum number of bytes that can be used to store the provided {@code value}.
*/
private static int getOptimalNumberOfBytesForValue(int value) {
return value <= Short.MAX_VALUE ? SHORT_NUM_BYTES : INT_NUM_BYTES;
}
/**
* Stores a value which is read from the provided {@code objectInput} to the provided byte {@code
* buffer} at the specified {@code index}.
*
* @param objectInput the object input stream from which the value is read
* @param wordSize the number of bytes used to store the value read from the stream
* @param outputBuffer the byte buffer to which the value is stored
* @param index the index where the value is stored in the buffer
* @throws IOException if an error occurred reading from the object input stream
*/
private static void readExternalWord(ObjectInput objectInput, int wordSize,
ByteBuffer outputBuffer, int index) throws IOException {
int wordIndex = index * wordSize;
if (wordSize == SHORT_NUM_BYTES) {
outputBuffer.putShort(wordIndex, objectInput.readShort());
} else {
outputBuffer.putInt(wordIndex, objectInput.readInt());
}
}
/**
* Writes the value read from the provided byte {@code buffer} at the specified {@code index} to
* the provided {@code objectOutput}.
*
* @param objectOutput the object output stream to which the value is written
* @param wordSize the number of bytes used to store the value
* @param inputBuffer the byte buffer from which the value is read
* @param index the index of the value in the the byte buffer
* @throws IOException if an error occurred writing to the provided object output stream
*/
private static void writeExternalWord(ObjectOutput objectOutput, int wordSize,
ByteBuffer inputBuffer, int index) throws IOException {
int wordIndex = index * wordSize;
if (wordSize == SHORT_NUM_BYTES) {
objectOutput.writeShort(inputBuffer.getShort(wordIndex));
} else {
objectOutput.writeInt(inputBuffer.getInt(wordIndex));
}
}
/**
* Reads the {@code value} at the specified {@code index} from the provided byte {@code buffer}.
* Note that only integer and short sizes are supported.
*
* @param buffer the byte buffer from which the value is read
* @param wordSize the number of bytes used to store the value
* @param index the index where the value is read from
*
* @return the value read from the buffer
*/
private static int readWordFromBuffer(ByteBuffer buffer, int wordSize, int index) {
int wordIndex = index * wordSize;
return wordSize == SHORT_NUM_BYTES ? buffer.getShort(wordIndex) : buffer.getInt(wordIndex);
}
/**
* Stores the provided {@code value} to the provided byte {@code buffer} at the specified {@code
* index} using the provided {@code wordSize} in bytes. Note that only integer and short sizes are
* supported.
*
* @param buffer the byte buffer to which the value is stored
* @param wordSize the number of bytes used to store the provided value
* @param index the index to which the value is stored
* @param value the value that is stored assuming it does not require more than the specified
* number of bytes.
*/
private static void storeWordInBuffer(ByteBuffer buffer, int wordSize, int index, int value) {
int wordIndex = index * wordSize;
if (wordSize == SHORT_NUM_BYTES) {
buffer.putShort(wordIndex, (short) value);
} else {
buffer.putInt(wordIndex, value);
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/FlyweightMapStorage.java
|
Java
|
unknown
| 10,467
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* A utility which knows the data files that are available for the phone prefix mappers to use.
* The data files contain mappings from phone number prefixes to text descriptions, and are
* organized by country calling code and language that the text descriptions are in.
*
* @author Shaopeng Jia
*/
public class MappingFileProvider implements Externalizable {
private int numOfEntries = 0;
private int[] countryCallingCodes;
private List<Set<String>> availableLanguages;
private static final Map<String, String> LOCALE_NORMALIZATION_MAP;
static {
Map<String, String> normalizationMap = new HashMap<String, String>();
normalizationMap.put("zh_TW", "zh_Hant");
normalizationMap.put("zh_HK", "zh_Hant");
normalizationMap.put("zh_MO", "zh_Hant");
LOCALE_NORMALIZATION_MAP = Collections.unmodifiableMap(normalizationMap);
}
/**
* Creates an empty {@link MappingFileProvider}. The default constructor is necessary for
* implementing {@link Externalizable}. The empty provider could later be populated by
* {@link #readFileConfigs(java.util.SortedMap)} or {@link #readExternal(java.io.ObjectInput)}.
*/
public MappingFileProvider() {
}
/**
* Initializes an {@link MappingFileProvider} with {@code availableDataFiles}.
*
* @param availableDataFiles a map from country calling codes to sets of languages in which data
* files are available for the specific country calling code. The map is sorted in ascending
* order of the country calling codes as integers.
*/
public void readFileConfigs(SortedMap<Integer, Set<String>> availableDataFiles) {
numOfEntries = availableDataFiles.size();
countryCallingCodes = new int[numOfEntries];
availableLanguages = new ArrayList<Set<String>>(numOfEntries);
int index = 0;
for (int countryCallingCode : availableDataFiles.keySet()) {
countryCallingCodes[index++] = countryCallingCode;
availableLanguages.add(new HashSet<String>(availableDataFiles.get(countryCallingCode)));
}
}
/**
* Supports Java Serialization.
*/
public void readExternal(ObjectInput objectInput) throws IOException {
numOfEntries = objectInput.readInt();
if (countryCallingCodes == null || countryCallingCodes.length < numOfEntries) {
countryCallingCodes = new int[numOfEntries];
}
if (availableLanguages == null) {
availableLanguages = new ArrayList<Set<String>>();
}
for (int i = 0; i < numOfEntries; i++) {
countryCallingCodes[i] = objectInput.readInt();
int numOfLangs = objectInput.readInt();
Set<String> setOfLangs = new HashSet<String>();
for (int j = 0; j < numOfLangs; j++) {
setOfLangs.add(objectInput.readUTF());
}
availableLanguages.add(setOfLangs);
}
}
/**
* Supports Java Serialization.
*/
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeInt(numOfEntries);
for (int i = 0; i < numOfEntries; i++) {
objectOutput.writeInt(countryCallingCodes[i]);
Set<String> setOfLangs = availableLanguages.get(i);
int numOfLangs = setOfLangs.size();
objectOutput.writeInt(numOfLangs);
for (String lang : setOfLangs) {
objectOutput.writeUTF(lang);
}
}
}
/**
* Returns a string representing the data in this class. The string contains one line for each
* country calling code. The country calling code is followed by a '|' and then a list of
* comma-separated languages sorted in ascending order.
*/
@Override
public String toString() {
StringBuilder output = new StringBuilder();
for (int i = 0; i < numOfEntries; i++) {
output.append(countryCallingCodes[i]);
output.append('|');
SortedSet<String> sortedSetOfLangs = new TreeSet<String>(availableLanguages.get(i));
for (String lang : sortedSetOfLangs) {
output.append(lang);
output.append(',');
}
output.append('\n');
}
return output.toString();
}
/**
* Gets the name of the file that contains the mapping data for the {@code countryCallingCode} in
* the language specified.
*
* @param countryCallingCode the country calling code of phone numbers which the data file
* contains
* @param language two or three-letter lowercase ISO language codes as defined by ISO 639. Note
* that where two different language codes exist (e.g. 'he' and 'iw' for Hebrew) we use the
* one that Java/Android canonicalized on ('iw' in this case).
* @param script four-letter titlecase (the first letter is uppercase and the rest of the letters
* are lowercase) ISO script codes as defined in ISO 15924
* @param region two-letter uppercase ISO country codes as defined by ISO 3166-1
* @return the name of the file, or empty string if no such file can be found
*/
String getFileName(int countryCallingCode, String language, String script, String region) {
if (language.length() == 0) {
return "";
}
int index = Arrays.binarySearch(countryCallingCodes, countryCallingCode);
if (index < 0) {
return "";
}
Set<String> setOfLangs = availableLanguages.get(index);
if (setOfLangs.size() > 0) {
String languageCode = findBestMatchingLanguageCode(setOfLangs, language, script, region);
if (languageCode.length() > 0) {
StringBuilder fileName = new StringBuilder();
fileName.append(countryCallingCode).append('_').append(languageCode);
return fileName.toString();
}
}
return "";
}
private String findBestMatchingLanguageCode(
Set<String> setOfLangs, String language, String script, String region) {
StringBuilder fullLocale = constructFullLocale(language, script, region);
String fullLocaleStr = fullLocale.toString();
String normalizedLocale = LOCALE_NORMALIZATION_MAP.get(fullLocaleStr);
if (normalizedLocale != null) {
if (setOfLangs.contains(normalizedLocale)) {
return normalizedLocale;
}
}
if (setOfLangs.contains(fullLocaleStr)) {
return fullLocaleStr;
}
if (onlyOneOfScriptOrRegionIsEmpty(script, region)) {
if (setOfLangs.contains(language)) {
return language;
}
} else if (script.length() > 0 && region.length() > 0) {
StringBuilder langWithScript = new StringBuilder(language).append('_').append(script);
String langWithScriptStr = langWithScript.toString();
if (setOfLangs.contains(langWithScriptStr)) {
return langWithScriptStr;
}
StringBuilder langWithRegion = new StringBuilder(language).append('_').append(region);
String langWithRegionStr = langWithRegion.toString();
if (setOfLangs.contains(langWithRegionStr)) {
return langWithRegionStr;
}
if (setOfLangs.contains(language)) {
return language;
}
}
return "";
}
private boolean onlyOneOfScriptOrRegionIsEmpty(String script, String region) {
return (script.length() == 0 && region.length() > 0)
|| (region.length() == 0 && script.length() > 0);
}
private StringBuilder constructFullLocale(String language, String script, String region) {
StringBuilder fullLocale = new StringBuilder(language);
appendSubsequentLocalePart(script, fullLocale);
appendSubsequentLocalePart(region, fullLocale);
return fullLocale;
}
private void appendSubsequentLocalePart(String subsequentLocalePart, StringBuilder fullLocale) {
if (subsequentLocalePart.length() > 0) {
fullLocale.append('_').append(subsequentLocalePart);
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/MappingFileProvider.java
|
Java
|
unknown
| 8,684
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.logging.Logger;
/**
* A utility that maps phone number prefixes to a description string, which may be, for example,
* the geographical area the prefix covers.
*
* @author Shaopeng Jia
*/
public class PhonePrefixMap implements Externalizable {
private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
private static final Logger logger = Logger.getLogger(PhonePrefixMap.class.getName());
private PhonePrefixMapStorageStrategy phonePrefixMapStorage;
// @VisibleForTesting
PhonePrefixMapStorageStrategy getPhonePrefixMapStorage() {
return phonePrefixMapStorage;
}
/**
* Creates an empty {@link PhonePrefixMap}. The default constructor is necessary for implementing
* {@link Externalizable}. The empty map could later be populated by
* {@link #readPhonePrefixMap(java.util.SortedMap)} or {@link #readExternal(java.io.ObjectInput)}.
*/
public PhonePrefixMap() {}
/**
* Gets the size of the provided phone prefix map storage. The map storage passed-in will be
* filled as a result.
*/
private static int getSizeOfPhonePrefixMapStorage(PhonePrefixMapStorageStrategy mapStorage,
SortedMap<Integer, String> phonePrefixMap) throws IOException {
mapStorage.readFromSortedMap(phonePrefixMap);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
mapStorage.writeExternal(objectOutputStream);
objectOutputStream.flush();
int sizeOfStorage = byteArrayOutputStream.size();
objectOutputStream.close();
return sizeOfStorage;
}
private PhonePrefixMapStorageStrategy createDefaultMapStorage() {
return new DefaultMapStorage();
}
private PhonePrefixMapStorageStrategy createFlyweightMapStorage() {
return new FlyweightMapStorage();
}
/**
* Gets the smaller phone prefix map storage strategy according to the provided phone prefix map.
* It actually uses (outputs the data to a stream) both strategies and retains the best one which
* make this method quite expensive.
*/
// @VisibleForTesting
PhonePrefixMapStorageStrategy getSmallerMapStorage(SortedMap<Integer, String> phonePrefixMap) {
try {
PhonePrefixMapStorageStrategy flyweightMapStorage = createFlyweightMapStorage();
int sizeOfFlyweightMapStorage = getSizeOfPhonePrefixMapStorage(flyweightMapStorage,
phonePrefixMap);
PhonePrefixMapStorageStrategy defaultMapStorage = createDefaultMapStorage();
int sizeOfDefaultMapStorage = getSizeOfPhonePrefixMapStorage(defaultMapStorage,
phonePrefixMap);
return sizeOfFlyweightMapStorage < sizeOfDefaultMapStorage
? flyweightMapStorage : defaultMapStorage;
} catch (IOException e) {
logger.severe(e.getMessage());
return createFlyweightMapStorage();
}
}
/**
* Creates an {@link PhonePrefixMap} initialized with {@code sortedPhonePrefixMap}. Note that the
* underlying implementation of this method is expensive thus should not be called by
* time-critical applications.
*
* @param sortedPhonePrefixMap a map from phone number prefixes to descriptions of those prefixes
* sorted in ascending order of the phone number prefixes as integers.
*/
public void readPhonePrefixMap(SortedMap<Integer, String> sortedPhonePrefixMap) {
phonePrefixMapStorage = getSmallerMapStorage(sortedPhonePrefixMap);
}
/**
* Supports Java Serialization.
*/
public void readExternal(ObjectInput objectInput) throws IOException {
// Read the phone prefix map storage strategy flag.
boolean useFlyweightMapStorage = objectInput.readBoolean();
if (useFlyweightMapStorage) {
phonePrefixMapStorage = new FlyweightMapStorage();
} else {
phonePrefixMapStorage = new DefaultMapStorage();
}
phonePrefixMapStorage.readExternal(objectInput);
}
/**
* Supports Java Serialization.
*/
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeBoolean(phonePrefixMapStorage instanceof FlyweightMapStorage);
phonePrefixMapStorage.writeExternal(objectOutput);
}
/**
* Returns the description of the {@code number}. This method distinguishes the case of an invalid
* prefix and a prefix for which the name is not available in the current language. If the
* description is not available in the current language an empty string is returned. If no
* description was found for the provided number, null is returned.
*
* @param number the phone number to look up
* @return the description of the number
*/
String lookup(long number) {
int numOfEntries = phonePrefixMapStorage.getNumOfEntries();
if (numOfEntries == 0) {
return null;
}
long phonePrefix = number;
int currentIndex = numOfEntries - 1;
SortedSet<Integer> currentSetOfLengths = phonePrefixMapStorage.getPossibleLengths();
while (currentSetOfLengths.size() > 0) {
Integer possibleLength = currentSetOfLengths.last();
String phonePrefixStr = String.valueOf(phonePrefix);
if (phonePrefixStr.length() > possibleLength) {
phonePrefix = Long.parseLong(phonePrefixStr.substring(0, possibleLength));
}
currentIndex = binarySearch(0, currentIndex, phonePrefix);
if (currentIndex < 0) {
return null;
}
int currentPrefix = phonePrefixMapStorage.getPrefix(currentIndex);
if (phonePrefix == currentPrefix) {
return phonePrefixMapStorage.getDescription(currentIndex);
}
currentSetOfLengths = currentSetOfLengths.headSet(possibleLength);
}
return null;
}
/**
* As per {@link #lookup(long)}, but receives the number as a PhoneNumber instead of a long.
*
* @param number the phone number to look up
* @return the description corresponding to the prefix that best matches this phone number
*/
public String lookup(PhoneNumber number) {
long phonePrefix =
Long.parseLong(number.getCountryCode() + phoneUtil.getNationalSignificantNumber(number));
return lookup(phonePrefix);
}
/**
* Does a binary search for {@code value} in the provided array from {@code start} to {@code end}
* (inclusive). Returns the position if {@code value} is found; otherwise, returns the
* position which has the largest value that is less than {@code value}. This means if
* {@code value} is the smallest, -1 will be returned.
*/
private int binarySearch(int start, int end, long value) {
int current = 0;
while (start <= end) {
current = (start + end) >>> 1;
int currentValue = phonePrefixMapStorage.getPrefix(current);
if (currentValue == value) {
return current;
} else if (currentValue > value) {
current--;
end = current;
} else {
start = current + 1;
}
}
return current;
}
/**
* Dumps the mappings contained in the phone prefix map.
*/
@Override
public String toString() {
return phonePrefixMapStorage.toString();
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMap.java
|
Java
|
unknown
| 8,239
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.SortedMap;
import java.util.TreeSet;
/**
* Abstracts the way phone prefix data is stored into memory and serialized to a stream. It is used
* by {@link PhonePrefixMap} to support the most space-efficient storage strategy according to the
* provided data.
*
* @author Philippe Liard
*/
abstract class PhonePrefixMapStorageStrategy {
protected int numOfEntries = 0;
protected final TreeSet<Integer> possibleLengths = new TreeSet<Integer>();
/**
* Gets the phone number prefix located at the provided {@code index}.
*
* @param index the index of the prefix that needs to be returned
* @return the phone number prefix at the provided index
*/
public abstract int getPrefix(int index);
/**
* Gets the description corresponding to the phone number prefix located at the provided {@code
* index}. If the description is not available in the current language an empty string is
* returned.
*
* @param index the index of the phone number prefix that needs to be returned
* @return the description corresponding to the phone number prefix at the provided index
*/
public abstract String getDescription(int index);
/**
* Sets the internal state of the underlying storage implementation from the provided {@code
* sortedPhonePrefixMap} that maps phone number prefixes to description strings.
*
* @param sortedPhonePrefixMap a sorted map that maps phone number prefixes including country
* calling code to description strings
*/
public abstract void readFromSortedMap(SortedMap<Integer, String> sortedPhonePrefixMap);
/**
* Sets the internal state of the underlying storage implementation reading the provided {@code
* objectInput}.
*
* @param objectInput the object input stream from which the phone prefix map is read
* @throws IOException if an error occurred reading the provided input stream
*/
public abstract void readExternal(ObjectInput objectInput) throws IOException;
/**
* Writes the internal state of the underlying storage implementation to the provided {@code
* objectOutput}.
*
* @param objectOutput the object output stream to which the phone prefix map is written
* @throws IOException if an error occurred writing to the provided output stream
*/
public abstract void writeExternal(ObjectOutput objectOutput) throws IOException;
/**
* @return the number of entries contained in the phone prefix map
*/
public int getNumOfEntries() {
return numOfEntries;
}
/**
* @return the set containing the possible lengths of prefixes
*/
public TreeSet<Integer> getPossibleLengths() {
return possibleLengths;
}
@Override
public String toString() {
StringBuilder output = new StringBuilder();
int numOfEntries = getNumOfEntries();
for (int i = 0; i < numOfEntries; i++) {
output.append(getPrefix(i))
.append("|")
.append(getDescription(i))
.append("\n");
}
return output.toString();
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMapStorageStrategy.java
|
Java
|
unknown
| 3,781
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A helper class doing file handling and lookup of phone number prefix mappings.
*
* @author Shaopeng Jia
*/
public class PrefixFileReader {
private static final Logger logger = Logger.getLogger(PrefixFileReader.class.getName());
private final String phonePrefixDataDirectory;
// The mappingFileProvider knows for which combination of countryCallingCode and language a phone
// prefix mapping file is available in the file system, so that a file can be loaded when needed.
private MappingFileProvider mappingFileProvider = new MappingFileProvider();
// A mapping from countryCallingCode_lang to the corresponding phone prefix map that has been
// loaded.
private Map<String, PhonePrefixMap> availablePhonePrefixMaps =
new HashMap<String, PhonePrefixMap>();
public PrefixFileReader(String phonePrefixDataDirectory) {
this.phonePrefixDataDirectory = phonePrefixDataDirectory;
loadMappingFileProvider();
}
private void loadMappingFileProvider() {
InputStream source =
PrefixFileReader.class.getResourceAsStream(phonePrefixDataDirectory + "config");
ObjectInputStream in = null;
try {
in = new ObjectInputStream(source);
mappingFileProvider.readExternal(in);
} catch (IOException e) {
logger.log(Level.WARNING, e.toString());
} finally {
close(in);
}
}
private PhonePrefixMap getPhonePrefixDescriptions(
int prefixMapKey, String language, String script, String region) {
String fileName = mappingFileProvider.getFileName(prefixMapKey, language, script, region);
if (fileName.length() == 0) {
return null;
}
if (!availablePhonePrefixMaps.containsKey(fileName)) {
loadPhonePrefixMapFromFile(fileName);
}
return availablePhonePrefixMaps.get(fileName);
}
private void loadPhonePrefixMapFromFile(String fileName) {
InputStream source =
PrefixFileReader.class.getResourceAsStream(phonePrefixDataDirectory + fileName);
ObjectInputStream in = null;
try {
in = new ObjectInputStream(source);
PhonePrefixMap map = new PhonePrefixMap();
map.readExternal(in);
availablePhonePrefixMaps.put(fileName, map);
} catch (IOException e) {
logger.log(Level.WARNING, e.toString());
} finally {
close(in);
}
}
private static void close(InputStream in) {
if (in != null) {
try {
in.close();
} catch (IOException e) {
logger.log(Level.WARNING, e.toString());
}
}
}
/**
* Returns a text description in the given language for the given phone number.
*
* @param number the phone number for which we want to get a text description
* @param language two or three-letter lowercase ISO language codes as defined by ISO 639. Note
* that where two different language codes exist (e.g. 'he' and 'iw' for Hebrew) we use the
* one that Java/Android canonicalized on ('iw' in this case).
* @param script four-letter titlecase (the first letter is uppercase and the rest of the letters
* are lowercase) ISO script code as defined in ISO 15924
* @param region two-letter uppercase ISO country code as defined by ISO 3166-1
* @return a text description in the given language for the given phone number, or an empty
* string if a description is not available
*/
public String getDescriptionForNumber(
PhoneNumber number, String language, String script, String region) {
int countryCallingCode = number.getCountryCode();
// As the NANPA data is split into multiple files covering 3-digit areas, use a phone number
// prefix of 4 digits for NANPA instead, e.g. 1650.
int phonePrefix = (countryCallingCode != 1)
? countryCallingCode : (1000 + (int) (number.getNationalNumber() / 10000000));
PhonePrefixMap phonePrefixDescriptions =
getPhonePrefixDescriptions(phonePrefix, language, script, region);
String description = (phonePrefixDescriptions != null)
? phonePrefixDescriptions.lookup(number) : null;
// When a location is not available in the requested language, fall back to English.
if ((description == null || description.length() == 0) && mayFallBackToEnglish(language)) {
PhonePrefixMap defaultMap = getPhonePrefixDescriptions(phonePrefix, "en", "", "");
if (defaultMap == null) {
return "";
}
description = defaultMap.lookup(number);
}
return description != null ? description : "";
}
private boolean mayFallBackToEnglish(String lang) {
// Don't fall back to English if the requested language is among the following:
// - Chinese
// - Japanese
// - Korean
return !lang.equals("zh") && !lang.equals("ja") && !lang.equals("ko");
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixFileReader.java
|
Java
|
unknown
| 5,683
|
/*
* Copyright (C) 2012 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.prefixmapper;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.LinkedList;
import java.util.List;
import java.util.SortedMap;
import java.util.StringTokenizer;
/**
* A utility that maps phone number prefixes to a list of strings describing the time zones to
* which each prefix belongs.
*/
public class PrefixTimeZonesMap implements Externalizable {
private final PhonePrefixMap phonePrefixMap = new PhonePrefixMap();
private static final String RAW_STRING_TIMEZONES_SEPARATOR = "&";
/**
* Creates a {@link PrefixTimeZonesMap} initialized with {@code sortedPrefixTimeZoneMap}. Note
* that the underlying implementation of this method is expensive thus should not be called by
* time-critical applications.
*
* @param sortedPrefixTimeZoneMap a map from phone number prefixes to their corresponding time
* zones, sorted in ascending order of the phone number prefixes as integers.
*/
public void readPrefixTimeZonesMap(SortedMap<Integer, String> sortedPrefixTimeZoneMap) {
phonePrefixMap.readPhonePrefixMap(sortedPrefixTimeZoneMap);
}
/**
* Supports Java Serialization.
*/
public void writeExternal(ObjectOutput objectOutput) throws IOException {
phonePrefixMap.writeExternal(objectOutput);
}
public void readExternal(ObjectInput objectInput) throws IOException {
phonePrefixMap.readExternal(objectInput);
}
/**
* Returns the list of time zones {@code key} corresponds to.
*
* <p>{@code key} could be the calling country code and the full significant number of a
* certain number, or it could be just a phone-number prefix.
* For example, the full number 16502530000 (from the phone-number +1 650 253 0000) is a valid
* input. Also, any of its prefixes, such as 16502, is also valid.
*
* @param key the key to look up
* @return the list of corresponding time zones
*/
private List<String> lookupTimeZonesForNumber(long key) {
// Lookup in the map data. The returned String may consist of several time zones, so it must be
// split.
String timezonesString = phonePrefixMap.lookup(key);
if (timezonesString == null) {
return new LinkedList<String>();
}
return tokenizeRawOutputString(timezonesString);
}
/**
* As per {@link #lookupTimeZonesForNumber(long)}, but receives the number as a PhoneNumber
* instead of a long.
*
* @param number the phone number to look up
* @return the list of corresponding time zones
*/
public List<String> lookupTimeZonesForNumber(PhoneNumber number) {
long phonePrefix = Long.parseLong(number.getCountryCode()
+ PhoneNumberUtil.getInstance().getNationalSignificantNumber(number));
return lookupTimeZonesForNumber(phonePrefix);
}
/**
* Returns the list of time zones {@code number}'s calling country code corresponds to.
*
* @param number the phone number to look up
* @return the list of corresponding time zones
*/
public List<String> lookupCountryLevelTimeZonesForNumber(PhoneNumber number) {
return lookupTimeZonesForNumber(number.getCountryCode());
}
/**
* Split {@code timezonesString} into all the time zones that are part of it.
*/
private List<String> tokenizeRawOutputString(String timezonesString) {
StringTokenizer tokenizer = new StringTokenizer(timezonesString,
RAW_STRING_TIMEZONES_SEPARATOR);
LinkedList<String> timezonesList = new LinkedList<String>();
while (tokenizer.hasMoreTokens()) {
timezonesList.add(tokenizer.nextToken());
}
return timezonesList;
}
/**
* Dumps the mappings contained in the phone prefix map.
*/
@Override
public String toString() {
return phonePrefixMap.toString();
}
}
|
2301_81045437/third_party_libphonenumber
|
java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixTimeZonesMap.java
|
Java
|
unknown
| 4,611
|
/*
* Copyright (C) 2012 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
* Please don't modify it directly.
*/
package com.google.i18n.phonenumbers;
import java.util.HashSet;
import java.util.Set;
public class AlternateFormatsCountryCodeSet {
// A set of all country codes for which data is available.
static Set<Integer> getCountryCodeSet() {
// The capacity is set to 62 as there are 47 different entries,
// and this offers a load factor of roughly 0.75.
Set<Integer> countryCodeSet = new HashSet<Integer>(62);
countryCodeSet.add(7);
countryCodeSet.add(27);
countryCodeSet.add(30);
countryCodeSet.add(31);
countryCodeSet.add(34);
countryCodeSet.add(36);
countryCodeSet.add(39);
countryCodeSet.add(43);
countryCodeSet.add(44);
countryCodeSet.add(49);
countryCodeSet.add(52);
countryCodeSet.add(54);
countryCodeSet.add(55);
countryCodeSet.add(58);
countryCodeSet.add(61);
countryCodeSet.add(62);
countryCodeSet.add(63);
countryCodeSet.add(64);
countryCodeSet.add(66);
countryCodeSet.add(81);
countryCodeSet.add(84);
countryCodeSet.add(90);
countryCodeSet.add(91);
countryCodeSet.add(94);
countryCodeSet.add(95);
countryCodeSet.add(255);
countryCodeSet.add(350);
countryCodeSet.add(351);
countryCodeSet.add(352);
countryCodeSet.add(358);
countryCodeSet.add(359);
countryCodeSet.add(372);
countryCodeSet.add(373);
countryCodeSet.add(380);
countryCodeSet.add(381);
countryCodeSet.add(385);
countryCodeSet.add(505);
countryCodeSet.add(506);
countryCodeSet.add(595);
countryCodeSet.add(675);
countryCodeSet.add(676);
countryCodeSet.add(679);
countryCodeSet.add(855);
countryCodeSet.add(856);
countryCodeSet.add(971);
countryCodeSet.add(972);
countryCodeSet.add(995);
return countryCodeSet;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java
|
Java
|
unknown
| 2,523
|
/*
* Copyright (C) 2009 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.NumberFormat;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import com.google.i18n.phonenumbers.internal.RegexCache;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A formatter which formats phone numbers as they are entered.
*
* <p>An AsYouTypeFormatter can be created by invoking
* {@link PhoneNumberUtil#getAsYouTypeFormatter}. After that, digits can be added by invoking
* {@link #inputDigit} on the formatter instance, and the partially formatted phone number will be
* returned each time a digit is added. {@link #clear} can be invoked before formatting a new
* number.
*
* <p>See the unittests for more details on how the formatter is to be used.
*
* @author Shaopeng Jia
*/
public class AsYouTypeFormatter {
private String currentOutput = "";
private StringBuilder formattingTemplate = new StringBuilder();
// The pattern from numberFormat that is currently used to create formattingTemplate.
private String currentFormattingPattern = "";
private StringBuilder accruedInput = new StringBuilder();
private StringBuilder accruedInputWithoutFormatting = new StringBuilder();
// This indicates whether AsYouTypeFormatter is currently doing the formatting.
private boolean ableToFormat = true;
// Set to true when users enter their own formatting. AsYouTypeFormatter will do no formatting at
// all when this is set to true.
private boolean inputHasFormatting = false;
// This is set to true when we know the user is entering a full national significant number, since
// we have either detected a national prefix or an international dialing prefix. When this is
// true, we will no longer use local number formatting patterns.
private boolean isCompleteNumber = false;
private boolean isExpectingCountryCallingCode = false;
private final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
private String defaultCountry;
// Character used when appropriate to separate a prefix, such as a long NDD or a country calling
// code, from the national number.
private static final char SEPARATOR_BEFORE_NATIONAL_NUMBER = ' ';
private static final PhoneMetadata EMPTY_METADATA =
new PhoneMetadata().setInternationalPrefix("NA");
private PhoneMetadata defaultMetadata;
private PhoneMetadata currentMetadata;
// A pattern that is used to determine if a numberFormat under availableFormats is eligible to be
// used by the AYTF. It is eligible when the format element under numberFormat contains groups of
// the dollar sign followed by a single digit, separated by valid phone number punctuation. This
// prevents invalid punctuation (such as the star sign in Israeli star numbers) getting into the
// output of the AYTF.
private static final Pattern ELIGIBLE_FORMAT_PATTERN =
Pattern.compile("[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*"
+ "(\\$\\d" + "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]*)+");
// A set of characters that, if found in a national prefix formatting rules, are an indicator to
// us that we should separate the national prefix from the number when formatting.
private static final Pattern NATIONAL_PREFIX_SEPARATORS_PATTERN = Pattern.compile("[- ]");
// This is the minimum length of national number accrued that is required to trigger the
// formatter. The first element of the leadingDigitsPattern of each numberFormat contains a
// regular expression that matches up to this number of digits.
private static final int MIN_LEADING_DIGITS_LENGTH = 3;
// The digits that have not been entered yet will be represented by a \u2008, the punctuation
// space.
private static final String DIGIT_PLACEHOLDER = "\u2008";
private static final Pattern DIGIT_PATTERN = Pattern.compile(DIGIT_PLACEHOLDER);
private int lastMatchPosition = 0;
// The position of a digit upon which inputDigitAndRememberPosition is most recently invoked, as
// found in the original sequence of characters the user entered.
private int originalPosition = 0;
// The position of a digit upon which inputDigitAndRememberPosition is most recently invoked, as
// found in accruedInputWithoutFormatting.
private int positionToRemember = 0;
// This contains anything that has been entered so far preceding the national significant number,
// and it is formatted (e.g. with space inserted). For example, this can contain IDD, country
// code, and/or NDD, etc.
private StringBuilder prefixBeforeNationalNumber = new StringBuilder();
private boolean shouldAddSpaceAfterNationalPrefix = false;
// This contains the national prefix that has been extracted. It contains only digits without
// formatting.
private String extractedNationalPrefix = "";
private StringBuilder nationalNumber = new StringBuilder();
private List<NumberFormat> possibleFormats = new ArrayList<NumberFormat>();
// A cache for frequently used country-specific regular expressions.
private RegexCache regexCache = new RegexCache(64);
/**
* Constructs an as-you-type formatter. Should be obtained from {@link
* PhoneNumberUtil#getAsYouTypeFormatter}.
*
* @param regionCode the country/region where the phone number is being entered
*/
AsYouTypeFormatter(String regionCode) {
defaultCountry = regionCode;
currentMetadata = getMetadataForRegion(defaultCountry);
defaultMetadata = currentMetadata;
}
// The metadata needed by this class is the same for all regions sharing the same country calling
// code. Therefore, we return the metadata for "main" region for this country calling code.
private PhoneMetadata getMetadataForRegion(String regionCode) {
int countryCallingCode = phoneUtil.getCountryCodeForRegion(regionCode);
String mainCountry = phoneUtil.getRegionCodeForCountryCode(countryCallingCode);
PhoneMetadata metadata = phoneUtil.getMetadataForRegion(mainCountry);
if (metadata != null) {
return metadata;
}
// Set to a default instance of the metadata. This allows us to function with an incorrect
// region code, even if formatting only works for numbers specified with "+".
return EMPTY_METADATA;
}
// Returns true if a new template is created as opposed to reusing the existing template.
private boolean maybeCreateNewTemplate() {
// When there are multiple available formats, the formatter uses the first format where a
// formatting template could be created.
Iterator<NumberFormat> it = possibleFormats.iterator();
while (it.hasNext()) {
NumberFormat numberFormat = it.next();
String pattern = numberFormat.getPattern();
if (currentFormattingPattern.equals(pattern)) {
return false;
}
if (createFormattingTemplate(numberFormat)) {
currentFormattingPattern = pattern;
shouldAddSpaceAfterNationalPrefix =
NATIONAL_PREFIX_SEPARATORS_PATTERN.matcher(
numberFormat.getNationalPrefixFormattingRule()).find();
// With a new formatting template, the matched position using the old template needs to be
// reset.
lastMatchPosition = 0;
return true;
} else { // Remove the current number format from possibleFormats.
it.remove();
}
}
ableToFormat = false;
return false;
}
private void getAvailableFormats(String leadingDigits) {
// First decide whether we should use international or national number rules.
boolean isInternationalNumber = isCompleteNumber && extractedNationalPrefix.length() == 0;
List<NumberFormat> formatList =
(isInternationalNumber && currentMetadata.intlNumberFormatSize() > 0)
? currentMetadata.intlNumberFormats()
: currentMetadata.numberFormats();
for (NumberFormat format : formatList) {
// Discard a few formats that we know are not relevant based on the presence of the national
// prefix.
if (extractedNationalPrefix.length() > 0
&& PhoneNumberUtil.formattingRuleHasFirstGroupOnly(
format.getNationalPrefixFormattingRule())
&& !format.getNationalPrefixOptionalWhenFormatting()
&& !format.hasDomesticCarrierCodeFormattingRule()) {
// If it is a national number that had a national prefix, any rules that aren't valid with a
// national prefix should be excluded. A rule that has a carrier-code formatting rule is
// kept since the national prefix might actually be an extracted carrier code - we don't
// distinguish between these when extracting it in the AYTF.
continue;
} else if (extractedNationalPrefix.length() == 0
&& !isCompleteNumber
&& !PhoneNumberUtil.formattingRuleHasFirstGroupOnly(
format.getNationalPrefixFormattingRule())
&& !format.getNationalPrefixOptionalWhenFormatting()) {
// This number was entered without a national prefix, and this formatting rule requires one,
// so we discard it.
continue;
}
if (ELIGIBLE_FORMAT_PATTERN.matcher(format.getFormat()).matches()) {
possibleFormats.add(format);
}
}
narrowDownPossibleFormats(leadingDigits);
}
private void narrowDownPossibleFormats(String leadingDigits) {
int indexOfLeadingDigitsPattern = leadingDigits.length() - MIN_LEADING_DIGITS_LENGTH;
Iterator<NumberFormat> it = possibleFormats.iterator();
while (it.hasNext()) {
NumberFormat format = it.next();
if (format.leadingDigitsPatternSize() == 0) {
// Keep everything that isn't restricted by leading digits.
continue;
}
int lastLeadingDigitsPattern =
Math.min(indexOfLeadingDigitsPattern, format.leadingDigitsPatternSize() - 1);
Pattern leadingDigitsPattern = regexCache.getPatternForRegex(
format.getLeadingDigitsPattern(lastLeadingDigitsPattern));
Matcher m = leadingDigitsPattern.matcher(leadingDigits);
if (!m.lookingAt()) {
it.remove();
}
}
}
private boolean createFormattingTemplate(NumberFormat format) {
String numberPattern = format.getPattern();
formattingTemplate.setLength(0);
String tempTemplate = getFormattingTemplate(numberPattern, format.getFormat());
if (tempTemplate.length() > 0) {
formattingTemplate.append(tempTemplate);
return true;
}
return false;
}
// Gets a formatting template which can be used to efficiently format a partial number where
// digits are added one by one.
private String getFormattingTemplate(String numberPattern, String numberFormat) {
// Creates a phone number consisting only of the digit 9 that matches the
// numberPattern by applying the pattern to the longestPhoneNumber string.
String longestPhoneNumber = "999999999999999";
Matcher m = regexCache.getPatternForRegex(numberPattern).matcher(longestPhoneNumber);
m.find(); // this will always succeed
String aPhoneNumber = m.group();
// No formatting template can be created if the number of digits entered so far is longer than
// the maximum the current formatting rule can accommodate.
if (aPhoneNumber.length() < nationalNumber.length()) {
return "";
}
// Formats the number according to numberFormat
String template = aPhoneNumber.replaceAll(numberPattern, numberFormat);
// Replaces each digit with character DIGIT_PLACEHOLDER
template = template.replaceAll("9", DIGIT_PLACEHOLDER);
return template;
}
/**
* Clears the internal state of the formatter, so it can be reused.
*/
public void clear() {
currentOutput = "";
accruedInput.setLength(0);
accruedInputWithoutFormatting.setLength(0);
formattingTemplate.setLength(0);
lastMatchPosition = 0;
currentFormattingPattern = "";
prefixBeforeNationalNumber.setLength(0);
extractedNationalPrefix = "";
nationalNumber.setLength(0);
ableToFormat = true;
inputHasFormatting = false;
positionToRemember = 0;
originalPosition = 0;
isCompleteNumber = false;
isExpectingCountryCallingCode = false;
possibleFormats.clear();
shouldAddSpaceAfterNationalPrefix = false;
if (!currentMetadata.equals(defaultMetadata)) {
currentMetadata = getMetadataForRegion(defaultCountry);
}
}
/**
* Formats a phone number on-the-fly as each digit is entered.
*
* @param nextChar the most recently entered digit of a phone number. Formatting characters are
* allowed, but as soon as they are encountered this method formats the number as entered and
* not "as you type" anymore. Full width digits and Arabic-indic digits are allowed, and will
* be shown as they are.
* @return the partially formatted phone number.
*/
public String inputDigit(char nextChar) {
currentOutput = inputDigitWithOptionToRememberPosition(nextChar, false);
return currentOutput;
}
/**
* Same as {@link #inputDigit}, but remembers the position where {@code nextChar} is inserted, so
* that it can be retrieved later by using {@link #getRememberedPosition}. The remembered
* position will be automatically adjusted if additional formatting characters are later
* inserted/removed in front of {@code nextChar}.
*/
public String inputDigitAndRememberPosition(char nextChar) {
currentOutput = inputDigitWithOptionToRememberPosition(nextChar, true);
return currentOutput;
}
@SuppressWarnings("fallthrough")
private String inputDigitWithOptionToRememberPosition(char nextChar, boolean rememberPosition) {
accruedInput.append(nextChar);
if (rememberPosition) {
originalPosition = accruedInput.length();
}
// We do formatting on-the-fly only when each character entered is either a digit, or a plus
// sign (accepted at the start of the number only).
if (!isDigitOrLeadingPlusSign(nextChar)) {
ableToFormat = false;
inputHasFormatting = true;
} else {
nextChar = normalizeAndAccrueDigitsAndPlusSign(nextChar, rememberPosition);
}
if (!ableToFormat) {
// When we are unable to format because of reasons other than that formatting chars have been
// entered, it can be due to really long IDDs or NDDs. If that is the case, we might be able
// to do formatting again after extracting them.
if (inputHasFormatting) {
return accruedInput.toString();
} else if (attemptToExtractIdd()) {
if (attemptToExtractCountryCallingCode()) {
return attemptToChoosePatternWithPrefixExtracted();
}
} else if (ableToExtractLongerNdd()) {
// Add an additional space to separate long NDD and national significant number for
// readability. We don't set shouldAddSpaceAfterNationalPrefix to true, since we don't want
// this to change later when we choose formatting templates.
prefixBeforeNationalNumber.append(SEPARATOR_BEFORE_NATIONAL_NUMBER);
return attemptToChoosePatternWithPrefixExtracted();
}
return accruedInput.toString();
}
// We start to attempt to format only when at least MIN_LEADING_DIGITS_LENGTH digits (the plus
// sign is counted as a digit as well for this purpose) have been entered.
switch (accruedInputWithoutFormatting.length()) {
case 0:
case 1:
case 2:
return accruedInput.toString();
case 3:
if (attemptToExtractIdd()) {
isExpectingCountryCallingCode = true;
} else { // No IDD or plus sign is found, might be entering in national format.
extractedNationalPrefix = removeNationalPrefixFromNationalNumber();
return attemptToChooseFormattingPattern();
}
// fall through
default:
if (isExpectingCountryCallingCode) {
if (attemptToExtractCountryCallingCode()) {
isExpectingCountryCallingCode = false;
}
return prefixBeforeNationalNumber + nationalNumber.toString();
}
if (possibleFormats.size() > 0) { // The formatting patterns are already chosen.
String tempNationalNumber = inputDigitHelper(nextChar);
// See if the accrued digits can be formatted properly already. If not, use the results
// from inputDigitHelper, which does formatting based on the formatting pattern chosen.
String formattedNumber = attemptToFormatAccruedDigits();
if (formattedNumber.length() > 0) {
return formattedNumber;
}
narrowDownPossibleFormats(nationalNumber.toString());
if (maybeCreateNewTemplate()) {
return inputAccruedNationalNumber();
}
return ableToFormat
? appendNationalNumber(tempNationalNumber)
: accruedInput.toString();
} else {
return attemptToChooseFormattingPattern();
}
}
}
private String attemptToChoosePatternWithPrefixExtracted() {
ableToFormat = true;
isExpectingCountryCallingCode = false;
possibleFormats.clear();
lastMatchPosition = 0;
formattingTemplate.setLength(0);
currentFormattingPattern = "";
return attemptToChooseFormattingPattern();
}
// @VisibleForTesting
String getExtractedNationalPrefix() {
return extractedNationalPrefix;
}
// Some national prefixes are a substring of others. If extracting the shorter NDD doesn't result
// in a number we can format, we try to see if we can extract a longer version here.
private boolean ableToExtractLongerNdd() {
if (extractedNationalPrefix.length() > 0) {
// Put the extracted NDD back to the national number before attempting to extract a new NDD.
nationalNumber.insert(0, extractedNationalPrefix);
// Remove the previously extracted NDD from prefixBeforeNationalNumber. We cannot simply set
// it to empty string because people sometimes incorrectly enter national prefix after the
// country code, e.g. +44 (0)20-1234-5678.
int indexOfPreviousNdd = prefixBeforeNationalNumber.lastIndexOf(extractedNationalPrefix);
prefixBeforeNationalNumber.setLength(indexOfPreviousNdd);
}
return !extractedNationalPrefix.equals(removeNationalPrefixFromNationalNumber());
}
private boolean isDigitOrLeadingPlusSign(char nextChar) {
return Character.isDigit(nextChar)
|| (accruedInput.length() == 1
&& PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(Character.toString(nextChar)).matches());
}
/**
* Checks to see if there is an exact pattern match for these digits. If so, we should use this
* instead of any other formatting template whose leadingDigitsPattern also matches the input.
*/
String attemptToFormatAccruedDigits() {
for (NumberFormat numberFormat : possibleFormats) {
Matcher m = regexCache.getPatternForRegex(numberFormat.getPattern()).matcher(nationalNumber);
if (m.matches()) {
shouldAddSpaceAfterNationalPrefix =
NATIONAL_PREFIX_SEPARATORS_PATTERN.matcher(
numberFormat.getNationalPrefixFormattingRule()).find();
String formattedNumber = m.replaceAll(numberFormat.getFormat());
// Check that we did not remove nor add any extra digits when we matched
// this formatting pattern. This usually happens after we entered the last
// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when
// formatted but AYTF should retain all the number entered and not change
// in order to match a format (of same leading digits and length) display
// in that way.
String fullOutput = appendNationalNumber(formattedNumber);
String formattedNumberDigitsOnly = PhoneNumberUtil.normalizeDiallableCharsOnly(fullOutput);
if (formattedNumberDigitsOnly.contentEquals(accruedInputWithoutFormatting)) {
// If it's the same (i.e entered number and format is same), then it's
// safe to return this in formatted number as nothing is lost / added.
return fullOutput;
}
}
}
return "";
}
/**
* Returns the current position in the partially formatted phone number of the character which was
* previously passed in as the parameter of {@link #inputDigitAndRememberPosition}.
*/
public int getRememberedPosition() {
if (!ableToFormat) {
return originalPosition;
}
int accruedInputIndex = 0;
int currentOutputIndex = 0;
while (accruedInputIndex < positionToRemember && currentOutputIndex < currentOutput.length()) {
if (accruedInputWithoutFormatting.charAt(accruedInputIndex)
== currentOutput.charAt(currentOutputIndex)) {
accruedInputIndex++;
}
currentOutputIndex++;
}
return currentOutputIndex;
}
/**
* Combines the national number with any prefix (IDD/+ and country code or national prefix) that
* was collected. A space will be inserted between them if the current formatting template
* indicates this to be suitable.
*/
private String appendNationalNumber(String nationalNumber) {
int prefixBeforeNationalNumberLength = prefixBeforeNationalNumber.length();
if (shouldAddSpaceAfterNationalPrefix && prefixBeforeNationalNumberLength > 0
&& prefixBeforeNationalNumber.charAt(prefixBeforeNationalNumberLength - 1)
!= SEPARATOR_BEFORE_NATIONAL_NUMBER) {
// We want to add a space after the national prefix if the national prefix formatting rule
// indicates that this would normally be done, with the exception of the case where we already
// appended a space because the NDD was surprisingly long.
return new String(prefixBeforeNationalNumber) + SEPARATOR_BEFORE_NATIONAL_NUMBER
+ nationalNumber;
} else {
return prefixBeforeNationalNumber + nationalNumber;
}
}
/**
* Attempts to set the formatting template and returns a string which contains the formatted
* version of the digits entered so far.
*/
private String attemptToChooseFormattingPattern() {
// We start to attempt to format only when at least MIN_LEADING_DIGITS_LENGTH digits of national
// number (excluding national prefix) have been entered.
if (nationalNumber.length() >= MIN_LEADING_DIGITS_LENGTH) {
getAvailableFormats(nationalNumber.toString());
// See if the accrued digits can be formatted properly already.
String formattedNumber = attemptToFormatAccruedDigits();
if (formattedNumber.length() > 0) {
return formattedNumber;
}
return maybeCreateNewTemplate() ? inputAccruedNationalNumber() : accruedInput.toString();
} else {
return appendNationalNumber(nationalNumber.toString());
}
}
/**
* Invokes inputDigitHelper on each digit of the national number accrued, and returns a formatted
* string in the end.
*/
private String inputAccruedNationalNumber() {
int lengthOfNationalNumber = nationalNumber.length();
if (lengthOfNationalNumber > 0) {
String tempNationalNumber = "";
for (int i = 0; i < lengthOfNationalNumber; i++) {
tempNationalNumber = inputDigitHelper(nationalNumber.charAt(i));
}
return ableToFormat ? appendNationalNumber(tempNationalNumber) : accruedInput.toString();
} else {
return prefixBeforeNationalNumber.toString();
}
}
/**
* Returns true if the current country is a NANPA country and the national number begins with
* the national prefix.
*/
private boolean isNanpaNumberWithNationalPrefix() {
// For NANPA numbers beginning with 1[2-9], treat the 1 as the national prefix. The reason is
// that national significant numbers in NANPA always start with [2-9] after the national prefix.
// Numbers beginning with 1[01] can only be short/emergency numbers, which don't need the
// national prefix.
return (currentMetadata.getCountryCode() == 1) && (nationalNumber.charAt(0) == '1')
&& (nationalNumber.charAt(1) != '0') && (nationalNumber.charAt(1) != '1');
}
// Returns the national prefix extracted, or an empty string if it is not present.
private String removeNationalPrefixFromNationalNumber() {
int startOfNationalNumber = 0;
if (isNanpaNumberWithNationalPrefix()) {
startOfNationalNumber = 1;
prefixBeforeNationalNumber.append('1').append(SEPARATOR_BEFORE_NATIONAL_NUMBER);
isCompleteNumber = true;
} else if (currentMetadata.hasNationalPrefixForParsing()) {
Pattern nationalPrefixForParsing =
regexCache.getPatternForRegex(currentMetadata.getNationalPrefixForParsing());
Matcher m = nationalPrefixForParsing.matcher(nationalNumber);
// Since some national prefix patterns are entirely optional, check that a national prefix
// could actually be extracted.
if (m.lookingAt() && m.end() > 0) {
// When the national prefix is detected, we use international formatting rules instead of
// national ones, because national formatting rules could contain local formatting rules
// for numbers entered without area code.
isCompleteNumber = true;
startOfNationalNumber = m.end();
prefixBeforeNationalNumber.append(nationalNumber.substring(0, startOfNationalNumber));
}
}
String nationalPrefix = nationalNumber.substring(0, startOfNationalNumber);
nationalNumber.delete(0, startOfNationalNumber);
return nationalPrefix;
}
/**
* Extracts IDD and plus sign to prefixBeforeNationalNumber when they are available, and places
* the remaining input into nationalNumber.
*
* @return true when accruedInputWithoutFormatting begins with the plus sign or valid IDD for
* defaultCountry.
*/
private boolean attemptToExtractIdd() {
Pattern internationalPrefix =
regexCache.getPatternForRegex("\\" + PhoneNumberUtil.PLUS_SIGN + "|"
+ currentMetadata.getInternationalPrefix());
Matcher iddMatcher = internationalPrefix.matcher(accruedInputWithoutFormatting);
if (iddMatcher.lookingAt()) {
isCompleteNumber = true;
int startOfCountryCallingCode = iddMatcher.end();
nationalNumber.setLength(0);
nationalNumber.append(accruedInputWithoutFormatting.substring(startOfCountryCallingCode));
prefixBeforeNationalNumber.setLength(0);
prefixBeforeNationalNumber.append(
accruedInputWithoutFormatting.substring(0, startOfCountryCallingCode));
if (accruedInputWithoutFormatting.charAt(0) != PhoneNumberUtil.PLUS_SIGN) {
prefixBeforeNationalNumber.append(SEPARATOR_BEFORE_NATIONAL_NUMBER);
}
return true;
}
return false;
}
/**
* Extracts the country calling code from the beginning of nationalNumber to
* prefixBeforeNationalNumber when they are available, and places the remaining input into
* nationalNumber.
*
* @return true when a valid country calling code can be found.
*/
private boolean attemptToExtractCountryCallingCode() {
if (nationalNumber.length() == 0) {
return false;
}
StringBuilder numberWithoutCountryCallingCode = new StringBuilder();
int countryCode = phoneUtil.extractCountryCode(nationalNumber, numberWithoutCountryCallingCode);
if (countryCode == 0) {
return false;
}
nationalNumber.setLength(0);
nationalNumber.append(numberWithoutCountryCallingCode);
String newRegionCode = phoneUtil.getRegionCodeForCountryCode(countryCode);
if (PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals(newRegionCode)) {
currentMetadata = phoneUtil.getMetadataForNonGeographicalRegion(countryCode);
} else if (!newRegionCode.equals(defaultCountry)) {
currentMetadata = getMetadataForRegion(newRegionCode);
}
String countryCodeString = Integer.toString(countryCode);
prefixBeforeNationalNumber.append(countryCodeString).append(SEPARATOR_BEFORE_NATIONAL_NUMBER);
// When we have successfully extracted the IDD, the previously extracted NDD should be cleared
// because it is no longer valid.
extractedNationalPrefix = "";
return true;
}
// Accrues digits and the plus sign to accruedInputWithoutFormatting for later use. If nextChar
// contains a digit in non-ASCII format (e.g. the full-width version of digits), it is first
// normalized to the ASCII version. The return value is nextChar itself, or its normalized
// version, if nextChar is a digit in non-ASCII format. This method assumes its input is either a
// digit or the plus sign.
private char normalizeAndAccrueDigitsAndPlusSign(char nextChar, boolean rememberPosition) {
char normalizedChar;
if (nextChar == PhoneNumberUtil.PLUS_SIGN) {
normalizedChar = nextChar;
accruedInputWithoutFormatting.append(nextChar);
} else {
int radix = 10;
normalizedChar = Character.forDigit(Character.digit(nextChar, radix), radix);
accruedInputWithoutFormatting.append(normalizedChar);
nationalNumber.append(normalizedChar);
}
if (rememberPosition) {
positionToRemember = accruedInputWithoutFormatting.length();
}
return normalizedChar;
}
private String inputDigitHelper(char nextChar) {
// Note that formattingTemplate is not guaranteed to have a value, it could be empty, e.g.
// when the next digit is entered after extracting an IDD or NDD.
Matcher digitMatcher = DIGIT_PATTERN.matcher(formattingTemplate);
if (digitMatcher.find(lastMatchPosition)) {
String tempTemplate = digitMatcher.replaceFirst(Character.toString(nextChar));
formattingTemplate.replace(0, tempTemplate.length(), tempTemplate);
lastMatchPosition = digitMatcher.start();
return formattingTemplate.substring(0, lastMatchPosition + 1);
} else {
if (possibleFormats.size() == 1) {
// More digits are entered than we could handle, and there are no other valid patterns to
// try.
ableToFormat = false;
} // else, we just reset the formatting pattern.
currentFormattingPattern = "";
return accruedInput.toString();
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java
|
Java
|
unknown
| 30,817
|
/*
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
* Please don't modify it directly.
*/
package com.google.i18n.phonenumbers;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CountryCodeToRegionCodeMap {
// A mapping from a country code to the region codes which denote the
// country/region represented by that country code. In the case of multiple
// countries sharing a calling code, such as the NANPA countries, the one
// indicated with "isMainCountryForCode" in the metadata should be first.
static Map<Integer, List<String>> getCountryCodeToRegionCodeMap() {
// The capacity is set to 286 as there are 215 different entries,
// and this offers a load factor of roughly 0.75.
Map<Integer, List<String>> countryCodeToRegionCodeMap =
new HashMap<Integer, List<String>>(286);
ArrayList<String> listWithRegionCode;
listWithRegionCode = new ArrayList<String>(25);
listWithRegionCode.add("US");
listWithRegionCode.add("AG");
listWithRegionCode.add("AI");
listWithRegionCode.add("AS");
listWithRegionCode.add("BB");
listWithRegionCode.add("BM");
listWithRegionCode.add("BS");
listWithRegionCode.add("CA");
listWithRegionCode.add("DM");
listWithRegionCode.add("DO");
listWithRegionCode.add("GD");
listWithRegionCode.add("GU");
listWithRegionCode.add("JM");
listWithRegionCode.add("KN");
listWithRegionCode.add("KY");
listWithRegionCode.add("LC");
listWithRegionCode.add("MP");
listWithRegionCode.add("MS");
listWithRegionCode.add("PR");
listWithRegionCode.add("SX");
listWithRegionCode.add("TC");
listWithRegionCode.add("TT");
listWithRegionCode.add("VC");
listWithRegionCode.add("VG");
listWithRegionCode.add("VI");
countryCodeToRegionCodeMap.put(1, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("RU");
listWithRegionCode.add("KZ");
countryCodeToRegionCodeMap.put(7, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("EG");
countryCodeToRegionCodeMap.put(20, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ZA");
countryCodeToRegionCodeMap.put(27, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GR");
countryCodeToRegionCodeMap.put(30, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NL");
countryCodeToRegionCodeMap.put(31, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BE");
countryCodeToRegionCodeMap.put(32, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FR");
countryCodeToRegionCodeMap.put(33, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ES");
countryCodeToRegionCodeMap.put(34, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("HU");
countryCodeToRegionCodeMap.put(36, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("IT");
listWithRegionCode.add("VA");
countryCodeToRegionCodeMap.put(39, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("RO");
countryCodeToRegionCodeMap.put(40, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CH");
countryCodeToRegionCodeMap.put(41, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AT");
countryCodeToRegionCodeMap.put(43, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(4);
listWithRegionCode.add("GB");
listWithRegionCode.add("GG");
listWithRegionCode.add("IM");
listWithRegionCode.add("JE");
countryCodeToRegionCodeMap.put(44, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("DK");
countryCodeToRegionCodeMap.put(45, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SE");
countryCodeToRegionCodeMap.put(46, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("NO");
listWithRegionCode.add("SJ");
countryCodeToRegionCodeMap.put(47, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PL");
countryCodeToRegionCodeMap.put(48, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("DE");
countryCodeToRegionCodeMap.put(49, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PE");
countryCodeToRegionCodeMap.put(51, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MX");
countryCodeToRegionCodeMap.put(52, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CU");
countryCodeToRegionCodeMap.put(53, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AR");
countryCodeToRegionCodeMap.put(54, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BR");
countryCodeToRegionCodeMap.put(55, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CL");
countryCodeToRegionCodeMap.put(56, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CO");
countryCodeToRegionCodeMap.put(57, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("VE");
countryCodeToRegionCodeMap.put(58, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MY");
countryCodeToRegionCodeMap.put(60, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(3);
listWithRegionCode.add("AU");
listWithRegionCode.add("CC");
listWithRegionCode.add("CX");
countryCodeToRegionCodeMap.put(61, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ID");
countryCodeToRegionCodeMap.put(62, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PH");
countryCodeToRegionCodeMap.put(63, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NZ");
countryCodeToRegionCodeMap.put(64, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SG");
countryCodeToRegionCodeMap.put(65, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TH");
countryCodeToRegionCodeMap.put(66, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("JP");
countryCodeToRegionCodeMap.put(81, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KR");
countryCodeToRegionCodeMap.put(82, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("VN");
countryCodeToRegionCodeMap.put(84, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CN");
countryCodeToRegionCodeMap.put(86, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TR");
countryCodeToRegionCodeMap.put(90, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IN");
countryCodeToRegionCodeMap.put(91, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PK");
countryCodeToRegionCodeMap.put(92, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AF");
countryCodeToRegionCodeMap.put(93, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LK");
countryCodeToRegionCodeMap.put(94, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MM");
countryCodeToRegionCodeMap.put(95, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IR");
countryCodeToRegionCodeMap.put(98, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SS");
countryCodeToRegionCodeMap.put(211, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("MA");
listWithRegionCode.add("EH");
countryCodeToRegionCodeMap.put(212, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("DZ");
countryCodeToRegionCodeMap.put(213, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TN");
countryCodeToRegionCodeMap.put(216, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LY");
countryCodeToRegionCodeMap.put(218, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GM");
countryCodeToRegionCodeMap.put(220, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SN");
countryCodeToRegionCodeMap.put(221, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MR");
countryCodeToRegionCodeMap.put(222, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ML");
countryCodeToRegionCodeMap.put(223, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GN");
countryCodeToRegionCodeMap.put(224, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CI");
countryCodeToRegionCodeMap.put(225, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BF");
countryCodeToRegionCodeMap.put(226, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NE");
countryCodeToRegionCodeMap.put(227, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TG");
countryCodeToRegionCodeMap.put(228, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BJ");
countryCodeToRegionCodeMap.put(229, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MU");
countryCodeToRegionCodeMap.put(230, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LR");
countryCodeToRegionCodeMap.put(231, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SL");
countryCodeToRegionCodeMap.put(232, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GH");
countryCodeToRegionCodeMap.put(233, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NG");
countryCodeToRegionCodeMap.put(234, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TD");
countryCodeToRegionCodeMap.put(235, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CF");
countryCodeToRegionCodeMap.put(236, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CM");
countryCodeToRegionCodeMap.put(237, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CV");
countryCodeToRegionCodeMap.put(238, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ST");
countryCodeToRegionCodeMap.put(239, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GQ");
countryCodeToRegionCodeMap.put(240, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GA");
countryCodeToRegionCodeMap.put(241, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CG");
countryCodeToRegionCodeMap.put(242, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CD");
countryCodeToRegionCodeMap.put(243, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AO");
countryCodeToRegionCodeMap.put(244, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GW");
countryCodeToRegionCodeMap.put(245, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IO");
countryCodeToRegionCodeMap.put(246, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AC");
countryCodeToRegionCodeMap.put(247, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SC");
countryCodeToRegionCodeMap.put(248, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SD");
countryCodeToRegionCodeMap.put(249, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("RW");
countryCodeToRegionCodeMap.put(250, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ET");
countryCodeToRegionCodeMap.put(251, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SO");
countryCodeToRegionCodeMap.put(252, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("DJ");
countryCodeToRegionCodeMap.put(253, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KE");
countryCodeToRegionCodeMap.put(254, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TZ");
countryCodeToRegionCodeMap.put(255, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("UG");
countryCodeToRegionCodeMap.put(256, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BI");
countryCodeToRegionCodeMap.put(257, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MZ");
countryCodeToRegionCodeMap.put(258, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ZM");
countryCodeToRegionCodeMap.put(260, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MG");
countryCodeToRegionCodeMap.put(261, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("RE");
listWithRegionCode.add("YT");
countryCodeToRegionCodeMap.put(262, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ZW");
countryCodeToRegionCodeMap.put(263, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NA");
countryCodeToRegionCodeMap.put(264, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MW");
countryCodeToRegionCodeMap.put(265, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LS");
countryCodeToRegionCodeMap.put(266, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BW");
countryCodeToRegionCodeMap.put(267, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SZ");
countryCodeToRegionCodeMap.put(268, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KM");
countryCodeToRegionCodeMap.put(269, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("SH");
listWithRegionCode.add("TA");
countryCodeToRegionCodeMap.put(290, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ER");
countryCodeToRegionCodeMap.put(291, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AW");
countryCodeToRegionCodeMap.put(297, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FO");
countryCodeToRegionCodeMap.put(298, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GL");
countryCodeToRegionCodeMap.put(299, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GI");
countryCodeToRegionCodeMap.put(350, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PT");
countryCodeToRegionCodeMap.put(351, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LU");
countryCodeToRegionCodeMap.put(352, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IE");
countryCodeToRegionCodeMap.put(353, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IS");
countryCodeToRegionCodeMap.put(354, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AL");
countryCodeToRegionCodeMap.put(355, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MT");
countryCodeToRegionCodeMap.put(356, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CY");
countryCodeToRegionCodeMap.put(357, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("FI");
listWithRegionCode.add("AX");
countryCodeToRegionCodeMap.put(358, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BG");
countryCodeToRegionCodeMap.put(359, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LT");
countryCodeToRegionCodeMap.put(370, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LV");
countryCodeToRegionCodeMap.put(371, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("EE");
countryCodeToRegionCodeMap.put(372, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MD");
countryCodeToRegionCodeMap.put(373, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AM");
countryCodeToRegionCodeMap.put(374, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BY");
countryCodeToRegionCodeMap.put(375, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AD");
countryCodeToRegionCodeMap.put(376, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MC");
countryCodeToRegionCodeMap.put(377, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SM");
countryCodeToRegionCodeMap.put(378, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("UA");
countryCodeToRegionCodeMap.put(380, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("RS");
countryCodeToRegionCodeMap.put(381, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("ME");
countryCodeToRegionCodeMap.put(382, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("XK");
countryCodeToRegionCodeMap.put(383, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("HR");
countryCodeToRegionCodeMap.put(385, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SI");
countryCodeToRegionCodeMap.put(386, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BA");
countryCodeToRegionCodeMap.put(387, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MK");
countryCodeToRegionCodeMap.put(389, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CZ");
countryCodeToRegionCodeMap.put(420, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SK");
countryCodeToRegionCodeMap.put(421, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LI");
countryCodeToRegionCodeMap.put(423, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FK");
countryCodeToRegionCodeMap.put(500, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BZ");
countryCodeToRegionCodeMap.put(501, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GT");
countryCodeToRegionCodeMap.put(502, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SV");
countryCodeToRegionCodeMap.put(503, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("HN");
countryCodeToRegionCodeMap.put(504, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NI");
countryCodeToRegionCodeMap.put(505, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CR");
countryCodeToRegionCodeMap.put(506, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PA");
countryCodeToRegionCodeMap.put(507, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PM");
countryCodeToRegionCodeMap.put(508, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("HT");
countryCodeToRegionCodeMap.put(509, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(3);
listWithRegionCode.add("GP");
listWithRegionCode.add("BL");
listWithRegionCode.add("MF");
countryCodeToRegionCodeMap.put(590, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BO");
countryCodeToRegionCodeMap.put(591, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GY");
countryCodeToRegionCodeMap.put(592, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("EC");
countryCodeToRegionCodeMap.put(593, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GF");
countryCodeToRegionCodeMap.put(594, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PY");
countryCodeToRegionCodeMap.put(595, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MQ");
countryCodeToRegionCodeMap.put(596, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SR");
countryCodeToRegionCodeMap.put(597, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("UY");
countryCodeToRegionCodeMap.put(598, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("CW");
listWithRegionCode.add("BQ");
countryCodeToRegionCodeMap.put(599, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TL");
countryCodeToRegionCodeMap.put(670, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NF");
countryCodeToRegionCodeMap.put(672, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BN");
countryCodeToRegionCodeMap.put(673, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NR");
countryCodeToRegionCodeMap.put(674, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PG");
countryCodeToRegionCodeMap.put(675, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TO");
countryCodeToRegionCodeMap.put(676, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SB");
countryCodeToRegionCodeMap.put(677, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("VU");
countryCodeToRegionCodeMap.put(678, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FJ");
countryCodeToRegionCodeMap.put(679, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PW");
countryCodeToRegionCodeMap.put(680, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("WF");
countryCodeToRegionCodeMap.put(681, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CK");
countryCodeToRegionCodeMap.put(682, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NU");
countryCodeToRegionCodeMap.put(683, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("WS");
countryCodeToRegionCodeMap.put(685, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KI");
countryCodeToRegionCodeMap.put(686, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NC");
countryCodeToRegionCodeMap.put(687, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TV");
countryCodeToRegionCodeMap.put(688, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PF");
countryCodeToRegionCodeMap.put(689, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TK");
countryCodeToRegionCodeMap.put(690, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FM");
countryCodeToRegionCodeMap.put(691, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MH");
countryCodeToRegionCodeMap.put(692, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(800, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(808, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KP");
countryCodeToRegionCodeMap.put(850, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("HK");
countryCodeToRegionCodeMap.put(852, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MO");
countryCodeToRegionCodeMap.put(853, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KH");
countryCodeToRegionCodeMap.put(855, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LA");
countryCodeToRegionCodeMap.put(856, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(870, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(878, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BD");
countryCodeToRegionCodeMap.put(880, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(881, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(882, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(883, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TW");
countryCodeToRegionCodeMap.put(886, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(888, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MV");
countryCodeToRegionCodeMap.put(960, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("LB");
countryCodeToRegionCodeMap.put(961, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("JO");
countryCodeToRegionCodeMap.put(962, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SY");
countryCodeToRegionCodeMap.put(963, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IQ");
countryCodeToRegionCodeMap.put(964, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KW");
countryCodeToRegionCodeMap.put(965, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SA");
countryCodeToRegionCodeMap.put(966, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("YE");
countryCodeToRegionCodeMap.put(967, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("OM");
countryCodeToRegionCodeMap.put(968, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PS");
countryCodeToRegionCodeMap.put(970, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AE");
countryCodeToRegionCodeMap.put(971, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IL");
countryCodeToRegionCodeMap.put(972, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BH");
countryCodeToRegionCodeMap.put(973, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("QA");
countryCodeToRegionCodeMap.put(974, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BT");
countryCodeToRegionCodeMap.put(975, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MN");
countryCodeToRegionCodeMap.put(976, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NP");
countryCodeToRegionCodeMap.put(977, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(979, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TJ");
countryCodeToRegionCodeMap.put(992, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TM");
countryCodeToRegionCodeMap.put(993, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AZ");
countryCodeToRegionCodeMap.put(994, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("GE");
countryCodeToRegionCodeMap.put(995, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KG");
countryCodeToRegionCodeMap.put(996, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("UZ");
countryCodeToRegionCodeMap.put(998, listWithRegionCode);
return countryCodeToRegionCodeMap;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java
|
Java
|
unknown
| 34,498
|
/*
* Copyright (C) 2014 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import java.io.InputStream;
/**
* Interface for clients to specify a customized phone metadata loader, useful for Android apps to
* load Android resources since the library loads Java resources by default, e.g. with
* <a href="http://developer.android.com/reference/android/content/res/AssetManager.html">
* AssetManager</a>. Note that implementation owners have the responsibility to ensure this is
* thread-safe.
*/
public interface MetadataLoader {
/**
* Returns an input stream corresponding to the metadata to load. This method may be called
* concurrently so implementations must be thread-safe.
*
* @param metadataFileName file name (including path) of metadata to load. File path is an
* absolute class path like /com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto
* @return the input stream for the metadata file. The library will close this stream
* after it is done. Return null in case the metadata file could not be found
*/
public InputStream loadMetadata(String metadataFileName);
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java
|
Java
|
unknown
| 1,701
|
/*
* Copyright (C) 2012 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Manager for loading metadata for alternate formats and short numbers. We also declare some
* constants for phone number metadata loading, to more easily maintain all three types of metadata
* together.
* TODO: Consider managing phone number metadata loading here too.
*/
final class MetadataManager {
static final String MULTI_FILE_PHONE_NUMBER_METADATA_FILE_PREFIX =
"/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto";
static final String SINGLE_FILE_PHONE_NUMBER_METADATA_FILE_NAME =
"/com/google/i18n/phonenumbers/data/SingleFilePhoneNumberMetadataProto";
private static final String ALTERNATE_FORMATS_FILE_PREFIX =
"/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto";
private static final String SHORT_NUMBER_METADATA_FILE_PREFIX =
"/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto";
static final MetadataLoader DEFAULT_METADATA_LOADER = new MetadataLoader() {
@Override
public InputStream loadMetadata(String metadataFileName) {
return MetadataManager.class.getResourceAsStream(metadataFileName);
}
};
private static final Logger logger = Logger.getLogger(MetadataManager.class.getName());
// A mapping from a country calling code to the alternate formats for that country calling code.
private static final ConcurrentHashMap<Integer, PhoneMetadata> alternateFormatsMap =
new ConcurrentHashMap<Integer, PhoneMetadata>();
// A mapping from a region code to the short number metadata for that region code.
private static final ConcurrentHashMap<String, PhoneMetadata> shortNumberMetadataMap =
new ConcurrentHashMap<String, PhoneMetadata>();
// The set of country calling codes for which there are alternate formats. For every country
// calling code in this set there should be metadata linked into the resources.
private static final Set<Integer> alternateFormatsCountryCodes =
AlternateFormatsCountryCodeSet.getCountryCodeSet();
// The set of region codes for which there are short number metadata. For every region code in
// this set there should be metadata linked into the resources.
private static final Set<String> shortNumberMetadataRegionCodes =
ShortNumbersRegionCodeSet.getRegionCodeSet();
private MetadataManager() {}
static PhoneMetadata getAlternateFormatsForCountry(int countryCallingCode) {
if (!alternateFormatsCountryCodes.contains(countryCallingCode)) {
return null;
}
return getMetadataFromMultiFilePrefix(countryCallingCode, alternateFormatsMap,
ALTERNATE_FORMATS_FILE_PREFIX, DEFAULT_METADATA_LOADER);
}
static PhoneMetadata getShortNumberMetadataForRegion(String regionCode) {
if (!shortNumberMetadataRegionCodes.contains(regionCode)) {
return null;
}
return getMetadataFromMultiFilePrefix(regionCode, shortNumberMetadataMap,
SHORT_NUMBER_METADATA_FILE_PREFIX, DEFAULT_METADATA_LOADER);
}
static Set<String> getSupportedShortNumberRegions() {
return Collections.unmodifiableSet(shortNumberMetadataRegionCodes);
}
/**
* @param key the lookup key for the provided map, typically a region code or a country calling
* code
* @param map the map containing mappings of already loaded metadata from their {@code key}. If
* this {@code key}'s metadata isn't already loaded, it will be added to this map after
* loading
* @param filePrefix the prefix of the file to load metadata from
* @param metadataLoader the metadata loader used to inject alternative metadata sources
*/
static <T> PhoneMetadata getMetadataFromMultiFilePrefix(T key,
ConcurrentHashMap<T, PhoneMetadata> map, String filePrefix, MetadataLoader metadataLoader) {
PhoneMetadata metadata = map.get(key);
if (metadata != null) {
return metadata;
}
// We assume key.toString() is well-defined.
String fileName = filePrefix + "_" + key;
List<PhoneMetadata> metadataList = getMetadataFromSingleFileName(fileName, metadataLoader);
if (metadataList.size() > 1) {
logger.log(Level.WARNING, "more than one metadata in file " + fileName);
}
metadata = metadataList.get(0);
PhoneMetadata oldValue = map.putIfAbsent(key, metadata);
return (oldValue != null) ? oldValue : metadata;
}
// Loader and holder for the metadata maps loaded from a single file.
static class SingleFileMetadataMaps {
static SingleFileMetadataMaps load(String fileName, MetadataLoader metadataLoader) {
List<PhoneMetadata> metadataList = getMetadataFromSingleFileName(fileName, metadataLoader);
Map<String, PhoneMetadata> regionCodeToMetadata = new HashMap<String, PhoneMetadata>();
Map<Integer, PhoneMetadata> countryCallingCodeToMetadata =
new HashMap<Integer, PhoneMetadata>();
for (PhoneMetadata metadata : metadataList) {
String regionCode = metadata.getId();
if (PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCode)) {
// regionCode belongs to a non-geographical entity.
countryCallingCodeToMetadata.put(metadata.getCountryCode(), metadata);
} else {
regionCodeToMetadata.put(regionCode, metadata);
}
}
return new SingleFileMetadataMaps(regionCodeToMetadata, countryCallingCodeToMetadata);
}
// A map from a region code to the PhoneMetadata for that region.
// For phone number metadata, the region code "001" is excluded, since that is used for the
// non-geographical phone number entities.
private final Map<String, PhoneMetadata> regionCodeToMetadata;
// A map from a country calling code to the PhoneMetadata for that country calling code.
// Examples of the country calling codes include 800 (International Toll Free Service) and 808
// (International Shared Cost Service).
// For phone number metadata, only the non-geographical phone number entities' country calling
// codes are present.
private final Map<Integer, PhoneMetadata> countryCallingCodeToMetadata;
private SingleFileMetadataMaps(Map<String, PhoneMetadata> regionCodeToMetadata,
Map<Integer, PhoneMetadata> countryCallingCodeToMetadata) {
this.regionCodeToMetadata = Collections.unmodifiableMap(regionCodeToMetadata);
this.countryCallingCodeToMetadata = Collections.unmodifiableMap(countryCallingCodeToMetadata);
}
PhoneMetadata get(String regionCode) {
return regionCodeToMetadata.get(regionCode);
}
PhoneMetadata get(int countryCallingCode) {
return countryCallingCodeToMetadata.get(countryCallingCode);
}
}
// Manages the atomic reference lifecycle of a SingleFileMetadataMaps encapsulation.
static SingleFileMetadataMaps getSingleFileMetadataMaps(
AtomicReference<SingleFileMetadataMaps> ref, String fileName, MetadataLoader metadataLoader) {
SingleFileMetadataMaps maps = ref.get();
if (maps != null) {
return maps;
}
maps = SingleFileMetadataMaps.load(fileName, metadataLoader);
ref.compareAndSet(null, maps);
return ref.get();
}
private static List<PhoneMetadata> getMetadataFromSingleFileName(String fileName,
MetadataLoader metadataLoader) {
InputStream source = metadataLoader.loadMetadata(fileName);
if (source == null) {
// Sanity check; this would only happen if we packaged jars incorrectly.
throw new IllegalStateException("missing metadata: " + fileName);
}
PhoneMetadataCollection metadataCollection = loadMetadataAndCloseInput(source);
List<PhoneMetadata> metadataList = metadataCollection.getMetadataList();
if (metadataList.size() == 0) {
// Sanity check; this should not happen since we build with non-empty metadata.
throw new IllegalStateException("empty metadata: " + fileName);
}
return metadataList;
}
/**
* Loads and returns the metadata from the given stream and closes the stream.
*
* @param source the non-null stream from which metadata is to be read
* @return the loaded metadata
*/
private static PhoneMetadataCollection loadMetadataAndCloseInput(InputStream source) {
ObjectInputStream ois = null;
try {
try {
ois = new ObjectInputStream(source);
} catch (IOException e) {
throw new RuntimeException("cannot load/parse metadata", e);
}
PhoneMetadataCollection metadataCollection = new PhoneMetadataCollection();
try {
metadataCollection.readExternal(ois);
} catch (IOException e) {
throw new RuntimeException("cannot load/parse metadata", e);
}
return metadataCollection;
} finally {
try {
if (ois != null) {
// This will close all underlying streams as well, including source.
ois.close();
} else {
source.close();
}
} catch (IOException e) {
logger.log(Level.WARNING, "error closing input stream (ignored)", e);
}
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java
|
Java
|
unknown
| 10,134
|
/*
* Copyright (C) 2015 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
/**
* A source for phone metadata for all regions.
*/
interface MetadataSource {
/**
* Gets phone metadata for a region.
* @param regionCode the region code.
* @return the phone metadata for that region, or null if there is none.
*/
PhoneMetadata getMetadataForRegion(String regionCode);
/**
* Gets phone metadata for a non-geographical region.
* @param countryCallingCode the country calling code.
* @return the phone metadata for that region, or null if there is none.
*/
PhoneMetadata getMetadataForNonGeographicalRegion(int countryCallingCode);
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataSource.java
|
Java
|
unknown
| 1,303
|
/*
* Copyright (C) 2015 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
/**
* Implementation of {@link MetadataSource} that reads from multiple resource files.
*/
final class MultiFileMetadataSourceImpl implements MetadataSource {
// The prefix of the binary files containing phone number metadata for different regions.
// This enables us to set up with different metadata, such as for testing.
private final String phoneNumberMetadataFilePrefix;
// The {@link MetadataLoader} used to inject alternative metadata sources.
private final MetadataLoader metadataLoader;
// A mapping from a region code to the phone number metadata for that region code.
// Unlike the mappings for alternate formats and short number metadata, the phone number metadata
// is loaded from a non-statically determined file prefix; therefore this map is bound to the
// instance and not static.
private final ConcurrentHashMap<String, PhoneMetadata> geographicalRegions =
new ConcurrentHashMap<String, PhoneMetadata>();
// A mapping from a country calling code for a non-geographical entity to the phone number
// metadata for that country calling code. Examples of the country calling codes include 800
// (International Toll Free Service) and 808 (International Shared Cost Service).
// Unlike the mappings for alternate formats and short number metadata, the phone number metadata
// is loaded from a non-statically determined file prefix; therefore this map is bound to the
// instance and not static.
private final ConcurrentHashMap<Integer, PhoneMetadata> nonGeographicalRegions =
new ConcurrentHashMap<Integer, PhoneMetadata>();
// It is assumed that metadataLoader is not null. Checks should happen before passing it in here.
// @VisibleForTesting
MultiFileMetadataSourceImpl(String phoneNumberMetadataFilePrefix, MetadataLoader metadataLoader) {
this.phoneNumberMetadataFilePrefix = phoneNumberMetadataFilePrefix;
this.metadataLoader = metadataLoader;
}
// It is assumed that metadataLoader is not null. Checks should happen before passing it in here.
MultiFileMetadataSourceImpl(MetadataLoader metadataLoader) {
this(MetadataManager.MULTI_FILE_PHONE_NUMBER_METADATA_FILE_PREFIX, metadataLoader);
}
@Override
public PhoneMetadata getMetadataForRegion(String regionCode) {
return MetadataManager.getMetadataFromMultiFilePrefix(regionCode, geographicalRegions,
phoneNumberMetadataFilePrefix, metadataLoader);
}
@Override
public PhoneMetadata getMetadataForNonGeographicalRegion(int countryCallingCode) {
if (!isNonGeographical(countryCallingCode)) {
// The given country calling code was for a geographical region.
return null;
}
return MetadataManager.getMetadataFromMultiFilePrefix(countryCallingCode, nonGeographicalRegions,
phoneNumberMetadataFilePrefix, metadataLoader);
}
// A country calling code is non-geographical if it only maps to the non-geographical region code,
// i.e. "001".
private boolean isNonGeographical(int countryCallingCode) {
List<String> regionCodes =
CountryCodeToRegionCodeMap.getCountryCodeToRegionCodeMap().get(countryCallingCode);
return (regionCodes.size() == 1
&& PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCodes.get(0)));
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/MultiFileMetadataSourceImpl.java
|
Java
|
unknown
| 4,045
|
/*
* Copyright (C) 2009 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
/**
* Generic exception class for errors encountered when parsing phone numbers.
*/
@SuppressWarnings("serial")
public class NumberParseException extends Exception {
/**
* The reason that a string could not be interpreted as a phone number.
*/
public enum ErrorType {
/**
* The country code supplied did not belong to a supported country or non-geographical entity.
*/
INVALID_COUNTRY_CODE,
/**
* This generally indicates the string passed in had less than 3 digits in it. More
* specifically, the number failed to match the regular expression VALID_PHONE_NUMBER in
* PhoneNumberUtil.java.
*/
NOT_A_NUMBER,
/**
* This indicates the string started with an international dialing prefix, but after this was
* stripped from the number, had less digits than any valid phone number (including country
* code) could have.
*/
TOO_SHORT_AFTER_IDD,
/**
* This indicates the string, after any country code has been stripped, had less digits than any
* valid phone number could have.
*/
TOO_SHORT_NSN,
/**
* This indicates the string had more digits than any valid phone number could have.
*/
TOO_LONG,
}
private ErrorType errorType;
private String message;
public NumberParseException(ErrorType errorType, String message) {
super(message);
this.message = message;
this.errorType = errorType;
}
/**
* Returns the error type of the exception that has been thrown.
*/
public ErrorType getErrorType() {
return errorType;
}
@Override
public String toString() {
return "Error type: " + errorType + ". " + message;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/NumberParseException.java
|
Java
|
unknown
| 2,331
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import java.util.Arrays;
/**
* The immutable match of a phone number within a piece of text. Matches may be found using
* {@link PhoneNumberUtil#findNumbers}.
*
* <p>A match consists of the {@linkplain #number() phone number} as well as the
* {@linkplain #start() start} and {@linkplain #end() end} offsets of the corresponding subsequence
* of the searched text. Use {@link #rawString()} to obtain a copy of the matched subsequence.
*
* <p>The following annotated example clarifies the relationship between the searched text, the
* match offsets, and the parsed number:
* <pre>
* CharSequence text = "Call me at +1 425 882-8080 for details.";
* String country = "US";
* PhoneNumberUtil util = PhoneNumberUtil.getInstance();
*
* // Find the first phone number match:
* PhoneNumberMatch m = util.findNumbers(text, country).iterator().next();
*
* // rawString() contains the phone number as it appears in the text.
* "+1 425 882-8080".equals(m.rawString());
*
* // start() and end() define the range of the matched subsequence.
* CharSequence subsequence = text.subSequence(m.start(), m.end());
* "+1 425 882-8080".contentEquals(subsequence);
*
* // number() returns the the same result as PhoneNumberUtil.{@link PhoneNumberUtil#parse parse()}
* // invoked on rawString().
* util.parse(m.rawString(), country).equals(m.number());
* </pre>
*/
public final class PhoneNumberMatch {
/** The start index into the text. */
private final int start;
/** The raw substring matched. */
private final String rawString;
/** The matched phone number. */
private final PhoneNumber number;
/**
* Creates a new match.
*
* @param start the start index into the target text
* @param rawString the matched substring of the target text
* @param number the matched phone number
*/
PhoneNumberMatch(int start, String rawString, PhoneNumber number) {
if (start < 0) {
throw new IllegalArgumentException("Start index must be >= 0.");
}
if (rawString == null || number == null) {
throw new NullPointerException();
}
this.start = start;
this.rawString = rawString;
this.number = number;
}
/** Returns the phone number matched by the receiver. */
public PhoneNumber number() {
return number;
}
/** Returns the start index of the matched phone number within the searched text. */
public int start() {
return start;
}
/** Returns the exclusive end index of the matched phone number within the searched text. */
public int end() {
return start + rawString.length();
}
/** Returns the raw string matched as a phone number in the searched text. */
public String rawString() {
return rawString;
}
@Override
public int hashCode() {
return Arrays.hashCode(new Object[]{start, rawString, number});
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof PhoneNumberMatch)) {
return false;
}
PhoneNumberMatch other = (PhoneNumberMatch) obj;
return rawString.equals(other.rawString) && (start == other.start)
&& number.equals(other.number);
}
@Override
public String toString() {
return "PhoneNumberMatch [" + start() + "," + end() + ") " + rawString;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatch.java
|
Java
|
unknown
| 4,004
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.PhoneNumberUtil.Leniency;
import com.google.i18n.phonenumbers.PhoneNumberUtil.MatchType;
import com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
import com.google.i18n.phonenumbers.Phonemetadata.NumberFormat;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.internal.RegexCache;
import java.lang.Character.UnicodeBlock;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A stateful class that finds and extracts telephone numbers from {@linkplain CharSequence text}.
* Instances can be created using the {@linkplain PhoneNumberUtil#findNumbers factory methods} in
* {@link PhoneNumberUtil}.
*
* <p>Vanity numbers (phone numbers using alphabetic digits such as <tt>1-800-SIX-FLAGS</tt> are
* not found.
*
* <p>This class is not thread-safe.
*/
final class PhoneNumberMatcher implements Iterator<PhoneNumberMatch> {
/**
* The phone number pattern used by {@link #find}, similar to
* {@code PhoneNumberUtil.VALID_PHONE_NUMBER}, but with the following differences:
* <ul>
* <li>All captures are limited in order to place an upper bound to the text matched by the
* pattern.
* <ul>
* <li>Leading punctuation / plus signs are limited.
* <li>Consecutive occurrences of punctuation are limited.
* <li>Number of digits is limited.
* </ul>
* <li>No whitespace is allowed at the start or end.
* <li>No alpha digits (vanity numbers such as 1-800-SIX-FLAGS) are currently supported.
* </ul>
*/
private static final Pattern PATTERN;
/**
* Matches strings that look like publication pages. Example:
* <pre>Computing Complete Answers to Queries in the Presence of Limited Access Patterns.
* Chen Li. VLDB J. 12(3): 211-227 (2003).</pre>
*
* The string "211-227 (2003)" is not a telephone number.
*/
private static final Pattern PUB_PAGES = Pattern.compile("\\d{1,5}-+\\d{1,5}\\s{0,4}\\(\\d{1,4}");
/**
* Matches strings that look like dates using "/" as a separator. Examples: 3/10/2011, 31/10/96 or
* 08/31/95.
*/
private static final Pattern SLASH_SEPARATED_DATES =
Pattern.compile("(?:(?:[0-3]?\\d/[01]?\\d)|(?:[01]?\\d/[0-3]?\\d))/(?:[12]\\d)?\\d{2}");
/**
* Matches timestamps. Examples: "2012-01-02 08:00". Note that the reg-ex does not include the
* trailing ":\d\d" -- that is covered by TIME_STAMPS_SUFFIX.
*/
private static final Pattern TIME_STAMPS =
Pattern.compile("[12]\\d{3}[-/]?[01]\\d[-/]?[0-3]\\d +[0-2]\\d$");
private static final Pattern TIME_STAMPS_SUFFIX = Pattern.compile(":[0-5]\\d");
/**
* Pattern to check that brackets match. Opening brackets should be closed within a phone number.
* This also checks that there is something inside the brackets. Having no brackets at all is also
* fine.
*/
private static final Pattern MATCHING_BRACKETS;
/**
* Patterns used to extract phone numbers from a larger phone-number-like pattern. These are
* ordered according to specificity. For example, white-space is last since that is frequently
* used in numbers, not just to separate two numbers. We have separate patterns since we don't
* want to break up the phone-number-like text on more than one different kind of symbol at one
* time, although symbols of the same type (e.g. space) can be safely grouped together.
*
* Note that if there is a match, we will always check any text found up to the first match as
* well.
*/
private static final Pattern[] INNER_MATCHES = {
// Breaks on the slash - e.g. "651-234-2345/332-445-1234"
Pattern.compile("/+(.*)"),
// Note that the bracket here is inside the capturing group, since we consider it part of the
// phone number. Will match a pattern like "(650) 223 3345 (754) 223 3321".
Pattern.compile("(\\([^(]*)"),
// Breaks on a hyphen - e.g. "12345 - 332-445-1234 is my number."
// We require a space on either side of the hyphen for it to be considered a separator.
Pattern.compile("(?:\\p{Z}-|-\\p{Z})\\p{Z}*(.+)"),
// Various types of wide hyphens. Note we have decided not to enforce a space here, since it's
// possible that it's supposed to be used to break two numbers without spaces, and we haven't
// seen many instances of it used within a number.
Pattern.compile("[\u2012-\u2015\uFF0D]\\p{Z}*(.+)"),
// Breaks on a full stop - e.g. "12345. 332-445-1234 is my number."
Pattern.compile("\\.+\\p{Z}*([^.]+)"),
// Breaks on space - e.g. "3324451234 8002341234"
Pattern.compile("\\p{Z}+(\\P{Z}+)")
};
/**
* Punctuation that may be at the start of a phone number - brackets and plus signs.
*/
private static final Pattern LEAD_CLASS;
static {
/* Builds the MATCHING_BRACKETS and PATTERN regular expressions. The building blocks below exist
* to make the pattern more easily understood. */
String openingParens = "(\\[\uFF08\uFF3B";
String closingParens = ")\\]\uFF09\uFF3D";
String nonParens = "[^" + openingParens + closingParens + "]";
/* Limit on the number of pairs of brackets in a phone number. */
String bracketPairLimit = limit(0, 3);
/*
* An opening bracket at the beginning may not be closed, but subsequent ones should be. It's
* also possible that the leading bracket was dropped, so we shouldn't be surprised if we see a
* closing bracket first. We limit the sets of brackets in a phone number to four.
*/
MATCHING_BRACKETS = Pattern.compile(
"(?:[" + openingParens + "])?" + "(?:" + nonParens + "+" + "[" + closingParens + "])?"
+ nonParens + "+"
+ "(?:[" + openingParens + "]" + nonParens + "+[" + closingParens + "])" + bracketPairLimit
+ nonParens + "*");
/* Limit on the number of leading (plus) characters. */
String leadLimit = limit(0, 2);
/* Limit on the number of consecutive punctuation characters. */
String punctuationLimit = limit(0, 4);
/* The maximum number of digits allowed in a digit-separated block. As we allow all digits in a
* single block, set high enough to accommodate the entire national number and the international
* country code. */
int digitBlockLimit =
PhoneNumberUtil.MAX_LENGTH_FOR_NSN + PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE;
/* Limit on the number of blocks separated by punctuation. Uses digitBlockLimit since some
* formats use spaces to separate each digit. */
String blockLimit = limit(0, digitBlockLimit);
/* A punctuation sequence allowing white space. */
String punctuation = "[" + PhoneNumberUtil.VALID_PUNCTUATION + "]" + punctuationLimit;
/* A digits block without punctuation. */
String digitSequence = "\\p{Nd}" + limit(1, digitBlockLimit);
String leadClassChars = openingParens + PhoneNumberUtil.PLUS_CHARS;
String leadClass = "[" + leadClassChars + "]";
LEAD_CLASS = Pattern.compile(leadClass);
/* Phone number pattern allowing optional punctuation. */
PATTERN = Pattern.compile(
"(?:" + leadClass + punctuation + ")" + leadLimit
+ digitSequence + "(?:" + punctuation + digitSequence + ")" + blockLimit
+ "(?:" + PhoneNumberUtil.EXTN_PATTERNS_FOR_MATCHING + ")?",
PhoneNumberUtil.REGEX_FLAGS);
}
/** Returns a regular expression quantifier with an upper and lower limit. */
private static String limit(int lower, int upper) {
if ((lower < 0) || (upper <= 0) || (upper < lower)) {
throw new IllegalArgumentException();
}
return "{" + lower + "," + upper + "}";
}
/** The potential states of a PhoneNumberMatcher. */
private enum State {
NOT_READY, READY, DONE
}
/** The phone number utility. */
private final PhoneNumberUtil phoneUtil;
/** The text searched for phone numbers. */
private final CharSequence text;
/**
* The region (country) to assume for phone numbers without an international prefix, possibly
* null.
*/
private final String preferredRegion;
/** The degree of validation requested. */
private final Leniency leniency;
/** The maximum number of retries after matching an invalid number. */
private long maxTries;
/** The iteration tristate. */
private State state = State.NOT_READY;
/** The last successful match, null unless in {@link State#READY}. */
private PhoneNumberMatch lastMatch = null;
/** The next index to start searching at. Undefined in {@link State#DONE}. */
private int searchIndex = 0;
// A cache for frequently used country-specific regular expressions. Set to 32 to cover ~2-3
// countries being used for the same doc with ~10 patterns for each country. Some pages will have
// a lot more countries in use, but typically fewer numbers for each so expanding the cache for
// that use-case won't have a lot of benefit.
private final RegexCache regexCache = new RegexCache(32);
/**
* Creates a new instance. See the factory methods in {@link PhoneNumberUtil} on how to obtain a
* new instance.
*
* @param util the phone number util to use
* @param text the character sequence that we will search, null for no text
* @param country the country to assume for phone numbers not written in international format
* (with a leading plus, or with the international dialing prefix of the specified region).
* May be null or "ZZ" if only numbers with a leading plus should be
* considered.
* @param leniency the leniency to use when evaluating candidate phone numbers
* @param maxTries the maximum number of invalid numbers to try before giving up on the text.
* This is to cover degenerate cases where the text has a lot of false positives in it. Must
* be {@code >= 0}.
*/
PhoneNumberMatcher(PhoneNumberUtil util, CharSequence text, String country, Leniency leniency,
long maxTries) {
if ((util == null) || (leniency == null)) {
throw new NullPointerException();
}
if (maxTries < 0) {
throw new IllegalArgumentException();
}
this.phoneUtil = util;
this.text = (text != null) ? text : "";
this.preferredRegion = country;
this.leniency = leniency;
this.maxTries = maxTries;
}
/**
* Attempts to find the next subsequence in the searched sequence on or after {@code searchIndex}
* that represents a phone number. Returns the next match, null if none was found.
*
* @param index the search index to start searching at
* @return the phone number match found, null if none can be found
*/
private PhoneNumberMatch find(int index) {
Matcher matcher = PATTERN.matcher(text);
while ((maxTries > 0) && matcher.find(index)) {
int start = matcher.start();
CharSequence candidate = text.subSequence(start, matcher.end());
// Check for extra numbers at the end.
// TODO: This is the place to start when trying to support extraction of multiple phone number
// from split notations (+41 79 123 45 67 / 68).
candidate = trimAfterFirstMatch(PhoneNumberUtil.SECOND_NUMBER_START_PATTERN, candidate);
PhoneNumberMatch match = extractMatch(candidate, start);
if (match != null) {
return match;
}
index = start + candidate.length();
maxTries--;
}
return null;
}
/**
* Trims away any characters after the first match of {@code pattern} in {@code candidate},
* returning the trimmed version.
*/
private static CharSequence trimAfterFirstMatch(Pattern pattern, CharSequence candidate) {
Matcher trailingCharsMatcher = pattern.matcher(candidate);
if (trailingCharsMatcher.find()) {
candidate = candidate.subSequence(0, trailingCharsMatcher.start());
}
return candidate;
}
/**
* Helper method to determine if a character is a Latin-script letter or not. For our purposes,
* combining marks should also return true since we assume they have been added to a preceding
* Latin character.
*/
// @VisibleForTesting
static boolean isLatinLetter(char letter) {
// Combining marks are a subset of non-spacing-mark.
if (!Character.isLetter(letter) && Character.getType(letter) != Character.NON_SPACING_MARK) {
return false;
}
UnicodeBlock block = UnicodeBlock.of(letter);
return block.equals(UnicodeBlock.BASIC_LATIN)
|| block.equals(UnicodeBlock.LATIN_1_SUPPLEMENT)
|| block.equals(UnicodeBlock.LATIN_EXTENDED_A)
|| block.equals(UnicodeBlock.LATIN_EXTENDED_ADDITIONAL)
|| block.equals(UnicodeBlock.LATIN_EXTENDED_B)
|| block.equals(UnicodeBlock.COMBINING_DIACRITICAL_MARKS);
}
private static boolean isInvalidPunctuationSymbol(char character) {
return character == '%' || Character.getType(character) == Character.CURRENCY_SYMBOL;
}
/**
* Attempts to extract a match from a {@code candidate} character sequence.
*
* @param candidate the candidate text that might contain a phone number
* @param offset the offset of {@code candidate} within {@link #text}
* @return the match found, null if none can be found
*/
private PhoneNumberMatch extractMatch(CharSequence candidate, int offset) {
// Skip a match that is more likely to be a date.
if (SLASH_SEPARATED_DATES.matcher(candidate).find()) {
return null;
}
// Skip potential time-stamps.
if (TIME_STAMPS.matcher(candidate).find()) {
String followingText = text.toString().substring(offset + candidate.length());
if (TIME_STAMPS_SUFFIX.matcher(followingText).lookingAt()) {
return null;
}
}
// Try to come up with a valid match given the entire candidate.
PhoneNumberMatch match = parseAndVerify(candidate, offset);
if (match != null) {
return match;
}
// If that failed, try to find an "inner match" - there might be a phone number within this
// candidate.
return extractInnerMatch(candidate, offset);
}
/**
* Attempts to extract a match from {@code candidate} if the whole candidate does not qualify as a
* match.
*
* @param candidate the candidate text that might contain a phone number
* @param offset the current offset of {@code candidate} within {@link #text}
* @return the match found, null if none can be found
*/
private PhoneNumberMatch extractInnerMatch(CharSequence candidate, int offset) {
for (Pattern possibleInnerMatch : INNER_MATCHES) {
Matcher groupMatcher = possibleInnerMatch.matcher(candidate);
boolean isFirstMatch = true;
while (groupMatcher.find() && maxTries > 0) {
if (isFirstMatch) {
// We should handle any group before this one too.
CharSequence group = trimAfterFirstMatch(
PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN,
candidate.subSequence(0, groupMatcher.start()));
PhoneNumberMatch match = parseAndVerify(group, offset);
if (match != null) {
return match;
}
maxTries--;
isFirstMatch = false;
}
CharSequence group = trimAfterFirstMatch(
PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN, groupMatcher.group(1));
PhoneNumberMatch match = parseAndVerify(group, offset + groupMatcher.start(1));
if (match != null) {
return match;
}
maxTries--;
}
}
return null;
}
/**
* Parses a phone number from the {@code candidate} using {@link PhoneNumberUtil#parse} and
* verifies it matches the requested {@link #leniency}. If parsing and verification succeed, a
* corresponding {@link PhoneNumberMatch} is returned, otherwise this method returns null.
*
* @param candidate the candidate match
* @param offset the offset of {@code candidate} within {@link #text}
* @return the parsed and validated phone number match, or null
*/
private PhoneNumberMatch parseAndVerify(CharSequence candidate, int offset) {
try {
// Check the candidate doesn't contain any formatting which would indicate that it really
// isn't a phone number.
if (!MATCHING_BRACKETS.matcher(candidate).matches() || PUB_PAGES.matcher(candidate).find()) {
return null;
}
// If leniency is set to VALID or stricter, we also want to skip numbers that are surrounded
// by Latin alphabetic characters, to skip cases like abc8005001234 or 8005001234def.
if (leniency.compareTo(Leniency.VALID) >= 0) {
// If the candidate is not at the start of the text, and does not start with phone-number
// punctuation, check the previous character.
if (offset > 0 && !LEAD_CLASS.matcher(candidate).lookingAt()) {
char previousChar = text.charAt(offset - 1);
// We return null if it is a latin letter or an invalid punctuation symbol.
if (isInvalidPunctuationSymbol(previousChar) || isLatinLetter(previousChar)) {
return null;
}
}
int lastCharIndex = offset + candidate.length();
if (lastCharIndex < text.length()) {
char nextChar = text.charAt(lastCharIndex);
if (isInvalidPunctuationSymbol(nextChar) || isLatinLetter(nextChar)) {
return null;
}
}
}
PhoneNumber number = phoneUtil.parseAndKeepRawInput(candidate, preferredRegion);
if (leniency.verify(number, candidate, phoneUtil, this)) {
// We used parseAndKeepRawInput to create this number, but for now we don't return the extra
// values parsed. TODO: stop clearing all values here and switch all users over
// to using rawInput() rather than the rawString() of PhoneNumberMatch.
number.clearCountryCodeSource();
number.clearRawInput();
number.clearPreferredDomesticCarrierCode();
return new PhoneNumberMatch(offset, candidate.toString(), number);
}
} catch (NumberParseException e) {
// ignore and continue
}
return null;
}
/**
* Small helper interface such that the number groups can be checked according to different
* criteria, both for our default way of performing formatting and for any alternate formats we
* may want to check.
*/
interface NumberGroupingChecker {
/**
* Returns true if the groups of digits found in our candidate phone number match our
* expectations.
*
* @param number the original number we found when parsing
* @param normalizedCandidate the candidate number, normalized to only contain ASCII digits,
* but with non-digits (spaces etc) retained
* @param expectedNumberGroups the groups of digits that we would expect to see if we
* formatted this number
*/
boolean checkGroups(PhoneNumberUtil util, PhoneNumber number,
StringBuilder normalizedCandidate, String[] expectedNumberGroups);
}
static boolean allNumberGroupsRemainGrouped(PhoneNumberUtil util,
PhoneNumber number,
StringBuilder normalizedCandidate,
String[] formattedNumberGroups) {
int fromIndex = 0;
if (number.getCountryCodeSource() != CountryCodeSource.FROM_DEFAULT_COUNTRY) {
// First skip the country code if the normalized candidate contained it.
String countryCode = Integer.toString(number.getCountryCode());
fromIndex = normalizedCandidate.indexOf(countryCode) + countryCode.length();
}
// Check each group of consecutive digits are not broken into separate groupings in the
// {@code normalizedCandidate} string.
for (int i = 0; i < formattedNumberGroups.length; i++) {
// Fails if the substring of {@code normalizedCandidate} starting from {@code fromIndex}
// doesn't contain the consecutive digits in formattedNumberGroups[i].
fromIndex = normalizedCandidate.indexOf(formattedNumberGroups[i], fromIndex);
if (fromIndex < 0) {
return false;
}
// Moves {@code fromIndex} forward.
fromIndex += formattedNumberGroups[i].length();
if (i == 0 && fromIndex < normalizedCandidate.length()) {
// We are at the position right after the NDC. We get the region used for formatting
// information based on the country code in the phone number, rather than the number itself,
// as we do not need to distinguish between different countries with the same country
// calling code and this is faster.
String region = util.getRegionCodeForCountryCode(number.getCountryCode());
if (util.getNddPrefixForRegion(region, true) != null
&& Character.isDigit(normalizedCandidate.charAt(fromIndex))) {
// This means there is no formatting symbol after the NDC. In this case, we only
// accept the number if there is no formatting symbol at all in the number, except
// for extensions. This is only important for countries with national prefixes.
String nationalSignificantNumber = util.getNationalSignificantNumber(number);
return normalizedCandidate.substring(fromIndex - formattedNumberGroups[i].length())
.startsWith(nationalSignificantNumber);
}
}
}
// The check here makes sure that we haven't mistakenly already used the extension to
// match the last group of the subscriber number. Note the extension cannot have
// formatting in-between digits.
return normalizedCandidate.substring(fromIndex).contains(number.getExtension());
}
static boolean allNumberGroupsAreExactlyPresent(PhoneNumberUtil util,
PhoneNumber number,
StringBuilder normalizedCandidate,
String[] formattedNumberGroups) {
String[] candidateGroups =
PhoneNumberUtil.NON_DIGITS_PATTERN.split(normalizedCandidate.toString());
// Set this to the last group, skipping it if the number has an extension.
int candidateNumberGroupIndex =
number.hasExtension() ? candidateGroups.length - 2 : candidateGroups.length - 1;
// First we check if the national significant number is formatted as a block.
// We use contains and not equals, since the national significant number may be present with
// a prefix such as a national number prefix, or the country code itself.
if (candidateGroups.length == 1
|| candidateGroups[candidateNumberGroupIndex].contains(
util.getNationalSignificantNumber(number))) {
return true;
}
// Starting from the end, go through in reverse, excluding the first group, and check the
// candidate and number groups are the same.
for (int formattedNumberGroupIndex = (formattedNumberGroups.length - 1);
formattedNumberGroupIndex > 0 && candidateNumberGroupIndex >= 0;
formattedNumberGroupIndex--, candidateNumberGroupIndex--) {
if (!candidateGroups[candidateNumberGroupIndex].equals(
formattedNumberGroups[formattedNumberGroupIndex])) {
return false;
}
}
// Now check the first group. There may be a national prefix at the start, so we only check
// that the candidate group ends with the formatted number group.
return (candidateNumberGroupIndex >= 0
&& candidateGroups[candidateNumberGroupIndex].endsWith(formattedNumberGroups[0]));
}
/**
* Helper method to get the national-number part of a number, formatted without any national
* prefix, and return it as a set of digit blocks that would be formatted together following
* standard formatting rules.
*/
private static String[] getNationalNumberGroups(PhoneNumberUtil util, PhoneNumber number) {
// This will be in the format +CC-DG1-DG2-DGX;ext=EXT where DG1..DGX represents groups of
// digits.
String rfc3966Format = util.format(number, PhoneNumberFormat.RFC3966);
// We remove the extension part from the formatted string before splitting it into different
// groups.
int endIndex = rfc3966Format.indexOf(';');
if (endIndex < 0) {
endIndex = rfc3966Format.length();
}
// The country-code will have a '-' following it.
int startIndex = rfc3966Format.indexOf('-') + 1;
return rfc3966Format.substring(startIndex, endIndex).split("-");
}
/**
* Helper method to get the national-number part of a number, formatted without any national
* prefix, and return it as a set of digit blocks that should be formatted together according to
* the formatting pattern passed in.
*/
private static String[] getNationalNumberGroups(PhoneNumberUtil util, PhoneNumber number,
NumberFormat formattingPattern) {
// If a format is provided, we format the NSN only, and split that according to the separator.
String nationalSignificantNumber = util.getNationalSignificantNumber(number);
return util.formatNsnUsingPattern(nationalSignificantNumber,
formattingPattern, PhoneNumberFormat.RFC3966).split("-");
}
boolean checkNumberGroupingIsValid(
PhoneNumber number, CharSequence candidate, PhoneNumberUtil util,
NumberGroupingChecker checker) {
StringBuilder normalizedCandidate =
PhoneNumberUtil.normalizeDigits(candidate, true /* keep non-digits */);
String[] formattedNumberGroups = getNationalNumberGroups(util, number);
if (checker.checkGroups(util, number, normalizedCandidate, formattedNumberGroups)) {
return true;
}
// If this didn't pass, see if there are any alternate formats that match, and try them instead.
PhoneMetadata alternateFormats =
MetadataManager.getAlternateFormatsForCountry(number.getCountryCode());
String nationalSignificantNumber = util.getNationalSignificantNumber(number);
if (alternateFormats != null) {
for (NumberFormat alternateFormat : alternateFormats.numberFormats()) {
if (alternateFormat.leadingDigitsPatternSize() > 0) {
// There is only one leading digits pattern for alternate formats.
Pattern pattern =
regexCache.getPatternForRegex(alternateFormat.getLeadingDigitsPattern(0));
if (!pattern.matcher(nationalSignificantNumber).lookingAt()) {
// Leading digits don't match; try another one.
continue;
}
}
formattedNumberGroups = getNationalNumberGroups(util, number, alternateFormat);
if (checker.checkGroups(util, number, normalizedCandidate, formattedNumberGroups)) {
return true;
}
}
}
return false;
}
static boolean containsMoreThanOneSlashInNationalNumber(PhoneNumber number, String candidate) {
int firstSlashInBodyIndex = candidate.indexOf('/');
if (firstSlashInBodyIndex < 0) {
// No slashes, this is okay.
return false;
}
// Now look for a second one.
int secondSlashInBodyIndex = candidate.indexOf('/', firstSlashInBodyIndex + 1);
if (secondSlashInBodyIndex < 0) {
// Only one slash, this is okay.
return false;
}
// If the first slash is after the country calling code, this is permitted.
boolean candidateHasCountryCode =
(number.getCountryCodeSource() == CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN
|| number.getCountryCodeSource() == CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN);
if (candidateHasCountryCode
&& PhoneNumberUtil.normalizeDigitsOnly(candidate.substring(0, firstSlashInBodyIndex))
.equals(Integer.toString(number.getCountryCode()))) {
// Any more slashes and this is illegal.
return candidate.substring(secondSlashInBodyIndex + 1).contains("/");
}
return true;
}
static boolean containsOnlyValidXChars(
PhoneNumber number, String candidate, PhoneNumberUtil util) {
// The characters 'x' and 'X' can be (1) a carrier code, in which case they always precede the
// national significant number or (2) an extension sign, in which case they always precede the
// extension number. We assume a carrier code is more than 1 digit, so the first case has to
// have more than 1 consecutive 'x' or 'X', whereas the second case can only have exactly 1 'x'
// or 'X'. We ignore the character if it appears as the last character of the string.
for (int index = 0; index < candidate.length() - 1; index++) {
char charAtIndex = candidate.charAt(index);
if (charAtIndex == 'x' || charAtIndex == 'X') {
char charAtNextIndex = candidate.charAt(index + 1);
if (charAtNextIndex == 'x' || charAtNextIndex == 'X') {
// This is the carrier code case, in which the 'X's always precede the national
// significant number.
index++;
if (util.isNumberMatch(number, candidate.substring(index)) != MatchType.NSN_MATCH) {
return false;
}
// This is the extension sign case, in which the 'x' or 'X' should always precede the
// extension number.
} else if (!PhoneNumberUtil.normalizeDigitsOnly(candidate.substring(index)).equals(
number.getExtension())) {
return false;
}
}
}
return true;
}
static boolean isNationalPrefixPresentIfRequired(PhoneNumber number, PhoneNumberUtil util) {
// First, check how we deduced the country code. If it was written in international format, then
// the national prefix is not required.
if (number.getCountryCodeSource() != CountryCodeSource.FROM_DEFAULT_COUNTRY) {
return true;
}
String phoneNumberRegion =
util.getRegionCodeForCountryCode(number.getCountryCode());
PhoneMetadata metadata = util.getMetadataForRegion(phoneNumberRegion);
if (metadata == null) {
return true;
}
// Check if a national prefix should be present when formatting this number.
String nationalNumber = util.getNationalSignificantNumber(number);
NumberFormat formatRule =
util.chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber);
// To do this, we check that a national prefix formatting rule was present and that it wasn't
// just the first-group symbol ($1) with punctuation.
if ((formatRule != null) && formatRule.getNationalPrefixFormattingRule().length() > 0) {
if (formatRule.getNationalPrefixOptionalWhenFormatting()) {
// The national-prefix is optional in these cases, so we don't need to check if it was
// present.
return true;
}
if (PhoneNumberUtil.formattingRuleHasFirstGroupOnly(
formatRule.getNationalPrefixFormattingRule())) {
// National Prefix not needed for this number.
return true;
}
// Normalize the remainder.
String rawInputCopy = PhoneNumberUtil.normalizeDigitsOnly(number.getRawInput());
StringBuilder rawInput = new StringBuilder(rawInputCopy);
// Check if we found a national prefix and/or carrier code at the start of the raw input, and
// return the result.
return util.maybeStripNationalPrefixAndCarrierCode(rawInput, metadata, null);
}
return true;
}
@Override
public boolean hasNext() {
if (state == State.NOT_READY) {
lastMatch = find(searchIndex);
if (lastMatch == null) {
state = State.DONE;
} else {
searchIndex = lastMatch.end();
state = State.READY;
}
}
return state == State.READY;
}
@Override
public PhoneNumberMatch next() {
// Check the state and find the next match as a side-effect if necessary.
if (!hasNext()) {
throw new NoSuchElementException();
}
// Don't retain that memory any longer than necessary.
PhoneNumberMatch result = lastMatch;
lastMatch = null;
state = State.NOT_READY;
return result;
}
/**
* Always throws {@link UnsupportedOperationException} as removal is not supported.
*/
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java
|
Java
|
unknown
| 33,024
|
/*
* Copyright (C) 2009 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.NumberFormat;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource;
import com.google.i18n.phonenumbers.internal.MatcherApi;
import com.google.i18n.phonenumbers.internal.RegexBasedMatcher;
import com.google.i18n.phonenumbers.internal.RegexCache;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Utility for international phone numbers. Functionality includes formatting, parsing and
* validation.
*
* <p>If you use this library, and want to be notified about important changes, please sign up to
* our <a href="https://groups.google.com/forum/#!aboutgroup/libphonenumber-discuss">mailing list</a>.
*
* NOTE: A lot of methods in this class require Region Code strings. These must be provided using
* CLDR two-letter region-code format. These should be in upper-case. The list of the codes
* can be found here:
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
*/
public class PhoneNumberUtil {
private static final Logger logger = Logger.getLogger(PhoneNumberUtil.class.getName());
/** Flags to use when compiling regular expressions for phone numbers. */
static final int REGEX_FLAGS = Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE;
// The minimum and maximum length of the national significant number.
private static final int MIN_LENGTH_FOR_NSN = 2;
// The ITU says the maximum length should be 15, but we have found longer numbers in Germany.
static final int MAX_LENGTH_FOR_NSN = 17;
// The maximum length of the country calling code.
static final int MAX_LENGTH_COUNTRY_CODE = 3;
// We don't allow input strings for parsing to be longer than 250 chars. This prevents malicious
// input from overflowing the regular-expression engine.
private static final int MAX_INPUT_STRING_LENGTH = 250;
// Region-code for the unknown region.
private static final String UNKNOWN_REGION = "ZZ";
private static final int NANPA_COUNTRY_CODE = 1;
// The prefix that needs to be inserted in front of a Colombian landline number when dialed from
// a mobile phone in Colombia.
private static final String COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX = "3";
// Map of country calling codes that use a mobile token before the area code. One example of when
// this is relevant is when determining the length of the national destination code, which should
// be the length of the area code plus the length of the mobile token.
private static final Map<Integer, String> MOBILE_TOKEN_MAPPINGS;
// Set of country codes that have geographically assigned mobile numbers (see GEO_MOBILE_COUNTRIES
// below) which are not based on *area codes*. For example, in China mobile numbers start with a
// carrier indicator, and beyond that are geographically assigned: this carrier indicator is not
// considered to be an area code.
private static final Set<Integer> GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES;
// Set of country calling codes that have geographically assigned mobile numbers. This may not be
// complete; we add calling codes case by case, as we find geographical mobile numbers or hear
// from user reports. Note that countries like the US, where we can't distinguish between
// fixed-line or mobile numbers, are not listed here, since we consider FIXED_LINE_OR_MOBILE to be
// a possibly geographically-related type anyway (like FIXED_LINE).
private static final Set<Integer> GEO_MOBILE_COUNTRIES;
// The PLUS_SIGN signifies the international prefix.
static final char PLUS_SIGN = '+';
private static final char STAR_SIGN = '*';
private static final String RFC3966_EXTN_PREFIX = ";ext=";
private static final String RFC3966_PREFIX = "tel:";
private static final String RFC3966_PHONE_CONTEXT = ";phone-context=";
private static final String RFC3966_ISDN_SUBADDRESS = ";isub=";
// A map that contains characters that are essential when dialling. That means any of the
// characters in this map must not be removed from a number when dialling, otherwise the call
// will not reach the intended destination.
private static final Map<Character, Character> DIALLABLE_CHAR_MAPPINGS;
// Only upper-case variants of alpha characters are stored.
private static final Map<Character, Character> ALPHA_MAPPINGS;
// For performance reasons, amalgamate both into one map.
private static final Map<Character, Character> ALPHA_PHONE_MAPPINGS;
// Separate map of all symbols that we wish to retain when formatting alpha numbers. This
// includes digits, ASCII letters and number grouping symbols such as "-" and " ".
private static final Map<Character, Character> ALL_PLUS_NUMBER_GROUPING_SYMBOLS;
static {
HashMap<Integer, String> mobileTokenMap = new HashMap<Integer, String>();
mobileTokenMap.put(54, "9");
MOBILE_TOKEN_MAPPINGS = Collections.unmodifiableMap(mobileTokenMap);
HashSet<Integer> geoMobileCountriesWithoutMobileAreaCodes = new HashSet<Integer>();
geoMobileCountriesWithoutMobileAreaCodes.add(86); // China
GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES =
Collections.unmodifiableSet(geoMobileCountriesWithoutMobileAreaCodes);
HashSet<Integer> geoMobileCountries = new HashSet<Integer>();
geoMobileCountries.add(52); // Mexico
geoMobileCountries.add(54); // Argentina
geoMobileCountries.add(55); // Brazil
geoMobileCountries.add(62); // Indonesia: some prefixes only (fixed CMDA wireless)
geoMobileCountries.addAll(geoMobileCountriesWithoutMobileAreaCodes);
GEO_MOBILE_COUNTRIES = Collections.unmodifiableSet(geoMobileCountries);
// Simple ASCII digits map used to populate ALPHA_PHONE_MAPPINGS and
// ALL_PLUS_NUMBER_GROUPING_SYMBOLS.
HashMap<Character, Character> asciiDigitMappings = new HashMap<Character, Character>();
asciiDigitMappings.put('0', '0');
asciiDigitMappings.put('1', '1');
asciiDigitMappings.put('2', '2');
asciiDigitMappings.put('3', '3');
asciiDigitMappings.put('4', '4');
asciiDigitMappings.put('5', '5');
asciiDigitMappings.put('6', '6');
asciiDigitMappings.put('7', '7');
asciiDigitMappings.put('8', '8');
asciiDigitMappings.put('9', '9');
HashMap<Character, Character> alphaMap = new HashMap<Character, Character>(40);
alphaMap.put('A', '2');
alphaMap.put('B', '2');
alphaMap.put('C', '2');
alphaMap.put('D', '3');
alphaMap.put('E', '3');
alphaMap.put('F', '3');
alphaMap.put('G', '4');
alphaMap.put('H', '4');
alphaMap.put('I', '4');
alphaMap.put('J', '5');
alphaMap.put('K', '5');
alphaMap.put('L', '5');
alphaMap.put('M', '6');
alphaMap.put('N', '6');
alphaMap.put('O', '6');
alphaMap.put('P', '7');
alphaMap.put('Q', '7');
alphaMap.put('R', '7');
alphaMap.put('S', '7');
alphaMap.put('T', '8');
alphaMap.put('U', '8');
alphaMap.put('V', '8');
alphaMap.put('W', '9');
alphaMap.put('X', '9');
alphaMap.put('Y', '9');
alphaMap.put('Z', '9');
ALPHA_MAPPINGS = Collections.unmodifiableMap(alphaMap);
HashMap<Character, Character> combinedMap = new HashMap<Character, Character>(100);
combinedMap.putAll(ALPHA_MAPPINGS);
combinedMap.putAll(asciiDigitMappings);
ALPHA_PHONE_MAPPINGS = Collections.unmodifiableMap(combinedMap);
HashMap<Character, Character> diallableCharMap = new HashMap<Character, Character>();
diallableCharMap.putAll(asciiDigitMappings);
diallableCharMap.put(PLUS_SIGN, PLUS_SIGN);
diallableCharMap.put('*', '*');
diallableCharMap.put('#', '#');
DIALLABLE_CHAR_MAPPINGS = Collections.unmodifiableMap(diallableCharMap);
HashMap<Character, Character> allPlusNumberGroupings = new HashMap<Character, Character>();
// Put (lower letter -> upper letter) and (upper letter -> upper letter) mappings.
for (char c : ALPHA_MAPPINGS.keySet()) {
allPlusNumberGroupings.put(Character.toLowerCase(c), c);
allPlusNumberGroupings.put(c, c);
}
allPlusNumberGroupings.putAll(asciiDigitMappings);
// Put grouping symbols.
allPlusNumberGroupings.put('-', '-');
allPlusNumberGroupings.put('\uFF0D', '-');
allPlusNumberGroupings.put('\u2010', '-');
allPlusNumberGroupings.put('\u2011', '-');
allPlusNumberGroupings.put('\u2012', '-');
allPlusNumberGroupings.put('\u2013', '-');
allPlusNumberGroupings.put('\u2014', '-');
allPlusNumberGroupings.put('\u2015', '-');
allPlusNumberGroupings.put('\u2212', '-');
allPlusNumberGroupings.put('/', '/');
allPlusNumberGroupings.put('\uFF0F', '/');
allPlusNumberGroupings.put(' ', ' ');
allPlusNumberGroupings.put('\u3000', ' ');
allPlusNumberGroupings.put('\u2060', ' ');
allPlusNumberGroupings.put('.', '.');
allPlusNumberGroupings.put('\uFF0E', '.');
ALL_PLUS_NUMBER_GROUPING_SYMBOLS = Collections.unmodifiableMap(allPlusNumberGroupings);
}
// Pattern that makes it easy to distinguish whether a region has a single international dialing
// prefix or not. If a region has a single international prefix (e.g. 011 in USA), it will be
// represented as a string that contains a sequence of ASCII digits, and possibly a tilde, which
// signals waiting for the tone. If there are multiple available international prefixes in a
// region, they will be represented as a regex string that always contains one or more characters
// that are not ASCII digits or a tilde.
private static final Pattern SINGLE_INTERNATIONAL_PREFIX =
Pattern.compile("[\\d]+(?:[~\u2053\u223C\uFF5E][\\d]+)?");
// Regular expression of acceptable punctuation found in phone numbers, used to find numbers in
// text and to decide what is a viable phone number. This excludes diallable characters.
// This consists of dash characters, white space characters, full stops, slashes,
// square brackets, parentheses and tildes. It also includes the letter 'x' as that is found as a
// placeholder for carrier information in some phone numbers. Full-width variants are also
// present.
static final String VALID_PUNCTUATION = "-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F "
+ "\u00A0\u00AD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E";
private static final String DIGITS = "\\p{Nd}";
// We accept alpha characters in phone numbers, ASCII only, upper and lower case.
private static final String VALID_ALPHA =
Arrays.toString(ALPHA_MAPPINGS.keySet().toArray()).replaceAll("[, \\[\\]]", "")
+ Arrays.toString(ALPHA_MAPPINGS.keySet().toArray())
.toLowerCase().replaceAll("[, \\[\\]]", "");
static final String PLUS_CHARS = "+\uFF0B";
static final Pattern PLUS_CHARS_PATTERN = Pattern.compile("[" + PLUS_CHARS + "]+");
private static final Pattern SEPARATOR_PATTERN = Pattern.compile("[" + VALID_PUNCTUATION + "]+");
private static final Pattern CAPTURING_DIGIT_PATTERN = Pattern.compile("(" + DIGITS + ")");
// Regular expression of acceptable characters that may start a phone number for the purposes of
// parsing. This allows us to strip away meaningless prefixes to phone numbers that may be
// mistakenly given to us. This consists of digits, the plus symbol and arabic-indic digits. This
// does not contain alpha characters, although they may be used later in the number. It also does
// not include other punctuation, as this will be stripped later during parsing and is of no
// information value when parsing a number.
private static final String VALID_START_CHAR = "[" + PLUS_CHARS + DIGITS + "]";
private static final Pattern VALID_START_CHAR_PATTERN = Pattern.compile(VALID_START_CHAR);
// Regular expression of characters typically used to start a second phone number for the purposes
// of parsing. This allows us to strip off parts of the number that are actually the start of
// another number, such as for: (530) 583-6985 x302/x2303 -> the second extension here makes this
// actually two phone numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second
// extension so that the first number is parsed correctly.
private static final String SECOND_NUMBER_START = "[\\\\/] *x";
static final Pattern SECOND_NUMBER_START_PATTERN = Pattern.compile(SECOND_NUMBER_START);
// Regular expression of trailing characters that we want to remove. We remove all characters that
// are not alpha or numerical characters. The hash character is retained here, as it may signify
// the previous block was an extension.
private static final String UNWANTED_END_CHARS = "[[\\P{N}&&\\P{L}]&&[^#]]+$";
static final Pattern UNWANTED_END_CHAR_PATTERN = Pattern.compile(UNWANTED_END_CHARS);
// We use this pattern to check if the phone number has at least three letters in it - if so, then
// we treat it as a number where some phone-number digits are represented by letters.
private static final Pattern VALID_ALPHA_PHONE_PATTERN = Pattern.compile("(?:.*?[A-Za-z]){3}.*");
// Regular expression of viable phone numbers. This is location independent. Checks we have at
// least three leading digits, and only valid punctuation, alpha characters and
// digits in the phone number. Does not include extension data.
// The symbol 'x' is allowed here as valid punctuation since it is often used as a placeholder for
// carrier codes, for example in Brazilian phone numbers. We also allow multiple "+" characters at
// the start.
// Corresponds to the following:
// [digits]{minLengthNsn}|
// plus_sign*(([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
//
// The first reg-ex is to allow short numbers (two digits long) to be parsed if they are entered
// as "15" etc, but only if there is no punctuation in them. The second expression restricts the
// number of digits to three or more, but then allows them to be in international form, and to
// have alpha-characters and punctuation.
//
// Note VALID_PUNCTUATION starts with a -, so must be the first in the range.
private static final String VALID_PHONE_NUMBER =
DIGITS + "{" + MIN_LENGTH_FOR_NSN + "}" + "|"
+ "[" + PLUS_CHARS + "]*+(?:[" + VALID_PUNCTUATION + STAR_SIGN + "]*" + DIGITS + "){3,}["
+ VALID_PUNCTUATION + STAR_SIGN + VALID_ALPHA + DIGITS + "]*";
// Default extension prefix to use when formatting. This will be put in front of any extension
// component of the number, after the main national number is formatted. For example, if you wish
// the default extension formatting to be " extn: 3456", then you should specify " extn: " here
// as the default extension prefix. This can be overridden by region-specific preferences.
private static final String DEFAULT_EXTN_PREFIX = " ext. ";
// Pattern to capture digits used in an extension. Places a maximum length of "7" for an
// extension.
private static final String CAPTURING_EXTN_DIGITS = "(" + DIGITS + "{1,7})";
// Regexp of all possible ways to write extensions, for use when parsing. This will be run as a
// case-insensitive regexp match. Wide character versions are also provided after each ASCII
// version.
private static final String EXTN_PATTERNS_FOR_PARSING;
static final String EXTN_PATTERNS_FOR_MATCHING;
static {
// One-character symbols that can be used to indicate an extension.
String singleExtnSymbolsForMatching = "x\uFF58#\uFF03~\uFF5E";
// For parsing, we are slightly more lenient in our interpretation than for matching. Here we
// allow "comma" and "semicolon" as possible extension indicators. When matching, these are
// hardly ever used to indicate this.
String singleExtnSymbolsForParsing = ",;" + singleExtnSymbolsForMatching;
EXTN_PATTERNS_FOR_PARSING = createExtnPattern(singleExtnSymbolsForParsing);
EXTN_PATTERNS_FOR_MATCHING = createExtnPattern(singleExtnSymbolsForMatching);
}
/**
* Helper initialiser method to create the regular-expression pattern to match extensions,
* allowing the one-char extension symbols provided by {@code singleExtnSymbols}.
*/
private static String createExtnPattern(String singleExtnSymbols) {
// There are three regular expressions here. The first covers RFC 3966 format, where the
// extension is added using ";ext=". The second more generic one starts with optional white
// space and ends with an optional full stop (.), followed by zero or more spaces/tabs/commas
// and then the numbers themselves. The other one covers the special case of American numbers
// where the extension is written with a hash at the end, such as "- 503#"
// Note that the only capturing groups should be around the digits that you want to capture as
// part of the extension, or else parsing will fail!
// Canonical-equivalence doesn't seem to be an option with Android java, so we allow two options
// for representing the accented o - the character itself, and one in the unicode decomposed
// form with the combining acute accent.
return (RFC3966_EXTN_PREFIX + CAPTURING_EXTN_DIGITS + "|" + "[ \u00A0\\t,]*"
+ "(?:e?xt(?:ensi(?:o\u0301?|\u00F3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|"
+ "\u0434\u043E\u0431|" + "[" + singleExtnSymbols + "]|int|anexo|\uFF49\uFF4E\uFF54)"
+ "[:\\.\uFF0E]?[ \u00A0\\t,-]*" + CAPTURING_EXTN_DIGITS + "#?|"
+ "[- ]+(" + DIGITS + "{1,5})#");
}
// Regexp of all known extension prefixes used by different regions followed by 1 or more valid
// digits, for use when parsing.
private static final Pattern EXTN_PATTERN =
Pattern.compile("(?:" + EXTN_PATTERNS_FOR_PARSING + ")$", REGEX_FLAGS);
// We append optionally the extension pattern to the end here, as a valid phone number may
// have an extension prefix appended, followed by 1 or more digits.
private static final Pattern VALID_PHONE_NUMBER_PATTERN =
Pattern.compile(VALID_PHONE_NUMBER + "(?:" + EXTN_PATTERNS_FOR_PARSING + ")?", REGEX_FLAGS);
static final Pattern NON_DIGITS_PATTERN = Pattern.compile("(\\D+)");
// The FIRST_GROUP_PATTERN was originally set to $1 but there are some countries for which the
// first group is not used in the national pattern (e.g. Argentina) so the $1 group does not match
// correctly. Therefore, we use \d, so that the first group actually used in the pattern will be
// matched.
private static final Pattern FIRST_GROUP_PATTERN = Pattern.compile("(\\$\\d)");
// Constants used in the formatting rules to represent the national prefix, first group and
// carrier code respectively.
private static final String NP_STRING = "$NP";
private static final String FG_STRING = "$FG";
private static final String CC_STRING = "$CC";
// A pattern that is used to determine if the national prefix formatting rule has the first group
// only, i.e., does not start with the national prefix. Note that the pattern explicitly allows
// for unbalanced parentheses.
private static final Pattern FIRST_GROUP_ONLY_PREFIX_PATTERN = Pattern.compile("\\(?\\$1\\)?");
private static PhoneNumberUtil instance = null;
public static final String REGION_CODE_FOR_NON_GEO_ENTITY = "001";
/**
* INTERNATIONAL and NATIONAL formats are consistent with the definition in ITU-T Recommendation
* E.123. However we follow local conventions such as using '-' instead of whitespace as
* separators. For example, the number of the Google Switzerland office will be written as
* "+41 44 668 1800" in INTERNATIONAL format, and as "044 668 1800" in NATIONAL format. E164
* format is as per INTERNATIONAL format but with no formatting applied, e.g. "+41446681800".
* RFC3966 is as per INTERNATIONAL format, but with all spaces and other separating symbols
* replaced with a hyphen, and with any phone number extension appended with ";ext=". It also
* will have a prefix of "tel:" added, e.g. "tel:+41-44-668-1800".
*
* Note: If you are considering storing the number in a neutral format, you are highly advised to
* use the PhoneNumber class.
*/
public enum PhoneNumberFormat {
E164,
INTERNATIONAL,
NATIONAL,
RFC3966
}
/**
* Type of phone numbers.
*/
public enum PhoneNumberType {
FIXED_LINE,
MOBILE,
// In some regions (e.g. the USA), it is impossible to distinguish between fixed-line and
// mobile numbers by looking at the phone number itself.
FIXED_LINE_OR_MOBILE,
// Freephone lines
TOLL_FREE,
PREMIUM_RATE,
// The cost of this call is shared between the caller and the recipient, and is hence typically
// less than PREMIUM_RATE calls. See // http://en.wikipedia.org/wiki/Shared_Cost_Service for
// more information.
SHARED_COST,
// Voice over IP numbers. This includes TSoIP (Telephony Service over IP).
VOIP,
// A personal number is associated with a particular person, and may be routed to either a
// MOBILE or FIXED_LINE number. Some more information can be found here:
// http://en.wikipedia.org/wiki/Personal_Numbers
PERSONAL_NUMBER,
PAGER,
// Used for "Universal Access Numbers" or "Company Numbers". They may be further routed to
// specific offices, but allow one number to be used for a company.
UAN,
// Used for "Voice Mail Access Numbers".
VOICEMAIL,
// A phone number is of type UNKNOWN when it does not fit any of the known patterns for a
// specific region.
UNKNOWN
}
/**
* Types of phone number matches. See detailed description beside the isNumberMatch() method.
*/
public enum MatchType {
NOT_A_NUMBER,
NO_MATCH,
SHORT_NSN_MATCH,
NSN_MATCH,
EXACT_MATCH,
}
/**
* Possible outcomes when testing if a PhoneNumber is possible.
*/
public enum ValidationResult {
/** The number length matches that of valid numbers for this region. */
IS_POSSIBLE,
/**
* The number length matches that of local numbers for this region only (i.e. numbers that may
* be able to be dialled within an area, but do not have all the information to be dialled from
* anywhere inside or outside the country).
*/
IS_POSSIBLE_LOCAL_ONLY,
/** The number has an invalid country calling code. */
INVALID_COUNTRY_CODE,
/** The number is shorter than all valid numbers for this region. */
TOO_SHORT,
/**
* The number is longer than the shortest valid numbers for this region, shorter than the
* longest valid numbers for this region, and does not itself have a number length that matches
* valid numbers for this region. This can also be returned in the case where
* isPossibleNumberForTypeWithReason was called, and there are no numbers of this type at all
* for this region.
*/
INVALID_LENGTH,
/** The number is longer than all valid numbers for this region. */
TOO_LONG,
}
/**
* Leniency when {@linkplain PhoneNumberUtil#findNumbers finding} potential phone numbers in text
* segments. The levels here are ordered in increasing strictness.
*/
public enum Leniency {
/**
* Phone numbers accepted are {@linkplain PhoneNumberUtil#isPossibleNumber(PhoneNumber)
* possible}, but not necessarily {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid}.
*/
POSSIBLE {
@Override
boolean verify(
PhoneNumber number,
CharSequence candidate,
PhoneNumberUtil util,
PhoneNumberMatcher matcher) {
return util.isPossibleNumber(number);
}
},
/**
* Phone numbers accepted are {@linkplain PhoneNumberUtil#isPossibleNumber(PhoneNumber)
* possible} and {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid}. Numbers written
* in national format must have their national-prefix present if it is usually written for a
* number of this type.
*/
VALID {
@Override
boolean verify(
PhoneNumber number,
CharSequence candidate,
PhoneNumberUtil util,
PhoneNumberMatcher matcher) {
if (!util.isValidNumber(number)
|| !PhoneNumberMatcher.containsOnlyValidXChars(number, candidate.toString(), util)) {
return false;
}
return PhoneNumberMatcher.isNationalPrefixPresentIfRequired(number, util);
}
},
/**
* Phone numbers accepted are {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid} and
* are grouped in a possible way for this locale. For example, a US number written as
* "65 02 53 00 00" and "650253 0000" are not accepted at this leniency level, whereas
* "650 253 0000", "650 2530000" or "6502530000" are.
* Numbers with more than one '/' symbol in the national significant number are also dropped at
* this level.
* <p>
* Warning: This level might result in lower coverage especially for regions outside of country
* code "+1". If you are not sure about which level to use, email the discussion group
* libphonenumber-discuss@googlegroups.com.
*/
STRICT_GROUPING {
@Override
boolean verify(
PhoneNumber number,
CharSequence candidate,
PhoneNumberUtil util,
PhoneNumberMatcher matcher) {
String candidateString = candidate.toString();
if (!util.isValidNumber(number)
|| !PhoneNumberMatcher.containsOnlyValidXChars(number, candidateString, util)
|| PhoneNumberMatcher.containsMoreThanOneSlashInNationalNumber(number, candidateString)
|| !PhoneNumberMatcher.isNationalPrefixPresentIfRequired(number, util)) {
return false;
}
return matcher.checkNumberGroupingIsValid(
number, candidate, util, new PhoneNumberMatcher.NumberGroupingChecker() {
@Override
public boolean checkGroups(PhoneNumberUtil util, PhoneNumber number,
StringBuilder normalizedCandidate,
String[] expectedNumberGroups) {
return PhoneNumberMatcher.allNumberGroupsRemainGrouped(
util, number, normalizedCandidate, expectedNumberGroups);
}
});
}
},
/**
* Phone numbers accepted are {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid} and
* are grouped in the same way that we would have formatted it, or as a single block. For
* example, a US number written as "650 2530000" is not accepted at this leniency level, whereas
* "650 253 0000" or "6502530000" are.
* Numbers with more than one '/' symbol are also dropped at this level.
* <p>
* Warning: This level might result in lower coverage especially for regions outside of country
* code "+1". If you are not sure about which level to use, email the discussion group
* libphonenumber-discuss@googlegroups.com.
*/
EXACT_GROUPING {
@Override
boolean verify(
PhoneNumber number,
CharSequence candidate,
PhoneNumberUtil util,
PhoneNumberMatcher matcher) {
String candidateString = candidate.toString();
if (!util.isValidNumber(number)
|| !PhoneNumberMatcher.containsOnlyValidXChars(number, candidateString, util)
|| PhoneNumberMatcher.containsMoreThanOneSlashInNationalNumber(number, candidateString)
|| !PhoneNumberMatcher.isNationalPrefixPresentIfRequired(number, util)) {
return false;
}
return matcher.checkNumberGroupingIsValid(
number, candidate, util, new PhoneNumberMatcher.NumberGroupingChecker() {
@Override
public boolean checkGroups(PhoneNumberUtil util, PhoneNumber number,
StringBuilder normalizedCandidate,
String[] expectedNumberGroups) {
return PhoneNumberMatcher.allNumberGroupsAreExactlyPresent(
util, number, normalizedCandidate, expectedNumberGroups);
}
});
}
};
/** Returns true if {@code number} is a verified number according to this leniency. */
abstract boolean verify(
PhoneNumber number,
CharSequence candidate,
PhoneNumberUtil util,
PhoneNumberMatcher matcher);
}
// A source of metadata for different regions.
private final MetadataSource metadataSource;
// A mapping from a country calling code to the region codes which denote the region represented
// by that country calling code. In the case of multiple regions sharing a calling code, such as
// the NANPA regions, the one indicated with "isMainCountryForCode" in the metadata should be
// first.
private final Map<Integer, List<String>> countryCallingCodeToRegionCodeMap;
// An API for validation checking.
private final MatcherApi matcherApi = RegexBasedMatcher.create();
// The set of regions that share country calling code 1.
// There are roughly 26 regions.
// We set the initial capacity of the HashSet to 35 to offer a load factor of roughly 0.75.
private final Set<String> nanpaRegions = new HashSet<String>(35);
// A cache for frequently used region-specific regular expressions.
// The initial capacity is set to 100 as this seems to be an optimal value for Android, based on
// performance measurements.
private final RegexCache regexCache = new RegexCache(100);
// The set of regions the library supports.
// There are roughly 240 of them and we set the initial capacity of the HashSet to 320 to offer a
// load factor of roughly 0.75.
private final Set<String> supportedRegions = new HashSet<String>(320);
// The set of country calling codes that map to the non-geo entity region ("001"). This set
// currently contains < 12 elements so the default capacity of 16 (load factor=0.75) is fine.
private final Set<Integer> countryCodesForNonGeographicalRegion = new HashSet<Integer>();
/**
* This class implements a singleton, the constructor is only visible to facilitate testing.
*/
// @VisibleForTesting
PhoneNumberUtil(MetadataSource metadataSource,
Map<Integer, List<String>> countryCallingCodeToRegionCodeMap) {
this.metadataSource = metadataSource;
this.countryCallingCodeToRegionCodeMap = countryCallingCodeToRegionCodeMap;
for (Map.Entry<Integer, List<String>> entry : countryCallingCodeToRegionCodeMap.entrySet()) {
List<String> regionCodes = entry.getValue();
// We can assume that if the country calling code maps to the non-geo entity region code then
// that's the only region code it maps to.
if (regionCodes.size() == 1 && REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCodes.get(0))) {
// This is the subset of all country codes that map to the non-geo entity region code.
countryCodesForNonGeographicalRegion.add(entry.getKey());
} else {
// The supported regions set does not include the "001" non-geo entity region code.
supportedRegions.addAll(regionCodes);
}
}
// If the non-geo entity still got added to the set of supported regions it must be because
// there are entries that list the non-geo entity alongside normal regions (which is wrong).
// If we discover this, remove the non-geo entity from the set of supported regions and log.
if (supportedRegions.remove(REGION_CODE_FOR_NON_GEO_ENTITY)) {
logger.log(Level.WARNING, "invalid metadata (country calling code was mapped to the non-geo "
+ "entity as well as specific region(s))");
}
nanpaRegions.addAll(countryCallingCodeToRegionCodeMap.get(NANPA_COUNTRY_CODE));
}
/**
* Attempts to extract a possible number from the string passed in. This currently strips all
* leading characters that cannot be used to start a phone number. Characters that can be used to
* start a phone number are defined in the VALID_START_CHAR_PATTERN. If none of these characters
* are found in the number passed in, an empty string is returned. This function also attempts to
* strip off any alternative extensions or endings if two or more are present, such as in the case
* of: (530) 583-6985 x302/x2303. The second extension here makes this actually two phone numbers,
* (530) 583-6985 x302 and (530) 583-6985 x2303. We remove the second extension so that the first
* number is parsed correctly.
*
* @param number the string that might contain a phone number
* @return the number, stripped of any non-phone-number prefix (such as "Tel:") or an empty
* string if no character used to start phone numbers (such as + or any digit) is found in the
* number
*/
static CharSequence extractPossibleNumber(CharSequence number) {
Matcher m = VALID_START_CHAR_PATTERN.matcher(number);
if (m.find()) {
number = number.subSequence(m.start(), number.length());
// Remove trailing non-alpha non-numerical characters.
Matcher trailingCharsMatcher = UNWANTED_END_CHAR_PATTERN.matcher(number);
if (trailingCharsMatcher.find()) {
number = number.subSequence(0, trailingCharsMatcher.start());
}
// Check for extra numbers at the end.
Matcher secondNumber = SECOND_NUMBER_START_PATTERN.matcher(number);
if (secondNumber.find()) {
number = number.subSequence(0, secondNumber.start());
}
return number;
} else {
return "";
}
}
/**
* Checks to see if the string of characters could possibly be a phone number at all. At the
* moment, checks to see that the string begins with at least 2 digits, ignoring any punctuation
* commonly found in phone numbers.
* This method does not require the number to be normalized in advance - but does assume that
* leading non-number symbols have been removed, such as by the method extractPossibleNumber.
*
* @param number string to be checked for viability as a phone number
* @return true if the number could be a phone number of some sort, otherwise false
*/
// @VisibleForTesting
static boolean isViablePhoneNumber(CharSequence number) {
if (number.length() < MIN_LENGTH_FOR_NSN) {
return false;
}
Matcher m = VALID_PHONE_NUMBER_PATTERN.matcher(number);
return m.matches();
}
/**
* Normalizes a string of characters representing a phone number. This performs the following
* conversions:
* - Punctuation is stripped.
* For ALPHA/VANITY numbers:
* - Letters are converted to their numeric representation on a telephone keypad. The keypad
* used here is the one defined in ITU Recommendation E.161. This is only done if there are 3
* or more letters in the number, to lessen the risk that such letters are typos.
* For other numbers:
* - Wide-ascii digits are converted to normal ASCII (European) digits.
* - Arabic-Indic numerals are converted to European numerals.
* - Spurious alpha characters are stripped.
*
* @param number a StringBuilder of characters representing a phone number that will be
* normalized in place
*/
static StringBuilder normalize(StringBuilder number) {
Matcher m = VALID_ALPHA_PHONE_PATTERN.matcher(number);
if (m.matches()) {
number.replace(0, number.length(), normalizeHelper(number, ALPHA_PHONE_MAPPINGS, true));
} else {
number.replace(0, number.length(), normalizeDigitsOnly(number));
}
return number;
}
/**
* Normalizes a string of characters representing a phone number. This converts wide-ascii and
* arabic-indic numerals to European numerals, and strips punctuation and alpha characters.
*
* @param number a string of characters representing a phone number
* @return the normalized string version of the phone number
*/
public static String normalizeDigitsOnly(CharSequence number) {
return normalizeDigits(number, false /* strip non-digits */).toString();
}
static StringBuilder normalizeDigits(CharSequence number, boolean keepNonDigits) {
StringBuilder normalizedDigits = new StringBuilder(number.length());
for (int i = 0; i < number.length(); i++) {
char c = number.charAt(i);
int digit = Character.digit(c, 10);
if (digit != -1) {
normalizedDigits.append(digit);
} else if (keepNonDigits) {
normalizedDigits.append(c);
}
}
return normalizedDigits;
}
/**
* Normalizes a string of characters representing a phone number. This strips all characters which
* are not diallable on a mobile phone keypad (including all non-ASCII digits).
*
* @param number a string of characters representing a phone number
* @return the normalized string version of the phone number
*/
public static String normalizeDiallableCharsOnly(CharSequence number) {
return normalizeHelper(number, DIALLABLE_CHAR_MAPPINGS, true /* remove non matches */);
}
/**
* Converts all alpha characters in a number to their respective digits on a keypad, but retains
* existing formatting.
*/
public static String convertAlphaCharactersInNumber(CharSequence number) {
return normalizeHelper(number, ALPHA_PHONE_MAPPINGS, false);
}
/**
* Gets the length of the geographical area code from the
* PhoneNumber object passed in, so that clients could use it
* to split a national significant number into geographical area code and subscriber number. It
* works in such a way that the resultant subscriber number should be diallable, at least on some
* devices. An example of how this could be used:
*
* <pre>{@code
* PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
* PhoneNumber number = phoneUtil.parse("16502530000", "US");
* String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
* String areaCode;
* String subscriberNumber;
*
* int areaCodeLength = phoneUtil.getLengthOfGeographicalAreaCode(number);
* if (areaCodeLength > 0) {
* areaCode = nationalSignificantNumber.substring(0, areaCodeLength);
* subscriberNumber = nationalSignificantNumber.substring(areaCodeLength);
* } else {
* areaCode = "";
* subscriberNumber = nationalSignificantNumber;
* }
* }</pre>
*
* N.B.: area code is a very ambiguous concept, so the I18N team generally recommends against
* using it for most purposes, but recommends using the more general {@code national_number}
* instead. Read the following carefully before deciding to use this method:
* <ul>
* <li> geographical area codes change over time, and this method honors those changes;
* therefore, it doesn't guarantee the stability of the result it produces.
* <li> subscriber numbers may not be diallable from all devices (notably mobile devices, which
* typically requires the full national_number to be dialled in most regions).
* <li> most non-geographical numbers have no area codes, including numbers from non-geographical
* entities
* <li> some geographical numbers have no area codes.
* </ul>
* @param number the PhoneNumber object for which clients
* want to know the length of the area code
* @return the length of area code of the PhoneNumber object
* passed in
*/
public int getLengthOfGeographicalAreaCode(PhoneNumber number) {
PhoneMetadata metadata = getMetadataForRegion(getRegionCodeForNumber(number));
if (metadata == null) {
return 0;
}
// If a country doesn't use a national prefix, and this number doesn't have an Italian leading
// zero, we assume it is a closed dialling plan with no area codes.
if (!metadata.hasNationalPrefix() && !number.isItalianLeadingZero()) {
return 0;
}
PhoneNumberType type = getNumberType(number);
int countryCallingCode = number.getCountryCode();
if (type == PhoneNumberType.MOBILE
// Note this is a rough heuristic; it doesn't cover Indonesia well, for example, where area
// codes are present for some mobile phones but not for others. We have no better way of
// representing this in the metadata at this point.
&& GEO_MOBILE_COUNTRIES_WITHOUT_MOBILE_AREA_CODES.contains(countryCallingCode)) {
return 0;
}
if (!isNumberGeographical(type, countryCallingCode)) {
return 0;
}
return getLengthOfNationalDestinationCode(number);
}
/**
* Gets the length of the national destination code (NDC) from the
* PhoneNumber object passed in, so that clients could use it
* to split a national significant number into NDC and subscriber number. The NDC of a phone
* number is normally the first group of digit(s) right after the country calling code when the
* number is formatted in the international format, if there is a subscriber number part that
* follows.
*
* N.B.: similar to an area code, not all numbers have an NDC!
*
* An example of how this could be used:
*
* <pre>{@code
* PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
* PhoneNumber number = phoneUtil.parse("18002530000", "US");
* String nationalSignificantNumber = phoneUtil.getNationalSignificantNumber(number);
* String nationalDestinationCode;
* String subscriberNumber;
*
* int nationalDestinationCodeLength = phoneUtil.getLengthOfNationalDestinationCode(number);
* if (nationalDestinationCodeLength > 0) {
* nationalDestinationCode = nationalSignificantNumber.substring(0,
* nationalDestinationCodeLength);
* subscriberNumber = nationalSignificantNumber.substring(nationalDestinationCodeLength);
* } else {
* nationalDestinationCode = "";
* subscriberNumber = nationalSignificantNumber;
* }
* }</pre>
*
* Refer to the unittests to see the difference between this function and
* {@link #getLengthOfGeographicalAreaCode}.
*
* @param number the PhoneNumber object for which clients
* want to know the length of the NDC
* @return the length of NDC of the PhoneNumber object
* passed in, which could be zero
*/
public int getLengthOfNationalDestinationCode(PhoneNumber number) {
PhoneNumber copiedProto;
if (number.hasExtension()) {
// We don't want to alter the proto given to us, but we don't want to include the extension
// when we format it, so we copy it and clear the extension here.
copiedProto = new PhoneNumber();
copiedProto.mergeFrom(number);
copiedProto.clearExtension();
} else {
copiedProto = number;
}
String nationalSignificantNumber = format(copiedProto,
PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL);
String[] numberGroups = NON_DIGITS_PATTERN.split(nationalSignificantNumber);
// The pattern will start with "+COUNTRY_CODE " so the first group will always be the empty
// string (before the + symbol) and the second group will be the country calling code. The third
// group will be area code if it is not the last group.
if (numberGroups.length <= 3) {
return 0;
}
if (getNumberType(number) == PhoneNumberType.MOBILE) {
// For example Argentinian mobile numbers, when formatted in the international format, are in
// the form of +54 9 NDC XXXX.... As a result, we take the length of the third group (NDC) and
// add the length of the second group (which is the mobile token), which also forms part of
// the national significant number. This assumes that the mobile token is always formatted
// separately from the rest of the phone number.
String mobileToken = getCountryMobileToken(number.getCountryCode());
if (!mobileToken.equals("")) {
return numberGroups[2].length() + numberGroups[3].length();
}
}
return numberGroups[2].length();
}
/**
* Returns the mobile token for the provided country calling code if it has one, otherwise
* returns an empty string. A mobile token is a number inserted before the area code when dialing
* a mobile number from that country from abroad.
*
* @param countryCallingCode the country calling code for which we want the mobile token
* @return the mobile token, as a string, for the given country calling code
*/
public static String getCountryMobileToken(int countryCallingCode) {
if (MOBILE_TOKEN_MAPPINGS.containsKey(countryCallingCode)) {
return MOBILE_TOKEN_MAPPINGS.get(countryCallingCode);
}
return "";
}
/**
* Normalizes a string of characters representing a phone number by replacing all characters found
* in the accompanying map with the values therein, and stripping all other characters if
* removeNonMatches is true.
*
* @param number a string of characters representing a phone number
* @param normalizationReplacements a mapping of characters to what they should be replaced by in
* the normalized version of the phone number
* @param removeNonMatches indicates whether characters that are not able to be replaced should
* be stripped from the number. If this is false, they will be left unchanged in the number.
* @return the normalized string version of the phone number
*/
private static String normalizeHelper(CharSequence number,
Map<Character, Character> normalizationReplacements,
boolean removeNonMatches) {
StringBuilder normalizedNumber = new StringBuilder(number.length());
for (int i = 0; i < number.length(); i++) {
char character = number.charAt(i);
Character newDigit = normalizationReplacements.get(Character.toUpperCase(character));
if (newDigit != null) {
normalizedNumber.append(newDigit);
} else if (!removeNonMatches) {
normalizedNumber.append(character);
}
// If neither of the above are true, we remove this character.
}
return normalizedNumber.toString();
}
/**
* Sets or resets the PhoneNumberUtil singleton instance. If set to null, the next call to
* {@code getInstance()} will load (and return) the default instance.
*/
// @VisibleForTesting
static synchronized void setInstance(PhoneNumberUtil util) {
instance = util;
}
/**
* Returns all regions the library has metadata for.
*
* @return an unordered set of the two-letter region codes for every geographical region the
* library supports
*/
public Set<String> getSupportedRegions() {
return Collections.unmodifiableSet(supportedRegions);
}
/**
* Returns all global network calling codes the library has metadata for.
*
* @return an unordered set of the country calling codes for every non-geographical entity the
* library supports
*/
public Set<Integer> getSupportedGlobalNetworkCallingCodes() {
return Collections.unmodifiableSet(countryCodesForNonGeographicalRegion);
}
/**
* Returns all country calling codes the library has metadata for, covering both non-geographical
* entities (global network calling codes) and those used for geographical entities. This could be
* used to populate a drop-down box of country calling codes for a phone-number widget, for
* instance.
*
* @return an unordered set of the country calling codes for every geographical and
* non-geographical entity the library supports
*/
public Set<Integer> getSupportedCallingCodes() {
return Collections.unmodifiableSet(countryCallingCodeToRegionCodeMap.keySet());
}
/**
* Returns true if there is any possible number data set for a particular PhoneNumberDesc.
*/
private static boolean descHasPossibleNumberData(PhoneNumberDesc desc) {
// If this is empty, it means numbers of this type inherit from the "general desc" -> the value
// "-1" means that no numbers exist for this type.
return desc.getPossibleLengthCount() != 1 || desc.getPossibleLength(0) != -1;
}
// Note: descHasData must account for any of MetadataFilter's excludableChildFields potentially
// being absent from the metadata. It must check them all. For any changes in descHasData, ensure
// that all the excludableChildFields are still being checked. If your change is safe simply
// mention why during a review without needing to change MetadataFilter.
/**
* Returns true if there is any data set for a particular PhoneNumberDesc.
*/
private static boolean descHasData(PhoneNumberDesc desc) {
// Checking most properties since we don't know what's present, since a custom build may have
// stripped just one of them (e.g. liteBuild strips exampleNumber). We don't bother checking the
// possibleLengthsLocalOnly, since if this is the only thing that's present we don't really
// support the type at all: no type-specific methods will work with only this data.
return desc.hasExampleNumber()
|| descHasPossibleNumberData(desc)
|| desc.hasNationalNumberPattern();
}
/**
* Returns the types we have metadata for based on the PhoneMetadata object passed in, which must
* be non-null.
*/
private Set<PhoneNumberType> getSupportedTypesForMetadata(PhoneMetadata metadata) {
Set<PhoneNumberType> types = new TreeSet<PhoneNumberType>();
for (PhoneNumberType type : PhoneNumberType.values()) {
if (type == PhoneNumberType.FIXED_LINE_OR_MOBILE || type == PhoneNumberType.UNKNOWN) {
// Never return FIXED_LINE_OR_MOBILE (it is a convenience type, and represents that a
// particular number type can't be determined) or UNKNOWN (the non-type).
continue;
}
if (descHasData(getNumberDescByType(metadata, type))) {
types.add(type);
}
}
return Collections.unmodifiableSet(types);
}
/**
* Returns the types for a given region which the library has metadata for. Will not include
* FIXED_LINE_OR_MOBILE (if numbers in this region could be classified as FIXED_LINE_OR_MOBILE,
* both FIXED_LINE and MOBILE would be present) and UNKNOWN.
*
* No types will be returned for invalid or unknown region codes.
*/
public Set<PhoneNumberType> getSupportedTypesForRegion(String regionCode) {
if (!isValidRegionCode(regionCode)) {
logger.log(Level.WARNING, "Invalid or unknown region code provided: " + regionCode);
return Collections.unmodifiableSet(new TreeSet<PhoneNumberType>());
}
PhoneMetadata metadata = getMetadataForRegion(regionCode);
return getSupportedTypesForMetadata(metadata);
}
/**
* Returns the types for a country-code belonging to a non-geographical entity which the library
* has metadata for. Will not include FIXED_LINE_OR_MOBILE (if numbers for this non-geographical
* entity could be classified as FIXED_LINE_OR_MOBILE, both FIXED_LINE and MOBILE would be
* present) and UNKNOWN.
*
* No types will be returned for country calling codes that do not map to a known non-geographical
* entity.
*/
public Set<PhoneNumberType> getSupportedTypesForNonGeoEntity(int countryCallingCode) {
PhoneMetadata metadata = getMetadataForNonGeographicalRegion(countryCallingCode);
if (metadata == null) {
logger.log(Level.WARNING, "Unknown country calling code for a non-geographical entity "
+ "provided: " + countryCallingCode);
return Collections.unmodifiableSet(new TreeSet<PhoneNumberType>());
}
return getSupportedTypesForMetadata(metadata);
}
/**
* Gets a {@link PhoneNumberUtil} instance to carry out international phone number formatting,
* parsing, or validation. The instance is loaded with all phone number metadata.
*
* <p>The {@link PhoneNumberUtil} is implemented as a singleton. Therefore, calling getInstance
* multiple times will only result in one instance being created.
*
* @return a PhoneNumberUtil instance
*/
public static synchronized PhoneNumberUtil getInstance() {
if (instance == null) {
setInstance(createInstance(MetadataManager.DEFAULT_METADATA_LOADER));
}
return instance;
}
/**
* Create a new {@link PhoneNumberUtil} instance to carry out international phone number
* formatting, parsing, or validation. The instance is loaded with all metadata by
* using the metadataLoader specified.
*
* <p>This method should only be used in the rare case in which you want to manage your own
* metadata loading. Calling this method multiple times is very expensive, as each time
* a new instance is created from scratch. When in doubt, use {@link #getInstance}.
*
* @param metadataLoader customized metadata loader. This should not be null
* @return a PhoneNumberUtil instance
*/
public static PhoneNumberUtil createInstance(MetadataLoader metadataLoader) {
if (metadataLoader == null) {
throw new IllegalArgumentException("metadataLoader could not be null.");
}
return createInstance(new MultiFileMetadataSourceImpl(metadataLoader));
}
/**
* Create a new {@link PhoneNumberUtil} instance to carry out international phone number
* formatting, parsing, or validation. The instance is loaded with all metadata by
* using the metadataSource specified.
*
* <p>This method should only be used in the rare case in which you want to manage your own
* metadata loading. Calling this method multiple times is very expensive, as each time
* a new instance is created from scratch. When in doubt, use {@link #getInstance}.
*
* @param metadataSource customized metadata source. This should not be null
* @return a PhoneNumberUtil instance
*/
private static PhoneNumberUtil createInstance(MetadataSource metadataSource) {
if (metadataSource == null) {
throw new IllegalArgumentException("metadataSource could not be null.");
}
return new PhoneNumberUtil(metadataSource,
CountryCodeToRegionCodeMap.getCountryCodeToRegionCodeMap());
}
/**
* Helper function to check if the national prefix formatting rule has the first group only, i.e.,
* does not start with the national prefix.
*/
static boolean formattingRuleHasFirstGroupOnly(String nationalPrefixFormattingRule) {
return nationalPrefixFormattingRule.length() == 0
|| FIRST_GROUP_ONLY_PREFIX_PATTERN.matcher(nationalPrefixFormattingRule).matches();
}
/**
* Tests whether a phone number has a geographical association. It checks if the number is
* associated with a certain region in the country to which it belongs. Note that this doesn't
* verify if the number is actually in use.
*/
public boolean isNumberGeographical(PhoneNumber phoneNumber) {
return isNumberGeographical(getNumberType(phoneNumber), phoneNumber.getCountryCode());
}
/**
* Overload of isNumberGeographical(PhoneNumber), since calculating the phone number type is
* expensive; if we have already done this, we don't want to do it again.
*/
public boolean isNumberGeographical(PhoneNumberType phoneNumberType, int countryCallingCode) {
return phoneNumberType == PhoneNumberType.FIXED_LINE
|| phoneNumberType == PhoneNumberType.FIXED_LINE_OR_MOBILE
|| (GEO_MOBILE_COUNTRIES.contains(countryCallingCode)
&& phoneNumberType == PhoneNumberType.MOBILE);
}
/**
* Helper function to check region code is not unknown or null.
*/
private boolean isValidRegionCode(String regionCode) {
return regionCode != null && supportedRegions.contains(regionCode);
}
/**
* Helper function to check the country calling code is valid.
*/
private boolean hasValidCountryCallingCode(int countryCallingCode) {
return countryCallingCodeToRegionCodeMap.containsKey(countryCallingCode);
}
/**
* Formats a phone number in the specified format using default rules. Note that this does not
* promise to produce a phone number that the user can dial from where they are - although we do
* format in either 'national' or 'international' format depending on what the client asks for, we
* do not currently support a more abbreviated format, such as for users in the same "area" who
* could potentially dial the number without area code. Note that if the phone number has a
* country calling code of 0 or an otherwise invalid country calling code, we cannot work out
* which formatting rules to apply so we return the national significant number with no formatting
* applied.
*
* @param number the phone number to be formatted
* @param numberFormat the format the phone number should be formatted into
* @return the formatted phone number
*/
public String format(PhoneNumber number, PhoneNumberFormat numberFormat) {
if (number.getNationalNumber() == 0 && number.hasRawInput()) {
// Unparseable numbers that kept their raw input just use that.
// This is the only case where a number can be formatted as E164 without a
// leading '+' symbol (but the original number wasn't parseable anyway).
// TODO: Consider removing the 'if' above so that unparseable
// strings without raw input format to the empty string instead of "+00".
String rawInput = number.getRawInput();
if (rawInput.length() > 0) {
return rawInput;
}
}
StringBuilder formattedNumber = new StringBuilder(20);
format(number, numberFormat, formattedNumber);
return formattedNumber.toString();
}
/**
* Same as {@link #format(PhoneNumber, PhoneNumberFormat)}, but accepts a mutable StringBuilder as
* a parameter to decrease object creation when invoked many times.
*/
public void format(PhoneNumber number, PhoneNumberFormat numberFormat,
StringBuilder formattedNumber) {
// Clear the StringBuilder first.
formattedNumber.setLength(0);
int countryCallingCode = number.getCountryCode();
String nationalSignificantNumber = getNationalSignificantNumber(number);
if (numberFormat == PhoneNumberFormat.E164) {
// Early exit for E164 case (even if the country calling code is invalid) since no formatting
// of the national number needs to be applied. Extensions are not formatted.
formattedNumber.append(nationalSignificantNumber);
prefixNumberWithCountryCallingCode(countryCallingCode, PhoneNumberFormat.E164,
formattedNumber);
return;
}
if (!hasValidCountryCallingCode(countryCallingCode)) {
formattedNumber.append(nationalSignificantNumber);
return;
}
// Note getRegionCodeForCountryCode() is used because formatting information for regions which
// share a country calling code is contained by only one region for performance reasons. For
// example, for NANPA regions it will be contained in the metadata for US.
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid (which means that the
// region code cannot be ZZ and must be one of our supported region codes).
PhoneMetadata metadata =
getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
formattedNumber.append(formatNsn(nationalSignificantNumber, metadata, numberFormat));
maybeAppendFormattedExtension(number, metadata, numberFormat, formattedNumber);
prefixNumberWithCountryCallingCode(countryCallingCode, numberFormat, formattedNumber);
}
/**
* Formats a phone number in the specified format using client-defined formatting rules. Note that
* if the phone number has a country calling code of zero or an otherwise invalid country calling
* code, we cannot work out things like whether there should be a national prefix applied, or how
* to format extensions, so we return the national significant number with no formatting applied.
*
* @param number the phone number to be formatted
* @param numberFormat the format the phone number should be formatted into
* @param userDefinedFormats formatting rules specified by clients
* @return the formatted phone number
*/
public String formatByPattern(PhoneNumber number,
PhoneNumberFormat numberFormat,
List<NumberFormat> userDefinedFormats) {
int countryCallingCode = number.getCountryCode();
String nationalSignificantNumber = getNationalSignificantNumber(number);
if (!hasValidCountryCallingCode(countryCallingCode)) {
return nationalSignificantNumber;
}
// Note getRegionCodeForCountryCode() is used because formatting information for regions which
// share a country calling code is contained by only one region for performance reasons. For
// example, for NANPA regions it will be contained in the metadata for US.
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
PhoneMetadata metadata =
getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
StringBuilder formattedNumber = new StringBuilder(20);
NumberFormat formattingPattern =
chooseFormattingPatternForNumber(userDefinedFormats, nationalSignificantNumber);
if (formattingPattern == null) {
// If no pattern above is matched, we format the number as a whole.
formattedNumber.append(nationalSignificantNumber);
} else {
NumberFormat.Builder numFormatCopy = NumberFormat.newBuilder();
// Before we do a replacement of the national prefix pattern $NP with the national prefix, we
// need to copy the rule so that subsequent replacements for different numbers have the
// appropriate national prefix.
numFormatCopy.mergeFrom(formattingPattern);
String nationalPrefixFormattingRule = formattingPattern.getNationalPrefixFormattingRule();
if (nationalPrefixFormattingRule.length() > 0) {
String nationalPrefix = metadata.getNationalPrefix();
if (nationalPrefix.length() > 0) {
// Replace $NP with national prefix and $FG with the first group ($1).
nationalPrefixFormattingRule =
nationalPrefixFormattingRule.replace(NP_STRING, nationalPrefix);
nationalPrefixFormattingRule = nationalPrefixFormattingRule.replace(FG_STRING, "$1");
numFormatCopy.setNationalPrefixFormattingRule(nationalPrefixFormattingRule);
} else {
// We don't want to have a rule for how to format the national prefix if there isn't one.
numFormatCopy.clearNationalPrefixFormattingRule();
}
}
formattedNumber.append(
formatNsnUsingPattern(nationalSignificantNumber, numFormatCopy, numberFormat));
}
maybeAppendFormattedExtension(number, metadata, numberFormat, formattedNumber);
prefixNumberWithCountryCallingCode(countryCallingCode, numberFormat, formattedNumber);
return formattedNumber.toString();
}
/**
* Formats a phone number in national format for dialing using the carrier as specified in the
* {@code carrierCode}. The {@code carrierCode} will always be used regardless of whether the
* phone number already has a preferred domestic carrier code stored. If {@code carrierCode}
* contains an empty string, returns the number in national format without any carrier code.
*
* @param number the phone number to be formatted
* @param carrierCode the carrier selection code to be used
* @return the formatted phone number in national format for dialing using the carrier as
* specified in the {@code carrierCode}
*/
public String formatNationalNumberWithCarrierCode(PhoneNumber number, CharSequence carrierCode) {
int countryCallingCode = number.getCountryCode();
String nationalSignificantNumber = getNationalSignificantNumber(number);
if (!hasValidCountryCallingCode(countryCallingCode)) {
return nationalSignificantNumber;
}
// Note getRegionCodeForCountryCode() is used because formatting information for regions which
// share a country calling code is contained by only one region for performance reasons. For
// example, for NANPA regions it will be contained in the metadata for US.
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
PhoneMetadata metadata = getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
StringBuilder formattedNumber = new StringBuilder(20);
formattedNumber.append(formatNsn(nationalSignificantNumber, metadata,
PhoneNumberFormat.NATIONAL, carrierCode));
maybeAppendFormattedExtension(number, metadata, PhoneNumberFormat.NATIONAL, formattedNumber);
prefixNumberWithCountryCallingCode(countryCallingCode, PhoneNumberFormat.NATIONAL,
formattedNumber);
return formattedNumber.toString();
}
private PhoneMetadata getMetadataForRegionOrCallingCode(
int countryCallingCode, String regionCode) {
return REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCode)
? getMetadataForNonGeographicalRegion(countryCallingCode)
: getMetadataForRegion(regionCode);
}
/**
* Formats a phone number in national format for dialing using the carrier as specified in the
* preferredDomesticCarrierCode field of the PhoneNumber object passed in. If that is missing,
* use the {@code fallbackCarrierCode} passed in instead. If there is no
* {@code preferredDomesticCarrierCode}, and the {@code fallbackCarrierCode} contains an empty
* string, return the number in national format without any carrier code.
*
* <p>Use {@link #formatNationalNumberWithCarrierCode} instead if the carrier code passed in
* should take precedence over the number's {@code preferredDomesticCarrierCode} when formatting.
*
* @param number the phone number to be formatted
* @param fallbackCarrierCode the carrier selection code to be used, if none is found in the
* phone number itself
* @return the formatted phone number in national format for dialing using the number's
* {@code preferredDomesticCarrierCode}, or the {@code fallbackCarrierCode} passed in if
* none is found
*/
public String formatNationalNumberWithPreferredCarrierCode(PhoneNumber number,
CharSequence fallbackCarrierCode) {
return formatNationalNumberWithCarrierCode(number,
// Historically, we set this to an empty string when parsing with raw input if none was
// found in the input string. However, this doesn't result in a number we can dial. For this
// reason, we treat the empty string the same as if it isn't set at all.
number.getPreferredDomesticCarrierCode().length() > 0
? number.getPreferredDomesticCarrierCode()
: fallbackCarrierCode);
}
/**
* Returns a number formatted in such a way that it can be dialed from a mobile phone in a
* specific region. If the number cannot be reached from the region (e.g. some countries block
* toll-free numbers from being called outside of the country), the method returns an empty
* string.
*
* @param number the phone number to be formatted
* @param regionCallingFrom the region where the call is being placed
* @param withFormatting whether the number should be returned with formatting symbols, such as
* spaces and dashes.
* @return the formatted phone number
*/
public String formatNumberForMobileDialing(PhoneNumber number, String regionCallingFrom,
boolean withFormatting) {
int countryCallingCode = number.getCountryCode();
if (!hasValidCountryCallingCode(countryCallingCode)) {
return number.hasRawInput() ? number.getRawInput() : "";
}
String formattedNumber = "";
// Clear the extension, as that part cannot normally be dialed together with the main number.
PhoneNumber numberNoExt = new PhoneNumber().mergeFrom(number).clearExtension();
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
PhoneNumberType numberType = getNumberType(numberNoExt);
boolean isValidNumber = (numberType != PhoneNumberType.UNKNOWN);
if (regionCallingFrom.equals(regionCode)) {
boolean isFixedLineOrMobile =
(numberType == PhoneNumberType.FIXED_LINE) || (numberType == PhoneNumberType.MOBILE)
|| (numberType == PhoneNumberType.FIXED_LINE_OR_MOBILE);
// Carrier codes may be needed in some countries. We handle this here.
if (regionCode.equals("CO") && numberType == PhoneNumberType.FIXED_LINE) {
formattedNumber =
formatNationalNumberWithCarrierCode(numberNoExt, COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX);
} else if (regionCode.equals("BR") && isFixedLineOrMobile) {
// Historically, we set this to an empty string when parsing with raw input if none was
// found in the input string. However, this doesn't result in a number we can dial. For this
// reason, we treat the empty string the same as if it isn't set at all.
formattedNumber = numberNoExt.getPreferredDomesticCarrierCode().length() > 0
? formattedNumber = formatNationalNumberWithPreferredCarrierCode(numberNoExt, "")
// Brazilian fixed line and mobile numbers need to be dialed with a carrier code when
// called within Brazil. Without that, most of the carriers won't connect the call.
// Because of that, we return an empty string here.
: "";
} else if (countryCallingCode == NANPA_COUNTRY_CODE) {
// For NANPA countries, we output international format for numbers that can be dialed
// internationally, since that always works, except for numbers which might potentially be
// short numbers, which are always dialled in national format.
PhoneMetadata regionMetadata = getMetadataForRegion(regionCallingFrom);
if (canBeInternationallyDialled(numberNoExt)
&& testNumberLength(getNationalSignificantNumber(numberNoExt), regionMetadata)
!= ValidationResult.TOO_SHORT) {
formattedNumber = format(numberNoExt, PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
}
} else {
// For non-geographical countries, and Mexican, Chilean, and Uzbek fixed line and mobile
// numbers, we output international format for numbers that can be dialed internationally as
// that always works.
if ((regionCode.equals(REGION_CODE_FOR_NON_GEO_ENTITY)
// MX fixed line and mobile numbers should always be formatted in international format,
// even when dialed within MX. For national format to work, a carrier code needs to be
// used, and the correct carrier code depends on if the caller and callee are from the
// same local area. It is trickier to get that to work correctly than using
// international format, which is tested to work fine on all carriers.
// CL fixed line numbers need the national prefix when dialing in the national format,
// but don't have it when used for display. The reverse is true for mobile numbers. As
// a result, we output them in the international format to make it work.
// UZ mobile and fixed-line numbers have to be formatted in international format or
// prefixed with special codes like 03, 04 (for fixed-line) and 05 (for mobile) for
// dialling successfully from mobile devices. As we do not have complete information on
// special codes and to be consistent with formatting across all phone types we return
// the number in international format here.
|| ((regionCode.equals("MX") || regionCode.equals("CL")
|| regionCode.equals("UZ")) && isFixedLineOrMobile))
&& canBeInternationallyDialled(numberNoExt)) {
formattedNumber = format(numberNoExt, PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = format(numberNoExt, PhoneNumberFormat.NATIONAL);
}
}
} else if (isValidNumber && canBeInternationallyDialled(numberNoExt)) {
// We assume that short numbers are not diallable from outside their region, so if a number
// is not a valid regular length phone number, we treat it as if it cannot be internationally
// dialled.
return withFormatting ? format(numberNoExt, PhoneNumberFormat.INTERNATIONAL)
: format(numberNoExt, PhoneNumberFormat.E164);
}
return withFormatting ? formattedNumber
: normalizeDiallableCharsOnly(formattedNumber);
}
/**
* Formats a phone number for out-of-country dialing purposes. If no regionCallingFrom is
* supplied, we format the number in its INTERNATIONAL format. If the country calling code is the
* same as that of the region where the number is from, then NATIONAL formatting will be applied.
*
* <p>If the number itself has a country calling code of zero or an otherwise invalid country
* calling code, then we return the number with no formatting applied.
*
* <p>Note this function takes care of the case for calling inside of NANPA and between Russia and
* Kazakhstan (who share the same country calling code). In those cases, no international prefix
* is used. For regions which have multiple international prefixes, the number in its
* INTERNATIONAL format will be returned instead.
*
* @param number the phone number to be formatted
* @param regionCallingFrom the region where the call is being placed
* @return the formatted phone number
*/
public String formatOutOfCountryCallingNumber(PhoneNumber number,
String regionCallingFrom) {
if (!isValidRegionCode(regionCallingFrom)) {
logger.log(Level.WARNING,
"Trying to format number from invalid region "
+ regionCallingFrom
+ ". International formatting applied.");
return format(number, PhoneNumberFormat.INTERNATIONAL);
}
int countryCallingCode = number.getCountryCode();
String nationalSignificantNumber = getNationalSignificantNumber(number);
if (!hasValidCountryCallingCode(countryCallingCode)) {
return nationalSignificantNumber;
}
if (countryCallingCode == NANPA_COUNTRY_CODE) {
if (isNANPACountry(regionCallingFrom)) {
// For NANPA regions, return the national format for these regions but prefix it with the
// country calling code.
return countryCallingCode + " " + format(number, PhoneNumberFormat.NATIONAL);
}
} else if (countryCallingCode == getCountryCodeForValidRegion(regionCallingFrom)) {
// If regions share a country calling code, the country calling code need not be dialled.
// This also applies when dialling within a region, so this if clause covers both these cases.
// Technically this is the case for dialling from La Reunion to other overseas departments of
// France (French Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover this
// edge case for now and for those cases return the version including country calling code.
// Details here: http://www.petitfute.com/voyage/225-info-pratiques-reunion
return format(number, PhoneNumberFormat.NATIONAL);
}
// Metadata cannot be null because we checked 'isValidRegionCode()' above.
PhoneMetadata metadataForRegionCallingFrom = getMetadataForRegion(regionCallingFrom);
String internationalPrefix = metadataForRegionCallingFrom.getInternationalPrefix();
// For regions that have multiple international prefixes, the international format of the
// number is returned, unless there is a preferred international prefix.
String internationalPrefixForFormatting = "";
if (SINGLE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()) {
internationalPrefixForFormatting = internationalPrefix;
} else if (metadataForRegionCallingFrom.hasPreferredInternationalPrefix()) {
internationalPrefixForFormatting =
metadataForRegionCallingFrom.getPreferredInternationalPrefix();
}
String regionCode = getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
PhoneMetadata metadataForRegion =
getMetadataForRegionOrCallingCode(countryCallingCode, regionCode);
String formattedNationalNumber =
formatNsn(nationalSignificantNumber, metadataForRegion, PhoneNumberFormat.INTERNATIONAL);
StringBuilder formattedNumber = new StringBuilder(formattedNationalNumber);
maybeAppendFormattedExtension(number, metadataForRegion, PhoneNumberFormat.INTERNATIONAL,
formattedNumber);
if (internationalPrefixForFormatting.length() > 0) {
formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, " ")
.insert(0, internationalPrefixForFormatting);
} else {
prefixNumberWithCountryCallingCode(countryCallingCode,
PhoneNumberFormat.INTERNATIONAL,
formattedNumber);
}
return formattedNumber.toString();
}
/**
* Formats a phone number using the original phone number format that the number is parsed from.
* The original format is embedded in the country_code_source field of the PhoneNumber object
* passed in. If such information is missing, the number will be formatted into the NATIONAL
* format by default. When we don't have a formatting pattern for the number, the method returns
* the raw input when it is available.
*
* Note this method guarantees no digit will be inserted, removed or modified as a result of
* formatting.
*
* @param number the phone number that needs to be formatted in its original number format
* @param regionCallingFrom the region whose IDD needs to be prefixed if the original number
* has one
* @return the formatted phone number in its original number format
*/
public String formatInOriginalFormat(PhoneNumber number, String regionCallingFrom) {
if (number.hasRawInput() && !hasFormattingPatternForNumber(number)) {
// We check if we have the formatting pattern because without that, we might format the number
// as a group without national prefix.
return number.getRawInput();
}
if (!number.hasCountryCodeSource()) {
return format(number, PhoneNumberFormat.NATIONAL);
}
String formattedNumber;
switch (number.getCountryCodeSource()) {
case FROM_NUMBER_WITH_PLUS_SIGN:
formattedNumber = format(number, PhoneNumberFormat.INTERNATIONAL);
break;
case FROM_NUMBER_WITH_IDD:
formattedNumber = formatOutOfCountryCallingNumber(number, regionCallingFrom);
break;
case FROM_NUMBER_WITHOUT_PLUS_SIGN:
formattedNumber = format(number, PhoneNumberFormat.INTERNATIONAL).substring(1);
break;
case FROM_DEFAULT_COUNTRY:
// Fall-through to default case.
default:
String regionCode = getRegionCodeForCountryCode(number.getCountryCode());
// We strip non-digits from the NDD here, and from the raw input later, so that we can
// compare them easily.
String nationalPrefix = getNddPrefixForRegion(regionCode, true /* strip non-digits */);
String nationalFormat = format(number, PhoneNumberFormat.NATIONAL);
if (nationalPrefix == null || nationalPrefix.length() == 0) {
// If the region doesn't have a national prefix at all, we can safely return the national
// format without worrying about a national prefix being added.
formattedNumber = nationalFormat;
break;
}
// Otherwise, we check if the original number was entered with a national prefix.
if (rawInputContainsNationalPrefix(
number.getRawInput(), nationalPrefix, regionCode)) {
// If so, we can safely return the national format.
formattedNumber = nationalFormat;
break;
}
// Metadata cannot be null here because getNddPrefixForRegion() (above) returns null if
// there is no metadata for the region.
PhoneMetadata metadata = getMetadataForRegion(regionCode);
String nationalNumber = getNationalSignificantNumber(number);
NumberFormat formatRule =
chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber);
// The format rule could still be null here if the national number was 0 and there was no
// raw input (this should not be possible for numbers generated by the phonenumber library
// as they would also not have a country calling code and we would have exited earlier).
if (formatRule == null) {
formattedNumber = nationalFormat;
break;
}
// When the format we apply to this number doesn't contain national prefix, we can just
// return the national format.
// TODO: Refactor the code below with the code in
// isNationalPrefixPresentIfRequired.
String candidateNationalPrefixRule = formatRule.getNationalPrefixFormattingRule();
// We assume that the first-group symbol will never be _before_ the national prefix.
int indexOfFirstGroup = candidateNationalPrefixRule.indexOf("$1");
if (indexOfFirstGroup <= 0) {
formattedNumber = nationalFormat;
break;
}
candidateNationalPrefixRule =
candidateNationalPrefixRule.substring(0, indexOfFirstGroup);
candidateNationalPrefixRule = normalizeDigitsOnly(candidateNationalPrefixRule);
if (candidateNationalPrefixRule.length() == 0) {
// National prefix not used when formatting this number.
formattedNumber = nationalFormat;
break;
}
// Otherwise, we need to remove the national prefix from our output.
NumberFormat.Builder numFormatCopy = NumberFormat.newBuilder();
numFormatCopy.mergeFrom(formatRule);
numFormatCopy.clearNationalPrefixFormattingRule();
List<NumberFormat> numberFormats = new ArrayList<NumberFormat>(1);
numberFormats.add(numFormatCopy);
formattedNumber = formatByPattern(number, PhoneNumberFormat.NATIONAL, numberFormats);
break;
}
String rawInput = number.getRawInput();
// If no digit is inserted/removed/modified as a result of our formatting, we return the
// formatted phone number; otherwise we return the raw input the user entered.
if (formattedNumber != null && rawInput.length() > 0) {
String normalizedFormattedNumber = normalizeDiallableCharsOnly(formattedNumber);
String normalizedRawInput = normalizeDiallableCharsOnly(rawInput);
if (!normalizedFormattedNumber.equals(normalizedRawInput)) {
formattedNumber = rawInput;
}
}
return formattedNumber;
}
// Check if rawInput, which is assumed to be in the national format, has a national prefix. The
// national prefix is assumed to be in digits-only form.
private boolean rawInputContainsNationalPrefix(String rawInput, String nationalPrefix,
String regionCode) {
String normalizedNationalNumber = normalizeDigitsOnly(rawInput);
if (normalizedNationalNumber.startsWith(nationalPrefix)) {
try {
// Some Japanese numbers (e.g. 00777123) might be mistaken to contain the national prefix
// when written without it (e.g. 0777123) if we just do prefix matching. To tackle that, we
// check the validity of the number if the assumed national prefix is removed (777123 won't
// be valid in Japan).
return isValidNumber(
parse(normalizedNationalNumber.substring(nationalPrefix.length()), regionCode));
} catch (NumberParseException e) {
return false;
}
}
return false;
}
private boolean hasFormattingPatternForNumber(PhoneNumber number) {
int countryCallingCode = number.getCountryCode();
String phoneNumberRegion = getRegionCodeForCountryCode(countryCallingCode);
PhoneMetadata metadata =
getMetadataForRegionOrCallingCode(countryCallingCode, phoneNumberRegion);
if (metadata == null) {
return false;
}
String nationalNumber = getNationalSignificantNumber(number);
NumberFormat formatRule =
chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber);
return formatRule != null;
}
/**
* Formats a phone number for out-of-country dialing purposes.
*
* Note that in this version, if the number was entered originally using alpha characters and
* this version of the number is stored in raw_input, this representation of the number will be
* used rather than the digit representation. Grouping information, as specified by characters
* such as "-" and " ", will be retained.
*
* <p><b>Caveats:</b></p>
* <ul>
* <li> This will not produce good results if the country calling code is both present in the raw
* input _and_ is the start of the national number. This is not a problem in the regions
* which typically use alpha numbers.
* <li> This will also not produce good results if the raw input has any grouping information
* within the first three digits of the national number, and if the function needs to strip
* preceding digits/words in the raw input before these digits. Normally people group the
* first three digits together so this is not a huge problem - and will be fixed if it
* proves to be so.
* </ul>
*
* @param number the phone number that needs to be formatted
* @param regionCallingFrom the region where the call is being placed
* @return the formatted phone number
*/
public String formatOutOfCountryKeepingAlphaChars(PhoneNumber number,
String regionCallingFrom) {
String rawInput = number.getRawInput();
// If there is no raw input, then we can't keep alpha characters because there aren't any.
// In this case, we return formatOutOfCountryCallingNumber.
if (rawInput.length() == 0) {
return formatOutOfCountryCallingNumber(number, regionCallingFrom);
}
int countryCode = number.getCountryCode();
if (!hasValidCountryCallingCode(countryCode)) {
return rawInput;
}
// Strip any prefix such as country calling code, IDD, that was present. We do this by comparing
// the number in raw_input with the parsed number.
// To do this, first we normalize punctuation. We retain number grouping symbols such as " "
// only.
rawInput = normalizeHelper(rawInput, ALL_PLUS_NUMBER_GROUPING_SYMBOLS, true);
// Now we trim everything before the first three digits in the parsed number. We choose three
// because all valid alpha numbers have 3 digits at the start - if it does not, then we don't
// trim anything at all. Similarly, if the national number was less than three digits, we don't
// trim anything at all.
String nationalNumber = getNationalSignificantNumber(number);
if (nationalNumber.length() > 3) {
int firstNationalNumberDigit = rawInput.indexOf(nationalNumber.substring(0, 3));
if (firstNationalNumberDigit != -1) {
rawInput = rawInput.substring(firstNationalNumberDigit);
}
}
PhoneMetadata metadataForRegionCallingFrom = getMetadataForRegion(regionCallingFrom);
if (countryCode == NANPA_COUNTRY_CODE) {
if (isNANPACountry(regionCallingFrom)) {
return countryCode + " " + rawInput;
}
} else if (metadataForRegionCallingFrom != null
&& countryCode == getCountryCodeForValidRegion(regionCallingFrom)) {
NumberFormat formattingPattern =
chooseFormattingPatternForNumber(metadataForRegionCallingFrom.numberFormats(),
nationalNumber);
if (formattingPattern == null) {
// If no pattern above is matched, we format the original input.
return rawInput;
}
NumberFormat.Builder newFormat = NumberFormat.newBuilder();
newFormat.mergeFrom(formattingPattern);
// The first group is the first group of digits that the user wrote together.
newFormat.setPattern("(\\d+)(.*)");
// Here we just concatenate them back together after the national prefix has been fixed.
newFormat.setFormat("$1$2");
// Now we format using this pattern instead of the default pattern, but with the national
// prefix prefixed if necessary.
// This will not work in the cases where the pattern (and not the leading digits) decide
// whether a national prefix needs to be used, since we have overridden the pattern to match
// anything, but that is not the case in the metadata to date.
return formatNsnUsingPattern(rawInput, newFormat, PhoneNumberFormat.NATIONAL);
}
String internationalPrefixForFormatting = "";
// If an unsupported region-calling-from is entered, or a country with multiple international
// prefixes, the international format of the number is returned, unless there is a preferred
// international prefix.
if (metadataForRegionCallingFrom != null) {
String internationalPrefix = metadataForRegionCallingFrom.getInternationalPrefix();
internationalPrefixForFormatting =
SINGLE_INTERNATIONAL_PREFIX.matcher(internationalPrefix).matches()
? internationalPrefix
: metadataForRegionCallingFrom.getPreferredInternationalPrefix();
}
StringBuilder formattedNumber = new StringBuilder(rawInput);
String regionCode = getRegionCodeForCountryCode(countryCode);
// Metadata cannot be null because the country calling code is valid.
PhoneMetadata metadataForRegion = getMetadataForRegionOrCallingCode(countryCode, regionCode);
maybeAppendFormattedExtension(number, metadataForRegion,
PhoneNumberFormat.INTERNATIONAL, formattedNumber);
if (internationalPrefixForFormatting.length() > 0) {
formattedNumber.insert(0, " ").insert(0, countryCode).insert(0, " ")
.insert(0, internationalPrefixForFormatting);
} else {
// Invalid region entered as country-calling-from (so no metadata was found for it) or the
// region chosen has multiple international dialling prefixes.
if (!isValidRegionCode(regionCallingFrom)) {
logger.log(Level.WARNING,
"Trying to format number from invalid region "
+ regionCallingFrom
+ ". International formatting applied.");
}
prefixNumberWithCountryCallingCode(countryCode,
PhoneNumberFormat.INTERNATIONAL,
formattedNumber);
}
return formattedNumber.toString();
}
/**
* Gets the national significant number of a phone number. Note a national significant number
* doesn't contain a national prefix or any formatting.
*
* @param number the phone number for which the national significant number is needed
* @return the national significant number of the PhoneNumber object passed in
*/
public String getNationalSignificantNumber(PhoneNumber number) {
// If leading zero(s) have been set, we prefix this now. Note this is not a national prefix.
StringBuilder nationalNumber = new StringBuilder();
if (number.isItalianLeadingZero() && number.getNumberOfLeadingZeros() > 0) {
char[] zeros = new char[number.getNumberOfLeadingZeros()];
Arrays.fill(zeros, '0');
nationalNumber.append(new String(zeros));
}
nationalNumber.append(number.getNationalNumber());
return nationalNumber.toString();
}
/**
* A helper function that is used by format and formatByPattern.
*/
private void prefixNumberWithCountryCallingCode(int countryCallingCode,
PhoneNumberFormat numberFormat,
StringBuilder formattedNumber) {
switch (numberFormat) {
case E164:
formattedNumber.insert(0, countryCallingCode).insert(0, PLUS_SIGN);
return;
case INTERNATIONAL:
formattedNumber.insert(0, " ").insert(0, countryCallingCode).insert(0, PLUS_SIGN);
return;
case RFC3966:
formattedNumber.insert(0, "-").insert(0, countryCallingCode).insert(0, PLUS_SIGN)
.insert(0, RFC3966_PREFIX);
return;
case NATIONAL:
default:
return;
}
}
// Simple wrapper of formatNsn for the common case of no carrier code.
private String formatNsn(String number, PhoneMetadata metadata, PhoneNumberFormat numberFormat) {
return formatNsn(number, metadata, numberFormat, null);
}
// Note in some regions, the national number can be written in two completely different ways
// depending on whether it forms part of the NATIONAL format or INTERNATIONAL format. The
// numberFormat parameter here is used to specify which format to use for those cases. If a
// carrierCode is specified, this will be inserted into the formatted string to replace $CC.
private String formatNsn(String number,
PhoneMetadata metadata,
PhoneNumberFormat numberFormat,
CharSequence carrierCode) {
List<NumberFormat> intlNumberFormats = metadata.intlNumberFormats();
// When the intlNumberFormats exists, we use that to format national number for the
// INTERNATIONAL format instead of using the numberDesc.numberFormats.
List<NumberFormat> availableFormats =
(intlNumberFormats.size() == 0 || numberFormat == PhoneNumberFormat.NATIONAL)
? metadata.numberFormats()
: metadata.intlNumberFormats();
NumberFormat formattingPattern = chooseFormattingPatternForNumber(availableFormats, number);
return (formattingPattern == null)
? number
: formatNsnUsingPattern(number, formattingPattern, numberFormat, carrierCode);
}
NumberFormat chooseFormattingPatternForNumber(List<NumberFormat> availableFormats,
String nationalNumber) {
for (NumberFormat numFormat : availableFormats) {
int size = numFormat.leadingDigitsPatternSize();
if (size == 0 || regexCache.getPatternForRegex(
// We always use the last leading_digits_pattern, as it is the most detailed.
numFormat.getLeadingDigitsPattern(size - 1)).matcher(nationalNumber).lookingAt()) {
Matcher m = regexCache.getPatternForRegex(numFormat.getPattern()).matcher(nationalNumber);
if (m.matches()) {
return numFormat;
}
}
}
return null;
}
// Simple wrapper of formatNsnUsingPattern for the common case of no carrier code.
String formatNsnUsingPattern(String nationalNumber,
NumberFormat formattingPattern,
PhoneNumberFormat numberFormat) {
return formatNsnUsingPattern(nationalNumber, formattingPattern, numberFormat, null);
}
// Note that carrierCode is optional - if null or an empty string, no carrier code replacement
// will take place.
private String formatNsnUsingPattern(String nationalNumber,
NumberFormat formattingPattern,
PhoneNumberFormat numberFormat,
CharSequence carrierCode) {
String numberFormatRule = formattingPattern.getFormat();
Matcher m =
regexCache.getPatternForRegex(formattingPattern.getPattern()).matcher(nationalNumber);
String formattedNationalNumber = "";
if (numberFormat == PhoneNumberFormat.NATIONAL
&& carrierCode != null && carrierCode.length() > 0
&& formattingPattern.getDomesticCarrierCodeFormattingRule().length() > 0) {
// Replace the $CC in the formatting rule with the desired carrier code.
String carrierCodeFormattingRule = formattingPattern.getDomesticCarrierCodeFormattingRule();
carrierCodeFormattingRule = carrierCodeFormattingRule.replace(CC_STRING, carrierCode);
// Now replace the $FG in the formatting rule with the first group and the carrier code
// combined in the appropriate way.
numberFormatRule = FIRST_GROUP_PATTERN.matcher(numberFormatRule)
.replaceFirst(carrierCodeFormattingRule);
formattedNationalNumber = m.replaceAll(numberFormatRule);
} else {
// Use the national prefix formatting rule instead.
String nationalPrefixFormattingRule = formattingPattern.getNationalPrefixFormattingRule();
if (numberFormat == PhoneNumberFormat.NATIONAL
&& nationalPrefixFormattingRule != null
&& nationalPrefixFormattingRule.length() > 0) {
Matcher firstGroupMatcher = FIRST_GROUP_PATTERN.matcher(numberFormatRule);
formattedNationalNumber =
m.replaceAll(firstGroupMatcher.replaceFirst(nationalPrefixFormattingRule));
} else {
formattedNationalNumber = m.replaceAll(numberFormatRule);
}
}
if (numberFormat == PhoneNumberFormat.RFC3966) {
// Strip any leading punctuation.
Matcher matcher = SEPARATOR_PATTERN.matcher(formattedNationalNumber);
if (matcher.lookingAt()) {
formattedNationalNumber = matcher.replaceFirst("");
}
// Replace the rest with a dash between each number group.
formattedNationalNumber = matcher.reset(formattedNationalNumber).replaceAll("-");
}
return formattedNationalNumber;
}
/**
* Gets a valid number for the specified region.
*
* @param regionCode the region for which an example number is needed
* @return a valid fixed-line number for the specified region. Returns null when the metadata
* does not contain such information, or the region 001 is passed in. For 001 (representing
* non-geographical numbers), call {@link #getExampleNumberForNonGeoEntity} instead.
*/
public PhoneNumber getExampleNumber(String regionCode) {
return getExampleNumberForType(regionCode, PhoneNumberType.FIXED_LINE);
}
/**
* Gets an invalid number for the specified region. This is useful for unit-testing purposes,
* where you want to test what will happen with an invalid number. Note that the number that is
* returned will always be able to be parsed and will have the correct country code. It may also
* be a valid *short* number/code for this region. Validity checking such numbers is handled with
* {@link com.google.i18n.phonenumbers.ShortNumberInfo}.
*
* @param regionCode the region for which an example number is needed
* @return an invalid number for the specified region. Returns null when an unsupported region or
* the region 001 (Earth) is passed in.
*/
public PhoneNumber getInvalidExampleNumber(String regionCode) {
if (!isValidRegionCode(regionCode)) {
logger.log(Level.WARNING, "Invalid or unknown region code provided: " + regionCode);
return null;
}
// We start off with a valid fixed-line number since every country supports this. Alternatively
// we could start with a different number type, since fixed-line numbers typically have a wide
// breadth of valid number lengths and we may have to make it very short before we get an
// invalid number.
PhoneNumberDesc desc = getNumberDescByType(getMetadataForRegion(regionCode),
PhoneNumberType.FIXED_LINE);
if (!desc.hasExampleNumber()) {
// This shouldn't happen; we have a test for this.
return null;
}
String exampleNumber = desc.getExampleNumber();
// Try and make the number invalid. We do this by changing the length. We try reducing the
// length of the number, since currently no region has a number that is the same length as
// MIN_LENGTH_FOR_NSN. This is probably quicker than making the number longer, which is another
// alternative. We could also use the possible number pattern to extract the possible lengths of
// the number to make this faster, but this method is only for unit-testing so simplicity is
// preferred to performance. We don't want to return a number that can't be parsed, so we check
// the number is long enough. We try all possible lengths because phone number plans often have
// overlapping prefixes so the number 123456 might be valid as a fixed-line number, and 12345 as
// a mobile number. It would be faster to loop in a different order, but we prefer numbers that
// look closer to real numbers (and it gives us a variety of different lengths for the resulting
// phone numbers - otherwise they would all be MIN_LENGTH_FOR_NSN digits long.)
for (int phoneNumberLength = exampleNumber.length() - 1;
phoneNumberLength >= MIN_LENGTH_FOR_NSN;
phoneNumberLength--) {
String numberToTry = exampleNumber.substring(0, phoneNumberLength);
try {
PhoneNumber possiblyValidNumber = parse(numberToTry, regionCode);
if (!isValidNumber(possiblyValidNumber)) {
return possiblyValidNumber;
}
} catch (NumberParseException e) {
// Shouldn't happen: we have already checked the length, we know example numbers have
// only valid digits, and we know the region code is fine.
}
}
// We have a test to check that this doesn't happen for any of our supported regions.
return null;
}
/**
* Gets a valid number for the specified region and number type.
*
* @param regionCode the region for which an example number is needed
* @param type the type of number that is needed
* @return a valid number for the specified region and type. Returns null when the metadata
* does not contain such information or if an invalid region or region 001 was entered.
* For 001 (representing non-geographical numbers), call
* {@link #getExampleNumberForNonGeoEntity} instead.
*/
public PhoneNumber getExampleNumberForType(String regionCode, PhoneNumberType type) {
// Check the region code is valid.
if (!isValidRegionCode(regionCode)) {
logger.log(Level.WARNING, "Invalid or unknown region code provided: " + regionCode);
return null;
}
PhoneNumberDesc desc = getNumberDescByType(getMetadataForRegion(regionCode), type);
try {
if (desc.hasExampleNumber()) {
return parse(desc.getExampleNumber(), regionCode);
}
} catch (NumberParseException e) {
logger.log(Level.SEVERE, e.toString());
}
return null;
}
/**
* Gets a valid number for the specified number type (it may belong to any country).
*
* @param type the type of number that is needed
* @return a valid number for the specified type. Returns null when the metadata
* does not contain such information. This should only happen when no numbers of this type are
* allocated anywhere in the world anymore.
*/
public PhoneNumber getExampleNumberForType(PhoneNumberType type) {
for (String regionCode : getSupportedRegions()) {
PhoneNumber exampleNumber = getExampleNumberForType(regionCode, type);
if (exampleNumber != null) {
return exampleNumber;
}
}
// If there wasn't an example number for a region, try the non-geographical entities.
for (int countryCallingCode : getSupportedGlobalNetworkCallingCodes()) {
PhoneNumberDesc desc = getNumberDescByType(
getMetadataForNonGeographicalRegion(countryCallingCode), type);
try {
if (desc.hasExampleNumber()) {
return parse("+" + countryCallingCode + desc.getExampleNumber(), UNKNOWN_REGION);
}
} catch (NumberParseException e) {
logger.log(Level.SEVERE, e.toString());
}
}
// There are no example numbers of this type for any country in the library.
return null;
}
/**
* Gets a valid number for the specified country calling code for a non-geographical entity.
*
* @param countryCallingCode the country calling code for a non-geographical entity
* @return a valid number for the non-geographical entity. Returns null when the metadata
* does not contain such information, or the country calling code passed in does not belong
* to a non-geographical entity.
*/
public PhoneNumber getExampleNumberForNonGeoEntity(int countryCallingCode) {
PhoneMetadata metadata = getMetadataForNonGeographicalRegion(countryCallingCode);
if (metadata != null) {
// For geographical entities, fixed-line data is always present. However, for non-geographical
// entities, this is not the case, so we have to go through different types to find the
// example number. We don't check fixed-line or personal number since they aren't used by
// non-geographical entities (if this changes, a unit-test will catch this.)
for (PhoneNumberDesc desc : Arrays.asList(metadata.getMobile(), metadata.getTollFree(),
metadata.getSharedCost(), metadata.getVoip(), metadata.getVoicemail(),
metadata.getUan(), metadata.getPremiumRate())) {
try {
if (desc != null && desc.hasExampleNumber()) {
return parse("+" + countryCallingCode + desc.getExampleNumber(), UNKNOWN_REGION);
}
} catch (NumberParseException e) {
logger.log(Level.SEVERE, e.toString());
}
}
} else {
logger.log(Level.WARNING,
"Invalid or unknown country calling code provided: " + countryCallingCode);
}
return null;
}
/**
* Appends the formatted extension of a phone number to formattedNumber, if the phone number had
* an extension specified.
*/
private void maybeAppendFormattedExtension(PhoneNumber number, PhoneMetadata metadata,
PhoneNumberFormat numberFormat,
StringBuilder formattedNumber) {
if (number.hasExtension() && number.getExtension().length() > 0) {
if (numberFormat == PhoneNumberFormat.RFC3966) {
formattedNumber.append(RFC3966_EXTN_PREFIX).append(number.getExtension());
} else {
if (metadata.hasPreferredExtnPrefix()) {
formattedNumber.append(metadata.getPreferredExtnPrefix()).append(number.getExtension());
} else {
formattedNumber.append(DEFAULT_EXTN_PREFIX).append(number.getExtension());
}
}
}
}
PhoneNumberDesc getNumberDescByType(PhoneMetadata metadata, PhoneNumberType type) {
switch (type) {
case PREMIUM_RATE:
return metadata.getPremiumRate();
case TOLL_FREE:
return metadata.getTollFree();
case MOBILE:
return metadata.getMobile();
case FIXED_LINE:
case FIXED_LINE_OR_MOBILE:
return metadata.getFixedLine();
case SHARED_COST:
return metadata.getSharedCost();
case VOIP:
return metadata.getVoip();
case PERSONAL_NUMBER:
return metadata.getPersonalNumber();
case PAGER:
return metadata.getPager();
case UAN:
return metadata.getUan();
case VOICEMAIL:
return metadata.getVoicemail();
default:
return metadata.getGeneralDesc();
}
}
/**
* Gets the type of a valid phone number.
*
* @param number the phone number that we want to know the type
* @return the type of the phone number, or UNKNOWN if it is invalid
*/
public PhoneNumberType getNumberType(PhoneNumber number) {
String regionCode = getRegionCodeForNumber(number);
PhoneMetadata metadata = getMetadataForRegionOrCallingCode(number.getCountryCode(), regionCode);
if (metadata == null) {
return PhoneNumberType.UNKNOWN;
}
String nationalSignificantNumber = getNationalSignificantNumber(number);
return getNumberTypeHelper(nationalSignificantNumber, metadata);
}
private PhoneNumberType getNumberTypeHelper(String nationalNumber, PhoneMetadata metadata) {
if (!isNumberMatchingDesc(nationalNumber, metadata.getGeneralDesc())) {
return PhoneNumberType.UNKNOWN;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getPremiumRate())) {
return PhoneNumberType.PREMIUM_RATE;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getTollFree())) {
return PhoneNumberType.TOLL_FREE;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getSharedCost())) {
return PhoneNumberType.SHARED_COST;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getVoip())) {
return PhoneNumberType.VOIP;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getPersonalNumber())) {
return PhoneNumberType.PERSONAL_NUMBER;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getPager())) {
return PhoneNumberType.PAGER;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getUan())) {
return PhoneNumberType.UAN;
}
if (isNumberMatchingDesc(nationalNumber, metadata.getVoicemail())) {
return PhoneNumberType.VOICEMAIL;
}
boolean isFixedLine = isNumberMatchingDesc(nationalNumber, metadata.getFixedLine());
if (isFixedLine) {
if (metadata.getSameMobileAndFixedLinePattern()) {
return PhoneNumberType.FIXED_LINE_OR_MOBILE;
} else if (isNumberMatchingDesc(nationalNumber, metadata.getMobile())) {
return PhoneNumberType.FIXED_LINE_OR_MOBILE;
}
return PhoneNumberType.FIXED_LINE;
}
// Otherwise, test to see if the number is mobile. Only do this if certain that the patterns for
// mobile and fixed line aren't the same.
if (!metadata.getSameMobileAndFixedLinePattern()
&& isNumberMatchingDesc(nationalNumber, metadata.getMobile())) {
return PhoneNumberType.MOBILE;
}
return PhoneNumberType.UNKNOWN;
}
/**
* Returns the metadata for the given region code or {@code null} if the region code is invalid
* or unknown.
*/
PhoneMetadata getMetadataForRegion(String regionCode) {
if (!isValidRegionCode(regionCode)) {
return null;
}
return metadataSource.getMetadataForRegion(regionCode);
}
PhoneMetadata getMetadataForNonGeographicalRegion(int countryCallingCode) {
if (!countryCallingCodeToRegionCodeMap.containsKey(countryCallingCode)) {
return null;
}
return metadataSource.getMetadataForNonGeographicalRegion(countryCallingCode);
}
boolean isNumberMatchingDesc(String nationalNumber, PhoneNumberDesc numberDesc) {
// Check if any possible number lengths are present; if so, we use them to avoid checking the
// validation pattern if they don't match. If they are absent, this means they match the general
// description, which we have already checked before checking a specific number type.
int actualLength = nationalNumber.length();
List<Integer> possibleLengths = numberDesc.getPossibleLengthList();
if (possibleLengths.size() > 0 && !possibleLengths.contains(actualLength)) {
return false;
}
return matcherApi.matchNationalNumber(nationalNumber, numberDesc, false);
}
/**
* Tests whether a phone number matches a valid pattern. Note this doesn't verify the number
* is actually in use, which is impossible to tell by just looking at a number itself. It only
* verifies whether the parsed, canonicalised number is valid: not whether a particular series of
* digits entered by the user is diallable from the region provided when parsing. For example, the
* number +41 (0) 78 927 2696 can be parsed into a number with country code "41" and national
* significant number "789272696". This is valid, while the original string is not diallable.
*
* @param number the phone number that we want to validate
* @return a boolean that indicates whether the number is of a valid pattern
*/
public boolean isValidNumber(PhoneNumber number) {
String regionCode = getRegionCodeForNumber(number);
return isValidNumberForRegion(number, regionCode);
}
/**
* Tests whether a phone number is valid for a certain region. Note this doesn't verify the number
* is actually in use, which is impossible to tell by just looking at a number itself. If the
* country calling code is not the same as the country calling code for the region, this
* immediately exits with false. After this, the specific number pattern rules for the region are
* examined. This is useful for determining for example whether a particular number is valid for
* Canada, rather than just a valid NANPA number.
* Warning: In most cases, you want to use {@link #isValidNumber} instead. For example, this
* method will mark numbers from British Crown dependencies such as the Isle of Man as invalid for
* the region "GB" (United Kingdom), since it has its own region code, "IM", which may be
* undesirable.
*
* @param number the phone number that we want to validate
* @param regionCode the region that we want to validate the phone number for
* @return a boolean that indicates whether the number is of a valid pattern
*/
public boolean isValidNumberForRegion(PhoneNumber number, String regionCode) {
int countryCode = number.getCountryCode();
PhoneMetadata metadata = getMetadataForRegionOrCallingCode(countryCode, regionCode);
if ((metadata == null)
|| (!REGION_CODE_FOR_NON_GEO_ENTITY.equals(regionCode)
&& countryCode != getCountryCodeForValidRegion(regionCode))) {
// Either the region code was invalid, or the country calling code for this number does not
// match that of the region code.
return false;
}
String nationalSignificantNumber = getNationalSignificantNumber(number);
return getNumberTypeHelper(nationalSignificantNumber, metadata) != PhoneNumberType.UNKNOWN;
}
/**
* Returns the region where a phone number is from. This could be used for geocoding at the region
* level. Only guarantees correct results for valid, full numbers (not short-codes, or invalid
* numbers).
*
* @param number the phone number whose origin we want to know
* @return the region where the phone number is from, or null if no region matches this calling
* code
*/
public String getRegionCodeForNumber(PhoneNumber number) {
int countryCode = number.getCountryCode();
List<String> regions = countryCallingCodeToRegionCodeMap.get(countryCode);
if (regions == null) {
logger.log(Level.INFO, "Missing/invalid country_code (" + countryCode + ")");
return null;
}
if (regions.size() == 1) {
return regions.get(0);
} else {
return getRegionCodeForNumberFromRegionList(number, regions);
}
}
private String getRegionCodeForNumberFromRegionList(PhoneNumber number,
List<String> regionCodes) {
String nationalNumber = getNationalSignificantNumber(number);
for (String regionCode : regionCodes) {
// If leadingDigits is present, use this. Otherwise, do full validation.
// Metadata cannot be null because the region codes come from the country calling code map.
PhoneMetadata metadata = getMetadataForRegion(regionCode);
if (metadata.hasLeadingDigits()) {
if (regexCache.getPatternForRegex(metadata.getLeadingDigits())
.matcher(nationalNumber).lookingAt()) {
return regionCode;
}
} else if (getNumberTypeHelper(nationalNumber, metadata) != PhoneNumberType.UNKNOWN) {
return regionCode;
}
}
return null;
}
/**
* Returns the region code that matches the specific country calling code. In the case of no
* region code being found, ZZ will be returned. In the case of multiple regions, the one
* designated in the metadata as the "main" region for this calling code will be returned. If the
* countryCallingCode entered is valid but doesn't match a specific region (such as in the case of
* non-geographical calling codes like 800) the value "001" will be returned (corresponding to
* the value for World in the UN M.49 schema).
*/
public String getRegionCodeForCountryCode(int countryCallingCode) {
List<String> regionCodes = countryCallingCodeToRegionCodeMap.get(countryCallingCode);
return regionCodes == null ? UNKNOWN_REGION : regionCodes.get(0);
}
/**
* Returns a list with the region codes that match the specific country calling code. For
* non-geographical country calling codes, the region code 001 is returned. Also, in the case
* of no region code being found, an empty list is returned.
*/
public List<String> getRegionCodesForCountryCode(int countryCallingCode) {
List<String> regionCodes = countryCallingCodeToRegionCodeMap.get(countryCallingCode);
return Collections.unmodifiableList(regionCodes == null ? new ArrayList<String>(0)
: regionCodes);
}
/**
* Returns the country calling code for a specific region. For example, this would be 1 for the
* United States, and 64 for New Zealand.
*
* @param regionCode the region that we want to get the country calling code for
* @return the country calling code for the region denoted by regionCode
*/
public int getCountryCodeForRegion(String regionCode) {
if (!isValidRegionCode(regionCode)) {
logger.log(Level.WARNING,
"Invalid or missing region code ("
+ ((regionCode == null) ? "null" : regionCode)
+ ") provided.");
return 0;
}
return getCountryCodeForValidRegion(regionCode);
}
/**
* Returns the country calling code for a specific region. For example, this would be 1 for the
* United States, and 64 for New Zealand. Assumes the region is already valid.
*
* @param regionCode the region that we want to get the country calling code for
* @return the country calling code for the region denoted by regionCode
* @throws IllegalArgumentException if the region is invalid
*/
private int getCountryCodeForValidRegion(String regionCode) {
PhoneMetadata metadata = getMetadataForRegion(regionCode);
if (metadata == null) {
throw new IllegalArgumentException("Invalid region code: " + regionCode);
}
return metadata.getCountryCode();
}
/**
* Returns the national dialling prefix for a specific region. For example, this would be 1 for
* the United States, and 0 for New Zealand. Set stripNonDigits to true to strip symbols like "~"
* (which indicates a wait for a dialling tone) from the prefix returned. If no national prefix is
* present, we return null.
*
* <p>Warning: Do not use this method for do-your-own formatting - for some regions, the
* national dialling prefix is used only for certain types of numbers. Use the library's
* formatting functions to prefix the national prefix when required.
*
* @param regionCode the region that we want to get the dialling prefix for
* @param stripNonDigits true to strip non-digits from the national dialling prefix
* @return the dialling prefix for the region denoted by regionCode
*/
public String getNddPrefixForRegion(String regionCode, boolean stripNonDigits) {
PhoneMetadata metadata = getMetadataForRegion(regionCode);
if (metadata == null) {
logger.log(Level.WARNING,
"Invalid or missing region code ("
+ ((regionCode == null) ? "null" : regionCode)
+ ") provided.");
return null;
}
String nationalPrefix = metadata.getNationalPrefix();
// If no national prefix was found, we return null.
if (nationalPrefix.length() == 0) {
return null;
}
if (stripNonDigits) {
// Note: if any other non-numeric symbols are ever used in national prefixes, these would have
// to be removed here as well.
nationalPrefix = nationalPrefix.replace("~", "");
}
return nationalPrefix;
}
/**
* Checks if this is a region under the North American Numbering Plan Administration (NANPA).
*
* @return true if regionCode is one of the regions under NANPA
*/
public boolean isNANPACountry(String regionCode) {
return nanpaRegions.contains(regionCode);
}
/**
* Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT. A valid vanity
* number will start with at least 3 digits and will have three or more alpha characters. This
* does not do region-specific checks - to work out if this number is actually valid for a region,
* it should be parsed and methods such as {@link #isPossibleNumberWithReason} and
* {@link #isValidNumber} should be used.
*
* @param number the number that needs to be checked
* @return true if the number is a valid vanity number
*/
public boolean isAlphaNumber(CharSequence number) {
if (!isViablePhoneNumber(number)) {
// Number is too short, or doesn't match the basic phone number pattern.
return false;
}
StringBuilder strippedNumber = new StringBuilder(number);
maybeStripExtension(strippedNumber);
return VALID_ALPHA_PHONE_PATTERN.matcher(strippedNumber).matches();
}
/**
* Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of returning the reason
* for failure, this method returns true if the number is either a possible fully-qualified number
* (containing the area code and country code), or if the number could be a possible local number
* (with a country code, but missing an area code). Local numbers are considered possible if they
* could be possibly dialled in this format: if the area code is needed for a call to connect, the
* number is not considered possible without it.
*
* @param number the number that needs to be checked
* @return true if the number is possible
*/
public boolean isPossibleNumber(PhoneNumber number) {
ValidationResult result = isPossibleNumberWithReason(number);
return result == ValidationResult.IS_POSSIBLE
|| result == ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
}
/**
* Convenience wrapper around {@link #isPossibleNumberForTypeWithReason}. Instead of returning the
* reason for failure, this method returns true if the number is either a possible fully-qualified
* number (containing the area code and country code), or if the number could be a possible local
* number (with a country code, but missing an area code). Local numbers are considered possible
* if they could be possibly dialled in this format: if the area code is needed for a call to
* connect, the number is not considered possible without it.
*
* @param number the number that needs to be checked
* @param type the type we are interested in
* @return true if the number is possible for this particular type
*/
public boolean isPossibleNumberForType(PhoneNumber number, PhoneNumberType type) {
ValidationResult result = isPossibleNumberForTypeWithReason(number, type);
return result == ValidationResult.IS_POSSIBLE
|| result == ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
}
/**
* Helper method to check a number against possible lengths for this region, based on the metadata
* being passed in, and determine whether it matches, or is too short or too long.
*/
private ValidationResult testNumberLength(CharSequence number, PhoneMetadata metadata) {
return testNumberLength(number, metadata, PhoneNumberType.UNKNOWN);
}
/**
* Helper method to check a number against possible lengths for this number type, and determine
* whether it matches, or is too short or too long.
*/
private ValidationResult testNumberLength(
CharSequence number, PhoneMetadata metadata, PhoneNumberType type) {
PhoneNumberDesc descForType = getNumberDescByType(metadata, type);
// There should always be "possibleLengths" set for every element. This is declared in the XML
// schema which is verified by PhoneNumberMetadataSchemaTest.
// For size efficiency, where a sub-description (e.g. fixed-line) has the same possibleLengths
// as the parent, this is missing, so we fall back to the general desc (where no numbers of the
// type exist at all, there is one possible length (-1) which is guaranteed not to match the
// length of any real phone number).
List<Integer> possibleLengths = descForType.getPossibleLengthList().isEmpty()
? metadata.getGeneralDesc().getPossibleLengthList() : descForType.getPossibleLengthList();
List<Integer> localLengths = descForType.getPossibleLengthLocalOnlyList();
if (type == PhoneNumberType.FIXED_LINE_OR_MOBILE) {
if (!descHasPossibleNumberData(getNumberDescByType(metadata, PhoneNumberType.FIXED_LINE))) {
// The rare case has been encountered where no fixedLine data is available (true for some
// non-geographical entities), so we just check mobile.
return testNumberLength(number, metadata, PhoneNumberType.MOBILE);
} else {
PhoneNumberDesc mobileDesc = getNumberDescByType(metadata, PhoneNumberType.MOBILE);
if (descHasPossibleNumberData(mobileDesc)) {
// Merge the mobile data in if there was any. We have to make a copy to do this.
possibleLengths = new ArrayList<Integer>(possibleLengths);
// Note that when adding the possible lengths from mobile, we have to again check they
// aren't empty since if they are this indicates they are the same as the general desc and
// should be obtained from there.
possibleLengths.addAll(mobileDesc.getPossibleLengthList().size() == 0
? metadata.getGeneralDesc().getPossibleLengthList()
: mobileDesc.getPossibleLengthList());
// The current list is sorted; we need to merge in the new list and re-sort (duplicates
// are okay). Sorting isn't so expensive because the lists are very small.
Collections.sort(possibleLengths);
if (localLengths.isEmpty()) {
localLengths = mobileDesc.getPossibleLengthLocalOnlyList();
} else {
localLengths = new ArrayList<Integer>(localLengths);
localLengths.addAll(mobileDesc.getPossibleLengthLocalOnlyList());
Collections.sort(localLengths);
}
}
}
}
// If the type is not supported at all (indicated by the possible lengths containing -1 at this
// point) we return invalid length.
if (possibleLengths.get(0) == -1) {
return ValidationResult.INVALID_LENGTH;
}
int actualLength = number.length();
// This is safe because there is never an overlap beween the possible lengths and the local-only
// lengths; this is checked at build time.
if (localLengths.contains(actualLength)) {
return ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
}
int minimumLength = possibleLengths.get(0);
if (minimumLength == actualLength) {
return ValidationResult.IS_POSSIBLE;
} else if (minimumLength > actualLength) {
return ValidationResult.TOO_SHORT;
} else if (possibleLengths.get(possibleLengths.size() - 1) < actualLength) {
return ValidationResult.TOO_LONG;
}
// We skip the first element; we've already checked it.
return possibleLengths.subList(1, possibleLengths.size()).contains(actualLength)
? ValidationResult.IS_POSSIBLE : ValidationResult.INVALID_LENGTH;
}
/**
* Check whether a phone number is a possible number. It provides a more lenient check than
* {@link #isValidNumber} in the following sense:
* <ol>
* <li> It only checks the length of phone numbers. In particular, it doesn't check starting
* digits of the number.
* <li> It doesn't attempt to figure out the type of the number, but uses general rules which
* applies to all types of phone numbers in a region. Therefore, it is much faster than
* isValidNumber.
* <li> For some numbers (particularly fixed-line), many regions have the concept of area code,
* which together with subscriber number constitute the national significant number. It is
* sometimes okay to dial only the subscriber number when dialing in the same area. This
* function will return IS_POSSIBLE_LOCAL_ONLY if the subscriber-number-only version is
* passed in. On the other hand, because isValidNumber validates using information on both
* starting digits (for fixed line numbers, that would most likely be area codes) and
* length (obviously includes the length of area codes for fixed line numbers), it will
* return false for the subscriber-number-only version.
* </ol>
* @param number the number that needs to be checked
* @return a ValidationResult object which indicates whether the number is possible
*/
public ValidationResult isPossibleNumberWithReason(PhoneNumber number) {
return isPossibleNumberForTypeWithReason(number, PhoneNumberType.UNKNOWN);
}
/**
* Check whether a phone number is a possible number of a particular type. For types that don't
* exist in a particular region, this will return a result that isn't so useful; it is recommended
* that you use {@link #getSupportedTypesForRegion} or {@link #getSupportedTypesForNonGeoEntity}
* respectively before calling this method to determine whether you should call it for this number
* at all.
*
* This provides a more lenient check than {@link #isValidNumber} in the following sense:
*
* <ol>
* <li> It only checks the length of phone numbers. In particular, it doesn't check starting
* digits of the number.
* <li> For some numbers (particularly fixed-line), many regions have the concept of area code,
* which together with subscriber number constitute the national significant number. It is
* sometimes okay to dial only the subscriber number when dialing in the same area. This
* function will return IS_POSSIBLE_LOCAL_ONLY if the subscriber-number-only version is
* passed in. On the other hand, because isValidNumber validates using information on both
* starting digits (for fixed line numbers, that would most likely be area codes) and
* length (obviously includes the length of area codes for fixed line numbers), it will
* return false for the subscriber-number-only version.
* </ol>
*
* @param number the number that needs to be checked
* @param type the type we are interested in
* @return a ValidationResult object which indicates whether the number is possible
*/
public ValidationResult isPossibleNumberForTypeWithReason(
PhoneNumber number, PhoneNumberType type) {
String nationalNumber = getNationalSignificantNumber(number);
int countryCode = number.getCountryCode();
// Note: For regions that share a country calling code, like NANPA numbers, we just use the
// rules from the default region (US in this case) since the getRegionCodeForNumber will not
// work if the number is possible but not valid. There is in fact one country calling code (290)
// where the possible number pattern differs between various regions (Saint Helena and Tristan
// da Cuñha), but this is handled by putting all possible lengths for any country with this
// country calling code in the metadata for the default region in this case.
if (!hasValidCountryCallingCode(countryCode)) {
return ValidationResult.INVALID_COUNTRY_CODE;
}
String regionCode = getRegionCodeForCountryCode(countryCode);
// Metadata cannot be null because the country calling code is valid.
PhoneMetadata metadata = getMetadataForRegionOrCallingCode(countryCode, regionCode);
return testNumberLength(nationalNumber, metadata, type);
}
/**
* Check whether a phone number is a possible number given a number in the form of a string, and
* the region where the number could be dialed from. It provides a more lenient check than
* {@link #isValidNumber}. See {@link #isPossibleNumber(PhoneNumber)} for details.
*
* <p>This method first parses the number, then invokes {@link #isPossibleNumber(PhoneNumber)}
* with the resultant PhoneNumber object.
*
* @param number the number that needs to be checked
* @param regionDialingFrom the region that we are expecting the number to be dialed from.
* Note this is different from the region where the number belongs. For example, the number
* +1 650 253 0000 is a number that belongs to US. When written in this form, it can be
* dialed from any region. When it is written as 00 1 650 253 0000, it can be dialed from any
* region which uses an international dialling prefix of 00. When it is written as
* 650 253 0000, it can only be dialed from within the US, and when written as 253 0000, it
* can only be dialed from within a smaller area in the US (Mountain View, CA, to be more
* specific).
* @return true if the number is possible
*/
public boolean isPossibleNumber(CharSequence number, String regionDialingFrom) {
try {
return isPossibleNumber(parse(number, regionDialingFrom));
} catch (NumberParseException e) {
return false;
}
}
/**
* Attempts to extract a valid number from a phone number that is too long to be valid, and resets
* the PhoneNumber object passed in to that valid version. If no valid number could be extracted,
* the PhoneNumber object passed in will not be modified.
* @param number a PhoneNumber object which contains a number that is too long to be valid
* @return true if a valid phone number can be successfully extracted
*/
public boolean truncateTooLongNumber(PhoneNumber number) {
if (isValidNumber(number)) {
return true;
}
PhoneNumber numberCopy = new PhoneNumber();
numberCopy.mergeFrom(number);
long nationalNumber = number.getNationalNumber();
do {
nationalNumber /= 10;
numberCopy.setNationalNumber(nationalNumber);
if (isPossibleNumberWithReason(numberCopy) == ValidationResult.TOO_SHORT
|| nationalNumber == 0) {
return false;
}
} while (!isValidNumber(numberCopy));
number.setNationalNumber(nationalNumber);
return true;
}
/**
* Gets an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} for the specific region.
*
* @param regionCode the region where the phone number is being entered
* @return an {@link com.google.i18n.phonenumbers.AsYouTypeFormatter} object, which can be used
* to format phone numbers in the specific region "as you type"
*/
public AsYouTypeFormatter getAsYouTypeFormatter(String regionCode) {
return new AsYouTypeFormatter(regionCode);
}
// Extracts country calling code from fullNumber, returns it and places the remaining number in
// nationalNumber. It assumes that the leading plus sign or IDD has already been removed. Returns
// 0 if fullNumber doesn't start with a valid country calling code, and leaves nationalNumber
// unmodified.
int extractCountryCode(StringBuilder fullNumber, StringBuilder nationalNumber) {
if ((fullNumber.length() == 0) || (fullNumber.charAt(0) == '0')) {
// Country codes do not begin with a '0'.
return 0;
}
int potentialCountryCode;
int numberLength = fullNumber.length();
for (int i = 1; i <= MAX_LENGTH_COUNTRY_CODE && i <= numberLength; i++) {
potentialCountryCode = Integer.parseInt(fullNumber.substring(0, i));
if (countryCallingCodeToRegionCodeMap.containsKey(potentialCountryCode)) {
nationalNumber.append(fullNumber.substring(i));
return potentialCountryCode;
}
}
return 0;
}
/**
* Tries to extract a country calling code from a number. This method will return zero if no
* country calling code is considered to be present. Country calling codes are extracted in the
* following ways:
* <ul>
* <li> by stripping the international dialing prefix of the region the person is dialing from,
* if this is present in the number, and looking at the next digits
* <li> by stripping the '+' sign if present and then looking at the next digits
* <li> by comparing the start of the number and the country calling code of the default region.
* If the number is not considered possible for the numbering plan of the default region
* initially, but starts with the country calling code of this region, validation will be
* reattempted after stripping this country calling code. If this number is considered a
* possible number, then the first digits will be considered the country calling code and
* removed as such.
* </ul>
* It will throw a NumberParseException if the number starts with a '+' but the country calling
* code supplied after this does not match that of any known region.
*
* @param number non-normalized telephone number that we wish to extract a country calling
* code from - may begin with '+'
* @param defaultRegionMetadata metadata about the region this number may be from
* @param nationalNumber a string buffer to store the national significant number in, in the case
* that a country calling code was extracted. The number is appended to any existing contents.
* If no country calling code was extracted, this will be left unchanged.
* @param keepRawInput true if the country_code_source and preferred_carrier_code fields of
* phoneNumber should be populated.
* @param phoneNumber the PhoneNumber object where the country_code and country_code_source need
* to be populated. Note the country_code is always populated, whereas country_code_source is
* only populated when keepCountryCodeSource is true.
* @return the country calling code extracted or 0 if none could be extracted
*/
// @VisibleForTesting
int maybeExtractCountryCode(CharSequence number, PhoneMetadata defaultRegionMetadata,
StringBuilder nationalNumber, boolean keepRawInput,
PhoneNumber phoneNumber)
throws NumberParseException {
if (number.length() == 0) {
return 0;
}
StringBuilder fullNumber = new StringBuilder(number);
// Set the default prefix to be something that will never match.
String possibleCountryIddPrefix = "NonMatch";
if (defaultRegionMetadata != null) {
possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix();
}
CountryCodeSource countryCodeSource =
maybeStripInternationalPrefixAndNormalize(fullNumber, possibleCountryIddPrefix);
if (keepRawInput) {
phoneNumber.setCountryCodeSource(countryCodeSource);
}
if (countryCodeSource != CountryCodeSource.FROM_DEFAULT_COUNTRY) {
if (fullNumber.length() <= MIN_LENGTH_FOR_NSN) {
throw new NumberParseException(NumberParseException.ErrorType.TOO_SHORT_AFTER_IDD,
"Phone number had an IDD, but after this was not "
+ "long enough to be a viable phone number.");
}
int potentialCountryCode = extractCountryCode(fullNumber, nationalNumber);
if (potentialCountryCode != 0) {
phoneNumber.setCountryCode(potentialCountryCode);
return potentialCountryCode;
}
// If this fails, they must be using a strange country calling code that we don't recognize,
// or that doesn't exist.
throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
"Country calling code supplied was not recognised.");
} else if (defaultRegionMetadata != null) {
// Check to see if the number starts with the country calling code for the default region. If
// so, we remove the country calling code, and do some checks on the validity of the number
// before and after.
int defaultCountryCode = defaultRegionMetadata.getCountryCode();
String defaultCountryCodeString = String.valueOf(defaultCountryCode);
String normalizedNumber = fullNumber.toString();
if (normalizedNumber.startsWith(defaultCountryCodeString)) {
StringBuilder potentialNationalNumber =
new StringBuilder(normalizedNumber.substring(defaultCountryCodeString.length()));
PhoneNumberDesc generalDesc = defaultRegionMetadata.getGeneralDesc();
maybeStripNationalPrefixAndCarrierCode(
potentialNationalNumber, defaultRegionMetadata, null /* Don't need the carrier code */);
// If the number was not valid before but is valid now, or if it was too long before, we
// consider the number with the country calling code stripped to be a better result and
// keep that instead.
if ((!matcherApi.matchNationalNumber(fullNumber, generalDesc, false)
&& matcherApi.matchNationalNumber(potentialNationalNumber, generalDesc, false))
|| testNumberLength(fullNumber, defaultRegionMetadata) == ValidationResult.TOO_LONG) {
nationalNumber.append(potentialNationalNumber);
if (keepRawInput) {
phoneNumber.setCountryCodeSource(CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN);
}
phoneNumber.setCountryCode(defaultCountryCode);
return defaultCountryCode;
}
}
}
// No country calling code present.
phoneNumber.setCountryCode(0);
return 0;
}
/**
* Strips the IDD from the start of the number if present. Helper function used by
* maybeStripInternationalPrefixAndNormalize.
*/
private boolean parsePrefixAsIdd(Pattern iddPattern, StringBuilder number) {
Matcher m = iddPattern.matcher(number);
if (m.lookingAt()) {
int matchEnd = m.end();
// Only strip this if the first digit after the match is not a 0, since country calling codes
// cannot begin with 0.
Matcher digitMatcher = CAPTURING_DIGIT_PATTERN.matcher(number.substring(matchEnd));
if (digitMatcher.find()) {
String normalizedGroup = normalizeDigitsOnly(digitMatcher.group(1));
if (normalizedGroup.equals("0")) {
return false;
}
}
number.delete(0, matchEnd);
return true;
}
return false;
}
/**
* Strips any international prefix (such as +, 00, 011) present in the number provided, normalizes
* the resulting number, and indicates if an international prefix was present.
*
* @param number the non-normalized telephone number that we wish to strip any international
* dialing prefix from
* @param possibleIddPrefix the international direct dialing prefix from the region we
* think this number may be dialed in
* @return the corresponding CountryCodeSource if an international dialing prefix could be
* removed from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if the number did
* not seem to be in international format
*/
// @VisibleForTesting
CountryCodeSource maybeStripInternationalPrefixAndNormalize(
StringBuilder number,
String possibleIddPrefix) {
if (number.length() == 0) {
return CountryCodeSource.FROM_DEFAULT_COUNTRY;
}
// Check to see if the number begins with one or more plus signs.
Matcher m = PLUS_CHARS_PATTERN.matcher(number);
if (m.lookingAt()) {
number.delete(0, m.end());
// Can now normalize the rest of the number since we've consumed the "+" sign at the start.
normalize(number);
return CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN;
}
// Attempt to parse the first digits as an international prefix.
Pattern iddPattern = regexCache.getPatternForRegex(possibleIddPrefix);
normalize(number);
return parsePrefixAsIdd(iddPattern, number)
? CountryCodeSource.FROM_NUMBER_WITH_IDD
: CountryCodeSource.FROM_DEFAULT_COUNTRY;
}
/**
* Strips any national prefix (such as 0, 1) present in the number provided.
*
* @param number the normalized telephone number that we wish to strip any national
* dialing prefix from
* @param metadata the metadata for the region that we think this number is from
* @param carrierCode a place to insert the carrier code if one is extracted
* @return true if a national prefix or carrier code (or both) could be extracted
*/
// @VisibleForTesting
boolean maybeStripNationalPrefixAndCarrierCode(
StringBuilder number, PhoneMetadata metadata, StringBuilder carrierCode) {
int numberLength = number.length();
String possibleNationalPrefix = metadata.getNationalPrefixForParsing();
if (numberLength == 0 || possibleNationalPrefix.length() == 0) {
// Early return for numbers of zero length.
return false;
}
// Attempt to parse the first digits as a national prefix.
Matcher prefixMatcher = regexCache.getPatternForRegex(possibleNationalPrefix).matcher(number);
if (prefixMatcher.lookingAt()) {
PhoneNumberDesc generalDesc = metadata.getGeneralDesc();
// Check if the original number is viable.
boolean isViableOriginalNumber = matcherApi.matchNationalNumber(number, generalDesc, false);
// prefixMatcher.group(numOfGroups) == null implies nothing was captured by the capturing
// groups in possibleNationalPrefix; therefore, no transformation is necessary, and we just
// remove the national prefix.
int numOfGroups = prefixMatcher.groupCount();
String transformRule = metadata.getNationalPrefixTransformRule();
if (transformRule == null || transformRule.length() == 0
|| prefixMatcher.group(numOfGroups) == null) {
// If the original number was viable, and the resultant number is not, we return.
if (isViableOriginalNumber
&& !matcherApi.matchNationalNumber(
number.substring(prefixMatcher.end()), generalDesc, false)) {
return false;
}
if (carrierCode != null && numOfGroups > 0 && prefixMatcher.group(numOfGroups) != null) {
carrierCode.append(prefixMatcher.group(1));
}
number.delete(0, prefixMatcher.end());
return true;
} else {
// Check that the resultant number is still viable. If not, return. Check this by copying
// the string buffer and making the transformation on the copy first.
StringBuilder transformedNumber = new StringBuilder(number);
transformedNumber.replace(0, numberLength, prefixMatcher.replaceFirst(transformRule));
if (isViableOriginalNumber
&& !matcherApi.matchNationalNumber(transformedNumber.toString(), generalDesc, false)) {
return false;
}
if (carrierCode != null && numOfGroups > 1) {
carrierCode.append(prefixMatcher.group(1));
}
number.replace(0, number.length(), transformedNumber.toString());
return true;
}
}
return false;
}
/**
* Strips any extension (as in, the part of the number dialled after the call is connected,
* usually indicated with extn, ext, x or similar) from the end of the number, and returns it.
*
* @param number the non-normalized telephone number that we wish to strip the extension from
* @return the phone extension
*/
// @VisibleForTesting
String maybeStripExtension(StringBuilder number) {
Matcher m = EXTN_PATTERN.matcher(number);
// If we find a potential extension, and the number preceding this is a viable number, we assume
// it is an extension.
if (m.find() && isViablePhoneNumber(number.substring(0, m.start()))) {
// The numbers are captured into groups in the regular expression.
for (int i = 1, length = m.groupCount(); i <= length; i++) {
if (m.group(i) != null) {
// We go through the capturing groups until we find one that captured some digits. If none
// did, then we will return the empty string.
String extension = m.group(i);
number.delete(m.start(), number.length());
return extension;
}
}
}
return "";
}
/**
* Checks to see that the region code used is valid, or if it is not valid, that the number to
* parse starts with a + symbol so that we can attempt to infer the region from the number.
* Returns false if it cannot use the region provided and the region cannot be inferred.
*/
private boolean checkRegionForParsing(CharSequence numberToParse, String defaultRegion) {
if (!isValidRegionCode(defaultRegion)) {
// If the number is null or empty, we can't infer the region.
if ((numberToParse == null) || (numberToParse.length() == 0)
|| !PLUS_CHARS_PATTERN.matcher(numberToParse).lookingAt()) {
return false;
}
}
return true;
}
/**
* Parses a string and returns it as a phone number in proto buffer format. The method is quite
* lenient and looks for a number in the input text (raw input) and does not check whether the
* string is definitely only a phone number. To do this, it ignores punctuation and white-space,
* as well as any text before the number (e.g. a leading "Tel: ") and trims the non-number bits.
* It will accept a number in any format (E164, national, international etc), assuming it can be
* interpreted with the defaultRegion supplied. It also attempts to convert any alpha characters
* into digits if it thinks this is a vanity number of the type "1800 MICROSOFT".
*
* <p> This method will throw a {@link com.google.i18n.phonenumbers.NumberParseException} if the
* number is not considered to be a possible number. Note that validation of whether the number
* is actually a valid number for a particular region is not performed. This can be done
* separately with {@link #isValidNumber}.
*
* <p> Note this method canonicalizes the phone number such that different representations can be
* easily compared, no matter what form it was originally entered in (e.g. national,
* international). If you want to record context about the number being parsed, such as the raw
* input that was entered, how the country code was derived etc. then call {@link
* #parseAndKeepRawInput} instead.
*
* @param numberToParse number that we are attempting to parse. This can contain formatting such
* as +, ( and -, as well as a phone number extension. It can also be provided in RFC3966
* format.
* @param defaultRegion region that we are expecting the number to be from. This is only used if
* the number being parsed is not written in international format. The country_code for the
* number in this case would be stored as that of the default region supplied. If the number
* is guaranteed to start with a '+' followed by the country calling code, then RegionCode.ZZ
* or null can be supplied.
* @return a phone number proto buffer filled with the parsed number
* @throws NumberParseException if the string is not considered to be a viable phone number (e.g.
* too few or too many digits) or if no default region was supplied and the number is not in
* international format (does not start with +)
*/
public PhoneNumber parse(CharSequence numberToParse, String defaultRegion)
throws NumberParseException {
PhoneNumber phoneNumber = new PhoneNumber();
parse(numberToParse, defaultRegion, phoneNumber);
return phoneNumber;
}
/**
* Same as {@link #parse(CharSequence, String)}, but accepts mutable PhoneNumber as a
* parameter to decrease object creation when invoked many times.
*/
public void parse(CharSequence numberToParse, String defaultRegion, PhoneNumber phoneNumber)
throws NumberParseException {
parseHelper(numberToParse, defaultRegion, false, true, phoneNumber);
}
/**
* Parses a string and returns it in proto buffer format. This method differs from {@link #parse}
* in that it always populates the raw_input field of the protocol buffer with numberToParse as
* well as the country_code_source field.
*
* @param numberToParse number that we are attempting to parse. This can contain formatting such
* as +, ( and -, as well as a phone number extension.
* @param defaultRegion region that we are expecting the number to be from. This is only used if
* the number being parsed is not written in international format. The country calling code
* for the number in this case would be stored as that of the default region supplied.
* @return a phone number proto buffer filled with the parsed number
* @throws NumberParseException if the string is not considered to be a viable phone number or if
* no default region was supplied
*/
public PhoneNumber parseAndKeepRawInput(CharSequence numberToParse, String defaultRegion)
throws NumberParseException {
PhoneNumber phoneNumber = new PhoneNumber();
parseAndKeepRawInput(numberToParse, defaultRegion, phoneNumber);
return phoneNumber;
}
/**
* Same as{@link #parseAndKeepRawInput(CharSequence, String)}, but accepts a mutable
* PhoneNumber as a parameter to decrease object creation when invoked many times.
*/
public void parseAndKeepRawInput(CharSequence numberToParse, String defaultRegion,
PhoneNumber phoneNumber)
throws NumberParseException {
parseHelper(numberToParse, defaultRegion, true, true, phoneNumber);
}
/**
* Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}. This
* is a shortcut for {@link #findNumbers(CharSequence, String, Leniency, long)
* getMatcher(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE)}.
*
* @param text the text to search for phone numbers, null for no text
* @param defaultRegion region that we are expecting the number to be from. This is only used if
* the number being parsed is not written in international format. The country_code for the
* number in this case would be stored as that of the default region supplied. May be null if
* only international numbers are expected.
*/
public Iterable<PhoneNumberMatch> findNumbers(CharSequence text, String defaultRegion) {
return findNumbers(text, defaultRegion, Leniency.VALID, Long.MAX_VALUE);
}
/**
* Returns an iterable over all {@link PhoneNumberMatch PhoneNumberMatches} in {@code text}.
*
* @param text the text to search for phone numbers, null for no text
* @param defaultRegion region that we are expecting the number to be from. This is only used if
* the number being parsed is not written in international format. The country_code for the
* number in this case would be stored as that of the default region supplied. May be null if
* only international numbers are expected.
* @param leniency the leniency to use when evaluating candidate phone numbers
* @param maxTries the maximum number of invalid numbers to try before giving up on the text.
* This is to cover degenerate cases where the text has a lot of false positives in it. Must
* be {@code >= 0}.
*/
public Iterable<PhoneNumberMatch> findNumbers(
final CharSequence text, final String defaultRegion, final Leniency leniency,
final long maxTries) {
return new Iterable<PhoneNumberMatch>() {
@Override
public Iterator<PhoneNumberMatch> iterator() {
return new PhoneNumberMatcher(
PhoneNumberUtil.this, text, defaultRegion, leniency, maxTries);
}
};
}
/**
* A helper function to set the values related to leading zeros in a PhoneNumber.
*/
static void setItalianLeadingZerosForPhoneNumber(CharSequence nationalNumber,
PhoneNumber phoneNumber) {
if (nationalNumber.length() > 1 && nationalNumber.charAt(0) == '0') {
phoneNumber.setItalianLeadingZero(true);
int numberOfLeadingZeros = 1;
// Note that if the national number is all "0"s, the last "0" is not counted as a leading
// zero.
while (numberOfLeadingZeros < nationalNumber.length() - 1
&& nationalNumber.charAt(numberOfLeadingZeros) == '0') {
numberOfLeadingZeros++;
}
if (numberOfLeadingZeros != 1) {
phoneNumber.setNumberOfLeadingZeros(numberOfLeadingZeros);
}
}
}
/**
* Parses a string and fills up the phoneNumber. This method is the same as the public
* parse() method, with the exception that it allows the default region to be null, for use by
* isNumberMatch(). checkRegion should be set to false if it is permitted for the default region
* to be null or unknown ("ZZ").
*
* Note if any new field is added to this method that should always be filled in, even when
* keepRawInput is false, it should also be handled in the copyCoreFieldsOnly() method.
*/
private void parseHelper(CharSequence numberToParse, String defaultRegion,
boolean keepRawInput, boolean checkRegion, PhoneNumber phoneNumber)
throws NumberParseException {
if (numberToParse == null) {
throw new NumberParseException(NumberParseException.ErrorType.NOT_A_NUMBER,
"The phone number supplied was null.");
} else if (numberToParse.length() > MAX_INPUT_STRING_LENGTH) {
throw new NumberParseException(NumberParseException.ErrorType.TOO_LONG,
"The string supplied was too long to parse.");
}
StringBuilder nationalNumber = new StringBuilder();
String numberBeingParsed = numberToParse.toString();
buildNationalNumberForParsing(numberBeingParsed, nationalNumber);
if (!isViablePhoneNumber(nationalNumber)) {
throw new NumberParseException(NumberParseException.ErrorType.NOT_A_NUMBER,
"The string supplied did not seem to be a phone number.");
}
// Check the region supplied is valid, or that the extracted number starts with some sort of +
// sign so the number's region can be determined.
if (checkRegion && !checkRegionForParsing(nationalNumber, defaultRegion)) {
throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
"Missing or invalid default region.");
}
if (keepRawInput) {
phoneNumber.setRawInput(numberBeingParsed);
}
// Attempt to parse extension first, since it doesn't require region-specific data and we want
// to have the non-normalised number here.
String extension = maybeStripExtension(nationalNumber);
if (extension.length() > 0) {
phoneNumber.setExtension(extension);
}
PhoneMetadata regionMetadata = getMetadataForRegion(defaultRegion);
// Check to see if the number is given in international format so we know whether this number is
// from the default region or not.
StringBuilder normalizedNationalNumber = new StringBuilder();
int countryCode = 0;
try {
// TODO: This method should really just take in the string buffer that has already
// been created, and just remove the prefix, rather than taking in a string and then
// outputting a string buffer.
countryCode = maybeExtractCountryCode(nationalNumber, regionMetadata,
normalizedNationalNumber, keepRawInput, phoneNumber);
} catch (NumberParseException e) {
Matcher matcher = PLUS_CHARS_PATTERN.matcher(nationalNumber);
if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE
&& matcher.lookingAt()) {
// Strip the plus-char, and try again.
countryCode = maybeExtractCountryCode(nationalNumber.substring(matcher.end()),
regionMetadata, normalizedNationalNumber,
keepRawInput, phoneNumber);
if (countryCode == 0) {
throw new NumberParseException(NumberParseException.ErrorType.INVALID_COUNTRY_CODE,
"Could not interpret numbers after plus-sign.");
}
} else {
throw new NumberParseException(e.getErrorType(), e.getMessage());
}
}
if (countryCode != 0) {
String phoneNumberRegion = getRegionCodeForCountryCode(countryCode);
if (!phoneNumberRegion.equals(defaultRegion)) {
// Metadata cannot be null because the country calling code is valid.
regionMetadata = getMetadataForRegionOrCallingCode(countryCode, phoneNumberRegion);
}
} else {
// If no extracted country calling code, use the region supplied instead. The national number
// is just the normalized version of the number we were given to parse.
normalizedNationalNumber.append(normalize(nationalNumber));
if (defaultRegion != null) {
countryCode = regionMetadata.getCountryCode();
phoneNumber.setCountryCode(countryCode);
} else if (keepRawInput) {
phoneNumber.clearCountryCodeSource();
}
}
if (normalizedNationalNumber.length() < MIN_LENGTH_FOR_NSN) {
throw new NumberParseException(NumberParseException.ErrorType.TOO_SHORT_NSN,
"The string supplied is too short to be a phone number.");
}
if (regionMetadata != null) {
StringBuilder carrierCode = new StringBuilder();
StringBuilder potentialNationalNumber = new StringBuilder(normalizedNationalNumber);
maybeStripNationalPrefixAndCarrierCode(potentialNationalNumber, regionMetadata, carrierCode);
// We require that the NSN remaining after stripping the national prefix and carrier code be
// long enough to be a possible length for the region. Otherwise, we don't do the stripping,
// since the original number could be a valid short number.
ValidationResult validationResult = testNumberLength(potentialNationalNumber, regionMetadata);
if (validationResult != ValidationResult.TOO_SHORT
&& validationResult != ValidationResult.IS_POSSIBLE_LOCAL_ONLY
&& validationResult != ValidationResult.INVALID_LENGTH) {
normalizedNationalNumber = potentialNationalNumber;
if (keepRawInput && carrierCode.length() > 0) {
phoneNumber.setPreferredDomesticCarrierCode(carrierCode.toString());
}
}
}
int lengthOfNationalNumber = normalizedNationalNumber.length();
if (lengthOfNationalNumber < MIN_LENGTH_FOR_NSN) {
throw new NumberParseException(NumberParseException.ErrorType.TOO_SHORT_NSN,
"The string supplied is too short to be a phone number.");
}
if (lengthOfNationalNumber > MAX_LENGTH_FOR_NSN) {
throw new NumberParseException(NumberParseException.ErrorType.TOO_LONG,
"The string supplied is too long to be a phone number.");
}
setItalianLeadingZerosForPhoneNumber(normalizedNationalNumber, phoneNumber);
phoneNumber.setNationalNumber(Long.parseLong(normalizedNationalNumber.toString()));
}
/**
* Converts numberToParse to a form that we can parse and write it to nationalNumber if it is
* written in RFC3966; otherwise extract a possible number out of it and write to nationalNumber.
*/
private void buildNationalNumberForParsing(String numberToParse, StringBuilder nationalNumber) {
int indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT);
if (indexOfPhoneContext >= 0) {
int phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT.length();
// If the phone context contains a phone number prefix, we need to capture it, whereas domains
// will be ignored.
if (phoneContextStart < (numberToParse.length() - 1)
&& numberToParse.charAt(phoneContextStart) == PLUS_SIGN) {
// Additional parameters might follow the phone context. If so, we will remove them here
// because the parameters after phone context are not important for parsing the
// phone number.
int phoneContextEnd = numberToParse.indexOf(';', phoneContextStart);
if (phoneContextEnd > 0) {
nationalNumber.append(numberToParse.substring(phoneContextStart, phoneContextEnd));
} else {
nationalNumber.append(numberToParse.substring(phoneContextStart));
}
}
// Now append everything between the "tel:" prefix and the phone-context. This should include
// the national number, an optional extension or isdn-subaddress component. Note we also
// handle the case when "tel:" is missing, as we have seen in some of the phone number inputs.
// In that case, we append everything from the beginning.
int indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX);
int indexOfNationalNumber = (indexOfRfc3966Prefix >= 0)
? indexOfRfc3966Prefix + RFC3966_PREFIX.length() : 0;
nationalNumber.append(numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext));
} else {
// Extract a possible number from the string passed in (this strips leading characters that
// could not be the start of a phone number.)
nationalNumber.append(extractPossibleNumber(numberToParse));
}
// Delete the isdn-subaddress and everything after it if it is present. Note extension won't
// appear at the same time with isdn-subaddress according to paragraph 5.3 of the RFC3966 spec,
int indexOfIsdn = nationalNumber.indexOf(RFC3966_ISDN_SUBADDRESS);
if (indexOfIsdn > 0) {
nationalNumber.delete(indexOfIsdn, nationalNumber.length());
}
// If both phone context and isdn-subaddress are absent but other parameters are present, the
// parameters are left in nationalNumber. This is because we are concerned about deleting
// content from a potential number string when there is no strong evidence that the number is
// actually written in RFC3966.
}
/**
* Returns a new phone number containing only the fields needed to uniquely identify a phone
* number, rather than any fields that capture the context in which the phone number was created.
* These fields correspond to those set in parse() rather than parseAndKeepRawInput().
*/
private static PhoneNumber copyCoreFieldsOnly(PhoneNumber phoneNumberIn) {
PhoneNumber phoneNumber = new PhoneNumber();
phoneNumber.setCountryCode(phoneNumberIn.getCountryCode());
phoneNumber.setNationalNumber(phoneNumberIn.getNationalNumber());
if (phoneNumberIn.getExtension().length() > 0) {
phoneNumber.setExtension(phoneNumberIn.getExtension());
}
if (phoneNumberIn.isItalianLeadingZero()) {
phoneNumber.setItalianLeadingZero(true);
// This field is only relevant if there are leading zeros at all.
phoneNumber.setNumberOfLeadingZeros(phoneNumberIn.getNumberOfLeadingZeros());
}
return phoneNumber;
}
/**
* Takes two phone numbers and compares them for equality.
*
* <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero for Italian numbers
* and any extension present are the same.
* Returns NSN_MATCH if either or both has no region specified, and the NSNs and extensions are
* the same.
* Returns SHORT_NSN_MATCH if either or both has no region specified, or the region specified is
* the same, and one NSN could be a shorter version of the other number. This includes the case
* where one has an extension specified, and the other does not.
* Returns NO_MATCH otherwise.
* For example, the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH.
* The numbers +1 345 657 1234 and 345 657 are a NO_MATCH.
*
* @param firstNumberIn first number to compare
* @param secondNumberIn second number to compare
*
* @return NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH or EXACT_MATCH depending on the level of equality
* of the two numbers, described in the method definition.
*/
public MatchType isNumberMatch(PhoneNumber firstNumberIn, PhoneNumber secondNumberIn) {
// We only care about the fields that uniquely define a number, so we copy these across
// explicitly.
PhoneNumber firstNumber = copyCoreFieldsOnly(firstNumberIn);
PhoneNumber secondNumber = copyCoreFieldsOnly(secondNumberIn);
// Early exit if both had extensions and these are different.
if (firstNumber.hasExtension() && secondNumber.hasExtension()
&& !firstNumber.getExtension().equals(secondNumber.getExtension())) {
return MatchType.NO_MATCH;
}
int firstNumberCountryCode = firstNumber.getCountryCode();
int secondNumberCountryCode = secondNumber.getCountryCode();
// Both had country_code specified.
if (firstNumberCountryCode != 0 && secondNumberCountryCode != 0) {
if (firstNumber.exactlySameAs(secondNumber)) {
return MatchType.EXACT_MATCH;
} else if (firstNumberCountryCode == secondNumberCountryCode
&& isNationalNumberSuffixOfTheOther(firstNumber, secondNumber)) {
// A SHORT_NSN_MATCH occurs if there is a difference because of the presence or absence of
// an 'Italian leading zero', the presence or absence of an extension, or one NSN being a
// shorter variant of the other.
return MatchType.SHORT_NSN_MATCH;
}
// This is not a match.
return MatchType.NO_MATCH;
}
// Checks cases where one or both country_code fields were not specified. To make equality
// checks easier, we first set the country_code fields to be equal.
firstNumber.setCountryCode(secondNumberCountryCode);
// If all else was the same, then this is an NSN_MATCH.
if (firstNumber.exactlySameAs(secondNumber)) {
return MatchType.NSN_MATCH;
}
if (isNationalNumberSuffixOfTheOther(firstNumber, secondNumber)) {
return MatchType.SHORT_NSN_MATCH;
}
return MatchType.NO_MATCH;
}
// Returns true when one national number is the suffix of the other or both are the same.
private boolean isNationalNumberSuffixOfTheOther(PhoneNumber firstNumber,
PhoneNumber secondNumber) {
String firstNumberNationalNumber = String.valueOf(firstNumber.getNationalNumber());
String secondNumberNationalNumber = String.valueOf(secondNumber.getNationalNumber());
// Note that endsWith returns true if the numbers are equal.
return firstNumberNationalNumber.endsWith(secondNumberNationalNumber)
|| secondNumberNationalNumber.endsWith(firstNumberNationalNumber);
}
/**
* Takes two phone numbers as strings and compares them for equality. This is a convenience
* wrapper for {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known.
*
* @param firstNumber first number to compare. Can contain formatting, and can have country
* calling code specified with + at the start.
* @param secondNumber second number to compare. Can contain formatting, and can have country
* calling code specified with + at the start.
* @return NOT_A_NUMBER, NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH, EXACT_MATCH. See
* {@link #isNumberMatch(PhoneNumber, PhoneNumber)} for more details.
*/
public MatchType isNumberMatch(CharSequence firstNumber, CharSequence secondNumber) {
try {
PhoneNumber firstNumberAsProto = parse(firstNumber, UNKNOWN_REGION);
return isNumberMatch(firstNumberAsProto, secondNumber);
} catch (NumberParseException e) {
if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) {
try {
PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION);
return isNumberMatch(secondNumberAsProto, firstNumber);
} catch (NumberParseException e2) {
if (e2.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) {
try {
PhoneNumber firstNumberProto = new PhoneNumber();
PhoneNumber secondNumberProto = new PhoneNumber();
parseHelper(firstNumber, null, false, false, firstNumberProto);
parseHelper(secondNumber, null, false, false, secondNumberProto);
return isNumberMatch(firstNumberProto, secondNumberProto);
} catch (NumberParseException e3) {
// Fall through and return MatchType.NOT_A_NUMBER.
}
}
}
}
}
// One or more of the phone numbers we are trying to match is not a viable phone number.
return MatchType.NOT_A_NUMBER;
}
/**
* Takes two phone numbers and compares them for equality. This is a convenience wrapper for
* {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known.
*
* @param firstNumber first number to compare in proto buffer format
* @param secondNumber second number to compare. Can contain formatting, and can have country
* calling code specified with + at the start.
* @return NOT_A_NUMBER, NO_MATCH, SHORT_NSN_MATCH, NSN_MATCH, EXACT_MATCH. See
* {@link #isNumberMatch(PhoneNumber, PhoneNumber)} for more details.
*/
public MatchType isNumberMatch(PhoneNumber firstNumber, CharSequence secondNumber) {
// First see if the second number has an implicit country calling code, by attempting to parse
// it.
try {
PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION);
return isNumberMatch(firstNumber, secondNumberAsProto);
} catch (NumberParseException e) {
if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) {
// The second number has no country calling code. EXACT_MATCH is no longer possible.
// We parse it as if the region was the same as that for the first number, and if
// EXACT_MATCH is returned, we replace this with NSN_MATCH.
String firstNumberRegion = getRegionCodeForCountryCode(firstNumber.getCountryCode());
try {
if (!firstNumberRegion.equals(UNKNOWN_REGION)) {
PhoneNumber secondNumberWithFirstNumberRegion = parse(secondNumber, firstNumberRegion);
MatchType match = isNumberMatch(firstNumber, secondNumberWithFirstNumberRegion);
if (match == MatchType.EXACT_MATCH) {
return MatchType.NSN_MATCH;
}
return match;
} else {
// If the first number didn't have a valid country calling code, then we parse the
// second number without one as well.
PhoneNumber secondNumberProto = new PhoneNumber();
parseHelper(secondNumber, null, false, false, secondNumberProto);
return isNumberMatch(firstNumber, secondNumberProto);
}
} catch (NumberParseException e2) {
// Fall-through to return NOT_A_NUMBER.
}
}
}
// One or more of the phone numbers we are trying to match is not a viable phone number.
return MatchType.NOT_A_NUMBER;
}
/**
* Returns true if the number can be dialled from outside the region, or unknown. If the number
* can only be dialled from within the region, returns false. Does not check the number is a valid
* number. Note that, at the moment, this method does not handle short numbers (which are
* currently all presumed to not be diallable from outside their country).
*
* @param number the phone-number for which we want to know whether it is diallable from
* outside the region
*/
public boolean canBeInternationallyDialled(PhoneNumber number) {
PhoneMetadata metadata = getMetadataForRegion(getRegionCodeForNumber(number));
if (metadata == null) {
// Note numbers belonging to non-geographical entities (e.g. +800 numbers) are always
// internationally diallable, and will be caught here.
return true;
}
String nationalSignificantNumber = getNationalSignificantNumber(number);
return !isNumberMatchingDesc(nationalSignificantNumber, metadata.getNoInternationalDialling());
}
/**
* Returns true if the supplied region supports mobile number portability. Returns false for
* invalid, unknown or regions that don't support mobile number portability.
*
* @param regionCode the region for which we want to know whether it supports mobile number
* portability or not
*/
public boolean isMobileNumberPortableRegion(String regionCode) {
PhoneMetadata metadata = getMetadataForRegion(regionCode);
if (metadata == null) {
logger.log(Level.WARNING, "Invalid or unknown region code provided: " + regionCode);
return false;
}
return metadata.isMobileNumberPortableRegion();
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java
|
Java
|
unknown
| 178,571
|
/*
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Definition of the class representing metadata for international telephone numbers. This class is
* hand created based on the class file compiled from phonemetadata.proto. Please refer to that file
* for detailed descriptions of the meaning of each field.
*
* <p>WARNING: This API isn't stable. It is considered libphonenumber-internal and can change at any
* time. We only declare it as public for easy inclusion in our build tools not in this package.
* Clients should not refer to this file, we do not commit to support backwards-compatibility or to
* warn about breaking changes.
*/
package com.google.i18n.phonenumbers;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
public final class Phonemetadata {
private Phonemetadata() {}
public static class NumberFormat implements Externalizable {
private static final long serialVersionUID = 1;
public NumberFormat() {}
/**
* Provides a dummy builder to 'emulate' the API of the code generated by the latest version of
* Protocol Buffers. This lets BuildMetadataFromXml class to build with both this hand created
* class and the one generated by the latest version of Protocol Buffers.
*/
public static final class Builder extends NumberFormat {
public NumberFormat build() {
return this;
}
public Builder mergeFrom(NumberFormat other) {
if (other.hasPattern()) {
setPattern(other.getPattern());
}
if (other.hasFormat()) {
setFormat(other.getFormat());
}
for (int i = 0; i < other.leadingDigitsPatternSize(); i++) {
addLeadingDigitsPattern(other.getLeadingDigitsPattern(i));
}
if (other.hasNationalPrefixFormattingRule()) {
setNationalPrefixFormattingRule(other.getNationalPrefixFormattingRule());
}
if (other.hasDomesticCarrierCodeFormattingRule()) {
setDomesticCarrierCodeFormattingRule(other.getDomesticCarrierCodeFormattingRule());
}
if (other.hasNationalPrefixOptionalWhenFormatting()) {
setNationalPrefixOptionalWhenFormatting(other.getNationalPrefixOptionalWhenFormatting());
}
return this;
}
}
public static Builder newBuilder() {
return new Builder();
}
// required string pattern = 1;
private boolean hasPattern;
private String pattern_ = "";
public boolean hasPattern() { return hasPattern; }
public String getPattern() { return pattern_; }
public NumberFormat setPattern(String value) {
hasPattern = true;
pattern_ = value;
return this;
}
// required string format = 2;
private boolean hasFormat;
private String format_ = "";
public boolean hasFormat() { return hasFormat; }
public String getFormat() { return format_; }
public NumberFormat setFormat(String value) {
hasFormat = true;
format_ = value;
return this;
}
// repeated string leading_digits_pattern = 3;
private java.util.List<String> leadingDigitsPattern_ = new java.util.ArrayList<String>();
public java.util.List<String> leadingDigitPatterns() {
return leadingDigitsPattern_;
}
public int leadingDigitsPatternSize() { return leadingDigitsPattern_.size(); }
public String getLeadingDigitsPattern(int index) {
return leadingDigitsPattern_.get(index);
}
public NumberFormat addLeadingDigitsPattern(String value) {
if (value == null) {
throw new NullPointerException();
}
leadingDigitsPattern_.add(value);
return this;
}
// optional string national_prefix_formatting_rule = 4;
private boolean hasNationalPrefixFormattingRule;
private String nationalPrefixFormattingRule_ = "";
public boolean hasNationalPrefixFormattingRule() { return hasNationalPrefixFormattingRule; }
public String getNationalPrefixFormattingRule() { return nationalPrefixFormattingRule_; }
public NumberFormat setNationalPrefixFormattingRule(String value) {
hasNationalPrefixFormattingRule = true;
nationalPrefixFormattingRule_ = value;
return this;
}
public NumberFormat clearNationalPrefixFormattingRule() {
hasNationalPrefixFormattingRule = false;
nationalPrefixFormattingRule_ = "";
return this;
}
// optional bool national_prefix_optional_when_formatting = 6 [default = false];
private boolean hasNationalPrefixOptionalWhenFormatting;
private boolean nationalPrefixOptionalWhenFormatting_ = false;
public boolean hasNationalPrefixOptionalWhenFormatting() {
return hasNationalPrefixOptionalWhenFormatting; }
public boolean getNationalPrefixOptionalWhenFormatting() {
return nationalPrefixOptionalWhenFormatting_; }
public NumberFormat setNationalPrefixOptionalWhenFormatting(boolean value) {
hasNationalPrefixOptionalWhenFormatting = true;
nationalPrefixOptionalWhenFormatting_ = value;
return this;
}
// optional string domestic_carrier_code_formatting_rule = 5;
private boolean hasDomesticCarrierCodeFormattingRule;
private String domesticCarrierCodeFormattingRule_ = "";
public boolean hasDomesticCarrierCodeFormattingRule() {
return hasDomesticCarrierCodeFormattingRule; }
public String getDomesticCarrierCodeFormattingRule() {
return domesticCarrierCodeFormattingRule_; }
public NumberFormat setDomesticCarrierCodeFormattingRule(String value) {
hasDomesticCarrierCodeFormattingRule = true;
domesticCarrierCodeFormattingRule_ = value;
return this;
}
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeUTF(pattern_);
objectOutput.writeUTF(format_);
int leadingDigitsPatternSize = leadingDigitsPatternSize();
objectOutput.writeInt(leadingDigitsPatternSize);
for (int i = 0; i < leadingDigitsPatternSize; i++) {
objectOutput.writeUTF(leadingDigitsPattern_.get(i));
}
objectOutput.writeBoolean(hasNationalPrefixFormattingRule);
if (hasNationalPrefixFormattingRule) {
objectOutput.writeUTF(nationalPrefixFormattingRule_);
}
objectOutput.writeBoolean(hasDomesticCarrierCodeFormattingRule);
if (hasDomesticCarrierCodeFormattingRule) {
objectOutput.writeUTF(domesticCarrierCodeFormattingRule_);
}
objectOutput.writeBoolean(nationalPrefixOptionalWhenFormatting_);
}
public void readExternal(ObjectInput objectInput) throws IOException {
setPattern(objectInput.readUTF());
setFormat(objectInput.readUTF());
int leadingDigitsPatternSize = objectInput.readInt();
for (int i = 0; i < leadingDigitsPatternSize; i++) {
leadingDigitsPattern_.add(objectInput.readUTF());
}
if (objectInput.readBoolean()) {
setNationalPrefixFormattingRule(objectInput.readUTF());
}
if (objectInput.readBoolean()) {
setDomesticCarrierCodeFormattingRule(objectInput.readUTF());
}
setNationalPrefixOptionalWhenFormatting(objectInput.readBoolean());
}
}
public static class PhoneNumberDesc implements Externalizable {
private static final long serialVersionUID = 1;
public PhoneNumberDesc() {}
/**
* Provides a dummy builder.
*
* @see NumberFormat.Builder
*/
public static final class Builder extends PhoneNumberDesc {
public PhoneNumberDesc build() {
return this;
}
public Builder mergeFrom(PhoneNumberDesc other) {
if (other.hasNationalNumberPattern()) {
setNationalNumberPattern(other.getNationalNumberPattern());
}
for (int i = 0; i < other.getPossibleLengthCount(); i++) {
addPossibleLength(other.getPossibleLength(i));
}
for (int i = 0; i < other.getPossibleLengthLocalOnlyCount(); i++) {
addPossibleLengthLocalOnly(other.getPossibleLengthLocalOnly(i));
}
if (other.hasExampleNumber()) {
setExampleNumber(other.getExampleNumber());
}
return this;
}
}
public static Builder newBuilder() {
return new Builder();
}
// optional string national_number_pattern = 2;
private boolean hasNationalNumberPattern;
private String nationalNumberPattern_ = "";
public boolean hasNationalNumberPattern() { return hasNationalNumberPattern; }
public String getNationalNumberPattern() { return nationalNumberPattern_; }
public PhoneNumberDesc setNationalNumberPattern(String value) {
hasNationalNumberPattern = true;
nationalNumberPattern_ = value;
return this;
}
public PhoneNumberDesc clearNationalNumberPattern() {
hasNationalNumberPattern = false;
nationalNumberPattern_ = "";
return this;
}
// repeated int32 possible_length = 9;
private java.util.List<Integer> possibleLength_ = new java.util.ArrayList<Integer>();
public java.util.List<Integer> getPossibleLengthList() {
return possibleLength_;
}
public int getPossibleLengthCount() { return possibleLength_.size(); }
public int getPossibleLength(int index) {
return possibleLength_.get(index);
}
public PhoneNumberDesc addPossibleLength(int value) {
possibleLength_.add(value);
return this;
}
public PhoneNumberDesc clearPossibleLength() {
possibleLength_.clear();
return this;
}
// repeated int32 possible_length_local_only = 10;
private java.util.List<Integer> possibleLengthLocalOnly_ = new java.util.ArrayList<Integer>();
public java.util.List<Integer> getPossibleLengthLocalOnlyList() {
return possibleLengthLocalOnly_;
}
public int getPossibleLengthLocalOnlyCount() { return possibleLengthLocalOnly_.size(); }
public int getPossibleLengthLocalOnly(int index) {
return possibleLengthLocalOnly_.get(index);
}
public PhoneNumberDesc addPossibleLengthLocalOnly(int value) {
possibleLengthLocalOnly_.add(value);
return this;
}
public PhoneNumberDesc clearPossibleLengthLocalOnly() {
possibleLengthLocalOnly_.clear();
return this;
}
// optional string example_number = 6;
private boolean hasExampleNumber;
private String exampleNumber_ = "";
public boolean hasExampleNumber() { return hasExampleNumber; }
public String getExampleNumber() { return exampleNumber_; }
public PhoneNumberDesc setExampleNumber(String value) {
hasExampleNumber = true;
exampleNumber_ = value;
return this;
}
public PhoneNumberDesc clearExampleNumber() {
hasExampleNumber = false;
exampleNumber_ = "";
return this;
}
public boolean exactlySameAs(PhoneNumberDesc other) {
return nationalNumberPattern_.equals(other.nationalNumberPattern_) &&
possibleLength_.equals(other.possibleLength_) &&
possibleLengthLocalOnly_.equals(other.possibleLengthLocalOnly_) &&
exampleNumber_.equals(other.exampleNumber_);
}
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeBoolean(hasNationalNumberPattern);
if (hasNationalNumberPattern) {
objectOutput.writeUTF(nationalNumberPattern_);
}
int possibleLengthSize = getPossibleLengthCount();
objectOutput.writeInt(possibleLengthSize);
for (int i = 0; i < possibleLengthSize; i++) {
objectOutput.writeInt(possibleLength_.get(i));
}
int possibleLengthLocalOnlySize = getPossibleLengthLocalOnlyCount();
objectOutput.writeInt(possibleLengthLocalOnlySize);
for (int i = 0; i < possibleLengthLocalOnlySize; i++) {
objectOutput.writeInt(possibleLengthLocalOnly_.get(i));
}
objectOutput.writeBoolean(hasExampleNumber);
if (hasExampleNumber) {
objectOutput.writeUTF(exampleNumber_);
}
}
public void readExternal(ObjectInput objectInput) throws IOException {
if (objectInput.readBoolean()) {
setNationalNumberPattern(objectInput.readUTF());
}
int possibleLengthSize = objectInput.readInt();
for (int i = 0; i < possibleLengthSize; i++) {
possibleLength_.add(objectInput.readInt());
}
int possibleLengthLocalOnlySize = objectInput.readInt();
for (int i = 0; i < possibleLengthLocalOnlySize; i++) {
possibleLengthLocalOnly_.add(objectInput.readInt());
}
if (objectInput.readBoolean()) {
setExampleNumber(objectInput.readUTF());
}
}
}
public static class PhoneMetadata implements Externalizable {
private static final long serialVersionUID = 1;
public PhoneMetadata() {}
/**
* Provides a dummy builder.
*
* @see NumberFormat.Builder
*/
public static final class Builder extends PhoneMetadata {
public PhoneMetadata build() {
return this;
}
}
public static Builder newBuilder() {
return new Builder();
}
// optional PhoneNumberDesc general_desc = 1;
private boolean hasGeneralDesc;
private PhoneNumberDesc generalDesc_ = null;
public boolean hasGeneralDesc() { return hasGeneralDesc; }
public PhoneNumberDesc getGeneralDesc() { return generalDesc_; }
public PhoneMetadata setGeneralDesc(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasGeneralDesc = true;
generalDesc_ = value;
return this;
}
// optional PhoneNumberDesc fixed_line = 2;
private boolean hasFixedLine;
private PhoneNumberDesc fixedLine_ = null;
public boolean hasFixedLine() { return hasFixedLine; }
public PhoneNumberDesc getFixedLine() { return fixedLine_; }
public PhoneMetadata setFixedLine(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasFixedLine = true;
fixedLine_ = value;
return this;
}
// optional PhoneNumberDesc mobile = 3;
private boolean hasMobile;
private PhoneNumberDesc mobile_ = null;
public boolean hasMobile() { return hasMobile; }
public PhoneNumberDesc getMobile() { return mobile_; }
public PhoneMetadata setMobile(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasMobile = true;
mobile_ = value;
return this;
}
// optional PhoneNumberDesc toll_free = 4;
private boolean hasTollFree;
private PhoneNumberDesc tollFree_ = null;
public boolean hasTollFree() { return hasTollFree; }
public PhoneNumberDesc getTollFree() { return tollFree_; }
public PhoneMetadata setTollFree(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasTollFree = true;
tollFree_ = value;
return this;
}
// optional PhoneNumberDesc premium_rate = 5;
private boolean hasPremiumRate;
private PhoneNumberDesc premiumRate_ = null;
public boolean hasPremiumRate() { return hasPremiumRate; }
public PhoneNumberDesc getPremiumRate() { return premiumRate_; }
public PhoneMetadata setPremiumRate(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasPremiumRate = true;
premiumRate_ = value;
return this;
}
// optional PhoneNumberDesc shared_cost = 6;
private boolean hasSharedCost;
private PhoneNumberDesc sharedCost_ = null;
public boolean hasSharedCost() { return hasSharedCost; }
public PhoneNumberDesc getSharedCost() { return sharedCost_; }
public PhoneMetadata setSharedCost(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasSharedCost = true;
sharedCost_ = value;
return this;
}
// optional PhoneNumberDesc personal_number = 7;
private boolean hasPersonalNumber;
private PhoneNumberDesc personalNumber_ = null;
public boolean hasPersonalNumber() { return hasPersonalNumber; }
public PhoneNumberDesc getPersonalNumber() { return personalNumber_; }
public PhoneMetadata setPersonalNumber(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasPersonalNumber = true;
personalNumber_ = value;
return this;
}
// optional PhoneNumberDesc voip = 8;
private boolean hasVoip;
private PhoneNumberDesc voip_ = null;
public boolean hasVoip() { return hasVoip; }
public PhoneNumberDesc getVoip() { return voip_; }
public PhoneMetadata setVoip(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasVoip = true;
voip_ = value;
return this;
}
// optional PhoneNumberDesc pager = 21;
private boolean hasPager;
private PhoneNumberDesc pager_ = null;
public boolean hasPager() { return hasPager; }
public PhoneNumberDesc getPager() { return pager_; }
public PhoneMetadata setPager(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasPager = true;
pager_ = value;
return this;
}
// optional PhoneNumberDesc uan = 25;
private boolean hasUan;
private PhoneNumberDesc uan_ = null;
public boolean hasUan() { return hasUan; }
public PhoneNumberDesc getUan() { return uan_; }
public PhoneMetadata setUan(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasUan = true;
uan_ = value;
return this;
}
// optional PhoneNumberDesc emergency = 27;
private boolean hasEmergency;
private PhoneNumberDesc emergency_ = null;
public boolean hasEmergency() { return hasEmergency; }
public PhoneNumberDesc getEmergency() { return emergency_; }
public PhoneMetadata setEmergency(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasEmergency = true;
emergency_ = value;
return this;
}
// optional PhoneNumberDesc voicemail = 28;
private boolean hasVoicemail;
private PhoneNumberDesc voicemail_ = null;
public boolean hasVoicemail() { return hasVoicemail; }
public PhoneNumberDesc getVoicemail() { return voicemail_; }
public PhoneMetadata setVoicemail(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasVoicemail = true;
voicemail_ = value;
return this;
}
// optional PhoneNumberDesc short_code = 29;
private boolean hasShortCode;
private PhoneNumberDesc shortCode_ = null;
public boolean hasShortCode() { return hasShortCode; }
public PhoneNumberDesc getShortCode() { return shortCode_; }
public PhoneMetadata setShortCode(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasShortCode = true;
shortCode_ = value;
return this;
}
// optional PhoneNumberDesc standard_rate = 30;
private boolean hasStandardRate;
private PhoneNumberDesc standardRate_ = null;
public boolean hasStandardRate() { return hasStandardRate; }
public PhoneNumberDesc getStandardRate() { return standardRate_; }
public PhoneMetadata setStandardRate(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasStandardRate = true;
standardRate_ = value;
return this;
}
// optional PhoneNumberDesc carrier_specific = 31;
private boolean hasCarrierSpecific;
private PhoneNumberDesc carrierSpecific_ = null;
public boolean hasCarrierSpecific() { return hasCarrierSpecific; }
public PhoneNumberDesc getCarrierSpecific() { return carrierSpecific_; }
public PhoneMetadata setCarrierSpecific(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasCarrierSpecific = true;
carrierSpecific_ = value;
return this;
}
// optional PhoneNumberDesc sms_services = 33;
private boolean hasSmsServices;
private PhoneNumberDesc smsServices_ = null;
public boolean hasSmsServices() { return hasSmsServices; }
public PhoneNumberDesc getSmsServices() { return smsServices_; }
public PhoneMetadata setSmsServices(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasSmsServices = true;
smsServices_ = value;
return this;
}
// optional PhoneNumberDesc noInternationalDialling = 24;
private boolean hasNoInternationalDialling;
private PhoneNumberDesc noInternationalDialling_ = null;
public boolean hasNoInternationalDialling() { return hasNoInternationalDialling; }
public PhoneNumberDesc getNoInternationalDialling() { return noInternationalDialling_; }
public PhoneMetadata setNoInternationalDialling(PhoneNumberDesc value) {
if (value == null) {
throw new NullPointerException();
}
hasNoInternationalDialling = true;
noInternationalDialling_ = value;
return this;
}
// required string id = 9;
private boolean hasId;
private String id_ = "";
public boolean hasId() { return hasId; }
public String getId() { return id_; }
public PhoneMetadata setId(String value) {
hasId = true;
id_ = value;
return this;
}
// optional int32 country_code = 10;
private boolean hasCountryCode;
private int countryCode_ = 0;
public boolean hasCountryCode() { return hasCountryCode; }
public int getCountryCode() { return countryCode_; }
public PhoneMetadata setCountryCode(int value) {
hasCountryCode = true;
countryCode_ = value;
return this;
}
// optional string international_prefix = 11;
private boolean hasInternationalPrefix;
private String internationalPrefix_ = "";
public boolean hasInternationalPrefix() { return hasInternationalPrefix; }
public String getInternationalPrefix() { return internationalPrefix_; }
public PhoneMetadata setInternationalPrefix(String value) {
hasInternationalPrefix = true;
internationalPrefix_ = value;
return this;
}
// optional string preferred_international_prefix = 17;
private boolean hasPreferredInternationalPrefix;
private String preferredInternationalPrefix_ = "";
public boolean hasPreferredInternationalPrefix() { return hasPreferredInternationalPrefix; }
public String getPreferredInternationalPrefix() { return preferredInternationalPrefix_; }
public PhoneMetadata setPreferredInternationalPrefix(String value) {
hasPreferredInternationalPrefix = true;
preferredInternationalPrefix_ = value;
return this;
}
public PhoneMetadata clearPreferredInternationalPrefix() {
hasPreferredInternationalPrefix = false;
preferredInternationalPrefix_ = "";
return this;
}
// optional string national_prefix = 12;
private boolean hasNationalPrefix;
private String nationalPrefix_ = "";
public boolean hasNationalPrefix() { return hasNationalPrefix; }
public String getNationalPrefix() { return nationalPrefix_; }
public PhoneMetadata setNationalPrefix(String value) {
hasNationalPrefix = true;
nationalPrefix_ = value;
return this;
}
public PhoneMetadata clearNationalPrefix() {
hasNationalPrefix = false;
nationalPrefix_ = "";
return this;
}
// optional string preferred_extn_prefix = 13;
private boolean hasPreferredExtnPrefix;
private String preferredExtnPrefix_ = "";
public boolean hasPreferredExtnPrefix() { return hasPreferredExtnPrefix; }
public String getPreferredExtnPrefix() { return preferredExtnPrefix_; }
public PhoneMetadata setPreferredExtnPrefix(String value) {
hasPreferredExtnPrefix = true;
preferredExtnPrefix_ = value;
return this;
}
public PhoneMetadata clearPreferredExtnPrefix() {
hasPreferredExtnPrefix = false;
preferredExtnPrefix_ = "";
return this;
}
// optional string national_prefix_for_parsing = 15;
private boolean hasNationalPrefixForParsing;
private String nationalPrefixForParsing_ = "";
public boolean hasNationalPrefixForParsing() { return hasNationalPrefixForParsing; }
public String getNationalPrefixForParsing() { return nationalPrefixForParsing_; }
public PhoneMetadata setNationalPrefixForParsing(String value) {
hasNationalPrefixForParsing = true;
nationalPrefixForParsing_ = value;
return this;
}
// optional string national_prefix_transform_rule = 16;
private boolean hasNationalPrefixTransformRule;
private String nationalPrefixTransformRule_ = "";
public boolean hasNationalPrefixTransformRule() { return hasNationalPrefixTransformRule; }
public String getNationalPrefixTransformRule() { return nationalPrefixTransformRule_; }
public PhoneMetadata setNationalPrefixTransformRule(String value) {
hasNationalPrefixTransformRule = true;
nationalPrefixTransformRule_ = value;
return this;
}
public PhoneMetadata clearNationalPrefixTransformRule() {
hasNationalPrefixTransformRule = false;
nationalPrefixTransformRule_ = "";
return this;
}
// optional bool same_mobile_and_fixed_line_pattern = 18 [default = false];
private boolean hasSameMobileAndFixedLinePattern;
private boolean sameMobileAndFixedLinePattern_ = false;
public boolean hasSameMobileAndFixedLinePattern() { return hasSameMobileAndFixedLinePattern; }
public boolean getSameMobileAndFixedLinePattern() { return sameMobileAndFixedLinePattern_; }
public PhoneMetadata setSameMobileAndFixedLinePattern(boolean value) {
hasSameMobileAndFixedLinePattern = true;
sameMobileAndFixedLinePattern_ = value;
return this;
}
public PhoneMetadata clearSameMobileAndFixedLinePattern() {
hasSameMobileAndFixedLinePattern = false;
sameMobileAndFixedLinePattern_ = false;
return this;
}
// repeated NumberFormat number_format = 19;
private java.util.List<NumberFormat> numberFormat_ = new java.util.ArrayList<NumberFormat>();
public java.util.List<NumberFormat> numberFormats() {
return numberFormat_;
}
public int numberFormatSize() { return numberFormat_.size(); }
public NumberFormat getNumberFormat(int index) {
return numberFormat_.get(index);
}
public PhoneMetadata addNumberFormat(NumberFormat value) {
if (value == null) {
throw new NullPointerException();
}
numberFormat_.add(value);
return this;
}
// repeated NumberFormat intl_number_format = 20;
private java.util.List<NumberFormat> intlNumberFormat_ =
new java.util.ArrayList<NumberFormat>();
public java.util.List<NumberFormat> intlNumberFormats() {
return intlNumberFormat_;
}
public int intlNumberFormatSize() { return intlNumberFormat_.size(); }
public NumberFormat getIntlNumberFormat(int index) {
return intlNumberFormat_.get(index);
}
public PhoneMetadata addIntlNumberFormat(NumberFormat value) {
if (value == null) {
throw new NullPointerException();
}
intlNumberFormat_.add(value);
return this;
}
public PhoneMetadata clearIntlNumberFormat() {
intlNumberFormat_.clear();
return this;
}
// optional bool main_country_for_code = 22 [default = false];
private boolean hasMainCountryForCode;
private boolean mainCountryForCode_ = false;
public boolean hasMainCountryForCode() { return hasMainCountryForCode; }
public boolean isMainCountryForCode() { return mainCountryForCode_; }
// Method that lets this class have the same interface as the one generated by Protocol Buffers
// which is used by C++ build tools.
public boolean getMainCountryForCode() { return mainCountryForCode_; }
public PhoneMetadata setMainCountryForCode(boolean value) {
hasMainCountryForCode = true;
mainCountryForCode_ = value;
return this;
}
public PhoneMetadata clearMainCountryForCode() {
hasMainCountryForCode = false;
mainCountryForCode_ = false;
return this;
}
// optional string leading_digits = 23;
private boolean hasLeadingDigits;
private String leadingDigits_ = "";
public boolean hasLeadingDigits() { return hasLeadingDigits; }
public String getLeadingDigits() { return leadingDigits_; }
public PhoneMetadata setLeadingDigits(String value) {
hasLeadingDigits = true;
leadingDigits_ = value;
return this;
}
// optional bool leading_zero_possible = 26 [default = false];
private boolean hasLeadingZeroPossible;
private boolean leadingZeroPossible_ = false;
public boolean hasLeadingZeroPossible() { return hasLeadingZeroPossible; }
public boolean isLeadingZeroPossible() { return leadingZeroPossible_; }
public PhoneMetadata setLeadingZeroPossible(boolean value) {
hasLeadingZeroPossible = true;
leadingZeroPossible_ = value;
return this;
}
public PhoneMetadata clearLeadingZeroPossible() {
hasLeadingZeroPossible = false;
leadingZeroPossible_ = false;
return this;
}
// optional bool mobile_number_portable_region = 32 [default = false];
private boolean hasMobileNumberPortableRegion;
private boolean mobileNumberPortableRegion_ = false;
public boolean hasMobileNumberPortableRegion() { return hasMobileNumberPortableRegion; }
public boolean isMobileNumberPortableRegion() { return mobileNumberPortableRegion_; }
public PhoneMetadata setMobileNumberPortableRegion(boolean value) {
hasMobileNumberPortableRegion = true;
mobileNumberPortableRegion_ = value;
return this;
}
public PhoneMetadata clearMobileNumberPortableRegion() {
hasMobileNumberPortableRegion = false;
mobileNumberPortableRegion_ = false;
return this;
}
public void writeExternal(ObjectOutput objectOutput) throws IOException {
objectOutput.writeBoolean(hasGeneralDesc);
if (hasGeneralDesc) {
generalDesc_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasFixedLine);
if (hasFixedLine) {
fixedLine_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasMobile);
if (hasMobile) {
mobile_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasTollFree);
if (hasTollFree) {
tollFree_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasPremiumRate);
if (hasPremiumRate) {
premiumRate_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasSharedCost);
if (hasSharedCost) {
sharedCost_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasPersonalNumber);
if (hasPersonalNumber) {
personalNumber_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasVoip);
if (hasVoip) {
voip_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasPager);
if (hasPager) {
pager_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasUan);
if (hasUan) {
uan_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasEmergency);
if (hasEmergency) {
emergency_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasVoicemail);
if (hasVoicemail) {
voicemail_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasShortCode);
if (hasShortCode) {
shortCode_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasStandardRate);
if (hasStandardRate) {
standardRate_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasCarrierSpecific);
if (hasCarrierSpecific) {
carrierSpecific_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasSmsServices);
if (hasSmsServices) {
smsServices_.writeExternal(objectOutput);
}
objectOutput.writeBoolean(hasNoInternationalDialling);
if (hasNoInternationalDialling) {
noInternationalDialling_.writeExternal(objectOutput);
}
objectOutput.writeUTF(id_);
objectOutput.writeInt(countryCode_);
objectOutput.writeUTF(internationalPrefix_);
objectOutput.writeBoolean(hasPreferredInternationalPrefix);
if (hasPreferredInternationalPrefix) {
objectOutput.writeUTF(preferredInternationalPrefix_);
}
objectOutput.writeBoolean(hasNationalPrefix);
if (hasNationalPrefix) {
objectOutput.writeUTF(nationalPrefix_);
}
objectOutput.writeBoolean(hasPreferredExtnPrefix);
if (hasPreferredExtnPrefix) {
objectOutput.writeUTF(preferredExtnPrefix_);
}
objectOutput.writeBoolean(hasNationalPrefixForParsing);
if (hasNationalPrefixForParsing) {
objectOutput.writeUTF(nationalPrefixForParsing_);
}
objectOutput.writeBoolean(hasNationalPrefixTransformRule);
if (hasNationalPrefixTransformRule) {
objectOutput.writeUTF(nationalPrefixTransformRule_);
}
objectOutput.writeBoolean(sameMobileAndFixedLinePattern_);
int numberFormatSize = numberFormatSize();
objectOutput.writeInt(numberFormatSize);
for (int i = 0; i < numberFormatSize; i++) {
numberFormat_.get(i).writeExternal(objectOutput);
}
int intlNumberFormatSize = intlNumberFormatSize();
objectOutput.writeInt(intlNumberFormatSize);
for (int i = 0; i < intlNumberFormatSize; i++) {
intlNumberFormat_.get(i).writeExternal(objectOutput);
}
objectOutput.writeBoolean(mainCountryForCode_);
objectOutput.writeBoolean(hasLeadingDigits);
if (hasLeadingDigits) {
objectOutput.writeUTF(leadingDigits_);
}
objectOutput.writeBoolean(leadingZeroPossible_);
objectOutput.writeBoolean(mobileNumberPortableRegion_);
}
public void readExternal(ObjectInput objectInput) throws IOException {
boolean hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setGeneralDesc(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setFixedLine(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setMobile(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setTollFree(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setPremiumRate(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setSharedCost(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setPersonalNumber(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setVoip(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setPager(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setUan(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setEmergency(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setVoicemail(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setShortCode(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setStandardRate(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setCarrierSpecific(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setSmsServices(desc);
}
hasDesc = objectInput.readBoolean();
if (hasDesc) {
PhoneNumberDesc desc = new PhoneNumberDesc();
desc.readExternal(objectInput);
setNoInternationalDialling(desc);
}
setId(objectInput.readUTF());
setCountryCode(objectInput.readInt());
setInternationalPrefix(objectInput.readUTF());
boolean hasString = objectInput.readBoolean();
if (hasString) {
setPreferredInternationalPrefix(objectInput.readUTF());
}
hasString = objectInput.readBoolean();
if (hasString) {
setNationalPrefix(objectInput.readUTF());
}
hasString = objectInput.readBoolean();
if (hasString) {
setPreferredExtnPrefix(objectInput.readUTF());
}
hasString = objectInput.readBoolean();
if (hasString) {
setNationalPrefixForParsing(objectInput.readUTF());
}
hasString = objectInput.readBoolean();
if (hasString) {
setNationalPrefixTransformRule(objectInput.readUTF());
}
setSameMobileAndFixedLinePattern(objectInput.readBoolean());
int nationalFormatSize = objectInput.readInt();
for (int i = 0; i < nationalFormatSize; i++) {
NumberFormat numFormat = new NumberFormat();
numFormat.readExternal(objectInput);
numberFormat_.add(numFormat);
}
int intlNumberFormatSize = objectInput.readInt();
for (int i = 0; i < intlNumberFormatSize; i++) {
NumberFormat numFormat = new NumberFormat();
numFormat.readExternal(objectInput);
intlNumberFormat_.add(numFormat);
}
setMainCountryForCode(objectInput.readBoolean());
hasString = objectInput.readBoolean();
if (hasString) {
setLeadingDigits(objectInput.readUTF());
}
setLeadingZeroPossible(objectInput.readBoolean());
setMobileNumberPortableRegion(objectInput.readBoolean());
}
}
public static class PhoneMetadataCollection implements Externalizable {
private static final long serialVersionUID = 1;
public PhoneMetadataCollection() {}
/**
* Provides a dummy builder.
*
* @see NumberFormat.Builder
*/
public static final class Builder extends PhoneMetadataCollection {
public PhoneMetadataCollection build() {
return this;
}
}
public static Builder newBuilder() {
return new Builder();
}
// repeated PhoneMetadata metadata = 1;
private java.util.List<PhoneMetadata> metadata_ = new java.util.ArrayList<PhoneMetadata>();
public java.util.List<PhoneMetadata> getMetadataList() {
return metadata_;
}
public int getMetadataCount() { return metadata_.size(); }
public PhoneMetadataCollection addMetadata(PhoneMetadata value) {
if (value == null) {
throw new NullPointerException();
}
metadata_.add(value);
return this;
}
public void writeExternal(ObjectOutput objectOutput) throws IOException {
int size = getMetadataCount();
objectOutput.writeInt(size);
for (int i = 0; i < size; i++) {
metadata_.get(i).writeExternal(objectOutput);
}
}
public void readExternal(ObjectInput objectInput) throws IOException {
int size = objectInput.readInt();
for (int i = 0; i < size; i++) {
PhoneMetadata metadata = new PhoneMetadata();
metadata.readExternal(objectInput);
metadata_.add(metadata);
}
}
public PhoneMetadataCollection clear() {
metadata_.clear();
return this;
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/Phonemetadata.java
|
Java
|
unknown
| 41,662
|
/*
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Definition of the class representing international telephone numbers. This class is hand-created
* based on the class file compiled from phonenumber.proto. Please refer to that file for detailed
* descriptions of the meaning of each field.
*/
package com.google.i18n.phonenumbers;
import java.io.Serializable;
public final class Phonenumber {
private Phonenumber() {}
public static class PhoneNumber implements Serializable {
private static final long serialVersionUID = 1L;
public enum CountryCodeSource {
FROM_NUMBER_WITH_PLUS_SIGN,
FROM_NUMBER_WITH_IDD,
FROM_NUMBER_WITHOUT_PLUS_SIGN,
FROM_DEFAULT_COUNTRY,
UNSPECIFIED
}
public PhoneNumber() {
countryCodeSource_ = CountryCodeSource.UNSPECIFIED;
}
// required int32 country_code = 1;
private boolean hasCountryCode;
private int countryCode_ = 0;
public boolean hasCountryCode() { return hasCountryCode; }
public int getCountryCode() { return countryCode_; }
public PhoneNumber setCountryCode(int value) {
hasCountryCode = true;
countryCode_ = value;
return this;
}
public PhoneNumber clearCountryCode() {
hasCountryCode = false;
countryCode_ = 0;
return this;
}
// required uint64 national_number = 2;
private boolean hasNationalNumber;
private long nationalNumber_ = 0L;
public boolean hasNationalNumber() { return hasNationalNumber; }
public long getNationalNumber() { return nationalNumber_; }
public PhoneNumber setNationalNumber(long value) {
hasNationalNumber = true;
nationalNumber_ = value;
return this;
}
public PhoneNumber clearNationalNumber() {
hasNationalNumber = false;
nationalNumber_ = 0L;
return this;
}
// optional string extension = 3;
private boolean hasExtension;
private java.lang.String extension_ = "";
public boolean hasExtension() { return hasExtension; }
public String getExtension() { return extension_; }
public PhoneNumber setExtension(String value) {
if (value == null) {
throw new NullPointerException();
}
hasExtension = true;
extension_ = value;
return this;
}
public PhoneNumber clearExtension() {
hasExtension = false;
extension_ = "";
return this;
}
// optional bool italian_leading_zero = 4;
private boolean hasItalianLeadingZero;
private boolean italianLeadingZero_ = false;
public boolean hasItalianLeadingZero() { return hasItalianLeadingZero; }
public boolean isItalianLeadingZero() { return italianLeadingZero_; }
public PhoneNumber setItalianLeadingZero(boolean value) {
hasItalianLeadingZero = true;
italianLeadingZero_ = value;
return this;
}
public PhoneNumber clearItalianLeadingZero() {
hasItalianLeadingZero = false;
italianLeadingZero_ = false;
return this;
}
// optional int32 number_of_leading_zeros = 8 [default = 1];
private boolean hasNumberOfLeadingZeros;
private int numberOfLeadingZeros_ = 1;
public boolean hasNumberOfLeadingZeros() { return hasNumberOfLeadingZeros; }
public int getNumberOfLeadingZeros() { return numberOfLeadingZeros_; }
public PhoneNumber setNumberOfLeadingZeros(int value) {
hasNumberOfLeadingZeros = true;
numberOfLeadingZeros_ = value;
return this;
}
public PhoneNumber clearNumberOfLeadingZeros() {
hasNumberOfLeadingZeros = false;
numberOfLeadingZeros_ = 1;
return this;
}
// optional string raw_input = 5;
private boolean hasRawInput;
private String rawInput_ = "";
public boolean hasRawInput() { return hasRawInput; }
public String getRawInput() { return rawInput_; }
public PhoneNumber setRawInput(String value) {
if (value == null) {
throw new NullPointerException();
}
hasRawInput = true;
rawInput_ = value;
return this;
}
public PhoneNumber clearRawInput() {
hasRawInput = false;
rawInput_ = "";
return this;
}
// optional CountryCodeSource country_code_source = 6;
private boolean hasCountryCodeSource;
private CountryCodeSource countryCodeSource_;
public boolean hasCountryCodeSource() { return hasCountryCodeSource; }
public CountryCodeSource getCountryCodeSource() { return countryCodeSource_; }
public PhoneNumber setCountryCodeSource(CountryCodeSource value) {
if (value == null) {
throw new NullPointerException();
}
hasCountryCodeSource = true;
countryCodeSource_ = value;
return this;
}
public PhoneNumber clearCountryCodeSource() {
hasCountryCodeSource = false;
countryCodeSource_ = CountryCodeSource.UNSPECIFIED;
return this;
}
// optional string preferred_domestic_carrier_code = 7;
private boolean hasPreferredDomesticCarrierCode;
private java.lang.String preferredDomesticCarrierCode_ = "";
public boolean hasPreferredDomesticCarrierCode() { return hasPreferredDomesticCarrierCode; }
public String getPreferredDomesticCarrierCode() { return preferredDomesticCarrierCode_; }
public PhoneNumber setPreferredDomesticCarrierCode(String value) {
if (value == null) {
throw new NullPointerException();
}
hasPreferredDomesticCarrierCode = true;
preferredDomesticCarrierCode_ = value;
return this;
}
public PhoneNumber clearPreferredDomesticCarrierCode() {
hasPreferredDomesticCarrierCode = false;
preferredDomesticCarrierCode_ = "";
return this;
}
public final PhoneNumber clear() {
clearCountryCode();
clearNationalNumber();
clearExtension();
clearItalianLeadingZero();
clearNumberOfLeadingZeros();
clearRawInput();
clearCountryCodeSource();
clearPreferredDomesticCarrierCode();
return this;
}
public PhoneNumber mergeFrom(PhoneNumber other) {
if (other.hasCountryCode()) {
setCountryCode(other.getCountryCode());
}
if (other.hasNationalNumber()) {
setNationalNumber(other.getNationalNumber());
}
if (other.hasExtension()) {
setExtension(other.getExtension());
}
if (other.hasItalianLeadingZero()) {
setItalianLeadingZero(other.isItalianLeadingZero());
}
if (other.hasNumberOfLeadingZeros()) {
setNumberOfLeadingZeros(other.getNumberOfLeadingZeros());
}
if (other.hasRawInput()) {
setRawInput(other.getRawInput());
}
if (other.hasCountryCodeSource()) {
setCountryCodeSource(other.getCountryCodeSource());
}
if (other.hasPreferredDomesticCarrierCode()) {
setPreferredDomesticCarrierCode(other.getPreferredDomesticCarrierCode());
}
return this;
}
public boolean exactlySameAs(PhoneNumber other) {
if (other == null) {
return false;
}
if (this == other) {
return true;
}
return (countryCode_ == other.countryCode_ && nationalNumber_ == other.nationalNumber_ &&
extension_.equals(other.extension_) && italianLeadingZero_ == other.italianLeadingZero_ &&
numberOfLeadingZeros_ == other.numberOfLeadingZeros_ &&
rawInput_.equals(other.rawInput_) && countryCodeSource_ == other.countryCodeSource_ &&
preferredDomesticCarrierCode_.equals(other.preferredDomesticCarrierCode_) &&
hasPreferredDomesticCarrierCode() == other.hasPreferredDomesticCarrierCode());
}
@Override
public boolean equals(Object that) {
return (that instanceof PhoneNumber) && exactlySameAs((PhoneNumber) that);
}
@Override
public int hashCode() {
// Simplified rendition of the hashCode function automatically generated from the proto
// compiler with java_generate_equals_and_hash set to true. We are happy with unset values to
// be considered equal to their explicitly-set equivalents, so don't check if any value is
// unknown. The only exception to this is the preferred domestic carrier code.
int hash = 41;
hash = (53 * hash) + getCountryCode();
hash = (53 * hash) + Long.valueOf(getNationalNumber()).hashCode();
hash = (53 * hash) + getExtension().hashCode();
hash = (53 * hash) + (isItalianLeadingZero() ? 1231 : 1237);
hash = (53 * hash) + getNumberOfLeadingZeros();
hash = (53 * hash) + getRawInput().hashCode();
hash = (53 * hash) + getCountryCodeSource().hashCode();
hash = (53 * hash) + getPreferredDomesticCarrierCode().hashCode();
hash = (53 * hash) + (hasPreferredDomesticCarrierCode() ? 1231 : 1237);
return hash;
}
@Override
public String toString() {
StringBuilder outputString = new StringBuilder();
outputString.append("Country Code: ").append(countryCode_);
outputString.append(" National Number: ").append(nationalNumber_);
if (hasItalianLeadingZero() && isItalianLeadingZero()) {
outputString.append(" Leading Zero(s): true");
}
if (hasNumberOfLeadingZeros()) {
outputString.append(" Number of leading zeros: ").append(numberOfLeadingZeros_);
}
if (hasExtension()) {
outputString.append(" Extension: ").append(extension_);
}
if (hasCountryCodeSource()) {
outputString.append(" Country Code Source: ").append(countryCodeSource_);
}
if (hasPreferredDomesticCarrierCode()) {
outputString.append(" Preferred Domestic Carrier Code: ").
append(preferredDomesticCarrierCode_);
}
return outputString.toString();
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/Phonenumber.java
|
Java
|
unknown
| 10,313
|
/*
* Copyright (C) 2013 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.internal.MatcherApi;
import com.google.i18n.phonenumbers.internal.RegexBasedMatcher;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc;
import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Methods for getting information about short phone numbers, such as short codes and emergency
* numbers. Note that most commercial short numbers are not handled here, but by the
* {@link PhoneNumberUtil}.
*
* @author Shaopeng Jia
* @author David Yonge-Mallo
*/
public class ShortNumberInfo {
private static final Logger logger = Logger.getLogger(ShortNumberInfo.class.getName());
private static final ShortNumberInfo INSTANCE =
new ShortNumberInfo(RegexBasedMatcher.create());
// In these countries, if extra digits are added to an emergency number, it no longer connects
// to the emergency service.
private static final Set<String> REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT =
new HashSet<String>();
static {
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT.add("BR");
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT.add("CL");
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT.add("NI");
}
/** Cost categories of short numbers. */
public enum ShortNumberCost {
TOLL_FREE,
STANDARD_RATE,
PREMIUM_RATE,
UNKNOWN_COST;
}
/** Returns the singleton instance of the ShortNumberInfo. */
public static ShortNumberInfo getInstance() {
return INSTANCE;
}
// MatcherApi supports the basic matching method for checking if a given national number matches
// a national number pattern defined in the given {@code PhoneNumberDesc}.
private final MatcherApi matcherApi;
// A mapping from a country calling code to the region codes which denote the region represented
// by that country calling code. In the case of multiple regions sharing a calling code, such as
// the NANPA regions, the one indicated with "isMainCountryForCode" in the metadata should be
// first.
private final Map<Integer, List<String>> countryCallingCodeToRegionCodeMap;
// @VisibleForTesting
ShortNumberInfo(MatcherApi matcherApi) {
this.matcherApi = matcherApi;
// TODO: Create ShortNumberInfo for a given map
this.countryCallingCodeToRegionCodeMap =
CountryCodeToRegionCodeMap.getCountryCodeToRegionCodeMap();
}
/**
* Returns a list with the region codes that match the specific country calling code. For
* non-geographical country calling codes, the region code 001 is returned. Also, in the case
* of no region code being found, an empty list is returned.
*/
private List<String> getRegionCodesForCountryCode(int countryCallingCode) {
List<String> regionCodes = countryCallingCodeToRegionCodeMap.get(countryCallingCode);
return Collections.unmodifiableList(regionCodes == null ? new ArrayList<String>(0)
: regionCodes);
}
/**
* Helper method to check that the country calling code of the number matches the region it's
* being dialed from.
*/
private boolean regionDialingFromMatchesNumber(PhoneNumber number,
String regionDialingFrom) {
List<String> regionCodes = getRegionCodesForCountryCode(number.getCountryCode());
return regionCodes.contains(regionDialingFrom);
}
/**
* Check whether a short number is a possible number when dialed from the given region. This
* provides a more lenient check than {@link #isValidShortNumberForRegion}.
*
* @param number the short number to check
* @param regionDialingFrom the region from which the number is dialed
* @return whether the number is a possible short number
*/
public boolean isPossibleShortNumberForRegion(PhoneNumber number, String regionDialingFrom) {
if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
return false;
}
PhoneMetadata phoneMetadata =
MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
if (phoneMetadata == null) {
return false;
}
int numberLength = getNationalSignificantNumber(number).length();
return phoneMetadata.getGeneralDesc().getPossibleLengthList().contains(numberLength);
}
/**
* Check whether a short number is a possible number. If a country calling code is shared by
* multiple regions, this returns true if it's possible in any of them. This provides a more
* lenient check than {@link #isValidShortNumber}. See {@link
* #isPossibleShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param number the short number to check
* @return whether the number is a possible short number
*/
public boolean isPossibleShortNumber(PhoneNumber number) {
List<String> regionCodes = getRegionCodesForCountryCode(number.getCountryCode());
int shortNumberLength = getNationalSignificantNumber(number).length();
for (String region : regionCodes) {
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(region);
if (phoneMetadata == null) {
continue;
}
if (phoneMetadata.getGeneralDesc().getPossibleLengthList().contains(shortNumberLength)) {
return true;
}
}
return false;
}
/**
* Tests whether a short number matches a valid pattern in a region. Note that this doesn't verify
* the number is actually in use, which is impossible to tell by just looking at the number
* itself.
*
* @param number the short number for which we want to test the validity
* @param regionDialingFrom the region from which the number is dialed
* @return whether the short number matches a valid pattern
*/
public boolean isValidShortNumberForRegion(PhoneNumber number, String regionDialingFrom) {
if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
return false;
}
PhoneMetadata phoneMetadata =
MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
if (phoneMetadata == null) {
return false;
}
String shortNumber = getNationalSignificantNumber(number);
PhoneNumberDesc generalDesc = phoneMetadata.getGeneralDesc();
if (!matchesPossibleNumberAndNationalNumber(shortNumber, generalDesc)) {
return false;
}
PhoneNumberDesc shortNumberDesc = phoneMetadata.getShortCode();
return matchesPossibleNumberAndNationalNumber(shortNumber, shortNumberDesc);
}
/**
* Tests whether a short number matches a valid pattern. If a country calling code is shared by
* multiple regions, this returns true if it's valid in any of them. Note that this doesn't verify
* the number is actually in use, which is impossible to tell by just looking at the number
* itself. See {@link #isValidShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param number the short number for which we want to test the validity
* @return whether the short number matches a valid pattern
*/
public boolean isValidShortNumber(PhoneNumber number) {
List<String> regionCodes = getRegionCodesForCountryCode(number.getCountryCode());
String regionCode = getRegionCodeForShortNumberFromRegionList(number, regionCodes);
if (regionCodes.size() > 1 && regionCode != null) {
// If a matching region had been found for the phone number from among two or more regions,
// then we have already implicitly verified its validity for that region.
return true;
}
return isValidShortNumberForRegion(number, regionCode);
}
/**
* Gets the expected cost category of a short number when dialed from a region (however, nothing
* is implied about its validity). If it is important that the number is valid, then its validity
* must first be checked using {@link #isValidShortNumberForRegion}. Note that emergency numbers
* are always considered toll-free. Example usage:
* <pre>{@code
* // The region for which the number was parsed and the region we subsequently check against
* // need not be the same. Here we parse the number in the US and check it for Canada.
* PhoneNumber number = phoneUtil.parse("110", "US");
* ...
* String regionCode = "CA";
* ShortNumberInfo shortInfo = ShortNumberInfo.getInstance();
* if (shortInfo.isValidShortNumberForRegion(shortNumber, regionCode)) {
* ShortNumberCost cost = shortInfo.getExpectedCostForRegion(number, regionCode);
* // Do something with the cost information here.
* }}</pre>
*
* @param number the short number for which we want to know the expected cost category
* @param regionDialingFrom the region from which the number is dialed
* @return the expected cost category for that region of the short number. Returns UNKNOWN_COST if
* the number does not match a cost category. Note that an invalid number may match any cost
* category.
*/
public ShortNumberCost getExpectedCostForRegion(PhoneNumber number, String regionDialingFrom) {
if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
return ShortNumberCost.UNKNOWN_COST;
}
// Note that regionDialingFrom may be null, in which case phoneMetadata will also be null.
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(
regionDialingFrom);
if (phoneMetadata == null) {
return ShortNumberCost.UNKNOWN_COST;
}
String shortNumber = getNationalSignificantNumber(number);
// The possible lengths are not present for a particular sub-type if they match the general
// description; for this reason, we check the possible lengths against the general description
// first to allow an early exit if possible.
if (!phoneMetadata.getGeneralDesc().getPossibleLengthList().contains(shortNumber.length())) {
return ShortNumberCost.UNKNOWN_COST;
}
// The cost categories are tested in order of decreasing expense, since if for some reason the
// patterns overlap the most expensive matching cost category should be returned.
if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getPremiumRate())) {
return ShortNumberCost.PREMIUM_RATE;
}
if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getStandardRate())) {
return ShortNumberCost.STANDARD_RATE;
}
if (matchesPossibleNumberAndNationalNumber(shortNumber, phoneMetadata.getTollFree())) {
return ShortNumberCost.TOLL_FREE;
}
if (isEmergencyNumber(shortNumber, regionDialingFrom)) {
// Emergency numbers are implicitly toll-free.
return ShortNumberCost.TOLL_FREE;
}
return ShortNumberCost.UNKNOWN_COST;
}
/**
* Gets the expected cost category of a short number (however, nothing is implied about its
* validity). If the country calling code is unique to a region, this method behaves exactly the
* same as {@link #getExpectedCostForRegion(PhoneNumber, String)}. However, if the country
* calling code is shared by multiple regions, then it returns the highest cost in the sequence
* PREMIUM_RATE, UNKNOWN_COST, STANDARD_RATE, TOLL_FREE. The reason for the position of
* UNKNOWN_COST in this order is that if a number is UNKNOWN_COST in one region but STANDARD_RATE
* or TOLL_FREE in another, its expected cost cannot be estimated as one of the latter since it
* might be a PREMIUM_RATE number.
* <p>
* For example, if a number is STANDARD_RATE in the US, but TOLL_FREE in Canada, the expected
* cost returned by this method will be STANDARD_RATE, since the NANPA countries share the same
* country calling code.
* <p>
* Note: If the region from which the number is dialed is known, it is highly preferable to call
* {@link #getExpectedCostForRegion(PhoneNumber, String)} instead.
*
* @param number the short number for which we want to know the expected cost category
* @return the highest expected cost category of the short number in the region(s) with the given
* country calling code
*/
public ShortNumberCost getExpectedCost(PhoneNumber number) {
List<String> regionCodes = getRegionCodesForCountryCode(number.getCountryCode());
if (regionCodes.size() == 0) {
return ShortNumberCost.UNKNOWN_COST;
}
if (regionCodes.size() == 1) {
return getExpectedCostForRegion(number, regionCodes.get(0));
}
ShortNumberCost cost = ShortNumberCost.TOLL_FREE;
for (String regionCode : regionCodes) {
ShortNumberCost costForRegion = getExpectedCostForRegion(number, regionCode);
switch (costForRegion) {
case PREMIUM_RATE:
return ShortNumberCost.PREMIUM_RATE;
case UNKNOWN_COST:
cost = ShortNumberCost.UNKNOWN_COST;
break;
case STANDARD_RATE:
if (cost != ShortNumberCost.UNKNOWN_COST) {
cost = ShortNumberCost.STANDARD_RATE;
}
break;
case TOLL_FREE:
// Do nothing.
break;
default:
logger.log(Level.SEVERE, "Unrecognised cost for region: " + costForRegion);
}
}
return cost;
}
// Helper method to get the region code for a given phone number, from a list of possible region
// codes. If the list contains more than one region, the first region for which the number is
// valid is returned.
private String getRegionCodeForShortNumberFromRegionList(PhoneNumber number,
List<String> regionCodes) {
if (regionCodes.size() == 0) {
return null;
} else if (regionCodes.size() == 1) {
return regionCodes.get(0);
}
String nationalNumber = getNationalSignificantNumber(number);
for (String regionCode : regionCodes) {
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode);
if (phoneMetadata != null
&& matchesPossibleNumberAndNationalNumber(nationalNumber, phoneMetadata.getShortCode())) {
// The number is valid for this region.
return regionCode;
}
}
return null;
}
/**
* Convenience method to get a list of what regions the library has metadata for.
*/
Set<String> getSupportedRegions() {
return MetadataManager.getSupportedShortNumberRegions();
}
/**
* Gets a valid short number for the specified region.
*
* @param regionCode the region for which an example short number is needed
* @return a valid short number for the specified region. Returns an empty string when the
* metadata does not contain such information.
*/
// @VisibleForTesting
String getExampleShortNumber(String regionCode) {
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode);
if (phoneMetadata == null) {
return "";
}
PhoneNumberDesc desc = phoneMetadata.getShortCode();
if (desc.hasExampleNumber()) {
return desc.getExampleNumber();
}
return "";
}
/**
* Gets a valid short number for the specified cost category.
*
* @param regionCode the region for which an example short number is needed
* @param cost the cost category of number that is needed
* @return a valid short number for the specified region and cost category. Returns an empty
* string when the metadata does not contain such information, or the cost is UNKNOWN_COST.
*/
// @VisibleForTesting
String getExampleShortNumberForCost(String regionCode, ShortNumberCost cost) {
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode);
if (phoneMetadata == null) {
return "";
}
PhoneNumberDesc desc = null;
switch (cost) {
case TOLL_FREE:
desc = phoneMetadata.getTollFree();
break;
case STANDARD_RATE:
desc = phoneMetadata.getStandardRate();
break;
case PREMIUM_RATE:
desc = phoneMetadata.getPremiumRate();
break;
default:
// UNKNOWN_COST numbers are computed by the process of elimination from the other cost
// categories.
}
if (desc != null && desc.hasExampleNumber()) {
return desc.getExampleNumber();
}
return "";
}
/**
* Returns true if the given number, exactly as dialed, might be used to connect to an emergency
* service in the given region.
* <p>
* This method accepts a string, rather than a PhoneNumber, because it needs to distinguish
* cases such as "+1 911" and "911", where the former may not connect to an emergency service in
* all cases but the latter would. This method takes into account cases where the number might
* contain formatting, or might have additional digits appended (when it is okay to do that in
* the specified region).
*
* @param number the phone number to test
* @param regionCode the region where the phone number is being dialed
* @return whether the number might be used to connect to an emergency service in the given region
*/
public boolean connectsToEmergencyNumber(String number, String regionCode) {
return matchesEmergencyNumberHelper(number, regionCode, true /* allows prefix match */);
}
/**
* Returns true if the given number exactly matches an emergency service number in the given
* region.
* <p>
* This method takes into account cases where the number might contain formatting, but doesn't
* allow additional digits to be appended. Note that {@code isEmergencyNumber(number, region)}
* implies {@code connectsToEmergencyNumber(number, region)}.
*
* @param number the phone number to test
* @param regionCode the region where the phone number is being dialed
* @return whether the number exactly matches an emergency services number in the given region
*/
public boolean isEmergencyNumber(CharSequence number, String regionCode) {
return matchesEmergencyNumberHelper(number, regionCode, false /* doesn't allow prefix match */);
}
private boolean matchesEmergencyNumberHelper(CharSequence number, String regionCode,
boolean allowPrefixMatch) {
CharSequence possibleNumber = PhoneNumberUtil.extractPossibleNumber(number);
if (PhoneNumberUtil.PLUS_CHARS_PATTERN.matcher(possibleNumber).lookingAt()) {
// Returns false if the number starts with a plus sign. We don't believe dialing the country
// code before emergency numbers (e.g. +1911) works, but later, if that proves to work, we can
// add additional logic here to handle it.
return false;
}
PhoneMetadata metadata = MetadataManager.getShortNumberMetadataForRegion(regionCode);
if (metadata == null || !metadata.hasEmergency()) {
return false;
}
String normalizedNumber = PhoneNumberUtil.normalizeDigitsOnly(possibleNumber);
boolean allowPrefixMatchForRegion =
allowPrefixMatch && !REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT.contains(regionCode);
return matcherApi.matchNationalNumber(normalizedNumber, metadata.getEmergency(),
allowPrefixMatchForRegion);
}
/**
* Given a valid short number, determines whether it is carrier-specific (however, nothing is
* implied about its validity). Carrier-specific numbers may connect to a different end-point, or
* not connect at all, depending on the user's carrier. If it is important that the number is
* valid, then its validity must first be checked using {@link #isValidShortNumber} or
* {@link #isValidShortNumberForRegion}.
*
* @param number the valid short number to check
* @return whether the short number is carrier-specific, assuming the input was a valid short
* number
*/
public boolean isCarrierSpecific(PhoneNumber number) {
List<String> regionCodes = getRegionCodesForCountryCode(number.getCountryCode());
String regionCode = getRegionCodeForShortNumberFromRegionList(number, regionCodes);
String nationalNumber = getNationalSignificantNumber(number);
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode);
return (phoneMetadata != null)
&& (matchesPossibleNumberAndNationalNumber(nationalNumber,
phoneMetadata.getCarrierSpecific()));
}
/**
* Given a valid short number, determines whether it is carrier-specific when dialed from the
* given region (however, nothing is implied about its validity). Carrier-specific numbers may
* connect to a different end-point, or not connect at all, depending on the user's carrier. If
* it is important that the number is valid, then its validity must first be checked using
* {@link #isValidShortNumber} or {@link #isValidShortNumberForRegion}. Returns false if the
* number doesn't match the region provided.
*
* @param number the valid short number to check
* @param regionDialingFrom the region from which the number is dialed
* @return whether the short number is carrier-specific in the provided region, assuming the
* input was a valid short number
*/
public boolean isCarrierSpecificForRegion(PhoneNumber number, String regionDialingFrom) {
if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
return false;
}
String nationalNumber = getNationalSignificantNumber(number);
PhoneMetadata phoneMetadata =
MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
return (phoneMetadata != null)
&& (matchesPossibleNumberAndNationalNumber(nationalNumber,
phoneMetadata.getCarrierSpecific()));
}
/**
* Given a valid short number, determines whether it is an SMS service (however, nothing is
* implied about its validity). An SMS service is where the primary or only intended usage is to
* receive and/or send text messages (SMSs). This includes MMS as MMS numbers downgrade to SMS if
* the other party isn't MMS-capable. If it is important that the number is valid, then its
* validity must first be checked using {@link #isValidShortNumber} or {@link
* #isValidShortNumberForRegion}. Returns false if the number doesn't match the region provided.
*
* @param number the valid short number to check
* @param regionDialingFrom the region from which the number is dialed
* @return whether the short number is an SMS service in the provided region, assuming the input
* was a valid short number
*/
public boolean isSmsServiceForRegion(PhoneNumber number, String regionDialingFrom) {
if (!regionDialingFromMatchesNumber(number, regionDialingFrom)) {
return false;
}
PhoneMetadata phoneMetadata =
MetadataManager.getShortNumberMetadataForRegion(regionDialingFrom);
return phoneMetadata != null
&& matchesPossibleNumberAndNationalNumber(getNationalSignificantNumber(number),
phoneMetadata.getSmsServices());
}
/**
* Gets the national significant number of the a phone number. Note a national significant number
* doesn't contain a national prefix or any formatting.
* <p>
* This is a temporary duplicate of the {@code getNationalSignificantNumber} method from
* {@code PhoneNumberUtil}. Ultimately a canonical static version should exist in a separate
* utility class (to prevent {@code ShortNumberInfo} needing to depend on PhoneNumberUtil).
*
* @param number the phone number for which the national significant number is needed
* @return the national significant number of the PhoneNumber object passed in
*/
private static String getNationalSignificantNumber(PhoneNumber number) {
// If leading zero(s) have been set, we prefix this now. Note this is not a national prefix.
StringBuilder nationalNumber = new StringBuilder();
if (number.isItalianLeadingZero()) {
char[] zeros = new char[number.getNumberOfLeadingZeros()];
Arrays.fill(zeros, '0');
nationalNumber.append(new String(zeros));
}
nationalNumber.append(number.getNationalNumber());
return nationalNumber.toString();
}
// TODO: Once we have benchmarked ShortNumberInfo, consider if it is worth keeping
// this performance optimization.
private boolean matchesPossibleNumberAndNationalNumber(String number,
PhoneNumberDesc numberDesc) {
if (numberDesc.getPossibleLengthCount() > 0
&& !numberDesc.getPossibleLengthList().contains(number.length())) {
return false;
}
return matcherApi.matchNationalNumber(number, numberDesc, false);
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java
|
Java
|
unknown
| 25,346
|
/*
* Copyright (C) 2013 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
* Please don't modify it directly.
*/
package com.google.i18n.phonenumbers;
import java.util.HashSet;
import java.util.Set;
public class ShortNumbersRegionCodeSet {
// A set of all region codes for which data is available.
static Set<String> getRegionCodeSet() {
// The capacity is set to 321 as there are 241 different entries,
// and this offers a load factor of roughly 0.75.
Set<String> regionCodeSet = new HashSet<String>(321);
regionCodeSet.add("AC");
regionCodeSet.add("AD");
regionCodeSet.add("AE");
regionCodeSet.add("AF");
regionCodeSet.add("AG");
regionCodeSet.add("AI");
regionCodeSet.add("AL");
regionCodeSet.add("AM");
regionCodeSet.add("AO");
regionCodeSet.add("AR");
regionCodeSet.add("AS");
regionCodeSet.add("AT");
regionCodeSet.add("AU");
regionCodeSet.add("AW");
regionCodeSet.add("AX");
regionCodeSet.add("AZ");
regionCodeSet.add("BA");
regionCodeSet.add("BB");
regionCodeSet.add("BD");
regionCodeSet.add("BE");
regionCodeSet.add("BF");
regionCodeSet.add("BG");
regionCodeSet.add("BH");
regionCodeSet.add("BI");
regionCodeSet.add("BJ");
regionCodeSet.add("BL");
regionCodeSet.add("BM");
regionCodeSet.add("BN");
regionCodeSet.add("BO");
regionCodeSet.add("BQ");
regionCodeSet.add("BR");
regionCodeSet.add("BS");
regionCodeSet.add("BT");
regionCodeSet.add("BW");
regionCodeSet.add("BY");
regionCodeSet.add("BZ");
regionCodeSet.add("CA");
regionCodeSet.add("CC");
regionCodeSet.add("CD");
regionCodeSet.add("CF");
regionCodeSet.add("CG");
regionCodeSet.add("CH");
regionCodeSet.add("CI");
regionCodeSet.add("CK");
regionCodeSet.add("CL");
regionCodeSet.add("CM");
regionCodeSet.add("CN");
regionCodeSet.add("CO");
regionCodeSet.add("CR");
regionCodeSet.add("CU");
regionCodeSet.add("CV");
regionCodeSet.add("CW");
regionCodeSet.add("CX");
regionCodeSet.add("CY");
regionCodeSet.add("CZ");
regionCodeSet.add("DE");
regionCodeSet.add("DJ");
regionCodeSet.add("DK");
regionCodeSet.add("DM");
regionCodeSet.add("DO");
regionCodeSet.add("DZ");
regionCodeSet.add("EC");
regionCodeSet.add("EE");
regionCodeSet.add("EG");
regionCodeSet.add("EH");
regionCodeSet.add("ER");
regionCodeSet.add("ES");
regionCodeSet.add("ET");
regionCodeSet.add("FI");
regionCodeSet.add("FJ");
regionCodeSet.add("FK");
regionCodeSet.add("FM");
regionCodeSet.add("FO");
regionCodeSet.add("FR");
regionCodeSet.add("GA");
regionCodeSet.add("GB");
regionCodeSet.add("GD");
regionCodeSet.add("GE");
regionCodeSet.add("GF");
regionCodeSet.add("GG");
regionCodeSet.add("GH");
regionCodeSet.add("GI");
regionCodeSet.add("GL");
regionCodeSet.add("GM");
regionCodeSet.add("GN");
regionCodeSet.add("GP");
regionCodeSet.add("GR");
regionCodeSet.add("GT");
regionCodeSet.add("GU");
regionCodeSet.add("GW");
regionCodeSet.add("GY");
regionCodeSet.add("HK");
regionCodeSet.add("HN");
regionCodeSet.add("HR");
regionCodeSet.add("HT");
regionCodeSet.add("HU");
regionCodeSet.add("ID");
regionCodeSet.add("IE");
regionCodeSet.add("IL");
regionCodeSet.add("IM");
regionCodeSet.add("IN");
regionCodeSet.add("IQ");
regionCodeSet.add("IR");
regionCodeSet.add("IS");
regionCodeSet.add("IT");
regionCodeSet.add("JE");
regionCodeSet.add("JM");
regionCodeSet.add("JO");
regionCodeSet.add("JP");
regionCodeSet.add("KE");
regionCodeSet.add("KG");
regionCodeSet.add("KH");
regionCodeSet.add("KI");
regionCodeSet.add("KM");
regionCodeSet.add("KN");
regionCodeSet.add("KP");
regionCodeSet.add("KR");
regionCodeSet.add("KW");
regionCodeSet.add("KY");
regionCodeSet.add("KZ");
regionCodeSet.add("LA");
regionCodeSet.add("LB");
regionCodeSet.add("LC");
regionCodeSet.add("LI");
regionCodeSet.add("LK");
regionCodeSet.add("LR");
regionCodeSet.add("LS");
regionCodeSet.add("LT");
regionCodeSet.add("LU");
regionCodeSet.add("LV");
regionCodeSet.add("LY");
regionCodeSet.add("MA");
regionCodeSet.add("MC");
regionCodeSet.add("MD");
regionCodeSet.add("ME");
regionCodeSet.add("MF");
regionCodeSet.add("MG");
regionCodeSet.add("MH");
regionCodeSet.add("MK");
regionCodeSet.add("ML");
regionCodeSet.add("MM");
regionCodeSet.add("MN");
regionCodeSet.add("MO");
regionCodeSet.add("MP");
regionCodeSet.add("MQ");
regionCodeSet.add("MR");
regionCodeSet.add("MS");
regionCodeSet.add("MT");
regionCodeSet.add("MU");
regionCodeSet.add("MV");
regionCodeSet.add("MW");
regionCodeSet.add("MX");
regionCodeSet.add("MY");
regionCodeSet.add("MZ");
regionCodeSet.add("NA");
regionCodeSet.add("NC");
regionCodeSet.add("NE");
regionCodeSet.add("NF");
regionCodeSet.add("NG");
regionCodeSet.add("NI");
regionCodeSet.add("NL");
regionCodeSet.add("NO");
regionCodeSet.add("NP");
regionCodeSet.add("NR");
regionCodeSet.add("NU");
regionCodeSet.add("NZ");
regionCodeSet.add("OM");
regionCodeSet.add("PA");
regionCodeSet.add("PE");
regionCodeSet.add("PF");
regionCodeSet.add("PG");
regionCodeSet.add("PH");
regionCodeSet.add("PK");
regionCodeSet.add("PL");
regionCodeSet.add("PM");
regionCodeSet.add("PR");
regionCodeSet.add("PS");
regionCodeSet.add("PT");
regionCodeSet.add("PW");
regionCodeSet.add("PY");
regionCodeSet.add("QA");
regionCodeSet.add("RE");
regionCodeSet.add("RO");
regionCodeSet.add("RS");
regionCodeSet.add("RU");
regionCodeSet.add("RW");
regionCodeSet.add("SA");
regionCodeSet.add("SB");
regionCodeSet.add("SC");
regionCodeSet.add("SD");
regionCodeSet.add("SE");
regionCodeSet.add("SG");
regionCodeSet.add("SH");
regionCodeSet.add("SI");
regionCodeSet.add("SJ");
regionCodeSet.add("SK");
regionCodeSet.add("SL");
regionCodeSet.add("SM");
regionCodeSet.add("SN");
regionCodeSet.add("SO");
regionCodeSet.add("SR");
regionCodeSet.add("SS");
regionCodeSet.add("ST");
regionCodeSet.add("SV");
regionCodeSet.add("SX");
regionCodeSet.add("SY");
regionCodeSet.add("SZ");
regionCodeSet.add("TC");
regionCodeSet.add("TD");
regionCodeSet.add("TG");
regionCodeSet.add("TH");
regionCodeSet.add("TJ");
regionCodeSet.add("TL");
regionCodeSet.add("TM");
regionCodeSet.add("TN");
regionCodeSet.add("TO");
regionCodeSet.add("TR");
regionCodeSet.add("TT");
regionCodeSet.add("TV");
regionCodeSet.add("TW");
regionCodeSet.add("TZ");
regionCodeSet.add("UA");
regionCodeSet.add("UG");
regionCodeSet.add("US");
regionCodeSet.add("UY");
regionCodeSet.add("UZ");
regionCodeSet.add("VA");
regionCodeSet.add("VC");
regionCodeSet.add("VE");
regionCodeSet.add("VG");
regionCodeSet.add("VI");
regionCodeSet.add("VN");
regionCodeSet.add("VU");
regionCodeSet.add("WF");
regionCodeSet.add("WS");
regionCodeSet.add("XK");
regionCodeSet.add("YE");
regionCodeSet.add("YT");
regionCodeSet.add("ZA");
regionCodeSet.add("ZM");
regionCodeSet.add("ZW");
return regionCodeSet;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumbersRegionCodeSet.java
|
Java
|
unknown
| 8,166
|
/*
* Copyright (C) 2015 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata;
import java.util.concurrent.atomic.AtomicReference;
/**
* Implementation of {@link MetadataSource} that reads from a single resource file.
*/
final class SingleFileMetadataSourceImpl implements MetadataSource {
// The name of the binary file containing phone number metadata for different regions.
// This enables us to set up with different metadata, such as for testing.
private final String phoneNumberMetadataFileName;
// The {@link MetadataLoader} used to inject alternative metadata sources.
private final MetadataLoader metadataLoader;
private final AtomicReference<MetadataManager.SingleFileMetadataMaps> phoneNumberMetadataRef =
new AtomicReference<MetadataManager.SingleFileMetadataMaps>();
// It is assumed that metadataLoader is not null. Checks should happen before passing it in here.
// @VisibleForTesting
SingleFileMetadataSourceImpl(String phoneNumberMetadataFileName, MetadataLoader metadataLoader) {
this.phoneNumberMetadataFileName = phoneNumberMetadataFileName;
this.metadataLoader = metadataLoader;
}
// It is assumed that metadataLoader is not null. Checks should happen before passing it in here.
SingleFileMetadataSourceImpl(MetadataLoader metadataLoader) {
this(MetadataManager.SINGLE_FILE_PHONE_NUMBER_METADATA_FILE_NAME, metadataLoader);
}
@Override
public PhoneMetadata getMetadataForRegion(String regionCode) {
return MetadataManager.getSingleFileMetadataMaps(phoneNumberMetadataRef,
phoneNumberMetadataFileName, metadataLoader).get(regionCode);
}
@Override
public PhoneMetadata getMetadataForNonGeographicalRegion(int countryCallingCode) {
// A country calling code is non-geographical if it only maps to the non-geographical region
// code, i.e. "001". If this is not true of the given country calling code, then we will return
// null here. If not for the atomic reference, such as if we were loading in multiple stages, we
// would check that the passed in country calling code was indeed non-geographical to avoid
// loading costs for a null result. Here though we do not check this since the entire data must
// be loaded anyway if any of it is needed at some point in the life cycle of this class.
return MetadataManager.getSingleFileMetadataMaps(phoneNumberMetadataRef,
phoneNumberMetadataFileName, metadataLoader).get(countryCallingCode);
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/SingleFileMetadataSourceImpl.java
|
Java
|
unknown
| 3,110
|
/*
* Copyright (C) 2014 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.internal;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc;
/**
* Internal phonenumber matching API used to isolate the underlying implementation of the
* matcher and allow different implementations to be swapped in easily.
*/
public interface MatcherApi {
/**
* Returns whether the given national number (a string containing only decimal digits) matches
* the national number pattern defined in the given {@code PhoneNumberDesc} message.
*/
boolean matchNationalNumber(CharSequence number, PhoneNumberDesc numberDesc,
boolean allowPrefixMatch);
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/internal/MatcherApi.java
|
Java
|
unknown
| 1,237
|
/*
* Copyright (C) 2014 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.internal;
import com.google.i18n.phonenumbers.Phonemetadata.PhoneNumberDesc;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Implementation of the matcher API using the regular expressions in the PhoneNumberDesc
* proto message to match numbers.
*/
public final class RegexBasedMatcher implements MatcherApi {
public static MatcherApi create() {
return new RegexBasedMatcher();
}
private final RegexCache regexCache = new RegexCache(100);
private RegexBasedMatcher() {}
// @Override
public boolean matchNationalNumber(CharSequence number, PhoneNumberDesc numberDesc,
boolean allowPrefixMatch) {
String nationalNumberPattern = numberDesc.getNationalNumberPattern();
// We don't want to consider it a prefix match when matching non-empty input against an empty
// pattern.
if (nationalNumberPattern.length() == 0) {
return false;
}
return match(number, regexCache.getPatternForRegex(nationalNumberPattern), allowPrefixMatch);
}
private static boolean match(CharSequence number, Pattern pattern, boolean allowPrefixMatch) {
Matcher matcher = pattern.matcher(number);
if (!matcher.lookingAt()) {
return false;
} else {
return (matcher.matches()) ? true : allowPrefixMatch;
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/internal/RegexBasedMatcher.java
|
Java
|
unknown
| 1,941
|
/*
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers.internal;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.regex.Pattern;
/**
* LRU Cache for compiled regular expressions used by the libphonenumbers libary.
*
* @author Shaopeng Jia
*/
public class RegexCache {
private LRUCache<String, Pattern> cache;
public RegexCache(int size) {
cache = new LRUCache<String, Pattern>(size);
}
public Pattern getPatternForRegex(String regex) {
Pattern pattern = cache.get(regex);
if (pattern == null) {
pattern = Pattern.compile(regex);
cache.put(regex, pattern);
}
return pattern;
}
// @VisibleForTesting
boolean containsRegex(String regex) {
return cache.containsKey(regex);
}
private static class LRUCache<K, V> {
// LinkedHashMap offers a straightforward implementation of LRU cache.
private LinkedHashMap<K, V> map;
private int size;
@SuppressWarnings("serial")
public LRUCache(int size) {
this.size = size;
// Using access-order instead of insertion-order.
map = new LinkedHashMap<K, V>(size * 4 / 3 + 1, 0.75f, true) {
@Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
return size() > LRUCache.this.size;
}
};
}
public synchronized V get(K key) {
return map.get(key);
}
public synchronized void put(K key, V value) {
map.put(key, value);
}
public synchronized boolean containsKey(K key) {
return map.containsKey(key);
}
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/src/com/google/i18n/phonenumbers/internal/RegexCache.java
|
Java
|
unknown
| 2,154
|
/*
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This file is automatically generated by {@link BuildMetadataProtoFromXml}.
* Please don't modify it directly.
*/
package com.google.i18n.phonenumbers;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CountryCodeToRegionCodeMapForTesting {
// A mapping from a country code to the region codes which denote the
// country/region represented by that country code. In the case of multiple
// countries sharing a calling code, such as the NANPA countries, the one
// indicated with "isMainCountryForCode" in the metadata should be first.
static Map<Integer, List<String>> getCountryCodeToRegionCodeMap() {
// The capacity is set to 37 as there are 28 different entries,
// and this offers a load factor of roughly 0.75.
Map<Integer, List<String>> countryCodeToRegionCodeMap =
new HashMap<Integer, List<String>>(37);
ArrayList<String> listWithRegionCode;
listWithRegionCode = new ArrayList<String>(4);
listWithRegionCode.add("US");
listWithRegionCode.add("BB");
listWithRegionCode.add("BS");
listWithRegionCode.add("CA");
countryCodeToRegionCodeMap.put(1, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("RU");
countryCodeToRegionCodeMap.put(7, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("FR");
countryCodeToRegionCodeMap.put(33, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("IT");
countryCodeToRegionCodeMap.put(39, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("GB");
listWithRegionCode.add("GG");
countryCodeToRegionCodeMap.put(44, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SE");
countryCodeToRegionCodeMap.put(46, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("PL");
countryCodeToRegionCodeMap.put(48, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("DE");
countryCodeToRegionCodeMap.put(49, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("MX");
countryCodeToRegionCodeMap.put(52, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AR");
countryCodeToRegionCodeMap.put(54, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BR");
countryCodeToRegionCodeMap.put(55, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(3);
listWithRegionCode.add("AU");
listWithRegionCode.add("CC");
listWithRegionCode.add("CX");
countryCodeToRegionCodeMap.put(61, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("NZ");
countryCodeToRegionCodeMap.put(64, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("SG");
countryCodeToRegionCodeMap.put(65, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("JP");
countryCodeToRegionCodeMap.put(81, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("KR");
countryCodeToRegionCodeMap.put(82, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("CN");
countryCodeToRegionCodeMap.put(86, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AO");
countryCodeToRegionCodeMap.put(244, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(2);
listWithRegionCode.add("RE");
listWithRegionCode.add("YT");
countryCodeToRegionCodeMap.put(262, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("TA");
countryCodeToRegionCodeMap.put(290, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AM");
countryCodeToRegionCodeMap.put(374, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("BY");
countryCodeToRegionCodeMap.put(375, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AD");
countryCodeToRegionCodeMap.put(376, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(800, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(882, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("AE");
countryCodeToRegionCodeMap.put(971, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("001");
countryCodeToRegionCodeMap.put(979, listWithRegionCode);
listWithRegionCode = new ArrayList<String>(1);
listWithRegionCode.add("UZ");
countryCodeToRegionCodeMap.put(998, listWithRegionCode);
return countryCodeToRegionCodeMap;
}
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/test/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMapForTesting.java
|
Java
|
unknown
| 5,950
|
/*
* Copyright (C) 2011 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
/**
* Class containing string constants of region codes for easier testing.
*/
final class RegionCode {
// Region code for global networks (e.g. +800 numbers).
static final String UN001 = "001";
static final String AD = "AD";
static final String AE = "AE";
static final String AM = "AM";
static final String AO = "AO";
static final String AQ = "AQ";
static final String AR = "AR";
static final String AU = "AU";
static final String BB = "BB";
static final String BR = "BR";
static final String BS = "BS";
static final String BY = "BY";
static final String CA = "CA";
static final String CH = "CH";
static final String CL = "CL";
static final String CN = "CN";
static final String CS = "CS";
static final String CX = "CX";
static final String DE = "DE";
static final String FR = "FR";
static final String GB = "GB";
static final String HU = "HU";
static final String IT = "IT";
static final String JP = "JP";
static final String KR = "KR";
static final String MX = "MX";
static final String NZ = "NZ";
static final String PG = "PG";
static final String PL = "PL";
static final String RE = "RE";
static final String RU = "RU";
static final String SE = "SE";
static final String SG = "SG";
static final String US = "US";
static final String UZ = "UZ";
static final String YT = "YT";
static final String ZW = "ZW";
// Official code for the unknown region.
static final String ZZ = "ZZ";
}
|
2301_81045437/third_party_libphonenumber
|
java/libphonenumber/test/com/google/i18n/phonenumbers/RegionCode.java
|
Java
|
unknown
| 2,117
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview A formatter which formats phone numbers as they are entered.
* (based on the java implementation).
*
* <p>An AsYouTypeFormatter can be created by new AsYouTypeFormatter(). After
* that, digits can be added by invoking {@link #inputDigit} on the formatter
* instance, and the partially formatted phone number will be returned each time
* a digit is added. {@link #clear} can be invoked before formatting a new
* number.
*
* <p>See the unittests for more details on how the formatter is to be used.
*
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.AsYouTypeFormatter');
goog.require('goog.string.StringBuffer');
goog.require('i18n.phonenumbers.NumberFormat');
goog.require('i18n.phonenumbers.PhoneMetadata');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
/**
* Constructs an AsYouTypeFormatter for the specific region.
*
* @param {string} regionCode the CLDR two-letter region code that denotes the
* region where the phone number is being entered.
* @constructor
*/
i18n.phonenumbers.AsYouTypeFormatter = function(regionCode) {
/**
* The digits that have not been entered yet will be represented by a \u2008,
* the punctuation space.
* @const
* @type {string}
* @private
*/
this.DIGIT_PLACEHOLDER_ = '\u2008';
/**
* @type {RegExp}
* @private
*/
this.DIGIT_PATTERN_ = new RegExp(this.DIGIT_PLACEHOLDER_);
/**
* @type {string}
* @private
*/
this.currentOutput_ = '';
/**
* @type {!goog.string.StringBuffer}
* @private
*/
this.formattingTemplate_ = new goog.string.StringBuffer();
/**
* The pattern from numberFormat that is currently used to create
* formattingTemplate.
* @type {string}
* @private
*/
this.currentFormattingPattern_ = '';
/**
* @type {!goog.string.StringBuffer}
* @private
*/
this.accruedInput_ = new goog.string.StringBuffer();
/**
* @type {!goog.string.StringBuffer}
* @private
*/
this.accruedInputWithoutFormatting_ = new goog.string.StringBuffer();
/**
* This indicates whether AsYouTypeFormatter is currently doing the
* formatting.
* @type {boolean}
* @private
*/
this.ableToFormat_ = true;
/**
* Set to true when users enter their own formatting. AsYouTypeFormatter will
* do no formatting at all when this is set to true.
* @type {boolean}
* @private
*/
this.inputHasFormatting_ = false;
/**
* This is set to true when we know the user is entering a full national
* significant number, since we have either detected a national prefix or an
* international dialing prefix. When this is true, we will no longer use
* local number formatting patterns.
* @type {boolean}
* @private
*/
this.isCompleteNumber_ = false;
/**
* @type {boolean}
* @private
*/
this.isExpectingCountryCallingCode_ = false;
/**
* @type {i18n.phonenumbers.PhoneNumberUtil}
* @private
*/
this.phoneUtil_ = i18n.phonenumbers.PhoneNumberUtil.getInstance();
/**
* @type {number}
* @private
*/
this.lastMatchPosition_ = 0;
/**
* The position of a digit upon which inputDigitAndRememberPosition is most
* recently invoked, as found in the original sequence of characters the user
* entered.
* @type {number}
* @private
*/
this.originalPosition_ = 0;
/**
* The position of a digit upon which inputDigitAndRememberPosition is most
* recently invoked, as found in accruedInputWithoutFormatting.
* entered.
* @type {number}
* @private
*/
this.positionToRemember_ = 0;
/**
* This contains anything that has been entered so far preceding the national
* significant number, and it is formatted (e.g. with space inserted). For
* example, this can contain IDD, country code, and/or NDD, etc.
* @type {!goog.string.StringBuffer}
* @private
*/
this.prefixBeforeNationalNumber_ = new goog.string.StringBuffer();
/**
* @type {boolean}
* @private
*/
this.shouldAddSpaceAfterNationalPrefix_ = false;
/**
* This contains the national prefix that has been extracted. It contains only
* digits without formatting.
* @type {string}
* @private
*/
this.extractedNationalPrefix_ = '';
/**
* @type {!goog.string.StringBuffer}
* @private
*/
this.nationalNumber_ = new goog.string.StringBuffer();
/**
* @type {Array.<i18n.phonenumbers.NumberFormat>}
* @private
*/
this.possibleFormats_ = [];
/**
* @type {string}
* @private
*/
this.defaultCountry_ = regionCode;
this.currentMetadata_ = this.getMetadataForRegion_(this.defaultCountry_);
/**
* @type {i18n.phonenumbers.PhoneMetadata}
* @private
*/
this.defaultMetadata_ = this.currentMetadata_;
};
/**
* Character used when appropriate to separate a prefix, such as a long NDD or a
* country calling code, from the national number.
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.SEPARATOR_BEFORE_NATIONAL_NUMBER_ = ' ';
/**
* @const
* @type {i18n.phonenumbers.PhoneMetadata}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.EMPTY_METADATA_ =
new i18n.phonenumbers.PhoneMetadata();
i18n.phonenumbers.AsYouTypeFormatter.EMPTY_METADATA_
.setInternationalPrefix('NA');
/**
* A pattern that is used to determine if a numberFormat under availableFormats
* is eligible to be used by the AYTF. It is eligible when the format element
* under numberFormat contains groups of the dollar sign followed by a single
* digit, separated by valid phone number punctuation. This prevents invalid
* punctuation (such as the star sign in Israeli star numbers) getting into the
* output of the AYTF.
* @const
* @type {RegExp}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.ELIGIBLE_FORMAT_PATTERN_ = new RegExp(
'^[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*' +
'(\\$\\d[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']*)+$');
/**
* A set of characters that, if found in a national prefix formatting rules, are
* an indicator to us that we should separate the national prefix from the
* number when formatting.
* @const
* @type {RegExp}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.NATIONAL_PREFIX_SEPARATORS_PATTERN_ =
/[- ]/;
/**
* This is the minimum length of national number accrued that is required to
* trigger the formatter. The first element of the leadingDigitsPattern of
* each numberFormat contains a regular expression that matches up to this
* number of digits.
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.MIN_LEADING_DIGITS_LENGTH_ = 3;
/**
* The metadata needed by this class is the same for all regions sharing the
* same country calling code. Therefore, we return the metadata for "main"
* region for this country calling code.
* @param {string} regionCode an ISO 3166-1 two-letter region code.
* @return {i18n.phonenumbers.PhoneMetadata} main metadata for this region.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.getMetadataForRegion_ =
function(regionCode) {
/** @type {number} */
var countryCallingCode = this.phoneUtil_.getCountryCodeForRegion(regionCode);
/** @type {string} */
var mainCountry =
this.phoneUtil_.getRegionCodeForCountryCode(countryCallingCode);
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.phoneUtil_.getMetadataForRegion(mainCountry);
if (metadata != null) {
return metadata;
}
// Set to a default instance of the metadata. This allows us to function with
// an incorrect region code, even if formatting only works for numbers
// specified with '+'.
return i18n.phonenumbers.AsYouTypeFormatter.EMPTY_METADATA_;
};
/**
* @return {boolean} true if a new template is created as opposed to reusing the
* existing template.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.maybeCreateNewTemplate_ =
function() {
// When there are multiple available formats, the formatter uses the first
// format where a formatting template could be created.
/** @type {number} */
var possibleFormatsLength = this.possibleFormats_.length;
for (var i = 0; i < possibleFormatsLength; ++i) {
/** @type {i18n.phonenumbers.NumberFormat} */
var numberFormat = this.possibleFormats_[i];
/** @type {string} */
var pattern = numberFormat.getPatternOrDefault();
if (this.currentFormattingPattern_ == pattern) {
return false;
}
if (this.createFormattingTemplate_(numberFormat)) {
this.currentFormattingPattern_ = pattern;
this.shouldAddSpaceAfterNationalPrefix_ =
i18n.phonenumbers.AsYouTypeFormatter.
NATIONAL_PREFIX_SEPARATORS_PATTERN_.test(
numberFormat.getNationalPrefixFormattingRule());
// With a new formatting template, the matched position using the old
// template needs to be reset.
this.lastMatchPosition_ = 0;
return true;
}
}
this.ableToFormat_ = false;
return false;
};
/**
* @param {string} leadingDigits leading digits of entered number.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.getAvailableFormats_ =
function(leadingDigits) {
// First decide whether we should use international or national number rules.
/** @type {boolean} */
var isInternationalNumber = this.isCompleteNumber_ &&
this.extractedNationalPrefix_.length == 0;
/** @type {Array.<i18n.phonenumbers.NumberFormat>} */
var formatList =
(isInternationalNumber &&
this.currentMetadata_.intlNumberFormatCount() > 0) ?
this.currentMetadata_.intlNumberFormatArray() :
this.currentMetadata_.numberFormatArray();
/** @type {number} */
var formatListLength = formatList.length;
for (var i = 0; i < formatListLength; ++i) {
/** @type {i18n.phonenumbers.NumberFormat} */
var format = formatList[i];
// Discard a few formats that we know are not relevant based on the
// presence of the national prefix.
if (this.extractedNationalPrefix_.length > 0 &&
this.phoneUtil_.formattingRuleHasFirstGroupOnly(
format.getNationalPrefixFormattingRuleOrDefault()) &&
!format.getNationalPrefixOptionalWhenFormatting() &&
!format.hasDomesticCarrierCodeFormattingRule()) {
// If it is a national number that had a national prefix, any rules that
// aren't valid with a national prefix should be excluded. A rule that
// has a carrier-code formatting rule is kept since the national prefix
// might actually be an extracted carrier code - we don't distinguish
// between these when extracting it in the AYTF.
continue;
} else if (this.extractedNationalPrefix_.length == 0 &&
!this.isCompleteNumber_ &&
!this.phoneUtil_.formattingRuleHasFirstGroupOnly(
format.getNationalPrefixFormattingRuleOrDefault()) &&
!format.getNationalPrefixOptionalWhenFormatting()) {
// This number was entered without a national prefix, and this formatting
// rule requires one, so we discard it.
continue;
}
if (i18n.phonenumbers.AsYouTypeFormatter.ELIGIBLE_FORMAT_PATTERN_.test(
format.getFormatOrDefault())) {
this.possibleFormats_.push(format);
}
}
this.narrowDownPossibleFormats_(leadingDigits);
};
/**
* @param {string} leadingDigits
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.narrowDownPossibleFormats_ =
function(leadingDigits) {
/** @type {Array.<i18n.phonenumbers.NumberFormat>} */
var possibleFormats = [];
/** @type {number} */
var indexOfLeadingDigitsPattern =
leadingDigits.length -
i18n.phonenumbers.AsYouTypeFormatter.MIN_LEADING_DIGITS_LENGTH_;
/** @type {number} */
var possibleFormatsLength = this.possibleFormats_.length;
for (var i = 0; i < possibleFormatsLength; ++i) {
/** @type {i18n.phonenumbers.NumberFormat} */
var format = this.possibleFormats_[i];
if (format.leadingDigitsPatternCount() == 0) {
// Keep everything that isn't restricted by leading digits.
possibleFormats.push(this.possibleFormats_[i]);
continue;
}
/** @type {number} */
var lastLeadingDigitsPattern = Math.min(
indexOfLeadingDigitsPattern, format.leadingDigitsPatternCount() - 1);
/** @type {string} */
var leadingDigitsPattern = /** @type {string} */
(format.getLeadingDigitsPattern(lastLeadingDigitsPattern));
if (leadingDigits.search(leadingDigitsPattern) == 0) {
possibleFormats.push(this.possibleFormats_[i]);
}
}
this.possibleFormats_ = possibleFormats;
};
/**
* @param {i18n.phonenumbers.NumberFormat} format
* @return {boolean}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.createFormattingTemplate_ =
function(format) {
/** @type {string} */
var numberPattern = format.getPatternOrDefault();
this.formattingTemplate_.clear();
/** @type {string} */
var tempTemplate = this.getFormattingTemplate_(numberPattern,
format.getFormatOrDefault());
if (tempTemplate.length > 0) {
this.formattingTemplate_.append(tempTemplate);
return true;
}
return false;
};
/**
* Gets a formatting template which can be used to efficiently format a
* partial number where digits are added one by one.
*
* @param {string} numberPattern
* @param {string} numberFormat
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.getFormattingTemplate_ =
function(numberPattern, numberFormat) {
// Creates a phone number consisting only of the digit 9 that matches the
// numberPattern by applying the pattern to the longestPhoneNumber string.
/** @type {string} */
var longestPhoneNumber = '999999999999999';
/** @type {Array.<string>} */
var m = longestPhoneNumber.match(numberPattern);
// this match will always succeed
/** @type {string} */
var aPhoneNumber = m[0];
// No formatting template can be created if the number of digits entered so
// far is longer than the maximum the current formatting rule can accommodate.
if (aPhoneNumber.length < this.nationalNumber_.getLength()) {
return '';
}
// Formats the number according to numberFormat
/** @type {string} */
var template = aPhoneNumber.replace(new RegExp(numberPattern, 'g'),
numberFormat);
// Replaces each digit with character DIGIT_PLACEHOLDER
template = template.replace(new RegExp('9', 'g'), this.DIGIT_PLACEHOLDER_);
return template;
};
/**
* Clears the internal state of the formatter, so it can be reused.
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.clear = function() {
this.currentOutput_ = '';
this.accruedInput_.clear();
this.accruedInputWithoutFormatting_.clear();
this.formattingTemplate_.clear();
this.lastMatchPosition_ = 0;
this.currentFormattingPattern_ = '';
this.prefixBeforeNationalNumber_.clear();
this.extractedNationalPrefix_ = '';
this.nationalNumber_.clear();
this.ableToFormat_ = true;
this.inputHasFormatting_ = false;
this.positionToRemember_ = 0;
this.originalPosition_ = 0;
this.isCompleteNumber_ = false;
this.isExpectingCountryCallingCode_ = false;
this.possibleFormats_ = [];
this.shouldAddSpaceAfterNationalPrefix_ = false;
if (this.currentMetadata_ != this.defaultMetadata_) {
this.currentMetadata_ = this.getMetadataForRegion_(this.defaultCountry_);
}
};
/**
* Formats a phone number on-the-fly as each digit is entered.
*
* @param {string} nextChar the most recently entered digit of a phone number.
* Formatting characters are allowed, but as soon as they are encountered
* this method formats the number as entered and not 'as you type' anymore.
* Full width digits and Arabic-indic digits are allowed, and will be shown
* as they are.
* @return {string} the partially formatted phone number.
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.inputDigit = function(nextChar) {
this.currentOutput_ =
this.inputDigitWithOptionToRememberPosition_(nextChar, false);
return this.currentOutput_;
};
/**
* Same as {@link #inputDigit}, but remembers the position where
* {@code nextChar} is inserted, so that it can be retrieved later by using
* {@link #getRememberedPosition}. The remembered position will be automatically
* adjusted if additional formatting characters are later inserted/removed in
* front of {@code nextChar}.
*
* @param {string} nextChar
* @return {string}
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.inputDigitAndRememberPosition =
function(nextChar) {
this.currentOutput_ =
this.inputDigitWithOptionToRememberPosition_(nextChar, true);
return this.currentOutput_;
};
/**
* @param {string} nextChar
* @param {boolean} rememberPosition
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
inputDigitWithOptionToRememberPosition_ = function(nextChar,
rememberPosition) {
this.accruedInput_.append(nextChar);
if (rememberPosition) {
this.originalPosition_ = this.accruedInput_.getLength();
}
// We do formatting on-the-fly only when each character entered is either a
// digit, or a plus sign (accepted at the start of the number only).
if (!this.isDigitOrLeadingPlusSign_(nextChar)) {
this.ableToFormat_ = false;
this.inputHasFormatting_ = true;
} else {
nextChar = this.normalizeAndAccrueDigitsAndPlusSign_(nextChar,
rememberPosition);
}
if (!this.ableToFormat_) {
// When we are unable to format because of reasons other than that
// formatting chars have been entered, it can be due to really long IDDs or
// NDDs. If that is the case, we might be able to do formatting again after
// extracting them.
if (this.inputHasFormatting_) {
return this.accruedInput_.toString();
} else if (this.attemptToExtractIdd_()) {
if (this.attemptToExtractCountryCallingCode_()) {
return this.attemptToChoosePatternWithPrefixExtracted_();
}
} else if (this.ableToExtractLongerNdd_()) {
// Add an additional space to separate long NDD and national significant
// number for readability. We don't set shouldAddSpaceAfterNationalPrefix_
// to true, since we don't want this to change later when we choose
// formatting templates.
this.prefixBeforeNationalNumber_.append(
i18n.phonenumbers.AsYouTypeFormatter.
SEPARATOR_BEFORE_NATIONAL_NUMBER_);
return this.attemptToChoosePatternWithPrefixExtracted_();
}
return this.accruedInput_.toString();
}
// We start to attempt to format only when at least MIN_LEADING_DIGITS_LENGTH
// digits (the plus sign is counted as a digit as well for this purpose) have
// been entered.
switch (this.accruedInputWithoutFormatting_.getLength()) {
case 0:
case 1:
case 2:
return this.accruedInput_.toString();
case 3:
if (this.attemptToExtractIdd_()) {
this.isExpectingCountryCallingCode_ = true;
} else {
// No IDD or plus sign is found, might be entering in national format.
this.extractedNationalPrefix_ =
this.removeNationalPrefixFromNationalNumber_();
return this.attemptToChooseFormattingPattern_();
}
default:
if (this.isExpectingCountryCallingCode_) {
if (this.attemptToExtractCountryCallingCode_()) {
this.isExpectingCountryCallingCode_ = false;
}
return this.prefixBeforeNationalNumber_.toString() +
this.nationalNumber_.toString();
}
if (this.possibleFormats_.length > 0) {
// The formatting patterns are already chosen.
/** @type {string} */
var tempNationalNumber = this.inputDigitHelper_(nextChar);
// See if the accrued digits can be formatted properly already. If not,
// use the results from inputDigitHelper, which does formatting based on
// the formatting pattern chosen.
/** @type {string} */
var formattedNumber = this.attemptToFormatAccruedDigits_();
if (formattedNumber.length > 0) {
return formattedNumber;
}
this.narrowDownPossibleFormats_(this.nationalNumber_.toString());
if (this.maybeCreateNewTemplate_()) {
return this.inputAccruedNationalNumber_();
}
return this.ableToFormat_ ?
this.appendNationalNumber_(tempNationalNumber) :
this.accruedInput_.toString();
} else {
return this.attemptToChooseFormattingPattern_();
}
}
};
/**
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
attemptToChoosePatternWithPrefixExtracted_ = function() {
this.ableToFormat_ = true;
this.isExpectingCountryCallingCode_ = false;
this.possibleFormats_ = [];
this.lastMatchPosition_ = 0;
this.formattingTemplate_.clear();
this.currentFormattingPattern_ = '';
return this.attemptToChooseFormattingPattern_();
};
/**
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.getExtractedNationalPrefix_ =
function() {
return this.extractedNationalPrefix_;
};
/**
* Some national prefixes are a substring of others. If extracting the shorter
* NDD doesn't result in a number we can format, we try to see if we can extract
* a longer version here.
* @return {boolean}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.ableToExtractLongerNdd_ =
function() {
if (this.extractedNationalPrefix_.length > 0) {
// Put the extracted NDD back to the national number before attempting to
// extract a new NDD.
/** @type {string} */
var nationalNumberStr = this.nationalNumber_.toString();
this.nationalNumber_.clear();
this.nationalNumber_.append(this.extractedNationalPrefix_);
this.nationalNumber_.append(nationalNumberStr);
// Remove the previously extracted NDD from prefixBeforeNationalNumber. We
// cannot simply set it to empty string because people sometimes incorrectly
// enter national prefix after the country code, e.g. +44 (0)20-1234-5678.
/** @type {string} */
var prefixBeforeNationalNumberStr =
this.prefixBeforeNationalNumber_.toString();
/** @type {number} */
var indexOfPreviousNdd = prefixBeforeNationalNumberStr.lastIndexOf(
this.extractedNationalPrefix_);
this.prefixBeforeNationalNumber_.clear();
this.prefixBeforeNationalNumber_.append(
prefixBeforeNationalNumberStr.substring(0, indexOfPreviousNdd));
}
return this.extractedNationalPrefix_ !=
this.removeNationalPrefixFromNationalNumber_();
};
/**
* @param {string} nextChar
* @return {boolean}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.isDigitOrLeadingPlusSign_ =
function(nextChar) {
return i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN
.test(nextChar) ||
(this.accruedInput_.getLength() == 1 &&
i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN.test(nextChar));
};
/**
* Check to see if there is an exact pattern match for these digits. If so, we
* should use this instead of any other formatting template whose
* leadingDigitsPattern also matches the input.
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.attemptToFormatAccruedDigits_ =
function() {
/** @type {string} */
var nationalNumber = this.nationalNumber_.toString();
/** @type {number} */
var possibleFormatsLength = this.possibleFormats_.length;
for (var i = 0; i < possibleFormatsLength; ++i) {
/** @type {i18n.phonenumbers.NumberFormat} */
var numberFormat = this.possibleFormats_[i];
/** @type {string} */
var pattern = numberFormat.getPatternOrDefault();
/** @type {RegExp} */
var patternRegExp = new RegExp('^(?:' + pattern + ')$');
if (patternRegExp.test(nationalNumber)) {
this.shouldAddSpaceAfterNationalPrefix_ =
i18n.phonenumbers.AsYouTypeFormatter.
NATIONAL_PREFIX_SEPARATORS_PATTERN_.test(
numberFormat.getNationalPrefixFormattingRule());
/** @type {string} */
var formattedNumber = nationalNumber.replace(new RegExp(pattern, 'g'),
numberFormat.getFormat());
// Check that we didn't remove nor add any extra digits when we matched
// this formatting pattern. This usually happens after we entered the last
// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when
// formatted but AYTF should retain all the number entered and not change
// in order to match a format (of same leading digits and length) display
// in that way.
var fullOutput = this.appendNationalNumber_(formattedNumber);
var formattedNumberDigitsOnly =
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
fullOutput);
if (formattedNumberDigitsOnly == this.accruedInputWithoutFormatting_) {
// If it's the same (i.e entered number and format is same), then it's
// safe to return this in formatted number as nothing is lost / added.
return fullOutput;
}
}
}
return '';
};
/**
* Combines the national number with any prefix (IDD/+ and country code or
* national prefix) that was collected. A space will be inserted between them if
* the current formatting template indicates this to be suitable.
* @param {string} nationalNumber The number to be appended.
* @return {string} The combined number.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.appendNationalNumber_ =
function(nationalNumber) {
/** @type {number} */
var prefixBeforeNationalNumberLength =
this.prefixBeforeNationalNumber_.getLength();
if (this.shouldAddSpaceAfterNationalPrefix_ &&
prefixBeforeNationalNumberLength > 0 &&
this.prefixBeforeNationalNumber_.toString().charAt(
prefixBeforeNationalNumberLength - 1) !=
i18n.phonenumbers.AsYouTypeFormatter.SEPARATOR_BEFORE_NATIONAL_NUMBER_) {
// We want to add a space after the national prefix if the national prefix
// formatting rule indicates that this would normally be done, with the
// exception of the case where we already appended a space because the NDD
// was surprisingly long.
return this.prefixBeforeNationalNumber_ +
i18n.phonenumbers.AsYouTypeFormatter.SEPARATOR_BEFORE_NATIONAL_NUMBER_ +
nationalNumber;
} else {
return this.prefixBeforeNationalNumber_ + nationalNumber;
}
};
/**
* Returns the current position in the partially formatted phone number of the
* character which was previously passed in as the parameter of
* {@link #inputDigitAndRememberPosition}.
*
* @return {number}
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.getRememberedPosition =
function() {
if (!this.ableToFormat_) {
return this.originalPosition_;
}
/** @type {number} */
var accruedInputIndex = 0;
/** @type {number} */
var currentOutputIndex = 0;
/** @type {string} */
var accruedInputWithoutFormatting =
this.accruedInputWithoutFormatting_.toString();
/** @type {string} */
var currentOutput = this.currentOutput_.toString();
while (accruedInputIndex < this.positionToRemember_ &&
currentOutputIndex < currentOutput.length) {
if (accruedInputWithoutFormatting.charAt(accruedInputIndex) ==
currentOutput.charAt(currentOutputIndex)) {
accruedInputIndex++;
}
currentOutputIndex++;
}
return currentOutputIndex;
};
/**
* Attempts to set the formatting template and returns a string which contains
* the formatted version of the digits entered so far.
*
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
attemptToChooseFormattingPattern_ = function() {
/** @type {string} */
var nationalNumber = this.nationalNumber_.toString();
// We start to attempt to format only when at least MIN_LEADING_DIGITS_LENGTH
// digits of national number (excluding national prefix) have been entered.
if (nationalNumber.length >=
i18n.phonenumbers.AsYouTypeFormatter.MIN_LEADING_DIGITS_LENGTH_) {
this.getAvailableFormats_(nationalNumber);
// See if the accrued digits can be formatted properly already.
var formattedNumber = this.attemptToFormatAccruedDigits_();
if (formattedNumber.length > 0) {
return formattedNumber;
}
return this.maybeCreateNewTemplate_() ?
this.inputAccruedNationalNumber_() : this.accruedInput_.toString();
} else {
return this.appendNationalNumber_(nationalNumber);
}
};
/**
* Invokes inputDigitHelper on each digit of the national number accrued, and
* returns a formatted string in the end.
*
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.inputAccruedNationalNumber_ =
function() {
/** @type {string} */
var nationalNumber = this.nationalNumber_.toString();
/** @type {number} */
var lengthOfNationalNumber = nationalNumber.length;
if (lengthOfNationalNumber > 0) {
/** @type {string} */
var tempNationalNumber = '';
for (var i = 0; i < lengthOfNationalNumber; i++) {
tempNationalNumber =
this.inputDigitHelper_(nationalNumber.charAt(i));
}
return this.ableToFormat_ ?
this.appendNationalNumber_(tempNationalNumber) :
this.accruedInput_.toString();
} else {
return this.prefixBeforeNationalNumber_.toString();
}
};
/**
* @return {boolean} true if the current country is a NANPA country and the
* national number begins with the national prefix.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
isNanpaNumberWithNationalPrefix_ = function() {
// For NANPA numbers beginning with 1[2-9], treat the 1 as the national
// prefix. The reason is that national significant numbers in NANPA always
// start with [2-9] after the national prefix. Numbers beginning with 1[01]
// can only be short/emergency numbers, which don't need the national prefix.
if (this.currentMetadata_.getCountryCode() != 1) {
return false;
}
/** @type {string} */
var nationalNumber = this.nationalNumber_.toString();
return (nationalNumber.charAt(0) == '1') &&
(nationalNumber.charAt(1) != '0') &&
(nationalNumber.charAt(1) != '1');
};
/**
* Returns the national prefix extracted, or an empty string if it is not
* present.
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
removeNationalPrefixFromNationalNumber_ = function() {
/** @type {string} */
var nationalNumber = this.nationalNumber_.toString();
/** @type {number} */
var startOfNationalNumber = 0;
if (this.isNanpaNumberWithNationalPrefix_()) {
startOfNationalNumber = 1;
this.prefixBeforeNationalNumber_.append('1').append(
i18n.phonenumbers.AsYouTypeFormatter.SEPARATOR_BEFORE_NATIONAL_NUMBER_);
this.isCompleteNumber_ = true;
} else if (this.currentMetadata_.hasNationalPrefixForParsing()) {
/** @type {RegExp} */
var nationalPrefixForParsing = new RegExp(
'^(?:' + this.currentMetadata_.getNationalPrefixForParsing() + ')');
/** @type {Array.<string>} */
var m = nationalNumber.match(nationalPrefixForParsing);
// Since some national prefix patterns are entirely optional, check that a
// national prefix could actually be extracted.
if (m != null && m[0] != null && m[0].length > 0) {
// When the national prefix is detected, we use international formatting
// rules instead of national ones, because national formatting rules could
// contain local formatting rules for numbers entered without area code.
this.isCompleteNumber_ = true;
startOfNationalNumber = m[0].length;
this.prefixBeforeNationalNumber_.append(nationalNumber.substring(0,
startOfNationalNumber));
}
}
this.nationalNumber_.clear();
this.nationalNumber_.append(nationalNumber.substring(startOfNationalNumber));
return nationalNumber.substring(0, startOfNationalNumber);
};
/**
* Extracts IDD and plus sign to prefixBeforeNationalNumber when they are
* available, and places the remaining input into nationalNumber.
*
* @return {boolean} true when accruedInputWithoutFormatting begins with the
* plus sign or valid IDD for defaultCountry.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.attemptToExtractIdd_ =
function() {
/** @type {string} */
var accruedInputWithoutFormatting =
this.accruedInputWithoutFormatting_.toString();
/** @type {RegExp} */
var internationalPrefix = new RegExp(
'^(?:' + '\\' + i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + '|' +
this.currentMetadata_.getInternationalPrefix() + ')');
/** @type {Array.<string>} */
var m = accruedInputWithoutFormatting.match(internationalPrefix);
if (m != null && m[0] != null && m[0].length > 0) {
this.isCompleteNumber_ = true;
/** @type {number} */
var startOfCountryCallingCode = m[0].length;
this.nationalNumber_.clear();
this.nationalNumber_.append(
accruedInputWithoutFormatting.substring(startOfCountryCallingCode));
this.prefixBeforeNationalNumber_.clear();
this.prefixBeforeNationalNumber_.append(
accruedInputWithoutFormatting.substring(0, startOfCountryCallingCode));
if (accruedInputWithoutFormatting.charAt(0) !=
i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
this.prefixBeforeNationalNumber_.append(
i18n.phonenumbers.AsYouTypeFormatter.
SEPARATOR_BEFORE_NATIONAL_NUMBER_);
}
return true;
}
return false;
};
/**
* Extracts the country calling code from the beginning of nationalNumber to
* prefixBeforeNationalNumber when they are available, and places the remaining
* input into nationalNumber.
*
* @return {boolean} true when a valid country calling code can be found.
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
attemptToExtractCountryCallingCode_ = function() {
if (this.nationalNumber_.getLength() == 0) {
return false;
}
/** @type {!goog.string.StringBuffer} */
var numberWithoutCountryCallingCode = new goog.string.StringBuffer();
/** @type {number} */
var countryCode = this.phoneUtil_.extractCountryCode(
this.nationalNumber_, numberWithoutCountryCallingCode);
if (countryCode == 0) {
return false;
}
this.nationalNumber_.clear();
this.nationalNumber_.append(numberWithoutCountryCallingCode.toString());
/** @type {string} */
var newRegionCode = this.phoneUtil_.getRegionCodeForCountryCode(countryCode);
if (i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ==
newRegionCode) {
this.currentMetadata_ =
this.phoneUtil_.getMetadataForNonGeographicalRegion(countryCode);
} else if (newRegionCode != this.defaultCountry_) {
this.currentMetadata_ = this.getMetadataForRegion_(newRegionCode);
}
/** @type {string} */
var countryCodeString = '' + countryCode;
this.prefixBeforeNationalNumber_.append(countryCodeString).append(
i18n.phonenumbers.AsYouTypeFormatter.SEPARATOR_BEFORE_NATIONAL_NUMBER_);
// When we have successfully extracted the IDD, the previously extracted NDD
// should be cleared because it is no longer valid.
this.extractedNationalPrefix_ = '';
return true;
};
/**
* Accrues digits and the plus sign to accruedInputWithoutFormatting for later
* use. If nextChar contains a digit in non-ASCII format (e.g. the full-width
* version of digits), it is first normalized to the ASCII version. The return
* value is nextChar itself, or its normalized version, if nextChar is a digit
* in non-ASCII format. This method assumes its input is either a digit or the
* plus sign.
*
* @param {string} nextChar
* @param {boolean} rememberPosition
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.
normalizeAndAccrueDigitsAndPlusSign_ = function(nextChar,
rememberPosition) {
/** @type {string} */
var normalizedChar;
if (nextChar == i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
normalizedChar = nextChar;
this.accruedInputWithoutFormatting_.append(nextChar);
} else {
normalizedChar = i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS[nextChar];
this.accruedInputWithoutFormatting_.append(normalizedChar);
this.nationalNumber_.append(normalizedChar);
}
if (rememberPosition) {
this.positionToRemember_ = this.accruedInputWithoutFormatting_.getLength();
}
return normalizedChar;
};
/**
* @param {string} nextChar
* @return {string}
* @private
*/
i18n.phonenumbers.AsYouTypeFormatter.prototype.inputDigitHelper_ =
function(nextChar) {
// Note that formattingTemplate is not guaranteed to have a value, it could be
// empty, e.g. when the next digit is entered after extracting an IDD or NDD.
/** @type {string} */
var formattingTemplate = this.formattingTemplate_.toString();
if (formattingTemplate.substring(this.lastMatchPosition_)
.search(this.DIGIT_PATTERN_) >= 0) {
/** @type {number} */
var digitPatternStart = formattingTemplate.search(this.DIGIT_PATTERN_);
/** @type {string} */
var tempTemplate =
formattingTemplate.replace(this.DIGIT_PATTERN_, nextChar);
this.formattingTemplate_.clear();
this.formattingTemplate_.append(tempTemplate);
this.lastMatchPosition_ = digitPatternStart;
return tempTemplate.substring(0, this.lastMatchPosition_ + 1);
} else {
if (this.possibleFormats_.length == 1) {
// More digits are entered than we could handle, and there are no other
// valid patterns to try.
this.ableToFormat_ = false;
} // else, we just reset the formatting pattern.
this.currentFormattingPattern_ = '';
return this.accruedInput_.toString();
}
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/asyoutypeformatter.js
|
JavaScript
|
unknown
| 38,646
|
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<meta charset="utf-8">
<title>libphonenumber Unit Tests - i18n.phonenumbers - asyoutypeformatter.js</title>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.proto2.Message');
</script>
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadatafortesting.js"></script>
<script src="regioncodefortesting.js"></script>
<script src="phonenumberutil.js"></script>
<script src="asyoutypeformatter.js"></script>
<script src="asyoutypeformatter_test.js"></script>
</head>
<body>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/asyoutypeformatter_test.html
|
HTML
|
unknown
| 1,248
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Unit tests for the AsYouTypeFormatter.
*
* Note that these tests use the metadata contained in metadatafortesting.js,
* not the normal metadata files, so should not be used for regression test
* purposes - these tests are illustrative only and test functionality.
*
* @author Nikolaos Trogkanis
*/
goog.require('goog.testing.jsunit');
goog.require('i18n.phonenumbers.AsYouTypeFormatter');
goog.require('i18n.phonenumbers.RegionCode');
var RegionCode = i18n.phonenumbers.RegionCode;
function testInvalidRegion() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
assertEquals('+', f.inputDigit('+'));
assertEquals('+4', f.inputDigit('4'));
assertEquals('+48 ', f.inputDigit('8'));
assertEquals('+48 8', f.inputDigit('8'));
assertEquals('+48 88', f.inputDigit('8'));
assertEquals('+48 88 1', f.inputDigit('1'));
assertEquals('+48 88 12', f.inputDigit('2'));
assertEquals('+48 88 123', f.inputDigit('3'));
assertEquals('+48 88 123 1', f.inputDigit('1'));
assertEquals('+48 88 123 12', f.inputDigit('2'));
f.clear();
assertEquals('6', f.inputDigit('6'));
assertEquals('65', f.inputDigit('5'));
assertEquals('650', f.inputDigit('0'));
assertEquals('6502', f.inputDigit('2'));
assertEquals('65025', f.inputDigit('5'));
assertEquals('650253', f.inputDigit('3'));
}
function testInvalidPlusSign() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
assertEquals('+', f.inputDigit('+'));
assertEquals('+4', f.inputDigit('4'));
assertEquals('+48 ', f.inputDigit('8'));
assertEquals('+48 8', f.inputDigit('8'));
assertEquals('+48 88', f.inputDigit('8'));
assertEquals('+48 88 1', f.inputDigit('1'));
assertEquals('+48 88 12', f.inputDigit('2'));
assertEquals('+48 88 123', f.inputDigit('3'));
assertEquals('+48 88 123 1', f.inputDigit('1'));
// A plus sign can only appear at the beginning of the number;
// otherwise, no formatting is applied.
assertEquals('+48881231+', f.inputDigit('+'));
assertEquals('+48881231+2', f.inputDigit('2'));
}
function testTooLongNumberMatchingMultipleLeadingDigits() {
// See https://github.com/google/libphonenumber/issues/36
// The bug occurred last time for countries which have two formatting rules
// with exactly the same leading digits pattern but differ in length.
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+81 ', f.inputDigit('1'));
assertEquals('+81 9', f.inputDigit('9'));
assertEquals('+81 90', f.inputDigit('0'));
assertEquals('+81 90 1', f.inputDigit('1'));
assertEquals('+81 90 12', f.inputDigit('2'));
assertEquals('+81 90 123', f.inputDigit('3'));
assertEquals('+81 90 1234', f.inputDigit('4'));
assertEquals('+81 90 1234 5', f.inputDigit('5'));
assertEquals('+81 90 1234 56', f.inputDigit('6'));
assertEquals('+81 90 1234 567', f.inputDigit('7'));
assertEquals('+81 90 1234 5678', f.inputDigit('8'));
assertEquals('+81 90 12 345 6789', f.inputDigit('9'));
assertEquals('+81901234567890', f.inputDigit('0'));
assertEquals('+819012345678901', f.inputDigit('1'));
}
function testCountryWithSpaceInNationalPrefixFormattingRule() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.BY);
assertEquals('8', f.inputDigit('8'));
assertEquals('88', f.inputDigit('8'));
assertEquals('881', f.inputDigit('1'));
assertEquals('8 819', f.inputDigit('9'));
assertEquals('8 8190', f.inputDigit('0'));
// The formatting rule for 5 digit numbers states that no space should be
// present after the national prefix.
assertEquals('881 901', f.inputDigit('1'));
assertEquals('8 819 012', f.inputDigit('2'));
// Too long, no formatting rule applies.
assertEquals('88190123', f.inputDigit('3'));
}
function testCountryWithSpaceInNationalPrefixFormattingRuleAndLongNdd() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.BY);
assertEquals('9', f.inputDigit('9'));
assertEquals('99', f.inputDigit('9'));
assertEquals('999', f.inputDigit('9'));
assertEquals('9999', f.inputDigit('9'));
assertEquals('99999 ', f.inputDigit('9'));
assertEquals('99999 1', f.inputDigit('1'));
assertEquals('99999 12', f.inputDigit('2'));
assertEquals('99999 123', f.inputDigit('3'));
assertEquals('99999 1234', f.inputDigit('4'));
assertEquals('99999 12 345', f.inputDigit('5'));
}
function testAYTFUS() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
assertEquals('6', f.inputDigit('6'));
assertEquals('65', f.inputDigit('5'));
assertEquals('650', f.inputDigit('0'));
assertEquals('650 2', f.inputDigit('2'));
assertEquals('650 25', f.inputDigit('5'));
assertEquals('650 253', f.inputDigit('3'));
// Note this is how a US local number (without area code) should be formatted.
assertEquals('650 2532', f.inputDigit('2'));
assertEquals('650 253 22', f.inputDigit('2'));
assertEquals('650 253 222', f.inputDigit('2'));
assertEquals('650 253 2222', f.inputDigit('2'));
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('16', f.inputDigit('6'));
assertEquals('1 65', f.inputDigit('5'));
assertEquals('1 650', f.inputDigit('0'));
assertEquals('1 650 2', f.inputDigit('2'));
assertEquals('1 650 25', f.inputDigit('5'));
assertEquals('1 650 253', f.inputDigit('3'));
assertEquals('1 650 253 2', f.inputDigit('2'));
assertEquals('1 650 253 22', f.inputDigit('2'));
assertEquals('1 650 253 222', f.inputDigit('2'));
assertEquals('1 650 253 2222', f.inputDigit('2'));
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011 ', f.inputDigit('1'));
assertEquals('011 4', f.inputDigit('4'));
assertEquals('011 44 ', f.inputDigit('4'));
assertEquals('011 44 6', f.inputDigit('6'));
assertEquals('011 44 61', f.inputDigit('1'));
assertEquals('011 44 6 12', f.inputDigit('2'));
assertEquals('011 44 6 123', f.inputDigit('3'));
assertEquals('011 44 6 123 1', f.inputDigit('1'));
assertEquals('011 44 6 123 12', f.inputDigit('2'));
assertEquals('011 44 6 123 123', f.inputDigit('3'));
assertEquals('011 44 6 123 123 1', f.inputDigit('1'));
assertEquals('011 44 6 123 123 12', f.inputDigit('2'));
assertEquals('011 44 6 123 123 123', f.inputDigit('3'));
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011 ', f.inputDigit('1'));
assertEquals('011 5', f.inputDigit('5'));
assertEquals('011 54 ', f.inputDigit('4'));
assertEquals('011 54 9', f.inputDigit('9'));
assertEquals('011 54 91', f.inputDigit('1'));
assertEquals('011 54 9 11', f.inputDigit('1'));
assertEquals('011 54 9 11 2', f.inputDigit('2'));
assertEquals('011 54 9 11 23', f.inputDigit('3'));
assertEquals('011 54 9 11 231', f.inputDigit('1'));
assertEquals('011 54 9 11 2312', f.inputDigit('2'));
assertEquals('011 54 9 11 2312 1', f.inputDigit('1'));
assertEquals('011 54 9 11 2312 12', f.inputDigit('2'));
assertEquals('011 54 9 11 2312 123', f.inputDigit('3'));
assertEquals('011 54 9 11 2312 1234', f.inputDigit('4'));
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011 ', f.inputDigit('1'));
assertEquals('011 2', f.inputDigit('2'));
assertEquals('011 24', f.inputDigit('4'));
assertEquals('011 244 ', f.inputDigit('4'));
assertEquals('011 244 2', f.inputDigit('2'));
assertEquals('011 244 28', f.inputDigit('8'));
assertEquals('011 244 280', f.inputDigit('0'));
assertEquals('011 244 280 0', f.inputDigit('0'));
assertEquals('011 244 280 00', f.inputDigit('0'));
assertEquals('011 244 280 000', f.inputDigit('0'));
assertEquals('011 244 280 000 0', f.inputDigit('0'));
assertEquals('011 244 280 000 00', f.inputDigit('0'));
assertEquals('011 244 280 000 000', f.inputDigit('0'));
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+4', f.inputDigit('4'));
assertEquals('+48 ', f.inputDigit('8'));
assertEquals('+48 8', f.inputDigit('8'));
assertEquals('+48 88', f.inputDigit('8'));
assertEquals('+48 88 1', f.inputDigit('1'));
assertEquals('+48 88 12', f.inputDigit('2'));
assertEquals('+48 88 123', f.inputDigit('3'));
assertEquals('+48 88 123 1', f.inputDigit('1'));
assertEquals('+48 88 123 12', f.inputDigit('2'));
assertEquals('+48 88 123 12 1', f.inputDigit('1'));
assertEquals('+48 88 123 12 12', f.inputDigit('2'));
}
function testAYTFUSFullWidthCharacters() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
assertEquals('\uFF16', f.inputDigit('\uFF16'));
assertEquals('\uFF16\uFF15', f.inputDigit('\uFF15'));
assertEquals('650', f.inputDigit('\uFF10'));
assertEquals('650 2', f.inputDigit('\uFF12'));
assertEquals('650 25', f.inputDigit('\uFF15'));
assertEquals('650 253', f.inputDigit('\uFF13'));
assertEquals('650 2532', f.inputDigit('\uFF12'));
assertEquals('650 253 22', f.inputDigit('\uFF12'));
assertEquals('650 253 222', f.inputDigit('\uFF12'));
assertEquals('650 253 2222', f.inputDigit('\uFF12'));
}
function testAYTFUSMobileShortCode() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
assertEquals('*', f.inputDigit('*'));
assertEquals('*1', f.inputDigit('1'));
assertEquals('*12', f.inputDigit('2'));
assertEquals('*121', f.inputDigit('1'));
assertEquals('*121#', f.inputDigit('#'));
}
function testAYTFUSVanityNumber() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
assertEquals('8', f.inputDigit('8'));
assertEquals('80', f.inputDigit('0'));
assertEquals('800', f.inputDigit('0'));
assertEquals('800 ', f.inputDigit(' '));
assertEquals('800 M', f.inputDigit('M'));
assertEquals('800 MY', f.inputDigit('Y'));
assertEquals('800 MY ', f.inputDigit(' '));
assertEquals('800 MY A', f.inputDigit('A'));
assertEquals('800 MY AP', f.inputDigit('P'));
assertEquals('800 MY APP', f.inputDigit('P'));
assertEquals('800 MY APPL', f.inputDigit('L'));
assertEquals('800 MY APPLE', f.inputDigit('E'));
}
function testAYTFAndRememberPositionUS() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
assertEquals('1', f.inputDigitAndRememberPosition('1'));
assertEquals(1, f.getRememberedPosition());
assertEquals('16', f.inputDigit('6'));
assertEquals('1 65', f.inputDigit('5'));
assertEquals(1, f.getRememberedPosition());
assertEquals('1 650', f.inputDigitAndRememberPosition('0'));
assertEquals(5, f.getRememberedPosition());
assertEquals('1 650 2', f.inputDigit('2'));
assertEquals('1 650 25', f.inputDigit('5'));
// Note the remembered position for digit '0' changes from 4 to 5, because a
// space is now inserted in the front.
assertEquals(5, f.getRememberedPosition());
assertEquals('1 650 253', f.inputDigit('3'));
assertEquals('1 650 253 2', f.inputDigit('2'));
assertEquals('1 650 253 22', f.inputDigit('2'));
assertEquals(5, f.getRememberedPosition());
assertEquals('1 650 253 222', f.inputDigitAndRememberPosition('2'));
assertEquals(13, f.getRememberedPosition());
assertEquals('1 650 253 2222', f.inputDigit('2'));
assertEquals(13, f.getRememberedPosition());
assertEquals('165025322222', f.inputDigit('2'));
assertEquals(10, f.getRememberedPosition());
assertEquals('1650253222222', f.inputDigit('2'));
assertEquals(10, f.getRememberedPosition());
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('16', f.inputDigitAndRememberPosition('6'));
assertEquals(2, f.getRememberedPosition());
assertEquals('1 65', f.inputDigit('5'));
assertEquals('1 650', f.inputDigit('0'));
assertEquals(3, f.getRememberedPosition());
assertEquals('1 650 2', f.inputDigit('2'));
assertEquals('1 650 25', f.inputDigit('5'));
assertEquals(3, f.getRememberedPosition());
assertEquals('1 650 253', f.inputDigit('3'));
assertEquals('1 650 253 2', f.inputDigit('2'));
assertEquals('1 650 253 22', f.inputDigit('2'));
assertEquals(3, f.getRememberedPosition());
assertEquals('1 650 253 222', f.inputDigit('2'));
assertEquals('1 650 253 2222', f.inputDigit('2'));
assertEquals('165025322222', f.inputDigit('2'));
assertEquals(2, f.getRememberedPosition());
assertEquals('1650253222222', f.inputDigit('2'));
assertEquals(2, f.getRememberedPosition());
f.clear();
assertEquals('6', f.inputDigit('6'));
assertEquals('65', f.inputDigit('5'));
assertEquals('650', f.inputDigit('0'));
assertEquals('650 2', f.inputDigit('2'));
assertEquals('650 25', f.inputDigit('5'));
assertEquals('650 253', f.inputDigit('3'));
assertEquals('650 2532', f.inputDigitAndRememberPosition('2'));
assertEquals(8, f.getRememberedPosition());
assertEquals('650 253 22', f.inputDigit('2'));
assertEquals(9, f.getRememberedPosition());
assertEquals('650 253 222', f.inputDigit('2'));
// No more formatting when semicolon is entered.
assertEquals('650253222;', f.inputDigit(';'));
assertEquals(7, f.getRememberedPosition());
assertEquals('650253222;2', f.inputDigit('2'));
f.clear();
assertEquals('6', f.inputDigit('6'));
assertEquals('65', f.inputDigit('5'));
assertEquals('650', f.inputDigit('0'));
// No more formatting when users choose to do their own formatting.
assertEquals('650-', f.inputDigit('-'));
assertEquals('650-2', f.inputDigitAndRememberPosition('2'));
assertEquals(5, f.getRememberedPosition());
assertEquals('650-25', f.inputDigit('5'));
assertEquals(5, f.getRememberedPosition());
assertEquals('650-253', f.inputDigit('3'));
assertEquals(5, f.getRememberedPosition());
assertEquals('650-253-', f.inputDigit('-'));
assertEquals('650-253-2', f.inputDigit('2'));
assertEquals('650-253-22', f.inputDigit('2'));
assertEquals('650-253-222', f.inputDigit('2'));
assertEquals('650-253-2222', f.inputDigit('2'));
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011 ', f.inputDigit('1'));
assertEquals('011 4', f.inputDigitAndRememberPosition('4'));
assertEquals('011 48 ', f.inputDigit('8'));
assertEquals(5, f.getRememberedPosition());
assertEquals('011 48 8', f.inputDigit('8'));
assertEquals(5, f.getRememberedPosition());
assertEquals('011 48 88', f.inputDigit('8'));
assertEquals('011 48 88 1', f.inputDigit('1'));
assertEquals('011 48 88 12', f.inputDigit('2'));
assertEquals(5, f.getRememberedPosition());
assertEquals('011 48 88 123', f.inputDigit('3'));
assertEquals('011 48 88 123 1', f.inputDigit('1'));
assertEquals('011 48 88 123 12', f.inputDigit('2'));
assertEquals('011 48 88 123 12 1', f.inputDigit('1'));
assertEquals('011 48 88 123 12 12', f.inputDigit('2'));
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+1', f.inputDigit('1'));
assertEquals('+1 6', f.inputDigitAndRememberPosition('6'));
assertEquals('+1 65', f.inputDigit('5'));
assertEquals('+1 650', f.inputDigit('0'));
assertEquals(4, f.getRememberedPosition());
assertEquals('+1 650 2', f.inputDigit('2'));
assertEquals(4, f.getRememberedPosition());
assertEquals('+1 650 25', f.inputDigit('5'));
assertEquals('+1 650 253', f.inputDigitAndRememberPosition('3'));
assertEquals('+1 650 253 2', f.inputDigit('2'));
assertEquals('+1 650 253 22', f.inputDigit('2'));
assertEquals('+1 650 253 222', f.inputDigit('2'));
assertEquals(10, f.getRememberedPosition());
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+1', f.inputDigit('1'));
assertEquals('+1 6', f.inputDigitAndRememberPosition('6'));
assertEquals('+1 65', f.inputDigit('5'));
assertEquals('+1 650', f.inputDigit('0'));
assertEquals(4, f.getRememberedPosition());
assertEquals('+1 650 2', f.inputDigit('2'));
assertEquals(4, f.getRememberedPosition());
assertEquals('+1 650 25', f.inputDigit('5'));
assertEquals('+1 650 253', f.inputDigit('3'));
assertEquals('+1 650 253 2', f.inputDigit('2'));
assertEquals('+1 650 253 22', f.inputDigit('2'));
assertEquals('+1 650 253 222', f.inputDigit('2'));
assertEquals('+1650253222;', f.inputDigit(';'));
assertEquals(3, f.getRememberedPosition());
}
function testAYTFGBFixedLine() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.GB);
assertEquals('0', f.inputDigit('0'));
assertEquals('02', f.inputDigit('2'));
assertEquals('020', f.inputDigit('0'));
assertEquals('020 7', f.inputDigitAndRememberPosition('7'));
assertEquals(5, f.getRememberedPosition());
assertEquals('020 70', f.inputDigit('0'));
assertEquals('020 703', f.inputDigit('3'));
assertEquals(5, f.getRememberedPosition());
assertEquals('020 7031', f.inputDigit('1'));
assertEquals('020 7031 3', f.inputDigit('3'));
assertEquals('020 7031 30', f.inputDigit('0'));
assertEquals('020 7031 300', f.inputDigit('0'));
assertEquals('020 7031 3000', f.inputDigit('0'));
}
function testAYTFGBTollFree() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.GB);
assertEquals('0', f.inputDigit('0'));
assertEquals('08', f.inputDigit('8'));
assertEquals('080', f.inputDigit('0'));
assertEquals('080 7', f.inputDigit('7'));
assertEquals('080 70', f.inputDigit('0'));
assertEquals('080 703', f.inputDigit('3'));
assertEquals('080 7031', f.inputDigit('1'));
assertEquals('080 7031 3', f.inputDigit('3'));
assertEquals('080 7031 30', f.inputDigit('0'));
assertEquals('080 7031 300', f.inputDigit('0'));
assertEquals('080 7031 3000', f.inputDigit('0'));
}
function testAYTFGBPremiumRate() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.GB);
assertEquals('0', f.inputDigit('0'));
assertEquals('09', f.inputDigit('9'));
assertEquals('090', f.inputDigit('0'));
assertEquals('090 7', f.inputDigit('7'));
assertEquals('090 70', f.inputDigit('0'));
assertEquals('090 703', f.inputDigit('3'));
assertEquals('090 7031', f.inputDigit('1'));
assertEquals('090 7031 3', f.inputDigit('3'));
assertEquals('090 7031 30', f.inputDigit('0'));
assertEquals('090 7031 300', f.inputDigit('0'));
assertEquals('090 7031 3000', f.inputDigit('0'));
}
function testAYTFNZMobile() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.NZ);
assertEquals('0', f.inputDigit('0'));
assertEquals('02', f.inputDigit('2'));
assertEquals('021', f.inputDigit('1'));
assertEquals('02-11', f.inputDigit('1'));
assertEquals('02-112', f.inputDigit('2'));
// Note the unittest is using fake metadata which might produce non-ideal
// results.
assertEquals('02-112 3', f.inputDigit('3'));
assertEquals('02-112 34', f.inputDigit('4'));
assertEquals('02-112 345', f.inputDigit('5'));
assertEquals('02-112 3456', f.inputDigit('6'));
}
function testAYTFDE() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.DE);
assertEquals('0', f.inputDigit('0'));
assertEquals('03', f.inputDigit('3'));
assertEquals('030', f.inputDigit('0'));
assertEquals('030/1', f.inputDigit('1'));
assertEquals('030/12', f.inputDigit('2'));
assertEquals('030/123', f.inputDigit('3'));
assertEquals('030/1234', f.inputDigit('4'));
// 04134 1234
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('04', f.inputDigit('4'));
assertEquals('041', f.inputDigit('1'));
assertEquals('041 3', f.inputDigit('3'));
assertEquals('041 34', f.inputDigit('4'));
assertEquals('04134 1', f.inputDigit('1'));
assertEquals('04134 12', f.inputDigit('2'));
assertEquals('04134 123', f.inputDigit('3'));
assertEquals('04134 1234', f.inputDigit('4'));
// 08021 2345
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('08', f.inputDigit('8'));
assertEquals('080', f.inputDigit('0'));
assertEquals('080 2', f.inputDigit('2'));
assertEquals('080 21', f.inputDigit('1'));
assertEquals('08021 2', f.inputDigit('2'));
assertEquals('08021 23', f.inputDigit('3'));
assertEquals('08021 234', f.inputDigit('4'));
assertEquals('08021 2345', f.inputDigit('5'));
// 00 1 650 253 2250
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('00 1 ', f.inputDigit('1'));
assertEquals('00 1 6', f.inputDigit('6'));
assertEquals('00 1 65', f.inputDigit('5'));
assertEquals('00 1 650', f.inputDigit('0'));
assertEquals('00 1 650 2', f.inputDigit('2'));
assertEquals('00 1 650 25', f.inputDigit('5'));
assertEquals('00 1 650 253', f.inputDigit('3'));
assertEquals('00 1 650 253 2', f.inputDigit('2'));
assertEquals('00 1 650 253 22', f.inputDigit('2'));
assertEquals('00 1 650 253 222', f.inputDigit('2'));
assertEquals('00 1 650 253 2222', f.inputDigit('2'));
}
function testAYTFAR() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.AR);
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011', f.inputDigit('1'));
assertEquals('011 7', f.inputDigit('7'));
assertEquals('011 70', f.inputDigit('0'));
assertEquals('011 703', f.inputDigit('3'));
assertEquals('011 7031', f.inputDigit('1'));
assertEquals('011 7031-3', f.inputDigit('3'));
assertEquals('011 7031-30', f.inputDigit('0'));
assertEquals('011 7031-300', f.inputDigit('0'));
assertEquals('011 7031-3000', f.inputDigit('0'));
}
function testAYTFARMobile() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.AR);
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+54 ', f.inputDigit('4'));
assertEquals('+54 9', f.inputDigit('9'));
assertEquals('+54 91', f.inputDigit('1'));
assertEquals('+54 9 11', f.inputDigit('1'));
assertEquals('+54 9 11 2', f.inputDigit('2'));
assertEquals('+54 9 11 23', f.inputDigit('3'));
assertEquals('+54 9 11 231', f.inputDigit('1'));
assertEquals('+54 9 11 2312', f.inputDigit('2'));
assertEquals('+54 9 11 2312 1', f.inputDigit('1'));
assertEquals('+54 9 11 2312 12', f.inputDigit('2'));
assertEquals('+54 9 11 2312 123', f.inputDigit('3'));
assertEquals('+54 9 11 2312 1234', f.inputDigit('4'));
}
function testAYTFKR() {
// +82 51 234 5678
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.KR);
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+82 ', f.inputDigit('2'));
assertEquals('+82 5', f.inputDigit('5'));
assertEquals('+82 51', f.inputDigit('1'));
assertEquals('+82 51-2', f.inputDigit('2'));
assertEquals('+82 51-23', f.inputDigit('3'));
assertEquals('+82 51-234', f.inputDigit('4'));
assertEquals('+82 51-234-5', f.inputDigit('5'));
assertEquals('+82 51-234-56', f.inputDigit('6'));
assertEquals('+82 51-234-567', f.inputDigit('7'));
assertEquals('+82 51-234-5678', f.inputDigit('8'));
// +82 2 531 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+82 ', f.inputDigit('2'));
assertEquals('+82 2', f.inputDigit('2'));
assertEquals('+82 25', f.inputDigit('5'));
assertEquals('+82 2-53', f.inputDigit('3'));
assertEquals('+82 2-531', f.inputDigit('1'));
assertEquals('+82 2-531-5', f.inputDigit('5'));
assertEquals('+82 2-531-56', f.inputDigit('6'));
assertEquals('+82 2-531-567', f.inputDigit('7'));
assertEquals('+82 2-531-5678', f.inputDigit('8'));
// +82 2 3665 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+82 ', f.inputDigit('2'));
assertEquals('+82 2', f.inputDigit('2'));
assertEquals('+82 23', f.inputDigit('3'));
assertEquals('+82 2-36', f.inputDigit('6'));
assertEquals('+82 2-366', f.inputDigit('6'));
assertEquals('+82 2-3665', f.inputDigit('5'));
assertEquals('+82 2-3665-5', f.inputDigit('5'));
assertEquals('+82 2-3665-56', f.inputDigit('6'));
assertEquals('+82 2-3665-567', f.inputDigit('7'));
assertEquals('+82 2-3665-5678', f.inputDigit('8'));
// 02-114
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('02', f.inputDigit('2'));
assertEquals('021', f.inputDigit('1'));
assertEquals('02-11', f.inputDigit('1'));
assertEquals('02-114', f.inputDigit('4'));
// 02-1300
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('02', f.inputDigit('2'));
assertEquals('021', f.inputDigit('1'));
assertEquals('02-13', f.inputDigit('3'));
assertEquals('02-130', f.inputDigit('0'));
assertEquals('02-1300', f.inputDigit('0'));
// 011-456-7890
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011', f.inputDigit('1'));
assertEquals('011-4', f.inputDigit('4'));
assertEquals('011-45', f.inputDigit('5'));
assertEquals('011-456', f.inputDigit('6'));
assertEquals('011-456-7', f.inputDigit('7'));
assertEquals('011-456-78', f.inputDigit('8'));
assertEquals('011-456-789', f.inputDigit('9'));
assertEquals('011-456-7890', f.inputDigit('0'));
// 011-9876-7890
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011', f.inputDigit('1'));
assertEquals('011-9', f.inputDigit('9'));
assertEquals('011-98', f.inputDigit('8'));
assertEquals('011-987', f.inputDigit('7'));
assertEquals('011-9876', f.inputDigit('6'));
assertEquals('011-9876-7', f.inputDigit('7'));
assertEquals('011-9876-78', f.inputDigit('8'));
assertEquals('011-9876-789', f.inputDigit('9'));
assertEquals('011-9876-7890', f.inputDigit('0'));
}
function testAYTF_MX() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.MX);
// +52 800 123 4567
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 8', f.inputDigit('8'));
assertEquals('+52 80', f.inputDigit('0'));
assertEquals('+52 800', f.inputDigit('0'));
assertEquals('+52 800 1', f.inputDigit('1'));
assertEquals('+52 800 12', f.inputDigit('2'));
assertEquals('+52 800 123', f.inputDigit('3'));
assertEquals('+52 800 123 4', f.inputDigit('4'));
assertEquals('+52 800 123 45', f.inputDigit('5'));
assertEquals('+52 800 123 456', f.inputDigit('6'));
assertEquals('+52 800 123 4567', f.inputDigit('7'));
// +52 55 1234 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 5', f.inputDigit('5'));
assertEquals('+52 55', f.inputDigit('5'));
assertEquals('+52 55 1', f.inputDigit('1'));
assertEquals('+52 55 12', f.inputDigit('2'));
assertEquals('+52 55 123', f.inputDigit('3'));
assertEquals('+52 55 1234', f.inputDigit('4'));
assertEquals('+52 55 1234 5', f.inputDigit('5'));
assertEquals('+52 55 1234 56', f.inputDigit('6'));
assertEquals('+52 55 1234 567', f.inputDigit('7'));
assertEquals('+52 55 1234 5678', f.inputDigit('8'));
// +52 212 345 6789
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 2', f.inputDigit('2'));
assertEquals('+52 21', f.inputDigit('1'));
assertEquals('+52 212', f.inputDigit('2'));
assertEquals('+52 212 3', f.inputDigit('3'));
assertEquals('+52 212 34', f.inputDigit('4'));
assertEquals('+52 212 345', f.inputDigit('5'));
assertEquals('+52 212 345 6', f.inputDigit('6'));
assertEquals('+52 212 345 67', f.inputDigit('7'));
assertEquals('+52 212 345 678', f.inputDigit('8'));
assertEquals('+52 212 345 6789', f.inputDigit('9'));
// +52 1 55 1234 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 1', f.inputDigit('1'));
assertEquals('+52 15', f.inputDigit('5'));
assertEquals('+52 1 55', f.inputDigit('5'));
assertEquals('+52 1 55 1', f.inputDigit('1'));
assertEquals('+52 1 55 12', f.inputDigit('2'));
assertEquals('+52 1 55 123', f.inputDigit('3'));
assertEquals('+52 1 55 1234', f.inputDigit('4'));
assertEquals('+52 1 55 1234 5', f.inputDigit('5'));
assertEquals('+52 1 55 1234 56', f.inputDigit('6'));
assertEquals('+52 1 55 1234 567', f.inputDigit('7'));
assertEquals('+52 1 55 1234 5678', f.inputDigit('8'));
// +52 1 541 234 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 1', f.inputDigit('1'));
assertEquals('+52 15', f.inputDigit('5'));
assertEquals('+52 1 54', f.inputDigit('4'));
assertEquals('+52 1 541', f.inputDigit('1'));
assertEquals('+52 1 541 2', f.inputDigit('2'));
assertEquals('+52 1 541 23', f.inputDigit('3'));
assertEquals('+52 1 541 234', f.inputDigit('4'));
assertEquals('+52 1 541 234 5', f.inputDigit('5'));
assertEquals('+52 1 541 234 56', f.inputDigit('6'));
assertEquals('+52 1 541 234 567', f.inputDigit('7'));
assertEquals('+52 1 541 234 5678', f.inputDigit('8'));
}
function testAYTF_International_Toll_Free() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
// +800 1234 5678
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+80', f.inputDigit('0'));
assertEquals('+800 ', f.inputDigit('0'));
assertEquals('+800 1', f.inputDigit('1'));
assertEquals('+800 12', f.inputDigit('2'));
assertEquals('+800 123', f.inputDigit('3'));
assertEquals('+800 1234', f.inputDigit('4'));
assertEquals('+800 1234 5', f.inputDigit('5'));
assertEquals('+800 1234 56', f.inputDigit('6'));
assertEquals('+800 1234 567', f.inputDigit('7'));
assertEquals('+800 1234 5678', f.inputDigit('8'));
assertEquals('+800123456789', f.inputDigit('9'));
}
function testAYTFMultipleLeadingDigitPatterns() {
// +81 50 2345 6789
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.JP);
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+81 ', f.inputDigit('1'));
assertEquals('+81 5', f.inputDigit('5'));
assertEquals('+81 50', f.inputDigit('0'));
assertEquals('+81 50 2', f.inputDigit('2'));
assertEquals('+81 50 23', f.inputDigit('3'));
assertEquals('+81 50 234', f.inputDigit('4'));
assertEquals('+81 50 2345', f.inputDigit('5'));
assertEquals('+81 50 2345 6', f.inputDigit('6'));
assertEquals('+81 50 2345 67', f.inputDigit('7'));
assertEquals('+81 50 2345 678', f.inputDigit('8'));
assertEquals('+81 50 2345 6789', f.inputDigit('9'));
// +81 222 12 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+81 ', f.inputDigit('1'));
assertEquals('+81 2', f.inputDigit('2'));
assertEquals('+81 22', f.inputDigit('2'));
assertEquals('+81 22 2', f.inputDigit('2'));
assertEquals('+81 22 21', f.inputDigit('1'));
assertEquals('+81 2221 2', f.inputDigit('2'));
assertEquals('+81 222 12 5', f.inputDigit('5'));
assertEquals('+81 222 12 56', f.inputDigit('6'));
assertEquals('+81 222 12 567', f.inputDigit('7'));
assertEquals('+81 222 12 5678', f.inputDigit('8'));
// 011113
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('01', f.inputDigit('1'));
assertEquals('011', f.inputDigit('1'));
assertEquals('011 1', f.inputDigit('1'));
assertEquals('011 11', f.inputDigit('1'));
assertEquals('011113', f.inputDigit('3'));
// +81 3332 2 5678
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+81 ', f.inputDigit('1'));
assertEquals('+81 3', f.inputDigit('3'));
assertEquals('+81 33', f.inputDigit('3'));
assertEquals('+81 33 3', f.inputDigit('3'));
assertEquals('+81 3332', f.inputDigit('2'));
assertEquals('+81 3332 2', f.inputDigit('2'));
assertEquals('+81 3332 2 5', f.inputDigit('5'));
assertEquals('+81 3332 2 56', f.inputDigit('6'));
assertEquals('+81 3332 2 567', f.inputDigit('7'));
assertEquals('+81 3332 2 5678', f.inputDigit('8'));
}
function testAYTFLongIDD_AU() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.AU);
// 0011 1 650 253 2250
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('001', f.inputDigit('1'));
assertEquals('0011', f.inputDigit('1'));
assertEquals('0011 1 ', f.inputDigit('1'));
assertEquals('0011 1 6', f.inputDigit('6'));
assertEquals('0011 1 65', f.inputDigit('5'));
assertEquals('0011 1 650', f.inputDigit('0'));
assertEquals('0011 1 650 2', f.inputDigit('2'));
assertEquals('0011 1 650 25', f.inputDigit('5'));
assertEquals('0011 1 650 253', f.inputDigit('3'));
assertEquals('0011 1 650 253 2', f.inputDigit('2'));
assertEquals('0011 1 650 253 22', f.inputDigit('2'));
assertEquals('0011 1 650 253 222', f.inputDigit('2'));
assertEquals('0011 1 650 253 2222', f.inputDigit('2'));
// 0011 81 3332 2 5678
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('001', f.inputDigit('1'));
assertEquals('0011', f.inputDigit('1'));
assertEquals('00118', f.inputDigit('8'));
assertEquals('0011 81 ', f.inputDigit('1'));
assertEquals('0011 81 3', f.inputDigit('3'));
assertEquals('0011 81 33', f.inputDigit('3'));
assertEquals('0011 81 33 3', f.inputDigit('3'));
assertEquals('0011 81 3332', f.inputDigit('2'));
assertEquals('0011 81 3332 2', f.inputDigit('2'));
assertEquals('0011 81 3332 2 5', f.inputDigit('5'));
assertEquals('0011 81 3332 2 56', f.inputDigit('6'));
assertEquals('0011 81 3332 2 567', f.inputDigit('7'));
assertEquals('0011 81 3332 2 5678', f.inputDigit('8'));
// 0011 244 250 253 222
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('001', f.inputDigit('1'));
assertEquals('0011', f.inputDigit('1'));
assertEquals('00112', f.inputDigit('2'));
assertEquals('001124', f.inputDigit('4'));
assertEquals('0011 244 ', f.inputDigit('4'));
assertEquals('0011 244 2', f.inputDigit('2'));
assertEquals('0011 244 25', f.inputDigit('5'));
assertEquals('0011 244 250', f.inputDigit('0'));
assertEquals('0011 244 250 2', f.inputDigit('2'));
assertEquals('0011 244 250 25', f.inputDigit('5'));
assertEquals('0011 244 250 253', f.inputDigit('3'));
assertEquals('0011 244 250 253 2', f.inputDigit('2'));
assertEquals('0011 244 250 253 22', f.inputDigit('2'));
assertEquals('0011 244 250 253 222', f.inputDigit('2'));
}
function testAYTFLongIDD_KR() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.KR);
// 00300 1 650 253 2222
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('003', f.inputDigit('3'));
assertEquals('0030', f.inputDigit('0'));
assertEquals('00300', f.inputDigit('0'));
assertEquals('00300 1 ', f.inputDigit('1'));
assertEquals('00300 1 6', f.inputDigit('6'));
assertEquals('00300 1 65', f.inputDigit('5'));
assertEquals('00300 1 650', f.inputDigit('0'));
assertEquals('00300 1 650 2', f.inputDigit('2'));
assertEquals('00300 1 650 25', f.inputDigit('5'));
assertEquals('00300 1 650 253', f.inputDigit('3'));
assertEquals('00300 1 650 253 2', f.inputDigit('2'));
assertEquals('00300 1 650 253 22', f.inputDigit('2'));
assertEquals('00300 1 650 253 222', f.inputDigit('2'));
assertEquals('00300 1 650 253 2222', f.inputDigit('2'));
}
function testAYTFLongNDD_KR() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.KR);
// 08811-9876-7890
assertEquals('0', f.inputDigit('0'));
assertEquals('08', f.inputDigit('8'));
assertEquals('088', f.inputDigit('8'));
assertEquals('0881', f.inputDigit('1'));
assertEquals('08811', f.inputDigit('1'));
assertEquals('08811-9', f.inputDigit('9'));
assertEquals('08811-98', f.inputDigit('8'));
assertEquals('08811-987', f.inputDigit('7'));
assertEquals('08811-9876', f.inputDigit('6'));
assertEquals('08811-9876-7', f.inputDigit('7'));
assertEquals('08811-9876-78', f.inputDigit('8'));
assertEquals('08811-9876-789', f.inputDigit('9'));
assertEquals('08811-9876-7890', f.inputDigit('0'));
// 08500 11-9876-7890
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('08', f.inputDigit('8'));
assertEquals('085', f.inputDigit('5'));
assertEquals('0850', f.inputDigit('0'));
assertEquals('08500 ', f.inputDigit('0'));
assertEquals('08500 1', f.inputDigit('1'));
assertEquals('08500 11', f.inputDigit('1'));
assertEquals('08500 11-9', f.inputDigit('9'));
assertEquals('08500 11-98', f.inputDigit('8'));
assertEquals('08500 11-987', f.inputDigit('7'));
assertEquals('08500 11-9876', f.inputDigit('6'));
assertEquals('08500 11-9876-7', f.inputDigit('7'));
assertEquals('08500 11-9876-78', f.inputDigit('8'));
assertEquals('08500 11-9876-789', f.inputDigit('9'));
assertEquals('08500 11-9876-7890', f.inputDigit('0'));
}
function testAYTFLongNDD_SG() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.SG);
// 777777 9876 7890
assertEquals('7', f.inputDigit('7'));
assertEquals('77', f.inputDigit('7'));
assertEquals('777', f.inputDigit('7'));
assertEquals('7777', f.inputDigit('7'));
assertEquals('77777', f.inputDigit('7'));
assertEquals('777777 ', f.inputDigit('7'));
assertEquals('777777 9', f.inputDigit('9'));
assertEquals('777777 98', f.inputDigit('8'));
assertEquals('777777 987', f.inputDigit('7'));
assertEquals('777777 9876', f.inputDigit('6'));
assertEquals('777777 9876 7', f.inputDigit('7'));
assertEquals('777777 9876 78', f.inputDigit('8'));
assertEquals('777777 9876 789', f.inputDigit('9'));
assertEquals('777777 9876 7890', f.inputDigit('0'));
}
function testAYTFShortNumberFormattingFix_AU() {
// For Australia, the national prefix is not optional when formatting.
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.AU);
// 1234567890 - For leading digit 1, the national prefix formatting rule has
// first group only.
assertEquals('1', f.inputDigit('1'));
assertEquals('12', f.inputDigit('2'));
assertEquals('123', f.inputDigit('3'));
assertEquals('1234', f.inputDigit('4'));
assertEquals('1234 5', f.inputDigit('5'));
assertEquals('1234 56', f.inputDigit('6'));
assertEquals('1234 567', f.inputDigit('7'));
assertEquals('1234 567 8', f.inputDigit('8'));
assertEquals('1234 567 89', f.inputDigit('9'));
assertEquals('1234 567 890', f.inputDigit('0'));
// +61 1234 567 890 - Test the same number, but with the country code.
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+6', f.inputDigit('6'));
assertEquals('+61 ', f.inputDigit('1'));
assertEquals('+61 1', f.inputDigit('1'));
assertEquals('+61 12', f.inputDigit('2'));
assertEquals('+61 123', f.inputDigit('3'));
assertEquals('+61 1234', f.inputDigit('4'));
assertEquals('+61 1234 5', f.inputDigit('5'));
assertEquals('+61 1234 56', f.inputDigit('6'));
assertEquals('+61 1234 567', f.inputDigit('7'));
assertEquals('+61 1234 567 8', f.inputDigit('8'));
assertEquals('+61 1234 567 89', f.inputDigit('9'));
assertEquals('+61 1234 567 890', f.inputDigit('0'));
// 212345678 - For leading digit 2, the national prefix formatting rule puts
// the national prefix before the first group.
f.clear();
assertEquals('0', f.inputDigit('0'));
assertEquals('02', f.inputDigit('2'));
assertEquals('021', f.inputDigit('1'));
assertEquals('02 12', f.inputDigit('2'));
assertEquals('02 123', f.inputDigit('3'));
assertEquals('02 1234', f.inputDigit('4'));
assertEquals('02 1234 5', f.inputDigit('5'));
assertEquals('02 1234 56', f.inputDigit('6'));
assertEquals('02 1234 567', f.inputDigit('7'));
assertEquals('02 1234 5678', f.inputDigit('8'));
// 212345678 - Test the same number, but without the leading 0.
f.clear();
assertEquals('2', f.inputDigit('2'));
assertEquals('21', f.inputDigit('1'));
assertEquals('212', f.inputDigit('2'));
assertEquals('2123', f.inputDigit('3'));
assertEquals('21234', f.inputDigit('4'));
assertEquals('212345', f.inputDigit('5'));
assertEquals('2123456', f.inputDigit('6'));
assertEquals('21234567', f.inputDigit('7'));
assertEquals('212345678', f.inputDigit('8'));
// +61 2 1234 5678 - Test the same number, but with the country code.
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+6', f.inputDigit('6'));
assertEquals('+61 ', f.inputDigit('1'));
assertEquals('+61 2', f.inputDigit('2'));
assertEquals('+61 21', f.inputDigit('1'));
assertEquals('+61 2 12', f.inputDigit('2'));
assertEquals('+61 2 123', f.inputDigit('3'));
assertEquals('+61 2 1234', f.inputDigit('4'));
assertEquals('+61 2 1234 5', f.inputDigit('5'));
assertEquals('+61 2 1234 56', f.inputDigit('6'));
assertEquals('+61 2 1234 567', f.inputDigit('7'));
assertEquals('+61 2 1234 5678', f.inputDigit('8'));
}
function testAYTFShortNumberFormattingFix_KR() {
// For Korea, the national prefix is not optional when formatting, and the
// national prefix formatting rule doesn't consist of only the first group.
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.KR);
// 111
assertEquals('1', f.inputDigit('1'));
assertEquals('11', f.inputDigit('1'));
assertEquals('111', f.inputDigit('1'));
// 114
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('11', f.inputDigit('1'));
assertEquals('114', f.inputDigit('4'));
// 13121234 - Test a mobile number without the national prefix. Even though it
// is not an emergency number, it should be formatted as a block.
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('13', f.inputDigit('3'));
assertEquals('131', f.inputDigit('1'));
assertEquals('1312', f.inputDigit('2'));
assertEquals('13121', f.inputDigit('1'));
assertEquals('131212', f.inputDigit('2'));
assertEquals('1312123', f.inputDigit('3'));
assertEquals('13121234', f.inputDigit('4'));
// +82 131-2-1234 - Test the same number, but with the country code.
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+82 ', f.inputDigit('2'));
assertEquals('+82 1', f.inputDigit('1'));
assertEquals('+82 13', f.inputDigit('3'));
assertEquals('+82 131', f.inputDigit('1'));
assertEquals('+82 131-2', f.inputDigit('2'));
assertEquals('+82 131-2-1', f.inputDigit('1'));
assertEquals('+82 131-2-12', f.inputDigit('2'));
assertEquals('+82 131-2-123', f.inputDigit('3'));
assertEquals('+82 131-2-1234', f.inputDigit('4'));
}
function testAYTFShortNumberFormattingFix_MX() {
// For Mexico, the national prefix is optional when formatting.
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.MX);
// 911
assertEquals('9', f.inputDigit('9'));
assertEquals('91', f.inputDigit('1'));
assertEquals('911', f.inputDigit('1'));
// 800 123 4567 - Test a toll-free number, which should have a formatting rule
// applied to it even though it doesn't begin with the national prefix.
f.clear();
assertEquals('8', f.inputDigit('8'));
assertEquals('80', f.inputDigit('0'));
assertEquals('800', f.inputDigit('0'));
assertEquals('800 1', f.inputDigit('1'));
assertEquals('800 12', f.inputDigit('2'));
assertEquals('800 123', f.inputDigit('3'));
assertEquals('800 123 4', f.inputDigit('4'));
assertEquals('800 123 45', f.inputDigit('5'));
assertEquals('800 123 456', f.inputDigit('6'));
assertEquals('800 123 4567', f.inputDigit('7'));
// +52 800 123 4567 - Test the same number, but with the country code.
f.clear();
assertEquals('+', f.inputDigit('+'));
assertEquals('+5', f.inputDigit('5'));
assertEquals('+52 ', f.inputDigit('2'));
assertEquals('+52 8', f.inputDigit('8'));
assertEquals('+52 80', f.inputDigit('0'));
assertEquals('+52 800', f.inputDigit('0'));
assertEquals('+52 800 1', f.inputDigit('1'));
assertEquals('+52 800 12', f.inputDigit('2'));
assertEquals('+52 800 123', f.inputDigit('3'));
assertEquals('+52 800 123 4', f.inputDigit('4'));
assertEquals('+52 800 123 45', f.inputDigit('5'));
assertEquals('+52 800 123 456', f.inputDigit('6'));
assertEquals('+52 800 123 4567', f.inputDigit('7'));
}
function testAYTFNoNationalPrefix() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.IT);
assertEquals('3', f.inputDigit('3'));
assertEquals('33', f.inputDigit('3'));
assertEquals('333', f.inputDigit('3'));
assertEquals('333 3', f.inputDigit('3'));
assertEquals('333 33', f.inputDigit('3'));
assertEquals('333 333', f.inputDigit('3'));
}
function testAYTFNoNationalPrefixFormattingRule() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.AO);
assertEquals('3', f.inputDigit('3'));
assertEquals('33', f.inputDigit('3'));
assertEquals('333', f.inputDigit('3'));
assertEquals('333 3', f.inputDigit('3'));
assertEquals('333 33', f.inputDigit('3'));
assertEquals('333 333', f.inputDigit('3'));
}
function testAYTFShortNumberFormattingFix_US() {
// For the US, an initial 1 is treated specially.
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
// 101 - Test that the initial 1 is not treated as a national prefix.
assertEquals('1', f.inputDigit('1'));
assertEquals('10', f.inputDigit('0'));
assertEquals('101', f.inputDigit('1'));
// 112 - Test that the initial 1 is not treated as a national prefix.
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('11', f.inputDigit('1'));
assertEquals('112', f.inputDigit('2'));
// 122 - Test that the initial 1 is treated as a national prefix.
f.clear();
assertEquals('1', f.inputDigit('1'));
assertEquals('12', f.inputDigit('2'));
assertEquals('1 22', f.inputDigit('2'));
}
function testAYTFClearNDDAfterIddExtraction() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.KR);
assertEquals('0', f.inputDigit('0'));
assertEquals('00', f.inputDigit('0'));
assertEquals('007', f.inputDigit('7'));
assertEquals('0070', f.inputDigit('0'));
assertEquals('00700', f.inputDigit('0'));
// NDD is '0' at this stage (the first '0' in '00700') because it's not
// clear if the number is a national number or using the IDD to dial out.
assertEquals('00700 1 ', f.inputDigit('1'));
// NDD should be cleared here because IDD '00700' was extracted after the
// country calling code '1' (US) was entered.
assertEquals('00700 1 2', f.inputDigit('2'));
// The remaining long sequence of inputs is because the original bug that
// this test if for only triggered after a lot of subsequent inputs.
assertEquals('00700 1 23', f.inputDigit('3'));
assertEquals('00700 1 234', f.inputDigit('4'));
assertEquals('00700 1 234 5', f.inputDigit('5'));
assertEquals('00700 1 234 56', f.inputDigit('6'));
assertEquals('00700 1 234 567', f.inputDigit('7'));
assertEquals('00700 1 234 567 8', f.inputDigit('8'));
assertEquals('00700 1 234 567 89', f.inputDigit('9'));
assertEquals('00700 1 234 567 890', f.inputDigit('0'));
assertEquals('00700 1 234 567 8901', f.inputDigit('1'));
assertEquals('00700123456789012', f.inputDigit('2'));
assertEquals('007001234567890123', f.inputDigit('3'));
assertEquals('0070012345678901234', f.inputDigit('4'));
assertEquals('00700123456789012345', f.inputDigit('5'));
assertEquals('007001234567890123456', f.inputDigit('6'));
assertEquals('0070012345678901234567', f.inputDigit('7'));
}
function testAYTFNumberPatternsBecomingInvalidShouldNotResultInDigitLoss() {
/** @type {i18n.phonenumbers.AsYouTypeFormatter} */
var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.CN);
assertEquals('+', f.inputDigit('+'));
assertEquals('+8', f.inputDigit('8'));
assertEquals('+86 ', f.inputDigit('6'));
assertEquals('+86 9', f.inputDigit('9'));
assertEquals('+86 98', f.inputDigit('8'));
assertEquals('+86 988', f.inputDigit('8'));
assertEquals('+86 988 1', f.inputDigit('1'));
// Now the number pattern is no longer valid because there are multiple
// leading digit patterns; when we try again to extract a country code we
// should ensure we use the last leading digit pattern, rather than the first
// one such that it *thinks* it's found a valid formatting rule again.
// https://github.com/google/libphonenumber/issues/437
assertEquals('+8698812', f.inputDigit('2'));
assertEquals('+86988123', f.inputDigit('3'));
assertEquals('+869881234', f.inputDigit('4'));
assertEquals('+8698812345', f.inputDigit('5'));
}
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/asyoutypeformatter_test.js
|
JavaScript
|
unknown
| 50,638
|
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<meta charset="utf-8">
<title>Phone Number Parser Demo</title>
<script src="demo-compiled.js"></script>
</head>
<body>
<h2>Phone Number Parser Demo</h2>
<form>
<p>
Specify a Phone Number:
<input type="text" name="phoneNumber" id="phoneNumber" size="25" />
</p>
<p>
Specify a Default Country:
<input type="text" name="defaultCountry" id="defaultCountry" size="2" />
(CLDR two-letter region code)
</p>
<p>
Specify a Carrier Code:
<input type="text" name="carrierCode" id="carrierCode" size="2" />
(optional, only valid for some countries)
</p>
<input type="submit" value="Submit" onclick="return phoneNumberParser();" />
<input type="reset" value="Reset" />
<p>
<textarea id="output" rows="30" cols="80"></textarea>
</p>
</form>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/demo-compiled.html
|
HTML
|
unknown
| 1,442
|
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<meta charset="utf-8">
<title>Phone Number Parser Demo</title>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.proto2.Message');
</script>
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadata.js"></script>
<script src="shortnumbermetadata.js"></script>
<script src="phonenumberutil.js"></script>
<script src="asyoutypeformatter.js"></script>
<script src="shortnumberinfo.js"></script>
<script src="demo.js"></script>
</head>
<body>
<h2>Phone Number Parser Demo</h2>
<form>
<p>
Specify a Phone Number:
<input type="text" name="phoneNumber" id="phoneNumber" size="25" />
</p>
<p>
Specify a Default Country:
<input type="text" name="defaultCountry" id="defaultCountry" size="2" />
(CLDR two-letter region code)
</p>
<p>
Specify a Carrier Code:
<input type="text" name="carrierCode" id="carrierCode" size="2" />
(optional, only valid for some countries)
</p>
<input type="submit" value="Submit" onclick="return phoneNumberParser();" />
<input type="reset" value="Reset" />
<p>
<textarea id="output" rows="30" cols="80"></textarea>
</p>
</form>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/demo.html
|
HTML
|
unknown
| 1,865
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Phone Number Parser Demo.
*
* @author Nikolaos Trogkanis
*/
goog.require('goog.dom');
goog.require('goog.json');
goog.require('goog.proto2.ObjectSerializer');
goog.require('goog.string.StringBuffer');
goog.require('i18n.phonenumbers.AsYouTypeFormatter');
goog.require('i18n.phonenumbers.PhoneNumberFormat');
goog.require('i18n.phonenumbers.PhoneNumberType');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.PhoneNumberUtil.ValidationResult');
goog.require('i18n.phonenumbers.ShortNumberInfo');
function phoneNumberParser() {
var $ = goog.dom.getElement;
var phoneNumber = $('phoneNumber').value;
var regionCode = $('defaultCountry').value.toUpperCase();
var carrierCode = $('carrierCode').value;
var output = new goog.string.StringBuffer();
try {
var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
var number = phoneUtil.parseAndKeepRawInput(phoneNumber, regionCode);
output.append('****Parsing Result:****\n');
output.append(goog.json.serialize(new goog.proto2.ObjectSerializer(
goog.proto2.ObjectSerializer.KeyOption.NAME).serialize(number)));
output.append('\n\n****Validation Results:****');
var isPossible = phoneUtil.isPossibleNumber(number);
output.append('\nResult from isPossibleNumber(): ');
output.append(isPossible);
if (!isPossible) {
output.append('\nResult from isPossibleNumberWithReason(): ');
var PNV = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
switch (phoneUtil.isPossibleNumberWithReason(number)) {
case PNV.INVALID_COUNTRY_CODE:
output.append('INVALID_COUNTRY_CODE');
break;
case PNV.TOO_SHORT:
output.append('TOO_SHORT');
break;
case PNV.TOO_LONG:
output.append('TOO_LONG');
break;
}
// IS_POSSIBLE shouldn't happen, since we only call this if _not_
// possible.
output.append('\nNote: numbers that are not possible have type ' +
'UNKNOWN, an unknown region, and are considered invalid.');
} else {
var isNumberValid = phoneUtil.isValidNumber(number);
output.append('\nResult from isValidNumber(): ');
output.append(isNumberValid);
if (isNumberValid && regionCode && regionCode != 'ZZ') {
output.append('\nResult from isValidNumberForRegion(): ');
output.append(phoneUtil.isValidNumberForRegion(number, regionCode));
}
output.append('\nPhone Number region: ');
output.append(phoneUtil.getRegionCodeForNumber(number));
output.append('\nResult from getNumberType(): ');
var PNT = i18n.phonenumbers.PhoneNumberType;
switch (phoneUtil.getNumberType(number)) {
case PNT.FIXED_LINE:
output.append('FIXED_LINE');
break;
case PNT.MOBILE:
output.append('MOBILE');
break;
case PNT.FIXED_LINE_OR_MOBILE:
output.append('FIXED_LINE_OR_MOBILE');
break;
case PNT.TOLL_FREE:
output.append('TOLL_FREE');
break;
case PNT.PREMIUM_RATE:
output.append('PREMIUM_RATE');
break;
case PNT.SHARED_COST:
output.append('SHARED_COST');
break;
case PNT.VOIP:
output.append('VOIP');
break;
case PNT.PERSONAL_NUMBER:
output.append('PERSONAL_NUMBER');
break;
case PNT.PAGER:
output.append('PAGER');
break;
case PNT.UAN:
output.append('UAN');
break;
case PNT.UNKNOWN:
output.append('UNKNOWN');
break;
}
}
var shortInfo = i18n.phonenumbers.ShortNumberInfo.getInstance();
output.append('\n\n****ShortNumberInfo Results:****');
output.append('\nResult from isPossibleShortNumber: ');
output.append(shortInfo.isPossibleShortNumber(number));
output.append('\nResult from isValidShortNumber: ');
output.append(shortInfo.isValidShortNumber(number));
output.append('\nResult from isPossibleShortNumberForRegion: ');
output.append(shortInfo.isPossibleShortNumberForRegion(number, regionCode));
output.append('\nResult from isValidShortNumberForRegion: ');
output.append(shortInfo.isValidShortNumberForRegion(number, regionCode));
var PNF = i18n.phonenumbers.PhoneNumberFormat;
output.append('\n\n****Formatting Results:**** ');
output.append('\nE164 format: ');
output.append(isNumberValid ?
phoneUtil.format(number, PNF.E164) :
'invalid');
output.append('\nOriginal format: ');
output.append(phoneUtil.formatInOriginalFormat(number, regionCode));
output.append('\nNational format: ');
output.append(phoneUtil.format(number, PNF.NATIONAL));
output.append('\nInternational format: ');
output.append(isNumberValid ?
phoneUtil.format(number, PNF.INTERNATIONAL) :
'invalid');
output.append('\nOut-of-country format from US: ');
output.append(isNumberValid ?
phoneUtil.formatOutOfCountryCallingNumber(number, 'US') :
'invalid');
output.append('\nOut-of-country format from Switzerland: ');
output.append(isNumberValid ?
phoneUtil.formatOutOfCountryCallingNumber(number, 'CH') :
'invalid');
if (carrierCode.length > 0) {
output.append('\nNational format with carrier code: ');
output.append(phoneUtil.formatNationalNumberWithCarrierCode(number,
carrierCode));
}
output.append('\n\n****AsYouTypeFormatter Results****');
var formatter = new i18n.phonenumbers.AsYouTypeFormatter(regionCode);
var phoneNumberLength = phoneNumber.length;
for (var i = 0; i < phoneNumberLength; ++i) {
var inputChar = phoneNumber.charAt(i);
output.append('\nChar entered: ');
output.append(inputChar);
output.append(' Output: ');
output.append(formatter.inputDigit(inputChar));
}
} catch (e) {
output.append('\n' + e.toString());
}
$('output').value = output.toString();
return false;
}
goog.exportSymbol('phoneNumberParser', phoneNumberParser);
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/demo.js
|
JavaScript
|
unknown
| 6,888
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated metadata for file
* ../resources/PhoneNumberMetadata.xml
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.metadata');
/**
* A mapping from a country calling code to the region codes which denote the
* region represented by that country calling code. In the case of multiple
* countries sharing a calling code, such as the NANPA regions, the one
* indicated with "isMainCountryForCode" in the metadata should be first.
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap = {
1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"]
,7:["RU","KZ"]
,20:["EG"]
,27:["ZA"]
,30:["GR"]
,31:["NL"]
,32:["BE"]
,33:["FR"]
,34:["ES"]
,36:["HU"]
,39:["IT","VA"]
,40:["RO"]
,41:["CH"]
,43:["AT"]
,44:["GB","GG","IM","JE"]
,45:["DK"]
,46:["SE"]
,47:["NO","SJ"]
,48:["PL"]
,49:["DE"]
,51:["PE"]
,52:["MX"]
,53:["CU"]
,54:["AR"]
,55:["BR"]
,56:["CL"]
,57:["CO"]
,58:["VE"]
,60:["MY"]
,61:["AU","CC","CX"]
,62:["ID"]
,63:["PH"]
,64:["NZ"]
,65:["SG"]
,66:["TH"]
,81:["JP"]
,82:["KR"]
,84:["VN"]
,86:["CN"]
,90:["TR"]
,91:["IN"]
,92:["PK"]
,93:["AF"]
,94:["LK"]
,95:["MM"]
,98:["IR"]
,211:["SS"]
,212:["MA","EH"]
,213:["DZ"]
,216:["TN"]
,218:["LY"]
,220:["GM"]
,221:["SN"]
,222:["MR"]
,223:["ML"]
,224:["GN"]
,225:["CI"]
,226:["BF"]
,227:["NE"]
,228:["TG"]
,229:["BJ"]
,230:["MU"]
,231:["LR"]
,232:["SL"]
,233:["GH"]
,234:["NG"]
,235:["TD"]
,236:["CF"]
,237:["CM"]
,238:["CV"]
,239:["ST"]
,240:["GQ"]
,241:["GA"]
,242:["CG"]
,243:["CD"]
,244:["AO"]
,245:["GW"]
,246:["IO"]
,247:["AC"]
,248:["SC"]
,249:["SD"]
,250:["RW"]
,251:["ET"]
,252:["SO"]
,253:["DJ"]
,254:["KE"]
,255:["TZ"]
,256:["UG"]
,257:["BI"]
,258:["MZ"]
,260:["ZM"]
,261:["MG"]
,262:["RE","YT"]
,263:["ZW"]
,264:["NA"]
,265:["MW"]
,266:["LS"]
,267:["BW"]
,268:["SZ"]
,269:["KM"]
,290:["SH","TA"]
,291:["ER"]
,297:["AW"]
,298:["FO"]
,299:["GL"]
,350:["GI"]
,351:["PT"]
,352:["LU"]
,353:["IE"]
,354:["IS"]
,355:["AL"]
,356:["MT"]
,357:["CY"]
,358:["FI","AX"]
,359:["BG"]
,370:["LT"]
,371:["LV"]
,372:["EE"]
,373:["MD"]
,374:["AM"]
,375:["BY"]
,376:["AD"]
,377:["MC"]
,378:["SM"]
,380:["UA"]
,381:["RS"]
,382:["ME"]
,383:["XK"]
,385:["HR"]
,386:["SI"]
,387:["BA"]
,389:["MK"]
,420:["CZ"]
,421:["SK"]
,423:["LI"]
,500:["FK"]
,501:["BZ"]
,502:["GT"]
,503:["SV"]
,504:["HN"]
,505:["NI"]
,506:["CR"]
,507:["PA"]
,508:["PM"]
,509:["HT"]
,590:["GP","BL","MF"]
,591:["BO"]
,592:["GY"]
,593:["EC"]
,594:["GF"]
,595:["PY"]
,596:["MQ"]
,597:["SR"]
,598:["UY"]
,599:["CW","BQ"]
,670:["TL"]
,672:["NF"]
,673:["BN"]
,674:["NR"]
,675:["PG"]
,676:["TO"]
,677:["SB"]
,678:["VU"]
,679:["FJ"]
,680:["PW"]
,681:["WF"]
,682:["CK"]
,683:["NU"]
,685:["WS"]
,686:["KI"]
,687:["NC"]
,688:["TV"]
,689:["PF"]
,690:["TK"]
,691:["FM"]
,692:["MH"]
,800:["001"]
,808:["001"]
,850:["KP"]
,852:["HK"]
,853:["MO"]
,855:["KH"]
,856:["LA"]
,870:["001"]
,878:["001"]
,880:["BD"]
,881:["001"]
,882:["001"]
,883:["001"]
,886:["TW"]
,888:["001"]
,960:["MV"]
,961:["LB"]
,962:["JO"]
,963:["SY"]
,964:["IQ"]
,965:["KW"]
,966:["SA"]
,967:["YE"]
,968:["OM"]
,970:["PS"]
,971:["AE"]
,972:["IL"]
,973:["BH"]
,974:["QA"]
,975:["BT"]
,976:["MN"]
,977:["NP"]
,979:["001"]
,992:["TJ"]
,993:["TM"]
,994:["AZ"]
,995:["GE"]
,996:["KG"]
,998:["UZ"]
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.metadata.countryToMetadata = {
"AC":[,[,,"(?:[01589]\\d|[46])\\d{4}",,,,,,,[5,6]
]
,[,,"6[2-467]\\d{3}",,,,"62889",,,[5]
]
,[,,"4\\d{4}",,,,"40123",,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:0[1-9]|[1589]\\d)\\d{4}",,,,"542011",,,[6]
]
,,,[,,,,,,,,,[-1]
]
]
,"AD":[,[,,"(?:1|6\\d)\\d{7}|[135-9]\\d{5}",,,,,,,[6,8,9]
]
,[,,"[78]\\d{5}",,,,"712345",,,[6]
]
,[,,"690\\d{6}|[356]\\d{5}",,,,"312345",,,[6,9]
]
,[,,"180[02]\\d{4}",,,,"18001234",,,[8]
]
,[,,"[19]\\d{5}",,,,"912345",,,[6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[135-9]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"1800\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AE":[,[,,"(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"[2-4679][2-8]\\d{6}",,,,"22345678",,,[8]
,[7]
]
,[,,"5[024-68]\\d{7}",,,,"501234567",,,[9]
]
,[,,"400\\d{6}|800\\d{2,9}",,,,"800123456"]
,[,,"900[02]\\d{5}",,,,"900234567",,,[9]
]
,[,,"700[05]\\d{5}",,,,"700012345",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AE",971,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2,9})","$1 $2",["60|8"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"600[25]\\d{5}",,,,"600212345",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"AF":[,[,,"[2-7]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",,,,"234567890",,,,[7]
]
,[,,"7\\d{8}",,,,"701234567",,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AF",93,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AG":[,[,,"(?:268|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}",,,,"2684601234",,,,[7]
]
,[,,"268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}",,,,"2684641234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,"26848[01]\\d{4}",,,,"2684801234",,,,[7]
]
,"AG",1,"011","1",,,"1|([457]\\d{6})$","268$1",,,,,[,,"26840[69]\\d{4}",,,,"2684061234",,,,[7]
]
,,"268",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AI":[,[,,"(?:264|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"264(?:292|4(?:6[12]|9[78]))\\d{4}",,,,"2644612345",,,,[7]
]
,[,,"264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}",,,,"2642351234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"AI",1,"011","1",,,"1|([2457]\\d{6})$","264$1",,,,,[,,"264724\\d{4}",,,,"2647241234",,,,[7]
]
,,"264",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AL":[,[,,"(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",,,,,,,[6,7,8,9]
,[5]
]
,[,,"(?:[2358](?:[16-9]\\d[2-9]|[2-5][2-9]\\d)|4(?:[2-57-9][2-9]|6\\d)\\d)\\d{4}",,,,"22345678",,,[8]
,[5,6,7]
]
,[,,"6(?:[78][2-9]|9\\d)\\d{6}",,,,"672123456",,,[9]
]
,[,,"800\\d{4}",,,,"8001234",,,[7]
]
,[,,"900[1-9]\\d\\d",,,,"900123",,,[6]
]
,[,,"808[1-9]\\d\\d",,,,"808123",,,[6]
]
,[,,"700[2-9]\\d{4}",,,,"70021234",,,[8]
]
,[,,,,,,,,,[-1]
]
,"AL",355,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,4})","$1 $2",["80|9"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"]
,"0$1"]
,[,"(\\d{3})(\\d{5})","$1 $2",["[23578]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AM":[,[,,"(?:[1-489]\\d|55|60|77)\\d{6}",,,,,,,[8]
,[5,6]
]
,[,,"(?:(?:1[0-25]|47)\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2)\\d{5}",,,,"10123456",,,,[5,6]
]
,[,,"(?:33|4[1349]|55|77|88|9[13-9])\\d{6}",,,,"77123456"]
,[,,"800\\d{5}",,,,"80012345"]
,[,,"90[016]\\d{5}",,,,"90012345"]
,[,,"80[1-4]\\d{5}",,,,"80112345"]
,[,,,,,,,,,[-1]
]
,[,,"60(?:2[78]|3[5-9]|4[02-9]|5[0-46-9]|[6-8]\\d|90)\\d{4}",,,,"60271234"]
,"AM",374,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"]
,"0 $1"]
,[,"(\\d{3})(\\d{5})","$1 $2",["2|3[12]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{6})","$1 $2",["1|47"]
,"(0$1)"]
,[,"(\\d{2})(\\d{6})","$1 $2",["[3-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AO":[,[,,"[29]\\d{8}",,,,,,,[9]
]
,[,,"2\\d(?:[0134][25-9]|[25-9]\\d)\\d{5}",,,,"222123456"]
,[,,"9[1-49]\\d{7}",,,,"923123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AO",244,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AR":[,[,,"11\\d{8}|(?:[2368]|9\\d)\\d{9}",,,,,,,[10,11]
,[6,7,8]
]
,[,,"(?:2954|3(?:777|865))[2-8]\\d{5}|3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:1[2-6]|3[3-6])|(?:3[06]|49)4|6(?:04|1[2-7]|4[4-6])|9(?:[17][4-6]|9[3-6]))|3(?:(?:36|64)4|4(?:1[2-7]|[235][4-6]|84)|5(?:1[2-8]|[38][4-6])|8(?:1[2-6]|[58][3-6]|7[24-6])))\\d{6}|(?:2(?:284|657|9(?:20|66))|3(?:4(?:8[27]|92)|755|878))[2-7]\\d{5}|(?:2(?:[28]0|37|6[36]|9[48])|3(?:62|7[069]|8[03]))[45]\\d{6}|(?:2(?:2(?:2[59]|44|52)|3(?:26|4[24])|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:(?:26|62)2|3(?:02|2[03])|477|9(?:42|83))|3(?:4(?:[47]6|62|89)|5(?:41|64)|873))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:329|4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|5[17])|888))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|[24]5|5[25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[145]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,"1123456789",,,[10]
,[6,7,8]
]
,[,,"9(?:2954|3(?:777|865))[2-8]\\d{5}|93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:1[2-6]|3[3-6])|(?:3[06]|49)4|6(?:04|1[2-7]|4[4-6])|9(?:[17][4-6]|9[3-6]))|3(?:(?:36|64)4|4(?:1[2-7]|[235][4-6]|84)|5(?:1[2-8]|[38][4-6])|8(?:1[2-6]|[58][3-6]|7[24-6]))))\\d{6}|9(?:2(?:284|657|9(?:20|66))|3(?:4(?:8[27]|92)|755|878))[2-7]\\d{5}|9(?:2(?:[28]0|37|6[36]|9[48])|3(?:62|7[069]|8[03]))[45]\\d{6}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|4[24])|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:(?:26|62)2|3(?:02|2[03])|477|9(?:42|83))|3(?:4(?:[47]6|62|89)|5(?:41|64)|873))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:329|4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|5[17])|888))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|[24]5|5[25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[145]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,"91123456789",,,,[6,7,8]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"60[04579]\\d{7}",,,,"6001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AR",54,"00","0",,,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1",,,[[,"(\\d{3})","$1",["[09]|1(?:0[0-35-7]|1[02-5]|2[15])"]
]
,[,"(\\d{2})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["[1-8]"]
]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"]
,"0$1",,1]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1"]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"]
,"0$1"]
]
,[[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"]
,"0$1",,1]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3-$4",["91"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3-$4",["9"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"810\\d{7}",,,,,,,[10]
]
,[,,"810\\d{7}",,,,"8101234567",,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"AS":[,[,,"(?:[58]\\d\\d|684|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"6846(?:22|33|44|55|77|88|9[19])\\d{4}",,,,"6846221234",,,,[7]
]
,[,,"684(?:2(?:48|5[2468]|72)|7(?:3[13]|70|82))\\d{4}",,,,"6847331234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"AS",1,"011","1",,,"1|([267]\\d{6})$","684$1",,,,,[,,,,,,,,,[-1]
]
,,"684",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AT":[,[,,"1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",,,,,,,[4,5,6,7,8,9,10,11,12,13]
,[3]
]
,[,,"1(?:11\\d|[2-9]\\d{3,11})|(?:316|463|(?:51|66|73)2)\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-8]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}",,,,"1234567890",,,,[3]
]
,[,,"6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}",,,,"664123456",,,[7,8,9,10,11,12,13]
]
,[,,"800\\d{6,10}",,,,"800123456",,,[9,10,11,12,13]
]
,[,,"9(?:0[01]|3[019])\\d{6,10}",,,,"900123456",,,[9,10,11,12,13]
]
,[,,"8(?:10|2[018])\\d{6,10}|828\\d{5}",,,,"810123456",,,[8,9,10,11,12,13]
]
,[,,,,,,,,,[-1]
]
,[,,"5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",,,,"780123456",,,[5,6,7,8,9,10,11,12,13]
]
,"AT",43,"00","0",,,"0",,,,[[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})","$1 $2",["517"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"]
,"0$1"]
,[,"(\\d{6})","$1",["1"]
]
,[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"]
,"0$1"]
]
,[[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})","$1 $2",["517"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"]
,"0$1"]
,[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AU":[,[,,"1(?:[0-79]\\d{7,8}|8[0-24-9]\\d{7})|(?:[2-478]\\d\\d|550)\\d{6}|1\\d{4,7}",,,,,,,[5,6,7,8,9,10]
]
,[,,"(?:[237]\\d{5}|8(?:51(?:0(?:0[03-9]|[1247]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-6])|1(?:1[69]|[23]\\d|4[0-4]))|(?:[6-8]\\d{3}|9(?:[02-9]\\d\\d|1(?:[0-57-9]\\d|6[0135-9])))\\d))\\d{3}",,,,"212345678",,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,"412345678",,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,"1300123456",,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,"550123456",,,[9]
]
,"AU",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|(183[12])",,"0011",,[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["13"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["19"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["180","1802"]
]
,[,"(\\d{4})(\\d{3,4})","$1 $2",["19"]
]
,[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|[45]"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"]
,"(0$1)","$CC ($1)"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]
]
]
,[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|[45]"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"]
,"(0$1)","$CC ($1)"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]
]
]
,[,,"16\\d{3,7}",,,,"1612345",,,[5,6,7,8,9]
]
,1,,[,,"1[38]00\\d{6}|1(?:345[0-4]|802)\\d{3}|13\\d{4}",,,,,,,[6,7,8,10]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AW":[,[,,"(?:[25-79]\\d\\d|800)\\d{4}",,,,,,,[7]
]
,[,,"5(?:2\\d|8[1-9])\\d{4}",,,,"5212345"]
,[,,"(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}",,,,"5601234"]
,[,,"800\\d{4}",,,,"8001234"]
,[,,"900\\d{4}",,,,"9001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:28\\d|501)\\d{4}",,,,"5011234"]
,"AW",297,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[25-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AX":[,[,,"2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"18[1-8]\\d{3,6}",,,,"181234567",,,[6,7,8,9]
]
,[,,"(?:4[0-8]|50)\\d{4,8}",,,,"412345678",,,[6,7,8,9,10]
]
,[,,"800\\d{4,6}",,,,"800123456",,,[7,8,9]
]
,[,,"[67]00\\d{5,6}",,,,"600123456",,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AX",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,,,[,,,,,,,,,[-1]
]
,,"18",[,,,,,,,,,[-1]
]
,[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}",,,,"10112345"]
,,,[,,,,,,,,,[-1]
]
]
,"AZ":[,[,,"365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",,,,,,,[9]
,[7]
]
,[,,"(?:222[0-79]\\d|365(?:[0-46-9]\\d|5[0-35-9]))\\d{4}|(?:(?:1[28]|46)\\d|2(?:[045]2|1[24]|2[34]|33|6[23]))\\d{6}",,,,"123123456",,,,[7]
]
,[,,"(?:36554|99[2-9]\\d\\d)\\d{4}|(?:[16]0|4[04]|5[015]|7[07])\\d{7}",,,,"401234567"]
,[,,"88\\d{7}",,,,"881234567"]
,[,,"900200\\d{3}",,,,"900200123"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AZ",994,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[1-9]"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365|46","1[28]|2|365(?:[0-46-9]|5[0-35-9])|46"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365|46","1[28]|2|365(?:[0-46-9]|5[0-35-9])|46"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BA":[,[,,"6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",,,,,,,[8,9]
,[6]
]
,[,,"(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",,,,"30212345",,,[8]
,[6]
]
,[,,"6040[0-4]\\d{4}|6(?:03|[1-356]|44|7\\d)\\d{6}",,,,"61123456"]
,[,,"8[08]\\d{6}",,,,"80123456",,,[8]
]
,[,,"9[0246]\\d{6}",,,,"90123456",,,[8]
]
,[,,"8[12]\\d{6}",,,,"82123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BA",387,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1-$2",["[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70(?:3[0146]|[56]0)\\d{4}",,,,"70341234",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"BB":[,[,,"(?:246|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}",,,,"2464123456",,,,[7]
]
,[,,"246(?:2(?:[3568]\\d|4[0-57-9])|45\\d|69[5-7]|8(?:[2-5]\\d|83))\\d{4}",,,,"2462501234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"(?:246976|900[2-9]\\d\\d)\\d{4}",,,,"9002123456",,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,"24631\\d{5}",,,,"2463101234",,,,[7]
]
,"BB",1,"011","1",,,"1|([2-9]\\d{6})$","246$1",,,,,[,,,,,,,,,[-1]
]
,,"246",[,,,,,,,,,[-1]
]
,[,,"246(?:292|367|4(?:1[7-9]|3[01]|44|67)|7(?:36|53))\\d{4}",,,,"2464301234",,,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"BD":[,[,,"1\\d{9}|2\\d{7,8}|88\\d{4,6}|(?:8[0-79]|9\\d)\\d{4,8}|(?:[346]\\d|[57])\\d{5,8}",,,,,,,[6,7,8,9,10]
]
,[,,"(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2[45]\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}",,,,"27111234"]
,[,,"(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",,,,"1812345678",,,[10]
]
,[,,"80[03]\\d{7}",,,,"8001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"96(?:0[469]|1[0-47]|3[389]|6[69]|7[78])\\d{6}",,,,"9604123456",,,[10]
]
,"BD",880,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"]
,"0$1"]
,[,"(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,6})","$1-$2",["[13-9]"]
,"0$1"]
,[,"(\\d)(\\d{7,8})","$1-$2",["2"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BE":[,[,,"4\\d{8}|[1-9]\\d{7}",,,,,,,[8,9]
]
,[,,"80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",,,,"12345678",,,[8]
]
,[,,"4[5-9]\\d{7}",,,,"470123456",,,[9]
]
,[,,"800[1-9]\\d{4}",,,,"80012345",,,[8]
]
,[,,"(?:70(?:2[0-57]|3[0457]|44|69|7[0579])|90(?:0[0-35-8]|1[36]|2[0-3568]|3[0135689]|4[2-68]|5[1-68]|6[0-378]|7[23568]|9[34679]))\\d{4}",,,,"90012345",,,[8]
]
,[,,"7879\\d{4}",,,,"78791234",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BE",32,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"78(?:0[57]|1[0458]|2[25]|3[15-8]|48|[56]0|7[078])\\d{4}",,,,"78102345",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"BF":[,[,,"[025-7]\\d{7}",,,,,,,[8]
]
,[,,"2(?:0(?:49|5[23]|6[56]|9[016-9])|4(?:4[569]|5[4-6]|6[56]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}",,,,"20491234"]
,[,,"(?:0[127]|5[1-8]|[67]\\d)\\d{6}",,,,"70123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BF",226,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BG":[,[,,"[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",,,,,,,[6,7,8,9]
,[4,5]
]
,[,,"2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",,,,"2123456",,,[6,7,8]
,[4,5]
]
,[,,"43[07-9]\\d{5}|(?:48|8[7-9]\\d|9(?:8\\d|9[69]))\\d{6}",,,,"48123456",,,[8,9]
]
,[,,"800\\d{5}",,,,"80012345",,,[8]
]
,[,,"90\\d{6}",,,,"90123456",,,[8]
]
,[,,"700\\d{5}",,,,"70012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BG",359,"00","0",,,"0",,,,[[,"(\\d{6})","$1",["1"]
]
,[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
]
,[[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BH":[,[,,"[136-9]\\d{7}",,,,,,,[8]
]
,[,,"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9]|88)|9[69][69])|7(?:1(?:11|78)|7\\d\\d))\\d{4}",,,,"17001234"]
,[,,"(?:3(?:[1-79]\\d|8[0-47-9])\\d|6(?:3(?:00|33|6[16])|6(?:3[03-9]|[69]\\d|7[0-6])))\\d{4}",,,,"36001234"]
,[,,"80\\d{6}",,,,"80123456"]
,[,,"(?:87|9[014578])\\d{6}",,,,"90123456"]
,[,,"84\\d{6}",,,,"84123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BH",973,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BI":[,[,,"(?:[267]\\d|31)\\d{6}",,,,,,,[8]
]
,[,,"22\\d{6}",,,,"22201234"]
,[,,"(?:29|31|6[1289]|7[125-9])\\d{6}",,,,"79561234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BI",257,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BJ":[,[,,"(?:[2689]\\d|51)\\d{6}",,,,,,,[8]
]
,[,,"2(?:02|1[037]|2[45]|3[68])\\d{5}",,,,"20211234"]
,[,,"(?:51|6\\d|9[013-9])\\d{6}",,,,"90011234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"857[58]\\d{4}",,,,"85751234"]
,"BJ",229,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[25689]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"81\\d{6}",,,,"81123456"]
,,,[,,,,,,,,,[-1]
]
]
,"BL":[,[,,"(?:590|69\\d|976)\\d{6}",,,,,,,[9]
]
,[,,"590(?:2[7-9]|5[12]|87)\\d{4}",,,,"590271234"]
,[,,"69(?:0\\d\\d|1(?:2[29]|3[0-5]))\\d{4}",,,,"690001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976[01]\\d{5}",,,,"976012345"]
,"BL",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BM":[,[,,"(?:441|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}",,,,"4414123456",,,,[7]
]
,[,,"441(?:[2378]\\d|5[0-39])\\d{5}",,,,"4413701234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"BM",1,"011","1",,,"1|([2-8]\\d{6})$","441$1",,,,,[,,,,,,,,,[-1]
]
,,"441",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BN":[,[,,"[2-578]\\d{6}",,,,,,,[7]
]
,[,,"22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}",,,,"2345678"]
,[,,"(?:22[89]|[78]\\d\\d)\\d{4}",,,,"7123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"5[34]\\d{5}",,,,"5345678"]
,"BN",673,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-578]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BO":[,[,,"(?:[2-467]\\d\\d|8001)\\d{5}",,,,,,,[8,9]
,[7]
]
,[,,"(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",,,,"22123456",,,[8]
,[7]
]
,[,,"[67]\\d{7}",,,,"71234567",,,[8]
]
,[,,"8001[07]\\d{4}",,,,"800171234",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BO",591,"00(?:1\\d)?","0",,,"0(1\\d)?",,,,[[,"(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]
,,"0$CC $1"]
,[,"(\\d{8})","$1",["[67]"]
,,"0$CC $1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]
,,"0$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"8001[07]\\d{4}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BQ":[,[,,"(?:[34]1|7\\d)\\d{5}",,,,,,,[7]
]
,[,,"(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}",,,,"7151234"]
,[,,"(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}",,,,"3181234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BQ",599,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"[347]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BR":[,[,,"(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-24679]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",,,,,,,[8,9,10,11]
]
,[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",,,,"1123456789",,,[10]
,[8]
]
,[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",,,,"11961234567",,,[10,11]
,[8,9]
]
,[,,"800\\d{6,7}",,,,"800123456",,,[9,10]
]
,[,,"300\\d{6}|[59]00\\d{6,7}",,,,"300123456",,,[9,10]
]
,[,,"300\\d{7}|[34]00\\d{5}|4(?:02|37)0\\d{4}",,,,"40041234",,,[8,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BR",55,"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","0",,,"0(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",,,[[,"(\\d{3,6})","$1",["1(?:1[25-8]|2[357-9]|3[02-68]|4[12568]|5|6[0-8]|8[015]|9[0-47-9])|321|610"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["[2-57]","[2357]|4(?:[0-24-9]|3(?:[0-689]|7[1-9]))"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"]
,"0$1"]
,[,"(\\d{5})(\\d{4})","$1-$2",["9"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"]
,"($1)","0 $CC ($1)"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"]
,"($1)","0 $CC ($1)"]
]
,[[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"]
,"($1)","0 $CC ($1)"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"]
,"($1)","0 $CC ($1)"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"4020\\d{4}|[34]00\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BS":[,[,,"(?:242|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-4]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}",,,,"2423456789",,,,[7]
]
,[,,"242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|[89]9))\\d{4}",,,,"2423591234",,,,[7]
]
,[,,"242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456",,,,[7]
]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"BS",1,"011","1",,,"1|([3-8]\\d{6})$","242$1",,,,,[,,,,,,,,,[-1]
]
,,"242",[,,,,,,,,,[-1]
]
,[,,"242225\\d{4}",,,,"2422250123"]
,,,[,,,,,,,,,[-1]
]
]
,"BT":[,[,,"[17]\\d{7}|[2-8]\\d{6}",,,,,,,[7,8]
,[6]
]
,[,,"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",,,,"2345678",,,[7]
,[6]
]
,[,,"(?:1[67]|77)\\d{6}",,,,"17123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BT",975,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[2-7]"]
]
,[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]
]
]
,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BW":[,[,,"90\\d{5}|(?:[2-6]|7\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013])|4(?:6[03]|7[1267]|9[0-5])|5(?:3[0389]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[067]))\\d{4}",,,,"2401234",,,[7]
]
,[,,"77200\\d{3}|7(?:[1-6]\\d|7[013-9])\\d{5}",,,,"71123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"90\\d{5}",,,,"9012345",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"79(?:1(?:[01]\\d|20)|2[0-2]\\d)\\d{3}",,,,"79101234",,,[8]
]
,"BW",267,"00",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["90"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["[2-6]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BY":[,[,,"(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",,,,,,,[6,7,8,9,10,11]
,[5]
]
,[,,"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",,,,"152450911",,,[9]
,[5,6,7]
]
,[,,"(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",,,,"294911911",,,[9]
]
,[,,"800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}",,,,"8011234567"]
,[,,"(?:810|902)\\d{7}",,,,"9021234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"249\\d{6}",,,,"249123456",,,[9]
]
,"BY",375,"810","8",,,"0|80?",,"8~10",,[[,"(\\d{3})(\\d{3})","$1 $2",["800"]
,"8 $1"]
,[,"(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"]
,"8 $1"]
,[,"(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"]
,"8 0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"]
,"8 0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"]
,"8 0$1"]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"800\\d{3,7}|(?:8(?:0[13]|10|20\\d)|902)\\d{7}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BZ":[,[,,"(?:0800\\d|[2-8])\\d{6}",,,,,,,[7,11]
]
,[,,"(?:236|732)\\d{4}|[2-578][02]\\d{5}",,,,"2221234",,,[7]
]
,[,,"6[0-35-7]\\d{5}",,,,"6221234",,,[7]
]
,[,,"0800\\d{7}",,,,"08001234123",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BZ",501,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CA":[,[,,"(?:[2-8]\\d|90)\\d{8}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[57])|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,"5062345678",,,,[7]
]
,[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[57])|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,"5062345678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|(?:5(?:00|2[12]|33|44|66|77|88)|622)[2-9]\\d{6}",,,,"5002345678"]
,[,,"600[2-9]\\d{6}",,,,"6002012345"]
,"CA",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CC":[,[,,"1(?:[0-79]\\d|8[0-24-9])\\d{7}|(?:[148]\\d\\d|550)\\d{6}|1\\d{5,7}",,,,,,,[6,7,8,9,10]
]
,[,,"8(?:51(?:0(?:02|31|60)|118)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",,,,"891621234",,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,"412345678",,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,"1300123456",,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,"550123456",,,[9]
]
,"CC",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|([59]\\d{7})$","8$1","0011",,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CD":[,[,,"[189]\\d{8}|[1-68]\\d{6}",,,,,,,[7,9]
]
,[,,"12\\d{7}|[1-6]\\d{6}",,,,"1234567"]
,[,,"88\\d{5}|(?:8[0-2459]|9[017-9])\\d{7}",,,,"991234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CD",243,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"]
,"0$1"]
,[,"(\\d{2})(\\d{5})","$1 $2",["[1-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CF":[,[,,"(?:[27]\\d{3}|8776)\\d{4}",,,,,,,[8]
]
,[,,"2[12]\\d{6}",,,,"21612345"]
,[,,"7[0257]\\d{6}",,,,"70012345"]
,[,,,,,,,,,[-1]
]
,[,,"8776\\d{4}",,,,"87761234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CF",236,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CG":[,[,,"222\\d{6}|(?:0\\d|80)\\d{7}",,,,,,,[9]
]
,[,,"222[1-589]\\d{5}",,,,"222123456"]
,[,,"0[14-6]\\d{7}",,,,"061234567"]
,[,,,,,,,,,[-1]
]
,[,,"80(?:0\\d\\d|11[0-4])\\d{4}",,,,"800123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CG",242,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["801"]
]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CH":[,[,,"8\\d{11}|[2-9]\\d{8}",,,,,,,[9,12]
]
,[,,"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",,,,"212345678",,,[9]
]
,[,,"7[35-9]\\d{7}",,,,"781234567",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"90[016]\\d{6}",,,,"900123456",,,[9]
]
,[,,"84[0248]\\d{6}",,,,"840123456",,,[9]
]
,[,,"878\\d{6}",,,,"878123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,"CH",41,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"]
,"0$1"]
]
,,[,,"74[0248]\\d{6}",,,,"740123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"5[18]\\d{7}",,,,"581234567",,,[9]
]
,,,[,,"860\\d{9}",,,,"860123456789",,,[12]
]
]
,"CI":[,[,,"[02-9]\\d{7}",,,,,,,[8]
]
,[,,"(?:2(?:0[023]|1[02357]|[23][045]|4[03-5])|3(?:0[06]|1[069]|[2-4][07]|5[09]|6[08]))\\d{5}",,,,"21234567"]
,[,,"(?:2[0-3]80|97[0-3]\\d)\\d{4}|(?:0[1-9]|[457]\\d|6[014-9]|8[4-9]|95)\\d{6}",,,,"01234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CI",225,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[02-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CK":[,[,,"[2-578]\\d{4}",,,,,,,[5]
]
,[,,"(?:2\\d|3[13-7]|4[1-5])\\d{3}",,,,"21234"]
,[,,"[578]\\d{4}",,,,"71234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CK",682,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",["[2-578]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CL":[,[,,"12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",,,,,,,[9,10,11]
]
,[,,"2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:0\\d|1[0-35-9]|2[1-9]|3[0-2]|40)))|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",,,,"221234567",,,[9]
]
,[,,"2(?:1982[0-6]|3314[05-9])\\d{3}|(?:2(?:1(?:160|962)|3(?:2\\d\\d|3(?:0\\d|1[0-35-9]|2[1-9]|3[0-2]|40)))|80[1-9]\\d\\d|9(?:3(?:[0-57-9]\\d\\d|6(?:0[02-9]|[1-9]\\d))|6(?:[0-8]\\d\\d|9(?:[02-79]\\d|1[05-9]))|7[1-9]\\d\\d|9(?:[03-9]\\d\\d|1(?:[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",,,,"221234567",,,[9]
]
,[,,"(?:123|8)00\\d{6}",,,,"800123456",,,[9,11]
]
,[,,,,,,,,,[-1]
]
,[,,"600\\d{7,8}",,,,"6001234567",,,[10,11]
]
,[,,,,,,,,,[-1]
]
,[,,"44\\d{7}",,,,"441234567",,,[9]
]
,"CL",56,"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0",,,,,,,1,[[,"(\\d{4})","$1",["1(?:[03-589]|21)|[29]0|78"]
]
,[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"]
,"($1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]
]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"]
,"($1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"]
,"($1)"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]
]
]
,[[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"]
,"($1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]
]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"]
,"($1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"]
,"($1)"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"600\\d{7,8}",,,,,,,[10,11]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CM":[,[,,"(?:[26]\\d\\d|88)\\d{6}",,,,,,,[8,9]
]
,[,,"2(?:22|33)\\d{6}",,,,"222123456",,,[9]
]
,[,,"(?:24[23]|6[5-9]\\d)\\d{6}",,,,"671234567",,,[9]
]
,[,,"88\\d{6}",,,,"88012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CM",237,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CN":[,[,,"1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",,,,,,,[7,8,9,10,11,12]
,[5,6]
]
,[,,"(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|21(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))\\d{5}|(?:43[35]|754)\\d{7,8}|8(?:078\\d{7}|51\\d{7,8})|(?:10|(?:2|85)1|43[35]|754)(?:100\\d\\d|95\\d{3,4})|(?:2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[1-9]\\d{6})|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[1-9]\\d{5})|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",,,,"1012345678",,,[7,8,9,10,11]
,[5,6]
]
,[,,"1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|5[0-35-9]|6[25-7]|7[0-35-8]|9[0135-9])\\d{8}",,,,"13123456789",,,[11]
]
,[,,"(?:(?:10|21)8|8)00\\d{7}",,,,"8001234567",,,[10,12]
]
,[,,"16[08]\\d{5}",,,,"16812345",,,[8]
]
,[,,"400\\d{7}|950\\d{7,8}|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",,,,"4001234567",,,[7,8,9,10,11]
,[5,6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CN",86,"00|1(?:[12]\\d|79)\\d\\d00","0",,,"0|(1(?:[12]\\d|79)\\d\\d)",,"00",,[[,"(\\d{5,6})","$1",["96"]
]
,[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["16[08]"]
]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[1-9]","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])","26|3(?:[0268]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9])|(?:34|85[23])[0-8]|(?:1|58)[1-9]|(?:63|95)[06-9]|(?:33|85[23]9)[0-46-9]|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[0-8]|9[0-47-9])","26|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23](?:[02-8]|1[1-9]|9[0-46-9]))|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:1|58|85[23]10)[1-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"]
,"0$1",,1]
]
,[[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"]
,"0$1",,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"(?:(?:10|21)8|[48])00\\d{7}|950\\d{7,8}",,,,,,,[10,11,12]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CO":[,[,,"(?:1\\d|3)\\d{9}|[124-8]\\d{7}",,,,,,,[8,10,11]
,[7]
]
,[,,"[124-8][2-9]\\d{6}",,,,"12345678",,,[8]
,[7]
]
,[,,"3333(?:0(?:0\\d|1[0-5])|[4-9]\\d\\d)\\d{3}|33(?:00|3[0-24-9])\\d{6}|3(?:0[0-5]|1\\d|2[0-3]|5[01]|70)\\d{7}",,,,"3211234567",,,[10]
]
,[,,"1800\\d{7}",,,,"18001234567",,,[11]
]
,[,,"19(?:0[01]|4[78])\\d{7}",,,,"19001234567",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CO",57,"00(?:4(?:[14]4|56)|[579])","0",,,"0([3579]|4(?:[14]4|56))?",,,,[[,"(\\d)(\\d{7})","$1 $2",["[14][2-9]|[25-8]"]
,"($1)","0$CC $1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,,"0$CC $1"]
,[,"(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"]
,"0$1"]
]
,[[,"(\\d)(\\d{7})","$1 $2",["[14][2-9]|[25-8]"]
,"($1)","0$CC $1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,,"0$CC $1"]
,[,"(\\d)(\\d{3})(\\d{7})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CR":[,[,,"(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",,,,,,,[8,10]
]
,[,,"210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",,,,"22123456",,,[8]
]
,[,,"(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",,,,"83123456",,,[8]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"90[059]\\d{7}",,,,"9001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:210[0-6]|4\\d{3}|5100)\\d{4}",,,,"40001234",,,[8]
]
,"CR",506,"00",,,,"(19(?:0[0-2468]|1[09]|20|66|77|99))",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CU":[,[,,"[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",,,,,,,[6,7,8,10]
,[4,5]
]
,[,,"(?:3[23]|48)\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}",,,,"71234567",,,,[4,5]
]
,[,,"5\\d{7}",,,,"51234567",,,[8]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"807\\d{7}",,,,"8071234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CU",53,"119","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"]
,"(0$1)"]
,[,"(\\d)(\\d{6,7})","$1 $2",["7"]
,"(0$1)"]
,[,"(\\d)(\\d{7})","$1 $2",["5"]
,"0$1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CV":[,[,,"(?:[2-59]\\d\\d|800)\\d{4}",,,,,,,[7]
]
,[,,"2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}",,,,"2211234"]
,[,,"(?:[34][36]|5[1-389]|9\\d)\\d{5}",,,,"9911234"]
,[,,"800\\d{4}",,,,"8001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CV",238,"0",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CW":[,[,,"(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",,,,,,,[7,8]
]
,[,,"9(?:4(?:3[0-5]|4[14]|6\\d)|50\\d|7(?:2[014]|3[02-9]|4[4-9]|6[357]|77|8[7-9])|8(?:3[39]|[46]\\d|7[01]|8[57-9]))\\d{4}",,,,"94351234"]
,[,,"953[01]\\d{4}|9(?:5[12467]|6[5-9])\\d{5}",,,,"95181234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"60[0-2]\\d{4}",,,,"6001234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CW",599,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[3467]"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]
]
]
,,[,,"955\\d{5}",,,,"95581234",,,[8]
]
,1,"[69]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CX":[,[,,"1(?:[0-79]\\d|8[0-24-9])\\d{7}|(?:[148]\\d\\d|550)\\d{6}|1\\d{5,7}",,,,,,,[6,7,8,9,10]
]
,[,,"8(?:51(?:0(?:01|30|59)|117)|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",,,,"891641234",,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,"412345678",,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,"1800123456",,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,"1900123456",,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,"1300123456",,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,"550123456",,,[9]
]
,"CX",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|([59]\\d{7})$","8$1","0011",,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CY":[,[,,"(?:[279]\\d|[58]0)\\d{6}",,,,,,,[8]
]
,[,,"2[2-6]\\d{6}",,,,"22345678"]
,[,,"9[4-79]\\d{6}",,,,"96123456"]
,[,,"800\\d{5}",,,,"80001234"]
,[,,"90[09]\\d{5}",,,,"90012345"]
,[,,"80[1-9]\\d{5}",,,,"80112345"]
,[,,"700\\d{5}",,,,"70012345"]
,[,,,,,,,,,[-1]
]
,"CY",357,"00",,,,,,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[257-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:50|77)\\d{6}",,,,"77123456"]
,,,[,,,,,,,,,[-1]
]
]
,"CZ":[,[,,"(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",,,,,,,[9,10,11,12]
]
,[,,"(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",,,,"212345678",,,[9]
]
,[,,"(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",,,,"601123456",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"9(?:0[05689]|76)\\d{6}",,,,"900123456",,,[9]
]
,[,,"8[134]\\d{7}",,,,"811234567",,,[9]
]
,[,,"70[01]\\d{6}",,,,"700123456",,,[9]
]
,[,,"9[17]0\\d{6}",,,,"910123456",,,[9]
]
,"CZ",420,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"9(?:5\\d|7[2-4])\\d{6}",,,,"972123456",,,[9]
]
,,,[,,"9(?:3\\d{9}|6\\d{7,10})",,,,"93123456789"]
]
,"DE":[,[,,"[2579]\\d{5,14}|49(?:[05]\\d{10}|[46][1-8]\\d{4,9})|49(?:[0-25]\\d|3[1-689]|7[1-7])\\d{4,8}|49(?:[0-2579]\\d|[34][1-9]|6[0-8])\\d{3}|49\\d{3,4}|(?:1|[368]\\d|4[0-8])\\d{3,13}",,,,,,,[4,5,6,7,8,9,10,11,12,13,14,15]
,[2,3]
]
,[,,"(?:32|49[4-6]\\d)\\d{9}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",,,,"30123456",,,[5,6,7,8,9,10,11,12,13,14,15]
,[2,3,4]
]
,[,,"15[0-25-9]\\d{8}|1(?:6[023]|7\\d)\\d{7,8}",,,,"15123456789",,,[10,11]
]
,[,,"800\\d{7,12}",,,,"8001234567890",,,[10,11,12,13,14,15]
]
,[,,"(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",,,,"9001234567",,,[10,11]
]
,[,,"180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",,,,"18012345",,,[7,8,9,10,11,12,13,14]
]
,[,,"700\\d{8}",,,,"70012345678",,,[11]
]
,[,,,,,,,,,[-1]
]
,"DE",49,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"]
,"0$1"]
,[,"(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"]
,"0$1"]
,[,"(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["138"]
,"0$1"]
,[,"(\\d{5})(\\d{2,10})","$1 $2",["3"]
,"0$1"]
,[,"(\\d{3})(\\d{5,11})","$1 $2",["181"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"]
,"0$1"]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["1[67]"]
,"0$1"]
,[,"(\\d{3})(\\d{7,12})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{4})(\\d{7})","$1 $2",["18[68]"]
,"0$1"]
,[,"(\\d{5})(\\d{6})","$1 $2",["15[0568]"]
,"0$1"]
,[,"(\\d{4})(\\d{7})","$1 $2",["15[1279]"]
,"0$1"]
,[,"(\\d{3})(\\d{8})","$1 $2",["18"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"]
,"0$1"]
]
,,[,,"16(?:4\\d{1,10}|[89]\\d{1,11})",,,,"16412345",,,[4,5,6,7,8,9,10,11,12,13,14]
]
,,,[,,,,,,,,,[-1]
]
,[,,"18(?:1\\d{5,11}|[2-9]\\d{8})",,,,"18500123456",,,[8,9,10,11,12,13,14]
]
,,,[,,"1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",,,,"177991234567",,,[12,13]
]
]
,"DJ":[,[,,"(?:2\\d|77)\\d{6}",,,,,,,[8]
]
,[,,"2(?:1[2-5]|7[45])\\d{5}",,,,"21360003"]
,[,,"77\\d{6}",,,,"77831001"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"DJ",253,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DK":[,[,,"[2-9]\\d{7}",,,,,,,[8]
]
,[,,"(?:[2-7]\\d|8[126-9]|9[1-46-9])\\d{6}",,,,"32123456"]
,[,,"(?:[2-7]\\d|8[126-9]|9[1-46-9])\\d{6}",,,,"32123456"]
,[,,"80\\d{6}",,,,"80123456"]
,[,,"90\\d{6}",,,,"90123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"DK",45,"00",,,,,,,1,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DM":[,[,,"(?:[58]\\d\\d|767|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4])\\d{4}",,,,"7674201234",,,,[7]
]
,[,,"767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-7]|70[1-6])\\d{4}",,,,"7672251234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"DM",1,"011","1",,,"1|([2-7]\\d{6})$","767$1",,,,,[,,,,,,,,,[-1]
]
,,"767",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DO":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}",,,,"8092345678",,,,[7]
]
,[,,"8[024]9[2-9]\\d{6}",,,,"8092345678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"DO",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]
]
,,"8[024]9",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DZ":[,[,,"(?:[1-4]|[5-79]\\d|80)\\d{7}",,,,,,,[8,9]
]
,[,,"9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[0135689])\\d{6}",,,,"12345678"]
,[,,"(?:5(?:4[0-29]|5\\d|6[01])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",,,,"551234567",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"80[3-689]1\\d{5}",,,,"808123456",,,[9]
]
,[,,"80[12]1\\d{5}",,,,"801123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"98[23]\\d{6}",,,,"983123456",,,[9]
]
,"DZ",213,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EC":[,[,,"1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",,,,,,,[8,9,10,11]
,[7]
]
,[,,"[2-7][2-7]\\d{6}",,,,"22123456",,,[8]
,[7]
]
,[,,"964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",,,,"991234567",,,[9]
]
,[,,"1800\\d{7}|1[78]00\\d{6}",,,,"18001234567",,,[10,11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"[2-7]890\\d{4}",,,,"28901234",,,[8]
]
,"EC",593,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-7]"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]
]
]
,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-7]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EE":[,[,,"8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",,,,,,,[7,8,10]
]
,[,,"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",,,,"3212345",,,[7]
]
,[,,"5(?:[0-35-9]\\d{6}|4(?:[0-57-9]\\d{5}|6(?:[0-24-9]\\d{4}|3(?:[0-35-9]\\d{3}|4000))))|8(?:1(?:0(?:000|[3-9]\\d\\d)|(?:1(?:0[236]|1\\d)|(?:23|[3-79]\\d)\\d)\\d)|2(?:0(?:000|(?:19|[24-7]\\d)\\d)|(?:(?:[124-6]\\d|3[5-9]|8[2-4])\\d|7(?:[679]\\d|8[13-9]))\\d)|[349]\\d{4})\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",,,,"51234567",,,[7,8]
]
,[,,"800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}",,,,"80012345"]
,[,,"(?:40\\d\\d|900)\\d{4}",,,,"9001234",,,[7,8]
]
,[,,,,,,,,,[-1]
]
,[,,"70[0-2]\\d{5}",,,,"70012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,"EE",372,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]
]
,[,"(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]
]
,[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"800[2-9]\\d{3}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EG":[,[,,"[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2[2-4]|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",,,,"234567890",,,[8,9]
,[6,7]
]
,[,,"1[0-25]\\d{8}",,,,"1001234567",,,[10]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"900\\d{7}",,,,"9001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"EG",20,"00","0",,,"0",,,,[[,"(\\d)(\\d{7,8})","$1 $2",["[23]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EH":[,[,,"[5-8]\\d{8}",,,,,,,[9]
]
,[,,"528[89]\\d{5}",,,,"528812345"]
,[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:0[016-8]|6[1267]|7[0-27]))\\d{6}",,,,"650123456"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,"89\\d{7}",,,,"891234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:4[0-2]|93)\\d{4}",,,,"592401234"]
,"EH",212,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,"528[89]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ER":[,[,,"[178]\\d{6}",,,,,,,[7]
,[6]
]
,[,,"(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}",,,,"8370362",,,,[6]
]
,[,,"(?:17[1-3]|7\\d\\d)\\d{4}",,,,"7123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ER",291,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ES":[,[,,"(?:51|[6-9]\\d)\\d{7}",,,,,,,[9]
]
,[,,"96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}",,,,"810123456"]
,[,,"9(?:6906(?:09|10)|7390\\d\\d)\\d\\d|(?:6\\d|7[1-48])\\d{7}",,,,"612345678"]
,[,,"[89]00\\d{6}",,,,"800123456"]
,[,,"80[367]\\d{6}",,,,"803123456"]
,[,,"90[12]\\d{6}",,,,"901123456"]
,[,,"70\\d{7}",,,,"701234567"]
,[,,,,,,,,,[-1]
]
,"ES",34,"00",,,,,,,,[[,"(\\d{4})","$1",["905"]
]
,[,"(\\d{6})","$1",["[79]9"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]
]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"51\\d{7}",,,,"511234567"]
,,,[,,,,,,,,,[-1]
]
]
,"ET":[,[,,"(?:11|[2-59]\\d)\\d{7}",,,,,,,[9]
,[7]
]
,[,,"116671\\d{3}|(?:11(?:1(?:1[124]|2[2-57]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8])|5(?:1[578]|44|5[0-4])|6(?:1[78]|2[69]|39|4[5-7]|5[1-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}",,,,"111112345",,,,[7]
]
,[,,"9\\d{8}",,,,"911234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ET",251,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-59]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FI":[,[,,"[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"(?:1[3-79][1-8]|[235689][1-8]\\d)\\d{2,6}",,,,"131234567",,,[5,6,7,8,9]
]
,[,,"(?:4[0-8]|50)\\d{4,8}",,,,"412345678",,,[6,7,8,9,10]
]
,[,,"800\\d{4,6}",,,,"800123456",,,[7,8,9]
]
,[,,"[67]00\\d{5,6}",,,,"600123456",,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FI",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,[[,"(\\d{5})","$1",["75[12]"]
,"0$1"]
,[,"(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"]
,"0$1"]
,[,"(\\d{6})","$1",["11"]
]
,[,"(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,10})","$1 $2",["7"]
,"0$1"]
]
,[[,"(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"]
,"0$1"]
,[,"(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,10})","$1 $2",["7"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,1,"1[03-79]|[2-9]",[,,"20(?:2[023]|9[89])\\d{1,6}|(?:60[12]\\d|7099)\\d{4,5}|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:[1-3]00|7(?:0[1-5]\\d\\d|5[03-9]))\\d{3,7}"]
,[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}",,,,"10112345"]
,,,[,,,,,,,,,[-1]
]
]
,"FJ":[,[,,"45\\d{5}|(?:0800\\d|[235-9])\\d{6}",,,,,,,[7,11]
]
,[,,"603\\d{4}|(?:3[0-5]|6[25-7]|8[58])\\d{5}",,,,"3212345",,,[7]
]
,[,,"(?:[279]\\d|45|5[01568]|8[034679])\\d{5}",,,,"7012345",,,[7]
]
,[,,"0800\\d{7}",,,,"08001234567",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FJ",679,"0(?:0|52)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FK":[,[,,"[2-7]\\d{4}",,,,,,,[5]
]
,[,,"[2-47]\\d{4}",,,,"31234"]
,[,,"[56]\\d{4}",,,,"51234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FK",500,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FM":[,[,,"(?:[39]\\d\\d|820)\\d{4}",,,,,,,[7]
]
,[,,"31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-6]\\d)\\d)\\d{3}",,,,"3201234"]
,[,,"31(?:00[67]|208|309)\\d\\d|(?:3(?:[2357]0[1-9]|602|804|905)|(?:820|9[2-7]\\d)\\d)\\d{3}",,,,"3501234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FM",691,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[389]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FO":[,[,,"(?:[2-8]\\d|90)\\d{4}",,,,,,,[6]
]
,[,,"(?:20|[34]\\d|8[19])\\d{4}",,,,"201234"]
,[,,"(?:[27][1-9]|5\\d)\\d{4}",,,,"211234"]
,[,,"80[257-9]\\d{3}",,,,"802123"]
,[,,"90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d",,,,"901123"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:6[0-36]|88)\\d{4}",,,,"601234"]
,"FO",298,"00",,,,"(10(?:01|[12]0|88))",,,,[[,"(\\d{6})","$1",["[2-9]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FR":[,[,,"[1-9]\\d{8}",,,,,,,[9]
]
,[,,"(?:[1-35]\\d|4[1-9])\\d{7}",,,,"123456789"]
,[,,"700\\d{6}|(?:6\\d|7[3-9])\\d{7}",,,,"612345678"]
,[,,"80[0-5]\\d{6}",,,,"801234567"]
,[,,"836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}",,,,"891123456"]
,[,,"8(?:1[01]|2[0156]|84)\\d{6}",,,,"884012345"]
,[,,,,,,,,,[-1]
]
,[,,"9\\d{8}",,,,"912345678"]
,"FR",33,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["10"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
,"0 $1"]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
,"0 $1"]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"80[6-9]\\d{6}",,,,"806123456"]
,,,[,,,,,,,,,[-1]
]
]
,"GA":[,[,,"(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",,,,,,,[7,8]
]
,[,,"[01]1\\d{6}",,,,"01441234",,,[8]
]
,[,,"(?:0[2-7]|6[256]|7[47])\\d{6}|[2-7]\\d{6}",,,,"06031234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GA",241,"00",,,,"0(11\\d{6}|6[256]\\d{6}|7[47]\\d{6})","$1",,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GB":[,[,,"[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",,,,,,,[7,9,10]
,[4,5,6,8]
]
,[,,"(?:1(?:1(?:3(?:[0-58]\\d\\d|73[03])|(?:4[0-5]|5[0-26-9]|6[0-4]|[78][0-49])\\d\\d)|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:0\\d|20)))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",,,,"1212345678",,,[9,10]
,[4,5,6,7,8]
]
,[,,"7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",,,,"7400123456",,,[10]
]
,[,,"80[08]\\d{7}|800\\d{6}|8001111",,,,"8001234567"]
,[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",,,,"9012345678",,,[7,10]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}",,,,"7012345678",,,[10]
]
,[,,"56\\d{8}",,,,"5612345678",,,[10]
]
,"GB",44,"00","0"," x",,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"]
,"0$1"]
,[,"(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"]
,"0$1"]
,[,"(\\d{4})(\\d{6})","$1 $2",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"]
,"0$1"]
]
,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456",,,[10]
]
,1,,[,,,,,,,,,[-1]
]
,[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"GD":[,[,,"(?:473|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}",,,,"4732691234",,,,[7]
]
,[,,"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|58)|5(?:2[01]|3[3-8])|901)\\d{4}",,,,"4734031234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"GD",1,"011","1",,,"1|([2-9]\\d{6})$","473$1",,,,,[,,,,,,,,,[-1]
]
,,"473",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GE":[,[,,"(?:[3-57]\\d\\d|800)\\d{6}",,,,,,,[9]
,[6,7]
]
,[,,"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}",,,,"322123456",,,,[6,7]
]
,[,,"5(?:0555[5-9]|757(?:7[7-9]|8[01]))\\d{3}|5(?:000\\d|(?:52|75)00|8(?:58[89]|888))\\d{4}|5(?:0050|1111|2222|3333)[0-4]\\d{3}|(?:5(?:[14]4|5[0157-9]|68|7[0147-9]|9[1-35-9])|790)\\d{6}",,,,"555123456"]
,[,,"800\\d{6}",,,,"800123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"706\\d{6}",,,,"706123456"]
,"GE",995,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"706\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GF":[,[,,"(?:[56]94|976)\\d{6}",,,,,,,[9]
]
,[,,"594(?:[023]\\d|1[01]|4[03-9]|5[6-9]|6[0-3]|80|9[014])\\d{4}",,,,"594101234"]
,[,,"694(?:[0-249]\\d|3[0-48])\\d{4}",,,,"694201234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976\\d{6}",,,,"976012345"]
,"GF",594,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GG":[,[,,"(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",,,,,,,[7,9,10]
,[6]
]
,[,,"1481[25-9]\\d{5}",,,,"1481256789",,,[10]
,[6]
]
,[,,"7(?:(?:781|839)\\d|911[17])\\d{5}",,,,"7781123456",,,[10]
]
,[,,"80[08]\\d{7}|800\\d{6}|8001111",,,,"8001234567"]
,[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",,,,"9012345678",,,[7,10]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}",,,,"7012345678",,,[10]
]
,[,,"56\\d{8}",,,,"5612345678",,,[10]
]
,"GG",44,"00","0",,,"0|([25-9]\\d{5})$","1481$1",,,,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456",,,[10]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3[0347]|55)\\d{8}",,,,"5512345678",,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"GH":[,[,,"(?:[235]\\d{3}|800)\\d{5}",,,,,,,[8,9]
,[7]
]
,[,,"3(?:[167]2[0-6]|22[0-5]|32[0-3]|4(?:2[013-9]|3[01])|52[0-7]|82[0-2])\\d{5}|3(?:[0-8]8|9[28])0\\d{5}|3(?:0[237]|[1-9]7)\\d{6}",,,,"302345678",,,[9]
,[7]
]
,[,,"(?:2[0346-8]\\d|5(?:[0457]\\d|6[01]|9[1-6]))\\d{6}",,,,"231234567",,,[9]
]
,[,,"800\\d{5}",,,,"80012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GH",233,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[237]|80"]
]
,[,"(\\d{3})(\\d{5})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{5})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"800\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GI":[,[,,"[256]\\d{7}",,,,,,,[8]
]
,[,,"21(?:6[24-7]\\d|90[0-2])\\d{3}|2(?:00|2[25])\\d{5}",,,,"20012345"]
,[,,"(?:5[146-8]\\d|6(?:06|29))\\d{5}",,,,"57123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GI",350,"00",,,,,,,,[[,"(\\d{3})(\\d{5})","$1 $2",["2"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GL":[,[,,"(?:19|[2-689]\\d)\\d{4}",,,,,,,[6]
]
,[,,"(?:19|3[1-7]|6[14689]|8[14-79]|9\\d)\\d{4}",,,,"321000"]
,[,,"[245]\\d{5}",,,,"221234"]
,[,,"80\\d{4}",,,,"801234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"3[89]\\d{4}",,,,"381234"]
,"GL",299,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-689]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GM":[,[,,"[2-9]\\d{6}",,,,,,,[7]
]
,[,,"(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}",,,,"5661234"]
,[,,"(?:[23679]\\d|5[0-389])\\d{5}",,,,"3012345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GM",220,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GN":[,[,,"722\\d{6}|(?:3|6\\d)\\d{7}",,,,,,,[8,9]
]
,[,,"3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}",,,,"30241234",,,[8]
]
,[,,"6[02356]\\d{7}",,,,"601123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"722\\d{6}",,,,"722123456",,,[9]
]
,"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GP":[,[,,"(?:590|69\\d|976)\\d{6}",,,,,,,[9]
]
,[,,"590(?:0[1-68]|1[0-2]|2[0-68]|3[1289]|4[0-24-9]|5[3-579]|6[0189]|7[08]|8[0-689]|9\\d)\\d{4}",,,,"590201234"]
,[,,"69(?:0\\d\\d|1(?:2[29]|3[0-5]))\\d{4}",,,,"690001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976[01]\\d{5}",,,,"976012345"]
,"GP",590,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GQ":[,[,,"222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",,,,,,,[9]
]
,[,,"33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}",,,,"333091234"]
,[,,"(?:222|55[015])\\d{6}",,,,"222123456"]
,[,,"80\\d[1-9]\\d{5}",,,,"800123456"]
,[,,"90\\d[1-9]\\d{5}",,,,"900123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GQ",240,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]
]
,[,"(\\d{3})(\\d{6})","$1 $2",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GR":[,[,,"5005000\\d{3}|(?:[2689]\\d|70)\\d{8}",,,,,,,[10]
]
,[,,"2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}",,,,"2123456789"]
,[,,"68[57-9]\\d{7}|(?:69|94)\\d{8}",,,,"6912345678"]
,[,,"800\\d{7}",,,,"8001234567"]
,[,,"90[19]\\d{7}",,,,"9091234567"]
,[,,"8(?:0[16]|12|25)\\d{7}",,,,"8011234567"]
,[,,"70\\d{8}",,,,"7012345678"]
,[,,,,,,,,,[-1]
]
,"GR",30,"00",,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"5005000\\d{3}",,,,"5005000123"]
,,,[,,,,,,,,,[-1]
]
]
,"GT":[,[,,"(?:1\\d{3}|[2-7])\\d{7}",,,,,,,[8,11]
]
,[,,"[267][2-9]\\d{6}",,,,"22456789",,,[8]
]
,[,,"[3-5]\\d{7}",,,,"51234567",,,[8]
]
,[,,"18[01]\\d{8}",,,,"18001112222",,,[11]
]
,[,,"19\\d{9}",,,,"19001112222",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GT",502,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GU":[,[,,"(?:[58]\\d\\d|671|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,"6713001234",,,,[7]
]
,[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,"6713001234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"GU",1,"011","1",,,"1|([3-9]\\d{6})$","671$1",,1,,,[,,,,,,,,,[-1]
]
,,"671",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GW":[,[,,"[49]\\d{8}|4\\d{6}",,,,,,,[7,9]
]
,[,,"443\\d{6}",,,,"443201234",,,[9]
]
,[,,"9(?:5\\d|6[569]|77)\\d{6}",,,,"955012345",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"40\\d{5}",,,,"4012345",,,[7]
]
,"GW",245,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["40"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GY":[,[,,"(?:862\\d|9008)\\d{3}|(?:[2-46]\\d|77)\\d{5}",,,,,,,[7]
]
,[,,"(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-24-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|77[1-57])\\d{4}",,,,"2201234"]
,[,,"6\\d{6}",,,,"6091234"]
,[,,"(?:289|862)\\d{4}",,,,"2891234"]
,[,,"9008\\d{3}",,,,"9008123"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GY",592,"001",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-46-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"HK":[,[,,"8[0-46-9]\\d{6,7}|9\\d{4}(?:\\d(?:\\d(?:\\d{4})?)?)?|(?:[235-79]\\d|46)\\d{6}",,,,,,,[5,6,7,8,9,11]
]
,[,,"(?:384[0-5]|58(?:0[1-8]|1[2-9]))\\d{4}|(?:2(?:[13-9]\\d|2[013-9])|3(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69]|89))\\d{5}",,,,"21234567",,,[8]
]
,[,,"(?:46(?:[01][0-6]|4[0-57-9])|5730|(?:626|848)[01]|707[1-5]|929[03-9])\\d{4}|(?:5(?:[1-59][0-46-9]|6[0-4689]|7[0-2469])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",,,,"51234567",,,[8]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"900(?:[0-24-9]\\d{7}|3\\d{1,4})",,,,"90012345678",,,[5,6,7,8,11]
]
,[,,,,,,,,,[-1]
]
,[,,"8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",,,,"81123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,"HK",852,"00(?:30|5[09]|[126-9]?)",,,,,,"00",,[[,"(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
]
,,[,,"7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",,,,"71123456",,,[8]
]
,,,[,,,,,,,,,[-1]
]
,[,,"30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",,,,"30161234",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"HN":[,[,,"8\\d{10}|[237-9]\\d{7}",,,,,,,[8,11]
]
,[,,"2(?:2(?:0[0139]|1[1-36]|[23]\\d|4[04-6]|5[57]|6[24]|7[0135689]|8[01346-9]|9[0-2])|4(?:07|2[3-59]|3[13-689]|4[0-68]|5[1-35])|5(?:0[78]|16|4[03-5]|5\\d|6[014-6]|74|80)|6(?:[056]\\d|17|2[07]|3[04]|4[0-378]|[78][0-8]|9[01])|7(?:6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",,,,"22123456",,,[8]
]
,[,,"[37-9]\\d{7}",,,,"91234567",,,[8]
]
,[,,"8002\\d{7}",,,,"80021234567",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"HN",504,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["8"]
]
]
,[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"8002\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"HR":[,[,,"(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",,,,,,,[6,7,8,9]
]
,[,,"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",,,,"12345678",,,[8,9]
,[6,7]
]
,[,,"9(?:751\\d{5}|8\\d{6,7})|9(?:0[1-9]|[1259]\\d|7[0679])\\d{6}",,,,"921234567",,,[8,9]
]
,[,,"80[01]\\d{4,6}",,,,"800123456",,,[7,8,9]
]
,[,,"6[01459]\\d{6}|6[01]\\d{4,5}",,,,"611234",,,[6,7,8]
]
,[,,,,,,,,,[-1]
]
,[,,"7[45]\\d{6}",,,,"74123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,"HR",385,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-5]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"62\\d{6,7}|72\\d{6}",,,,"62123456",,,[8,9]
]
,,,[,,,,,,,,,[-1]
]
]
,"HT":[,[,,"[2-489]\\d{7}",,,,,,,[8]
]
,[,,"2(?:2\\d|5[1-5]|81|9[149])\\d{5}",,,,"22453300"]
,[,,"[34]\\d{7}",,,,"34101234"]
,[,,"8\\d{7}",,,,"80012345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"9(?:[67][0-4]|8[0-3589]|9\\d)\\d{5}",,,,"98901234"]
,"HT",509,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-489]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"HU":[,[,,"[2357]\\d{8}|[1-9]\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"(?:1\\d|[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|8[2-57-9]|9[2-69])\\d{6}",,,,"12345678",,,[8]
,[6,7]
]
,[,,"(?:[257]0|3[01])\\d{7}",,,,"201234567",,,[9]
]
,[,,"[48]0\\d{6}",,,,"80123456",,,[8]
]
,[,,"9[01]\\d{6}",,,,"90123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"21\\d{7}",,,,"211234567",,,[9]
]
,"HU",36,"00","06",,,"06",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"(06 $1)"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"]
,"(06 $1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57-9]"]
,"06 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"[48]0\\d{6}",,,,,,,[8]
]
,[,,"38\\d{7}",,,,"381234567",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"ID":[,[,,"(?:(?:007803|8\\d{4})\\d|[1-36])\\d{6}|[1-9]\\d{8,10}|[2-9]\\d{7}",,,,,,,[7,8,9,10,11,12,13]
,[5,6]
]
,[,,"2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",,,,"218350123",,,[7,8,9,10,11]
,[5,6]
]
,[,,"8[1-35-9]\\d{7,10}",,,,"812345678",,,[9,10,11,12]
]
,[,,"007803\\d{7}|(?:177\\d|800)\\d{5,7}",,,,"8001234567",,,[8,9,10,11,13]
]
,[,,"809\\d{7}",,,,"8091234567",,,[10]
]
,[,,"804\\d{7}",,,,"8041234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ID",62,"00[189]","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]
]
,[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,7})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{6,8})","$1 $2",["1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
]
,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]
]
,[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,7})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{6,8})","$1 $2",["1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"(?:007803\\d|8071)\\d{6}",,,,,,,[10,13]
]
,[,,"(?:1500|8071\\d{3})\\d{3}",,,,"8071123456",,,[7,10]
]
,,,[,,,,,,,,,[-1]
]
]
,"IE":[,[,,"(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",,,,,,,[7,8,9,10]
,[5,6]
]
,[,,"(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}",,,,"2212345",,,,[5,6]
]
,[,,"8(?:22|[35-9]\\d)\\d{6}",,,,"850123456",,,[9]
]
,[,,"1800\\d{6}",,,,"1800123456",,,[10]
]
,[,,"15(?:1[2-8]|[2-8]0|9[089])\\d{6}",,,,"1520123456",,,[10]
]
,[,,"18[59]0\\d{6}",,,,"1850123456",,,[10]
]
,[,,"700\\d{6}",,,,"700123456",,,[9]
]
,[,,"76\\d{7}",,,,"761234567",,,[9]
]
,"IE",353,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5})","$1 $2",["[45]0"]
,"(0$1)"]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"]
,"(0$1)"]
,[,"(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"18[59]0\\d{6}",,,,,,,[10]
]
,[,,"818\\d{6}",,,,"818123456",,,[9]
]
,,,[,,"88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",,,,"8551234567",,,[10]
]
]
,"IL":[,[,,"1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",,,,,,,[7,8,9,10,11,12]
]
,[,,"153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",,,,"21234567",,,[8,11,12]
,[7]
]
,[,,"5(?:(?:[02368]\\d|[19][2-9]|4[1-9])\\d|5(?:01|1[79]|2[2-8]|3[23]|44|5[05689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",,,,"502345678",,,[9]
]
,[,,"1(?:255|80[019]\\d{3})\\d{3}",,,,"1800123456",,,[7,10]
]
,[,,"1212\\d{4}|1(?:200|9(?:0[01]|19))\\d{6}",,,,"1919123456",,,[8,10]
]
,[,,"1700\\d{6}",,,,"1700123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"78(?:33|55|77|81)\\d{5}|7(?:18|2[23]|3[237]|47|6[58]|7\\d|82|9[235-9])\\d{6}",,,,"771234567",,,[9]
]
,"IL",972,"0(?:0|1[2-9])","0",,,"0",,,,[[,"(\\d{4})(\\d{3})","$1-$2",["125"]
]
,[,"(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]
]
,[,"(\\d{4})(\\d{6})","$1-$2",["159"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]
]
,[,"(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"1700\\d{6}",,,,,,,[10]
]
,[,,"1599\\d{6}",,,,"1599123456",,,[10]
]
,,,[,,"151\\d{8,9}",,,,"15112340000",,,[11,12]
]
]
,"IM":[,[,,"1624\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10]
,[6]
]
,[,,"1624[5-8]\\d{5}",,,,"1624756789",,,,[6]
]
,[,,"76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}",,,,"7924123456"]
,[,,"808162\\d{4}",,,,"8081624567"]
,[,,"8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}",,,,"9016247890"]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}",,,,"7012345678"]
,[,,"56\\d{8}",,,,"5612345678"]
,"IM",44,"00","0",,,"0|([5-8]\\d{5})$","1624$1",,,,,[,,,,,,,,,[-1]
]
,,"74576|(?:16|7[56])24",[,,,,,,,,,[-1]
]
,[,,"3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}",,,,"5512345678"]
,,,[,,,,,,,,,[-1]
]
]
,"IN":[,[,,"(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",,,,,,,[8,9,10,11,12,13]
,[6,7]
]
,[,,"2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",,,,"7410410123",,,[10]
,[6,7,8]
]
,[,,"(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}",,,,"8123456789",,,[10]
]
,[,,"000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))",,,,"1800123456"]
,[,,"186[12]\\d{9}",,,,"1861123456789",,,[13]
]
,[,,"1860\\d{7}",,,,"18603451234",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IN",91,"00","0",,,"0",,,,[[,"(\\d{7})","$1",["575"]
]
,[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"]
,,,1]
,[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"]
,,,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"]
,"0$1",,1]
,[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
,[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"]
,,,1]
]
,[[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"]
,,,1]
,[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"]
,,,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"]
,"0$1",,1]
,[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"]
,,,1]
,[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"]
,,,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"1(?:600\\d{6}|800\\d{4,9})|(?:000800|18(?:03\\d\\d|6(?:0|[12]\\d\\d)))\\d{7}"]
,[,,"140\\d{7}",,,,"1409305260",,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"IO":[,[,,"3\\d{6}",,,,,,,[7]
]
,[,,"37\\d{5}",,,,"3709100"]
,[,,"38\\d{5}",,,,"3801234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IO",246,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["3"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"IQ":[,[,,"(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",,,,"12345678",,,[8,9]
,[6,7]
]
,[,,"7[3-9]\\d{8}",,,,"7912345678",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IQ",964,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"IR":[,[,,"[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",,,,,,,[4,5,6,7,10]
,[8]
]
,[,,"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|2(?:121|[2689]0\\d)|30[0-2]\\d|4(?:111|40\\d))\\d{4}",,,,"2123456789",,,[6,7,10]
,[4,5,8]
]
,[,,"9(?:(?:0(?:[1-35]\\d|44)|(?:[13]\\d|2[0-2])\\d)\\d|9(?:(?:[0-2]\\d|4[45])\\d|5[15]0|8(?:1\\d|88)|9(?:0[013]|1[0134]|21|77|9[6-9])))\\d{5}",,,,"9123456789",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"993\\d{7}",,,,"9932123456",,,[10]
]
,"IR",98,"00","0",,,"0",,,,[[,"(\\d{4,5})","$1",["96"]
,"0$1"]
,[,"(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"9(?:4440\\d{5}|6(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19]))",,,,,,,[4,5,10]
]
,[,,"96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",,,,"9601",,,[4,5]
]
,,,[,,,,,,,,,[-1]
]
]
,"IS":[,[,,"(?:38\\d|[4-9])\\d{6}",,,,,,,[7,9]
]
,[,,"(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-245]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",,,,"4101234",,,[7]
]
,[,,"(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[027-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[28]))\\d{4}",,,,"6111234"]
,[,,"80[08]\\d{4}",,,,"8001234",,,[7]
]
,[,,"90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",,,,"9001234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"49[0-24-79]\\d{4}",,,,"4921234",,,[7]
]
,"IS",354,"00|1(?:0(?:01|[12]0)|100)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"809\\d{4}",,,,"8091234",,,[7]
]
,,,[,,"(?:689|8(?:7[18]|80)|95[48])\\d{4}",,,,"6891234",,,[7]
]
]
,"IT":[,[,,"0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",,,,,,,[6,7,8,9,10,11,12]
]
,[,,"0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",,,,"0212345678",,,[6,7,8,9,10,11]
]
,[,,"3[1-9]\\d{8}|3[2-9]\\d{7}",,,,"3123456789",,,[9,10]
]
,[,,"80(?:0\\d{3}|3)\\d{3}",,,,"800123456",,,[6,9]
]
,[,,"(?:0878\\d\\d|89(?:2|4[5-9]\\d))\\d{3}|89[45][0-4]\\d\\d|(?:1(?:44|6[346])|89(?:5[5-9]|9))\\d{6}",,,,"899123456",,,[6,8,9,10]
]
,[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,"848123456",,,[6,9]
]
,[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]
]
,[,,"55\\d{8}",,,,"5512345678",,,[10]
]
,"IT",39,"00",,,,,,,,[[,"(\\d{4,5})","$1",["1(?:0|9[246])","1(?:0|9(?:2[2-9]|[46]))"]
]
,[,"(\\d{6})","$1",["1(?:1|92)"]
]
,[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]
]
,[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]
]
,[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["894"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1[4679]|[38]"]
]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]
]
,[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]
]
]
,[[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]
]
,[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]
]
,[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["894"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1[4679]|[38]"]
]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]
]
,[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]
]
]
,[,,,,,,,,,[-1]
]
,1,,[,,"848\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,,,[,,"3[2-8]\\d{9,10}",,,,"33101234501",,,[11,12]
]
]
,"JE":[,[,,"1534\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10]
,[6]
]
,[,,"1534[0-24-8]\\d{5}",,,,"1534456789",,,,[6]
]
,[,,"7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}",,,,"7797712345"]
,[,,"80(?:07(?:35|81)|8901)\\d{4}",,,,"8007354567"]
,[,,"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}",,,,"9018105678"]
,[,,,,,,,,,[-1]
]
,[,,"701511\\d{4}",,,,"7015115678"]
,[,,"56\\d{8}",,,,"5612345678"]
,"JE",44,"00","0",,,"0|([0-24-8]\\d{5})$","1534$1",,,,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,"7640123456"]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}",,,,"5512345678"]
,,,[,,,,,,,,,[-1]
]
]
,"JM":[,[,,"(?:[58]\\d\\d|658|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:5(?:02|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[0237-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}",,,,"8765230123",,,,[7]
]
,[,,"(?:658295|876(?:(?:2[14-9]|[348]\\d)\\d|5(?:0[13-9]|1[579]|[2-57-9]\\d|6[0-24-9])|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}",,,,"8762101234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"JM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]
]
,,"658|876",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"JO":[,[,,"(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",,,,,,,[8,9]
]
,[,,"87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-467]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",,,,"62001234",,,[8]
]
,[,,"7(?:[78][0-25-9]|9\\d)\\d{6}",,,,"790123456",,,[9]
]
,[,,"80\\d{6}",,,,"80012345",,,[8]
]
,[,,"9\\d{7}",,,,"90012345",,,[8]
]
,[,,"85\\d{6}",,,,"85012345",,,[8]
]
,[,,"70\\d{7}",,,,"700123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,"JO",962,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["70"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,"74(?:66|77)\\d{5}",,,,"746612345",,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"8(?:10|8\\d)\\d{5}",,,,"88101234",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"JP":[,[,,"00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",,,,,,,[8,9,10,11,12,13,14,15,16,17]
]
,[,,"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",,,,"312345678",,,[9]
]
,[,,"[7-9]0[1-9]\\d{7}",,,,"9012345678",,,[10]
]
,[,,"00(?:(?:37|66)\\d{6,13}|(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d)|(?:120|800\\d)\\d{6}",,,,"120123456"]
,[,,"990\\d{6}",,,,"990123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"60\\d{7}",,,,"601234567",,,[9]
]
,[,,"50[1-9]\\d{7}",,,,"5012345678",,,[10]
]
,"JP",81,"010","0",,,"0",,,,[[,"(\\d{4})(\\d{4})","$1-$2",["007","0077","00777","00777[01]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1"]
,[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[279]|49|6[0-24-9]|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|6(?:[0-24]|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3[3-8]|5[2-9])","[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3(?:[3-6][2-9]|7|8[2-5])|5[2-9])"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{3,4})","$1-$2-$3",["007"]
]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1-$2-$3",["008"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]|80"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{4})(\\d{4,5})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{5})(\\d{5,6})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{6})(\\d{6,7})","$1-$2-$3",["0"]
]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1"]
,[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[279]|49|6[0-24-9]|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|6(?:[0-24]|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3[3-8]|5[2-9])","[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3(?:[3-6][2-9]|7|8[2-5])|5[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]|80"]
,"0$1"]
]
,[,,"20\\d{8}",,,,"2012345678",,,[10]
]
,,,[,,"00(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d|00(?:37|66)\\d{6,13}"]
,[,,"570\\d{6}",,,,"570123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"KE":[,[,,"(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",,,,,,,[7,8,9,10]
]
,[,,"(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",,,,"202012345",,,[7,8,9]
]
,[,,"(?:1(?:0[0-2]|1[01])|7\\d\\d)\\d{6}",,,,"712123456",,,[9]
]
,[,,"800[24-8]\\d{5,6}",,,,"800223456",,,[9,10]
]
,[,,"900[02-9]\\d{5}",,,,"900223456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KE",254,"000","0",,,"0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["[17]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KG":[,[,,"8\\d{9}|(?:[235-8]\\d|99)\\d{7}",,,,,,,[9,10]
,[5,6]
]
,[,,"312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",,,,"312123456",,,[9]
,[5,6]
]
,[,,"(?:312(?:58\\d|973)|8801\\d\\d)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|7(?:[07]\\d|55)|99[05-9])\\d{6}",,,,"700123456",,,[9]
]
,[,,"800\\d{6,7}",,,,"800123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KG",996,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KH":[,[,,"1\\d{9}|[1-9]\\d{7,8}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",,,,"23756789",,,[8,9]
,[6,7]
]
,[,,"(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",,,,"91234567",,,[8,9]
]
,[,,"1800(?:1\\d|2[019])\\d{4}",,,,"1800123456",,,[10]
]
,[,,"1900(?:1\\d|2[09])\\d{4}",,,,"1900123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KH",855,"00[14-9]","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KI":[,[,,"(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",,,,,,,[5,8]
]
,[,,"(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}",,,,"31234"]
,[,,"(?:63\\d{3}|73(?:0[0-5]\\d|140))\\d{3}|[67]200[01]\\d{3}",,,,"72001234",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",,,,"30010000",,,[8]
]
,"KI",686,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KM":[,[,,"[3478]\\d{6}",,,,,,,[7]
,[4]
]
,[,,"7[4-7]\\d{5}",,,,"7712345",,,,[4]
]
,[,,"[34]\\d{6}",,,,"3212345"]
,[,,,,,,,,,[-1]
]
,[,,"8\\d{6}",,,,"8001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KM",269,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KN":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}",,,,"8692361234",,,,[7]
]
,[,,"869(?:48[89]|5(?:5[6-8]|6[5-7])|66\\d|76[02-7])\\d{4}",,,,"8697652917",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"KN",1,"011","1",,,"1|([2-7]\\d{6})$","869$1",,,,,[,,,,,,,,,[-1]
]
,,"869",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KP":[,[,,"85\\d{6}|(?:19\\d|[2-7])\\d{7}",,,,,,,[8,10]
,[6,7]
]
,[,,"(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}",,,,"21234567",,,,[6,7]
]
,[,,"19[1-3]\\d{7}",,,,"1921234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KP",850,"00|99","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"238[02-9]\\d{4}|2(?:[0-24-9]\\d|3[0-79])\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KR":[,[,,"00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",,,,,,,[5,6,8,9,10,11,12,13,14]
,[3,4,7]
]
,[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",,,,"22123456",,,[5,6,8,9,10]
,[3,4,7]
]
,[,,"1(?:05(?:[0-8]\\d|9[0-5])|22[13]\\d)\\d{4,5}|1(?:0[1-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",,,,"1020000000",,,[9,10]
]
,[,,"00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|80)\\d{7}",,,,"801234567",,,[9,11,12,13,14]
]
,[,,"60[2-9]\\d{6}",,,,"602345678",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"50\\d{8,9}",,,,"5012345678",,,[10,11]
]
,[,,"70\\d{8}",,,,"7012345678",,,[10]
]
,"KR",82,"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","0",,,"0(8(?:[1-46-8]|5\\d\\d))?",,,,[[,"(\\d{5})","$1",["1[016-9]1","1[016-9]11","1[016-9]114"]
,"0$1"]
,[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"]
,"0$1","0$CC-$1"]
,[,"(\\d{4})(\\d{4})","$1-$2",["1"]
]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1","0$CC-$1"]
,[,"(\\d{5})(\\d{3})(\\d{3})","$1 $2 $3",["003","0030"]
]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"]
,"0$1","0$CC-$1"]
,[,"(\\d{5})(\\d{3,4})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{5})(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
]
,[[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"]
,"0$1","0$CC-$1"]
,[,"(\\d{4})(\\d{4})","$1-$2",["1"]
]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"]
,"0$1","0$CC-$1"]
]
,[,,"15\\d{7,8}",,,,"1523456789",,,[9,10]
]
,,,[,,"00(?:3(?:08\\d{6,7}|68\\d{7})|798\\d{7,9})",,,,,,,[11,12,13,14]
]
,[,,"1(?:5(?:22|44|66|77|88|99)|6(?:[07]0|44|6[16]|88)|8(?:00|33|55|77|99))\\d{4}",,,,"15441234",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"KW":[,[,,"(?:18|[2569]\\d\\d)\\d{5}",,,,,,,[7,8]
]
,[,,"2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",,,,"22345678",,,[8]
]
,[,,"(?:5(?:2(?:22|5[25])|88[58])|6(?:222|444|70[013-9]|888|93[039])|9(?:11[01]|333|500))\\d{4}|(?:5(?:[05]\\d|1[0-7]|6[56])|6(?:0[034679]|5[015-9]|6\\d|7[67]|9[069])|9(?:0[09]|22|[4679]\\d|55|8[057-9]))\\d{5}",,,,"50012345",,,[8]
]
,[,,"18\\d{5}",,,,"1801234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KW",965,"00",,,,,,,,[[,"(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]
]
,[,"(\\d{3})(\\d{5})","$1 $2",["[25]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KY":[,[,,"(?:345|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}",,,,"3452221234",,,,[7]
]
,[,,"345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}",,,,"3453231234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"(?:345976|900[2-9]\\d\\d)\\d{4}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"KY",1,"011","1",,,"1|([2-9]\\d{6})$","345$1",,,,,[,,"345849\\d{4}",,,,"3458491234"]
,,"345",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KZ":[,[,,"33622\\d{5}|(?:7\\d|80)\\d{8}",,,,,,,[10]
,[5,6,7]
]
,[,,"(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9])|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-246-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}",,,,"7123456789",,,,[5,6,7]
]
,[,,"7(?:0[0-25-8]|47|6[02-4]|7[15-8]|85)\\d{7}",,,,"7710009998"]
,[,,"800\\d{7}",,,,"8001234567"]
,[,,"809\\d{7}",,,,"8091234567"]
,[,,,,,,,,,[-1]
]
,[,,"808\\d{7}",,,,"8081234567"]
,[,,"751\\d{7}",,,,"7511234567"]
,"KZ",7,"810","8",,,"8",,"8~10",,,,[,,,,,,,,,[-1]
]
,,"33|7",[,,"751\\d{7}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LA":[,[,,"[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",,,,,,,[8,9,10]
,[6]
]
,[,,"(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",,,,"21212862",,,[8]
,[6]
]
,[,,"(?:20(?:[239]\\d|5[24-689]|7[6-8])|302\\d)\\d{6}",,,,"2023123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LA",856,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"30[013-9]\\d{6}",,,,"301234567",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"LB":[,[,,"[7-9]\\d{7}|[13-9]\\d{6}",,,,,,,[7,8]
]
,[,,"(?:(?:[14-69]\\d|8[02-9])\\d|7(?:[2-57]\\d|62|8[0-7]|9[04-9]))\\d{4}",,,,"1123456",,,[7]
]
,[,,"793(?:[01]\\d|2[0-4])\\d{3}|(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[89]|9[12]))\\d{5}",,,,"71123456"]
,[,,,,,,,,,[-1]
]
,[,,"9[01]\\d{6}",,,,"90123456",,,[8]
]
,[,,"80\\d{6}",,,,"80123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LB",961,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LC":[,[,,"(?:[58]\\d\\d|758|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}",,,,"7584305678",,,,[7]
]
,[,,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}",,,,"7582845678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"LC",1,"011","1",,,"1|([2-8]\\d{6})$","758$1",,,,,[,,,,,,,,,[-1]
]
,,"758",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LI":[,[,,"90\\d{5}|(?:[2378]|6\\d\\d)\\d{6}",,,,,,,[7,9]
]
,[,,"(?:2(?:01|1[27]|22|3\\d|6[02-578]|96)|3(?:33|40|7[0135-7]|8[048]|9[0269]))\\d{4}",,,,"2345678",,,[7]
]
,[,,"(?:6(?:4(?:89|9\\d)|5[0-3]\\d|6(?:0[0-7]|10|2[06-9]|39))\\d|7(?:[37-9]\\d|42|56))\\d{4}",,,,"660234567"]
,[,,"80(?:02[28]|9\\d\\d)\\d\\d",,,,"8002222",,,[7]
]
,[,,"90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",,,,"9002222",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LI",423,"00","0",,,"0|(1001)",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[237-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"870(?:28|87)\\d\\d",,,,"8702812",,,[7]
]
,,,[,,"697(?:42|56|[78]\\d)\\d{4}",,,,"697861234",,,[9]
]
]
,"LK":[,[,,"[1-9]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}",,,,"112345678",,,,[7]
]
,[,,"7[0-25-8]\\d{7}",,,,"712345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LK",94,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"1973\\d{5}",,,,"197312345"]
,,,[,,,,,,,,,[-1]
]
]
,"LR":[,[,,"(?:2|33|5\\d|77|88)\\d{7}|[4-6]\\d{6}",,,,,,,[7,8,9]
]
,[,,"(?:2\\d{3}|33333)\\d{4}",,,,"21234567",,,[8,9]
]
,[,,"(?:(?:330|555|(?:77|88)\\d)\\d|4[67])\\d{5}|[56]\\d{6}",,,,"770123456",,,[7,9]
]
,[,,,,,,,,,[-1]
]
,[,,"332(?:02|[34]\\d)\\d{4}",,,,"332021234",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LR",231,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3578]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LS":[,[,,"(?:[256]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"2\\d{7}",,,,"22123456"]
,[,,"[56]\\d{7}",,,,"50123456"]
,[,,"800[256]\\d{4}",,,,"80021234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LS",266,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2568]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LT":[,[,,"(?:[3469]\\d|52|[78]0)\\d{6}",,,,,,,[8]
]
,[,,"(?:3[1478]|4[124-6]|52)\\d{6}",,,,"31234567"]
,[,,"6\\d{7}",,,,"61234567"]
,[,,"80[02]\\d{5}",,,,"80012345"]
,[,,"9(?:0[0239]|10)\\d{5}",,,,"90012345"]
,[,,"808\\d{5}",,,,"80812345"]
,[,,"70[05]\\d{5}",,,,"70012345"]
,[,,"[89]01\\d{5}",,,,"80123456"]
,"LT",370,"00","8",,,"[08]",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"]
,"(8-$1)",,1]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"]
,"8 $1",,1]
,[,"(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"]
,"(8-$1)",,1]
,[,"(\\d{3})(\\d{5})","$1 $2",["[3-6]"]
,"(8-$1)",,1]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70[67]\\d{5}",,,,"70712345"]
,,,[,,,,,,,,,[-1]
]
]
,"LU":[,[,,"35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",,,,,,,[4,5,6,7,8,9,10,11]
]
,[,,"(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}",,,,"27123456"]
,[,,"6(?:[269][18]|5[158]|7[189]|81)\\d{6}",,,,"628123456",,,[9]
]
,[,,"800\\d{5}",,,,"80012345",,,[8]
]
,[,,"90[015]\\d{5}",,,,"90012345",,,[8]
]
,[,,"801\\d{5}",,,,"80112345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"20(?:1\\d{5}|[2-689]\\d{1,7})",,,,"20201234",,,[4,5,6,7,8,9,10]
]
,"LU",352,"00",,,,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)",,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LV":[,[,,"(?:[268]\\d|90)\\d{6}",,,,,,,[8]
]
,[,,"6\\d{7}",,,,"63123456"]
,[,,"2\\d{7}",,,,"21234567"]
,[,,"80\\d{6}",,,,"80123456"]
,[,,"90\\d{6}",,,,"90123456"]
,[,,"81\\d{6}",,,,"81123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LV",371,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LY":[,[,,"[2-9]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}",,,,"212345678",,,,[7]
]
,[,,"9[1-6]\\d{7}",,,,"912345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LY",218,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{7})","$1-$2",["[2-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MA":[,[,,"[5-8]\\d{8}",,,,,,,[9]
]
,[,,"5(?:29(?:[189][05]|2[29]|3[01])|38[89][05])\\d{4}|5(?:2(?:[015-7]\\d|2[02-9]|3[0-578]|4[02-46-8]|8[0235-7]|90)|3(?:[0-47]\\d|5[02-9]|6[02-8]|80|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}",,,,"520123456"]
,[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:0[016-8]|6[1267]|7[0-27]))\\d{6}",,,,"650123456"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,"89\\d{7}",,,,"891234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:4[0-2]|93)\\d{4}",,,,"592401234"]
,"MA",212,"00","0",,,"0",,,,[[,"(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]","5(?:29|38)[89]0"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1-$2",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1-$2",["[5-7]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MC":[,[,,"870\\d{5}|(?:[349]|6\\d)\\d{7}",,,,,,,[8,9]
]
,[,,"(?:870|9[2-47-9]\\d)\\d{5}",,,,"99123456",,,[8]
]
,[,,"4(?:[46]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}",,,,"612345678"]
,[,,"90\\d{6}",,,,"90123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MC",377,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["8"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[39]"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[39]"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"870\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MD":[,[,,"(?:[235-7]\\d|[89]0)\\d{6}",,,,,,,[8]
]
,[,,"(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}",,,,"22212345"]
,[,,"562\\d{5}|(?:6\\d|7[16-9])\\d{6}",,,,"62112345"]
,[,,"800\\d{5}",,,,"80012345"]
,[,,"90[056]\\d{5}",,,,"90012345"]
,[,,"808\\d{5}",,,,"80812345"]
,[,,,,,,,,,[-1]
]
,[,,"3[08]\\d{6}",,,,"30123456"]
,"MD",373,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"803\\d{5}",,,,"80312345"]
,,,[,,,,,,,,,[-1]
]
]
,"ME":[,[,,"(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",,,,,,,[8,9]
,[6]
]
,[,,"(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",,,,"30234567",,,[8]
,[6]
]
,[,,"6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",,,,"67622901",,,[8]
]
,[,,"80(?:[0-2578]|9\\d)\\d{5}",,,,"80080002"]
,[,,"9(?:4[1568]|5[178])\\d{5}",,,,"94515151",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"78[1-49]\\d{5}",,,,"78108780",,,[8]
]
,"ME",382,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"77[1-9]\\d{5}",,,,"77273012",,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"MF":[,[,,"(?:590|69\\d|976)\\d{6}",,,,,,,[9]
]
,[,,"590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}",,,,"590271234"]
,[,,"69(?:0\\d\\d|1(?:2[29]|3[0-5]))\\d{4}",,,,"690001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976[01]\\d{5}",,,,"976012345"]
,"MF",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MG":[,[,,"[23]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[35]|8[268]|9[245])\\d{5}",,,,"202123456",,,,[7]
]
,[,,"3[2-49]\\d{7}",,,,"321234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"22\\d{7}",,,,"221234567"]
,"MG",261,"00","0",,,"0|([24-9]\\d{6})$","20$1",,,[[,"(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MH":[,[,,"329\\d{4}|(?:[256]\\d|45)\\d{5}",,,,,,,[7]
]
,[,,"(?:247|528|625)\\d{4}",,,,"2471234"]
,[,,"(?:(?:23|54)5|329|45[56])\\d{4}",,,,"2351234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"635\\d{4}",,,,"6351234"]
,"MH",692,"011","1",,,"1",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-6]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MK":[,[,,"[2-578]\\d{7}",,,,,,,[8]
,[6,7]
]
,[,,"(?:2(?:[23]\\d|5[0-24578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}",,,,"22012345",,,,[6,7]
]
,[,,"7(?:4(?:60\\d|747)|94(?:[01]\\d|2[0-4]))\\d{3}|7(?:[0-25-8]\\d|3[2-4]|42|9[23])\\d{5}",,,,"72345678"]
,[,,"800\\d{5}",,,,"80012345"]
,[,,"5[02-9]\\d{6}",,,,"50012345"]
,[,,"8(?:0[1-9]|[1-9]\\d)\\d{5}",,,,"80123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MK",389,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ML":[,[,,"[24-9]\\d{7}",,,,,,,[8]
]
,[,,"2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-39]))\\d{5}",,,,"20212345"]
,[,,"2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[01]|[679]\\d|8[239])\\d{6}",,,,"65012345"]
,[,,"80\\d{6}",,,,"80012345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ML",223,"00",,,,,,,,[[,"(\\d{4})","$1",["67[057-9]|74[045]","67(?:0[09]|[59]9|77|8[89])|74(?:0[02]|44|55)"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"80\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MM":[,[,,"1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",,,,,,,[6,7,8,9,10]
,[5]
]
,[,,"(?:1(?:(?:2\\d|3[56]|[89][0-6])\\d|4(?:2[2-469]|39|46|6[25]|7[0-3]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|2[246]|39|46|62|7[0-3]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[0-3])|3(?:20\\d|4(?:70|83)|56)|420\\d|5470)|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|247[23]|3(?:20\\d|470)|4(?:2[04]\\d|47[23])|7(?:(?:3\\d|8[01459])\\d|4(?:39|60|7[013]))))\\d{4}|5(?:2(?:2\\d{5,6}|47[023]\\d{4})|(?:347[23]|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[0-2])|8(?:20\\d|47[02])|9(?:20\\d|47[01]))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:2\\d|4[1-9]|51)\\d|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|[35]2\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",,,,"1234567",,,[6,7,8,9]
,[5]
]
,[,,"(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6[6-9]|8[89]|9[5-8])\\d|7(?:3|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",,,,"92123456",,,[7,8,9,10]
]
,[,,"80080(?:[01][1-9]|2\\d)\\d{3}",,,,"8008001234",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"1333\\d{4}|[12]468\\d{4}",,,,"13331234",,,[8]
]
,"MM",95,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"]
,"0$1"]
,[,"(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MN":[,[,,"[12]\\d{7,9}|[57-9]\\d{7}",,,,,,,[8,9,10]
,[4,5,6]
]
,[,,"[12]2[1-3]\\d{5,6}|7(?:0[0-5]\\d|128)\\d{4}|(?:[12](?:1|27)|5[368])\\d{6}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}",,,,"53123456",,,,[4,5,6]
]
,[,,"(?:83[01]|920)\\d{5}|(?:5[05]|8[05689]|9[013-9])\\d{6}",,,,"88123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"712[0-79]\\d{4}|7(?:1[013-9]|[5-8]\\d)\\d{5}",,,,"75123456",,,[8]
]
,"MN",976,"001","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"]
,"0$1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[57-9]"]
]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"]
,"0$1"]
,[,"(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"]
,"0$1"]
,[,"(\\d{5})(\\d{4,5})","$1 $2",["[12]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MO":[,[,,"(?:28|[68]\\d)\\d{6}",,,,,,,[8]
]
,[,,"(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}",,,,"28212345"]
,[,,"6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:[02][5-9]|[146-8]\\d|[35][0-4]))\\d{4}",,,,"66123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MO",853,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[268]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MP":[,[,,"[58]\\d{9}|(?:67|90)0\\d{7}",,,,,,,[10]
,[7]
]
,[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]
]
,[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,"6702345678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"MP",1,"011","1",,,"1|([2-9]\\d{6})$","670$1",,1,,,[,,,,,,,,,[-1]
]
,,"670",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MQ":[,[,,"69\\d{7}|(?:59|97)6\\d{6}",,,,,,,[9]
]
,[,,"596(?:0[0-7]|10|2[7-9]|3[05-9]|4[0-46-8]|[5-7]\\d|8[09]|9[4-8])\\d{4}",,,,"596301234"]
,[,,"69(?:6(?:[0-47-9]\\d|5[0-6]|6[0-4])|727)\\d{4}",,,,"696201234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976(?:6[1-9]|7[0-367])\\d{4}",,,,"976612345"]
,"MQ",596,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MR":[,[,,"(?:[2-4]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"(?:25[08]|35\\d|45[1-7])\\d{5}",,,,"35123456"]
,[,,"[2-4][0-46-9]\\d{6}",,,,"22123456"]
,[,,"800\\d{5}",,,,"80012345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MR",222,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MS":[,[,,"(?:[58]\\d\\d|664|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"6644(?:1[0-3]|91)\\d{4}",,,,"6644912345",,,,[7]
]
,[,,"664(?:3(?:49|9[1-6])|49[2-6])\\d{4}",,,,"6644923456",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"MS",1,"011","1",,,"1|([34]\\d{6})$","664$1",,,,,[,,,,,,,,,[-1]
]
,,"664",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MT":[,[,,"3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"2(?:0(?:[19]\\d|3[1-4]|6[059])|[1-357]\\d\\d)\\d{4}",,,,"21001234"]
,[,,"(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}",,,,"96961234"]
,[,,"800[3467]\\d{4}",,,,"80071234"]
,[,,"5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}",,,,"50037123"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"3550\\d{4}",,,,"35501234"]
,"MT",356,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]
]
]
,,[,,"7117\\d{4}",,,,"71171234"]
,,,[,,,,,,,,,[-1]
]
,[,,"501\\d{5}",,,,"50112345"]
,,,[,,,,,,,,,[-1]
]
]
,"MU":[,[,,"(?:[2-468]|5\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2(?:[0346-8]\\d|1[0-7])|4(?:[013568]\\d|2[4-7])|54(?:[34]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",,,,"54480123"]
,[,,"5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|5(?:2[589]|4[3489]|7\\d|8[0-689]|9[0-8])\\d{5}",,,,"52512345",,,[8]
]
,[,,"80[0-2]\\d{4}",,,,"8001234",,,[7]
]
,[,,"30\\d{5}",,,,"3012345",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"3(?:20|9\\d)\\d{4}",,,,"3201234",,,[7]
]
,"MU",230,"0(?:0|[24-7]0|3[03])",,,,,,"020",,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["5"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MV":[,[,,"(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",,,,,,,[7,10]
]
,[,,"(?:3(?:0[0-3]|3[0-59])|6(?:[57][02468]|6[024-68]|8[024689]))\\d{4}",,,,"6701234",,,[7]
]
,[,,"46[46]\\d{4}|(?:7\\d|9[13-9])\\d{5}",,,,"7712345",,,[7]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"900\\d{7}",,,,"9001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MV",960,"0(?:0|19)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1-$2",["[3467]|9[13-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"4[05]0\\d{4}",,,,"4001234",,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"MW":[,[,,"1\\d{6}(?:\\d{2})?|(?:[23]1|77|88|99)\\d{7}",,,,,,,[7,9]
]
,[,,"(?:1[2-9]|21\\d\\d)\\d{5}",,,,"1234567"]
,[,,"111\\d{6}|(?:31|77|88|99)\\d{7}",,,,"991234567",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MW",265,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MX":[,[,,"(?:1(?:[01467]\\d|[2359][1-9]|8[1-79])|[2-9]\\d)\\d{8}",,,,,,,[10,11]
,[7,8]
]
,[,,"(?:2(?:0[01]|2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}",,,,"2001234567",,,[10]
,[7,8]
]
,[,,"(?:1(?:2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))|2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}",,,,"12221234567",,,,[7,8]
]
,[,,"8(?:00|88)\\d{7}",,,,"8001234567",,,[10]
]
,[,,"900\\d{7}",,,,"9001234567",,,[10]
]
,[,,"300\\d{7}",,,,"3001234567",,,[10]
]
,[,,"500\\d{7}",,,,"5001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,"MX",52,"0[09]","01",,,"0(?:[12]|4[45])|1",,"00",,[[,"(\\d{5})","$1",["53"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]
,,,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"]
,,,1]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"]
,,,1]
]
,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]
,,,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"]
,,,1]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"]
,,,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MY":[,[,,"1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",,,,"323856789",,,[8,9]
,[6,7]
]
,[,,"1(?:4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:0\\d|1[01]))|(?:(?:[269]|59)\\d|[37][1-9]|4[235-9])\\d|8(?:1[23]|[236]\\d|4[06]|5[7-9]|7[016-9]|8[01]|9[0-8]))\\d{5}",,,,"123456789",,,[9,10]
]
,[,,"1[378]00\\d{6}",,,,"1300123456",,,[10]
]
,[,,"1600\\d{6}",,,,"1600123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",,,,"1546012345",,,[10]
]
,"MY",60,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9])|8"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MZ":[,[,,"(?:2|8\\d)\\d{7}",,,,,,,[8,9]
]
,[,,"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",,,,"21123456",,,[8]
]
,[,,"8[2-79]\\d{7}",,,,"821234567",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MZ",258,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NA":[,[,,"[68]\\d{7,8}",,,,,,,[8,9]
]
,[,,"6(?:1(?:[02-4]\\d\\d|17)|2(?:17|54\\d|69|70)|3(?:17|2[0237]\\d|34|6[289]|7[01]|81)|4(?:17|(?:27|41|5[25])\\d|69|7[01])|5(?:17|2[236-8]\\d|69|7[01])|6(?:17|26\\d|38|42|69|7[01])|7(?:17|(?:2[2-4]|30)\\d|6[89]|7[01]))\\d{4}|6(?:1(?:2[2-7]|3[01378]|4[0-4]|69|7[014])|25[0-46-8]|32\\d|4(?:2[0-27]|4[016]|5[0-357])|52[02-9]|62[56]|7(?:2[2-69]|3[013]))\\d{4}",,,,"61221234"]
,[,,"(?:60|8[1245])\\d{7}",,,,"811234567",,,[9]
]
,[,,"80\\d{7}",,,,"800123456",,,[9]
]
,[,,"8701\\d{5}",,,,"870123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"8(?:3\\d\\d|86)\\d{5}",,,,"88612345"]
,"NA",264,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NC":[,[,,"[2-57-9]\\d{5}",,,,,,,[6]
]
,[,,"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}",,,,"201234"]
,[,,"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}",,,,"751234"]
,[,,,,,,,,,[-1]
]
,[,,"36\\d{4}",,,,"366711"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NC",687,"00",,,,,,,,[[,"(\\d{3})","$1",["5[6-8]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NE":[,[,,"[0289]\\d{7}",,,,,,,[8]
]
,[,,"2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}",,,,"20201234"]
,[,,"(?:23|8[014589]|9\\d)\\d{6}",,,,"93123456"]
,[,,"08\\d{6}",,,,"08123456"]
,[,,"09\\d{6}",,,,"09123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NE",227,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NF":[,[,,"[13]\\d{5}",,,,,,,[6]
,[5]
]
,[,,"(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}",,,,"106609",,,,[5]
]
,[,,"(?:14|3[58])\\d{4}",,,,"381234",,,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NF",672,"00",,,,"([0-258]\\d{4})$","3$1",,,[[,"(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]
]
,[,"(\\d)(\\d{5})","$1 $2",["[13]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NG":[,[,,"(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",,,,,,,[7,8,10,11,12,13,14]
,[5,6]
]
,[,,"(?:(?:[1-356]\\d|4[02-8]|8[2-9])\\d|9(?:0[3-9]|[1-9]\\d))\\d{5}|7(?:0(?:[013-689]\\d|2[0-24-9])\\d{3,4}|[1-79]\\d{6})|(?:[12]\\d|4[147]|5[14579]|6[1578]|7[1-3578])\\d{5}",,,,"18040123",,,[7,8]
,[5,6]
]
,[,,"(?:702[0-24-9]|8(?:01|19)[01])\\d{6}|(?:70[13-689]|8(?:0[2-9]|1[0-8])|90[1-9])\\d{7}",,,,"8021234567",,,[10]
]
,[,,"800\\d{7,11}",,,,"80017591759",,,[10,11,12,13,14]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NG",234,"009","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"]
,"0$1"]
,[,"(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"700\\d{7,11}",,,,"7001234567",,,[10,11,12,13,14]
]
,,,[,,,,,,,,,[-1]
]
]
,"NI":[,[,,"(?:1800|[25-8]\\d{3})\\d{4}",,,,,,,[8]
]
,[,,"2\\d{7}",,,,"21234567"]
,[,,"(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}",,,,"81234567"]
,[,,"1800\\d{4}",,,,"18001234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NI",505,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[125-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NL":[,[,,"(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|[89]\\d{6,9}|1\\d{4,5}",,,,,,,[5,6,7,8,9,10]
]
,[,,"(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",,,,"101234567",,,[9]
]
,[,,"6[1-58]\\d{7}",,,,"612345678",,,[9]
]
,[,,"800\\d{4,7}",,,,"8001234",,,[7,8,9,10]
]
,[,,"90[069]\\d{4,7}",,,,"9061234",,,[7,8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:85|91)\\d{7}",,,,"851234567",,,[9]
]
,"NL",31,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["1[238]|[34]"]
]
,[,"(\\d{2})(\\d{3,4})","$1 $2",["14"]
]
,[,"(\\d{6})","$1",["1"]
]
,[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["66"]
,"0$1"]
,[,"(\\d)(\\d{8})","$1 $2",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["66"]
,"0$1"]
,[,"(\\d)(\\d{8})","$1 $2",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"]
,"0$1"]
]
,[,,"66\\d{7}",,,,"662345678",,,[9]
]
,,,[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)\\d",,,,,,,[5,6]
]
,[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",,,,"14020",,,[5,6,9]
]
,,,[,,,,,,,,,[-1]
]
]
,"NO":[,[,,"(?:0|[2-9]\\d{3})\\d{4}",,,,,,,[5,8]
]
,[,,"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",,,,"21234567",,,[8]
]
,[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}",,,,"40612345",,,[8]
]
,[,,"80[01]\\d{5}",,,,"80012345",,,[8]
]
,[,,"82[09]\\d{5}",,,,"82012345",,,[8]
]
,[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]
]
,[,,"880\\d{5}",,,,"88012345",,,[8]
]
,[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]
]
,"NO",47,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|5[89]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]
]
]
,,[,,,,,,,,,[-1]
]
,1,"[02-689]|7[0-8]",[,,,,,,,,,[-1]
]
,[,,"(?:0[2-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}",,,,"02000"]
,,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]
]
]
,"NP":[,[,,"9\\d{9}|[1-9]\\d{7}",,,,,,,[8,10]
,[6,7]
]
,[,,"(?:1[0-6]\\d|99[02-6])\\d{5}|(?:2[13-79]|3[135-8]|4[146-9]|5[135-7]|6[13-9]|7[15-9]|8[1-46-9]|9[1-7])[2-6]\\d{5}",,,,"14567890",,,[8]
,[6,7]
]
,[,,"9(?:6[0-3]|7[245]|8[0-24-68])\\d{7}",,,,"9841234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NP",977,"00","0",,,"0",,,,[[,"(\\d)(\\d{7})","$1-$2",["1[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{6})","$1-$2",["[1-8]|9(?:[1-579]|6[2-6])"]
,"0$1"]
,[,"(\\d{3})(\\d{7})","$1-$2",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NR":[,[,,"(?:444|(?:55|8\\d)\\d|666)\\d{4}",,,,,,,[7]
]
,[,,"444\\d{4}",,,,"4441234"]
,[,,"(?:55[3-9]|666|8\\d\\d)\\d{4}",,,,"5551234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NR",674,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-68]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NU":[,[,,"(?:[47]|888\\d)\\d{3}",,,,,,,[4,7]
]
,[,,"[47]\\d{3}",,,,"7012",,,[4]
]
,[,,"888[4-9]\\d{3}",,,,"8884012",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NU",683,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NZ":[,[,,"2\\d{7,9}|(?:[34]\\d|6[0-35-9])\\d{6}|(?:508|[79]\\d)\\d{6,7}|8\\d{4,9}",,,,,,,[5,6,7,8,9,10]
]
,[,,"24099\\d{3}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",,,,"32345678",,,[8]
,[7]
]
,[,,"2[0-27-9]\\d{7,8}|21\\d{6}",,,,"211234567",,,[8,9,10]
]
,[,,"508\\d{6,7}|80\\d{6,8}",,,,"800123456",,,[8,9,10]
]
,[,,"90\\d{6,7}",,,,"900123456",,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{7}",,,,"701234567",,,[9]
]
,[,,,,,,,,,[-1]
]
,"NZ",64,"0(?:0|161)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,8})","$1 $2",["83"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["24|[346]|7[2-57-9]|9[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"]
,"0$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["2[028]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"]
,"0$1"]
]
,,[,,"[28]6\\d{6,7}",,,,"26123456",,,[8,9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"83\\d{3,8}",,,,"83012378"]
,,,[,,,,,,,,,[-1]
]
]
,"OM":[,[,,"(?:1505|[279]\\d{3}|500)\\d{4}|8007\\d{4,5}",,,,,,,[7,8,9]
]
,[,,"2[2-6]\\d{6}",,,,"23123456",,,[8]
]
,[,,"(?:1505|90[1-9]\\d)\\d{4}|(?:7[1289]|9[1-9])\\d{6}",,,,"92123456",,,[8]
]
,[,,"500\\d{4}|8007\\d{4,5}",,,,"80071234"]
,[,,"900\\d{5}",,,,"90012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"OM",968,"00",,,,,,,,[[,"(\\d{3})(\\d{4,6})","$1 $2",["[58]"]
]
,[,"(\\d{2})(\\d{6})","$1 $2",["2"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[179]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PA":[,[,,"(?:[1-57-9]|6\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:1(?:0\\d|1[479]|2[37]|3[0137]|4[17]|5[05]|6[58]|7[0167]|8[258]|9[139])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[026-9])|3(?:[089]\\d|1[014-7]|2[0-5]|33|4[0-79]|55|6[068]|7[03-8])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[056]|7[0-24-9]|8[6-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",,,,"2001234",,,[7]
]
,[,,"(?:1[16]1|21[89]|6(?:[02-9]\\d|1[0-6])\\d|8(?:1[01]|7[23]))\\d{4}",,,,"61234567"]
,[,,"800\\d{4}",,,,"8001234",,,[7]
]
,[,,"(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",,,,"8601234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PA",507,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["6"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PE":[,[,,"(?:[14-8]|9\\d)\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"(?:(?:4[34]|5[14])[0-8]\\d|7(?:173|3[0-8]\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",,,,"11234567",,,[8]
,[6,7]
]
,[,,"9\\d{8}",,,,"912345678",,,[9]
]
,[,,"800\\d{5}",,,,"80012345",,,[8]
]
,[,,"805\\d{5}",,,,"80512345",,,[8]
]
,[,,"801\\d{5}",,,,"80112345",,,[8]
]
,[,,"80[24]\\d{5}",,,,"80212345",,,[8]
]
,[,,,,,,,,,[-1]
]
,"PE",51,"19(?:1[124]|77|90)00","0"," Anexo ",,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["80"]
,"(0$1)"]
,[,"(\\d)(\\d{7})","$1 $2",["1"]
,"(0$1)"]
,[,"(\\d{2})(\\d{6})","$1 $2",["[4-8]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PF":[,[,,"[48]\\d{7}|4\\d{5}",,,,,,,[6,8]
]
,[,,"4(?:0[4-689]|9[4-68])\\d{5}",,,,"40412345",,,[8]
]
,[,,"8[7-9]\\d{6}",,,,"87123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"499\\d{5}",,,,"49901234",,,[8]
]
,"PF",689,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[48]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"44\\d{4}",,,,,,,[6]
]
,[,,"44\\d{4}",,,,"440123",,,[6]
]
,,,[,,,,,,,,,[-1]
]
]
,"PG":[,[,,"(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",,,,,,,[7,8]
]
,[,,"(?:64[1-9]|7730|85[02-46-9])\\d{4}|(?:3[0-2]|4[257]|5[34]|77[0-24]|9[78])\\d{5}",,,,"3123456"]
,[,,"77(?:3[1-9]|[5-9]\\d)\\d{4}|(?:7[0-689]|81)\\d{6}",,,,"70123456",,,[8]
]
,[,,"180\\d{4}",,,,"1801234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"2(?:0[0-47]|7[568])\\d{4}",,,,"2751234",,,[7]
]
,"PG",675,"00|140[1-3]",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[78]"]
]
]
,,[,,"27[01]\\d{4}",,,,"2700123",,,[7]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PH":[,[,,"1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]\\d{8}|[28]\\d{7}",,,,,,,[6,8,9,10,11,12,13]
,[4,5,7]
]
,[,,"(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|2\\d{5}(?:\\d{2})?|8[2-8]\\d{7}",,,,"21234567",,,[6,8,9,10]
,[4,5,7]
]
,[,,"(?:81[37]|9(?:0[5-9]|1[0-24-9]|2[0-35-9]|[35]\\d|4[235-9]|6[0-25-8]|7[1-9]|8[189]|9[4-9]))\\d{7}",,,,"9051234567",,,[10]
]
,[,,"1800\\d{7,9}",,,,"180012345678",,,[11,12,13]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PH",63,"00","0",,,"0",,,,[[,"(\\d)(\\d{5})","$1 $2",["2"]
,"(0$1)"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"]
,"(0$1)"]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"]
,"(0$1)"]
,[,"(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"]
,"(0$1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PK":[,[,,"122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",,,,,,,[8,9,10,11,12]
,[5,6,7]
]
,[,,"(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}",,,,"2123456789",,,[9,10]
,[5,6,7,8]
]
,[,,"3(?:[014]\\d|2[0-5]|3[0-7]|55|64)\\d{7}",,,,"3012345678",,,[10]
]
,[,,"800\\d{5}",,,,"80012345",,,[8]
]
,[,,"900\\d{5}",,,,"90012345",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"122\\d{6}",,,,"122044444",,,[9]
]
,[,,,,,,,,,[-1]
]
,"PK",92,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["[89]0"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"]
,"(0$1)"]
,[,"(\\d{5})(\\d{5})","$1 $2",["58"]
,"(0$1)"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",,,,"21111825888",,,[11,12]
]
,,,[,,,,,,,,,[-1]
]
]
,"PL":[,[,,"[1-57-9]\\d{6}(?:\\d{2})?|6\\d{5,8}",,,,,,,[6,7,8,9]
]
,[,,"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",,,,"123456789",,,[7,9]
]
,[,,"(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",,,,"512345678",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"70[01346-8]\\d{6}",,,,"701234567",,,[9]
]
,[,,"801\\d{6}",,,,"801234567",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"39\\d{7}",,,,"391234567",,,[9]
]
,"PL",48,"00",,,,,,,,[[,"(\\d{5})","$1",["19"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["11|64"]
]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]
]
,[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["39|45|5[0137]|6[0469]|7[02389]|8[08]"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-8]|9[145]"]
]
]
,,[,,"64\\d{4,7}",,,,"641234567"]
,,,[,,,,,,,,,[-1]
]
,[,,"804\\d{6}",,,,"804123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"PM":[,[,,"[45]\\d{5}",,,,,,,[6]
]
,[,,"(?:4[1-3]|50)\\d{4}",,,,"430123"]
,[,,"(?:4[02-4]|5[05])\\d{4}",,,,"551234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PM",508,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PR":[,[,,"(?:[589]\\d\\d|787)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]
]
,[,,"(?:787|939)[2-9]\\d{6}",,,,"7872345678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"PR",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]
]
,,"787|939",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PS":[,[,,"[2489]2\\d{6}|(?:1\\d|5)\\d{8}",,,,,,,[8,9,10]
,[7]
]
,[,,"(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",,,,"22234567",,,[8]
,[7]
]
,[,,"5[69]\\d{7}",,,,"599123456",,,[9]
]
,[,,"1800\\d{6}",,,,"1800123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"1700\\d{6}",,,,"1700123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PS",970,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PT":[,[,,"(?:[26-9]\\d|30)\\d{7}",,,,,,,[9]
]
,[,,"2(?:[12]\\d|[35][1-689]|4[1-59]|6[1-35689]|7[1-9]|8[1-69]|9[1256])\\d{6}",,,,"212345678"]
,[,,"6[356]9230\\d{3}|(?:6[036]93|9(?:[1-36]\\d\\d|480))\\d{5}",,,,"912345678"]
,[,,"80[02]\\d{6}",,,,"800123456"]
,[,,"(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}",,,,"760123456"]
,[,,"80(?:8\\d|9[1579])\\d{5}",,,,"808123456"]
,[,,"884[0-4689]\\d{5}",,,,"884123456"]
,[,,"30\\d{7}",,,,"301234567"]
,"PT",351,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70(?:7\\d|8[17])\\d{5}",,,,"707123456"]
,,,[,,"600\\d{6}",,,,"600110000"]
]
,"PW":[,[,,"(?:[24-8]\\d\\d|345|900)\\d{4}",,,,,,,[7]
]
,[,,"(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}",,,,"2771234"]
,[,,"(?:45[0-5]|6[2-4689]0|(?:77|88)\\d)\\d{4}",,,,"6201234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PW",680,"01[12]",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PY":[,[,,"59\\d{4,6}|(?:[2-46-9]\\d|5[0-8])\\d{4,7}",,,,,,,[6,7,8,9]
,[5]
]
,[,,"(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",,,,"212345678",,,[7,8,9]
,[5,6]
]
,[,,"9(?:51|6[129]|[78][1-6]|9[1-5])\\d{6}",,,,"961456789",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"8700[0-4]\\d{4}",,,,"870012345",,,[9]
]
,"PY",595,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"]
,"0$1"]
,[,"(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]
]
,[,"(\\d{3})(\\d{6})","$1 $2",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"[2-9]0\\d{4,7}",,,,"201234567"]
,,,[,,,,,,,,,[-1]
]
]
,"QA":[,[,,"[2-7]\\d{7}|(?:2\\d\\d|800)\\d{4}",,,,,,,[7,8]
]
,[,,"4[04]\\d{6}",,,,"44123456",,,[8]
]
,[,,"(?:28|[35-7]\\d)\\d{6}",,,,"33123456",,,[8]
]
,[,,"800\\d{4}",,,,"8001234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"QA",974,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["2[126]|8"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"]
]
]
,,[,,"2(?:[12]\\d|61)\\d{4}",,,,"2123456",,,[7]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RE":[,[,,"9769\\d{5}|(?:26|[68]\\d)\\d{7}",,,,,,,[9]
]
,[,,"26(?:2\\d\\d|30[01])\\d{4}",,,,"262161234"]
,[,,"(?:69(?:2\\d\\d|3(?:0[0-46]|1[013]|2[0-2]|3[0-39]|4\\d|5[05]|6[0-26]|7[0-27]|8[0-8]|9[0-479]))|9769\\d)\\d{4}",,,,"692123456"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,"89[1-37-9]\\d{6}",,,,"891123456"]
,[,,"8(?:1[019]|2[0156]|84|90)\\d{6}",,,,"810123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RE",262,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,"26[23]|69|[89]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RO":[,[,,"(?:[237]\\d|[89]0)\\d{7}|[23]\\d{5}",,,,,,,[6,9]
]
,[,,"[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d",,,,"211234567"]
,[,,"7[01]20\\d{5}|7(?:0[013-9]|1[01]|[2-7]\\d|8[03-8]|9[09])\\d{6}",,,,"712034567",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"90[0136]\\d{6}",,,,"900123456",,,[9]
]
,[,,"801\\d{6}",,,,"801123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RO",40,"00","0"," int ",,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"]
,"0$1"]
,[,"(\\d{2})(\\d{4})","$1 $2",["219|31"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:37\\d|80[578])\\d{6}",,,,"372123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"RS":[,[,,"38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",,,,,,,[6,7,8,9,10,11,12]
,[4,5]
]
,[,,"(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",,,,"10234567",,,[7,8,9,10,11,12]
,[4,5,6]
]
,[,,"6(?:[0-689]|7\\d)\\d{6,7}",,,,"601234567",,,[8,9,10]
]
,[,,"800\\d{3,9}",,,,"80012345"]
,[,,"(?:78\\d|90[0169])\\d{3,7}",,,,"90012345",,,[6,7,8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RS",381,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"7[06]\\d{4,10}",,,,"700123456"]
,,,[,,,,,,,,,[-1]
]
]
,"RU":[,[,,"[347-9]\\d{9}",,,,,,,[10]
,[7]
]
,[,,"(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-79]|7[1-37-9]))\\d{7}",,,,"3011234567",,,,[7]
]
,[,,"9\\d{9}",,,,"9123456789"]
,[,,"80[04]\\d{7}",,,,"8001234567"]
,[,,"80[39]\\d{7}",,,,"8091234567"]
,[,,,,,,,,,[-1]
]
,[,,"808\\d{7}",,,,"8081234567"]
,[,,,,,,,,,[-1]
]
,"RU",7,"810","8",,,"8",,"8~10",,[[,"(\\d{3})(\\d{2})(\\d{2})","$1-$2-$3",["[0-79]"]
]
,[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"]
,"8 ($1)",,1]
,[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[3489]"]
,"8 ($1)",,1]
]
,[[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"]
,"8 ($1)",,1]
,[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[3489]"]
,"8 ($1)",,1]
]
,[,,,,,,,,,[-1]
]
,1,"3[04-689]|[489]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RW":[,[,,"(?:06|[27]\\d\\d|[89]00)\\d{6}",,,,,,,[8,9]
]
,[,,"(?:06|2[23568]\\d)\\d{6}",,,,"250123456"]
,[,,"7[238]\\d{7}",,,,"720123456",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"900\\d{6}",,,,"900123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RW",250,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SA":[,[,,"92\\d{7}|(?:[15]|8\\d)\\d{8}",,,,,,,[9,10]
,[7]
]
,[,,"1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",,,,"112345678",,,[9]
,[7]
]
,[,,"5(?:[013-689]\\d|7[0-36-8])\\d{6}",,,,"512345678",,,[9]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"925\\d{6}",,,,"925012345",,,[9]
]
,[,,"920\\d{6}",,,,"920012345",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SA",966,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["9"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"811\\d{7}",,,,"8110123456",,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"SB":[,[,,"(?:[1-6]|[7-9]\\d\\d)\\d{4}",,,,,,,[5,7]
]
,[,,"(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}",,,,"40123",,,[5]
]
,[,,"48\\d{3}|(?:(?:7[1-9]|8[4-9])\\d|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8]))\\d{4}",,,,"7421234"]
,[,,"1[38]\\d{3}",,,,"18123",,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"5[12]\\d{3}",,,,"51123",,,[5]
]
,"SB",677,"0[01]",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SC":[,[,,"8000\\d{3}|(?:[249]\\d|64)\\d{5}",,,,,,,[7]
]
,[,,"4[2-46]\\d{5}",,,,"4217123"]
,[,,"2[5-8]\\d{5}",,,,"2510123"]
,[,,"8000\\d{3}",,,,"8000000"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"971\\d{4}|(?:64|95)\\d{5}",,,,"6412345"]
,"SC",248,"010|0[0-2]",,,,,,"00",,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SD":[,[,,"[19]\\d{8}",,,,,,,[9]
]
,[,,"1(?:5\\d|8[35-7])\\d{6}",,,,"153123456"]
,[,,"(?:1[0-2]|9[0-3569])\\d{7}",,,,"911231234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SD",249,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SE":[,[,,"(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",,,,,,,[6,7,8,9,10,12]
]
,[,,"(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",,,,"8123456",,,[7,8,9]
]
,[,,"7[02369]\\d{7}",,,,"701234567",,,[9]
]
,[,,"20\\d{4,7}",,,,"20123456",,,[6,7,8,9]
]
,[,,"649\\d{6}|9(?:00|39|44)[1-8]\\d{3,6}",,,,"9001234567",,,[7,8,9,10]
]
,[,,"77[0-7]\\d{6}",,,,"771234567",,,[9]
]
,[,,"75[1-8]\\d{6}",,,,"751234567",,,[9]
]
,[,,,,,,,,,[-1]
]
,"SE",46,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44)"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
,"0$1"]
,[,"(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"]
,"0$1"]
,[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1 $2 $3",["20"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["9(?:00|39|44)"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"]
]
,[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{2})","$1 $2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{3})","$1 $2 $3",["9(?:00|39|44)"]
]
,[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["10|7"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["9"]
]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]
]
]
,[,,"74[02-9]\\d{6}",,,,"740123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"10[1-8]\\d{6}",,,,"102345678",,,[9]
]
,,,[,,"(?:25[245]|67[3-68])\\d{9}",,,,"254123456789",,,[12]
]
]
,"SG":[,[,,"(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",,,,,,,[8,10,11]
]
,[,,"662[0-24-9]\\d{4}|6(?:[1-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",,,,"61234567",,,[8]
]
,[,,"(?:8(?:[1-8]\\d\\d|9(?:[014]\\d|2[1-9]|3[0-489]))|9[0-8]\\d\\d)\\d{4}",,,,"81234567",,,[8]
]
,[,,"(?:18|8)00\\d{7}",,,,"18001234567",,,[10,11]
]
,[,,"1900\\d{7}",,,,"19001234567",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:3[12]\\d|666)\\d{5}",,,,"31234567",,,[8]
]
,"SG",65,"0[0-3]\\d",,,,,,,,[[,"(\\d{4,5})","$1",["1[013-9]|77","1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
,[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,[[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
,[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"7000\\d{7}",,,,"70001234567",,,[11]
]
,,,[,,,,,,,,,[-1]
]
]
,"SH":[,[,,"(?:[256]\\d|8)\\d{3}",,,,,,,[4,5]
]
,[,,"2(?:[0-57-9]\\d|6[4-9])\\d\\d",,,,"22158"]
,[,,"[56]\\d{4}",,,,"51234",,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"262\\d\\d",,,,"26212",,,[5]
]
,"SH",290,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,1,"[256]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SI":[,[,,"[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",,,,,,,[5,6,7,8]
]
,[,,"(?:[1-357][2-8]|4[24-8])\\d{6}",,,,"12345678",,,[8]
,[7]
]
,[,,"65(?:1\\d|55|[67]0)\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",,,,"31234567",,,[8]
]
,[,,"80\\d{4,6}",,,,"80123456",,,[6,7,8]
]
,[,,"89[1-3]\\d{2,5}|90\\d{4,6}",,,,"90123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:59\\d\\d|8(?:1(?:[67]\\d|8[01389])|2(?:0\\d|2[0378]|8[0-2489])|3[389]\\d))\\d{4}",,,,"59012345",,,[8]
]
,"SI",386,"00|10(?:22|66|88|99)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"]
,"0$1"]
,[,"(\\d{3})(\\d{5})","$1 $2",["59|8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SJ":[,[,,"0\\d{4}|(?:[4589]\\d|79)\\d{6}",,,,,,,[5,8]
]
,[,,"79\\d{6}",,,,"79123456",,,[8]
]
,[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}",,,,"41234567",,,[8]
]
,[,,"80[01]\\d{5}",,,,"80012345",,,[8]
]
,[,,"82[09]\\d{5}",,,,"82012345",,,[8]
]
,[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,"81021234",,,[8]
]
,[,,"880\\d{5}",,,,"88012345",,,[8]
]
,[,,"85[0-5]\\d{5}",,,,"85012345",,,[8]
]
,"SJ",47,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"79",[,,,,,,,,,[-1]
]
,[,,"(?:0[2-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}",,,,"02000"]
,,,[,,"81[23]\\d{5}",,,,"81212345",,,[8]
]
]
,"SK":[,[,,"[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",,,,,,,[6,7,9]
]
,[,,"(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d",,,,"221234567"]
,[,,"909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",,,,"912123456",,,[9]
]
,[,,"800\\d{6}",,,,"800123456",,,[9]
]
,[,,"9(?:00|[78]\\d)\\d{6}",,,,"900123456",,,[9]
]
,[,,"8[5-9]\\d{7}",,,,"850123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"6(?:02|5[0-4]|9[0-6])\\d{6}",,,,"690123456",,,[9]
]
,"SK",421,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})","$1 $2",["909","9090"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"]
,"0$1"]
]
,[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"]
,"0$1"]
]
,[,,"9090\\d{3}",,,,"9090123",,,[7]
]
,,,[,,"9090\\d{3}|(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}",,,,,,,[7,9]
]
,[,,"96\\d{7}",,,,"961234567",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"SL":[,[,,"(?:[2378]\\d|66|99)\\d{6}",,,,,,,[8]
,[6]
]
,[,,"22[2-4][2-9]\\d{4}",,,,"22221234",,,,[6]
]
,[,,"(?:25|3[013-5]|66|7[5-9]|8[08]|99)\\d{6}",,,,"25123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SL",232,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[236-9]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SM":[,[,,"(?:0549|[5-7]\\d)\\d{6}",,,,,,,[8,10]
,[6]
]
,[,,"0549(?:8[0157-9]|9\\d)\\d{4}",,,,"0549886377",,,[10]
,[6]
]
,[,,"6[16]\\d{6}",,,,"66661212",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"7[178]\\d{6}",,,,"71123456",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"5[158]\\d{6}",,,,"58001110",,,[8]
]
,"SM",378,"00",,,,"([89]\\d{5})$","0549$1",,,[[,"(\\d{6})","$1",["[89]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["0"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["0"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SN":[,[,,"(?:[378]\\d{4}|93330)\\d{4}",,,,,,,[9]
]
,[,,"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}",,,,"301012345"]
,[,,"7(?:[06-8]\\d|21|90)\\d{6}",,,,"701234567"]
,[,,"800\\d{6}",,,,"800123456"]
,[,,"88[4689]\\d{6}",,,,"884123456"]
,[,,"81[02468]\\d{6}",,,,"810123456"]
,[,,,,,,,,,[-1]
]
,[,,"93330\\d{4}|3(?:392|9[01]\\d)\\d{5}",,,,"933301234"]
,"SN",221,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SO":[,[,,"[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",,,,,,,[6,7,8,9]
]
,[,,"(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",,,,"4012345",,,[6,7]
]
,[,,"28\\d{5}|(?:6[1-9]|79)\\d{6,7}|(?:15|24|(?:3[59]|4[89]|8[08])\\d|60|7[1-8]|9(?:0\\d|[2-9]))\\d{6}",,,,"71123456",,,[7,8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SO",252,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4})","$1 $2",["8[125]"]
]
,[,"(\\d{6})","$1",["[134]"]
]
,[,"(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]
]
,[,"(\\d)(\\d{7})","$1 $2",["24|[67]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]
]
,[,"(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[1-35-9]|9[2-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SR":[,[,,"(?:[2-5]|68|[78]\\d)\\d{5}",,,,,,,[6,7]
]
,[,,"(?:2[1-3]|3[0-7]|(?:4|68)\\d|5[2-58])\\d{4}",,,,"211234"]
,[,,"(?:7[124-7]|8[125-9])\\d{5}",,,,"7412345",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"56\\d{4}",,,,"561234",,,[6]
]
,"SR",597,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]
]
,[,"(\\d{3})(\\d{3})","$1-$2",["[2-5]"]
]
,[,"(\\d{3})(\\d{4})","$1-$2",["[6-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SS":[,[,,"[19]\\d{8}",,,,,,,[9]
]
,[,,"1[89]\\d{7}",,,,"181234567"]
,[,,"(?:12|9[12579])\\d{7}",,,,"977123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SS",211,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ST":[,[,,"(?:22|9\\d)\\d{5}",,,,,,,[7]
]
,[,,"22\\d{5}",,,,"2221234"]
,[,,"900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}",,,,"9812345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ST",239,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[29]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SV":[,[,,"[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",,,,,,,[7,8,11]
]
,[,,"2(?:[1-6]\\d{3}|[79]90[034]|890[0245])\\d{3}",,,,"21234567",,,[8]
]
,[,,"66(?:[02-9]\\d\\d|1(?:[02-9]\\d|16))\\d{3}|(?:6[0-57-9]|7\\d)\\d{6}",,,,"70123456",,,[8]
]
,[,,"800\\d{4}(?:\\d{4})?",,,,"8001234",,,[7,11]
]
,[,,"900\\d{4}(?:\\d{4})?",,,,"9001234",,,[7,11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SV",503,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[89]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[267]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SX":[,[,,"7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"7215(?:4[2-8]|8[239]|9[056])\\d{4}",,,,"7215425678",,,,[7]
]
,[,,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}",,,,"7215205678",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002123456"]
,[,,"900[2-9]\\d{6}",,,,"9002123456"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"SX",1,"011","1",,,"1|(5\\d{6})$","721$1",,,,,[,,,,,,,,,[-1]
]
,,"721",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SY":[,[,,"[1-39]\\d{8}|[1-5]\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}",,,,"112345678",,,,[6,7]
]
,[,,"9(?:22|[3-589]\\d|6[02-9])\\d{6}",,,,"944567890",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SY",963,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1",,1]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SZ":[,[,,"0800\\d{4}|(?:[237]\\d|900)\\d{6}",,,,,,,[8,9]
]
,[,,"[23][2-5]\\d{6}",,,,"22171234",,,[8]
]
,[,,"7[6-9]\\d{6}",,,,"76123456",,,[8]
]
,[,,"0800\\d{4}",,,,"08001234",,,[8]
]
,[,,"900\\d{6}",,,,"900012345",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{6}",,,,"70012345",,,[8]
]
,"SZ",268,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[0237]"]
]
,[,"(\\d{5})(\\d{4})","$1 $2",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"0800\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TA":[,[,,"8\\d{3}",,,,,,,[4]
]
,[,,"8\\d{3}",,,,"8999"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TA",290,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"8",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TC":[,[,,"(?:[58]\\d\\d|649|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"649(?:266|712|9(?:4\\d|50))\\d{4}",,,,"6497121234",,,,[7]
]
,[,,"649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}",,,,"6492311234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,"649(?:71[01]|966)\\d{4}",,,,"6497101234",,,,[7]
]
,"TC",1,"011","1",,,"1|([2-479]\\d{6})$","649$1",,,,,[,,,,,,,,,[-1]
]
,,"649",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TD":[,[,,"(?:22|[69]\\d|77)\\d{6}",,,,,,,[8]
]
,[,,"22(?:[37-9]0|5[0-5]|6[89])\\d{4}",,,,"22501234"]
,[,,"(?:6[023568]|77|9\\d)\\d{6}",,,,"63012345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TD",235,"00|16",,,,,,"00",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TG":[,[,,"[279]\\d{7}",,,,,,,[8]
]
,[,,"2(?:2[2-7]|3[23]|4[45]|55|6[67]|77)\\d{5}",,,,"22212345"]
,[,,"(?:7[09]|9[0-36-9])\\d{6}",,,,"90112345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TG",228,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TH":[,[,,"1\\d{8,9}|(?:[2-57]|[689]\\d)\\d{7}",,,,,,,[8,9,10]
]
,[,,"(?:2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}",,,,"21234567",,,[8]
]
,[,,"(?:14|6[1-6]|[89]\\d)\\d{7}",,,,"812345678",,,[9]
]
,[,,"1800\\d{6}",,,,"1800123456",,,[10]
]
,[,,"1900\\d{6}",,,,"1900123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"6[08]\\d{7}",,,,"601234567",,,[9]
]
,"TH",66,"00[1-9]","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["14|[3-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TJ":[,[,,"(?:00|11|[3-579]\\d|88)\\d{7}",,,,,,,[9]
,[3,5,6,7]
]
,[,,"(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}",,,,"372123456",,,,[3,5,6,7]
]
,[,,"41[18]\\d{6}|(?:00|11|5[05]|7[07]|88|9\\d)\\d{7}",,,,"917123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TJ",992,"810","8",,,"8",,"8~10",,[[,"(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]
,,,1]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[34]7|91[78]"]
,,,1]
,[,"(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3"]
,,,1]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0457-9]|11"]
,,,1]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TK":[,[,,"[2-47]\\d{3,6}",,,,,,,[4,5,6,7]
]
,[,,"(?:2[2-4]|[34]\\d)\\d{2,5}",,,,"3101"]
,[,,"7[2-4]\\d{2,5}",,,,"7290"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TK",690,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TL":[,[,,"7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",,,,,,,[7,8]
]
,[,,"(?:2[1-5]|3[1-9]|4[1-4])\\d{5}",,,,"2112345",,,[7]
]
,[,,"7[2-8]\\d{6}",,,,"77212345",,,[8]
]
,[,,"80\\d{5}",,,,"8012345",,,[7]
]
,[,,"90\\d{5}",,,,"9012345",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{5}",,,,"7012345",,,[7]
]
,[,,,,,,,,,[-1]
]
,"TL",670,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TM":[,[,,"[1-6]\\d{7}",,,,,,,[8]
]
,[,,"(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}",,,,"12345678"]
,[,,"6\\d{7}",,,,"66123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TM",993,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"]
,"(8 $1)"]
,[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"]
,"(8 $1)"]
,[,"(\\d{2})(\\d{6})","$1 $2",["6"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TN":[,[,,"[2-57-9]\\d{7}",,,,,,,[8]
]
,[,,"81200\\d{3}|(?:3[0-2]|7\\d)\\d{6}",,,,"30010123"]
,[,,"3(?:001|[12]40)\\d{4}|(?:(?:[259]\\d|4[0-6])\\d|3(?:1[1-35]|6[0-4]|91))\\d{5}",,,,"20123456"]
,[,,"8010\\d{4}",,,,"80101234"]
,[,,"88\\d{6}",,,,"88123456"]
,[,,"8[12]10\\d{4}",,,,"81101234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TN",216,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TO":[,[,,"(?:0800|[5-8]\\d{3})\\d{3}|[2-8]\\d{4}",,,,,,,[5,7]
]
,[,,"(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",,,,"20123",,,[5]
]
,[,,"6(?:3[02]|8[5-9])\\d{4}|(?:6[09]|7\\d|8[46-9])\\d{5}",,,,"7715123",,,[7]
]
,[,,"0800\\d{3}",,,,"0800222",,,[7]
]
,[,,"55[04]\\d{4}",,,,"5501234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TO",676,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]
]
,[,"(\\d{4})(\\d{3})","$1 $2",["0"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["[5-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TR":[,[,,"(?:4|8\\d{5})\\d{6}|(?:[2-58]\\d\\d|900)\\d{7}",,,,,,,[7,10,12]
]
,[,,"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",,,,"2123456789",,,[10]
]
,[,,"56161\\d{5}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}",,,,"5012345678",,,[10]
]
,[,,"800\\d{7}(?:\\d{2})?",,,,"8001234567",,,[10,12]
]
,[,,"(?:8[89]8|900)\\d{7}",,,,"9001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:21[12]|461)\\d{4}",,,,"5922121234",,,[10]
]
,[,,,,,,,,,[-1]
]
,"TR",90,"00","0",,,"0",,,,[[,"(\\d{3})(\\d)(\\d{3})","$1 $2 $3",["444"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[0589]|90"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"]
,"(0$1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{6})","$1 $2 $3",["80"]
,"0$1",,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[0589]|90"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"]
,"(0$1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{6})","$1 $2 $3",["80"]
,"0$1",,1]
]
,[,,"512\\d{7}",,,,"5123456789",,,[10]
]
,,,[,,"444\\d{4}",,,,,,,[7]
]
,[,,"(?:444|850\\d{3})\\d{4}",,,,"4441444",,,[7,10]
]
,,,[,,,,,,,,,[-1]
]
]
,"TT":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"868(?:2(?:0[13]|1[89]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}",,,,"8682211234",,,,[7]
]
,[,,"868(?:2(?:6[3-9]|[7-9]\\d)|(?:3\\d|4[6-9])\\d|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}",,,,"8682911234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"TT",1,"011","1",,,"1|([2-46-8]\\d{6})$","868$1",,,,,[,,,,,,,,,[-1]
]
,,"868",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"868619\\d{4}",,,,"8686191234",,,,[7]
]
]
,"TV":[,[,,"(?:2|7\\d\\d|90)\\d{4}",,,,,,,[5,6,7]
]
,[,,"2[02-9]\\d{3}",,,,"20123",,,[5]
]
,[,,"(?:7[01]\\d|90)\\d{4}",,,,"901234",,,[6,7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TV",688,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2"]
]
,[,"(\\d{2})(\\d{4})","$1 $2",["90"]
]
,[,"(\\d{2})(\\d{5})","$1 $2",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TW":[,[,,"[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",,,,,,,[7,8,9,10,11]
]
,[,,"(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",,,,"221234567",,,[8,9]
]
,[,,"(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",,,,"912345678",,,[9]
]
,[,,"80[0-79]\\d{6}|800\\d{5}",,,,"800123456",,,[8,9]
]
,[,,"20(?:[013-9]\\d\\d|2)\\d{4}",,,,"203123456",,,[7,9]
]
,[,,,,,,,,,[-1]
]
,[,,"99\\d{7}",,,,"990123456",,,[9]
]
,[,,"7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",,,,"7012345678",,,[10,11]
]
,"TW",886,"0(?:0[25-79]|19)","0","#",,"0",,,,[[,"(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"]
,"0$1"]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"50[0-46-9]\\d{6}",,,,"500123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"TZ":[,[,,"(?:[26-8]\\d|41|90)\\d{7}",,,,,,,[9]
]
,[,,"2[2-8]\\d{7}",,,,"222345678"]
,[,,"77[2-9]\\d{6}|(?:6[2-9]|7[13-689])\\d{7}",,,,"621234567"]
,[,,"80[08]\\d{6}",,,,"800123456"]
,[,,"90\\d{7}",,,,"900123456"]
,[,,"8(?:40|6[01])\\d{6}",,,,"840123456"]
,[,,,,,,,,,[-1]
]
,[,,"41\\d{7}",,,,"412345678"]
,"TZ",255,"00[056]","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"(?:8(?:[04]0|6[01])|90\\d)\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UA":[,[,,"[89]\\d{9}|[3-9]\\d{8}",,,,,,,[9,10]
,[5,6,7]
]
,[,,"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",,,,"311234567",,,[9]
,[5,6,7]
]
,[,,"(?:50|6[36-8]|7[1-3]|9[1-9])\\d{7}",,,,"501234567",,,[9]
]
,[,,"800[1-8]\\d{5,6}",,,,"800123456"]
,[,,"900[239]\\d{5,6}",,,,"900212345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"89[1-579]\\d{6}",,,,"891234567",,,[9]
]
,"UA",380,"00","0",,,"0",,"0~0",,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["4[45][0-5]|5(?:0|6[37])|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]","4[45][0-5]|5(?:0|6(?:3[14-7]|7))|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1 $2",["[3-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UG":[,[,,"800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",,,,,,,[9]
,[5,6,7]
]
,[,,"20(?:(?:(?:24|81)0|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[0147]\\d|2[5-9]|32|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}",,,,"312345678",,,,[5,6,7]
]
,[,,"7260\\d{5}|7(?:[0157-9]\\d|20|36|4[0-4])\\d{6}",,,,"712345678"]
,[,,"800[1-3]\\d{5}",,,,"800123456"]
,[,,"90[1-3]\\d{6}",,,,"901123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["202","2024"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[34]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"US":[,[,,"[2-9]\\d{9}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,"2015550123",,,,[7]
]
,[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,"2015550123",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"US",1,"011","1",,,"1",,,1,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"]
,,,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[2-9]"]
]
]
,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UY":[,[,,"(?:[249]\\d\\d|80)\\d{5}|9\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2\\d|4[2-7])\\d{6}",,,,"21231234",,,[8]
,[7]
]
,[,,"9[1-9]\\d{6}",,,,"94231234",,,[8]
]
,[,,"80[05]\\d{4}",,,,"8001234",,,[7]
]
,[,,"90[0-8]\\d{4}",,,,"9001234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UY",598,"0(?:0|1[3-9]\\d)","0"," int. ",,"0",,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["8|90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[24]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UZ":[,[,,"(?:[679]\\d|88)\\d{7}",,,,,,,[9]
]
,[,,"(?:6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|6\\d\\d|7(?:[23]\\d|7[69])|9(?:22|4[1-8]|6[135]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|(?:1[12]|8\\d)\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|6(?:22|3[12457]|4[13-8])|9(?:22|5[1-9])))\\d{5}",,,,"669050123"]
,[,,"(?:6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079]))|9(?:2(?:1[1267]|3[01]|5\\d|7[0-4])|(?:5[67]|7\\d)\\d|6(?:2[0-26]|8\\d)))|7(?:[07]\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|6(?:2(?:2[1245]|4[2-4])|39\\d|41[179]|5(?:[349]\\d|5[0-2])|7(?:0[017]|[13]\\d|22|44|55|67|88))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07])))|(?:88|9[0-57-9])\\d{3})\\d{4}",,,,"912345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UZ",998,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[6-9]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VA":[,[,,"0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",,,,,,,[6,7,8,9,10,11,12]
]
,[,,"06698\\d{1,6}",,,,"0669812345",,,[6,7,8,9,10,11]
]
,[,,"3[1-9]\\d{8}|3[2-9]\\d{7}",,,,"3123456789",,,[9,10]
]
,[,,"80(?:0\\d{3}|3)\\d{3}",,,,"800123456",,,[6,9]
]
,[,,"(?:0878\\d\\d|89(?:2|4[5-9]\\d))\\d{3}|89[45][0-4]\\d\\d|(?:1(?:44|6[346])|89(?:5[5-9]|9))\\d{6}",,,,"899123456",,,[6,8,9,10]
]
,[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,"848123456",,,[6,9]
]
,[,,"1(?:78\\d|99)\\d{6}",,,,"1781234567",,,[9,10]
]
,[,,"55\\d{8}",,,,"5512345678",,,[10]
]
,"VA",39,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"06698",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"3[2-8]\\d{9,10}",,,,"33101234501",,,[11,12]
]
]
,"VC":[,[,,"(?:[58]\\d\\d|784|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}",,,,"7842661234",,,,[7]
]
,[,,"784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}",,,,"7844301234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"VC",1,"011","1",,,"1|([2-7]\\d{6})$","784$1",,,,,[,,,,,,,,,[-1]
]
,,"784",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VE":[,[,,"[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}",,,,"2121234567",,,,[7]
]
,[,,"4(?:1[24-8]|2[46])\\d{7}",,,,"4121234567"]
,[,,"800\\d{7}",,,,"8001234567"]
,[,,"90[01]\\d{7}",,,,"9001234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"VE",58,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{7})","$1-$2",["[24-689]"]
,"0$1","$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"501\\d{7}",,,,"5010123456",,,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"VG":[,[,,"(?:284|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"284496[0-5]\\d{3}|284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}",,,,"2842291234",,,,[7]
]
,[,,"284496[6-9]\\d{3}|284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|99)|5(?:4[0-7]|68|9[69]))\\d{4}",,,,"2843001234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"VG",1,"011","1",,,"1|([2-578]\\d{6})$","284$1",,,,,[,,,,,,,,,[-1]
]
,,"284",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VI":[,[,,"[58]\\d{9}|(?:34|90)0\\d{7}",,,,,,,[10]
,[7]
]
,[,,"340(?:2(?:0[12]|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,"3406421234",,,,[7]
]
,[,,"340(?:2(?:0[12]|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,"3406421234",,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,"8002345678"]
,[,,"900[2-9]\\d{6}",,,,"9002345678"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",,,,"5002345678"]
,[,,,,,,,,,[-1]
]
,"VI",1,"011","1",,,"1|([2-9]\\d{6})$","340$1",,1,,,[,,,,,,,,,[-1]
]
,,"340",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VN":[,[,,"[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",,,,,,,[7,8,9,10]
]
,[,,"2(?:0[3-9]|1[0-689]|2[0-25-9]|3[2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|8[2-79]|9[0-4679])\\d{7}",,,,"2101234567",,,[10]
]
,[,,"(?:52[238]|89[689]|99[013-9])\\d{6}|(?:3\\d|5[689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",,,,"912345678",,,[9]
]
,[,,"1800\\d{4,6}|12(?:03|28)\\d{4}",,,,"1800123456",,,[8,9,10]
]
,[,,"1900\\d{4,6}",,,,"1900123456",,,[8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"672\\d{6}",,,,"672012345",,,[9]
]
,"VN",84,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[17]99"]
,"0$1",,1]
,[,"(\\d{2})(\\d{5})","$1 $2",["80"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4,5})","$1 $2",["69"]
,"0$1",,1]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["1"]
,,,1]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"]
,"0$1",,1]
]
,[[,"(\\d{2})(\\d{5})","$1 $2",["80"]
,"0$1",,1]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["1"]
,,,1]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"]
,"0$1",,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"[17]99\\d{4}|69\\d{5,6}",,,,,,,[7,8]
]
,[,,"(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",,,,"1992000",,,[7,8]
]
,,,[,,,,,,,,,[-1]
]
]
,"VU":[,[,,"(?:[23]\\d|[48]8)\\d{3}|(?:[57]\\d|90)\\d{5}",,,,,,,[5,7]
]
,[,,"(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",,,,"22123",,,[5]
]
,[,,"(?:5\\d|7[013-7])\\d{5}",,,,"5912345",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"90[1-9]\\d{4}",,,,"9010123",,,[7]
]
,"VU",678,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[579]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3[03]|900\\d)\\d{3}",,,,"30123"]
,,,[,,,,,,,,,[-1]
]
]
,"WF":[,[,,"(?:[45]0|68|72|8\\d)\\d{4}",,,,,,,[6]
]
,[,,"(?:50|68|72)\\d{4}",,,,"501234"]
,[,,"(?:50|68|72|8[23])\\d{4}",,,,"501234"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"WF",681,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[4-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"[48]0\\d{4}",,,,"401234"]
]
,"WS":[,[,,"(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",,,,,,,[5,6,7,10]
]
,[,,"6[1-9]\\d{3}|(?:[2-5]|60)\\d{4}",,,,"22123",,,[5,6]
]
,[,,"(?:7[235-7]|8(?:[3-7]|9\\d{3}))\\d{5}",,,,"7212345",,,[7,10]
]
,[,,"800\\d{3}",,,,"800123",,,[6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"WS",685,"0",,,,,,,,[[,"(\\d{5})","$1",["[2-5]|6[1-9]"]
]
,[,"(\\d{3})(\\d{3,7})","$1 $2",["[68]"]
]
,[,"(\\d{2})(\\d{5})","$1 $2",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"XK":[,[,,"[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",,,,,,,[8,9]
]
,[,,"(?:2[89]|39)0\\d{6}|[23][89]\\d{6}",,,,"28012345"]
,[,,"4[3-9]\\d{6}",,,,"43201234",,,[8]
]
,[,,"800\\d{5}",,,,"80001234",,,[8]
]
,[,,"900\\d{5}",,,,"90001234",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"XK",383,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"YE":[,[,,"(?:1|7\\d)\\d{7}|[1-7]\\d{6}",,,,,,,[7,8,9]
,[6]
]
,[,,"78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",,,,"1234567",,,[7,8]
,[6]
]
,[,,"7[0137]\\d{7}",,,,"712345678",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"YE",967,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"YT":[,[,,"80\\d{7}|(?:26|63)9\\d{6}",,,,,,,[9]
]
,[,,"269(?:0[67]|5[0-2]|6\\d|[78]0)\\d{4}",,,,"269601234"]
,[,,"639(?:0[0-79]|1[019]|[267]\\d|3[09]|[45]0|9[04-79])\\d{4}",,,,"639012345"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"YT",262,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,"269|63",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZA":[,[,,"[1-9]\\d{8}|8\\d{4,7}",,,,,,,[5,6,7,8,9]
]
,[,,"(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",,,,"101234567",,,[9]
]
,[,,"(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:6\\d|7[0-46-9])\\d{3}|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}",,,,"711234567"]
,[,,"80\\d{7}",,,,"801234567",,,[9]
]
,[,,"(?:86[2-9]|9[0-2]\\d)\\d{6}",,,,"862345678",,,[9]
]
,[,,"860\\d{6}",,,,"860123456",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",,,,"871234567",,,[9]
]
,"ZA",27,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"861\\d{6}",,,,"861123456",,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZM":[,[,,"(?:63|80)0\\d{6}|(?:21|[79]\\d)\\d{7}",,,,,,,[9]
,[6]
]
,[,,"21[1-8]\\d{6}",,,,"211234567",,,,[6]
]
,[,,"(?:7[679]|9[5-8])\\d{7}",,,,"955123456"]
,[,,"800\\d{6}",,,,"800123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"630\\d{6}",,,,"630012345"]
,"ZM",260,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[79]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[79]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZW":[,[,,"2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",,,,,,,[5,6,7,8,9,10]
,[3,4]
]
,[,,"(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}",,,,"1312345",,,,[3,4]
]
,[,,"7(?:[17]\\d|[38][1-9])\\d{6}",,,,"712345678",,,[9]
]
,[,,"80(?:[01]\\d|20|8[0-8])\\d{3}",,,,"8001234",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",,,,"8686123456",,,[10]
]
,"ZW",263,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["80"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"]
,"0$1"]
,[,"(\\d{4})(\\d{6})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"]
,"0$1"]
,[,"(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"800":[,[,,"[1-9]\\d{7}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"[1-9]\\d{7}",,,,"12345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",800,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2",["[1-9]"]
]
]
,,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,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"[0-36-9]\\d{8}",,,,"612345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",881,,,,,,,,,[[,"(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"882":[,[,,"[13]\\d{6}(?:\\d{2,5})?|285\\d{9}|[19]\\d{7}",,,,,,,[7,8,9,10,11,12]
]
,[,,,,,,,,,[-1]
]
,[,,"3(?:37\\d\\d|42)\\d{4}|3(?:2|47|7\\d{3})\\d{7}",,,,"3421234",,,[7,9,10,12]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:(?:285\\d\\d|3(?:45|[69]\\d{3}))\\d|9[89])\\d{6}",,,,"390123456789"]
,"001",882,,,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["16|342"]
]
,[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[19]"]
]
,[,"(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["34[57]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]
]
,[,"(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-3]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"348[57]\\d{7}",,,,"34851234567",,,[11]
]
]
,"883":[,[,,"51\\d{7}(?:\\d{3})?",,,,,,,[9,12]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"51[013]0\\d{8}|5100\\d{5}",,,,"510012345"]
,"001",883,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["510"]
]
,[,"(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["5"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"888":[,[,,"\\d{11}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",888,,,,,,,,1,[[,"(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"\\d{11}",,,,"12345678901"]
,,,[,,,,,,,,,[-1]
]
]
,"979":[,[,,"[1359]\\d{8}",,,,,,,[9]
,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"[1359]\\d{8}",,,,"123456789",,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",979,,,,,,,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/metadata.js
|
JavaScript
|
unknown
| 235,371
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated metadata for file
* ../resources/PhoneNumberMetadataForTesting.xml
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.metadata');
/**
* A mapping from a country calling code to the region codes which denote the
* region represented by that country calling code. In the case of multiple
* countries sharing a calling code, such as the NANPA regions, the one
* indicated with "isMainCountryForCode" in the metadata should be first.
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap = {
1:["US","BB","BS","CA"]
,7:["RU"]
,33:["FR"]
,39:["IT"]
,44:["GB","GG"]
,46:["SE"]
,48:["PL"]
,49:["DE"]
,52:["MX"]
,54:["AR"]
,55:["BR"]
,61:["AU","CC","CX"]
,64:["NZ"]
,65:["SG"]
,81:["JP"]
,82:["KR"]
,86:["CN"]
,244:["AO"]
,262:["RE","YT"]
,290:["TA"]
,374:["AM"]
,375:["BY"]
,376:["AD"]
,800:["001"]
,882:["001"]
,971:["AE"]
,979:["001"]
,998:["UZ"]
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.metadata.countryToMetadata = {
"AD":[,[,,"\\d{6}",,,,,,,[6]
]
,[,,"\\d{6}",,,,"123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
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,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AR":[,[,,"[1-3689]\\d{9,10}",,,,,,,[6,7,8,9,10,11]
]
,[,,"[1-3]\\d{5,9}",,,,"1234567890",,,[6,7,8,9,10]
]
,[,,"9\\d{10}|[1-3]\\d{9}",,,,"9234567890",,,[10,11]
]
,[,,"80\\d{8}",,,,"8034567890",,,[10]
]
,[,,"6(0\\d|10)\\d{7}",,,,"6234567890",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AR",54,"00","0",,,"0(?:(11|343|3715)15)?","9$1",,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["11"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["1[02-9]|[23]"]
,"0$1"]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15 $3-$4",["911"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 $3-$4",["9(?:1[02-9]|[23])"]
,"0$1","0$1 $CC"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["11"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["1[02-9]|[23]"]
,"0$1"]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3 $4",["911"]
]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3 $4",["9(?:1[02-9]|[23])"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AU":[,[,,"[1-578]\\d{4,14}",,,,,,,[9,10]
]
,[,,"[2378]\\d{8}",,,,"212345678",,,[9]
]
,[,,"4\\d{8}",,,,"412345678",,,[9]
]
,[,,"1800\\d{6}",,,,"1800123456",,,[10]
]
,[,,"190[0126]\\d{6}",,,,"1900123456",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AU",61,"001[12]","0",,,"0",,"0011",,[[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
,"$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2-478]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BB":[,[,,"246\\d{7}",,,,,,,[10]
,[7]
]
,[,,,,,,"2464567890",,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BB",1,"011",,,,,,,1,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BR":[,[,,"\\d{8,10}",,,,,,,[10]
,[8]
]
,[,,"\\d{8,10}",,,,"12345678",,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BR",55,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BS":[,[,,"(242|8(00|66|77|88)|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3-57]|9[2-5])|4(?:2[237]|51|64|77)|502|636|702)\\d{4}",,,,"2425027890",,,,[7]
]
,[,,"242(357|359|457|557)\\d{4}",,,,"2423577890"]
,[,,"8(00|66|77|88)\\d{7}",,,,"8001234567"]
,[,,"900\\d{7}",,,,"9001234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BS",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BY":[,[,,"[1-9]\\d{5}",,,,,,,[6]
]
,[,,"[1-9]\\d{5}",,,,"112345"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BY",375,"810","8",,,"80?|99999",,,,[[,"(\\d{4})","$1",["[1-8]"]
,"8 $1"]
,[,"(\\d{2})(\\d{3})","$1 $2",["[1-8]"]
,"8$1"]
,[,"(\\d{3})(\\d{3})","$1 $2",["[1-8]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CA":[,[,,"226\\d{7}",,,,,,,[10]
,[7]
]
,[,,"226\\d{7}",,,,"2261234567",,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CA",1,"011",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CC":[,[,,"\\d{6,10}",,,,,,,[10]
,[6]
]
,[,,"\\d{6,10}",,,,"2261234567",,,,[6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,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,,"30123456",,,,[2,3]
]
,[,,"1(5\\d{9}|7\\d{8}|6[02]\\d{8}|63\\d{7})",,,,"15123456789",,,[10,11]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"900([135]\\d{6}|9\\d{7})",,,,"9001234567",,,[10,11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"DE",49,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,8})","$1 $2",["2|3[3-9]|906|[4-9][1-9]1"]
,"0$1"]
,[,"(\\d{2})(\\d{4,11})","$1/$2",["[34]0|[68]9"]
,"0$1"]
,[,"(\\d{2})(\\d{2})","$1 $2",["[4-9]","[4-6]|[7-9](?:\\d[1-9]|[1-9]\\d)"]
,"0$1"]
,[,"(\\d{4})(\\d{2,7})","$1 $2",["[4-9]","[4-6]|[7-9](?:\\d[1-9]|[1-9]\\d)"]
,"0$1"]
,[,"(\\d{3})(\\d{1})(\\d{6})","$1 $2 $3",["800"]
,"0$1"]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["900"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FR":[,[,,"3\\d{6}",,,,,,,[7]
]
,[,,"3\\d{6}",,,,"3123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FR",33,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GB":[,[,,"\\d{10}",,,,,,,[9,10]
,[6,7,8]
]
,[,,"[1-6]\\d{9}",,,,"3123456789",,,,[6,7,8]
]
,[,,"7[1-57-9]\\d{8}",,,,"7123456789",,,[10]
]
,[,,"80\\d{8}",,,,"8023456789",,,[10]
]
,[,,"9[018]\\d{8}",,,,"9023456789",,,[10]
]
,[,,"8(?:4[3-5]|7[0-2])\\d{7}",,,,"8433456789",,,[10]
]
,[,,"70\\d{8}",,,,"7033456789",,,[10]
]
,[,,"56\\d{8}",,,,"5633456789",,,[10]
]
,"GB",44,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-59]|[78]0"]
,"(0$1)"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["6"]
,"(0$1)"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["7[1-57-9]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8[47]"]
,"(0$1)"]
]
,,[,,"76\\d{8}",,,,"7623456789",,,[10]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GG":[,[,,"\\d{6,10}",,,,,,,[10]
,[6]
]
,[,,"\\d{6,10}",,,,"7033456789",,,,[6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GG",44,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"IT":[,[,,"[0389]\\d{5,10}",,,,,,,[6,9,10,11]
]
,[,,"0\\d{9,10}",,,,"0123456789",,,[10,11]
]
,[,,"3\\d{8,9}",,,,"3123456789",,,[9,10]
]
,[,,"80(?:0\\d{6}|3\\d{3})",,,,"800123456",,,[6,9]
]
,[,,"89(?:2\\d{3}|9\\d{6})",,,,"892123",,,[6,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IT",39,"00",,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["0[26]"]
]
,[,"(\\d{3})(\\d{4})(\\d{3,4})","$1 $2 $3",["0[13-57-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["3"]
]
,[,"(\\d{3})(\\d{3,6})","$1 $2",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"JP":[,[,,"07\\d{5}|[1-357-9]\\d{3,10}",,,,,,,[4,5,6,7,8,9,10,11]
]
,[,,"07\\d{5}|[1-357-9]\\d{3,10}",,,,"0712345"]
,[,,,,,,,,,[-1]
]
,[,,"0777[01]\\d{2}",,,,"0777012",,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"JP",81,"010","0",,,"0",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[57-9]0"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[57-9]0"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["111|222|333","(?:111|222|333)1","(?:111|222|333)11"]
,"0$1"]
,[,"(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["222|333","2221|3332","22212|3332","222120|3332"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[23]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1-$2",["077"]
,"0$1"]
,[,"(\\d{4})","*$1",["[23]"]
,"$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"[23]\\d{3}",,,,"2123",,,[4]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KR":[,[,,"[1-7]\\d{3,9}|8\\d{8}",,,,,,,[4,5,6,7,8,9,10]
]
,[,,"(?:2|[34][1-3]|5[1-5]|6[1-4])(?:1\\d{2,3}|[2-9]\\d{6,7})",,,,"22123456"]
,[,,"1[0-25-9]\\d{7,8}",,,,"1023456789",,,[9,10]
]
,[,,"80\\d{7}",,,,"801234567",,,[9]
]
,[,,"60[2-9]\\d{6}",,,,"602345678",,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"50\\d{8}",,,,"5012345678",,,[10]
]
,[,,"70\\d{8}",,,,"7012345678",,,[10]
]
,"KR",82,"00(?:[124-68]|[37]\\d{2})","0",,,"0(8[1-46-8]|85\\d{2})?",,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["1(?:0|1[19]|[69]9|5[458])|[57]0","1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][2-9]","1(?:[169][2-8]|[78]|5(?:[1-3]|4[56]))|[68]0|[3-6][1-9][2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{4})","$1-$2-$3",["131","1312"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["131","131[13-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["13[2-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3-$4",["30"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["2(?:[26]|3[0-467])","2(?:[26]|3(?:01|1[45]|2[17-9]|39|4|6[67]|7[078]))"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["2(?:3[0-35-9]|[457-9])","2(?:3(?:0[02-9]|1[0-36-9]|2[02-6]|3[0-8]|6[0-589]|7[1-69]|[589])|[457-9])"]
,"0$1"]
,[,"(\\d)(\\d{3})","$1-$2",["21[0-46-9]","21(?:[0-247-9]|3[124]|6[1269])"]
,"0$1"]
,[,"(\\d)(\\d{4})","$1-$2",["21[36]","21(?:3[035-9]|6[03-578])"]
,"0$1"]
,[,"(\\d{2})(\\d{3})","$1-$2",["[3-6][1-9]1","[3-6][1-9]1(?:[0-46-9])","[3-6][1-9]1(?:[0-247-9]|3[124]|6[1269])"]
,"0$1"]
,[,"(\\d{2})(\\d{4})","$1-$2",["[3-6][1-9]1","[3-6][1-9]1[36]","[3-6][1-9]1(?:3[035-9]|6[03-578])"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MX":[,[,,"[1-9]\\d{9,10}",,,,,,,[10,11]
,[7]
]
,[,,"[2-9]\\d{9}",,,,"2123456789",,,[10]
,[7]
]
,[,,"1\\d{10}",,,,"11234567890",,,[11]
]
,[,,"800\\d{7}",,,,"8001234567",,,[10]
]
,[,,"900\\d{7}",,,,"9001234567",,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MX",52,"00","01",,,"01|04[45](\\d{10})","1$1",,,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]00"]
,"01 $1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"]
,"01 $1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]"]
,"01 $1",,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","045 $2 $3 $4",["1(?:33|55|81)"]
,"$1",,1]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","045 $2 $3 $4",["1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])"]
,"$1",,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]00"]
,"01 $1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|55|81"]
,"01 $1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2467]|3[0-24-9]|5[0-46-9]|8[2-9]|9[1-9]"]
,"01 $1",,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3 $4",["1(?:33|55|81)"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1(?:[124579]|3[0-24-9]|5[0-46-9]|8[02-9])"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NZ":[,[,,"[289]\\d{7,9}|[3-7]\\d{7}",,,,,,,[7,8,9,10]
]
,[,,"24099\\d{3}|(?:3[2-79]|[479][2-689]|6[235-9])\\d{6}",,,,"24099123",,,[7,8]
]
,[,,"2(?:[027]\\d{7}|9\\d{6,7}|1(?:0\\d{5,7}|[12]\\d{5,6}|[3-9]\\d{5})|4[1-9]\\d{6}|8\\d{7,8})",,,,"201234567",,,[8,9,10]
]
,[,,"800\\d{6,7}",,,,"8001234567",,,[9,10]
]
,[,,"900\\d{6,7}",,,,"9001234567",,,[9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NZ",64,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["24|[34679]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,5})","$1-$2 $3",["2[179]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PL":[,[,,"[1-9]\\d{8}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:5[01]|6[069]|7[289]|88)\\d{7}",,,,"501234567"]
,[,,"800\\d{6}",,,,"800123456"]
,[,,"70\\d{7}",,,,"701234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PL",48,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RE":[,[,,"[268]\\d{8}",,,,,,,[9]
]
,[,,"262\\d{6}",,,,"262161234"]
,[,,"6(?:9[23]|47)\\d{6}",,,,"692123456"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,"8(?:1[01]|2[0156]|84|9[0-37-9])\\d{6}",,,,"810123456"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RE",262,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,"262|6(?:9[23]|47)|8",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RU":[,[,,"[347-9]\\d{9}",,,,,,,[10]
]
,[,,"[348]\\d{9}",,,,"3011234567"]
,[,,"9\\d{9}",,,,"9123456789"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RU",7,"810","8",,,"8",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SE":[,[,,"\\d{9}",,,,,,,[9]
]
,[,,,,,,"123456789"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SE",46,"00",,,,,,,1,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SG":[,[,,"[13689]\\d{7,10}",,,,,,,[8,10,11]
]
,[,,"[36]\\d{7}",,,,"31234567",,,[8]
]
,[,,"[89]\\d{7}",,,,"81234567",,,[8]
]
,[,,"1?800\\d{7}",,,,"8001234567",,,[10,11]
]
,[,,"1900\\d{7}",,,,"19001234567",,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SG",65,"0[0-3][0-9]",,,,"777777",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8[1-9]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1[89]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["800"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TA":[,[,,"8\\d{3,7}",,,,,,,[4,6,8]
]
,[,,"8\\d{5}",,,,"812345",,,[6]
]
,[,,"8\\d{3}",,,,"8123",,,[4]
]
,[,,"8\\d{7}",,,,"81234567",,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TA",290,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"US":[,[,,"[13-689]\\d{9}|2[0-35-9]\\d{8}",,,,,,,[10]
,[7]
]
,[,,"[13-689]\\d{9}|2[0-35-9]\\d{8}",,,,"1234567890",,,,[7]
]
,[,,"[13-689]\\d{9}|2[0-35-9]\\d{8}",,,,"1234567890",,,,[7]
]
,[,,"8(?:00|66|77|88)\\d{7}",,,,"8004567890"]
,[,,"900\\d{7}",,,,"9004567890"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"US",1,"011","1"," extn. ",,"1",,,1,[[,"(\\d{3})(\\d{4})","$1 $2"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",,,,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",,,,1]
]
,[,,,,,,,,,[-1]
]
,1,,[,,"800\\d{7}",,,,"8004567890"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UZ":[,[,,"[69]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"6122\\d{5}",,,,"662345678",,,,[7]
]
,[,,"9[0-57-9]\\d{7}",,,,"912345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UZ",998,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[679]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"YT":[,[,,"[268]\\d{8}",,,,,,,[9]
]
,[,,"2696[0-4]\\d{4}",,,,"269601234"]
,[,,"639\\d{6}",,,,"639123456"]
,[,,"80\\d{7}",,,,"801234567"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"YT",262,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,"269|639",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"800":[,[,,"\\d{8}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"\\d{8}",,,,"12345678"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",800,,,,,,,,1,[[,"(\\d{4})(\\d{4})","$1 $2"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"882":[,[,,"\\d{9}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"\\d{9}",,,,"123456789"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",882,,,,,,,,,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"979":[,[,,"\\d{9}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"\\d{9}",,,,"123456789"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",979,,,,,,,,1,[[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/metadatafortesting.js
|
JavaScript
|
unknown
| 19,268
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated metadata for file
* ../resources/PhoneNumberMetadata.xml
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.metadata');
/**
* A mapping from a country calling code to the region codes which denote the
* region represented by that country calling code. In the case of multiple
* countries sharing a calling code, such as the NANPA regions, the one
* indicated with "isMainCountryForCode" in the metadata should be first.
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap = {
1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"]
,7:["RU","KZ"]
,20:["EG"]
,27:["ZA"]
,30:["GR"]
,31:["NL"]
,32:["BE"]
,33:["FR"]
,34:["ES"]
,36:["HU"]
,39:["IT","VA"]
,40:["RO"]
,41:["CH"]
,43:["AT"]
,44:["GB","GG","IM","JE"]
,45:["DK"]
,46:["SE"]
,47:["NO","SJ"]
,48:["PL"]
,49:["DE"]
,51:["PE"]
,52:["MX"]
,53:["CU"]
,54:["AR"]
,55:["BR"]
,56:["CL"]
,57:["CO"]
,58:["VE"]
,60:["MY"]
,61:["AU","CC","CX"]
,62:["ID"]
,63:["PH"]
,64:["NZ"]
,65:["SG"]
,66:["TH"]
,81:["JP"]
,82:["KR"]
,84:["VN"]
,86:["CN"]
,90:["TR"]
,91:["IN"]
,92:["PK"]
,93:["AF"]
,94:["LK"]
,95:["MM"]
,98:["IR"]
,211:["SS"]
,212:["MA","EH"]
,213:["DZ"]
,216:["TN"]
,218:["LY"]
,220:["GM"]
,221:["SN"]
,222:["MR"]
,223:["ML"]
,224:["GN"]
,225:["CI"]
,226:["BF"]
,227:["NE"]
,228:["TG"]
,229:["BJ"]
,230:["MU"]
,231:["LR"]
,232:["SL"]
,233:["GH"]
,234:["NG"]
,235:["TD"]
,236:["CF"]
,237:["CM"]
,238:["CV"]
,239:["ST"]
,240:["GQ"]
,241:["GA"]
,242:["CG"]
,243:["CD"]
,244:["AO"]
,245:["GW"]
,246:["IO"]
,247:["AC"]
,248:["SC"]
,249:["SD"]
,250:["RW"]
,251:["ET"]
,252:["SO"]
,253:["DJ"]
,254:["KE"]
,255:["TZ"]
,256:["UG"]
,257:["BI"]
,258:["MZ"]
,260:["ZM"]
,261:["MG"]
,262:["RE","YT"]
,263:["ZW"]
,264:["NA"]
,265:["MW"]
,266:["LS"]
,267:["BW"]
,268:["SZ"]
,269:["KM"]
,290:["SH","TA"]
,291:["ER"]
,297:["AW"]
,298:["FO"]
,299:["GL"]
,350:["GI"]
,351:["PT"]
,352:["LU"]
,353:["IE"]
,354:["IS"]
,355:["AL"]
,356:["MT"]
,357:["CY"]
,358:["FI","AX"]
,359:["BG"]
,370:["LT"]
,371:["LV"]
,372:["EE"]
,373:["MD"]
,374:["AM"]
,375:["BY"]
,376:["AD"]
,377:["MC"]
,378:["SM"]
,380:["UA"]
,381:["RS"]
,382:["ME"]
,383:["XK"]
,385:["HR"]
,386:["SI"]
,387:["BA"]
,389:["MK"]
,420:["CZ"]
,421:["SK"]
,423:["LI"]
,500:["FK"]
,501:["BZ"]
,502:["GT"]
,503:["SV"]
,504:["HN"]
,505:["NI"]
,506:["CR"]
,507:["PA"]
,508:["PM"]
,509:["HT"]
,590:["GP","BL","MF"]
,591:["BO"]
,592:["GY"]
,593:["EC"]
,594:["GF"]
,595:["PY"]
,596:["MQ"]
,597:["SR"]
,598:["UY"]
,599:["CW","BQ"]
,670:["TL"]
,672:["NF"]
,673:["BN"]
,674:["NR"]
,675:["PG"]
,676:["TO"]
,677:["SB"]
,678:["VU"]
,679:["FJ"]
,680:["PW"]
,681:["WF"]
,682:["CK"]
,683:["NU"]
,685:["WS"]
,686:["KI"]
,687:["NC"]
,688:["TV"]
,689:["PF"]
,690:["TK"]
,691:["FM"]
,692:["MH"]
,800:["001"]
,808:["001"]
,850:["KP"]
,852:["HK"]
,853:["MO"]
,855:["KH"]
,856:["LA"]
,870:["001"]
,878:["001"]
,880:["BD"]
,881:["001"]
,882:["001"]
,883:["001"]
,886:["TW"]
,888:["001"]
,960:["MV"]
,961:["LB"]
,962:["JO"]
,963:["SY"]
,964:["IQ"]
,965:["KW"]
,966:["SA"]
,967:["YE"]
,968:["OM"]
,970:["PS"]
,971:["AE"]
,972:["IL"]
,973:["BH"]
,974:["QA"]
,975:["BT"]
,976:["MN"]
,977:["NP"]
,979:["001"]
,992:["TJ"]
,993:["TM"]
,994:["AZ"]
,995:["GE"]
,996:["KG"]
,998:["UZ"]
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.metadata.countryToMetadata = {
"AC":[,[,,"(?:[01589]\\d|[46])\\d{4}",,,,,,,[5,6]
]
,[,,"6[2-467]\\d{3}",,,,,,,[5]
]
,[,,"4\\d{4}",,,,,,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:0[1-9]|[1589]\\d)\\d{4}",,,,,,,[6]
]
,,,[,,,,,,,,,[-1]
]
]
,"AD":[,[,,"(?:1|6\\d)\\d{7}|[135-9]\\d{5}",,,,,,,[6,8,9]
]
,[,,"[78]\\d{5}",,,,,,,[6]
]
,[,,"690\\d{6}|[356]\\d{5}",,,,,,,[6,9]
]
,[,,"180[02]\\d{4}",,,,,,,[8]
]
,[,,"[19]\\d{5}",,,,,,,[6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[135-9]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"1800\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AE":[,[,,"(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"[2-4679][2-8]\\d{6}",,,,,,,[8]
,[7]
]
,[,,"5[024-68]\\d{7}",,,,,,,[9]
]
,[,,"400\\d{6}|800\\d{2,9}"]
,[,,"900[02]\\d{5}",,,,,,,[9]
]
,[,,"700[05]\\d{5}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AE",971,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2,9})","$1 $2",["60|8"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"600[25]\\d{5}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"AF":[,[,,"[2-7]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"7\\d{8}",,,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AF",93,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AG":[,[,,"(?:268|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}",,,,,,,,[7]
]
,[,,"268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,"26848[01]\\d{4}",,,,,,,,[7]
]
,"AG",1,"011","1",,,"1|([457]\\d{6})$","268$1",,,,,[,,"26840[69]\\d{4}",,,,,,,,[7]
]
,,"268",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AI":[,[,,"(?:264|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"264(?:292|4(?:6[12]|9[78]))\\d{4}",,,,,,,,[7]
]
,[,,"264(?:235|4(?:69|76)|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"AI",1,"011","1",,,"1|([2457]\\d{6})$","264$1",,,,,[,,"264724\\d{4}",,,,,,,,[7]
]
,,"264",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AL":[,[,,"(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",,,,,,,[6,7,8,9]
,[5]
]
,[,,"(?:[2358](?:[16-9]\\d[2-9]|[2-5][2-9]\\d)|4(?:[2-57-9][2-9]|6\\d)\\d)\\d{4}",,,,,,,[8]
,[5,6,7]
]
,[,,"6(?:[78][2-9]|9\\d)\\d{6}",,,,,,,[9]
]
,[,,"800\\d{4}",,,,,,,[7]
]
,[,,"900[1-9]\\d\\d",,,,,,,[6]
]
,[,,"808[1-9]\\d\\d",,,,,,,[6]
]
,[,,"700[2-9]\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,"AL",355,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,4})","$1 $2",["80|9"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"]
,"0$1"]
,[,"(\\d{3})(\\d{5})","$1 $2",["[23578]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-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3(?:777|865))[2-8]\\d{5}|3(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:(?:11[1-8]|670)\\d|2(?:2(?:1[2-6]|3[3-6])|(?:3[06]|49)4|6(?:04|1[2-7]|4[4-6])|9(?:[17][4-6]|9[3-6]))|3(?:(?:36|64)4|4(?:1[2-7]|[235][4-6]|84)|5(?:1[2-8]|[38][4-6])|8(?:1[2-6]|[58][3-6]|7[24-6])))\\d{6}|(?:2(?:284|657|9(?:20|66))|3(?:4(?:8[27]|92)|755|878))[2-7]\\d{5}|(?:2(?:[28]0|37|6[36]|9[48])|3(?:62|7[069]|8[03]))[45]\\d{6}|(?:2(?:2(?:2[59]|44|52)|3(?:26|4[24])|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|(?:2(?:(?:26|62)2|3(?:02|2[03])|477|9(?:42|83))|3(?:4(?:[47]6|62|89)|5(?:41|64)|873))[2-6]\\d{5}|2(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:329|4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|5[17])|888))[3-6]\\d{5}|(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|[24]5|5[25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[145]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,,,,[10]
,[6,7,8]
]
,[,,"9(?:2954|3(?:777|865))[2-8]\\d{5}|93(?:7(?:1[15]|81)|8(?:21|4[16]|69|9[12]))[46]\\d{5}|(?:675\\d|9(?:11[1-8]\\d|2(?:2(?:1[2-6]|3[3-6])|(?:3[06]|49)4|6(?:04|1[2-7]|4[4-6])|9(?:[17][4-6]|9[3-6]))|3(?:(?:36|64)4|4(?:1[2-7]|[235][4-6]|84)|5(?:1[2-8]|[38][4-6])|8(?:1[2-6]|[58][3-6]|7[24-6]))))\\d{6}|9(?:2(?:284|657|9(?:20|66))|3(?:4(?:8[27]|92)|755|878))[2-7]\\d{5}|9(?:2(?:[28]0|37|6[36]|9[48])|3(?:62|7[069]|8[03]))[45]\\d{6}|9(?:2(?:2(?:2[59]|44|52)|3(?:26|4[24])|473|9(?:[07]2|2[26]|34|46))|3327)[45]\\d{5}|9(?:2(?:(?:26|62)2|3(?:02|2[03])|477|9(?:42|83))|3(?:4(?:[47]6|62|89)|5(?:41|64)|873))[2-6]\\d{5}|92(?:2(?:21|4[23]|6[145]|7[1-4]|8[356]|9[267])|3(?:16|3[13-8]|43|5[346-8]|9[3-5])|475|6(?:2[46]|4[78]|5[1568])|9(?:03|2[1457-9]|3[1356]|4[08]|[56][23]|82))4\\d{5}|9(?:2(?:2(?:57|81)|3(?:24|46|92)|9(?:01|23|64))|3(?:329|4(?:42|71)|5(?:25|37|4[347]|71)|7(?:18|5[17])|888))[3-6]\\d{5}|9(?:2(?:2(?:02|2[3467]|4[156]|5[45]|6[6-8]|91)|3(?:1[47]|[24]5|5[25]|96)|47[48]|625|932)|3(?:38[2578]|4(?:0[0-24-9]|3[78]|4[457]|58|6[03-9]|72|83|9[136-8])|5(?:2[124]|[368][23]|4[2689]|7[2-6])|7(?:16|2[15]|3[145]|4[13]|5[468]|7[2-5]|8[26])|8(?:2[5-7]|3[278]|4[3-5]|5[78]|6[1-378]|[78]7|94)))[4-6]\\d{5}",,,,,,,,[6,7,8]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,"60[04579]\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AR",54,"00","0",,,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1",,,[[,"(\\d{3})","$1",["[09]|1(?:0[0-35-7]|1[02-5]|2[15])"]
]
,[,"(\\d{2})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["[1-8]"]
]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"]
,"0$1",,1]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1"]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"]
,"0$1"]
]
,[[,"(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"]
,"0$1",,1]
,[,"(\\d)(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"]
]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3-$4",["91"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3-$4",["9"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"810\\d{7}",,,,,,,[10]
]
,[,,"810\\d{7}",,,,,,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"AS":[,[,,"(?:[58]\\d\\d|684|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"6846(?:22|33|44|55|77|88|9[19])\\d{4}",,,,,,,,[7]
]
,[,,"684(?:2(?:48|5[2468]|72)|7(?:3[13]|70|82))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"AS",1,"011","1",,,"1|([267]\\d{6})$","684$1",,,,,[,,,,,,,,,[-1]
]
,,"684",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AT":[,[,,"1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",,,,,,,[4,5,6,7,8,9,10,11,12,13]
,[3]
]
,[,,"1(?:11\\d|[2-9]\\d{3,11})|(?:316|463|(?:51|66|73)2)\\d{3,10}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-578]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|7[1368]|8[2457])|5(?:2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[135-8]|5[468])|7(?:2[1-8]|35|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{4,10}",,,,,,,,[3]
]
,[,,"6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}",,,,,,,[7,8,9,10,11,12,13]
]
,[,,"800\\d{6,10}",,,,,,,[9,10,11,12,13]
]
,[,,"9(?:0[01]|3[019])\\d{6,10}",,,,,,,[9,10,11,12,13]
]
,[,,"8(?:10|2[018])\\d{6,10}|828\\d{5}",,,,,,,[8,9,10,11,12,13]
]
,[,,,,,,,,,[-1]
]
,[,,"5(?:0[1-9]|17|[79]\\d)\\d{2,10}|7[28]0\\d{6,10}",,,,,,,[5,6,7,8,9,10,11,12,13]
]
,"AT",43,"00","0",,,"0",,,,[[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})","$1 $2",["517"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"]
,"0$1"]
,[,"(\\d{6})","$1",["1"]
]
,[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"]
,"0$1"]
]
,[[,"(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})","$1 $2",["517"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["5[079]"]
,"0$1"]
,[,"(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AU":[,[,,"1(?:[0-79]\\d{7,8}|8[0-24-9]\\d{7})|(?:[2-478]\\d\\d|550)\\d{6}|1\\d{4,7}",,,,,,,[5,6,7,8,9,10]
]
,[,,"(?:[237]\\d{5}|8(?:51(?:0(?:0[03-9]|[1247]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-6])|1(?:1[69]|[23]\\d|4[0-4]))|(?:[6-8]\\d{3}|9(?:[02-9]\\d\\d|1(?:[0-57-9]\\d|6[0135-9])))\\d))\\d{3}",,,,,,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,,,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,,,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,,,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,,,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,,,,[9]
]
,"AU",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|(183[12])",,"0011",,[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["13"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["19"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["180","1802"]
]
,[,"(\\d{4})(\\d{3,4})","$1 $2",["19"]
]
,[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|[45]"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"]
,"(0$1)","$CC ($1)"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]
]
]
,[[,"(\\d{2})(\\d{3,4})","$1 $2",["16"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|[45]"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"]
,"(0$1)","$CC ($1)"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]
]
]
,[,,"16\\d{3,7}",,,,,,,[5,6,7,8,9]
]
,1,,[,,"1[38]00\\d{6}|1(?:345[0-4]|802)\\d{3}|13\\d{4}",,,,,,,[6,7,8,10]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AW":[,[,,"(?:[25-79]\\d\\d|800)\\d{4}",,,,,,,[7]
]
,[,,"5(?:2\\d|8[1-9])\\d{4}"]
,[,,"(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}"]
,[,,"800\\d{4}"]
,[,,"900\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:28\\d|501)\\d{4}"]
,"AW",297,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[25-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"AX":[,[,,"2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"18[1-8]\\d{3,6}",,,,,,,[6,7,8,9]
]
,[,,"(?:4[0-8]|50)\\d{4,8}",,,,,,,[6,7,8,9,10]
]
,[,,"800\\d{4,6}",,,,,,,[7,8,9]
]
,[,,"[67]00\\d{5,6}",,,,,,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AX",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,,,[,,,,,,,,,[-1]
]
,,"18",[,,,,,,,,,[-1]
]
,[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[09]|70[1-5]\\d)\\d{4,8}"]
,,,[,,,,,,,,,[-1]
]
]
,"AZ":[,[,,"365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",,,,,,,[9]
,[7]
]
,[,,"(?:222[0-79]\\d|365(?:[0-46-9]\\d|5[0-35-9]))\\d{4}|(?:(?:1[28]|46)\\d|2(?:[045]2|1[24]|2[34]|33|6[23]))\\d{6}",,,,,,,,[7]
]
,[,,"(?:36554|99[2-9]\\d\\d)\\d{4}|(?:[16]0|4[04]|5[015]|7[07])\\d{7}"]
,[,,"88\\d{7}"]
,[,,"900200\\d{3}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"AZ",994,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[1-9]"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365|46","1[28]|2|365(?:[0-46-9]|5[0-35-9])|46"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365|46","1[28]|2|365(?:[0-46-9]|5[0-35-9])|46"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BA":[,[,,"6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",,,,,,,[8,9]
,[6]
]
,[,,"(?:3(?:[05-79][2-9]|1[4579]|[23][24-9]|4[2-4689]|8[2457-9])|49[2-579]|5(?:0[2-49]|[13][2-9]|[268][2-4679]|4[4689]|5[2-79]|7[2-69]|9[2-4689]))\\d{5}",,,,,,,[8]
,[6]
]
,[,,"6040[0-4]\\d{4}|6(?:03|[1-356]|44|7\\d)\\d{6}"]
,[,,"8[08]\\d{6}",,,,,,,[8]
]
,[,,"9[0246]\\d{6}",,,,,,,[8]
]
,[,,"8[12]\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BA",387,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1-$2",["[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70(?:3[0146]|[56]0)\\d{4}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"BB":[,[,,"(?:246|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}",,,,,,,,[7]
]
,[,,"246(?:2(?:[3568]\\d|4[0-57-9])|45\\d|69[5-7]|8(?:[2-5]\\d|83))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"(?:246976|900[2-9]\\d\\d)\\d{4}",,,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,"24631\\d{5}",,,,,,,,[7]
]
,"BB",1,"011","1",,,"1|([2-9]\\d{6})$","246$1",,,,,[,,,,,,,,,[-1]
]
,,"246",[,,,,,,,,,[-1]
]
,[,,"246(?:292|367|4(?:1[7-9]|3[01]|44|67)|7(?:36|53))\\d{4}",,,,,,,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"BD":[,[,,"1\\d{9}|2\\d{7,8}|88\\d{4,6}|(?:8[0-79]|9\\d)\\d{4,8}|(?:[346]\\d|[57])\\d{5,8}",,,,,,,[6,7,8,9,10]
]
,[,,"(?:4(?:31\\d\\d|423)|5222)\\d{3}(?:\\d{2})?|8332[6-9]\\d\\d|(?:3(?:03[56]|224)|4(?:22[25]|653))\\d{3,4}|(?:3(?:42[47]|529|823)|4(?:027|525|65(?:28|8))|562|6257|7(?:1(?:5[3-5]|6[12]|7[156]|89)|22[589]56|32|42675|52(?:[25689](?:56|8)|[347]8)|71(?:6[1267]|75|89)|92374)|82(?:2[59]|32)56|9(?:03[23]56|23(?:256|373)|31|5(?:1|2[4589]56)))\\d{3}|(?:3(?:02[348]|22[35]|324|422)|4(?:22[67]|32[236-9]|6(?:2[46]|5[57])|953)|5526|6(?:024|6655)|81)\\d{4,5}|(?:2(?:7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|1[1-6]|2[0157-9]|3[1-69]|41|6[1-35]|7[1-5]|8[1-8]|9[0-6])|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0136-9]|7[0-7]|8[014-9]))|3(?:0(?:2[025-79]|3[2-4])|181|22[12]|32[2356]|824)|4(?:02[09]|22[348]|32[045]|523|6(?:27|54))|666(?:22|53)|7(?:22[57-9]|42[56]|82[35])8|8(?:0[124-9]|2(?:181|2[02-4679]8)|4[12]|[5-7]2)|9(?:[04]2|2(?:2|328)|81))\\d{4}|(?:2[45]\\d\\d|3(?:1(?:2[5-7]|[5-7])|425|822)|4(?:033|1\\d|[257]1|332|4(?:2[246]|5[25])|6(?:2[35]|56|62)|8(?:23|54)|92[2-5])|5(?:02[03489]|22[457]|32[35-79]|42[46]|6(?:[18]|53)|724|826)|6(?:023|2(?:2[2-5]|5[3-5]|8)|32[3478]|42[34]|52[47]|6(?:[18]|6(?:2[34]|5[24]))|[78]2[2-5]|92[2-6])|7(?:02|21\\d|[3-589]1|6[12]|72[24])|8(?:217|3[12]|[5-7]1)|9[24]1)\\d{5}|(?:(?:3[2-8]|5[2-57-9]|6[03-589])1|4[4689][18])\\d{5}|[59]1\\d{5}"]
,[,,"(?:1[13-9]\\d|644)\\d{7}|(?:3[78]|44|66)[02-9]\\d{7}",,,,,,,[10]
]
,[,,"80[03]\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"96(?:0[469]|1[0-47]|3[389]|6[69]|7[78])\\d{6}",,,,,,,[10]
]
,"BD",880,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"]
,"0$1"]
,[,"(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:28|4[14]|5)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{3,6})","$1-$2",["[13-9]"]
,"0$1"]
,[,"(\\d)(\\d{7,8})","$1-$2",["2"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BE":[,[,,"4\\d{8}|[1-9]\\d{7}",,,,,,,[8,9]
]
,[,,"80[2-8]\\d{5}|(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}",,,,,,,[8]
]
,[,,"4[5-9]\\d{7}",,,,,,,[9]
]
,[,,"800[1-9]\\d{4}",,,,,,,[8]
]
,[,,"(?:70(?:2[0-57]|3[0457]|44|69|7[0579])|90(?:0[0-35-8]|1[36]|2[0-3568]|3[0135689]|4[2-68]|5[1-68]|6[0-378]|7[23568]|9[34679]))\\d{4}",,,,,,,[8]
]
,[,,"7879\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BE",32,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"78(?:0[57]|1[0458]|2[25]|3[15-8]|48|[56]0|7[078])\\d{4}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"BF":[,[,,"[025-7]\\d{7}",,,,,,,[8]
]
,[,,"2(?:0(?:49|5[23]|6[56]|9[016-9])|4(?:4[569]|5[4-6]|6[56]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}"]
,[,,"(?:0[127]|5[1-8]|[67]\\d)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BF",226,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BG":[,[,,"[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",,,,,,,[6,7,8,9]
,[4,5]
]
,[,,"2\\d{5,7}|(?:43[1-6]|70[1-9])\\d{4,5}|(?:[36]\\d|4[124-7]|[57][1-9]|8[1-6]|9[1-7])\\d{5,6}",,,,,,,[6,7,8]
,[4,5]
]
,[,,"43[07-9]\\d{5}|(?:48|8[7-9]\\d|9(?:8\\d|9[69]))\\d{6}",,,,,,,[8,9]
]
,[,,"800\\d{5}",,,,,,,[8]
]
,[,,"90\\d{6}",,,,,,,[8]
]
,[,,"700\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BG",359,"00","0",,,"0",,,,[[,"(\\d{6})","$1",["1"]
]
,[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
]
,[[,"(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BH":[,[,,"[136-9]\\d{7}",,,,,,,[8]
]
,[,,"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9]|88)|9[69][69])|7(?:1(?:11|78)|7\\d\\d))\\d{4}"]
,[,,"(?:3(?:[1-79]\\d|8[0-47-9])\\d|6(?:3(?:00|33|6[16])|6(?:3[03-9]|[69]\\d|7[0-6])))\\d{4}"]
,[,,"80\\d{6}"]
,[,,"(?:87|9[014578])\\d{6}"]
,[,,"84\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BH",973,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[13679]|8[047]"]
]
]
,,[,,,,,,,,,[-1]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]
]
,,,[,,,,,,,,,[-1]
]
]
,"BM":[,[,,"(?:441|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"441(?:[46]\\d\\d|5(?:4\\d|60|89))\\d{4}",,,,,,,,[7]
]
,[,,"441(?:[2378]\\d|5[0-39])\\d{5}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"BM",1,"011","1",,,"1|([2-8]\\d{6})$","441$1",,,,,[,,,,,,,,,[-1]
]
,,"441",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BN":[,[,,"[2-578]\\d{6}",,,,,,,[7]
]
,[,,"22[0-7]\\d{4}|(?:2[013-9]|[34]\\d|5[0-25-9])\\d{5}"]
,[,,"(?:22[89]|[78]\\d\\d)\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"5[34]\\d{5}"]
,"BN",673,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-578]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BO":[,[,,"(?:[2-467]\\d\\d|8001)\\d{5}",,,,,,,[8,9]
,[7]
]
,[,,"(?:2(?:2\\d\\d|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d\\d|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:[27]\\d|3[2-4]|4[248]|5[24]|6[2-6]))|4(?:4\\d\\d|6(?:11|[24689]\\d|72)))\\d{4}",,,,,,,[8]
,[7]
]
,[,,"[67]\\d{7}",,,,,,,[8]
]
,[,,"8001[07]\\d{4}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BO",591,"00(?:1\\d)?","0",,,"0(1\\d)?",,,,[[,"(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]
,,"0$CC $1"]
,[,"(\\d{8})","$1",["[67]"]
,,"0$CC $1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]
,,"0$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"8001[07]\\d{4}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BQ":[,[,,"(?:[34]1|7\\d)\\d{5}",,,,,,,[7]
]
,[,,"(?:318[023]|41(?:6[023]|70)|7(?:1[578]|2[05]|50)\\d)\\d{3}"]
,[,,"(?:31(?:8[14-8]|9[14578])|416[14-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BQ",599,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"[347]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BR":[,[,,"(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-24679]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",,,,,,,[8,9,10,11]
]
,[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}",,,,,,,[10]
,[8]
]
,[,,"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])(?:7|9\\d)\\d{7}",,,,,,,[10,11]
,[8,9]
]
,[,,"800\\d{6,7}",,,,,,,[9,10]
]
,[,,"300\\d{6}|[59]00\\d{6,7}",,,,,,,[9,10]
]
,[,,"300\\d{7}|[34]00\\d{5}|4(?:02|37)0\\d{4}",,,,,,,[8,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BR",55,"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","0",,,"0(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2",,,[[,"(\\d{3,6})","$1",["1(?:1[25-8]|2[357-9]|3[02-68]|4[12568]|5|6[0-8]|8[015]|9[0-47-9])|321|610"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["[2-57]","[2357]|4(?:[0-24-9]|3(?:[0-689]|7[1-9]))"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"]
,"0$1"]
,[,"(\\d{5})(\\d{4})","$1-$2",["9"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"]
,"($1)","0 $CC ($1)"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"]
,"($1)","0 $CC ($1)"]
]
,[[,"(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"]
,"($1)","0 $CC ($1)"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"]
,"($1)","0 $CC ($1)"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"4020\\d{4}|[34]00\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BS":[,[,,"(?:242|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-4]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}",,,,,,,,[7]
]
,[,,"242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|[89]9))\\d{4}",,,,,,,,[7]
]
,[,,"242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"BS",1,"011","1",,,"1|([3-8]\\d{6})$","242$1",,,,,[,,,,,,,,,[-1]
]
,,"242",[,,,,,,,,,[-1]
]
,[,,"242225\\d{4}"]
,,,[,,,,,,,,,[-1]
]
]
,"BT":[,[,,"[17]\\d{7}|[2-8]\\d{6}",,,,,,,[7,8]
,[6]
]
,[,,"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}",,,,,,,[7]
,[6]
]
,[,,"(?:1[67]|77)\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BT",975,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[2-7]"]
]
,[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]
]
]
,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BW":[,[,,"90\\d{5}|(?:[2-6]|7\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[013])|4(?:6[03]|7[1267]|9[0-5])|5(?:3[0389]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[067]))\\d{4}",,,,,,,[7]
]
,[,,"77200\\d{3}|7(?:[1-6]\\d|7[013-9])\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"90\\d{5}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"79(?:1(?:[01]\\d|20)|2[0-2]\\d)\\d{3}",,,,,,,[8]
]
,"BW",267,"00",,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["90"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["[2-6]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BY":[,[,,"(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",,,,,,,[6,7,8,9,10,11]
,[5]
]
,[,,"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d\\d)|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}",,,,,,,[9]
,[5,6,7]
]
,[,,"(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}",,,,,,,[9]
]
,[,,"800\\d{3,7}|8(?:0[13]|20\\d)\\d{7}"]
,[,,"(?:810|902)\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"249\\d{6}",,,,,,,[9]
]
,"BY",375,"810","8",,,"0|80?",,"8~10",,[[,"(\\d{3})(\\d{3})","$1 $2",["800"]
,"8 $1"]
,[,"(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"]
,"8 $1"]
,[,"(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"]
,"8 0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"]
,"8 0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"]
,"8 0$1"]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"800\\d{3,7}|(?:8(?:0[13]|10|20\\d)|902)\\d{7}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"BZ":[,[,,"(?:0800\\d|[2-8])\\d{6}",,,,,,,[7,11]
]
,[,,"(?:236|732)\\d{4}|[2-578][02]\\d{5}",,,,,,,[7]
]
,[,,"6[0-35-7]\\d{5}",,,,,,,[7]
]
,[,,"0800\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"BZ",501,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-8]"]
]
,[,"(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CA":[,[,,"(?:[2-8]\\d|90)\\d{8}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[57])|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|6[57])|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47|72)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|(?:5(?:00|2[12]|33|44|66|77|88)|622)[2-9]\\d{6}"]
,[,,"600[2-9]\\d{6}"]
,"CA",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CC":[,[,,"1(?:[0-79]\\d|8[0-24-9])\\d{7}|(?:[148]\\d\\d|550)\\d{6}|1\\d{5,7}",,,,,,,[6,7,8,9,10]
]
,[,,"8(?:51(?:0(?:02|31|60)|118)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",,,,,,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,,,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,,,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,,,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,,,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,,,,[9]
]
,"CC",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|([59]\\d{7})$","8$1","0011",,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CD":[,[,,"[189]\\d{8}|[1-68]\\d{6}",,,,,,,[7,9]
]
,[,,"12\\d{7}|[1-6]\\d{6}"]
,[,,"88\\d{5}|(?:8[0-2459]|9[017-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})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CH":[,[,,"8\\d{11}|[2-9]\\d{8}",,,,,,,[9,12]
]
,[,,"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}",,,,,,,[9]
]
,[,,"7[35-9]\\d{7}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"90[016]\\d{6}",,,,,,,[9]
]
,[,,"84[0248]\\d{6}",,,,,,,[9]
]
,[,,"878\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,"CH",41,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"]
,"0$1"]
]
,,[,,"74[0248]\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"5[18]\\d{7}",,,,,,,[9]
]
,,,[,,"860\\d{9}",,,,,,,[12]
]
]
,"CI":[,[,,"[02-9]\\d{7}",,,,,,,[8]
]
,[,,"(?:2(?:0[023]|1[02357]|[23][045]|4[03-5])|3(?:0[06]|1[069]|[2-4][07]|5[09]|6[08]))\\d{5}"]
,[,,"(?:2[0-3]80|97[0-3]\\d)\\d{4}|(?:0[1-9]|[457]\\d|6[014-9]|8[4-9]|95)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CI",225,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 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[0235-9]\\d|4[0-24-9])|2(?:[0-79]\\d|8[0-46-9]))))\\d{4}|(?:22|3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|8[1-9]|9[2458])\\d{7}",,,,,,,[9]
]
,[,,"(?:123|8)00\\d{6}",,,,,,,[9,11]
]
,[,,,,,,,,,[-1]
]
,[,,"600\\d{7,8}",,,,,,,[10,11]
]
,[,,,,,,,,,[-1]
]
,[,,"44\\d{7}",,,,,,,[9]
]
,"CL",56,"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0",,,,,,,1,[[,"(\\d{4})","$1",["1(?:[03-589]|21)|[29]0|78"]
]
,[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"]
,"($1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]
]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"]
,"($1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"]
,"($1)"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]
]
]
,[[,"(\\d{5})(\\d{4})","$1 $2",["219","2196"]
,"($1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]
]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-3]"]
,"($1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"]
,"($1)"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"600\\d{7,8}",,,,,,,[10,11]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CM":[,[,,"(?:[26]\\d\\d|88)\\d{6}",,,,,,,[8,9]
]
,[,,"2(?:22|33)\\d{6}",,,,,,,[9]
]
,[,,"(?:24[23]|6[5-9]\\d)\\d{6}",,,,,,,[9]
]
,[,,"88\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CM",237,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CN":[,[,,"1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",,,,,,,[7,8,9,10,11,12]
,[5,6]
]
,[,,"(?:10(?:[02-79]\\d\\d|[18](?:0[1-9]|[1-9]\\d))|21(?:[18](?:0[1-9]|[1-9]\\d)|[2-79]\\d\\d))\\d{5}|(?:43[35]|754)\\d{7,8}|8(?:078\\d{7}|51\\d{7,8})|(?:10|(?:2|85)1|43[35]|754)(?:100\\d\\d|95\\d{3,4})|(?:2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:[39]1|5[57]|6[09])|8(?:71|98))(?:[02-8]\\d{7}|1(?:0(?:0\\d\\d(?:\\d{3})?|[1-9]\\d{5})|[1-9]\\d{6})|9(?:[0-46-9]\\d{6}|5\\d{3}(?:\\d(?:\\d{2})?)?))|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[46-9]|5[2-9]|6[47-9]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-3689]|6[2368]|9[02-9])|8(?:1[236-8]|2[5-7]|3\\d|5[2-9]|7[02-9]|8[36-8]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]\\d{6}|1(?:0(?:0\\d\\d(?:\\d{2})?|[1-9]\\d{4})|[1-9]\\d{5})|9(?:[0-46-9]\\d{5}|5\\d{3,5}))",,,,,,,[7,8,9,10,11]
,[5,6]
]
,[,,"1740[0-5]\\d{6}|1(?:[38]\\d|4[57]|5[0-35-9]|6[25-7]|7[0-35-8]|9[0135-9])\\d{8}",,,,,,,[11]
]
,[,,"(?:(?:10|21)8|8)00\\d{7}",,,,,,,[10,12]
]
,[,,"16[08]\\d{5}",,,,,,,[8]
]
,[,,"400\\d{7}|950\\d{7,8}|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}",,,,,,,[7,8,9,10,11]
,[5,6]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CN",86,"00|1(?:[12]\\d|79)\\d\\d00","0",,,"0|(1(?:[12]\\d|79)\\d\\d)",,"00",,[[,"(\\d{5,6})","$1",["96"]
]
,[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["[1-9]","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["16[08]"]
]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[1-9]","1[1-9]|26|[3-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])","26|3(?:[0268]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|50|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9])|(?:34|85[23])[0-8]|(?:1|58)[1-9]|(?:63|95)[06-9]|(?:33|85[23]9)[0-46-9]|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[0-8]|9[0-47-9])","26|3(?:[0268]|3[0-46-9]|4[0-8]|9[079])|4(?:[049]|2[02-68]|[35]0|6[0-356]|8[014-9])|5(?:0|2[0-24-689]|4[0-2457-9]|6[057-9]|90)|6(?:[0-24578]|3[06-9]|6[14-79]|9[03-9])|7(?:0[02-9]|2[0135-79]|3[23]|4[0-27-9]|6[1457]|8)|8(?:[046]|1[01459]|2[0-489]|5(?:0|[23](?:[02-8]|1[1-9]|9[0-46-9]))|8[0-2459]|9[09])|9(?:0[0457]|1[08]|[268]|4[024-9]|5[06-9])|(?:1|58|85[23]10)[1-9]|(?:10|2[0-57-9])(?:[0-8]|9[0-47-9])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:[02-8]|1(?:0[1-9]|[1-9])|9[0-47-9])"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"]
,"0$1",,1]
]
,[[,"(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","(?:10|2[0-57-9])(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"]
,"0$1","$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["9"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"]
,"0$1","$CC $1",1]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"]
,"0$1",,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"(?:(?:10|21)8|[48])00\\d{7}|950\\d{7,8}",,,,,,,[10,11,12]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CO":[,[,,"(?:1\\d|3)\\d{9}|[124-8]\\d{7}",,,,,,,[8,10,11]
,[7]
]
,[,,"[124-8][2-9]\\d{6}",,,,,,,[8]
,[7]
]
,[,,"3333(?:0(?:0\\d|1[0-5])|[4-9]\\d\\d)\\d{3}|33(?:00|3[0-24-9])\\d{6}|3(?:0[0-5]|1\\d|2[0-3]|5[01]|70)\\d{7}",,,,,,,[10]
]
,[,,"1800\\d{7}",,,,,,,[11]
]
,[,,"19(?:0[01]|4[78])\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CO",57,"00(?:4(?:[14]4|56)|[579])","0",,,"0([3579]|4(?:[14]4|56))?",,,,[[,"(\\d)(\\d{7})","$1 $2",["[14][2-9]|[25-8]"]
,"($1)","0$CC $1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,,"0$CC $1"]
,[,"(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"]
,"0$1"]
]
,[[,"(\\d)(\\d{7})","$1 $2",["[14][2-9]|[25-8]"]
,"($1)","0$CC $1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,,"0$CC $1"]
,[,"(\\d)(\\d{3})(\\d{7})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CR":[,[,,"(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",,,,,,,[8,10]
]
,[,,"210[7-9]\\d{4}|2(?:[024-7]\\d|1[1-9])\\d{5}",,,,,,,[8]
]
,[,,"(?:3005\\d|6500[01])\\d{3}|(?:5[07]|6[0-4]|7[0-3]|8[3-9])\\d{6}",,,,,,,[8]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,"90[059]\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:210[0-6]|4\\d{3}|5100)\\d{4}",,,,,,,[8]
]
,"CR",506,"00",,,,"(19(?:0[0-2468]|1[09]|20|66|77|99))",,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CU":[,[,,"[27]\\d{6,7}|[34]\\d{5,7}|(?:5|8\\d\\d)\\d{7}",,,,,,,[6,7,8,10]
,[4,5]
]
,[,,"(?:3[23]|48)\\d{4,6}|(?:31|4[36]|8(?:0[25]|78)\\d)\\d{6}|(?:2[1-4]|4[1257]|7\\d)\\d{5,6}",,,,,,,,[4,5]
]
,[,,"5\\d{7}",,,,,,,[8]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"807\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"CU",53,"119","0",,,"0",,,,[[,"(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"]
,"(0$1)"]
,[,"(\\d)(\\d{6,7})","$1 $2",["7"]
,"(0$1)"]
,[,"(\\d)(\\d{7})","$1 $2",["5"]
,"0$1"]
,[,"(\\d{3})(\\d{7})","$1 $2",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,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00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",,,,,,,[9]
,[8]
]
,[,,"483[0-3]\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[06-9]|7[02-9]|8[0-2457-9]|9[0-27-9])\\d{6}",,,,,,,[9]
]
,[,,"180(?:0\\d{3}|2)\\d{3}",,,,,,,[7,10]
]
,[,,"190[0-26]\\d{6}",,,,,,,[10]
]
,[,,"13(?:00\\d{3}|45[0-4])\\d{3}|13\\d{4}",,,,,,,[6,8,10]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:14(?:5(?:1[0458]|[23][458])|71\\d)|550\\d\\d)\\d{4}",,,,,,,[9]
]
,"CX",61,"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","0",,,"0|([59]\\d{7})$","8$1","0011",,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"CY":[,[,,"(?:[279]\\d|[58]0)\\d{6}",,,,,,,[8]
]
,[,,"2[2-6]\\d{6}"]
,[,,"9[4-79]\\d{6}"]
,[,,"800\\d{5}"]
,[,,"90[09]\\d{5}"]
,[,,"80[1-9]\\d{5}"]
,[,,"700\\d{5}"]
,[,,,,,,,,,[-1]
]
,"CY",357,"00",,,,,,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[257-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:50|77)\\d{6}"]
,,,[,,,,,,,,,[-1]
]
]
,"CZ":[,[,,"(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",,,,,,,[9,10,11,12]
]
,[,,"(?:2\\d|3[1257-9]|4[16-9]|5[13-9])\\d{7}",,,,,,,[9]
]
,[,,"(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"9(?:0[05689]|76)\\d{6}",,,,,,,[9]
]
,[,,"8[134]\\d{7}",,,,,,,[9]
]
,[,,"70[01]\\d{6}",,,,,,,[9]
]
,[,,"9[17]0\\d{6}",,,,,,,[9]
]
,"CZ",420,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"9(?:5\\d|7[2-4])\\d{6}",,,,,,,[9]
]
,,,[,,"9(?:3\\d{9}|6\\d{7,10})"]
]
,"DE":[,[,,"[2579]\\d{5,14}|49(?:[05]\\d{10}|[46][1-8]\\d{4,9})|49(?:[0-25]\\d|3[1-689]|7[1-7])\\d{4,8}|49(?:[0-2579]\\d|[34][1-9]|6[0-8])\\d{3}|49\\d{3,4}|(?:1|[368]\\d|4[0-8])\\d{3,13}",,,,,,,[4,5,6,7,8,9,10,11,12,13,14,15]
,[2,3]
]
,[,,"(?:32|49[4-6]\\d)\\d{9}|49[0-7]\\d{3,9}|(?:[34]0|[68]9)\\d{3,13}|(?:2(?:0[1-689]|[1-3569]\\d|4[0-8]|7[1-7]|8[0-7])|3(?:[3569]\\d|4[0-79]|7[1-7]|8[1-8])|4(?:1[02-9]|[2-48]\\d|5[0-6]|6[0-8]|7[0-79])|5(?:0[2-8]|[124-6]\\d|[38][0-8]|[79][0-7])|6(?:0[02-9]|[1-358]\\d|[47][0-8]|6[1-9])|7(?:0[2-8]|1[1-9]|[27][0-7]|3\\d|[4-6][0-8]|8[0-5]|9[013-7])|8(?:0[2-9]|1[0-79]|2\\d|3[0-46-9]|4[0-6]|5[013-9]|6[1-8]|7[0-8]|8[0-24-6])|9(?:0[6-9]|[1-4]\\d|[589][0-7]|6[0-8]|7[0-467]))\\d{3,12}",,,,,,,[5,6,7,8,9,10,11,12,13,14,15]
,[2,3,4]
]
,[,,"15[0-25-9]\\d{8}|1(?:6[023]|7\\d)\\d{7,8}",,,,,,,[10,11]
]
,[,,"800\\d{7,12}",,,,,,,[10,11,12,13,14,15]
]
,[,,"(?:137[7-9]|900(?:[135]|9\\d))\\d{6}",,,,,,,[10,11]
]
,[,,"180\\d{5,11}|13(?:7[1-6]\\d\\d|8)\\d{4}",,,,,,,[7,8,9,10,11,12,13,14]
]
,[,,"700\\d{8}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,"DE",49,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"]
,"0$1"]
,[,"(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"]
,"0$1"]
,[,"(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["138"]
,"0$1"]
,[,"(\\d{5})(\\d{2,10})","$1 $2",["3"]
,"0$1"]
,[,"(\\d{3})(\\d{5,11})","$1 $2",["181"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"]
,"0$1"]
,[,"(\\d{3})(\\d{7,8})","$1 $2",["1[67]"]
,"0$1"]
,[,"(\\d{3})(\\d{7,12})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{4})(\\d{7})","$1 $2",["18[68]"]
,"0$1"]
,[,"(\\d{5})(\\d{6})","$1 $2",["15[0568]"]
,"0$1"]
,[,"(\\d{4})(\\d{7})","$1 $2",["15[1279]"]
,"0$1"]
,[,"(\\d{3})(\\d{8})","$1 $2",["18"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"]
,"0$1"]
]
,,[,,"16(?:4\\d{1,10}|[89]\\d{1,11})",,,,,,,[4,5,6,7,8,9,10,11,12,13,14]
]
,,,[,,,,,,,,,[-1]
]
,[,,"18(?:1\\d{5,11}|[2-9]\\d{8})",,,,,,,[8,9,10,11,12,13,14]
]
,,,[,,"1(?:6(?:013|255|399)|7(?:(?:[015]1|[69]3)3|[2-4]55|[78]99))\\d{7,8}|15(?:(?:[03-68]00|113)\\d|2\\d55|7\\d99|9\\d33)\\d{7}",,,,,,,[12,13]
]
]
,"DJ":[,[,,"(?:2\\d|77)\\d{6}",,,,,,,[8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d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"DM",1,"011","1",,,"1|([2-7]\\d{6})$","767$1",,,,,[,,,,,,,,,[-1]
]
,,"767",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DO":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}",,,,,,,,[7]
]
,[,,"8[024]9[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"DO",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]
]
,,"8[024]9",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"DZ":[,[,,"(?:[1-4]|[5-79]\\d|80)\\d{7}",,,,,,,[8,9]
]
,[,,"9619\\d{5}|(?:1\\d|2[013-79]|3[0-8]|4[0135689])\\d{6}"]
,[,,"(?:5(?:4[0-29]|5\\d|6[01])|6(?:[569]\\d|7[0-6])|7[7-9]\\d)\\d{6}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"80[3-689]1\\d{5}",,,,,,,[9]
]
,[,,"80[12]1\\d{5}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"98[23]\\d{6}",,,,,,,[9]
]
,"DZ",213,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EC":[,[,,"1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",,,,,,,[8,9,10,11]
,[7]
]
,[,,"[2-7][2-7]\\d{6}",,,,,,,[8]
,[7]
]
,[,,"964[0-2]\\d{5}|9(?:39|[57][89]|6[0-36-9]|[89]\\d)\\d{6}",,,,,,,[9]
]
,[,,"1800\\d{7}|1[78]00\\d{6}",,,,,,,[10,11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"[2-7]890\\d{4}",,,,,,,[8]
]
,"EC",593,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-7]"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]
]
]
,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-7]"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EE":[,[,,"8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",,,,,,,[7,8,10]
]
,[,,"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}",,,,,,,[7]
]
,[,,"5(?:[0-35-9]\\d{6}|4(?:[0-57-9]\\d{5}|6(?:[0-24-9]\\d{4}|3(?:[0-35-9]\\d{3}|4000))))|8(?:1(?:0(?:000|[3-9]\\d\\d)|(?:1(?:0[236]|1\\d)|(?:23|[3-79]\\d)\\d)\\d)|2(?:0(?:000|(?:19|[24-7]\\d)\\d)|(?:(?:[124-6]\\d|3[5-9]|8[2-4])\\d|7(?:[679]\\d|8[13-9]))\\d)|[349]\\d{4})\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}",,,,,,,[7,8]
]
,[,,"800(?:(?:0\\d\\d|1)\\d|[2-9])\\d{3}"]
,[,,"(?:40\\d\\d|900)\\d{4}",,,,,,,[7,8]
]
,[,,,,,,,,,[-1]
]
,[,,"70[0-2]\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,"EE",372,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]
]
,[,"(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]
]
,[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"800[2-9]\\d{3}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EG":[,[,,"[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"13[23]\\d{6}|(?:15|57)\\d{6,7}|(?:2[2-4]|3|4[05-8]|5[05]|6[24-689]|8[2468]|9[235-7])\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"1[0-25]\\d{8}",,,,,,,[10]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,"900\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"EG",20,"00","0",,,"0",,,,[[,"(\\d)(\\d{7,8})","$1 $2",["[23]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[189]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"EH":[,[,,"[5-8]\\d{8}",,,,,,,[9]
]
,[,,"528[89]\\d{5}"]
,[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:0[016-8]|6[1267]|7[0-27]))\\d{6}"]
,[,,"80\\d{7}"]
,[,,"89\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:4[0-2]|93)\\d{4}"]
,"EH",212,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,"528[89]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ER":[,[,,"[178]\\d{6}",,,,,,,[7]
,[6]
]
,[,,"(?:1(?:1[12568]|[24]0|55|6[146])|8\\d\\d)\\d{4}",,,,,,,,[6]
]
,[,,"(?:17[1-3]|7\\d\\d)\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ER",291,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ES":[,[,,"(?:51|[6-9]\\d)\\d{7}",,,,,,,[9]
]
,[,,"96906(?:0[0-8]|1[1-9]|[2-9]\\d)\\d\\d|9(?:69(?:0[0-57-9]|[1-9]\\d)|73(?:[0-8]\\d|9[1-9]))\\d{4}|(?:8(?:[1356]\\d|[28][0-8]|[47][1-9])|9(?:[135]\\d|[268][0-8]|4[1-9]|7[124-9]))\\d{6}"]
,[,,"9(?:6906(?:09|10)|7390\\d\\d)\\d\\d|(?:6\\d|7[1-48])\\d{7}"]
,[,,"[89]00\\d{6}"]
,[,,"80[367]\\d{6}"]
,[,,"90[12]\\d{6}"]
,[,,"70\\d{7}"]
,[,,,,,,,,,[-1]
]
,"ES",34,"00",,,,,,,,[[,"(\\d{4})","$1",["905"]
]
,[,"(\\d{6})","$1",["[79]9"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]
]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"51\\d{7}"]
,,,[,,,,,,,,,[-1]
]
]
,"ET":[,[,,"(?:11|[2-59]\\d)\\d{7}",,,,,,,[9]
,[7]
]
,[,,"116671\\d{3}|(?:11(?:1(?:1[124]|2[2-57]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8])|5(?:1[578]|44|5[0-4])|6(?:1[78]|2[69]|39|4[5-7]|5[1-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|(?:22|55)[0-6]|33[0134689]|44[04]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:119|22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:(?:11|22)[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}",,,,,,,,[7]
]
,[,,"9\\d{8}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ET",251,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-59]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FI":[,[,,"[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",,,,,,,[5,6,7,8,9,10,11,12]
]
,[,,"(?:1[3-79][1-8]|[235689][1-8]\\d)\\d{2,6}",,,,,,,[5,6,7,8,9]
]
,[,,"(?:4[0-8]|50)\\d{4,8}",,,,,,,[6,7,8,9,10]
]
,[,,"800\\d{4,6}",,,,,,,[7,8,9]
]
,[,,"[67]00\\d{5,6}",,,,,,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"FI",358,"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","0",,,"0",,"00",,[[,"(\\d{5})","$1",["75[12]"]
,"0$1"]
,[,"(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"]
,"0$1"]
,[,"(\\d{6})","$1",["11"]
]
,[,"(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,10})","$1 $2",["7"]
,"0$1"]
]
,[[,"(\\d)(\\d{4,9})","$1 $2",["[2568][1-8]|3(?:0[1-9]|[1-9])|9"]
,"0$1"]
,[,"(\\d{3})(\\d{3,7})","$1 $2",["[12]00|[368]|70[07-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{4,8})","$1 $2",["[1245]|7[135]"]
,"0$1"]
,[,"(\\d{2})(\\d{6,10})","$1 $2",["7"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,1,"1[03-79]|[2-9]",[,,"20(?:2[023]|9[89])\\d{1,6}|(?:60[12]\\d|7099)\\d{4,5}|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:[1-3]00|7(?:0[1-5]\\d\\d|5[03-9]))\\d{3,7}"]
,[,,"20\\d{4,8}|60[12]\\d{5,6}|7(?:099\\d{4,5}|5[03-9]\\d{3,7})|20[2-59]\\d\\d|(?:606|7(?:0[78]|1|3\\d))\\d{7}|(?:10|29|3[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,,,,[-1]
]
,"FM",691,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[389]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FO":[,[,,"(?:[2-8]\\d|90)\\d{4}",,,,,,,[6]
]
,[,,"(?:20|[34]\\d|8[19])\\d{4}"]
,[,,"(?:[27][1-9]|5\\d)\\d{4}"]
,[,,"80[257-9]\\d{3}"]
,[,,"90(?:[13-5][15-7]|2[125-7]|9\\d)\\d\\d"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:6[0-36]|88)\\d{4}"]
,"FO",298,"00",,,,"(10(?:01|[12]0|88))",,,,[[,"(\\d{6})","$1",["[2-9]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"FR":[,[,,"[1-9]\\d{8}",,,,,,,[9]
]
,[,,"(?:[1-35]\\d|4[1-9])\\d{7}"]
,[,,"700\\d{6}|(?:6\\d|7[3-9])\\d{7}"]
,[,,"80[0-5]\\d{6}"]
,[,,"836(?:0[0-36-9]|[1-9]\\d)\\d{4}|8(?:1[2-9]|2[2-47-9]|3[0-57-9]|[569]\\d|8[0-35-9])\\d{6}"]
,[,,"8(?:1[01]|2[0156]|84)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"9\\d{8}"]
,"FR",33,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["10"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
,"0 $1"]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
,"0 $1"]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"80[6-9]\\d{6}"]
,,,[,,,,,,,,,[-1]
]
]
,"GA":[,[,,"(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",,,,,,,[7,8]
]
,[,,"[01]1\\d{6}",,,,,,,[8]
]
,[,,"(?:0[2-7]|6[256]|7[47])\\d{6}|[2-7]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GA",241,"00",,,,"0(11\\d{6}|6[256]\\d{6}|7[47]\\d{6})","$1",,,[[,"(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GB":[,[,,"[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",,,,,,,[7,9,10]
,[4,5,6,8]
]
,[,,"(?:1(?:1(?:3(?:[0-58]\\d\\d|73[03])|(?:4[0-5]|5[0-26-9]|6[0-4]|[78][0-49])\\d\\d)|2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d\\d|1(?:[0-7]\\d\\d|8(?:0\\d|20)))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",,,,,,,[9,10]
,[4,5,6,7,8]
]
,[,,"7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",,,,,,,[10]
]
,[,,"80[08]\\d{7}|800\\d{6}|8001111"]
,[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",,,,,,,[7,10]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}",,,,,,,[10]
]
,[,,"56\\d{8}",,,,,,,[10]
]
,"GB",44,"00","0"," x",,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"]
,"0$1"]
,[,"(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"]
,"0$1"]
,[,"(\\d{4})(\\d{6})","$1 $2",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"]
,"0$1"]
]
,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,,,,[10]
]
,1,,[,,,,,,,,,[-1]
]
,[,,"(?:3[0347]|55)\\d{8}",,,,,,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"GD":[,[,,"(?:473|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}",,,,,,,,[7]
]
,[,,"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|58)|5(?:2[01]|3[3-8])|901)\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"GD",1,"011","1",,,"1|([2-9]\\d{6})$","473$1",,,,,[,,,,,,,,,[-1]
]
,,"473",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GE":[,[,,"(?:[3-57]\\d\\d|800)\\d{6}",,,,,,,[9]
,[6,7]
]
,[,,"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}",,,,,,,,[6,7]
]
,[,,"5(?:0555[5-9]|757(?:7[7-9]|8[01]))\\d{3}|5(?:000\\d|(?:52|75)00|8(?:58[89]|888))\\d{4}|5(?:0050|1111|2222|3333)[0-4]\\d{3}|(?:5(?:[14]4|5[0157-9]|68|7[0147-9]|9[1-35-9])|790)\\d{6}"]
,[,,"800\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"706\\d{6}"]
,"GE",995,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"706\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GF":[,[,,"(?:[56]94|976)\\d{6}",,,,,,,[9]
]
,[,,"594(?:[023]\\d|1[01]|4[03-9]|5[6-9]|6[0-3]|80|9[014])\\d{4}"]
,[,,"694(?:[0-249]\\d|3[0-48])\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976\\d{6}"]
,"GF",594,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GG":[,[,,"(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",,,,,,,[7,9,10]
,[6]
]
,[,,"1481[25-9]\\d{5}",,,,,,,[10]
,[6]
]
,[,,"7(?:(?:781|839)\\d|911[17])\\d{5}",,,,,,,[10]
]
,[,,"80[08]\\d{7}|800\\d{6}|8001111"]
,[,,"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",,,,,,,[7,10]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}",,,,,,,[10]
]
,[,,"56\\d{8}",,,,,,,[10]
]
,"GG",44,"00","0",,,"0|([25-9]\\d{5})$","1481$1",,,,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}",,,,,,,[10]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3[0347]|55)\\d{8}",,,,,,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"GH":[,[,,"(?:[235]\\d{3}|800)\\d{5}",,,,,,,[8,9]
,[7]
]
,[,,"3(?:[167]2[0-6]|22[0-5]|32[0-3]|4(?:2[013-9]|3[01])|52[0-7]|82[0-2])\\d{5}|3(?:[0-8]8|9[28])0\\d{5}|3(?:0[237]|[1-9]7)\\d{6}",,,,,,,[9]
,[7]
]
,[,,"(?:2[0346-8]\\d|5(?:[0457]\\d|6[01]|9[1-6]))\\d{6}",,,,,,,[9]
]
,[,,"800\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GH",233,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[237]|80"]
]
,[,"(\\d{3})(\\d{5})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{5})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"800\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GI":[,[,,"[256]\\d{7}",,,,,,,[8]
]
,[,,"21(?:6[24-7]\\d|90[0-2])\\d{3}|2(?:00|2[25])\\d{5}"]
,[,,"(?:5[146-8]\\d|6(?:06|29))\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GI",350,"00",,,,,,,,[[,"(\\d{3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[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"722\\d{6}",,,,,,,[9]
]
,"GN",224,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GP":[,[,,"(?:590|69\\d|976)\\d{6}",,,,,,,[9]
]
,[,,"590(?:0[1-68]|1[0-2]|2[0-68]|3[1289]|4[0-24-9]|5[3-579]|6[0189]|7[08]|8[0-689]|9\\d)\\d{4}"]
,[,,"69(?:0\\d\\d|1(?:2[29]|3[0-5]))\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976[01]\\d{5}"]
,"GP",590,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GQ":[,[,,"222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",,,,,,,[9]
]
,[,,"33[0-24-9]\\d[46]\\d{4}|3(?:33|5\\d)\\d[7-9]\\d{4}"]
,[,,"(?:222|55[015])\\d{6}"]
,[,,"80\\d[1-9]\\d{5}"]
,[,,"90\\d[1-9]\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GQ",240,"00",,,,,,,,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]
]
,[,"(\\d{3})(\\d{6})","$1 $2",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GR":[,[,,"5005000\\d{3}|(?:[2689]\\d|70)\\d{8}",,,,,,,[10]
]
,[,,"2(?:1\\d\\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}"]
,[,,"68[57-9]\\d{7}|(?:69|94)\\d{8}"]
,[,,"800\\d{7}"]
,[,,"90[19]\\d{7}"]
,[,,"8(?:0[16]|12|25)\\d{7}"]
,[,,"70\\d{8}"]
,[,,,,,,,,,[-1]
]
,"GR",30,"00",,,,,,,,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"5005000\\d{3}"]
,,,[,,,,,,,,,[-1]
]
]
,"GT":[,[,,"(?:1\\d{3}|[2-7])\\d{7}",,,,,,,[8,11]
]
,[,,"[267][2-9]\\d{6}",,,,,,,[8]
]
,[,,"[3-5]\\d{7}",,,,,,,[8]
]
,[,,"18[01]\\d{8}",,,,,,,[11]
]
,[,,"19\\d{9}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"GT",502,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"GU":[,[,,"(?:[58]\\d\\d|671|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,,,,,[7]
]
,[,,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"GU",1,"011","1",,,"1|([3-9]\\d{6})$","671$1",,1,,,[,,,,,,,,,[-1]
]
,,"671",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-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,,,,,,[8]
]
,[,,"(?:46(?:[01][0-6]|4[0-57-9])|5730|(?:626|848)[01]|707[1-5]|929[03-9])\\d{4}|(?:5(?:[1-59][0-46-9]|6[0-4689]|7[0-2469])|6(?:0[1-9]|[13-59]\\d|[268][0-57-9]|7[0-79])|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}",,,,,,,[8]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"900(?:[0-24-9]\\d{7}|3\\d{1,4})",,,,,,,[5,6,7,8,11]
]
,[,,,,,,,,,[-1]
]
,[,,"8(?:1[0-4679]\\d|2(?:[0-36]\\d|7[0-4])|3(?:[034]\\d|2[09]|70))\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,"HK",852,"00(?:30|5[09]|[126-9]?)",,,,,,"00",,[[,"(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]
]
]
,,[,,"7(?:1(?:0[0-38]|1[0-3679]|3[013]|69|9[0136])|2(?:[02389]\\d|1[18]|7[27-9])|3(?:[0-38]\\d|7[0-369]|9[2357-9])|47\\d|5(?:[178]\\d|5[0-5])|6(?:0[0-7]|2[236-9]|[35]\\d)|7(?:[27]\\d|8[7-9])|8(?:[23689]\\d|7[1-9])|9(?:[025]\\d|6[0-246-8]|7[0-36-9]|8[238]))\\d{4}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
,[,,"30(?:0[1-9]|[15-7]\\d|2[047]|89)\\d{4}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"HN":[,[,,"8\\d{10}|[237-9]\\d{7}",,,,,,,[8,11]
]
,[,,"2(?:2(?:0[0139]|1[1-36]|[23]\\d|4[04-6]|5[57]|6[24]|7[0135689]|8[01346-9]|9[0-2])|4(?:07|2[3-59]|3[13-689]|4[0-68]|5[1-35])|5(?:0[78]|16|4[03-5]|5\\d|6[014-6]|74|80)|6(?:[056]\\d|17|2[07]|3[04]|4[0-378]|[78][0-8]|9[01])|7(?:6[46-9]|7[02-9]|8[034]|91)|8(?:79|8[0-357-9]|9[1-57-9]))\\d{4}",,,,,,,[8]
]
,[,,"[37-9]\\d{7}",,,,,,,[8]
]
,[,,"8002\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"HN",504,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["8"]
]
]
,[[,"(\\d{4})(\\d{4})","$1-$2",["[237-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"8002\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"HR":[,[,,"(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",,,,,,,[6,7,8,9]
]
,[,,"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}",,,,,,,[8,9]
,[6,7]
]
,[,,"9(?:751\\d{5}|8\\d{6,7})|9(?:0[1-9]|[1259]\\d|7[0679])\\d{6}",,,,,,,[8,9]
]
,[,,"80[01]\\d{4,6}",,,,,,,[7,8,9]
]
,[,,"6[01459]\\d{6}|6[01]\\d{4,5}",,,,,,,[6,7,8]
]
,[,,,,,,,,,[-1]
]
,[,,"7[45]\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,"HR",385,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"]
,"0$1"]
,[,"(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,,[9]
]
,"HU",36,"00","06",,,"06",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"(06 $1)"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"]
,"(06 $1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57-9]"]
,"06 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"[48]0\\d{6}",,,,,,,[8]
]
,[,,"38\\d{7}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"ID":[,[,,"(?:(?:007803|8\\d{4})\\d|[1-36])\\d{6}|[1-9]\\d{8,10}|[2-9]\\d{7}",,,,,,,[7,8,9,10,11,12,13]
,[5,6]
]
,[,,"2[124]\\d{7,8}|619\\d{8}|2(?:1(?:14|500)|2\\d{3})\\d{3}|61\\d{5,8}|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}",,,,,,,[7,8,9,10,11]
,[5,6]
]
,[,,"8[1-35-9]\\d{7,10}",,,,,,,[9,10,11,12]
]
,[,,"007803\\d{7}|(?:177\\d|800)\\d{5,7}",,,,,,,[8,9,10,11,13]
]
,[,,"809\\d{7}",,,,,,,[10]
]
,[,,"804\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ID",62,"00[189]","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]
]
,[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,7})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{6,8})","$1 $2",["1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
]
,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]
]
,[,"(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,7})","$1 $2",["800"]
,"0$1"]
,[,"(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{6,8})","$1 $2",["1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"(?:007803\\d|8071)\\d{6}",,,,,,,[10,13]
]
,[,,"(?:1500|8071\\d{3})\\d{3}",,,,,,,[7,10]
]
,,,[,,,,,,,,,[-1]
]
]
,"IE":[,[,,"(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",,,,,,,[7,8,9,10]
,[5,6]
]
,[,,"(?:1\\d|21)\\d{6,7}|(?:2[24-9]|4(?:0[24]|5\\d|7)|5(?:0[45]|1\\d|8)|6(?:1\\d|[237-9])|9(?:1\\d|[35-9]))\\d{5}|(?:23|4(?:[1-469]|8\\d)|5[23679]|6[4-6]|7[14]|9[04])\\d{7}",,,,,,,,[5,6]
]
,[,,"8(?:22|[35-9]\\d)\\d{6}",,,,,,,[9]
]
,[,,"1800\\d{6}",,,,,,,[10]
]
,[,,"15(?:1[2-8]|[2-8]0|9[089])\\d{6}",,,,,,,[10]
]
,[,,"18[59]0\\d{6}",,,,,,,[10]
]
,[,,"700\\d{6}",,,,,,,[9]
]
,[,,"76\\d{7}",,,,,,,[9]
]
,"IE",353,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5})","$1 $2",["[45]0"]
,"(0$1)"]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"]
,"(0$1)"]
,[,"(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"18[59]0\\d{6}",,,,,,,[10]
]
,[,,"818\\d{6}",,,,,,,[9]
]
,,,[,,"88210[1-9]\\d{4}|8(?:[35-79]5\\d\\d|8(?:[013-9]\\d\\d|2(?:[01][1-9]|[2-9]\\d)))\\d{5}",,,,,,,[10]
]
]
,"IL":[,[,,"1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",,,,,,,[7,8,9,10,11,12]
]
,[,,"153\\d{8,9}|29[1-9]\\d{5}|(?:2[0-8]|[3489]\\d)\\d{6}",,,,,,,[8,11,12]
,[7]
]
,[,,"5(?:(?:[02368]\\d|[19][2-9]|4[1-9])\\d|5(?:01|1[79]|2[2-8]|3[23]|44|5[05689]|6[6-8]|7[0-267]|8[7-9]|9[1-9]))\\d{5}",,,,,,,[9]
]
,[,,"1(?:255|80[019]\\d{3})\\d{3}",,,,,,,[7,10]
]
,[,,"1212\\d{4}|1(?:200|9(?:0[01]|19))\\d{6}",,,,,,,[8,10]
]
,[,,"1700\\d{6}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"78(?:33|55|77|81)\\d{5}|7(?:18|2[23]|3[237]|47|6[58]|7\\d|82|9[235-9])\\d{6}",,,,,,,[9]
]
,"IL",972,"0(?:0|1[2-9])","0",,,"0",,,,[[,"(\\d{4})(\\d{3})","$1-$2",["125"]
]
,[,"(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]
]
,[,"(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]
]
,[,"(\\d{4})(\\d{6})","$1-$2",["159"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]
]
,[,"(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"1700\\d{6}",,,,,,,[10]
]
,[,,"1599\\d{6}",,,,,,,[10]
]
,,,[,,"151\\d{8,9}",,,,,,,[11,12]
]
]
,"IM":[,[,,"1624\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10]
,[6]
]
,[,,"1624[5-8]\\d{5}",,,,,,,,[6]
]
,[,,"76245[06]\\d{4}|7(?:4576|[59]24\\d|624[0-4689])\\d{5}"]
,[,,"808162\\d{4}"]
,[,,"8(?:440[49]06|72299\\d)\\d{3}|(?:8(?:45|70)|90[0167])624\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{8}"]
,[,,"56\\d{8}"]
,"IM",44,"00","0",,,"0|([5-8]\\d{5})$","1624$1",,,,,[,,,,,,,,,[-1]
]
,,"74576|(?:16|7[56])24",[,,,,,,,,,[-1]
]
,[,,"3440[49]06\\d{3}|(?:3(?:08162|3\\d{4}|45624|7(?:0624|2299))|55\\d{4})\\d{4}"]
,,,[,,,,,,,,,[-1]
]
]
,"IN":[,[,,"(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",,,,,,,[8,9,10,11,12,13]
,[6,7]
]
,[,,"2717(?:[2-7]\\d|95)\\d{4}|(?:271[0-689]|782[0-6])[2-7]\\d{5}|(?:170[24]|2(?:(?:[02][2-79]|90)\\d|80[13468])|(?:3(?:23|80)|683|79[1-7])\\d|4(?:20[24]|72[2-8])|552[1-7])\\d{6}|(?:11|33|4[04]|80)[2-7]\\d{7}|(?:342|674|788)(?:[0189][2-7]|[2-7]\\d)\\d{5}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[13]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[014-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[3-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1245]|4[5-8]|5[125689]|6[235-7]|7[157-9]|8[2-46-8])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])|7(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|8[013-7]|9[089])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d[2-7]\\d{5}",,,,,,,[10]
,[6,7,8]
]
,[,,"(?:61279|7(?:887[02-9]|9(?:313|79[07-9]))|8(?:079[04-9]|(?:84|91)7[02-8]))\\d{5}|(?:6(?:12|[2-47]1|5[17]|6[13]|80)[0189]|7(?:1(?:2[0189]|9[0-5])|2(?:[14][017-9]|8[0-59])|3(?:2[5-8]|[34][017-9]|9[016-9])|4(?:1[015-9]|[29][89]|39|8[389])|5(?:[15][017-9]|2[04-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589])|70[0289]|88[089]|97[02-8])|8(?:0(?:6[67]|7[02-8])|70[017-9]|84[01489]|91[0-289]))\\d{6}|(?:7(?:31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[0189]\\d|7[02-8])\\d{5}|(?:6(?:[09]\\d|1[04679]|2[03689]|3[05-9]|4[0489]|50|6[069]|7[07]|8[7-9])|7(?:0\\d|2[0235-79]|3[05-8]|40|5[0346-8]|6[6-9]|7[1-9]|8[0-79]|9[089])|8(?:0[01589]|1[0-57-9]|2[235-9]|3[03-57-9]|[45]\\d|6[02457-9]|7[1-69]|8[0-25-9]|9[02-9])|9\\d\\d)\\d{7}|(?:6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|8[124-6])\\d|7(?:[235689]\\d|4[0189]))|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-5])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]|881))[0189]\\d{5}",,,,,,,[10]
]
,[,,"000800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))"]
,[,,"186[12]\\d{9}",,,,,,,[13]
]
,[,,"1860\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IN",91,"00","0",,,"0",,,,[[,"(\\d{7})","$1",["575"]
]
,[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"]
,,,1]
,[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"]
,,,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"]
,"0$1",,1]
,[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
,[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"]
,,,1]
]
,[[,"(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"]
,,,1]
,[,"(\\d{4})(\\d{4,5})","$1 $2",["180","1800"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"]
,,,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"]
,"0$1",,1]
,[,"(\\d{5})(\\d{5})","$1 $2",["[6-9]"]
,"0$1",,1]
,[,"(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"]
,,,1]
,[,"(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"]
,,,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"1(?:600\\d{6}|800\\d{4,9})|(?:000800|18(?:03\\d\\d|6(?:0|[12]\\d\\d)))\\d{7}"]
,[,,"140\\d{7}",,,,,,,[10]
]
,,,[,,,,,,,,,[-1]
]
]
,"IO":[,[,,"3\\d{6}",,,,,,,[7]
]
,[,,"37\\d{5}"]
,[,,"38\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IO",246,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["3"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"IQ":[,[,,"(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}",,,,,,,[8,9]
,[6,7]
]
,[,,"7[3-9]\\d{8}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"IQ",964,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"IR":[,[,,"[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",,,,,,,[4,5,6,7,10]
,[8]
]
,[,,"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])(?:[03-57]\\d{7}|[16]\\d{3}(?:\\d{4})?|[289]\\d{3}(?:\\d(?:\\d{3})?)?)|94(?:000[09]|2(?:121|[2689]0\\d)|30[0-2]\\d|4(?:111|40\\d))\\d{4}",,,,,,,[6,7,10]
,[4,5,8]
]
,[,,"9(?:(?:0(?:[1-35]\\d|44)|(?:[13]\\d|2[0-2])\\d)\\d|9(?:(?:[0-2]\\d|4[45])\\d|5[15]0|8(?:1\\d|88)|9(?:0[013]|1[0134]|21|77|9[6-9])))\\d{5}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"993\\d{7}",,,,,,,[10]
]
,"IR",98,"00","0",,,"0",,,,[[,"(\\d{4,5})","$1",["96"]
,"0$1"]
,[,"(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"9(?:4440\\d{5}|6(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19]))",,,,,,,[4,5,10]
]
,[,,"96(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])",,,,,,,[4,5]
]
,,,[,,,,,,,,,[-1]
]
]
,"IS":[,[,,"(?:38\\d|[4-9])\\d{6}",,,,,,,[7,9]
]
,[,,"(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-245]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-579]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|872)\\d{4}",,,,,,,[7]
]
,[,,"(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[027-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[28]))\\d{4}"]
,[,,"80[08]\\d{4}",,,,,,,[7]
]
,[,,"90(?:0\\d|1[5-79]|2[015-79]|3[135-79]|4[125-7]|5[25-79]|7[1-37]|8[0-35-7])\\d{3}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"49[0-24-79]\\d{4}",,,,,,,[7]
]
,"IS",354,"00|1(?:0(?:01|[12]0)|100)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["[4-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"809\\d{4}",,,,,,,[7]
]
,,,[,,"(?:689|8(?:7[18]|80)|95[48])\\d{4}",,,,,,,[7]
]
]
,"IT":[,[,,"0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",,,,,,,[6,7,8,9,10,11,12]
]
,[,,"0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",,,,,,,[6,7,8,9,10,11]
]
,[,,"3[1-9]\\d{8}|3[2-9]\\d{7}",,,,,,,[9,10]
]
,[,,"80(?:0\\d{3}|3)\\d{3}",,,,,,,[6,9]
]
,[,,"(?:0878\\d\\d|89(?:2|4[5-9]\\d))\\d{3}|89[45][0-4]\\d\\d|(?:1(?:44|6[346])|89(?:5[5-9]|9))\\d{6}",,,,,,,[6,8,9,10]
]
,[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,,,,[6,9]
]
,[,,"1(?:78\\d|99)\\d{6}",,,,,,,[9,10]
]
,[,,"55\\d{8}",,,,,,,[10]
]
,"IT",39,"00",,,,,,,,[[,"(\\d{4,5})","$1",["1(?:0|9[246])","1(?:0|9(?:2[2-9]|[46]))"]
]
,[,"(\\d{6})","$1",["1(?:1|92)"]
]
,[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]
]
,[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]
]
,[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["894"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1[4679]|[38]"]
]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]
]
,[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]
]
]
,[[,"(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]
]
,[,"(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[245])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]
]
,[,"(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["894"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]
]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1[4679]|[38]"]
]
,[,"(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]"]
]
,[,"(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]
]
]
,[,,,,,,,,,[-1]
]
,1,,[,,"848\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,,,[,,"3[2-8]\\d{9,10}",,,,,,,[11,12]
]
]
,"JE":[,[,,"1534\\d{6}|(?:[3578]\\d|90)\\d{8}",,,,,,,[10]
,[6]
]
,[,,"1534[0-24-8]\\d{5}",,,,,,,,[6]
]
,[,,"7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97[7-9]))\\d{5}"]
,[,,"80(?:07(?:35|81)|8901)\\d{4}"]
,[,,"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,"701511\\d{4}"]
,[,,"56\\d{8}"]
,"JE",44,"00","0",,,"0|([0-24-8]\\d{5})$","1534$1",,,,,[,,"76(?:0[0-2]|2[356]|34|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}"]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"]
,,,[,,,,,,,,,[-1]
]
]
,"JM":[,[,,"(?:[58]\\d\\d|658|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:5(?:02|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[0237-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}",,,,,,,,[7]
]
,[,,"(?:658295|876(?:(?:2[14-9]|[348]\\d)\\d|5(?:0[13-9]|1[579]|[2-57-9]\\d|6[0-24-9])|6(?:4[89]|6[67])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579])))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"JM",1,"011","1",,,"1",,,,,,[,,,,,,,,,[-1]
]
,,"658|876",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"JO":[,[,,"(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",,,,,,,[8,9]
]
,[,,"87(?:000|90[01])\\d{3}|(?:2(?:6(?:2[0-35-9]|3[0-578]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[5-7][023])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2(?:[05]0|22)|3(?:00|33)|4(?:0[0-25]|1[2-467]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[178]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[0239]))|87(?:20|7[078]|99))\\d{4}",,,,,,,[8]
]
,[,,"7(?:[78][0-25-9]|9\\d)\\d{6}",,,,,,,[9]
]
,[,,"80\\d{6}",,,,,,,[8]
]
,[,,"9\\d{7}",,,,,,,[8]
]
,[,,"85\\d{6}",,,,,,,[8]
]
,[,,"70\\d{7}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,"JO",962,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"]
,"(0$1)"]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["70"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,"74(?:66|77)\\d{5}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"8(?:10|8\\d)\\d{5}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"JP":[,[,,"00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",,,,,,,[8,9,10,11,12,13,14,15,16,17]
]
,[,,"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|(?:2[2-9]|[36][1-9])\\d|4(?:[2-578]\\d|6[02-8]|9[2-59])|5(?:[2-589]\\d|6[1-9]|7[2-8])|7(?:[25-9]\\d|3[4-9]|4[02-9])|8(?:[2679]\\d|3[2-9]|4[5-9]|5[1-9]|8[03-9])|9(?:[2-58]\\d|[679][1-9]))\\d{6}",,,,,,,[9]
]
,[,,"[7-9]0[1-9]\\d{7}",,,,,,,[10]
]
,[,,"00(?:(?:37|66)\\d{6,13}|(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d)|(?:120|800\\d)\\d{6}"]
,[,,"990\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"60\\d{7}",,,,,,,[9]
]
,[,,"50[1-9]\\d{7}",,,,,,,[10]
]
,"JP",81,"010","0",,,"0",,,,[[,"(\\d{4})(\\d{4})","$1-$2",["007","0077","00777","00777[01]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1"]
,[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[279]|49|6[0-24-9]|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|6(?:[0-24]|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3[3-8]|5[2-9])","[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3(?:[3-6][2-9]|7|8[2-5])|5[2-9])"]
,"0$1"]
,[,"(\\d{4})(\\d{2})(\\d{3,4})","$1-$2-$3",["007"]
]
,[,"(\\d{4})(\\d{2})(\\d{4})","$1-$2-$3",["008"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]|80"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3,4})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{4})(\\d{4,5})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{5})(\\d{5,6})","$1-$2-$3",["0"]
]
,[,"(\\d{4})(\\d{6})(\\d{6,7})","$1-$2-$3",["0"]
]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"]
,"0$1"]
,[,"(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51|63)|9(?:49|80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[78]|96)|477|51[24]|636)|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[78]|96[2457-9])|477|51[24]|636[2-57-9])|9(?:496|802|9(?:1[23]|69))|1(?:45|58)[67]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[279]|49|6[0-24-9]|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9])|5(?:2|3[045]|4[0-369]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|49|6(?:[0-24]|5[0-3589]|72|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:49|55|83)[29]|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[0468][01]|[1-3]|5[0-69]|7[015-9]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17|3[015-9]))|4(?:2(?:[13-79]|2[01]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3[045]|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9(?:[019]|4[1-3]|6(?:[0-47-9]|5[01346-9])))|3(?:[29]|7(?:[017-9]|6[6-8]))|49|6(?:[0-24]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|72|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:223|8699)[014-9]|(?:48|829(?:2|66)|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3[3-8]|5[2-9])","[14]|[29][2-9]|5[3-9]|7[2-4679]|8(?:[246-9]|3(?:[3-6][2-9]|7|8[2-5])|5[2-9])"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[2579]|80"]
,"0$1"]
]
,[,,"20\\d{8}",,,,,,,[10]
]
,,,[,,"00(?:777(?:[01]|(?:5|8\\d)\\d)|882[1245]\\d\\d)\\d\\d|00(?:37|66)\\d{6,13}"]
,[,,"570\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"KE":[,[,,"(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",,,,,,,[7,8,9,10]
]
,[,,"(?:4[245]|5[1-79]|6[01457-9])\\d{5,7}|(?:4[136]|5[08]|62)\\d{7}|(?:[24]0|66)\\d{6,7}",,,,,,,[7,8,9]
]
,[,,"(?:1(?:0[0-2]|1[01])|7\\d\\d)\\d{6}",,,,,,,[9]
]
,[,,"800[24-8]\\d{5,6}",,,,,,,[9,10]
]
,[,,"900[02-9]\\d{5}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KE",254,"000","0",,,"0",,,,[[,"(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["[17]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KG":[,[,,"8\\d{9}|(?:[235-8]\\d|99)\\d{7}",,,,,,,[9,10]
,[5,6]
]
,[,,"312(?:5[0-79]\\d|9(?:[0-689]\\d|7[0-24-9]))\\d{3}|(?:3(?:1(?:2[0-46-8]|3[1-9]|47|[56]\\d)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}",,,,,,,[9]
,[5,6]
]
,[,,"(?:312(?:58\\d|973)|8801\\d\\d)\\d{3}|(?:2(?:0[0-35]|2\\d)|5[0-24-7]\\d|7(?:[07]\\d|55)|99[05-9])\\d{6}",,,,,,,[9]
]
,[,,"800\\d{6,7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KG",996,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KH":[,[,,"1\\d{9}|[1-9]\\d{7,8}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"23(?:4(?:[2-4]|[56]\\d)|[568]\\d\\d)\\d{4}|23[236-9]\\d{5}|(?:2[4-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:(?:[237-9]|4[56]|5\\d)\\d{5}|6\\d{5,6})",,,,,,,[8,9]
,[6,7]
]
,[,,"(?:(?:1[28]|3[18]|9[67])\\d|6[016-9]|7(?:[07-9]|[16]\\d)|8(?:[013-79]|8\\d))\\d{6}|(?:1\\d|9[0-57-9])\\d{6}|(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])48\\d{5}",,,,,,,[8,9]
]
,[,,"1800(?:1\\d|2[019])\\d{4}",,,,,,,[10]
]
,[,,"1900(?:1\\d|2[09])\\d{4}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KH",855,"00[14-9]","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KI":[,[,,"(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",,,,,,,[5,8]
]
,[,,"(?:[24]\\d|3[1-9]|50|65(?:02[12]|12[56]|22[89]|[3-5]00)|7(?:27\\d\\d|3100|5(?:02[12]|12[56]|22[89]|[34](?:00|81)|500))|8[0-5])\\d{3}"]
,[,,"(?:63\\d{3}|73(?:0[0-5]\\d|140))\\d{3}|[67]200[01]\\d{3}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"30(?:0[01]\\d\\d|12(?:11|20))\\d\\d",,,,,,,[8]
]
,"KI",686,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KM":[,[,,"[3478]\\d{6}",,,,,,,[7]
,[4]
]
,[,,"7[4-7]\\d{5}",,,,,,,,[4]
]
,[,,"[34]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"8\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KM",269,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KN":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}",,,,,,,,[7]
]
,[,,"869(?:48[89]|5(?:5[6-8]|6[5-7])|66\\d|76[02-7])\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"KN",1,"011","1",,,"1|([2-7]\\d{6})$","869$1",,,,,[,,,,,,,,,[-1]
]
,,"869",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KP":[,[,,"85\\d{6}|(?:19\\d|[2-7])\\d{7}",,,,,,,[8,10]
,[6,7]
]
,[,,"(?:(?:195|2)\\d|3[19]|4[159]|5[37]|6[17]|7[39]|85)\\d{6}",,,,,,,,[6,7]
]
,[,,"19[1-3]\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KP",850,"00|99","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"238[02-9]\\d{4}|2(?:[0-24-9]\\d|3[0-79])\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KR":[,[,,"00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",,,,,,,[5,6,8,9,10,11,12,13,14]
,[3,4,7]
]
,[,,"(?:2|3[1-3]|[46][1-4]|5[1-5])[1-9]\\d{6,7}|(?:3[1-3]|[46][1-4]|5[1-5])1\\d{2,3}",,,,,,,[5,6,8,9,10]
,[3,4,7]
]
,[,,"1(?:05(?:[0-8]\\d|9[0-5])|22[13]\\d)\\d{4,5}|1(?:0[1-46-9]|[16-9]\\d|2[013-9])\\d{6,7}",,,,,,,[9,10]
]
,[,,"00(?:308\\d{6,7}|798\\d{7,9})|(?:00368|80)\\d{7}",,,,,,,[9,11,12,13,14]
]
,[,,"60[2-9]\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"50\\d{8,9}",,,,,,,[10,11]
]
,[,,"70\\d{8}",,,,,,,[10]
]
,"KR",82,"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","0",,,"0(8(?:[1-46-8]|5\\d\\d))?",,,,[[,"(\\d{5})","$1",["1[016-9]1","1[016-9]11","1[016-9]114"]
,"0$1"]
,[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"]
,"0$1","0$CC-$1"]
,[,"(\\d{4})(\\d{4})","$1-$2",["1"]
]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1","0$CC-$1"]
,[,"(\\d{5})(\\d{3})(\\d{3})","$1 $2 $3",["003","0030"]
]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"]
,"0$1","0$CC-$1"]
,[,"(\\d{5})(\\d{3,4})(\\d{4})","$1 $2 $3",["0"]
]
,[,"(\\d{5})(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["0"]
]
]
,[[,"(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"]
,"0$1","0$CC-$1"]
,[,"(\\d{4})(\\d{4})","$1-$2",["1"]
]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"]
,"0$1","0$CC-$1"]
,[,"(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"]
,"0$1","0$CC-$1"]
]
,[,,"15\\d{7,8}",,,,,,,[9,10]
]
,,,[,,"00(?:3(?:08\\d{6,7}|68\\d{7})|798\\d{7,9})",,,,,,,[11,12,13,14]
]
,[,,"1(?:5(?:22|44|66|77|88|99)|6(?:[07]0|44|6[16]|88)|8(?:00|33|55|77|99))\\d{4}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"KW":[,[,,"(?:18|[2569]\\d\\d)\\d{5}",,,,,,,[7,8]
]
,[,,"2(?:[23]\\d\\d|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7]))\\d{4}",,,,,,,[8]
]
,[,,"(?:5(?:2(?:22|5[25])|88[58])|6(?:222|444|70[013-9]|888|93[039])|9(?:11[01]|333|500))\\d{4}|(?:5(?:[05]\\d|1[0-7]|6[56])|6(?:0[034679]|5[015-9]|6\\d|7[67]|9[069])|9(?:0[09]|22|[4679]\\d|55|8[057-9]))\\d{5}",,,,,,,[8]
]
,[,,"18\\d{5}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"KW",965,"00",,,,,,,,[[,"(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]
]
,[,"(\\d{3})(\\d{5})","$1 $2",["[25]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KY":[,[,,"(?:345|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"345(?:2(?:22|3[23]|44|66)|333|444|6(?:23|38|40)|7(?:30|4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}",,,,,,,,[7]
]
,[,,"345(?:32[1-9]|42[0-4]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|9(?:1[679]|2[2-9]|3[06-9]|90))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"(?:345976|900[2-9]\\d\\d)\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"KY",1,"011","1",,,"1|([2-9]\\d{6})$","345$1",,,,,[,,"345849\\d{4}"]
,,"345",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"KZ":[,[,,"33622\\d{5}|(?:7\\d|80)\\d{8}",,,,,,,[10]
,[5,6,7]
]
,[,,"(?:33622|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9])|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[2-4]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[2-4]\\d|5[139])|4(?:2\\d|3[1-35-9]|59)|5(?:[23]\\d|4[0-246-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59))))\\d{5}",,,,,,,,[5,6,7]
]
,[,,"7(?:0[0-25-8]|47|6[02-4]|7[15-8]|85)\\d{7}"]
,[,,"800\\d{7}"]
,[,,"809\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,"808\\d{7}"]
,[,,"751\\d{7}"]
,"KZ",7,"810","8",,,"8",,"8~10",,,,[,,,,,,,,,[-1]
]
,,"33|7",[,,"751\\d{7}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LA":[,[,,"[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",,,,,,,[8,9,10]
,[6]
]
,[,,"(?:2[13]|[35-7][14]|41|8[1468])\\d{6}",,,,,,,[8]
,[6]
]
,[,,"(?:20(?:[239]\\d|5[24-689]|7[6-8])|302\\d)\\d{6}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LA",856,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"30[013-9]\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"LB":[,[,,"[7-9]\\d{7}|[13-9]\\d{6}",,,,,,,[7,8]
]
,[,,"(?:(?:[14-69]\\d|8[02-9])\\d|7(?:[2-57]\\d|62|8[0-7]|9[04-9]))\\d{4}",,,,,,,[7]
]
,[,,"793(?:[01]\\d|2[0-4])\\d{3}|(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[89]|9[12]))\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,"9[01]\\d{6}",,,,,,,[8]
]
,[,,"80\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LB",961,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LC":[,[,,"(?:[58]\\d\\d|758|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"758(?:234|4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|(?:63|75)8)\\d{4}",,,,,,,,[7]
]
,[,,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[0-3])|812)\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"LC",1,"011","1",,,"1|([2-8]\\d{6})$","758$1",,,,,[,,,,,,,,,[-1]
]
,,"758",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LI":[,[,,"90\\d{5}|(?:[2378]|6\\d\\d)\\d{6}",,,,,,,[7,9]
]
,[,,"(?:2(?:01|1[27]|22|3\\d|6[02-578]|96)|3(?:33|40|7[0135-7]|8[048]|9[0269]))\\d{4}",,,,,,,[7]
]
,[,,"(?:6(?:4(?:89|9\\d)|5[0-3]\\d|6(?:0[0-7]|10|2[06-9]|39))\\d|7(?:[37-9]\\d|42|56))\\d{4}"]
,[,,"80(?:02[28]|9\\d\\d)\\d\\d",,,,,,,[7]
]
,[,,"90(?:02[258]|1(?:23|3[14])|66[136])\\d\\d",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LI",423,"00","0",,,"0|(1001)",,,,[[,"(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[237-9]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"870(?:28|87)\\d\\d",,,,,,,[7]
]
,,,[,,"697(?:42|56|[78]\\d)\\d{4}",,,,,,,[9]
]
]
,"LK":[,[,,"[1-9]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:12[2-9]|602|8[12]\\d|9(?:1\\d|22|9[245]))\\d{6}|(?:11|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}",,,,,,,,[7]
]
,[,,"7[0-25-8]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LK",94,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"1973\\d{5}"]
,,,[,,,,,,,,,[-1]
]
]
,"LR":[,[,,"(?:2|33|5\\d|77|88)\\d{7}|[4-6]\\d{6}",,,,,,,[7,8,9]
]
,[,,"(?:2\\d{3}|33333)\\d{4}",,,,,,,[8,9]
]
,[,,"(?:(?:330|555|(?:77|88)\\d)\\d|4[67])\\d{5}|[56]\\d{6}",,,,,,,[7,9]
]
,[,,,,,,,,,[-1]
]
,[,,"332(?:02|[34]\\d)\\d{4}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LR",231,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[4-6]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3578]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LS":[,[,,"(?:[256]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"2\\d{7}"]
,[,,"[56]\\d{7}"]
,[,,"800[256]\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LS",266,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2568]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LT":[,[,,"(?:[3469]\\d|52|[78]0)\\d{6}",,,,,,,[8]
]
,[,,"(?:3[1478]|4[124-6]|52)\\d{6}"]
,[,,"6\\d{7}"]
,[,,"80[02]\\d{5}"]
,[,,"9(?:0[0239]|10)\\d{5}"]
,[,,"808\\d{5}"]
,[,,"70[05]\\d{5}"]
,[,,"[89]01\\d{5}"]
,"LT",370,"00","8",,,"[08]",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"]
,"(8-$1)",,1]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"]
,"8 $1",,1]
,[,"(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"]
,"(8-$1)",,1]
,[,"(\\d{3})(\\d{5})","$1 $2",["[3-6]"]
,"(8-$1)",,1]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70[67]\\d{5}"]
,,,[,,,,,,,,,[-1]
]
]
,"LU":[,[,,"35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",,,,,,,[4,5,6,7,8,9,10,11]
]
,[,,"(?:35[013-9]|80[2-9]|90[89])\\d{1,8}|(?:2[2-9]|3[0-46-9]|[457]\\d|8[13-9]|9[2-579])\\d{2,9}"]
,[,,"6(?:[269][18]|5[158]|7[189]|81)\\d{6}",,,,,,,[9]
]
,[,,"800\\d{5}",,,,,,,[8]
]
,[,,"90[015]\\d{5}",,,,,,,[8]
]
,[,,"801\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"20(?:1\\d{5}|[2-689]\\d{1,7})",,,,,,,[4,5,6,7,8,9,10]
]
,"LU",352,"00",,,,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)",,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]
,,"$CC $1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]
,,"$CC $1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]
,,"$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LV":[,[,,"(?:[268]\\d|90)\\d{6}",,,,,,,[8]
]
,[,,"6\\d{7}"]
,[,,"2\\d{7}"]
,[,,"80\\d{6}"]
,[,,"90\\d{6}"]
,[,,"81\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LV",371,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"LY":[,[,,"[2-9]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"(?:2(?:0[56]|[1-6]\\d|7[124579]|8[124])|3(?:1\\d|2[2356])|4(?:[17]\\d|2[1-357]|5[2-4]|8[124])|5(?:[1347]\\d|2[1-469]|5[13-5]|8[1-4])|6(?:[1-479]\\d|5[2-57]|8[1-5])|7(?:[13]\\d|2[13-79])|8(?:[124]\\d|5[124]|84))\\d{6}",,,,,,,,[7]
]
,[,,"9[1-6]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"LY",218,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{7})","$1-$2",["[2-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MA":[,[,,"[5-8]\\d{8}",,,,,,,[9]
]
,[,,"5(?:29(?:[189][05]|2[29]|3[01])|38[89][05])\\d{4}|5(?:2(?:[015-7]\\d|2[02-9]|3[0-578]|4[02-46-8]|8[0235-7]|90)|3(?:[0-47]\\d|5[02-9]|6[02-8]|80|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"]
,[,,"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:0[016-8]|6[1267]|7[0-27]))\\d{6}"]
,[,,"80\\d{7}"]
,[,,"89\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:4[0-2]|93)\\d{4}"]
,"MA",212,"00","0",,,"0",,,,[[,"(\\d{5})(\\d{4})","$1-$2",["5(?:29|38)","5(?:29|38)[89]","5(?:29|38)[89]0"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-489]|3[5-9]|9)|892","5(?:2(?:[2-49]|8[235-9])|3[5-9]|9)|892"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1-$2",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1-$2",["[5-7]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MC":[,[,,"870\\d{5}|(?:[349]|6\\d)\\d{7}",,,,,,,[8,9]
]
,[,,"(?:870|9[2-47-9]\\d)\\d{5}",,,,,,,[8]
]
,[,,"4(?:[46]\\d|5[1-9])\\d{5}|(?:3|6\\d)\\d{7}"]
,[,,"90\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MC",377,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["8"]
]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[39]"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[39]"]
]
,[,"(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,"870\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MD":[,[,,"(?:[235-7]\\d|[89]0)\\d{6}",,,,,,,[8]
]
,[,,"(?:(?:2[1-9]|3[1-79])\\d|5(?:33|5[257]))\\d{5}"]
,[,,"562\\d{5}|(?:6\\d|7[16-9])\\d{6}"]
,[,,"800\\d{5}"]
,[,,"90[056]\\d{5}"]
,[,,"808\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,"3[08]\\d{6}"]
,"MD",373,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"803\\d{5}"]
,,,[,,,,,,,,,[-1]
]
]
,"ME":[,[,,"(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",,,,,,,[8,9]
,[6]
]
,[,,"(?:20[2-8]|3(?:[0-2][2-7]|3[24-7])|4(?:0[2-467]|1[2467])|5(?:0[2467]|1[24-7]|2[2-467]))\\d{5}",,,,,,,[8]
,[6]
]
,[,,"6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}",,,,,,,[8]
]
,[,,"80(?:[0-2578]|9\\d)\\d{5}"]
,[,,"9(?:4[1568]|5[178])\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"78[1-49]\\d{5}",,,,,,,[8]
]
,"ME",382,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"77[1-9]\\d{5}",,,,,,,[8]
]
,,,[,,,,,,,,,[-1]
]
]
,"MF":[,[,,"(?:590|69\\d|976)\\d{6}",,,,,,,[9]
]
,[,,"590(?:0[079]|[14]3|[27][79]|30|5[0-268]|87)\\d{4}"]
,[,,"69(?:0\\d\\d|1(?:2[29]|3[0-5]))\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976[01]\\d{5}"]
,"MF",590,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MG":[,[,,"[23]\\d{8}",,,,,,,[9]
,[7]
]
,[,,"2072[29]\\d{4}|20(?:2\\d|4[47]|5[3467]|6[279]|7[35]|8[268]|9[245])\\d{5}",,,,,,,,[7]
]
,[,,"3[2-49]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"22\\d{7}"]
,"MG",261,"00","0",,,"0|([24-9]\\d{6})$","20$1",,,[[,"(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MH":[,[,,"329\\d{4}|(?:[256]\\d|45)\\d{5}",,,,,,,[7]
]
,[,,"(?:247|528|625)\\d{4}"]
,[,,"(?:(?:23|54)5|329|45[56])\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"635\\d{4}"]
,"MH",692,"011","1",,,"1",,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-6]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MK":[,[,,"[2-578]\\d{7}",,,,,,,[8]
,[6,7]
]
,[,,"(?:2(?:[23]\\d|5[0-24578]|6[01]|82)|3(?:1[3-68]|[23][2-68]|4[23568])|4(?:[23][2-68]|4[3-68]|5[2568]|6[25-8]|7[24-68]|8[4-68]))\\d{5}",,,,,,,,[6,7]
]
,[,,"7(?:4(?:60\\d|747)|94(?:[01]\\d|2[0-4]))\\d{3}|7(?:[0-25-8]\\d|3[2-4]|42|9[23])\\d{5}"]
,[,,"800\\d{5}"]
,[,,"5[02-9]\\d{6}"]
,[,,"8(?:0[1-9]|[1-9]\\d)\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MK",389,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"]
,"0$1"]
,[,"(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ML":[,[,,"[24-9]\\d{7}",,,,,,,[8]
]
,[,,"2(?:07[0-8]|12[67])\\d{4}|(?:2(?:02|1[4-689])|4(?:0[0-4]|4[1-39]))\\d{5}"]
,[,,"2(?:0(?:01|79)|17\\d)\\d{4}|(?:5[01]|[679]\\d|8[239])\\d{6}"]
,[,,"80\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ML",223,"00",,,,,,,,[[,"(\\d{4})","$1",["67[057-9]|74[045]","67(?:0[09]|[59]9|77|8[89])|74(?:0[02]|44|55)"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,"80\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MM":[,[,,"1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",,,,,,,[6,7,8,9,10]
,[5]
]
,[,,"(?:1(?:(?:2\\d|3[56]|[89][0-6])\\d|4(?:2[2-469]|39|46|6[25]|7[0-3]|83)|6)|2(?:2(?:00|8[34])|4(?:0\\d|2[246]|39|46|62|7[0-3]|83)|51\\d\\d)|4(?:2(?:2\\d\\d|48[0-3])|3(?:20\\d|4(?:70|83)|56)|420\\d|5470)|6(?:0(?:[23]|88\\d)|(?:124|[56]2\\d)\\d|247[23]|3(?:20\\d|470)|4(?:2[04]\\d|47[23])|7(?:(?:3\\d|8[01459])\\d|4(?:39|60|7[013]))))\\d{4}|5(?:2(?:2\\d{5,6}|47[023]\\d{4})|(?:347[23]|4(?:2(?:1|86)|470)|522\\d|6(?:20\\d|483)|7(?:20\\d|48[0-2])|8(?:20\\d|47[02])|9(?:20\\d|47[01]))\\d{4})|7(?:(?:0470|4(?:25\\d|470)|5(?:202|470|96\\d))\\d{4}|1(?:20\\d{4,5}|4(?:70|83)\\d{4}))|8(?:1(?:2\\d{5,6}|4(?:10|7[01]\\d)\\d{3})|2(?:2\\d{5,6}|(?:320|490\\d)\\d{3})|(?:3(?:2\\d\\d|470)|4[24-7]|5(?:2\\d|4[1-9]|51)\\d|6[23])\\d{4})|(?:1[2-6]\\d|4(?:2[24-8]|3[2-7]|[46][2-6]|5[3-5])|5(?:[27][2-8]|3[2-68]|4[24-8]|5[23]|6[2-4]|8[24-7]|9[2-7])|6(?:[19]20|42[03-6]|(?:52|7[45])\\d)|7(?:[04][24-8]|[15][2-7]|22|3[2-4])|8(?:1[2-689]|2[2-8]|[35]2\\d))\\d{4}|25\\d{5,6}|(?:2[2-9]|6(?:1[2356]|[24][2-6]|3[24-6]|5[2-4]|6[2-8]|7[235-7]|8[245]|9[24])|8(?:3[24]|5[245]))\\d{4}",,,,,,,[6,7,8,9]
,[5]
]
,[,,"(?:17[01]|9(?:2(?:[0-4]|[56]\\d\\d)|(?:3(?:[0-36]|4\\d)|(?:6[6-9]|8[89]|9[5-8])\\d|7(?:3|[5-9]\\d))\\d|4(?:(?:[0245]\\d|[1379])\\d|88)|5[0-6])\\d)\\d{4}|9[69]1\\d{6}|9(?:[68]\\d|9[089])\\d{5}",,,,,,,[7,8,9,10]
]
,[,,"80080(?:[01][1-9]|2\\d)\\d{3}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"1333\\d{4}|[12]468\\d{4}",,,,,,,[8]
]
,"MM",95,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"]
,"0$1"]
,[,"(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MN":[,[,,"[12]\\d{7,9}|[57-9]\\d{7}",,,,,,,[8,9,10]
,[4,5,6]
]
,[,,"[12]2[1-3]\\d{5,6}|7(?:0[0-5]\\d|128)\\d{4}|(?:[12](?:1|27)|5[368])\\d{6}|[12](?:3[2-8]|4[2-68]|5[1-4689])\\d{6,7}",,,,,,,,[4,5,6]
]
,[,,"(?:83[01]|920)\\d{5}|(?:5[05]|8[05689]|9[013-9])\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"712[0-79]\\d{4}|7(?:1[013-9]|[5-8]\\d)\\d{5}",,,,,,,[8]
]
,"MN",976,"001","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"]
,"0$1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[57-9]"]
]
,[,"(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"]
,"0$1"]
,[,"(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"]
,"0$1"]
,[,"(\\d{5})(\\d{4,5})","$1 $2",["[12]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MO":[,[,,"(?:28|[68]\\d)\\d{6}",,,,,,,[8]
]
,[,,"(?:28[2-9]|8(?:11|[2-57-9]\\d))\\d{5}"]
,[,,"6(?:[235]\\d\\d|6(?:0[0-5]|[1-9]\\d)|8(?:[02][5-9]|[146-8]\\d|[35][0-4]))\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MO",853,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[268]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MP":[,[,,"[58]\\d{9}|(?:67|90)0\\d{7}",,,,,,,[10]
,[7]
]
,[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,,,,,[7]
]
,[,,"670(?:2(?:3[3-7]|56|8[4-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"MP",1,"011","1",,,"1|([2-9]\\d{6})$","670$1",,1,,,[,,,,,,,,,[-1]
]
,,"670",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MQ":[,[,,"69\\d{7}|(?:59|97)6\\d{6}",,,,,,,[9]
]
,[,,"596(?:0[0-7]|10|2[7-9]|3[05-9]|4[0-46-8]|[5-7]\\d|8[09]|9[4-8])\\d{4}"]
,[,,"69(?:6(?:[0-47-9]\\d|5[0-6]|6[0-4])|727)\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"976(?:6[1-9]|7[0-367])\\d{4}"]
,"MQ",596,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MR":[,[,,"(?:[2-4]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"(?:25[08]|35\\d|45[1-7])\\d{5}"]
,[,,"[2-4][0-46-9]\\d{6}"]
,[,,"800\\d{5}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MR",222,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MS":[,[,,"(?:[58]\\d\\d|664|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"6644(?:1[0-3]|91)\\d{4}",,,,,,,,[7]
]
,[,,"664(?:3(?:49|9[1-6])|49[2-6])\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"MS",1,"011","1",,,"1|([34]\\d{6})$","664$1",,,,,[,,,,,,,,,[-1]
]
,,"664",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MT":[,[,,"3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",,,,,,,[8]
]
,[,,"2(?:0(?:[19]\\d|3[1-4]|6[059])|[1-357]\\d\\d)\\d{4}"]
,[,,"(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"]
,[,,"800[3467]\\d{4}"]
,[,,"5(?:0(?:0(?:37|43)|(?:6\\d|70|9[0168])\\d)|[12]\\d0[1-5])\\d{3}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"3550\\d{4}"]
,"MT",356,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]
]
]
,,[,,"7117\\d{4}"]
,,,[,,,,,,,,,[-1]
]
,[,,"501\\d{5}"]
,,,[,,,,,,,,,[-1]
]
]
,"MU":[,[,,"(?:[2-468]|5\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2(?:[0346-8]\\d|1[0-7])|4(?:[013568]\\d|2[4-7])|54(?:[34]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}"]
,[,,"5(?:4(?:2[1-389]|7[1-9])|87[15-8])\\d{4}|5(?:2[589]|4[3489]|7\\d|8[0-689]|9[0-8])\\d{5}",,,,,,,[8]
]
,[,,"80[0-2]\\d{4}",,,,,,,[7]
]
,[,,"30\\d{5}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"3(?:20|9\\d)\\d{4}",,,,,,,[7]
]
,"MU",230,"0(?:0|[24-7]0|3[03])",,,,,,"020",,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["5"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MV":[,[,,"(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",,,,,,,[7,10]
]
,[,,"(?:3(?:0[0-3]|3[0-59])|6(?:[57][02468]|6[024-68]|8[024689]))\\d{4}",,,,,,,[7]
]
,[,,"46[46]\\d{4}|(?:7\\d|9[13-9])\\d{5}",,,,,,,[7]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,"900\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MV",960,"0(?:0|19)",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1-$2",["[3467]|9[13-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"4[05]0\\d{4}",,,,,,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"MW":[,[,,"1\\d{6}(?:\\d{2})?|(?:[23]1|77|88|99)\\d{7}",,,,,,,[7,9]
]
,[,,"(?:1[2-9]|21\\d\\d)\\d{5}"]
,[,,"111\\d{6}|(?:31|77|88|99)\\d{7}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MW",265,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MX":[,[,,"(?:1(?:[01467]\\d|[2359][1-9]|8[1-79])|[2-9]\\d)\\d{8}",,,,,,,[10,11]
,[7,8]
]
,[,,"(?:2(?:0[01]|2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}",,,,,,,[10]
,[7,8]
]
,[,,"(?:1(?:2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))|2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|3\\d|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-7][1-9]|3[1-8]|8[1-35-9]|9[2-689])|5(?:[56]\\d|88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[1-57-9]|7[1-7]|8[67]|9[4-8])|7(?:[1-467][1-9]|5[13-9]|8[1-69]|9[17])|8(?:1\\d|2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}",,,,,,,,[7,8]
]
,[,,"8(?:00|88)\\d{7}",,,,,,,[10]
]
,[,,"900\\d{7}",,,,,,,[10]
]
,[,,"300\\d{7}",,,,,,,[10]
]
,[,,"500\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,"MX",52,"0[09]","01",,,"0(?:[12]|4[45])|1",,"00",,[[,"(\\d{5})","$1",["53"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]
,,,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"]
,,,1]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"]
,,,1]
]
,[[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]
,,,1]
,[,"(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"]
,,,1]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"]
,,,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MY":[,[,,"1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",,,,,,,[8,9,10]
,[6,7]
]
,[,,"(?:3(?:2[0-36-9]|3[0-368]|4[0-278]|5[0-24-8]|6[0-467]|7[1246-9]|8\\d|9[0-57])\\d|4(?:2[0-689]|[3-79]\\d|8[1-35689])|5(?:2[0-589]|[3468]\\d|5[0-489]|7[1-9]|9[23])|6(?:2[2-9]|3[1357-9]|[46]\\d|5[0-6]|7[0-35-9]|85|9[015-8])|7(?:[2579]\\d|3[03-68]|4[0-8]|6[5-9]|8[0-35-9])|8(?:[24][2-8]|3[2-5]|5[2-7]|6[2-589]|7[2-578]|[89][2-9])|9(?:0[57]|13|[25-7]\\d|[3489][0-8]))\\d{5}",,,,,,,[8,9]
,[6,7]
]
,[,,"1(?:4400|8(?:47|8[27])[0-4])\\d{4}|1(?:0(?:[23568]\\d|4[0-6]|7[016-9]|9[0-8])|1(?:[1-5]\\d\\d|6(?:0[5-9]|[1-9]\\d)|7(?:0\\d|1[01]))|(?:(?:[269]|59)\\d|[37][1-9]|4[235-9])\\d|8(?:1[23]|[236]\\d|4[06]|5[7-9]|7[016-9]|8[01]|9[0-8]))\\d{5}",,,,,,,[9,10]
]
,[,,"1[378]00\\d{6}",,,,,,,[10]
]
,[,,"1600\\d{6}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"15(?:4(?:6[0-4]\\d|8(?:0[125]|[17]\\d|21|3[01]|4[01589]|5[014]|6[02]))|6(?:32[0-6]|78\\d))\\d{4}",,,,,,,[10]
]
,"MY",60,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9])|8"]
,"0$1"]
,[,"(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1[36-8]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"MZ":[,[,,"(?:2|8\\d)\\d{7}",,,,,,,[8,9]
]
,[,,"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}",,,,,,,[8]
]
,[,,"8[2-79]\\d{7}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"MZ",258,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NA":[,[,,"[68]\\d{7,8}",,,,,,,[8,9]
]
,[,,"6(?:1(?:[02-4]\\d\\d|17)|2(?:17|54\\d|69|70)|3(?:17|2[0237]\\d|34|6[289]|7[01]|81)|4(?:17|(?:27|41|5[25])\\d|69|7[01])|5(?:17|2[236-8]\\d|69|7[01])|6(?:17|26\\d|38|42|69|7[01])|7(?:17|(?:2[2-4]|30)\\d|6[89]|7[01]))\\d{4}|6(?:1(?:2[2-7]|3[01378]|4[0-4]|69|7[014])|25[0-46-8]|32\\d|4(?:2[0-27]|4[016]|5[0-357])|52[02-9]|62[56]|7(?:2[2-69]|3[013]))\\d{4}"]
,[,,"(?:60|8[1245])\\d{7}",,,,,,,[9]
]
,[,,"80\\d{7}",,,,,,,[9]
]
,[,,"8701\\d{5}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"8(?:3\\d\\d|86)\\d{5}"]
,"NA",264,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NC":[,[,,"[2-57-9]\\d{5}",,,,,,,[6]
]
,[,,"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}"]
,[,,"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,"36\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NC",687,"00",,,,,,,,[[,"(\\d{3})","$1",["5[6-8]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[2-57-9]"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NE":[,[,,"[0289]\\d{7}",,,,,,,[8]
]
,[,,"2(?:0(?:20|3[1-8]|4[13-5]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}"]
,[,,"(?:23|8[014589]|9\\d)\\d{6}"]
,[,,"08\\d{6}"]
,[,,"09\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NE",227,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NF":[,[,,"[13]\\d{5}",,,,,,,[6]
,[5]
]
,[,,"(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}",,,,,,,,[5]
]
,[,,"(?:14|3[58])\\d{4}",,,,,,,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NF",672,"00",,,,"([0-258]\\d{4})$","3$1",,,[[,"(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]
]
,[,"(\\d)(\\d{5})","$1 $2",["[13]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NG":[,[,,"(?:[124-7]|9\\d{3})\\d{6}|[1-9]\\d{7}|[78]\\d{9,13}",,,,,,,[7,8,10,11,12,13,14]
,[5,6]
]
,[,,"(?:(?:[1-356]\\d|4[02-8]|8[2-9])\\d|9(?:0[3-9]|[1-9]\\d))\\d{5}|7(?:0(?:[013-689]\\d|2[0-24-9])\\d{3,4}|[1-79]\\d{6})|(?:[12]\\d|4[147]|5[14579]|6[1578]|7[1-3578])\\d{5}",,,,,,,[7,8]
,[5,6]
]
,[,,"(?:702[0-24-9]|8(?:01|19)[01])\\d{6}|(?:70[13-689]|8(?:0[2-9]|1[0-8])|90[1-9])\\d{7}",,,,,,,[10]
]
,[,,"800\\d{7,11}",,,,,,,[10,11,12,13,14]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NG",234,"009","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-7]|8[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"]
,"0$1"]
,[,"(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"700\\d{7,11}",,,,,,,[10,11,12,13,14]
]
,,,[,,,,,,,,,[-1]
]
]
,"NI":[,[,,"(?:1800|[25-8]\\d{3})\\d{4}",,,,,,,[8]
]
,[,,"2\\d{7}"]
,[,,"(?:5(?:5[0-7]|[78]\\d)|6(?:20|3[035]|4[045]|5[05]|77|8[1-9]|9[059])|(?:7[5-8]|8\\d)\\d)\\d{5}"]
,[,,"1800\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NI",505,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[125-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NL":[,[,,"(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|[89]\\d{6,9}|1\\d{4,5}",,,,,,,[5,6,7,8,9,10]
]
,[,,"(?:1(?:[035]\\d|1[13-578]|6[124-8]|7[24]|8[0-467])|2(?:[0346]\\d|2[2-46-9]|5[125]|9[479])|3(?:[03568]\\d|1[3-8]|2[01]|4[1-8])|4(?:[0356]\\d|1[1-368]|7[58]|8[15-8]|9[23579])|5(?:[0358]\\d|[19][1-9]|2[1-57-9]|4[13-8]|6[126]|7[0-3578])|7\\d\\d)\\d{6}",,,,,,,[9]
]
,[,,"6[1-58]\\d{7}",,,,,,,[9]
]
,[,,"800\\d{4,7}",,,,,,,[7,8,9,10]
]
,[,,"90[069]\\d{4,7}",,,,,,,[7,8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:85|91)\\d{7}",,,,,,,[9]
]
,"NL",31,"00","0",,,"0",,,,[[,"(\\d{4})","$1",["1[238]|[34]"]
]
,[,"(\\d{2})(\\d{3,4})","$1 $2",["14"]
]
,[,"(\\d{6})","$1",["1"]
]
,[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["66"]
,"0$1"]
,[,"(\\d)(\\d{8})","$1 $2",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{4,7})","$1 $2",["[89]0"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["66"]
,"0$1"]
,[,"(\\d)(\\d{8})","$1 $2",["6"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-57-9]"]
,"0$1"]
]
,[,,"66\\d{7}",,,,,,,[9]
]
,,,[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)\\d",,,,,,,[5,6]
]
,[,,"140(?:1[035]|2[0346]|3[03568]|4[0356]|5[0358]|8[458])|(?:140(?:1[16-8]|2[259]|3[124]|4[17-9]|5[124679]|7)|8[478]\\d{6})\\d",,,,,,,[5,6,9]
]
,,,[,,,,,,,,,[-1]
]
]
,"NO":[,[,,"(?:0|[2-9]\\d{3})\\d{4}",,,,,,,[5,8]
]
,[,,"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}",,,,,,,[8]
]
,[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}",,,,,,,[8]
]
,[,,"80[01]\\d{5}",,,,,,,[8]
]
,[,,"82[09]\\d{5}",,,,,,,[8]
]
,[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,,,,[8]
]
,[,,"880\\d{5}",,,,,,,[8]
]
,[,,"85[0-5]\\d{5}",,,,,,,[8]
]
,"NO",47,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[489]|5[89]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-7]"]
]
]
,,[,,,,,,,,,[-1]
]
,1,"[02-689]|7[0-8]",[,,,,,,,,,[-1]
]
,[,,"(?:0[2-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"]
,,,[,,"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[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"NU",683,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["8"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"NZ":[,[,,"2\\d{7,9}|(?:[34]\\d|6[0-35-9])\\d{6}|(?:508|[79]\\d)\\d{6,7}|8\\d{4,9}",,,,,,,[5,6,7,8,9,10]
]
,[,,"24099\\d{3}|(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}",,,,,,,[8]
,[7]
]
,[,,"2[0-27-9]\\d{7,8}|21\\d{6}",,,,,,,[8,9,10]
]
,[,,"508\\d{6,7}|80\\d{6,8}",,,,,,,[8,9,10]
]
,[,,"90\\d{6,7}",,,,,,,[8,9]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{7}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,"NZ",64,"0(?:0|161)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,8})","$1 $2",["83"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["24|[346]|7[2-57-9]|9[2-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[59]|80"]
,"0$1"]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["2[028]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7|86"]
,"0$1"]
]
,,[,,"[28]6\\d{6,7}",,,,,,,[8,9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"83\\d{3,8}"]
,,,[,,,,,,,,,[-1]
]
]
,"OM":[,[,,"(?:1505|[279]\\d{3}|500)\\d{4}|8007\\d{4,5}",,,,,,,[7,8,9]
]
,[,,"2[2-6]\\d{6}",,,,,,,[8]
]
,[,,"(?:1505|90[1-9]\\d)\\d{4}|(?:7[1289]|9[1-9])\\d{6}",,,,,,,[8]
]
,[,,"500\\d{4}|8007\\d{4,5}"]
,[,,"900\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"OM",968,"00",,,,,,,,[[,"(\\d{3})(\\d{4,6})","$1 $2",["[58]"]
]
,[,"(\\d{2})(\\d{6})","$1 $2",["2"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[179]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PA":[,[,,"(?:[1-57-9]|6\\d)\\d{6}",,,,,,,[7,8]
]
,[,,"(?:1(?:0\\d|1[479]|2[37]|3[0137]|4[17]|5[05]|6[58]|7[0167]|8[258]|9[139])|2(?:[0235-79]\\d|1[0-7]|4[013-9]|8[026-9])|3(?:[089]\\d|1[014-7]|2[0-5]|33|4[0-79]|55|6[068]|7[03-8])|4(?:00|3[0-579]|4\\d|7[0-57-9])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-26-8]|3[03]|4[04]|5[05-9]|6[056]|7[0-24-9]|8[6-9]|90)|8(?:09|2[89]|3\\d|4[0-24-689]|5[014]|8[02])|9(?:0[5-9]|1[0135-8]|2[036-9]|3[35-79]|40|5[0457-9]|6[05-9]|7[04-9]|8[35-8]|9\\d))\\d{4}",,,,,,,[7]
]
,[,,"(?:1[16]1|21[89]|6(?:[02-9]\\d|1[0-6])\\d|8(?:1[01]|7[23]))\\d{4}"]
,[,,"800\\d{4}",,,,,,,[7]
]
,[,,"(?:8(?:22|55|60|7[78]|86)|9(?:00|81))\\d{4}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PA",507,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]
]
,[,"(\\d{4})(\\d{4})","$1-$2",["6"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PE":[,[,,"(?:[14-8]|9\\d)\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"(?:(?:4[34]|5[14])[0-8]\\d|7(?:173|3[0-8]\\d)|8(?:10[05689]|6(?:0[06-9]|1[6-9]|29)|7(?:0[569]|[56]0)))\\d{4}|(?:1[0-8]|4[12]|5[236]|6[1-7]|7[246]|8[2-4])\\d{6}",,,,,,,[8]
,[6,7]
]
,[,,"9\\d{8}",,,,,,,[9]
]
,[,,"800\\d{5}",,,,,,,[8]
]
,[,,"805\\d{5}",,,,,,,[8]
]
,[,,"801\\d{5}",,,,,,,[8]
]
,[,,"80[24]\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,"PE",51,"19(?:1[124]|77|90)00","0"," Anexo ",,"0",,,,[[,"(\\d{3})(\\d{5})","$1 $2",["80"]
,"(0$1)"]
,[,"(\\d)(\\d{7})","$1 $2",["1"]
,"(0$1)"]
,[,"(\\d{2})(\\d{6})","$1 $2",["[4-8]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PF":[,[,,"[48]\\d{7}|4\\d{5}",,,,,,,[6,8]
]
,[,,"4(?:0[4-689]|9[4-68])\\d{5}",,,,,,,[8]
]
,[,,"8[7-9]\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"499\\d{5}",,,,,,,[8]
]
,"PF",689,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[48]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"44\\d{4}",,,,,,,[6]
]
,[,,"44\\d{4}",,,,,,,[6]
]
,,,[,,,,,,,,,[-1]
]
]
,"PG":[,[,,"(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",,,,,,,[7,8]
]
,[,,"(?:64[1-9]|7730|85[02-46-9])\\d{4}|(?:3[0-2]|4[257]|5[34]|77[0-24]|9[78])\\d{5}"]
,[,,"77(?:3[1-9]|[5-9]\\d)\\d{4}|(?:7[0-689]|81)\\d{6}",,,,,,,[8]
]
,[,,"180\\d{4}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"2(?:0[0-47]|7[568])\\d{4}",,,,,,,[7]
]
,"PG",675,"00|140[1-3]",,,,,,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[78]"]
]
]
,,[,,"27[01]\\d{4}",,,,,,,[7]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PH":[,[,,"1800\\d{7,9}|(?:2|[89]\\d{4})\\d{5}|[2-8]\\d{8}|[28]\\d{7}",,,,,,,[6,8,9,10,11,12,13]
,[4,5,7]
]
,[,,"(?:(?:2[3-8]|3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578])\\d{3}|88(?:22\\d\\d|42))\\d{4}|2\\d{5}(?:\\d{2})?|8[2-8]\\d{7}",,,,,,,[6,8,9,10]
,[4,5,7]
]
,[,,"(?:81[37]|9(?:0[5-9]|1[0-24-9]|2[0-35-9]|[35]\\d|4[235-9]|6[0-25-8]|7[1-9]|8[189]|9[4-9]))\\d{7}",,,,,,,[10]
]
,[,,"1800\\d{7,9}",,,,,,,[11,12,13]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PH",63,"00","0",,,"0",,,,[[,"(\\d)(\\d{5})","$1 $2",["2"]
,"(0$1)"]
,[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"]
,"(0$1)"]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"]
,"(0$1)"]
,[,"(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"]
,"(0$1)"]
,[,"(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PK":[,[,,"122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",,,,,,,[8,9,10,11,12]
,[5,6,7]
]
,[,,"(?:(?:21|42)[2-9]|58[126])\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6,7}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}",,,,,,,[9,10]
,[5,6,7,8]
]
,[,,"3(?:[014]\\d|2[0-5]|3[0-7]|55|64)\\d{7}",,,,,,,[10]
]
,[,,"800\\d{5}",,,,,,,[8]
]
,[,,"900\\d{5}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"122\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,"PK",92,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["[89]0"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1 $2",["1"]
]
,[,"(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"]
,"(0$1)"]
,[,"(\\d{5})(\\d{5})","$1 $2",["58"]
,"(0$1)"]
,[,"(\\d{3})(\\d{7})","$1 $2",["3"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"]
,"(0$1)"]
,[,"(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:0[468]|[1-8])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}",,,,,,,[11,12]
]
,,,[,,,,,,,,,[-1]
]
]
,"PL":[,[,,"[1-57-9]\\d{6}(?:\\d{2})?|6\\d{5,8}",,,,,,,[6,7,8,9]
]
,[,,"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])(?:[02-9]\\d{6}|1(?:[0-8]\\d{5}|9\\d{3}(?:\\d{2})?))",,,,,,,[7,9]
]
,[,,"(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"70[01346-8]\\d{6}",,,,,,,[9]
]
,[,,"801\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"39\\d{7}",,,,,,,[9]
]
,"PL",48,"00",,,,,,,,[[,"(\\d{5})","$1",["19"]
]
,[,"(\\d{3})(\\d{3})","$1 $2",["11|64"]
]
,[,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]
]
,[,"(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["39|45|5[0137]|6[0469]|7[02389]|8[08]"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-8]|9[145]"]
]
]
,,[,,"64\\d{4,7}"]
,,,[,,,,,,,,,[-1]
]
,[,,"804\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"PM":[,[,,"[45]\\d{5}",,,,,,,[6]
]
,[,,"(?:4[1-3]|50)\\d{4}"]
,[,,"(?:4[02-4]|5[05])\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PM",508,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PR":[,[,,"(?:[589]\\d\\d|787)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"(?:787|939)[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"(?:787|939)[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"PR",1,"011","1",,,"1",,,1,,,[,,,,,,,,,[-1]
]
,,"787|939",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PS":[,[,,"[2489]2\\d{6}|(?:1\\d|5)\\d{8}",,,,,,,[8,9,10]
,[7]
]
,[,,"(?:22[2-47-9]|42[45]|82[014-68]|92[3569])\\d{5}",,,,,,,[8]
,[7]
]
,[,,"5[69]\\d{7}",,,,,,,[9]
]
,[,,"1800\\d{6}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"1700\\d{6}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PS",970,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PT":[,[,,"(?:[26-9]\\d|30)\\d{7}",,,,,,,[9]
]
,[,,"2(?:[12]\\d|[35][1-689]|4[1-59]|6[1-35689]|7[1-9]|8[1-69]|9[1256])\\d{6}"]
,[,,"6[356]9230\\d{3}|(?:6[036]93|9(?:[1-36]\\d\\d|480))\\d{5}"]
,[,,"80[02]\\d{6}"]
,[,,"(?:6(?:0[178]|4[68])\\d|76(?:0[1-57]|1[2-47]|2[237]))\\d{5}"]
,[,,"80(?:8\\d|9[1579])\\d{5}"]
,[,,"884[0-4689]\\d{5}"]
,[,,"30\\d{7}"]
,"PT",351,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"70(?:7\\d|8[17])\\d{5}"]
,,,[,,"600\\d{6}"]
]
,"PW":[,[,,"(?:[24-8]\\d\\d|345|900)\\d{4}",,,,,,,[7]
]
,[,,"(?:2(?:55|77)|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76)|900)\\d{4}"]
,[,,"(?:45[0-5]|6[2-4689]0|(?:77|88)\\d)\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"PW",680,"01[12]",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[2-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"PY":[,[,,"59\\d{4,6}|(?:[2-46-9]\\d|5[0-8])\\d{4,7}",,,,,,,[6,7,8,9]
,[5]
]
,[,,"(?:[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36])\\d{5,7}|(?:2(?:2[4-68]|[4-68]\\d|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51|[67]\\d)|4(?:3[12]|5[13]|9[1-47])|5(?:[1-4]\\d|5[02-4])|6(?:3[1-3]|44|7[1-8])|7(?:4[0-4]|5\\d|6[1-578]|75|8[0-8])|858)\\d{5,6}",,,,,,,[7,8,9]
,[5,6]
]
,[,,"9(?:51|6[129]|[78][1-6]|9[1-5])\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"8700[0-4]\\d{4}",,,,,,,[9]
]
,"PY",595,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"]
,"0$1"]
,[,"(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"]
,"(0$1)"]
,[,"(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]
]
,[,"(\\d{3})(\\d{6})","$1 $2",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"[2-9]0\\d{4,7}"]
,,,[,,,,,,,,,[-1]
]
]
,"QA":[,[,,"[2-7]\\d{7}|(?:2\\d\\d|800)\\d{4}",,,,,,,[7,8]
]
,[,,"4[04]\\d{6}",,,,,,,[8]
]
,[,,"(?:28|[35-7]\\d)\\d{6}",,,,,,,[8]
]
,[,,"800\\d{4}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"QA",974,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["2[126]|8"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[2-7]"]
]
]
,,[,,"2(?:[12]\\d|61)\\d{4}",,,,,,,[7]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RE":[,[,,"9769\\d{5}|(?:26|[68]\\d)\\d{7}",,,,,,,[9]
]
,[,,"26(?:2\\d\\d|30[01])\\d{4}"]
,[,,"(?:69(?:2\\d\\d|3(?:0[0-46]|1[013]|2[0-2]|3[0-39]|4\\d|5[05]|6[0-26]|7[0-27]|8[0-8]|9[0-479]))|9769\\d)\\d{4}"]
,[,,"80\\d{7}"]
,[,,"89[1-37-9]\\d{6}"]
,[,,"8(?:1[019]|2[0156]|84|90)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RE",262,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,1,"26[23]|69|[89]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RO":[,[,,"(?:[237]\\d|[89]0)\\d{7}|[23]\\d{5}",,,,,,,[6,9]
]
,[,,"[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d"]
,[,,"7[01]20\\d{5}|7(?:0[013-9]|1[01]|[2-7]\\d|8[03-8]|9[09])\\d{6}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"90[0136]\\d{6}",,,,,,,[9]
]
,[,,"801\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RO",40,"00","0"," int ",,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"]
,"0$1"]
,[,"(\\d{2})(\\d{4})","$1 $2",["219|31"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[237-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:37\\d|80[578])\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"RS":[,[,,"38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",,,,,,,[6,7,8,9,10,11,12]
,[4,5]
]
,[,,"(?:11[1-9]\\d|(?:2[389]|39)(?:0[2-9]|[2-9]\\d))\\d{3,8}|(?:1[02-9]|2[0-24-7]|3[0-8])[2-9]\\d{4,9}",,,,,,,[7,8,9,10,11,12]
,[4,5,6]
]
,[,,"6(?:[0-689]|7\\d)\\d{6,7}",,,,,,,[8,9,10]
]
,[,,"800\\d{3,9}"]
,[,,"(?:78\\d|90[0169])\\d{3,7}",,,,,,,[6,7,8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RS",381,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"7[06]\\d{4,10}"]
,,,[,,,,,,,,,[-1]
]
]
,"RU":[,[,,"[347-9]\\d{9}",,,,,,,[10]
,[7]
]
,[,,"(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-79]|7[1-37-9]))\\d{7}",,,,,,,,[7]
]
,[,,"9\\d{9}"]
,[,,"80[04]\\d{7}"]
,[,,"80[39]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,"808\\d{7}"]
,[,,,,,,,,,[-1]
]
,"RU",7,"810","8",,,"8",,"8~10",,[[,"(\\d{3})(\\d{2})(\\d{2})","$1-$2-$3",["[0-79]"]
]
,[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"]
,"8 ($1)",,1]
,[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[3489]"]
,"8 ($1)",,1]
]
,[[,"(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-6]2|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-6]2|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"]
,"8 ($1)",,1]
,[,"(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"8 ($1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[3489]"]
,"8 ($1)",,1]
]
,[,,,,,,,,,[-1]
]
,1,"3[04-689]|[489]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"RW":[,[,,"(?:06|[27]\\d\\d|[89]00)\\d{6}",,,,,,,[8,9]
]
,[,,"(?:06|2[23568]\\d)\\d{6}"]
,[,,"7[238]\\d{7}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"900\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"RW",250,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SA":[,[,,"92\\d{7}|(?:[15]|8\\d)\\d{8}",,,,,,,[9,10]
,[7]
]
,[,,"1(?:1\\d|2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}",,,,,,,[9]
,[7]
]
,[,,"5(?:[013-689]\\d|7[0-36-8])\\d{6}",,,,,,,[9]
]
,[,,"800\\d{7}",,,,,,,[10]
]
,[,,"925\\d{6}",,,,,,,[9]
]
,[,,"920\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SA",966,"00","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["9"]
]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
]
,,[,,,,,,,,,[-1]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1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SD",249,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SE":[,[,,"(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",,,,,,,[6,7,8,9,10,12]
]
,[,,"(?:(?:[12][136]|3[356]|4[0246]|6[03]|8\\d)\\d|90[1-9])\\d{4,6}|(?:1(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)|2(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])|3(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])|4(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])|6(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])|9(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8]))\\d{5,6}",,,,,,,[7,8,9]
]
,[,,"7[02369]\\d{7}",,,,,,,[9]
]
,[,,"20\\d{4,7}",,,,,,,[6,7,8,9]
]
,[,,"649\\d{6}|9(?:00|39|44)[1-8]\\d{3,6}",,,,,,,[7,8,9,10]
]
,[,,"77[0-7]\\d{6}",,,,,,,[9]
]
,[,,"75[1-8]\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,"SE",46,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44)"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"]
,"0$1"]
,[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
,"0$1"]
,[,"(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"]
,"0$1"]
,[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"]
,"0$1"]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"]
,"0$1"]
]
,[[,"(\\d{2})(\\d{2,3})(\\d{2})","$1 $2 $3",["20"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["9(?:00|39|44)"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"]
]
,[,"(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{2})","$1 $2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
]
,[,"(\\d{3})(\\d{2,3})(\\d{3})","$1 $2 $3",["9(?:00|39|44)"]
]
,[,"(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["10|7"]
]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"]
]
,[,"(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["9"]
]
,[,"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]"]
]
]
,[,,"74[02-9]\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
,[,,"10[1-8]\\d{6}",,,,,,,[9]
]
,,,[,,"(?:25[245]|67[3-68])\\d{9}",,,,,,,[12]
]
]
,"SG":[,[,,"(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",,,,,,,[8,10,11]
]
,[,,"662[0-24-9]\\d{4}|6(?:[1-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}",,,,,,,[8]
]
,[,,"(?:8(?:[1-8]\\d\\d|9(?:[014]\\d|2[1-9]|3[0-489]))|9[0-8]\\d\\d)\\d{4}",,,,,,,[8]
]
,[,,"(?:18|8)00\\d{7}",,,,,,,[10,11]
]
,[,,"1900\\d{7}",,,,,,,[11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:3[12]\\d|666)\\d{5}",,,,,,,[8]
]
,"SG",65,"0[0-3]\\d",,,,,,,,[[,"(\\d{4,5})","$1",["1[013-9]|77","1(?:[013-8]|9(?:0[1-9]|[1-9]))|77"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
,[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,[[,"(\\d{4})(\\d{4})","$1 $2",["[369]|8[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]
]
,[,"(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]
]
,[,"(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"7000\\d{7}",,,,,,,[11]
]
,,,[,,,,,,,,,[-1]
]
]
,"SH":[,[,,"(?:[256]\\d|8)\\d{3}",,,,,,,[4,5]
]
,[,,"2(?:[0-57-9]\\d|6[4-9])\\d\\d"]
,[,,"[56]\\d{4}",,,,,,,[5]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"262\\d\\d",,,,,,,[5]
]
,"SH",290,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,1,"[256]",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SI":[,[,,"[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",,,,,,,[5,6,7,8]
]
,[,,"(?:[1-357][2-8]|4[24-8])\\d{6}",,,,,,,[8]
,[7]
]
,[,,"65(?:1\\d|55|[67]0)\\d{4}|(?:[37][01]|4[0139]|51|6[489])\\d{6}",,,,,,,[8]
]
,[,,"80\\d{4,6}",,,,,,,[6,7,8]
]
,[,,"89[1-3]\\d{2,5}|90\\d{4,6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"(?:59\\d\\d|8(?:1(?:[67]\\d|8[01389])|2(?:0\\d|2[0378]|8[0-2489])|3[389]\\d))\\d{4}",,,,,,,[8]
]
,"SI",386,"00|10(?:22|66|88|99)","0",,,"0",,"00",,[[,"(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"]
,"0$1"]
,[,"(\\d{3})(\\d{5})","$1 $2",["59|8"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SJ":[,[,,"0\\d{4}|(?:[4589]\\d|79)\\d{6}",,,,,,,[5,8]
]
,[,,"79\\d{6}",,,,,,,[8]
]
,[,,"(?:4[015-8]|5[89]|9\\d)\\d{6}",,,,,,,[8]
]
,[,,"80[01]\\d{5}",,,,,,,[8]
]
,[,,"82[09]\\d{5}",,,,,,,[8]
]
,[,,"810(?:0[0-6]|[2-8]\\d)\\d{3}",,,,,,,[8]
]
,[,,"880\\d{5}",,,,,,,[8]
]
,[,,"85[0-5]\\d{5}",,,,,,,[8]
]
,"SJ",47,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"79",[,,,,,,,,,[-1]
]
,[,,"(?:0[2-9]|81(?:0(?:0[7-9]|1\\d)|5\\d\\d))\\d{3}"]
,,,[,,"81[23]\\d{5}",,,,,,,[8]
]
]
,"SK":[,[,,"[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",,,,,,,[6,7,9]
]
,[,,"(?:2(?:16|[2-9]\\d{3})|(?:(?:[3-5][1-8]\\d|819)\\d|601[1-5])\\d)\\d{4}|(?:2|[3-5][1-8])1[67]\\d{3}|[3-5][1-8]16\\d\\d"]
,[,,"909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}",,,,,,,[9]
]
,[,,"800\\d{6}",,,,,,,[9]
]
,[,,"9(?:00|[78]\\d)\\d{6}",,,,,,,[9]
]
,[,,"8[5-9]\\d{7}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"6(?:02|5[0-4]|9[0-6])\\d{6}",,,,,,,[9]
]
,"SK",421,"00","0",,,"0",,,,[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"]
,"0$1"]
,[,"(\\d{4})(\\d{3})","$1 $2",["909","9090"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"]
,"0$1"]
]
,[[,"(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"]
,"0$1"]
,[,"(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"]
,"0$1"]
]
,[,,"9090\\d{3}",,,,,,,[7]
]
,,,[,,"9090\\d{3}|(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}",,,,,,,[7,9]
]
,[,,"96\\d{7}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"SL":[,[,,"(?:[2378]\\d|66|99)\\d{6}",,,,,,,[8]
,[6]
]
,[,,"22[2-4][2-9]\\d{4}",,,,,,,,[6]
]
,[,,"(?:25|3[013-5]|66|7[5-9]|8[08]|99)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SL",232,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{6})","$1 $2",["[236-9]"]
,"(0$1)"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SM":[,[,,"(?:0549|[5-7]\\d)\\d{6}",,,,,,,[8,10]
,[6]
]
,[,,"0549(?:8[0157-9]|9\\d)\\d{4}",,,,,,,[10]
,[6]
]
,[,,"6[16]\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,"7[178]\\d{6}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"5[158]\\d{6}",,,,,,,[8]
]
,"SM",378,"00",,,,"([89]\\d{5})$","0549$1",,,[[,"(\\d{6})","$1",["[89]"]
]
,[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["0"]
]
]
,[[,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]
]
,[,"(\\d{4})(\\d{6})","$1 $2",["0"]
]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SN":[,[,,"(?:[378]\\d{4}|93330)\\d{4}",,,,,,,[9]
]
,[,,"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}"]
,[,,"7(?:[06-8]\\d|21|90)\\d{6}"]
,[,,"800\\d{6}"]
,[,,"88[4689]\\d{6}"]
,[,,"81[02468]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"93330\\d{4}|3(?:392|9[01]\\d)\\d{5}"]
,"SN",221,"00",,,,,,,,[[,"(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]
]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SO":[,[,,"[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",,,,,,,[6,7,8,9]
]
,[,,"(?:1\\d|2[0-79]|3[0-46-8]|4[0-7]|5[57-9])\\d{5}|(?:[134]\\d|8[125])\\d{4}",,,,,,,[6,7]
]
,[,,"28\\d{5}|(?:6[1-9]|79)\\d{6,7}|(?:15|24|(?:3[59]|4[89]|8[08])\\d|60|7[1-8]|9(?:0\\d|[2-9]))\\d{6}",,,,,,,[7,8,9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SO",252,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{4})","$1 $2",["8[125]"]
]
,[,"(\\d{6})","$1",["[134]"]
]
,[,"(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]
]
,[,"(\\d)(\\d{7})","$1 $2",["24|[67]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3478]|64|90"]
]
,[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-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"ST",239,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[29]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SV":[,[,,"[267]\\d{7}|[89]00\\d{4}(?:\\d{4})?",,,,,,,[7,8,11]
]
,[,,"2(?:[1-6]\\d{3}|[79]90[034]|890[0245])\\d{3}",,,,,,,[8]
]
,[,,"66(?:[02-9]\\d\\d|1(?:[02-9]\\d|16))\\d{3}|(?:6[0-57-9]|7\\d)\\d{6}",,,,,,,[8]
]
,[,,"800\\d{4}(?:\\d{4})?",,,,,,,[7,11]
]
,[,,"900\\d{4}(?:\\d{4})?",,,,,,,[7,11]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SV",503,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[89]"]
]
,[,"(\\d{4})(\\d{4})","$1 $2",["[267]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SX":[,[,,"7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"7215(?:4[2-8]|8[239]|9[056])\\d{4}",,,,,,,,[7]
]
,[,,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"SX",1,"011","1",,,"1|(5\\d{6})$","721$1",,,,,[,,,,,,,,,[-1]
]
,,"721",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SY":[,[,,"[1-39]\\d{8}|[1-5]\\d{7}",,,,,,,[8,9]
,[6,7]
]
,[,,"21\\d{6,7}|(?:1(?:[14]\\d|[2356])|2[235]|3(?:[13]\\d|4)|4[134]|5[1-3])\\d{6}",,,,,,,,[6,7]
]
,[,,"9(?:22|[3-589]\\d|6[02-9])\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"SY",963,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1",,1]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"SZ":[,[,,"0800\\d{4}|(?:[237]\\d|900)\\d{6}",,,,,,,[8,9]
]
,[,,"[23][2-5]\\d{6}",,,,,,,[8]
]
,[,,"7[6-9]\\d{6}",,,,,,,[8]
]
,[,,"0800\\d{4}",,,,,,,[8]
]
,[,,"900\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"70\\d{6}",,,,,,,[8]
]
,"SZ",268,"00",,,,,,,,[[,"(\\d{4})(\\d{4})","$1 $2",["[0237]"]
]
,[,"(\\d{5})(\\d{4})","$1 $2",["9"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"0800\\d{4}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TA":[,[,,"8\\d{3}",,,,,,,[4]
]
,[,,"8\\d{3}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TA",290,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"8",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TC":[,[,,"(?:[58]\\d\\d|649|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"649(?:266|712|9(?:4\\d|50))\\d{4}",,,,,,,,[7]
]
,[,,"649(?:2(?:3[129]|4[1-79])|3\\d\\d|4[34][1-3])\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,"649(?:71[01]|966)\\d{4}",,,,,,,,[7]
]
,"TC",1,"011","1",,,"1|([2-479]\\d{6})$","649$1",,,,,[,,,,,,,,,[-1]
]
,,"649",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TD":[,[,,"(?:22|[69]\\d|77)\\d{6}",,,,,,,[8]
]
,[,,"22(?:[37-9]0|5[0-5]|6[89])\\d{4}"]
,[,,"(?:6[023568]|77|9\\d)\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
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{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TN",216,"00",,,,,,,,[[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TO":[,[,,"(?:0800|[5-8]\\d{3})\\d{3}|[2-8]\\d{4}",,,,,,,[5,7]
]
,[,,"(?:2\\d|3[0-8]|4[0-4]|50|6[09]|7[0-24-69]|8[05])\\d{3}",,,,,,,[5]
]
,[,,"6(?:3[02]|8[5-9])\\d{4}|(?:6[09]|7\\d|8[46-9])\\d{5}",,,,,,,[7]
]
,[,,"0800\\d{3}",,,,,,,[7]
]
,[,,"55[04]\\d{4}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TO",676,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]
]
,[,"(\\d{4})(\\d{3})","$1 $2",["0"]
]
,[,"(\\d{3})(\\d{4})","$1 $2",["[5-8]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TR":[,[,,"(?:4|8\\d{5})\\d{6}|(?:[2-58]\\d\\d|900)\\d{7}",,,,,,,[7,10,12]
]
,[,,"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}",,,,,,,[10]
]
,[,,"56161\\d{5}|5(?:0[15-7]|1[06]|24|[34]\\d|5[1-59]|9[46])\\d{7}",,,,,,,[10]
]
,[,,"800\\d{7}(?:\\d{2})?",,,,,,,[10,12]
]
,[,,"(?:8[89]8|900)\\d{7}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,[,,"592(?:21[12]|461)\\d{4}",,,,,,,[10]
]
,[,,,,,,,,,[-1]
]
,"TR",90,"00","0",,,"0",,,,[[,"(\\d{3})(\\d)(\\d{3})","$1 $2 $3",["444"]
,,,1]
,[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[0589]|90"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"]
,"(0$1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{6})","$1 $2 $3",["80"]
,"0$1",,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[0589]|90"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|616)","5(?:[0-59]|6161)"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"]
,"(0$1)",,1]
,[,"(\\d{3})(\\d{3})(\\d{6})","$1 $2 $3",["80"]
,"0$1",,1]
]
,[,,"512\\d{7}",,,,,,,[10]
]
,,,[,,"444\\d{4}",,,,,,,[7]
]
,[,,"(?:444|850\\d{3})\\d{4}",,,,,,,[7,10]
]
,,,[,,,,,,,,,[-1]
]
]
,"TT":[,[,,"(?:[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"868(?:2(?:0[13]|1[89]|[23]\\d|4[0-2])|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}",,,,,,,,[7]
]
,[,,"868(?:2(?:6[3-9]|[7-9]\\d)|(?:3\\d|4[6-9])\\d|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"TT",1,"011","1",,,"1|([2-46-8]\\d{6})$","868$1",,,,,[,,,,,,,,,[-1]
]
,,"868",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"868619\\d{4}",,,,,,,,[7]
]
]
,"TV":[,[,,"(?:2|7\\d\\d|90)\\d{4}",,,,,,,[5,6,7]
]
,[,,"2[02-9]\\d{3}",,,,,,,[5]
]
,[,,"(?:7[01]\\d|90)\\d{4}",,,,,,,[6,7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"TV",688,"00",,,,,,,,[[,"(\\d{2})(\\d{3})","$1 $2",["2"]
]
,[,"(\\d{2})(\\d{4})","$1 $2",["90"]
]
,[,"(\\d{2})(\\d{5})","$1 $2",["7"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"TW":[,[,,"[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",,,,,,,[7,8,9,10,11]
]
,[,,"(?:2[2-8]\\d|370|55[01]|7[1-9])\\d{6}|4(?:(?:0(?:0[1-9]|[2-48]\\d)|1[023]\\d)\\d{4,5}|(?:[239]\\d\\d|4(?:0[56]|12|49))\\d{5})|6(?:[01]\\d{7}|4(?:0[56]|12|24|4[09])\\d{4,5})|8(?:(?:2(?:3\\d|4[0-269]|[578]0|66)|36[24-9]|90\\d\\d)\\d{4}|4(?:0[56]|12|24|4[09])\\d{4,5})|(?:2(?:2(?:0\\d\\d|4(?:0[68]|[249]0|3[0-467]|5[0-25-9]|6[0235689]))|(?:3(?:[09]\\d|1[0-4])|(?:4\\d|5[0-49]|6[0-29]|7[0-5])\\d)\\d)|(?:(?:3[2-9]|5[2-8]|6[0-35-79]|8[7-9])\\d\\d|4(?:2(?:[089]\\d|7[1-9])|(?:3[0-4]|[78]\\d|9[01])\\d))\\d)\\d{3}",,,,,,,[8,9]
]
,[,,"(?:40001[0-2]|9[0-8]\\d{4})\\d{3}",,,,,,,[9]
]
,[,,"80[0-79]\\d{6}|800\\d{5}",,,,,,,[8,9]
]
,[,,"20(?:[013-9]\\d\\d|2)\\d{4}",,,,,,,[7,9]
]
,[,,,,,,,,,[-1]
]
,[,,"99\\d{7}",,,,,,,[9]
]
,[,,"7010(?:[0-2679]\\d|3[0-7]|8[0-5])\\d{5}|70\\d{8}",,,,,,,[10,11]
]
,"TW",886,"0(?:0[25-79]|19)","0","#",,"0",,,,[[,"(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"]
,"0$1"]
,[,"(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]
,"0$1"]
,[,"(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"50[0-46-9]\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"TZ":[,[,,"(?:[26-8]\\d|41|90)\\d{7}",,,,,,,[9]
]
,[,,"2[2-8]\\d{7}"]
,[,,"77[2-9]\\d{6}|(?:6[2-9]|7[13-689])\\d{7}"]
,[,,"80[08]\\d{6}"]
,[,,"90\\d{7}"]
,[,,"8(?:40|6[01])\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"41\\d{7}"]
,"TZ",255,"00[056]","0",,,"0",,,,[[,"(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,"(?:8(?:[04]0|6[01])|90\\d)\\d{6}"]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UA":[,[,,"[89]\\d{9}|[3-9]\\d{8}",,,,,,,[9,10]
,[5,6,7]
]
,[,,"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}",,,,,,,[9]
,[5,6,7]
]
,[,,"(?:50|6[36-8]|7[1-3]|9[1-9])\\d{7}",,,,,,,[9]
]
,[,,"800[1-8]\\d{5,6}"]
,[,,"900[239]\\d{5,6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"89[1-579]\\d{6}",,,,,,,[9]
]
,"UA",380,"00","0",,,"0",,"0~0",,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["4[45][0-5]|5(?:0|6[37])|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]","4[45][0-5]|5(?:0|6(?:3[14-7]|7))|6(?:[12][018]|[36-8])|7|89|9[1-9]|(?:48|57)[0137-9]"]
,"0$1"]
,[,"(\\d{4})(\\d{5})","$1 $2",["[3-6]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UG":[,[,,"800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",,,,,,,[9]
,[5,6,7]
]
,[,,"20(?:(?:(?:24|81)0|30[67])\\d|6(?:00[0-2]|30[0-4]))\\d{3}|(?:20(?:[0147]\\d|2[5-9]|32|5[0-4]|6[15-9])|[34]\\d{3})\\d{5}",,,,,,,,[5,6,7]
]
,[,,"7260\\d{5}|7(?:[0157-9]\\d|20|36|4[0-4])\\d{6}"]
,[,,"800[1-3]\\d{5}"]
,[,,"90[1-3]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UG",256,"00[057]","0",,,"0",,,,[[,"(\\d{4})(\\d{5})","$1 $2",["202","2024"]
,"0$1"]
,[,"(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[34]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"US":[,[,,"[2-9]\\d{9}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[167]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[0179]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"US",1,"011","1",,,"1",,,1,[[,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"]
,,,1]
]
,[[,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[2-9]"]
]
]
,[,,,,,,,,,[-1]
]
,1,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UY":[,[,,"(?:[249]\\d\\d|80)\\d{5}|9\\d{6}",,,,,,,[7,8]
]
,[,,"(?:2\\d|4[2-7])\\d{6}",,,,,,,[8]
,[7]
]
,[,,"9[1-9]\\d{6}",,,,,,,[8]
]
,[,,"80[05]\\d{4}",,,,,,,[7]
]
,[,,"90[0-8]\\d{4}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UY",598,"0(?:0|1[3-9]\\d)","0"," int. ",,"0",,"00",,[[,"(\\d{3})(\\d{4})","$1 $2",["8|90"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"]
,"0$1"]
,[,"(\\d{4})(\\d{4})","$1 $2",["[24]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"UZ":[,[,,"(?:[679]\\d|88)\\d{7}",,,,,,,[9]
]
,[,,"(?:6(?:1(?:22|3[124]|4[1-4]|5[1-3578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|6\\d\\d|7(?:[23]\\d|7[69])|9(?:22|4[1-8]|6[135]))|7(?:0(?:5[4-9]|6[0146]|7[124-6]|9[135-8])|(?:1[12]|8\\d)\\d|2(?:22|3[13-57-9]|4[1-3579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|6(?:22|3[12457]|4[13-8])|9(?:22|5[1-9])))\\d{5}"]
,[,,"(?:6(?:1(?:2(?:2[01]|98)|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:(?:11|7\\d)\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4]))|5(?:19[01]|2(?:27|9[26])|(?:30|59|7\\d)\\d)|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|(?:3[79]|9[0-3])\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79]))|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079]))|9(?:2(?:1[1267]|3[01]|5\\d|7[0-4])|(?:5[67]|7\\d)\\d|6(?:2[0-26]|8\\d)))|7(?:[07]\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|(?:33|9[4-6])\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078]))|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0-27]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|6(?:2(?:2[1245]|4[2-4])|39\\d|41[179]|5(?:[349]\\d|5[0-2])|7(?:0[017]|[13]\\d|22|44|55|67|88))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[02569]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07])))|(?:88|9[0-57-9])\\d{3})\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"UZ",998,"810","8",,,"8",,"8~10",,[[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[6-9]"]
,"8 $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VA":[,[,,"0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",,,,,,,[6,7,8,9,10,11,12]
]
,[,,"06698\\d{1,6}",,,,,,,[6,7,8,9,10,11]
]
,[,,"3[1-9]\\d{8}|3[2-9]\\d{7}",,,,,,,[9,10]
]
,[,,"80(?:0\\d{3}|3)\\d{3}",,,,,,,[6,9]
]
,[,,"(?:0878\\d\\d|89(?:2|4[5-9]\\d))\\d{3}|89[45][0-4]\\d\\d|(?:1(?:44|6[346])|89(?:5[5-9]|9))\\d{6}",,,,,,,[6,8,9,10]
]
,[,,"84(?:[08]\\d{3}|[17])\\d{3}",,,,,,,[6,9]
]
,[,,"1(?:78\\d|99)\\d{6}",,,,,,,[9,10]
]
,[,,"55\\d{8}",,,,,,,[10]
]
,"VA",39,"00",,,,,,,,,,[,,,,,,,,,[-1]
]
,,"06698",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"3[2-8]\\d{9,10}",,,,,,,[11,12]
]
]
,"VC":[,[,,"(?:[58]\\d\\d|784|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"784(?:266|3(?:6[6-9]|7\\d|8[0-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}",,,,,,,,[7]
]
,[,,"784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4])|720)\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"VC",1,"011","1",,,"1|([2-7]\\d{6})$","784$1",,,,,[,,,,,,,,,[-1]
]
,,"784",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VE":[,[,,"[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",,,,,,,[10]
,[7]
]
,[,,"(?:2(?:12|3[457-9]|[467]\\d|[58][1-9]|9[1-6])|[4-6]00)\\d{7}",,,,,,,,[7]
]
,[,,"4(?:1[24-8]|2[46])\\d{7}"]
,[,,"800\\d{7}"]
,[,,"90[01]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"VE",58,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{7})","$1-$2",["[24-689]"]
,"0$1","$CC $1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"501\\d{7}",,,,,,,,[7]
]
,,,[,,,,,,,,,[-1]
]
]
,"VG":[,[,,"(?:284|[58]\\d\\d|900)\\d{7}",,,,,,,[10]
,[7]
]
,[,,"284496[0-5]\\d{3}|284(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}",,,,,,,,[7]
]
,[,,"284496[6-9]\\d{3}|284(?:245|3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|99)|5(?:4[0-7]|68|9[69]))\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"VG",1,"011","1",,,"1|([2-578]\\d{6})$","284$1",,,,,[,,,,,,,,,[-1]
]
,,"284",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VI":[,[,,"[58]\\d{9}|(?:34|90)0\\d{7}",,,,,,,[10]
,[7]
]
,[,,"340(?:2(?:0[12]|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,,,,,[7]
]
,[,,"340(?:2(?:0[12]|2[06-8]|4[49]|77)|3(?:32|44)|4(?:2[23]|44|7[34]|89)|5(?:1[34]|55)|6(?:2[56]|4[23]|77|9[023])|7(?:1[2-57-9]|2[57]|7\\d)|884|998)\\d{4}",,,,,,,,[7]
]
,[,,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"]
,[,,"900[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,"52(?:35(?:[02-46-9]\\d|1[02-9]|5[0-46-9])|45(?:[034]\\d|1[02-9]|2[024-9]|5[0-46-9]))\\d{4}|52(?:3[2-46-9]|4[2-4])(?:[02-9]\\d|1[02-9])\\d{4}|5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}"]
,[,,,,,,,,,[-1]
]
,"VI",1,"011","1",,,"1|([2-9]\\d{6})$","340$1",,1,,,[,,,,,,,,,[-1]
]
,,"340",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"VN":[,[,,"[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",,,,,,,[7,8,9,10]
]
,[,,"2(?:0[3-9]|1[0-689]|2[0-25-9]|3[2-9]|4[2-8]|5[124-9]|6[0-39]|7[0-7]|8[2-79]|9[0-4679])\\d{7}",,,,,,,[10]
]
,[,,"(?:52[238]|89[689]|99[013-9])\\d{6}|(?:3\\d|5[689]|7[06-9]|8[1-8]|9[0-8])\\d{7}",,,,,,,[9]
]
,[,,"1800\\d{4,6}|12(?:03|28)\\d{4}",,,,,,,[8,9,10]
]
,[,,"1900\\d{4,6}",,,,,,,[8,9,10]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"672\\d{6}",,,,,,,[9]
]
,"VN",84,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[17]99"]
,"0$1",,1]
,[,"(\\d{2})(\\d{5})","$1 $2",["80"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4,5})","$1 $2",["69"]
,"0$1",,1]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["1"]
,,,1]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"]
,"0$1",,1]
]
,[[,"(\\d{2})(\\d{5})","$1 $2",["80"]
,"0$1",,1]
,[,"(\\d{4})(\\d{4,6})","$1 $2",["1"]
,,,1]
,[,"(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[69]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[3578]"]
,"0$1",,1]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"]
,"0$1",,1]
,[,"(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"]
,"0$1",,1]
]
,[,,,,,,,,,[-1]
]
,,,[,,"[17]99\\d{4}|69\\d{5,6}",,,,,,,[7,8]
]
,[,,"(?:[17]99|80\\d)\\d{4}|69\\d{5,6}",,,,,,,[7,8]
]
,,,[,,,,,,,,,[-1]
]
]
,"VU":[,[,,"(?:[23]\\d|[48]8)\\d{3}|(?:[57]\\d|90)\\d{5}",,,,,,,[5,7]
]
,[,,"(?:38[0-8]|48[4-9])\\d\\d|(?:2[02-9]|3[4-7]|88)\\d{3}",,,,,,,[5]
]
,[,,"(?:5\\d|7[013-7])\\d{5}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"90[1-9]\\d{4}",,,,,,,[7]
]
,"VU",678,"00",,,,,,,,[[,"(\\d{3})(\\d{4})","$1 $2",["[579]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"(?:3[03]|900\\d)\\d{3}"]
,,,[,,,,,,,,,[-1]
]
]
,"WF":[,[,,"(?:[45]0|68|72|8\\d)\\d{4}",,,,,,,[6]
]
,[,,"(?:50|68|72)\\d{4}"]
,[,,"(?:50|68|72|8[23])\\d{4}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"WF",681,"00",,,,,,,,[[,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[4-8]"]
]
]
,,[,,,,,,,,,[-1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1|7\\d)\\d{7}|[1-7]\\d{6}",,,,,,,[7,8,9]
,[6]
]
,[,,"78[0-7]\\d{4}|17\\d{6}|(?:[12][2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-6])\\d{5}",,,,,,,[7,8]
,[6]
]
,[,,"7[0137]\\d{7}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"YE",967,"00","0",,,"0",,,,[[,"(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"YT":[,[,,"80\\d{7}|(?:26|63)9\\d{6}",,,,,,,[9]
]
,[,,"269(?:0[67]|5[0-2]|6\\d|[78]0)\\d{4}"]
,[,,"639(?:0[0-79]|1[019]|[267]\\d|3[09]|[45]0|9[04-79])\\d{4}"]
,[,,"80\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"YT",262,"00","0",,,"0",,,,,,[,,,,,,,,,[-1]
]
,,"269|63",[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZA":[,[,,"[1-9]\\d{8}|8\\d{4,7}",,,,,,,[5,6,7,8,9]
]
,[,,"(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}",,,,,,,[9]
]
,[,,"(?:1(?:3492[0-25]|4495[0235]|549(?:20|5[01]))|4[34]492[01])\\d{3}|8[1-4]\\d{3,7}|(?:2[27]|47|54)4950\\d{3}|(?:1(?:049[2-4]|9[12]\\d\\d)|(?:6\\d|7[0-46-9])\\d{3}|8(?:5\\d{3}|7(?:08[67]|158|28[5-9]|310)))\\d{4}|(?:1[6-8]|28|3[2-69]|4[025689]|5[36-8])4920\\d{3}|(?:12|[2-5]1)492\\d{4}"]
,[,,"80\\d{7}",,,,,,,[9]
]
,[,,"(?:86[2-9]|9[0-2]\\d)\\d{6}",,,,,,,[9]
]
,[,,"860\\d{6}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"87(?:08[0-589]|15[0-79]|28[0-4]|31[1-9])\\d{4}|87(?:[02][0-79]|1[0-46-9]|3[02-9]|[4-9]\\d)\\d{5}",,,,,,,[9]
]
,"ZA",27,"00","0",,,"0",,,,[[,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,"861\\d{6}",,,,,,,[9]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZM":[,[,,"(?:63|80)0\\d{6}|(?:21|[79]\\d)\\d{7}",,,,,,,[9]
,[6]
]
,[,,"21[1-8]\\d{6}",,,,,,,,[6]
]
,[,,"(?:7[679]|9[5-8])\\d{7}"]
,[,,"800\\d{6}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"630\\d{6}"]
,"ZM",260,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[1-9]"]
]
,[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[79]"]
,"0$1"]
]
,[[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["[79]"]
,"0$1"]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"ZW":[,[,,"2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",,,,,,,[5,6,7,8,9,10]
,[3,4]
]
,[,,"(?:1(?:(?:3\\d|9)\\d|[4-8])|2(?:(?:(?:0(?:2[014]|5)|(?:2[0157]|31|84|9)\\d\\d|[56](?:[14]\\d\\d|20)|7(?:[089]|2[03]|[35]\\d\\d))\\d|4(?:2\\d\\d|8))\\d|1(?:2|[39]\\d{4}))|3(?:(?:123|(?:29\\d|92)\\d)\\d\\d|7(?:[19]|[56]\\d))|5(?:0|1[2-478]|26|[37]2|4(?:2\\d{3}|83)|5(?:25\\d\\d|[78])|[689]\\d)|6(?:(?:[16-8]21|28|52[013])\\d\\d|[39])|8(?:[1349]28|523)\\d\\d)\\d{3}|(?:4\\d\\d|9[2-9])\\d{4,5}|(?:(?:2(?:(?:(?:0|8[146])\\d|7[1-7])\\d|2(?:[278]\\d|92)|58(?:2\\d|3))|3(?:[26]|9\\d{3})|5(?:4\\d|5)\\d\\d)\\d|6(?:(?:(?:[0-246]|[78]\\d)\\d|37)\\d|5[2-8]))\\d\\d|(?:2(?:[569]\\d|8[2-57-9])|3(?:[013-59]\\d|8[37])|6[89]8)\\d{3}",,,,,,,,[3,4]
]
,[,,"7(?:[17]\\d|[38][1-9])\\d{6}",,,,,,,[9]
]
,[,,"80(?:[01]\\d|20|8[0-8])\\d{3}",,,,,,,[7]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"86(?:1[12]|22|30|44|55|77|8[368])\\d{6}",,,,,,,[10]
]
,"ZW",263,"00","0",,,"0",,,,[[,"(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"]
,"0$1"]
,[,"(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"]
,"0$1"]
,[,"(\\d{3})(\\d{4})","$1 $2",["80"]
,"0$1"]
,[,"(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"]
,"(0$1)"]
,[,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"]
,"0$1"]
,[,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"]
,"0$1"]
,[,"(\\d{4})(\\d{6})","$1 $2",["8"]
,"0$1"]
,[,"(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"]
,"0$1"]
,[,"(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"]
,"0$1"]
,[,"(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"]
,"0$1"]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"800":[,[,,"[1-9]\\d{7}",,,,,,,[8]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"[1-9]\\d{7}"]
,[,,,,,,,,,[-1]
]
,[,,,,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,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"881":[,[,,"[0-36-9]\\d{8}",,,,,,,[9]
]
,[,,,,,,,,,[-1]
]
,[,,"[0-36-9]\\d{8}"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,"001",881,,,,,,,,,[[,"(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-36-9]"]
]
]
,,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
,"882":[,[,,"[13]\\d{6}(?:\\d{2,5})?|285\\d{9}|[19]\\d{7}",,,,,,,[7,8,9,10,11,12]
]
,[,,,,,,,,,[-1]
]
,[,,"3(?:37\\d\\d|42)\\d{4}|3(?:2|47|7\\d{3})\\d{7}",,,,,,,[7,9,10,12]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,[,,"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:(?:285\\d\\d|3(?:45|[69]\\d{3}))\\d|9[89])\\d{6}"]
,"001",882,,,,,,,,,[[,"(\\d{2})(\\d{5})","$1 $2",["16|342"]
]
,[,"(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[19]"]
]
,[,"(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]
]
,[,"(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1"]
]
,[,"(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["34[57]"]
]
,[,"(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]
]
,[,"(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-3]"]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,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,[,,,,,,,,,[-1]
]
]
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/metadatalite.js
|
JavaScript
|
unknown
| 221,727
|
/**
* @license
* Protocol Buffer 2 Copyright 2008 Google Inc.
* All other code copyright its respective owners.
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated Protocol Buffer code for file
* phonemetadata.proto.
*/
goog.provide('i18n.phonenumbers.NumberFormat');
goog.provide('i18n.phonenumbers.PhoneNumberDesc');
goog.provide('i18n.phonenumbers.PhoneMetadata');
goog.provide('i18n.phonenumbers.PhoneMetadataCollection');
goog.require('goog.proto2.Message');
/**
* Message NumberFormat.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.NumberFormat = function() {
goog.proto2.Message.call(this);
};
goog.inherits(i18n.phonenumbers.NumberFormat, goog.proto2.Message);
/**
* Descriptor for this message, deserialized lazily in getDescriptor().
* @private {?goog.proto2.Descriptor}
*/
i18n.phonenumbers.NumberFormat.descriptor_ = null;
/**
* Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
* @return {!i18n.phonenumbers.NumberFormat} The cloned message.
* @override
*/
i18n.phonenumbers.NumberFormat.prototype.clone;
/**
* Gets the value of the pattern field.
* @return {?string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getPattern = function() {
return /** @type {?string} */ (this.get$Value(1));
};
/**
* Gets the value of the pattern field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getPatternOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(1));
};
/**
* Sets the value of the pattern field.
* @param {string} value The value.
*/
i18n.phonenumbers.NumberFormat.prototype.setPattern = function(value) {
this.set$Value(1, value);
};
/**
* @return {boolean} Whether the pattern field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasPattern = function() {
return this.has$Value(1);
};
/**
* @return {number} The number of values in the pattern field.
*/
i18n.phonenumbers.NumberFormat.prototype.patternCount = function() {
return this.count$Values(1);
};
/**
* Clears the values in the pattern field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearPattern = function() {
this.clear$Field(1);
};
/**
* Gets the value of the format field.
* @return {?string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getFormat = function() {
return /** @type {?string} */ (this.get$Value(2));
};
/**
* Gets the value of the format field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getFormatOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(2));
};
/**
* Sets the value of the format field.
* @param {string} value The value.
*/
i18n.phonenumbers.NumberFormat.prototype.setFormat = function(value) {
this.set$Value(2, value);
};
/**
* @return {boolean} Whether the format field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasFormat = function() {
return this.has$Value(2);
};
/**
* @return {number} The number of values in the format field.
*/
i18n.phonenumbers.NumberFormat.prototype.formatCount = function() {
return this.count$Values(2);
};
/**
* Clears the values in the format field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearFormat = function() {
this.clear$Field(2);
};
/**
* Gets the value of the leading_digits_pattern field at the index given.
* @param {number} index The index to lookup.
* @return {?string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getLeadingDigitsPattern = function(index) {
return /** @type {?string} */ (this.get$Value(3, index));
};
/**
* Gets the value of the leading_digits_pattern field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getLeadingDigitsPatternOrDefault = function(index) {
return /** @type {string} */ (this.get$ValueOrDefault(3, index));
};
/**
* Adds a value to the leading_digits_pattern field.
* @param {string} value The value to add.
*/
i18n.phonenumbers.NumberFormat.prototype.addLeadingDigitsPattern = function(value) {
this.add$Value(3, value);
};
/**
* Returns the array of values in the leading_digits_pattern field.
* @return {!Array<string>} The values in the field.
*/
i18n.phonenumbers.NumberFormat.prototype.leadingDigitsPatternArray = function() {
return /** @type {!Array<string>} */ (this.array$Values(3));
};
/**
* @return {boolean} Whether the leading_digits_pattern field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasLeadingDigitsPattern = function() {
return this.has$Value(3);
};
/**
* @return {number} The number of values in the leading_digits_pattern field.
*/
i18n.phonenumbers.NumberFormat.prototype.leadingDigitsPatternCount = function() {
return this.count$Values(3);
};
/**
* Clears the values in the leading_digits_pattern field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearLeadingDigitsPattern = function() {
this.clear$Field(3);
};
/**
* Gets the value of the national_prefix_formatting_rule field.
* @return {?string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getNationalPrefixFormattingRule = function() {
return /** @type {?string} */ (this.get$Value(4));
};
/**
* Gets the value of the national_prefix_formatting_rule field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getNationalPrefixFormattingRuleOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(4));
};
/**
* Sets the value of the national_prefix_formatting_rule field.
* @param {string} value The value.
*/
i18n.phonenumbers.NumberFormat.prototype.setNationalPrefixFormattingRule = function(value) {
this.set$Value(4, value);
};
/**
* @return {boolean} Whether the national_prefix_formatting_rule field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasNationalPrefixFormattingRule = function() {
return this.has$Value(4);
};
/**
* @return {number} The number of values in the national_prefix_formatting_rule field.
*/
i18n.phonenumbers.NumberFormat.prototype.nationalPrefixFormattingRuleCount = function() {
return this.count$Values(4);
};
/**
* Clears the values in the national_prefix_formatting_rule field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearNationalPrefixFormattingRule = function() {
this.clear$Field(4);
};
/**
* Gets the value of the national_prefix_optional_when_formatting field.
* @return {?boolean} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getNationalPrefixOptionalWhenFormatting = function() {
return /** @type {?boolean} */ (this.get$Value(6));
};
/**
* Gets the value of the national_prefix_optional_when_formatting field or the default value if not set.
* @return {boolean} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getNationalPrefixOptionalWhenFormattingOrDefault = function() {
return /** @type {boolean} */ (this.get$ValueOrDefault(6));
};
/**
* Sets the value of the national_prefix_optional_when_formatting field.
* @param {boolean} value The value.
*/
i18n.phonenumbers.NumberFormat.prototype.setNationalPrefixOptionalWhenFormatting = function(value) {
this.set$Value(6, value);
};
/**
* @return {boolean} Whether the national_prefix_optional_when_formatting field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasNationalPrefixOptionalWhenFormatting = function() {
return this.has$Value(6);
};
/**
* @return {number} The number of values in the national_prefix_optional_when_formatting field.
*/
i18n.phonenumbers.NumberFormat.prototype.nationalPrefixOptionalWhenFormattingCount = function() {
return this.count$Values(6);
};
/**
* Clears the values in the national_prefix_optional_when_formatting field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearNationalPrefixOptionalWhenFormatting = function() {
this.clear$Field(6);
};
/**
* Gets the value of the domestic_carrier_code_formatting_rule field.
* @return {?string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getDomesticCarrierCodeFormattingRule = function() {
return /** @type {?string} */ (this.get$Value(5));
};
/**
* Gets the value of the domestic_carrier_code_formatting_rule field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.NumberFormat.prototype.getDomesticCarrierCodeFormattingRuleOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(5));
};
/**
* Sets the value of the domestic_carrier_code_formatting_rule field.
* @param {string} value The value.
*/
i18n.phonenumbers.NumberFormat.prototype.setDomesticCarrierCodeFormattingRule = function(value) {
this.set$Value(5, value);
};
/**
* @return {boolean} Whether the domestic_carrier_code_formatting_rule field has a value.
*/
i18n.phonenumbers.NumberFormat.prototype.hasDomesticCarrierCodeFormattingRule = function() {
return this.has$Value(5);
};
/**
* @return {number} The number of values in the domestic_carrier_code_formatting_rule field.
*/
i18n.phonenumbers.NumberFormat.prototype.domesticCarrierCodeFormattingRuleCount = function() {
return this.count$Values(5);
};
/**
* Clears the values in the domestic_carrier_code_formatting_rule field.
*/
i18n.phonenumbers.NumberFormat.prototype.clearDomesticCarrierCodeFormattingRule = function() {
this.clear$Field(5);
};
/**
* Message PhoneNumberDesc.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneNumberDesc = function() {
goog.proto2.Message.call(this);
};
goog.inherits(i18n.phonenumbers.PhoneNumberDesc, goog.proto2.Message);
/**
* Descriptor for this message, deserialized lazily in getDescriptor().
* @private {?goog.proto2.Descriptor}
*/
i18n.phonenumbers.PhoneNumberDesc.descriptor_ = null;
/**
* Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The cloned message.
* @override
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clone;
/**
* Gets the value of the national_number_pattern field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getNationalNumberPattern = function() {
return /** @type {?string} */ (this.get$Value(2));
};
/**
* Gets the value of the national_number_pattern field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getNationalNumberPatternOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(2));
};
/**
* Sets the value of the national_number_pattern field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.setNationalNumberPattern = function(value) {
this.set$Value(2, value);
};
/**
* @return {boolean} Whether the national_number_pattern field has a value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.hasNationalNumberPattern = function() {
return this.has$Value(2);
};
/**
* @return {number} The number of values in the national_number_pattern field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.nationalNumberPatternCount = function() {
return this.count$Values(2);
};
/**
* Clears the values in the national_number_pattern field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clearNationalNumberPattern = function() {
this.clear$Field(2);
};
/**
* Gets the value of the possible_length field at the index given.
* @param {number} index The index to lookup.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleLength = function(index) {
return /** @type {?number} */ (this.get$Value(9, index));
};
/**
* Gets the value of the possible_length field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleLengthOrDefault = function(index) {
return /** @type {number} */ (this.get$ValueOrDefault(9, index));
};
/**
* Adds a value to the possible_length field.
* @param {number} value The value to add.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.addPossibleLength = function(value) {
this.add$Value(9, value);
};
/**
* Returns the array of values in the possible_length field.
* @return {!Array<number>} The values in the field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.possibleLengthArray = function() {
return /** @type {!Array<number>} */ (this.array$Values(9));
};
/**
* @return {boolean} Whether the possible_length field has a value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.hasPossibleLength = function() {
return this.has$Value(9);
};
/**
* @return {number} The number of values in the possible_length field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.possibleLengthCount = function() {
return this.count$Values(9);
};
/**
* Clears the values in the possible_length field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clearPossibleLength = function() {
this.clear$Field(9);
};
/**
* Gets the value of the possible_length_local_only field at the index given.
* @param {number} index The index to lookup.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleLengthLocalOnly = function(index) {
return /** @type {?number} */ (this.get$Value(10, index));
};
/**
* Gets the value of the possible_length_local_only field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getPossibleLengthLocalOnlyOrDefault = function(index) {
return /** @type {number} */ (this.get$ValueOrDefault(10, index));
};
/**
* Adds a value to the possible_length_local_only field.
* @param {number} value The value to add.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.addPossibleLengthLocalOnly = function(value) {
this.add$Value(10, value);
};
/**
* Returns the array of values in the possible_length_local_only field.
* @return {!Array<number>} The values in the field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.possibleLengthLocalOnlyArray = function() {
return /** @type {!Array<number>} */ (this.array$Values(10));
};
/**
* @return {boolean} Whether the possible_length_local_only field has a value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.hasPossibleLengthLocalOnly = function() {
return this.has$Value(10);
};
/**
* @return {number} The number of values in the possible_length_local_only field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.possibleLengthLocalOnlyCount = function() {
return this.count$Values(10);
};
/**
* Clears the values in the possible_length_local_only field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clearPossibleLengthLocalOnly = function() {
this.clear$Field(10);
};
/**
* Gets the value of the example_number field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getExampleNumber = function() {
return /** @type {?string} */ (this.get$Value(6));
};
/**
* Gets the value of the example_number field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.getExampleNumberOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(6));
};
/**
* Sets the value of the example_number field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.setExampleNumber = function(value) {
this.set$Value(6, value);
};
/**
* @return {boolean} Whether the example_number field has a value.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.hasExampleNumber = function() {
return this.has$Value(6);
};
/**
* @return {number} The number of values in the example_number field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.exampleNumberCount = function() {
return this.count$Values(6);
};
/**
* Clears the values in the example_number field.
*/
i18n.phonenumbers.PhoneNumberDesc.prototype.clearExampleNumber = function() {
this.clear$Field(6);
};
/**
* Message PhoneMetadata.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneMetadata = function() {
goog.proto2.Message.call(this);
};
goog.inherits(i18n.phonenumbers.PhoneMetadata, goog.proto2.Message);
/**
* Descriptor for this message, deserialized lazily in getDescriptor().
* @private {?goog.proto2.Descriptor}
*/
i18n.phonenumbers.PhoneMetadata.descriptor_ = null;
/**
* Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
* @return {!i18n.phonenumbers.PhoneMetadata} The cloned message.
* @override
*/
i18n.phonenumbers.PhoneMetadata.prototype.clone;
/**
* Gets the value of the general_desc field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getGeneralDesc = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(1));
};
/**
* Gets the value of the general_desc field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getGeneralDescOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(1));
};
/**
* Sets the value of the general_desc field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setGeneralDesc = function(value) {
this.set$Value(1, value);
};
/**
* @return {boolean} Whether the general_desc field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasGeneralDesc = function() {
return this.has$Value(1);
};
/**
* @return {number} The number of values in the general_desc field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.generalDescCount = function() {
return this.count$Values(1);
};
/**
* Clears the values in the general_desc field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearGeneralDesc = function() {
this.clear$Field(1);
};
/**
* Gets the value of the fixed_line field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getFixedLine = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(2));
};
/**
* Gets the value of the fixed_line field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getFixedLineOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(2));
};
/**
* Sets the value of the fixed_line field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setFixedLine = function(value) {
this.set$Value(2, value);
};
/**
* @return {boolean} Whether the fixed_line field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasFixedLine = function() {
return this.has$Value(2);
};
/**
* @return {number} The number of values in the fixed_line field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.fixedLineCount = function() {
return this.count$Values(2);
};
/**
* Clears the values in the fixed_line field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearFixedLine = function() {
this.clear$Field(2);
};
/**
* Gets the value of the mobile field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getMobile = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(3));
};
/**
* Gets the value of the mobile field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getMobileOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(3));
};
/**
* Sets the value of the mobile field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setMobile = function(value) {
this.set$Value(3, value);
};
/**
* @return {boolean} Whether the mobile field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasMobile = function() {
return this.has$Value(3);
};
/**
* @return {number} The number of values in the mobile field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.mobileCount = function() {
return this.count$Values(3);
};
/**
* Clears the values in the mobile field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearMobile = function() {
this.clear$Field(3);
};
/**
* Gets the value of the toll_free field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getTollFree = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(4));
};
/**
* Gets the value of the toll_free field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getTollFreeOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(4));
};
/**
* Sets the value of the toll_free field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setTollFree = function(value) {
this.set$Value(4, value);
};
/**
* @return {boolean} Whether the toll_free field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasTollFree = function() {
return this.has$Value(4);
};
/**
* @return {number} The number of values in the toll_free field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.tollFreeCount = function() {
return this.count$Values(4);
};
/**
* Clears the values in the toll_free field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearTollFree = function() {
this.clear$Field(4);
};
/**
* Gets the value of the premium_rate field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPremiumRate = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(5));
};
/**
* Gets the value of the premium_rate field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPremiumRateOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(5));
};
/**
* Sets the value of the premium_rate field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setPremiumRate = function(value) {
this.set$Value(5, value);
};
/**
* @return {boolean} Whether the premium_rate field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasPremiumRate = function() {
return this.has$Value(5);
};
/**
* @return {number} The number of values in the premium_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.premiumRateCount = function() {
return this.count$Values(5);
};
/**
* Clears the values in the premium_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearPremiumRate = function() {
this.clear$Field(5);
};
/**
* Gets the value of the shared_cost field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSharedCost = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(6));
};
/**
* Gets the value of the shared_cost field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSharedCostOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(6));
};
/**
* Sets the value of the shared_cost field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setSharedCost = function(value) {
this.set$Value(6, value);
};
/**
* @return {boolean} Whether the shared_cost field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasSharedCost = function() {
return this.has$Value(6);
};
/**
* @return {number} The number of values in the shared_cost field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.sharedCostCount = function() {
return this.count$Values(6);
};
/**
* Clears the values in the shared_cost field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearSharedCost = function() {
this.clear$Field(6);
};
/**
* Gets the value of the personal_number field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPersonalNumber = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(7));
};
/**
* Gets the value of the personal_number field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPersonalNumberOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(7));
};
/**
* Sets the value of the personal_number field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setPersonalNumber = function(value) {
this.set$Value(7, value);
};
/**
* @return {boolean} Whether the personal_number field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasPersonalNumber = function() {
return this.has$Value(7);
};
/**
* @return {number} The number of values in the personal_number field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.personalNumberCount = function() {
return this.count$Values(7);
};
/**
* Clears the values in the personal_number field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearPersonalNumber = function() {
this.clear$Field(7);
};
/**
* Gets the value of the voip field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getVoip = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(8));
};
/**
* Gets the value of the voip field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getVoipOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(8));
};
/**
* Sets the value of the voip field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setVoip = function(value) {
this.set$Value(8, value);
};
/**
* @return {boolean} Whether the voip field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasVoip = function() {
return this.has$Value(8);
};
/**
* @return {number} The number of values in the voip field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.voipCount = function() {
return this.count$Values(8);
};
/**
* Clears the values in the voip field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearVoip = function() {
this.clear$Field(8);
};
/**
* Gets the value of the pager field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPager = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(21));
};
/**
* Gets the value of the pager field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPagerOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(21));
};
/**
* Sets the value of the pager field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setPager = function(value) {
this.set$Value(21, value);
};
/**
* @return {boolean} Whether the pager field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasPager = function() {
return this.has$Value(21);
};
/**
* @return {number} The number of values in the pager field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.pagerCount = function() {
return this.count$Values(21);
};
/**
* Clears the values in the pager field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearPager = function() {
this.clear$Field(21);
};
/**
* Gets the value of the uan field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getUan = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(25));
};
/**
* Gets the value of the uan field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getUanOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(25));
};
/**
* Sets the value of the uan field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setUan = function(value) {
this.set$Value(25, value);
};
/**
* @return {boolean} Whether the uan field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasUan = function() {
return this.has$Value(25);
};
/**
* @return {number} The number of values in the uan field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.uanCount = function() {
return this.count$Values(25);
};
/**
* Clears the values in the uan field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearUan = function() {
this.clear$Field(25);
};
/**
* Gets the value of the emergency field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getEmergency = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(27));
};
/**
* Gets the value of the emergency field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getEmergencyOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(27));
};
/**
* Sets the value of the emergency field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setEmergency = function(value) {
this.set$Value(27, value);
};
/**
* @return {boolean} Whether the emergency field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasEmergency = function() {
return this.has$Value(27);
};
/**
* @return {number} The number of values in the emergency field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.emergencyCount = function() {
return this.count$Values(27);
};
/**
* Clears the values in the emergency field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearEmergency = function() {
this.clear$Field(27);
};
/**
* Gets the value of the voicemail field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getVoicemail = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(28));
};
/**
* Gets the value of the voicemail field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getVoicemailOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(28));
};
/**
* Sets the value of the voicemail field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setVoicemail = function(value) {
this.set$Value(28, value);
};
/**
* @return {boolean} Whether the voicemail field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasVoicemail = function() {
return this.has$Value(28);
};
/**
* @return {number} The number of values in the voicemail field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.voicemailCount = function() {
return this.count$Values(28);
};
/**
* Clears the values in the voicemail field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearVoicemail = function() {
this.clear$Field(28);
};
/**
* Gets the value of the short_code field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getShortCode = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(29));
};
/**
* Gets the value of the short_code field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getShortCodeOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(29));
};
/**
* Sets the value of the short_code field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setShortCode = function(value) {
this.set$Value(29, value);
};
/**
* @return {boolean} Whether the short_code field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasShortCode = function() {
return this.has$Value(29);
};
/**
* @return {number} The number of values in the short_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.shortCodeCount = function() {
return this.count$Values(29);
};
/**
* Clears the values in the short_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearShortCode = function() {
this.clear$Field(29);
};
/**
* Gets the value of the standard_rate field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getStandardRate = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(30));
};
/**
* Gets the value of the standard_rate field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getStandardRateOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(30));
};
/**
* Sets the value of the standard_rate field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setStandardRate = function(value) {
this.set$Value(30, value);
};
/**
* @return {boolean} Whether the standard_rate field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasStandardRate = function() {
return this.has$Value(30);
};
/**
* @return {number} The number of values in the standard_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.standardRateCount = function() {
return this.count$Values(30);
};
/**
* Clears the values in the standard_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearStandardRate = function() {
this.clear$Field(30);
};
/**
* Gets the value of the carrier_specific field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCarrierSpecific = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(31));
};
/**
* Gets the value of the carrier_specific field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCarrierSpecificOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(31));
};
/**
* Sets the value of the carrier_specific field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setCarrierSpecific = function(value) {
this.set$Value(31, value);
};
/**
* @return {boolean} Whether the carrier_specific field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasCarrierSpecific = function() {
return this.has$Value(31);
};
/**
* @return {number} The number of values in the carrier_specific field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.carrierSpecificCount = function() {
return this.count$Values(31);
};
/**
* Clears the values in the carrier_specific field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearCarrierSpecific = function() {
this.clear$Field(31);
};
/**
* Gets the value of the sms_services field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSmsServices = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(33));
};
/**
* Gets the value of the sms_services field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSmsServicesOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(33));
};
/**
* Sets the value of the sms_services field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setSmsServices = function(value) {
this.set$Value(33, value);
};
/**
* @return {boolean} Whether the sms_services field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasSmsServices = function() {
return this.has$Value(33);
};
/**
* @return {number} The number of values in the sms_services field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.smsServicesCount = function() {
return this.count$Values(33);
};
/**
* Clears the values in the sms_services field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearSmsServices = function() {
this.clear$Field(33);
};
/**
* Gets the value of the no_international_dialling field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNoInternationalDialling = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(24));
};
/**
* Gets the value of the no_international_dialling field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNoInternationalDiallingOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(24));
};
/**
* Sets the value of the no_international_dialling field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setNoInternationalDialling = function(value) {
this.set$Value(24, value);
};
/**
* @return {boolean} Whether the no_international_dialling field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasNoInternationalDialling = function() {
return this.has$Value(24);
};
/**
* @return {number} The number of values in the no_international_dialling field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.noInternationalDiallingCount = function() {
return this.count$Values(24);
};
/**
* Clears the values in the no_international_dialling field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearNoInternationalDialling = function() {
this.clear$Field(24);
};
/**
* Gets the value of the id field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getId = function() {
return /** @type {?string} */ (this.get$Value(9));
};
/**
* Gets the value of the id field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getIdOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(9));
};
/**
* Sets the value of the id field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setId = function(value) {
this.set$Value(9, value);
};
/**
* @return {boolean} Whether the id field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasId = function() {
return this.has$Value(9);
};
/**
* @return {number} The number of values in the id field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.idCount = function() {
return this.count$Values(9);
};
/**
* Clears the values in the id field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearId = function() {
this.clear$Field(9);
};
/**
* Gets the value of the country_code field.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCountryCode = function() {
return /** @type {?number} */ (this.get$Value(10));
};
/**
* Gets the value of the country_code field or the default value if not set.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCountryCodeOrDefault = function() {
return /** @type {number} */ (this.get$ValueOrDefault(10));
};
/**
* Sets the value of the country_code field.
* @param {number} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setCountryCode = function(value) {
this.set$Value(10, value);
};
/**
* @return {boolean} Whether the country_code field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasCountryCode = function() {
return this.has$Value(10);
};
/**
* @return {number} The number of values in the country_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.countryCodeCount = function() {
return this.count$Values(10);
};
/**
* Clears the values in the country_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearCountryCode = function() {
this.clear$Field(10);
};
/**
* Gets the value of the international_prefix field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getInternationalPrefix = function() {
return /** @type {?string} */ (this.get$Value(11));
};
/**
* Gets the value of the international_prefix field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getInternationalPrefixOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(11));
};
/**
* Sets the value of the international_prefix field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setInternationalPrefix = function(value) {
this.set$Value(11, value);
};
/**
* @return {boolean} Whether the international_prefix field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasInternationalPrefix = function() {
return this.has$Value(11);
};
/**
* @return {number} The number of values in the international_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.internationalPrefixCount = function() {
return this.count$Values(11);
};
/**
* Clears the values in the international_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearInternationalPrefix = function() {
this.clear$Field(11);
};
/**
* Gets the value of the preferred_international_prefix field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPreferredInternationalPrefix = function() {
return /** @type {?string} */ (this.get$Value(17));
};
/**
* Gets the value of the preferred_international_prefix field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPreferredInternationalPrefixOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(17));
};
/**
* Sets the value of the preferred_international_prefix field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setPreferredInternationalPrefix = function(value) {
this.set$Value(17, value);
};
/**
* @return {boolean} Whether the preferred_international_prefix field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasPreferredInternationalPrefix = function() {
return this.has$Value(17);
};
/**
* @return {number} The number of values in the preferred_international_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.preferredInternationalPrefixCount = function() {
return this.count$Values(17);
};
/**
* Clears the values in the preferred_international_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearPreferredInternationalPrefix = function() {
this.clear$Field(17);
};
/**
* Gets the value of the national_prefix field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefix = function() {
return /** @type {?string} */ (this.get$Value(12));
};
/**
* Gets the value of the national_prefix field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefixOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(12));
};
/**
* Sets the value of the national_prefix field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setNationalPrefix = function(value) {
this.set$Value(12, value);
};
/**
* @return {boolean} Whether the national_prefix field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasNationalPrefix = function() {
return this.has$Value(12);
};
/**
* @return {number} The number of values in the national_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.nationalPrefixCount = function() {
return this.count$Values(12);
};
/**
* Clears the values in the national_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearNationalPrefix = function() {
this.clear$Field(12);
};
/**
* Gets the value of the preferred_extn_prefix field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPreferredExtnPrefix = function() {
return /** @type {?string} */ (this.get$Value(13));
};
/**
* Gets the value of the preferred_extn_prefix field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getPreferredExtnPrefixOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(13));
};
/**
* Sets the value of the preferred_extn_prefix field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setPreferredExtnPrefix = function(value) {
this.set$Value(13, value);
};
/**
* @return {boolean} Whether the preferred_extn_prefix field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasPreferredExtnPrefix = function() {
return this.has$Value(13);
};
/**
* @return {number} The number of values in the preferred_extn_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.preferredExtnPrefixCount = function() {
return this.count$Values(13);
};
/**
* Clears the values in the preferred_extn_prefix field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearPreferredExtnPrefix = function() {
this.clear$Field(13);
};
/**
* Gets the value of the national_prefix_for_parsing field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefixForParsing = function() {
return /** @type {?string} */ (this.get$Value(15));
};
/**
* Gets the value of the national_prefix_for_parsing field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefixForParsingOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(15));
};
/**
* Sets the value of the national_prefix_for_parsing field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setNationalPrefixForParsing = function(value) {
this.set$Value(15, value);
};
/**
* @return {boolean} Whether the national_prefix_for_parsing field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasNationalPrefixForParsing = function() {
return this.has$Value(15);
};
/**
* @return {number} The number of values in the national_prefix_for_parsing field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.nationalPrefixForParsingCount = function() {
return this.count$Values(15);
};
/**
* Clears the values in the national_prefix_for_parsing field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearNationalPrefixForParsing = function() {
this.clear$Field(15);
};
/**
* Gets the value of the national_prefix_transform_rule field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefixTransformRule = function() {
return /** @type {?string} */ (this.get$Value(16));
};
/**
* Gets the value of the national_prefix_transform_rule field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNationalPrefixTransformRuleOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(16));
};
/**
* Sets the value of the national_prefix_transform_rule field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setNationalPrefixTransformRule = function(value) {
this.set$Value(16, value);
};
/**
* @return {boolean} Whether the national_prefix_transform_rule field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasNationalPrefixTransformRule = function() {
return this.has$Value(16);
};
/**
* @return {number} The number of values in the national_prefix_transform_rule field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.nationalPrefixTransformRuleCount = function() {
return this.count$Values(16);
};
/**
* Clears the values in the national_prefix_transform_rule field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearNationalPrefixTransformRule = function() {
this.clear$Field(16);
};
/**
* Gets the value of the same_mobile_and_fixed_line_pattern field.
* @return {?boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSameMobileAndFixedLinePattern = function() {
return /** @type {?boolean} */ (this.get$Value(18));
};
/**
* Gets the value of the same_mobile_and_fixed_line_pattern field or the default value if not set.
* @return {boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSameMobileAndFixedLinePatternOrDefault = function() {
return /** @type {boolean} */ (this.get$ValueOrDefault(18));
};
/**
* Sets the value of the same_mobile_and_fixed_line_pattern field.
* @param {boolean} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setSameMobileAndFixedLinePattern = function(value) {
this.set$Value(18, value);
};
/**
* @return {boolean} Whether the same_mobile_and_fixed_line_pattern field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasSameMobileAndFixedLinePattern = function() {
return this.has$Value(18);
};
/**
* @return {number} The number of values in the same_mobile_and_fixed_line_pattern field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.sameMobileAndFixedLinePatternCount = function() {
return this.count$Values(18);
};
/**
* Clears the values in the same_mobile_and_fixed_line_pattern field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearSameMobileAndFixedLinePattern = function() {
this.clear$Field(18);
};
/**
* Gets the value of the number_format field at the index given.
* @param {number} index The index to lookup.
* @return {?i18n.phonenumbers.NumberFormat} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNumberFormat = function(index) {
return /** @type {?i18n.phonenumbers.NumberFormat} */ (this.get$Value(19, index));
};
/**
* Gets the value of the number_format field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {!i18n.phonenumbers.NumberFormat} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getNumberFormatOrDefault = function(index) {
return /** @type {!i18n.phonenumbers.NumberFormat} */ (this.get$ValueOrDefault(19, index));
};
/**
* Adds a value to the number_format field.
* @param {!i18n.phonenumbers.NumberFormat} value The value to add.
*/
i18n.phonenumbers.PhoneMetadata.prototype.addNumberFormat = function(value) {
this.add$Value(19, value);
};
/**
* Returns the array of values in the number_format field.
* @return {!Array<!i18n.phonenumbers.NumberFormat>} The values in the field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.numberFormatArray = function() {
return /** @type {!Array<!i18n.phonenumbers.NumberFormat>} */ (this.array$Values(19));
};
/**
* @return {boolean} Whether the number_format field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasNumberFormat = function() {
return this.has$Value(19);
};
/**
* @return {number} The number of values in the number_format field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.numberFormatCount = function() {
return this.count$Values(19);
};
/**
* Clears the values in the number_format field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearNumberFormat = function() {
this.clear$Field(19);
};
/**
* Gets the value of the intl_number_format field at the index given.
* @param {number} index The index to lookup.
* @return {?i18n.phonenumbers.NumberFormat} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getIntlNumberFormat = function(index) {
return /** @type {?i18n.phonenumbers.NumberFormat} */ (this.get$Value(20, index));
};
/**
* Gets the value of the intl_number_format field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {!i18n.phonenumbers.NumberFormat} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getIntlNumberFormatOrDefault = function(index) {
return /** @type {!i18n.phonenumbers.NumberFormat} */ (this.get$ValueOrDefault(20, index));
};
/**
* Adds a value to the intl_number_format field.
* @param {!i18n.phonenumbers.NumberFormat} value The value to add.
*/
i18n.phonenumbers.PhoneMetadata.prototype.addIntlNumberFormat = function(value) {
this.add$Value(20, value);
};
/**
* Returns the array of values in the intl_number_format field.
* @return {!Array<!i18n.phonenumbers.NumberFormat>} The values in the field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.intlNumberFormatArray = function() {
return /** @type {!Array<!i18n.phonenumbers.NumberFormat>} */ (this.array$Values(20));
};
/**
* @return {boolean} Whether the intl_number_format field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasIntlNumberFormat = function() {
return this.has$Value(20);
};
/**
* @return {number} The number of values in the intl_number_format field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.intlNumberFormatCount = function() {
return this.count$Values(20);
};
/**
* Clears the values in the intl_number_format field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearIntlNumberFormat = function() {
this.clear$Field(20);
};
/**
* Gets the value of the main_country_for_code field.
* @return {?boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getMainCountryForCode = function() {
return /** @type {?boolean} */ (this.get$Value(22));
};
/**
* Gets the value of the main_country_for_code field or the default value if not set.
* @return {boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getMainCountryForCodeOrDefault = function() {
return /** @type {boolean} */ (this.get$ValueOrDefault(22));
};
/**
* Sets the value of the main_country_for_code field.
* @param {boolean} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setMainCountryForCode = function(value) {
this.set$Value(22, value);
};
/**
* @return {boolean} Whether the main_country_for_code field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasMainCountryForCode = function() {
return this.has$Value(22);
};
/**
* @return {number} The number of values in the main_country_for_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.mainCountryForCodeCount = function() {
return this.count$Values(22);
};
/**
* Clears the values in the main_country_for_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearMainCountryForCode = function() {
this.clear$Field(22);
};
/**
* Gets the value of the leading_digits field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getLeadingDigits = function() {
return /** @type {?string} */ (this.get$Value(23));
};
/**
* Gets the value of the leading_digits field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getLeadingDigitsOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(23));
};
/**
* Sets the value of the leading_digits field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setLeadingDigits = function(value) {
this.set$Value(23, value);
};
/**
* @return {boolean} Whether the leading_digits field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasLeadingDigits = function() {
return this.has$Value(23);
};
/**
* @return {number} The number of values in the leading_digits field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.leadingDigitsCount = function() {
return this.count$Values(23);
};
/**
* Clears the values in the leading_digits field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearLeadingDigits = function() {
this.clear$Field(23);
};
/**
* Gets the value of the leading_zero_possible field.
* @return {?boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getLeadingZeroPossible = function() {
return /** @type {?boolean} */ (this.get$Value(26));
};
/**
* Gets the value of the leading_zero_possible field or the default value if not set.
* @return {boolean} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getLeadingZeroPossibleOrDefault = function() {
return /** @type {boolean} */ (this.get$ValueOrDefault(26));
};
/**
* Sets the value of the leading_zero_possible field.
* @param {boolean} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setLeadingZeroPossible = function(value) {
this.set$Value(26, value);
};
/**
* @return {boolean} Whether the leading_zero_possible field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasLeadingZeroPossible = function() {
return this.has$Value(26);
};
/**
* @return {number} The number of values in the leading_zero_possible field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.leadingZeroPossibleCount = function() {
return this.count$Values(26);
};
/**
* Clears the values in the leading_zero_possible field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearLeadingZeroPossible = function() {
this.clear$Field(26);
};
/**
* Message PhoneMetadataCollection.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneMetadataCollection = function() {
goog.proto2.Message.call(this);
};
goog.inherits(i18n.phonenumbers.PhoneMetadataCollection, goog.proto2.Message);
/**
* Descriptor for this message, deserialized lazily in getDescriptor().
* @private {?goog.proto2.Descriptor}
*/
i18n.phonenumbers.PhoneMetadataCollection.descriptor_ = null;
/**
* Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
* @return {!i18n.phonenumbers.PhoneMetadataCollection} The cloned message.
* @override
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.clone;
/**
* Gets the value of the metadata field at the index given.
* @param {number} index The index to lookup.
* @return {?i18n.phonenumbers.PhoneMetadata} The value.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.getMetadata = function(index) {
return /** @type {?i18n.phonenumbers.PhoneMetadata} */ (this.get$Value(1, index));
};
/**
* Gets the value of the metadata field at the index given or the default value if not set.
* @param {number} index The index to lookup.
* @return {!i18n.phonenumbers.PhoneMetadata} The value.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.getMetadataOrDefault = function(index) {
return /** @type {!i18n.phonenumbers.PhoneMetadata} */ (this.get$ValueOrDefault(1, index));
};
/**
* Adds a value to the metadata field.
* @param {!i18n.phonenumbers.PhoneMetadata} value The value to add.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.addMetadata = function(value) {
this.add$Value(1, value);
};
/**
* Returns the array of values in the metadata field.
* @return {!Array<!i18n.phonenumbers.PhoneMetadata>} The values in the field.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.metadataArray = function() {
return /** @type {!Array<!i18n.phonenumbers.PhoneMetadata>} */ (this.array$Values(1));
};
/**
* @return {boolean} Whether the metadata field has a value.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.hasMetadata = function() {
return this.has$Value(1);
};
/**
* @return {number} The number of values in the metadata field.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.metadataCount = function() {
return this.count$Values(1);
};
/**
* Clears the values in the metadata field.
*/
i18n.phonenumbers.PhoneMetadataCollection.prototype.clearMetadata = function() {
this.clear$Field(1);
};
/** @override */
i18n.phonenumbers.NumberFormat.prototype.getDescriptor = function() {
var descriptor = i18n.phonenumbers.NumberFormat.descriptor_;
if (!descriptor) {
// The descriptor is created lazily when we instantiate a new instance.
var descriptorObj = {
0: {
name: 'NumberFormat',
fullName: 'i18n.phonenumbers.NumberFormat'
},
1: {
name: 'pattern',
required: true,
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
2: {
name: 'format',
required: true,
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
3: {
name: 'leading_digits_pattern',
repeated: true,
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
4: {
name: 'national_prefix_formatting_rule',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
6: {
name: 'national_prefix_optional_when_formatting',
fieldType: goog.proto2.Message.FieldType.BOOL,
defaultValue: false,
type: Boolean
},
5: {
name: 'domestic_carrier_code_formatting_rule',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
}
};
i18n.phonenumbers.NumberFormat.descriptor_ = descriptor =
goog.proto2.Message.createDescriptor(
i18n.phonenumbers.NumberFormat, descriptorObj);
}
return descriptor;
};
/** @nocollapse */
i18n.phonenumbers.NumberFormat.getDescriptor =
i18n.phonenumbers.NumberFormat.prototype.getDescriptor;
/** @override */
i18n.phonenumbers.PhoneNumberDesc.prototype.getDescriptor = function() {
var descriptor = i18n.phonenumbers.PhoneNumberDesc.descriptor_;
if (!descriptor) {
// The descriptor is created lazily when we instantiate a new instance.
var descriptorObj = {
0: {
name: 'PhoneNumberDesc',
fullName: 'i18n.phonenumbers.PhoneNumberDesc'
},
2: {
name: 'national_number_pattern',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
9: {
name: 'possible_length',
repeated: true,
fieldType: goog.proto2.Message.FieldType.INT32,
type: Number
},
10: {
name: 'possible_length_local_only',
repeated: true,
fieldType: goog.proto2.Message.FieldType.INT32,
type: Number
},
6: {
name: 'example_number',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
}
};
i18n.phonenumbers.PhoneNumberDesc.descriptor_ = descriptor =
goog.proto2.Message.createDescriptor(
i18n.phonenumbers.PhoneNumberDesc, descriptorObj);
}
return descriptor;
};
/** @nocollapse */
i18n.phonenumbers.PhoneNumberDesc.getDescriptor =
i18n.phonenumbers.PhoneNumberDesc.prototype.getDescriptor;
/** @override */
i18n.phonenumbers.PhoneMetadata.prototype.getDescriptor = function() {
var descriptor = i18n.phonenumbers.PhoneMetadata.descriptor_;
if (!descriptor) {
// The descriptor is created lazily when we instantiate a new instance.
var descriptorObj = {
0: {
name: 'PhoneMetadata',
fullName: 'i18n.phonenumbers.PhoneMetadata'
},
1: {
name: 'general_desc',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
2: {
name: 'fixed_line',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
3: {
name: 'mobile',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
4: {
name: 'toll_free',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
5: {
name: 'premium_rate',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
6: {
name: 'shared_cost',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
7: {
name: 'personal_number',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
8: {
name: 'voip',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
21: {
name: 'pager',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
25: {
name: 'uan',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
27: {
name: 'emergency',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
28: {
name: 'voicemail',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
29: {
name: 'short_code',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
30: {
name: 'standard_rate',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
31: {
name: 'carrier_specific',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
33: {
name: 'sms_services',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
24: {
name: 'no_international_dialling',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
9: {
name: 'id',
required: true,
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
10: {
name: 'country_code',
fieldType: goog.proto2.Message.FieldType.INT32,
type: Number
},
11: {
name: 'international_prefix',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
17: {
name: 'preferred_international_prefix',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
12: {
name: 'national_prefix',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
13: {
name: 'preferred_extn_prefix',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
15: {
name: 'national_prefix_for_parsing',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
16: {
name: 'national_prefix_transform_rule',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
18: {
name: 'same_mobile_and_fixed_line_pattern',
fieldType: goog.proto2.Message.FieldType.BOOL,
defaultValue: false,
type: Boolean
},
19: {
name: 'number_format',
repeated: true,
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.NumberFormat
},
20: {
name: 'intl_number_format',
repeated: true,
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.NumberFormat
},
22: {
name: 'main_country_for_code',
fieldType: goog.proto2.Message.FieldType.BOOL,
defaultValue: false,
type: Boolean
},
23: {
name: 'leading_digits',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
26: {
name: 'leading_zero_possible',
fieldType: goog.proto2.Message.FieldType.BOOL,
defaultValue: false,
type: Boolean
}
};
i18n.phonenumbers.PhoneMetadata.descriptor_ = descriptor =
goog.proto2.Message.createDescriptor(
i18n.phonenumbers.PhoneMetadata, descriptorObj);
}
return descriptor;
};
/** @nocollapse */
i18n.phonenumbers.PhoneMetadata.getDescriptor =
i18n.phonenumbers.PhoneMetadata.prototype.getDescriptor;
/** @override */
i18n.phonenumbers.PhoneMetadataCollection.prototype.getDescriptor = function() {
var descriptor = i18n.phonenumbers.PhoneMetadataCollection.descriptor_;
if (!descriptor) {
// The descriptor is created lazily when we instantiate a new instance.
var descriptorObj = {
0: {
name: 'PhoneMetadataCollection',
fullName: 'i18n.phonenumbers.PhoneMetadataCollection'
},
1: {
name: 'metadata',
repeated: true,
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneMetadata
}
};
i18n.phonenumbers.PhoneMetadataCollection.descriptor_ = descriptor =
goog.proto2.Message.createDescriptor(
i18n.phonenumbers.PhoneMetadataCollection, descriptorObj);
}
return descriptor;
};
/** @nocollapse */
i18n.phonenumbers.PhoneMetadataCollection.getDescriptor =
i18n.phonenumbers.PhoneMetadataCollection.prototype.getDescriptor;
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/phonemetadata.pb.js
|
JavaScript
|
unknown
| 71,254
|
/**
* @license
* Protocol Buffer 2 Copyright 2008 Google Inc.
* All other code copyright its respective owners.
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated Protocol Buffer code for file
* phonenumber.proto.
*/
goog.provide('i18n.phonenumbers.PhoneNumber');
goog.provide('i18n.phonenumbers.PhoneNumber.CountryCodeSource');
goog.require('goog.proto2.Message');
/**
* Message PhoneNumber.
* @constructor
* @extends {goog.proto2.Message}
* @final
*/
i18n.phonenumbers.PhoneNumber = function() {
goog.proto2.Message.call(this);
};
goog.inherits(i18n.phonenumbers.PhoneNumber, goog.proto2.Message);
/**
* Descriptor for this message, deserialized lazily in getDescriptor().
* @private {?goog.proto2.Descriptor}
*/
i18n.phonenumbers.PhoneNumber.descriptor_ = null;
/**
* Overrides {@link goog.proto2.Message#clone} to specify its exact return type.
* @return {!i18n.phonenumbers.PhoneNumber} The cloned message.
* @override
*/
i18n.phonenumbers.PhoneNumber.prototype.clone;
/**
* Gets the value of the country_code field.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getCountryCode = function() {
return /** @type {?number} */ (this.get$Value(1));
};
/**
* Gets the value of the country_code field or the default value if not set.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getCountryCodeOrDefault = function() {
return /** @type {number} */ (this.get$ValueOrDefault(1));
};
/**
* Sets the value of the country_code field.
* @param {number} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setCountryCode = function(value) {
this.set$Value(1, value);
};
/**
* @return {boolean} Whether the country_code field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasCountryCode = function() {
return this.has$Value(1);
};
/**
* @return {number} The number of values in the country_code field.
*/
i18n.phonenumbers.PhoneNumber.prototype.countryCodeCount = function() {
return this.count$Values(1);
};
/**
* Clears the values in the country_code field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearCountryCode = function() {
this.clear$Field(1);
};
/**
* Gets the value of the national_number field.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getNationalNumber = function() {
return /** @type {?number} */ (this.get$Value(2));
};
/**
* Gets the value of the national_number field or the default value if not set.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getNationalNumberOrDefault = function() {
return /** @type {number} */ (this.get$ValueOrDefault(2));
};
/**
* Sets the value of the national_number field.
* @param {number} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setNationalNumber = function(value) {
this.set$Value(2, value);
};
/**
* @return {boolean} Whether the national_number field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasNationalNumber = function() {
return this.has$Value(2);
};
/**
* @return {number} The number of values in the national_number field.
*/
i18n.phonenumbers.PhoneNumber.prototype.nationalNumberCount = function() {
return this.count$Values(2);
};
/**
* Clears the values in the national_number field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearNationalNumber = function() {
this.clear$Field(2);
};
/**
* Gets the value of the extension field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getExtension = function() {
return /** @type {?string} */ (this.get$Value(3));
};
/**
* Gets the value of the extension field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getExtensionOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(3));
};
/**
* Sets the value of the extension field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setExtension = function(value) {
this.set$Value(3, value);
};
/**
* @return {boolean} Whether the extension field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasExtension = function() {
return this.has$Value(3);
};
/**
* @return {number} The number of values in the extension field.
*/
i18n.phonenumbers.PhoneNumber.prototype.extensionCount = function() {
return this.count$Values(3);
};
/**
* Clears the values in the extension field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearExtension = function() {
this.clear$Field(3);
};
/**
* Gets the value of the italian_leading_zero field.
* @return {?boolean} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getItalianLeadingZero = function() {
return /** @type {?boolean} */ (this.get$Value(4));
};
/**
* Gets the value of the italian_leading_zero field or the default value if not set.
* @return {boolean} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getItalianLeadingZeroOrDefault = function() {
return /** @type {boolean} */ (this.get$ValueOrDefault(4));
};
/**
* Sets the value of the italian_leading_zero field.
* @param {boolean} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setItalianLeadingZero = function(value) {
this.set$Value(4, value);
};
/**
* @return {boolean} Whether the italian_leading_zero field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasItalianLeadingZero = function() {
return this.has$Value(4);
};
/**
* @return {number} The number of values in the italian_leading_zero field.
*/
i18n.phonenumbers.PhoneNumber.prototype.italianLeadingZeroCount = function() {
return this.count$Values(4);
};
/**
* Clears the values in the italian_leading_zero field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearItalianLeadingZero = function() {
this.clear$Field(4);
};
/**
* Gets the value of the number_of_leading_zeros field.
* @return {?number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getNumberOfLeadingZeros = function() {
return /** @type {?number} */ (this.get$Value(8));
};
/**
* Gets the value of the number_of_leading_zeros field or the default value if not set.
* @return {number} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getNumberOfLeadingZerosOrDefault = function() {
return /** @type {number} */ (this.get$ValueOrDefault(8));
};
/**
* Sets the value of the number_of_leading_zeros field.
* @param {number} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setNumberOfLeadingZeros = function(value) {
this.set$Value(8, value);
};
/**
* @return {boolean} Whether the number_of_leading_zeros field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasNumberOfLeadingZeros = function() {
return this.has$Value(8);
};
/**
* @return {number} The number of values in the number_of_leading_zeros field.
*/
i18n.phonenumbers.PhoneNumber.prototype.numberOfLeadingZerosCount = function() {
return this.count$Values(8);
};
/**
* Clears the values in the number_of_leading_zeros field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearNumberOfLeadingZeros = function() {
this.clear$Field(8);
};
/**
* Gets the value of the raw_input field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getRawInput = function() {
return /** @type {?string} */ (this.get$Value(5));
};
/**
* Gets the value of the raw_input field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getRawInputOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(5));
};
/**
* Sets the value of the raw_input field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setRawInput = function(value) {
this.set$Value(5, value);
};
/**
* @return {boolean} Whether the raw_input field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasRawInput = function() {
return this.has$Value(5);
};
/**
* @return {number} The number of values in the raw_input field.
*/
i18n.phonenumbers.PhoneNumber.prototype.rawInputCount = function() {
return this.count$Values(5);
};
/**
* Clears the values in the raw_input field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearRawInput = function() {
this.clear$Field(5);
};
/**
* Gets the value of the country_code_source field.
* @return {?i18n.phonenumbers.PhoneNumber.CountryCodeSource} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getCountryCodeSource = function() {
return /** @type {?i18n.phonenumbers.PhoneNumber.CountryCodeSource} */ (this.get$Value(6));
};
/**
* Gets the value of the country_code_source field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumber.CountryCodeSource} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getCountryCodeSourceOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumber.CountryCodeSource} */ (this.get$ValueOrDefault(6));
};
/**
* Sets the value of the country_code_source field.
* @param {!i18n.phonenumbers.PhoneNumber.CountryCodeSource} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setCountryCodeSource = function(value) {
this.set$Value(6, value);
};
/**
* @return {boolean} Whether the country_code_source field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasCountryCodeSource = function() {
return this.has$Value(6);
};
/**
* @return {number} The number of values in the country_code_source field.
*/
i18n.phonenumbers.PhoneNumber.prototype.countryCodeSourceCount = function() {
return this.count$Values(6);
};
/**
* Clears the values in the country_code_source field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearCountryCodeSource = function() {
this.clear$Field(6);
};
/**
* Gets the value of the preferred_domestic_carrier_code field.
* @return {?string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getPreferredDomesticCarrierCode = function() {
return /** @type {?string} */ (this.get$Value(7));
};
/**
* Gets the value of the preferred_domestic_carrier_code field or the default value if not set.
* @return {string} The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.getPreferredDomesticCarrierCodeOrDefault = function() {
return /** @type {string} */ (this.get$ValueOrDefault(7));
};
/**
* Sets the value of the preferred_domestic_carrier_code field.
* @param {string} value The value.
*/
i18n.phonenumbers.PhoneNumber.prototype.setPreferredDomesticCarrierCode = function(value) {
this.set$Value(7, value);
};
/**
* @return {boolean} Whether the preferred_domestic_carrier_code field has a value.
*/
i18n.phonenumbers.PhoneNumber.prototype.hasPreferredDomesticCarrierCode = function() {
return this.has$Value(7);
};
/**
* @return {number} The number of values in the preferred_domestic_carrier_code field.
*/
i18n.phonenumbers.PhoneNumber.prototype.preferredDomesticCarrierCodeCount = function() {
return this.count$Values(7);
};
/**
* Clears the values in the preferred_domestic_carrier_code field.
*/
i18n.phonenumbers.PhoneNumber.prototype.clearPreferredDomesticCarrierCode = function() {
this.clear$Field(7);
};
/**
* Enumeration CountryCodeSource.
* @enum {number}
*/
i18n.phonenumbers.PhoneNumber.CountryCodeSource = {
UNSPECIFIED: 0,
FROM_NUMBER_WITH_PLUS_SIGN: 1,
FROM_NUMBER_WITH_IDD: 5,
FROM_NUMBER_WITHOUT_PLUS_SIGN: 10,
FROM_DEFAULT_COUNTRY: 20
};
/** @override */
i18n.phonenumbers.PhoneNumber.prototype.getDescriptor = function() {
var descriptor = i18n.phonenumbers.PhoneNumber.descriptor_;
if (!descriptor) {
// The descriptor is created lazily when we instantiate a new instance.
var descriptorObj = {
0: {
name: 'PhoneNumber',
fullName: 'i18n.phonenumbers.PhoneNumber'
},
1: {
name: 'country_code',
required: true,
fieldType: goog.proto2.Message.FieldType.INT32,
type: Number
},
2: {
name: 'national_number',
required: true,
fieldType: goog.proto2.Message.FieldType.UINT64,
type: Number
},
3: {
name: 'extension',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
4: {
name: 'italian_leading_zero',
fieldType: goog.proto2.Message.FieldType.BOOL,
type: Boolean
},
8: {
name: 'number_of_leading_zeros',
fieldType: goog.proto2.Message.FieldType.INT32,
defaultValue: 1,
type: Number
},
5: {
name: 'raw_input',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
},
6: {
name: 'country_code_source',
fieldType: goog.proto2.Message.FieldType.ENUM,
defaultValue: i18n.phonenumbers.PhoneNumber.CountryCodeSource.UNSPECIFIED,
type: i18n.phonenumbers.PhoneNumber.CountryCodeSource
},
7: {
name: 'preferred_domestic_carrier_code',
fieldType: goog.proto2.Message.FieldType.STRING,
type: String
}
};
i18n.phonenumbers.PhoneNumber.descriptor_ = descriptor =
goog.proto2.Message.createDescriptor(
i18n.phonenumbers.PhoneNumber, descriptorObj);
}
return descriptor;
};
// Export getDescriptor static function robust to minification.
i18n.phonenumbers.PhoneNumber['ctor'] = i18n.phonenumbers.PhoneNumber;
i18n.phonenumbers.PhoneNumber['ctor'].getDescriptor =
i18n.phonenumbers.PhoneNumber.prototype.getDescriptor;
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/phonenumber.pb.js
|
JavaScript
|
unknown
| 14,113
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Utility for international phone numbers.
* Functionality includes formatting, parsing and validation.
* (based on the java implementation).
*
* NOTE: A lot of methods in this class require Region Code strings. These must
* be provided using CLDR two-letter region-code format. These should be in
* upper-case. The list of the codes can be found here:
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
*/
goog.provide('i18n.phonenumbers.Error');
goog.provide('i18n.phonenumbers.PhoneNumberFormat');
goog.provide('i18n.phonenumbers.PhoneNumberType');
goog.provide('i18n.phonenumbers.PhoneNumberUtil');
goog.provide('i18n.phonenumbers.PhoneNumberUtil.MatchType');
goog.provide('i18n.phonenumbers.PhoneNumberUtil.ValidationResult');
goog.require('goog.array');
goog.require('goog.object');
goog.require('goog.proto2.PbLiteSerializer');
goog.require('goog.string');
goog.require('goog.string.StringBuffer');
goog.require('i18n.phonenumbers.NumberFormat');
goog.require('i18n.phonenumbers.PhoneMetadata');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumber.CountryCodeSource');
goog.require('i18n.phonenumbers.PhoneNumberDesc');
goog.require('i18n.phonenumbers.metadata');
/**
* @constructor
* @private
*/
i18n.phonenumbers.PhoneNumberUtil = function() {
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {Object.<string, i18n.phonenumbers.PhoneMetadata>}
*/
this.regionToMetadataMap = {};
};
goog.addSingletonGetter(i18n.phonenumbers.PhoneNumberUtil);
/**
* Errors encountered when parsing phone numbers.
*
* @enum {string}
*/
i18n.phonenumbers.Error = {
INVALID_COUNTRY_CODE: 'Invalid country calling code',
// This generally indicates the string passed in had less than 3 digits in it.
// More specifically, the number failed to match the regular expression
// VALID_PHONE_NUMBER.
NOT_A_NUMBER: 'The string supplied did not seem to be a phone number',
// This indicates the string started with an international dialing prefix, but
// after this was stripped from the number, had less digits than any valid
// phone number (including country calling code) could have.
TOO_SHORT_AFTER_IDD: 'Phone number too short after IDD',
// This indicates the string, after any country calling code has been
// stripped, had less digits than any valid phone number could have.
TOO_SHORT_NSN: 'The string supplied is too short to be a phone number',
// This indicates the string had more digits than any valid phone number could
// have.
TOO_LONG: 'The string supplied is too long to be a phone number'
};
/**
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_ = 1;
/**
* The minimum length of the national significant number.
*
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ = 2;
/**
* The ITU says the maximum length should be 15, but we have found longer
* numbers in Germany.
*
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_ = 17;
/**
* The maximum length of the country calling code.
*
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ = 3;
/**
* We don't allow input strings for parsing to be longer than 250 chars. This
* prevents malicious input from consuming CPU.
*
* @const
* @type {number}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_ = 250;
/**
* Region-code for the unknown region.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ = 'ZZ';
/**
* The prefix that needs to be inserted in front of a Colombian landline number
* when dialed from a mobile phone in Colombia.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_ = '3';
/**
* Map of country calling codes that use a mobile token before the area code.
* One example of when this is relevant is when determining the length of the
* national destination code, which should be the length of the area code plus
* the length of the mobile token.
*
* @const
* @type {!Object.<number, string>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_ = {
54: '9'
};
/**
* Set of country calling codes that have geographically assigned mobile
* numbers. This may not be complete; we add calling codes case by case, as we
* find geographical mobile numbers or hear from user reports.
*
* @const
* @type {!Array.<number>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.GEO_MOBILE_COUNTRIES_ = [
52, // Mexico
54, // Argentina
55 // Brazil
];
/**
* The PLUS_SIGN signifies the international prefix.
*
* @const
* @type {string}
*/
i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN = '+';
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ = '*';
/**
* The RFC 3966 format for extensions.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ = ';ext=';
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ = 'tel:';
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_ = ';phone-context=';
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_ = ';isub=';
/**
* These mappings map a character (key) to a specific digit that should replace
* it for normalization purposes. Non-European digits that may be used in phone
* numbers are mapped to a European equivalent.
*
* @const
* @type {!Object.<string, string>}
*/
i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS = {
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'\uFF10': '0', // Fullwidth digit 0
'\uFF11': '1', // Fullwidth digit 1
'\uFF12': '2', // Fullwidth digit 2
'\uFF13': '3', // Fullwidth digit 3
'\uFF14': '4', // Fullwidth digit 4
'\uFF15': '5', // Fullwidth digit 5
'\uFF16': '6', // Fullwidth digit 6
'\uFF17': '7', // Fullwidth digit 7
'\uFF18': '8', // Fullwidth digit 8
'\uFF19': '9', // Fullwidth digit 9
'\u0660': '0', // Arabic-indic digit 0
'\u0661': '1', // Arabic-indic digit 1
'\u0662': '2', // Arabic-indic digit 2
'\u0663': '3', // Arabic-indic digit 3
'\u0664': '4', // Arabic-indic digit 4
'\u0665': '5', // Arabic-indic digit 5
'\u0666': '6', // Arabic-indic digit 6
'\u0667': '7', // Arabic-indic digit 7
'\u0668': '8', // Arabic-indic digit 8
'\u0669': '9', // Arabic-indic digit 9
'\u06F0': '0', // Eastern-Arabic digit 0
'\u06F1': '1', // Eastern-Arabic digit 1
'\u06F2': '2', // Eastern-Arabic digit 2
'\u06F3': '3', // Eastern-Arabic digit 3
'\u06F4': '4', // Eastern-Arabic digit 4
'\u06F5': '5', // Eastern-Arabic digit 5
'\u06F6': '6', // Eastern-Arabic digit 6
'\u06F7': '7', // Eastern-Arabic digit 7
'\u06F8': '8', // Eastern-Arabic digit 8
'\u06F9': '9' // Eastern-Arabic digit 9
};
/**
* A map that contains characters that are essential when dialling. That means
* any of the characters in this map must not be removed from a number when
* dialling, otherwise the call will not reach the intended destination.
*
* @const
* @type {!Object.<string, string>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_ = {
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'+': i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN,
'*': '*',
'#': '#'
};
/**
* Only upper-case variants of alpha characters are stored.
*
* @const
* @type {!Object.<string, string>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.ALPHA_MAPPINGS_ = {
'A': '2',
'B': '2',
'C': '2',
'D': '3',
'E': '3',
'F': '3',
'G': '4',
'H': '4',
'I': '4',
'J': '5',
'K': '5',
'L': '5',
'M': '6',
'N': '6',
'O': '6',
'P': '7',
'Q': '7',
'R': '7',
'S': '7',
'T': '8',
'U': '8',
'V': '8',
'W': '9',
'X': '9',
'Y': '9',
'Z': '9'
};
/**
* For performance reasons, amalgamate both into one map.
*
* @const
* @type {!Object.<string, string>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_ = {
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'\uFF10': '0', // Fullwidth digit 0
'\uFF11': '1', // Fullwidth digit 1
'\uFF12': '2', // Fullwidth digit 2
'\uFF13': '3', // Fullwidth digit 3
'\uFF14': '4', // Fullwidth digit 4
'\uFF15': '5', // Fullwidth digit 5
'\uFF16': '6', // Fullwidth digit 6
'\uFF17': '7', // Fullwidth digit 7
'\uFF18': '8', // Fullwidth digit 8
'\uFF19': '9', // Fullwidth digit 9
'\u0660': '0', // Arabic-indic digit 0
'\u0661': '1', // Arabic-indic digit 1
'\u0662': '2', // Arabic-indic digit 2
'\u0663': '3', // Arabic-indic digit 3
'\u0664': '4', // Arabic-indic digit 4
'\u0665': '5', // Arabic-indic digit 5
'\u0666': '6', // Arabic-indic digit 6
'\u0667': '7', // Arabic-indic digit 7
'\u0668': '8', // Arabic-indic digit 8
'\u0669': '9', // Arabic-indic digit 9
'\u06F0': '0', // Eastern-Arabic digit 0
'\u06F1': '1', // Eastern-Arabic digit 1
'\u06F2': '2', // Eastern-Arabic digit 2
'\u06F3': '3', // Eastern-Arabic digit 3
'\u06F4': '4', // Eastern-Arabic digit 4
'\u06F5': '5', // Eastern-Arabic digit 5
'\u06F6': '6', // Eastern-Arabic digit 6
'\u06F7': '7', // Eastern-Arabic digit 7
'\u06F8': '8', // Eastern-Arabic digit 8
'\u06F9': '9', // Eastern-Arabic digit 9
'A': '2',
'B': '2',
'C': '2',
'D': '3',
'E': '3',
'F': '3',
'G': '4',
'H': '4',
'I': '4',
'J': '5',
'K': '5',
'L': '5',
'M': '6',
'N': '6',
'O': '6',
'P': '7',
'Q': '7',
'R': '7',
'S': '7',
'T': '8',
'U': '8',
'V': '8',
'W': '9',
'X': '9',
'Y': '9',
'Z': '9'
};
/**
* Separate map of all symbols that we wish to retain when formatting alpha
* numbers. This includes digits, ASCII letters and number grouping symbols such
* as '-' and ' '.
*
* @const
* @type {!Object.<string, string>}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_ = {
'0': '0',
'1': '1',
'2': '2',
'3': '3',
'4': '4',
'5': '5',
'6': '6',
'7': '7',
'8': '8',
'9': '9',
'A': 'A',
'B': 'B',
'C': 'C',
'D': 'D',
'E': 'E',
'F': 'F',
'G': 'G',
'H': 'H',
'I': 'I',
'J': 'J',
'K': 'K',
'L': 'L',
'M': 'M',
'N': 'N',
'O': 'O',
'P': 'P',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': 'T',
'U': 'U',
'V': 'V',
'W': 'W',
'X': 'X',
'Y': 'Y',
'Z': 'Z',
'a': 'A',
'b': 'B',
'c': 'C',
'd': 'D',
'e': 'E',
'f': 'F',
'g': 'G',
'h': 'H',
'i': 'I',
'j': 'J',
'k': 'K',
'l': 'L',
'm': 'M',
'n': 'N',
'o': 'O',
'p': 'P',
'q': 'Q',
'r': 'R',
's': 'S',
't': 'T',
'u': 'U',
'v': 'V',
'w': 'W',
'x': 'X',
'y': 'Y',
'z': 'Z',
'-': '-',
'\uFF0D': '-',
'\u2010': '-',
'\u2011': '-',
'\u2012': '-',
'\u2013': '-',
'\u2014': '-',
'\u2015': '-',
'\u2212': '-',
'/': '/',
'\uFF0F': '/',
' ': ' ',
'\u3000': ' ',
'\u2060': ' ',
'.': '.',
'\uFF0E': '.'
};
/**
* Pattern that makes it easy to distinguish whether a region has a single
* international dialing prefix or not. If a region has a single international
* prefix (e.g. 011 in USA), it will be represented as a string that contains
* a sequence of ASCII digits, and possibly a tilde, which signals waiting for
* the tone. If there are multiple available international prefixes in a
* region, they will be represented as a regex string that always contains one
* or more characters that are not ASCII digits or a tilde.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_ =
/[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?/;
/**
* Regular expression of acceptable punctuation found in phone numbers, used to
* find numbers in text and to decide what is a viable phone number. This
* excludes diallable characters.
* This consists of dash characters, white space characters, full stops,
* slashes, square brackets, parentheses and tildes. It also includes the letter
* 'x' as that is found as a placeholder for carrier information in some phone
* numbers. Full-width variants are also present.
*
* @const
* @type {string}
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION =
'-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \u00A0\u00AD\u200B\u2060\u3000' +
'()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E';
/**
* Digits accepted in phone numbers (ascii, fullwidth, arabic-indic, and eastern
* arabic digits).
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ =
'0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9';
/**
* We accept alpha characters in phone numbers, ASCII only, upper and lower
* case.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ = 'A-Za-z';
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ = '+\uFF0B';
/**
* @const
* @type {!RegExp}
*/
i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN =
new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
/**
* @const
* @type {!RegExp}
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN =
new RegExp('^[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
/**
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_ =
'[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']+';
/**
* @const
* @type {!RegExp}
*/
i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN =
new RegExp('([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + '])');
/**
* Regular expression of acceptable characters that may start a phone number for
* the purposes of parsing. This allows us to strip away meaningless prefixes to
* phone numbers that may be mistakenly given to us. This consists of digits,
* the plus symbol and arabic-indic digits. This does not contain alpha
* characters, although they may be used later in the number. It also does not
* include other punctuation, as this will be stripped later during parsing and
* is of no information value when parsing a number.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_ =
new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ +
i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']');
/**
* Regular expression of characters typically used to start a second phone
* number for the purposes of parsing. This allows us to strip off parts of the
* number that are actually the start of another number, such as for:
* (530) 583-6985 x302/x2303 -> the second extension here makes this actually
* two phone numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove
* the second extension so that the first number is parsed correctly.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_ = /[\\\/] *x/;
/**
* Regular expression of trailing characters that we want to remove. We remove
* all characters that are not alpha or numerical characters. The hash character
* is retained here, as it may signify the previous block was an extension.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_ =
new RegExp('[^' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ +
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ + '#]+$');
/**
* We use this pattern to check if the phone number has at least three letters
* in it - if so, then we treat it as a number where some phone-number digits
* are represented by letters.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_ =
/(?:.*?[A-Za-z]){3}.*/;
/**
* Regular expression of viable phone numbers. This is location independent.
* Checks we have at least three leading digits, and only valid punctuation,
* alpha characters and digits in the phone number. Does not include extension
* data. The symbol 'x' is allowed here as valid punctuation since it is often
* used as a placeholder for carrier codes, for example in Brazilian phone
* numbers. We also allow multiple '+' characters at the start.
* Corresponds to the following:
* [digits]{minLengthNsn}|
* plus_sign*
* (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
*
* The first reg-ex is to allow short numbers (two digits long) to be parsed if
* they are entered as "15" etc, but only if there is no punctuation in them.
* The second expression restricts the number of digits to three or more, but
* then allows them to be in international form, and to have alpha-characters
* and punctuation. We split up the two reg-exes here and combine them when
* creating the reg-ex VALID_PHONE_NUMBER_PATTERN_ itself so we can prefix it
* with ^ and append $ to each branch.
*
* Note VALID_PUNCTUATION starts with a -, so must be the first in the range.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ =
'[' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{' +
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ + '}';
/**
* See MIN_LENGTH_PHONE_NUMBER_PATTERN_ for a full description of this reg-exp.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ =
'[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']*(?:[' +
i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ + ']*[' +
i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']){3,}[' +
i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ +
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ +
i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']*';
/**
* Default extension prefix to use when formatting. This will be put in front of
* any extension component of the number, after the main national number is
* formatted. For example, if you wish the default extension formatting to be
* ' extn: 3456', then you should specify ' extn: ' here as the default
* extension prefix. This can be overridden by region-specific preferences.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ = ' ext. ';
/**
* Pattern to capture digits used in an extension.
* Places a maximum length of '7' for an extension.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ =
'([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{1,7})';
/**
* Regexp of all possible ways to write extensions, for use when parsing. This
* will be run as a case-insensitive regexp match. Wide character versions are
* also provided after each ASCII version. There are three regular expressions
* here. The first covers RFC 3966 format, where the extension is added using
* ';ext='. The second more generic one starts with optional white space and
* ends with an optional full stop (.), followed by zero or more spaces/tabs
* /commas and then the numbers themselves. The other one covers the special
* case of American numbers where the extension is written with a hash at the
* end, such as '- 503#'. Note that the only capturing groups should be around
* the digits that you want to capture as part of the extension, or else parsing
* will fail! We allow two options for representing the accented o - the
* character itself, and one in the unicode decomposed form with the combining
* acute accent.
*
* @const
* @type {string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ =
i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ +
i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ + '|' +
'[ \u00A0\\t,]*' +
'(?:e?xt(?:ensi(?:o\u0301?|\u00F3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|' +
'\u0434\u043E\u0431|' +
'[;,x\uFF58#\uFF03~\uFF5E]|int|anexo|\uFF49\uFF4E\uFF54)' +
'[:\\.\uFF0E]?[ \u00A0\\t,-]*' +
i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ + '#?|' +
'[- ]+([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{1,5})#';
/**
* Regexp of all known extension prefixes used by different regions followed by
* 1 or more valid digits, for use when parsing.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_ =
new RegExp('(?:' +
i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ +
')$', 'i');
/**
* We append optionally the extension pattern to the end here, as a valid phone
* number may have an extension prefix appended, followed by 1 or more digits.
*
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_ =
new RegExp(
'^' +
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ +
'$|' +
'^' + i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ +
'(?:' + i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ +
')?' + '$', 'i');
/**
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_ = /\D+/;
/**
* This was originally set to $1 but there are some countries for which the
* first group is not used in the national pattern (e.g. Argentina) so the $1
* group does not match correctly. Therefore, we use \d, so that the first
* group actually used in the pattern will be matched.
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_ = /(\$\d)/;
/**
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_ = /\$NP/;
/**
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_ = /\$FG/;
/**
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_ = /\$CC/;
/**
* A pattern that is used to determine if the national prefix formatting rule
* has the first group only, i.e., does not start with the national prefix.
* Note that the pattern explicitly allows for unbalanced parentheses.
* @const
* @type {!RegExp}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_ =
/^\(?\$1\)?$/;
/**
* @const
* @type {string}
*/
i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY = '001';
/**
* INTERNATIONAL and NATIONAL formats are consistent with the definition in
* ITU-T Recommendation E123. However we follow local conventions such as
* using '-' instead of whitespace as separators. For example, the number of the
* Google Switzerland office will be written as '+41 44 668 1800' in
* INTERNATIONAL format, and as '044 668 1800' in NATIONAL format. E164 format
* is as per INTERNATIONAL format but with no formatting applied, e.g.
* '+41446681800'. RFC3966 is as per INTERNATIONAL format, but with all spaces
* and other separating symbols replaced with a hyphen, and with any phone
* number extension appended with ';ext='. It also will have a prefix of 'tel:'
* added, e.g. 'tel:+41-44-668-1800'.
*
* Note: If you are considering storing the number in a neutral format, you are
* highly advised to use the PhoneNumber class.
* @enum {number}
*/
i18n.phonenumbers.PhoneNumberFormat = {
E164: 0,
INTERNATIONAL: 1,
NATIONAL: 2,
RFC3966: 3
};
/**
* Type of phone numbers.
*
* @enum {number}
*/
i18n.phonenumbers.PhoneNumberType = {
FIXED_LINE: 0,
MOBILE: 1,
// In some regions (e.g. the USA), it is impossible to distinguish between
// fixed-line and mobile numbers by looking at the phone number itself.
FIXED_LINE_OR_MOBILE: 2,
// Freephone lines
TOLL_FREE: 3,
PREMIUM_RATE: 4,
// The cost of this call is shared between the caller and the recipient, and
// is hence typically less than PREMIUM_RATE calls. See
// http://en.wikipedia.org/wiki/Shared_Cost_Service for more information.
SHARED_COST: 5,
// Voice over IP numbers. This includes TSoIP (Telephony Service over IP).
VOIP: 6,
// A personal number is associated with a particular person, and may be routed
// to either a MOBILE or FIXED_LINE number. Some more information can be found
// here: http://en.wikipedia.org/wiki/Personal_Numbers
PERSONAL_NUMBER: 7,
PAGER: 8,
// Used for 'Universal Access Numbers' or 'Company Numbers'. They may be
// further routed to specific offices, but allow one number to be used for a
// company.
UAN: 9,
// Used for 'Voice Mail Access Numbers'.
VOICEMAIL: 10,
// A phone number is of type UNKNOWN when it does not fit any of the known
// patterns for a specific region.
UNKNOWN: -1
};
/**
* Types of phone number matches. See detailed description beside the
* isNumberMatch() method.
*
* @enum {number}
*/
i18n.phonenumbers.PhoneNumberUtil.MatchType = {
NOT_A_NUMBER: 0,
NO_MATCH: 1,
SHORT_NSN_MATCH: 2,
NSN_MATCH: 3,
EXACT_MATCH: 4
};
/**
* Possible outcomes when testing if a PhoneNumber is possible.
*
* @enum {number}
*/
i18n.phonenumbers.PhoneNumberUtil.ValidationResult = {
/** The number length matches that of valid numbers for this region. */
IS_POSSIBLE: 0,
/**
* The number length matches that of local numbers for this region only (i.e.
* numbers that may be able to be dialled within an area, but do not have all
* the information to be dialled from anywhere inside or outside the country).
*/
IS_POSSIBLE_LOCAL_ONLY: 4,
/** The number has an invalid country calling code. */
INVALID_COUNTRY_CODE: 1,
/** The number is shorter than all valid numbers for this region. */
TOO_SHORT: 2,
/**
* The number is longer than the shortest valid numbers for this region,
* shorter than the longest valid numbers for this region, and does not itself
* have a number length that matches valid numbers for this region.
* This can also be returned in the case where
* isPossibleNumberForTypeWithReason was called, and there are no numbers of
* this type at all for this region.
*/
INVALID_LENGTH: 5,
/** The number is longer than all valid numbers for this region. */
TOO_LONG: 3
};
/**
* Attempts to extract a possible number from the string passed in. This
* currently strips all leading characters that cannot be used to start a phone
* number. Characters that can be used to start a phone number are defined in
* the VALID_START_CHAR_PATTERN. If none of these characters are found in the
* number passed in, an empty string is returned. This function also attempts to
* strip off any alternative extensions or endings if two or more are present,
* such as in the case of: (530) 583-6985 x302/x2303. The second extension here
* makes this actually two phone numbers, (530) 583-6985 x302 and (530) 583-6985
* x2303. We remove the second extension so that the first number is parsed
* correctly.
*
* @param {string} number the string that might contain a phone number.
* @return {string} the number, stripped of any non-phone-number prefix (such as
* 'Tel:') or an empty string if no character used to start phone numbers
* (such as + or any digit) is found in the number.
*/
i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber = function(number) {
/** @type {string} */
var possibleNumber;
/** @type {number} */
var start = number
.search(i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_);
if (start >= 0) {
possibleNumber = number.substring(start);
// Remove trailing non-alpha non-numerical characters.
possibleNumber = possibleNumber.replace(
i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_, '');
// Check for extra numbers at the end.
/** @type {number} */
var secondNumberStart = possibleNumber
.search(i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_);
if (secondNumberStart >= 0) {
possibleNumber = possibleNumber.substring(0, secondNumberStart);
}
} else {
possibleNumber = '';
}
return possibleNumber;
};
/**
* Checks to see if the string of characters could possibly be a phone number at
* all. At the moment, checks to see that the string begins with at least 2
* digits, ignoring any punctuation commonly found in phone numbers. This method
* does not require the number to be normalized in advance - but does assume
* that leading non-number symbols have been removed, such as by the method
* extractPossibleNumber.
*
* @param {string} number string to be checked for viability as a phone number.
* @return {boolean} true if the number could be a phone number of some sort,
* otherwise false.
*/
i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber = function(number) {
if (number.length < i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_, number);
};
/**
* Normalizes a string of characters representing a phone number. This performs
* the following conversions:
* Punctuation is stripped.
* For ALPHA/VANITY numbers:
* Letters are converted to their numeric representation on a telephone
* keypad. The keypad used here is the one defined in ITU Recommendation
* E.161. This is only done if there are 3 or more letters in the number,
* to lessen the risk that such letters are typos.
* For other numbers:
* Wide-ascii digits are converted to normal ASCII (European) digits.
* Arabic-Indic numerals are converted to European numerals.
* Spurious alpha characters are stripped.
*
* @param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.normalize = function(number) {
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_, number)) {
return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, true);
} else {
return i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(number);
}
};
/**
* Normalizes a string of characters representing a phone number. This is a
* wrapper for normalize(String number) but does in-place normalization of the
* StringBuffer provided.
*
* @param {!goog.string.StringBuffer} number a StringBuffer of characters
* representing a phone number that will be normalized in place.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.normalizeSB_ = function(number) {
/** @type {string} */
var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil.normalize(number
.toString());
number.clear();
number.append(normalizedNumber);
};
/**
* Normalizes a string of characters representing a phone number. This converts
* wide-ascii and arabic-indic numerals to European numerals, and strips
* punctuation and alpha characters.
*
* @param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly = function(number) {
return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS, true);
};
/**
* Normalizes a string of characters representing a phone number. This strips
* all characters which are not diallable on a mobile phone keypad (including
* all non-ASCII digits).
*
* @param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly =
function(number) {
return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_,
true /* remove non matches */);
};
/**
* Converts all alpha characters in a number to their respective digits on a
* keypad, but retains existing formatting. Also converts wide-ascii digits to
* normal ascii digits, and converts Arabic-Indic numerals to European numerals.
*
* @param {string} number a string of characters representing a phone number.
* @return {string} the normalized string version of the phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.convertAlphaCharactersInNumber =
function(number) {
return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, false);
};
/**
* Gets the length of the geographical area code from the
* {@code national_number} field of the PhoneNumber object passed in, so that
* clients could use it to split a national significant number into geographical
* area code and subscriber number. It works in such a way that the resultant
* subscriber number should be diallable, at least on some devices. An example
* of how this could be used:
*
* <pre>
* var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
* var number = phoneUtil.parse('16502530000', 'US');
* var nationalSignificantNumber =
* phoneUtil.getNationalSignificantNumber(number);
* var areaCode;
* var subscriberNumber;
*
* var areaCodeLength = phoneUtil.getLengthOfGeographicalAreaCode(number);
* if (areaCodeLength > 0) {
* areaCode = nationalSignificantNumber.substring(0, areaCodeLength);
* subscriberNumber = nationalSignificantNumber.substring(areaCodeLength);
* } else {
* areaCode = '';
* subscriberNumber = nationalSignificantNumber;
* }
* </pre>
*
* N.B.: area code is a very ambiguous concept, so the I18N team generally
* recommends against using it for most purposes, but recommends using the more
* general {@code national_number} instead. Read the following carefully before
* deciding to use this method:
* <ul>
* <li> geographical area codes change over time, and this method honors those
* changes; therefore, it doesn't guarantee the stability of the result it
* produces.
* <li> subscriber numbers may not be diallable from all devices (notably
* mobile devices, which typically requires the full national_number to be
* dialled in most regions).
* <li> most non-geographical numbers have no area codes, including numbers
* from non-geographical entities.
* <li> some geographical numbers have no area codes.
* </ul>
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* which clients want to know the length of the area code.
* @return {number} the length of area code of the PhoneNumber object passed in.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfGeographicalAreaCode =
function(number) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(this.getRegionCodeForNumber(number));
if (metadata == null) {
return 0;
}
// If a country doesn't use a national prefix, and this number doesn't have
// an Italian leading zero, we assume it is a closed dialling plan with no
// area codes.
if (!metadata.hasNationalPrefix() && !number.hasItalianLeadingZero()) {
return 0;
}
if (!this.isNumberGeographical(number)) {
return 0;
}
return this.getLengthOfNationalDestinationCode(number);
};
/**
* Gets the length of the national destination code (NDC) from the PhoneNumber
* object passed in, so that clients could use it to split a national
* significant number into NDC and subscriber number. The NDC of a phone number
* is normally the first group of digit(s) right after the country calling code
* when the number is formatted in the international format, if there is a
* subscriber number part that follows.
*
* N.B.: similar to an area code, not all numbers have an NDC!
*
* An example of how this could be used:
*
* <pre>
* var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
* var number = phoneUtil.parse('18002530000', 'US');
* var nationalSignificantNumber =
* phoneUtil.getNationalSignificantNumber(number);
* var nationalDestinationCode;
* var subscriberNumber;
*
* var nationalDestinationCodeLength =
* phoneUtil.getLengthOfNationalDestinationCode(number);
* if (nationalDestinationCodeLength > 0) {
* nationalDestinationCode =
* nationalSignificantNumber.substring(0, nationalDestinationCodeLength);
* subscriberNumber =
* nationalSignificantNumber.substring(nationalDestinationCodeLength);
* } else {
* nationalDestinationCode = '';
* subscriberNumber = nationalSignificantNumber;
* }
* </pre>
*
* Refer to the unittests to see the difference between this function and
* {@link #getLengthOfGeographicalAreaCode}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
* which clients want to know the length of the NDC.
* @return {number} the length of NDC of the PhoneNumber object passed in, which
* could be zero.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfNationalDestinationCode =
function(number) {
/** @type {i18n.phonenumbers.PhoneNumber} */
var copiedProto;
if (number.hasExtension()) {
// We don't want to alter the proto given to us, but we don't want to
// include the extension when we format it, so we copy it and clear the
// extension here.
copiedProto = number.clone();
copiedProto.clearExtension();
} else {
copiedProto = number;
}
/** @type {string} */
var nationalSignificantNumber = this.format(copiedProto,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
/** @type {!Array.<string>} */
var numberGroups = nationalSignificantNumber.split(
i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_);
// The pattern will start with '+COUNTRY_CODE ' so the first group will always
// be the empty string (before the + symbol) and the second group will be the
// country calling code. The third group will be area code if it is not the
// last group.
// NOTE: On IE the first group that is supposed to be the empty string does
// not appear in the array of number groups... so make the result on non-IE
// browsers to be that of IE.
if (numberGroups[0].length == 0) {
numberGroups.shift();
}
if (numberGroups.length <= 2) {
return 0;
}
if (this.getNumberType(number) == i18n.phonenumbers.PhoneNumberType.MOBILE) {
// For example Argentinian mobile numbers, when formatted in the
// international format, are in the form of +54 9 NDC XXXX.... As a result,
// we take the length of the third group (NDC) and add the length of the
// mobile token, which also forms part of the national significant number.
// This assumes that the mobile token is always formatted separately from
// the rest of the phone number.
/** @type {string} */
var mobileToken = i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
number.getCountryCodeOrDefault());
if (mobileToken != '') {
return numberGroups[2].length + mobileToken.length;
}
}
return numberGroups[1].length;
};
/**
* Returns the mobile token for the provided country calling code if it has
* one, otherwise returns an empty string. A mobile token is a number inserted
* before the area code when dialing a mobile number from that country from
* abroad.
*
* @param {number} countryCallingCode the country calling code for which we
* want the mobile token.
* @return {string} the mobile token for the given country calling code.
*/
i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken =
function(countryCallingCode) {
return i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_[
countryCallingCode] || '';
};
/**
* Returns all regions the library has metadata for.
*
* @return {!Array.<string>} the two-letter region codes for every geographical
* region the library supports.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedRegions = function() {
return goog.array.filter(
Object.keys(i18n.phonenumbers.metadata.countryToMetadata),
function(regionCode) {
return isNaN(regionCode);
});
};
/**
* Returns all global network calling codes the library has metadata for.
*
* @return {!Array.<number>} the country calling codes for every
* non-geographical entity the library supports.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
getSupportedGlobalNetworkCallingCodes = function() {
var callingCodesAsStrings = goog.array.filter(
Object.keys(i18n.phonenumbers.metadata.countryToMetadata),
function(regionCode) {
return !isNaN(regionCode);
});
return goog.array.map(callingCodesAsStrings,
function(callingCode) {
return parseInt(callingCode, 10);
});
};
/**
* Returns all country calling codes the library has metadata for, covering
* both non-geographical entities (global network calling codes) and those used
* for geographical entities. This could be used to populate a drop-down box of
* country calling codes for a phone-number widget, for instance.
*
* @return {!Array.<number>} the country calling codes for every geographical
* and non-geographical entity the library supports.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedCallingCodes =
function() {
var countryCodesAsStrings =
Object.keys(i18n.phonenumbers.metadata.countryCodeToRegionCodeMap);
return goog.array.join(
this.getSupportedGlobalNetworkCallingCodes(),
goog.array.map(countryCodesAsStrings,
function(callingCode) {
return parseInt(callingCode, 10);
}));
};
/**
* Returns true if there is any possibleLength data set for a particular
* PhoneNumberDesc.
*
* @param {i18n.phonenumbers.PhoneNumberDesc} desc
* @return {boolean}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_ = function(desc) {
// If this is empty, it means numbers of this type inherit from the "general
// desc" -> the value "-1" means that no numbers exist for this type.
return desc != null &&
(desc.possibleLengthCount() != 1 || desc.possibleLengthArray()[0] != -1);
};
/**
* Returns true if there is any data set for a particular PhoneNumberDesc.
*
* @param {i18n.phonenumbers.PhoneNumberDesc} desc
* @return {boolean}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.descHasData_ = function(desc) {
// Checking most properties since we don't know what's present, since a
// custom build may have stripped just one of them (e.g. liteBuild strips
// exampleNumber). We don't bother checking the possibleLengthsLocalOnly,
// since if this is the only thing that's present we don't really support the
// type at all: no type-specific methods will work with only this data.
return desc != null && (desc.hasExampleNumber() ||
i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(desc) ||
desc.hasNationalNumberPattern());
};
/**
* Returns the types we have metadata for based on the PhoneMetadata object
* passed in.
*
* @param {!i18n.phonenumbers.PhoneMetadata} metadata
* @return {!Array.<i18n.phonenumbers.PhoneNumberType>} the types supported
* based on the metadata object passed in.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_ =
function(metadata) {
/** @type {!Array.<i18n.phonenumbers.PhoneNumberType>} */
var types = [];
goog.object.forEach(i18n.phonenumbers.PhoneNumberType,
function(type) {
if (type == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE ||
type == i18n.phonenumbers.PhoneNumberType.UNKNOWN) {
// Never return FIXED_LINE_OR_MOBILE (it is a convenience type, and
// represents that a particular number type can't be determined) or
// UNKNOWN (the non-type).
return;
}
/** @type {i18n.phonenumbers.PhoneNumberDesc} */
var desc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
metadata, type);
if (i18n.phonenumbers.PhoneNumberUtil.descHasData_(desc)) {
types.push(type);
}
});
return types;
};
/**
* Returns the types for a given region which the library has metadata for.
* Will not include FIXED_LINE_OR_MOBILE (if numbers for this non-geographical
* entity could be classified as FIXED_LINE_OR_MOBILE, both FIXED_LINE and
* MOBILE would be present) and UNKNOWN.
*
* No types will be returned for invalid or unknown region codes.
*
* @param {?string} regionCode
* @return {!Array.<i18n.phonenumbers.PhoneNumberType>} the types for every
* region the library supports.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedTypesForRegion =
function(regionCode) {
if (!this.isValidRegionCode_(regionCode)) {
return [];
}
return i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_(
/** @type {!i18n.phonenumbers.PhoneMetadata} */ (
this.getMetadataForRegion(regionCode)));
};
/**
* Returns the types for a country-code belonging to a non-geographical entity
* which the library has metadata for. Will not include FIXED_LINE_OR_MOBILE
* (instead both FIXED_LINE and FIXED_LINE_OR_MOBILE (if numbers for this
* non-geographical entity could be classified as FIXED_LINE_OR_MOBILE, both
* FIXED_LINE and MOBILE would be present) and UNKNOWN.
*
* No types will be returned for country calling codes that do not map to a
* known non-geographical entity.
*
* @param {number} countryCallingCode
* @return {!Array.<i18n.phonenumbers.PhoneNumberType>} the types for every
* non-geographical entity the library supports.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedTypesForNonGeoEntity =
function(countryCallingCode) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForNonGeographicalRegion(countryCallingCode);
if (metadata == null) {
return [];
}
return i18n.phonenumbers.PhoneNumberUtil.getSupportedTypesForMetadata_(
/** @type {!i18n.phonenumbers.PhoneMetadata} */ (metadata));
};
/**
* Normalizes a string of characters representing a phone number by replacing
* all characters found in the accompanying map with the values therein, and
* stripping all other characters if removeNonMatches is true.
*
* @param {string} number a string of characters representing a phone number.
* @param {!Object.<string, string>} normalizationReplacements a mapping of
* characters to what they should be replaced by in the normalized version
* of the phone number.
* @param {boolean} removeNonMatches indicates whether characters that are not
* able to be replaced should be stripped from the number. If this is false,
* they will be left unchanged in the number.
* @return {string} the normalized string version of the phone number.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_ =
function(number, normalizationReplacements, removeNonMatches) {
/** @type {!goog.string.StringBuffer} */
var normalizedNumber = new goog.string.StringBuffer();
/** @type {string} */
var character;
/** @type {string} */
var newDigit;
/** @type {number} */
var numberLength = number.length;
for (var i = 0; i < numberLength; ++i) {
character = number.charAt(i);
newDigit = normalizationReplacements[character.toUpperCase()];
if (newDigit != null) {
normalizedNumber.append(newDigit);
} else if (!removeNonMatches) {
normalizedNumber.append(character);
}
// If neither of the above are true, we remove this character.
}
return normalizedNumber.toString();
};
/**
* Helper function to check if the national prefix formatting rule has the first
* group only, i.e., does not start with the national prefix.
*
* @param {string} nationalPrefixFormattingRule The formatting rule for the
* national prefix.
* @return {boolean} true if the national prefix formatting rule has the first
* group only.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formattingRuleHasFirstGroupOnly =
function(nationalPrefixFormattingRule) {
return nationalPrefixFormattingRule.length == 0 ||
i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_.
test(nationalPrefixFormattingRule);
};
/**
* Tests whether a phone number has a geographical association. It checks if the
* number is associated with a certain region in the country to which it
* belongs. Note that this doesn't verify if the number is actually in use.
*
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber The phone number to test.
* @return {boolean} true if the phone number has a geographical association.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberGeographical =
function(phoneNumber) {
/** @type {i18n.phonenumbers.PhoneNumberType} */
var numberType = this.getNumberType(phoneNumber);
return numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE ||
numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE ||
(goog.array.contains(
i18n.phonenumbers.PhoneNumberUtil.GEO_MOBILE_COUNTRIES_,
phoneNumber.getCountryCodeOrDefault()) &&
numberType == i18n.phonenumbers.PhoneNumberType.MOBILE);
};
/**
* Helper function to check region code is not unknown or null.
*
* @param {?string} regionCode the CLDR two-letter region code.
* @return {boolean} true if region code is valid.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isValidRegionCode_ =
function(regionCode) {
// In Java we check whether the regionCode is contained in supportedRegions
// that is built out of all the values of countryCallingCodeToRegionCodeMap
// (countryCodeToRegionCodeMap in JS) minus REGION_CODE_FOR_NON_GEO_ENTITY.
// In JS we check whether the regionCode is contained in the keys of
// countryToMetadata but since for non-geographical country calling codes
// (e.g. +800) we use the country calling codes instead of the region code as
// key in the map we have to make sure regionCode is not a number to prevent
// returning true for non-geographical country calling codes.
return regionCode != null &&
isNaN(regionCode) &&
regionCode.toUpperCase() in i18n.phonenumbers.metadata.countryToMetadata;
};
/**
* Helper function to check the country calling code is valid.
*
* @param {number} countryCallingCode the country calling code.
* @return {boolean} true if country calling code code is valid.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.hasValidCountryCallingCode_ =
function(countryCallingCode) {
return countryCallingCode in
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap;
};
/**
* Formats a phone number in the specified format using default rules. Note that
* this does not promise to produce a phone number that the user can dial from
* where they are - although we do format in either 'national' or
* 'international' format depending on what the client asks for, we do not
* currently support a more abbreviated format, such as for users in the same
* 'area' who could potentially dial the number without area code. Note that if
* the phone number has a country calling code of 0 or an otherwise invalid
* country calling code, we cannot work out which formatting rules to apply so
* we return the national significant number with no formatting applied.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @return {string} the formatted phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.format =
function(number, numberFormat) {
if (number.getNationalNumber() == 0 && number.hasRawInput()) {
// Unparseable numbers that kept their raw input just use that.
// This is the only case where a number can be formatted as E164 without a
// leading '+' symbol (but the original number wasn't parseable anyway).
// TODO: Consider removing the 'if' above so that unparseable strings
// without raw input format to the empty string instead of "+00"
/** @type {string} */
var rawInput = number.getRawInputOrDefault();
if (rawInput.length > 0) {
return rawInput;
}
}
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.E164) {
// Early exit for E164 case (even if the country calling code is invalid)
// since no formatting of the national number needs to be applied.
// Extensions are not formatted.
return this.prefixNumberWithCountryCallingCode_(
countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.E164,
nationalSignificantNumber, '');
}
if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
return nationalSignificantNumber;
}
// Note getRegionCodeForCountryCode() is used because formatting information
// for regions which share a country calling code is contained by only one
// region for performance reasons. For example, for NANPA regions it will be
// contained in the metadata for US.
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid (which
// means that the region code cannot be ZZ and must be one of our supported
// region codes).
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
/** @type {string} */
var formattedExtension =
this.maybeGetFormattedExtension_(number, metadata, numberFormat);
/** @type {string} */
var formattedNationalNumber =
this.formatNsn_(nationalSignificantNumber, metadata, numberFormat);
return this.prefixNumberWithCountryCallingCode_(countryCallingCode,
numberFormat,
formattedNationalNumber,
formattedExtension);
};
/**
* Formats a phone number in the specified format using client-defined
* formatting rules. Note that if the phone number has a country calling code of
* zero or an otherwise invalid country calling code, we cannot work out things
* like whether there should be a national prefix applied, or how to format
* extensions, so we return the national significant number with no formatting
* applied.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {Array.<i18n.phonenumbers.NumberFormat>} userDefinedFormats formatting
* rules specified by clients.
* @return {string} the formatted phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatByPattern =
function(number, numberFormat, userDefinedFormats) {
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
return nationalSignificantNumber;
}
// Note getRegionCodeForCountryCode() is used because formatting information
// for regions which share a country calling code is contained by only one
// region for performance reasons. For example, for NANPA regions it will be
// contained in the metadata for US.
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
/** @type {string} */
var formattedNumber = '';
/** @type {i18n.phonenumbers.NumberFormat} */
var formattingPattern = this.chooseFormattingPatternForNumber_(
userDefinedFormats, nationalSignificantNumber);
if (formattingPattern == null) {
// If no pattern above is matched, we format the number as a whole.
formattedNumber = nationalSignificantNumber;
} else {
// Before we do a replacement of the national prefix pattern $NP with the
// national prefix, we need to copy the rule so that subsequent replacements
// for different numbers have the appropriate national prefix.
/** @type {i18n.phonenumbers.NumberFormat} */
var numFormatCopy = formattingPattern.clone();
/** @type {string} */
var nationalPrefixFormattingRule =
formattingPattern.getNationalPrefixFormattingRuleOrDefault();
if (nationalPrefixFormattingRule.length > 0) {
/** @type {string} */
var nationalPrefix = metadata.getNationalPrefixOrDefault();
if (nationalPrefix.length > 0) {
// Replace $NP with national prefix and $FG with the first group ($1).
nationalPrefixFormattingRule = nationalPrefixFormattingRule
.replace(i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_,
nationalPrefix)
.replace(i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_, '$1');
numFormatCopy.setNationalPrefixFormattingRule(
nationalPrefixFormattingRule);
} else {
// We don't want to have a rule for how to format the national prefix if
// there isn't one.
numFormatCopy.clearNationalPrefixFormattingRule();
}
}
formattedNumber = this.formatNsnUsingPattern_(
nationalSignificantNumber, numFormatCopy, numberFormat);
}
/** @type {string} */
var formattedExtension =
this.maybeGetFormattedExtension_(number, metadata, numberFormat);
return this.prefixNumberWithCountryCallingCode_(countryCallingCode,
numberFormat,
formattedNumber,
formattedExtension);
};
/**
* Formats a phone number in national format for dialing using the carrier as
* specified in the {@code carrierCode}. The {@code carrierCode} will always be
* used regardless of whether the phone number already has a preferred domestic
* carrier code stored. If {@code carrierCode} contains an empty string, returns
* the number in national format without any carrier code.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} carrierCode the carrier selection code to be used.
* @return {string} the formatted phone number in national format for dialing
* using the carrier as specified in the {@code carrierCode}.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
formatNationalNumberWithCarrierCode = function(number, carrierCode) {
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
return nationalSignificantNumber;
}
// Note getRegionCodeForCountryCode() is used because formatting information
// for regions which share a country calling code is contained by only one
// region for performance reasons. For example, for NANPA regions it will be
// contained in the metadata for US.
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
/** @type {string} */
var formattedExtension = this.maybeGetFormattedExtension_(
number, metadata, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
/** @type {string} */
var formattedNationalNumber = this.formatNsn_(
nationalSignificantNumber, metadata,
i18n.phonenumbers.PhoneNumberFormat.NATIONAL, carrierCode);
return this.prefixNumberWithCountryCallingCode_(
countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.NATIONAL,
formattedNationalNumber, formattedExtension);
};
/**
* @param {number} countryCallingCode
* @param {?string} regionCode
* @return {i18n.phonenumbers.PhoneMetadata}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegionOrCallingCode_ =
function(countryCallingCode, regionCode) {
return i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ==
regionCode ?
this.getMetadataForNonGeographicalRegion(countryCallingCode) :
this.getMetadataForRegion(regionCode);
};
/**
* Formats a phone number in national format for dialing using the carrier as
* specified in the preferred_domestic_carrier_code field of the PhoneNumber
* object passed in. If that is missing, use the {@code fallbackCarrierCode}
* passed in instead. If there is no {@code preferred_domestic_carrier_code},
* and the {@code fallbackCarrierCode} contains an empty string, return the
* number in national format without any carrier code.
*
* <p>Use {@link #formatNationalNumberWithCarrierCode} instead if the carrier
* code passed in should take precedence over the number's
* {@code preferred_domestic_carrier_code} when formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} fallbackCarrierCode the carrier selection code to be used, if
* none is found in the phone number itself.
* @return {string} the formatted phone number in national format for dialing
* using the number's preferred_domestic_carrier_code, or the
* {@code fallbackCarrierCode} passed in if none is found.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
formatNationalNumberWithPreferredCarrierCode = function(
number, fallbackCarrierCode) {
return this.formatNationalNumberWithCarrierCode(
number,
// Historically, we set this to an empty string when parsing with raw
// input if none was found in the input string. However, this doesn't
// result in a number we can dial. For this reason, we treat the empty
// string the same as if it isn't set at all.
number.getPreferredDomesticCarrierCodeOrDefault().length > 0 ?
number.getPreferredDomesticCarrierCodeOrDefault() :
fallbackCarrierCode);
};
/**
* Returns a number formatted in such a way that it can be dialed from a mobile
* phone in a specific region. If the number cannot be reached from the region
* (e.g. some countries block toll-free numbers from being called outside of the
* country), the method returns an empty string.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* @param {boolean} withFormatting whether the number should be returned with
* formatting symbols, such as spaces and dashes.
* @return {string} the formatted phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatNumberForMobileDialing =
function(number, regionCallingFrom, withFormatting) {
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
return number.hasRawInput() ? number.getRawInputOrDefault() : '';
}
/** @type {string} */
var formattedNumber = '';
// Clear the extension, as that part cannot normally be dialed together with
// the main number.
/** @type {i18n.phonenumbers.PhoneNumber} */
var numberNoExt = number.clone();
numberNoExt.clearExtension();
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
/** @type {i18n.phonenumbers.PhoneNumberType} */
var numberType = this.getNumberType(numberNoExt);
/** @type {boolean} */
var isValidNumber = (numberType != i18n.phonenumbers.PhoneNumberType.UNKNOWN);
if (regionCallingFrom == regionCode) {
/** @type {boolean} */
var isFixedLineOrMobile =
(numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.MOBILE) ||
(numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE);
// Carrier codes may be needed in some countries. We handle this here.
if (regionCode == 'CO' &&
numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) {
formattedNumber = this.formatNationalNumberWithCarrierCode(
numberNoExt,
i18n.phonenumbers.PhoneNumberUtil
.COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_);
} else if (regionCode == 'BR' && isFixedLineOrMobile) {
formattedNumber =
// Historically, we set this to an empty string when parsing with raw
// input if none was found in the input string. However, this doesn't
// result in a number we can dial. For this reason, we treat the empty
// string the same as if it isn't set at all.
numberNoExt.getPreferredDomesticCarrierCodeOrDefault().length > 0 ?
this.formatNationalNumberWithPreferredCarrierCode(numberNoExt, '') :
// Brazilian fixed line and mobile numbers need to be dialed with a
// carrier code when called within Brazil. Without that, most of the
// carriers won't connect the call. Because of that, we return an
// empty string here.
'';
} else if (countryCallingCode ==
i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
// For NANPA countries, we output international format for numbers that
// can be dialed internationally, since that always works, except for
// numbers which might potentially be short numbers, which are always
// dialled in national format.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var regionMetadata = this.getMetadataForRegion(regionCallingFrom);
if (this.canBeInternationallyDialled(numberNoExt) &&
this.testNumberLength_(this.getNationalSignificantNumber(numberNoExt),
regionMetadata) !=
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT) {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
} else {
// For non-geographical countries, and Mexican, Chilean and Uzbek fixed
// line and mobile numbers, we output international format for numbers
// that can be dialed internationally as that always works.
if ((regionCode ==
i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ||
// MX fixed line and mobile numbers should always be formatted in
// international format, even when dialed within MX. For national
// format to work, a carrier code needs to be used, and the correct
// carrier code depends on if the caller and callee are from the
// same local area. It is trickier to get that to work correctly than
// using international format, which is tested to work fine on all
// carriers.
// CL fixed line numbers need the national prefix when dialing in the
// national format, but don't have it when used for display. The
// reverse is true for mobile numbers. As a result, we output them in
// the international format to make it work.
// UZ mobile and fixed-line numbers have to be formatted in
// international format or prefixed with special codes like 03, 04
// (for fixed-line) and 05 (for mobile) for dialling successfully
// from mobile devices. As we do not have complete information on
// special codes and to be consistent with formatting across all
// phone types we return the number in international format here.
((regionCode == 'MX' || regionCode == 'CL' || regionCode == 'UZ') &&
isFixedLineOrMobile)) &&
this.canBeInternationallyDialled(numberNoExt)) {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
} else {
formattedNumber = this.format(
numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
}
} else if (isValidNumber && this.canBeInternationallyDialled(numberNoExt)) {
// We assume that short numbers are not diallable from outside their region,
// so if a number is not a valid regular length phone number, we treat it as
// if it cannot be internationally dialled.
return withFormatting ?
this.format(numberNoExt,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL) :
this.format(numberNoExt, i18n.phonenumbers.PhoneNumberFormat.E164);
}
return withFormatting ?
formattedNumber :
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
formattedNumber);
};
/**
* Formats a phone number for out-of-country dialing purposes. If no
* regionCallingFrom is supplied, we format the number in its INTERNATIONAL
* format. If the country calling code is the same as that of the region where
* the number is from, then NATIONAL formatting will be applied.
*
* <p>If the number itself has a country calling code of zero or an otherwise
* invalid country calling code, then we return the number with no formatting
* applied.
*
* <p>Note this function takes care of the case for calling inside of NANPA and
* between Russia and Kazakhstan (who share the same country calling code). In
* those cases, no international prefix is used. For regions which have multiple
* international prefixes, the number in its INTERNATIONAL format will be
* returned instead.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
* formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* @return {string} the formatted phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatOutOfCountryCallingNumber =
function(number, regionCallingFrom) {
if (!this.isValidRegionCode_(regionCallingFrom)) {
return this.format(number,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
}
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
return nationalSignificantNumber;
}
if (countryCallingCode ==
i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
if (this.isNANPACountry(regionCallingFrom)) {
// For NANPA regions, return the national format for these regions but
// prefix it with the country calling code.
return countryCallingCode + ' ' +
this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
} else if (countryCallingCode ==
this.getCountryCodeForValidRegion_(regionCallingFrom)) {
// If regions share a country calling code, the country calling code need
// not be dialled. This also applies when dialling within a region, so this
// if clause covers both these cases. Technically this is the case for
// dialling from La Reunion to other overseas departments of France (French
// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
// this edge case for now and for those cases return the version including
// country calling code. Details here:
// http://www.petitfute.com/voyage/225-info-pratiques-reunion
return this.format(number,
i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
// Metadata cannot be null because we checked 'isValidRegionCode()' above.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadataForRegionCallingFrom =
this.getMetadataForRegion(regionCallingFrom);
/** @type {string} */
var internationalPrefix =
metadataForRegionCallingFrom.getInternationalPrefixOrDefault();
// For regions that have multiple international prefixes, the international
// format of the number is returned, unless there is a preferred international
// prefix.
/** @type {string} */
var internationalPrefixForFormatting = '';
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
internationalPrefix)) {
internationalPrefixForFormatting = internationalPrefix;
} else if (metadataForRegionCallingFrom.hasPreferredInternationalPrefix()) {
internationalPrefixForFormatting =
metadataForRegionCallingFrom.getPreferredInternationalPrefixOrDefault();
}
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
// Metadata cannot be null because the country calling code is valid.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadataForRegion =
this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
/** @type {string} */
var formattedNationalNumber = this.formatNsn_(
nationalSignificantNumber, metadataForRegion,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
/** @type {string} */
var formattedExtension = this.maybeGetFormattedExtension_(number,
metadataForRegion, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
return internationalPrefixForFormatting.length > 0 ?
internationalPrefixForFormatting + ' ' + countryCallingCode + ' ' +
formattedNationalNumber + formattedExtension :
this.prefixNumberWithCountryCallingCode_(
countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
formattedNationalNumber, formattedExtension);
};
/**
* Formats a phone number using the original phone number format that the number
* is parsed from. The original format is embedded in the country_code_source
* field of the PhoneNumber object passed in. If such information is missing,
* the number will be formatted into the NATIONAL format by default. When the
* number contains a leading zero and this is unexpected for this country, or
* we don't have a formatting pattern for the number, the method returns the
* raw input when it is available.
*
* Note this method guarantees no digit will be inserted, removed or modified as
* a result of formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* be formatted in its original number format.
* @param {string} regionCallingFrom the region whose IDD needs to be prefixed
* if the original number has one.
* @return {string} the formatted phone number in its original number format.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatInOriginalFormat =
function(number, regionCallingFrom) {
if (number.hasRawInput() && !this.hasFormattingPatternForNumber_(number)) {
// We check if we have the formatting pattern because without that, we might
// format the number as a group without national prefix.
return number.getRawInputOrDefault();
}
if (!number.hasCountryCodeSource()) {
return this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
/** @type {string} */
var formattedNumber;
switch (number.getCountryCodeSource()) {
case i18n.phonenumbers.PhoneNumber.CountryCodeSource
.FROM_NUMBER_WITH_PLUS_SIGN:
formattedNumber = this.format(number,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
break;
case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD:
formattedNumber =
this.formatOutOfCountryCallingNumber(number, regionCallingFrom);
break;
case i18n.phonenumbers.PhoneNumber.CountryCodeSource
.FROM_NUMBER_WITHOUT_PLUS_SIGN:
formattedNumber = this.format(number,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL).substring(1);
break;
case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY:
// Fall-through to default case.
default:
/** @type {string} */
var regionCode =
this.getRegionCodeForCountryCode(number.getCountryCodeOrDefault());
// We strip non-digits from the NDD here, and from the raw input later,
// so that we can compare them easily.
/** @type {?string} */
var nationalPrefix = this.getNddPrefixForRegion(regionCode, true);
/** @type {string} */
var nationalFormat =
this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
if (nationalPrefix == null || nationalPrefix.length == 0) {
// If the region doesn't have a national prefix at all, we can safely
// return the national format without worrying about a national prefix
// being added.
formattedNumber = nationalFormat;
break;
}
// Otherwise, we check if the original number was entered with a national
// prefix.
if (this.rawInputContainsNationalPrefix_(
number.getRawInputOrDefault(), nationalPrefix, regionCode)) {
// If so, we can safely return the national format.
formattedNumber = nationalFormat;
break;
}
// Metadata cannot be null here because getNddPrefixForRegion() (above)
// returns null if there is no metadata for the region.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(regionCode);
/** @type {string} */
var nationalNumber = this.getNationalSignificantNumber(number);
/** @type {i18n.phonenumbers.NumberFormat} */
var formatRule = this.chooseFormattingPatternForNumber_(
metadata.numberFormatArray(), nationalNumber);
// The format rule could still be null here if the national number was 0
// and there was no raw input (this should not be possible for numbers
// generated by the phonenumber library as they would also not have a
// country calling code and we would have exited earlier).
if (formatRule == null) {
formattedNumber = nationalFormat;
break;
}
// When the format we apply to this number doesn't contain national
// prefix, we can just return the national format.
// TODO: Refactor the code below with the code in
// isNationalPrefixPresentIfRequired.
/** @type {string} */
var candidateNationalPrefixRule =
formatRule.getNationalPrefixFormattingRuleOrDefault();
// We assume that the first-group symbol will never be _before_ the
// national prefix.
/** @type {number} */
var indexOfFirstGroup = candidateNationalPrefixRule.indexOf('$1');
if (indexOfFirstGroup <= 0) {
formattedNumber = nationalFormat;
break;
}
candidateNationalPrefixRule =
candidateNationalPrefixRule.substring(0, indexOfFirstGroup);
candidateNationalPrefixRule = i18n.phonenumbers.PhoneNumberUtil
.normalizeDigitsOnly(candidateNationalPrefixRule);
if (candidateNationalPrefixRule.length == 0) {
// National prefix not used when formatting this number.
formattedNumber = nationalFormat;
break;
}
// Otherwise, we need to remove the national prefix from our output.
/** @type {i18n.phonenumbers.NumberFormat} */
var numFormatCopy = formatRule.clone();
numFormatCopy.clearNationalPrefixFormattingRule();
formattedNumber = this.formatByPattern(number,
i18n.phonenumbers.PhoneNumberFormat.NATIONAL, [numFormatCopy]);
break;
}
/** @type {string} */
var rawInput = number.getRawInputOrDefault();
// If no digit is inserted/removed/modified as a result of our formatting, we
// return the formatted phone number; otherwise we return the raw input the
// user entered.
if (formattedNumber != null && rawInput.length > 0) {
/** @type {string} */
var normalizedFormattedNumber =
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
formattedNumber);
/** @type {string} */
var normalizedRawInput =
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(rawInput);
if (normalizedFormattedNumber != normalizedRawInput) {
formattedNumber = rawInput;
}
}
return formattedNumber;
};
/**
* Check if rawInput, which is assumed to be in the national format, has a
* national prefix. The national prefix is assumed to be in digits-only form.
* @param {string} rawInput
* @param {string} nationalPrefix
* @param {string} regionCode
* @return {boolean}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.rawInputContainsNationalPrefix_ =
function(rawInput, nationalPrefix, regionCode) {
/** @type {string} */
var normalizedNationalNumber =
i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(rawInput);
if (goog.string.startsWith(normalizedNationalNumber, nationalPrefix)) {
try {
// Some Japanese numbers (e.g. 00777123) might be mistaken to contain the
// national prefix when written without it (e.g. 0777123) if we just do
// prefix matching. To tackle that, we check the validity of the number if
// the assumed national prefix is removed (777123 won't be valid in
// Japan).
return this.isValidNumber(
this.parse(normalizedNationalNumber.substring(nationalPrefix.length),
regionCode));
} catch (e) {
return false;
}
}
return false;
};
/**
* @param {i18n.phonenumbers.PhoneNumber} number
* @return {boolean}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.hasFormattingPatternForNumber_ =
function(number) {
/** @type {number} */
var countryCallingCode = number.getCountryCodeOrDefault();
/** @type {string} */
var phoneNumberRegion = this.getRegionCodeForCountryCode(countryCallingCode);
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegionOrCallingCode_(
countryCallingCode, phoneNumberRegion);
if (metadata == null) {
return false;
}
/** @type {string} */
var nationalNumber = this.getNationalSignificantNumber(number);
/** @type {i18n.phonenumbers.NumberFormat} */
var formatRule = this.chooseFormattingPatternForNumber_(
metadata.numberFormatArray(), nationalNumber);
return formatRule != null;
};
/**
* Formats a phone number for out-of-country dialing purposes.
*
* Note that in this version, if the number was entered originally using alpha
* characters and this version of the number is stored in raw_input, this
* representation of the number will be used rather than the digit
* representation. Grouping information, as specified by characters such as '-'
* and ' ', will be retained.
*
* <p><b>Caveats:</b></p>
* <ul>
* <li>This will not produce good results if the country calling code is both
* present in the raw input _and_ is the start of the national number. This is
* not a problem in the regions which typically use alpha numbers.
* <li>This will also not produce good results if the raw input has any grouping
* information within the first three digits of the national number, and if the
* function needs to strip preceding digits/words in the raw input before these
* digits. Normally people group the first three digits together so this is not
* a huge problem - and will be fixed if it proves to be so.
* </ul>
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
* be formatted.
* @param {string} regionCallingFrom the region where the call is being placed.
* @return {string} the formatted phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
formatOutOfCountryKeepingAlphaChars = function(number, regionCallingFrom) {
/** @type {string} */
var rawInput = number.getRawInputOrDefault();
// If there is no raw input, then we can't keep alpha characters because there
// aren't any. In this case, we return formatOutOfCountryCallingNumber.
if (rawInput.length == 0) {
return this.formatOutOfCountryCallingNumber(number, regionCallingFrom);
}
/** @type {number} */
var countryCode = number.getCountryCodeOrDefault();
if (!this.hasValidCountryCallingCode_(countryCode)) {
return rawInput;
}
// Strip any prefix such as country calling code, IDD, that was present. We do
// this by comparing the number in raw_input with the parsed number. To do
// this, first we normalize punctuation. We retain number grouping symbols
// such as ' ' only.
rawInput = i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(
rawInput,
i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_,
true);
// Now we trim everything before the first three digits in the parsed number.
// We choose three because all valid alpha numbers have 3 digits at the start
// - if it does not, then we don't trim anything at all. Similarly, if the
// national number was less than three digits, we don't trim anything at all.
/** @type {string} */
var nationalNumber = this.getNationalSignificantNumber(number);
if (nationalNumber.length > 3) {
/** @type {number} */
var firstNationalNumberDigit =
rawInput.indexOf(nationalNumber.substring(0, 3));
if (firstNationalNumberDigit != -1) {
rawInput = rawInput.substring(firstNationalNumberDigit);
}
}
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadataForRegionCallingFrom =
this.getMetadataForRegion(regionCallingFrom);
if (countryCode == i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
if (this.isNANPACountry(regionCallingFrom)) {
return countryCode + ' ' + rawInput;
}
} else if (metadataForRegionCallingFrom != null &&
countryCode == this.getCountryCodeForValidRegion_(regionCallingFrom)) {
/** @type {i18n.phonenumbers.NumberFormat} */
var formattingPattern = this.chooseFormattingPatternForNumber_(
metadataForRegionCallingFrom.numberFormatArray(), nationalNumber);
if (formattingPattern == null) {
// If no pattern above is matched, we format the original input.
return rawInput;
}
/** @type {i18n.phonenumbers.NumberFormat} */
var newFormat = formattingPattern.clone();
// The first group is the first group of digits that the user wrote
// together.
newFormat.setPattern('(\\d+)(.*)');
// Here we just concatenate them back together after the national prefix
// has been fixed.
newFormat.setFormat('$1$2');
// Now we format using this pattern instead of the default pattern, but
// with the national prefix prefixed if necessary.
// This will not work in the cases where the pattern (and not the leading
// digits) decide whether a national prefix needs to be used, since we have
// overridden the pattern to match anything, but that is not the case in the
// metadata to date.
return this.formatNsnUsingPattern_(rawInput, newFormat,
i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
}
/** @type {string} */
var internationalPrefixForFormatting = '';
// If an unsupported region-calling-from is entered, or a country with
// multiple international prefixes, the international format of the number is
// returned, unless there is a preferred international prefix.
if (metadataForRegionCallingFrom != null) {
/** @type {string} */
var internationalPrefix =
metadataForRegionCallingFrom.getInternationalPrefixOrDefault();
internationalPrefixForFormatting =
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
internationalPrefix) ?
internationalPrefix :
metadataForRegionCallingFrom.getPreferredInternationalPrefixOrDefault();
}
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCode);
// Metadata cannot be null because the country calling code is valid.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadataForRegion =
this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
/** @type {string} */
var formattedExtension = this.maybeGetFormattedExtension_(
number, metadataForRegion,
i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
if (internationalPrefixForFormatting.length > 0) {
return internationalPrefixForFormatting + ' ' + countryCode + ' ' +
rawInput + formattedExtension;
} else {
// Invalid region entered as country-calling-from (so no metadata was found
// for it) or the region chosen has multiple international dialling
// prefixes.
return this.prefixNumberWithCountryCallingCode_(
countryCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
rawInput, formattedExtension);
}
};
/**
* Gets the national significant number of a phone number. Note a national
* significant number doesn't contain a national prefix or any formatting.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
* national significant number is needed.
* @return {string} the national significant number of the PhoneNumber object
* passed in.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getNationalSignificantNumber =
function(number) {
if (!number.hasNationalNumber()) {
return '';
}
/** @type {string} */
var nationalNumber = '' + number.getNationalNumber();
// If leading zero(s) have been set, we prefix this now. Note that a single
// leading zero is not the same as a national prefix; leading zeros should be
// dialled no matter whether you are dialling from within or outside the
// country, national prefixes are added when formatting nationally if
// applicable.
if (number.hasItalianLeadingZero() && number.getItalianLeadingZero() &&
number.getNumberOfLeadingZerosOrDefault() > 0) {
return Array(number.getNumberOfLeadingZerosOrDefault() + 1).join('0') +
nationalNumber;
}
return nationalNumber;
};
/**
* A helper function that is used by format and formatByPattern.
*
* @param {number} countryCallingCode the country calling code.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string} formattedNationalNumber
* @param {string} formattedExtension
* @return {string} the formatted phone number.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
prefixNumberWithCountryCallingCode_ = function(countryCallingCode,
numberFormat,
formattedNationalNumber,
formattedExtension) {
switch (numberFormat) {
case i18n.phonenumbers.PhoneNumberFormat.E164:
return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
formattedNationalNumber + formattedExtension;
case i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL:
return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
' ' + formattedNationalNumber + formattedExtension;
case i18n.phonenumbers.PhoneNumberFormat.RFC3966:
return i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ +
i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
'-' + formattedNationalNumber + formattedExtension;
case i18n.phonenumbers.PhoneNumberFormat.NATIONAL:
default:
return formattedNationalNumber + formattedExtension;
}
};
/**
* Note in some regions, the national number can be written in two completely
* different ways depending on whether it forms part of the NATIONAL format or
* INTERNATIONAL format. The numberFormat parameter here is used to specify
* which format to use for those cases. If a carrierCode is specified, this will
* be inserted into the formatted string to replace $CC.
*
* @param {string} number a string of characters representing a phone number.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string=} opt_carrierCode
* @return {string} the formatted phone number.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsn_ =
function(number, metadata, numberFormat, opt_carrierCode) {
/** @type {Array.<i18n.phonenumbers.NumberFormat>} */
var intlNumberFormats = metadata.intlNumberFormatArray();
// When the intlNumberFormats exists, we use that to format national number
// for the INTERNATIONAL format instead of using the numberDesc.numberFormats.
/** @type {Array.<i18n.phonenumbers.NumberFormat>} */
var availableFormats =
(intlNumberFormats.length == 0 ||
numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL) ?
metadata.numberFormatArray() : metadata.intlNumberFormatArray();
/** @type {i18n.phonenumbers.NumberFormat} */
var formattingPattern = this.chooseFormattingPatternForNumber_(
availableFormats, number);
return (formattingPattern == null) ?
number :
this.formatNsnUsingPattern_(number, formattingPattern,
numberFormat, opt_carrierCode);
};
/**
* @param {Array.<i18n.phonenumbers.NumberFormat>} availableFormats the
* available formats the phone number could be formatted into.
* @param {string} nationalNumber a string of characters representing a phone
* number.
* @return {i18n.phonenumbers.NumberFormat}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.chooseFormattingPatternForNumber_ =
function(availableFormats, nationalNumber) {
/** @type {i18n.phonenumbers.NumberFormat} */
var numFormat;
/** @type {number} */
var l = availableFormats.length;
for (var i = 0; i < l; ++i) {
numFormat = availableFormats[i];
/** @type {number} */
var size = numFormat.leadingDigitsPatternCount();
if (size == 0 ||
// We always use the last leading_digits_pattern, as it is the most
// detailed.
nationalNumber
.search(numFormat.getLeadingDigitsPattern(size - 1)) == 0) {
/** @type {!RegExp} */
var patternToMatch = new RegExp(numFormat.getPattern());
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(patternToMatch,
nationalNumber)) {
return numFormat;
}
}
}
return null;
};
/**
* Note that carrierCode is optional - if null or an empty string, no carrier
* code replacement will take place.
*
* @param {string} nationalNumber a string of characters representing a phone
* number.
* @param {i18n.phonenumbers.NumberFormat} formattingPattern the formatting rule
* the phone number should be formatted into.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @param {string=} opt_carrierCode
* @return {string} the formatted phone number.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsnUsingPattern_ =
function(nationalNumber, formattingPattern, numberFormat, opt_carrierCode) {
/** @type {string} */
var numberFormatRule = formattingPattern.getFormatOrDefault();
/** @type {!RegExp} */
var patternToMatch = new RegExp(formattingPattern.getPattern());
/** @type {string} */
var domesticCarrierCodeFormattingRule =
formattingPattern.getDomesticCarrierCodeFormattingRuleOrDefault();
/** @type {string} */
var formattedNationalNumber = '';
if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
opt_carrierCode != null && opt_carrierCode.length > 0 &&
domesticCarrierCodeFormattingRule.length > 0) {
// Replace the $CC in the formatting rule with the desired carrier code.
/** @type {string} */
var carrierCodeFormattingRule = domesticCarrierCodeFormattingRule
.replace(i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_,
opt_carrierCode);
// Now replace the $FG in the formatting rule with the first group and
// the carrier code combined in the appropriate way.
numberFormatRule = numberFormatRule.replace(
i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
carrierCodeFormattingRule);
formattedNationalNumber =
nationalNumber.replace(patternToMatch, numberFormatRule);
} else {
// Use the national prefix formatting rule instead.
/** @type {string} */
var nationalPrefixFormattingRule =
formattingPattern.getNationalPrefixFormattingRuleOrDefault();
if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
nationalPrefixFormattingRule != null &&
nationalPrefixFormattingRule.length > 0) {
formattedNationalNumber = nationalNumber.replace(patternToMatch,
numberFormatRule.replace(
i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
nationalPrefixFormattingRule));
} else {
formattedNationalNumber =
nationalNumber.replace(patternToMatch, numberFormatRule);
}
}
if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
// Strip any leading punctuation.
formattedNationalNumber = formattedNationalNumber.replace(
new RegExp('^' + i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_),
'');
// Replace the rest with a dash between each number group.
formattedNationalNumber = formattedNationalNumber.replace(
new RegExp(i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_, 'g'),
'-');
}
return formattedNationalNumber;
};
/**
* Gets a valid number for the specified region.
*
* @param {string} regionCode the region for which an example number is needed.
* @return {i18n.phonenumbers.PhoneNumber} a valid fixed-line number for the
* specified region. Returns null when the metadata does not contain such
* information, or the region 001 is passed in. For 001 (representing non-
* geographical numbers), call {@link #getExampleNumberForNonGeoEntity}
* instead.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumber =
function(regionCode) {
return this.getExampleNumberForType(regionCode,
i18n.phonenumbers.PhoneNumberType.FIXED_LINE);
};
/**
* Gets a valid number for the specified region and number type.
*
* @param {string} regionCode the region for which an example number is needed.
* @param {i18n.phonenumbers.PhoneNumberType} type the type of number that is
* needed.
* @return {i18n.phonenumbers.PhoneNumber} a valid number for the specified
* region and type. Returns null when the metadata does not contain such
* information or if an invalid region or region 001 was entered.
* For 001 (representing non-geographical numbers), call
* {@link #getExampleNumberForNonGeoEntity} instead.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForType =
function(regionCode, type) {
// Check the region code is valid.
if (!this.isValidRegionCode_(regionCode)) {
return null;
}
/** @type {i18n.phonenumbers.PhoneNumberDesc} */
var desc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
this.getMetadataForRegion(regionCode), type);
try {
if (desc.hasExampleNumber()) {
return this.parse(desc.getExampleNumber(), regionCode);
}
} catch (e) {
}
return null;
};
/**
* Gets a valid number for the specified country calling code for a
* non-geographical entity.
*
* @param {number} countryCallingCode the country calling code for a
* non-geographical entity.
* @return {i18n.phonenumbers.PhoneNumber} a valid number for the
* non-geographical entity. Returns null when the metadata does not contain
* such information, or the country calling code passed in does not belong
* to a non-geographical entity.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForNonGeoEntity =
function(countryCallingCode) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForNonGeographicalRegion(countryCallingCode);
if (metadata != null) {
/** @type {i18n.phonenumbers.PhoneNumberDesc} */
var numberTypeWithExampleNumber = goog.array.find(
[metadata.getMobile(), metadata.getTollFree(),
metadata.getSharedCost(), metadata.getVoip(),
metadata.getVoicemail(), metadata.getUan(),
metadata.getPremiumRate()],
function(desc, index) {
return (desc.hasExampleNumber());
});
if (numberTypeWithExampleNumber != null) {
try {
return this.parse('+' + countryCallingCode +
numberTypeWithExampleNumber.getExampleNumber(), 'ZZ');
} catch (e) {
}
}
}
return null;
};
/**
* Gets the formatted extension of a phone number, if the phone number had an
* extension specified. If not, it returns an empty string.
*
* @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber that might have
* an extension.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
* phone number should be formatted into.
* @return {string} the formatted extension if any.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.maybeGetFormattedExtension_ =
function(number, metadata, numberFormat) {
if (!number.hasExtension() || number.getExtension().length == 0) {
return '';
} else {
if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
return i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ +
number.getExtension();
} else {
if (metadata.hasPreferredExtnPrefix()) {
return metadata.getPreferredExtnPrefix() +
number.getExtensionOrDefault();
} else {
return i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ +
number.getExtensionOrDefault();
}
}
}
};
/**
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* @param {i18n.phonenumbers.PhoneNumberType} type
* @return {i18n.phonenumbers.PhoneNumberDesc}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_ =
function(metadata, type) {
switch (type) {
case i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE:
return metadata.getPremiumRate();
case i18n.phonenumbers.PhoneNumberType.TOLL_FREE:
return metadata.getTollFree();
case i18n.phonenumbers.PhoneNumberType.MOBILE:
return metadata.getMobile();
case i18n.phonenumbers.PhoneNumberType.FIXED_LINE:
case i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE:
return metadata.getFixedLine();
case i18n.phonenumbers.PhoneNumberType.SHARED_COST:
return metadata.getSharedCost();
case i18n.phonenumbers.PhoneNumberType.VOIP:
return metadata.getVoip();
case i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER:
return metadata.getPersonalNumber();
case i18n.phonenumbers.PhoneNumberType.PAGER:
return metadata.getPager();
case i18n.phonenumbers.PhoneNumberType.UAN:
return metadata.getUan();
case i18n.phonenumbers.PhoneNumberType.VOICEMAIL:
return metadata.getVoicemail();
default:
return metadata.getGeneralDesc();
}
};
/**
* Gets the type of a valid phone number.
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to know the type.
* @return {i18n.phonenumbers.PhoneNumberType} the type of the phone number, or
* UNKNOWN if it is invalid.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberType =
function(number) {
/** @type {?string} */
var regionCode = this.getRegionCodeForNumber(number);
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegionOrCallingCode_(
number.getCountryCodeOrDefault(), regionCode);
if (metadata == null) {
return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
}
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
return this.getNumberTypeHelper_(nationalSignificantNumber, metadata);
};
/**
* @param {string} nationalNumber
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* @return {i18n.phonenumbers.PhoneNumberType}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberTypeHelper_ =
function(nationalNumber, metadata) {
if (!this.isNumberMatchingDesc_(nationalNumber, metadata.getGeneralDesc())) {
return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getPremiumRate())) {
return i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getTollFree())) {
return i18n.phonenumbers.PhoneNumberType.TOLL_FREE;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getSharedCost())) {
return i18n.phonenumbers.PhoneNumberType.SHARED_COST;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getVoip())) {
return i18n.phonenumbers.PhoneNumberType.VOIP;
}
if (this.isNumberMatchingDesc_(nationalNumber,
metadata.getPersonalNumber())) {
return i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getPager())) {
return i18n.phonenumbers.PhoneNumberType.PAGER;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getUan())) {
return i18n.phonenumbers.PhoneNumberType.UAN;
}
if (this.isNumberMatchingDesc_(nationalNumber, metadata.getVoicemail())) {
return i18n.phonenumbers.PhoneNumberType.VOICEMAIL;
}
/** @type {boolean} */
var isFixedLine = this.isNumberMatchingDesc_(nationalNumber, metadata
.getFixedLine());
if (isFixedLine) {
if (metadata.getSameMobileAndFixedLinePattern()) {
return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
} else if (this.isNumberMatchingDesc_(nationalNumber,
metadata.getMobile())) {
return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
}
return i18n.phonenumbers.PhoneNumberType.FIXED_LINE;
}
// Otherwise, test to see if the number is mobile. Only do this if certain
// that the patterns for mobile and fixed line aren't the same.
if (!metadata.getSameMobileAndFixedLinePattern() &&
this.isNumberMatchingDesc_(nationalNumber, metadata.getMobile())) {
return i18n.phonenumbers.PhoneNumberType.MOBILE;
}
return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
};
/**
* Returns the metadata for the given region code or {@code null} if the region
* code is invalid or unknown.
*
* @param {?string} regionCode
* @return {?i18n.phonenumbers.PhoneMetadata}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegion =
function(regionCode) {
if (regionCode == null) {
return null;
}
regionCode = regionCode.toUpperCase();
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.regionToMetadataMap[regionCode];
if (metadata == null) {
/** @type {goog.proto2.PbLiteSerializer} */
var serializer = new goog.proto2.PbLiteSerializer();
/** @type {Array} */
var metadataSerialized =
i18n.phonenumbers.metadata.countryToMetadata[regionCode];
if (metadataSerialized == null) {
return null;
}
metadata = /** @type {i18n.phonenumbers.PhoneMetadata} */ (
serializer.deserialize(i18n.phonenumbers.PhoneMetadata.getDescriptor(),
metadataSerialized));
this.regionToMetadataMap[regionCode] = metadata;
}
return metadata;
};
/**
* @param {number} countryCallingCode
* @return {?i18n.phonenumbers.PhoneMetadata}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
getMetadataForNonGeographicalRegion = function(countryCallingCode) {
return this.getMetadataForRegion('' + countryCallingCode);
};
/**
* @param {string} nationalNumber
* @param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
* @return {boolean}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatchingDesc_ =
function(nationalNumber, numberDesc) {
// Check if any possible number lengths are present; if so, we use them to
// avoid checking the validation pattern if they don't match. If they are
// absent, this means they match the general description, which we have
// already checked before a specific number type.
var actualLength = nationalNumber.length;
if (numberDesc.possibleLengthCount() > 0 &&
goog.array.indexOf(numberDesc.possibleLengthArray(),
actualLength) == -1) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
numberDesc.getNationalNumberPatternOrDefault(), nationalNumber);
};
/**
* Tests whether a phone number matches a valid pattern. Note this doesn't
* verify the number is actually in use, which is impossible to tell by just
* looking at a number itself.
* It only verifies whether the parsed, canonicalised number is valid: not
* whether a particular series of digits entered by the user is diallable from
* the region provided when parsing. For example, the number +41 (0) 78 927 2696
* can be parsed into a number with country code "41" and national significant
* number "789272696". This is valid, while the original string is not
* diallable.
*
* @param {!i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to validate.
* @return {boolean} a boolean that indicates whether the number is of a valid
* pattern.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumber = function(number) {
/** @type {?string} */
var regionCode = this.getRegionCodeForNumber(number);
return this.isValidNumberForRegion(number, regionCode);
};
/**
* Tests whether a phone number is valid for a certain region. Note this doesn't
* verify the number is actually in use, which is impossible to tell by just
* looking at a number itself. If the country calling code is not the same as
* the country calling code for the region, this immediately exits with false.
* After this, the specific number pattern rules for the region are examined.
* This is useful for determining for example whether a particular number is
* valid for Canada, rather than just a valid NANPA number.
* Warning: In most cases, you want to use {@link #isValidNumber} instead. For
* example, this method will mark numbers from British Crown dependencies such
* as the Isle of Man as invalid for the region "GB" (United Kingdom), since it
* has its own region code, "IM", which may be undesirable.
*
* @param {!i18n.phonenumbers.PhoneNumber} number the phone number that we want
* to validate.
* @param {?string} regionCode the region that we want to validate the phone
* number for.
* @return {boolean} a boolean that indicates whether the number is of a valid
* pattern.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumberForRegion =
function(number, regionCode) {
/** @type {number} */
var countryCode = number.getCountryCodeOrDefault();
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
if (metadata == null ||
(i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY !=
regionCode &&
countryCode != this.getCountryCodeForValidRegion_(regionCode))) {
// Either the region code was invalid, or the country calling code for this
// number does not match that of the region code.
return false;
}
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
return this.getNumberTypeHelper_(nationalSignificantNumber, metadata) !=
i18n.phonenumbers.PhoneNumberType.UNKNOWN;
};
/**
* Returns the region where a phone number is from. This could be used for
* geocoding at the region level. Only guarantees correct results for valid,
* full numbers (not short-codes, or invalid numbers).
*
* @param {?i18n.phonenumbers.PhoneNumber} number the phone number whose origin
* we want to know.
* @return {?string} the region where the phone number is from, or null
* if no region matches this calling code.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForNumber =
function(number) {
if (number == null) {
return null;
}
/** @type {number} */
var countryCode = number.getCountryCodeOrDefault();
/** @type {Array.<string>} */
var regions =
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCode];
if (regions == null) {
return null;
}
if (regions.length == 1) {
return regions[0];
} else {
return this.getRegionCodeForNumberFromRegionList_(number, regions);
}
};
/**
* @param {!i18n.phonenumbers.PhoneNumber} number
* @param {Array.<string>} regionCodes
* @return {?string}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
getRegionCodeForNumberFromRegionList_ = function(number, regionCodes) {
/** @type {string} */
var nationalNumber = this.getNationalSignificantNumber(number);
/** @type {string} */
var regionCode;
/** @type {number} */
var regionCodesLength = regionCodes.length;
for (var i = 0; i < regionCodesLength; i++) {
regionCode = regionCodes[i];
// If leadingDigits is present, use this. Otherwise, do full validation.
// Metadata cannot be null because the region codes come from the country
// calling code map.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(regionCode);
if (metadata.hasLeadingDigits()) {
if (nationalNumber.search(metadata.getLeadingDigits()) == 0) {
return regionCode;
}
} else if (this.getNumberTypeHelper_(nationalNumber, metadata) !=
i18n.phonenumbers.PhoneNumberType.UNKNOWN) {
return regionCode;
}
}
return null;
};
/**
* Returns the region code that matches the specific country calling code. In
* the case of no region code being found, ZZ will be returned. In the case of
* multiple regions, the one designated in the metadata as the 'main' region for
* this calling code will be returned.
*
* @param {number} countryCallingCode the country calling code.
* @return {string}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForCountryCode =
function(countryCallingCode) {
/** @type {Array.<string>} */
var regionCodes =
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
return regionCodes == null ?
i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ : regionCodes[0];
};
/**
* Returns a list with the region codes that match the specific country calling
* code. For non-geographical country calling codes, the region code 001 is
* returned. Also, in the case of no region code being found, an empty list is
* returned.
*
* @param {number} countryCallingCode the country calling code.
* @return {!Array.<string>}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodesForCountryCode =
function(countryCallingCode) {
/** @type {Array.<string>} */
var regionCodes =
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
return regionCodes == null ? [] : regionCodes;
};
/**
* Returns the country calling code for a specific region. For example, this
* would be 1 for the United States, and 64 for New Zealand.
*
* @param {?string} regionCode the region that we want to get the country
* calling code for.
* @return {number} the country calling code for the region denoted by
* regionCode.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForRegion =
function(regionCode) {
if (!this.isValidRegionCode_(regionCode)) {
return 0;
}
return this.getCountryCodeForValidRegion_(regionCode);
};
/**
* Returns the country calling code for a specific region. For example, this
* would be 1 for the United States, and 64 for New Zealand. Assumes the region
* is already valid.
*
* @param {?string} regionCode the region that we want to get the country
* calling code for.
* @return {number} the country calling code for the region denoted by
* regionCode.
* @throws {Error} if the region is invalid
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForValidRegion_ =
function(regionCode) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(regionCode);
if (metadata == null) {
throw new Error('Invalid region code: ' + regionCode);
}
return metadata.getCountryCodeOrDefault();
};
/**
* Returns the national dialling prefix for a specific region. For example, this
* would be 1 for the United States, and 0 for New Zealand. Set stripNonDigits
* to true to strip symbols like '~' (which indicates a wait for a dialling
* tone) from the prefix returned. If no national prefix is present, we return
* null.
*
* <p>Warning: Do not use this method for do-your-own formatting - for some
* regions, the national dialling prefix is used only for certain types of
* numbers. Use the library's formatting functions to prefix the national prefix
* when required.
*
* @param {?string} regionCode the region that we want to get the dialling
* prefix for.
* @param {boolean} stripNonDigits true to strip non-digits from the national
* dialling prefix.
* @return {?string} the dialling prefix for the region denoted by
* regionCode.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.getNddPrefixForRegion = function(
regionCode, stripNonDigits) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(regionCode);
if (metadata == null) {
return null;
}
/** @type {string} */
var nationalPrefix = metadata.getNationalPrefixOrDefault();
// If no national prefix was found, we return null.
if (nationalPrefix.length == 0) {
return null;
}
if (stripNonDigits) {
// Note: if any other non-numeric symbols are ever used in national
// prefixes, these would have to be removed here as well.
nationalPrefix = nationalPrefix.replace('~', '');
}
return nationalPrefix;
};
/**
* Checks if this is a region under the North American Numbering Plan
* Administration (NANPA).
*
* @param {?string} regionCode the CLDR two-letter region code.
* @return {boolean} true if regionCode is one of the regions under NANPA.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isNANPACountry =
function(regionCode) {
return regionCode != null && goog.array.contains(
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[
i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_],
regionCode.toUpperCase());
};
/**
* Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT.
* A valid vanity number will start with at least 3 digits and will have three
* or more alpha characters. This does not do region-specific checks - to work
* out if this number is actually valid for a region, it should be parsed and
* methods such as {@link #isPossibleNumberWithReason} and
* {@link #isValidNumber} should be used.
*
* @param {string} number the number that needs to be checked.
* @return {boolean} true if the number is a valid vanity number.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isAlphaNumber = function(number) {
if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(number)) {
// Number is too short, or doesn't match the basic phone number pattern.
return false;
}
/** @type {!goog.string.StringBuffer} */
var strippedNumber = new goog.string.StringBuffer(number);
this.maybeStripExtension(strippedNumber);
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_,
strippedNumber.toString());
};
/**
* Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of
* returning the reason for failure, this method returns true if the number is
* either a possible fully-qualified number (containing the area code and
* country code), or if the number could be a possible local number (with a
* country code, but missing an area code). Local numbers are considered
* possible if they could be possibly dialled in this format: if the area code
* is needed for a call to connect, the number is not considered possible
* without it.
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked
* @return {boolean} true if the number is possible
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumber =
function(number) {
/** @type {!i18n.phonenumbers.PhoneNumberUtil.ValidationResult} */
var result = this.isPossibleNumberWithReason(number);
return result ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE ||
result ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
};
/**
* Convenience wrapper around {@link #isPossibleNumberForTypeWithReason}.
* Instead of returning the reason for failure, this method returns true if the
* number is either a possible fully-qualified number (containing the area code
* and country code), or if the number could be a possible local number (with a
* country code, but missing an area code). Local numbers are considered
* possible if they could be possibly dialled in this format: if the area code
* is needed for a call to connect, the number is not considered possible
* without it.
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked
* @param {i18n.phonenumbers.PhoneNumberType} type the type we are interested in
* @return {boolean} true if the number is possible for this particular type
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberForType =
function(number, type) {
/** @type {!i18n.phonenumbers.PhoneNumberUtil.ValidationResult} */
var result = this.isPossibleNumberForTypeWithReason(number, type);
return result ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE ||
result ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE_LOCAL_ONLY;
};
/**
* Helper method to check a number against possible lengths for this region,
* based on the metadata being passed in, and determine whether it matches, or
* is too short or too long.
*
* @param {string} number
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.testNumberLength_ =
function(number, metadata) {
return this.testNumberLengthForType_(
number, metadata, i18n.phonenumbers.PhoneNumberType.UNKNOWN);
};
/**
* Helper method to check a number against a particular pattern and determine
* whether it matches, or is too short or too long.
*
* @param {string} number
* @param {i18n.phonenumbers.PhoneMetadata} metadata
* @param {i18n.phonenumbers.PhoneNumberType} type
* @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.testNumberLengthForType_ =
function(number, metadata, type) {
var descForType =
i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(metadata, type);
// There should always be "possibleLengths" set for every element. This is
// declared in the XML schema which is verified by
// PhoneNumberMetadataSchemaTest.
// For size efficiency, where a sub-description (e.g. fixed-line) has the
// same possibleLengths as the parent, this is missing, so we fall back to
// the general desc (where no numbers of the type exist at all, there is one
// possible length (-1) which is guaranteed not to match the length of any
// real phone number).
var possibleLengths = descForType.possibleLengthCount() == 0 ?
metadata.getGeneralDesc().possibleLengthArray() :
descForType.possibleLengthArray();
var localLengths = descForType.possibleLengthLocalOnlyArray();
if (type == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE) {
if (!i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(
i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
metadata, i18n.phonenumbers.PhoneNumberType.FIXED_LINE))) {
// The rare case has been encountered where no fixedLine data is
// available (true for some non-geographical entities), so we just check
// mobile.
return this.testNumberLengthForType_(
number, metadata, i18n.phonenumbers.PhoneNumberType.MOBILE);
} else {
var mobileDesc = i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_(
metadata, i18n.phonenumbers.PhoneNumberType.MOBILE);
if (i18n.phonenumbers.PhoneNumberUtil.descHasPossibleNumberData_(
mobileDesc)) {
// Merge the mobile data in if there was any. "Concat" creates a new
// array, it doesn't edit possibleLengths in place, so we don't need a
// copy.
// Note that when adding the possible lengths from mobile, we have
// to again check they aren't empty since if they are this indicates
// they are the same as the general desc and should be obtained from
// there.
possibleLengths = possibleLengths.concat(
mobileDesc.possibleLengthCount() == 0 ?
metadata.getGeneralDesc().possibleLengthArray() :
mobileDesc.possibleLengthArray());
// The current list is sorted; we need to merge in the new list and
// re-sort (duplicates are okay). Sorting isn't so expensive because the
// lists are very small.
goog.array.sort(possibleLengths);
if (localLengths.length == 0) {
localLengths = mobileDesc.possibleLengthLocalOnlyArray();
} else {
localLengths = localLengths.concat(
mobileDesc.possibleLengthLocalOnlyArray());
goog.array.sort(localLengths);
}
}
}
}
// If the type is not supported at all (indicated by the possible lengths
// containing -1 at this point) we return invalid length.
if (possibleLengths[0] == -1) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_LENGTH;
}
var actualLength = number.length;
// This is safe because there is never an overlap beween the possible lengths
// and the local-only lengths; this is checked at build time.
if (goog.array.indexOf(localLengths, actualLength) > -1) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult
.IS_POSSIBLE_LOCAL_ONLY;
}
var minimumLength = possibleLengths[0];
if (minimumLength == actualLength) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE;
} else if (minimumLength > actualLength) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT;
} else if (possibleLengths[possibleLengths.length - 1] < actualLength) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG;
}
// We skip the first element since we've already checked it.
return (goog.array.indexOf(possibleLengths, actualLength, 1) > -1) ?
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE :
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_LENGTH;
};
/**
* Check whether a phone number is a possible number. It provides a more lenient
* check than {@link #isValidNumber} in the following sense:
* <ol>
* <li>It only checks the length of phone numbers. In particular, it doesn't
* check starting digits of the number.
* <li>It doesn't attempt to figure out the type of the number, but uses general
* rules which applies to all types of phone numbers in a region. Therefore, it
* is much faster than isValidNumber.
* <li>For some numbers (particularly fixed-line), many regions have the concept
* of area code, which together with subscriber number constitute the national
* significant number. It is sometimes okay to dial only the subscriber number
* when dialing in the same area. This function will return
* IS_POSSIBLE_LOCAL_ONLY if the subscriber-number-only version is passed in. On
* the other hand, because isValidNumber validates using information on both
* starting digits (for fixed line numbers, that would most likely be area
* codes) and length (obviously includes the length of area codes for fixed line
* numbers), it will return false for the subscriber-number-only version.
* </ol>
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked
* @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult} a
* ValidationResult object which indicates whether the number is possible
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberWithReason =
function(number) {
return this.isPossibleNumberForTypeWithReason(
number, i18n.phonenumbers.PhoneNumberType.UNKNOWN);
};
/**
* Check whether a phone number is a possible number. It provides a more lenient
* check than {@link #isValidNumber} in the following sense:
* <ol>
* <li>It only checks the length of phone numbers. In particular, it doesn't
* check starting digits of the number.
* <li>For some numbers (particularly fixed-line), many regions have the concept
* of area code, which together with subscriber number constitute the national
* significant number. It is sometimes okay to dial only the subscriber number
* when dialing in the same area. This function will return
* IS_POSSIBLE_LOCAL_ONLY if the subscriber-number-only version is passed in. On
* the other hand, because isValidNumber validates using information on both
* starting digits (for fixed line numbers, that would most likely be area
* codes) and length (obviously includes the length of area codes for fixed line
* numbers), it will return false for the subscriber-number-only version.
* </ol>
*
* @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
* checked
* @param {i18n.phonenumbers.PhoneNumberType} type the type we are interested in
* @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult} a
* ValidationResult object which indicates whether the number is possible
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberForTypeWithReason =
function(number, type) {
/** @type {string} */
var nationalNumber = this.getNationalSignificantNumber(number);
/** @type {number} */
var countryCode = number.getCountryCodeOrDefault();
// Note: For regions that share a country calling code, like NANPA numbers,
// we just use the rules from the default region (US in this case) since the
// getRegionCodeForNumber will not work if the number is possible but not
// valid. There is in fact one country calling code (290) where the possible
// number pattern differs between various regions (Saint Helena and Tristan
// da Cunha), but this is handled by putting all possible lengths for any
// country with this country calling code in the metadata for the default
// region in this case.
if (!this.hasValidCountryCallingCode_(countryCode)) {
return i18n.phonenumbers.PhoneNumberUtil.ValidationResult
.INVALID_COUNTRY_CODE;
}
/** @type {string} */
var regionCode = this.getRegionCodeForCountryCode(countryCode);
// Metadata cannot be null because the country calling code is valid.
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata =
this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
return this.testNumberLengthForType_(nationalNumber, metadata, type);
};
/**
* Check whether a phone number is a possible number given a number in the form
* of a string, and the region where the number could be dialed from. It
* provides a more lenient check than {@link #isValidNumber}. See
* {@link #isPossibleNumber} for details.
*
* <p>This method first parses the number, then invokes
* {@link #isPossibleNumber} with the resultant PhoneNumber object.
*
* @param {string} number the number that needs to be checked, in the form of a
* string.
* @param {string} regionDialingFrom the region that we are expecting the number
* to be dialed from.
* Note this is different from the region where the number belongs.
* For example, the number +1 650 253 0000 is a number that belongs to US.
* When written in this form, it can be dialed from any region. When it is
* written as 00 1 650 253 0000, it can be dialed from any region which uses
* an international dialling prefix of 00. When it is written as
* 650 253 0000, it can only be dialed from within the US, and when written
* as 253 0000, it can only be dialed from within a smaller area in the US
* (Mountain View, CA, to be more specific).
* @return {boolean} true if the number is possible.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberString =
function(number, regionDialingFrom) {
try {
return this.isPossibleNumber(this.parse(number, regionDialingFrom));
} catch (e) {
return false;
}
};
/**
* Attempts to extract a valid number from a phone number that is too long to be
* valid, and resets the PhoneNumber object passed in to that valid version. If
* no valid number could be extracted, the PhoneNumber object passed in will not
* be modified.
* @param {!i18n.phonenumbers.PhoneNumber} number a PhoneNumber object which
* contains a number that is too long to be valid.
* @return {boolean} true if a valid phone number can be successfully extracted.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.truncateTooLongNumber =
function(number) {
if (this.isValidNumber(number)) {
return true;
}
/** @type {i18n.phonenumbers.PhoneNumber} */
var numberCopy = number.clone();
/** @type {number} */
var nationalNumber = number.getNationalNumberOrDefault();
do {
nationalNumber = Math.floor(nationalNumber / 10);
numberCopy.setNationalNumber(nationalNumber);
if (nationalNumber == 0 ||
this.isPossibleNumberWithReason(numberCopy) ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT) {
return false;
}
} while (!this.isValidNumber(numberCopy));
number.setNationalNumber(nationalNumber);
return true;
};
/**
* Extracts country calling code from fullNumber, returns it and places the
* remaining number in nationalNumber. It assumes that the leading plus sign or
* IDD has already been removed. Returns 0 if fullNumber doesn't start with a
* valid country calling code, and leaves nationalNumber unmodified.
*
* @param {!goog.string.StringBuffer} fullNumber
* @param {!goog.string.StringBuffer} nationalNumber
* @return {number}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.extractCountryCode =
function(fullNumber, nationalNumber) {
/** @type {string} */
var fullNumberStr = fullNumber.toString();
if ((fullNumberStr.length == 0) || (fullNumberStr.charAt(0) == '0')) {
// Country codes do not begin with a '0'.
return 0;
}
/** @type {number} */
var potentialCountryCode;
/** @type {number} */
var numberLength = fullNumberStr.length;
for (var i = 1;
i <= i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ &&
i <= numberLength; ++i) {
potentialCountryCode = parseInt(fullNumberStr.substring(0, i), 10);
if (potentialCountryCode in
i18n.phonenumbers.metadata.countryCodeToRegionCodeMap) {
nationalNumber.append(fullNumberStr.substring(i));
return potentialCountryCode;
}
}
return 0;
};
/**
* Tries to extract a country calling code from a number. This method will
* return zero if no country calling code is considered to be present. Country
* calling codes are extracted in the following ways:
* <ul>
* <li>by stripping the international dialing prefix of the region the person is
* dialing from, if this is present in the number, and looking at the next
* digits
* <li>by stripping the '+' sign if present and then looking at the next digits
* <li>by comparing the start of the number and the country calling code of the
* default region. If the number is not considered possible for the numbering
* plan of the default region initially, but starts with the country calling
* code of this region, validation will be reattempted after stripping this
* country calling code. If this number is considered a possible number, then
* the first digits will be considered the country calling code and removed as
* such.
* </ul>
*
* It will throw a i18n.phonenumbers.Error if the number starts with a '+' but
* the country calling code supplied after this does not match that of any known
* region.
*
* @param {string} number non-normalized telephone number that we wish to
* extract a country calling code from - may begin with '+'.
* @param {i18n.phonenumbers.PhoneMetadata} defaultRegionMetadata metadata
* about the region this number may be from.
* @param {!goog.string.StringBuffer} nationalNumber a string buffer to store
* the national significant number in, in the case that a country calling
* code was extracted. The number is appended to any existing contents. If
* no country calling code was extracted, this will be left unchanged.
* @param {boolean} keepRawInput true if the country_code_source and
* preferred_carrier_code fields of phoneNumber should be populated.
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber the PhoneNumber object
* where the country_code and country_code_source need to be populated.
* Note the country_code is always populated, whereas country_code_source is
* only populated when keepCountryCodeSource is true.
* @return {number} the country calling code extracted or 0 if none could be
* extracted.
* @throws {Error}
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.maybeExtractCountryCode =
function(number, defaultRegionMetadata, nationalNumber,
keepRawInput, phoneNumber) {
if (number.length == 0) {
return 0;
}
/** @type {!goog.string.StringBuffer} */
var fullNumber = new goog.string.StringBuffer(number);
// Set the default prefix to be something that will never match.
/** @type {?string} */
var possibleCountryIddPrefix;
if (defaultRegionMetadata != null) {
possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix();
}
if (possibleCountryIddPrefix == null) {
possibleCountryIddPrefix = 'NonMatch';
}
/** @type {i18n.phonenumbers.PhoneNumber.CountryCodeSource} */
var countryCodeSource = this.maybeStripInternationalPrefixAndNormalize(
fullNumber, possibleCountryIddPrefix);
if (keepRawInput) {
phoneNumber.setCountryCodeSource(countryCodeSource);
}
if (countryCodeSource !=
i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY) {
if (fullNumber.getLength() <=
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
throw new Error(i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD);
}
/** @type {number} */
var potentialCountryCode = this.extractCountryCode(fullNumber,
nationalNumber);
if (potentialCountryCode != 0) {
phoneNumber.setCountryCode(potentialCountryCode);
return potentialCountryCode;
}
// If this fails, they must be using a strange country calling code that we
// don't recognize, or that doesn't exist.
throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
} else if (defaultRegionMetadata != null) {
// Check to see if the number starts with the country calling code for the
// default region. If so, we remove the country calling code, and do some
// checks on the validity of the number before and after.
/** @type {number} */
var defaultCountryCode = defaultRegionMetadata.getCountryCodeOrDefault();
/** @type {string} */
var defaultCountryCodeString = '' + defaultCountryCode;
/** @type {string} */
var normalizedNumber = fullNumber.toString();
if (goog.string.startsWith(normalizedNumber, defaultCountryCodeString)) {
/** @type {!goog.string.StringBuffer} */
var potentialNationalNumber = new goog.string.StringBuffer(
normalizedNumber.substring(defaultCountryCodeString.length));
/** @type {i18n.phonenumbers.PhoneNumberDesc} */
var generalDesc = defaultRegionMetadata.getGeneralDesc();
/** @type {!RegExp} */
var validNumberPattern =
new RegExp(generalDesc.getNationalNumberPatternOrDefault());
// Passing null since we don't need the carrier code.
this.maybeStripNationalPrefixAndCarrierCode(
potentialNationalNumber, defaultRegionMetadata, null);
/** @type {string} */
var potentialNationalNumberStr = potentialNationalNumber.toString();
// If the number was not valid before but is valid now, or if it was too
// long before, we consider the number with the country calling code
// stripped to be a better result and keep that instead.
if ((!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
validNumberPattern, fullNumber.toString()) &&
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
validNumberPattern, potentialNationalNumberStr)) ||
this.testNumberLength_(
fullNumber.toString(), defaultRegionMetadata) ==
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG) {
nationalNumber.append(potentialNationalNumberStr);
if (keepRawInput) {
phoneNumber.setCountryCodeSource(
i18n.phonenumbers.PhoneNumber.CountryCodeSource
.FROM_NUMBER_WITHOUT_PLUS_SIGN);
}
phoneNumber.setCountryCode(defaultCountryCode);
return defaultCountryCode;
}
}
}
// No country calling code present.
phoneNumber.setCountryCode(0);
return 0;
};
/**
* Strips the IDD from the start of the number if present. Helper function used
* by maybeStripInternationalPrefixAndNormalize.
*
* @param {!RegExp} iddPattern the regular expression for the international
* prefix.
* @param {!goog.string.StringBuffer} number the phone number that we wish to
* strip any international dialing prefix from.
* @return {boolean} true if an international prefix was present.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.parsePrefixAsIdd_ =
function(iddPattern, number) {
/** @type {string} */
var numberStr = number.toString();
if (numberStr.search(iddPattern) == 0) {
/** @type {number} */
var matchEnd = numberStr.match(iddPattern)[0].length;
/** @type {Array.<string>} */
var matchedGroups = numberStr.substring(matchEnd).match(
i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN);
if (matchedGroups && matchedGroups[1] != null &&
matchedGroups[1].length > 0) {
/** @type {string} */
var normalizedGroup =
i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(
matchedGroups[1]);
if (normalizedGroup == '0') {
return false;
}
}
number.clear();
number.append(numberStr.substring(matchEnd));
return true;
}
return false;
};
/**
* Strips any international prefix (such as +, 00, 011) present in the number
* provided, normalizes the resulting number, and indicates if an international
* prefix was present.
*
* @param {!goog.string.StringBuffer} number the non-normalized telephone number
* that we wish to strip any international dialing prefix from.
* @param {string} possibleIddPrefix the international direct dialing prefix
* from the region we think this number may be dialed in.
* @return {i18n.phonenumbers.PhoneNumber.CountryCodeSource} the corresponding
* CountryCodeSource if an international dialing prefix could be removed
* from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if
* the number did not seem to be in international format.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
maybeStripInternationalPrefixAndNormalize = function(number,
possibleIddPrefix) {
/** @type {string} */
var numberStr = number.toString();
if (numberStr.length == 0) {
return i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
}
// Check to see if the number begins with one or more plus signs.
if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(numberStr)) {
numberStr = numberStr.replace(
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
// Can now normalize the rest of the number since we've consumed the '+'
// sign at the start.
number.clear();
number.append(i18n.phonenumbers.PhoneNumberUtil.normalize(numberStr));
return i18n.phonenumbers.PhoneNumber.CountryCodeSource
.FROM_NUMBER_WITH_PLUS_SIGN;
}
// Attempt to parse the first digits as an international prefix.
/** @type {!RegExp} */
var iddPattern = new RegExp(possibleIddPrefix);
i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(number);
return this.parsePrefixAsIdd_(iddPattern, number) ?
i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD :
i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
};
/**
* Strips any national prefix (such as 0, 1) present in the number provided.
*
* @param {!goog.string.StringBuffer} number the normalized telephone number
* that we wish to strip any national dialing prefix from.
* @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
* region that we think this number is from.
* @param {goog.string.StringBuffer} carrierCode a place to insert the carrier
* code if one is extracted.
* @return {boolean} true if a national prefix or carrier code (or both) could
* be extracted.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.
maybeStripNationalPrefixAndCarrierCode = function(number, metadata,
carrierCode) {
/** @type {string} */
var numberStr = number.toString();
/** @type {number} */
var numberLength = numberStr.length;
/** @type {?string} */
var possibleNationalPrefix = metadata.getNationalPrefixForParsing();
if (numberLength == 0 || possibleNationalPrefix == null ||
possibleNationalPrefix.length == 0) {
// Early return for numbers of zero length.
return false;
}
// Attempt to parse the first digits as a national prefix.
/** @type {!RegExp} */
var prefixPattern = new RegExp('^(?:' + possibleNationalPrefix + ')');
/** @type {Array.<string>} */
var prefixMatcher = prefixPattern.exec(numberStr);
if (prefixMatcher) {
/** @type {!RegExp} */
var nationalNumberRule = new RegExp(
metadata.getGeneralDesc().getNationalNumberPatternOrDefault());
// Check if the original number is viable.
/** @type {boolean} */
var isViableOriginalNumber =
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule, numberStr);
// prefixMatcher[numOfGroups] == null implies nothing was captured by the
// capturing groups in possibleNationalPrefix; therefore, no transformation
// is necessary, and we just remove the national prefix.
/** @type {number} */
var numOfGroups = prefixMatcher.length - 1;
/** @type {?string} */
var transformRule = metadata.getNationalPrefixTransformRule();
/** @type {boolean} */
var noTransform = transformRule == null || transformRule.length == 0 ||
prefixMatcher[numOfGroups] == null ||
prefixMatcher[numOfGroups].length == 0;
if (noTransform) {
// If the original number was viable, and the resultant number is not,
// we return.
if (isViableOriginalNumber &&
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule,
numberStr.substring(prefixMatcher[0].length))) {
return false;
}
if (carrierCode != null &&
numOfGroups > 0 && prefixMatcher[numOfGroups] != null) {
carrierCode.append(prefixMatcher[1]);
}
number.set(numberStr.substring(prefixMatcher[0].length));
return true;
} else {
// Check that the resultant number is still viable. If not, return. Check
// this by copying the string buffer and making the transformation on the
// copy first.
/** @type {string} */
var transformedNumber;
transformedNumber = numberStr.replace(prefixPattern, transformRule);
if (isViableOriginalNumber &&
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule, transformedNumber)) {
return false;
}
if (carrierCode != null && numOfGroups > 0) {
carrierCode.append(prefixMatcher[1]);
}
number.set(transformedNumber);
return true;
}
}
return false;
};
/**
* Strips any extension (as in, the part of the number dialled after the call is
* connected, usually indicated with extn, ext, x or similar) from the end of
* the number, and returns it.
*
* @param {!goog.string.StringBuffer} number the non-normalized telephone number
* that we wish to strip the extension from.
* @return {string} the phone extension.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.maybeStripExtension =
function(number) {
/** @type {string} */
var numberStr = number.toString();
/** @type {number} */
var mStart =
numberStr.search(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
// If we find a potential extension, and the number preceding this is a viable
// number, we assume it is an extension.
if (mStart >= 0 && i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
numberStr.substring(0, mStart))) {
// The numbers are captured into groups in the regular expression.
/** @type {Array.<string>} */
var matchedGroups =
numberStr.match(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
/** @type {number} */
var matchedGroupsLength = matchedGroups.length;
for (var i = 1; i < matchedGroupsLength; ++i) {
if (matchedGroups[i] != null && matchedGroups[i].length > 0) {
// We go through the capturing groups until we find one that captured
// some digits. If none did, then we will return the empty string.
number.clear();
number.append(numberStr.substring(0, mStart));
return matchedGroups[i];
}
}
}
return '';
};
/**
* Checks to see that the region code used is valid, or if it is not valid, that
* the number to parse starts with a + symbol so that we can attempt to infer
* the region from the number.
* @param {string} numberToParse number that we are attempting to parse.
* @param {?string} defaultRegion region that we are expecting the number to be
* from.
* @return {boolean} false if it cannot use the region provided and the region
* cannot be inferred.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.checkRegionForParsing_ = function(
numberToParse, defaultRegion) {
// If the number is null or empty, we can't infer the region.
return this.isValidRegionCode_(defaultRegion) ||
(numberToParse != null && numberToParse.length > 0 &&
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN.test(
numberToParse));
};
/**
* Parses a string and returns it as a phone number in proto buffer format. The
* method is quite lenient and looks for a number in the input text (raw input)
* and does not check whether the string is definitely only a phone number. To
* do this, it ignores punctuation and white-space, as well as any text before
* the number (e.g. a leading "Tel: ") and trims the non-number bits. It will
* accept a number in any format (E164, national, international etc), assuming
* it can be interpreted with the defaultRegion supplied. It also attempts to
* convert any alpha characters into digits if it thinks this is a vanity number
* of the type "1800 MICROSOFT".
*
* Note this method canonicalizes the phone number such that different
* representations can be easily compared, no matter what form it was originally
* entered in (e.g. national, international). If you want to record context
* about the number being parsed, such as the raw input that was entered, how
* the country code was derived etc. then call parseAndKeepRawInput() instead.
*
* This method will throw a {@link i18n.phonenumbers.Error} if the number is not
* considered to be a possible number. Note that validation of whether the
* number is actually a valid number for a particular region is not performed.
* This can be done separately with {@link #isValidNumber}.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension. It can also be provided in RFC3966 format.
* @param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country_code for the number in this case would
* be stored as that of the default region supplied. If the number is
* guaranteed to start with a '+' followed by the country calling code, then
* 'ZZ' or null can be supplied.
* @return {!i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
* with the parsed number.
* @throws {Error} if the string is not considered to be a
* viable phone number (e.g. too few or too many digits) or if no default
* region was supplied and the number is not in international format (does
* not start with +).
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.parse = function(numberToParse,
defaultRegion) {
return this.parseHelper_(numberToParse, defaultRegion, false, true);
};
/**
* Parses a string and returns it in proto buffer format. This method differs
* from {@link #parse} in that it always populates the raw_input field of the
* protocol buffer with numberToParse as well as the country_code_source field.
*
* @param {string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country calling code for the number in this
* case would be stored as that of the default region supplied.
* @return {!i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
* with the parsed number.
* @throws {Error} if the string is not considered to be a
* viable phone number or if no default region was supplied.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.parseAndKeepRawInput =
function(numberToParse, defaultRegion) {
if (!this.isValidRegionCode_(defaultRegion)) {
if (numberToParse.length > 0 && numberToParse.charAt(0) !=
i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
}
}
return this.parseHelper_(numberToParse, defaultRegion, true, true);
};
/**
* A helper function to set the values related to leading zeros in a
* PhoneNumber.
*
* @param {string} nationalNumber the number we are parsing.
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber a phone number proto
* buffer to fill in.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.setItalianLeadingZerosForPhoneNumber_ =
function(nationalNumber, phoneNumber) {
if (nationalNumber.length > 1 && nationalNumber.charAt(0) == '0') {
phoneNumber.setItalianLeadingZero(true);
var numberOfLeadingZeros = 1;
// Note that if the national number is all "0"s, the last "0" is not counted
// as a leading zero.
while (numberOfLeadingZeros < nationalNumber.length - 1 &&
nationalNumber.charAt(numberOfLeadingZeros) == '0') {
numberOfLeadingZeros++;
}
if (numberOfLeadingZeros != 1) {
phoneNumber.setNumberOfLeadingZeros(numberOfLeadingZeros);
}
}
};
/**
* Parses a string and returns it in proto buffer format. This method is the
* same as the public {@link #parse} method, with the exception that it allows
* the default region to be null, for use by {@link #isNumberMatch}.
*
* Note if any new field is added to this method that should always be filled
* in, even when keepRawInput is false, it should also be handled in the
* copyCoreFieldsOnly method.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {?string} defaultRegion region that we are expecting the number to be
* from. This is only used if the number being parsed is not written in
* international format. The country calling code for the number in this
* case would be stored as that of the default region supplied.
* @param {boolean} keepRawInput whether to populate the raw_input field of the
* phoneNumber with numberToParse.
* @param {boolean} checkRegion should be set to false if it is permitted for
* the default coregion to be null or unknown ('ZZ').
* @return {!i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
* with the parsed number.
* @throws {Error}
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.parseHelper_ =
function(numberToParse, defaultRegion, keepRawInput, checkRegion) {
if (numberToParse == null) {
throw new Error(i18n.phonenumbers.Error.NOT_A_NUMBER);
} else if (numberToParse.length >
i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_) {
throw new Error(i18n.phonenumbers.Error.TOO_LONG);
}
/** @type {!goog.string.StringBuffer} */
var nationalNumber = new goog.string.StringBuffer();
this.buildNationalNumberForParsing_(numberToParse, nationalNumber);
if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
nationalNumber.toString())) {
throw new Error(i18n.phonenumbers.Error.NOT_A_NUMBER);
}
// Check the region supplied is valid, or that the extracted number starts
// with some sort of + sign so the number's region can be determined.
if (checkRegion &&
!this.checkRegionForParsing_(nationalNumber.toString(), defaultRegion)) {
throw new Error(i18n.phonenumbers.Error.INVALID_COUNTRY_CODE);
}
/** @type {i18n.phonenumbers.PhoneNumber} */
var phoneNumber = new i18n.phonenumbers.PhoneNumber();
if (keepRawInput) {
phoneNumber.setRawInput(numberToParse);
}
// Attempt to parse extension first, since it doesn't require region-specific
// data and we want to have the non-normalised number here.
/** @type {string} */
var extension = this.maybeStripExtension(nationalNumber);
if (extension.length > 0) {
phoneNumber.setExtension(extension);
}
/** @type {i18n.phonenumbers.PhoneMetadata} */
var regionMetadata = this.getMetadataForRegion(defaultRegion);
// Check to see if the number is given in international format so we know
// whether this number is from the default region or not.
/** @type {!goog.string.StringBuffer} */
var normalizedNationalNumber = new goog.string.StringBuffer();
/** @type {number} */
var countryCode = 0;
/** @type {string} */
var nationalNumberStr = nationalNumber.toString();
try {
countryCode = this.maybeExtractCountryCode(nationalNumberStr,
regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
} catch (e) {
if (e.message == i18n.phonenumbers.Error.INVALID_COUNTRY_CODE &&
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(nationalNumberStr)) {
// Strip the plus-char, and try again.
nationalNumberStr = nationalNumberStr.replace(
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
countryCode = this.maybeExtractCountryCode(nationalNumberStr,
regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
if (countryCode == 0) {
throw e;
}
} else {
throw e;
}
}
if (countryCode != 0) {
/** @type {string} */
var phoneNumberRegion = this.getRegionCodeForCountryCode(countryCode);
if (phoneNumberRegion != defaultRegion) {
// Metadata cannot be null because the country calling code is valid.
regionMetadata = this.getMetadataForRegionOrCallingCode_(
countryCode, phoneNumberRegion);
}
} else {
// If no extracted country calling code, use the region supplied instead.
// The national number is just the normalized version of the number we were
// given to parse.
i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(nationalNumber);
normalizedNationalNumber.append(nationalNumber.toString());
if (defaultRegion != null) {
countryCode = regionMetadata.getCountryCodeOrDefault();
phoneNumber.setCountryCode(countryCode);
} else if (keepRawInput) {
phoneNumber.clearCountryCodeSource();
}
}
if (normalizedNationalNumber.getLength() <
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
throw new Error(i18n.phonenumbers.Error.TOO_SHORT_NSN);
}
if (regionMetadata != null) {
/** @type {!goog.string.StringBuffer} */
var carrierCode = new goog.string.StringBuffer();
/** @type {!goog.string.StringBuffer} */
var potentialNationalNumber =
new goog.string.StringBuffer(normalizedNationalNumber.toString());
this.maybeStripNationalPrefixAndCarrierCode(
potentialNationalNumber, regionMetadata, carrierCode);
// We require that the NSN remaining after stripping the national prefix and
// carrier code be long enough to be a possible length for the region.
// Otherwise, we don't do the stripping, since the original number could be
// a valid short number.
var validationResult = this.testNumberLength_(
potentialNationalNumber.toString(), regionMetadata);
var validationResults = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
if (validationResult != validationResults.TOO_SHORT &&
validationResult != validationResults.IS_POSSIBLE_LOCAL_ONLY &&
validationResult != validationResults.INVALID_LENGTH) {
normalizedNationalNumber = potentialNationalNumber;
if (keepRawInput && carrierCode.toString().length > 0) {
phoneNumber.setPreferredDomesticCarrierCode(carrierCode.toString());
}
}
}
/** @type {string} */
var normalizedNationalNumberStr = normalizedNationalNumber.toString();
/** @type {number} */
var lengthOfNationalNumber = normalizedNationalNumberStr.length;
if (lengthOfNationalNumber <
i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
throw new Error(i18n.phonenumbers.Error.TOO_SHORT_NSN);
}
if (lengthOfNationalNumber >
i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_) {
throw new Error(i18n.phonenumbers.Error.TOO_LONG);
}
i18n.phonenumbers.PhoneNumberUtil.setItalianLeadingZerosForPhoneNumber_(
normalizedNationalNumberStr, phoneNumber);
phoneNumber.setNationalNumber(parseInt(normalizedNationalNumberStr, 10));
return phoneNumber;
};
/**
* Converts numberToParse to a form that we can parse and write it to
* nationalNumber if it is written in RFC3966; otherwise extract a possible
* number out of it and write to nationalNumber.
*
* @param {?string} numberToParse number that we are attempting to parse. This
* can contain formatting such as +, ( and -, as well as a phone number
* extension.
* @param {!goog.string.StringBuffer} nationalNumber a string buffer for storing
* the national significant number.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.buildNationalNumberForParsing_ =
function(numberToParse, nationalNumber) {
/** @type {number} */
var indexOfPhoneContext = numberToParse.indexOf(
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_);
if (indexOfPhoneContext >= 0) {
var phoneContextStart = indexOfPhoneContext +
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_.length;
// If the phone context contains a phone number prefix, we need to capture
// it, whereas domains will be ignored.
// No length check is necessary, as per C++ or Java, since out-of-bounds
// requests to charAt return an empty string.
if (numberToParse.charAt(phoneContextStart) ==
i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
// Additional parameters might follow the phone context. If so, we will
// remove them here because the parameters after phone context are not
// important for parsing the phone number.
var phoneContextEnd = numberToParse.indexOf(';', phoneContextStart);
if (phoneContextEnd > 0) {
nationalNumber.append(numberToParse.substring(phoneContextStart,
phoneContextEnd));
} else {
nationalNumber.append(numberToParse.substring(phoneContextStart));
}
}
// Now append everything between the "tel:" prefix and the phone-context.
// This should include the national number, an optional extension or
// isdn-subaddress component. Note we also handle the case when "tel:" is
// missing, as we have seen in some of the phone number inputs.
// In that case, we append everything from the beginning.
var indexOfRfc3966Prefix = numberToParse.indexOf(
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_);
var indexOfNationalNumber = (indexOfRfc3966Prefix >= 0) ?
indexOfRfc3966Prefix +
i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_.length : 0;
nationalNumber.append(numberToParse.substring(indexOfNationalNumber,
indexOfPhoneContext));
} else {
// Extract a possible number from the string passed in (this strips leading
// characters that could not be the start of a phone number.)
nationalNumber.append(
i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber(numberToParse));
}
// Delete the isdn-subaddress and everything after it if it is present.
// Note extension won't appear at the same time with isdn-subaddress
// according to paragraph 5.3 of the RFC3966 spec,
/** @type {string} */
var nationalNumberStr = nationalNumber.toString();
var indexOfIsdn = nationalNumberStr.indexOf(
i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_);
if (indexOfIsdn > 0) {
nationalNumber.clear();
nationalNumber.append(nationalNumberStr.substring(0, indexOfIsdn));
}
// If both phone context and isdn-subaddress are absent but other
// parameters are present, the parameters are left in nationalNumber. This
// is because we are concerned about deleting content from a potential
// number string when there is no strong evidence that the number is
// actually written in RFC3966.
};
/**
* Returns a new phone number containing only the fields needed to uniquely
* identify a phone number, rather than any fields that capture the context in
* which the phone number was created.
* These fields correspond to those set in parse() rather than
* parseAndKeepRawInput().
*
* @param {i18n.phonenumbers.PhoneNumber} numberIn number that we want to copy
* fields from.
* @return {!i18n.phonenumbers.PhoneNumber} number with core fields only.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_ = function(numberIn) {
/** @type {i18n.phonenumbers.PhoneNumber} */
var phoneNumber = new i18n.phonenumbers.PhoneNumber();
phoneNumber.setCountryCode(numberIn.getCountryCodeOrDefault());
phoneNumber.setNationalNumber(numberIn.getNationalNumberOrDefault());
if (numberIn.getExtensionOrDefault().length > 0) {
phoneNumber.setExtension(numberIn.getExtensionOrDefault());
}
if (numberIn.getItalianLeadingZero()) {
phoneNumber.setItalianLeadingZero(true);
// This field is only relevant if there are leading zeros at all.
phoneNumber.setNumberOfLeadingZeros(
numberIn.getNumberOfLeadingZerosOrDefault());
}
return phoneNumber;
};
/**
* Takes two phone numbers and compares them for equality.
*
* <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero
* for Italian numbers and any extension present are the same. Returns NSN_MATCH
* if either or both has no region specified, and the NSNs and extensions are
* the same. Returns SHORT_NSN_MATCH if either or both has no region specified,
* or the region specified is the same, and one NSN could be a shorter version
* of the other number. This includes the case where one has an extension
* specified, and the other does not. Returns NO_MATCH otherwise. For example,
* the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH. The numbers
* +1 345 657 1234 and 345 657 are a NO_MATCH.
*
* @param {i18n.phonenumbers.PhoneNumber|string} firstNumberIn first number to
* compare. If it is a string it can contain formatting, and can have
* country calling code specified with + at the start.
* @param {i18n.phonenumbers.PhoneNumber|string} secondNumberIn second number to
* compare. If it is a string it can contain formatting, and can have
* country calling code specified with + at the start.
* @return {i18n.phonenumbers.PhoneNumberUtil.MatchType} NOT_A_NUMBER, NO_MATCH,
* SHORT_NSN_MATCH, NSN_MATCH or EXACT_MATCH depending on the level of
* equality of the two numbers, described in the method definition.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatch =
function(firstNumberIn, secondNumberIn) {
// If the input arguements are strings parse them to a proto buffer format.
// Else make copies of the phone numbers so that the numbers passed in are not
// edited.
/** @type {i18n.phonenumbers.PhoneNumber} */
var firstNumber;
/** @type {i18n.phonenumbers.PhoneNumber} */
var secondNumber;
if (typeof firstNumberIn == 'string') {
// First see if the first number has an implicit country calling code, by
// attempting to parse it.
try {
firstNumber = this.parse(
firstNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
} catch (e) {
if (e.message != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
}
// The first number has no country calling code. EXACT_MATCH is no longer
// possible. We parse it as if the region was the same as that for the
// second number, and if EXACT_MATCH is returned, we replace this with
// NSN_MATCH.
if (typeof secondNumberIn != 'string') {
/** @type {string} */
var secondNumberRegion = this.getRegionCodeForCountryCode(
secondNumberIn.getCountryCodeOrDefault());
if (secondNumberRegion !=
i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_) {
try {
firstNumber = this.parse(firstNumberIn, secondNumberRegion);
} catch (e2) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
}
/** @type {i18n.phonenumbers.PhoneNumberUtil.MatchType} */
var match = this.isNumberMatch(firstNumber, secondNumberIn);
if (match ==
i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
}
return match;
}
}
// If the second number is a string or doesn't have a valid country
// calling code, we parse the first number without country calling code.
try {
firstNumber = this.parseHelper_(firstNumberIn, null, false, false);
} catch (e2) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
}
}
} else {
firstNumber = firstNumberIn.clone();
}
if (typeof secondNumberIn == 'string') {
try {
secondNumber = this.parse(
secondNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
return this.isNumberMatch(firstNumberIn, secondNumber);
} catch (e) {
if (e.message != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
}
return this.isNumberMatch(secondNumberIn, firstNumber);
}
} else {
secondNumber = secondNumberIn.clone();
}
var firstNumberToCompare =
i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_(firstNumber);
var secondNumberToCompare =
i18n.phonenumbers.PhoneNumberUtil.copyCoreFieldsOnly_(secondNumber);
// Early exit if both had extensions and these are different.
if (firstNumberToCompare.hasExtension() &&
secondNumberToCompare.hasExtension() &&
firstNumberToCompare.getExtension() !=
secondNumberToCompare.getExtension()) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
}
/** @type {number} */
var firstNumberCountryCode = firstNumberToCompare.getCountryCodeOrDefault();
/** @type {number} */
var secondNumberCountryCode = secondNumberToCompare.getCountryCodeOrDefault();
// Both had country_code specified.
if (firstNumberCountryCode != 0 && secondNumberCountryCode != 0) {
if (firstNumberToCompare.equals(secondNumberToCompare)) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH;
} else if (firstNumberCountryCode == secondNumberCountryCode &&
this.isNationalNumberSuffixOfTheOther_(
firstNumberToCompare, secondNumberToCompare)) {
// A SHORT_NSN_MATCH occurs if there is a difference because of the
// presence or absence of an 'Italian leading zero', the presence or
// absence of an extension, or one NSN being a shorter variant of the
// other.
return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
}
// This is not a match.
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
}
// Checks cases where one or both country_code fields were not specified. To
// make equality checks easier, we first set the country_code fields to be
// equal.
firstNumberToCompare.setCountryCode(0);
secondNumberToCompare.setCountryCode(0);
// If all else was the same, then this is an NSN_MATCH.
if (firstNumberToCompare.equals(secondNumberToCompare)) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
}
if (this.isNationalNumberSuffixOfTheOther_(firstNumberToCompare,
secondNumberToCompare)) {
return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
}
return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
};
/**
* Returns true when one national number is the suffix of the other or both are
* the same.
*
* @param {i18n.phonenumbers.PhoneNumber} firstNumber the first PhoneNumber
* object.
* @param {i18n.phonenumbers.PhoneNumber} secondNumber the second PhoneNumber
* object.
* @return {boolean} true if one PhoneNumber is the suffix of the other one.
* @private
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.isNationalNumberSuffixOfTheOther_ =
function(firstNumber, secondNumber) {
/** @type {string} */
var firstNumberNationalNumber = '' + firstNumber.getNationalNumber();
/** @type {string} */
var secondNumberNationalNumber = '' + secondNumber.getNationalNumber();
// Note that endsWith returns true if the numbers are equal.
return goog.string.endsWith(firstNumberNationalNumber,
secondNumberNationalNumber) ||
goog.string.endsWith(secondNumberNationalNumber,
firstNumberNationalNumber);
};
/**
* Returns true if the number can be dialled from outside the region, or
* unknown. If the number can only be dialled from within the region, returns
* false. Does not check the number is a valid number. Note that, at the
* moment, this method does not handle short numbers (which are currently
* all presumed to not be diallable from outside their country).
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone-number for which we
* want to know whether it is diallable from outside the region.
* @return {boolean} true if the number can only be dialled from within the
* country.
*/
i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
function(number) {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = this.getMetadataForRegion(this.getRegionCodeForNumber(number));
if (metadata == null) {
// Note numbers belonging to non-geographical entities (e.g. +800 numbers)
// are always internationally diallable, and will be caught here.
return true;
}
/** @type {string} */
var nationalSignificantNumber = this.getNationalSignificantNumber(number);
return !this.isNumberMatchingDesc_(nationalSignificantNumber,
metadata.getNoInternationalDialling());
};
/**
* Check whether the entire input sequence can be matched against the regular
* expression.
*
* @param {!RegExp|string} regex the regular expression to match against.
* @param {string} str the string to test.
* @return {boolean} true if str can be matched entirely against regex.
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) {
/** @type {Array.<string>} */
var matchedGroups = (typeof regex == 'string') ?
str.match('^(?:' + regex + ')$') : str.match(regex);
if (matchedGroups && matchedGroups[0].length == str.length) {
return true;
}
return false;
};
/**
* Check whether the input sequence can be prefix-matched against the regular
* expression.
*
* @param {!RegExp|string} regex the regular expression to match against.
* @param {string} str the string to test
* @return {boolean} true if a prefix of the string can be matched with this
* regex.
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.matchesPrefix = function(regex, str) {
/** @type {Array.<string>} */
var matchedGroups = (typeof regex == 'string') ?
str.match('^(?:' + regex + ')') : str.match(regex);
if (matchedGroups && goog.string.startsWith(str, matchedGroups[0])) {
return true;
}
return false;
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/phonenumberutil.js
|
JavaScript
|
unknown
| 180,640
|
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<meta charset="utf-8">
<title>libphonenumber Unit Tests - i18n.phonenumbers - phonenumberutil.js</title>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.proto2.Message');
</script>
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadatafortesting.js"></script>
<script src="regioncodefortesting.js"></script>
<script src="phonenumberutil.js"></script>
<script src="phonenumberutil_test.js"></script>
</head>
<body>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/phonenumberutil_test.html
|
HTML
|
unknown
| 1,196
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Unit tests for the PhoneNumberUtil.
*
* Note that these tests use the metadata contained in metadatafortesting.js,
* not the normal metadata files, so should not be used for regression test
* purposes - these tests are illustrative only and test functionality.
*
* @author Nikolaos Trogkanis
*/
goog.require('goog.array');
goog.require('goog.string.StringBuffer');
goog.require('goog.testing.jsunit');
goog.require('i18n.phonenumbers.NumberFormat');
goog.require('i18n.phonenumbers.PhoneMetadata');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumberDesc');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.RegionCode');
/** @type {!i18n.phonenumbers.PhoneNumberUtil} */
var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
// Set up some test numbers to re-use.
// TODO: Rewrite this as static functions that return new numbers each time to
// avoid any risk of accidental changes to mutable static state affecting many
// tests.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var ALPHA_NUMERIC_NUMBER = new i18n.phonenumbers.PhoneNumber();
ALPHA_NUMERIC_NUMBER.setCountryCode(1);
ALPHA_NUMERIC_NUMBER.setNationalNumber(80074935247);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var AE_UAN = new i18n.phonenumbers.PhoneNumber();
AE_UAN.setCountryCode(971);
AE_UAN.setNationalNumber(600123456);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var AR_MOBILE = new i18n.phonenumbers.PhoneNumber();
AR_MOBILE.setCountryCode(54);
AR_MOBILE.setNationalNumber(91187654321);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var AR_NUMBER = new i18n.phonenumbers.PhoneNumber();
AR_NUMBER.setCountryCode(54);
AR_NUMBER.setNationalNumber(1187654321);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var AU_NUMBER = new i18n.phonenumbers.PhoneNumber();
AU_NUMBER.setCountryCode(61);
AU_NUMBER.setNationalNumber(236618300);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var BS_MOBILE = new i18n.phonenumbers.PhoneNumber();
BS_MOBILE.setCountryCode(1);
BS_MOBILE.setNationalNumber(2423570000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var BS_NUMBER = new i18n.phonenumbers.PhoneNumber();
BS_NUMBER.setCountryCode(1);
BS_NUMBER.setNationalNumber(2423651234);
// Note that this is the same as the example number for DE in the metadata.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var DE_NUMBER = new i18n.phonenumbers.PhoneNumber();
DE_NUMBER.setCountryCode(49);
DE_NUMBER.setNationalNumber(30123456);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var DE_SHORT_NUMBER = new i18n.phonenumbers.PhoneNumber();
DE_SHORT_NUMBER.setCountryCode(49);
DE_SHORT_NUMBER.setNationalNumber(1234);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var GB_MOBILE = new i18n.phonenumbers.PhoneNumber();
GB_MOBILE.setCountryCode(44);
GB_MOBILE.setNationalNumber(7912345678);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var GB_NUMBER = new i18n.phonenumbers.PhoneNumber();
GB_NUMBER.setCountryCode(44);
GB_NUMBER.setNationalNumber(2070313000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var IT_MOBILE = new i18n.phonenumbers.PhoneNumber();
IT_MOBILE.setCountryCode(39);
IT_MOBILE.setNationalNumber(345678901);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var IT_NUMBER = new i18n.phonenumbers.PhoneNumber();
IT_NUMBER.setCountryCode(39);
IT_NUMBER.setNationalNumber(236618300);
IT_NUMBER.setItalianLeadingZero(true);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var JP_STAR_NUMBER = new i18n.phonenumbers.PhoneNumber();
JP_STAR_NUMBER.setCountryCode(81);
JP_STAR_NUMBER.setNationalNumber(2345);
// Numbers to test the formatting rules from Mexico.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var MX_MOBILE1 = new i18n.phonenumbers.PhoneNumber();
MX_MOBILE1.setCountryCode(52);
MX_MOBILE1.setNationalNumber(12345678900);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var MX_MOBILE2 = new i18n.phonenumbers.PhoneNumber();
MX_MOBILE2.setCountryCode(52);
MX_MOBILE2.setNationalNumber(15512345678);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var MX_NUMBER1 = new i18n.phonenumbers.PhoneNumber();
MX_NUMBER1.setCountryCode(52);
MX_NUMBER1.setNationalNumber(3312345678);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var MX_NUMBER2 = new i18n.phonenumbers.PhoneNumber();
MX_NUMBER2.setCountryCode(52);
MX_NUMBER2.setNationalNumber(8211234567);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var NZ_NUMBER = new i18n.phonenumbers.PhoneNumber();
NZ_NUMBER.setCountryCode(64);
NZ_NUMBER.setNationalNumber(33316005);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var SG_NUMBER = new i18n.phonenumbers.PhoneNumber();
SG_NUMBER.setCountryCode(65);
SG_NUMBER.setNationalNumber(65218000);
// A too-long and hence invalid US number.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_LONG_NUMBER = new i18n.phonenumbers.PhoneNumber();
US_LONG_NUMBER.setCountryCode(1);
US_LONG_NUMBER.setNationalNumber(65025300001);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_NUMBER = new i18n.phonenumbers.PhoneNumber();
US_NUMBER.setCountryCode(1);
US_NUMBER.setNationalNumber(6502530000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_PREMIUM = new i18n.phonenumbers.PhoneNumber();
US_PREMIUM.setCountryCode(1);
US_PREMIUM.setNationalNumber(9002530000);
// Too short, but still possible US numbers.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_LOCAL_NUMBER = new i18n.phonenumbers.PhoneNumber();
US_LOCAL_NUMBER.setCountryCode(1);
US_LOCAL_NUMBER.setNationalNumber(2530000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_SHORT_BY_ONE_NUMBER = new i18n.phonenumbers.PhoneNumber();
US_SHORT_BY_ONE_NUMBER.setCountryCode(1);
US_SHORT_BY_ONE_NUMBER.setNationalNumber(650253000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_TOLLFREE = new i18n.phonenumbers.PhoneNumber();
US_TOLLFREE.setCountryCode(1);
US_TOLLFREE.setNationalNumber(8002530000);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_SPOOF = new i18n.phonenumbers.PhoneNumber();
US_SPOOF.setCountryCode(1);
US_SPOOF.setNationalNumber(0);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var US_SPOOF_WITH_RAW_INPUT = new i18n.phonenumbers.PhoneNumber();
US_SPOOF_WITH_RAW_INPUT.setCountryCode(1);
US_SPOOF_WITH_RAW_INPUT.setNationalNumber(0);
US_SPOOF_WITH_RAW_INPUT.setRawInput('000-000-0000');
/** @type {!i18n.phonenumbers.PhoneNumber} */
var UZ_FIXED_LINE = new i18n.phonenumbers.PhoneNumber();
UZ_FIXED_LINE.setCountryCode(998);
UZ_FIXED_LINE.setNationalNumber(612201234);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var UZ_MOBILE = new i18n.phonenumbers.PhoneNumber();
UZ_MOBILE.setCountryCode(998);
UZ_MOBILE.setNationalNumber(950123456);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var INTERNATIONAL_TOLL_FREE = new i18n.phonenumbers.PhoneNumber();
INTERNATIONAL_TOLL_FREE.setCountryCode(800);
INTERNATIONAL_TOLL_FREE.setNationalNumber(12345678);
// We set this to be the same length as numbers for the other non-geographical
// country prefix that we have in our test metadata. However, this is not
// considered valid because they differ in their country calling code.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var INTERNATIONAL_TOLL_FREE_TOO_LONG = new i18n.phonenumbers.PhoneNumber();
INTERNATIONAL_TOLL_FREE_TOO_LONG.setCountryCode(800);
INTERNATIONAL_TOLL_FREE_TOO_LONG.setNationalNumber(123456789);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var UNIVERSAL_PREMIUM_RATE = new i18n.phonenumbers.PhoneNumber();
UNIVERSAL_PREMIUM_RATE.setCountryCode(979);
UNIVERSAL_PREMIUM_RATE.setNationalNumber(123456789);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT = new i18n.phonenumbers.PhoneNumber();
UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT.setCountryCode(2);
UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT.setNationalNumber(12345);
var RegionCode = i18n.phonenumbers.RegionCode;
function testGetInstanceLoadUSMetadata() {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
assertEquals(RegionCode.US, metadata.getId());
assertEquals(1, metadata.getCountryCode());
assertEquals('011', metadata.getInternationalPrefix());
assertTrue(metadata.hasNationalPrefix());
assertEquals(2, metadata.numberFormatCount());
assertEquals('(\\d{3})(\\d{3})(\\d{4})',
metadata.getNumberFormat(1).getPattern());
assertEquals('$1 $2 $3', metadata.getNumberFormat(1).getFormat());
assertEquals('[13-689]\\d{9}|2[0-35-9]\\d{8}',
metadata.getGeneralDesc().getNationalNumberPattern());
assertEquals('[13-689]\\d{9}|2[0-35-9]\\d{8}',
metadata.getFixedLine().getNationalNumberPattern());
assertEquals('900\\d{7}',
metadata.getPremiumRate().getNationalNumberPattern());
// No shared-cost data is available, so its national number data should not be
// set.
assertFalse(metadata.getSharedCost().hasNationalNumberPattern());
}
function testGetInstanceLoadDEMetadata() {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = phoneUtil.getMetadataForRegion(RegionCode.DE);
assertEquals(RegionCode.DE, metadata.getId());
assertEquals(49, metadata.getCountryCode());
assertEquals('00', metadata.getInternationalPrefix());
assertEquals('0', metadata.getNationalPrefix());
assertEquals(6, metadata.numberFormatCount());
assertEquals(1, metadata.getNumberFormat(5).leadingDigitsPatternCount());
assertEquals('900', metadata.getNumberFormat(5).getLeadingDigitsPattern(0));
assertEquals('(\\d{3})(\\d{3,4})(\\d{4})',
metadata.getNumberFormat(5).getPattern());
assertEquals('$1 $2 $3', metadata.getNumberFormat(5).getFormat());
assertEquals('(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:0[2-9]|[1-9]\\d))\\d{1,8}',
metadata.getFixedLine().getNationalNumberPattern());
assertEquals('30123456', metadata.getFixedLine().getExampleNumber());
assertEquals('900([135]\\d{6}|9\\d{7})',
metadata.getPremiumRate().getNationalNumberPattern());
}
function testGetInstanceLoadARMetadata() {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = phoneUtil.getMetadataForRegion(RegionCode.AR);
assertEquals(RegionCode.AR, metadata.getId());
assertEquals(54, metadata.getCountryCode());
assertEquals('00', metadata.getInternationalPrefix());
assertEquals('0', metadata.getNationalPrefix());
assertEquals('0(?:(11|343|3715)15)?', metadata.getNationalPrefixForParsing());
assertEquals('9$1', metadata.getNationalPrefixTransformRule());
assertEquals('$2 15 $3-$4', metadata.getNumberFormat(2).getFormat());
assertEquals('(\\d)(\\d{4})(\\d{2})(\\d{4})',
metadata.getNumberFormat(3).getPattern());
assertEquals('(\\d)(\\d{4})(\\d{2})(\\d{4})',
metadata.getIntlNumberFormat(3).getPattern());
assertEquals('$1 $2 $3 $4', metadata.getIntlNumberFormat(3).getFormat());
}
function testGetInstanceLoadInternationalTollFreeMetadata() {
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = phoneUtil.getMetadataForNonGeographicalRegion(800);
assertEquals('001', metadata.getId());
assertEquals(800, metadata.getCountryCode());
assertEquals('$1 $2', metadata.getNumberFormat(0).getFormat());
assertEquals('(\\d{4})(\\d{4})', metadata.getNumberFormat(0).getPattern());
assertEquals(0, metadata.getGeneralDesc().possibleLengthLocalOnlyCount());
assertEquals(1, metadata.getGeneralDesc().possibleLengthCount());
assertEquals('12345678', metadata.getTollFree().getExampleNumber());
}
function testIsNumberGeographical() {
// Bahamas, mobile phone number.
assertFalse(phoneUtil.isNumberGeographical(BS_MOBILE));
// Australian fixed line number.
assertTrue(phoneUtil.isNumberGeographical(AU_NUMBER));
// International toll free number.
assertFalse(phoneUtil.isNumberGeographical(INTERNATIONAL_TOLL_FREE));
// We test that mobile phone numbers in relevant regions are indeed considered
// geographical.
// Argentina, mobile phone number.
assertTrue(phoneUtil.isNumberGeographical(AR_MOBILE));
// Mexico, mobile phone number.
assertTrue(phoneUtil.isNumberGeographical(MX_MOBILE1));
// Mexico, another mobile phone number.
assertTrue(phoneUtil.isNumberGeographical(MX_MOBILE2));
}
function testGetLengthOfGeographicalAreaCode() {
// Google MTV, which has area code '650'.
assertEquals(3, phoneUtil.getLengthOfGeographicalAreaCode(US_NUMBER));
// A North America toll-free number, which has no area code.
assertEquals(0, phoneUtil.getLengthOfGeographicalAreaCode(US_TOLLFREE));
// Google London, which has area code '20'.
assertEquals(2, phoneUtil.getLengthOfGeographicalAreaCode(GB_NUMBER));
// A UK mobile phone, which has no area code.
assertEquals(0, phoneUtil.getLengthOfGeographicalAreaCode(GB_MOBILE));
// Google Buenos Aires, which has area code '11'.
assertEquals(2, phoneUtil.getLengthOfGeographicalAreaCode(AR_NUMBER));
// Google Sydney, which has area code '2'.
assertEquals(1, phoneUtil.getLengthOfGeographicalAreaCode(AU_NUMBER));
// Italian numbers - there is no national prefix, but it still has an area
// code.
assertEquals(2, phoneUtil.getLengthOfGeographicalAreaCode(IT_NUMBER));
// Google Singapore. Singapore has no area code and no national prefix.
assertEquals(0, phoneUtil.getLengthOfGeographicalAreaCode(SG_NUMBER));
// An invalid US number (1 digit shorter), which has no area code.
assertEquals(0,
phoneUtil.getLengthOfGeographicalAreaCode(US_SHORT_BY_ONE_NUMBER));
// An international toll free number, which has no area code.
assertEquals(0,
phoneUtil.getLengthOfGeographicalAreaCode(INTERNATIONAL_TOLL_FREE));
}
function testGetLengthOfNationalDestinationCode() {
// Google MTV, which has national destination code (NDC) '650'.
assertEquals(3, phoneUtil.getLengthOfNationalDestinationCode(US_NUMBER));
// A North America toll-free number, which has NDC '800'.
assertEquals(3, phoneUtil.getLengthOfNationalDestinationCode(US_TOLLFREE));
// Google London, which has NDC '20'.
assertEquals(2, phoneUtil.getLengthOfNationalDestinationCode(GB_NUMBER));
// A UK mobile phone, which has NDC '7912'.
assertEquals(4, phoneUtil.getLengthOfNationalDestinationCode(GB_MOBILE));
// Google Buenos Aires, which has NDC '11'.
assertEquals(2, phoneUtil.getLengthOfNationalDestinationCode(AR_NUMBER));
// An Argentinian mobile which has NDC '911'.
assertEquals(3, phoneUtil.getLengthOfNationalDestinationCode(AR_MOBILE));
// Google Sydney, which has NDC '2'.
assertEquals(1, phoneUtil.getLengthOfNationalDestinationCode(AU_NUMBER));
// Google Singapore, which has NDC '6521'.
assertEquals(4, phoneUtil.getLengthOfNationalDestinationCode(SG_NUMBER));
// An invalid US number (1 digit shorter), which has no NDC.
assertEquals(0,
phoneUtil.getLengthOfNationalDestinationCode(US_SHORT_BY_ONE_NUMBER));
// A number containing an invalid country calling code, which shouldn't have
// any NDC.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(123);
number.setNationalNumber(6502530000);
assertEquals(0, phoneUtil.getLengthOfNationalDestinationCode(number));
// An international toll free number, which has NDC '1234'.
assertEquals(4,
phoneUtil.getLengthOfNationalDestinationCode(INTERNATIONAL_TOLL_FREE));
}
function testGetCountryMobileToken() {
assertEquals('9', i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
phoneUtil.getCountryCodeForRegion(RegionCode.AR)));
// Country calling code for Sweden, which has no mobile token.
assertEquals('', i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
phoneUtil.getCountryCodeForRegion(RegionCode.SE)));
}
function testGetSupportedRegions() {
assertTrue(phoneUtil.getSupportedRegions().length > 0);
assertTrue(goog.array.contains(
phoneUtil.getSupportedRegions(), RegionCode.US));
assertFalse(goog.array.contains(
phoneUtil.getSupportedRegions(), RegionCode.UN001));
assertFalse(goog.array.contains(phoneUtil.getSupportedRegions(), '800'));
}
function testGetSupportedGlobalNetworkCallingCodes() {
assertTrue(phoneUtil.getSupportedGlobalNetworkCallingCodes().length > 0);
assertFalse(goog.array.contains(
phoneUtil.getSupportedGlobalNetworkCallingCodes(), RegionCode.US));
assertTrue(goog.array.contains(
phoneUtil.getSupportedGlobalNetworkCallingCodes(), 800));
goog.array.forEach(
phoneUtil.getSupportedGlobalNetworkCallingCodes(),
function(countryCallingCode) {
assertEquals(RegionCode.UN001,
phoneUtil.getRegionCodeForCountryCode(countryCallingCode));
});
}
function testGetSupportedCallingCodes() {
assertTrue(phoneUtil.getSupportedCallingCodes().length > 0);
goog.array.forEach(
phoneUtil.getSupportedCallingCodes(),
function(callingCode) {
assertTrue(callingCode > 0);
assertFalse(phoneUtil.getRegionCodeForCountryCode(callingCode) ==
RegionCode.ZZ);
});
// There should be more than just the global network calling codes in this set.
assertTrue(phoneUtil.getSupportedCallingCodes().length >
phoneUtil.getSupportedGlobalNetworkCallingCodes().length);
// But they should be included. Testing one of them.
assertTrue(goog.array.contains(
phoneUtil.getSupportedGlobalNetworkCallingCodes(), 979));
}
function testGetSupportedTypesForRegion() {
var PNT = i18n.phonenumbers.PhoneNumberType;
var types = phoneUtil.getSupportedTypesForRegion(RegionCode.BR);
assertTrue(goog.array.contains(types, PNT.FIXED_LINE));
// Our test data has no mobile numbers for Brazil.
assertFalse(goog.array.contains(types, PNT.MOBILE));
// UNKNOWN should never be returned.
assertFalse(goog.array.contains(types, PNT.UNKNOWN));
// In the US, many numbers are classified as FIXED_LINE_OR_MOBILE; but we
// don't want to expose this as a supported type, instead we say FIXED_LINE
// and MOBILE are both present.
types = phoneUtil.getSupportedTypesForRegion(RegionCode.US);
assertTrue(goog.array.contains(types, PNT.FIXED_LINE));
assertTrue(goog.array.contains(types, PNT.MOBILE));
assertFalse(goog.array.contains(types, PNT.FIXED_LINE_OR_MOBILE));
types = phoneUtil.getSupportedTypesForRegion(RegionCode.ZZ);
assertTrue(types.length == 0);
}
function testGetSupportedTypesForNonGeoEntity() {
var PNT = i18n.phonenumbers.PhoneNumberType;
var types = phoneUtil.getSupportedTypesForNonGeoEntity(999);
// No data exists for 999 at all, no types should be returned.
assertTrue(types.length == 0);
types = phoneUtil.getSupportedTypesForNonGeoEntity(979);
assertTrue(goog.array.contains(types, PNT.PREMIUM_RATE));
// Our test data has no mobile numbers for Brazil.
assertFalse(goog.array.contains(types, PNT.MOBILE));
// UNKNOWN should never be returned.
assertFalse(goog.array.contains(types, PNT.UNKNOWN));
}
function testGetNationalSignificantNumber() {
assertEquals('6502530000',
phoneUtil.getNationalSignificantNumber(US_NUMBER));
// An Italian mobile number.
assertEquals('345678901',
phoneUtil.getNationalSignificantNumber(IT_MOBILE));
// An Italian fixed line number.
assertEquals('0236618300',
phoneUtil.getNationalSignificantNumber(IT_NUMBER));
assertEquals('12345678',
phoneUtil.getNationalSignificantNumber(INTERNATIONAL_TOLL_FREE));
// An empty number.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var emptyNumber = new i18n.phonenumbers.PhoneNumber();
assertEquals('', phoneUtil.getNationalSignificantNumber(emptyNumber));
}
function testGetNationalSignificantNumber_ManyLeadingZeros() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(1);
number.setNationalNumber(650);
number.setItalianLeadingZero(true);
number.setNumberOfLeadingZeros(2);
assertEquals('00650', phoneUtil.getNationalSignificantNumber(number));
// Set a bad value; we shouldn't crash, we shouldn't output any leading zeros
// at all.
number.setNumberOfLeadingZeros(-3);
assertEquals('650', phoneUtil.getNationalSignificantNumber(number));
}
function testGetExampleNumber() {
var PNT = i18n.phonenumbers.PhoneNumberType;
assertTrue(DE_NUMBER.equals(phoneUtil.getExampleNumber(RegionCode.DE)));
assertTrue(DE_NUMBER.equals(
phoneUtil.getExampleNumberForType(RegionCode.DE, PNT.FIXED_LINE)));
// Should return the same response if asked for FIXED_LINE_OR_MOBILE too.
assertTrue(DE_NUMBER.equals(
phoneUtil.getExampleNumberForType(
RegionCode.DE, PNT.FIXED_LINE_OR_MOBILE)));
// We have data for the US, but no data for VOICEMAIL.
assertNull(
phoneUtil.getExampleNumberForType(RegionCode.US, PNT.VOICEMAIL));
assertNotNull(
phoneUtil.getExampleNumberForType(RegionCode.US, PNT.FIXED_LINE));
assertNotNull(phoneUtil.getExampleNumberForType(RegionCode.US, PNT.MOBILE));
// CS is an invalid region, so we have no data for it.
assertNull(phoneUtil.getExampleNumberForType(RegionCode.CS, PNT.MOBILE));
// RegionCode 001 is reserved for supporting non-geographical country calling
// code. We don't support getting an example number for it with this method.
assertNull(phoneUtil.getExampleNumber(RegionCode.UN001));
}
function testGetExampleNumberForNonGeoEntity() {
assertTrue(INTERNATIONAL_TOLL_FREE.equals(
phoneUtil.getExampleNumberForNonGeoEntity(800)));
assertTrue(UNIVERSAL_PREMIUM_RATE.equals(
phoneUtil.getExampleNumberForNonGeoEntity(979)));
}
function testConvertAlphaCharactersInNumber() {
/** @type {string} */
var input = '1800-ABC-DEF';
// Alpha chars are converted to digits; everything else is left untouched.
/** @type {string} */
var expectedOutput = '1800-222-333';
assertEquals(expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.convertAlphaCharactersInNumber(input));
}
function testNormaliseRemovePunctuation() {
/** @type {string} */
var inputNumber = '034-56&+#2\u00AD34';
/** @type {string} */
var expectedOutput = '03456234';
assertEquals('Conversion did not correctly remove punctuation',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
}
function testNormaliseReplaceAlphaCharacters() {
/** @type {string} */
var inputNumber = '034-I-am-HUNGRY';
/** @type {string} */
var expectedOutput = '034426486479';
assertEquals('Conversion did not correctly replace alpha characters',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
}
function testNormaliseOtherDigits() {
/** @type {string} */
var inputNumber = '\uFF125\u0665';
/** @type {string} */
var expectedOutput = '255';
assertEquals('Conversion did not correctly replace non-latin digits',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
// Eastern-Arabic digits.
inputNumber = '\u06F52\u06F0';
expectedOutput = '520';
assertEquals('Conversion did not correctly replace non-latin digits',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalize(inputNumber));
}
function testNormaliseStripAlphaCharacters() {
/** @type {string} */
var inputNumber = '034-56&+a#234';
/** @type {string} */
var expectedOutput = '03456234';
assertEquals('Conversion did not correctly remove alpha character',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(inputNumber));
}
function testNormaliseStripNonDiallableCharacters() {
/** @type {string} */
var inputNumber = '03*4-56&+1a#234';
/** @type {string} */
var expectedOutput = '03*456+1#234';
assertEquals('Conversion did not correctly remove non-diallable characters',
expectedOutput,
i18n.phonenumbers.PhoneNumberUtil.normalizeDiallableCharsOnly(
inputNumber));
}
function testFormatUSNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('650 253 0000',
phoneUtil.format(US_NUMBER, PNF.NATIONAL));
assertEquals('+1 650 253 0000',
phoneUtil.format(US_NUMBER, PNF.INTERNATIONAL));
assertEquals('800 253 0000',
phoneUtil.format(US_TOLLFREE, PNF.NATIONAL));
assertEquals('+1 800 253 0000',
phoneUtil.format(US_TOLLFREE, PNF.INTERNATIONAL));
assertEquals('900 253 0000',
phoneUtil.format(US_PREMIUM, PNF.NATIONAL));
assertEquals('+1 900 253 0000',
phoneUtil.format(US_PREMIUM, PNF.INTERNATIONAL));
assertEquals('tel:+1-900-253-0000',
phoneUtil.format(US_PREMIUM, PNF.RFC3966));
// Numbers with all zeros in the national number part will be formatted by
// using the raw_input if that is available no matter which format is
// specified.
assertEquals('000-000-0000',
phoneUtil.format(US_SPOOF_WITH_RAW_INPUT, PNF.NATIONAL));
assertEquals('0', phoneUtil.format(US_SPOOF, PNF.NATIONAL));
}
function testFormatBSNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('242 365 1234',
phoneUtil.format(BS_NUMBER, PNF.NATIONAL));
assertEquals('+1 242 365 1234',
phoneUtil.format(BS_NUMBER, PNF.INTERNATIONAL));
}
function testFormatGBNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('(020) 7031 3000',
phoneUtil.format(GB_NUMBER, PNF.NATIONAL));
assertEquals('+44 20 7031 3000',
phoneUtil.format(GB_NUMBER, PNF.INTERNATIONAL));
assertEquals('(07912) 345 678',
phoneUtil.format(GB_MOBILE, PNF.NATIONAL));
assertEquals('+44 7912 345 678',
phoneUtil.format(GB_MOBILE, PNF.INTERNATIONAL));
}
function testFormatDENumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(301234);
assertEquals('030/1234',
phoneUtil.format(deNumber, PNF.NATIONAL));
assertEquals('+49 30/1234',
phoneUtil.format(deNumber, PNF.INTERNATIONAL));
assertEquals('tel:+49-30-1234',
phoneUtil.format(deNumber, PNF.RFC3966));
deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(291123);
assertEquals('0291 123',
phoneUtil.format(deNumber, PNF.NATIONAL));
assertEquals('+49 291 123',
phoneUtil.format(deNumber, PNF.INTERNATIONAL));
deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(29112345678);
assertEquals('0291 12345678',
phoneUtil.format(deNumber, PNF.NATIONAL));
assertEquals('+49 291 12345678',
phoneUtil.format(deNumber, PNF.INTERNATIONAL));
deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(912312345);
assertEquals('09123 12345',
phoneUtil.format(deNumber, PNF.NATIONAL));
assertEquals('+49 9123 12345',
phoneUtil.format(deNumber, PNF.INTERNATIONAL));
deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(80212345);
assertEquals('08021 2345',
phoneUtil.format(deNumber, PNF.NATIONAL));
assertEquals('+49 8021 2345',
phoneUtil.format(deNumber, PNF.INTERNATIONAL));
// Note this number is correctly formatted without national prefix. Most of
// the numbers that are treated as invalid numbers by the library are short
// numbers, and they are usually not dialed with national prefix.
assertEquals('1234',
phoneUtil.format(DE_SHORT_NUMBER, PNF.NATIONAL));
assertEquals('+49 1234',
phoneUtil.format(DE_SHORT_NUMBER, PNF.INTERNATIONAL));
deNumber = new i18n.phonenumbers.PhoneNumber();
deNumber.setCountryCode(49);
deNumber.setNationalNumber(41341234);
assertEquals('04134 1234',
phoneUtil.format(deNumber, PNF.NATIONAL));
}
function testFormatITNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('02 3661 8300',
phoneUtil.format(IT_NUMBER, PNF.NATIONAL));
assertEquals('+39 02 3661 8300',
phoneUtil.format(IT_NUMBER, PNF.INTERNATIONAL));
assertEquals('+390236618300',
phoneUtil.format(IT_NUMBER, PNF.E164));
assertEquals('345 678 901',
phoneUtil.format(IT_MOBILE, PNF.NATIONAL));
assertEquals('+39 345 678 901',
phoneUtil.format(IT_MOBILE, PNF.INTERNATIONAL));
assertEquals('+39345678901',
phoneUtil.format(IT_MOBILE, PNF.E164));
}
function testFormatAUNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('02 3661 8300',
phoneUtil.format(AU_NUMBER, PNF.NATIONAL));
assertEquals('+61 2 3661 8300',
phoneUtil.format(AU_NUMBER, PNF.INTERNATIONAL));
assertEquals('+61236618300',
phoneUtil.format(AU_NUMBER, PNF.E164));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var auNumber = new i18n.phonenumbers.PhoneNumber();
auNumber.setCountryCode(61);
auNumber.setNationalNumber(1800123456);
assertEquals('1800 123 456',
phoneUtil.format(auNumber, PNF.NATIONAL));
assertEquals('+61 1800 123 456',
phoneUtil.format(auNumber, PNF.INTERNATIONAL));
assertEquals('+611800123456',
phoneUtil.format(auNumber, PNF.E164));
}
function testFormatARNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('011 8765-4321',
phoneUtil.format(AR_NUMBER, PNF.NATIONAL));
assertEquals('+54 11 8765-4321',
phoneUtil.format(AR_NUMBER, PNF.INTERNATIONAL));
assertEquals('+541187654321',
phoneUtil.format(AR_NUMBER, PNF.E164));
assertEquals('011 15 8765-4321',
phoneUtil.format(AR_MOBILE, PNF.NATIONAL));
assertEquals('+54 9 11 8765 4321',
phoneUtil.format(AR_MOBILE, PNF.INTERNATIONAL));
assertEquals('+5491187654321',
phoneUtil.format(AR_MOBILE, PNF.E164));
}
function testFormatMXNumber() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('045 234 567 8900',
phoneUtil.format(MX_MOBILE1, PNF.NATIONAL));
assertEquals('+52 1 234 567 8900',
phoneUtil.format(MX_MOBILE1, PNF.INTERNATIONAL));
assertEquals('+5212345678900',
phoneUtil.format(MX_MOBILE1, PNF.E164));
assertEquals('045 55 1234 5678',
phoneUtil.format(MX_MOBILE2, PNF.NATIONAL));
assertEquals('+52 1 55 1234 5678',
phoneUtil.format(MX_MOBILE2, PNF.INTERNATIONAL));
assertEquals('+5215512345678',
phoneUtil.format(MX_MOBILE2, PNF.E164));
assertEquals('01 33 1234 5678',
phoneUtil.format(MX_NUMBER1, PNF.NATIONAL));
assertEquals('+52 33 1234 5678',
phoneUtil.format(MX_NUMBER1, PNF.INTERNATIONAL));
assertEquals('+523312345678',
phoneUtil.format(MX_NUMBER1, PNF.E164));
assertEquals('01 821 123 4567',
phoneUtil.format(MX_NUMBER2, PNF.NATIONAL));
assertEquals('+52 821 123 4567',
phoneUtil.format(MX_NUMBER2, PNF.INTERNATIONAL));
assertEquals('+528211234567',
phoneUtil.format(MX_NUMBER2, PNF.E164));
}
function testFormatOutOfCountryCallingNumber() {
assertEquals('00 1 900 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_PREMIUM, RegionCode.DE));
assertEquals('1 650 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.BS));
assertEquals('00 1 650 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.PL));
assertEquals('011 44 7912 345 678',
phoneUtil.formatOutOfCountryCallingNumber(GB_MOBILE, RegionCode.US));
assertEquals('00 49 1234',
phoneUtil.formatOutOfCountryCallingNumber(DE_SHORT_NUMBER,
RegionCode.GB));
// Note this number is correctly formatted without national prefix. Most of
// the numbers that are treated as invalid numbers by the library are short
// numbers, and they are usually not dialed with national prefix.
assertEquals('1234',
phoneUtil.formatOutOfCountryCallingNumber(DE_SHORT_NUMBER,
RegionCode.DE));
assertEquals('011 39 02 3661 8300',
phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.US));
assertEquals('02 3661 8300',
phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.IT));
assertEquals('+39 02 3661 8300',
phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.SG));
assertEquals('6521 8000',
phoneUtil.formatOutOfCountryCallingNumber(SG_NUMBER, RegionCode.SG));
assertEquals('011 54 9 11 8765 4321',
phoneUtil.formatOutOfCountryCallingNumber(AR_MOBILE, RegionCode.US));
assertEquals('011 800 1234 5678',
phoneUtil.formatOutOfCountryCallingNumber(INTERNATIONAL_TOLL_FREE,
RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var arNumberWithExtn = AR_MOBILE.clone();
arNumberWithExtn.setExtension('1234');
assertEquals('011 54 9 11 8765 4321 ext. 1234',
phoneUtil.formatOutOfCountryCallingNumber(arNumberWithExtn,
RegionCode.US));
assertEquals('0011 54 9 11 8765 4321 ext. 1234',
phoneUtil.formatOutOfCountryCallingNumber(arNumberWithExtn,
RegionCode.AU));
assertEquals('011 15 8765-4321 ext. 1234',
phoneUtil.formatOutOfCountryCallingNumber(arNumberWithExtn,
RegionCode.AR));
}
function testFormatOutOfCountryWithInvalidRegion() {
// AQ/Antarctica isn't a valid region code for phone number formatting,
// so this falls back to intl formatting.
assertEquals('+1 650 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.AQ));
// For region code 001, the out-of-country format always turns into the
// international format.
assertEquals('+1 650 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.UN001));
}
function testFormatOutOfCountryWithPreferredIntlPrefix() {
// This should use 0011, since that is the preferred international prefix
// (both 0011 and 0012 are accepted as possible international prefixes in our
// test metadta.)
assertEquals('0011 39 02 3661 8300',
phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER,
RegionCode.AU));
}
function testFormatOutOfCountryKeepingAlphaChars() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var alphaNumericNumber = new i18n.phonenumbers.PhoneNumber();
alphaNumericNumber.setCountryCode(1);
alphaNumericNumber.setNationalNumber(8007493524);
alphaNumericNumber.setRawInput('1800 six-flag');
assertEquals('0011 1 800 SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
alphaNumericNumber.setRawInput('1-800-SIX-flag');
assertEquals('0011 1 800-SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
alphaNumericNumber.setRawInput('Call us from UK: 00 1 800 SIX-flag');
assertEquals('0011 1 800 SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
alphaNumericNumber.setRawInput('800 SIX-flag');
assertEquals('0011 1 800 SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
// Formatting from within the NANPA region.
assertEquals('1 800 SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.US));
assertEquals('1 800 SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.BS));
// Testing that if the raw input doesn't exist, it is formatted using
// formatOutOfCountryCallingNumber.
alphaNumericNumber.clearRawInput();
assertEquals('00 1 800 749 3524',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.DE));
// Testing AU alpha number formatted from Australia.
alphaNumericNumber.setCountryCode(61);
alphaNumericNumber.setNationalNumber(827493524);
alphaNumericNumber.setRawInput('+61 82749-FLAG');
// This number should have the national prefix fixed.
assertEquals('082749-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
alphaNumericNumber.setRawInput('082749-FLAG');
assertEquals('082749-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
alphaNumericNumber.setNationalNumber(18007493524);
alphaNumericNumber.setRawInput('1-800-SIX-flag');
// This number should not have the national prefix prefixed, in accordance
// with the override for this specific formatting rule.
assertEquals('1-800-SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AU));
// The metadata should not be permanently changed, since we copied it before
// modifying patterns. Here we check this.
alphaNumericNumber.setNationalNumber(1800749352);
assertEquals('1800 749 352',
phoneUtil.formatOutOfCountryCallingNumber(alphaNumericNumber,
RegionCode.AU));
// Testing a region with multiple international prefixes.
assertEquals('+61 1-800-SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.SG));
// Testing the case of calling from a non-supported region.
assertEquals('+61 1-800-SIX-FLAG',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AQ));
// Testing the case with an invalid country calling code.
alphaNumericNumber.setCountryCode(0);
alphaNumericNumber.setNationalNumber(18007493524);
alphaNumericNumber.setRawInput('1-800-SIX-flag');
// Uses the raw input only.
assertEquals('1-800-SIX-flag',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.DE));
// Testing the case of an invalid alpha number.
alphaNumericNumber.setCountryCode(1);
alphaNumericNumber.setNationalNumber(80749);
alphaNumericNumber.setRawInput('180-SIX');
// No country-code stripping can be done.
assertEquals('00 1 180-SIX',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.DE));
// Testing the case of calling from a non-supported region.
alphaNumericNumber.setCountryCode(1);
alphaNumericNumber.setNationalNumber(80749);
alphaNumericNumber.setRawInput('180-SIX');
// No country-code stripping can be done since the number is invalid.
assertEquals('+1 180-SIX',
phoneUtil.formatOutOfCountryKeepingAlphaChars(alphaNumericNumber,
RegionCode.AQ));
}
function testFormatWithCarrierCode() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
// We only support this for AR in our test metadata, and only for mobile
// numbers starting with certain values.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var arMobile = new i18n.phonenumbers.PhoneNumber();
arMobile.setCountryCode(54);
arMobile.setNationalNumber(92234654321);
assertEquals('02234 65-4321', phoneUtil.format(arMobile, PNF.NATIONAL));
// Here we force 14 as the carrier code.
assertEquals('02234 14 65-4321',
phoneUtil.formatNationalNumberWithCarrierCode(arMobile, '14'));
// Here we force the number to be shown with no carrier code.
assertEquals('02234 65-4321',
phoneUtil.formatNationalNumberWithCarrierCode(arMobile, ''));
// Here the international rule is used, so no carrier code should be present.
assertEquals('+5492234654321', phoneUtil.format(arMobile, PNF.E164));
// We don't support this for the US so there should be no change.
assertEquals('650 253 0000',
phoneUtil.formatNationalNumberWithCarrierCode(US_NUMBER, '15'));
// Invalid country code should just get the NSN.
assertEquals('12345', phoneUtil.formatNationalNumberWithCarrierCode(
UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT, '89'));
}
function testFormatWithPreferredCarrierCode() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
// We only support this for AR in our test metadata.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var arNumber = new i18n.phonenumbers.PhoneNumber();
arNumber.setCountryCode(54);
arNumber.setNationalNumber(91234125678);
// Test formatting with no preferred carrier code stored in the number itself.
assertEquals('01234 15 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, '15'));
assertEquals('01234 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, ''));
// Test formatting with preferred carrier code present.
arNumber.setPreferredDomesticCarrierCode('19');
assertEquals('01234 12-5678', phoneUtil.format(arNumber, PNF.NATIONAL));
assertEquals('01234 19 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, '15'));
assertEquals('01234 19 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, ''));
// When the preferred_domestic_carrier_code is present (even when it is just a
// space), use it instead of the default carrier code passed in.
arNumber.setPreferredDomesticCarrierCode(' ');
assertEquals('01234 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, '15'));
// When the preferred_domestic_carrier_code is present but empty, treat it as
// unset and use instead the default carrier code passed in.
arNumber.setPreferredDomesticCarrierCode('');
assertEquals('01234 15 12-5678',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(arNumber, '15'));
// We don't support this for the US so there should be no change.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usNumber = new i18n.phonenumbers.PhoneNumber();
usNumber.setCountryCode(1);
usNumber.setNationalNumber(4241231234);
usNumber.setPreferredDomesticCarrierCode('99');
assertEquals('424 123 1234', phoneUtil.format(usNumber, PNF.NATIONAL));
assertEquals('424 123 1234',
phoneUtil.formatNationalNumberWithPreferredCarrierCode(usNumber, '15'));
}
function testFormatNumberForMobileDialing() {
// Numbers are normally dialed in national format in-country, and
// international format from outside the country.
assertEquals('030123456',
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.DE, false));
assertEquals('+4930123456',
phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.CH, false));
var deNumberWithExtn = DE_NUMBER.clone();
deNumberWithExtn.setExtension('1234');
assertEquals('030123456',
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.DE,
false));
assertEquals('+4930123456',
phoneUtil.formatNumberForMobileDialing(deNumberWithExtn, RegionCode.CH,
false));
// US toll free numbers are marked as noInternationalDialling in the test
// metadata for testing purposes. For such numbers, we expect nothing to be
// returned when the region code is not the same one.
assertEquals('800 253 0000',
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.US, true));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.CN, true));
assertEquals('+1 650 253 0000',
phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.US, true));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usNumberWithExtn = US_NUMBER.clone();
usNumberWithExtn.setExtension('1234');
assertEquals('+1 650 253 0000',
phoneUtil.formatNumberForMobileDialing(usNumberWithExtn,
RegionCode.US, true));
assertEquals('8002530000',
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE,
RegionCode.US, false));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(US_TOLLFREE,
RegionCode.CN, false));
assertEquals('+16502530000',
phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.US, false));
assertEquals('+16502530000',
phoneUtil.formatNumberForMobileDialing(usNumberWithExtn,
RegionCode.US, false));
// An invalid US number, which is one digit too long.
assertEquals('+165025300001',
phoneUtil.formatNumberForMobileDialing(US_LONG_NUMBER,
RegionCode.US, false));
assertEquals('+1 65025300001',
phoneUtil.formatNumberForMobileDialing(US_LONG_NUMBER,
RegionCode.US, true));
// Star numbers. In real life they appear in Israel, but we have them in JP
// in our test metadata.
assertEquals('*2345',
phoneUtil.formatNumberForMobileDialing(JP_STAR_NUMBER,
RegionCode.JP, false));
assertEquals('*2345',
phoneUtil.formatNumberForMobileDialing(JP_STAR_NUMBER,
RegionCode.JP, true));
assertEquals('+80012345678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.JP, false));
assertEquals('+800 1234 5678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.JP, true));
// UAE numbers beginning with 600 (classified as UAN) need to be dialled
// without +971 locally.
assertEquals('+971600123456',
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.JP, false));
assertEquals('600123456',
phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.AE, false));
assertEquals('+523312345678',
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.MX,
false));
assertEquals('+523312345678',
phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.US,
false));
// Test whether Uzbek phone numbers are returned in international format even
// when dialled from same region or other regions.
// Fixed-line number
assertEquals('+998612201234',
phoneUtil.formatNumberForMobileDialing(UZ_FIXED_LINE, RegionCode.UZ,
false));
// Mobile number
assertEquals('+998950123456',
phoneUtil.formatNumberForMobileDialing(UZ_MOBILE, RegionCode.UZ,
false));
assertEquals('+998950123456',
phoneUtil.formatNumberForMobileDialing(UZ_MOBILE, RegionCode.US,
false));
// Non-geographical numbers should always be dialed in international format.
assertEquals('+80012345678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.US, false));
assertEquals('+80012345678',
phoneUtil.formatNumberForMobileDialing(INTERNATIONAL_TOLL_FREE,
RegionCode.UN001, false));
// Test that a short number is formatted correctly for mobile dialing within
// the region, and is not diallable from outside the region.
var deShortNumber = new i18n.phonenumbers.PhoneNumber();
deShortNumber.setCountryCode(49);
deShortNumber.setNationalNumber(123);
assertEquals('123',
phoneUtil.formatNumberForMobileDialing(deShortNumber,
RegionCode.DE, false));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(deShortNumber,
RegionCode.IT, false));
// Test the special logic for NANPA countries, for which regular length phone
// numbers are always output in international format, but short numbers are in
// national format.
assertEquals('+16502530000',
phoneUtil.formatNumberForMobileDialing(US_NUMBER,
RegionCode.US, false));
assertEquals('+16502530000',
phoneUtil.formatNumberForMobileDialing(US_NUMBER,
RegionCode.CA, false));
assertEquals('+16502530000',
phoneUtil.formatNumberForMobileDialing(US_NUMBER,
RegionCode.BR, false));
var usShortNumber = new i18n.phonenumbers.PhoneNumber();
usShortNumber.setCountryCode(1);
usShortNumber.setNationalNumber(911);
assertEquals('911',
phoneUtil.formatNumberForMobileDialing(usShortNumber,
RegionCode.US, false));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(usShortNumber,
RegionCode.CA, false));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(usShortNumber,
RegionCode.BR, false));
// Test that the Australian emergency number 000 is formatted correctly.
var auShortNumber = new i18n.phonenumbers.PhoneNumber();
auShortNumber.setCountryCode(61);
auShortNumber.setNationalNumber(0);
auShortNumber.setItalianLeadingZero(true);
auShortNumber.setNumberOfLeadingZeros(2);
assertEquals('000',
phoneUtil.formatNumberForMobileDialing(auShortNumber,
RegionCode.AU, false));
assertEquals('',
phoneUtil.formatNumberForMobileDialing(auShortNumber,
RegionCode.NZ, false));
}
function testFormatByPattern() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
/** @type {!i18n.phonenumbers.NumberFormat} */
var newNumFormat = new i18n.phonenumbers.NumberFormat();
newNumFormat.setPattern('(\\d{3})(\\d{3})(\\d{4})');
newNumFormat.setFormat('($1) $2-$3');
assertEquals('(650) 253-0000',
phoneUtil.formatByPattern(US_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
assertEquals('+1 (650) 253-0000',
phoneUtil.formatByPattern(US_NUMBER,
PNF.INTERNATIONAL,
[newNumFormat]));
assertEquals('tel:+1-650-253-0000',
phoneUtil.formatByPattern(US_NUMBER,
PNF.RFC3966,
[newNumFormat]));
// $NP is set to '1' for the US. Here we check that for other NANPA countries
// the US rules are followed.
newNumFormat.setNationalPrefixFormattingRule('$NP ($FG)');
newNumFormat.setFormat('$1 $2-$3');
assertEquals('1 (242) 365-1234',
phoneUtil.formatByPattern(BS_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
assertEquals('+1 242 365-1234',
phoneUtil.formatByPattern(BS_NUMBER,
PNF.INTERNATIONAL,
[newNumFormat]));
newNumFormat.setPattern('(\\d{2})(\\d{5})(\\d{3})');
newNumFormat.setFormat('$1-$2 $3');
assertEquals('02-36618 300',
phoneUtil.formatByPattern(IT_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
assertEquals('+39 02-36618 300',
phoneUtil.formatByPattern(IT_NUMBER,
PNF.INTERNATIONAL,
[newNumFormat]));
newNumFormat.setNationalPrefixFormattingRule('$NP$FG');
newNumFormat.setPattern('(\\d{2})(\\d{4})(\\d{4})');
newNumFormat.setFormat('$1 $2 $3');
assertEquals('020 7031 3000',
phoneUtil.formatByPattern(GB_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
newNumFormat.setNationalPrefixFormattingRule('($NP$FG)');
assertEquals('(020) 7031 3000',
phoneUtil.formatByPattern(GB_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
newNumFormat.setNationalPrefixFormattingRule('');
assertEquals('20 7031 3000',
phoneUtil.formatByPattern(GB_NUMBER,
PNF.NATIONAL,
[newNumFormat]));
assertEquals('+44 20 7031 3000',
phoneUtil.formatByPattern(GB_NUMBER,
PNF.INTERNATIONAL,
[newNumFormat]));
}
function testFormatE164Number() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertEquals('+16502530000', phoneUtil.format(US_NUMBER, PNF.E164));
assertEquals('+4930123456', phoneUtil.format(DE_NUMBER, PNF.E164));
assertEquals('+80012345678',
phoneUtil.format(INTERNATIONAL_TOLL_FREE, PNF.E164));
}
function testFormatNumberWithExtension() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumber = NZ_NUMBER.clone();
nzNumber.setExtension('1234');
// Uses default extension prefix:
assertEquals('03-331 6005 ext. 1234',
phoneUtil.format(nzNumber, PNF.NATIONAL));
// Uses RFC 3966 syntax.
assertEquals('tel:+64-3-331-6005;ext=1234',
phoneUtil.format(nzNumber, PNF.RFC3966));
// Extension prefix overridden in the territory information for the US:
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usNumberWithExtension = US_NUMBER.clone();
usNumberWithExtension.setExtension('4567');
assertEquals('650 253 0000 extn. 4567',
phoneUtil.format(usNumberWithExtension, PNF.NATIONAL));
}
function testFormatInOriginalFormat() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number1 = phoneUtil.parseAndKeepRawInput('+442087654321', RegionCode.GB);
assertEquals('+44 20 8765 4321',
phoneUtil.formatInOriginalFormat(number1, RegionCode.GB));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number2 = phoneUtil.parseAndKeepRawInput('02087654321', RegionCode.GB);
assertEquals('(020) 8765 4321',
phoneUtil.formatInOriginalFormat(number2, RegionCode.GB));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number3 = phoneUtil.parseAndKeepRawInput('011442087654321',
RegionCode.US);
assertEquals('011 44 20 8765 4321',
phoneUtil.formatInOriginalFormat(number3, RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number4 = phoneUtil.parseAndKeepRawInput('442087654321', RegionCode.GB);
assertEquals('44 20 8765 4321',
phoneUtil.formatInOriginalFormat(number4, RegionCode.GB));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number5 = phoneUtil.parse('+442087654321', RegionCode.GB);
assertEquals('(020) 8765 4321',
phoneUtil.formatInOriginalFormat(number5, RegionCode.GB));
// Invalid numbers that we have a formatting pattern for should be formatted
// properly. Note area codes starting with 7 are intentionally excluded in
// the test metadata for testing purposes.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number6 = phoneUtil.parseAndKeepRawInput('7345678901', RegionCode.US);
assertEquals('734 567 8901',
phoneUtil.formatInOriginalFormat(number6, RegionCode.US));
// US is not a leading zero country, and the presence of the leading zero
// leads us to format the number using raw_input.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number7 = phoneUtil.parseAndKeepRawInput('0734567 8901', RegionCode.US);
assertEquals('0734567 8901',
phoneUtil.formatInOriginalFormat(number7, RegionCode.US));
// This number is valid, but we don't have a formatting pattern for it.
// Fall back to the raw input.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number8 = phoneUtil.parseAndKeepRawInput('02-4567-8900', RegionCode.KR);
assertEquals('02-4567-8900',
phoneUtil.formatInOriginalFormat(number8, RegionCode.KR));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number9 = phoneUtil.parseAndKeepRawInput('01180012345678', RegionCode.US);
assertEquals('011 800 1234 5678',
phoneUtil.formatInOriginalFormat(number9, RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number10 = phoneUtil.parseAndKeepRawInput('+80012345678', RegionCode.KR);
assertEquals('+800 1234 5678',
phoneUtil.formatInOriginalFormat(number10, RegionCode.KR));
// US local numbers are formatted correctly, as we have formatting patterns
// for them.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var localNumberUS = phoneUtil.parseAndKeepRawInput('2530000', RegionCode.US);
assertEquals('253 0000',
phoneUtil.formatInOriginalFormat(localNumberUS, RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithNationalPrefixUS =
phoneUtil.parseAndKeepRawInput('18003456789', RegionCode.US);
assertEquals('1 800 345 6789',
phoneUtil.formatInOriginalFormat(numberWithNationalPrefixUS,
RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithoutNationalPrefixGB =
phoneUtil.parseAndKeepRawInput('2087654321', RegionCode.GB);
assertEquals('20 8765 4321',
phoneUtil.formatInOriginalFormat(numberWithoutNationalPrefixGB,
RegionCode.GB));
// Make sure no metadata is modified as a result of the previous function
// call.
assertEquals('(020) 8765 4321',
phoneUtil.formatInOriginalFormat(number5, RegionCode.GB));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithNationalPrefixMX =
phoneUtil.parseAndKeepRawInput('013312345678', RegionCode.MX);
assertEquals('01 33 1234 5678',
phoneUtil.formatInOriginalFormat(numberWithNationalPrefixMX,
RegionCode.MX));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithoutNationalPrefixMX =
phoneUtil.parseAndKeepRawInput('3312345678', RegionCode.MX);
assertEquals('33 1234 5678',
phoneUtil.formatInOriginalFormat(numberWithoutNationalPrefixMX,
RegionCode.MX));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var italianFixedLineNumber =
phoneUtil.parseAndKeepRawInput('0212345678', RegionCode.IT);
assertEquals('02 1234 5678',
phoneUtil.formatInOriginalFormat(italianFixedLineNumber, RegionCode.IT));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithNationalPrefixJP =
phoneUtil.parseAndKeepRawInput('00777012', RegionCode.JP);
assertEquals('0077-7012',
phoneUtil.formatInOriginalFormat(numberWithNationalPrefixJP,
RegionCode.JP));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithoutNationalPrefixJP =
phoneUtil.parseAndKeepRawInput('0777012', RegionCode.JP);
assertEquals('0777012',
phoneUtil.formatInOriginalFormat(numberWithoutNationalPrefixJP,
RegionCode.JP));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithCarrierCodeBR =
phoneUtil.parseAndKeepRawInput('012 3121286979', RegionCode.BR);
assertEquals('012 3121286979',
phoneUtil.formatInOriginalFormat(numberWithCarrierCodeBR, RegionCode.BR));
// The default national prefix used in this case is 045. When a number with
// national prefix 044 is entered, we return the raw input as we don't want to
// change the number entered.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithNationalPrefixMX1 =
phoneUtil.parseAndKeepRawInput('044(33)1234-5678', RegionCode.MX);
assertEquals('044(33)1234-5678',
phoneUtil.formatInOriginalFormat(numberWithNationalPrefixMX1,
RegionCode.MX));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithNationalPrefixMX2 =
phoneUtil.parseAndKeepRawInput('045(33)1234-5678', RegionCode.MX);
assertEquals('045 33 1234 5678',
phoneUtil.formatInOriginalFormat(numberWithNationalPrefixMX2,
RegionCode.MX));
// The default international prefix used in this case is 0011. When a number
// with international prefix 0012 is entered, we return the raw input as we
// don't want to change the number entered.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var outOfCountryNumberFromAU1 =
phoneUtil.parseAndKeepRawInput('0012 16502530000', RegionCode.AU);
assertEquals('0012 16502530000',
phoneUtil.formatInOriginalFormat(outOfCountryNumberFromAU1,
RegionCode.AU));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var outOfCountryNumberFromAU2 =
phoneUtil.parseAndKeepRawInput('0011 16502530000', RegionCode.AU);
assertEquals('0011 1 650 253 0000',
phoneUtil.formatInOriginalFormat(outOfCountryNumberFromAU2,
RegionCode.AU));
// Test the star sign is not removed from or added to the original input by
// this method.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var starNumber =
phoneUtil.parseAndKeepRawInput('*1234', RegionCode.JP);
assertEquals('*1234', phoneUtil.formatInOriginalFormat(starNumber,
RegionCode.JP));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithoutStar = phoneUtil.parseAndKeepRawInput('1234', RegionCode.JP);
assertEquals('1234', phoneUtil.formatInOriginalFormat(numberWithoutStar,
RegionCode.JP));
// Test an invalid national number without raw input is just formatted as the
// national number.
assertEquals('650253000',
phoneUtil.formatInOriginalFormat(US_SHORT_BY_ONE_NUMBER, RegionCode.US));
}
function testIsPremiumRate() {
var PNT = i18n.phonenumbers.PhoneNumberType;
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(US_PREMIUM));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(39);
premiumRateNumber.setNationalNumber(892123);
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(premiumRateNumber));
premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(44);
premiumRateNumber.setNationalNumber(9187654321);
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(premiumRateNumber));
premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(49);
premiumRateNumber.setNationalNumber(9001654321);
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(premiumRateNumber));
premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(49);
premiumRateNumber.setNationalNumber(90091234567);
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(premiumRateNumber));
assertEquals(PNT.PREMIUM_RATE, phoneUtil.getNumberType(
UNIVERSAL_PREMIUM_RATE));
}
function testIsTollFree() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(1);
tollFreeNumber.setNationalNumber(8881234567);
assertEquals(PNT.TOLL_FREE, phoneUtil.getNumberType(tollFreeNumber));
tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(39);
tollFreeNumber.setNationalNumber(803123);
assertEquals(PNT.TOLL_FREE, phoneUtil.getNumberType(tollFreeNumber));
tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(44);
tollFreeNumber.setNationalNumber(8012345678);
assertEquals(PNT.TOLL_FREE, phoneUtil.getNumberType(tollFreeNumber));
tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(49);
tollFreeNumber.setNationalNumber(8001234567);
assertEquals(PNT.TOLL_FREE, phoneUtil.getNumberType(tollFreeNumber));
assertEquals(PNT.TOLL_FREE, phoneUtil.getNumberType(INTERNATIONAL_TOLL_FREE));
}
function testIsMobile() {
var PNT = i18n.phonenumbers.PhoneNumberType;
assertEquals(PNT.MOBILE, phoneUtil.getNumberType(BS_MOBILE));
assertEquals(PNT.MOBILE, phoneUtil.getNumberType(GB_MOBILE));
assertEquals(PNT.MOBILE, phoneUtil.getNumberType(IT_MOBILE));
assertEquals(PNT.MOBILE, phoneUtil.getNumberType(AR_MOBILE));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var mobileNumber = new i18n.phonenumbers.PhoneNumber();
mobileNumber.setCountryCode(49);
mobileNumber.setNationalNumber(15123456789);
assertEquals(PNT.MOBILE, phoneUtil.getNumberType(mobileNumber));
}
function testIsFixedLine() {
var PNT = i18n.phonenumbers.PhoneNumberType;
assertEquals(PNT.FIXED_LINE, phoneUtil.getNumberType(BS_NUMBER));
assertEquals(PNT.FIXED_LINE, phoneUtil.getNumberType(IT_NUMBER));
assertEquals(PNT.FIXED_LINE, phoneUtil.getNumberType(GB_NUMBER));
assertEquals(PNT.FIXED_LINE, phoneUtil.getNumberType(DE_NUMBER));
}
function testIsFixedLineAndMobile() {
var PNT = i18n.phonenumbers.PhoneNumberType;
assertEquals(PNT.FIXED_LINE_OR_MOBILE,
phoneUtil.getNumberType(US_NUMBER));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var fixedLineAndMobileNumber = new i18n.phonenumbers.PhoneNumber();
fixedLineAndMobileNumber.setCountryCode(54);
fixedLineAndMobileNumber.setNationalNumber(1987654321);
assertEquals(PNT.FIXED_LINE_OR_MOBILE,
phoneUtil.getNumberType(fixedLineAndMobileNumber));
}
function testIsSharedCost() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var gbNumber = new i18n.phonenumbers.PhoneNumber();
gbNumber.setCountryCode(44);
gbNumber.setNationalNumber(8431231234);
assertEquals(PNT.SHARED_COST, phoneUtil.getNumberType(gbNumber));
}
function testIsVoip() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var gbNumber = new i18n.phonenumbers.PhoneNumber();
gbNumber.setCountryCode(44);
gbNumber.setNationalNumber(5631231234);
assertEquals(PNT.VOIP, phoneUtil.getNumberType(gbNumber));
}
function testIsPersonalNumber() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var gbNumber = new i18n.phonenumbers.PhoneNumber();
gbNumber.setCountryCode(44);
gbNumber.setNationalNumber(7031231234);
assertEquals(PNT.PERSONAL_NUMBER, phoneUtil.getNumberType(gbNumber));
}
function testIsUnknown() {
var PNT = i18n.phonenumbers.PhoneNumberType;
// Invalid numbers should be of type UNKNOWN.
assertEquals(PNT.UNKNOWN, phoneUtil.getNumberType(US_LOCAL_NUMBER));
}
function testIsValidNumber() {
assertTrue(phoneUtil.isValidNumber(US_NUMBER));
assertTrue(phoneUtil.isValidNumber(IT_NUMBER));
assertTrue(phoneUtil.isValidNumber(GB_MOBILE));
assertTrue(phoneUtil.isValidNumber(INTERNATIONAL_TOLL_FREE));
assertTrue(phoneUtil.isValidNumber(UNIVERSAL_PREMIUM_RATE));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumber = new i18n.phonenumbers.PhoneNumber();
nzNumber.setCountryCode(64);
nzNumber.setNationalNumber(21387835);
assertTrue(phoneUtil.isValidNumber(nzNumber));
}
function testIsValidForRegion() {
// This number is valid for the Bahamas, but is not a valid US number.
assertTrue(phoneUtil.isValidNumber(BS_NUMBER));
assertTrue(phoneUtil.isValidNumberForRegion(BS_NUMBER, RegionCode.BS));
assertFalse(phoneUtil.isValidNumberForRegion(BS_NUMBER, RegionCode.US));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var bsInvalidNumber = new i18n.phonenumbers.PhoneNumber();
bsInvalidNumber.setCountryCode(1);
bsInvalidNumber.setNationalNumber(2421232345);
// This number is no longer valid.
assertFalse(phoneUtil.isValidNumber(bsInvalidNumber));
// La Mayotte and Reunion use 'leadingDigits' to differentiate them.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var reNumber = new i18n.phonenumbers.PhoneNumber();
reNumber.setCountryCode(262);
reNumber.setNationalNumber(262123456);
assertTrue(phoneUtil.isValidNumber(reNumber));
assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
// Now change the number to be a number for La Mayotte.
reNumber.setNationalNumber(269601234);
assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
// This number is no longer valid for La Reunion.
reNumber.setNationalNumber(269123456);
assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
assertFalse(phoneUtil.isValidNumber(reNumber));
// However, it should be recognised as from La Mayotte, since it is valid for
// this region.
assertEquals(RegionCode.YT, phoneUtil.getRegionCodeForNumber(reNumber));
// This number is valid in both places.
reNumber.setNationalNumber(800123456);
assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
assertTrue(phoneUtil.isValidNumberForRegion(INTERNATIONAL_TOLL_FREE,
RegionCode.UN001));
assertFalse(phoneUtil.isValidNumberForRegion(INTERNATIONAL_TOLL_FREE,
RegionCode.US));
assertFalse(phoneUtil.isValidNumberForRegion(INTERNATIONAL_TOLL_FREE,
RegionCode.ZZ));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var invalidNumber = new i18n.phonenumbers.PhoneNumber();
// Invalid country calling codes.
invalidNumber.setCountryCode(3923);
invalidNumber.setNationalNumber(2366);
assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.ZZ));
assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber,
RegionCode.UN001));
invalidNumber.setCountryCode(0);
assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber,
RegionCode.UN001));
assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.ZZ));
}
function testIsNotValidNumber() {
assertFalse(phoneUtil.isValidNumber(US_LOCAL_NUMBER));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(39);
invalidNumber.setNationalNumber(23661830000);
invalidNumber.setItalianLeadingZero(true);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(44);
invalidNumber.setNationalNumber(791234567);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(49);
invalidNumber.setNationalNumber(1234);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(64);
invalidNumber.setNationalNumber(3316005);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
invalidNumber = new i18n.phonenumbers.PhoneNumber();
// Invalid country calling codes.
invalidNumber.setCountryCode(3923);
invalidNumber.setNationalNumber(2366);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
invalidNumber.setCountryCode(0);
assertFalse(phoneUtil.isValidNumber(invalidNumber));
assertFalse(phoneUtil.isValidNumber(INTERNATIONAL_TOLL_FREE_TOO_LONG));
}
function testGetRegionCodeForCountryCode() {
assertEquals(RegionCode.US, phoneUtil.getRegionCodeForCountryCode(1));
assertEquals(RegionCode.GB, phoneUtil.getRegionCodeForCountryCode(44));
assertEquals(RegionCode.DE, phoneUtil.getRegionCodeForCountryCode(49));
assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(800));
assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(979));
}
function testGetRegionCodeForNumber() {
assertEquals(RegionCode.BS, phoneUtil.getRegionCodeForNumber(BS_NUMBER));
assertEquals(RegionCode.US, phoneUtil.getRegionCodeForNumber(US_NUMBER));
assertEquals(RegionCode.GB, phoneUtil.getRegionCodeForNumber(GB_MOBILE));
assertEquals(RegionCode.UN001,
phoneUtil.getRegionCodeForNumber(INTERNATIONAL_TOLL_FREE));
assertEquals(RegionCode.UN001,
phoneUtil.getRegionCodeForNumber(UNIVERSAL_PREMIUM_RATE));
}
function testGetRegionCodesForCountryCode() {
/** @type {!Array.<string>} */
var regionCodesForNANPA = phoneUtil.getRegionCodesForCountryCode(1);
assertTrue(goog.array.contains(regionCodesForNANPA, RegionCode.US));
assertTrue(goog.array.contains(regionCodesForNANPA, RegionCode.BS));
assertTrue(goog.array.contains(
phoneUtil.getRegionCodesForCountryCode(44), RegionCode.GB));
assertTrue(goog.array.contains(
phoneUtil.getRegionCodesForCountryCode(49), RegionCode.DE));
assertTrue(goog.array.contains(
phoneUtil.getRegionCodesForCountryCode(800), RegionCode.UN001));
// Test with invalid country calling code.
assertTrue(goog.array.isEmpty(phoneUtil.getRegionCodesForCountryCode(-1)));
}
function testGetCountryCodeForRegion() {
assertEquals(1, phoneUtil.getCountryCodeForRegion(RegionCode.US));
assertEquals(64, phoneUtil.getCountryCodeForRegion(RegionCode.NZ));
assertEquals(0, phoneUtil.getCountryCodeForRegion(null));
assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.ZZ));
assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.UN001));
// CS is already deprecated so the library doesn't support it.
assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.CS));
}
function testGetNationalDiallingPrefixForRegion() {
assertEquals('1', phoneUtil.getNddPrefixForRegion(RegionCode.US, false));
// Test non-main country to see it gets the national dialling prefix for the
// main country with that country calling code.
assertEquals('1', phoneUtil.getNddPrefixForRegion(RegionCode.BS, false));
assertEquals('0', phoneUtil.getNddPrefixForRegion(RegionCode.NZ, false));
// Test case with non digit in the national prefix.
assertEquals('0~0', phoneUtil.getNddPrefixForRegion(RegionCode.AO, false));
assertEquals('00', phoneUtil.getNddPrefixForRegion(RegionCode.AO, true));
// Test cases with invalid regions.
assertNull(phoneUtil.getNddPrefixForRegion(null, false));
assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.ZZ, false));
assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.UN001, false));
// CS is already deprecated so the library doesn't support it.
assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.CS, false));
}
function testIsNANPACountry() {
assertTrue(phoneUtil.isNANPACountry(RegionCode.US));
assertTrue(phoneUtil.isNANPACountry(RegionCode.BS));
assertFalse(phoneUtil.isNANPACountry(RegionCode.DE));
assertFalse(phoneUtil.isNANPACountry(RegionCode.ZZ));
assertFalse(phoneUtil.isNANPACountry(RegionCode.UN001));
assertFalse(phoneUtil.isNANPACountry(null));
}
function testIsPossibleNumber() {
assertTrue(phoneUtil.isPossibleNumber(US_NUMBER));
assertTrue(phoneUtil.isPossibleNumber(US_LOCAL_NUMBER));
assertTrue(phoneUtil.isPossibleNumber(GB_NUMBER));
assertTrue(phoneUtil.isPossibleNumber(INTERNATIONAL_TOLL_FREE));
assertTrue(
phoneUtil.isPossibleNumberString('+1 650 253 0000', RegionCode.US));
assertTrue(
phoneUtil.isPossibleNumberString('+1 650 GOO OGLE', RegionCode.US));
assertTrue(
phoneUtil.isPossibleNumberString('(650) 253-0000', RegionCode.US));
assertTrue(
phoneUtil.isPossibleNumberString('253-0000', RegionCode.US));
assertTrue(
phoneUtil.isPossibleNumberString('+1 650 253 0000', RegionCode.GB));
assertTrue(
phoneUtil.isPossibleNumberString('+44 20 7031 3000', RegionCode.GB));
assertTrue(
phoneUtil.isPossibleNumberString('(020) 7031 3000', RegionCode.GB));
assertTrue(
phoneUtil.isPossibleNumberString('7031 3000', RegionCode.GB));
assertTrue(
phoneUtil.isPossibleNumberString('3331 6005', RegionCode.NZ));
assertTrue(
phoneUtil.isPossibleNumberString('+800 1234 5678', RegionCode.UN001));
}
function testIsPossibleNumberForType_DifferentTypeLengths() {
var PNT = i18n.phonenumbers.PhoneNumberType;
// We use Argentinian numbers since they have different possible lengths for
// different types.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(54);
number.setNationalNumber(12345);
// Too short for any Argentinian number, including fixed-line.
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
// 6-digit numbers are okay for fixed-line.
number.setNationalNumber(123456);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
// But too short for mobile.
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
// And too short for toll-free.
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.TOLL_FREE));
// The same applies to 9-digit numbers.
number.setNationalNumber(123456789);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.TOLL_FREE));
// 10-digit numbers are universally possible.
number.setNationalNumber(1234567890);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.TOLL_FREE));
// 11-digit numbers are only possible for mobile numbers. Note we don't
// require the leading 9, which all mobile numbers start with, and would be
// required for a valid mobile number.
number.setNationalNumber(12345678901);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.TOLL_FREE));
}
function testIsPossibleNumberForType_LocalOnly() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// Here we test a number length which matches a local-only length.
number.setCountryCode(49);
number.setNationalNumber(12);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
// Mobile numbers must be 10 or 11 digits, and there are no local-only
// lengths.
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
}
function testIsPossibleNumberForType_DataMissingForSizeReasons() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// Here we test something where the possible lengths match the possible
// lengths of the country as a whole, and hence aren't present in the .js file
// for size reasons - this should still work.
// Local-only number.
number.setCountryCode(55);
number.setNationalNumber(12345678);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
number.setNationalNumber(1234567890);
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.UNKNOWN));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
}
function testIsPossibleNumberForType_NumberTypeNotSupportedForRegion() {
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// There are *no* mobile numbers for this region at all, so we return false.
number.setCountryCode(55);
number.setNationalNumber(12345678);
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
// This matches a fixed-line length though.
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertTrue(
phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE_OR_MOBILE));
// There are *no* fixed-line OR mobile numbers for this country calling code
// at all, so we return false for these.
number.setCountryCode(979);
number.setNationalNumber(123456789);
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.MOBILE));
assertFalse(phoneUtil.isPossibleNumberForType(number, PNT.FIXED_LINE));
assertFalse(phoneUtil.isPossibleNumberForType(
number, PNT.FIXED_LINE_OR_MOBILE));
assertTrue(phoneUtil.isPossibleNumberForType(number, PNT.PREMIUM_RATE));
}
function testIsPossibleNumberWithReason() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
// National numbers for country calling code +1 that are within 7 to 10 digits
// are possible.
assertEquals(VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberWithReason(US_NUMBER));
assertEquals(VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberWithReason(US_LOCAL_NUMBER));
assertEquals(VR.TOO_LONG,
phoneUtil.isPossibleNumberWithReason(US_LONG_NUMBER));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(0);
number.setNationalNumber(2530000);
assertEquals(VR.INVALID_COUNTRY_CODE,
phoneUtil.isPossibleNumberWithReason(number));
number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(1);
number.setNationalNumber(253000);
assertEquals(VR.TOO_SHORT,
phoneUtil.isPossibleNumberWithReason(number));
number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(65);
number.setNationalNumber(1234567890);
assertEquals(VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberWithReason(number));
assertEquals(VR.TOO_LONG,
phoneUtil.isPossibleNumberWithReason(INTERNATIONAL_TOLL_FREE_TOO_LONG));
}
function testIsPossibleNumberForTypeWithReason_DifferentTypeLengths() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// We use Argentinian numbers since they have different possible lengths for
// different types.
number.setCountryCode(54);
number.setNationalNumber(12345);
// Too short for any Argentinian number.
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// 6-digit numbers are okay for fixed-line.
number.setNationalNumber(123456);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// But too short for mobile.
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
// And too short for toll-free.
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.TOLL_FREE));
// The same applies to 9-digit numbers.
number.setNationalNumber(123456789);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.TOLL_FREE));
// 10-digit numbers are universally possible.
number.setNationalNumber(1234567890);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.TOLL_FREE));
// 11-digit numbers are only possible for mobile numbers. Note we don't
// require the leading 9, which all mobile numbers start with, and would be
// required for a valid mobile number.
number.setNationalNumber(12345678901);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.TOLL_FREE));
}
function testIsPossibleNumberForTypeWithReason_LocalOnly() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// Here we test a number length which matches a local-only length.
number.setCountryCode(49);
number.setNationalNumber(12);
assertEquals(VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// Mobile numbers must be 10 or 11 digits, and there are no local-only
// lengths.
assertEquals(VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
}
function testIsPossibleNumberForTypeWithReason_DataMissingForSizeReasons() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// Here we test something where the possible lengths match the possible
// lengths of the country as a whole, and hence aren't present in the binary
// for size reasons - this should still work.
// Local-only number.
number.setCountryCode(55);
number.setNationalNumber(12345678);
assertEquals(
VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// Normal-length number.
number.setNationalNumber(1234567890);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.UNKNOWN));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
}
function testIsPossibleNumberForTypeWithReason_NumberTypeNotSupportedForRegion() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// There are *no* mobile numbers for this region at all, so we return
// INVALID_LENGTH.
number.setCountryCode(55);
number.setNationalNumber(12345678);
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
// This matches a fixed-line length though.
assertEquals(
VR.IS_POSSIBLE_LOCAL_ONLY,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
// This is too short for fixed-line, and no mobile numbers exist.
number.setCountryCode(55);
number.setNationalNumber(1234567);
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// This is too short for mobile, and no fixed-line numbers exist.
number.setCountryCode(882);
number.setNationalNumber(1234567);
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
// There are *no* fixed-line OR mobile numbers for this country calling code
// at all, so we return INVALID_LENGTH.
number.setCountryCode(979);
number.setNationalNumber(123456789);
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.PREMIUM_RATE));
}
function testIsPossibleNumberForTypeWithReason_FixedLineOrMobile() {
var VR = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
var PNT = i18n.phonenumbers.PhoneNumberType;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
// For FIXED_LINE_OR_MOBILE, a number should be considered valid if it matches
// the possible lengths for mobile *or* fixed-line numbers.
number.setCountryCode(290);
number.setNationalNumber(1234);
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
number.setNationalNumber(12345);
assertEquals(
VR.TOO_SHORT,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.INVALID_LENGTH,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
number.setNationalNumber(123456);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
number.setNationalNumber(1234567);
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.FIXED_LINE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.MOBILE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
// 8-digit numbers are possible for toll-free and premium-rate numbers only.
number.setNationalNumber(12345678);
assertEquals(
VR.IS_POSSIBLE,
phoneUtil.isPossibleNumberForTypeWithReason(number, PNT.TOLL_FREE));
assertEquals(
VR.TOO_LONG,
phoneUtil.isPossibleNumberForTypeWithReason(
number, PNT.FIXED_LINE_OR_MOBILE));
}
function testIsNotPossibleNumber() {
assertFalse(phoneUtil.isPossibleNumber(US_LONG_NUMBER));
assertFalse(phoneUtil.isPossibleNumber(INTERNATIONAL_TOLL_FREE_TOO_LONG));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(1);
number.setNationalNumber(253000);
assertFalse(phoneUtil.isPossibleNumber(number));
number = new i18n.phonenumbers.PhoneNumber();
number.setCountryCode(44);
number.setNationalNumber(300);
assertFalse(phoneUtil.isPossibleNumber(number));
assertFalse(
phoneUtil.isPossibleNumberString('+1 650 253 00000', RegionCode.US));
assertFalse(
phoneUtil.isPossibleNumberString('(650) 253-00000', RegionCode.US));
assertFalse(
phoneUtil.isPossibleNumberString('I want a Pizza', RegionCode.US));
assertFalse(phoneUtil.isPossibleNumberString('253-000', RegionCode.US));
assertFalse(phoneUtil.isPossibleNumberString('1 3000', RegionCode.GB));
assertFalse(phoneUtil.isPossibleNumberString('+44 300', RegionCode.GB));
assertFalse(
phoneUtil.isPossibleNumberString('+800 1234 5678 9', RegionCode.UN001));
}
function testTruncateTooLongNumber() {
// GB number 080 1234 5678, but entered with 4 extra digits at the end.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var tooLongNumber = new i18n.phonenumbers.PhoneNumber();
tooLongNumber.setCountryCode(44);
tooLongNumber.setNationalNumber(80123456780123);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var validNumber = new i18n.phonenumbers.PhoneNumber();
validNumber.setCountryCode(44);
validNumber.setNationalNumber(8012345678);
assertTrue(phoneUtil.truncateTooLongNumber(tooLongNumber));
assertTrue(validNumber.equals(tooLongNumber));
// IT number 022 3456 7890, but entered with 3 extra digits at the end.
tooLongNumber = new i18n.phonenumbers.PhoneNumber();
tooLongNumber.setCountryCode(39);
tooLongNumber.setNationalNumber(2234567890123);
tooLongNumber.setItalianLeadingZero(true);
validNumber = new i18n.phonenumbers.PhoneNumber();
validNumber.setCountryCode(39);
validNumber.setNationalNumber(2234567890);
validNumber.setItalianLeadingZero(true);
assertTrue(phoneUtil.truncateTooLongNumber(tooLongNumber));
assertTrue(validNumber.equals(tooLongNumber));
// US number 650-253-0000, but entered with one additional digit at the end.
tooLongNumber = US_LONG_NUMBER.clone();
assertTrue(phoneUtil.truncateTooLongNumber(tooLongNumber));
assertTrue(US_NUMBER.equals(tooLongNumber));
tooLongNumber = INTERNATIONAL_TOLL_FREE_TOO_LONG.clone();
assertTrue(phoneUtil.truncateTooLongNumber(tooLongNumber));
assertTrue(INTERNATIONAL_TOLL_FREE.equals(tooLongNumber));
// Tests what happens when a valid number is passed in.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var validNumberCopy = validNumber.clone();
assertTrue(phoneUtil.truncateTooLongNumber(validNumber));
// Tests the number is not modified.
assertTrue(validNumber.equals(validNumberCopy));
// Tests what happens when a number with invalid prefix is passed in.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var numberWithInvalidPrefix = new i18n.phonenumbers.PhoneNumber();
// The test metadata says US numbers cannot have prefix 240.
numberWithInvalidPrefix.setCountryCode(1);
numberWithInvalidPrefix.setNationalNumber(2401234567);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var invalidNumberCopy = numberWithInvalidPrefix.clone();
assertFalse(phoneUtil.truncateTooLongNumber(numberWithInvalidPrefix));
// Tests the number is not modified.
assertTrue(numberWithInvalidPrefix.equals(invalidNumberCopy));
// Tests what happens when a too short number is passed in.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var tooShortNumber = new i18n.phonenumbers.PhoneNumber();
tooShortNumber.setCountryCode(1);
tooShortNumber.setNationalNumber(1234);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var tooShortNumberCopy = tooShortNumber.clone();
assertFalse(phoneUtil.truncateTooLongNumber(tooShortNumber));
// Tests the number is not modified.
assertTrue(tooShortNumber.equals(tooShortNumberCopy));
}
function testIsViablePhoneNumber() {
var isViable = i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber;
assertFalse(isViable('1'));
// Only one or two digits before strange non-possible punctuation.
assertFalse(isViable('1+1+1'));
assertFalse(isViable('80+0'));
// Two digits is viable.
assertTrue(isViable('00'));
assertTrue(isViable('111'));
// Alpha numbers.
assertTrue(isViable('0800-4-pizza'));
assertTrue(isViable('0800-4-PIZZA'));
// We need at least three digits before any alpha characters.
assertFalse(isViable('08-PIZZA'));
assertFalse(isViable('8-PIZZA'));
assertFalse(isViable('12. March'));
}
function testIsViablePhoneNumberNonAscii() {
var isViable = i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber;
// Only one or two digits before possible punctuation followed by more digits.
assertTrue(isViable('1\u300034'));
assertFalse(isViable('1\u30003+4'));
// Unicode variants of possible starting character and other allowed
// punctuation/digits.
assertTrue(isViable('\uFF081\uFF09\u30003456789'));
// Testing a leading + is okay.
assertTrue(isViable('+1\uFF09\u30003456789'));
}
function testExtractPossibleNumber() {
var extract = i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber;
// Removes preceding funky punctuation and letters but leaves the rest
// untouched.
assertEquals('0800-345-600', extract('Tel:0800-345-600'));
assertEquals('0800 FOR PIZZA', extract('Tel:0800 FOR PIZZA'));
// Should not remove plus sign
assertEquals('+800-345-600', extract('Tel:+800-345-600'));
// Should recognise wide digits as possible start values.
assertEquals('\uFF10\uFF12\uFF13', extract('\uFF10\uFF12\uFF13'));
// Dashes are not possible start values and should be removed.
assertEquals('\uFF11\uFF12\uFF13', extract('Num-\uFF11\uFF12\uFF13'));
// If not possible number present, return empty string.
assertEquals('', extract('Num-....'));
// Leading brackets are stripped - these are not used when parsing.
assertEquals('650) 253-0000', extract('(650) 253-0000'));
// Trailing non-alpha-numeric characters should be removed.
assertEquals('650) 253-0000', extract('(650) 253-0000..- ..'));
assertEquals('650) 253-0000', extract('(650) 253-0000.'));
// This case has a trailing RTL char.
assertEquals('650) 253-0000', extract('(650) 253-0000\u200F'));
}
function testMaybeStripNationalPrefix() {
/** @type {!i18n.phonenumbers.PhoneMetadata} */
var metadata = new i18n.phonenumbers.PhoneMetadata();
metadata.setNationalPrefixForParsing('34');
/** @type {!i18n.phonenumbers.PhoneNumberDesc} */
var generalDesc = new i18n.phonenumbers.PhoneNumberDesc();
generalDesc.setNationalNumberPattern('\\d{4,8}');
metadata.setGeneralDesc(generalDesc);
/** @type {!goog.string.StringBuffer} */
var numberToStrip = new goog.string.StringBuffer('34356778');
/** @type {string} */
var strippedNumber = '356778';
assertTrue(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, null));
assertEquals('Should have had national prefix stripped.',
strippedNumber, numberToStrip.toString());
// Retry stripping - now the number should not start with the national prefix,
// so no more stripping should occur.
assertFalse(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, null));
assertEquals('Should have had no change - no national prefix present.',
strippedNumber, numberToStrip.toString());
// Some countries have no national prefix. Repeat test with none specified.
metadata.setNationalPrefixForParsing('');
assertFalse(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, null));
assertEquals('Should not strip anything with empty national prefix.',
strippedNumber, numberToStrip.toString());
// If the resultant number doesn't match the national rule, it shouldn't be
// stripped.
metadata.setNationalPrefixForParsing('3');
numberToStrip = new goog.string.StringBuffer('3123');
strippedNumber = '3123';
assertFalse(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, null));
assertEquals('Should have had no change - after stripping, it would not ' +
'have matched the national rule.',
strippedNumber, numberToStrip.toString());
// Test extracting carrier selection code.
metadata.setNationalPrefixForParsing('0(81)?');
numberToStrip = new goog.string.StringBuffer('08122123456');
strippedNumber = '22123456';
/** @type {!goog.string.StringBuffer} */
var carrierCode = new goog.string.StringBuffer();
assertTrue(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, carrierCode));
assertEquals('81', carrierCode.toString());
assertEquals('Should have had national prefix and carrier code stripped.',
strippedNumber, numberToStrip.toString());
// If there was a transform rule, check it was applied.
metadata.setNationalPrefixTransformRule('5$15');
// Note that a capturing group is present here.
metadata.setNationalPrefixForParsing('0(\\d{2})');
numberToStrip = new goog.string.StringBuffer('031123');
/** @type {string} */
var transformedNumber = '5315123';
assertTrue(phoneUtil.maybeStripNationalPrefixAndCarrierCode(
numberToStrip, metadata, null));
assertEquals('Should transform the 031 to a 5315.',
transformedNumber, numberToStrip.toString());
}
function testMaybeStripInternationalPrefix() {
var CCS = i18n.phonenumbers.PhoneNumber.CountryCodeSource;
/** @type {string} */
var internationalPrefix = '00[39]';
/** @type {!goog.string.StringBuffer} */
var numberToStrip = new goog.string.StringBuffer('0034567700-3898003');
// Note the dash is removed as part of the normalization.
/** @type {!goog.string.StringBuffer} */
var strippedNumber = new goog.string.StringBuffer('45677003898003');
assertEquals(CCS.FROM_NUMBER_WITH_IDD,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
assertEquals('The number supplied was not stripped of its international ' +
'prefix.',
strippedNumber.toString(), numberToStrip.toString());
// Now the number no longer starts with an IDD prefix, so it should now report
// FROM_DEFAULT_COUNTRY.
assertEquals(CCS.FROM_DEFAULT_COUNTRY,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
numberToStrip = new goog.string.StringBuffer('00945677003898003');
assertEquals(CCS.FROM_NUMBER_WITH_IDD,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
assertEquals('The number supplied was not stripped of its international ' +
'prefix.',
strippedNumber.toString(), numberToStrip.toString());
// Test it works when the international prefix is broken up by spaces.
numberToStrip = new goog.string.StringBuffer('00 9 45677003898003');
assertEquals(CCS.FROM_NUMBER_WITH_IDD,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
assertEquals('The number supplied was not stripped of its international ' +
'prefix.',
strippedNumber.toString(), numberToStrip.toString());
// Now the number no longer starts with an IDD prefix, so it should now report
// FROM_DEFAULT_COUNTRY.
assertEquals(CCS.FROM_DEFAULT_COUNTRY,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
// Test the + symbol is also recognised and stripped.
numberToStrip = new goog.string.StringBuffer('+45677003898003');
strippedNumber = new goog.string.StringBuffer('45677003898003');
assertEquals(CCS.FROM_NUMBER_WITH_PLUS_SIGN,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
assertEquals('The number supplied was not stripped of the plus symbol.',
strippedNumber.toString(), numberToStrip.toString());
// If the number afterwards is a zero, we should not strip this - no country
// calling code begins with 0.
numberToStrip = new goog.string.StringBuffer('0090112-3123');
strippedNumber = new goog.string.StringBuffer('00901123123');
assertEquals(CCS.FROM_DEFAULT_COUNTRY,
phoneUtil.maybeStripInternationalPrefixAndNormalize(
numberToStrip, internationalPrefix));
assertEquals('The number supplied had a 0 after the match so should not be ' +
'stripped.',
strippedNumber.toString(), numberToStrip.toString());
// Here the 0 is separated by a space from the IDD.
numberToStrip = new goog.string.StringBuffer('009 0-112-3123');
assertEquals(CCS.FROM_DEFAULT_COUNTRY,
phoneUtil.maybeStripInternationalPrefixAndNormalize(numberToStrip,
internationalPrefix));
}
function testMaybeExtractCountryCode() {
var CCS = i18n.phonenumbers.PhoneNumber.CountryCodeSource;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var number = new i18n.phonenumbers.PhoneNumber();
/** @type {i18n.phonenumbers.PhoneMetadata} */
var metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
// Note that for the US, the IDD is 011.
try {
/** @type {string} */
var phoneNumber = '011112-3456789';
/** @type {string} */
var strippedNumber = '123456789';
/** @type {number} */
var countryCallingCode = 1;
/** @type {!goog.string.StringBuffer} */
var numberToFill = new goog.string.StringBuffer();
assertEquals('Did not extract country calling code ' + countryCallingCode +
' correctly.',
countryCallingCode,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_NUMBER_WITH_IDD,
number.getCountryCodeSource());
// Should strip and normalize national significant number.
assertEquals('Did not strip off the country calling code correctly.',
strippedNumber,
numberToFill.toString());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '+6423456789';
countryCallingCode = 64;
numberToFill = new goog.string.StringBuffer();
assertEquals('Did not extract country calling code ' + countryCallingCode +
' correctly.',
countryCallingCode,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_NUMBER_WITH_PLUS_SIGN,
number.getCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '+80012345678';
countryCallingCode = 800;
numberToFill = new goog.string.StringBuffer();
assertEquals('Did not extract country calling code ' + countryCallingCode +
' correctly.',
countryCallingCode,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_NUMBER_WITH_PLUS_SIGN,
number.getCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '2345-6789';
numberToFill = new goog.string.StringBuffer();
assertEquals('Should not have extracted a country calling code - ' +
'no international prefix present.',
0,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_DEFAULT_COUNTRY,
number.getCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '0119991123456789';
numberToFill = new goog.string.StringBuffer();
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number);
fail('Should have thrown an exception, no valid country calling code ' +
'present.');
} catch (e) {
// Expected.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '(1 610) 619 4466';
countryCallingCode = 1;
numberToFill = new goog.string.StringBuffer();
assertEquals('Should have extracted the country calling code of the ' +
'region passed in',
countryCallingCode,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_NUMBER_WITHOUT_PLUS_SIGN,
number.getCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '(1 610) 619 4466';
countryCallingCode = 1;
numberToFill = new goog.string.StringBuffer();
assertEquals('Should have extracted the country calling code of the ' +
'region passed in',
countryCallingCode,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, false,
number));
assertFalse('Should not contain CountryCodeSource.',
number.hasCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '(1 610) 619 446';
numberToFill = new goog.string.StringBuffer();
assertEquals('Should not have extracted a country calling code - invalid ' +
'number after extraction of uncertain country calling code.',
0,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, false,
number));
assertFalse('Should not contain CountryCodeSource.',
number.hasCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
number = new i18n.phonenumbers.PhoneNumber();
try {
phoneNumber = '(1 610) 619';
numberToFill = new goog.string.StringBuffer();
assertEquals('Should not have extracted a country calling code - too ' +
'short number both before and after extraction of uncertain ' +
'country calling code.',
0,
phoneUtil.maybeExtractCountryCode(phoneNumber, metadata,
numberToFill, true, number));
assertEquals('Did not figure out CountryCodeSource correctly',
CCS.FROM_DEFAULT_COUNTRY,
number.getCountryCodeSource());
} catch (e) {
fail('Should not have thrown an exception: ' + e.toString());
}
}
function testParseNationalNumber() {
// National prefix attached.
assertTrue(NZ_NUMBER.equals(phoneUtil.parse('033316005', RegionCode.NZ)));
// Some fields are not filled in by parse, but only by parseAndKeepRawInput.
assertFalse(NZ_NUMBER.hasCountryCodeSource());
assertNull(NZ_NUMBER.getCountryCodeSource());
assertEquals(i18n.phonenumbers.PhoneNumber.CountryCodeSource.UNSPECIFIED,
NZ_NUMBER.getCountryCodeSourceOrDefault());
assertTrue(NZ_NUMBER.equals(phoneUtil.parse('33316005', RegionCode.NZ)));
// National prefix attached and some formatting present.
assertTrue(NZ_NUMBER.equals(phoneUtil.parse('03-331 6005', RegionCode.NZ)));
assertTrue(NZ_NUMBER.equals(phoneUtil.parse('03 331 6005', RegionCode.NZ)));
// Test parsing RFC3966 format with a phone context.
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:03-331-6005;phone-context=+64', RegionCode.NZ)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:331-6005;phone-context=+64-3', RegionCode.NZ)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:331-6005;phone-context=+64-3', RegionCode.US)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('My number is tel:03-331-6005;phone-context=+64',
RegionCode.NZ)));
// Test parsing RFC3966 format with optional user-defined parameters. The
// parameters will appear after the context if present.
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:03-331-6005;phone-context=+64;a=%A1',
RegionCode.NZ)));
// Test parsing RFC3966 with an ISDN subaddress.
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:03-331-6005;isub=12345;phone-context=+64',
RegionCode.NZ)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:+64-3-331-6005;isub=12345', RegionCode.NZ)));
// Test parsing RFC3966 with "tel:" missing.
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('03-331-6005;phone-context=+64', RegionCode.NZ)));
// Testing international prefixes.
// Should strip country calling code.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('0064 3 331 6005', RegionCode.NZ)));
// Try again, but this time we have an international number with Region Code
// US. It should recognise the country calling code and parse accordingly.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('01164 3 331 6005', RegionCode.US)));
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+64 3 331 6005', RegionCode.US)));
// We should ignore the leading plus here, since it is not followed by a valid
// country code but instead is followed by the IDD for the US.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+01164 3 331 6005', RegionCode.US)));
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+0064 3 331 6005', RegionCode.NZ)));
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+ 00 64 3 331 6005', RegionCode.NZ)));
assertTrue(US_LOCAL_NUMBER.equals(
phoneUtil.parse('tel:253-0000;phone-context=www.google.com',
RegionCode.US)));
assertTrue(US_LOCAL_NUMBER.equals(
phoneUtil.parse('tel:253-0000;isub=12345;phone-context=www.google.com',
RegionCode.US)));
// This is invalid because no "+" sign is present as part of phone-context.
// The phone context is simply ignored in this case just as if it contains a
// domain.
assertTrue(US_LOCAL_NUMBER.equals(
phoneUtil.parse('tel:2530000;isub=12345;phone-context=1-650',
RegionCode.US)));
assertTrue(US_LOCAL_NUMBER.equals(
phoneUtil.parse('tel:2530000;isub=12345;phone-context=1234.com',
RegionCode.US)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumber = new i18n.phonenumbers.PhoneNumber();
nzNumber.setCountryCode(64);
nzNumber.setNationalNumber(64123456);
assertTrue(nzNumber.equals(phoneUtil.parse('64(0)64123456', RegionCode.NZ)));
// Check that using a '/' is fine in a phone number.
assertTrue(DE_NUMBER.equals(phoneUtil.parse('301/23456', RegionCode.DE)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usNumber = new i18n.phonenumbers.PhoneNumber();
// Check it doesn't use the '1' as a country calling code when parsing if the
// phone number was already possible.
usNumber.setCountryCode(1);
usNumber.setNationalNumber(1234567890);
assertTrue(usNumber.equals(phoneUtil.parse('123-456-7890', RegionCode.US)));
// Test star numbers. Although this is not strictly valid, we would like to
// make sure we can parse the output we produce when formatting the number.
assertTrue(
JP_STAR_NUMBER.equals(phoneUtil.parse('+81 *2345', RegionCode.JP)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var shortNumber = new i18n.phonenumbers.PhoneNumber();
shortNumber.setCountryCode(64);
shortNumber.setNationalNumber(12);
assertTrue(shortNumber.equals(phoneUtil.parse('12', RegionCode.NZ)));
// Test for short-code with leading zero for a country which has 0 as
// national prefix. Ensure it's not interpreted as national prefix if the
// remaining number length is local-only in terms of length. Example: In GB,
// length 6-7 are only possible local-only.
shortNumber.setCountryCode(44);
shortNumber.setNationalNumber(123456);
shortNumber.setItalianLeadingZero(true);
assertTrue(shortNumber.equals(phoneUtil.parse('0123456', RegionCode.GB)));
}
function testParseNumberWithAlphaCharacters() {
// Test case with alpha characters.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var tollfreeNumber = new i18n.phonenumbers.PhoneNumber();
tollfreeNumber.setCountryCode(64);
tollfreeNumber.setNationalNumber(800332005);
assertTrue(tollfreeNumber.equals(
phoneUtil.parse('0800 DDA 005', RegionCode.NZ)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var premiumNumber = new i18n.phonenumbers.PhoneNumber();
premiumNumber.setCountryCode(64);
premiumNumber.setNationalNumber(9003326005);
assertTrue(premiumNumber.equals(
phoneUtil.parse('0900 DDA 6005', RegionCode.NZ)));
// Not enough alpha characters for them to be considered intentional, so they
// are stripped.
assertTrue(premiumNumber.equals(
phoneUtil.parse('0900 332 6005a', RegionCode.NZ)));
assertTrue(premiumNumber.equals(
phoneUtil.parse('0900 332 600a5', RegionCode.NZ)));
assertTrue(premiumNumber.equals(
phoneUtil.parse('0900 332 600A5', RegionCode.NZ)));
assertTrue(premiumNumber.equals(
phoneUtil.parse('0900 a332 600A5', RegionCode.NZ)));
}
function testParseMaliciousInput() {
// Lots of leading + signs before the possible number.
/** @type {!goog.string.StringBuffer} */
var maliciousNumber = new goog.string.StringBuffer();
for (var i = 0; i < 6000; i++) {
maliciousNumber.append('+');
}
maliciousNumber.append('12222-33-244 extensioB 343+');
try {
phoneUtil.parse(maliciousNumber.toString(), RegionCode.US);
fail('This should not parse without throwing an exception ' +
maliciousNumber.toString());
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_LONG,
e.message);
}
/** @type {!goog.string.StringBuffer} */
var maliciousNumberWithAlmostExt = new goog.string.StringBuffer();
for (i = 0; i < 350; i++) {
maliciousNumberWithAlmostExt.append('200');
}
maliciousNumberWithAlmostExt.append(' extensiOB 345');
try {
phoneUtil.parse(maliciousNumberWithAlmostExt.toString(), RegionCode.US);
fail('This should not parse without throwing an exception ' +
maliciousNumberWithAlmostExt.toString());
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_LONG,
e.message);
}
}
function testParseWithInternationalPrefixes() {
assertTrue(US_NUMBER.equals(
phoneUtil.parse('+1 (650) 253-0000', RegionCode.NZ)));
assertTrue(INTERNATIONAL_TOLL_FREE.equals(
phoneUtil.parse('011 800 1234 5678', RegionCode.US)));
assertTrue(US_NUMBER.equals(
phoneUtil.parse('1-650-253-0000', RegionCode.US)));
// Calling the US number from Singapore by using different service providers
// 1st test: calling using SingTel IDD service (IDD is 001)
assertTrue(US_NUMBER.equals(
phoneUtil.parse('0011-650-253-0000', RegionCode.SG)));
// 2nd test: calling using StarHub IDD service (IDD is 008)
assertTrue(US_NUMBER.equals(
phoneUtil.parse('0081-650-253-0000', RegionCode.SG)));
// 3rd test: calling using SingTel V019 service (IDD is 019)
assertTrue(US_NUMBER.equals(
phoneUtil.parse('0191-650-253-0000', RegionCode.SG)));
// Calling the US number from Poland
assertTrue(US_NUMBER.equals(
phoneUtil.parse('0~01-650-253-0000', RegionCode.PL)));
// Using '++' at the start.
assertTrue(US_NUMBER.equals(
phoneUtil.parse('++1 (650) 253-0000', RegionCode.PL)));
}
function testParseNonAscii() {
// Using a full-width plus sign.
assertTrue(US_NUMBER.equals(
phoneUtil.parse('\uFF0B1 (650) 253-0000', RegionCode.SG)));
// Using a soft hyphen U+00AD.
assertTrue(US_NUMBER.equals(
phoneUtil.parse('1 (650) 253\u00AD-0000', RegionCode.US)));
// The whole number, including punctuation, is here represented in full-width
// form.
assertTrue(US_NUMBER.equals(
phoneUtil.parse('\uFF0B\uFF11\u3000\uFF08\uFF16\uFF15\uFF10\uFF09' +
'\u3000\uFF12\uFF15\uFF13\uFF0D\uFF10\uFF10\uFF10\uFF10',
RegionCode.SG)));
// Using U+30FC dash instead.
assertTrue(US_NUMBER.equals(
phoneUtil.parse('\uFF0B\uFF11\u3000\uFF08\uFF16\uFF15\uFF10\uFF09' +
'\u3000\uFF12\uFF15\uFF13\u30FC\uFF10\uFF10\uFF10\uFF10',
RegionCode.SG)));
// Using a very strange decimal digit range (Mongolian digits).
// TODO(user): Support Mongolian digits
// assertTrue(US_NUMBER.equals(
// phoneUtil.parse('\u1811 \u1816\u1815\u1810 ' +
// '\u1812\u1815\u1813 \u1810\u1810\u1810\u1810',
// RegionCode.US)));
}
function testParseWithLeadingZero() {
assertTrue(
IT_NUMBER.equals(phoneUtil.parse('+39 02-36618 300', RegionCode.NZ)));
assertTrue(
IT_NUMBER.equals(phoneUtil.parse('02-36618 300', RegionCode.IT)));
assertTrue(
IT_MOBILE.equals(phoneUtil.parse('345 678 901', RegionCode.IT)));
}
function testParseNationalNumberArgentina() {
// Test parsing mobile numbers of Argentina.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var arNumber = new i18n.phonenumbers.PhoneNumber();
arNumber.setCountryCode(54);
arNumber.setNationalNumber(93435551212);
assertTrue(
arNumber.equals(phoneUtil.parse('+54 9 343 555 1212', RegionCode.AR)));
assertTrue(
arNumber.equals(phoneUtil.parse('0343 15 555 1212', RegionCode.AR)));
arNumber = new i18n.phonenumbers.PhoneNumber();
arNumber.setCountryCode(54);
arNumber.setNationalNumber(93715654320);
assertTrue(
arNumber.equals(phoneUtil.parse('+54 9 3715 65 4320', RegionCode.AR)));
assertTrue(
arNumber.equals(phoneUtil.parse('03715 15 65 4320', RegionCode.AR)));
assertTrue(
AR_MOBILE.equals(phoneUtil.parse('911 876 54321', RegionCode.AR)));
// Test parsing fixed-line numbers of Argentina.
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('+54 11 8765 4321', RegionCode.AR)));
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('011 8765 4321', RegionCode.AR)));
arNumber = new i18n.phonenumbers.PhoneNumber();
arNumber.setCountryCode(54);
arNumber.setNationalNumber(3715654321);
assertTrue(
arNumber.equals(phoneUtil.parse('+54 3715 65 4321', RegionCode.AR)));
assertTrue(
arNumber.equals(phoneUtil.parse('03715 65 4321', RegionCode.AR)));
arNumber = new i18n.phonenumbers.PhoneNumber();
arNumber.setCountryCode(54);
arNumber.setNationalNumber(2312340000);
assertTrue(
arNumber.equals(phoneUtil.parse('+54 23 1234 0000', RegionCode.AR)));
assertTrue(
arNumber.equals(phoneUtil.parse('023 1234 0000', RegionCode.AR)));
}
function testParseWithXInNumber() {
// Test that having an 'x' in the phone number at the start is ok and that it
// just gets removed.
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('01187654321', RegionCode.AR)));
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('(0) 1187654321', RegionCode.AR)));
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('0 1187654321', RegionCode.AR)));
assertTrue(
AR_NUMBER.equals(phoneUtil.parse('(0xx) 1187654321', RegionCode.AR)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var arFromUs = new i18n.phonenumbers.PhoneNumber();
arFromUs.setCountryCode(54);
arFromUs.setNationalNumber(81429712);
// This test is intentionally constructed such that the number of digit after
// xx is larger than 7, so that the number won't be mistakenly treated as an
// extension, as we allow extensions up to 7 digits. This assumption is okay
// for now as all the countries where a carrier selection code is written in
// the form of xx have a national significant number of length larger than 7.
assertTrue(
arFromUs.equals(phoneUtil.parse('011xx5481429712', RegionCode.US)));
}
function testParseNumbersMexico() {
// Test parsing fixed-line numbers of Mexico.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var mxNumber = new i18n.phonenumbers.PhoneNumber();
mxNumber.setCountryCode(52);
mxNumber.setNationalNumber(4499780001);
assertTrue(mxNumber.equals(
phoneUtil.parse('+52 (449)978-0001', RegionCode.MX)));
assertTrue(
mxNumber.equals(phoneUtil.parse('01 (449)978-0001', RegionCode.MX)));
assertTrue(
mxNumber.equals(phoneUtil.parse('(449)978-0001', RegionCode.MX)));
// Test parsing mobile numbers of Mexico.
mxNumber = new i18n.phonenumbers.PhoneNumber();
mxNumber.setCountryCode(52);
mxNumber.setNationalNumber(13312345678);
assertTrue(mxNumber.equals(
phoneUtil.parse('+52 1 33 1234-5678', RegionCode.MX)));
assertTrue(mxNumber.equals(
phoneUtil.parse('044 (33) 1234-5678', RegionCode.MX)));
assertTrue(mxNumber.equals(
phoneUtil.parse('045 33 1234-5678', RegionCode.MX)));
}
function testFailedParseOnInvalidNumbers() {
try {
/** @type {string} */
var sentencePhoneNumber = 'This is not a phone number';
phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
fail('This should not parse without throwing an exception ' +
sentencePhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
sentencePhoneNumber = '1 Still not a number';
phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
fail('This should not parse without throwing an exception ' +
sentencePhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
sentencePhoneNumber = '1 MICROSOFT';
phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
fail('This should not parse without throwing an exception ' +
sentencePhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
sentencePhoneNumber = '12 MICROSOFT';
phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
fail('This should not parse without throwing an exception ' +
sentencePhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
/** @type {string} */
var tooLongPhoneNumber = '01495 72553301873 810104';
phoneUtil.parse(tooLongPhoneNumber, RegionCode.GB);
fail('This should not parse without throwing an exception ' +
tooLongPhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_LONG,
e.message);
}
try {
/** @type {string} */
var plusMinusPhoneNumber = '+---';
phoneUtil.parse(plusMinusPhoneNumber, RegionCode.DE);
fail('This should not parse without throwing an exception ' +
plusMinusPhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
/** @type {string} */
var plusStar = '+***';
phoneUtil.parse(plusStar, RegionCode.DE);
fail('This should not parse without throwing an exception ' + plusStar);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
/** @type {string} */
var plusStarPhoneNumber = '+*******91';
phoneUtil.parse(plusStarPhoneNumber, RegionCode.DE);
fail('This should not parse without throwing an exception ' +
plusStarPhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
/** @type {string} */
var tooShortPhoneNumber = '+49 0';
phoneUtil.parse(tooShortPhoneNumber, RegionCode.DE);
fail('This should not parse without throwing an exception ' +
tooShortPhoneNumber);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_SHORT_NSN,
e.message);
}
try {
/** @type {string} */
var invalidCountryCode = '+210 3456 56789';
phoneUtil.parse(invalidCountryCode, RegionCode.NZ);
fail('This is not a recognised region code: should fail: ' +
invalidCountryCode);
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
/** @type {string} */
var plusAndIddAndInvalidCountryCode = '+ 00 210 3 331 6005';
phoneUtil.parse(plusAndIddAndInvalidCountryCode, RegionCode.NZ);
fail('This should not parse without throwing an exception.');
} catch (e) {
// Expected this exception. 00 is a correct IDD, but 210 is not a valid
// country code.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
/** @type {string} */
var someNumber = '123 456 7890';
phoneUtil.parse(someNumber, RegionCode.ZZ);
fail('Unknown region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
someNumber = '123 456 7890';
phoneUtil.parse(someNumber, RegionCode.CS);
fail('Deprecated region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
someNumber = '123 456 7890';
phoneUtil.parse(someNumber, null);
fail('Null region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
someNumber = '0044------';
phoneUtil.parse(someNumber, RegionCode.GB);
fail('No number provided, only region code: should fail');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD,
e.message);
}
try {
someNumber = '0044';
phoneUtil.parse(someNumber, RegionCode.GB);
fail('No number provided, only region code: should fail');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD,
e.message);
}
try {
someNumber = '011';
phoneUtil.parse(someNumber, RegionCode.US);
fail('Only IDD provided - should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD,
e.message);
}
try {
someNumber = '0119';
phoneUtil.parse(someNumber, RegionCode.US);
fail('Only IDD provided and then 9 - should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD,
e.message);
}
try {
/** @type {string} */
var emptyNumber = '';
// Invalid region.
phoneUtil.parse(emptyNumber, RegionCode.ZZ);
fail('Empty string - should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
// Invalid region.
phoneUtil.parse(null, RegionCode.ZZ);
fail('Null string - should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
phoneUtil.parse(null, RegionCode.US);
fail('Null string - should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
try {
/** @type {string} */
var domainRfcPhoneContext = 'tel:555-1234;phone-context=www.google.com';
phoneUtil.parse(domainRfcPhoneContext, RegionCode.ZZ);
fail('"Unknown" region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
// This is invalid because no '+' sign is present as part of phone-context.
// This should not succeed in being parsed.
/** @type {string} */
var invalidRfcPhoneContext = 'tel:555-1234;phone-context=1-331';
phoneUtil.parse(invalidRfcPhoneContext, RegionCode.ZZ);
fail('"Unknown" region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
try {
// Only the phone-context symbol is present, but no data.
invalidRfcPhoneContext = ';phone-context=';
phoneUtil.parse(invalidRfcPhoneContext, RegionCode.ZZ);
fail('Should have thrown an exception, no valid country calling code ' +
'present.');
} catch (e) {
// Expected.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.NOT_A_NUMBER,
e.message);
}
}
function testParseNumbersWithPlusWithNoRegion() {
// RegionCode.ZZ is allowed only if the number starts with a '+' - then the
// country calling code can be calculated.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+64 3 331 6005', RegionCode.ZZ)));
// Test with full-width plus.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('\uFF0B64 3 331 6005', RegionCode.ZZ)));
// Test with normal plus but leading characters that need to be stripped.
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('Tel: +64 3 331 6005', RegionCode.ZZ)));
assertTrue(
NZ_NUMBER.equals(phoneUtil.parse('+64 3 331 6005', null)));
assertTrue(
INTERNATIONAL_TOLL_FREE.equals(phoneUtil.parse('+800 1234 5678', null)));
assertTrue(
UNIVERSAL_PREMIUM_RATE.equals(phoneUtil.parse('+979 123 456 789', null)));
// Test parsing RFC3966 format with a phone context.
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:03-331-6005;phone-context=+64', RegionCode.ZZ)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse(' tel:03-331-6005;phone-context=+64', RegionCode.ZZ)));
assertTrue(NZ_NUMBER.equals(
phoneUtil.parse('tel:03-331-6005;isub=12345;phone-context=+64',
RegionCode.ZZ)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberWithRawInput = NZ_NUMBER.clone();
nzNumberWithRawInput.setRawInput('+64 3 331 6005');
nzNumberWithRawInput.setCountryCodeSource(i18n.phonenumbers.PhoneNumber
.CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN);
assertTrue(nzNumberWithRawInput.equals(
phoneUtil.parseAndKeepRawInput('+64 3 331 6005', RegionCode.ZZ)));
// Null is also allowed for the region code in these cases.
assertTrue(nzNumberWithRawInput.equals(
phoneUtil.parseAndKeepRawInput('+64 3 331 6005', null)));
}
function testParseNumberTooShortIfNationalPrefixStripped() {
// Test that a number whose first digits happen to coincide with the national
// prefix does not get them stripped if doing so would result in a number too
// short to be a possible (regular length) phone number for that region.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var byNumber = new i18n.phonenumbers.PhoneNumber();
byNumber.setCountryCode(375);
byNumber.setNationalNumber(8123);
assertTrue(byNumber.equals(phoneUtil.parse('8123', RegionCode.BY)));
byNumber.setNationalNumber(81234);
assertTrue(byNumber.equals(phoneUtil.parse('81234', RegionCode.BY)));
// The prefix doesn't get stripped, since the input is a viable 6-digit
// number, whereas the result of stripping is only 5 digits.
byNumber.setNationalNumber(812345);
assertTrue(byNumber.equals(phoneUtil.parse('812345', RegionCode.BY)));
// The prefix gets stripped, since only 6-digit numbers are possible.
byNumber.setNationalNumber(123456);
assertTrue(byNumber.equals(phoneUtil.parse('8123456', RegionCode.BY)));
}
function testParseExtensions() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumber = new i18n.phonenumbers.PhoneNumber();
nzNumber.setCountryCode(64);
nzNumber.setNationalNumber(33316005);
nzNumber.setExtension('3456');
assertTrue(nzNumber.equals(
phoneUtil.parse('03 331 6005 ext 3456', RegionCode.NZ)));
assertTrue(nzNumber.equals(
phoneUtil.parse('03-3316005x3456', RegionCode.NZ)));
assertTrue(nzNumber.equals(
phoneUtil.parse('03-3316005 int.3456', RegionCode.NZ)));
assertTrue(nzNumber.equals(
phoneUtil.parse('03 3316005 #3456', RegionCode.NZ)));
// Test the following do not extract extensions:
assertTrue(ALPHA_NUMERIC_NUMBER.equals(
phoneUtil.parse('1800 six-flags', RegionCode.US)));
assertTrue(ALPHA_NUMERIC_NUMBER.equals(
phoneUtil.parse('1800 SIX FLAGS', RegionCode.US)));
assertTrue(ALPHA_NUMERIC_NUMBER.equals(
phoneUtil.parse('0~0 1800 7493 5247', RegionCode.PL)));
assertTrue(ALPHA_NUMERIC_NUMBER.equals(
phoneUtil.parse('(1800) 7493.5247', RegionCode.US)));
// Check that the last instance of an extension token is matched.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var extnNumber = ALPHA_NUMERIC_NUMBER.clone();
extnNumber.setExtension('1234');
assertTrue(extnNumber.equals(
phoneUtil.parse('0~0 1800 7493 5247 ~1234', RegionCode.PL)));
// Verifying bug-fix where the last digit of a number was previously omitted
// if it was a 0 when extracting the extension. Also verifying a few different
// cases of extensions.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var ukNumber = new i18n.phonenumbers.PhoneNumber();
ukNumber.setCountryCode(44);
ukNumber.setNationalNumber(2034567890);
ukNumber.setExtension('456');
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890x456', RegionCode.NZ)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890x456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 x456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 X456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 x 456 ', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('+44-2034567890;ext=456', RegionCode.GB)));
assertTrue(ukNumber.equals(
phoneUtil.parse('tel:2034567890;ext=456;phone-context=+44',
RegionCode.ZZ)));
// Full-width extension, 'extn' only.
assertTrue(ukNumber.equals(
phoneUtil.parse('+442034567890\uFF45\uFF58\uFF54\uFF4E456',
RegionCode.GB)));
// 'xtn' only.
assertTrue(ukNumber.equals(
phoneUtil.parse('+442034567890\uFF58\uFF54\uFF4E456', RegionCode.GB)));
// 'xt' only.
assertTrue(ukNumber.equals(
phoneUtil.parse('+442034567890\uFF58\uFF54456', RegionCode.GB)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usWithExtension = new i18n.phonenumbers.PhoneNumber();
usWithExtension.setCountryCode(1);
usWithExtension.setNationalNumber(8009013355);
usWithExtension.setExtension('7246433');
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 x 7246433', RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 , ext 7246433', RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 ; 7246433', RegionCode.US)));
// To test an extension character without surrounding spaces.
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355;7246433', RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 ,extension 7246433', RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 ,extensi\u00F3n 7246433',
RegionCode.US)));
// Repeat with the small letter o with acute accent created by combining
// characters.
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 ,extensio\u0301n 7246433',
RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 , 7246433', RegionCode.US)));
assertTrue(usWithExtension.equals(
phoneUtil.parse('(800) 901-3355 ext: 7246433', RegionCode.US)));
// Testing Russian extension "доб" with variants found online.
var ruWithExtension = new i18n.phonenumbers.PhoneNumber();
ruWithExtension.setCountryCode(7);
ruWithExtension.setNationalNumber(4232022511);
ruWithExtension.setExtension('100');
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11, доб. 100', RegionCode.RU)));
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11 доб. 100', RegionCode.RU)));
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11, доб 100', RegionCode.RU)));
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11 доб 100', RegionCode.RU)));
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11доб100', RegionCode.RU)));
// Testing in unicode format
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11, \u0434\u043E\u0431. 100',
RegionCode.RU)));
// In upper case
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11ДОБ100', RegionCode.RU)));
assertTrue(ruWithExtension.equals(
phoneUtil.parse('8 (423) 202-25-11\u0414\u041E\u0411100', RegionCode.RU)));
// Test that if a number has two extensions specified, we ignore the second.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var usWithTwoExtensionsNumber = new i18n.phonenumbers.PhoneNumber();
usWithTwoExtensionsNumber.setCountryCode(1);
usWithTwoExtensionsNumber.setNationalNumber(2121231234);
usWithTwoExtensionsNumber.setExtension('508');
assertTrue(usWithTwoExtensionsNumber.equals(
phoneUtil.parse('(212)123-1234 x508/x1234', RegionCode.US)));
assertTrue(usWithTwoExtensionsNumber.equals(
phoneUtil.parse('(212)123-1234 x508/ x1234', RegionCode.US)));
assertTrue(usWithTwoExtensionsNumber.equals(
phoneUtil.parse('(212)123-1234 x508\\x1234', RegionCode.US)));
// Test parsing numbers in the form (645) 123-1234-910# works, where the last
// 3 digits before the # are an extension.
usWithExtension = new i18n.phonenumbers.PhoneNumber();
usWithExtension.setCountryCode(1);
usWithExtension.setNationalNumber(6451231234);
usWithExtension.setExtension('910');
assertTrue(usWithExtension.equals(
phoneUtil.parse('+1 (645) 123 1234-910#', RegionCode.US)));
// Retry with the same number in a slightly different format.
assertTrue(usWithExtension.equals(
phoneUtil.parse('+1 (645) 123 1234 ext. 910#', RegionCode.US)));
}
function testParseAndKeepRaw() {
var CCS = i18n.phonenumbers.PhoneNumber.CountryCodeSource;
/** @type {!i18n.phonenumbers.PhoneNumber} */
var alphaNumericNumber = ALPHA_NUMERIC_NUMBER.clone();
alphaNumericNumber.setRawInput('800 six-flags');
alphaNumericNumber.setCountryCodeSource(CCS.FROM_DEFAULT_COUNTRY);
assertTrue(alphaNumericNumber.equals(
phoneUtil.parseAndKeepRawInput('800 six-flags', RegionCode.US)));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var shorterAlphaNumber = new i18n.phonenumbers.PhoneNumber();
shorterAlphaNumber.setCountryCode(1);
shorterAlphaNumber.setNationalNumber(8007493524);
shorterAlphaNumber.setRawInput('1800 six-flag');
shorterAlphaNumber.setCountryCodeSource(CCS.FROM_NUMBER_WITHOUT_PLUS_SIGN);
assertTrue(shorterAlphaNumber.equals(
phoneUtil.parseAndKeepRawInput('1800 six-flag', RegionCode.US)));
shorterAlphaNumber.setRawInput('+1800 six-flag');
shorterAlphaNumber.setCountryCodeSource(CCS.FROM_NUMBER_WITH_PLUS_SIGN);
assertTrue(shorterAlphaNumber.equals(
phoneUtil.parseAndKeepRawInput('+1800 six-flag', RegionCode.NZ)));
alphaNumericNumber.setCountryCode(1);
alphaNumericNumber.setNationalNumber(8007493524);
alphaNumericNumber.setRawInput('001800 six-flag');
alphaNumericNumber.setCountryCodeSource(CCS.FROM_NUMBER_WITH_IDD);
assertTrue(alphaNumericNumber.equals(
phoneUtil.parseAndKeepRawInput('001800 six-flag', RegionCode.NZ)));
// Invalid region code supplied.
try {
phoneUtil.parseAndKeepRawInput('123 456 7890', RegionCode.CS);
fail('Deprecated region code not allowed: should fail.');
} catch (e) {
// Expected this exception.
assertEquals('Wrong error type stored in exception.',
i18n.phonenumbers.Error.INVALID_COUNTRY_CODE,
e.message);
}
/** @type {!i18n.phonenumbers.PhoneNumber} */
var koreanNumber = new i18n.phonenumbers.PhoneNumber();
koreanNumber.setCountryCode(82);
koreanNumber.setNationalNumber(22123456);
koreanNumber.setRawInput('08122123456');
koreanNumber.setCountryCodeSource(CCS.FROM_DEFAULT_COUNTRY);
koreanNumber.setPreferredDomesticCarrierCode('81');
assertTrue(koreanNumber.equals(
phoneUtil.parseAndKeepRawInput('08122123456', RegionCode.KR)));
}
function testParseItalianLeadingZeros() {
// Test the number "011".
/** @type {!i18n.phonenumbers.PhoneNumber} */
var oneZero = new i18n.phonenumbers.PhoneNumber();
oneZero.setCountryCode(61);
oneZero.setNationalNumber(11);
oneZero.setItalianLeadingZero(true);
assertTrue(oneZero.equals(phoneUtil.parse('011', RegionCode.AU)));
// Test the number "001".
/** @type {!i18n.phonenumbers.PhoneNumber} */
var twoZeros = new i18n.phonenumbers.PhoneNumber();
twoZeros.setCountryCode(61);
twoZeros.setNationalNumber(1);
twoZeros.setItalianLeadingZero(true);
twoZeros.setNumberOfLeadingZeros(2);
assertTrue(twoZeros.equals(phoneUtil.parse('001', RegionCode.AU)));
// Test the number "000". This number has 2 leading zeros.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var stillTwoZeros = new i18n.phonenumbers.PhoneNumber();
stillTwoZeros.setCountryCode(61);
stillTwoZeros.setNationalNumber(0);
stillTwoZeros.setItalianLeadingZero(true);
stillTwoZeros.setNumberOfLeadingZeros(2);
assertTrue(stillTwoZeros.equals(phoneUtil.parse('000', RegionCode.AU)));
// Test the number "0000". This number has 3 leading zeros.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var threeZeros = new i18n.phonenumbers.PhoneNumber();
threeZeros.setCountryCode(61);
threeZeros.setNationalNumber(0);
threeZeros.setItalianLeadingZero(true);
threeZeros.setNumberOfLeadingZeros(3);
assertTrue(threeZeros.equals(phoneUtil.parse('0000', RegionCode.AU)));
}
function testCountryWithNoNumberDesc() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
var PNT = i18n.phonenumbers.PhoneNumberType;
// Andorra is a country where we don't have PhoneNumberDesc info in the
// metadata.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var adNumber = new i18n.phonenumbers.PhoneNumber();
adNumber.setCountryCode(376);
adNumber.setNationalNumber(12345);
assertEquals('+376 12345', phoneUtil.format(adNumber, PNF.INTERNATIONAL));
assertEquals('+37612345', phoneUtil.format(adNumber, PNF.E164));
assertEquals('12345', phoneUtil.format(adNumber, PNF.NATIONAL));
assertEquals(PNT.UNKNOWN, phoneUtil.getNumberType(adNumber));
assertFalse(phoneUtil.isValidNumber(adNumber));
// Test dialing a US number from within Andorra.
assertEquals('00 1 650 253 0000',
phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER,
RegionCode.AD));
}
function testUnknownCountryCallingCode() {
var PNF = i18n.phonenumbers.PhoneNumberFormat;
assertFalse(phoneUtil.isValidNumber(UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT));
// It's not very well defined as to what the E164 representation for a number
// with an invalid country calling code is, but just prefixing the country
// code and national number is about the best we can do.
assertEquals('+212345',
phoneUtil.format(UNKNOWN_COUNTRY_CODE_NO_RAW_INPUT, PNF.E164));
}
function testIsNumberMatchMatches() {
// Test simple matches where formatting is different, or leading zeros, or
// country calling code has been specified.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var num1 = phoneUtil.parse('+64 3 331 6005', RegionCode.NZ);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var num2 = phoneUtil.parse('+64 03 331 6005', RegionCode.NZ);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(num1, num2));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 3 331 6005', '+64 03 331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+800 1234 5678', '+80012345678'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 03 331-6005', '+64 03331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+643 331-6005', '+64033316005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+643 331-6005', '+6433316005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '+6433316005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005',
'tel:+64-3-331-6005;isub=123'));
// Test alpha numbers.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+1800 siX-Flags', '+1 800 7493 5247'));
// Test numbers with extensions.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005 extn 1234',
'+6433316005#1234'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005 ext. 1234',
'+6433316005;1234'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch('+7 423 202-25-11 ext 100',
'+7 4232022511 доб. 100'));
// Test proto buffers.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(NZ_NUMBER, '+6403 331 6005'));
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumber = NZ_NUMBER.clone();
nzNumber.setExtension('3456');
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumber, '+643 331 6005 ext 3456'));
// Check empty extensions are ignored.
nzNumber.setExtension('');
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumber, '+6403 331 6005'));
// Check variant with two proto buffers.
assertEquals('Numbers did not match',
i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumber, NZ_NUMBER));
}
function testIsNumberMatchShortMatchIfDiffNumLeadingZeros() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberOne = new i18n.phonenumbers.PhoneNumber();
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberTwo = new i18n.phonenumbers.PhoneNumber();
nzNumberOne.setCountryCode(64);
nzNumberOne.setNationalNumber(33316005);
nzNumberOne.setItalianLeadingZero(true);
nzNumberTwo.setCountryCode(64);
nzNumberTwo.setNationalNumber(33316005);
nzNumberTwo.setItalianLeadingZero(true);
nzNumberTwo.setNumberOfLeadingZeros(2);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(nzNumberOne, nzNumberTwo));
nzNumberOne.setItalianLeadingZero(false);
nzNumberOne.setNumberOfLeadingZeros(1);
nzNumberTwo.setItalianLeadingZero(true);
nzNumberTwo.setNumberOfLeadingZeros(1);
// Since one doesn't have the "italian_leading_zero" set to true, we ignore
// the number of leading zeros present (1 is in any case the default value).
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(nzNumberOne, nzNumberTwo));
}
function testIsNumberMatchAcceptsProtoDefaultsAsMatch() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberOne = new i18n.phonenumbers.PhoneNumber();
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberTwo = new i18n.phonenumbers.PhoneNumber();
nzNumberOne.setCountryCode(64);
nzNumberOne.setNationalNumber(33316005);
nzNumberOne.setItalianLeadingZero(true);
// The default for number_of_leading_zeros is 1, so it shouldn't normally be
// set, however if it is it should be considered equivalent.
nzNumberTwo.setCountryCode(64);
nzNumberTwo.setNationalNumber(33316005);
nzNumberTwo.setItalianLeadingZero(true);
nzNumberTwo.setNumberOfLeadingZeros(1);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumberOne, nzNumberTwo));
}
function testIsNumberMatchMatchesDiffLeadingZerosIfItalianLeadingZeroFalse() {
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberOne = new i18n.phonenumbers.PhoneNumber();
/** @type {!i18n.phonenumbers.PhoneNumber} */
var nzNumberTwo = new i18n.phonenumbers.PhoneNumber();
nzNumberOne.setCountryCode(64);
nzNumberOne.setNationalNumber(33316005);
// The default for number_of_leading_zeros is 1, so it shouldn't normally be
// set, however if it is it should be considered equivalent.
nzNumberTwo.setCountryCode(64);
nzNumberTwo.setNationalNumber(33316005);
nzNumberTwo.setNumberOfLeadingZeros(1);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumberOne, nzNumberTwo));
// Even if it is set to ten, it is still equivalent because in both cases
// italian_leading_zero is not true.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(nzNumberOne, nzNumberTwo));
}
function testIsNumberMatchIgnoresSomeFields() {
var CCS = i18n.phonenumbers.PhoneNumber.CountryCodeSource;
// Check raw_input, country_code_source and preferred_domestic_carrier_code
// are ignored.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var brNumberOne = new i18n.phonenumbers.PhoneNumber();
/** @type {!i18n.phonenumbers.PhoneNumber} */
var brNumberTwo = new i18n.phonenumbers.PhoneNumber();
brNumberOne.setCountryCode(55);
brNumberOne.setNationalNumber(3121286979);
brNumberOne.setCountryCodeSource(CCS.FROM_NUMBER_WITH_PLUS_SIGN);
brNumberOne.setPreferredDomesticCarrierCode('12');
brNumberOne.setRawInput('012 3121286979');
brNumberTwo.setCountryCode(55);
brNumberTwo.setNationalNumber(3121286979);
brNumberTwo.setCountryCodeSource(CCS.FROM_DEFAULT_COUNTRY);
brNumberTwo.setPreferredDomesticCarrierCode('14');
brNumberTwo.setRawInput('143121286979');
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH,
phoneUtil.isNumberMatch(brNumberOne, brNumberTwo));
}
function testIsNumberMatchNonMatches() {
// Non-matches.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('03 331 6005', '03 331 6006'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+800 1234 5678', '+1 800 1234 5678'));
// Different country calling code, partial number match.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '+16433316005'));
// Different country calling code, same number.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '+6133316005'));
// Extension different, all else the same.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005 extn 1234',
'0116433316005#1235'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005 extn 1234',
'tel:+64-3-331-6005;ext=1235'));
// NSN matches, but extension is different - not the same number.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005 ext.1235',
'3 331 6005#1234'));
// Invalid numbers that can't be parsed.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER,
phoneUtil.isNumberMatch('4', '3 331 6043'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER,
phoneUtil.isNumberMatch('+43', '+64 3 331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER,
phoneUtil.isNumberMatch('+43', '64 3 331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER,
phoneUtil.isNumberMatch('Dog', '64 3 331 6005'));
}
function testIsNumberMatchNsnMatches() {
// NSN matches.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '03 331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005',
'tel:03-331-6005;isub=1234;phone-context=abc.nz'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch(NZ_NUMBER, '03 331 6005'));
// Here the second number possibly starts with the country calling code for
// New Zealand, although we are unsure.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var unchangedNzNumber = NZ_NUMBER.clone();
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch(unchangedNzNumber, '(64-3) 331 6005'));
// Check the phone number proto was not edited during the method call.
assertTrue(NZ_NUMBER.equals(unchangedNzNumber));
// Here, the 1 might be a national prefix, if we compare it to the US number,
// so the resultant match is an NSN match.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch(US_NUMBER, '1-650-253-0000'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch(US_NUMBER, '6502530000'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch('+1 650-253 0000', '1 650 253 0000'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch('1 650-253 0000', '1 650 253 0000'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH,
phoneUtil.isNumberMatch('1 650-253 0000', '+1 650 253 0000'));
// For this case, the match will be a short NSN match, because we cannot
// assume that the 1 might be a national prefix, so don't remove it when
// parsing.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var randomNumber = new i18n.phonenumbers.PhoneNumber();
randomNumber.setCountryCode(41);
randomNumber.setNationalNumber(6502530000);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(randomNumber, '1-650-253-0000'));
}
function testIsNumberMatchShortNsnMatches() {
// Short NSN matches with the country not specified for either one or both
// numbers.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005',
'tel:331-6005;phone-context=abc.nz'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(
'+64 3 331-6005',
'tel:331-6005;isub=1234;phone-context=abc.nz'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(
'+64 3 331-6005',
'tel:331-6005;isub=1234;phone-context=abc.nz;a=%A1'));
// We did not know that the '0' was a national prefix since neither number has
// a country code, so this is considered a SHORT_NSN_MATCH.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('3 331-6005', '03 331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('3 331-6005', '331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('3 331-6005',
'tel:331-6005;phone-context=abc.nz'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('3 331-6005', '+64 331 6005'));
// Short NSN match with the country specified.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('03 331-6005', '331 6005'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('1 234 345 6789', '345 6789'));
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('+1 (234) 345 6789', '345 6789'));
// NSN matches, country calling code omitted for one number, extension missing
// for one.
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch('+64 3 331-6005', '3 331 6005#1234'));
// One has Italian leading zero, one does not.
/** @type {!i18n.phonenumbers.PhoneNumber} */
var italianNumberOne = new i18n.phonenumbers.PhoneNumber();
italianNumberOne.setCountryCode(39);
italianNumberOne.setNationalNumber(1234);
italianNumberOne.setItalianLeadingZero(true);
/** @type {!i18n.phonenumbers.PhoneNumber} */
var italianNumberTwo = new i18n.phonenumbers.PhoneNumber();
italianNumberTwo.setCountryCode(39);
italianNumberTwo.setNationalNumber(1234);
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(italianNumberOne, italianNumberTwo));
// One has an extension, the other has an extension of ''.
italianNumberOne.setExtension('1234');
italianNumberOne.clearItalianLeadingZero();
italianNumberTwo.setExtension('');
assertEquals(i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH,
phoneUtil.isNumberMatch(italianNumberOne, italianNumberTwo));
}
function testCanBeInternationallyDialled() {
// We have no-international-dialling rules for the US in our test metadata
// that say that toll-free numbers cannot be dialled internationally.
assertFalse(phoneUtil.canBeInternationallyDialled(US_TOLLFREE));
// Normal US numbers can be internationally dialled.
assertTrue(phoneUtil.canBeInternationallyDialled(US_NUMBER));
// Invalid number.
assertTrue(phoneUtil.canBeInternationallyDialled(US_LOCAL_NUMBER));
// We have no data for NZ - should return true.
assertTrue(phoneUtil.canBeInternationallyDialled(NZ_NUMBER));
assertTrue(phoneUtil.canBeInternationallyDialled(INTERNATIONAL_TOLL_FREE));
}
function testIsAlphaNumber() {
assertTrue(phoneUtil.isAlphaNumber('1800 six-flags'));
assertTrue(phoneUtil.isAlphaNumber('1800 six-flags ext. 1234'));
assertTrue(phoneUtil.isAlphaNumber('+800 six-flags'));
assertTrue(phoneUtil.isAlphaNumber('180 six-flags'));
assertFalse(phoneUtil.isAlphaNumber('1800 123-1234'));
assertFalse(phoneUtil.isAlphaNumber('1 six-flags'));
assertFalse(phoneUtil.isAlphaNumber('18 six-flags'));
assertFalse(phoneUtil.isAlphaNumber('1800 123-1234 extension: 1234'));
assertFalse(phoneUtil.isAlphaNumber('+800 1234-1234'));
}
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/phonenumberutil_test.js
|
JavaScript
|
unknown
| 169,779
|
/**
* @license
* Copyright (C) 2011 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview String constants of region codes for testing.
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.RegionCode');
/**
* Enum containing string constants of region codes for easier testing.
*
* @enum {string}
*/
i18n.phonenumbers.RegionCode = {
// Region code for global networks (e.g. +800 numbers).
UN001: '001',
AD: 'AD',
AE: 'AE',
AO: 'AO',
AQ: 'AQ',
AR: 'AR',
AM: 'AM',
AU: 'AU',
BB: 'BB',
BR: 'BR',
BS: 'BS',
BY: 'BY',
CA: 'CA',
CH: 'CH',
CL: 'CL',
CN: 'CN',
CS: 'CS',
CX: 'CX',
DE: 'DE',
FR: 'FR',
GB: 'GB',
HU: 'HU',
IT: 'IT',
JP: 'JP',
KR: 'KR',
MX: 'MX',
NZ: 'NZ',
PL: 'PL',
RE: 'RE',
RU: 'RU',
SE: 'SE',
SG: 'SG',
US: 'US',
UZ: 'UZ',
YT: 'YT',
ZW: 'ZW',
// Official code for the unknown region.
ZZ: 'ZZ'
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/regioncodefortesting.js
|
JavaScript
|
unknown
| 1,460
|
/**
* @license
* Copyright (C) 2018 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Utility for international phone numbers.
* Functionality includes formatting, parsing and validation.
* (based on the java implementation).
*
* NOTE: A lot of methods in this class require Region Code strings. These must
* be provided using CLDR two-letter region-code format. These should be in
* upper-case. The list of the codes can be found here:
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
*
* @author James Wright
*/
goog.provide('i18n.phonenumbers.ShortNumberInfo');
goog.require('goog.array');
goog.require('goog.proto2.PbLiteSerializer');
goog.require('i18n.phonenumbers.PhoneMetadata');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumberDesc');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.metadata');
goog.require('i18n.phonenumbers.shortnumbermetadata');
/**
* @constructor
* @private
*/
i18n.phonenumbers.ShortNumberInfo = function() {
/**
* A mapping from region code to the short-number metadata for that region.
* @type {Object.<string, i18n.phonenumbers.PhoneMetadata>}
*/
this.regionToMetadataMap = {};
};
goog.addSingletonGetter(i18n.phonenumbers.ShortNumberInfo);
/**
* In these countries, if extra digits are added to an emergency number, it no
* longer connects to the emergency service.
* @const
* @type {!Array<string>}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT_ = [
'BR',
'CL',
'NI'
];
/**
* @enum {number} Cost categories of short numbers.
*/
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost = {
TOLL_FREE: 0,
STANDARD_RATE: 1,
PREMIUM_RATE: 2,
UNKNOWN_COST: 3
};
/**
* Returns a list with the region codes that match the specific country calling
* code. For non-geographical country calling codes, the region code 001 is
* returned. Also, in the case of no region code being found, an empty list
* is returned.
* @param {number} countryCallingCode
* @return {!Array<string>} The region codes that match the given country code.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getRegionCodesForCountryCode_ =
function(countryCallingCode) {
var regionCodes = i18n.phonenumbers.metadata
.countryCodeToRegionCodeMap[countryCallingCode];
return regionCodes ? regionCodes : [];
};
/**
* Helper method to check that the country calling code of the number matches
* the region it's being dialed from.
* @param {i18n.phonenumbers.PhoneNumber} number
* @param {?string} regionDialingFrom
* @return {boolean}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.regionDialingFromMatchesNumber_ =
function(number, regionDialingFrom) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
return goog.array.contains(regionCodes, regionDialingFrom);
};
/**
* Check whether a short number is a possible number when dialed from the given
* region. This provides a more lenient check than
* {@link #isValidShortNumberForRegion}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number to check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the number is a possible short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isPossibleShortNumberForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return false;
}
var numberLength = this.getNationalSignificantNumber_(number).length;
return goog.array.contains(
phoneMetadata.getGeneralDesc().possibleLengthArray(), numberLength);
};
/**
* Check whether a short number is a possible number. If a country calling code
* is shared by multiple regions, this returns true if it's possible in any of
* them. This provides a more lenient check than {@link #isValidShortNumber}.
* See {@link #isPossibleShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number to check
* @return {boolean} whether the number is a possible short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isPossibleShortNumber =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var shortNumberLength = this.getNationalSignificantNumber_(number).length;
for (var i = 0; i < regionCodes.length; i++) {
var region = regionCodes[i];
var phoneMetadata = this.getMetadataForRegion_(region);
if (!phoneMetadata) {
continue;
}
var possibleLengths = phoneMetadata.getGeneralDesc().possibleLengthArray();
if (goog.array.contains(possibleLengths, shortNumberLength)) {
return true;
}
}
return false;
};
/**
* Tests whether a short number matches a valid pattern in a region. Note that
* this doesn't verify the number is actually in use, which is impossible to
* tell by just looking at the number itself.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to test the validity
* @param {?string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number matches a valid pattern
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isValidShortNumberForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return false;
}
var shortNumber = this.getNationalSignificantNumber_(number);
var generalDesc = phoneMetadata.getGeneralDesc();
if (!this.matchesPossibleNumberAndNationalNumber_(shortNumber, generalDesc)) {
return false;
}
var shortNumberDesc = phoneMetadata.getShortCode();
return this.matchesPossibleNumberAndNationalNumber_(shortNumber,
shortNumberDesc);
};
/**
* Tests whether a short number matches a valid pattern. If a country calling
* code is shared by multiple regions, this returns true if it's valid in any of
* them. Note that this doesn't verify the number is actually in use, which is
* impossible to tell by just looking at the number itself. See
* {@link #isValidShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to test the validity
* @return {boolean} whether the short number matches a valid pattern
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isValidShortNumber =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var regionCode = this.getRegionCodeForShortNumberFromRegionList_(number,
regionCodes);
if (regionCodes.length > 1 && regionCode != null) {
// If a matching region had been found for the phone number from among two
// or more regions, then we have already implicitly verified its validity
// for that region.
return true;
}
return this.isValidShortNumberForRegion(number, regionCode);
};
/**
* Gets the expected cost category of a short number when dialed from a region
* (however, nothing is implied about its validity). If it is important that the
* number is valid, then its validity must first be checked using
* {@link #isValidShortNumberForRegion}. Note that emergency numbers are always
* considered toll-free. Example usage:
* <pre>{@code
* // The region for which the number was parsed and the region we subsequently
* // check against need not be the same. Here we parse the number in the US and
* // check it for Canada.
* PhoneNumber number = phoneUtil.parse("110", "US");
* ...
* String regionCode = "CA";
* ShortNumberInfo shortInfo = ShortNumberInfo.getInstance();
* if (shortInfo.isValidShortNumberForRegion(shortNumber, regionCode)) {
* ShortNumberCost cost = shortInfo.getExpectedCostForRegion(number,
* regionCode);
* // Do something with the cost information here.
* }}</pre>
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to know the expected cost category
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} the expected cost
* category for that region of the short number. Returns UNKNOWN_COST if the
* number does not match a cost category. Note that an invalid number may
* match any cost category.
* @package
*/
// @VisibleForTesting
i18n.phonenumbers.ShortNumberInfo.prototype.getExpectedCostForRegion =
function(number, regionDialingFrom) {
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return ShortNumberCost.UNKNOWN_COST;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return ShortNumberCost.UNKNOWN_COST;
}
var shortNumber = this.getNationalSignificantNumber_(number);
if (!goog.array.contains(phoneMetadata.getGeneralDesc().possibleLengthArray(),
shortNumber.length)) {
return ShortNumberCost.UNKNOWN_COST;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getPremiumRate())) {
return ShortNumberCost.PREMIUM_RATE;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getStandardRate())) {
return ShortNumberCost.STANDARD_RATE;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getTollFree())) {
return ShortNumberCost.TOLL_FREE;
}
if (this.isEmergencyNumber(shortNumber, regionDialingFrom)) {
// Emergency numbers are implicitly toll-free
return ShortNumberCost.TOLL_FREE;
}
return ShortNumberCost.UNKNOWN_COST;
};
/**
* Gets the expected cost category of a short number (however, nothing is
* implied about its validity). If the country calling code is unique to a
* region, this method behaves exactly the same as
* {@link #getExpectedCostForRegion(PhoneNumber, String)}. However, if the
* country calling code is shared by multiple regions, then it returns the
* highest cost in the sequence PREMIUM_RATE, UNKNOWN_COST, STANDARD_RATE,
* TOLL_FREE. The reason for the position of UNKNOWN_COST in this order is that
* if a number is UNKNOWN_COST in one region but STANDARD_RATE or TOLL_FREE in
* another, its expected cost cannot be estimated as one of the latter since it
* might be a PREMIUM_RATE number.
* <p>
* For example, if a number is STANDARD_RATE in the US, but TOLL_FREE in Canada,
* the expected cost returned by this method will be STANDARD_RATE, since the
* NANPA countries share the same country calling code.
* <p>
* Note: If the region from which the number is dialed is known, it is highly
* preferable to call {@link #getExpectedCostForRegion(PhoneNumber, String)}
* instead.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to know the expected cost category
* @return {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} the highest
* expected cost category of the short number in the region(s) with the
* given country calling code
* @package
*/
// @VisibleForTesting
i18n.phonenumbers.ShortNumberInfo.prototype.getExpectedCost = function(number) {
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
if (regionCodes.length === 0) {
return ShortNumberCost.UNKNOWN_COST;
}
if (regionCodes.length === 1) {
return this.getExpectedCostForRegion(number, regionCodes[0]);
}
var cost = ShortNumberCost.TOLL_FREE;
for (var i = 0; i < regionCodes.length; i++) {
var regionCode = regionCodes[i];
var costForRegion = this.getExpectedCostForRegion(number, regionCode);
switch (costForRegion) {
case ShortNumberCost.PREMIUM_RATE:
return ShortNumberCost.PREMIUM_RATE;
case ShortNumberCost.UNKNOWN_COST:
cost = ShortNumberCost.UNKNOWN_COST;
break;
case ShortNumberCost.STANDARD_RATE:
if (cost !== ShortNumberCost.UNKNOWN_COST) {
cost = ShortNumberCost.STANDARD_RATE;
}
break;
case ShortNumberCost.TOLL_FREE:
// Do nothing.
break;
default:
throw new Error('Unrecognized cost for region: ' + costForRegion);
}
}
return cost;
};
/**
* Helper method to get the region code for a given phone number, from a list
* of possible region codes. If the list contains more than one region, the
* first region for which the number is valid is returned.
* @param {!i18n.phonenumbers.PhoneNumber} number
* @param {Array<string>} regionCodes
* @return {?string}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getRegionCodeForShortNumberFromRegionList_ =
function(number, regionCodes) {
if (regionCodes.length === 0) {
return null;
} else if (regionCodes.length === 1) {
return regionCodes[0];
}
var nationalNumber = this.getNationalSignificantNumber_(number);
for (var i = 0; i < regionCodes.length; i++) {
var regionCode = regionCodes[i];
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getShortCode())) {
return regionCode;
}
}
return null;
};
/**
* Convenience method to get a list of what regions the library has metadata for
* @return {!Array<string>} the list of region codes
* @package
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getSupportedRegions = function() {
return goog.array.filter(
Object.keys(i18n.phonenumbers.shortnumbermetadata.countryToMetadata),
function(regionCode) {
return isNaN(regionCode);
});
};
/**
* Gets a valid short number for the specified region.
*
* @param {?string} regionCode the region for which an example short number is
* needed
* @return {string} a valid short number for the specified region. Returns an
* empty string when the metadata does not contain such information.
* @package
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getExampleShortNumber =
function(regionCode) {
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (!phoneMetadata) {
return '';
}
var desc = phoneMetadata.getShortCode();
if (desc.hasExampleNumber()) {
return desc.getExampleNumber() || '';
}
return '';
};
/**
* Gets a valid short number for the specified cost category.
*
* @param {string} regionCode the region for which an example short number is
* needed
* @param {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} cost the cost
* category of number that is needed
* @return {string} a valid short number for the specified region and cost
* category. Returns an empty string when the metadata does not contain such
* information, or the cost is UNKNOWN_COST.
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getExampleShortNumberForCost =
function(regionCode, cost) {
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (!phoneMetadata) {
return '';
}
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
var desc = null;
switch (cost) {
case ShortNumberCost.TOLL_FREE:
desc = phoneMetadata.getTollFree();
break;
case ShortNumberCost.STANDARD_RATE:
desc = phoneMetadata.getStandardRate();
break;
case ShortNumberCost.PREMIUM_RATE:
desc = phoneMetadata.getPremiumRate();
break;
default:
// UNKNOWN_COST numbers are computed by the process of elimination from
// the other cost categories.
}
if (desc && desc.hasExampleNumber()) {
return desc.getExampleNumber() || '';
}
return '';
};
/**
* Returns true if the given number, exactly as dialed, might be used to
* connect to an emergency service in the given region.
* <p>
* This method accepts a string, rather than a PhoneNumber, because it needs
* to distinguish cases such as "+1 911" and "911", where the former may not
* connect to an emergency service in all cases but the latter would. This
* method takes into account cases where the number might contain formatting,
* or might have additional digits appended (when it is okay to do that in
* the specified region).
*
* @param {string} number the phone number to test
* @param {string} regionCode the region where the phone number is being
* dialed
* @return {boolean} whether the number might be used to connect to an
* emergency service in the given region
*/
i18n.phonenumbers.ShortNumberInfo.prototype.connectsToEmergencyNumber =
function(number, regionCode) {
return this.matchesEmergencyNumberHelper_(number, regionCode,
true /* allows prefix match */);
};
/**
* Returns true if the given number exactly matches an emergency service
* number in the given region.
* <p>
* This method takes into account cases where the number might contain
* formatting, but doesn't allow additional digits to be appended. Note that
* {@code isEmergencyNumber(number, region)} implies
* {@code connectsToEmergencyNumber(number, region)}.
*
* @param {string} number the phone number to test
* @param {string} regionCode the region where the phone number is being
* dialed
* @return {boolean} whether the number exactly matches an emergency services
* number in the given region.
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isEmergencyNumber =
function(number, regionCode) {
return this.matchesEmergencyNumberHelper_(number, regionCode,
false /* doesn't allow prefix match */);
};
/**
* @param {?string} regionCode The region code to get metadata for
* @return {?i18n.phonenumbers.PhoneMetadata} The region code's metadata, or
* null if it is not available or the region code is invalid.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getMetadataForRegion_ =
function(regionCode) {
if (!regionCode) {
return null;
}
regionCode = regionCode.toUpperCase();
var metadata = this.regionToMetadataMap[regionCode];
if (metadata == null) {
/** @type {goog.proto2.PbLiteSerializer} */
var serializer = new goog.proto2.PbLiteSerializer();
var metadataSerialized =
i18n.phonenumbers.shortnumbermetadata.countryToMetadata[regionCode];
if (metadataSerialized == null) {
return null;
}
metadata = /** @type {i18n.phonenumbers.PhoneMetadata} */ (
serializer.deserialize(i18n.phonenumbers.PhoneMetadata.getDescriptor(),
metadataSerialized));
this.regionToMetadataMap[regionCode] = metadata;
}
return metadata;
};
/**
* @param {string} number the number to match against
* @param {string} regionCode the region code to check against
* @param {boolean} allowPrefixMatch whether to allow prefix matching
* @return {boolean} True iff the number matches an emergency number for that
* particular region.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.matchesEmergencyNumberHelper_ =
function(number, regionCode, allowPrefixMatch) {
var possibleNumber = i18n.phonenumbers.PhoneNumberUtil
.extractPossibleNumber(number);
if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(possibleNumber)) {
return false;
}
var metadata = this.getMetadataForRegion_(regionCode);
if (metadata == null || !metadata.hasEmergency()) {
return false;
}
var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil
.normalizeDigitsOnly(possibleNumber);
var allowPrefixMatchForRegion = allowPrefixMatch && !goog.array.contains(
i18n.phonenumbers.ShortNumberInfo.
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT_,
regionCode);
var emergencyNumberPattern = metadata.getEmergency()
.getNationalNumberPatternOrDefault();
var result = i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
emergencyNumberPattern, normalizedNumber);
return result ||
(allowPrefixMatchForRegion &&
i18n.phonenumbers.PhoneNumberUtil
.matchesPrefix(emergencyNumberPattern, normalizedNumber));
};
/**
* Given a valid short number, determines whether it is carrier-specific
* (however, nothing is implied about its validity). Carrier-specific numbers
* may connect to a different end-point, or not connect at all, depending on
* the user's carrier. If it is important that the number is valid, then its
* validity must first be checked using {@link #isValidShortNumber} or
* {@link #isValidShortNumberForRegion}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @return {boolean} whether the short number is carrier-specific, assuming the
* input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isCarrierSpecific =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var regionCode = this.getRegionCodeForShortNumberFromRegionList_(number,
regionCodes);
var nationalNumber = this.getNationalSignificantNumber_(number);
var phoneMetadata = this.getMetadataForRegion_(regionCode);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getCarrierSpecific());
};
/**
* Given a valid short number, determines whether it is carrier-specific when
* dialed from the given region (however, nothing is implied about its
* validity). Carrier-specific numbers may connect to a different end-point, or
* not connect at all, depending on the user's carrier. If it is important that
* the number is valid, then its validity must first be checked using
* {@link #isValidShortNumber} or {@link #isValidShortNumberForRegion}. Returns
* false if the number doesn't match the region provided.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number is carrier-specific in the
* provided region, assuming the input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isCarrierSpecificForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var nationalNumber = this.getNationalSignificantNumber_(number);
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getCarrierSpecific());
};
/**
* Given a valid short number, determines whether it is an SMS service
* (however, nothing is implied about its validity). An SMS service is where the
* primary or only intended usage is to receive and/or send text messages
* (SMSs). This includes MMS as MMS numbers downgrade to SMS if the other party
* isn't MMS-capable. If it is important that the number is valid, then its
* validity must first be checked using {@link #isValidShortNumber} or {@link
* #isValidShortNumberForRegion}. Returns false if the number doesn't match the
* region provided.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number is an SMS service in the provided
* region, assuming the input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isSmsServiceForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
var nationalNumber = this.getNationalSignificantNumber_(number);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getSmsServices());
};
/**
* Gets the national significant number of a phone number. Note a national
* significant number doesn't contain a national prefix or any formatting.
* <p>
* This is a temporary duplicate of the {@code getNationalSignificantNumber}
* method from {@code PhoneNumberUtil}. Ultimately a canonical static version
* should exist in a separate utility class (to prevent {@code ShortNumberInfo}
* needing to depend on PhoneNumberUtil).
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
* national significant number is needed.
* @return {string} the national significant number of the PhoneNumber object
* passed in.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getNationalSignificantNumber_ =
function(number) {
if (!number.hasNationalNumber()) {
return '';
}
/** @type {string} */
var nationalNumber = '' + number.getNationalNumber();
// If leading zero(s) have been set, we prefix this now. Note that a single
// leading zero is not the same as a national prefix; leading zeros should be
// dialled no matter whether you are dialling from within or outside the
// country, national prefixes are added when formatting nationally if
// applicable.
if (number.hasItalianLeadingZero() && number.getItalianLeadingZero() &&
number.getNumberOfLeadingZerosOrDefault() > 0) {
return Array(number.getNumberOfLeadingZerosOrDefault() + 1).join('0') +
nationalNumber;
}
return nationalNumber;
};
/**
* Helper method to add in a performance optimization.
* TODO: Once we have benchmarked ShortNumberInfo, consider if it is worth
* keeping this performance optimization.
* @param {string} number
* @param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
* @return {boolean}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.matchesPossibleNumberAndNationalNumber_ =
function(number, numberDesc) {
if (numberDesc.possibleLengthArray().length > 0 && !goog.array.contains(
numberDesc.possibleLengthArray(), number.length)) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
numberDesc.getNationalNumberPatternOrDefault(), number.toString());
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/shortnumberinfo.js
|
JavaScript
|
unknown
| 27,470
|
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<meta charset="utf-8">
<title>libphonenumber Unit Tests - i18n.phonenumbers - shortnumberinfo.js</title>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.proto2.Message');
</script>
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadatafortesting.js"></script>
<script src="shortnumbermetadata.js"></script>
<script src="regioncodefortesting.js"></script>
<script src="phonenumberutil.js"></script>
<script src="shortnumberinfo.js"></script>
<script src="shortnumberinfo_test.js"></script>
</head>
<body>
</body>
</html>
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/shortnumberinfo_test.html
|
HTML
|
unknown
| 1,286
|
/**
* @license
* Copyright (C) 2018 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Unit tests for the ShortNumberInfo.
*
* Note that these tests use the test metadata for PhoneNumberUtil related
* operations, but the real short number metadata for testing ShortNumberInfo
* specific operations. This is not intentional, but mirrors the current state
* of the Java test suite.
*
* @author James Wright
*/
goog.require('goog.testing.jsunit');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.RegionCode');
goog.require('i18n.phonenumbers.ShortNumberInfo');
/** @type {i18n.phonenumbers.ShortNumberInfo} */
var shortInfo = i18n.phonenumbers.ShortNumberInfo.getInstance();
/** @type {i18n.phonenumbers.PhoneNumberUtil} */
var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
var RegionCode = i18n.phonenumbers.RegionCode;
function testIsPossibleShortNumber() {
var possibleNumber = new i18n.phonenumbers.PhoneNumber();
possibleNumber.setCountryCode(33);
possibleNumber.setNationalNumber(123456);
assertTrue(shortInfo.isPossibleShortNumber(possibleNumber));
assertTrue(shortInfo.isPossibleShortNumberForRegion(
phoneUtil.parse('123456', RegionCode.FR),
RegionCode.FR));
var impossibleNumber = new i18n.phonenumbers.PhoneNumber();
impossibleNumber.setCountryCode(33);
impossibleNumber.setNationalNumber(9);
assertFalse(shortInfo.isPossibleShortNumber(impossibleNumber));
// Note that GB and GG share the country calling code 44, and that this number
// is possible but not valid.
var impossibleUkNumber = new i18n.phonenumbers.PhoneNumber();
impossibleUkNumber.setCountryCode(44);
impossibleUkNumber.setNationalNumber(11001);
assertTrue(shortInfo.isPossibleShortNumber(impossibleUkNumber));
}
function testIsValidShortNumber() {
var shortNumber1 = new i18n.phonenumbers.PhoneNumber();
shortNumber1.setCountryCode(33);
shortNumber1.setNationalNumber(1010);
assertTrue(shortInfo.isValidShortNumber(shortNumber1));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('1010', RegionCode.FR),
RegionCode.FR));
var shortNumber2 = new i18n.phonenumbers.PhoneNumber();
shortNumber2.setCountryCode(33);
shortNumber2.setNationalNumber(123456);
assertFalse(shortInfo.isValidShortNumber(shortNumber2));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('123456', RegionCode.FR),
RegionCode.FR));
// Note that GB and GG share the country calling code 44.
var shortNumber3 = new i18n.phonenumbers.PhoneNumber();
shortNumber3.setCountryCode(44);
shortNumber3.setNationalNumber(18001);
assertTrue(shortInfo.isValidShortNumber(shortNumber3));
}
function testIsCarrierSpecific() {
var carrierSpecificNumber = new i18n.phonenumbers.PhoneNumber();
carrierSpecificNumber.setCountryCode(1);
carrierSpecificNumber.setNationalNumber(33669);
assertTrue(shortInfo.isCarrierSpecific(carrierSpecificNumber));
assertTrue(shortInfo.isCarrierSpecificForRegion(
phoneUtil.parse('33669', RegionCode.US),
RegionCode.US));
var notCarrierSpecificNumber = new i18n.phonenumbers.PhoneNumber();
notCarrierSpecificNumber.setCountryCode(1);
notCarrierSpecificNumber.setNationalNumber(911);
assertFalse(shortInfo.isCarrierSpecific(notCarrierSpecificNumber));
assertFalse(shortInfo.isCarrierSpecificForRegion(
phoneUtil.parse('911', RegionCode.US),
RegionCode.US));
var carrierSpecificNumberForSomeRegion = new i18n.phonenumbers.PhoneNumber();
carrierSpecificNumberForSomeRegion.setCountryCode(1);
carrierSpecificNumberForSomeRegion.setNationalNumber(211);
assertTrue(shortInfo.isCarrierSpecific(carrierSpecificNumberForSomeRegion));
assertTrue(shortInfo.isCarrierSpecificForRegion(
carrierSpecificNumberForSomeRegion, RegionCode.US));
assertFalse(shortInfo.isCarrierSpecificForRegion(
carrierSpecificNumberForSomeRegion, RegionCode.BB));
}
function testIsSmsService() {
var smsServiceNumberForSomeRegion = new i18n.phonenumbers.PhoneNumber();
smsServiceNumberForSomeRegion.setCountryCode(1);
smsServiceNumberForSomeRegion.setNationalNumber(21234);
assertTrue(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion,
RegionCode.US));
assertFalse(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion,
RegionCode.BB));
}
function testGetExpectedCost() {
var premiumRateExample = shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(premiumRateExample, RegionCode.FR),
RegionCode.FR));
var premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(33);
premiumRateNumber.setNationalNumber(parseInt(premiumRateExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCost(premiumRateNumber));
var standardRateExample = shortInfo.getExampleShortNumberForCost(
RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(standardRateExample, RegionCode.FR),
RegionCode.FR));
var standardRateNumber = new i18n.phonenumbers.PhoneNumber();
standardRateNumber.setCountryCode(33);
standardRateNumber.setNationalNumber(parseInt(standardRateExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCost(standardRateNumber));
var tollFreeExample = shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(tollFreeExample, RegionCode.FR),
RegionCode.FR));
var tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(33);
tollFreeNumber.setNationalNumber(parseInt(tollFreeExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(tollFreeNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('12345', RegionCode.FR),
RegionCode.FR));
var unknownCostNumber = new i18n.phonenumbers.PhoneNumber();
unknownCostNumber.setCountryCode(33);
unknownCostNumber.setNationalNumber(12345);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(unknownCostNumber));
// Test that an invalid number may nevertheless have a cost other than
// UNKNOWN_COST.
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('116123', RegionCode.FR),
RegionCode.FR));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('116123', RegionCode.FR),
RegionCode.FR));
var invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(33);
invalidNumber.setNationalNumber(116123);
assertFalse(shortInfo.isValidShortNumber(invalidNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(invalidNumber));
// Test a nonexistent country code.
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('911', RegionCode.US),
RegionCode.ZZ));
unknownCostNumber = new i18n.phonenumbers.PhoneNumber();
unknownCostNumber.setCountryCode(123);
unknownCostNumber.setNationalNumber(911);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(unknownCostNumber));
}
function testGetExpectedCostForSharedCountryCallingCode() {
// Test some numbers which have different costs in countries sharing the same
// country calling code. In Australia, 1234 is premium-rate, 1194 is
// standard-rate, and 733 is toll-free. These are not known to be valid
// numbers in the Christmas Islands.
var ambiguousPremiumRateString = '1234';
var ambiguousPremiumRateNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousPremiumRateNumber.setCountryCode(61);
ambiguousPremiumRateNumber.setNationalNumber(1234);
var ambiguousStandardRateString = '1194';
var ambiguousStandardRateNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousStandardRateNumber.setCountryCode(61);
ambiguousStandardRateNumber.setNationalNumber(1194);
var ambiguousTollFreeString = '733';
var ambiguousTollFreeNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousTollFreeNumber.setCountryCode(61);
ambiguousTollFreeNumber.setNationalNumber(733);
assertTrue(shortInfo.isValidShortNumber(ambiguousPremiumRateNumber));
assertTrue(shortInfo.isValidShortNumber(ambiguousStandardRateNumber));
assertTrue(shortInfo.isValidShortNumber(ambiguousTollFreeNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.CX),
RegionCode.CX));
// PREMIUM_RATE takes precedence over UNKNOWN_COST.
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCost(ambiguousPremiumRateNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(ambiguousStandardRateNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(ambiguousTollFreeNumber));
}
function testExampleShortNumberPresence() {
assertNonEmptyString(shortInfo.getExampleShortNumber(RegionCode.AD));
assertNonEmptyString(shortInfo.getExampleShortNumber(RegionCode.FR));
assertEquals('', shortInfo.getExampleShortNumber(RegionCode.UN001));
assertEquals('', shortInfo.getExampleShortNumber(null));
}
function testConnectsToEmergencyNumber_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('911', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('112', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('999', RegionCode.US));
}
function testConnectsToEmergencyNumberLongNumber_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('9116666666', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('1126666666', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('9996666666', RegionCode.US));
}
function testConnectsToEmergencyNumberWithFormatting_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('9-1-1', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('1-1-2', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('9-9-9', RegionCode.US));
}
function testConnectsToEmergencyNumberWithPlusSign_US() {
assertFalse(shortInfo.connectsToEmergencyNumber('+911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('\uFF0B911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber(' +911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('+112', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('+999', RegionCode.US));
}
function testConnectsToEmergencyNumber_BR() {
assertTrue(shortInfo.connectsToEmergencyNumber('911', RegionCode.BR));
assertTrue(shortInfo.connectsToEmergencyNumber('190', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('999', RegionCode.BR));
}
function testConnectsToEmergencyNumberLongNumber_BR() {
// Brazilian emergency numbers don't work when additional digits are appended.
assertFalse(shortInfo.connectsToEmergencyNumber('9111', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('1900', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('9996', RegionCode.BR));
}
function testConnectsToEmergencyNumber_CL() {
assertTrue(shortInfo.connectsToEmergencyNumber('131', RegionCode.CL));
assertTrue(shortInfo.connectsToEmergencyNumber('133', RegionCode.CL));
}
function testConnectsToEmergencyNumberLongNumber_CL() {
// Chilean emergency numbers don't work when additional digits are appended.
assertFalse(shortInfo.connectsToEmergencyNumber('1313', RegionCode.CL));
assertFalse(shortInfo.connectsToEmergencyNumber('1330', RegionCode.CL));
}
function testConnectsToEmergencyNumber_AO() {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
assertFalse(shortInfo.connectsToEmergencyNumber('911', RegionCode.AO));
assertFalse(shortInfo.connectsToEmergencyNumber('222123456', RegionCode.AO));
assertFalse(shortInfo.connectsToEmergencyNumber('923123456', RegionCode.AO));
}
function testConnectsToEmergencyNumber_ZW() {
// Zimbabwe doesn't have any metadata in the test metadata.
assertFalse(shortInfo.connectsToEmergencyNumber('911', RegionCode.ZW));
assertFalse(shortInfo.connectsToEmergencyNumber('01312345', RegionCode.ZW));
assertFalse(shortInfo.connectsToEmergencyNumber('0711234567', RegionCode.ZW));
}
function testIsEmergencyNumber_US() {
assertTrue(shortInfo.isEmergencyNumber('911', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('999', RegionCode.US));
}
function testIsEmergencyNumberLongNumber_US() {
assertFalse(shortInfo.isEmergencyNumber('9116666666', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('1126666666', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('9996666666', RegionCode.US));
}
function testIsEmergencyNumberWithFormatting_US() {
assertTrue(shortInfo.isEmergencyNumber('9-1-1', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('*911', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('1-1-2', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('*112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('9-9-9', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('*999', RegionCode.US));
}
function testIsEmergencyNumberWithPlusSign_US() {
assertFalse(shortInfo.isEmergencyNumber('+911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('\uFF0B911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber(' +911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('+112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('+999', RegionCode.US));
}
function testIsEmergencyNumber_BR() {
assertTrue(shortInfo.isEmergencyNumber('911', RegionCode.BR));
assertTrue(shortInfo.isEmergencyNumber('190', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('999', RegionCode.BR));
}
function testIsEmergencyNumberLongNumber_BR() {
assertFalse(shortInfo.isEmergencyNumber('9111', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('1900', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('9996', RegionCode.BR));
}
function testIsEmergencyNumber_AO() {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
assertFalse(shortInfo.isEmergencyNumber('911', RegionCode.AO));
assertFalse(shortInfo.isEmergencyNumber('222123456', RegionCode.AO));
assertFalse(shortInfo.isEmergencyNumber('923123456', RegionCode.AO));
}
function testIsEmergencyNumber_ZW() {
// Zimbabwe doesn't have any metadata in the test metadata.
assertFalse(shortInfo.isEmergencyNumber('911', RegionCode.ZW));
assertFalse(shortInfo.isEmergencyNumber('01312345', RegionCode.ZW));
assertFalse(shortInfo.isEmergencyNumber('0711234567', RegionCode.ZW));
}
function testEmergencyNumberForSharedCountryCallingCode() {
// Test the emergency number 112, which is valid in both Australia and the
// Christmas Islands.
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.AU));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('112', RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('112', RegionCode.AU),
RegionCode.AU));
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.CX));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('112', RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('112', RegionCode.CX),
RegionCode.CX));
var sharedEmergencyNumber = new i18n.phonenumbers.PhoneNumber();
sharedEmergencyNumber.setCountryCode(61);
sharedEmergencyNumber.setNationalNumber(112);
assertTrue(shortInfo.isValidShortNumber(sharedEmergencyNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(sharedEmergencyNumber));
}
function testOverlappingNANPANumber() {
// 211 is an emergency number in Barbados, while it is a toll-free information
// line in Canada and the USA.
assertTrue(shortInfo.isEmergencyNumber('211', RegionCode.BB));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.BB),
RegionCode.BB));
assertFalse(shortInfo.isEmergencyNumber('211', RegionCode.US));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.US),
RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('211', RegionCode.CA));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.CA),
RegionCode.CA));
}
function testCountryCallingCodeIsNotIgnored() {
// +46 is the country calling code for Sweden (SE), and 40404 is a valid short
// number in the US.
assertFalse(shortInfo.isPossibleShortNumberForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
}
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/shortnumberinfo_test.js
|
JavaScript
|
unknown
| 21,266
|
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated metadata for file
* ../resources/ShortNumberMetadata.xml
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.shortnumbermetadata');
/**
* A mapping from a country calling code to the region codes which denote the
* region represented by that country calling code. In the case of multiple
* countries sharing a calling code, such as the NANPA regions, the one
* indicated with "isMainCountryForCode" in the metadata should be first.
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.shortnumbermetadata.countryCodeToRegionCodeMap = {
0:["AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IM","IN","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"]
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.shortnumbermetadata.countryToMetadata = {
"AC":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"AC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"]
,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AD":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[0268]",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"AD",,,,,,,,,,,,,,,,,,[,,"11[0268]",,,,"110"]
,,[,,"11[0268]",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AE":[,[,,"[149]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"112|99[7-9]",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AE",,,,,,,,,,,,,,,,,,[,,"112|99[7-9]",,,,"112",,,[3]
]
,,[,,"112|445[16]|99[7-9]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"445\\d",,,,"4450",,,[4]
]
]
,"AF":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"1(?:0[02]|19)",,,,"100",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AF",,,,,,,,,,,,,,,,,,[,,"1(?:0[02]|19)",,,,"100",,,[3]
]
,,[,,"1(?:0[02]|19)|40404",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"AG":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"AG",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"]
,,[,,"176|9(?:11|99)",,,,"176"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"AI":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"AI",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"176|911",,,,"176"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"AL":[,[,,"[15]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1(?:2|6[01]\\d\\d)|2[7-9]|3[15]|41)",,,,"112",,,[3,6]
]
,[,,"5\\d{4}",,,,"50000",,,[5]
]
,,,,"AL",,,,,,,,,,,,,,,,,,[,,"1(?:12|2[7-9])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:6(?:000|1(?:06|11|23))|8\\d\\d)|65\\d|89[12])|5\\d{4}|1(?:[1349]\\d|2[2-9])",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"123",,,,"123",,,[3]
]
,,[,,"131|5\\d{4}",,,,"131",,,[3,5]
]
]
,"AM":[,[,,"[148]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"10[1-3]",,,,"101",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AM",,,,,,,,,,,,,,,,,,[,,"10[1-3]",,,,"101",,,[3]
]
,,[,,"(?:1|8[1-7])\\d\\d|40404",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"AO":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[235]",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"AO",,,,,,,,,,,,,,,,,,[,,"11[235]",,,,"112"]
,,[,,"11[235]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AR":[,[,,"[01389]\\d{1,4}",,,,,,,[2,3,4,5]
]
,,,[,,"000|1(?:0[0-35-7]|1[0245]|2[15]|9)|911",,,,"19",,,[2,3]
]
,[,,,,,,,,,[-1]
]
,,,,"AR",,,,,,,,,,,,,,,,,,[,,"10[017]|911",,,,"100",,,[3]
]
,,[,,"000|1(?:0[0-35-7]|1[02-5]|2[15]|9)|3372|89338|911",,,,"19"]
,[,,,,,,,,,[-1]
]
,[,,"893\\d\\d",,,,"89300",,,[5]
]
,,[,,"(?:337|893\\d)\\d",,,,"3370",,,[4,5]
]
]
,"AS":[,[,,"[49]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"911",,,,"911",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AS",,,,,,,,,,,,,,,,,,[,,"911",,,,"911",,,[3]
]
,,[,,"40404|911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"AT":[,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"116\\d{3}|1(?:[12]2|33|44)",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"AT",,,,,,,,,,,,,,,,,,[,,"1(?:[12]2|33|44)",,,,"112",,,[3]
]
,,[,,"116(?:00[06]|1(?:17|23))|1(?:[12]2|33|44)",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AU":[,[,,"[0-27]\\d{2,7}",,,,,,,[3,4,5,6,7,8]
]
,,,[,,"000|1(?:06|12|258885|55\\d)|733",,,,"000",,,[3,4,7]
]
,[,,"1(?:2(?:34|456)|9\\d{4,6})",,,,"1234",,,[4,5,6,7,8]
]
,,,,"AU",,,,,,,,,,,,,,,,,,[,,"000|1(?:06|12)",,,,"000",,,[3]
]
,,[,,"000|1(?:06|1(?:00|2|9[46])|2(?:[23]\\d|(?:4|5\\d)\\d{2,3}|8(?:[013-9]\\d|2))|555|9\\d{4,6})|225|7(?:33|67)",,,,"000"]
,[,,"1(?:1[09]\\d|24733)|225|767",,,,"225",,,[3,4,6]
]
,[,,"1(?:258885|55\\d)",,,,"1550",,,[4,7]
]
,,[,,"19\\d{4,6}",,,,"190000",,,[6,7,8]
]
]
,"AW":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"100|911",,,,"100"]
,[,,,,,,,,,[-1]
]
,,,,"AW",,,,,,,,,,,,,,,,,,[,,"100|911",,,,"100"]
,,[,,"1(?:00|18|76)|91[13]",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"AX":[,[,,"[17]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"112",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AX",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"112|75[12]\\d\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AZ":[,[,,"[148]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:0[1-3]|12)",,,,"101",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"AZ",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"101",,,[3]
]
,,[,,"1(?:0[1-3]|12)|(?:404|880)0",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,"(?:404|880)\\d",,,,"4040",,,[4]
]
,,[,,"(?:404|880)\\d",,,,"4040",,,[4]
]
]
,"BA":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:16\\d{3}|2[2-4])",,,,"122",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"BA",,,,,,,,,,,,,,,,,,[,,"12[2-4]",,,,"122",,,[3]
]
,,[,,"1(?:16(?:00[06]|1(?:1[17]|23))|2(?:0[0-7]|[2-5]|6[0-26])|(?:[3-5]|7\\d)\\d\\d)|1(?:18|2[78])\\d\\d?",,,,"122"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BB":[,[,,"[2-689]\\d\\d",,,,,,,[3]
]
,,,[,,"[2359]11",,,,"211"]
,[,,,,,,,,,[-1]
]
,,,,"BB",,,,,,,,,,,,,,,,,,[,,"[2359]11",,,,"211"]
,,[,,"[2-689]11",,,,"211"]
,[,,,,,,,,,[-1]
]
,[,,"[468]11",,,,"411"]
,,[,,,,,,,,,[-1]
]
]
,"BD":[,[,,"[1579]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"10[0-26]|[19]99",,,,"100",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"BD",,,,,,,,,,,,,,,,,,[,,"10[0-2]|[19]99",,,,"100",,,[3]
]
,,[,,"1(?:0(?:[0-369]|5[1-4]|7[0-4]|8[0-29])|1[16-9]|2(?:[134]|2[0-5])|3(?:1\\d?|6[3-6])|5[2-9])|5012|786|9594|[19]99|1(?:0(?:50|6\\d)|33|4(?:0|1\\d))\\d",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"1(?:11|2[13])|(?:501|959)\\d|786",,,,"111",,,[3,4]
]
,,[,,"959\\d",,,,"9590",,,[4]
]
]
,"BE":[,[,,"[1-9]\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"1(?:0[0-25-8]|1[02]|7(?:12|77)|813)|(?:116|8)\\d{3}",,,,"100"]
,[,,"1(?:2[03]|40)4|(?:1(?:[24]1|3[01])|[2-79]\\d\\d)\\d",,,,"1204",,,[4]
]
,,,,"BE",,,,,,,,,,,,,,,,,,[,,"1(?:0[01]|12)",,,,"100",,,[3]
]
,,[,,"1(?:0[0-8]|1(?:[027]|6117)|2(?:12|3[0-24])|313|414|5(?:1[05]|5[15]|66|95)|6(?:1[167]|36|6[16])|7(?:[07][017]|1[27-9]|22|33|65)|81[39])|[2-9]\\d{3}|1(?:1600|45)0|1(?:[2-4]9|78)9|1[2-4]0[47]",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"[2-9]\\d{3}",,,,"2000",,,[4]
]
]
,"BF":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"1[78]",,,,"17"]
,[,,,,,,,,,[-1]
]
,,,,"BF",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"]
,,[,,"1[78]",,,,"17"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BG":[,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"1(?:1(?:2|6\\d{3})|50|6[06])",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"BG",,,,,,,,,,,,,,,,,,[,,"1(?:12|50|6[06])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:000|111))|50|6[06])",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BH":[,[,,"[0189]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"(?:0[167]|81)\\d{3}|[19]99",,,,"199"]
,[,,"9[148]\\d{3}",,,,"91000",,,[5]
]
,,,,"BH",,,,,,,,,,,,,,,,,,[,,"[19]99",,,,"199",,,[3]
]
,,[,,"1(?:[02]\\d|12|4[01]|51|8[18]|9[169])|99[02489]|(?:0[167]|8[158]|9[148])\\d{3}",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"0[67]\\d{3}|88000|98555",,,,"06000",,,[5]
]
,,[,,"88000|98555",,,,"88000",,,[5]
]
]
,"BI":[,[,,"[16-9]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"11[237]|611",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"BI",,,,,,,,,,,,,,,,,,[,,"11[237]",,,,"112",,,[3]
]
,,[,,"1(?:1\\d|5[2-9]|6[0-256])|611|7(?:10|77|979)|8[28]8|900",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"611|7(?:10|77)|888|900",,,,"611",,,[3]
]
,,[,,"(?:71|90)0",,,,"710",,,[3]
]
]
,"BJ":[,[,,"[17]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"11[78]|7[3-5]\\d\\d",,,,"117"]
,[,,,,,,,,,[-1]
]
,,,,"BJ",,,,,,,,,,,,,,,,,,[,,"11[78]",,,,"117",,,[3]
]
,,[,,"1(?:1[78]|2[02-5]|60)|7[0-5]\\d\\d",,,,"117"]
,[,,,,,,,,,[-1]
]
,[,,"12[02-5]",,,,"120",,,[3]
]
,,[,,,,,,,,,[-1]
]
]
,"BL":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"18",,,,"18"]
,[,,,,,,,,,[-1]
]
,,,,"BL",,,,,,,,,,,,,,,,,,[,,"18",,,,"18"]
,,[,,"18",,,,"18"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BM":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"BM",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"176|911",,,,"176"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"BN":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"99[135]",,,,"991"]
,[,,,,,,,,,[-1]
]
,,,,"BN",,,,,,,,,,,,,,,,,,[,,"99[135]",,,,"991"]
,,[,,"99[135]",,,,"991"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BO":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[089]",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"BO",,,,,,,,,,,,,,,,,,[,,"11[089]",,,,"110",,,[3]
]
,,[,,"11[089]|40404",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"BQ":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"112|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"BQ",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112"]
,,[,,"1(?:12|76)|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"BR":[,[,,"[1-69]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:00|12|28|8[015]|9[0-47-9])|4(?:57|82\\d)|911",,,,"100",,,[3,4]
]
,[,,,,,,,,,[-1]
]
,,,,"BR",,,,,,,,,,,,,,,,,,[,,"1(?:12|28|9[023])|911",,,,"112",,,[3]
]
,,[,,"1(?:0(?:[02]|3(?:1[2-579]|2[13-9]|3[124-9]|4[1-3578]|5[1-468]|6[139]|8[149]|9[168])|5[0-35-9]|6(?:0|1[0-35-8]?|2[0145]|3[0137]?|4[37-9]?|5[0-35]|6[016]?|7[137]?|8[5-8]|9[1359]))|1[25-8]|2[357-9]|3[024-68]|4[12568]|5\\d|6[0-8]|8[015]|9[0-47-9])|2(?:7(?:330|878)|85959?)|(?:32|91)1|4(?:0404?|57|828)|55555|6(?:0\\d{4}|10000)|(?:133|411)[12]",,,,"100"]
,[,,"102|273\\d\\d|321",,,,"102",,,[3,5]
]
,[,,"151|(?:278|555)\\d\\d|4(?:04\\d\\d?|11\\d|57)",,,,"151",,,[3,4,5]
]
,,[,,"285\\d{2,3}|321|40404|(?:27[38]\\d|482)\\d|6(?:0\\d|10)\\d{3}",,,,"321"]
]
,"BS":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"91[19]",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"BS",,,,,,,,,,,,,,,,,,[,,"91[19]",,,,"911"]
,,[,,"91[19]",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BT":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[023]",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"BT",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"110",,,[3]
]
,,[,,"11[0-6]|40404",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"BW":[,[,,"[19]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"99[7-9]",,,,"997",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"BW",,,,,,,,,,,,,,,,,,[,,"99[7-9]",,,,"997",,,[3]
]
,,[,,"13123|99[7-9]",,,,"997"]
,[,,,,,,,,,[-1]
]
,[,,"131\\d\\d",,,,"13100",,,[5]
]
,,[,,"131\\d\\d",,,,"13100",,,[5]
]
]
,"BY":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:0[1-3]|12)",,,,"101"]
,[,,,,,,,,,[-1]
]
,,,,"BY",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"101"]
,,[,,"1(?:0[1-79]|1[246]|35|5[1-35]|6[89]|7[5-7]|8[58]|9[1-7])",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"BZ":[,[,,"9\\d\\d?",,,,,,,[2,3]
]
,,,[,,"9(?:0|11)",,,,"90"]
,[,,,,,,,,,[-1]
]
,,,,"BZ",,,,,,,,,,,,,,,,,,[,,"9(?:0|11)",,,,"90"]
,,[,,"9(?:0|11)",,,,"90"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CA":[,[,,"[1-9]\\d\\d(?:\\d\\d(?:\\d(?:\\d{2})?)?)?",,,,,,,[3,5,6,8]
]
,,,[,,"112|[29]11",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CA",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112",,,[3]
]
,,[,,"112|30000\\d{3}|[1-35-9]\\d{4,5}|[2-9]11",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"[235-7]11",,,,"211",,,[3]
]
,,[,,"300\\d{5}|[1-35-9]\\d{4,5}",,,,"10000",,,[5,6,8]
]
]
,"CC":[,[,,"[01]\\d\\d",,,,,,,[3]
]
,,,[,,"000|112",,,,"000"]
,[,,,,,,,,,[-1]
]
,,,,"CC",,,,,,,,,,,,,,,,,,[,,"000|112",,,,"000"]
,,[,,"000|112",,,,"000"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CD":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"1(?:1[348]|77|88)",,,,"113",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CD",,,,,,,,,,,,,,,,,,[,,"1(?:1[348]|77|88)",,,,"113",,,[3]
]
,,[,,"1(?:1[348]|23|77|88)|40404",,,,"113"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"CF":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1[78]|22\\d)",,,,"117"]
,[,,,,,,,,,[-1]
]
,,,,"CF",,,,,,,,,,,,,,,,,,[,,"1(?:1[78]|220)",,,,"117"]
,,[,,"1(?:1[478]|220)",,,,"114"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CG":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[178]",,,,"111"]
,[,,,,,,,,,[-1]
]
,,,,"CG",,,,,,,,,,,,,,,,,,[,,"11[78]",,,,"117"]
,,[,,"11[126-8]",,,,"111"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CH":[,[,,"[1-9]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1(?:[278]|6\\d{3})|4[47])|5200",,,,"112",,,[3,4,6]
]
,[,,"1(?:14|8[01589])\\d|543|83111",,,,"543",,,[3,4,5]
]
,,,,"CH",,,,,,,,,,,,,,,,,,[,,"1(?:1[278]|44)",,,,"112",,,[3]
]
,,[,,"1(?:0[78]\\d\\d|1(?:[278]|45|6(?:000|111))|4(?:[03-57]|1[45])|6(?:00|[1-46])|8(?:02|1[189]|50|7|8[08]|99))|[2-9]\\d{2,4}",,,,"112"]
,[,,"1(?:4[035]|6[1-46])|1(?:41|60)\\d",,,,"140",,,[3,4]
]
,[,,"5(?:200|35)",,,,"535",,,[3,4]
]
,,[,,"[2-9]\\d{2,4}",,,,"200",,,[3,4,5]
]
]
,"CI":[,[,,"[14]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1[01]|[78]0)",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CI",,,,,,,,,,,,,,,,,,[,,"1(?:1[01]|[78]0)",,,,"110",,,[3]
]
,,[,,"1(?:1[01]|[78]0)|4443",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"444\\d",,,,"4440",,,[4]
]
,,[,,"444\\d",,,,"4440",,,[4]
]
]
,"CK":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"99[689]",,,,"996"]
,[,,,,,,,,,[-1]
]
,,,,"CK",,,,,,,,,,,,,,,,,,[,,"99[689]",,,,"996"]
,,[,,"99[689]",,,,"996"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CL":[,[,,"[1-9]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:213|3[1-3])|434\\d|911",,,,"131",,,[3,4]
]
,[,,"1(?:211|3(?:13|[348]0|5[01]))|(?:1(?:[05]6|[48]1|9[18])|2(?:01\\d|[23]2|77|88)|3(?:0[59]|13|3[279]|66)|4(?:[12]4|36\\d|4[017]|55)|5(?:00|41\\d|5[67]|99)|6(?:07\\d|13|22|3[06]|50|69)|787|8(?:[01]1|[48]8)|9(?:01|[12]0|33))\\d",,,,"1060",,,[4,5]
]
,,,,"CL",,,,,,,,,,,,,,,,,,[,,"13[1-3]|911",,,,"131",,,[3]
]
,,[,,"1(?:00|21[13]|3(?:13|[348]0|5[01])|4(?:0[02-6]|17|[379])|818|919)|2(?:0(?:01|122)|22[47]|323|777|882)|3(?:0(?:51|99)|132|3(?:29|[37]7)|665)|43656|5(?:(?:00|415)4|5(?:66|77)|995)|6(?:131|222|366|699)|7878|8(?:011|11[28]|482|889)|9(?:01|1)1|13\\d|4(?:[13]42|243|4(?:02|15|77)|554)|(?:1(?:[05]6|98)|339|6(?:07|[35])0|9(?:[12]0|33))0",,,,"100"]
,[,,"(?:200|333)\\d",,,,"2000",,,[4]
]
,[,,,,,,,,,[-1]
]
,,[,,"13(?:13|[348]0|5[01])|(?:1(?:[05]6|[28]1|4[01]|9[18])|2(?:0(?:0|1\\d)|[23]2|77|88)|3(?:0[59]|13|3[2379]|66)|436\\d|5(?:00|41\\d|5[67]|99)|6(?:07\\d|13|22|3[06]|50|69)|787|8(?:[01]1|[48]8)|9(?:01|[12]0|33))\\d|4(?:[1-3]4|4[017]|55)\\d",,,,"1060",,,[4,5]
]
]
,"CM":[,[,,"[18]\\d{1,3}",,,,,,,[2,3,4]
]
,,,[,,"1(?:1[37]|[37])",,,,"13",,,[2,3]
]
,[,,,,,,,,,[-1]
]
,,,,"CM",,,,,,,,,,,,,,,,,,[,,"1(?:1[37]|[37])",,,,"13",,,[2,3]
]
,,[,,"1(?:1[37]|[37])|8711",,,,"13"]
,[,,,,,,,,,[-1]
]
,[,,"871\\d",,,,"8710",,,[4]
]
,,[,,"871\\d",,,,"8710",,,[4]
]
]
,"CN":[,[,,"[19]\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"1(?:1[09]|20)",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CN",,,,,,,,,,,,,,,,,,[,,"1(?:1[09]|20)",,,,"110",,,[3]
]
,,[,,"1(?:00\\d\\d|1[029]|20)|95\\d{3,4}",,,,"110"]
,[,,"1(?:00\\d\\d|12)|95\\d{3,4}",,,,"112"]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CO":[,[,,"[148]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"1(?:1[29]|23|32|56)",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CO",,,,,,,,,,,,,,,,,,[,,"1(?:1[29]|23|32|56)",,,,"112",,,[3]
]
,,[,,"1(?:06|1[2-9]|2[35-7]|3[27]|4[467]|5[36]|6[4-7]|95)|40404|85432",,,,"106"]
,[,,,,,,,,,[-1]
]
,[,,"(?:40|85)4\\d\\d",,,,"40400",,,[5]
]
,,[,,"(?:40|85)4\\d\\d",,,,"40400",,,[5]
]
]
,"CR":[,[,,"[1359]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"112|911",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"CR",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112",,,[3]
]
,,[,,"1(?:0(?:00|15|2[2-4679])|1(?:1[0-35-9]|2|37|[46]6|7[57]|8[79]|9[0-379])|2(?:00|[12]2|34|55)|3(?:21|33)|4(?:0[06]|1[4-6])|5(?:15|5[15])|693|7(?:00|1[7-9]|2[02]|[67]7)|975)|3855|5(?:0(?:30|49)|510)|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"(?:385|5(?:0[34]|51))\\d",,,,"3850",,,[4]
]
]
,"CU":[,[,,"[12]\\d\\d(?:\\d{3,4})?",,,,,,,[3,6,7]
]
,,,[,,"10[4-7]|(?:116|204\\d)\\d{3}",,,,"104"]
,[,,,,,,,,,[-1]
]
,,,,"CU",,,,,,,,,,,,,,,,,,[,,"10[4-6]",,,,"104",,,[3]
]
,,[,,"1(?:0[4-7]|1(?:6111|8)|40)|2045252",,,,"104"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CV":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"13[0-2]",,,,"130"]
,[,,,,,,,,,[-1]
]
,,,,"CV",,,,,,,,,,,,,,,,,,[,,"13[0-2]",,,,"130"]
,,[,,"13[0-2]",,,,"130"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CW":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"112|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"CW",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112"]
,,[,,"1(?:12|76)|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"CX":[,[,,"[01]\\d\\d",,,,,,,[3]
]
,,,[,,"000|112",,,,"000"]
,[,,,,,,,,,[-1]
]
,,,,"CX",,,,,,,,,,,,,,,,,,[,,"000|112",,,,"000"]
,,[,,"000|112",,,,"000"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CY":[,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"1(?:1(?:2|6\\d{3})|99)",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"CY",,,,,,,,,,,,,,,,,,[,,"1(?:12|99)",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:000|111))|99)",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"CZ":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1(?:2|6(?:00[06]|1(?:11|23)))|5[0568])",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"CZ",,,,,,,,,,,,,,,,,,[,,"1(?:12|5[0568])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|8\\d)|(?:2|3\\d)\\d{2,3}|5[0568]|99)|1(?:16|4)\\d{3}",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"DE":[,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"11(?:[02]|6\\d{3})",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"DE",,,,,,,,,,,,,,,,,,[,,"11[02]",,,,"110",,,[3]
]
,,[,,"11(?:[025]|6(?:00[06]|1(?:1[167]|23)))",,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,,,,,,[,,"1[47]",,,,"14",,,[2]
]
,,[,,"1[47]|730",,,,"14"]
,[,,,,,,,,,[-1]
]
,[,,"730",,,,"730",,,[3]
]
,,[,,"730",,,,"730",,,[3]
]
]
,"EC":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:0[12]|12)|911",,,,"101"]
,[,,,,,,,,,[-1]
]
,,,,"EC",,,,,,,,,,,,,,,,,,[,,"1(?:0[12]|12)|911",,,,"101"]
,,[,,"1(?:0[12]|12)|911",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"EE":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1(?:[02]|6\\d{3})|2(?:05|28)|3(?:014|3(?:21|5\\d?)|660)|492|5(?:1[03]|410|501)|6(?:112|333|644)|7(?:012|127|89)|8(?:10|8[57])|9(?:0[134]|14))",,,,"110"]
,[,,"1(?:18(?:00|[12458]\\d?)|2(?:0(?:[02-46-8]\\d?|1[0-36])|1(?:[0-4]\\d?|6[06])|2(?:[0-4]\\d?|5[25])|[367]|4(?:0[04]|[12]\\d?|4[24]|54)|55[12457])|3(?:0(?:[02]\\d?|1[13578]|3[356])|1[1347]|2[02-5]|3(?:[01347]\\d?|2[023]|88)|4(?:[35]\\d?|4[34])|5(?:3[134]|5[035])|666)|4(?:2(?:00|4\\d?)|4(?:0[01358]|1[024]|50|7\\d?)|900)|5(?:0[0-35]|1(?:[1267]\\d?|5[0-7]|82)|2(?:[014-6]\\d?|22)|330|4(?:[35]\\d?|44)|5(?:00|[1-69]\\d?)|9(?:[159]\\d?|[38]0|77))|6(?:1(?:00|1[19]|[35-9]\\d?)|2(?:2[26]|[68]\\d?)|3(?:22|36|6[36])|5|6(?:[0-359]\\d?|6[0-26])|7(?:00|55|7\\d?|8[89])|9(?:00|1\\d?|69))|7(?:0(?:[023]\\d?|1[0578])|1(?:00|2[034]|[4-9]\\d?)|2(?:[07]\\d?|20|44)|7(?:[0-57]\\d?|9[79])|8(?:0[08]|2\\d?|8[0178])|9(?:00|97))|8(?:1[127]|8[1268]|9[269])|9(?:0(?:[02]\\d?|69|9[0269])|1[1-3689]|21))",,,,"123",,,[3,4,5]
]
,,,,"EE",,,,,,,,,,,,,,,,,,[,,"11[02]",,,,"110",,,[3]
]
,,[,,"1(?:1(?:[02-579]|6(?:000|111)|8(?:[09]\\d|[1-8]))|2[36-9]|3[7-9]|4[05-7]|5[6-8]|6[05]|7[3-6]|8[02-7]|9[3-9])|1(?:2[0-245]|3[0-6]|4[1-489]|5[0-59]|6[1-46-9]|7[0-27-9]|8[189]|9[0-2])\\d\\d?",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"1(?:18[1258]|2(?:0(?:1[036]|[46]\\d?)|166|21|4(?:0[04]|1\\d?|5[47])|[67])|3(?:0(?:1[13-578]|2\\d?|3[56])|1[15]|2[045]|3(?:[13]\\d?|2[13])|43|5(?:00|3[34]|53))|44(?:0[0135]|14|50|7\\d?)|5(?:05|1(?:[12]\\d?|5[1246]|8[12])|2(?:[01]\\d?|22)|3(?:00|3[03])|4(?:15|5\\d?)|500|9(?:5\\d?|77|80))|6(?:1[35-8]|226|3(?:22|3[36]|66)|644|7(?:00|7\\d?|89)|9(?:00|69))|7(?:01[258]|1(?:00|[15]\\d?)|2(?:44|7\\d?)|8(?:00|87|9\\d?))|8(?:1[128]|8[56]|9(?:[26]\\d?|77))|90(?:2\\d?|69|92))",,,,"126",,,[3,4,5]
]
]
,"EG":[,[,,"[13]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"1(?:2[23]|80)",,,,"122",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"EG",,,,,,,,,,,,,,,,,,[,,"1(?:2[23]|80)",,,,"122",,,[3]
]
,,[,,"1(?:2[23]|[69]\\d{3}|80)|34400",,,,"122"]
,[,,,,,,,,,[-1]
]
,[,,"344\\d\\d",,,,"34400",,,[5]
]
,,[,,"344\\d\\d",,,,"34400",,,[5]
]
]
,"EH":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:[59]|77)",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"EH",,,,,,,,,,,,,,,,,,[,,"1(?:[59]|77)",,,,"15"]
,,[,,"1(?:[59]|77)",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ER":[,[,,"[12]\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"11[2-46]|(?:12[47]|20[12])\\d{3}",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"ER",,,,,,,,,,,,,,,,,,[,,"1(?:1[2-46]|24422)|20(?:1(?:606|917)|2914)|(?:1277|2020)99",,,,"112"]
,,[,,"1(?:1[2-6]|24422)|20(?:1(?:606|917)|2914)|(?:1277|2020)99",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ES":[,[,,"[0-379]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"0(?:16|6[57]|8[58])|1(?:006|12|[3-7]\\d\\d)|(?:116|20\\d)\\d{3}",,,,"016",,,[3,4,6]
]
,[,,"[12]2\\d{1,4}|90(?:5\\d|7)|(?:118|2(?:[357]\\d|80)|3[357]\\d)\\d\\d|[79]9[57]\\d{3}",,,,"120"]
,,,,"ES",,,,,,,,,,,,,,,,,,[,,"08[58]|112",,,,"085",,,[3]
]
,,[,,"0(?:1[0-26]|6[0-257]|8[058]|9[12])|1(?:0[03-57]\\d{1,3}|1(?:2|6(?:000|111)|8\\d\\d)|2\\d{1,4}|[3-9]\\d\\d)|2(?:2\\d{1,4}|80\\d\\d)|90(?:5[124578]|7)|1(?:3[34]|77)|(?:2[01]\\d|[79]9[57])\\d{3}|[23][357]\\d{3}",,,,"010"]
,[,,"0(?:[16][0-2]|80|9[12])|21\\d{4}",,,,"010",,,[3,6]
]
,[,,"1(?:3[34]|77)|[12]2\\d{1,4}",,,,"120"]
,,[,,"(?:2[0-2]\\d|3[357]|[79]9[57])\\d{3}|2(?:[2357]\\d|80)\\d\\d",,,,"22000",,,[5,6]
]
]
,"ET":[,[,,"9\\d\\d?",,,,,,,[2,3]
]
,,,[,,"9(?:07|11?|2|39?|9[17])",,,,"91"]
,[,,,,,,,,,[-1]
]
,,,,"ET",,,,,,,,,,,,,,,,,,[,,"9(?:11?|2|39?|9[17])",,,,"91"]
,,[,,"9(?:07|11?|2|39?|45|9[17])",,,,"91"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"FI":[,[,,"[17]\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"11(?:2|6\\d{3})",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"FI",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"11(?:2|6111)|75[12]\\d\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"FJ":[,[,,"[0-579]\\d(?:\\d(?:\\d{2})?)?",,,,,,,[2,3,5]
]
,,,[,,"91[17]",,,,"911",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"FJ",,,,,,,,,,,,,,,,,,[,,"91[17]",,,,"911",,,[3]
]
,,[,,"0(?:1[34]|8[1-4])|1(?:0[1-3]|[25]9)|2[289]|30|40404|91[137]|[45]4|75",,,,"22"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"FK":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"FK",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"1\\d\\d|999",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"FM":[,[,,"[39]\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"320\\d{3}|911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"FM",,,,,,,,,,,,,,,,,,[,,"(?:32022|91)1",,,,"911"]
,,[,,"(?:32022|91)1",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"FO":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"11[24]",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"FO",,,,,,,,,,,,,,,,,,[,,"11[24]",,,,"112",,,[3]
]
,,[,,"11[248]|1(?:4[124]|71|8[7-9])\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"FR":[,[,,"[1-8]\\d{1,5}",,,,,,,[2,3,4,5,6]
]
,,,[,,"1(?:0(?:07|[13]3)|1[02459]|[578]|9[167])|224|(?:3370|74)0|(?:116\\d|3[01])\\d\\d",,,,"15"]
,[,,"(?:118|[4-8]\\d)\\d{3}|36665",,,,"36665",,,[5,6]
]
,,,,"FR",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",,,,"15",,,[2,3]
]
,,[,,"1(?:0\\d\\d|1(?:[02459]|6(?:000|111)|8\\d{3})|[578]|9[167])|2(?:0(?:00|2)0|24)|[3-8]\\d{4}|3\\d{3}|6(?:1[14]|34)|7(?:0[06]|22|40)",,,,"15"]
,[,,"10(?:[134]4|2[23]|5\\d|99)|202\\d|3(?:646|9[07]0)|634|70[06]|(?:106|61)[14]",,,,"611",,,[3,4]
]
,[,,"118777|224|6(?:1[14]|34)|7(?:0[06]|22|40)|20(?:0\\d|2)\\d",,,,"224",,,[3,4,5,6]
]
,,[,,"114|[3-8]\\d{4}",,,,"114",,,[3,5]
]
]
,"GA":[,[,,"1\\d(?:\\d{2})?",,,,,,,[2,4]
]
,,,[,,"18|1(?:3\\d|73)\\d",,,,"18"]
,[,,,,,,,,,[-1]
]
,,,,"GA",,,,,,,,,,,,,,,,,,[,,"1(?:3\\d\\d|730|8)",,,,"18"]
,,[,,"1(?:3\\d\\d|730|8)",,,,"18"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GB":[,[,,"[1-46-9]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:05|1(?:2|6\\d{3})|7[56]\\d|8000)|2(?:20\\d|48)|4444|999",,,,"105"]
,[,,,,,,,,,[-1]
]
,,,,"GB",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]
]
,,[,,"1(?:0[015]|1(?:[12]|6(?:000|1(?:11|23))|8\\d{3})|2(?:[1-3]|50)|33|4(?:1|7\\d)|571|7(?:0\\d|[56]0)|800\\d|9[15])|2(?:0202|1300|2(?:02|11)|3(?:02|336|45)|4(?:25|8))|3[13]3|4(?:0[02]|35[01]|44[45]|5\\d)|(?:[68]\\d|7[089])\\d{3}|15\\d|2[02]2|650|789|9(?:01|99)",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"1(?:(?:25|7[56])\\d|571)|2(?:02(?:\\d{2})?|[13]3\\d\\d|48)|4444|901",,,,"202",,,[3,4,5]
]
,,[,,"(?:125|2(?:020|13\\d)|(?:7[089]|8[01])\\d\\d)\\d",,,,"1250",,,[4,5]
]
]
,"GD":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"GD",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"176|911",,,,"176"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"GE":[,[,,"[014]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"0(?:11|33)|11[1-3]|[01]22",,,,"011",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"GE",,,,,,,,,,,,,,,,,,[,,"0(?:11|33)|11[1-3]|[01]22",,,,"011",,,[3]
]
,,[,,"0(?:11|33)|11[1-3]|40404|[01]22",,,,"011"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"GF":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"GF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"]
,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GG":[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"112|999",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"GG",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]
]
,,[,,"1(?:0[01]|1[12]|23|41|55|9[05])|999|1(?:1[68]\\d\\d|47|800)\\d",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GH":[,[,,"[14589]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"19[1-3]|999",,,,"191",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"GH",,,,,,,,,,,,,,,,,,[,,"19[1-3]|999",,,,"191",,,[3]
]
,,[,,"19[1-3]|40404|(?:54|83)00|999",,,,"191"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d|(?:54|83)0\\d",,,,"5400",,,[4,5]
]
,,[,,"404\\d\\d|(?:54|83)0\\d",,,,"5400",,,[4,5]
]
]
,"GI":[,[,,"[158]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:00|1[25]|23|4(?:1|7\\d)|5[15]|9[02-49])|555|(?:116\\d|80)\\d\\d",,,,"100",,,[3,4,6]
]
,[,,"8[1-69]\\d\\d",,,,"8100",,,[4]
]
,,,,"GI",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[09])",,,,"112",,,[3]
]
,,[,,"1(?:00|1(?:[25]|6(?:00[06]|1(?:1[17]|23))|8\\d\\d)|23|4(?:1|7[014])|5[015]|9[02-49])|555|8[0-79]\\d\\d|8(?:00|4[0-2]|8[0-589])",,,,"100"]
,[,,"150|87\\d\\d",,,,"150",,,[3,4]
]
,[,,"1(?:00|1(?:5|8\\d\\d)|23|51|9[2-4])|555|8(?:00|4[0-2]|8[0-589])",,,,"100",,,[3,5]
]
,,[,,,,,,,,,[-1]
]
]
,"GL":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"112",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"GL",,,,,,,,,,,,,,,,,,[,,"112",,,,"112"]
,,[,,"112",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GM":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:1[6-8]|[6-8])",,,,"16"]
,[,,,,,,,,,[-1]
]
,,,,"GM",,,,,,,,,,,,,,,,,,[,,"1(?:1[6-8]|[6-8])",,,,"16"]
,,[,,"1(?:1[6-8]|[6-8])",,,,"16"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GN":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,,"GN",,,,,,,,,,,,,,,,,,[,,,,,,,,,[-1]
]
,,[,,"12\\d|40404",,,,"120"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"GP":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"GP",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"]
,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GR":[,[,,"1\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"1(?:0[089]|1(?:2|6\\d{3})|66|99)",,,,"100",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"GR",,,,,,,,,,,,,,,,,,[,,"1(?:00|12|66|99)",,,,"100",,,[3]
]
,,[,,"1(?:0[089]|1(?:2|320|6(?:000|1(?:1[17]|23)))|(?:389|9)9|66)",,,,"100"]
,[,,"113\\d\\d",,,,"11300",,,[5]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GT":[,[,,"[14]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:10|2[03])",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"GT",,,,,,,,,,,,,,,,,,[,,"1(?:10|2[03])",,,,"110",,,[3]
]
,,[,,"110|40404|1(?:2|[57]\\d)\\d",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"GU":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"GU",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GW":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[378]",,,,"113"]
,[,,,,,,,,,[-1]
]
,,,,"GW",,,,,,,,,,,,,,,,,,[,,"11[378]",,,,"113"]
,,[,,"11[378]",,,,"113"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"GY":[,[,,"[019]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"91[1-3]",,,,"911",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"GY",,,,,,,,,,,,,,,,,,[,,"91[1-3]",,,,"911",,,[3]
]
,,[,,"0(?:02|(?:17|80)1|444|7(?:[67]7|9)|9(?:0[78]|[2-47]))|1(?:443|5[568])|91[1-3]",,,,"002"]
,[,,,,,,,,,[-1]
]
,[,,"144\\d",,,,"1440",,,[4]
]
,,[,,"144\\d",,,,"1440",,,[4]
]
]
,"HK":[,[,,"[19]\\d{2,6}",,,,,,,[3,4,5,6,7]
]
,,,[,,"112|99[29]",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"HK",,,,,,,,,,,,,,,,,,[,,"112|99[29]",,,,"112",,,[3]
]
,,[,,"1(?:0(?:(?:[0136]\\d|2[14])\\d{0,3}|8[138])|12|2(?:[0-3]\\d{0,4}|(?:58|8[13])\\d{0,3})|7(?:[135-9]\\d{0,4}|219\\d{0,2})|8(?:0(?:(?:[13]|60\\d)\\d|8)|1(?:0\\d|[2-8])|2(?:0[5-9]|(?:18|2)2|3|8[128])|(?:(?:3[0-689]\\d|7(?:2[1-389]|8[0235-9]|93))\\d|8)\\d|50[138]|6(?:1(?:11|86)|8)))|99[29]|10[0139]",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"109|1(?:08|85\\d)\\d",,,,"109",,,[3,4,5]
]
,,[,,"992",,,,"992",,,[3]
]
]
,"HN":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"199",,,,"199",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"HN",,,,,,,,,,,,,,,,,,[,,"199",,,,"199",,,[3]
]
,,[,,"199|40404",,,,"199"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"HR":[,[,,"[19]\\d{1,5}",,,,,,,[2,3,4,5,6]
]
,,,[,,"1(?:12|9[2-4])|9[34]|1(?:16\\d|39)\\d\\d",,,,"93",,,[2,3,5,6]
]
,[,,"118\\d\\d",,,,"11800",,,[5]
]
,,,,"HR",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[2-4])|9[34]",,,,"93",,,[2,3]
]
,,[,,"1(?:1(?:2|6(?:00[06]|1(?:1[17]|23))|8\\d\\d)|3977|9(?:[2-5]|87))|9[34]",,,,"93"]
,[,,,,,,,,,[-1]
]
,[,,"139\\d\\d",,,,"13900",,,[5]
]
,,[,,"139\\d\\d",,,,"13900",,,[5]
]
]
,"HT":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[48]",,,,"114",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"HT",,,,,,,,,,,,,,,,,,[,,"11[48]",,,,"114",,,[3]
]
,,[,,"11[48]|40404",,,,"114"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"HU":[,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"1(?:0[457]|1(?:2|6\\d{3}))",,,,"104"]
,[,,,,,,,,,[-1]
]
,,,,"HU",,,,,,,,,,,,,,,,,,[,,"1(?:0[457]|12)",,,,"104",,,[3]
]
,,[,,"1(?:0[457]|1(?:2|6(?:000|1(?:11|23))))",,,,"104"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ID":[,[,,"[178]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[02389]",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"ID",,,,,,,,,,,,,,,,,,[,,"11[02389]",,,,"110",,,[3]
]
,,[,,"1(?:1[02389]|40\\d\\d)|71400|89887",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"(?:714|898)\\d\\d",,,,"71400",,,[5]
]
,,[,,"714\\d\\d",,,,"71400",,,[5]
]
]
,"IE":[,[,,"[159]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:2|6\\d{3})|999",,,,"112",,,[3,6]
]
,[,,"5[37]\\d{3}",,,,"53000",,,[5]
]
,,,,"IE",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]
]
,,[,,"11(?:2|6(?:00[06]|1(?:1[17]|23)))|999|(?:1(?:18|9)|5[0137]\\d)\\d\\d",,,,"112"]
,[,,"51\\d{3}",,,,"51000",,,[5]
]
,[,,"51210",,,,"51210",,,[5]
]
,,[,,"51210|(?:118|5[037]\\d)\\d\\d",,,,"11800",,,[5]
]
]
,"IL":[,[,,"[12]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:0[0-2]|12)",,,,"100",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"IL",,,,,,,,,,,,,,,,,,[,,"1(?:0[0-2]|12)",,,,"100",,,[3]
]
,,[,,"1(?:0[0-2]|1(?:[013-9]\\d|2)|[2-9]\\d\\d)|2407|(?:104|27)00",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"104\\d\\d",,,,"10400",,,[5]
]
,,[,,"104\\d\\d",,,,"10400",,,[5]
]
]
,"IM":[,[,,"[189]\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"999",,,,"999",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"IM",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]
]
,,[,,"1\\d\\d(?:\\d{3})?|8(?:6444|9887)|999",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"8(?:64|98)\\d\\d",,,,"86400",,,[5]
]
]
,"IN":[,[,,"[12578]\\d{2,8}",,,,,,,[3,4,5,6,7,8,9]
]
,,,[,,"1(?:0[0-248]|1[289]|21|[39][89]|4[01]|6(?:1|6\\d?)|8[12])|777|800|1[05]5\\d|1(?:07|51|94)\\d\\d?|(?:1(?:[05]5\\d|70)\\d|261)\\d|1(?:0[369]|10|29|3[126]|9[0-256])\\d",,,,"100",,,[3,4,5,6]
]
,[,,"11[67]\\d{4}|56161561",,,,"1160000",,,[7,8]
]
,,,,"IN",,,,,,,,,,,,,,,,,,[,,"1(?:0[0-28]|12|298)|2611",,,,"100",,,[3,4]
]
,,[,,"1(?:0(?:[0-248]|3[39]|5(?:010|6)|6[3468]|7(?:[01357]|[28]0?|4[01])|9[0135-9])|1(?:00|[289])|2(?:1|98)|3(?:11|2[0-2]|63|[89])|4[01]|5(?:1(?:0[0-36]|[127])|54)|6(?:1|6[01]?)|7000|8[12]|9(?:0[013-59]|12|25|4[4-9]\\d?|50|6[1347]|[89]))|2611|5(?:0(?:0(?:0\\d|1|20?)|325|5[2-79]\\d{3,5})|1(?:234|555|717|818|96[49])|2(?:0(?:0[01]|[14]0)|151|555|666|888|9(?:06|99\\d?))|3(?:0[01]0|131|553|(?:66|77)6)|(?:464|55[05])\\d{1,3}|6(?:070|3[68]|43)|717\\d)|777|800|5(?:05(?:0|1\\d)|221|3(?:03|3[23]))\\d{1,4}|5(?:(?:04|88)0|2(?:2[0267]|3[16])|4(?:1[04]|20|3[02])|5(?:3[16]|67)|6(?:06|[67]\\d)|787|9(?:64|90))\\d\\d?|(?:1(?:05[79]|(?:1[67][0-2]|802)\\d|55[23])\\d|5(?:(?:00(?:0\\d|1)|(?:304|616)\\d\\d)\\d|1(?:0[12]|4[2-4])|2(?:2[3589]|3(?:1\\d{3}|2)|4[04]|7[78])|4(?:[02]4|32\\d{4}|4[04]|99)|5(?:1[25]|[36]5|4[45]|93)|7(?:(?:17\\d|57)\\d\\d|[27]7|88)|8(?:3[4-69]|4[01]|5[58]|88(?:8\\d\\d|9)|99)|9(?:0(?:0|2\\d{3})|55|6[67]|77|88)))\\d",,,,"100"]
,[,,"5(?:14(?:2[5-9]|[34]\\d)|757555)",,,,"51425",,,[5,7]
]
,[,,"1(?:(?:1[67]\\d\\d|70)\\d\\d|55330|909)|5(?:300\\d|6161(?:17[89]|561))|1(?:[19][89]|21|4[01])",,,,"118",,,[3,4,5,6,7,8]
]
,,[,,"1(?:39|90[019])|5(?:14(?:2[5-9]|[34]\\d)|6161(?:17[89]|561)|757555)",,,,"139",,,[3,4,5,7,8]
]
]
,"IQ":[,[,,"[1479]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:0[04]|15|22)",,,,"100",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"IQ",,,,,,,,,,,,,,,,,,[,,"1(?:0[04]|15|22)",,,,"100",,,[3]
]
,,[,,"1(?:0[04]|15|22)|4432|71117|9988",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"(?:443|711\\d|998)\\d",,,,"4430",,,[4,5]
]
,,[,,"(?:443|711\\d|998)\\d",,,,"4430",,,[4,5]
]
]
,"IR":[,[,,"[129]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1[0-68]|2[0-59]|9[0-579])|911",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"IR",,,,,,,,,,,,,,,,,,[,,"1(?:1[025]|25)|911",,,,"110",,,[3]
]
,,[,,"1(?:1[0-68]|2[0-59]|3[346-8]|4(?:[0147]|[289]0)|5(?:0[14]|1[02479]|2[0-3]|39|[49]0|65)|6(?:[16]6|[27]|90)|8(?:03|1[18]|22|3[37]|4[28]|88|99)|9[0-579])|20(?:[09]0|1(?:[038]|1[079]|26|9[69])|2[01])|9(?:11|9(?:0009|90))",,,,"110"]
,[,,"1(?:5[0-469]|8[0-489])\\d",,,,"1500",,,[4]
]
,[,,"(?:1(?:5[0-469]|8[0-489])|99(?:0\\d\\d|9))\\d",,,,"1500",,,[4,6]
]
,,[,,"990\\d{3}",,,,"990000",,,[6]
]
]
,"IS":[,[,,"1\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"1(?:12|71\\d)",,,,"112",,,[3,4]
]
,[,,,,,,,,,[-1]
]
,,,,"IS",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"1(?:1(?:[28]|61(?:16|23))|4(?:00|1[145]|4[0146])|55|7(?:00|17|7[07-9])|8(?:[02]0|1[16-9]|88)|900)",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"14(?:0\\d|41)",,,,"1400",,,[4]
]
,,[,,"1(?:415|90\\d)",,,,"1415",,,[4]
]
]
,"IT":[,[,,"[14]\\d{2,6}",,,,,,,[3,4,5,6,7]
]
,,,[,,"1(?:1(?:[2358]|6\\d{3})|87)",,,,"112",,,[3,6]
]
,[,,"(?:12|4(?:[478](?:[0-4]|[5-9]\\d\\d)|55))\\d\\d",,,,"1200",,,[4,5,7]
]
,,,,"IT",,,,,,,,,,,,,,,,,,[,,"11[2358]",,,,"112",,,[3]
]
,,[,,"1(?:0\\d{2,3}|1(?:[2-57-9]|6(?:000|111))|3[39]|4(?:82|9\\d{1,3})|5(?:00|1[58]|2[25]|3[03]|44|[59])|60|8[67]|9(?:[01]|2[2-9]|4\\d|696))|4(?:2323|5045)|(?:1(?:2|92[01])|4(?:3(?:[01]|[45]\\d\\d)|[478](?:[0-4]|[5-9]\\d\\d)|55))\\d\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"4(?:3(?:[01]|[45]\\d\\d)|[478](?:[0-4]|[5-9]\\d\\d)|5[05])\\d\\d",,,,"43000",,,[5,7]
]
]
,"JE":[,[,,"[129]\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"112|999",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"JE",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]
]
,,[,,"1(?:00|1(?:2|8\\d{3})|23|4(?:[14]|28|7\\d)|5\\d|7(?:0[12]|[128]|35?)|808|9[0135])|23[2-4]|999",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"JM":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"11[029]|911",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"JM",,,,,,,,,,,,,,,,,,[,,"11[029]|911",,,,"110"]
,,[,,"1(?:1[029]|76)|911",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,"176",,,,"176"]
,,[,,"176",,,,"176"]
]
,"JO":[,[,,"[19]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"1(?:1[24]|9[127])|911",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"JO",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[127])|911",,,,"112",,,[3]
]
,,[,,"1(?:09|1[0-248]|9[0-24-79])|9(?:0903|11|8788)",,,,"109"]
,[,,,,,,,,,[-1]
]
,[,,"9(?:09|87)\\d\\d",,,,"90900",,,[5]
]
,,[,,"9(?:09|87)\\d\\d",,,,"90900",,,[5]
]
]
,"JP":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[09]",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"JP",,,,,,,,,,,,,,,,,,[,,"11[09]",,,,"110"]
,,[,,"11[09]",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KE":[,[,,"[1-9]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:1(?:[246]|9\\d)|5(?:01|2[127]|6[26]\\d))|999",,,,"112"]
,[,,"909\\d\\d",,,,"90900",,,[5]
]
,,,,"KE",,,,,,,,,,,,,,,,,,[,,"11[24]|999",,,,"112",,,[3]
]
,,[,,"1(?:0(?:[07-9]|1[0-25]|400)|1(?:[024-6]|9[0-579])|2[1-3]|3[01]|4[14]|5(?:[01][01]|2[0-24-79]|33|4[05]|5[59]|6(?:00|29|6[67]))|(?:6[035]\\d|[78])\\d|9(?:[02-9]\\d\\d|19))|(?:(?:2[0-79]|[37][0-29]|4[0-4]|6[2357]|8\\d)\\d|5(?:[0-7]\\d|99))\\d\\d|9(?:09\\d\\d|99)|8988",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"1(?:(?:04|6[35])\\d\\d|3[01]|4[14]|5(?:1\\d|2[25]))|(?:(?:2[0-79]|[37][0-29]|4[0-4]|6[2357]|8\\d)\\d|5(?:[0-7]\\d|99)|909)\\d\\d|898\\d",,,,"130"]
,,[,,"1(?:(?:04|6[035])\\d\\d|4[14]|5(?:01|55|6[26]\\d))|40404|8988|909\\d\\d",,,,"141"]
]
,"KG":[,[,,"[14]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"10[1-3]",,,,"101",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"KG",,,,,,,,,,,,,,,,,,[,,"10[1-3]",,,,"101",,,[3]
]
,,[,,"10[1-3]|4040",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d",,,,"4040",,,[4]
]
,,[,,"404\\d",,,,"4040",,,[4]
]
]
,"KH":[,[,,"[146]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[7-9]|666",,,,"117",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"KH",,,,,,,,,,,,,,,,,,[,,"11[7-9]|666",,,,"117",,,[3]
]
,,[,,"11[7-9]|40404|666",,,,"117"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"KI":[,[,,"[179]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"19[2-5]|99[2-4]",,,,"192",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"KI",,,,,,,,,,,,,,,,,,[,,"19[2-5]|99[2-4]",,,,"192",,,[3]
]
,,[,,"1(?:05[0-259]|88|9[2-5])|777|99[2-4]|10[0-8]",,,,"100"]
,[,,"103",,,,"103",,,[3]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KM":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"1[78]",,,,"17"]
,[,,,,,,,,,[-1]
]
,,,,"KM",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"]
,,[,,"1[78]",,,,"17"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KN":[,[,,"[39]\\d\\d",,,,,,,[3]
]
,,,[,,"333|9(?:11|99)",,,,"333"]
,[,,,,,,,,,[-1]
]
,,,,"KN",,,,,,,,,,,,,,,,,,[,,"333|9(?:11|99)",,,,"333"]
,,[,,"333|9(?:11|99)",,,,"333"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KP":[,[,,"[18]\\d\\d",,,,,,,[3]
]
,,,[,,"11[29]|819",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"KP",,,,,,,,,,,,,,,,,,[,,"11[29]|819",,,,"112"]
,,[,,"11[29]|819",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KR":[,[,,"1\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:1[27-9]|28|330|82)",,,,"112",,,[3,4]
]
,[,,,,,,,,,[-1]
]
,,,,"KR",,,,,,,,,,,,,,,,,,[,,"11[29]",,,,"112",,,[3]
]
,,[,,"1(?:[016-9]114|3(?:0[01]|2|3[0-35-9]|45?|5[057]|6[569]|7[79]|8[2589]|9[0189]))|1(?:0[015]|1\\d|2[01357-9]|41|8[28])",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"1(?:0[01]|1[4-6]|41)|1(?:[06-9]1\\d|111)\\d",,,,"100",,,[3,5]
]
,,[,,,,,,,,,[-1]
]
]
,"KW":[,[,,"[18]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"112",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"KW",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"1[0-7]\\d|89887",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"898\\d\\d",,,,"89800",,,[5]
]
,,[,,,,,,,,,[-1]
]
]
,"KY":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"KY",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"KZ":[,[,,"[134]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:0[1-3]|12)",,,,"101",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"KZ",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"101",,,[3]
]
,,[,,"1(?:0[1-4]|12)|(?:3040|404)0",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,"(?:304\\d|404)\\d",,,,"4040",,,[4,5]
]
,,[,,"(?:304\\d|404)\\d",,,,"4040",,,[4,5]
]
]
,"LA":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"19[015]",,,,"190"]
,[,,,,,,,,,[-1]
]
,,,,"LA",,,,,,,,,,,,,,,,,,[,,"19[015]",,,,"190"]
,,[,,"19[015]",,,,"190"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LB":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:12|40|75)|999",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"LB",,,,,,,,,,,,,,,,,,[,,"1(?:12|40|75)|999",,,,"112"]
,,[,,"1(?:12|40|75)|999",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LC":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"LC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"]
,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LI":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1[278]|44)",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"LI",,,,,,,,,,,,,,,,,,[,,"1(?:1[278]|44)",,,,"112",,,[3]
]
,,[,,"1(?:1(?:[278]|45)|4[3-57]|50|75|81[18])",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LK":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"11[02689]",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"LK",,,,,,,,,,,,,,,,,,[,,"11[02689]",,,,"110",,,[3]
]
,,[,,"1(?:1[024-9]|3(?:00|1[2-49]|2[23]|3[1-3]|44|5[07]|[67]9|88|9[039])|9(?:0[0-2589]|1[0-357-9]|2[0-25689]|3[0389]|4[0489]|5[014-69]|6[0-2689]|7[03579]|8[02457-9]|9[0-2569]))",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LR":[,[,,"[3489]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"355|911",,,,"355",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"LR",,,,,,,,,,,,,,,,,,[,,"355|911",,,,"355",,,[3]
]
,,[,,"355|4040|8(?:400|933)|911",,,,"355"]
,[,,,,,,,,,[-1]
]
,[,,"(?:404|8(?:40|93))\\d",,,,"4040",,,[4]
]
,,[,,"(?:404|8(?:40|93))\\d",,,,"4040",,,[4]
]
]
,"LS":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[257]",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"LS",,,,,,,,,,,,,,,,,,[,,"11[257]",,,,"112"]
,,[,,"11[257]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LT":[,[,,"[01]\\d(?:\\d(?:\\d{3})?)?",,,,,,,[2,3,6]
]
,,,[,,"0(?:11?|22?|33?)|1(?:0[1-3]|1(?:2|6111))|116(?:0\\d|12)\\d",,,,"01"]
,[,,,,,,,,,[-1]
]
,,,,"LT",,,,,,,,,,,,,,,,,,[,,"0(?:11?|22?|33?)|1(?:0[1-3]|12)",,,,"01",,,[2,3]
]
,,[,,"0(?:11?|22?|33?)|1(?:0[1-3]|1(?:[27-9]|6(?:000|1(?:1[17]|23))))",,,,"01"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LU":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:[23]|6\\d{3})",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"LU",,,,,,,,,,,,,,,,,,[,,"11[23]",,,,"112",,,[3]
]
,,[,,"11(?:[23]|6(?:000|111))|1(?:18|[25]\\d|3)\\d\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"LV":[,[,,"[018]\\d{1,5}",,,,,,,[2,3,4,5,6]
]
,,,[,,"0[1-3]|11(?:[023]|6\\d{3})",,,,"01",,,[2,3,6]
]
,[,,"1180|821\\d\\d",,,,"1180",,,[4,5]
]
,,,,"LV",,,,,,,,,,,,,,,,,,[,,"0[1-3]|11[023]",,,,"01",,,[2,3]
]
,,[,,"0[1-4]|1(?:1(?:[02-4]|6(?:000|111)|8[0189])|(?:5|65)5|77)|821[57]4",,,,"01"]
,[,,"1181",,,,"1181",,,[4]
]
,[,,"165\\d",,,,"1650",,,[4]
]
,,[,,,,,,,,,[-1]
]
]
,"LY":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"19[013]",,,,"190"]
,[,,,,,,,,,[-1]
]
,,,,"LY",,,,,,,,,,,,,,,,,,[,,"19[013]",,,,"190"]
,,[,,"19[013]",,,,"190"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MA":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:[59]|77)",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"MA",,,,,,,,,,,,,,,,,,[,,"1(?:[59]|77)",,,,"15"]
,,[,,"1(?:[59]|77)",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MC":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:12|[578])",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"MC",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",,,,"15"]
,,[,,"1(?:12|41|[578])",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MD":[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:2|6(?:000|1(?:11|2\\d)))|90[1-3]",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"MD",,,,,,,,,,,,,,,,,,[,,"112|90[1-3]",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:00[06]|1(?:1[17]|23))|8\\d\\d?|99)|90[04-9])|90[1-3]|1(?:4\\d\\d|6[0-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,,"1(?:1(?:2|6\\d{3})|9[2-4])",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"MK",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[2-4])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|8\\d)|3\\d|9[2-4])|1(?:16|2\\d)\\d{3}",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ML":[,[,,"[136-8]\\d{1,4}",,,,,,,[2,3,4,5]
]
,,,[,,"1[578]|(?:352|67)00|7402|(?:677|744|8000)\\d",,,,"15",,,[2,4,5]
]
,[,,"(?:12|800)2\\d|3(?:52(?:11|2[02]|3[04-6]|99)|7574)",,,,"1220",,,[4,5]
]
,,,,"ML",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15",,,[2]
]
,,[,,"1(?:1(?:[013-9]\\d|2)|2(?:1[02-469]|2[13])|[578])|350(?:35|57)|67(?:0[09]|[59]9|77|8[89])|74(?:0[02]|44|55)|800[0-2][12]|3(?:52|[67]\\d)\\d\\d",,,,"15"]
,[,,"37(?:433|575)|7400|8001\\d",,,,"7400",,,[4,5]
]
,[,,"3503\\d|(?:3[67]\\d|800)\\d\\d",,,,"35030",,,[5]
]
,,[,,"374(?:0[24-9]|[1-9]\\d)|7400|3(?:6\\d|75)\\d\\d",,,,"7400",,,[4,5]
]
]
,"MM":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"199",,,,"199"]
,[,,,,,,,,,[-1]
]
,,,,"MM",,,,,,,,,,,,,,,,,,[,,"199",,,,"199"]
,,[,,"199",,,,"199"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MN":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"10[0-35]",,,,"100"]
,[,,,,,,,,,[-1]
]
,,,,"MN",,,,,,,,,,,,,,,,,,[,,"10[0-35]",,,,"100"]
,,[,,"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,[,,"1\\d\\d(?:\\d{3})?",,,,,,,[3,6]
]
,,,[,,"11(?:2|6\\d{3})",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"MT",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"11(?:2|6(?:000|1(?:11|23)))",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MU":[,[,,"[189]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"11[45]|99[59]",,,,"114",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"MU",,,,,,,,,,,,,,,,,,[,,"11[45]|99[59]",,,,"114",,,[3]
]
,,[,,"1\\d{2,4}|(?:8\\d\\d|99)\\d",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"MV":[,[,,"[14]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:02|1[89])",,,,"102",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"MV",,,,,,,,,,,,,,,,,,[,,"1(?:02|1[89])",,,,"102",,,[3]
]
,,[,,"1(?:[0-37-9]|[4-6]\\d)\\d|4040|1[45]1",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,"1[45]1",,,,"141",,,[3]
]
,,[,,,,,,,,,[-1]
]
]
,"MW":[,[,,"[189]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"199|99[7-9]",,,,"199",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"MW",,,,,,,,,,,,,,,,,,[,,"199|99[7-9]",,,,"199",,,[3]
]
,,[,,"199|80400|99[7-9]",,,,"199"]
,[,,,,,,,,,[-1]
]
,[,,"804\\d\\d",,,,"80400",,,[5]
]
,,[,,"804\\d\\d",,,,"80400",,,[5]
]
]
,"MX":[,[,,"[0579]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"0(?:6[0568]|80)|911",,,,"060",,,[3]
]
,[,,"(?:530\\d|776)\\d",,,,"7760",,,[4,5]
]
,,,,"MX",,,,,,,,,,,,,,,,,,[,,"0(?:6[0568]|80)|911",,,,"060",,,[3]
]
,,[,,"0[1-9]\\d|53053|7766|911",,,,"010"]
,[,,,,,,,,,[-1]
]
,[,,"0(?:[249]0|[35][01])",,,,"020",,,[3]
]
,,[,,,,,,,,,[-1]
]
]
,"MY":[,[,,"[1369]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"112|999",,,,"112",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"MY",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]
]
,,[,,"1(?:0[01348]|1(?:[02]|1[128]|311)|2(?:0[125]|[13-6]|2\\d{0,2})|(?:3[1-35-79]|7[45])\\d\\d?|5(?:454|5\\d\\d?|77|888|999?)|8(?:18?|2|8[18])|9(?:[124]\\d?|68|71|9[0679]))|66628|99[1-469]|13[5-7]|(?:1(?:0[569]|309|5[12]|7[136-9]|9[03])|3[23679]\\d\\d)\\d",,,,"100"]
,[,,"666\\d\\d",,,,"66600",,,[5]
]
,[,,,,,,,,,[-1]
]
,,[,,"(?:3[23679]\\d|666)\\d\\d",,,,"32000",,,[5]
]
]
,"MZ":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1[79]|9[78])",,,,"117",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"MZ",,,,,,,,,,,,,,,,,,[,,"1(?:1[79]|9[78])",,,,"117",,,[3]
]
,,[,,"1(?:[02-5]\\d\\d|1[79]|9[78])",,,,"117"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NA":[,[,,"[19]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"10111",,,,"10111",,,[5]
]
,[,,,,,,,,,[-1]
]
,,,,"NA",,,,,,,,,,,,,,,,,,[,,"10111",,,,"10111",,,[5]
]
,,[,,"(?:10|93)111|(?:1\\d|9)\\d\\d",,,,"900"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NC":[,[,,"[135]\\d{1,3}",,,,,,,[2,3,4]
]
,,,[,,"1(?:0(?:00|1[23]|3[0-2]|8\\d)|[5-8])|363\\d|577",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"NC",,,,,,,,,,,,,,,,,,[,,"1[5-8]",,,,"15",,,[2]
]
,,[,,"1(?:0(?:0[06]|1[02-46]|20|3[0-25]|42|5[058]|77|88)|[5-8])|3631|5[6-8]\\d",,,,"15"]
,[,,"5(?:67|88)",,,,"567",,,[3]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NE":[,[,,"[1-3578]\\d(?:\\d(?:\\d{3})?)?",,,,,,,[2,3,6]
]
,,,[,,"1[578]|723\\d{3}",,,,"15",,,[2,6]
]
,[,,,,,,,,,[-1]
]
,,,,"NE",,,,,,,,,,,,,,,,,,[,,"1[578]|723141",,,,"15",,,[2,6]
]
,,[,,"1(?:0[01]|1[12]|2[034]|3[013]|[46]0|55?|[78])|222|333|555|723141|888",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,"1(?:0[01]|1[12]|2[034]|3[013]|[46]0|55)|222|333|555|888",,,,"100",,,[3]
]
,,[,,,,,,,,,[-1]
]
]
,"NF":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|55|77)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"NF",,,,,,,,,,,,,,,,,,[,,"9(?:11|55|77)",,,,"911"]
,,[,,"9(?:11|55|77)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NG":[,[,,"[14]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"199",,,,"199",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"NG",,,,,,,,,,,,,,,,,,[,,"199",,,,"199",,,[3]
]
,,[,,"199|40700",,,,"199"]
,[,,,,,,,,,[-1]
]
,[,,"407\\d\\d",,,,"40700",,,[5]
]
,,[,,"407\\d\\d",,,,"40700",,,[5]
]
]
,"NI":[,[,,"[12467]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1[58]|2[08])|737\\d",,,,"115"]
,[,,,,,,,,,[-1]
]
,,,,"NI",,,,,,,,,,,,,,,,,,[,,"1(?:1[58]|2[08])",,,,"115",,,[3]
]
,,[,,"1(?:1[58]|200)|4878|7(?:010|373)|12[0158]|(?:19|[267]1)00",,,,"115"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NL":[,[,,"[1349]\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"11(?:2|6\\d{3})|911",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"NL",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:00[06]|1(?:11|23)))|2(?:0[0-4]|3[34]|44)|3[03-9]\\d|400|8(?:[02-9]\\d|1[0-79]))|[34]000|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"120\\d",,,,"1200",,,[4]
]
,,[,,"[34]00\\d",,,,"3000",,,[4]
]
]
,"NO":[,[,,"1\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"11(?:[023]|6\\d{3})",,,,"110",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"NO",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"110",,,[3]
]
,,[,,"1(?:1(?:[0239]|61(?:1[17]|23))|2[048]|4(?:12|[59])|7[57]|8[5-9]\\d|90)",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NP":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:0[0-36]|12)|1(?:09|11)\\d",,,,"100"]
,[,,,,,,,,,[-1]
]
,,,,"NP",,,,,,,,,,,,,,,,,,[,,"1(?:0[0-3]|12)",,,,"100",,,[3]
]
,,[,,"1(?:0(?:[0-36]|98)|1(?:1[1-4]|2))",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NR":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[0-2]",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"NR",,,,,,,,,,,,,,,,,,[,,"11[0-2]",,,,"110"]
,,[,,"1(?:1[0-2]|23|92)",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"NU":[,[,,"[019]\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"NU",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"01[05]|101|999",,,,"010"]
,[,,,,,,,,,[-1]
]
,[,,"010",,,,"010"]
,,[,,,,,,,,,[-1]
]
]
,"NZ":[,[,,"\\d{3,4}",,,,,,,[3,4]
]
,,,[,,"111",,,,"111",,,[3]
]
,[,,"018",,,,"018",,,[3]
]
,,,,"NZ",,,,,,,,,,,,,,,,,,[,,"111",,,,"111",,,[3]
]
,,[,,"018|1(?:(?:1|37)1|(?:23|94)4|7[03]7)|[2-57-9]\\d{2,3}|6(?:161|26[0-3]|742)",,,,"018"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"018|(?:1(?:23|37|7[03]|94)|6(?:[12]6|74))\\d|[2-57-9]\\d{2,3}",,,,"018"]
]
,"OM":[,[,,"[19]\\d{3}",,,,,,,[4]
]
,,,[,,"1444|999\\d",,,,"1444"]
,[,,,,,,,,,[-1]
]
,,,,"OM",,,,,,,,,,,,,,,,,,[,,"1444|9999",,,,"1444"]
,,[,,"1(?:111|222|4(?:4[0-5]|50|66|7[7-9])|51[0-8])|9999|1(?:2[3-5]|3[0-2]|50)\\d",,,,"1111"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PA":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"PA",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"10[2-4]|911",,,,"102"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PE":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:05|1[67])",,,,"105"]
,[,,,,,,,,,[-1]
]
,,,,"PE",,,,,,,,,,,,,,,,,,[,,"1(?:05|1[67])",,,,"105"]
,,[,,"1(?:05|1[67])",,,,"105"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PF":[,[,,"1\\d",,,,,,,[2]
]
,,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"PF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"]
,,[,,"1[578]",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PG":[,[,,"[01]\\d{2,6}",,,,,,,[3,4,5,6,7]
]
,,,[,,"000|11[01]",,,,"000",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"PG",,,,,,,,,,,,,,,,,,[,,"000|11[01]",,,,"000",,,[3]
]
,,[,,"000|1(?:1[01]|5\\d\\d|6\\d{2,5})",,,,"000"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"16\\d{2,5}",,,,"1600",,,[4,5,6,7]
]
]
,"PH":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"11[27]|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"PH",,,,,,,,,,,,,,,,,,[,,"11[27]|911",,,,"112"]
,,[,,"11[27]|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PK":[,[,,"1\\d{1,3}",,,,,,,[2,3,4]
]
,,,[,,"1(?:1(?:2\\d?|5)|[56])",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"PK",,,,,,,,,,,,,,,,,,[,,"1(?:1(?:22?|5)|[56])",,,,"15"]
,,[,,"1(?:122|3[014]|[56])|11[2457-9]",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PL":[,[,,"[19]\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"11(?:2|6\\d{3})|99[7-9]",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"PL",,,,,,,,,,,,,,,,,,[,,"112|99[7-9]",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|61(?:11|23)|891[23])|9\\d{3})|9(?:8[4-7]|9[1-9])|11[68]000",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PM":[,[,,"[13]\\d(?:\\d{2})?",,,,,,,[2,4]
]
,,,[,,"1[578]",,,,"15",,,[2]
]
,[,,,,,,,,,[-1]
]
,,,,"PM",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15",,,[2]
]
,,[,,"1[578]|3103",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,"310\\d",,,,"3100",,,[4]
]
,,[,,,,,,,,,[-1]
]
]
,"PR":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"PR",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PS":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:0[0-2]|66)",,,,"100"]
,[,,,,,,,,,[-1]
]
,,,,"PS",,,,,,,,,,,,,,,,,,[,,"10[0-2]",,,,"100"]
,,[,,"1(?:0[0-2]|44|66|99)",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PT":[,[,,"1\\d\\d(?:\\d(?:\\d{2})?)?",,,,,,,[3,4,6]
]
,,,[,,"11[25]|1(?:16\\d\\d|5[1589]|8[279])\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"PT",,,,,,,,,,,,,,,,,,[,,"11[25]",,,,"112",,,[3]
]
,,[,,"1(?:0(?:45|5[01])|1(?:[2578]|600[06])|4(?:1[45]|4)|583|6(?:1[0236]|3[02]|9[169]))|1(?:1611|59)1|1[068]78|1[08]9[16]|1(?:0[1-38]|40|5[15]|6[258]|82)0",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PW":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"PW",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"PY":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"128|911",,,,"128"]
,[,,,,,,,,,[-1]
]
,,,,"PY",,,,,,,,,,,,,,,,,,[,,"128|911",,,,"128"]
,,[,,"1[1-4]\\d|911",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"QA":[,[,,"[129]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"999",,,,"999",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"QA",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]
]
,,[,,"999|(?:1|20|9[27]\\d)\\d\\d",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"RE":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:12|[578])",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"RE",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",,,,"15"]
,,[,,"1(?:12|[578])",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"RO":[,[,,"[18]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:2|6\\d{3})",,,,"112",,,[3,6]
]
,[,,"(?:1(?:18[39]|[24])|8[48])\\d\\d",,,,"1200",,,[4,6]
]
,,,,"RO",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:000|1(?:11|23))|8(?:(?:01|8[18])1|119|[23]00|932))|[24]\\d\\d|9(?:0(?:00|19)|1[19]|21|3[02]|5[178]))|8[48]\\d\\d",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"(?:1[24]|8[48])\\d\\d",,,,"1200",,,[4]
]
]
,"RS":[,[,,"[19]\\d{1,5}",,,,,,,[2,3,4,5,6]
]
,,,[,,"112|9[2-4]",,,,"92",,,[2,3]
]
,[,,,,,,,,,[-1]
]
,,,,"RS",,,,,,,,,,,,,,,,,,[,,"112|9[2-4]",,,,"92",,,[2,3]
]
,,[,,"1[189]\\d{1,4}|9[2-4]",,,,"92"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"RU":[,[,,"[01]\\d\\d?",,,,,,,[2,3]
]
,,,[,,"112|(?:0|10)[1-3]",,,,"01"]
,[,,,,,,,,,[-1]
]
,,,,"RU",,,,,,,,,,,,,,,,,,[,,"112|(?:0|10)[1-3]",,,,"01"]
,,[,,"112|(?:0|10)[1-4]",,,,"01"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"RW":[,[,,"[14]\\d\\d",,,,,,,[3]
]
,,,[,,"11[1245]",,,,"111"]
,[,,,,,,,,,[-1]
]
,,,,"RW",,,,,,,,,,,,,,,,,,[,,"11[12]",,,,"111"]
,,[,,"1(?:0[0-2]|1[0-24-6]|2[13]|70|99)|456",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SA":[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:2|6\\d{3})|9(?:11|37|9[7-9])",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"SA",,,,,,,,,,,,,,,,,,[,,"112|9(?:11|9[79])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:00|2|6111)|410|9(?:00|1[89]|9(?:099|22|91)))|9(?:0[24-79]|11|3[379]|40|66|8[5-9]|9[02-9])",,,,"112"]
,[,,"141\\d",,,,"1410",,,[4]
]
,[,,"1(?:10|41)\\d|90[24679]",,,,"902",,,[3,4]
]
,,[,,,,,,,,,[-1]
]
]
,"SB":[,[,,"[127-9]\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"SB",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"1(?:[02]\\d|1[12]|[35][01]|[49][1-9]|6[2-9]|7[7-9]|8[0-8])|269|777|835|9(?:[01]1|22|33|55|77|88|99)",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SC":[,[,,"[19]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"999",,,,"999",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"SC",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]
]
,,[,,"1(?:0\\d|1[027]|2[0-8]|3[13]|4[0-2]|[59][15]|6[1-9]|7[124-6]|8[158])|9(?:6\\d\\d|99)",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SD":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"SD",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SE":[,[,,"[1-37-9]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"112|(?:116\\d|900)\\d\\d",,,,"112",,,[3,5,6]
]
,[,,"11811[89]|72\\d{3}",,,,"72000",,,[5,6]
]
,,,,"SE",,,,,,,,,,,,,,,,,,[,,"112|90000",,,,"112",,,[3,5]
]
,,[,,"11(?:[25]|313|6(?:00[06]|1(?:1[17]|23))|7[0-8])|2(?:2[02358]|33|4[01]|50|6[1-4])|32[13]|8(?:22|88)|9(?:0(?:00|51)0|12)|(?:11(?:4|8[02-46-9])|7\\d\\d|90[2-4])\\d\\d|(?:118|90)1(?:[02-9]\\d|1[013-9])",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"2(?:2[02358]|33|4[01]|50|6[1-4])|32[13]|8(?:22|88)|912",,,,"220",,,[3]
]
,,[,,"7\\d{4}",,,,"70000",,,[5]
]
]
,"SG":[,[,,"[179]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"99[359]",,,,"993",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"SG",,,,,,,,,,,,,,,,,,[,,"99[359]",,,,"993",,,[3]
]
,,[,,"1(?:(?:[01368]\\d|44)\\d|[57]\\d{2,3}|9(?:0[1-9]|[1-9]\\d))|77222|99[02-9]|100",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,"772\\d\\d",,,,"77200",,,[5]
]
]
,"SH":[,[,,"[129]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"9(?:11|99)",,,,"911",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"SH",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911",,,[3]
]
,,[,,"1\\d{2,3}|26[01]\\d\\d|9(?:11|99)",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SI":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"11(?:(?:0|6\\d)\\d\\d|[23]|8\\d\\d?)",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"SI",,,,,,,,,,,,,,,,,,[,,"11[23]",,,,"112",,,[3]
]
,,[,,"1(?:1(?:00[146]|[23]|6(?:000|1(?:11|23))|8(?:[08]|99))|9(?:059|1(?:0[12]|16)|5|70|87|9(?:00|[149])))|19(?:08|81)[09]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SJ":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[023]",,,,"110"]
,[,,,,,,,,,[-1]
]
,,,,"SJ",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"110"]
,,[,,"11[023]",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SK":[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:1(?:2|6\\d{3})|5[058])",,,,"112",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"SK",,,,,,,,,,,,,,,,,,[,,"1(?:12|5[058])",,,,"112",,,[3]
]
,,[,,"1(?:1(?:2|6(?:000|111)|8[0-8])|[248]\\d{3}|5[0589])",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SL":[,[,,"[069]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"(?:01|99)9",,,,"019",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"SL",,,,,,,,,,,,,,,,,,[,,"(?:01|99)9",,,,"019",,,[3]
]
,,[,,"(?:01|99)9|60400",,,,"019"]
,[,,,,,,,,,[-1]
]
,[,,"604\\d\\d",,,,"60400",,,[5]
]
,,[,,"604\\d\\d",,,,"60400",,,[5]
]
]
,"SM":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[358]",,,,"113"]
,[,,,,,,,,,[-1]
]
,,,,"SM",,,,,,,,,,,,,,,,,,[,,"11[358]",,,,"113"]
,,[,,"11[358]",,,,"113"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SN":[,[,,"[12]\\d{1,5}",,,,,,,[2,3,4,5,6]
]
,,,[,,"1(?:515|[78])|2(?:00|1)\\d{3}",,,,"17",,,[2,4,5,6]
]
,[,,"2(?:0[246]|[468])\\d{3}",,,,"24000",,,[5,6]
]
,,,,"SN",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17",,,[2]
]
,,[,,"1(?:1[69]|(?:[246]\\d|51)\\d)|2(?:0[0-246]|[12468])\\d{3}|1[278]",,,,"12"]
,[,,"2(?:01|2)\\d{3}",,,,"22000",,,[5,6]
]
,[,,"1[46]\\d\\d",,,,"1400",,,[4]
]
,,[,,"2[468]\\d{3}",,,,"24000",,,[5]
]
]
,"SO":[,[,,"[57-9]\\d\\d",,,,,,,[3]
]
,,,[,,"555|888|999",,,,"555"]
,[,,,,,,,,,[-1]
]
,,,,"SO",,,,,,,,,,,,,,,,,,[,,"555|888|999",,,,"555"]
,,[,,"555|777|888|999",,,,"555"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SR":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"115",,,,"115",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"SR",,,,,,,,,,,,,,,,,,[,,"115",,,,"115",,,[3]
]
,,[,,"1\\d{2,3}",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SS":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"SS",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ST":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"112",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"ST",,,,,,,,,,,,,,,,,,[,,"112",,,,"112"]
,,[,,"112",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"SV":[,[,,"[149]\\d\\d(?:\\d{2,3})?",,,,,,,[3,5,6]
]
,,,[,,"116\\d{3}|911",,,,"911",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"SV",,,,,,,,,,,,,,,,,,[,,"91[13]",,,,"911",,,[3]
]
,,[,,"1(?:1(?:2|6111)|2[136-8]|3[0-6]|9[05])|40404|9(?:1\\d|29)",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"404\\d\\d",,,,"40400",,,[5]
]
,,[,,"404\\d\\d",,,,"40400",,,[5]
]
]
,"SX":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"919",,,,"919"]
,[,,,,,,,,,[-1]
]
,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[127])",,,,"110"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TH":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"1(?:1(?:00|2[03]|3[3479]|7[67]|9[0246])|578|6(?:44|6[79]|88|9[16])|88\\d|9[19])|1[15]55",,,,"191"]
,[,,"1(?:113|2[23]\\d|5(?:09|56))",,,,"1113",,,[4]
]
,,,,"TH",,,,,,,,,,,,,,,,,,[,,"1(?:669|9[19])",,,,"191"]
,,[,,"1(?:0[0-2]|1(?:0[03]|1[1-35]|2[0358]|3[03-79]|4[02-489]|5[04-9]|6[04-79]|7[03-9]|8[027-9]|9[02-79])|2(?:22|3[89]|66)|3(?:18|2[23]|3[013]|5[56]|6[45]|73)|477|5(?:0\\d|4[0-37-9]|5[1-8]|6[01679]|7[12568]|8[0-24589]|9[013589])|6(?:0[0-29]|2[03]|4[3-6]|6[1-9]|7[0257-9]|8[0158]|9[014-9])|7(?:[14]9|7[27]|90)|888|9[19])",,,,"100"]
,[,,"1(?:1(?:03|1[15]|2[58]|3[056]|4[02-49]|5[046-9]|7[03-589]|9[579])|5(?:0[0-8]|4[0-378]|5[1-478]|7[156])|6(?:20|4[356]|6[1-68]|7[057-9]|8[015]|9[0457-9]))|1(?:1[68]|26|3[1-35]|5[689]|60|7[17])\\d",,,,"1103",,,[4]
]
,[,,"114[89]",,,,"1148",,,[4]
]
,,[,,,,,,,,,[-1]
]
]
,"TJ":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:0[1-3]|12)",,,,"101"]
,[,,,,,,,,,[-1]
]
,,,,"TJ",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"101"]
,,[,,"1(?:0[1-3]|12)",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TL":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[25]",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"TL",,,,,,,,,,,,,,,,,,[,,"11[25]",,,,"112"]
,,[,,"1(?:0[02]|1[25]|2[0138]|72|9[07])",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TM":[,[,,"0\\d",,,,,,,[2]
]
,,,[,,"0[1-49]",,,,"01"]
,[,,,,,,,,,[-1]
]
,,,,"TM",,,,,,,,,,,,,,,,,,[,,"0[1-3]",,,,"01"]
,,[,,"0[1-49]",,,,"01"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TN":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"19[078]",,,,"190"]
,[,,,,,,,,,[-1]
]
,,,,"TN",,,,,,,,,,,,,,,,,,[,,"19[078]",,,,"190"]
,,[,,"19[078]",,,,"190"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TO":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|22|33|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"TO",,,,,,,,,,,,,,,,,,[,,"9(?:11|22|33|99)",,,,"911"]
,,[,,"9(?:11|22|33|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TR":[,[,,"[1-9]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:1[02]|22|3[126]|4[04]|5[15-9]|6[18]|77|83)",,,,"110",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"TR",,,,,,,,,,,,,,,,,,[,,"1(?:1[02]|55)",,,,"110",,,[3]
]
,,[,,"1(?:1(?:[02-79]|8(?:1[018]|2[0245]|3[2-4]|42|5[058]|6[06]|7[07]|8[01389]|9[089]))|3(?:37|[58]6|65)|471|5(?:07|78)|6(?:[02]6|99)|8(?:63|95))|2(?:077|268|4(?:17|23)|5(?:7[26]|82)|6[14]4|8\\d\\d|9(?:30|89))|3(?:0(?:05|72)|353|4(?:06|30|64)|502|674|747|851|9(?:1[29]|60))|4(?:0(?:25|3[12]|[47]2)|3(?:3[13]|[89]1)|439|5(?:43|55)|717|832)|5(?:145|290|[4-6]\\d\\d|772|833|9(?:[06]1|92))|6(?:236|6(?:12|39|8[59])|769)|7890|8(?:688|7(?:28|65)|85[06])|9(?:159|290)|1[2-9]\\d",,,,"110"]
,[,,"(?:285|542)0",,,,"2850",,,[4]
]
,[,,,,,,,,,[-1]
]
,,[,,"1(?:3(?:37|[58]6|65)|4(?:4|71)|5(?:07|78)|6(?:[02]6|99)|8(?:3|63|95))|(?:2(?:07|26|4[12]|5[78]|6[14]|8\\d|9[38])|3(?:0[07]|[38]5|4[036]|50|67|74|9[16])|4(?:0[2-47]|3[389]|[48]3|5[45]|71)|5(?:14|29|[4-6]\\d|77|83|9[069])|6(?:23|6[138]|76)|789|8(?:68|7[26]|85)|9(?:15|29))\\d",,,,"144",,,[3,4]
]
]
,"TT":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"99[09]",,,,"990"]
,[,,,,,,,,,[-1]
]
,,,,"TT",,,,,,,,,,,,,,,,,,[,,"99[09]",,,,"990"]
,,[,,"99[09]",,,,"990"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TV":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"TV",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"1\\d\\d|911",,,,"100"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TW":[,[,,"1\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"11[0289]|1(?:81|92)\\d",,,,"110"]
,[,,"10[56]",,,,"105",,,[3]
]
,,,,"TW",,,,,,,,,,,,,,,,,,[,,"11[029]",,,,"110",,,[3]
]
,,[,,"1(?:0[04-6]|1[0237-9]|3[389]|6[05-8]|7[07]|8(?:0|11)|9(?:19|22|5[057]|68|8[05]|9[15689]))",,,,"100"]
,[,,"1(?:65|9(?:1\\d|50|85|98))",,,,"165"]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"TZ":[,[,,"[149]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"11[12]|999",,,,"111",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"TZ",,,,,,,,,,,,,,,,,,[,,"11[12]|999",,,,"111",,,[3]
]
,,[,,"11[128]|46400|999",,,,"111"]
,[,,,,,,,,,[-1]
]
,[,,"464\\d\\d",,,,"46400",,,[5]
]
,,[,,"464\\d\\d",,,,"46400",,,[5]
]
]
,"UA":[,[,,"[189]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"1(?:0[1-3]|1(?:2|6\\d{3}))",,,,"101",,,[3,6]
]
,[,,,,,,,,,[-1]
]
,,,,"UA",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"101",,,[3]
]
,,[,,"1(?:0[1-49]|1(?:2|6(?:000|1(?:11|23))|8\\d\\d?)|(?:[278]|5\\d)\\d)|[89]00\\d\\d?|151|1(?:06|4\\d|6)\\d\\d",,,,"101"]
,[,,,,,,,,,[-1]
]
,[,,"(?:118|[89]00)\\d\\d?",,,,"1180",,,[4,5]
]
,,[,,,,,,,,,[-1]
]
]
,"UG":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,,,,"UG",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"]
,,[,,"999",,,,"999"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"US":[,[,,"[1-9]\\d{2,5}",,,,,,,[3,4,5,6]
]
,,,[,,"112|[69]11",,,,"112",,,[3]
]
,[,,"24280|(?:381|968)35|4(?:3355|7553|8221)|5(?:(?:489|934)2|5928)|72078|(?:323|960)40|(?:276|414)63|(?:2(?:520|744)|7390|9968)9|(?:693|732|976)88|(?:3(?:556|825)|5294|8623|9729)4|(?:3378|4136|7642|8961|9979)6|(?:4(?:6(?:15|32)|827)|(?:591|720)8|9529)7",,,,"24280",,,[5]
]
,,,,"US",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112",,,[3]
]
,,[,,"11(?:2|5[1-47]|[68]\\d|7[0-57]|98)|[2-9]\\d{3,5}|[2-9]11",,,,"112"]
,[,,"2(?:3333|(?:4224|7562|900)2|56447|6688)|3(?:1010|2665|7404)|40404|560560|6(?:0060|22639|5246|7622)|7(?:0701|3822|4666)|8(?:(?:3825|7226)5|4816)|99099",,,,"23333",,,[5,6]
]
,[,,"336\\d\\d|[2-9]\\d{3}|[2356]11",,,,"211",,,[3,4,5]
]
,,[,,"[2-9]\\d{4,5}",,,,"20000",,,[5,6]
]
]
,"UY":[,[,,"[19]\\d{2,3}",,,,,,,[3,4]
]
,,,[,,"128|911",,,,"128",,,[3]
]
,[,,,,,,,,,[-1]
]
,,,,"UY",,,,,,,,,,,,,,,,,,[,,"128|911",,,,"128",,,[3]
]
,,[,,"1(?:0[4-9]|1[2368]|2[0-3568]|787)|911",,,,"104"]
,[,,"178\\d",,,,"1780",,,[4]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"UZ":[,[,,"[04]\\d(?:\\d(?:\\d{2})?)?",,,,,,,[2,3,5]
]
,,,[,,"0(?:0[1-3]|[1-3]|50)",,,,"01",,,[2,3]
]
,[,,,,,,,,,[-1]
]
,,,,"UZ",,,,,,,,,,,,,,,,,,[,,"0(?:0[1-3]|[1-3]|50)",,,,"01",,,[2,3]
]
,,[,,"0(?:0[1-3]|[1-3]|50)|45400",,,,"01"]
,[,,,,,,,,,[-1]
]
,[,,"454\\d\\d",,,,"45400",,,[5]
]
,,[,,"454\\d\\d",,,,"45400",,,[5]
]
]
,"VA":[,[,,"1\\d\\d",,,,,,,[3]
]
,,,[,,"11[2358]",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"VA",,,,,,,,,,,,,,,,,,[,,"11[2358]",,,,"112"]
,,[,,"11[2358]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"VC":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"VC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"]
,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"VE":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"1(?:12|71)|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"VE",,,,,,,,,,,,,,,,,,[,,"1(?:12|71)|911",,,,"112"]
,,[,,"1(?:12|71)|911",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"VG":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"VG",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"]
,,[,,"9(?:11|99)",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"VI":[,[,,"9\\d\\d",,,,,,,[3]
]
,,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,,,,"VI",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1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\\d",,,,,,,[3]
]
,,,[,,"19[1459]",,,,"191"]
,[,,,,,,,,,[-1]
]
,,,,"YE",,,,,,,,,,,,,,,,,,[,,"19[1459]",,,,"191"]
,,[,,"19[1459]",,,,"191"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"YT":[,[,,"1\\d\\d?",,,,,,,[2,3]
]
,,,[,,"1(?:12|5)",,,,"15"]
,[,,,,,,,,,[-1]
]
,,,,"YT",,,,,,,,,,,,,,,,,,[,,"1(?:12|5)",,,,"15"]
,,[,,"1(?:12|5)",,,,"15"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ZA":[,[,,"[134]\\d{2,4}",,,,,,,[3,4,5]
]
,,,[,,"1(?:01\\d\\d|12)",,,,"112",,,[3,5]
]
,[,,"41(?:348|851)",,,,"41348",,,[5]
]
,,,,"ZA",,,,,,,,,,,,,,,,,,[,,"1(?:01(?:11|77)|12)",,,,"112",,,[3,5]
]
,,[,,"1(?:0(?:1(?:11|77)|20|7)|1[12]|77(?:3[237]|[45]7|6[279]|9[26]))|[34]\\d{4}",,,,"107"]
,[,,"3(?:078[23]|7(?:064|567)|8126)|4(?:394[16]|7751|8837)|4[23]699",,,,"30782",,,[5]
]
,[,,"111",,,,"111",,,[3]
]
,,[,,"[34]\\d{4}",,,,"30000",,,[5]
]
]
,"ZM":[,[,,"[19]\\d\\d",,,,,,,[3]
]
,,,[,,"112|99[139]",,,,"112"]
,[,,,,,,,,,[-1]
]
,,,,"ZM",,,,,,,,,,,,,,,,,,[,,"112|99[139]",,,,"112"]
,,[,,"112|99[139]",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"ZW":[,[,,"[139]\\d\\d(?:\\d{2})?",,,,,,,[3,5]
]
,,,[,,"112|9(?:5[023]|61|9[3-59])",,,,"112",,,[3]
]
,[,,"3[013-57-9]\\d{3}",,,,"30000",,,[5]
]
,,,,"ZW",,,,,,,,,,,,,,,,,,[,,"112|99[3-59]",,,,"112",,,[3]
]
,,[,,"11[2469]|3[013-57-9]\\d{3}|9(?:5[023]|6[0-25]|9[3-59])",,,,"112"]
,[,,,,,,,,,[-1]
]
,[,,"114|9(?:5[023]|6[0-25])",,,,"114",,,[3]
]
,,[,,,,,,,,,[-1]
]
]
};
|
2301_81045437/third_party_libphonenumber
|
javascript/i18n/phonenumbers/shortnumbermetadata.js
|
JavaScript
|
unknown
| 77,314
|
# Copyright (C) 2012 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Author: Patrick Mezard
cmake_minimum_required (VERSION 2.8)
project (generate_geocoding_data)
# Helper functions dealing with finding libraries and programs this library
# depends on.
include (gtest.cmake)
find_or_build_gtest ()
set (
SOURCES
"src/cpp-build/generate_geocoding_data.cc"
"src/cpp-build/generate_geocoding_data_main.cc"
)
if (NOT WIN32)
add_definitions ("-Wall -Werror")
endif ()
include_directories ("src")
add_executable (generate_geocoding_data ${SOURCES})
set (TEST_SOURCES
"src/cpp-build/generate_geocoding_data.cc"
"test/cpp-build/generate_geocoding_data_test.cc"
"test/cpp-build/run_tests.cc"
)
set (TEST_LIBS ${GTEST_LIB})
if (NOT WIN32)
list (APPEND TEST_LIBS pthread)
endif ()
# Build the testing binary.
include_directories ("test")
add_executable (generate_geocoding_data_test ${TEST_SOURCES})
target_link_libraries (generate_geocoding_data_test ${TEST_LIBS})
|
2301_81045437/third_party_libphonenumber
|
tools/cpp/CMakeLists.txt
|
CMake
|
unknown
| 1,508
|