
    > /i^!                         d Z ddlmZmZmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ erddlmZ  G d	 d
e	      Zy)zHThis module contains an object that represents a Telegram MessageEntity.    )TYPE_CHECKINGFinalListOptional)	constants)TelegramObject)User)enum)JSONDict)Botc                       e Zd ZU dZdZ	 	 	 	 d%dddedededee   d	ee   d
ee   dee   dee	   f fdZ
edee	   ddded    f fd       Zej                  j                  Zee   ed<   	 ej                  j$                  Zee   ed<   	 ej                  j&                  Zee   ed<   	 ej                  j(                  Zee   ed<   	 ej                  j*                  Zee   ed<   	 ej                  j,                  Zee   ed<   	 ej                  j.                  Zee   ed<   	 ej                  j0                  Zee   ed<   	 ej                  j2                  Zee   ed<   	 ej                  j4                  Zee   ed<   	 ej                  j6                  Zee   ed<   	 ej                  j8                  Zee   ed<   	 ej                  j:                  Zee   ed<   	 ej                  j<                  Zee   ed <   	 ej                  j>                  Zee   ed!<   	 ej                  j@                  Z ee   ed"<   	 ej                  jB                  Z!ee   ed#<   	  e"ej                        Z#ee$e      ed$<    xZ%S )&MessageEntitya  
    This object represents one special entity in a text message. For example, hashtags,
    usernames, URLs, etc.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`type`, :attr:`offset` and :attr:`length` are equal.

    Args:
        type (:obj:`str`): Type of the entity. Can be :attr:`MENTION` (@username),
            :attr:`HASHTAG` (#hashtag), :attr:`CASHTAG` ($USD), :attr:`BOT_COMMAND`
            (/start@jobs_bot), :attr:`URL` (https://telegram.org),
            :attr:`EMAIL` (do-not-reply@telegram.org), :attr:`PHONE_NUMBER` (+1-212-555-0123),
            :attr:`BOLD` (**bold text**), :attr:`ITALIC` (*italic text*), :attr:`UNDERLINE`
            (underlined text), :attr:`STRIKETHROUGH`, :attr:`SPOILER` (spoiler message),
            :attr:`CODE` (monowidth string), :attr:`PRE` (monowidth block), :attr:`TEXT_LINK`
            (for clickable text URLs), :attr:`TEXT_MENTION` (for users without usernames),
            :attr:`CUSTOM_EMOJI` (for inline custom emoji stickers).

            .. versionadded:: 20.0
                Added inline custom emoji
        offset (:obj:`int`): Offset in UTF-16 code units to the start of the entity.
        length (:obj:`int`): Length of the entity in UTF-16 code units.
        url (:obj:`str`, optional): For :attr:`TEXT_LINK` only, url that will be opened after
            user taps on the text.
        user (:class:`telegram.User`, optional): For :attr:`TEXT_MENTION` only, the mentioned
             user.
        language (:obj:`str`, optional): For :attr:`PRE` only, the programming language of
            the entity text.
        custom_emoji_id (:obj:`str`, optional): For :attr:`CUSTOM_EMOJI` only, unique identifier
            of the custom emoji. Use :meth:`telegram.Bot.get_custom_emoji_stickers` to get full
            information about the sticker.

            .. versionadded:: 20.0
    Attributes:
        type (:obj:`str`): Type of the entity. Can be :attr:`MENTION` (@username),
            :attr:`HASHTAG` (#hashtag), :attr:`CASHTAG` ($USD), :attr:`BOT_COMMAND`
            (/start@jobs_bot), :attr:`URL` (https://telegram.org),
            :attr:`EMAIL` (do-not-reply@telegram.org), :attr:`PHONE_NUMBER` (+1-212-555-0123),
            :attr:`BOLD` (**bold text**), :attr:`ITALIC` (*italic text*), :attr:`UNDERLINE`
            (underlined text), :attr:`STRIKETHROUGH`, :attr:`SPOILER` (spoiler message),
            :attr:`CODE` (monowidth string), :attr:`PRE` (monowidth block), :attr:`TEXT_LINK`
            (for clickable text URLs), :attr:`TEXT_MENTION` (for users without usernames),
            :attr:`CUSTOM_EMOJI` (for inline custom emoji stickers).

            .. versionadded:: 20.0
                Added inline custom emoji
        offset (:obj:`int`): Offset in UTF-16 code units to the start of the entity.
        length (:obj:`int`): Length of the entity in UTF-16 code units.
        url (:obj:`str`): Optional. For :attr:`TEXT_LINK` only, url that will be opened after
            user taps on the text.
        user (:class:`telegram.User`): Optional. For :attr:`TEXT_MENTION` only, the mentioned
             user.
        language (:obj:`str`): Optional. For :attr:`PRE` only, the programming language of
            the entity text.
        custom_emoji_id (:obj:`str`): Optional. For :attr:`CUSTOM_EMOJI` only, unique identifier
            of the custom emoji. Use :meth:`telegram.Bot.get_custom_emoji_stickers` to get full
            information about the sticker.

            .. versionadded:: 20.0

    )lengthurlusertypelanguageoffsetcustom_emoji_idN
api_kwargsr   r   r   r   r   r   r   r   c                >   t         	|   |       t        j                  t        j
                  ||      | _        || _        || _        || _	        || _
        || _        || _        | j                  | j                  | j                  f| _        | j                          y )Nr   )super__init__r
   
get_memberr   MessageEntityTyper   r   r   r   r   r   r   	_id_attrs_freeze)
selfr   r   r   r   r   r   r   r   	__class__s
            M/srv/sistema/bot/venv/lib/python3.12/site-packages/telegram/_messageentity.pyr   zMessageEntity.__init__b   s}     	J/)D)DdDQ	!!"%$(	'/.=))T[[$++>    databotr   returnc                     | j                  |      }|syt        j                  |j                  d      |      |d<   t        | 	  ||      S )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r#   r$   )_parse_datar	   de_jsongetr   )clsr#   r$   r    s      r!   r(   zMessageEntity.de_json}   sI     t$||DHHV$4c:VwDc22r"   MENTIONHASHTAGCASHTAGPHONE_NUMBERBOT_COMMANDURLEMAILBOLDITALICCODEPRE	TEXT_LINKTEXT_MENTION	UNDERLINESTRIKETHROUGHSPOILERCUSTOM_EMOJI	ALL_TYPES)NNNN)&__name__
__module____qualname____doc__	__slots__strintr   r	   r   r   classmethodr(   r   r   r+   r   __annotations__r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   listr<   r   __classcell__)r    s   @r!   r   r   !   s   <| [I "#"&)- *.  	
 c] tn 3- "# X&6 	38H- 	3E 	3h>W 	3 	3 $55==GU3Z=?#55==GU3Z=?#55==GU3Z=?(::GGL%*GD'99EEKsEC1155Cs5;!3399E5:9= 2277D%*7<"44;;FE#J;> 2277D%*7<1155Cs5;%77AAIuSzAA(::GGL%*GD%77AAIuSzAA ) ; ; I IM5:IE#55==GU3Z=  )::GGL%*G #'y'B'B"CIuT#YCIr"   r   N)r@   typingr   r   r   r   telegramr   telegram._telegramobjectr   telegram._userr	   telegram._utilsr
   telegram._utils.typesr   r   r    r"   r!   <module>rO      s6   & O 7 7  3    *QJN QJr"   