
     fh+                    2   d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
 ddl	mZ e G d d	                      Ze G d
 d                      Ze G d d                      Ze G d d                      Zd3dZd3dZd4dZd5dZd6dZd7dZd8d!Zd9d$Zd:d&Zd;d)Z ed*          e G d+ d,                                  Z ed-          e G d. d/                                  Z ed0          e G d1 d2                                  ZdS )<    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)runtimec                      e Zd ZU dZded<   ded<   ded<   ded<   ded	<   ded
<   ded<   ded<   dZded<   dZded<   d Zed             Z	dS )	Animationz
    Animation instance.
    strid_nameboolpaused_state
play_statefloatplayback_rate
start_timecurrent_timetype_Nz typing.Optional[AnimationEffect]sourcetyping.Optional[str]css_idc                *   t                      }| j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j	        | j	        
                                |d	<   | j        
| j        |d
<   |S )Nidr   pausedState	playStateplaybackRate	startTimecurrentTimetyper   cssId)dictr   r   r   r   r   r   r   r   r   to_jsonr   selfjsons     s/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/devtools/v85/animation.pyr$   zAnimation.to_json4   s    vvXT
yV"/] O[#1^ O["/]zV;"![0022DN;" KDM    c                    | t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   d	|v r t                              |d	                   nd d
|v rt          |d
                   nd 
  
        S )Nr   r   r   r   r   r   r    r!   r   r"   )
r   r   r   r   r   r   r   r   r   r   )r   r   r   AnimationEffect	from_jsonclsr'   s     r(   r,   zAnimation.from_jsonD   s    sDJT&\""d=1224,--^ 455T+.//tM233d6l##@HD@P@P?,,T(^<<<VZ)0D3tG}%%%d
 
 
 	
r)   )
__name__
__module____qualname____doc____annotations__r   r   r$   classmethodr,    r)   r(   r   r      s           HHH III  OOO    JJJ 04F3333 $(F''''    
 
 [
 
 
r)   r   c                      e Zd ZU dZded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   dZded<   dZded<   d Zed             Z	dS )r+   z"
    AnimationEffect instance
    r   delay	end_delayiteration_start
iterationsdurationr   	directionfilleasingNz"typing.Optional[dom.BackendNodeId]backend_node_idztyping.Optional[KeyframesRule]keyframes_rulec                N   t                      }| j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j	        | j	        
                                |d	<   | j        | j        
                                |d
<   |S )Nr7   endDelayiterationStartr:   r;   r<   r=   r>   backendNodeIdkeyframesRule)r#   r7   r8   r9   r:   r;   r<   r=   r>   r?   r$   r@   r%   s     r(   r$   zAnimationEffect.to_jsonw   s    vv
W>Z!%!5!_\=Z N[yVX+$($8$@$@$B$BD!*$($7$?$?$A$AD!r)   c                    | t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   d	|v r%t          j                            |d	                   nd d
|v r t
                              |d
                   nd 
  
        S )Nr7   rB   rC   r:   r;   r<   r=   r>   rD   rE   )
r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   )r   r   r   BackendNodeIdr,   KeyframesRuler-   s     r(   r,   zAnimationEffect.from_json   s    sW&&D,--!$'7"899T,/004
+,,${+,,T&\""tH~&&RaeiRiRiC-77_8MNNNosM\`dMdMd=2243HIIIjn
 
 
 	
r)   )
r/   r0   r1   r2   r3   r?   r@   r$   r4   r,   r5   r)   r(   r+   r+   T   s           LLL    OOO NNN III KKK ;?O>>>> 6:N9999    
 
 [
 
 
r)   r+   c                  H    e Zd ZU dZded<   dZded<   d Zed             ZdS )	rH   z
    Keyframes Rule
    ztyping.List[KeyframeStyle]	keyframesNr   r   c                l    t                      }d | j        D             |d<   | j        
| j        |d<   |S )Nc                6    g | ]}|                                 S r5   )r$   .0is     r(   
<listcomp>z)KeyframesRule.to_json.<locals>.<listcomp>   s     AAAQQYY[[AAAr)   rJ   r   )r#   rJ   r   r%   s     r(   r$   zKeyframesRule.to_json   s=    vvAA$.AAA[9 9DLr)   c                n     | d |d         D             d|v rt          |d                   nd           S )Nc                B    g | ]}t                               |          S r5   )KeyframeStyler,   rM   s     r(   rP   z+KeyframesRule.from_json.<locals>.<listcomp>   s&    MMMa}..q11MMMr)   rJ   r   )rJ   r   r   r-   s     r(   r,   zKeyframesRule.from_json   sM    sMM4;LMMM&,nnT&\"""$
 
 
 	
r)   )	r/   r0   r1   r2   r3   r   r$   r4   r,   r5   r)   r(   rH   rH      sk           *))) "&D%%%%   
 
 [
 
 
r)   rH   c                  D    e Zd ZU dZded<   ded<   d Zed             ZdS )rS   z
    Keyframe Style
    r   offsetr>   c                J    t                      }| j        |d<   | j        |d<   |S )NrV   r>   )r#   rV   r>   r%   s     r(   r$   zKeyframeStyle.to_json   s&    vvXXr)   c                h     | t          |d                   t          |d                             S )NrV   r>   )rV   r>   rT   r-   s     r(   r,   zKeyframeStyle.from_json   s9    stH~&&tH~&&
 
 
 	
r)   N)r/   r0   r1   r2   r3   r$   r4   r,   r5   r)   r(   rS   rS      s`           KKK KKK   
 
 [
 
 
r)   rS   return0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]c               #     K   ddi} | V }dS )z2
    Disables animation domain notifications.
    methodzAnimation.disableNr5   cmd_dictr'   s     r(   disabler_      s$      
 	%H >>DDDr)   c               #     K   ddi} | V }dS )z1
    Enables animation domain notifications.
    r\   zAnimation.enableNr5   r]   s     r(   enablera      s$      
 	$H >>DDDr)   r   r   1typing.Generator[T_JSON_DICT, T_JSON_DICT, float]c              #  h   K   t                      }| |d<   d|d}|V }t          |d                   S )z
    Returns the current time of the an animation.

    :param id_: Id of animation.
    :returns: Current time of the page.
    r   zAnimation.getCurrentTimer\   paramsr    )r#   r   )r   re   r^   r'   s       r(   get_current_timerf      sJ       &&FF4L, H >>Dm$%%%r)   c               #  @   K   ddi} | V }t          |d                   S )zo
    Gets the playback rate of the document timeline.

    :returns: Playback rate for animations on page.
    r\   zAnimation.getPlaybackRater   )r   r]   s     r(   get_playback_raterh      s3       	-H >>Dn%&&&r)   
animationstyping.List[str]c              #  V   K   t                      }d | D             |d<   d|d}|V }dS )zz
    Releases a set of animations to no longer be manipulated.

    :param animations: List of animation ids to seek.
    c                    g | ]}|S r5   r5   rM   s     r(   rP   z&release_animations.<locals>.<listcomp>      222!A222r)   ri   zAnimation.releaseAnimationsrd   Nr#   )ri   re   r^   r'   s       r(   release_animationsro      sJ       &&F22z222F</ H >>DDDr)   animation_id@typing.Generator[T_JSON_DICT, T_JSON_DICT, runtime.RemoteObject]c              #     K   t                      }| |d<   d|d}|V }t          j                            |d                   S )z
    Gets the remote object of the Animation.

    :param animation_id: Animation id.
    :returns: Corresponding remote object.
    animationIdzAnimation.resolveAnimationrd   remoteObject)r#   r	   RemoteObjectr,   )rp   re   r^   r'   s       r(   resolve_animationrv     sT       &&F(F=. H >>D))$~*>???r)   r   r   c              #  `   K   t                      }d | D             |d<   ||d<   d|d}|V }dS )z
    Seek a set of animations to a particular time within each animation.

    :param animations: List of animation ids to seek.
    :param current_time: Set the current time of each animation.
    c                    g | ]}|S r5   r5   rM   s     r(   rP   z#seek_animations.<locals>.<listcomp>-  rm   r)   ri   r    zAnimation.seekAnimationsrd   Nrn   )ri   r   re   r^   r'   s        r(   seek_animationsry   "  sT       &&F22z222F<(F=, H >>DDDr)   pausedr   c              #  `   K   t                      }d | D             |d<   ||d<   d|d}|V }dS )z
    Sets the paused state of a set of animations.

    :param animations: Animations to set the pause state of.
    :param paused: Paused state to set to.
    c                    g | ]}|S r5   r5   rM   s     r(   rP   zset_paused.<locals>.<listcomp>A  rm   r)   ri   rz   zAnimation.setPausedrd   Nrn   )ri   rz   re   r^   r'   s        r(   
set_pausedr}   6  sT       &&F22z222F<F8' H >>DDDr)   r   c              #  B   K   t                      }| |d<   d|d}|V }dS )zz
    Sets the playback rate of the document timeline.

    :param playback_rate: Playback rate for animations on page
    r   zAnimation.setPlaybackRaterd   Nrn   )r   re   r^   r'   s       r(   set_playback_rater   J  s<       &&F*F>- H >>DDDr)   r;   r7   c              #  V   K   t                      }| |d<   ||d<   ||d<   d|d}|V }dS )z
    Sets the timing of an animation node.

    :param animation_id: Animation id.
    :param duration: Duration of the animation.
    :param delay: Delay of the animation.
    rs   r;   r7   zAnimation.setTimingrd   Nrn   )rp   r;   r7   re   r^   r'   s         r(   
set_timingr   [  sO       &&F(F=!F:F7O' H >>DDDr)   zAnimation.animationCanceledc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationCanceledz9
    Event for when an animation has been cancelled.
    r   r   r'   r   rY   c                @     | t          |d                             S Nr   )r   rT   r-   s     r(   r,   zAnimationCanceled.from_json{  (    sDJ
 
 
 	
r)   N)r'   r   rY   r   r/   r0   r1   r2   r3   r4   r,   r5   r)   r(   r   r   r  I           HHH
 
 
 [
 
 
r)   r   zAnimation.animationCreatedc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationCreatedz9
    Event for each animation that has been created.
    r   r   r'   r   rY   c                @     | t          |d                             S r   rT   r-   s     r(   r,   zAnimationCreated.from_json  r   r)   N)r'   r   rY   r   r   r5   r)   r(   r   r     r   r)   r   zAnimation.animationStartedc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationStartedz4
    Event for animation that has been started.
    r   	animationr'   r   rY   c                V     | t                               |d                             S )Nr   )r   )r   r,   r-   s     r(   r,   zAnimationStarted.from_json  s1    s))${*;<<
 
 
 	
r)   N)r'   r   rY   r   r   r5   r)   r(   r   r     sL           
 
 
 [
 
 
r)   r   )rY   rZ   )r   r   rY   rb   )rY   rb   )ri   rj   rY   rZ   )rp   r   rY   rq   )ri   rj   r   r   rY   rZ   )ri   rj   rz   r   rY   rZ   )r   r   rY   rZ   )rp   r   r;   r   r7   r   rY   rZ   )
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r   r+   rH   rS   r_   ra   rf   rh   ro   rv   ry   r}   r   r   r   r   r   r5   r)   r(   <module>r      s   # " " " " " * * * * * * * * ! ! ! ! ! !               @
 @
 @
 @
 @
 @
 @
 @
F ?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
D 
 
 
 
 
 
 
 
2 
 
 
 
 
 
 
 
0      & & & &&
' 
' 
' 
'   "@ @ @ @&   (   (   "   . *++

 
 
 
 
 
 
  ,+
 )**

 
 
 
 
 
 
  +*
 )**

 
 
 
 
 
 
  +*
 
 
r)   