o
     h&                     @   s  d dl mZmZmZ d dlZddlmZ ddlmZ ddl	m
Z
mZmZmZmZ ddlmZ er9d dlZejjZneZddddddddddddd	eeef d
ee dee dee dee dee dee dee dee dee dee dee defddZdS )    )OptionalUnionTYPE_CHECKINGN   )EmailSyntaxError)ValidatedEmail)split_emailvalidate_email_local_partvalidate_email_domain_namevalidate_email_domain_literalvalidate_email_length)CASE_INSENSITIVE_MAILBOX_NAMES)allow_smtputf8allow_empty_localallow_quoted_localallow_domain_literalallow_display_namestrictcheck_deliverabilitytest_environmentglobally_deliverabletimeoutdns_resolveremailr   r   r   r   r   r   r   r   r   r   r   returnc         $   
   C   s  ddl m}m}m}m}m}m}m}m}m	}m
} |du r|}|du r$|}|du r*|}|du r0|}|du r6|}|du r<|}|du rB|}|du rH|}|	du rN|}	|
du rX|du rX|}
t| tr^n"t| tr|z| d} W n ty{ } ztd|d}~ww tdt| \}}}}|rtd|}t }|s|nd| d d	 | |_||_t|||||d
}|d |_|d |_|d |_td|j}||jkrzt|||||d
 W n ty } z	tdt| |d}~ww ||_|r|std|jdur|j tv r|jdur|j |_|j |_d}t|dkr"td|drO| drOt!|dd }|s=td|d |_"|d |_#|d |_$d}nt%|||	d} | d |_"| d |_#|jd	 |j" |_&|js|j#sut'd|jpzdd	 |j# |_(nd|_(t)| |dur|std|r|s|r|S ddl*m+}! |!|j#|j"|
|}"|",d }#|#dur|#|_-|",d!|_.|S )"z
    Given an email address, and some options, returns a ValidatedEmail instance
    with information about the address if it is valid or, if the address is not
    valid, raises an EmailNotValidError. This is the main function of the module.
    r   )
ALLOW_SMTPUTF8ALLOW_EMPTY_LOCALALLOW_QUOTED_LOCALALLOW_DOMAIN_LITERALALLOW_DISPLAY_NAMESTRICTGLOBALLY_DELIVERABLECHECK_DELIVERABILITYTEST_ENVIRONMENTDEFAULT_TIMEOUTNasciiz%The email address is not valid ASCII.zemail must be str or bytesNFC"@)r   r   quoted_local_partr   
local_partascii_local_partsmtputf8zAfter Unicode normalization: z7Quoting the part before the @-sign is not allowed here.Fr   z)There must be something after the @-sign.[]z<A bracketed IP address after the @-sign is not allowed here.domaindomain_addressT)r   r   ascii_domainzMissing ASCII domain. zRA display name and angle brackets around the email address are not permitted here.)validate_email_deliverabilitymxmx_fallback_type)/r3   r   r   r   r   r   r    r!   r"   r#   r$   
isinstancestrbytesdecode
ValueErrorr   	TypeErrorr   unicodedata	normalizer   originaldisplay_namer	   r*   r+   r,   lowerr   len
startswithendswithr   r0   r2   r1   r
   
normalized	Exceptionascii_emailr   deliverabilityr4   getr5   r6   )$r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   er@   r*   domain_partis_quoted_local_partretlocal_part_infonormalized_local_partis_domain_literaldomain_literal_infodomain_name_infor4   deliverability_infor5    rT   `/var/www/html/pro-man-master/venv/lib/python3.10/site-packages/email_validator/validate_email.pyvalidate_email   s   0
















rV   )typingr   r   r   r=   
exceptionsr   typesr   syntaxr   r	   r
   r   r   rfc_constantsr   dns.resolverdnsresolverResolver	_Resolverobjectr8   r9   boolintrV   rT   rT   rT   rU   <module>   s`    

	
