Ë
    †jÒ=  ã                   óÞ   — d Z ddlmZ ddl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 dd	lmZ dd
lmZmZmZ ddlmZ erddlmZ  G d„ de	«      Z G d„ de«      Z G d„ de«      Zy)z5This module contains objects that represent stickers.é    )ÚSequence)ÚTYPE_CHECKINGÚFinal)Ú	constants)Ú_BaseThumbedMedium)ÚFile)Ú	PhotoSize)ÚTelegramObject)Úenum)Úde_json_optionalÚde_list_optionalÚparse_sequence_arg)ÚJSONDict)ÚBotc            #       óŠ  ‡ — e Zd ZU dZdZ	 	 	 	 	 	 	 	 d ddœdedededed	ed
edededz  dedz  dedz  dddddedz  dedz  dedz  de	dz  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d!de	dddd fˆ fd„«       Zˆ xZS )"ÚStickeraj  This object represents a sticker.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`file_unique_id` is equal.

    Note:
        As of v13.11 :paramref:`is_video` is a required argument and therefore the order of the
        arguments had to be changed. Use keyword arguments to make sure that the arguments are
        passed correctly.

    .. versionchanged:: 20.5
      |removed_thumb_note|

    Args:
        file_id (:obj:`str`): Identifier for this file, which can be used to download
            or reuse the file.
        file_unique_id (:obj:`str`): Unique identifier for this file, which
            is supposed to be the same over time and for different bots.
            Can't be used to download or reuse the file.
        width (:obj:`int`): Sticker width.
        height (:obj:`int`): Sticker height.
        is_animated (:obj:`bool`): :obj:`True`, if the sticker is animated.
        is_video (:obj:`bool`): :obj:`True`, if the sticker is a video sticker.

            .. versionadded:: 13.11
        type (:obj:`str`): Type of the sticker. Currently one of :attr:`REGULAR`,
            :attr:`MASK`, :attr:`CUSTOM_EMOJI`. The type of the sticker is independent from its
            format, which is determined by the fields :attr:`is_animated` and :attr:`is_video`.

            .. versionadded:: 20.0
        emoji (:obj:`str`, optional): Emoji associated with the sticker
        set_name (:obj:`str`, optional): Name of the sticker set to which the sticker belongs.
        mask_position (:class:`telegram.MaskPosition`, optional): For mask stickers, the position
            where the mask should be placed.
        file_size (:obj:`int`, optional): File size in bytes.

        premium_animation (:class:`telegram.File`, optional): For premium regular stickers,
            premium animation for the sticker.

            .. versionadded:: 20.0
        custom_emoji_id (:obj:`str`, optional): For custom emoji stickers, unique identifier of the
            custom emoji.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.PhotoSize`, optional): Sticker thumbnail in the ``.WEBP`` or
            ``.JPG`` format.

            .. versionadded:: 20.2
        needs_repainting (:obj:`bool`, optional): :obj:`True`, if the sticker must be repainted to
            a text color in messages, the color of the Telegram Premium badge in emoji status,
            white color on chat photos, or another appropriate color in other places.

            .. versionadded:: 20.2

    Attributes:
        file_id (:obj:`str`): Identifier for this file, which can be used to download
            or reuse the file.
        file_unique_id (:obj:`str`): Unique identifier for this file, which
            is supposed to be the same over time and for different bots.
            Can't be used to download or reuse the file.
        width (:obj:`int`): Sticker width.
        height (:obj:`int`): Sticker height.
        is_animated (:obj:`bool`): :obj:`True`, if the sticker is animated.
        is_video (:obj:`bool`): :obj:`True`, if the sticker is a video sticker.

            .. versionadded:: 13.11
        type (:obj:`str`): Type of the sticker. Currently one of :attr:`REGULAR`,
            :attr:`MASK`, :attr:`CUSTOM_EMOJI`. The type of the sticker is independent from its
            format, which is determined by the fields :attr:`is_animated` and :attr:`is_video`.

            .. versionadded:: 20.0
        emoji (:obj:`str`): Optional. Emoji associated with the sticker.
        set_name (:obj:`str`): Optional. Name of the sticker set to which the sticker belongs.
        mask_position (:class:`telegram.MaskPosition`): Optional. For mask stickers, the position
            where the mask should be placed.
        file_size (:obj:`int`): Optional. File size in bytes.

        premium_animation (:class:`telegram.File`): Optional. For premium regular stickers,
            premium animation for the sticker.

            .. versionadded:: 20.0
        custom_emoji_id (:obj:`str`): Optional. For custom emoji stickers, unique identifier of the
            custom emoji.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.PhotoSize`): Optional. Sticker thumbnail in the ``.WEBP`` or
            ``.JPG`` format.

            .. versionadded:: 20.2
        needs_repainting (:obj:`bool`): Optional. :obj:`True`, if the sticker must be repainted to
            a text color in messages, the color of the Telegram Premium badge in emoji status,
            white color on chat photos, or another appropriate color in other places.

            .. versionadded:: 20.2
    )Úcustom_emoji_idÚemojiÚheightÚis_animatedÚis_videoÚmask_positionÚneeds_repaintingÚpremium_animationÚset_nameÚtypeÚwidthN©Ú
api_kwargsÚfile_idÚfile_unique_idr   r   r   r   r   r   Ú	file_sizer   r   zMaskPosition | Noner   zFile | Noner   Ú	thumbnailr   r   c                óX  •— t         ‰| �  |||	||¬«       | j                  «       5  || _        || _        || _        || _        t        j                  t        j                  ||«      | _        || _        |
| _        || _        || _        || _        || _        d d d «       y # 1 sw Y   y xY w)N)r    r!   r"   r#   r   )ÚsuperÚ__init__Ú	_unfrozenr   r   r   r   r   Ú
get_memberr   ÚStickerTyper   r   r   r   r   r   r   )Úselfr    r!   r   r   r   r   r   r   r"   r   r   r   r   r#   r   r   Ú	__class__s                    €úV/var/www/html/datingFans/myenv/lib/python3.12/site-packages/telegram/_files/sticker.pyr&   zSticker.__init__”   s°   ø€ ô( 	‰ÑØØ)ØØØ!ð 	ô 	
ð �^‰^Óñ 	Bà#ˆDŒJØ%ˆDŒKØ%0ˆDÔØ"*ˆDŒMÜ!Ÿ_™_¬Y×-BÑ-BÀDÈ$ÓOˆDŒIà%*ˆDŒJØ(0ˆDŒMØ6CˆDÔØ2CˆDÔ"Ø/>ˆDÔ Ø1AˆDÔ!÷	B÷ 	Bñ 	Bús   ¦A1B Â B)ÚREGULARÚMASKÚCUSTOM_EMOJIÚdataÚbotú
Bot | NoneÚreturnc                 ój  •— | j                  |«      }t        |j                  d«      t        |«      |d<   t        |j                  d«      t        |«      |d<   t        |j                  d«      t
        |«      |d<   i }|j                  d«      �|j                  d«      |d<   t        ‰| �!  |||¬«      S )ú,See :meth:`telegram.TelegramObject.de_json`.r#   r   r   Úthumb©r0   r1   r   )	Ú_parse_datar   Úgetr	   ÚMaskPositionr   Úpopr%   Ú_de_json)Úclsr0   r1   r   r+   s       €r,   Úde_jsonzSticker.de_jsonÅ   s¬   ø€ ð �‰˜tÓ$ˆä,¨T¯X©X°kÓ-BÄIÈsÓSˆˆ[ÑÜ 0°·±¸/Ó1JÌLÐZ]Ó ^ˆˆ_ÑÜ$4°T·X±XÐ>QÓ5RÔTXÐZ]Ó$^ˆÐ Ñ!àˆ
ð �8‰8�GÓÐ(Ø"&§(¡(¨7Ó"3ˆJ�wÑä‰wÑ T¨s¸zÐÓJÐJó    )NNNNNNNN©N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__ÚstrÚintÚboolr	   r   r&   r   r)   r-   r   Ú__annotations__r.   r/   Úclassmethodr>   Ú__classcell__©r+   s   @r,   r   r   %   s�  ø… ñ^ð@€Ið. !Ø $Ø#Ø/3Ø+/Ø&*Ø&*Ø(,ð!(Bð$ '+ò%(Bàð(Bð ð(Bð ð	(Bð
 ð(Bð ð(Bð ð(Bð ð(Bð �T‰zð(Bð ˜‘:ð(Bð ˜‘*ð(Bð -ð(Bð )ð(Bð ˜t™ð(Bð ˜tÑ#ð(Bð   ™+ð!(Bð$ ˜t‘Oõ%(BðT $×/Ñ/×7Ñ7€GˆU�3‰ZÓ7Ø9Ø ×,Ñ,×1Ñ1€Dˆ%�‰*Ó1Ø6Ø(×4Ñ4×AÑA€L�%˜‘*ÓAØ>àñK˜8ð K¨,ð KÀ)ô Kó ôKr?   r   c                   ó€   ‡ — e Zd ZdZdZ	 dddœdededee   ded	edz  d
e	dz  fˆ fd„Z
edde	dddd fˆ fd„«       Zˆ xZS )Ú
StickerSetaâ  This object represents a sticker set.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`name` is equal.

    Note:
        As of v13.11 :paramref:`is_video` is a required argument and therefore the order of the
        arguments had to be changed. Use keyword arguments to make sure that the arguments are
        passed correctly.

    .. versionchanged:: 20.0
        The parameter ``contains_masks`` has been removed. Use :paramref:`sticker_type` instead.


    .. versionchanged:: 21.1
        The parameters ``is_video`` and ``is_animated`` are deprecated and now made optional. Thus,
        the order of the arguments had to be changed.

    .. versionchanged:: 20.5
       |removed_thumb_note|

    .. versionremoved:: 21.2
       Removed the deprecated arguments and attributes ``is_animated`` and ``is_video``.

    Args:
        name (:obj:`str`): Sticker set name.
        title (:obj:`str`): Sticker set title.
        stickers (Sequence[:class:`telegram.Sticker`]): List of all set stickers.

            .. versionchanged:: 20.0
                |sequenceclassargs|

        sticker_type (:obj:`str`): Type of stickers in the set, currently one of
            :attr:`telegram.Sticker.REGULAR`, :attr:`telegram.Sticker.MASK`,
            :attr:`telegram.Sticker.CUSTOM_EMOJI`.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.PhotoSize`, optional): Sticker set thumbnail in the ``.WEBP``,
            ``.TGS``, or ``.WEBM`` format.

            .. versionadded:: 20.2

    Attributes:
        name (:obj:`str`): Sticker set name.
        title (:obj:`str`): Sticker set title.
        stickers (tuple[:class:`telegram.Sticker`]): List of all set stickers.

            .. versionchanged:: 20.0
                |tupleclassattrs|

        sticker_type (:obj:`str`): Type of stickers in the set, currently one of
            :attr:`telegram.Sticker.REGULAR`, :attr:`telegram.Sticker.MASK`,
            :attr:`telegram.Sticker.CUSTOM_EMOJI`.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.PhotoSize`): Optional. Sticker set thumbnail in the ``.WEBP``,
            ``.TGS``, or ``.WEBM`` format.

            .. versionadded:: 20.2
    )ÚnameÚsticker_typeÚstickersr#   ÚtitleNr   rO   rR   rQ   rP   r#   r   c                óÂ   •— t         ‰| �  |¬«       || _        || _        t	        |«      | _        || _        || _        | j                  f| _        | j                  «        y ©Nr   )
r%   r&   rO   rR   r   rQ   rP   r#   Ú	_id_attrsÚ_freeze)r*   rO   rR   rQ   rP   r#   r   r+   s          €r,   r&   zStickerSet.__init__  sT   ø€ ô 	‰Ñ JÐÔ/ØˆŒ	ØˆŒ
Ü-?ÀÓ-IˆŒØ!-ˆÔà+4ˆŒØŸ)™)˜ˆŒà�‰�r?   r0   r1   r2   r3   c                 ó  •— | j                  |«      }t        |j                  d«      t        |«      |d<   t	        |j                  d«      t
        |«      |d<   i }dD ]  }||v sŒ|j                  |«      ||<   Œ t        ‰| �!  |||¬«      S )r5   r#   rQ   )Úcontains_masksr6   r   r   r7   )	r8   r   r9   r	   r   r   r;   r%   r<   )r=   r0   r1   r   Údeprecated_fieldr+   s        €r,   r>   zStickerSet.de_json2  s›   ø€ ð �‰˜tÓ$ˆä,¨T¯X©X°kÓ-BÄIÈsÓSˆˆ[ÑÜ+¨D¯H©H°ZÓ,@Ä'È3ÓOˆˆZÑàˆ
ð !Wò 	JÐØ 4Ò'Ø/3¯x©xÐ8HÓ/I�
Ð+Ò,ð	Jô ‰wÑ T¨s¸zÐÓJÐJr?   r@   )rA   rB   rC   rD   rE   rF   r   r   r	   r   r&   rJ   r>   rK   rL   s   @r,   rN   rN   ×   sš   ø„ ñ;ðz€Ið '+ðð '+òàðð ðð ˜7Ñ#ð	ð
 ðð ˜tÑ#ðð ˜t‘Oõð* ñK˜8ð K¨,ð KÀ,ô Kó ôKr?   rN   c                   óB  ‡ — e Zd ZU dZ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<   	 ddœd	e	d
ededededz  f
ˆ fd„Zˆ xZS )r:   a  This object describes the position on faces where a mask should be placed by default.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`point`, :attr:`x_shift`, :attr:`y_shift` and, :attr:`scale`
    are equal.

    Args:
        point (:obj:`str`): The part of the face relative to which the mask should be placed.
            One of :attr:`FOREHEAD`, :attr:`EYES`, :attr:`MOUTH`, or :attr:`CHIN`.
        x_shift (:obj:`float`): Shift by X-axis measured in widths of the mask scaled to the face
            size, from left to right. For example, choosing ``-1.0`` will place mask just to the
            left of the default mask position.
        y_shift (:obj:`float`): Shift by Y-axis measured in heights of the mask scaled to the face
            size, from top to bottom. For example, ``1.0`` will place the mask just below the
            default mask position.
        scale (:obj:`float`): Mask scaling coefficient. For example, ``2.0`` means double size.

    Attributes:
        point (:obj:`str`): The part of the face relative to which the mask should be placed.
            One of :attr:`FOREHEAD`, :attr:`EYES`, :attr:`MOUTH`, or :attr:`CHIN`.
        x_shift (:obj:`float`): Shift by X-axis measured in widths of the mask scaled to the face
            size, from left to right. For example, choosing ``-1.0`` will place mask just to the
            left of the default mask position.
        y_shift (:obj:`float`): Shift by Y-axis measured in heights of the mask scaled to the face
            size, from top to bottom. For example, ``1.0`` will place the mask just below the
            default mask position.
        scale (:obj:`float`): Mask scaling coefficient. For example, ``2.0`` means double size.

    )ÚpointÚscaleÚx_shiftÚy_shiftÚFOREHEADÚEYESÚMOUTHÚCHINNr   r[   r]   r^   r\   r   c                óä   •— t         ‰| �  |¬«       || _        || _        || _        || _        | j                  | j                  | j                  | j
                  f| _        | j                  «        y rT   )r%   r&   r[   r]   r^   r\   rU   rV   )r*   r[   r]   r^   r\   r   r+   s         €r,   r&   zMaskPosition.__init__n  sZ   ø€ ô 	‰Ñ JÐÔ/ØˆŒ
Ø%ˆŒØ%ˆŒØ!ˆŒ
àŸ*™* d§l¡l°D·L±LÀ$Ç*Á*ÐMˆŒà�‰�r?   )rA   rB   rC   rD   rE   r   r:   r_   r   rF   rI   r`   ra   rb   Úfloatr   r&   rK   rL   s   @r,   r:   r:   D  sÆ   ø… ñð< 9€Ià$×1Ñ1×:Ñ:€Hˆe�C‰jÓ:Ø;Ø ×-Ñ-×2Ñ2€Dˆ%�‰*Ó2Ø7Ø!×.Ñ.×4Ñ4€Eˆ5�‰:Ó4Ø8Ø ×-Ñ-×2Ñ2€Dˆ%�‰*Ó2Ø7ð '+òàðð ðð ð	ð
 ðð ˜t‘O÷ñ r?   r:   N)rD   Úcollections.abcr   Útypingr   r   Útelegramr   Ú"telegram._files._basethumbedmediumr   Útelegram._files.filer   Útelegram._files.photosizer	   Útelegram._telegramobjectr
   Útelegram._utilsr   Útelegram._utils.argumentparsingr   r   r   Útelegram._utils.typesr   r   r   rN   r:   © r?   r,   ú<module>rp      s`   ðñ& <å $ß 'å Ý AÝ %Ý /Ý 3Ý  ß bÑ bÝ *áÝôoKÐ ô oKôdjK�ô jKôZ;�>õ ;r?   