
    !<i              
       v    d dl Z d dlmZ d dlmZmZ d dlmZmZ de	fdZ
ddded	ed
edz  dee         fdZdS )    N)Path)Anyget_args)resolvetoken_countreturnc                     | t           u rdS t          |           D ]#}t          |          }t          |          r dS $dS )NTF)r   r   r   _is_path)type_
inner_types     /Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/cyclopts/_env_var.pyr
   r
      sU    }}tuoo  
Z((
J 	44	 5    )	delimiterr   valr   c                    t          |           } t          |           \  }}|dk    s|rCt          |           r|                    t          j                  n|                    |          S |gS )a2  Type-dependent environment variable value splitting.

    Converts a single string into a list of strings. Splits when:

    * The ``type_`` is some variant of ``Iterable[pathlib.Path]`` objects.
      If Windows, split on ``;``, otherwise split on ``:``.

    * Otherwise, if the ``type_`` is an ``Iterable``, split on whitespace.
      Leading/trailing whitespace of each output element will be stripped.

    This function is the default value for :attr:`cyclopts.App.env_var_split`.

    Parameters
    ----------
    type_: type
        Type hint that we will eventually coerce into.
    val: str
        String to split.
    delimiter: str | None
        Delimiter to split ``val`` on.
        If None, defaults to whitespace.

    Returns
    -------
    list[str]
        List of individual string tokens.
       )r   r   r
   splitospathsep)r   r   r   countconsume_alls        r   env_var_splitr      sf    B ENNE$U++E;qyyKy(0Qsyy$$$SYYy=Q=QQur   )r   pathlibr   typingr   r   cyclopts._convertr   r   boolr
   strlistr    r   r   <module>r       s    				                       2 2 2 2 2 2 2 2	t 	 	 	 	  !	' ' ''	' Tz	'
 
#Y' ' ' ' ' 'r   