
    ir
                        d Z ddlZddlZddlmZmZmZ  ed          Z ed          Z	 edej
                  Zdee         d	ed
e	deeee	f         fdZ G d deej
                  Z G d dej                  ZdS )a  This module contains helper functions related to enums.

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.
    N)TypeTypeVarUnion_A_B_Enum)boundenum_clsvaluedefaultreturnc                 >    	  | |          S # t           $ r |cY S w xY w)zTries to call ``enum_cls(value)`` to convert the value into an enumeration member.
    If that fails, the ``default`` is returned.
    )
ValueError)r
   r   r   s      Z/var/www/html/crypto-bot/backend/venv/lib/python3.11/site-packages/telegram/_utils/enum.py
get_memberr   #   s9    x   s   
 c                   .    e Zd ZdZdZdefdZdefdZdS )
StringEnumzHelper class for string enums where ``str(member)`` prints the value, but ``repr(member)``
    gives ``EnumName.MEMBER_NAME``.
     r   c                 2    d| j         j         d| j         dS N<.>	__class____name__nameselfs    r   __repr__zStringEnum.__repr__7   "    94>*99TY9999    c                 6    t                               |           S N)str__str__r   s    r   r&   zStringEnum.__str__:   s    {{4   r"   N)r   
__module____qualname____doc__	__slots__r%   r    r&   r   r"   r   r   r   0   s[          I:# : : : :! ! ! ! ! ! !r"   r   c                   H    e Zd ZdZdZdefdZej        dk     rdefdZ	dS dS )IntEnumzHelper class for int enums where ``str(member)`` prints the value, but ``repr(member)``
    gives ``EnumName.MEMBER_NAME``.
    r   r   c                 2    d| j         j         d| j         dS r   r   r   s    r   r    zIntEnum.__repr__F   r!   r"   )      c                 *    t          | j                  S r$   )r%   r   r   s    r   r&   zIntEnum.__str__K   s    tz??"r"   N)
r   r'   r(   r)   r*   r%   r    sysversion_infor&   r   r"   r   r,   r,   ?   ss          I:# : : : : '!!	#S 	# 	# 	# 	# 	# 	# "!r"   r,   )r)   enum_enumr1   typingr   r   r   r   r   Enumr   r   r%   r   r,   r   r"   r   <module>r7      s  &      



 ' ' ' ' ' ' ' ' ' 'WT]]WT]]uz***e R " ubRT}AU    ! ! ! ! !ej ! ! !# # # # #em # # # # #r"   