Ë
    Dü´jÉ  ã                  ój  — U d Z ddlmZ ddlmZ ddddddd	d
dddddœZded<   i dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d"“d#d$“d%d&“d'd(“d)d*“d+d,“d-d.“d/d0“i d1d2“d3d4“d5d6“d7d8“d9d:“d;d<“d=d>“d?d@“dAdB“dCdD“dEdF“dGdH“ddI“ddJ“ddK“d	dL“ddM“¥dNdOdPdQdRdSdTdUdVœ¥ZdedW<   d\dX„Z	 	 	 	 d]dY„Z	e	Z
	 	 	 	 d]dZ„Zy[)^aé  Public-API encoding-name remapping.

Two output transforms applied to detection results before they cross the
public API:

* :func:`apply_preferred_superset` -- when the ``prefer_superset`` API option
  is enabled, replaces detected ISO/subset encoding names with their
  Windows/CP supersets that modern software actually uses
  (e.g., ISO-8859-1 -> Windows-1252).

* :func:`apply_compat_names` -- when the default ``compat_names=True`` mode
  is enabled, maps internal Python codec names to the names chardet 5.x/6.x
  returned, preserving backward compatibility for callers that compare
  encoding strings directly.

Both transforms operate in-place on a :class:`~chardet.pipeline.DetectionDict`
and return the same dict for fluent chaining.
é    )Úannotations)ÚDetectionDictÚcp1252Úcp949Úcp1250Úcp1251Úcp1256Úcp1253Úcp1255Úcp1254Úcp874Úcp1257)ÚasciiÚeuc_krú	iso8859-1ú	iso8859-2ú	iso8859-5ú	iso8859-6ú	iso8859-7ú	iso8859-8ú	iso8859-9z
iso8859-11ú
iso8859-13útis-620údict[str, str]ÚPREFERRED_SUPERSETÚ	big5hkscsÚBig5Úcp855ÚIBM855Úcp866ÚIBM866ÚCP874Úcp932ÚCP932ÚCP949Úeuc_jis_2004zEUC-JPr   zEUC-KRÚgb18030ÚGB18030Úhzz
HZ-GB-2312Úiso2022_jp_2zISO-2022-JPÚ
iso2022_krzISO-2022-KRr   z
ISO-8859-1r   z
ISO-8859-2r   z
ISO-8859-5r   z
ISO-8859-6r   z
ISO-8859-7r   z
ISO-8859-8r   z
ISO-8859-9r   zISO-8859-13ÚjohabÚJohabzkoi8-rzKOI8-Rzmac-cyrillicÚMacCyrillicz	mac-romanÚMacRomanÚshift_jis_2004Ú	SHIFT_JISr   zTIS-620zutf-16zUTF-16zutf-32zUTF-32z	utf-8-sigz	UTF-8-SIGzWindows-1250zWindows-1251zWindows-1252zWindows-1253zWindows-1254zWindows-1255zWindows-1256zWindows-1257ÚKZ1048ÚMacGreekÚ
MacIcelandÚ	MacLatin2Ú
MacTurkish)r   r	   r   Úkz1048z	mac-greekzmac-icelandz
mac-latin2zmac-turkishÚ_COMPAT_NAMESc                ór   — | j                  d«      }t        |t        «      r|j                  ||«      | d<   | S )zGReplace the encoding name using *mapping*, modifying *result* in-place.Úencoding)ÚgetÚ
isinstanceÚstr)ÚresultÚmappingÚencs      úR/root/workspace/ytshorts/venv/lib/python3.12/site-packages/chardet/output_names.pyÚ_remap_encodingrB   a   s4   € à
�*‰*�ZÓ
 €CÜ�#”sÔØ$Ÿ[™[¨¨cÓ2ˆˆzÑØ€Mó    c                ó"   — t        | t        «      S )a7  Replace the encoding name with its preferred Windows/CP superset.

    Modifies the ``"encoding"`` value in *result* in-place and returns *result*
    for fluent chaining.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :returns: The same *result* dict, modified in-place.
    )rB   r   ©r>   s    rA   Úapply_preferred_supersetrF   i   s   € ô ˜6Ô#5Ó6Ð6rC   c                ó"   — t        | t        «      S )a7  Convert internal codec names to chardet 5.x/6.x compatible names.

    Modifies the ``"encoding"`` value in *result* in-place and returns *result*
    for fluent chaining.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :returns: The same *result* dict, modified in-place.
    )rB   r8   rE   s    rA   Úapply_compat_namesrH   {   s   € ô ˜6¤=Ó1Ð1rC   N)r>   r   r?   r   Úreturnr   )r>   r   rI   r   )Ú__doc__Ú
__future__r   Úchardet.pipeliner   r   Ú__annotations__r8   rB   rF   Úapply_legacy_renamerH   © rC   rA   ú<module>rP      sL  ðòõ& #å *ð ØØØØØØØØØØØñ&Ð �Nó ð(-!à�ð-!ð ˆXð-!ð ˆXð	-!ð
 ˆWð-!ð ˆWð-!ð ˆWð-!ð �Hð-!ð ˆhð-!ð ˆyð-!ð 	ˆ,ð-!ð �Mð-!ð �-ð-!ð �ð-!ð �ð-!ð  �ð!-!ð" �ð#-!ð$ �ñ%-!ð& �ð'-!ð( �ð)-!ð* �-ð+-!ð, ˆWð--!ð. ˆhð/-!ð0 �Mð1-!ð2 �ð3-!ð4 �kð5-!ð6 ˆyð7-!ð8 ˆhð9-!ð: ˆhð;-!ð< �ð=-!ð> ˆnð?-!ð@ ˆnðA-!ðB ˆnðC-!ðD ˆnðE-!ðF ˆnñG-!ðH ØØàØØØØòY-!€ˆ~ó -ó`ð7Øð7àó7ð /Ð ð2Øð2àô2rC   