+
    rpÐjA3  ã                   ól  € R t ^ RIt^ RIHt ^ RIHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHtHtHt ^ RIHt ^ RIHtHt ]'       d   ^ RIH t   ! R R]4      t! ! R R]!4      t" ! R R]!4      t# ! R R]!4      t$ ! R R]!4      t% ! R R]4      t& ! R R]4      t'R# )zCThis module contains objects that represent paid media in Telegram.N)ÚSequence)ÚTYPE_CHECKINGÚFinal)Ú	constants)Ú	LivePhoto)Ú	PhotoSize)ÚVideo)ÚTelegramObject)ÚUser)Úenum)Úde_json_optionalÚde_list_optionalÚparse_sequence_argÚto_timedelta)Úget_timedelta_value)ÚJSONDictÚ
TimePeriod)ÚBotc                   ó8  a a€ ] tR t^-t oRtR
t]P                  P                  t ]P                  P                  t	 ]P                  P                  t
 ]P                  P                  t RR/V3R lV 3R lllt]RV3R lV 3R lll4       tV3R ltR	tVtV ;t# )Ú	PaidMediaaÌ  Describes the paid media added to a message. Currently, it can be one of:

* :class:`telegram.PaidMediaPreview`
* :class:`telegram.PaidMediaPhoto`
* :class:`telegram.PaidMediaVideo`

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

.. versionadded:: 21.4

Args:
    type (:obj:`str`): Type of the paid media.

Attributes:
    type (:obj:`str`): Type of the paid media.
Ú
api_kwargsNc                ó8   <€ V ^8„  d   QhRS[ RS[R,          RR/# )é   Útyper   NÚreturn©Ústrr   )ÚformatÚ__classdict__s   "€ÚE/opt/hermes/.venv/lib/python3.14/site-packages/telegram/_paidmedia.pyÚ__annotate__ÚPaidMedia.__annotate__K   s-   ø€ ÷ 
ñ 
áð
ñ ˜t•Oð	
ð
 
ñ
ó    c               óÀ   <€ \         SV `  VR 7       \        P                  ! \        P
                  W4      V n        V P                  3V n        V P                  4        R# ©)r   N)	ÚsuperÚ__init__r   Ú
get_memberr   ÚPaidMediaTyper   Ú	_id_attrsÚ_freeze)Úselfr   r   Ú	__class__s   &&$€r   r&   ÚPaidMedia.__init__K   sC   ø€ ô 	‰Ñ JÐÔ/ÜŸš¬×)@Ñ)@À$ÓMˆŒ	àŸ)™)˜ˆŒØ�‰Žr"   c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   ÚdataÚbotú
Bot | Noner   r   ©r   )r   r   s   "€r   r    r!   X   s"   ø€ ÷ 3ñ 3™8ð 3¨,ð 3À+ñ 3r"   c                óÐ  <€ V P                  V4      pV P                  \        V P                  \        V P
                  \        V P                  \        /pV \        J d>   VP                  R4      V9   d(   W1P                  R4      ,          P                  WR7      # RV9   d6   VP                  R4      ;p'       d   \        P                  ! VR7      MRVR&   \        SV `1  WR7      # )a   Converts JSON data to the appropriate :class:`PaidMedia` object, i.e. takes
care of selecting the correct subclass.

Args:
    data (dict[:obj:`str`, ...]): The JSON data.
    bot (:class:`telegram.Bot`, optional): The bot associated with this object.

Returns:
    The Telegram object.

r   ©r/   r0   Úduration)ÚsecondsN)Ú_parse_dataÚPREVIEWÚPaidMediaPreviewÚPHOTOÚPaidMediaPhotoÚVIDEOÚPaidMediaVideoÚ
LIVE_PHOTOÚPaidMediaLivePhotor   ÚgetÚpopÚde_jsonÚdtmÚ	timedeltar%   )Úclsr/   r0   Ú_class_mappingÚsr,   s   &&&  €r   rB   ÚPaidMedia.de_jsonW   s¾   ø€ ð �‰˜tÓ$ˆð �K‰KÔ)Ø�I‰I”~Ø�I‰I”~Ø�N‰NÔ.ð	6
ˆð ”)Ó §¡¨Ó 0°NÔ BØ!§(¡(¨6Ó"2Õ3×;Ñ;ÀÐ;ÓOÐOà˜ÔØAEÇÁÈ*ÓAUÐ<U¸AÖ<UœsŸ}š}°QÕ7Ð\`ˆD�Ñä‰w‰ DˆÓ2Ð2r"   c                óŠ   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r8   r:   r<   r>   )r   r   )r   r   s   "€r   r    r!   -   sI   ø‡ ‚ ñ* ‘3�ZÑ9ñ+ ñ. ‘�:Ñ5ñ/ ñ2 ‘�:Ñ5ñ3 ñ6 ‘c•
Ñ?ò7 r"   )r)   r   )r   ©N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r(   r8   r:   r<   r>   r&   ÚclassmethodrB   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__Ú__classcell__©r,   r   s   @@r   r   r   -   s–   ù‡ € ñð$ €Ià#×1Ñ1×9Ñ9€GØ;Ø!×/Ñ/×5Ñ5€EØ9Ø!×/Ñ/×5Ñ5€EØ9Ø&×4Ñ4×?Ñ?€JØ>ð
ð '+÷	
õ 
ð ÷3ô 3ó ð3÷W … r"   r   c                   ón   a a€ ] tR t^vt oRtR	tR
RR/V3R lV 3R llllt]V3R lR l4       tRt	Vt
V ;t# )r9   aW  The paid media isn't available before the payment.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`width`, :attr:`height`, and :attr:`duration`
are equal.

.. versionadded:: 21.4

.. versionchanged:: v22.2
   As part of the migration to representing time periods using ``datetime.timedelta``,
   equality comparison now considers integer durations and equivalent timedeltas as equal.

Args:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PREVIEW`.
    width (:obj:`int`, optional): Media width as defined by the sender.
    height (:obj:`int`, optional): Media height as defined by the sender.
    duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of the media in
        seconds as defined by the sender.

        .. versionchanged:: v22.2
            |time-period-input|

Attributes:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PREVIEW`.
    width (:obj:`int`): Optional. Media width as defined by the sender.
    height (:obj:`int`): Optional. Media height as defined by the sender.
    duration (:obj:`int` | :class:`datetime.timedelta`): Optional. Duration of the media in
        seconds as defined by the sender.

        .. deprecated:: v22.2
            |time-period-int-deprecated|
Nr   c          
      ón   <€ V ^8„  d   QhRS[ R,          RS[ R,          RS[R,          RS[R,          RR/# )r   ÚwidthNÚheightr5   r   r   )Úintr   r   )r   r   s   "€r   r    ÚPaidMediaPreview.__annotate__š   sU   ø€ ÷ Rñ Rá�T�zðRñ �d•
ðRñ ˜tÕ#ð	Rñ ˜t•OðRð 
ñRr"   c               óN  <€ \         SV `  \        P                  VR 7       V P	                  4       ;_uu_ 4        Wn        W n        \        V4      V n        V P                  V P
                  V P                  V P                  3V n
        RRR4       R#   + '       g   i     R# ; i©)r   r   N)r%   r&   r   r8   Ú	_unfrozenrY   rZ   r   Ú	_durationr   r)   )r+   rY   rZ   r5   r   r,   s   &&&&$€r   r&   ÚPaidMediaPreview.__init__š   so   ø€ ô 	‰Ñœi×/Ñ/¸JÐÔGà�^‰^×ÕØ%*ŒJØ&,ŒKÜ3?ÀÓ3IˆDŒNà"Ÿi™i¨¯©°T·[±[À$Ç.Á.ÐQˆDŒN÷ ××Òús   ¹ABÂB$	c                óR   <€ V ^8„  d   QhRS[ S[P                  ,          R,          /# )r   r   N)r[   rC   rD   )r   r   s   "€r   r    r\   ¬   s%   ø€ ÷ Iñ I™#¡§¡Õ-°Õ4ñ Ir"   c                ó0   € \        V P                  R R7      # )r5   )Ú	attribute)r   r`   )r+   s   &r   r5   ÚPaidMediaPreview.duration«   s   € ä" 4§>¡>¸ZÔHÐHr"   )r`   r)   rZ   rY   )r`   rZ   rY   )NNN)rK   rL   rM   rN   rO   rP   r&   Úpropertyr5   rS   rT   rU   rV   s   @@r   r9   r9   v   sE   ù‡ € ñðB 1€IñRð '+÷Rö Rð" ÷Ió ÷Ið Ir"   r9   c                   ót   a a€ ] tR t^°t oRtR	tRR/V3R lV 3R lllt]R
V3R lV 3R lll4       tRt	Vt
V ;t# )r;   a  
The paid media is a photo.

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

.. versionadded:: 21.4

Args:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PHOTO`.
    photo (Sequence[:class:`telegram.PhotoSize`]): The photo.

Attributes:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PHOTO`.
    photo (tuple[:class:`telegram.PhotoSize`]): The photo.
r   Nc                óF   <€ V ^8„  d   QhRS[ R,          RS[R,          RR/# )r   Úphotor   r   Nr   )r   r   )r   r   s   "€r   r    ÚPaidMediaPhoto.__annotate__Ä   s2   ø€ ÷ 5ñ 5á˜Õ$ð5ñ ˜t•Oð	5ð
 
ñ5r"   c               ó
  <€ \         SV `  \        P                  VR 7       V P	                  4       ;_uu_ 4        \        V4      V n        V P                  V P                  3V n        RRR4       R#   + '       g   i     R# ; ir^   )	r%   r&   r   r:   r_   r   ri   r   r)   )r+   ri   r   r,   s   &&$€r   r&   ÚPaidMediaPhoto.__init__Ä   sW   ø€ ô 	‰ÑœiŸo™o¸*ÐÔEà�^‰^×ÕÜ0BÀ5Ó0IˆDŒJà"Ÿi™i¨¯©Ð4ˆDŒN÷ ××Òús   ¹.A1Á1B	c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r/   r0   r1   r   r;   r2   )r   r   s   "€r   r    rj   Ò   ó#   ø€ ÷ 3ñ 3™8ð 3¨,ð 3ÐBRñ 3r"   c                óŒ   <€ V P                  V4      p\        VP                  R 4      \        V4      VR &   \        SV `  WR7      # )ri   r4   )r7   r   r@   r   r%   rB   ©rE   r/   r0   r,   s   &&&€r   rB   ÚPaidMediaPhoto.de_jsonÑ   s=   ø€ à�‰˜tÓ$ˆä(¨¯©°'Ó):¼IÀsÓKˆˆW‰Ü‰w‰ DˆÓ2Ð2r"   )r)   ri   )ri   rJ   ©rK   rL   rM   rN   rO   rP   r&   rQ   rB   rS   rT   rU   rV   s   @@r   r;   r;   °   óC   ù‡ € ñð" €Ið5ð '+÷	5õ 5ð ÷3ô 3ó ÷3ð 3r"   r;   c                   ót   a a€ ] tR t^Ùt oRtR	tRR/V3R lV 3R lllt]R
V3R lV 3R lll4       tRt	Vt
V ;t# )r=   aî  
The paid media is a video.

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

.. versionadded:: 21.4

Args:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`.
    video (:class:`telegram.Video`): The video.

Attributes:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`.
    video (:class:`telegram.Video`): The video.
r   Nc                ó8   <€ V ^8„  d   QhRS[ RS[R,          RR/# )r   Úvideor   Nr   )r   r   )r   r   s   "€r   r    ÚPaidMediaVideo.__annotate__í   s-   ø€ ÷ 5ñ 5áð5ñ ˜t•Oð	5ð
 
ñ5r"   c               óö   <€ \         SV `  \        P                  VR 7       V P	                  4       ;_uu_ 4        Wn        V P                  V P
                  3V n        RRR4       R#   + '       g   i     R# ; ir^   )r%   r&   r   r<   r_   rv   r   r)   )r+   rv   r   r,   s   &&$€r   r&   ÚPaidMediaVideo.__init__í   sP   ø€ ô 	‰ÑœiŸo™o¸*ÐÔEà�^‰^×ÕØ %ŒJà"Ÿi™i¨¯©Ð4ˆDŒN÷ ××Òúó   ¹$A'Á'A8	c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r/   r0   r1   r   r=   r2   )r   r   s   "€r   r    rw   û   rn   r"   c                óŒ   <€ V P                  V4      p\        VP                  R 4      \        V4      VR &   \        SV `  WR7      # )rv   r4   )r7   r   r@   r   r%   rB   rp   s   &&&€r   rB   ÚPaidMediaVideo.de_jsonú   s=   ø€ à�‰˜tÓ$ˆä(¨¯©°'Ó):¼EÀ3ÓGˆˆW‰Ü‰w‰ DˆÓ2Ð2r"   )r)   rv   )rv   rJ   rr   rV   s   @@r   r=   r=   Ù   rs   r"   r=   c                   ót   a a€ ] tR tRt oRtR
tRR/V3R lV 3R lllt]RV3R lV 3R lll4       tR	t	Vt
V ;t# )r?   i  a  
The paid media is a live photo.

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

.. versionadded:: 22.8

Args:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.LIVE_PHOTO`
    live_photo (:class:`telegram.LivePhoto`): The photo.

Attributes:
    type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.LIVE_PHOTO`
    live_photo (:class:`telegram.LivePhoto`): The photo.

r   Nc                ó8   <€ V ^8„  d   QhRS[ RS[R,          RR/# )r   Ú
live_photor   Nr   )r   r   )r   r   s   "€r   r    ÚPaidMediaLivePhoto.__annotate__  s-   ø€ ÷ 
:ñ 
:áð
:ñ ˜t•Oð	
:ð
 
ñ
:r"   c               óö   <€ \         SV `  \        P                  VR 7       V P	                  4       ;_uu_ 4        Wn        V P                  V P
                  3V n        RRR4       R#   + '       g   i     R# ; ir^   )r%   r&   r   r>   r_   r€   r   r)   )r+   r€   r   r,   s   &&$€r   r&   ÚPaidMediaLivePhoto.__init__  sR   ø€ ô 	‰Ñœi×2Ñ2¸zÐÔJà�^‰^×ÕØ)3ŒOØ"Ÿi™i¨¯©Ð9ˆDŒN÷ ××Òúrz   c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r/   r0   r1   r   r?   r2   )r   r   s   "€r   r    r�   $  ó#   ø€ ÷ 3ñ 3™8ð 3¨,ð 3ÐBVñ 3r"   c                óŒ   <€ V P                  V4      p\        VP                  R 4      \        V4      VR &   \        SV `  WR7      # )r€   r4   )r7   r   r@   r   r%   rB   rp   s   &&&€r   rB   ÚPaidMediaLivePhoto.de_json#  ó?   ø€ à�‰˜tÓ$ˆä-¨d¯h©h°|Ó.DÄiÐQTÓUˆˆ\ÑÜ‰w‰ DˆÓ2Ð2r"   )r)   r€   )r€   rJ   rr   rV   s   @@r   r?   r?     sC   ù‡ € ñð$  €Ið
:ð '+÷	
:õ 
:ð ÷3ô 3ó ÷3ð 3r"   r?   c                   ót   a a€ ] tR tRt oRtR
tRR/V3R lV 3R lllt]RV3R lV 3R lll4       tR	t	Vt
V ;t# )ÚPaidMediaInfoi+  a•  
Describes the paid media added to a message.

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

.. versionadded:: 21.4

Args:
    star_count (:obj:`int`): The number of Telegram Stars that must be paid to buy access to
        the media.
    paid_media (Sequence[:class:`telegram.PaidMedia`]): Information about the paid media.

Attributes:
    star_count (:obj:`int`): The number of Telegram Stars that must be paid to buy access to
        the media.
    paid_media (tuple[:class:`telegram.PaidMedia`]): Information about the paid media.
r   Nc                óN   <€ V ^8„  d   QhRS[ RS[S[,          RS[R,          RR/# )r   Ú
star_countÚ
paid_mediar   Nr   )r[   r   r   r   )r   r   s   "€r   r    ÚPaidMediaInfo.__annotate__A  s<   ø€ ÷ ñ áðñ ™YÕ'ðñ
 ˜t•Oðð 
ñr"   c               ó®   <€ \         SV `  VR 7       Wn        \        V4      V n        V P                  V P                  3V n        V P                  4        R# r$   )r%   r&   rŒ   r   r�   r)   r*   )r+   rŒ   r�   r   r,   s   &&&$€r   r&   ÚPaidMediaInfo.__init__A  sC   ø€ ô 	‰Ñ JÐÔ/Ø)ŒÜ1CÀJÓ1OˆŒàŸ/™/¨4¯?©?Ð;ˆŒØ�‰Žr"   c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r/   r0   r1   r   rŠ   r2   )r   r   s   "€r   r    rŽ   P  s"   ø€ ÷ 3ñ 3™8ð 3¨,ð 3À/ñ 3r"   c                óŒ   <€ V P                  V4      p\        VP                  R 4      \        V4      VR &   \        SV `  WR7      # )r�   r4   )r7   r   r@   r   r%   rB   rp   s   &&&€r   rB   ÚPaidMediaInfo.de_jsonO  rˆ   r"   )r)   r�   rŒ   )r�   rŒ   rJ   rr   rV   s   @@r   rŠ   rŠ   +  sC   ù‡ € ñð& -€Iðð
 '+÷õ ð ÷3ô 3ó ÷3ð 3r"   rŠ   c                   ót   a a€ ] tR tRt oRtR
tRR/V3R lV 3R lllt]RV3R lV 3R lll4       tR	t	Vt
V ;t# )ÚPaidMediaPurchasediW  a‘  This object contains information about a paid media purchase.

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

Note:
    In Python :keyword:`from` is a reserved word. Use :paramref:`from_user` instead.

.. versionadded:: 21.6

Args:
    from_user (:class:`telegram.User`): User who purchased the media.
    paid_media_payload (:obj:`str`): Bot-specified paid media payload.

Attributes:
    from_user (:class:`telegram.User`): User who purchased the media.
    paid_media_payload (:obj:`str`): Bot-specified paid media payload.
r   Nc                ó<   <€ V ^8„  d   QhRRRS[ RS[R,          RR/# )r   Ú	from_userr
   Úpaid_media_payloadr   Nr   r   )r   r   s   "€r   r    ÚPaidMediaPurchased.__annotate__m  s7   ø€ ÷ ñ àðñ  ðñ
 ˜t•Oðð 
ñr"   c               óš   <€ \         SV `  VR 7       Wn        W n        V P                  V P                  3V n        V P                  4        R# r$   )r%   r&   r—   r˜   r)   r*   )r+   r—   r˜   r   r,   s   &&&$€r   r&   ÚPaidMediaPurchased.__init__m  s?   ø€ ô 	‰Ñ JÐÔ/Ø(ŒØ'9ÔàŸ.™.¨$×*AÑ*AÐBˆŒØ�‰Žr"   c                ó(   <€ V ^8„  d   QhRS[ RRRR/# )r   r/   r0   r1   r   r•   r2   )r   r   s   "€r   r    r™   |  r…   r"   c                óš   <€ V P                  V4      p\        P                  ! VP                  R 4      VR7      VR&   \        SV `	  WR7      # )Úfromr4   r—   )r7   r
   rB   rA   r%   rp   s   &&&€r   rB   ÚPaidMediaPurchased.de_json{  s@   ø€ à�‰˜tÓ$ˆä ŸLšL¨d¯h©h°vÓ.>ÀCÔHˆˆ[ÑÜ‰w‰ DˆÓ2Ð2r"   )r)   r—   r˜   )r—   r˜   rJ   rr   rV   s   @@r   r•   r•   W  sC   ù‡ € ñð& 4€Iðð
 '+÷õ ð ÷3ô 3ó ÷3ð 3r"   r•   )(rO   ÚdatetimerC   Úcollections.abcr   Útypingr   r   Útelegramr   Útelegram._files.livephotor   Útelegram._files.photosizer   Útelegram._files.videor   Útelegram._telegramobjectr	   Útelegram._userr
   Útelegram._utilsr   Útelegram._utils.argumentparsingr   r   r   r   Útelegram._utils.datetimer   Útelegram._utils.typesr   r   r   r   r9   r;   r=   r?   rŠ   r•   © r"   r   Ú<module>r®      sŸ   ðñ& Jã Ý $ß 'å Ý /Ý /Ý 'Ý 3Ý Ý  ÷ó õ 9ß 6çÝôF3�ô F3ôR7I�yô 7Iôt&3�Yô &3ôR&3�Yô &3ôR&3˜ô &3ôR)3�Nô )3ôX)3˜ö )3r"   