Ë
    ^ãj�'  ã                  ó$  — U d Z ddlmZ ddlZddlZddlmZ dZded<   dZ	ded	<   d
Z
ded<   dZded<   dZded<   i Zded<   d�d‚d„Z	 	 	 	 dƒd„Zd„d„Zd…d„Zd…d„Zd…d„Zd†d„Z	 d�	 	 	 	 	 	 	 d‡d„Zi dd“dd“dd “d!d"“d#d$“d%d&“d'd(“d)d*“d+d,“d-d.“d/d0“d1d2“d3d4“d5d6“d7d8“d9d:“d;d<“i d=d>“d?d@“dAdB“dCdD“dEdF“dGdH“dIdJ“dKdL“dMdN“dOdP“dQdR“dSdT“dUdV“dWdX“dYdZ“d[d\“d]d^“¥i d_d`“dadb“dcdd“dedf“dgdh“didj“dkdl“dmdn“dodp“dqdr“dsdt“dudv“dwdx“dydz“d{d|“d}d~“¥Zded€<   y)ˆz&Internal shared utilities for chardet.é    )ÚannotationsN)ÚCallablei@ ÚintÚDEFAULT_MAX_BYTESi   ÚEVIDENCE_CAP_BYTESi   Ú_DECODE_CHUNK_SIZEgš™™™™™É?ÚfloatÚMINIMUM_THRESHOLDi   Ú_DEFAULT_CHUNK_SIZEz3dict[str, Callable[..., codecs.IncrementalDecoder]]Ú_INCREMENTAL_DECODERSc                óP   — | t         k7  rt        j                  dt        |¬«       yy)zDEmit a deprecation warning if *chunk_size* differs from the default.zEchunk_size is not used in this version of chardet and will be ignored©Ú
stacklevelN)r   ÚwarningsÚwarnÚDeprecationWarning)Ú
chunk_sizer   s     úP/var/www/html/metafoliadorv2/venv/lib/python3.12/site-packages/chardet/_utils.pyÚ_warn_deprecated_chunk_sizer   .   s%   € àÔ(Ò(Ü�‰ØSÜØ!ö	
ð )ó    c                óš   — t         j                  | «      }|€	 t        j                  | «      }|t         | <    |«       S # t        $ r Y yw xY w)aa  Return a fresh incremental decoder for *encoding*, or ``None``.

    The class lookup is cached; ``None`` means the codec does not exist.
    Every decode below catches ``UnicodeError`` rather than
    ``UnicodeDecodeError`` because the utf-16/utf-32 incremental decoders
    raise a bare ``UnicodeError`` when the stream does not start with a BOM.
    N)r   ÚgetÚcodecsÚgetincrementaldecoderÚLookupError)ÚencodingÚdecoder_classs     r   Ú_incremental_decoderr   8   sX   € ô *×-Ñ-¨hÓ7€MØÐð	Ü"×8Ñ8¸ÓBˆMð +8Ô˜hÑ'Ù‹?Ðøô ò 	Ùð	ús   ™> ¾	A
Á	A
c           	     ó&  — t        | «      t        k  r't        | «      t        | j                  d|«      «      z
  S d}t        dt        | «      t        «      D ]8  }| ||t        z    }|t        |«      t        |j                  d|«      «      z
  z  }Œ: |S )aA  Count how many bytes of *data* a deletion *table* would remove.

    ``bytes.translate`` with a deletion table allocates an output buffer
    proportional to the input, so counting a whole large window through one
    call spikes memory by roughly the input size.  Chunking keeps the
    transient bounded at one C call per chunk, and the count is identical:
    deletion is per-byte and carries no state across the split.

    :param data: The raw byte data to scan.
    :param table: Byte values to delete.
    :returns: The number of bytes of *data* present in *table*.
    Nr   )Úlenr   Ú	translateÚrange)ÚdataÚtableÚcountÚposÚchunks        r   Úcount_deletedr(   L   s�   € ô ˆ4ƒyÔ&Ò&Ü�4‹yœ3˜tŸ~™~¨d°EÓ:Ó;Ñ;Ð;Ø€EÜ�Qœ˜D›	Ô#5Ó6ò @ˆØ�S˜3Ô!3Ñ3Ð4ˆØ”�U“œc %§/¡/°$¸Ó">Ó?Ñ?Ñ?‰ð@ð €Lr   c                ó  — t        |«      }|€y	 t        | «      t        k  r|j                  | d¬«       yt	        dt        | «      t        «      D ]  }|j                  | ||t        z    d¬«       Œ! 	 y# t
        $ r Y yw xY w)a8  Return ``True`` if *data* decodes cleanly under *encoding*.

    Equivalent to ``data.decode(encoding, errors="strict")`` except that an
    incomplete multi-byte sequence at the *end* of *data* is accepted instead of
    raising.

    Detection input is nearly always a prefix of a larger whole.  Callers pass
    the first N bytes of a file, and chardet slices further on its own.
    For a two-byte encoding any of those cuts lands mid-character roughly half
    the time.

    A one-shot strict decode cannot tell a truncated tail from corrupt data: it
    raises either way, so the candidate is discarded and every CJK encoding can
    disappear from the candidate set over a single dangling lead byte. An
    incremental decoder with ``final=False`` defers the partial tail instead,
    while still raising on genuine corruption anywhere before it.

    Large inputs are fed in chunks and the decoded text is discarded, so a
    whole-window check never allocates a matching ``str``.  Chunking is
    transparent: the decoder carries its state across calls, so a sequence
    straddling a chunk edge decodes exactly as it would in one call.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes without error, ``False`` otherwise.
    F©Úfinalr   T)r   r    r   Údecoder"   ÚUnicodeError)r#   r   Údecoderr&   s       r   Údecodes_without_errorr/   b   s”   € ô6 # 8Ó,€GØ€ØðÜˆt‹9Ô*Ò*Ø�N‰N˜4 uˆNÔ-ð ô	 ˜Q¤ D£	Ô+=Ó>ò R�Ø—‘˜t C¨#Ô0BÑ*BÐCÈ5�ÕQñRð øô ò Ùðús   �%A4 ¶<A4 Á4	B Á?B c                óf   — t        |«      }|€y	 |j                  | d¬«       y# t        $ r Y yw xY w)aK  Return ``True`` if *data* decodes under *encoding* with nothing deferred.

    The strict sibling of :func:`decodes_without_error`: ``final=True`` makes
    an incomplete multi-byte sequence at the end of *data* an error rather
    than a deferred tail.  This is the question that matters when *data* is
    the caller's entire input --- ``data.decode(encoding)`` will make exactly
    this judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes completely, ``False`` otherwise.
    FTr*   )r   r,   r-   )r#   r   r.   s      r   Údecodes_completelyr1   ‹   sD   € ô # 8Ó,€GØ€ØðØ�‰�t 4ˆÔ(ð øô ò Ùðús   �$ ¤	0¯0c                óÒ   — t        |«      }|€y	 |j                  | d¬«      }|r|j                  «       sy	 |j                  dd¬«       y# t        $ r Y yw xY w# t        $ r Y yw xY w)aë  Return ``True`` if *data* is ASCII text plus an incomplete tail.

    One decode pass answers both halves of the decode-safety question:
    the tolerant (``final=False``) decode yields the text before any
    deferred tail, and flushing the decoder afterwards raises exactly when
    a deferred tail existed.  True means the candidate decoded real ASCII
    characters and then hit an incomplete multi-byte sequence at the end
    --- its only *non-ASCII* evidence is the undecodable tail itself.

    Deliberately False when the tolerant decode yields nothing at all
    (the entire input is one dangling sequence): that candidate has zero
    decoded evidence, not ASCII evidence, and a clipped multi-byte
    fragment is better served by the ranking's own judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to decode *data* with.
    :returns: ``True`` if *data* decodes to non-empty pure ASCII with an
        incomplete sequence deferred at the end.
    Fr*   r   T)r   r,   r-   Úisascii)r#   r   r.   Útexts       r   Údangling_tail_with_ascii_prefixr5   ¢   s~   € ô( # 8Ó,€GØ€ØðØ�~‰~˜d¨%ˆ~Ó0ˆñ �t—|‘|”~ØðØ�‰�s $ˆÔ'ð øô ò Ùðûô ò Ùðús"   �A ·A Á	AÁAÁ	A&Á%A&c                óh   — t        | t        «      st        | t        «      r| dk  rd}t        |«      ‚y)z:Raise ValueError if *max_bytes* is not a positive integer.é   z$max_bytes must be a positive integerN)Ú
isinstanceÚboolr   Ú
ValueError)Ú	max_bytesÚmsgs     r   Ú_validate_max_bytesr=   Æ   s2   € ä�)œTÔ"¬*°YÄÔ*DÈ	ÐTUÊØ4ˆÜ˜‹oÐð IVr   c                óD   — | rt        j                  dt        |¬«       y|S )zEResolve the deprecated *should_rename_legacy* into *prefer_superset*.z?should_rename_legacy is deprecated, use prefer_superset insteadr   T)r   r   r   )Úshould_rename_legacyÚprefer_supersetr   s      r   Ú_resolve_prefer_supersetrA   Í   s'   € ñ Ü�‰ØMÜØ!õ	
ð
 ØÐr   ÚarÚarabicÚbeÚ
belarusianÚbgÚ	bulgarianÚbrÚbretonÚcsÚczechÚcyÚwelshÚdaÚdanishÚdeÚgermanÚelÚgreekÚenÚenglishÚeoÚ	esperantoÚesÚspanishÚetÚestonianÚfaÚfarsiÚfiÚfinnishÚfrÚfrenchÚgaÚirishÚgdÚgaelicÚheÚhebrewÚhrÚcroatianÚhuÚ	hungarianÚidÚ
indonesianÚisÚ	icelandicÚitÚitalianÚjaÚjapaneseÚkkÚkazakhÚkoÚkoreanÚltÚ
lithuanianÚlvÚlatvianÚmkÚ
macedonianÚmsÚmalayÚmtÚmalteseÚnlÚdutchÚnoÚ	norwegianÚplÚpolishÚptÚ
portugueseÚroÚromanianÚruÚrussianÚskÚslovakÚslÚsloveneÚsrÚserbianÚsvÚswedishÚtgÚtajikÚthÚthaiÚtrÚturkishÚukÚ	ukrainianÚundÚundeterminedÚurÚurduÚviÚ
vietnameseÚzhÚchinesezdict[str, str]ÚISO_TO_LANGUAGE)é   )r   r   r   r   ÚreturnÚNone)r   Ústrr¨   z codecs.IncrementalDecoder | None)r#   Úbytesr$   r«   r¨   r   )r#   r«   r   rª   r¨   r9   )r;   r   r¨   r©   )r?   r9   r@   r9   r   r   r¨   r9   )Ú__doc__Ú
__future__r   r   r   Úcollections.abcr   r   Ú__annotations__r   r   r
   r   r   r   r   r(   r/   r1   r5   r=   rA   r¦   © r   r   ú<module>r±      sN  ðÚ ,å "ã Û Ý $ð !Ð �3Ó  ð %Ð �CÓ $ð
 "Ð �CÓ !ð  Ð �5Ó ð "Ð �SÓ !ð NPÐ ÐJÓ Oô
ðØðà%óó(ó,&óRó.!óHð JKðØðØ15ðØCFðà	óð 3#Øˆ(ð3#àˆ,ð3#ð 	ˆ+ð3#ð 	ˆ(ð	3#ð
 	ˆ'ð3#ð 	ˆ'ð3#ð 	ˆ(ð3#ð 	ˆ(ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð 	ˆ+ð3#ð 	ˆ)ð3#ð 	ˆ*ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð  	ˆ(ð!3#ð" 	ˆ'ñ#3#ð$ 	ˆ(ð%3#ð& 	ˆ(ð'3#ð( 	ˆ*ð)3#ð* 	ˆ+ð+3#ð, 	ˆ,ð-3#ð. 	ˆ+ð/3#ð0 	ˆ)ð13#ð2 	ˆ*ð33#ð4 	ˆ(ð53#ð6 	ˆ(ð73#ð8 	ˆ,ð93#ð: 	ˆ)ð;3#ð< 	ˆ,ð=3#ð> 	ˆ'ð?3#ð@ 	ˆ)ðA3#ðB 	ˆ'ðC3#ðD 	ˆ+òE3#ðF 	ˆ(ðG3#ðH 	ˆ,ðI3#ðJ 	ˆ*ðK3#ðL 	ˆ)ðM3#ðN 	ˆ(ðO3#ðP 	ˆ)ðQ3#ðR 	ˆ)ðS3#ðT 	ˆ)ðU3#ðV 	ˆ'ðW3#ðX 	ˆ&ðY3#ðZ 	ˆ)ð[3#ð\ 	ˆ+ð]3#ð^ 
ˆ>ð_3#ð` 	ˆ&ða3#ðb 	ˆ,ðc3#ðd 	ˆ)ñe3#€�ô 3r   