
    -iK                     V    d dl mZ d dlmZ d dlmZ e G d de                      ZdS )    )	dataclass)Clip)Effectc                   8    e Zd ZU dZeed<   eed<   dedefdZdS )SlideOuta  Makes the clip goes away by one side of the screen.

    Only works when the clip is included in a CompositeVideoClip,
    and if the clip has the same size as the whole composition.

    Parameters
    ----------

    clip : moviepy.Clip.Clip
      A video clip.

    duration : float
      Time taken for the clip to be fully visible

    side : str
      Side of the screen where the clip goes. One of
      'top', 'bottom', 'left' or 'right'.

    Examples
    --------

    .. code:: python

        from moviepy import *

        clips = [... make a list of clips]
        slided_clips = [
            CompositeVideoClip([clip.with_effects([vfx.SlideOut(1, "left")])])
            for clip in clips
        ]
        final_clip = concatenate_videoclips(slided_clips, padding=-1)

        clip = ColorClip(
            color=(255, 0, 0), duration=1, size=(300, 300)
        ).with_fps(60)
        final_clip = CompositeVideoClip([clip.with_effects([vfx.SlideOut(1, "right")])])
    durationsideclipreturnc                      |j         t          d          |j        \  |j          j         z
   fd fd fd fdd}|                    | j                           S )zApply the effect to the clip.NzAttribute 'duration' not setc                 F    t          d| z
   j        z  z            dfS Nr   centerminr   tselftsws    W/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/SlideOut.py<lambda>z SlideOut.apply.<locals>.<lambda>:   s(    s1aQV9t}+D&EFFQ     c                 D    t          d| z
  j        z  z            dfS r   maxr   r   s    r   r   z SlideOut.apply.<locals>.<lambda>;   s&    AqQVt},D'E F FQ r   c                 F    dt          d| z
   j        z  z            fS Nr   r   r   r   hr   r   s    r   r   z SlideOut.apply.<locals>.<lambda><   s(    hAqa"fI4M/N(O(OP r   c                 D    dt          d| z
  j        z  z            fS r   r   r   s    r   r   z SlideOut.apply.<locals>.<lambda>=   s&    3q!B$-7O2P+Q+Q R r   )leftrighttopbottom)r   
ValueErrorsizewith_positionr	   )r   r
   pos_dictr    r   r   s   `  @@@r   applyzSlideOut.apply2   s    = ;<<<y1]T]*QQQQQQQQQQQQPPPPPPRRRRRR	
 
 !!(49"5666r   N)	__name__
__module____qualname____doc__float__annotations__strr   r*    r   r   r   r      sW         $ $L OOO
III7$ 74 7 7 7 7 7 7r   r   N)dataclassesr   moviepy.Clipr   moviepy.Effectr   r   r2   r   r   <module>r6      s{    ! ! ! ! ! !       ! ! ! ! ! ! 87 87 87 87 87v 87 87 87 87 87r   