
    /j                         d 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mZ er
ddlZdd	lmZ  G d
 de      Zy)zDThis module contains an object that represents a Telegram LivePhoto.    )Sequence)TYPE_CHECKING)_BaseMedium)	PhotoSize)de_list_optionalparse_sequence_argto_timedelta)JSONDict
TimePeriodN)Botc                        e Zd ZdZdZ	 	 	 ddddedededed	ed
ee	   dz  dedz  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 )	LivePhotoa  
    This object represents a live photo.

    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.

    .. versionadded:: 22.8

    Args:
        file_id	(:obj:`str`): Identifier for the video 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`): Video width as defined by the sender.
        height (:obj:`int`): Video height as defined by the sender.
        duration (:obj:`int` | :class:`datetime.timedelta`): Duration of the video
            in seconds as defined by the sender.
        photo (Sequence[:obj:`telegram.PhotoSize`], optional): Available sizes of the corresponding
            static photo.
        mime_type (:obj:`str`, optional): MIME type of a file as defined by the sender.
        file_size (:obj:`int`, optional): File size in bytes.

    Attributes:
        file_id	(:obj:`str`): Identifier for the video 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`): Video width as defined by the sender.
        height (:obj:`int`): Video height as defined by the sender.
        duration (:class:`datetime.timedelta`): Duration of the video
            in seconds as defined by the sender.
        photo (tuple[:obj:`telegram.PhotoSize`]): Optional. Available sizes of the corresponding
            static photo.
        mime_type (:obj:`str`): Optional. MIME type of a file as defined by the sender.
        file_size (:obj:`int`): Optional. File size in bytes.

    )durationheight	mime_typephotowidthN)
api_kwargsfile_idfile_unique_idr   r   r   r   r   	file_sizer   c	                    t         
|   ||||	       | j                         5  || _        || _        t        |      | _        t        |      | _        || _	        d d d        y # 1 sw Y   y xY w)N)r   r   r   r   )
super__init__	_unfrozenr   r   r	   r   r   r   r   )selfr   r   r   r   r   r   r   r   r   	__class__s             W/var/www/html/maxservice/venv/lib/python3.12/site-packages/telegram/_files/livephoto.pyr   zLivePhoto.__init__T   sq     	)!	 	 	
 ^^ 	3#DJ%DK+7+ADM5G5NDJ)2DN	3 	3 	3s   6A$$A-databotz
Bot | Nonereturnc                     | j                  |      }t        |j                  d      t        |      |d<   t        |   ||      S )z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r    )_parse_datar   getr   r   de_json)clsr   r    r   s      r   r%   zLivePhoto.de_jsonp   sA     t$('):IsKWwDc22    )NNN)N)__name__
__module____qualname____doc__	__slots__strintr   r   r   r
   r   classmethodr%   __classcell__)r   s   @r   r   r   #   s    &PI -1 $ $3 '+33 3 	3
 3 3 	"T)3 :3 :3 tO38 38 3, 3+ 3 3r'   r   )r+   collections.abcr   typingr   telegram._files._basemediumr   telegram._files.photosizer   telegram._utils.argumentparsingr   r   r	   telegram._utils.typesr
   r   datetimedtmtelegramr   r    r'   r   <module>r;      s7   & K $   3 / ^ ^ 6T3 T3r'   