§
    «eîi‘  ã                   ó2  — U d Z ddlZddlmZ ddl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 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 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, eez  ez  ez  ez  Z-ee.d<    G d„ de¦  «        Z/ G d„ de¦  «        Z0 G d„ de0¦  «        Z1 G d„ de0¦  «        Z2 G d„ d e/¦  «        Z3 G d!„ d"e/¦  «        Z4 G d#„ d$e/¦  «        Z5 G d%„ d&e/¦  «        Z6 G d'„ d(e/¦  «        Z7dS ))z+Base class for Telegram InputMedia Objects.é    N)ÚSequence)ÚTYPE_CHECKINGÚFinalÚ	TypeAlias)Ú	constants)Ú	Animation)ÚAudio)ÚDocument)Ú	InputFile)Ú	PhotoSize)ÚVideo)ÚMessageEntity)ÚTelegramObject)Úenum)Úparse_sequence_argÚto_timedelta)Úget_timedelta_value)ÚDEFAULT_NONE©Úparse_file_input)ÚJSONDictÚODVInputÚ
TimePeriod)ÚInputMediaType)Ú	FileInputÚ	MediaTypec                   óª   ‡ — e Zd ZdZdZddefddœdedeez  dedz  dee	         dz  d	e
e         d
edz  fˆ fd„Zedddeez  dz  fd„¦   «         Zˆ xZS )Ú
InputMediaaø  
    Base class for Telegram InputMedia Objects.

    .. versionchanged:: 20.0
        Added arguments and attributes :attr:`type`, :attr:`media`, :attr:`caption`,
            :attr:`caption_entities`, :paramref:`parse_mode`.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    Args:
        media_type (:obj:`str`): Type of media that the instance represents.
        media (:obj:`str` | :class:`~telegram.InputFile`): File to send.
            |fileinputnopath|
        caption (:obj:`str`, optional): Caption of the media to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
            parsing.
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|

        parse_mode (:obj:`str`, optional): |parse_mode|

    Attributes:
        type (:obj:`str`): Type of the input media.
        media (:obj:`str` | :class:`telegram.InputFile`): Media to send.
        caption (:obj:`str`): Optional. Caption of the media to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
            parsing.
        parse_mode (:obj:`str`): Optional. |parse_mode|
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|

    )ÚcaptionÚcaption_entitiesÚmediaÚ
parse_modeÚtypeN©Ú
api_kwargsÚ
media_typer!   r   r    r"   r%   c                ó  •— t          ¦   «                              |¬¦  «         t          j        t          j        ||¦  «        | _        || _        || _        t          |¦  «        | _
        || _        |                      ¦   «          d S ©Nr$   )ÚsuperÚ__init__r   Ú
get_memberr   r   r#   r!   r   r   r    r"   Ú_freeze)Úselfr&   r!   r   r    r"   r%   Ú	__class__s          €ú^/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/_files/inputmedia.pyr*   zInputMedia.__init__Z   so   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ýœ­Ô)AÀ:ÈzÑZÔZˆŒ	Ø&+ˆŒ
Ø#*ˆŒÝ;MÐN^Ñ;_Ô;_ˆÔØ)3ˆŒà�Š‰Œˆˆˆó    Ú	thumbnailúFileInput | NoneÚreturnc                 ó.   — | �t          | dd¬¦  «        n| S )NT©ÚattachÚ
local_moder   )r1   s    r/   Ú_parse_thumbnail_inputz!InputMedia._parse_thumbnail_inputm   s)   € ð Ð$õ ˜Y¨tÀÐEÑEÔEÐEàð	
r0   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Ústrr   r   r   r   r   r*   Ústaticmethodr8   Ú__classcell__©r.   s   @r/   r   r   0   sü   ø€ € € € € ð%ð %ðN O€Ið #Ø;?Ø$0ðð '+ðð ð àðð �Y‰ðð �t‘ð	ð
 # =Ô1°DÑ8ðð ˜S”Mðð ˜t‘Oðð ð ð ð ð ð& ð
Ð*<ð 
ÀÀyÁÐSWÑAWð 
ð 
ð 
ñ „\ð
ð 
ð 
ð 
ð 
r0   r   c                   ó¨   ‡ — e Zd ZU dZej        j        Zee         e	d<   	 ej        j
        Z
ee         e	d<   	 dZddœdedeez  d	edz  fˆ fd
„Zˆ xZS )ÚInputPaidMediaah  
    Base class for Telegram InputPaidMedia Objects. Currently, it can be one of:

    * :class:`telegram.InputPaidMediaPhoto`
    * :class:`telegram.InputPaidMediaVideo`

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    .. versionadded:: 21.4

    Args:
        type (:obj:`str`): Type of media that the instance represents.
        media (:obj:`str` | :class:`~telegram.InputFile`): File
            to send. |fileinputnopath|

    Attributes:
        type (:obj:`str`): Type of the input media.
        media (:obj:`str` | :class:`telegram.InputFile`): Media to send.
    ÚPHOTOÚVIDEO)r!   r#   Nr$   r#   r!   r%   c                óÌ   •— t          ¦   «                              |¬¦  «         t          j        t          j        ||¦  «        | _        || _        |                      ¦   «          d S r(   )	r)   r*   r   r+   r   ÚInputPaidMediaTyper#   r!   r,   )r-   r#   r!   r%   r.   s       €r/   r*   zInputPaidMedia.__init__”   sP   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ýœ­Ô)EÀtÈTÑRÔRˆŒ	Ø&+ˆŒ
à�Š‰Œˆˆˆr0   )r9   r:   r;   r<   r   rG   rD   r   r>   Ú__annotations__rE   r=   r   r   r*   r@   rA   s   @r/   rC   rC   x   s½   ø€ € € € € € ðð ð( "Ô4Ô:€Eˆ5�Œ:Ð:Ð:Ñ:Ø>Ø!Ô4Ô:€Eˆ5�Œ:Ð:Ð:Ñ:Ø>à!€Ið '+ðð ð àðð �Y‰ðð
 ˜t‘Oðð ð ð ð ð ð ð ð ð r0   rC   c                   ó<   ‡ — e Zd ZdZdZddœdddedz  fˆ fd„Zˆ xZS )	ÚInputPaidMediaPhotoa’  The paid media to send is a photo.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    .. versionadded:: 21.4

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.PhotoSize`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.PhotoSize` object to send.

    Attributes:
        type (:obj:`str`): Type of the media, always
            :tg-const:`telegram.constants.InputPaidMediaType.PHOTO`.
        media (:obj:`str` | :class:`telegram.InputFile`): Photo to send.
    © Nr$   r!   úFileInput | PhotoSizer%   c                ó¼   •— t          |t          dd¬¦  «        }t          ¦   «                              t          j        ||¬¦  «         |                      ¦   «          d S ©NTr5   )r#   r!   r%   )r   r   r)   r*   rC   rD   r,   )r-   r!   r%   r.   s      €r/   r*   zInputPaidMediaPhoto.__init__¶   sN   ø€ õ ! ­	¸$È4ÐPÑPÔPˆÝ‰Œ×Ò�nÔ2¸%ÈJÐÑWÔWÐWØ�Š‰Œˆˆˆr0   )r9   r:   r;   r<   r=   r   r*   r@   rA   s   @r/   rJ   rJ   ¢   ss   ø€ € € € € ðð ð" €Ið '+ð	ð ð à&ðð ˜t‘Oð	ð ð ð ð ð ð ð ð ð r0   rJ   c                   ó¸   ‡ — e Zd ZdZdZ	 	 	 	 	 	 	 dddœddddd	edz  d
edz  dedz  dedz  dddedz  dedz  fˆ fd„Z	e
deej        z  dz  fd„¦   «         Zˆ xZS )ÚInputPaidMediaVideoa×
  
    The paid media to send is a video.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    .. versionadded:: 21.4

    Note:
        *  When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the
           width, height and duration from that video, unless otherwise specified with the optional
           arguments.
        *  :paramref:`thumbnail` will be ignored for small video files, for which Telegram can
           easily generate thumbnails. However, this behaviour is undocumented and might be
           changed by Telegram.

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Video`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.Video` object to send.
        thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|
        cover (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): Cover for the video in the message. |fileinputnopath|

            .. versionchanged:: 21.11
        start_timestamp (:obj:`int`, optional): Start timestamp for the video in the message

            .. versionchanged:: 21.11
        width (:obj:`int`, optional): Video width.
        height (:obj:`int`, optional): Video height.
        duration (:obj:`int` | :class:`datetime.timedelta`, optional): Video duration in seconds.

            .. versionchanged:: v22.2
                |time-period-input|
        supports_streaming (:obj:`bool`, optional): Pass :obj:`True`, if the uploaded video is
            suitable for streaming.

    Attributes:
        type (:obj:`str`): Type of the media, always
            :tg-const:`telegram.constants.InputPaidMediaType.VIDEO`.
        media (:obj:`str` | :class:`telegram.InputFile`): Video to send.
        thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|
        cover (:class:`telegram.InputFile`): Optional. Cover for the video in the message.
            |fileinputnopath|

            .. versionchanged:: 21.11
        start_timestamp (:obj:`int`): Optional. Start timestamp for the video in the message

            .. versionchanged:: 21.11
        width (:obj:`int`): Optional. Video width.
        height (:obj:`int`): Optional. Video height.
        duration (:obj:`int` | :class:`datetime.timedelta`): Optional. Video duration in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|
        supports_streaming (:obj:`bool`): Optional. :obj:`True`, if the uploaded video is
            suitable for streaming.
    )Ú	_durationÚcoverÚheightÚstart_timestampÚsupports_streamingr1   ÚwidthNr$   r!   úFileInput | Videor1   r2   rV   rS   ÚdurationrU   rR   rT   r%   c	                ó2  •— t          |t          ¦  «        r)|�|n|j        }|�|n|j        }|�|n|j        }|j        }nt          |dd¬¦  «        }t          ¦   «                              t          j
        ||	¬¦  «         |                      ¦   «         5  t                               |¦  «        | _        || _        || _        t          |¦  «        | _        || _        |rt          |dd¬¦  «        nd | _        || _        d d d ¦  «         d S # 1 swxY w Y   d S rN   )Ú
isinstancer   rV   rS   rQ   Úfile_idr   r)   r*   rC   rE   Ú	_unfrozenr   r8   r1   r   rU   rR   rT   )r-   r!   r1   rV   rS   rX   rU   rR   rT   r%   r.   s             €r/   r*   zInputPaidMediaVideo.__init__  sg  ø€ õ �e�UÑ#Ô#ð 	JØ"Ð.�E�E°E´KˆEØ%Ð1�V�V°u´|ˆFØ#+Ð#7�x�x¸U¼_ˆHØ”MˆEˆEõ % U°4ÀDÐIÑIÔIˆEå‰Œ×Ò�nÔ2¸%ÈJÐÑWÔWÐWØ�^Š^ÑÔð 		?ð 		?Ý5?×5VÒ5VÐW`Ñ5aÔ5aˆDŒNØ%*ˆDŒJØ&,ˆDŒKÝ3?ÀÑ3IÔ3IˆDŒNØ3EˆDÔ#àINÐXÕ  ¨tÀÐEÑEÔEÐEÐTXð ŒJð 0?ˆDÔ ð		?ð 		?ð 		?ñ 		?ô 		?ð 		?ð 		?ð 		?ð 		?ð 		?ð 		?ð 		?øøøð 		?ð 		?ð 		?ð 		?ð 		?ð 		?s   ÂA+DÄDÄDr3   c                 ó.   — t          | j        d¬¦  «        S ©NrX   )Ú	attribute©r   rQ   ©r-   s    r/   rX   zInputPaidMediaVideo.duration*  ó   € å" 4¤>¸ZÐHÑHÔHÐHr0   )NNNNNNN)r9   r:   r;   r<   r=   Úintr   Úboolr   r*   ÚpropertyÚdtmÚ	timedeltarX   r@   rA   s   @r/   rP   rP   Á   s(  ø€ € € € € ð9ð 9ðv€Ið )-Ø Ø!Ø&*Ø*.Ø$(Ø&*ð!?ð '+ð!?ð !?ð !?à"ð!?ð &ð!?ð �T‰zð	!?ð
 �d‘
ð!?ð ˜tÑ#ð!?ð ! 4™Kð!?ð "ð!?ð ˜t™ð!?ð ˜t‘Oð!?ð !?ð !?ð !?ð !?ð !?ðF ðI˜# ¤Ñ-°Ñ4ð Ið Ið Iñ „XðIð Ið Ið Ið Ir0   rP   c                   óô   ‡ — e Zd ZdZdZdeddddddddf
ddœdddedz  dee         d	edz  d
edz  de	dz  de
e         dz  dedz  dedz  dddedz  dedz  fˆ fd„Zedeej        z  dz  fd„¦   «         Zˆ xZS )ÚInputMediaAnimationaO  Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

    Note:
        When using a :class:`telegram.Animation` for the :attr:`media` attribute, it will take the
        width, height and duration from that animation, unless otherwise specified with the
        optional arguments.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    .. versionchanged:: 20.5
      |removed_thumb_note|

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Animation`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.Animation` object to send.

            .. versionchanged:: 13.2
               Accept :obj:`bytes` as input.
        filename (:obj:`str`, optional): Custom file name for the animation, when uploading a
            new file. Convenience parameter, useful e.g. when sending files generated by the
            :obj:`tempfile` module.

            .. versionadded:: 13.1
        caption (:obj:`str`, optional): Caption of the animation to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`, optional): |parse_mode|
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|

        width (:obj:`int`, optional): Animation width.
        height (:obj:`int`, optional): Animation height.
        duration (:obj:`int` | :class:`datetime.timedelta`, optional): Animation duration
            in seconds.

            .. versionchanged:: v22.2
                |time-period-input|
        has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the animation needs to be covered
            with a spoiler animation.

            .. versionadded:: 20.0
        thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

            .. versionadded:: 20.2
        show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

            .. versionadded:: 21.3

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.ANIMATION`.
        media (:obj:`str` | :class:`telegram.InputFile`): Animation to send.
        caption (:obj:`str`): Optional. Caption of the animation to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|
        width (:obj:`int`): Optional. Animation width.
        height (:obj:`int`): Optional. Animation height.
        duration (:obj:`int` | :class:`datetime.timedelta`): Optional. Animation duration
            in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|
        has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the animation is covered with a
            spoiler animation.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

            .. versionadded:: 20.2
        show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

            .. versionadded:: 21.3
    )rQ   Úhas_spoilerrS   Úshow_caption_above_mediar1   rV   Nr$   r!   zFileInput | Animationr   r"   rV   rS   rX   r    Úfilenamerj   r1   r2   rk   r%   c                óú  •— t          |t          ¦  «        r)|€|j        n|}|€|j        n|}|�|n|j        }|j        }nt          ||dd¬¦  «        }t          ¦   «                              t          j
        |||||¬¦  «         |                      ¦   «         5  |                      |
¦  «        | _        || _        || _        t          |¦  «        | _        |	| _        || _        d d d ¦  «         d S # 1 swxY w Y   d S ©NT©rl   r6   r7   r$   )rZ   r   rV   rS   rQ   r[   r   r)   r*   r   Ú	ANIMATIONr\   r8   r1   r   rj   rk   )r-   r!   r   r"   rV   rS   rX   r    rl   rj   r1   rk   r%   r.   s                €r/   r*   zInputMediaAnimation.__init__�  sk  ø€ õ  �e�YÑ'Ô'ð 	]Ø#( =�E”K�K°eˆEØ%+ ^�U”\�\¸ˆFØ#+Ð#7�x�x¸U¼_ˆHØ”MˆEˆEõ % U°XÀdÐW[Ð\Ñ\Ô\ˆEå‰Œ×ÒÝÔ$ØØØØØ!ð 	ñ 	
ô 	
ð 	
ð �^Š^ÑÔð 	Rð 	RØ59×5PÒ5PÐQZÑ5[Ô5[ˆDŒNØ%*ˆDŒJØ&,ˆDŒKÝ3?ÀÑ3IÔ3IˆDŒNØ,7ˆDÔØ9QˆDÔ)ð	Rð 	Rð 	Rñ 	Rô 	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Røøøð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rs   ÂAC0Ã0C4Ã7C4r3   c                 ó.   — t          | j        d¬¦  «        S r^   r`   ra   s    r/   rX   zInputMediaAnimation.duration·  rb   r0   )r9   r:   r;   r<   r=   r   r>   r   rc   r   r   r   rd   r   r*   re   rf   rg   rX   r@   rA   s   @r/   ri   ri   /  s|  ø€ € € € € ðRð Rðh€Ið #Ø$0Ø Ø!Ø&*Ø;?Ø#Ø#'Ø(,Ø04ð(Rð '+ð(Rð (Rð (Rà&ð(Rð �t‘ð(Rð ˜S”Mð	(Rð
 �T‰zð(Rð �d‘
ð(Rð ˜tÑ#ð(Rð # =Ô1°DÑ8ð(Rð ˜‘*ð(Rð ˜D‘[ð(Rð &ð(Rð #'¨¡+ð(Rð ˜t‘Oð(Rð (Rð (Rð (Rð (Rð (RðT ðI˜# ¤Ñ-°Ñ4ð Ið Ið Iñ „XðIð Ið Ið Ið Ir0   ri   c                   ó˜   ‡ — e Zd ZdZdZdeddddfddœdddedz  dee         d	ee	         dz  d
edz  de
dz  de
dz  dedz  fˆ fd„Zˆ xZS )ÚInputMediaPhotoa9	  Represents a photo to be sent.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.PhotoSize`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.PhotoSize` object to send.

            .. versionchanged:: 13.2
               Accept :obj:`bytes` as input.
        filename (:obj:`str`, optional): Custom file name for the photo, when uploading a
            new file. Convenience parameter, useful e.g. when sending files generated by the
            :obj:`tempfile` module.

            .. versionadded:: 13.1
        caption (:obj:`str`, optional ): Caption of the photo to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional): |parse_mode|
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|
        has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the photo needs to be covered
            with a spoiler animation.

            .. versionadded:: 20.0
        show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

            .. versionadded:: 21.3

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.PHOTO`.
        media (:obj:`str` | :class:`telegram.InputFile`): Photo to send.
        caption (:obj:`str`): Optional. Caption of the photo to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`): Optional. |parse_mode|
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|
        has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the photo is covered with a
            spoiler animation.

            .. versionadded:: 20.0
        show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

            .. versionadded:: 21.3
    )rj   rk   Nr$   r!   rL   r   r"   r    rl   rj   rk   r%   c                ó  •— t          |t          |dd¬¦  «        }t          ¦   «                              t          j        |||||¬¦  «         |                      ¦   «         5  || _        || _        d d d ¦  «         d S # 1 swxY w Y   d S rn   )	r   r   r)   r*   r   rD   r\   rj   rk   )
r-   r!   r   r"   r    rl   rj   rk   r%   r.   s
            €r/   r*   zInputMediaPhoto.__init__ø  sî   ø€ õ ! ­	¸HÈTÐ^bÐcÑcÔcˆÝ‰Œ×ÒÝÔ ØØØØØ!ð 	ñ 	
ô 	
ð 	
ð �^Š^ÑÔð 	Rð 	RØ,7ˆDÔØ9QˆDÔ)ð	Rð 	Rð 	Rñ 	Rô 	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Røøøð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rs   Á A<Á<B ÂB )r9   r:   r;   r<   r=   r   r>   r   r   r   rd   r   r*   r@   rA   s   @r/   rs   rs   ¼  sü   ø€ € € € € ð4ð 4ðl€Ið #Ø$0Ø;?Ø#Ø#'Ø04ðRð '+ðRð Rð Rà&ðRð �t‘ðRð ˜S”Mð	Rð
 # =Ô1°DÑ8ðRð ˜‘*ðRð ˜D‘[ðRð #'¨¡+ðRð ˜t‘OðRð Rð Rð Rð Rð Rð Rð Rð Rð Rr0   rs   c            !       ó  ‡ — e Zd ZdZdZdddddedddddddfddœdddedz  dedz  d	edz  d
edz  de	dz  de
e         dee         dz  dedz  de	dz  ddde	dz  dddedz  dedz  fˆ fd„Zedeej        z  dz  fd„¦   «         Zˆ xZS )ÚInputMediaVideoa  Represents a video to be sent.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    Note:
        *  When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the
           width, height and duration from that video, unless otherwise specified with the optional
           arguments.
        *  :paramref:`thumbnail` will be ignored for small video files, for which Telegram can
            easily generate thumbnails. However, this behaviour is undocumented and might be
            changed by Telegram.

    .. versionchanged:: 20.5
      |removed_thumb_note|

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Video`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.Video` object to send.

            .. versionchanged:: 13.2
               Accept :obj:`bytes` as input.
        filename (:obj:`str`, optional): Custom file name for the video, when uploading a
            new file. Convenience parameter, useful e.g. when sending files generated by the
            :obj:`tempfile` module.

            .. versionadded:: 13.1
        caption (:obj:`str`, optional): Caption of the video to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional): |parse_mode|
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|

        width (:obj:`int`, optional): Video width.
        height (:obj:`int`, optional): Video height.
        duration (:obj:`int` | :class:`datetime.timedelta`, optional): Video duration in seconds.

            .. versionchanged:: v22.2
                |time-period-input|
        supports_streaming (:obj:`bool`, optional): Pass :obj:`True`, if the uploaded video is
            suitable for streaming.
        has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the video needs to be covered
            with a spoiler animation.

            .. versionadded:: 20.0
        thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

            .. versionadded:: 20.2
        cover (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): Cover for the video in the message. |fileinputnopath|

            .. versionchanged:: 21.11
        start_timestamp (:obj:`int`, optional): Start timestamp for the video in the message

            .. versionchanged:: 21.11
        show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

            .. versionadded:: 21.3

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.VIDEO`.
        media (:obj:`str` | :class:`telegram.InputFile`): Video file to send.
        caption (:obj:`str`): Optional. Caption of the video to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`): Optional. |parse_mode|
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|
        width (:obj:`int`): Optional. Video width.
        height (:obj:`int`): Optional. Video height.
        duration (:obj:`int` | :class:`datetime.timedelta`): Optional. Video duration in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|
        supports_streaming (:obj:`bool`): Optional. :obj:`True`, if the uploaded video is
            suitable for streaming.
        has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the video is covered with a
            spoiler animation.

            .. versionadded:: 20.0
        thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

            .. versionadded:: 20.2
        show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

            .. versionadded:: 21.3
        cover (:class:`telegram.InputFile`): Optional. Cover for the video in the message.
            |fileinputnopath|

            .. versionchanged:: 21.11
        start_timestamp (:obj:`int`): Optional. Start timestamp for the video in the message

            .. versionchanged:: 21.11
    )	rQ   rR   rj   rS   rk   rT   rU   r1   rV   Nr$   r!   rW   r   rV   rS   rX   rU   r"   r    rl   rj   r1   r2   rk   rR   rT   r%   c                óL  •— t          |t          ¦  «        r)|�|n|j        }|�|n|j        }|�|n|j        }|j        }nt          ||	dd¬¦  «        }t          ¦   «                              t          j
        |||||¬¦  «         |                      ¦   «         5  || _        || _        t          |¦  «        | _        |                      |¦  «        | _        || _        |
| _        || _        |rt          |dd¬¦  «        nd | _        || _        d d d ¦  «         d S # 1 swxY w Y   d S )NTro   r$   r5   )rZ   r   rV   rS   rQ   r[   r   r)   r*   r   rE   r\   r   r8   r1   rU   rj   rk   rR   rT   )r-   r!   r   rV   rS   rX   rU   r"   r    rl   rj   r1   rk   rR   rT   r%   r.   s                   €r/   r*   zInputMediaVideo.__init__‰  s�  ø€ õ& �e�UÑ#Ô#ð 	]Ø"Ð.�E�E°E´KˆEØ%Ð1�V�V°u´|ˆFØ#+Ð#7�x�x¸U¼_ˆHØ”MˆEˆEõ % U°XÀdÐW[Ð\Ñ\Ô\ˆEå‰Œ×ÒÝÔ ØØØØØ!ð 	ñ 	
ô 	
ð 	
ð �^Š^ÑÔð 	?ð 	?Ø%*ˆDŒJØ&,ˆDŒKÝ3?ÀÑ3IÔ3IˆDŒNØ59×5PÒ5PÐQZÑ5[Ô5[ˆDŒNØ3EˆDÔ#Ø,7ˆDÔØ9QˆDÔ)àINÐXÕ  ¨tÀÐEÑEÔEÐEÐTXð ŒJð 0?ˆDÔ ð	?ð 	?ð 	?ñ 	?ô 	?ð 	?ð 	?ð 	?ð 	?ð 	?ð 	?ð 	?øøøð 	?ð 	?ð 	?ð 	?ð 	?ð 	?s   ÂA4DÄDÄ Dr3   c                 ó.   — t          | j        d¬¦  «        S r^   r`   ra   s    r/   rX   zInputMediaVideo.duration»  rb   r0   )r9   r:   r;   r<   r=   r   r>   rc   r   rd   r   r   r   r   r*   re   rf   rg   rX   r@   rA   s   @r/   rv   rv     s–  ø€ € € € € ðeð eðN
€Ið #Ø Ø!Ø&*Ø*.Ø$0Ø;?Ø#Ø#'Ø(,Ø04Ø$(Ø&*ð0?ð" '+ð#0?ð 0?ð 0?à"ð0?ð �t‘ð0?ð �T‰zð	0?ð
 �d‘
ð0?ð ˜tÑ#ð0?ð ! 4™Kð0?ð ˜S”Mð0?ð # =Ô1°DÑ8ð0?ð ˜‘*ð0?ð ˜D‘[ð0?ð &ð0?ð #'¨¡+ð0?ð "ð0?ð ˜t™ð0?ð" ˜t‘Oð#0?ð 0?ð 0?ð 0?ð 0?ð 0?ðd ðI˜# ¤Ñ-°Ñ4ð Ið Ið Iñ „XðIð Ið Ið Ið Ir0   rv   c                   óÜ   ‡ — e Zd ZdZdZdeddddddfddœdddedz  dee         d	edz  d
edz  dedz  de	e
         dz  dedz  dddedz  fˆ fd„Zedeej        z  dz  fd„¦   «         Zˆ xZS )ÚInputMediaAudioa¹  Represents an audio file to be treated as music to be sent.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    Note:
        When using a :class:`telegram.Audio` for the :attr:`media` attribute, it will take the
        duration, performer and title from that video, unless otherwise specified with the
        optional arguments.

    .. versionchanged:: 20.5
      |removed_thumb_note|

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Audio`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.Audio` object to send.

            .. versionchanged:: 13.2
               Accept :obj:`bytes` as input.
        filename (:obj:`str`, optional): Custom file name for the audio, when uploading a
            new file. Convenience parameter, useful e.g. when sending files generated by the
            :obj:`tempfile` module.

            .. versionadded:: 13.1
        caption (:obj:`str`, optional): Caption of the audio to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional): |parse_mode|
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|

        duration (:obj:`int` | :class:`datetime.timedelta`, optional): Duration of the audio
            in seconds as defined by the sender.

            .. versionchanged:: v22.2
                |time-period-input|
        performer (:obj:`str`, optional): Performer of the audio as defined by the sender or by
            audio tags.
        title (:obj:`str`, optional): Title of the audio as defined by the sender or by audio tags.
        thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

            .. versionadded:: 20.2

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.AUDIO`.
        media (:obj:`str` | :class:`telegram.InputFile`): Audio file to send.
        caption (:obj:`str`): Optional. Caption of the audio to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`): Optional. |parse_mode|
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|
        duration (:obj:`int` | :class:`datetime.timedelta`): Optional. Duration of the audio
            in seconds.

            .. deprecated:: v22.2
                |time-period-int-deprecated|
        performer (:obj:`str`): Optional. Performer of the audio as defined by the sender or by
            audio tags.
        title (:obj:`str`): Optional. Title of the audio as defined by the sender or by audio tags.
        thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

            .. versionadded:: 20.2

    )rQ   Ú	performerr1   ÚtitleNr$   r!   zFileInput | Audior   r"   rX   r{   r|   r    rl   r1   r2   r%   c
                óÞ  •— t          |t          ¦  «        r)|�|n|j        }|€|j        n|}|€|j        n|}|j        }nt          ||dd¬¦  «        }t          ¦   «                              t          j
        |||||
¬¦  «         |                      ¦   «         5  |                      |	¦  «        | _        t          |¦  «        | _        || _        || _        d d d ¦  «         d S # 1 swxY w Y   d S rn   )rZ   r	   rQ   r{   r|   r[   r   r)   r*   r   ÚAUDIOr\   r8   r1   r   )r-   r!   r   r"   rX   r{   r|   r    rl   r1   r%   r.   s              €r/   r*   zInputMediaAudio.__init__  sH  ø€ õ �e�UÑ#Ô#ð 	]Ø#+Ð#7�x�x¸U¼_ˆHØ+4Ð+<˜œ˜À)ˆIØ#( =�E”K�K°eˆEØ”MˆEˆEõ % U°XÀdÐW[Ð\Ñ\Ô\ˆEå‰Œ×ÒÝÔ ØØØØØ!ð 	ñ 	
ô 	
ð 	
ð �^Š^ÑÔð 	3ð 	3Ø59×5PÒ5PÐQZÑ5[Ô5[ˆDŒNÝ3?ÀÑ3IÔ3IˆDŒNØ%*ˆDŒJØ)2ˆDŒNð		3ð 	3ð 	3ñ 	3ô 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3ð 	3øøøð 	3ð 	3ð 	3ð 	3ð 	3ð 	3s   Â=C"Ã"C&Ã)C&r3   c                 ó.   — t          | j        d¬¦  «        S r^   r`   ra   s    r/   rX   zInputMediaAudio.duration2  rb   r0   )r9   r:   r;   r<   r=   r   r>   r   r   r   r   r   r*   re   rc   rf   rg   rX   r@   rA   s   @r/   rz   rz   À  sF  ø€ € € € € ðGð GðR A€Ið
 #Ø$0Ø&*Ø $Ø Ø;?Ø#Ø(,ð$3ð '+ð$3ð $3ð $3à"ð$3ð �t‘ð$3ð ˜S”Mð	$3ð
 ˜tÑ#ð$3ð ˜‘:ð$3ð �T‰zð$3ð # =Ô1°DÑ8ð$3ð ˜‘*ð$3ð &ð$3ð ˜t‘Oð$3ð $3ð $3ð $3ð $3ð $3ðL ðI˜# ¤Ñ-°Ñ4ð Ið Ið Iñ „XðIð Ið Ið Ið Ir0   rz   c                   ó’   ‡ — e Zd ZdZdZdeddddfddœdddedz  dee         d	edz  d
e	e
         dz  dedz  dddedz  fˆ fd„Zˆ xZS )ÚInputMediaDocumentaq
  Represents a general file to be sent.

    .. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

    .. versionchanged:: 20.5
      |removed_thumb_note|

    Args:
        media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes`             | :class:`pathlib.Path` | :class:`telegram.Document`): File to send. |fileinputnopath|
            Lastly you can pass an existing :class:`telegram.Document` object to send.

            .. versionchanged:: 13.2
               Accept :obj:`bytes` as input.
        filename (:obj:`str`, optional): Custom file name for the document, when uploading a
            new file. Convenience parameter, useful e.g. when sending files generated by the
            :obj:`tempfile` module.

            .. versionadded:: 13.1
        caption (:obj:`str`, optional): Caption of the document to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
            entities parsing.
        parse_mode (:obj:`str`, optional): |parse_mode|
        caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

            .. versionchanged:: 20.0
                |sequenceclassargs|

        disable_content_type_detection (:obj:`bool`, optional): Disables automatic server-side
            content type detection for files uploaded using multipart/form-data. Always
            :obj:`True`, if the document is sent as part of an album.
        thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

            .. versionadded:: 20.2

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.DOCUMENT`.
        media (:obj:`str` | :class:`telegram.InputFile`): File to send.
        caption (:obj:`str`): Optional. Caption of the document to be sent,
            0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
            after entities parsing.
        parse_mode (:obj:`str`): Optional. |parse_mode|
        caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

            .. versionchanged:: 20.0

                * |tupleclassattrs|
                * |alwaystuple|
        disable_content_type_detection (:obj:`bool`): Optional. Disables automatic server-side
            content type detection for files uploaded using multipart/form-data. Always
            :obj:`True`, if the document is sent as part of an album.
        thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

            .. versionadded:: 20.2
    )Údisable_content_type_detectionr1   Nr$   r!   zFileInput | Documentr   r"   r‚   r    rl   r1   r2   r%   c                ó8  •— t          |t          |dd¬¦  «        }t          ¦   «                              t          j        |||||¬¦  «         |                      ¦   «         5  |                      |¦  «        | _        || _	        d d d ¦  «         d S # 1 swxY w Y   d S rn   )
r   r
   r)   r*   r   ÚDOCUMENTr\   r8   r1   r‚   )
r-   r!   r   r"   r‚   r    rl   r1   r%   r.   s
            €r/   r*   zInputMediaDocument.__init__s  sü   ø€ õ ! ­¸8ÈDÐ]aÐbÑbÔbˆå‰Œ×ÒÝÔ#ØØØØØ!ð 	ñ 	
ô 	
ð 	
ð �^Š^ÑÔð 	^ð 	^Ø59×5PÒ5PÐQZÑ5[Ô5[ˆDŒNØ?]ˆDÔ/ð	^ð 	^ð 	^ñ 	^ô 	^ð 	^ð 	^ð 	^ð 	^ð 	^ð 	^ð 	^øøøð 	^ð 	^ð 	^ð 	^ð 	^ð 	^s   Á "BÂBÂB)r9   r:   r;   r<   r=   r   r>   r   rd   r   r   r   r*   r@   rA   s   @r/   r�   r�   7  sù   ø€ € € € € ð7ð 7ðr @€Ið
 #Ø$0Ø6:Ø;?Ø#Ø(,ð^ð '+ð^ð ^ð ^à%ð^ð �t‘ð^ð ˜S”Mð	^ð
 )-¨t©ð^ð # =Ô1°DÑ8ð^ð ˜‘*ð^ð &ð^ð ˜t‘Oð^ð ^ð ^ð ^ð ^ð ^ð ^ð ^ð ^ð ^r0   r�   )8r<   Údatetimerf   Úcollections.abcr   Útypingr   r   r   Útelegramr   Útelegram._files.animationr   Útelegram._files.audior	   Útelegram._files.documentr
   Útelegram._files.inputfiler   Útelegram._files.photosizer   Útelegram._files.videor   Útelegram._messageentityr   Útelegram._telegramobjectr   Útelegram._utilsr   Útelegram._utils.argumentparsingr   r   Útelegram._utils.datetimer   Útelegram._utils.defaultvaluer   Útelegram._utils.filesr   Útelegram._utils.typesr   r   r   Útelegram.constantsr   r   r   rH   r   rC   rJ   rP   ri   rs   rv   rz   r�   rK   r0   r/   ú<module>r˜      s³  ðð& 2Ð 1Ð 1à Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2à Ð Ð Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø -Ð -Ð -Ð -Ð -Ð -Ø /Ð /Ð /Ð /Ð /Ð /Ø /Ð /Ð /Ð /Ð /Ð /Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø  Ð  Ð  Ð  Ð  Ð  Ø LÐ LÐ LÐ LÐ LÐ LÐ LÐ LØ 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ð @Ø -Ð -Ð -Ð -Ð -Ð -àð 0Ø/Ð/Ð/Ð/Ð/Ð/à  5Ñ(¨8Ñ3°iÑ?À%ÑG€	ˆ9Ð GÐ GÑ GðE
ð E
ð E
ð E
ð E
�ñ E
ô E
ð E
ðP'ð 'ð 'ð 'ð '�^ñ 'ô 'ð 'ðTð ð ð ð ˜.ñ ô ð ð>kIð kIð kIð kIð kI˜.ñ kIô kIð kIð\JIð JIð JIð JIð JI˜*ñ JIô JIð JIðZVRð VRð VRð VRð VR�jñ VRô VRð VRðrhIð hIð hIð hIð hI�jñ hIô hIð hIðVtIð tIð tIð tIð tI�jñ tIô tIð tIðnV^ð V^ð V^ð V^ð V^˜ñ V^ô V^ð V^ð V^ð V^r0   