ó ø^‚Rc@sddlZddlZddlZddlmZejdƒZdZeedƒZ d„Z d„Z d„Z d ej fd „ƒYZ d ejfd „ƒYZd ejfd„ƒYZde ejfd„ƒYZde ejfd„ƒYZd„ZdS(iÿÿÿÿN(t ucd_3_2_0u [.。.。]sxn--tasciic Cs„g}x9|D]1}tj|ƒr(q n|jtj|ƒƒq Wdj|ƒ}tjd|ƒ}x¨|D] }tj|ƒs÷tj|ƒs÷tj |ƒs÷tj |ƒs÷tj |ƒs÷tj |ƒs÷tj |ƒs÷tj|ƒs÷tj|ƒrjtd|ƒ‚qjqjWttj|ƒ}x]|D]U}|r'ttj|ƒrTtdƒ‚n|d sj|d r|tdƒ‚q|q'q'W|S(NutNFKCsInvalid character %rsViolation of BIDI requirement 2iiÿÿÿÿsViolation of BIDI requirement 3(t stringprept in_table_b1tappendt map_table_b2tjoint unicodedatat normalizet in_table_c12t in_table_c22t in_table_c3t in_table_c4t in_table_c5t in_table_c6t in_table_c7t in_table_c8t in_table_c9t UnicodeErrortmapt in_table_d1tfiltert in_table_d2(tlabeltnewlabeltctRandAL((s$/usr/lib/python2.7/encodings/idna.pytnamepreps4   cCs+y|jdƒ}Wntk r&n3Xdt|ƒkoDdknrM|Stdƒ‚t|ƒ}y|jdƒ}Wntk r‹n3Xdt|ƒko©dknr²|Stdƒ‚|jtƒrÜtdƒ‚n|jdƒ}t|}dt|ƒkodknr|Stdƒ‚dS(NRii@slabel empty or too longsLabel starts with ACE prefixtpunycode(tencodeRtlenRt startswitht uace_prefixt ace_prefix(R((s$/usr/lib/python2.7/encodings/idna.pytToASCII>s, "   "  "cCst|tƒrt}n3y|jdƒ}t}Wntk rJt}nX|s“t|ƒ}y|jdƒ}Wq“tk rtdƒ‚q“Xn|jtƒs¯t |dƒS|t tƒ}|j dƒ}t |ƒ}|j ƒ|krtd||ƒ‚n|S(NRsInvalid character in IDN labelRsIDNA does not round-trip(t isinstancetstrtTrueRRtFalseRR R"tunicodeRtdecodeR#tlower(Rt pure_asciitlabel1tresulttlabel2((s$/usr/lib/python2.7/encodings/idna.pyt ToUnicodeis*        tCodeccBs eZdd„Zdd„ZRS(tstrictcCs±|dkrtd|ƒ‚n|s)dSg}tj|ƒ}|rjt|dƒdkrjd}|d=nd}x!|D]}|jt|ƒƒqwWdj|ƒ|t|ƒfS(NR1sunsupported error handling tiiÿÿÿÿt.(R2i(RtdotstsplitRRR#R(tselftinputterrorsR-tlabelst trailing_dotR((s$/usr/lib/python2.7/encodings/idna.pyR“s   cCsë|dkrtd|ƒ‚n|s)d St|tƒrJtj|ƒ}n(t|ƒ}t|dƒ|jdƒ}|ržt|dƒdkržd}|d=nd}g}x!|D]}|jt|ƒƒq±Wdj |ƒ|t|ƒfS( NR1sUnsupported error handling uiRR3iÿÿÿÿu.(ui( RR$R(R4R5R%RRR/R(R6R7R8R9R:R-R((s$/usr/lib/python2.7/encodings/idna.pyR)¨s"     (t__name__t __module__RR)(((s$/usr/lib/python2.7/encodings/idna.pyR0’s tIncrementalEncodercBseZd„ZRS(c Cs|dkrtd|ƒ‚n|s)d Stj|ƒ}d}|r€|ds^d}|d=q€|s€|d=|r}d}q}q€ng}d}xD|D]<}|jt|ƒƒ|r¿|d7}n|t|ƒ7}q“Wdj|ƒ|}|t|ƒ7}||fS( NR1sunsupported error handling R2iuiÿÿÿÿR3i(R2i(RR4R5RR#RR( R6R7R8tfinalR9R:R-tsizeR((s$/usr/lib/python2.7/encodings/idna.pyt_buffer_encodeÆs0     (R;R<R@(((s$/usr/lib/python2.7/encodings/idna.pyR=ÅstIncrementalDecodercBseZd„ZRS(c Cs:|dkrtd|ƒ‚n|s)d St|tƒrJtj|ƒ}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( NR1sUnsupported error handling uiRR3iÿÿÿÿu.i(ui( RR$R(R4R5R%RR/RR( R6R7R8R>R9R:R-R?R((s$/usr/lib/python2.7/encodings/idna.pyt_buffer_decodeès8       (R;R<RB(((s$/usr/lib/python2.7/encodings/idna.pyRAçst StreamWritercBseZRS((R;R<(((s$/usr/lib/python2.7/encodings/idna.pyRCst StreamReadercBseZRS((R;R<(((s$/usr/lib/python2.7/encodings/idna.pyRDscCs@tjdddtƒjdtƒjdtdtdtdtƒS( NtnametidnaRR)tincrementalencodertincrementaldecodert streamwritert streamreader( tcodecst CodecInfoR0RR)R=RARCRD(((s$/usr/lib/python2.7/encodings/idna.pyt getregentrys   (RtreRKRRtcompileR4R"R(R!RR#R/R0tBufferedIncrementalEncoderR=tBufferedIncrementalDecoderRARCRDRM(((s$/usr/lib/python2.7/encodings/idna.pyts$ 0 + )3"(