
    W|h                     P    S SK Jr  S SKrS SKJr  S SKJr  \ " S S\5      5       rg)    )	dataclassN)Clip)Effectc                   D    \ rS rSr% Sr\\S'   Sr\\S'   S\	S\	4S jr
S	rg)
FadeOut	   a7  Makes the clip progressively fade to some color (black by default),
over ``duration`` seconds at the end of the clip. Can be used for masks too,
where the final color must be a number between 0 and 1.

For cross-fading (progressive appearance or disappearance of a clip over another
clip), see ``CrossFadeOut``
durationNfinal_colorclipreturnc                   ^ ^ TR                   c  [        S5      eT R                  c  TR                  (       a  SO/ SQT l        [        R
                  " T R                  5      T l        UU 4S jnTR                  U5      $ )zApply the effect to the clip.zAttribute 'duration' not setr   )r   r   r   c                    > TR                   U-
  TR                   :  a  U " U5      $ STR                   U-
  -  TR                   -  nX " U5      -  SU-
  TR                  -  -   $ )Ng      ?   )r	   r
   )	get_frametfadingr   selfs      R/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/FadeOut.pyfilterFadeOut.apply.<locals>.filter    sa    !dmm3 |# 12T]]B	!,F
d>N>N/NNN    )r	   
ValueErrorr
   is_masknparray	transform)r   r   r   s   `` r   applyFadeOut.apply   sc    == ;<<#$(LLqiD88D$4$45	O ~~f%%r   )r
   )__name__
__module____qualname____firstlineno____doc__float__annotations__r
   listr   r   __static_attributes__ r   r   r   r   	   s+     OK&$ &4 &r   r   )	dataclassesr   numpyr   moviepy.Clipr   moviepy.Effectr   r   r(   r   r   <module>r-      s,    !   ! &f & &r   