B
    @)H[Y  ã               @   s    d dl mZmZmZmZmZ ddlZddlZe d¡Z	G dd„ dej
ƒZ
G dd„ dejƒZG d	d
„ d
ejƒZG dd„ de
ejƒZG dd„ de
ejƒZdd„ ZdS )é   )ÚencodeÚdecodeÚalabelÚulabelÚ	IDNAErroré    Nu   [.ã€‚ï¼Žï½¡]c               @   s    e Zd Zddd„Zddd„ZdS )	ÚCodecÚstrictc             C   s.   |dkrt d |¡ƒ‚|sdS t|ƒt|ƒfS )Nr	   z Unsupported error handling "{0}")Ú r   )r   Úformatr   Úlen)ÚselfÚdataÚerrors© r   úWC:\Users\HIRONO~1\AppData\Local\Temp\pip-install-qz7kpjmn\pip\pip\_vendor\idna\codec.pyr   	   s
    zCodec.encodec             C   s.   |dkrt d |¡ƒ‚|sdS t|ƒt|ƒfS )Nr	   z Unsupported error handling "{0}")r
   r   )r   r   r   r   )r   r   r   r   r   r   r      s
    zCodec.decodeN)r	   )r	   )Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   

r   c               @   s   e Zd Zdd„ ZdS )ÚIncrementalEncoderc       	      C   s´   |dkrt d |¡ƒ‚|sdS t |¡}d}|rV|d sDd}|d= n|sV|d= |rVd}g }d}x2|D ]*}| t|ƒ¡ |r‚|d7 }|t|ƒ7 }qdW d |¡| }|t|ƒ7 }||fS )	Nr	   z Unsupported error handling "{0}")r
   r   r
   éÿÿÿÿÚ.r   r   )r   r   Ú_unicode_dots_reÚsplitÚappendr   r   Újoin)	r   r   r   ÚfinalÚlabelsÚtrailing_dotÚresultÚsizeÚlabelr   r   r   Ú_buffer_encode   s0    

z!IncrementalEncoder._buffer_encodeN)r   r   r   r"   r   r   r   r   r      s   r   c               @   s   e Zd Zdd„ ZdS )ÚIncrementalDecoderc       	      C   sÜ   |dkrt d |¡ƒ‚|sdS t|tƒr4t |¡}nt|ƒ}t|dƒ | d¡}d}|r~|d sld}|d= n|s~|d= |r~d}g }d}x2|D ]*}| t|ƒ¡ |rª|d	7 }|t	|ƒ7 }qŒW d 
|¡| }|t	|ƒ7 }||fS )
Nr	   z Unsupported error handling "{0}")r
   r   Úasciir   r
   r   r   r   )r   r   Ú
isinstanceÚunicoder   r   Ústrr   r   r   r   )	r   r   r   r   r   r   r   r    r!   r   r   r   Ú_buffer_decode?   s8    



z!IncrementalDecoder._buffer_decodeN)r   r   r   r(   r   r   r   r   r#   >   s   r#   c               @   s   e Zd ZdS )ÚStreamWriterN)r   r   r   r   r   r   r   r)   g   s   r)   c               @   s   e Zd ZdS )ÚStreamReaderN)r   r   r   r   r   r   r   r*   j   s   r*   c            	   C   s    t jdtƒ jtƒ jttttd�S )NÚidna)Únamer   r   ÚincrementalencoderÚincrementaldecoderÚstreamwriterÚstreamreader)	ÚcodecsÚ	CodecInfor   r   r   r   r#   r)   r*   r   r   r   r   Úgetregentrym   s    r3   )Úcorer   r   r   r   r   r1   ÚreÚcompiler   r   ÚBufferedIncrementalEncoderr   ÚBufferedIncrementalDecoderr#   r)   r*   r3   r   r   r   r   Ú<module>   s   
!)