Ë
     ²‘iÅ  ã                   ó,  — U d Z ddlmZmZmZ  ede¬«      Z ede¬«      Z G d„ dee   «      Z ed«      Z	ed   e
d	<   	  ed
«      Zee   e
d<   	  ed«      Zee   e
d<   	  ed«      Zee   e
d<   	  ed«      Zee   e
d<   	  ed«      Zee   e
d<   y)a§  This module contains the DefaultValue class.

.. versionchanged:: 20.0
   Previously, the contents of this module were available through the (no longer existing)
   module ``telegram._utils.helpers``.

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.
é    )ÚGenericÚTypeVarÚoverloadÚDVType)ÚboundÚOTc                   ó¦   — e Zd ZdZdZdefd„Zdefd„Zde	fd„Z
de	fd„Zeed	d
defd„«       «       Zeed	edefd„«       «       Zed	ddefd„«       Zy)ÚDefaultValueau  Wrapper for immutable default arguments that allows to check, if the default value was set
    explicitly. Usage::

        default_one = DefaultValue(1)
        def f(arg=default_one):
            if arg is default_one:
                print('`arg` is the default')
                arg = arg.value
            else:
                print('`arg` was set explicitly')
            print(f'`arg` = {str(arg)}')

    This yields::

        >>> f()
        `arg` is the default
        `arg` = 1
        >>> f(1)
        `arg` was set explicitly
        `arg` = 1
        >>> f(2)
        `arg` was set explicitly
        `arg` = 2

    Also allows to evaluate truthiness::

        default = DefaultValue(value)
        if default:
            ...

    is equivalent to::

        default = DefaultValue(value)
        if value:
            ...

    ``repr(DefaultValue(value))`` returns ``repr(value)`` and ``str(DefaultValue(value))`` returns
    ``f'DefaultValue({value})'``.

    Args:
        value (:class:`object`): The value of the default argument
    Attributes:
        value (:class:`object`): The value of the default argument

    ©Úvaluer   c                 ó   — || _         y ©Nr   )Úselfr   s     úS/var/www/telegram/venv/lib/python3.12/site-packages/telegram/_utils/defaultvalue.pyÚ__init__zDefaultValue.__init__V   s	   € Ø"ˆ�
ó    Úreturnc                 ó,   — t        | j                  «      S r   )Úboolr   ©r   s    r   Ú__bool__zDefaultValue.__bool__Y   ó   € Ü�D—J‘JÓÐr   c                 ó"   — d| j                   › d�S )NzDefaultValue(ú)r   r   s    r   Ú__str__zDefaultValue.__str__]   s   € Ø˜tŸz™z˜l¨!Ð,Ð,r   c                 ó,   — t        | j                  «      S r   )Úreprr   r   s    r   Ú__repr__zDefaultValue.__repr__a   r   r   ÚobjzDefaultValue[OT]c                  ó   — y r   © ©r   s    r   Ú	get_valuezDefaultValue.get_valued   s   € à25r   c                  ó   — y r   r!   r"   s    r   r#   zDefaultValue.get_valueh   s   € à"%r   zOT | DefaultValue[OT]c                 ó>   — t        | t        «      r| j                  S | S )züShortcut for::

            return obj.value if isinstance(obj, DefaultValue) else obj

        Args:
            obj (:obj:`object`): The object to process

        Returns:
            Same type as input, or the value of the input: The value
        )Ú
isinstancer
   r   r"   s    r   r#   zDefaultValue.get_valuel   s   € ô ' s¬LÔ9ˆs�y‰yÐB¸sÐBr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   Ústrr   r   r   Ústaticmethodr   r#   r!   r   r   r
   r
   %   s§   „ ñ,ð\ €Ið#˜fó #ð ˜$ó  ð-˜ó -ð ˜#ó  ð ØØ5Ð)Ð5¨bÒ5ó ó à5àØØ%�rÐ%˜bÒ%ó ó à%àðCÐ.ð C°2ò Có ñCr   r
   NÚDEFAULT_NONEFÚDEFAULT_FALSETÚDEFAULT_TRUEé   Ú
DEFAULT_20z	127.0.0.1Ú
DEFAULT_IPéP   Ú
DEFAULT_80)r*   Útypingr   r   r   Úobjectr   r   r
   r.   Ú__annotations__r/   r   r0   r2   Úintr3   r,   r5   r!   r   r   ú<module>r:      sÕ   ðò&
÷ .Ñ -á	� Ô	(€ÙˆT˜Ô €ôSC�7˜6‘?ô SCñl $0°Ó#5€ˆl˜4Ñ Ó 5Ø 0á$0°Ó$7€ˆ|˜DÑ!Ó 7Ø 1á#/°Ó#5€ˆl˜4Ñ Ó 5ðñ !-¨RÓ 0€
ˆL˜ÑÓ 0Ø .á ,¨[Ó 9€
ˆL˜ÑÓ 9ðñ
 !-¨RÓ 0€
ˆL˜ÑÓ 0ðr   