� ��^c@s�ddlmZmZmZmZmZddlZddlZejd�Z dej fd��YZ dej fd��YZ d ej fd ��YZd e ejfd ��YZd e ejfd��YZd�ZdS(i(tencodetdecodetalabeltulabelt IDNAErrori����Nu [.。.。]tCodeccBs eZdd�Zdd�ZRS(tstrictcCsD|dkr$tdj|���n|s.dSt|�t|�fS(NRs Unsupported error handling "{0}"ti(Ri(RtformatRtlen(tselftdataterrors((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyR s  cCsD|dkr$tdj|���n|s.dSt|�t|�fS(NRs Unsupported error handling "{0}"ui(ui(RRRR (R R R ((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyRs  (t__name__t __module__RR(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyRs tIncrementalEncodercBseZd�ZRS(c Cs|dkr$tdj|���n|s.d Stj|�}d}|r�|dscd}|d=q�|s�|d=|r�d}q�q�ng}d}xD|D]<}|jt|��|r�|d7}n|t|�7}q�Wdj|�|}|t|�7}||fS( NRs Unsupported error handling "{0}"Riui����t.i(Ri(RRt_unicode_dots_retsplittappendRR tjoin( R R R tfinaltlabelst trailing_dottresulttsizetlabel((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyt_buffer_encodes0     (R RR(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyRstIncrementalDecodercBseZd�ZRS(c Cs?|dkr$tdj|���n|s.d St|t�rOtj|�}n(t|�}t|d�|jd�}d}|r�|ds�d}|d=q�|s�|d=|r�d}q�q�ng}d}xD|D]<}|jt|��|r�|d 7}n|t |�7}q�Wdj |�|}|t |�7}||fS( NRs Unsupported error handling "{0}"uitasciiRi����u.i(ui( RRt isinstancetunicodeRRtstrRRR R( R R R RRRRRR((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyt_buffer_decode?s8       (R RR!(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyR>st StreamWritercBseZRS((R R(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyR"gst StreamReadercBseZRS((R R(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyR#jscCs@tjdddt�jdt�jdtdtdtdt�S( NtnametidnaRRtincrementalencodertincrementaldecodert streamwritert streamreader( tcodecst CodecInfoRRRRRR"R#(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyt getregentryms   (tcoreRRRRRR*tretcompileRRtBufferedIncrementalEncoderRtBufferedIncrementalDecoderRR"R#R,(((s(/tmp/pip-build-1THPZW/idna/idna/codec.pyts(  !)