Ë
    N[Îi)  ã                   ó<   — d dl Z d dlZd dlZd dlmZ  G d„ d«      Zy)é    N)Úidlec                   ó   — e Zd Z	 d	 dd„Zy)ÚRunNc                 ór  — t        j                  «       }|j                  }|	 ||«       yt        j                  | j
                  «      r= || j                  «       «        |t        «       «        || j                  «       «       y| j                  «         |t        «       «       | j                  «        y)a–  Start the client, idle the main script and finally stop the client.

        When calling this method without any argument it acts as a convenience method that calls
        :meth:`~pyrogram.Client.start`, :meth:`~pyrogram.idle` and :meth:`~pyrogram.Client.stop` in sequence.
        It makes running a single client less verbose.

        In case a coroutine is passed as argument, runs the coroutine until it's completed and doesn't do any client
        operation. This is almost the same as :py:obj:`asyncio.run` except for the fact that Pyrogram's ``run`` uses the
        current event loop instead of a new one.

        If you want to run multiple clients at once, see :meth:`pyrogram.compose`.

        Parameters:
            coroutine (``Coroutine``, *optional*):
                Pass a coroutine to run it until it completes.

        Raises:
            ConnectionError: In case you try to run an already started client.

        Example:
            .. code-block:: python

                from pyrogram import Client

                app = Client("my_account")
                ...  # Set handlers up
                app.run()

            .. code-block:: python

                from pyrogram import Client

                app = Client("my_account")


                async def main():
                    async with app:
                        print(await app.get_me())


                app.run(main())
        N)ÚasyncioÚget_event_loopÚrun_until_completeÚinspectÚiscoroutinefunctionÚstartr   Ústop)ÚselfÚ	coroutineÚloopÚruns       úQ/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/utilities/run.pyr   zRun.run   s}   € ô\ ×%Ñ%Ó'ˆØ×%Ñ%ˆàÐ Ù	Nä×*Ñ*¨4¯:©:Ô6ÙD—J‘J“LÔ!Ù”D“F”ÙD—I‘I“KÕ à—
‘
”Ù”D“F”Ø—	‘	•ó    )N)r   zpyrogram.Client)Ú__name__Ú
__module__Ú__qualname__r   © r   r   r   r      s   „ ð ð;Øô;r   r   )r   r
   ÚpyrogramÚpyrogram.methods.utilities.idler   r   r   r   r   ú<module>r      s   ðó& Û ã Ý 0÷<ò <r   