
    ՟f                     h    d Z ddlmZmZ ddlmZ deee      dee   fdZdeee      dee   fdZ	y	)
aK  This module contains helper functions related to parsing updates and their contents.

.. versionadded:: 20.8

Warning:
    Contents of this module are intended to be used internally by the library and *not* by the
    user. Changes to this module are not considered breaking changes and may not be documented in
    the changelog.
    )	FrozenSetOptional)SCTchat_idreturnc                 h    | 
t               S t        | t              rt        | h      S t        |       S )zPAccepts a chat id or collection of chat ids and returns a frozenset of chat ids.)	frozenset
isinstanceint)r   s    ^/var/www/cvtools/html/venv/lib/python3.12/site-packages/telegram/ext/_utils/_update_parsing.pyparse_chat_idr   !   s1    {'3'##W    usernamec                     | 
t               S t        | t              r't        | j                  d      r
| dd h      S | h      S t        | D ch c]  }|j                  d      r|dd n| c}      S c c}w )zAccepts a username or collection of usernames and returns a frozenset of usernames.
    Strips the leading ``@`` if present.
    N@   )r	   r
   str
startswith)r   usrs     r   parse_usernamer   *   sw     {(C (*=*=c*B(12,QRRQRRR#!4c!"g#=RSSRs   A3N)
__doc__typingr   r   telegram._utils.typesr   r   r   r   r    r   r   <module>r      sU   & ' %8CH- )C. TXc#h/ TIcN Tr   