ó GÑÕfc@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 Csyg}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|ƒ}t|ƒruttj|ƒrMtdƒ‚n|d sc|d rutdƒ‚qun|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_d1tanytfiltert in_table_d2(tlabeltnewlabeltctRandAL((s&/usr/lib64/python2.7/encodings/idna.pytnamepreps2   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/lib64/python2.7/encodings/idna.pytToASCII<s, "   "  "cCs&t|ƒdkr!tdƒ‚nt|tƒr9t}n3y|jdƒ}t}Wntk rkt}nX|s´t|ƒ}y|jdƒ}Wq´tk r°tdƒ‚q´Xn|jt ƒsÐt |dƒS|tt ƒ}|j dƒ}t |ƒ}|j ƒ|kr"td||ƒ‚n|S(Nislabel way too longRsInvalid character in IDN labelRsIDNA does not round-trip(R Rt isinstancetstrtTrueRtFalseRR!R#tunicodetdecodeR$tlower(Rt pure_asciitlabel1tresulttlabel2((s&/usr/lib64/python2.7/encodings/idna.pyt ToUnicodegs.         tCodeccBs eZdd„Zdd„ZRS(tstrictcCs±|dkrtd|ƒ‚n|s)dSg}tj|ƒ}|rjt|dƒdkrjd}|d=nd}x!|D]}|jt|ƒƒqwWdj|ƒ|t|ƒfS(NR2sunsupported error handling tiiÿÿÿÿt.(R3i(RtdotstsplitR RR$R(tselftinputterrorsR.tlabelst trailing_dotR((s&/usr/lib64/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( NR2sUnsupported error handling uiRR4iÿÿÿÿu.(ui( RR%R)R5R6R&R RR0R(R7R8R9R:R;R.R((s&/usr/lib64/python2.7/encodings/idna.pyR*°s"     (t__name__t __module__RR*(((s&/usr/lib64/python2.7/encodings/idna.pyR1š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( NR2sunsupported error handling R3iuiÿÿÿÿR4i(R3i(RR5R6RR$R R( R7R8R9tfinalR:R;R.tsizeR((s&/usr/lib64/python2.7/encodings/idna.pyt_buffer_encodeÎs0     (R<R=RA(((s&/usr/lib64/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( NR2sUnsupported error handling uiRR4iÿÿÿÿu.i(ui( RR%R)R5R6R&RR0R R( R7R8R9R?R:R;R.R@R((s&/usr/lib64/python2.7/encodings/idna.pyt_buffer_decodeðs8       (R<R=RC(((s&/usr/lib64/python2.7/encodings/idna.pyRBïst StreamWritercBseZRS((R<R=(((s&/usr/lib64/python2.7/encodings/idna.pyRDst StreamReadercBseZRS((R<R=(((s&/usr/lib64/python2.7/encodings/idna.pyREscCs@tjdddtƒjdtƒjdtdtdtdtƒS( NtnametidnaRR*tincrementalencodertincrementaldecodert streamwritert streamreader( tcodecst CodecInfoR1RR*R>RBRDRE(((s&/usr/lib64/python2.7/encodings/idna.pyt getregentrys   (RtreRLRRtcompileR5R#R)R"RR$R0R1tBufferedIncrementalEncoderR>tBufferedIncrementalDecoderRBRDRERN(((s&/usr/lib64/python2.7/encodings/idna.pyts$ . + 33"(