Ë
    :É„j.   ã                   óh   — d dl m Z  d dlmZmZmZ d dlZd dlmZmZ d dlmZ d dlm	Z	  G d„ d«      Z
y)	é    )Údatetime)ÚUnionÚListÚOptionalN)ÚrawÚenums)Útypes)Úutilsc            ,       óÈ   — e Zd Z	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddddeeef   dededed   d	ed
   dedededededeeef   deeef   deded
   de	dedededed   ded   f*d„Z
y)ÚSendCachedMediaNÚselfzpyrogram.ClientÚchat_idÚfile_idÚcaptionÚ
parse_modezenums.ParseModeÚcaption_entitiesztypes.MessageEntityÚhas_spoilerÚdisable_notificationÚmessage_thread_idÚreply_to_message_idÚreply_to_story_idÚreply_to_chat_idÚreply_to_monoforum_idÚ
quote_textÚquote_entitiesÚschedule_dateÚprotect_contentÚallow_paid_broadcastÚinvert_mediaÚreply_markup)ztypes.InlineKeyboardMarkupztypes.ReplyKeyboardMarkupztypes.ReplyKeyboardRemoveztypes.ForceReplyÚreturnztypes.Messagec              ƒ   óX  K  — t        j                  | ||	|
||||||¬«
      ƒ d{  –—† }t        j                  |«      }||_        | j	                  t        j                  j                  j                  d| j                  |«      ƒ d{  –—† ||xs d|| j                  «       t        j                  |«      ||||r|j                  | «      ƒ d{  –—† nddœ
t        j                  | |||«      ƒ d{  –—† ¤Ž«      ƒ d{  –—† }|j                  D ]ù  }t        |t
        j                   j"                  t
        j                   j$                  t
        j                   j&                  f«      sŒ[t         j(                  j+                  | |j,                  |j.                  D �ci c]  }|j0                  |“Œ c}|j2                  D �ci c]  }|j0                  |“Œ c}t        t
        j                   j&                  «      ¬«      ƒ d{  –—† c S  y7 �Œê7 �Œ‰7 �ŒE7 �Œ%7 �Œc c}w c c}w 7 Œ!­w)a¶  Send any media stored on the Telegram servers using a file_id.

        This convenience method works with any valid file_id only.
        It does the same as calling the relevant method for sending media using a file_id, thus saving you from the
        hassle of using the correct method for the media the file_id is pointing to.

        .. include:: /_includes/usable-by/users-bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).
                You can also use chat public link in form of *t.me/<username>* (str).

            file_id (``str``):
                Media to send.
                Pass a file_id as string to send a media that exists on the Telegram servers.

            caption (``str``, *optional*):
                Media caption, 0-1024 characters.

            parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*):
                By default, texts are parsed using both Markdown and HTML styles.
                You can combine both syntaxes together.

            caption_entities (List of :obj:`~pyrogram.types.MessageEntity`):
                List of special entities that appear in the caption, which can be specified instead of *parse_mode*.

            has_spoiler (``bool``, *optional*):
                Pass True if the photo needs to be covered with a spoiler animation.

            disable_notification (``bool``, *optional*):
                Sends the message silently.
                Users will receive a notification with no sound.

            message_thread_id (``int``, *optional*):
                Unique identifier for the target message thread (topic) of the forum.
                for forum supergroups only.

            reply_to_message_id (``int``, *optional*):
                If the message is a reply, ID of the original message.
            
            reply_to_story_id (``int``, *optional*):
                Unique identifier for the target story.

            reply_to_chat_id (``int`` | ``str``, *optional*):
                Unique identifier for the origin chat.
                for reply to message from another chat.
                You can also use chat public link in form of *t.me/<username>* (str).

            reply_to_monoforum_id (``int`` | ``str``, *optional*):
                Unique identifier for the target user of monoforum.
                for reply to message from monoforum.
                for channel administrators only.

            quote_text (``str``, *optional*):
                Text to quote.
                for reply_to_message only.

            quote_entities (List of :obj:`~pyrogram.types.MessageEntity`, *optional*):
                List of special entities that appear in quote_text, which can be specified instead of *parse_mode*.
                for reply_to_message only.

            schedule_date (:py:obj:`~datetime.datetime`, *optional*):
                Date when the message will be automatically sent.
            
            protect_content (``bool``, *optional*):
                Protects the contents of the sent message from forwarding and saving.

            allow_paid_broadcast (``bool``, *optional*):
                Pass True to allow the message to ignore regular broadcast limits for a small fee; for bots only

            invert_media (``bool``, *optional*):
                Inverts the position of the media and caption.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
                Additional interface options. An object for an inline keyboard, custom reply keyboard,
                instructions to remove reply keyboard or to force a reply from the user.

        Returns:
            :obj:`~pyrogram.types.Message`: On success, the sent media message is returned.

        Example:
            .. code-block:: python

                await app.send_cached_media("me", file_id)
        )
Úclientr   r   r   r   r   r   r   r   r   N)
ÚpeerÚmediaÚsilentÚreply_toÚ	random_idr   Ú
noforwardsÚallow_paid_floodskipr   r    )Úis_scheduled© )r
   Úget_reply_toÚget_input_media_from_file_idÚspoilerÚinvoker   Ú	functionsÚmessagesÚ	SendMediaÚresolve_peerÚrnd_idÚdatetime_to_timestampÚwriteÚparse_text_entitiesÚupdatesÚ
isinstancer	   ÚUpdateNewMessageÚUpdateNewChannelMessageÚUpdateNewScheduledMessageÚMessageÚ_parseÚmessageÚusersÚidÚchats)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r'   r%   ÚrÚis                           úb/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/messages/send_cached_media.pyÚsend_cached_mediaz!SendCachedMedia.send_cached_media   så  è ø€ ôh ×+Ñ+ØØØ 3Ø/Ø/Ø-Ø"7Ø!Ø)Ø!ô
÷ 
ˆô ×2Ñ2°7Ó;ˆØ#ˆŒà—+‘+Ü�M‰M×"Ñ"×,Ñ,ð Ø×,Ñ,¨WÓ5×5ØØ+Ò3¨tØ!ØŸ+™+›-Ü#×9Ñ9¸-ÓHØ*Ø%9Ø)Ù?K <×#5Ñ#5°dÓ#;×;Ð;ÐQUñô ×1Ñ1°$¸ÀÐM]Ó^×^ñó
÷ 
ˆð  —‘ò 		ˆAÜ˜!œcŸi™i×8Ñ8Ü!Ÿi™i×?Ñ?Ü!Ÿi™i×AÑAðCõ Dô #Ÿ]™]×1Ñ1Ø˜!Ÿ)™)Ø&'§g¡gÖ. �Q—T‘T˜1‘WÒ.Ø&'§g¡gÖ. �Q—T‘T˜1‘WÒ.Ü!+¨A¬s¯y©y×/RÑ/RÓ!Sð	 2ó ÷ ò ñ			ðA
ùð$ 6ùð <ùØ^ùð
ûò, /ùÚ.ðúsŠ   ‚#H*¥H¦A#H*Â	HÂ
AH*ÃH Ã"H*Ã3HÃ4H*ÄHÄA*H*Å-3H*Æ HÆ4H*ÇH#Ç.H*ÈH(È	H*ÈH*ÈH*ÈH*ÈH*ÈH*)Ú NNNNNNNNNNNNNNFN)Ú__name__Ú
__module__Ú__qualname__r   ÚintÚstrr   r   Úboolr   rG   r,   ó    rF   r   r      s[  „ ð
 Ø26Ø8<Ø Ø%)Ø!%Ø#'Ø!%Ø,0Ø15ØØ6:Ø"&Ø $Ø%)Ø"ð ñ3]Øð]à�s˜C�x‘ð]ð ð]ð ð	]ð
 Ð.Ñ/ð]ð Ð4Ñ5ð]ð ð]ð #ð]ð ð]ð !ð]ð ð]ð    S ™/ð]ð  % S¨# X™ð]ð ð]ð Ð2Ñ3ð]ð   ð!]ð" ð#]ð$ #ð%]ð& ð']ð( ðñ
ð)]ð4 
�/Ñ	"ô5]rO   r   )r   Útypingr   r   r   Úpyrogramr   r   r	   r
   r   r,   rO   rF   ú<module>rR      s(   ðõ( ß (Ñ (ã ß Ý Ý ÷^ò ^rO   