§
    &ºjç  ã                   óÊ   — d Z ddl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  G d„ de
¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )zCThis module contains objects that represent paid media in Telegram.é    N)ÚFinal)Ú	constants)Ú	InputFile)ÚTelegramObject)Úenum)Úto_timedelta©Úparse_file_input)Ú	FileInputÚJSONDictc                   óÈ   ‡ — 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<   	 ddœde	dedz  d	dfˆ fd
„Zeded	e	ez  fd„¦   «         Zˆ xZS )ÚInputStoryContentaN  This object describes the content of a story to post. Currently, it can be one of:

    * :class:`telegram.InputStoryContentPhoto`
    * :class:`telegram.InputStoryContentVideo`

    .. versionadded:: 22.1

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

    Attributes:
        type (:obj:`str`): Type of the content.
    )ÚtypeÚPHOTOÚVIDEON©Ú
api_kwargsr   r   Úreturnc                ó¾   •— t          ¦   «                              |¬¦  «         t          j        t          j        ||¦  «        | _        |                      ¦   «          d S )Nr   )ÚsuperÚ__init__r   Ú
get_memberr   ÚInputStoryContentTyper   Ú_freeze)Úselfr   r   Ú	__class__s      €úc/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/telegram/_files/_inputstorycontent.pyr   zInputStoryContent.__init__7   sJ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ýœ­Ô)HÈ$ÐPTÑUÔUˆŒ	àŠ‰Œˆˆˆó    Ú
file_inputc                 ó&   — t          | dd¬¦  «        S )NT)ÚattachÚ
local_moder	   )r   s    r   Ú_parse_file_inputz#InputStoryContent._parse_file_inputB   s   € õ   
°4ÀDÐIÑIÔIÐIr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   ÚstrÚ__annotations__r   r   r   Ústaticmethodr   r   r#   Ú__classcell__©r   s   @r   r   r   !   sõ   ø€ € € € € € ðð ð €Ià!Ô7Ô=€Eˆ5Œ:Ð=Ð=Ñ=ØAØ!Ô7Ô=€Eˆ5Œ:Ð=Ð=Ñ=ØAð '+ð		ð 	ð 	àð	ð ˜t‘Oð		ð
 
ð	ð 	ð 	ð 	ð 	ð 	ð ðJ ið J°C¸)±Oð Jð Jð Jñ „\ðJð Jð Jð Jð Jr   r   c                   ó@   ‡ — e Zd ZdZdZddœdededz  ddfˆ fd„Zˆ xZS )	ÚInputStoryContentPhotoa  Describes a photo to post as a story.

    .. versionadded:: 22.1

    Args:
        photo (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,             optional): The photo to post as a story. The photo must be of the
            size :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_HEIGHT` and must not
            exceed :tg-const:`telegram.constants.InputStoryContentLimit.PHOTOSIZE_UPLOAD` MB.
            |uploadinputnopath|.

    Attributes:
        type (:obj:`str`): Type of the content, must be :attr:`~telegram.InputStoryContent.PHOTO`.
        photo (:class:`telegram.InputFile`): The photo to post as a story. The photo must be of the
            size :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_HEIGHT` and must not
            exceed :tg-const:`telegram.constants.InputStoryContentLimit.PHOTOSIZE_UPLOAD` MB.

    )ÚphotoNr   r0   r   r   c                óð   •— t          ¦   «                              t          j        |¬¦  «         |                      ¦   «         5  |                      |¦  «        | _        d d d ¦  «         d S # 1 swxY w Y   d S ©N)r   r   )r   r   r   r   Ú	_unfrozenr#   r0   )r   r0   r   r   s      €r   r   zInputStoryContentPhoto.__init__a   sÃ   ø€ õ 	‰Œ×ÒÕ/Ô5À*ÐÑMÔMÐMà^Š^ÑÔð 	Hð 	HØ*.×*@Ò*@ÀÑ*GÔ*GˆDŒJð	Hð 	Hð 	Hñ 	Hô 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Høøøð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hs   ÁA+Á+A/Á2A/)	r$   r%   r&   r'   r(   r   r   r   r,   r-   s   @r   r/   r/   I   sŒ   ø€ € € € € ðð ð* €Ið '+ð		Hð 	Hð 	Hàð	Hð ˜t‘Oð		Hð
 
ð	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hð 	Hr   r/   c                   ó†   ‡ — e Zd ZdZdZ	 	 	 dddœdedeej        z  dz  deej        z  dz  de	dz  d	e
dz  d
dfˆ fd„Zˆ xZS )ÚInputStoryContentVideoa	  
    Describes a video to post as a story.

    .. versionadded:: 22.1

    Args:
        video (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,             optional): The video to post as a story. The video must be of
            the size :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_HEIGHT`,
            streamable, encoded with ``H.265`` codec, with key frames added
            each second in the ``MPEG4`` format, and must not exceed
            :tg-const:`telegram.constants.InputStoryContentLimit.VIDEOSIZE_UPLOAD` MB.
            |uploadinputnopath|.
        duration (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional): Precise
            duration of the video in seconds;
            0-:tg-const:`telegram.constants.InputStoryContentLimit.MAX_VIDEO_DURATION`
        cover_frame_timestamp (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional):
            Timestamp in seconds of the frame that will be used as the static cover for the story.
            Defaults to ``0.0``.
        is_animation (:obj:`bool`, optional): Pass :obj:`True` if the video has no sound

    Attributes:
        type (:obj:`str`): Type of the content, must be :attr:`~telegram.InputStoryContent.VIDEO`.
        video (:class:`telegram.InputFile`): The video to post as a story. The video must be of
            the size :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_HEIGHT`,
            streamable, encoded with ``H.265`` codec, with key frames added
            each second in the ``MPEG4`` format, and must not exceed
            :tg-const:`telegram.constants.InputStoryContentLimit.VIDEOSIZE_UPLOAD` MB.
        duration (:class:`datetime.timedelta`): Optional. Precise duration of the video in seconds;
            0-:tg-const:`telegram.constants.InputStoryContentLimit.MAX_VIDEO_DURATION`
        cover_frame_timestamp (:class:`datetime.timedelta`): Optional. Timestamp in seconds of the
            frame that will be used as the static cover for the story. Defaults to ``0.0``.
        is_animation (:obj:`bool`): Optional. Pass :obj:`True` if the video has no sound
    )Úcover_frame_timestampÚdurationÚis_animationÚvideoNr   r9   r7   r6   r8   r   r   c                óN  •— t          ¦   «                              t          j        |¬¦  «         |                      ¦   «         5  |                      |¦  «        | _        t          |¦  «        | _        t          |¦  «        | _	        || _
        d d d ¦  «         d S # 1 swxY w Y   d S r2   )r   r   r   r   r3   r#   r9   r   r7   r6   r8   )r   r9   r7   r6   r8   r   r   s         €r   r   zInputStoryContentVideo.__init__•   s×   ø€ õ 	‰Œ×ÒÕ/Ô5À*ÐÑMÔMÐMà^Š^ÑÔð 	:ð 	:Ø*.×*@Ò*@ÀÑ*GÔ*GˆDŒJÝ2>¸xÑ2HÔ2HˆDŒMÝ?KÐLaÑ?bÔ?bˆDÔ&Ø-9ˆDÔð		:ð 	:ð 	:ñ 	:ô 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:øøøð 	:ð 	:ð 	:ð 	:ð 	:ð 	:s   ÁA
BÂBÂ!B)NNN)r$   r%   r&   r'   r(   r   ÚfloatÚdtmÚ	timedeltaÚboolr   r   r,   r-   s   @r   r5   r5   m   sÉ   ø€ € € € € ð#ð #ðJ O€Ið
 26Ø>BØ$(ð:ð '+ð:ð :ð :àð:ð ˜#œ-Ñ'¨$Ñ.ð:ð  % s¤}Ñ4°tÑ;ð	:ð
 ˜T‘kð:ð ˜t‘Oð:ð 
ð:ð :ð :ð :ð :ð :ð :ð :ð :ð :r   r5   )r'   Údatetimer<   Útypingr   Útelegramr   Útelegram._files.inputfiler   Útelegram._telegramobjectr   Útelegram._utilsr   Útelegram._utils.argumentparsingr   Útelegram._utils.filesr
   Útelegram._utils.typesr   r   r   r/   r5   © r   r   ú<module>rI      sL  ðð& JÐ Ià Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø  Ð  Ð  Ð  Ð  Ð  Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5ð%Jð %Jð %Jð %Jð %J˜ñ %Jô %Jð %JðP!Hð !Hð !Hð !Hð !HÐ.ñ !Hô !Hð !HðH7:ð 7:ð 7:ð 7:ð 7:Ð.ñ 7:ô 7:ð 7:ð 7:ð 7:r   