AlkantarClanX12

Your IP : 18.119.122.140


Current Path : /proc/self/root/opt/alt/python39/lib64/python3.9/encodings/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python39/lib64/python3.9/encodings/__pycache__/idna.cpython-39.pyc

a

R�f�#�@s�ddlZddlZddlZddlmZe�d�ZdZdZdd�Z	dd	�Z
d
d�ZGdd
�d
ej�ZGdd�dej
�ZGdd�dej�ZGdd�deej�ZGdd�deej�Zdd�ZdS)�N)�	ucd_3_2_0u[.。.。]sxn--zxn--cCs�g}|D] }t�|�rq|�t�|��qd�|�}t�d|�}|D]j}t�|�s�t�|�s�t�	|�s�t�
|�s�t�|�s�t�|�s�t�
|�s�t�|�s�t�|�rDtd|��qDdd�|D�}t|�r�tdd�|D��r�td��|d	r�|d
s�td��|S)N�ZNFKCzInvalid character %rcSsg|]}t�|��qS�)�
stringprepZin_table_d1��.0�xrr�3/opt/alt/python39/lib64/python3.9/encodings/idna.py�
<listcomp>)�znameprep.<locals>.<listcomp>css|]}t�|�VqdS)N)rZin_table_d2rrrr	�	<genexpr>1rznameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r���zViolation of BIDI requirement 3)rZin_table_b1�appendZmap_table_b2�join�unicodedataZ	normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9�UnicodeError�any)�labelZnewlabel�cZRandALrrr	�nameprepsB


��������	rcCs�z|�d�}Wnty Yn*0dt|�kr:dkrBnn|Std��t|�}z|�d�}WntyrYn*0dt|�kr�dkr�nn|Std��|�t�r�td��|�d�}t|}dt|�kr�dkr�nn|Std��dS)N�asciir�@�label empty or too longzLabel starts with ACE prefix�punycode)�encoder�lenr�
startswith�sace_prefix�
ace_prefix)rrrr	�ToASCII<s,

rcCs�t|t�rd}n*z|�d�}d}Wnty8d}Yn0|spt|�}z|�d�}Wntyntd��Yn0|�t�s�t|d�S|tt�d�}|�	d�}t
|�}t|d���t|d�kr�td||��|S)NTrFzInvalid character in IDN labelrzIDNA does not round-trip)�
isinstance�bytesrrrrr�strr�decoder�lower)rZ
pure_asciiZlabel1�resultZlabel2rrr	�	ToUnicodegs*





r&c@s eZdZddd�Zddd�ZdS)	�Codec�strictcCs|dkrtd|��|sdSz|�d�}Wnty<Ynd0|�d�}|dd�D]&}dt|�krpdksTntd	��qTt|d�dkr�td
��|t|�fSt�}t�|�}|r�|ds�d}|d=nd}|D] }|r�|�d�|�t|��q�t	||�t|�fS)Nr(�unsupported error handling �rrr�.r
rrrzlabel too longr)
rr�UnicodeEncodeError�splitr�	bytearray�dots�extendrr!)�self�input�errorsr%�labelsr�trailing_dotrrr	r�s4



zCodec.encodecCs�|dkrtd|��|sdSt|t�s.t|�}t|vr^z|�d�t|�fWSty\Yn0|�d�}|r�t|d�dkr�d}|d=nd	}g}|D]}|�t	|��q�d�
|�|t|�fS)
Nr(�Unsupported error handling �rrrr+r
r�.r)rr r!rr#r�UnicodeDecodeErrorr-rr&r)r1r2r3r4r5r%rrrr	r#�s(

zCodec.decodeN)r()r()�__name__�
__module__�__qualname__rr#rrrr	r'�s
%r'c@seZdZdd�ZdS)�IncrementalEncoderc	Cs�|dkrtd|��|sdSt�|�}d}|rT|dsBd}|d=n|sT|d=|rTd}t�}d}|D]4}|r||�d�|d7}|�t|��|t|�7}qb||7}|t|�7}t|�|fS)	Nr(r)r*rr
r+r�)rr/r-r.r0rrr!�	r1r2r3�finalr4r5r%�sizerrrr	�_buffer_encode�s2

z!IncrementalEncoder._buffer_encodeN)r:r;r<rBrrrr	r=�sr=c@seZdZdd�ZdS)�IncrementalDecoderc	Cs�|dkrtd|��|sdSt|t�r2t�|�}nt|d�}|�d�}d}|rt|dsbd}|d=n|st|d=|rtd}g}d}|D]*}|�t|��|r�|d	7}|t|�7}q�d�|�|}|t|�7}||fS)
Nr(r6r7rr8rr
rr>)	rr r"r/r-rr&rrr?rrr	�_buffer_decode�s6


z!IncrementalDecoder._buffer_decodeN)r:r;r<rDrrrr	rC�srCc@seZdZdS)�StreamWriterN�r:r;r<rrrr	rE"srEc@seZdZdS)�StreamReaderNrFrrrr	rG%srGc	Cs tjdt�jt�jttttd�S)NZidna)�namerr#�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor'rr#r=rCrErGrrrr	�getregentry*s�rO)r�rerMrr�compiler/rrrrr&r'�BufferedIncrementalEncoderr=�BufferedIncrementalDecoderrCrErGrOrrrr	�<module>s
.+)H#'