
    <iE	                     6   U d Z ddlZddlmZ ddlmZ ddlmZmZm	Z	 ddl
mZ  ej        d                     ej        d	                    ee	z                                 ej                  Zeed
<   deddfdZd	g ddfdededee         dededefdZdS )zA
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
    N)Sequence)Final   )ascii_symbolsto_strunprintable_ascii_chars)InvalidCharError[{}] __RE_SYMBOLtextreturnc                 |    t                               t          |                     }|rt          d|           dS )z
    Verifying whether symbol(s) included in the ``text`` or not.

    Args:
        text:
            Input text to validate.

    Raises:
        ValidationError (ErrorReason.INVALID_CHARACTER):
            If symbol(s) included in the ``text``.
    zinvalid symbols found: N)r   findallr   r	   )r   
match_lists     /Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/pathvalidate/_symbol.pyvalidate_symbolr      sI     $$VD\\22J GEEEFFFG G    Freplacement_textexclude_symbolsis_replace_consecutive_charsis_stripc                 0   |rt          j        d                    t          j        d                    t          t          t          z             t          |          z
                                t           j                  }nt          }	 |
                    |t          |                     }n# t          $ r t          d          w xY w|s|S |r+t          j
        t          j        |           d||          }|r|                    |          }|S )ag  
    Replace all of the symbols in the ``text``.

    Args:
        text:
            Input text.
        replacement_text:
            Replacement text.
        exclude_symbols:
            Symbols that were excluded from the replacement.
        is_replace_consecutive_chars:
            If |True|, replace consecutive multiple ``replacement_text`` characters
            to a single character.
        is_strip:
            If |True|, strip ``replacement_text`` from the beginning/end of the replacement text.

    Returns:
        A replacement string.

    Example:

        :ref:`example-sanitize-symbol`
    r
   r   ztext must be a string+)recompileformatescapejoinsetr   r   UNICODEr   subr   	TypeErrorstrip)r   r   r   r   r   regexpnew_texts          r   replace_symbolr'   $   s!   >  
MM	GGC0G GHH3K_K__``  
 J
 
 1::.t== 1 1 1/0001  # Y6RY'788;;;=MxXX 4>>"233Os   #B1 1C)__doc__r   collections.abcr   typingr   _commonr   r   r   errorr	   r   r   r   r   r!   r   __annotations__strr   boolr'    r   r   <module>r1      sa     
			 $ $ $ $ $ $       C C C C C C C C C C # # # # # #  RZ
MM)")BGGM4K$KLLMMNNPRPZ U   
G# G$ G G G G( %').9 9
99 c]9 #'	9
 9 	9 9 9 9 9 9r   