1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
|
"""Auto-generated file, do not edit by hand."""
# Copyright (C) 2010-2020 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.
from ..phonemetadata import PhoneMetadata
_AVAILABLE_REGION_CODES = ['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','GQ','GR','GT','GU','GW','GY','HK','HN','HR','HT','HU','ID','IE','IL','IM','IN','IO','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','TA','TC','TD','TG','TH','TJ','TK','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']
_AVAILABLE_NONGEO_COUNTRY_CODES = [800, 808, 870, 878, 881, 882, 883, 888, 979]
def _load_region(code):
__import__("region_%s" % code, globals(), locals(),
fromlist=["PHONE_METADATA_%s" % code], level=1)
for region_code in _AVAILABLE_REGION_CODES:
PhoneMetadata.register_region_loader(region_code, _load_region)
for country_code in _AVAILABLE_NONGEO_COUNTRY_CODES:
PhoneMetadata.register_nongeo_region_loader(country_code, _load_region)
from .alt_format_255 import PHONE_ALT_FORMAT_255
from .alt_format_27 import PHONE_ALT_FORMAT_27
from .alt_format_30 import PHONE_ALT_FORMAT_30
from .alt_format_31 import PHONE_ALT_FORMAT_31
from .alt_format_34 import PHONE_ALT_FORMAT_34
from .alt_format_350 import PHONE_ALT_FORMAT_350
from .alt_format_351 import PHONE_ALT_FORMAT_351
from .alt_format_352 import PHONE_ALT_FORMAT_352
from .alt_format_358 import PHONE_ALT_FORMAT_358
from .alt_format_359 import PHONE_ALT_FORMAT_359
from .alt_format_36 import PHONE_ALT_FORMAT_36
from .alt_format_372 import PHONE_ALT_FORMAT_372
from .alt_format_373 import PHONE_ALT_FORMAT_373
from .alt_format_380 import PHONE_ALT_FORMAT_380
from .alt_format_381 import PHONE_ALT_FORMAT_381
from .alt_format_385 import PHONE_ALT_FORMAT_385
from .alt_format_39 import PHONE_ALT_FORMAT_39
from .alt_format_43 import PHONE_ALT_FORMAT_43
from .alt_format_44 import PHONE_ALT_FORMAT_44
from .alt_format_49 import PHONE_ALT_FORMAT_49
from .alt_format_505 import PHONE_ALT_FORMAT_505
from .alt_format_506 import PHONE_ALT_FORMAT_506
from .alt_format_52 import PHONE_ALT_FORMAT_52
from .alt_format_54 import PHONE_ALT_FORMAT_54
from .alt_format_55 import PHONE_ALT_FORMAT_55
from .alt_format_58 import PHONE_ALT_FORMAT_58
from .alt_format_595 import PHONE_ALT_FORMAT_595
from .alt_format_61 import PHONE_ALT_FORMAT_61
from .alt_format_62 import PHONE_ALT_FORMAT_62
from .alt_format_63 import PHONE_ALT_FORMAT_63
from .alt_format_64 import PHONE_ALT_FORMAT_64
from .alt_format_66 import PHONE_ALT_FORMAT_66
from .alt_format_675 import PHONE_ALT_FORMAT_675
from .alt_format_676 import PHONE_ALT_FORMAT_676
from .alt_format_679 import PHONE_ALT_FORMAT_679
from .alt_format_7 import PHONE_ALT_FORMAT_7
from .alt_format_81 import PHONE_ALT_FORMAT_81
from .alt_format_84 import PHONE_ALT_FORMAT_84
from .alt_format_855 import PHONE_ALT_FORMAT_855
from .alt_format_856 import PHONE_ALT_FORMAT_856
from .alt_format_90 import PHONE_ALT_FORMAT_90
from .alt_format_91 import PHONE_ALT_FORMAT_91
from .alt_format_94 import PHONE_ALT_FORMAT_94
from .alt_format_95 import PHONE_ALT_FORMAT_95
from .alt_format_971 import PHONE_ALT_FORMAT_971
from .alt_format_972 import PHONE_ALT_FORMAT_972
from .alt_format_995 import PHONE_ALT_FORMAT_995
_ALT_NUMBER_FORMATS = {255: PHONE_ALT_FORMAT_255, 27: PHONE_ALT_FORMAT_27, 30: PHONE_ALT_FORMAT_30, 31: PHONE_ALT_FORMAT_31, 34: PHONE_ALT_FORMAT_34, 350: PHONE_ALT_FORMAT_350, 351: PHONE_ALT_FORMAT_351, 352: PHONE_ALT_FORMAT_352, 358: PHONE_ALT_FORMAT_358, 359: PHONE_ALT_FORMAT_359, 36: PHONE_ALT_FORMAT_36, 372: PHONE_ALT_FORMAT_372, 373: PHONE_ALT_FORMAT_373, 380: PHONE_ALT_FORMAT_380, 381: PHONE_ALT_FORMAT_381, 385: PHONE_ALT_FORMAT_385, 39: PHONE_ALT_FORMAT_39, 43: PHONE_ALT_FORMAT_43, 44: PHONE_ALT_FORMAT_44, 49: PHONE_ALT_FORMAT_49, 505: PHONE_ALT_FORMAT_505, 506: PHONE_ALT_FORMAT_506, 52: PHONE_ALT_FORMAT_52, 54: PHONE_ALT_FORMAT_54, 55: PHONE_ALT_FORMAT_55, 58: PHONE_ALT_FORMAT_58, 595: PHONE_ALT_FORMAT_595, 61: PHONE_ALT_FORMAT_61, 62: PHONE_ALT_FORMAT_62, 63: PHONE_ALT_FORMAT_63, 64: PHONE_ALT_FORMAT_64, 66: PHONE_ALT_FORMAT_66, 675: PHONE_ALT_FORMAT_675, 676: PHONE_ALT_FORMAT_676, 679: PHONE_ALT_FORMAT_679, 7: PHONE_ALT_FORMAT_7, 81: PHONE_ALT_FORMAT_81, 84: PHONE_ALT_FORMAT_84, 855: PHONE_ALT_FORMAT_855, 856: PHONE_ALT_FORMAT_856, 90: PHONE_ALT_FORMAT_90, 91: PHONE_ALT_FORMAT_91, 94: PHONE_ALT_FORMAT_94, 95: PHONE_ALT_FORMAT_95, 971: PHONE_ALT_FORMAT_971, 972: PHONE_ALT_FORMAT_972, 995: PHONE_ALT_FORMAT_995}
# 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
# "main_country_for_code" in the metadata should be first.
_COUNTRY_CODE_TO_REGION_CODE = {
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",),
}
|