
    iV                         d Z ddlmZmZ ddlmZ ddlmZ ddlmZ eed               Z	eed               Z
d	 Zed
        Zed        Zy)z
Here is the current catalogue. These are meant
to be used with clip.fx. There are available as transfx.crossfadein etc.
if you load them with ``from moviepy.editor import *``
    )add_mask_if_nonerequires_duration)fadein)fadeout   )CompositeVideoClipc                     | j                   | j                  _         | j                         }| j                  j                  t        |      |_        |S )z Makes the clip appear progressively, over ``duration`` seconds.
    Only works when the clip is included in a CompositeVideoClip.
    )durationmaskcopyfxr   clipr
   newclips      c/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/moviepy/video/compositing/transitions.pycrossfadeinr      s:     DIIiikG99<<1GLN    c                     | j                   | j                  _         | j                         }| j                  j                  t        |      |_        |S )z Makes the clip disappear progressively, over ``duration`` seconds.
    Only works when the clip is included in a CompositeVideoClip.
    )r
   r   r   r   r   r   s      r   crossfadeoutr      s:     DIIiikG99<<2GLNr   c                 |    | j                   \  fdfdfdfdd}| j                  ||         S )a   Makes the clip arrive from 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
      A video clip.

    duration
      Time taken for the clip to be fully visible

    side
      Side of the screen where the clip comes from. One of
      'top' | 'bottom' | 'left' | 'right'

    Examples
    =========

    >>> from moviepy.editor import *
    >>> clips = [... make a list of clips]
    >>> slided_clips = [CompositeVideoClip([
                            clip.fx(transfx.slide_in, duration=1, side='left')])
                        for clip in clips]
    >>> final_clip = concatenate( slided_clips, padding=-1)

    c                 2    t        d| z  dz
  z        dfS Nr   r   centermintr
   ws    r   <lambda>zslide_in.<locals>.<lambda>E   s     3q!QxZ\*:#;X"F r   c                 2    t        dd| z  z
  z        dfS r   maxr   s    r   r   zslide_in.<locals>.<lambda>F   s     C1a(
l+;$<h#G r   c                 2    dt        d| z  dz
  z        fS Nr   r   r   r   r   r
   hs    r   r   zslide_in.<locals>.<lambda>G   s     (C1ajl3C,D!E r   c                 2    dt        dd| z  z
  z        fS r$   r!   r%   s    r   r   zslide_in.<locals>.<lambda>H   s     Xs1a1X:6F/G$H r   leftrighttopbottom)sizeset_position)r   r
   sidepos_dictr&   r   s    `  @@r   slide_inr1   &   s=    < 99DAqFGEHJH
 Xd^,,r   c                     | j                   \  | j                  z
  fdfdfdfdd}| j                  ||         S )a   Makes the clip go 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
      A video clip.

    duration
      Time taken for the clip to fully disappear.

    side
      Side of the screen where the clip goes. One of
      'top' | 'bottom' | 'left' | 'right'

    Examples
    =========

    >>> from moviepy.editor import *
    >>> clips = [... make a list of clips]
    >>> slided_clips = [CompositeVideoClip([
                            clip.fx(transfx.slide_out, duration=1, side='left')])
                        for clip in clips]
    >>> final_clip = concatenate( slided_clips, padding=-1)

    c                 4    t        d| z
   z  z        dfS Nr   r   r   r   r
   tsr   s    r   r   zslide_out.<locals>.<lambda>o   s#    C!qtWX-=*>$?#I r   c                 2    t        d| z
  z  z        dfS r4   r!   r5   s    r   r   zslide_out.<locals>.<lambda>p   s     S1qtXo+>%?$I r   c                 4    dt        d| z
   z  z        fS Nr   r   r   r   r
   r&   r6   s    r   r   zslide_out.<locals>.<lambda>q   s#    8C!qtWX5E2F,G"H r   c                 2    dt        d| z
  z  z        fS r9   r!   r:   s    r   r   zslide_out.<locals>.<lambda>r   s     Xc!A"h4G.H$I r   r(   )r-   r
   r.   )r   r
   r/   r0   r&   r6   r   s    `  @@@r   	slide_outr<   M   sL    @ ))CAa		!BIIHILH
 Xd^,,r   c                     | j                   }| j                  t        |      j                  ||z
        }t	        | |g      j                  ||      S )z Makes the clip fade in progressively at its own end, this way
    it can be looped indefinitely. ``cross`` is the duration in seconds
    of the fade-in.  )r
   r   r   	set_startr   subclip)r   cross_durationdclip2s       r   make_loopablerC   w   sI    
 	AGGK0::1~;MNEtUm,44^QGGr   N)__doc__moviepy.decoratorsr   r   moviepy.video.fx.fadeinr   moviepy.video.fx.fadeoutr   r   r   r   r1   r<   rC    r   r   <module>rI      s    C * , 2      $-N &- &-R H Hr   