
    &thV                    6    d dl mZ d dlmZ 	 dddZ	 dddZdS )    )annotations)
StrOrBytesNstricttextr   encoding
str | Noneerrorsstrreturnc                    t          | t                    r| S t          | t          t          f          s$t          dt	          |           j                   |d}|                     ||          S )zxReturn the unicode representation of a bytes object `text`. If `text`
    is already an unicode object, return it as-is.z*to_unicode must receive bytes or str, got Nutf-8)
isinstancer
   bytes	TypeErrortype__name__decoder   r   r	   s      ^/var/www/html/mycamper/aliexpress-site/backend/venv/lib/python3.11/site-packages/w3lib/util.py
to_unicoder      sx    
 $ dUCL)) 
Nd9LNN
 
 	
 ;;x(((    r   c                    t          | t                    r| S t          | t                    s$t          dt	          |           j                   |d}|                     ||          S )zeReturn the binary representation of `text`. If `text`
    is already a bytes object, return it as-is.z(to_bytes must receive str or bytes, got Nr   )r   r   r
   r   r   r   encoder   s      r   to_bytesr      st    
 $ dC   
LtDzz7JLL
 
 	
 ;;x(((r   )Nr   )r   r   r   r   r	   r
   r   r
   )r   r   r   r   r	   r
   r   r   )
__future__r   w3lib._typesr   r   r    r   r   <module>r      ss    " " " " " " # # # # # # BJ) ) ) ) )" BJ) ) ) ) ) ) )r   