§
    |ØjÞ'  ã                  ó  — d Z ddlmZ ddlmZ ddlmZmZmZm	Z	m
Z
mZ ddlmZ ddlmZ ddlmZmZ ddlmZmZ dd	lmZmZ dd
lmZ ddlmZmZ g d¢Zd-d„Zdej         eefdddddddœd.d)„Z!ddej         eefdddddddœd/d,„Z"dS )0u@   Universal character encoding detector â€” 0BSD-licensed rewrite.é    )Úannotations)ÚIterable)Ú_DEFAULT_CHUNK_SIZEÚDEFAULT_MAX_BYTESÚMINIMUM_THRESHOLDÚ_resolve_prefer_supersetÚ_validate_max_bytesÚ_warn_deprecated_chunk_size)Ú__version__)ÚUniversalDetector)ÚEncodingEraÚLanguageFilter)Úapply_compat_namesÚapply_preferred_superset)ÚDetectionDictÚDetectionResult)Úrun_pipeline)Ú_validate_encodingÚnormalize_encodings)
r   r   r   r   r   r   r   r   ÚdetectÚ
detect_allÚnameÚstrÚreturnÚobjectc                óx   — | dk    rddl }|                     d¦  «        S dt          ›d| ›�}t          |¦  «        ‚)aæ  Resolve the deprecated ``chardet.equivalences`` submodule on demand.

    Before the 7.5 split, ``chardet/__init__.py`` imported that module for
    its own use, which as a side effect made ``chardet.equivalences`` work
    without an explicit ``import chardet.equivalences``.  This package now
    imports :mod:`chardet.output_names` instead, so the attribute is bound
    lazily here: importing the shim eagerly would fire its deprecation
    warning on every ``import chardet``.
    Úequivalencesr   Nzchardet.equivalenceszmodule z has no attribute )Ú	importlibÚimport_moduleÚ__name__ÚAttributeError)r   r   Úmsgs      ú…/Users/tedpeters/Documents/Projects/Claude Projects/Misc Tools/notename-sheets/.venv/lib/python3.11/site-packages/chardet/__init__.pyÚ__getattr__r$   %   sU   € ð ˆ~ÒÐð 	ÐÐÐà×&Ò&Ð'=Ñ>Ô>Ð>Ø
:•HÐ
:Ð
:°$Ð
:Ð
:€CÝ
˜Ñ
Ô
Ðó    FTNÚcp1252zutf-8)Úprefer_supersetÚcompat_namesÚinclude_encodingsÚexclude_encodingsÚno_match_encodingÚempty_input_encodingÚbyte_strúbytes | bytearrayÚshould_rename_legacyÚboolÚencoding_erar   Ú
chunk_sizeÚintÚ	max_bytesr'   r(   r)   úIterable[str] | Noner*   r+   r,   r   c          	     óð  — t          |¦  «         t          |¦  «         t          ||¦  «        }t          |d¦  «        }t          |d¦  «        }t	          |	d¦  «        }t	          |
d¦  «        }t          | t          ¦  «        r| nt          | ¦  «        }t          |||||||¬¦  «        }|d                              ¦   «         }|d|…         }|rt          ||||¬¦  «         |rt          ||¦  «         |S )	aD	  Detect the encoding of the given byte string.

    :param byte_str: The byte sequence to detect encoding for.
    :param should_rename_legacy: Deprecated alias for *prefer_superset*.
    :param encoding_era: Restrict candidate encodings to the given era.
    :param chunk_size: Deprecated -- accepted for backward compatibility but
        has no effect.
    :param max_bytes: Maximum number of bytes to examine from *byte_str*.
    :param prefer_superset: If ``True``, remap subset encodings in the result
        to their decode-safe Windows/CP superset equivalents (e.g.,
        ISO-8859-1 -> Windows-1252, EUC-KR -> CP949).  Recommended when the
        result will be used to decode: detection examines at most
        *max_bytes* of input, and only the superset is guaranteed to decode
        bytes beyond that window.  The remap is skipped when the superset
        cannot decode the examined window itself (the Windows code pages
        leave a few C1 positions undefined that the ISO subsets map), so
        the reported name always decodes what was examined.  If ``False``
        (default), the detected
        encoding is reported under its own name --- note this only skips
        the renaming step; it is not a promise of the *smallest* matching
        encoding, since detection may natively choose a superset that fits
        the data better.  The default will change to ``True`` in chardet
        8.0; pass ``False`` explicitly if you depend on subset names.
    :param compat_names: If ``True`` (default), return encoding names
        compatible with chardet 5.x/6.x.  If ``False``, return raw Python
        codec names.
    :param include_encodings: If given, restrict detection to only these
        encodings (names or aliases).
    :param exclude_encodings: If given, remove these encodings from the
        candidate set.
    :param no_match_encoding: Encoding to return when no candidate survives
        the pipeline.  Defaults to ``"cp1252"``.  It is returned as given,
        at confidence 0.10, and is the one answer that is not checked
        against the data: it is the caller's sentinel for "nothing fit".
    :param empty_input_encoding: Encoding to return for empty input.  Defaults
        to ``"utf-8"``.
    :returns: A dictionary with keys ``"encoding"``, ``"confidence"``,
        ``"language"``, and ``"mime_type"``.
    r)   r*   r+   r,   )r4   r)   r*   r+   r,   r   N©r)   r*   )r
   r	   r   r   r   Ú
isinstanceÚbytesr   Úto_dictr   r   )r-   r/   r1   r2   r4   r'   r(   r)   r*   r+   r,   ÚincludeÚexcludeÚno_matchÚemptyÚdataÚresultsÚresultÚwindows                      r#   r   r   :   s+  € õj   
Ñ+Ô+Ð+Ý˜	Ñ"Ô"Ð"Ý.Ð/CÀ_ÑUÔU€OÝ!Ð"3Ð5HÑIÔI€GÝ!Ð"3Ð5HÑIÔI€GÝ!Ð"3Ð5HÑIÔI€HÝÐ3Ð5KÑLÔL€EÝ! (­EÑ2Ô2ÐGˆ8ˆ8½¸h¹¼€DÝØØØØ!Ø!Ø"Ø"ðñ ô €Gð �QŒZ×ÒÑ!Ô!€FØ�*�9�*Ô€FØð 
Ý ØØØ%Ø%ð		
ñ 	
ô 	
ð 	
ð ð +Ý˜6 6Ñ*Ô*Ð*Ø€Mr%   Úignore_thresholdúlist[DetectionDict]c          
     óÒ  — t          |¦  «         t          |¦  «         t          ||¦  «        }t          |d¦  «        }t          |	d¦  «        }t	          |
d¦  «        }t	          |d¦  «        }t          | t          ¦  «        r| nt          | ¦  «        }t          |||||||d¬¦  «        }d„ |D ¦   «         }|sd„ |D ¦   «         }|r|}|d	|…         }|D ])}|rt          ||||¬
¦  «         |rt          ||¦  «         Œ*| 
                    d„ d¬¦  «         t          ¦   «         }g }|D ]<}|d         |vr0|                     |d         ¦  «         |                     |¦  «         Œ=|S )aY  Detect all possible encodings of the given byte string.

    When *ignore_threshold* is False (the default), results with confidence
    <= MINIMUM_THRESHOLD (0.20) are filtered out.  If all results are below
    the threshold, the full unfiltered list is returned as a fallback so the
    caller always receives at least one result.

    :param byte_str: The byte sequence to detect encoding for.
    :param ignore_threshold: If ``True``, return all candidate encodings
        regardless of confidence score.
    :param should_rename_legacy: Deprecated alias for *prefer_superset*.
    :param encoding_era: Restrict candidate encodings to the given era.
    :param chunk_size: Deprecated -- accepted for backward compatibility but
        has no effect.
    :param max_bytes: Maximum number of bytes to examine from *byte_str*.
    :param prefer_superset: If ``True``, remap subset encodings in the
        results to their decode-safe Windows/CP superset equivalents.
        If ``False`` (default), skip the renaming --- not a promise of the
        smallest matching encoding.  The default will change to ``True``
        in chardet 8.0.  See :func:`detect` for details.
    :param compat_names: If ``True`` (default), return encoding names
        compatible with chardet 5.x/6.x.  If ``False``, return raw Python
        codec names.
    :param include_encodings: If given, restrict detection to only these
        encodings (names or aliases).
    :param exclude_encodings: If given, remove these encodings from the
        candidate set.
    :param no_match_encoding: Encoding to return when no candidate survives
        the pipeline.  Defaults to ``"cp1252"``.
    :param empty_input_encoding: Encoding to return for empty input.  Defaults
        to ``"utf-8"``.
    :returns: A list of dictionaries, sorted by descending confidence, one
        per encoding name.
    r)   r*   r+   r,   T)r4   r)   r*   r+   r,   Úfull_rankingc                ó6   — g | ]}|                      ¦   «         ‘ŒS © )r:   )Ú.0Úrs     r#   ú
<listcomp>zdetect_all.<locals>.<listcomp>Ñ   s    € Ð*Ð*Ð*˜QˆQ�YŠY‰[Œ[Ð*Ð*Ð*r%   c                ó4   — g | ]}|d          t           k    ¯|‘ŒS )Ú
confidence)r   )rI   Úds     r#   rK   zdetect_all.<locals>.<listcomp>Ó   s'   € ÐLÐLÐL˜!¨¨,¬Õ:KÒ(KÐ(K�AÐ(KÐ(KÐ(Kr%   Nr7   c                ó   — | d         S )NrM   rH   )rN   s    r#   ú<lambda>zdetect_all.<locals>.<lambda>Þ   s
   € ˜Q˜|œ_€ r%   )ÚkeyÚreverseÚencoding)r
   r	   r   r   r   r8   r9   r   r   r   ÚsortÚsetÚaddÚappend)r-   rC   r/   r1   r2   r4   r'   r(   r)   r*   r+   r,   r;   r<   r=   r>   r?   r@   ÚdictsÚfilteredrB   rN   ÚseenÚuniques                           r#   r   r   Ž   sÒ  € õb   
Ñ+Ô+Ð+Ý˜	Ñ"Ô"Ð"Ý.Ð/CÀ_ÑUÔU€OÝ!Ð"3Ð5HÑIÔI€GÝ!Ð"3Ð5HÑIÔI€GÝ!Ð"3Ð5HÑIÔI€HÝÐ3Ð5KÑLÔL€EÝ! (­EÑ2Ô2ÐGˆ8ˆ8½¸h¹¼€DÝØØØØ!Ø!Ø"Ø"Øð	ñ 	ô 	€Gð +Ð* 'Ð*Ñ*Ô*€EØð ØLÐL˜uÐLÑLÔLˆØð 	ØˆEØ�*�9�*Ô€FØð *ð *ˆØð 	Ý$Ø�6¨WÈðñ ô ð ð ð 	*Ý˜q &Ñ)Ô)Ð)øØ	‡J‚JÐ,Ð,°d€JÑ;Ô;Ð;õ
  ™EœE€DØ"$€FØð ð ˆØˆZŒ= Ð$Ð$Ø�HŠH�Q�z”]Ñ#Ô#Ð#Ø�MŠM˜!ÑÔÐøØ€Mr%   )r   r   r   r   )r-   r.   r/   r0   r1   r   r2   r3   r4   r3   r'   r0   r(   r0   r)   r5   r*   r5   r+   r   r,   r   r   r   )r-   r.   rC   r0   r/   r0   r1   r   r2   r3   r4   r3   r'   r0   r(   r0   r)   r5   r*   r5   r+   r   r,   r   r   rD   )#Ú__doc__Ú
__future__r   Úcollections.abcr   Úchardet._utilsr   r   r   r   r	   r
   Úchardet._versionr   Úchardet.detectorr   Úchardet.enumsr   r   Úchardet.output_namesr   r   Úchardet.pipeliner   r   Úchardet.pipeline.orchestratorr   Úchardet.registryr   r   Ú__all__r$   ÚALLr   r   rH   r%   r#   ú<module>ri      sè  ðØ FÐ Fà "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð )Ð (Ð (Ð (Ð (Ð (Ø .Ð .Ð .Ð .Ð .Ð .Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø MÐ MÐ MÐ MÐ MÐ MÐ MÐ MØ ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø DÐ DÐ DÐ DÐ DÐ DÐ DÐ Dðð ð €ðð ð ð ð. "'Ø +¤Ø)Ø&ðQð "ØØ.2Ø.2Ø%Ø 'ðQð Qð Qð Qð Qð Qðl #Ø!&Ø +¤Ø)Ø&ð[ð "ØØ.2Ø.2Ø%Ø 'ð[ð [ð [ð [ð [ð [ð [ð [r%   