� ��^i� ��B�ddlmZddlmZddlmZmZgd�Zd�Zd�Z dS)�)�UniversalDetector)� InputState)� __version__�VERSION)r�detect� detect_allrrc�@�t|t��sSt|t��s/td�t |�������t|��}t ��}|�|��|���S)z� Detect the encoding of the given byte string. :param byte_str: The byte sequence to examine. :type byte_str: ``bytes`` or ``bytearray`` �3Expected object of type bytes or bytearray, got: {}) � isinstance� bytearray�bytes� TypeError�format�typer�feed�close)�byte_str�detectors ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/chardet/__init__.pyrrs��� �h� � *� *�+��(�E�*�*� +��!�!'���X���!7�!7�9�9� 9�!��*�*�H� �"�"�H� �M�M�(���� �>�>� � ��c�$�t|t��sSt|t��s/td�t |�������t|��}t ��}|�|��|���|j tj kr�g}|j D]�}|� ��|jkr�|j}|j���}|�d��r"|jr|j�||��}|�||� ��|jd�����t/|��dkrt1|d����S|jgS)z� Detect all the possible encodings of the given byte string. :param byte_str: The byte sequence to examine. :type byte_str: ``bytes`` or ``bytearray`` r ziso-8859)�encoding� confidence�language�c��|d S)Nr�)�results r�zdetect_all..Qs��v�l�7K�6K�r)�key)r r r rrrrrr� _input_stater� HIGH_BYTE�_charset_probers�get_confidence�MINIMUM_THRESHOLD� charset_name�lower� startswith�_has_win_bytes� ISO_WIN_MAP�get�appendr�len�sortedr)rr�results�proberr&�lower_charset_names rrr-s��� �h� � *� *�+��(�E�*�*� +��!�!'���X���!7�!7�9�9� 9�!��*�*�H� �"�"�H� �M�M�(���� �N�N������ � 4�4�4����/� � �F��$�$�&�&��)C�C�C�%�2� �%+�%8�%>�%>�%@�%@�"�&�0�0��<�<�J��.�J�'/�';�'?�'?�@R�r6sy��&1�0�0�0�0�0�������)�)�)�)�)�)�)�)� R� Q� Q�����$&�&�&�&�&r