+
    B*jW                         R t ^ RIt^ RIt. R8Ot]]3tR tR9R ltR:R lt	R t
R t]P                  RR	4      t]P                  R	R4      tR
 tR tRtRtRtRtRt/ t/ tR tR;R ltR t]P7                  RR7      ]n         R;R lt]P7                  R]R7      ]n         R t]P7                  RR7      ]n         R<R lt]P7                  RRR7      ]n         R tR<R lt Rs!Rs"Rt#Rt$R=R  lt%R!RR"^ R#RR$R/R% lt&R!RR$RR&R'/R( lt'R)t(Rs)Rs*Rs+R<R* lt,R+ t-R,t.R-t/]P                  ].]/,           ](R.]0! ]/4      ,          ,           4      t1]P                  ](].4      t2R/ t3R0 t4^Lt5]5^,          ^,          t6R1 t7R2 t8R3 t9R4 t:R5 t;R6 t<]=R78X  d
   ]<! 4        R# R# )>zDBase16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodingsNc                 V   \        V \        4      '       d    V P                  R 4      # \        V \
        4      '       d   V #  \        V 4      P                  4       #   \         d    \	        R4      hi ; i  \         d)    \        RT P                  P                  ,          4      Rhi ; i)asciiz4string argument should contain only ASCII charactersz>argument should be a bytes-like object or ASCII string, not %rN)
isinstancestrencodeUnicodeEncodeError
ValueErrorbytes_types
memoryviewtobytes	TypeError	__class____name__ss   &#/usr/local/lib/python3.14/base64.py_bytes_from_decode_datar      s    !S	U88G$$ ![!!K!}$$&& " 	USTT	U  K )+,;;+?+?@ AFJ	KKs   A A5 A253B(c                    \         P                  ! V RR7      pVeF   \        V4      ^8X  g   Q \        V4      4       hVP	                  \
        P                  RV4      4      # V# )a  Encode the bytes-like object s using Base64 and return a bytes object.

Optional altchars should be a byte string of length 2 which specifies an
alternative alphabet for the '+' and '/' characters.  This allows an
application to e.g. generate url or filesystem safe Base64 strings.
F)newline   +/)binascii
b2a_base64lenrepr	translatebytes	maketrans)r   altcharsencodeds   && r   	b64encoder   0   sX     !!!U3G8}!14>1!  !ABBN    Fc                    \        V 4      p VeQ   \        V4      p\        V4      ^8X  g   Q \        V4      4       hV P                  \        P                  VR4      4      p \        P                  ! WR7      # )a  Decode the Base64 encoded bytes-like object or ASCII string s.

Optional altchars must be a bytes-like object or ASCII string of length 2
which specifies the alternative alphabet used instead of the '+' and '/'
characters.

The result is returned as a bytes object.  A binascii.Error is raised if
s is incorrectly padded.

If validate is False (the default), characters that are neither in the
normal base-64 alphabet nor the alternative alphabet are discarded prior
to the padding check.  If validate is True, these non-alphabet characters
in the input result in a binascii.Error.
For more information about the strict base64 check, see:

https://docs.python.org/3.11/library/binascii.html#binascii.a2b_base64
r   )strict_mode)r   r   r   r   r   r   r   
a2b_base64)r   r   validates   &&&r   	b64decoder%   >   sc    $ 	 "A*848}!14>1!KK%89q77r    c                    \        V 4      # )zjEncode bytes-like object s using the standard Base64 alphabet.

The result is returned as a bytes object.
)r   r   s   &r   standard_b64encoder'   X   s    
 Q<r    c                    \        V 4      # )a=  Decode bytes encoded with the standard Base64 alphabet.

Argument s is a bytes-like object or ASCII string to decode.  The result
is returned as a bytes object.  A binascii.Error is raised if the input
is incorrectly padded.  Characters that are not in the standard alphabet
are discarded prior to the padding check.
)r%   r   s   &r   standard_b64decoder)   _   s     Q<r    r   s   -_c                >    \        V 4      P                  \        4      # )zEncode bytes using the URL- and filesystem-safe Base64 alphabet.

Argument s is a bytes-like object to encode.  The result is returned as a
bytes object.  The alphabet uses '-' instead of '+' and '_' instead of
'/'.
)r   r   _urlsafe_encode_translationr   s   &r   urlsafe_b64encoder,   m   s     Q<!!"=>>r    c                X    \        V 4      p V P                  \        4      p \        V 4      # )a  Decode bytes using the URL- and filesystem-safe Base64 alphabet.

Argument s is a bytes-like object or ASCII string to decode.  The result
is returned as a bytes object.  A binascii.Error is raised if the input
is incorrectly padded.  Characters that are not in the URL-safe base-64
alphabet, and are not a plus '+' or slash '/', are discarded prior to the
padding check.

The alphabet uses '-' instead of '+' and '_' instead of '/'.
)r   r   _urlsafe_decode_translationr%   r   s   &r   urlsafe_b64decoder/   v   s'     	 "A	/0AQ<r    zK
Encode the bytes-like objects using {encoding} and return a bytes object.
a  
Decode the {encoding} encoded bytes-like object or ASCII string s.

Optional casefold is a flag specifying whether a lowercase alphabet is
acceptable as input.  For security purposes, the default is False.
{extra_args}
The result is returned as a bytes object.  A binascii.Error is raised if
the input is incorrectly padded or if there are non-alphabet
characters present in the input.
a  
RFC 3548 allows for optional mapping of the digit 0 (zero) to the
letter O (oh), and for optional mapping of the digit 1 (one) to
either the letter I (eye) or letter L (el).  The optional argument
map01 when not None, specifies which letter the digit 1 should be
mapped to (when map01 is not None, the digit 0 is always mapped to
the letter O).  For security purposes the default is None, so that
0 and 1 are not allowed in the input.
s    ABCDEFGHIJKLMNOPQRSTUVWXYZ234567s    0123456789ABCDEFGHIJKLMNOPQRSTUVc                 `   V \         9  dG   V  Uu. uF  p\        V34      NK  	  ppV UUu. uF  qC F  qTV,           NK  	  K  	  upp\         V &   R p\        V\        4      '       g   \	        V4      P                  4       p\        V4      ^,          pV'       d   VR^V,
          ,          ,           p\        4       p\        P                  p\         V ,          p	\        ^ \        V4      ^4       Ft  pV! WV^,            4      p
WyV
^,	          ,          W^,	          R,          ,          ,           W^
,	          R,          ,          ,           WR,          ,          ,           ,          pKv  	  V^8X  d   RVRR % M&V^8X  d   RVRR % MV^8X  d   RVR	R % MV^8X  d   RVR
R % \        V4      # u upi u uppi )N    i  s   ======s   ====s   ===   =i)_b32tab2r   r   r	   r
   r   r   	bytearrayint
from_bytesrange)alphabetr   ib32tabableftoverr   r9   b32tab2cs   &&         r   
_b32encoderC      s}    x'/0x!%+x0-3DVV!eeVeVDa%%qM!!#1vzHX&&kGJx G1c!fa qAE{#AG$"W-./"W-./ I&' 	 ! 1} 	Q	Q	Q>; 1Ds
   F%F*c                 n   V \         9  d'   \        V 4       UUu/ uF  w  rEWTbK	  	  upp\         V &   \        V4      p\        V4      ^,          '       d   \        P
                  ! R4      hVeX   \        V4      p\        V4      ^8X  g   Q \        V4      4       hVP                  \        P                  RRV,           4      4      pV'       d   VP                  4       p\        V4      pVP                  R4      pV\        V4      ,
          p\        4       p\         V ,          p	\        ^ \        V4      ^4       FG  p
WV
^,            p^ p V F  pV^,          W,          ,           pK  	  YP                  ^4      ,          pKI  	  V^,          '       g   VR9  d   \        P
                  ! R4      hV'       dI   V'       dA   X^V,          ,          pVP                  ^4      p^+^V,          ,
          ^,          pVRV VRR% \        V4      # u uppi   \         d    \        P
                  ! R4      Rhi ; i)	   zIncorrect paddingNs   01   Or2   zNon-base32 digit found>                   )_b32rev	enumerater   r   r   Errorr   r   r   r   upperrstripr7   r:   KeyErrorto_bytes)r;   r   casefoldmap01kvlpadcharsdecodedb32revr<   quantaaccrB   lastr@   s   &&&&            r   
_b32decoder_      s    w.7.AB.AdaQT.AB"A
1vzznn011 '.5zQ+U+KKte|<=GGI 	AA	A3q6zHkGXF1c!fa a!e	Eax69,  	<<?" ! 	1uu/nn011GH||AX%!+IX>O C8  	E..!9:D	Es   H
H#H4c                 "    \        \        V 4      # N)rC   _b32alphabetr   s   &r   	b32encoderc      s    lA&&r    base32)encodingc                 $    \        \        WV4      # ra   )r_   rb   )r   rT   rU   s   &&&r   	b32decoderg      s    lA77r    )re   
extra_argsc                 "    \        \        V 4      # ra   )rC   _b32hexalphabetr   s   &r   b32hexencoderk      s    oq))r    	base32hexc                 "    \        \        W4      # ra   )r_   rj   r   rT   s   &&r   b32hexdecodero     s    oq33r     c                J    \         P                  ! V 4      P                  4       # )zKEncode the bytes-like object s using Base16 and return a bytes object.
    )r   hexlifyrP   r   s   &r   	b16encoders     s     A$$&&r    c                    \        V 4      p V'       d   V P                  4       p V P                  RRR7      '       d   \        P                  ! R4      h\        P
                  ! V 4      # )aj  Decode the Base16 encoded bytes-like object or ASCII string s.

Optional casefold is a flag specifying whether a lowercase alphabet is
acceptable as input.  For security purposes, the default is False.

The result is returned as a bytes object.  A binascii.Error is raised if
s is incorrectly padded or if there are non-alphabet characters present
in the input.
Ns   0123456789ABCDEF)deletezNon-base16 digit found)r   rP   r   r   rO   	unhexlifyrn   s   &&r   	b16decoderw     sQ     	 "AGGI{{4 3{44nn566a  r    s   <~s   ~>c                    \        V \        4      '       g   \        V 4      P                  4       p \	        V 4      ) ^,          pV'       d   V RV,          ,           p \
        P                  ! R\	        V 4      ^,          ,          4      P                  V 4      pV Uu. uFd  pV'       d   V'       g   RMNV'       d
   VR8X  d   RM=W(R,          ,          W(^U,          R,          ,          ,           W^U,          ,          ,           NKf  	  p	pV'       d:   V'       g2   V	R
,          R8X  d   V^ ,          ^,          V	R
&   V	R
,          RV)  V	R
&   R	P                  V	4      # u upi )rJ   r1   z!%dI   zi       yi^	 i9  Nr    r5   )	r   r	   r
   r   r   structStructunpackjoin)
r?   charschars2padfoldnuls
foldspacespaddingwordswordchunkss
   &&&&&&    r   	_85encoder   +  s   a%%qM!!#Aw!mGMM&CFaK0188;E  !
  $ td TZ%7dfn%bj4'()BY !
    ! s":qAF2JBZ	'*r
88F!s   E(E0	E:AEr   wrapcolr   adobec                  \         fR   \        ^!^v4       Uu. uF  p\        V34      NK  	  ups\         UU u. uF  p\         F  qV ,           NK  	  K  	  up ps \	        X \        \         VRV4      pV'       d   \
        V,           pV'       d   \        V'       d   ^M^V4      p\        ^ \        V4      V4       Uu. uF  pWuWR,            NK  	  ppV'       d0   \        VR,          4      ^,           V8  d   VP                  R4       RP                  V4      pV'       d   V\        ,          pV# u upi u up pi u upi )a  Encode bytes-like object b using Ascii85 and return a bytes object.

foldspaces is an optional flag that uses the special short sequence 'y'
instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
feature is not supported by the standard encoding used in PDF.

If wrapcol is non-zero, insert a newline (b'\n') character after at most
every wrapcol characters.

pad controls whether zero-padding applied to the end of the input
is fully retained in the output encoding, as done by btoa,
producing an exact multiple of 5 bytes of output.

adobe controls whether the encoded byte sequence is framed with <~
and ~>, as in a PostScript base-85 string literal.  Note that
while ASCII85Decode streams in PDF documents must be terminated
with ~>, they must not use a leading <~.

Tr       
r5   )
_a85chars2r:   r   	_a85charsr   	_A85STARTmaxr   appendr~   _A85END)	r?   r   r   r   r   r<   r>   resultr   s	   &$$$$    r   	a85encoder   C  s   . */C.9.QUA4[.9	'0Dy!)Q1uu)uyD
q)ZdJGFV#5aa1 CK9;9a AK(9 	 ;6":"W,c"F#'M% :D;s   D1D6=D<ignorecharss    	
c                  \        V 4      p V'       d`   V P                  \        4      '       g   \        RP	                  \        4      4      hV P                  \        4      '       d   V ^R p MV RR p \        P                  ! R4      P                  p. pVP                  p. pVP                  pVP                  p	V R,            F  p
^!T
u;8:  d   ^u8:  dX   M MTV! V
4       \        V4      ^8X  d;   ^ pV F  p
^UV,          V
^!,
          ,           pK  	   V! V! V4      4       T	! 4        Kg  Ki  V
^z8X  d   V'       d   \        R4      hV! R4       K  V'       d%   V
^y8X  d   V'       d   \        R4      hV! R4       K  W9   d   K  \        R	V
,          4      h	  R
P                  V4      p^\        V4      ,
          pV'       d   VRV)  pV#   \        P                   d    \        R4      Rhi ; i)a  Decode the Ascii85 encoded bytes-like object or ASCII string b.

foldspaces is a flag that specifies whether the 'y' short sequence
should be accepted as shorthand for 4 consecutive spaces (ASCII
0x20).  This feature is not supported by the standard Ascii85
encoding used in PDF and PostScript.

adobe controls whether the <~ and ~> markers are present. While
the leading <~ is not required, the input must end with ~>, or a
ValueError is raised.

ignorechars should be a byte string containing characters to ignore from the
input. This should only contain whitespace characters, and by default
contains all whitespace characters in ASCII.

The result is returned as a bytes object.
z1Ascii85 encoded byte sequences must end with {!r}N!IzAscii85 overflowzz inside Ascii85 5-tuples       zy inside Ascii85 5-tuples       zNon-Ascii85 digit found: %cr    s   uuuu)r   endswithr   r   format
startswithr   r{   r|   packr   clearr   errorr~   )r?   r   r   r   packIrZ   decoded_appendcurrcurr_append
curr_clearxr]   r   r   s   &$$$          r   	a85decoder   o  s   $ 	 "Azz'"""F7O  <<	""!BA#2A
 MM$$$EG^^ND++KJ\\a"7"N4yA~As(a"f-C C"5:.   '\ !;<<;'AL !;<<./:Q>??1 4 XXgF#d)mG	'"M- || C$%78dBCs   G"G.sU   0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~c                    \         fL   \         Uu. uF  p\        V34      NK  	  ups\         UU u. uF  p\         F  qV ,           NK  	  K  	  up ps \	        X \        \         V4      # u upi u up pi )a  Encode bytes-like object b in base85 format and return a bytes object.

The input is padded with b' ' so its length is a multiple of 4
bytes before encoding.  If pad is true, all the resulting
characters are retained in the output, which will always be a
multiple of 5 bytes.
)
_b85chars2_b85alphabetr   	_b85charsr   )r?   r   r<   r>   s   &&  r   	b85encoder     s]     *67,QUA4[,7	'0Dy!)Q1uu)uyD
Q	:s33 8Ds
   A*A/c                   \         f)   R.R,          p\        \        4       F	  w  r#W!V&   K  	  Vs \        V 4      p \	        V 4      ) ^,          pV RV,          ,           p . p\
        P                  ! R4      P                  p\        ^ \	        V 4      ^4       FM  pWV^,            p^ p V F  pV^U,          \         V,          ,           pK   	   TP                  T! T4      4       KO  	  RP                  V4      p
V'       d   V
RV)  p
V
#   \         d?    \        T4       F-  w  r\         T,          e   K  \        RY),           ,          4      Rh	  h i ; i  \
        P                   d    \        RT,          4      Rhi ; i)ziDecode the base85-encoded bytes-like object or ASCII string b

The result is returned as a bytes object.
N      ~r   z#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dr    )_b85decrN   r   r   r   r{   r|   r   r:   r   r   r   r   r~   )r?   
b85dec_tmpr<   rB   r   outr   chunkr]   jr   s   &          r   	b85decoder     st     Vc\
l+DAqM ,"AAw!mG	D7NA
CMM$$$E1c!fa AE
	Bh+ 	,JJuSz" !$ XXc]F	'"M  	!%(1:%$%J'(u&. /489 ) 	 || 	,J ! "'+,	,s   ($D	E	'E5E)E>sU   0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#s   ;_`|~r1   c                >    \        V 4      P                  \        4      # )zCEncode bytes-like object b in z85 format and return a bytes object.)r   r   _z85_encode_translationr   s   &r   	z85encoder     s    Q<!!"9::r    c                    \        V 4      p V P                  \        4      p  \        V 4      #   \         d3   p\	        TP
                  ^ ,          P                  RR4      4      RhRp?ii ; i)zfDecode the z85-encoded bytes-like object or ASCII string b

The result is returned as a bytes object.
base85z85N)r   r   _z85_decode_translationr   r   argsreplace)r   es   & r   	z85decoder   
  sa    
 	 "A	+,AG| G**8U;<$FGs   
- A*-A%%A*c                (   V P                  \        4      ;p'       du   \        V4      \        8  d8   V P                  \        \        V4      ,
          4      ;p'       d   W#,          pKK  \        P                  ! V4      pVP                  V4       K  R# )z1Encode a file; input and output are binary files.N)read
MAXBINSIZEr   r   r   write)inputoutputr   nslines   &&   r   r   r     sf    zz*%
%!
%!fz!UZZ
3q68I-J'Jr'JGA""1%T	 &r    c                    V P                  4       ;p'       d*   \        P                  ! V4      pVP                  V4       KA  R# )z1Decode a file; input and output are binary files.N)readliner   r#   r   )r   r   r   r   s   &&  r   decoder   &  s4    .."
"$
"%Q #r    c                     \        V 4      pTP                  R9  d4   RTP                  : RT P                  P                  : 2p\        T4      hTP
                  ^8w  d5   RTP
                  T P                  P                  3,          p\        T4      hR#   \         d/   pR T P                  P                  ,          p\        T4      ThRp?ii ; i)z"expected bytes-like object, not %sNz#expected single byte elements, not z from z(expected 1-D data, not %d-D data from %s)rB   r?   B)r
   r   r   r   r   ndim)r   merrmsgs   &   r   _input_type_checkr   ,  s    &qM 	xx&+,88Q[[5I5IKnvv{9+,661;;3G3G*HIn   &2Q[[5I5IIn#%&s   B C#)CCc                    \        V 4       . p\        ^ \        V 4      \        4       F7  pWV\        ,            pVP	                  \
        P                  ! V4      4       K9  	  RP                  V4      # )zREncode a bytestring into a bytes object containing multiple lines
of base-64 data.r    )r   r:   r   r   r   r   r   r~   )r   piecesr<   r   s   &   r   encodebytesr   <  s^     aF1c!fj)a*n%h))%01 * 88Fr    c                D    \        V 4       \        P                  ! V 4      # )z8Decode a bytestring of base-64 data into a bytes object.)r   r   r#   r   s   &r   decodebytesr   G  s    aq!!r    c                    ^ RI p ^ RIpRV P                  ^ ,           R2p VP                  V P                  R,          R4      w  r4\        pX FA  w  rxVR8X  d   \        pVR8X  d   \        pVR8X  d   \        pVR	8X  g   K5  \        V4        R# 	  X'       dQ   V^ ,          R
8w  dC   \        V^ ,          R4      ;_uu_ 4       p	V! WP
                  P                  4       RRR4       R# V P                  P                  4       '       d;   ^ RIp
V P                  P                  P                  4       pV
P!                  V4      pMV P                  P                  pV! WP
                  P                  4       R#   TP                   dD   pT P                  T n        \        T4       \        T4       T P                  ^4        Rp?ELRp?ii ; i  + '       g   i     R# ; i)zSmall main programNzusage: zx [-h|-d|-e|-u] [file|-]
        -h: print this help message and exit
        -d, -u: decode
        -e: encode (default):rH   NNhdeuz-ez-dz-uz-h-rb)sysgetoptargvr   stderrstdoutprintexitr   r   openbufferstdinisattyior   BytesIO)r   r   usageoptsr   r   funcor>   fr   datar   s                r   mainr   N  se   } %  E]]388B<8
 D9Vd9Vd9Vd9eElF	 
 Q3$q'4  AJJ%%& !  9999##((*DZZ%FYY%%FVZZ&&'- << ZZ
c
e	 !  s#   %E9 G9G
8GGG!	__main__)r   r   r   r   r   r%   rc   rg   rk   ro   rs   rw   r   r   r   r   r   r   r'   r)   r,   r/   ra   )NF)FN)F)FFF)>__doc__r{   r   __all__r   r7   r	   r   r   r%   r'   r)   r   r+   r.   r,   r/   _B32_ENCODE_DOCSTRING_B32_DECODE_DOCSTRING_B32_DECODE_MAP01_DOCSTRINGrb   rj   r6   rM   rC   r_   rc   r   rg   rk   ro   rs   rw   r   r   r   r   r   r   r   r   r   r   r   r   r   _z85alphabet_z85_b85_decode_diffr   r   r   r   r   MAXLINESIZEr   r   r   r   r   r   r   r    r    r   <module>r      sL   J  $ i K"84 $ooeU; #ooeU; ?$ 	   35
!F+\')00(0C	 8)00(3N 1 P	 *,33[3I 4 -33[?A 4 C '!* 	
	
0*u *a *U *% *XFu FE F| FTE	

4 *XE   //''7S!5666   //,E ;
G  1na
 "(D zF r    