
    ThK&                        d Z ddlmZmZmZ ddlmZmZmZm	Z	 ddl
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZC ddlDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQ ddlRmSZSmTZTmUZU dZVg d	ZWeXd
k(  rddlYZY eYj                          yy)a  Python phone number parsing and formatting library

Examples of use:

>>> import phonenumbers
>>> from phonenumbers.util import prnt  # equivalent to Py3k print()
>>> x = phonenumbers.parse("+442083661177", None)
>>> prnt(x)
Country Code: 44 National Number: 2083661177
>>> type(x)
<class 'phonenumbers.phonenumber.PhoneNumber'>
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.NATIONAL))
'020 8366 1177'
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.INTERNATIONAL))
'+44 20 8366 1177'
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.E164))
'+442083661177'
>>> y = phonenumbers.parse("020 8366 1177", "GB")
>>> prnt(y)
Country Code: 44 National Number: 2083661177
>>> x == y
True
>>>
>>> formatter = phonenumbers.AsYouTypeFormatter("US")
>>> prnt(formatter.input_digit("6"))
6
>>> prnt(formatter.input_digit("5"))
65
>>> prnt(formatter.input_digit("0"))
650
>>> prnt(formatter.input_digit("2"))
650-2
>>> prnt(formatter.input_digit("5"))
650-25
>>> prnt(formatter.input_digit("3"))
650-253
>>> prnt(formatter.input_digit("2"))
650-2532
>>> prnt(formatter.input_digit("2"))
(650) 253-22
>>> prnt(formatter.input_digit("2"))
(650) 253-222
>>> prnt(formatter.input_digit("2"))
(650) 253-2222
>>>
>>> text = "Call me at 510-748-8230 if it's before 9:30, or on 703-4800500 after 10am."
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
...     prnt(match)
...
PhoneNumberMatch [11,23) 510-748-8230
PhoneNumberMatch [51,62) 703-4800500
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
...     prnt(phonenumbers.format_number(match.number, phonenumbers.PhoneNumberFormat.E164))
...
+15107488230
+17034800500
>>>
   )PhoneNumberCountryCodeSourceFrozenPhoneNumber)REGION_CODE_FOR_NON_GEO_ENTITYNumberFormatPhoneNumberDescPhoneMetadata)AsYouTypeFormatter)7COUNTRY_CODE_TO_REGION_CODESUPPORTED_REGIONSUNKNOWN_REGION!COUNTRY_CODES_FOR_NON_GEO_REGIONSNON_DIGITS_PATTERN	MatchTypeNumberParseExceptionPhoneNumberFormatPhoneNumberTypeValidationResultcan_be_internationally_dialled"convert_alpha_characters_in_numbercountry_code_for_regioncountry_code_for_valid_regioncountry_mobile_tokenexample_numberexample_number_for_type!example_number_for_non_geo_entityformat_by_patternformat_in_original_format(format_national_number_with_carrier_code2format_national_number_with_preferred_carrier_code format_number_for_mobile_dialingformat_number$format_out_of_country_calling_number)format_out_of_country_keeping_alpha_charsinvalid_example_numberis_alpha_numberis_nanpa_countryis_number_matchis_number_geographicalis_number_type_geographicalis_possible_numberis_possible_number_for_type'is_possible_number_for_type_with_reasonis_possible_number_stringis_possible_number_with_reasonis_valid_numberis_valid_number_for_region length_of_geographical_area_code#length_of_national_destination_codenational_significant_numberndd_prefix_for_regionnormalize_digits_onlynormalize_diallable_chars_onlynumber_typeparseregion_code_for_country_coderegion_codes_for_country_coderegion_code_for_numbersupported_calling_codessupported_types_for_region"supported_types_for_non_geo_entitytruncate_too_long_number is_mobile_number_portable_region)SUPPORTED_SHORT_REGIONSShortNumberCost#is_possible_short_number_for_regionis_possible_short_number is_valid_short_number_for_regionis_valid_short_numberexpected_cost_for_regionexpected_costconnects_to_emergency_numberis_emergency_numberis_carrier_specificis_carrier_specific_for_regionis_sms_service_for_region)PhoneNumberMatchPhoneNumberMatcherLeniencyz8.13.43)Or   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r)   r*   r(   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   __main__    N)[__doc__phonenumberr   r   r   phonemetadatar   r   r   r	   asyoutypeformatterr
   phonenumberutilr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   shortnumberinforB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   phonenumbermatcherrO   rP   rQ   __version____all____name__doctesttestmod     U/opt/server/standalone/crm/venv/lib/python3.12/site-packages/phonenumbers/__init__.py<module>rc      s   9X K J g g 21A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1Ad9 9 9 9 O N
 GR zGOO ra   