o
    š7?eå  ã                   @   s:   d dl Z d dlmZ d dlZd dlZdd„ Zd
dd	„ZdS )é    N)ÚDecimalc              	   C   s$   t | tjtjtjtjtjtt	f ƒS )z¦Determine if the object instance is of a protected type.

    Objects of protected types are preserved as-is when passed to
    force_unicode(strings_only=True).
    )
Ú
isinstanceÚsixÚinteger_typesÚtypesÚNoneTypeÚdatetimeÚdateÚtimeÚfloatr   )Úobj© r   úd/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorboard/_vendor/bleach/encoding.pyÚis_protected_type   s   þÿÿr   úutf-8FÚstrictc              
      sú   t | tjƒr| S ˆrt| ƒr| S zAt | tjƒsIt| dƒr#|  ¡ } W | S tjr=t | tƒr5t | ˆ ˆ¡} W | S t | ¡} W | S t t| ƒˆ ˆ¡} W | S |  	ˆ ˆ¡} W | S  t
y| } zt | tƒsct
|jŽ ‚d ‡ ‡‡fdd„| D ƒ¡} W Y d}~| S d}~ww )zÆ
    Similar to smart_text, except that lazy instances are resolved to
    strings, rather than kept as lazy objects.

    If strings_only is True, don't convert (some) non-string-like objects.
    Ú__unicode__ú c                    s   g | ]	}t |ˆ ˆˆƒ‘qS r   )Úforce_unicode)Ú.0Úarg©ÚencodingÚerrorsÚstrings_onlyr   r   Ú
<listcomp><   s
    ÿÿz!force_unicode.<locals>.<listcomp>N)r   r   Ú	text_typer   Ústring_typesÚhasattrr   ÚPY3ÚbytesÚdecodeÚUnicodeDecodeErrorÚ	ExceptionÚargsÚjoin)Úsr   r   r   Úer   r   r   r      s8   	

é
íïôõ

ÿ€õr   )r   Fr   )r   Údecimalr   r   r   r   r   r   r   r   r   Ú<module>   s    