ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
V\¬Qc@sdZddlZd„Zd„Zd„Zd„Zd„ZdZd    „Zd
„Z    d „Z
d „Z d „Z d„Z d„Zdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdeejfd„ƒYZdeejfd„ƒYZd„ZdS(sX Codec for the Punicode encoding, as specified in RFC 3492
 
Written by Martin v. Löwis.
iÿÿÿÿNcCs{g}i}x:|D]2}t|ƒdkr;|j|ƒqd||<qW|jƒ}|jƒdj|ƒjdƒ|fS(s 3.1 Basic code point segregationi€ittascii(tordtappendtkeystsorttjointencode(tstrtbasetextendedtc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyt    segregate s  
cCs:d}x-|D]%}t|ƒ|kr |d7}q q W|S(s@Return the length of str, considering only characters below max.ii(R(RtmaxtresR ((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyt selective_lens
 cCsmt|ƒ}xZ|d7}||kr)dS||}||krM|d|fS||kr|d7}qqdS(sReturn a pair (index, pos), indicating the next occurrence of
    char in str. index is the position of the character considering
    only ordinals up to and including char, and pos is the position in
    the full string. index/pos is the starting position in the full
    string.iiÿÿÿÿN(iÿÿÿÿiÿÿÿÿ(tlen(RtchartindextpostlR ((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytselective_find s 
 
  c CsÀd}g}d}x§|D]Ÿ}d}}t|ƒ}t||ƒ}    |    d||}
xYt||||ƒ\}}|dkr„Pn|
||7}
|j|
dƒ|}d}
qY|}qW|S(s3.2 Insertion unsort codingi€iÿÿÿÿii(RRRR( RR
toldchartresulttoldindexR RRRtcurlentdelta((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytinsertion_unsort2s$ 
      
cCs6d|d|}|dkr"dS|dkr2dS|S(Ni$ii((tjtbiasR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytTHs   t$abcdefghijklmnopqrstuvwxyz0123456789cCsƒg}d}xpt||ƒ}||kr?|jt|ƒ|S|jt|||d|ƒ||d|}|d7}qdS(s(3.3 Generalized variable-length integersii$iN(RRtdigits(tNRRRtt((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytgenerate_generalized_integerPs !cCsr|r|d}n
|d}|||7}d}x$|dkrW|d}|d7}q4W|d||d}|S(Ni¼iiiÇi#i$i&((Rtfirsttnumcharst    divisionsR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytadapt]s 
 
cCsrg}d}xVt|ƒD]H\}}t||ƒ}|j|ƒt||dk||dƒ}qWdj|ƒS(s3.4 Bias adaptationiHiiR(t    enumerateR#textendR'R(tbaselentdeltasRRtpointsRts((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytgenerate_integersls $cCs[t|ƒ\}}|jdƒ}t||ƒ}tt|ƒ|ƒ}|rW|d|S|S(NRt-(R RRR.R(ttextR    R
R+((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytpunycode_encodews c
Cs;d}d}d}x"yt||ƒ}Wn4tk
r_|dkrQtd‚n|dd fSX|d7}d|kodknr“|d}nVd|koªdknr¼|d    }n-|dkrßtd
||ƒ‚n
|d fSt||ƒ}    |||7}||    kr||fS|d |    }|d7}qd S( s(3.3 Generalized variable-length integersiitstrictsincomplete punicode stringiAiZi0i9is Invalid extended code point '%s'i$N(Rt
IndexErrort UnicodeErrortNoneR(
R
textposRterrorsRtwRRtdigitR"((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytdecode_generalized_number‚s2   
 
 
c    Csd}d}d}d}xò|t|ƒkr t||||ƒ\}}|d
krX|S||d7}||t|ƒd7}|dkrµ|dkr¦td|‚ntd    ƒ}n|t|ƒd}|| t|ƒ||}t||dkt|ƒƒ}|}qW|S( s3.2 Insertion unsort codingi€iÿÿÿÿiHiiiÿÿR2sInvalid character U+%xt?N(RR:R5R4RtunichrR'(    R    R
R7RRRR6tnewposR((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytinsertion_sort s(       
cCsp|jdƒ}|dkr*d}|}n|| }||d}t|d|ƒ}|jƒ}t|||ƒS(NR/iÿÿÿÿRiR(trfindtunicodetupperR>(R0R7RR    R
((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytpunycode_decode¹s     
 tCodeccBs eZdd„Zdd„ZRS(R2cCst|ƒ}|t|ƒfS(N(R1R(tselftinputR7R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRÉs cCs;|dkrtd|‚nt||ƒ}|t|ƒfS(NR2treplacetignoresUnsupported error handling (sstrictsreplacesignore(R4RBR(RDRER7R((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pytdecodeÍs (t__name__t
__module__RRH(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRCÇs tIncrementalEncodercBseZed„ZRS(cCs
t|ƒS(N(R1(RDREtfinal((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRÔs(RIRJtFalseR(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRKÓstIncrementalDecodercBseZed„ZRS(cCs2|jdkr"td|j‚nt||jƒS(NR2RFRGsUnsupported error handling (sstrictsreplacesignore(R7R4RB(RDRERL((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRHØs(RIRJRMRH(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRN×st StreamWritercBseZRS((RIRJ(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyROÝst StreamReadercBseZRS((RIRJ(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyRPàscCs@tjdddtƒjdtƒjdtdtdtdtƒS(    NtnametpunycodeRRHtincrementalencodertincrementaldecodert streamwritert streamreader(    tcodecst    CodecInfoRCRRHRKRNRORP(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyt getregentryås      (t__doc__RWR RRRRR R#R'R.R1R:R>RBRCRKRNRORPRY(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/encodings/punycode.pyt<module>s(