§
    #ˆtj°  ã                   óF  — d dl Z d dlmZmZ ddlmZmZmZmZm	Z	m
Z
  G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d	„ d
e j        ¦  «        Z G d„ dee j        ¦  «        Z G d„ dee j        ¦  «        Zdedee j                 fd„Z e j        e¦  «         dS )é    N)ÚAnyÚOptionalé   )Ú	IDNAErrorÚ_unicode_dots_reÚalabelÚdecodeÚencodeÚulabelc            	       ó^   — e Zd ZdZd	dededeeef         fd„Zd	dededeeef         fd„Z	dS )
ÚCodecaf  Stateless IDNA 2008 codec.

    Implements the :class:`codecs.Codec` protocol so that the whole-domain
    encoder (:func:`idna.encode`) and decoder (:func:`idna.decode`) are
    accessible through the standard codec machinery as ``"idna2008"``.

    Only the ``"strict"`` error handler is supported; any other handler
    raises :exc:`~idna.IDNAError`.
    ÚstrictÚdataÚerrorsÚreturnc                 óx   — |dk    rt          d|› d�¦  «        ‚|sdS t          |¦  «        t          |¦  «        fS )Nr   úUnsupported error handling "ú"©ó    r   )r   r
   Úlen©Úselfr   r   s      úH/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/idna/codec.pyr
   zCodec.encode   sK   € Ø�XÒÐÝÐD¸6ÐDÐDÐDÑEÔEÐEàð 	Ø�6å�d‰|Œ|�S ™YœYÐ&Ð&r   c                 óx   — |dk    rt          d|› d�¦  «        ‚|sdS t          |¦  «        t          |¦  «        fS )Nr   r   r   ©Ú r   )r   r	   r   r   s      r   r	   zCodec.decode   sK   € Ø�XÒÐÝÐD¸6ÐDÐDÐDÑEÔEÐEàð 	Ø�5å�d‰|Œ|�S ™YœYÐ&Ð&r   N)r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚtupleÚbytesÚintr
   r	   © r   r   r   r      s‹   € € € € € ðð ð'ð '˜3ð '¨ð '¸5ÀÈÀÔ;Lð 'ð 'ð 'ð 'ð'ð '˜5ð '¨#ð '¸UÀ3ÈÀ8¼_ð 'ð 'ð 'ð 'ð 'ð 'r   r   c            
       ó:   — e Zd ZdZdedededeeef         fd„Z	dS )ÚIncrementalEncodera·  Incremental IDNA 2008 encoder.

    Buffers a partial trailing label across calls until either the next
    label separator is seen or ``final=True``, so that streamed input is
    encoded one whole label at a time. Any of the four Unicode label
    separators (``U+002E``, ``U+3002``, ``U+FF0E``, ``U+FF61``) ends a
    label; the result always uses ``U+002E`` as the separator.

    Only the ``"strict"`` error handler is supported.
    r   r   Úfinalr   c                 ó~  — |dk    rt          d|› d�¦  «        ‚|sdS t          j        |¦  «        }d}|r|d         sd}|d= n	|s|d= |rd}g }d}|D ]=}|                     t	          |¦  «        ¦  «         |r|d	z  }|t          |¦  «        z  }Œ>d                     |¦  «        |z   }	|t          |¦  «        z  }|	|fS )
Nr   r   r   r   r   éÿÿÿÿó   .r   r   )r   r   ÚsplitÚappendr   r   Újoin)
r   r   r   r)   ÚlabelsÚtrailing_dotÚresultÚsizeÚlabelÚresult_bytess
             r   Ú_buffer_encodez!IncrementalEncoder._buffer_encode1   s  € Ø�XÒÐÝÐD¸6ÐDÐDÐDÑEÔEÐEàð 	Ø�6å!Ô'¨Ñ-Ô-ˆØˆØð 	(Ø˜"”:ð (Ø#�Ø˜2�J�JØð (à˜2�JØð (Ø#'�LàˆØˆØð 	ð 	ˆEØ�MŠM�& ™-œ-Ñ(Ô(Ð(Øð Ø˜‘	�Ø•C˜‘J”JÑˆDˆDð —y’y Ñ(Ô(¨<Ñ7ˆØ•�LÑ!Ô!Ñ!ˆØ˜TÐ!Ð!r   N)
r   r   r    r!   r"   Úboolr#   r$   r%   r6   r&   r   r   r(   r(   %   sX   € € € € € ð	ð 	ð" 3ð "°ð "¸Dð "ÀUÈ5ÐRUÈ:ÔEVð "ð "ð "ð "ð "ð "r   r(   c            
       ó:   — e Zd ZdZdedededeeef         fd„Z	dS )ÚIncrementalDecodera  Incremental IDNA 2008 decoder.

    Buffers a partial trailing label across calls until either the next
    label separator is seen or ``final=True``, so that streamed input is
    decoded one whole label at a time.

    Only the ``"strict"`` error handler is supported.
    r   r   r)   r   c                 óÈ  — |dk    rt          d|› d�¦  «        ‚|sdS t          |t          ¦  «        st          |d¦  «        }t          j        |¦  «        }d}|r|d         sd}|d= n	|s|d= |rd}g }d	}|D ]=}|                     t          |¦  «        ¦  «         |r|d
z  }|t          |¦  «        z  }Œ>d                     |¦  «        |z   }	|t          |¦  «        z  }|	|fS )Nr   r   r   r   Úasciir   r+   ú.r   r   )	r   Ú
isinstancer"   r   r-   r.   r   r   r/   )
r   r   r   r)   r0   r1   r2   r3   r4   Ú
result_strs
             r   Ú_buffer_decodez!IncrementalDecoder._buffer_decode\   s/  € Ø�XÒÐÝÐD¸6ÐDÐDÐDÑEÔEÐEàð 	Ø�7å˜$¥Ñ$Ô$ð 	&Ý�t˜WÑ%Ô%ˆDå!Ô'¨Ñ-Ô-ˆØˆØð 	'Ø˜"”:ð 'Ø"�Ø˜2�J�JØð 'à˜2�JØð 'Ø#&�LàˆØˆØð 	ð 	ˆEØ�MŠM�& ™-œ-Ñ(Ô(Ð(Øð Ø˜‘	�Ø•C˜‘J”JÑˆDˆDà—X’X˜fÑ%Ô%¨Ñ4ˆ
Ø•�LÑ!Ô!Ñ!ˆØ˜DÐ!Ð!r   N)
r   r   r    r!   r   r"   r7   r#   r%   r?   r&   r   r   r9   r9   R   sW   € € € € € ðð ð " 3ð  "°ð  "¸Dð  "ÀUÈ3ÐPSÈ8Ä_ð  "ð  "ð  "ð  "ð  "ð  "r   r9   c                   ó   — e Zd ZdS )ÚStreamWriterN©r   r   r    r&   r   r   rA   rA      ó   € € € € € Ø€Dr   rA   c                   ó   — e Zd ZdS )ÚStreamReaderNrB   r&   r   r   rE   rE   ƒ   rC   r   rE   Únamer   c           	      ó´   — | dk    rdS t          j        | t          ¦   «         j        t          ¦   «         j        t
          t          t          t          ¬¦  «        S )a£  Codec search function registered with :mod:`codecs`.

    Returns a :class:`codecs.CodecInfo` for the ``"idna2008"`` codec name
    so that ``str.encode("idna2008")`` and ``bytes.decode("idna2008")``
    invoke the IDNA 2008 codec defined in this module.

    :param name: The codec name being looked up.
    :returns: A :class:`codecs.CodecInfo` instance if ``name`` is
        ``"idna2008"``, otherwise ``None``.
    Úidna2008N)rF   r
   r	   ÚincrementalencoderÚincrementaldecoderÚstreamwriterÚstreamreader)	ÚcodecsÚ	CodecInfor   r
   r	   r(   r9   rA   rE   )rF   s    r   Úsearch_functionrO   ‡   sO   € ð ˆzÒÐØˆtÝÔØÝ‰wŒwŒ~Ý‰wŒwŒ~Ý-Ý-Ý!Ý!ðñ ô ð r   )rM   Útypingr   r   Úcorer   r   r   r	   r
   r   r   ÚBufferedIncrementalEncoderr(   ÚBufferedIncrementalDecoderr9   rA   rE   r"   rN   rO   Úregisterr&   r   r   ú<module>rU      s€  ðØ €€€Ø  Ð  Ð  Ð  Ð  Ð  Ð  Ð  à MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ MÐ Mð'ð 'ð 'ð 'ð 'ˆFŒLñ 'ô 'ð 'ð<*"ð *"ð *"ð *"ð *"˜Ô:ñ *"ô *"ð *"ðZ*"ð *"ð *"ð *"ð *"˜Ô:ñ *"ô *"ð *"ðZ	ð 	ð 	ð 	ð 	�5˜&Ô-ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	�5˜&Ô-ñ 	ô 	ð 	ð˜#ð  (¨6Ô+;Ô"<ð ð ð ð ð0 €„�Ñ  Ô  Ð  Ð  Ð  r   