o
    
j6h‘  ã                   @   s¢   U d dl Z d dlZd dlZd dlZd dlmZmZ e jdfe jdfe j	dfe j
dfe jdfe jdfe jd	fgZeeeef  ed
< e d¡Zdedefdd„ZdS )é    N)ÚListÚTuplezutf-8zutf-16z	utf-16-bez	utf-16-lezutf-32z	utf-32-bez	utf-32-leÚBOMSs   coding[:=]\s*([-\w.]+)ÚdataÚreturnc                 C   s²   t D ]\}}|  |¡r| t|ƒd…  |¡  S q|  d¡dd… D ]*}|dd… dkrLt |¡rLt |¡}|dus<J ‚| ¡ d  d¡}|  |¡  S q"|  t 	d¡pWt
 ¡ ¡S )	zŠCheck a bytes string for a BOM to correctly detect the encoding

    Fallback to locale.getpreferredencoding(False) like open() on Python3Nó   
é   r   é   ó   #ÚasciiF)r   Ú
startswithÚlenÚdecodeÚsplitÚENCODING_REÚsearchÚgroupsÚlocaleÚgetpreferredencodingÚsysÚgetdefaultencoding)r   ÚbomÚencodingÚlineÚresult© r   úk/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/pip/_internal/utils/encoding.pyÚauto_decode   s   
ÿ
€ÿr   )Úcodecsr   Úrer   Útypingr   r   ÚBOM_UTF8Ú	BOM_UTF16ÚBOM_UTF16_BEÚBOM_UTF16_LEÚ	BOM_UTF32ÚBOM_UTF32_BEÚBOM_UTF32_LEr   ÚbytesÚstrÚ__annotations__Úcompiler   r   r   r   r   r   Ú<module>   s   
 ù

