§
    YŠtj¨  ã                  ó²   — d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z d dlmZ erddlmZ eefZd!d„Zd"d„Zd#d„Z	 d$d%d„Z	 d$d&d„Zd'd(d„Zd'd)d„Zd*d „ZdS )+é    )Úannotations)Ú	b64decode)Ú	b64encode)Úencodebytes)ÚError)ÚTYPE_CHECKINGé   )ÚBufferÚflagsÚintÚreturnÚstrc                ó   — | dk    sJ ‚dS )Nr   Úfallback© )r   s    úP/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pybase64/_fallback.pyÚ_get_simd_namer      s   € Ø�AŠ:ˆ:ˆ:ˆ:Øˆ:ó    c                 ó   — dS )Nr   r   r   r   r   Ú_get_simd_pathr      s   € Øˆ1r   Úsústr | Bufferúbytes | bytearrayc                ó¶  — t          | t          ¦  «        r6	 |                      d¦  «        S # t          $ r d}t	          |¦  «        d ‚w xY wt          | t
          ¦  «        r| S 	 t          | ¦  «        }|j        s| j        j	        d›d�}t          |¦  «        ‚|                     ¦   «         S # t          $ r! d| j        j	        d›�}t          |¦  «        d ‚w xY w)NÚasciiz4string argument should contain only ASCII charactersr   ú': underlying buffer is not C-contiguousz<argument should be a bytes-like object or ASCII string, not )Ú
isinstancer   ÚencodeÚUnicodeEncodeErrorÚ
ValueErrorÚ_bytes_typesÚ
memoryviewÚc_contiguousÚ	__class__Ú__name__ÚBufferErrorÚtobytesÚ	TypeError)r   ÚmsgÚmvs      r   Ú
_get_bytesr+      s  € Ý�!•SÑÔð ,ð	,Ø—8’8˜GÑ$Ô$Ð$øÝ!ð 	,ð 	,ð 	,ØHˆCÝ˜S‘/”/ tÐ+ð	,øøøõ �!•\Ñ"Ô"ð Øˆð'Ý˜‰]Œ]ˆØŒð 	#Ø”[Ô)ÐVÐVÐVÐVˆCÝ˜cÑ"Ô"Ð"Ø�zŠz‰|Œ|ÐøÝð 'ð 'ð 'ð6Øœ;Ô/Ð5ð6ð 6ð 	õ ˜‰nŒn $Ð&ð'øøøs   —, ¬A	Á$AB- Â-+CNFÚaltcharsústr | Buffer | NoneÚvalidateÚboolÚbytesc                óÊ  — t          | ¦  «        } |�t          |¦  «        }|r°t          | ¦  «        dz  dk    rd}t          |¦  «        ‚t          | |d¬¦  «        }d}t          | ¦  «        dk    r<d}| d         dk    r|d	z  }| d
         dk    r|d	z  }dt          | ¦  «        dz  z  |z
  }|t          |¦  «        k    rd}t          |¦  «        ‚|S t          | |d¬¦  «        S )aó  Decode bytes encoded with the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` or ASCII string to
    decode.

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

    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 :exc:`binascii.Error`.

    The result is returned as a :class:`bytes` object.

    A :exc:`binascii.Error` is raised if ``s`` is incorrectly padded.
    Né   r   zIncorrect paddingF)r.   éþÿÿÿé=   r	   éÿÿÿÿé   zNon-base64 digit found)r+   ÚlenÚBinAsciiErrorÚbuiltin_decode)r   r,   r.   r)   ÚresultÚexpected_lenÚpaddings          r   r   r   /   s  € õ, 	�1‰Œ€AØÐÝ˜hÑ'Ô'ˆØð Ýˆq‰6Œ6�A‰:˜Š?ˆ?Ø%ˆCÝ Ñ$Ô$Ð$Ý  8°eÐ<Ñ<Ô<ˆð ˆÝˆq‰6Œ6�AŠ:ˆ:ØˆGà�Œu˜Š{ˆ{Ø˜1‘�Ø�Œu˜Š{ˆ{Ø˜1‘�Ø¥ A¡¤¨!¡Ñ,¨wÑ6ˆLØ�3˜v™;œ;Ò&Ð&Ø*ˆCÝ Ñ$Ô$Ð$ØˆÝ˜!˜X°Ð6Ñ6Ô6Ð6r   Ú	bytearrayc                ó@   — t          t          | ||¬¦  «        ¦  «        S )a÷  Decode bytes encoded with the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` or ASCII string to
    decode.

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

    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 :exc:`binascii.Error`.

    The result is returned as a :class:`bytearray` object.

    A :exc:`binascii.Error` is raised if ``s`` is incorrectly padded.
    )r,   r.   )r=   r   )r   r,   r.   s      r   Úb64decode_as_bytearrayr?   _   s!   € õ, •Y˜q¨8¸hÐGÑGÔGÑHÔHÐHr   r
   c                ó®   — t          | ¦  «        }|j        s| j        j        d›d�}t	          |¦  «        ‚|�t          |¦  «        }t          | |¦  «        S )aŒ  Encode bytes using the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` to encode.

    Optional ``altchars`` must 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.

    The result is returned as a :class:`bytes` object.
    r   r   )r"   r#   r$   r%   r&   r+   Úbuiltin_encode)r   r,   r*   r)   s       r   r   r   x   s`   € õ 
�A‰Œ€BØŒ?ð Ø”Ô%ÐRÐRÐRÐRˆÝ˜#ÑÔÐØÐÝ˜hÑ'Ô'ˆÝ˜!˜XÑ&Ô&Ð&r   c                óH   — t          | |¦  «                             d¦  «        S )aŠ  Encode bytes using the standard Base64 alphabet.

    Argument ``s`` is a :term:`bytes-like object` to encode.

    Optional ``altchars`` must 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.

    The result is returned as a :class:`str` object.
    r   )r   Údecode)r   r,   s     r   Úb64encode_as_stringrD   Œ   s"   € õ �Q˜Ñ!Ô!×(Ò(¨Ñ1Ô1Ð1r   c                óŠ   — t          | ¦  «        }|j        s| j        j        d›d�}t	          |¦  «        ‚t          | ¦  «        S )a-  Encode bytes into a bytes object with newlines (b'\\n') inserted after
    every 76 bytes of output, and ensuring that there is a trailing newline,
    as per :rfc:`2045` (MIME).

    Argument ``s`` is a :term:`bytes-like object` to encode.

    The result is returned as a :class:`bytes` object.
    r   r   )r"   r#   r$   r%   r&   Úbuiltin_encodebytes)r   r*   r)   s      r   r   r   š   sK   € õ 
�A‰Œ€BØŒ?ð Ø”Ô%ÐRÐRÐRÐRˆÝ˜#ÑÔÐÝ˜qÑ!Ô!Ð!r   )r   r   r   r   )r   r   )r   r   r   r   )NF)r   r   r,   r-   r.   r/   r   r0   )r   r   r,   r-   r.   r/   r   r=   )N)r   r
   r,   r-   r   r0   )r   r
   r,   r-   r   r   )r   r
   r   r0   )Ú
__future__r   Úbase64r   r9   r   rA   r   rF   Úbinasciir   r8   Útypingr   Ú_typingr
   r0   r=   r!   r   r   r+   r?   rD   r   r   r   ú<module>rL      sg  ðØ "Ð "Ð "Ð "Ð "Ð "à .Ð .Ð .Ð .Ð .Ð .Ø .Ð .Ð .Ð .Ð .Ð .Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø +Ð +Ð +Ð +Ð +Ð +Ø  Ð  Ð  Ð  Ð  Ð  àð  ØÐÐÐÐÐà�yÐ!€ðð ð ð ð
ð ð ð ð'ð 'ð 'ð 'ð0 MRð-7ð -7ð -7ð -7ð -7ðb MRðIð Ið Ið Ið Ið2'ð 'ð 'ð 'ð 'ð(2ð 2ð 2ð 2ð 2ð"ð "ð "ð "ð "ð "r   