
    1Vh                     6    d dl Z d dlmZ d dlZd dlZd ZddZy)    N)Decimalc           
          t        | t        j                  t        j                  t
        j
                  t
        j                  t
        j                  t        t        fz         S )zDetermine 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   )objs    S/home/dcms/DCMS/lib/python3.12/site-packages/tensorboard/_vendor/bleach/encoding.pyis_protected_typer      sG     c				HMM8==			     c                    t        | t        j                        r| S |rt        |       r| S 	 t        | t        j                        st        | d      r| j                         } | S t        j                  rAt        | t              rt        j                  | ||      } | S t        j                  |       } 	 | S t        j                  t        |       ||      } 	 | S | j                  ||      } 	 | S # t        $ r^}t        | t              st        |j                   dj                  | D cg c]  }t        ||||       nc c}w c}      } Y d}~| S d}~ww xY 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__ N)r   r   	text_typer   string_typeshasattrr   PY3bytesdecodeUnicodeDecodeError	Exceptionargsjoinforce_unicode)sencodingstrings_onlyerrorseargs         r   r   r      s<    !S]]#)!,1!S--.q-(MMO2 H/ 77!!U+MM!Xv>* H'  MM!,& H# eAh&AA" H 6*A H  
1!Y'$aff-- -.0&) (X| " 0 0 1AH
1s;   6C. %7C. C. 6 C. C. .	E71E(D>
=EE)zutf-8Fstrict)r
   decimalr   r   r   r   r    r   r   <module>r)      s       
)r   