qi 4SrSSKrSSKrSSKrSSKrSSKJrJr SSKJ r /SQr \R"\R"S5RS5rSr"S S \5r\"5rS \\"S 5'S rSrSrSrSr\\S.rSr\\S.r\\S.rSSjrg)zRoutines for manipulating RFC2047 encoded words. This is currently a package-private API, but will be considered for promotion to a public API if there is demand. N) ascii_lettersdigits)errors)decode_qencode_qdecode_bencode_blen_qlen_bdecodeencodes=([a-fA-F0-9]{2})cf[RURS5R55$)N)bytesfromhexgroupr )ms ;/opt/alt/python313/lib64/python3.13/email/_encoded_words.pyrAs%-- 1 1 34c@URSS5n[U5/4$)N_ )replace_q_byte_subber)encodeds rrrCs"oodD)G ' "B &&rcj\rSrSrS\R "S5-\R "S5-rSrSr g) _QByteMapIs-!*+/asciicpXR;a[U5X'X$SRU5X'X$)Nz={:02X})safechrformat)selfkeys r __missing___QByteMap.__missing__Ms= )) CDIy"((-DIyrN) __name__ __module__ __qualname____firstlineno__rr rr"r'__static_attributes__r)rrrrIs* m**73 3fmmG6L LDrr_ c2SRSU55$)Nc34# UHn[Uv M g7fN) _q_byte_map.0xs r encode_q..Zs37a;q>7s)joinbstrings rrrYs 77373 33rc&[SU55$)Nc3F# UHn[[U5v M g7fr4)lenr5r6s rr9len_q..]s4Gqs;q>""Gs!)sumr<s rr r \s 4G4 44rcf[U5S-nU(aSSSU- OSn[R"X-SS9U(a[R"5/4$/4$![ R a [R"USS9[R"5/4s$![ R a~ [R"US-SS9[R"5[R"5/4ss$![ R a U[R"5/4sss$f=ff=ff=f)Ns===rT)validateFs==) r@base64 b64decoderInvalidBase64PaddingDefectbinasciiErrorInvalidBase64CharactersDefectInvalidBase64LengthDefect)rpad_errmissing_paddings rrrds5'lQG,3fZai(OE   W6 F5>E  E  595578 ~~ E E$$Wu_uE99;668: >> E !A!A!C DDD  E EEsZ3AAD0-*BD0D,/AC50D,1D05,D(!D,#D0'D((D,,D0cL[R"U5RS5$)Nr )rF b64encoder r<s rr r s   G $ + +G 44rcV[[U5S5upUS-U(aS-$S-$)NrDr)divmodr@)r= groups_of_3leftovers rr r s."3w<3K ?8a 33 33r)qbc@URS5upp4nURS5up!nUR5nURSS5n[U"U5upgUR U5nXXW4$![ a? UR[R"SU<S355 UR US5nNL[[4aS UR SS5nUR5S:wa*UR[R"SU<S 355 Nf=f) a[Decode encoded word and return (string, charset, lang, defects) tuple. An RFC 2047/2243 encoded word has the form: =?charset*lang?cte?encoded_string?= where '*lang' may be omitted but the other parts may not be. This function expects exactly such a string (that is, it does not check the syntax and may raise errors if the string is not well formed), and returns the encoded_string decoded first from its Content Transfer Encoding and then from the resulting bytes into unicode using the specified charset. If the cte-decoded string does not successfully decode using the specified character set, a defect is added to the defects list and the unknown octets are replaced by the unicode 'unknown' character \uFDFF. The specified charset and language are returned. The default for language, which is rarely if ever encountered, is the empty string. ?*r surrogateescapez0Encoded word contains bytes not decodable using z charset unknown-8bitzUnknown charset z* in encoded word; decoded as unknown bytes) split partitionlowerr _cte_decodersr UnicodeDecodeErrorappendrUndecodableBytesDefect LookupErrorUnicodeEncodeError CharsetError) ewr/charsetcte cte_stringlangr=defectsstrings rr r s%*&(XXc]"A((-G ))+C):;G$S)'2G ?( D )) <v446229H6FG H):; + ,?):; ==?n , NN6..1A'M<0=> ??sA33AD;ADDc US:XaURSS5nOURU5nUc*[S"U5n[S"U5nXV- S:aSOSn[U"U5nU(aSU-nSRXX'5$) aEncode string using the CTE encoding that produces the shorter result. Produces an RFC 2047/2243 encoded word of the form: =?charset*lang?cte?encoded_string?= where '*lang' is omitted unless the 'lang' parameter is given a value. Optional argument charset (defaults to utf-8) specifies the charset to use to encode the string to binary before CTE encoding it. Optional argument 'encoding' is the cte specifier for the encoding that should be used ('q' or 'b'); if it is None (the default) the encoding which produces the shortest encoded sequence is used, except that 'q' is preferred if it is up to five characters longer. Optional argument 'lang' (default '') gives the RFC 2243 language string to specify in the encoded word. r\r r[rVrWrZz=?{}{}?{}?{}?=)r _cte_encode_length _cte_encodersr$)rmrhencodingrkr=qlenblenrs rr r s". --):;--(!#&w/!#&w/+/3sH%g.G Tz  " "7( DDr)zutf-8Nr2)__doc__rerFrI functoolsrmrremailr__all__partialcompilesubrrdictrr5ordrr rr r r`r rqrpr r)rrrsR ( ""2::.C#D#H#H46'  k  CH45$EL54   '*V     Er