AlkantarClanX12

Your IP : 18.218.190.118


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/email/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/email/__pycache__/utils.cpython-311.opt-2.pyc

�

c��fFC���	gd�ZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddl	mZddl	m
Z
ddl	mZmZmZddlmZdZd	Zd	Zd
ZdZejd��Zejd
��Zd�Zd�Zd+d�Zd�Zd�ZdZ dd�d�Z!d�Z"d�Z#d�Z$d�Z%d,d�Z&d-d�Z'd.d�Z(d�Z)dd�d �Z*d!�Z+d"�Z,d.d#�Z-ejd$ej.��Z/d%�Z0		d/d(�Z1d0d*�Z2dS)1)�collapse_rfc2231_value�
decode_params�decode_rfc2231�encode_rfc2231�
formataddr�
formatdate�format_datetime�getaddresses�
make_msgid�	mktime_tz�	parseaddr�	parsedate�parsedate_tz�parsedate_to_datetime�unquote�N)�quote)�AddressList)r)r
r�
_parsedate_tz)�Charsetz, �z
�'z[][\\()<>@,:;".]z[\\"]c�T�		|���dS#t$rYdSwxYw)NFT)�encode�UnicodeEncodeError)�ss �2/opt/alt/python311/lib64/python3.11/email/utils.py�_has_surrogatesr4s>��E��	���
�
�
��u�������t�t����s��
'�'c�Z�|�dd��}|�dd��S)N�utf-8�surrogateescape�replace)r�decode)�string�original_bytess  r�	_sanitizer%As.��
�]�]�7�,=�>�>�N�� � ��)�4�4�4�rc��	|\}}|�d��|r�	|�d��d}t�|��rd}t�d|��}|�|�|�d|�d�S#t
$rDt
|t��rt|��}|�	|��}|�d|�d�cYSwxYw|S)N�asciir�"z\\\g<0>z <�>)
r�
specialsre�search�	escapesre�subr�
isinstance�strr�
header_encode)�pair�charset�name�address�quotes�encoded_names      rrrMs����M�D�'��N�N�7�����
C�	C��K�K�� � � ��F�� � ��&�&�
����=�=��T�2�2�D�$*�F�D�D�&�&�&�'�'�'�B�B��"�	7�	7�	7��'�3�'�'�
+�!�'�*�*��"�0�0��6�6�L� ,���g�g�g�6�6�6�6�		7�����Ns�A9�9AC�Cc#�K�d}d}t|��D]"\}}|r|d|zfV�d}�|dkrd}�||fV��#|r|dfV�dSdS)NrF�\T)�	enumerate)�addr�pos�escape�chs    r�_iter_escaped_charsr?ns�����
�C�
�F��T�?�?�����R��	���r�	�"�"�"�"��F�F�
�4�Z�Z��F�F���)�O�O�O�O�
���D�k�������r&c�:�	d|vr|Sd}d}g}t|��D]:\}}|dkr/|�|}�||kr|�|||���|dz}d}�;|t|��kr|�||d���d�|��S)Nr)r�r)r?�append�len�join)r;�start�open_pos�resultr<r>s      r�_strip_quoted_realnamesrH}s���*�
�$�����
�E��H�
�F�&�t�,�,� � ���R�
��9�9�������H�$�$��M�M�$�u�X�~�"6�7�7�7��a�������s�4�y�y����
�
�d�5�6�6�l�#�#�#�
�7�7�6�?�?�r&T)�strictc��	|s:t�d�|D����}t|��}|jSd�|D��}t	|��}t�|��}t|��}t|j��}d}|D],}t
|��}|d|�d��zz
}�-t|��|krdgS|S)Nc3�4K�|]}t|��V��dS)N�r0��.0�vs  r�	<genexpr>zgetaddresses.<locals>.<genexpr>�s(����:�:��c�!�f�f�:�:�:�:�:�:r&c�,�g|]}t|����S�rLrMs  r�
<listcomp>z getaddresses.<locals>.<listcomp>�s��/�/�/�a�3�q�6�6�/�/�/r&rrA�,�rr)	�
COMMASPACErD�_AddressList�addresslist�_pre_parse_validation�_post_parse_validationrH�countrC)�fieldvaluesrI�all�ar;rG�nrOs        rr	r	�s����"���o�o�:�:�k�:�:�:�:�:��������}��/�/�;�/�/�/�K�'��4�4�K��?�?�;�'�'�D��T���A�
#�A�M�
2�
2�F�	
�A�
����
$�A�&�&��	�Q�������
����
�6�{�{�a����z���Mr&c��t|��}d}t|��D]%\}}|dkr|dz
}�|dkr|dz}|dkrdS�&|dkS)Nr�(rA�)F)rHr?)r;�opensr<r>s    r�_check_parenthesisrd�sp��"�4�(�(�D�
�E�&�t�,�,�����R�
��9�9��Q�J�E�E�
�3�Y�Y��Q�J�E��q�y�y��u�u���Q�J�r&c�`�g}|D](}t|��sd}|�|���)|S)Nz('', ''))rdrB)�email_header_fields�accepted_valuesrOs   rrYrY�sH���O�
 �"�"��!�!�$�$�	��A����q�!�!�!�!��r&c�V�g}|D]#}d|dvrd}|�|���$|S)N�[rArU)rB)�parsed_email_header_tuplesrgrOs   rrZrZ�sG���O�(�"�"���!�A�$�;�;��A����q�!�!�!�!��r&c	��dgd�|d|dgd�|ddz
|d|d|d	|d
|fzS)Nz"%s, %02d %s %04d %02d:%02d:%02d %s)�Mon�Tue�Wed�Thu�Fri�Sat�Sun��)�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�DecrAr���rR)�	timetuple�zones  r�_format_timetuple_and_zoner��sj��/�9�9�9�)�A�,�G��!��	3�	3�	3�3<�Q�<�!�3C�	E��!��i��l�I�a�L�)�A�,��
3��r&Fc�$�	|�tj��}|s|r0tj�|tjj��}ntj�|��}|r|���}d}t||��S)NF)�time�datetime�
fromtimestamp�timezone�utc�utcfromtimestamp�
astimezoner)�timeval�	localtime�usegmt�dts    rrr�s����"���)�+�+���9�F�9�
�
�
,�
,�W�h�6G�6K�
L�
L���
�
�
/�
/��
8�
8����
�]�]�_�_�����2�v�&�&�&r&c���	|���}|r3|j�|jtjjkrtd���d}n|j�d}n|�d��}t||��S)Nz%usegmt option requires a UTC datetime�GMTz-0000z%z)r��tzinfor�r�r��
ValueError�strftimer�)r�r��nowr�s    rrrs~���
�,�,�.�.�C�
�!�
�9���	�X�->�-B� B� B��D�E�E�E����	��	�����{�{�4� � ��%�c�4�0�0�0r&c���	ttj��dz��}tj��}t	jd��}|�d}nd|z}|�t
j��}d|||||fz}|S)N�d�@r�.z<%d.%d.%d%s@%s>)�intr��os�getpid�random�getrandbits�socket�getfqdn)�idstring�domainr��pid�randint�msgids      rr
r
"s}����$�)�+�+�c�/�"�"�G�
�)�+�+�C�� ��$�$�G��������>��
�~���!�!����#�w��&� I�I�E��Lr&c	��t|��}|�tdt|��z���|�^}}|�tj|dd��Stj|dd�dtjtj|�����i�S)Nz!Invalid date value or format "%s"rsr���seconds)rr�r0r�r��	timedelta)�data�parsed_date_tz�dtuple�tzs    rrr9s���"�4�(�(�N����<�s�4�y�y�H�I�I�I� �K�V�R�	�z�� �&��!��*�-�-���f�R�a�R�j�F��$�X�%7��%C�%C�%C�D�D�F�F�Fr&c�\�	|s t|��j}|sdS|dSt|t��r|d}t|t��sdSt|g��d}t
t|��j��}|rt|��dkrdS|dS)NrUrrA)rWrXr/�listr0rYrZrC)r;rI�addrss   rrrDs�������T�"�"�.���	��8��Q�x���$������A�w���d�C� � ���x� �$��(�(��+�D�"�<��#5�#5�#A�B�B�E���C��J�J��N�N��x���8�Or&c�N�	t|��dkr�|�d��rG|�d��r2|dd��dd���dd��S|�d��r|�d��r
|dd�S|S)	NrAr)���z\\r9z\"�<r*)rC�
startswith�endswithr!rLs rrrcs���&�
�3�x�x�!�|�|��>�>�#���	G�3�<�<��#4�#4�	G��q��t�9�$�$�V�T�2�2�:�:�5�#�F�F�F��>�>�#���	�3�<�<��#4�#4�	��q��t�9���Jr&c�n�	|�td��}t|��dkrdd|fS|S)Nrt)�split�TICKrC)r�partss  rrros8��-�
�G�G�D�!���E�
�5�z�z�Q����T�1�}���Lr&c�t�	tj�|d|pd���}|�|�|S|�d}|�d|�d|��S)Nrr()�safe�encodingr)�urllib�parser)rr3�languages   rrrws[���	����1�2��0B�7��C�C�A���8�+������� ���(�(�(�A�A�.�.r&z&^(?P<name>\w+)\*((?P<num>[0-9]+)\*?)?$c��	|dg}i}|dd�D]�\}}|�d��}t|��}t�|��}|rW|�dd��\}}|�t|��}|�|g���|||f����|�|dt|��zf����|r�|�	��D]�\}}g}d}	|�
��|D]@\}}
}|r#tj�|
d�	��}
d
}	|�|
���Att�|����}|	r1t|��\}}}|�|||d|zff����|�|d|zf����|S)NrrA�*r4�numz"%s"Fzlatin-1)r�T)r�r�rfc2231_continuation�match�groupr��
setdefaultrBr�items�sortr�r��EMPTYSTRINGrDr)
�params�
new_params�rfc2231_paramsr4�value�encoded�mor��
continuations�extendedrr3r�s
             rrr�s�����)��J��N��a�b�b�z�
=�
=���e��-�-��$�$�������
!�
'�
'��
-�
-��
�	=������/�/�I�D�#����#�h�h���%�%�d�B�/�/�6�6��U�G�7L�M�M�M�M����t�V�e�E�l�l�%:�;�<�<�<�<��:�#1�#7�#7�#9�#9�	:�	:��D�-��E��H���� � � �$1�
 �
 ���Q���$���,�,�Q��,�C�C�A�#�H����Q������+�*�*�5�1�1�2�2�E��
:�+9�%�+@�+@�(���5��!�!�4�'�8�V�e�^�)L�"M�N�N�N�N��!�!�4��%��"8�9�9�9�9��r&r!�us-asciic��t|t��rt|��dkrt|��S|\}}}|�|}t	|d��}	t|||��S#t$rt|��cYSwxYw)Nr�zraw-unicode-escape)r/�tuplerCr�bytesr0�LookupError)r��errors�fallback_charsetr3r��text�rawbytess       rrr�s����e�U�#�#��s�5�z�z�Q����u�~�~��$��G�X�t���#���T�/�0�0�H���8�W�f�-�-�-�������t�}�}�������s�A$�$B�?Br�c�f�	|�@tj�tjj�����S|j�|���S|���dd�|fz}tj|��}tj	|��}	tj
|j���}tj||j��}n�#t$r�|tjtj|��dd��z
}tjo
|jdk}|rtjntj}|tj
|���kr&tj|tj|��}ntj|��}YnwxYw|�|���S)Nr�r�rsr)r�)r�r�r�r�r�r�r�r��mktimer�r��	tm_gmtoff�tm_zone�AttributeError�gmtime�daylight�tm_isdst�altzone�tznamer!)	r��isdst�tmr��localtm�deltar��dst�gmtoffs	         rr�r��s����
�z�� �$�$�X�%6�%:�;�;�F�F�H�H�H�	�y���}�}����
��������	��x�	'�B��k�"�o�o�G��n�W�%�%�G�*��"�7�+<�=�=�=��
�
�u�g�o�
6�
6�����	*�	*�	*��X�&���G�(<�(<�R�a�R�(@�A�A���m�4�� 0�1� 4��#&�9�4�<�<�D�M�:���H�&�v�6�6�6�6�6��"�5�$�+�c�*:�;�;�B�B��"�5�)�)�B���	*�����:�:�R�:� � � s�(4C�B:F�F)r)NFF)F)NN)r!r�)Nr�)3�__all__r��rer�r�r�r��urllib.parser��email._parseaddrrrrWrr
rr�
email.charsetrrVr��UEMPTYSTRING�CRLFr��compiler+r-rr%rr?rH�supports_strict_parsingr	rdrYrZr�rrr
rrrrr�ASCIIr�rrr�rRr&r�<module>r�s���
�����$
�	�	�	�	�	�	�	�����
�
�
�
�
�
�
�
���������"�"�"�"�"�"�8�8�8�8�8�8�&�&�&�&�&�&�C�C�C�C�C�C�C�C�C�C�"�!�!�!�!�!�
�
�����
��
��
�R�Z�+�
,�
,�
��B�J�x� � �	�	�	�	�5�5�5�����B������2��(,�)�)�)�)�)�X������	�	�	����'�'�'�'�:1�1�1�1�&����.F�F�F�#������>������/�/�/�/�"�r�z�"K��H����.�.�.�`*3�,6�����4%!�%!�%!�%!�%!�%!r&