+
    Brh                         R t . ROtRt^LtRtRt ^ RIHtHt R t
R tRR ltRR	 ltRR
 ltRR ltR tR tR t]R8X  d
   ]! 4        R# R#   ]	 d    RtRt LBi ; i)zHConversions to/from quoted-printable transport encoding as per RFC 1521.   =s   0123456789ABCDEF    )a2b_qpb2a_qpNc                    \        V \        4      '       g   Q hV R9   d   V# V R8X  d   V# V \        8H  ;'       g    RT u;8*  ;'       d    R8*  Mu '       * # )zDecide whether a particular byte ordinal needs to be quoted.

The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted.  Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
    	   _       ~)
isinstancebytesESCAPE)c	quotetabsheaders   &&&#/usr/local/lib/python3.14/quopri.pyneedsquotingr      sR     aF{Dy;11tq00D011r   c                    \        V \        4      '       d   \        V 4      ^8X  g   Q h\        V 4      p \        \        \
        V ^,          ,          \
        V ^,          ,          34      ,           # )zQuote a single character.)r   r   lenordr   HEXr   s   &r   quoter   "   sM    aCFAI--AAE3q"u:s1R4y1222r   c                   \         e1   V P                  4       p\        WBVR7      pVP                  V4       R# VR3R lpRpV P                  4       ;p'       d   . p	Rp
VR
R R8X  d   VRR
 pRp
V F_  p\	        V34      p\        WV4      '       d   \        V4      pV'       d   VR8X  d   V	P                  R4       KN  V	P                  V4       Ka  	  Ve	   V! V4       \        P                  V	4      p\        V4      \        8  d+   V! VR\        ^,
           RR	7       V\        ^,
          R pK>  TpK  Ve   V! VX
R	7       R# R# )ab  Read 'input', apply quoted-printable encoding, and write to 'output'.

'input' and 'output' are binary file objects. The 'quotetabs' flag
indicates whether embedded tabs and spaces should be quoted. Note that
line-ending tabs and spaces are always encoded, as per RFC 1521.
The 'header' flag indicates whether we are encoding spaces as _ as per RFC
1522.Nr   r      
c                    V '       d;   V RR R9   d1   VP                  V RR \        V RR 4      ,           V,           4       R# V R8X  d$   VP                  \        V 4      V,           4       R# VP                  W,           4       R# )   Nr      .)writer   )soutputlineEnds   &&&r   r    encode.<locals>.write9   sd     236!LL3B%"#-/'9:$YLLqG+,LL%r   r   r	   r   s   =
)r#   r   )r   readr    readliner   r   r   appendEMPTYSTRINGjoinr   MAXLINESIZE)inputr"   r   r   dataodatar    prevlinelineoutlinestrippedr   thislines   &&&&         r   encoder3   *   s5    zz|t@U & H.."
"$
"99DHAqdAA&11!H!t)t$q!  (O ##G,(mk) (>KM*F;A/Hh) r   c                     \         e   \        WVR7      # ^ RIHp V! V 4      pV! 4       p\        WEW4       VP	                  4       # )Nr   BytesIO)r   ior6   r3   getvalue)r!   r   r   r6   infpoutfps   &&&   r   encodestringr;   e   s?    aV<<1:DIE
4	*>>r   c           	     \   \         e0   V P                  4       p\        W2R7      pVP                  V4       R# RpV P                  4       ;p'       Ed   ^ \	        V4      rV^ 8  d>   Wh^,
          V R8X  d.   ^ q^,
          pV^ 8  d   Wh^,
          V R9   d   V^,
          pK"  M^p	Wx8  Ed>   WgV^,            p
V
R8X  d   V'       d   VR,           qW^,           pK4  V
\
        8w  d   WZ,           qW^,           pKQ  V^,           V8X  d   V	'       g   ^p	MV^,           V8  d3   Wg^,           V^,            \
        8X  d   V\
        ,           qW^,           pK  V^,           V8  dz   \        Wg^,           V^,            4      '       dY   \        Wg^,           V^,            4      '       d8   V\        \        Wg^,           V^,            4      34      ,           qW^,           pEK1  WZ,           qW^,           pEKD  V	'       d   EK  VP                  VR,           4       RpEK  V'       d   VP                  V4       R# R# )zRead 'input', apply quoted-printable decoding, and write to 'output'.
'input' and 'output' are binary file objects.
If 'header' is true, decode underscore as space (per RFC 1522).Nr   r   r   s    	r   r	   )	r   r%   r    r&   r   r   ishexr   unhex)r+   r"   r   r,   r-   newr/   inpartialr   s   &&&        r   decoderD   p   s   
 zz|t+U
C.."
"$
"#d)1q5TA#a[E)GqSa%D1QK83aCGeqsADyVDjc!fgQ3q1'U1qTA#ac]f4Fl!A1qU4!AaC=11eD1QqSM6J6JE5c!A##7"9::!AgQ3qwLLu%C
S r   c                     \         e   \        WR7      # ^ RIHp V! V 4      pV! 4       p\        W4VR7       VP	                  4       # )Nr=   r5   )r   r7   r6   rD   r8   )r!   r   r6   r9   r:   s   &&   r   decodestringrF      s=    a''1:DIE
4v&>>r   c                    \        V \        4      '       g   Q hRT u;8*  ;'       d    R8*  Mu ;'       g5    RT u;8*  ;'       d    R8*  Mu ;'       g    RT u;8*  ;'       d    R8*  # u # )zDReturn true if the byte ordinal 'c' is a hexadecimal digit in ASCII.   0   9   a   f   A   F)r   r   r   s   &r   r>   r>      sX    a1FF 1 1T 1FFTQ5F5F$5FF5FFr   c                r   ^ pV  F  p\        V34      pRTu;8:  d   R8:  d   M M\        R4      pMaRTu;8:  d   R8:  d   M M\        R4      ^
,
          pM<RTu;8:  d   R8:  d   M M\        R4      ^
,
          pMQ R	\        T4      ,           4       hV^,          \        V4      V,
          ,           pK  	  V# )
z.Get the integer value of a hexadecimal number.rH   rI   0rJ   rK   arL   rM   znon-hex digit )r   r   repr)r!   bitsr   rA   s   &   r   r?   r?      s    D1$K1CAQ$CAQ$D	"A2*47225Bw#a&1*%  Kr   c                  0   ^ RI p ^ RIp VP                  V P                  R,          R4      w  r#RpRpX F  w  rxVR8X  d   R	pVR
8X  g   K  R	pK  	  V'       d6   V'       d.   V P                  V n        \        R4       V P                  ^4       X'       g   R.p^ p	V F  p
V
R8X  d   V P                  P                  pM \        V
R4      p V'       d!   \        WP
                  P                  4       M \        WP
                  P                  V4       V
R8w  d   VP                  4        K  K  	  V	'       d   V P                  V	4       R# R#   TP                   dZ   pT P                  T n        \        T4       \        R4       \        R4       \        R4       T P                  ^4        Rp?ELRp?ii ; i  \         d2   pT P                  P                  T
: RT: R24       ^p	 Rp?EKU  Rp?ii ; i  T
R8w  d   TP                  4        i i ; i)    N:r   NNtdz"usage: quopri [-t | -d] [file] ...z-t: quote tabsz-d: decode; default encodeFz-tTz-dz -t and -d are mutually exclusive-rbz: can't open (z)
)sysgetoptargverrorstderrstdoutprintexitstdinbufferopenOSErrorr    rD   r3   close)rX   rY   optsargsmsgdecotabsorP   stsfilefps               r   mainrn      s   ]]388B<6
 DD9Td9Td  ZZ
01
C3;!!B$%
	r::,,-r::,,d3s{
 ! $  I << ZZ
c
23*+0  

  D#!FG s{
 sC   %E  F<G;A G;F9 AF44F9<G8%G33G8;H__main__)r3   rD   r;   rF   )F)FF)__doc____all__r   r*   r   r(   binasciir   r   ImportErrorr   r   r3   r;   rD   rF   r>   r?   rn   __name__ r   r   <module>rv      s    N ?	'239*v'RG
$*\ zF y  FFs   A AA