
    ,hP                   R	   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  G d d	e      Z G d
 dej                        Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d  d!             Z G d" d#ej                        Ze G d$ d%             Ze G d& d'             Ze G d( d)             Ze G d* d+             Ze G d, d-             Z e G d. d/             Z!e G d0 d1             Z"e G d2 d3             Z#e G d4 d5             Z$e G d6 d7             Z%e G d8 d9             Z&e G d: d;             Z'e G d< d=             Z(e G d> d?             Z)e G d@ dA             Z*e G dB dC             Z+e G dD dE             Z,e G dF dG             Z-e G dH dI             Z.e G dJ dK             Z/e G dL dM             Z0e G dN dO             Z1e G dP dQ             Z2e G dR dS             Z3e G dT dU             Z4e G dV dW             Z5e G dX dY             Z6e G dZ d[             Z7e G d\ d]             Z8e G d^ d_             Z9	 d	 	 	 	 	 	 	 	 	 dd`Z:	 	 	 	 ddaZ;	 d	 	 	 	 	 ddbZ<ddcZ=dddZ>	 	 	 	 	 	 ddeZ?	 	 	 	 	 	 ddfZ@	 	 	 	 ddgZA	 	 	 	 ddhZB	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddiZC	 	 	 	 	 	 ddjZD	 	 	 	 ddkZE	 	 	 	 ddlZF	 	 	 	 ddmZGddnZH	 	 	 	 ddoZI	 	 	 	 ddpZJ	 	 	 	 ddqZK	 	 	 	 	 	 ddrZL	 d	 	 	 ddsZM	 	 	 	 ddtZNdduZO	 	 	 	 	 	 	 	 ddvZP	 	 	 	 	 	 	 	 ddwZQ	 	 	 	 	 	 	 	 ddxZR	 	 	 	 	 	 	 	 ddyZS	 	 	 	 	 	 	 	 ddzZT	 	 	 	 	 	 	 	 dd{ZU	 	 	 	 	 	 	 	 dd|ZV	 	 	 	 	 	 	 	 dd}ZW	 	 	 	 	 	 dd~ZX	 d	 	 	 	 	 ddZYddZZddZ[ddZ\	 	 	 	 ddZ] ed      e G d d                    Z^ ed      e G d d                    Z_ ed      e G d d                    Z` ed      e G d d                    Za ed      e G d d                    Zb ed      e G d d                    Zcy)    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)pagec                  8     e Zd ZddZedd       Z fdZ xZS )StyleSheetIdc                    | S N selfs    m/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v136/css.pyto_jsonzStyleSheetId.to_json   s        c                     | |      S r   r   clsjsons     r   	from_jsonzStyleSheetId.from_json       4yr   c                >    dj                  t        | 	               S )NzStyleSheetId({}))formatsuper__repr__)r   	__class__s    r   r   zStyleSheetId.__repr__   s    !(()9);<<r   )returnstr)r   r    r   r   )__name__
__module____qualname__r   classmethodr   r   __classcell__)r   s   @r   r   r      s&      = =r   r   c                  6    e Zd ZdZdZdZdZdZd Ze	d        Z
y)	StyleSheetOrigina  
    Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent
    stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via
    inspector" rules), "regular" for regular stylesheets.
    injectedz
user-agent	inspectorregularc                    | j                   S r   valuer   s    r   r   zStyleSheetOrigin.to_json'       zzr   c                     | |      S r   r   r   s     r   r   zStyleSheetOrigin.from_json*   r   r   N)r!   r"   r#   __doc__INJECTED
USER_AGENT	INSPECTORREGULARr   r$   r   r   r   r   r'   r'      s6    
 HJIG  r   r'   c                  J    e Zd ZU dZded<   ded<   dZded<   d	 Zed
        Zy)PseudoElementMatchesz8
    CSS rule collection for a single pseudo style.
    zdom.PseudoTypepseudo_typetyping.List[RuleMatch]matchesNtyping.Optional[str]pseudo_identifierc                    t               }| j                  j                         |d<   | j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   |S c c}w )N
pseudoTyper9   pseudoIdentifier)dictr7   r   r9   r;   r   r   is      r   r   zPseudoElementMatches.to_json=   sg    v!--557\04=1199;=Y!!-'+'='=D#$ >s   A0c           	          | t         j                  j                  |d         |d   D cg c]  }t        j                  |       c}d|v rt	        |d               S d       S c c}w )Nr=   r9   r>   )r7   r9   r;   )r   
PseudoTyper   	RuleMatchr    r   r   rA   s      r   r   zPseudoElementMatches.from_jsonE   sm    00l1CD59)_EY((+E?QUY?Yc$'9":;
 	
 `d
 	
Es   A'
)	r!   r"   r#   r0   __annotations__r;   r   r$   r   r   r   r   r6   r6   /   s>       $# /3+2 
 
r   r6   c                  @    e Zd ZU dZded<   dZded<   d Zed        Zy)	CSSAnimationStylezJ
    CSS style coming from animations with the name of the animation.
    CSSStylestyleNr:   namec                    t               }| j                  j                         |d<   | j                  | j                  |d<   |S )NrJ   rK   )r?   rJ   r   rK   r   r   s     r   r   zCSSAnimationStyle.to_jsonY   s;    v

**,W99 99DLr   c                p     | t         j                  |d         d|v rt        |d               S d       S )NrJ   rK   )rJ   rK   )rI   r   r    r   s     r   r   zCSSAnimationStyle.from_json`   s@    $$T']3&,nT&\"
 	
:>
 	
r   )	r!   r"   r#   r0   rF   rK   r   r$   r   r   r   r   rH   rH   N   s4     O "&D
% 
 
r   rH   c                  @    e Zd ZU dZded<   dZded<   d Zed        Zy)	InheritedStyleEntryz;
    Inherited CSS rule collection from ancestor node.
    r8   matched_css_rulesNtyping.Optional[CSSStyle]inline_stylec                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  | j                  j                         |d<   |S c c}w )NmatchedCSSRulesinlineStyle)r?   rQ   r   rS   r@   s      r   r   zInheritedStyleEntry.to_jsons   s[    v8<8N8N"O1199;"O("&"3"3";";"=D #Ps   A!c                     | |d   D cg c]  }t         j                  |       c}d|v rt        j                  |d               S d       S c c}w )NrU   rV   )rQ   rS   )rD   r   rI   rE   s      r   r   zInheritedStyleEntry.from_jsonz   sY    ?CDU?VW!y2215WDQUYDY++D,?@
 	
_c
 	
Ws   A)	r!   r"   r#   r0   rF   rS   r   r$   r   r   r   r   rP   rP   h   s5     .- /3L+2 
 
r   rP   c                  D    e Zd ZU dZdZded<   dZded<   d Zed        Z	y)	InheritedAnimatedStyleEntryzP
    Inherited CSS style collection for animated styles from ancestor node.
    Nz/typing.Optional[typing.List[CSSAnimationStyle]]animation_stylesrR   transitions_stylec                    t               }| j                  +| j                  D cg c]  }|j                          c}|d<   | j                  | j                  j                         |d<   |S c c}w )NanimationStylestransitionsStyle)r?   rZ   r   r[   r@   s      r   r   z#InheritedAnimatedStyleEntry.to_json   sh    v  ,<@<Q<Q&Rqqyy{&RD"#!!-'+'='='E'E'GD#$ 'Ss   A-c                     | d|v r&|d   D cg c]  }t         j                  |       c}nd d|v rt        j                  |d               S d       S c c}w )Nr]   r^   )rZ   r[   )rH   r   rI   rE   s      r   r   z%InheritedAnimatedStyleEntry.from_json   sj    bsw{b{dK\F]^/99!<^  BFN`dhNhh006H1IJ
 	
nr
 	
^s   A)
r!   r"   r#   r0   rZ   rF   r[   r   r$   r   r   r   r   rY   rY      s>     IMEL 4807 
 
r   rY   c                  2    e Zd ZU dZded<   d Zed        Zy)InheritedPseudoElementMatcheszL
    Inherited pseudo element matches from pseudos of an ancestor node.
    z!typing.List[PseudoElementMatches]pseudo_elementsc                z    t               }| j                  D cg c]  }|j                          c}|d<   |S c c}w )NpseudoElements)r?   rb   r   r@   s      r   r   z%InheritedPseudoElementMatches.to_json   s6    v7;7K7K!L!!))+!L "Ms   8c                f     | |d   D cg c]  }t         j                  |       c}      S c c}w )Nrd   )rb   )r6   r   rE   s      r   r   z'InheritedPseudoElementMatches.from_json   s2    HLM]H^_11;;A>_
 	
_s   .Nr!   r"   r#   r0   rF   r   r$   r   r   r   r   ra   ra      s(     76
 
 
r   ra   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	rD   z$
    Match data for a CSS rule.
    CSSRuleruleztyping.List[int]matching_selectorsc                    t               }| j                  j                         |d<   | j                  D cg c]  }| c}|d<   |S c c}w )Nri   matchingSelectors)r?   ri   r   rj   r@   s      r   r   zRuleMatch.to_json   sF    vyy((*V040G0G$H1Q$H ! %Is   	Ac           	          | t         j                  |d         |d   D cg c]  }t        |       c}      S c c}w )Nri   rl   )ri   rj   )rh   r   intrE   s      r   r   zRuleMatch.from_json   s<    ""4<0045H0IJ1AJ
 	
Js   ;
Nrf   r   r   r   rD   rD      s/     M )( 
 
r   rD   c                  N    e Zd ZU dZded<   dZded<   dZded<   d	 Zed
        Z	y)ValuezX
    Data for a simple selector (these are delimited by commas in a selector list).
    r    textNtyping.Optional[SourceRange]range_ztyping.Optional[Specificity]specificityc                    t               }| j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S )Nrq   rangert   )r?   rq   rs   r   rt   rM   s     r   r   zValue.to_json   s`    vyyV;;" KK//1DM'"&"2"2":":"<Dr   c                     | t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d               S d       S )Nrq   rv   rt   )rq   rs   rt   )r    SourceRanger   Specificityr   s     r   r   zValue.from_json   sb    T&\";Bd?;((g7PTFSW[F[--d=.AB
 	
 bf
 	
r   )
r!   r"   r#   r0   rF   rs   rt   r   r$   r   r   r   r   rp   rp      sA     I ,0F(/ 15K-4 
 
r   rp   c                  F    e Zd ZU dZded<   ded<   ded<   d Zed        Zy)	ry   zP
    Specificity:
    https://drafts.csswg.org/selectors/#specificity-rules
    rn   abcc                t    t               }| j                  |d<   | j                  |d<   | j                  |d<   |S )Nr{   r|   r}   )r?   r{   r|   r}   rM   s     r   r   zSpecificity.to_json   s5    vFFS	FFS	FFS	r   c                `     | t        |d         t        |d         t        |d               S )Nr{   r|   r}   )r{   r|   r}   rn   r   s     r   r   zSpecificity.from_json  s0    $s)n$s)n$s)n
 	
r   Nrf   r   r   r   ry   ry      s5    
 F F F 
 
r   ry   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	SelectorListz
    Selector list data.
    ztyping.List[Value]	selectorsr    rq   c                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  |d<   |S c c}w )Nr   rq   )r?   r   r   rq   r@   s      r   r   zSelectorList.to_json  s@    v26..AQQYY[A[yyV B   Ac                     | |d   D cg c]  }t         j                  |       c}t        |d               S c c}w )Nr   rq   )r   rq   )rp   r   r    rE   s      r   r   zSelectorList.from_json  s:    373DEauq)ET&\"
 	
E   ;Nrf   r   r   r   r   r   
  s/     "! I 
 
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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ded<   dZded<   d Z	e
d        Zy) CSSStyleSheetHeaderz)
    CSS stylesheet metainformation.
    r   style_sheet_idpage.FrameIdframe_idr    
source_urlr'   origintitlebooldisabled	is_inline
is_mutableis_constructedfloat
start_linestart_columnlengthend_line
end_columnNr:   source_map_urlz"typing.Optional[dom.BackendNodeId]
owner_nodetyping.Optional[bool]has_source_urlloading_failedc                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  |d<   | j
                  j                         |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  |d	<   | j                  |d
<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                   | j                   |d<   | j"                  | j"                  j                         |d<   | j$                  | j$                  |d<   | j&                  | j&                  |d<   |S )NstyleSheetIdframeId	sourceURLr   r   r   isInline	isMutableisConstructed	startLinestartColumnr   endLine	endColumnsourceMapURL	ownerNodehasSourceURLloadingFailed)r?   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rM   s     r   r   zCSSStyleSheetHeader.to_jsone  sc   v#22::<^--//1Y OO[,,.X

W==Z>>Z OO[ $ 3 3_ OO["//]X--Y OO[*#'#6#6D ??& $ 7 7 9D*#'#6#6D *$($7$7D!r   c           	         | d!i dt         j                  |d         dt        j                  j                  |d         dt	        |d         dt
        j                  |d         dt	        |d         d	t        |d	         d
t        |d         dt        |d         dt        |d         dt        |d         dt        |d         dt        |d         dt        |d         dt        |d         dd|v rt	        |d         nd dd|v r"t        j                  j                  |d         nd dd|v rt        |d         nd dd |v rt        |d          S 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   r   r   r   r   r   r   r   r   r   r   )
r   r   r	   FrameIdr    r'   r   r   r   BackendNodeIdr   s     r   r   zCSSStyleSheetHeader.from_json  s    
'11$~2FG
\\++DO<
 4,-
 $--d8n=	

 d7m$
 $z*+
 4
+,
 D-.
  _ 56
 T+./
 tM23
 h(
 4	?+
 T+./
 9G$8N3tN34TX
  JUX\I\s((2243DEbf!
" :H49O4^ 45UY#
$ ;JT:Q4_ 56%
 	
$ X\%
 	
r   )r!   r"   r#   r0   rF   r   r   r   r   r   r$   r   r   r   r   r   r   #  s     !  
 O  J N O     M O  ,0N(/ 6:J29 -1N)0 -1N)04 
 
r   r   c                      e Zd ZU dZded<   ded<   ded<   dZd	ed
<   dZded<   dZded<   dZded<   dZ	ded<   dZ
ded<   dZded<   dZded<   dZded<   d Zed        Zy)rh   z"
    CSS rule representation.
    r   selector_listr'   r   rI   rJ   Ntyping.Optional[StyleSheetId]r   z!typing.Optional[typing.List[str]]nesting_selectorsz&typing.Optional[typing.List[CSSMedia]]mediaz/typing.Optional[typing.List[CSSContainerQuery]]container_queriesz)typing.Optional[typing.List[CSSSupports]]supportsz&typing.Optional[typing.List[CSSLayer]]layersz&typing.Optional[typing.List[CSSScope]]scopesz)typing.Optional[typing.List[CSSRuleType]]
rule_typesz.typing.Optional[typing.List[CSSStartingStyle]]starting_stylesc                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  | j
                  j                         |d<   | j                  | j                  D cg c]  }| c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d	<   | j                  +| j                  D cg c]  }|j                          c}|d
<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d<   |S c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w )NselectorListr   rJ   r   nestingSelectorsr   containerQueriesr   r   r   	ruleTypesstartingStyles)r?   r   r   r   rJ   r   r   r   r   r   r   r   r   r   r@   s      r   r   zCSSRule.to_json  s   v#1199;^,,.X

**,W*#'#6#6#>#>#@D !!-373I3I'Ja'JD#$::!26**=QQYY[=DM!!-=A=S=S'T		'TD#$==$59]]C		CD;;"37;;?aaiik?DN;;"37;;?aaiik?DN??&6:oo F FD+;?;O;O%Paaiik%PD!" (K='TC?? F%Ps0   %	H7H<I<I3I*I!IIc                    | t         j                  |d         t        j                  |d         t        j                  |d         d|v rt        j                  |d         nd d|v r|d   D cg c]  }t        |       c}nd d|v r&|d   D cg c]  }t        j                  |       c}nd d|v r&|d   D cg c]  }t        j                  |       c}nd d|v r&|d   D cg c]  }t        j                  |       c}nd d	|v r&|d	   D cg c]  }t        j                  |       c}nd d
|v r&|d
   D cg c]  }t        j                  |       c}nd d|v r&|d   D cg c]  }t        j                  |       c}nd d|v r+|d   D cg c]  }t        j                  |       c}      S d       S c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w )Nr   r   rJ   r   r   r   r   r   r   r   r   r   )r   r   rJ   r   r   r   r   r   r   r   r   r   )r   r   r'   rI   r   r    CSSMediaCSSContainerQueryCSSSupportsCSSLayerCSSScopeCSSRuleTypeCSSStartingStylerE   s      r   r   zCSSRule.from_json  s   &00n1EF#--d8n=$$T']3KY]aKa<11$~2FGgkL^bfLft4F/GH!s1vHlpDKtO$w-@Q8%%a(@Y]dvz~d~tL^G_`!0::1=`  EIMW[_M_Z8HI1k++A.IeiFNRVFV4>BaH&&q)B\`FNRVFV4>BaH&&q)B\`P[_cPc${:KLQ--a0Lim_osw_wDIYDZ[q-77:[
 	
 ~B
 	

 I@`IBBL[s0   0F>G<G'GG=G(GG!)r!   r"   r#   r0   rF   r   r   r   r   r   r   r   r   r   r   r$   r   r   r   r   rh   rh     s        O 59N18 <@8? 59E18 JNFM ;?H7> 6:F29 6:F29 =AJ9@ GKOCJ2 
 
r   rh   c                  B    e Zd ZdZdZdZdZdZdZdZ	dZ
d	 Zed
        Zy)r   z
    Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.
    This list only contains rule types that are collected during the ancestor rule collection.
    	MediaRuleSupportsRuleContainerRule	LayerRule	ScopeRule	StyleRuleStartingStyleRulec                    | j                   S r   r,   r   s    r   r   zCSSRuleType.to_json  r.   r   c                     | |      S r   r   r   s     r   r   zCSSRuleType.from_json  r   r   N)r!   r"   r#   r0   
MEDIA_RULESUPPORTS_RULECONTAINER_RULE
LAYER_RULE
SCOPE_RULE
STYLE_RULESTARTING_STYLE_RULEr   r$   r   r   r   r   r   r     sF     J"M$NJJJ-  r   r   c                  P    e Zd ZU dZded<   ded<   ded<   ded<   d	 Zed
        Zy)	RuleUsagez#
    CSS coverage information.
    r   r   r   start_offset
end_offsetr   usedc                    t               }| j                  j                         |d<   | j                  |d<   | j                  |d<   | j
                  |d<   |S )Nr   startOffset	endOffsetr   )r?   r   r   r   r   r   rM   s     r   r   zRuleUsage.to_json  sR    v#22::<^"//] OO[yyVr   c           	          | t         j                  |d         t        |d         t        |d         t        |d               S )Nr   r   r   r   )r   r   r   r   )r   r   r   r   r   s     r   r   zRuleUsage.from_json!  sH    '11$~2FGtM23T+./d6l#	
 	
r   Nrf   r   r   r   r   r     s?    
 !    J 
 
r   r   c                  P    e Zd ZU dZded<   ded<   ded<   ded<   d Zed        Zy	)
rx   zC
    Text range within a resource. All numbers are zero-based.
    rn   r   r   r   r   c                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   |S )Nr   r   r   r   )r?   r   r   r   r   rM   s     r   r   zSourceRange.to_json<  sG    v OO["//]--Y OO[r   c           	     z     | t        |d         t        |d         t        |d         t        |d               S )Nr   r   r   r   )r   r   r   r   r   r   s     r   r   zSourceRange.from_jsonD  sB    4,-T-01i)4,-	
 	
r   Nrf   r   r   r   rx   rx   +  s=     O  M O 
 
r   rx   c                  F    e Zd ZU ded<   ded<   dZded<   d Zed        Zy)	ShorthandEntryr    rK   r-   Nr   	importantc                    t               }| j                  |d<   | j                  |d<   | j                  | j                  |d<   |S )NrK   r-   r   )r?   rK   r-   r   rM   s     r   r   zShorthandEntry.to_jsonY  s@    vyyV

W>>% $Dr   c                v     | t        |d         t        |d         d|v rt        |d               S d       S )NrK   r-   r   )rK   r-   r   )r    r   r   s     r   r   zShorthandEntry.from_jsona  sL    T&\"d7m$1<1Dd4,-
 	
 KO
 	
r   )r!   r"   r#   rF   r   r   r$   r   r   r   r   r   r   N  s6     I J (,I$+ 
 
r   r   c                  8    e Zd ZU ded<   ded<   d Zed        Zy)CSSComputedStylePropertyr    rK   r-   c                V    t               }| j                  |d<   | j                  |d<   |S )NrK   r-   )r?   rK   r-   rM   s     r   r   z CSSComputedStyleProperty.to_jsonr  s(    vyyV

Wr   c                F     | t        |d         t        |d               S )NrK   r-   )rK   r-   r    r   s     r   r   z"CSSComputedStyleProperty.from_jsonx  s'    T&\"d7m$
 	
r   N)r!   r"   r#   rF   r   r$   r   r   r   r   r   r   j  s)     I J 
 
r   r   c                  f    e Zd ZU dZded<   ded<   dZded<   dZd	ed
<   dZded<   d Ze	d        Z
y)rI   z#
    CSS style representation.
    ztyping.List[CSSProperty]css_propertiesztyping.List[ShorthandEntry]shorthand_entriesNr   r   r:   css_textrr   rs   c                   t               }| j                  D cg c]  }|j                          c}|d<   | j                  D cg c]  }|j                          c}|d<   | j                  | j                  j                         |d<   | j
                  | j
                  |d<   | j                  | j                  j                         |d<   |S c c}w c c}w )NcssPropertiesshorthandEntriesr   cssTextrv   )r?   r   r   r   r   r   rs   r@   s      r   r   zCSSStyle.to_json  s    v6:6I6I J J_9=9O9O#PAAIIK#P *#'#6#6#>#>#@D ==$"mmDO;;" KK//1DM !K#Ps   CCc           
     ^    | |d   D cg c]  }t         j                  |       c}|d   D cg c]  }t        j                  |       c}d|v rt        j                  |d         nd d|v rt	        |d         nd d|v rt
        j                  |d               S d       S c c}w c c}w )Nr   r   r   r   rv   )r   r   r   r   rs   )CSSPropertyr   r   r   r    rx   rE   s      r   r   zCSSStyle.from_json  s    >B?>STK11!4TDHI[D\]q~77:]KY]aKa<11$~2FGgk-6$->Si)D;Bd?;((g7
 	

 QU
 	
T]s
   B%B*
)r!   r"   r#   r0   rF   r   r   rs   r   r$   r   r   r   r   rI   rI     sW     -, 32 59N18 &*H") ,0F(/
 
 
r   rI   c                      e Zd ZU dZded<   ded<   dZded<   dZded<   dZd	ed
<   dZded<   dZ	ded<   dZ
ded<   dZded<   d Zed        Zy)r   z(
    CSS property declaration data.
    r    rK   r-   Nr   r   implicitr:   rq   	parsed_okr   rr   rs   z)typing.Optional[typing.List[CSSProperty]]longhand_propertiesc                .   t               }| j                  |d<   | j                  |d<   | j                  | j                  |d<   | j                  | j                  |d<   | j
                  | j
                  |d<   | j                  | j                  |d<   | j                  | j                  |d<   | j                  | j                  j                         |d<   | j                  +| j                  D cg c]  }|j                          c}|d	<   |S c c}w )
NrK   r-   r   r   rq   parsedOkr   rv   longhandProperties)r?   rK   r-   r   r   rq   r   r   rs   r   r   r@   s      r   r   zCSSProperty.to_json  s    vyyV

W>>% $D==$#}}D99 99DL>>%#~~D==$#}}D;;" KK//1DM##/?C?W?W)X!!))+)XD%& *Ys   3Dc                    | t        |d         t        |d         d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d         nd d|v rt        j                  |d         nd d	|v r+|d	   D cg c]  }t        j                  |       c}
	      S d 
	      S c c}w )NrK   r-   r   r   rq   r  r   rv   r  )	rK   r-   r   r   rq   r   r   rs   r   )r    r   rx   r   r   rE   s      r   r   zCSSProperty.from_json  s    T&\"d7m$1<1Dd4,-$/9T/AT$z*+t&,nT&\"$0:d0Bd4
+,/9T/AT$z*+t;Bd?;((g7PTbvz~b~4H\C] ^a!6!6q!9 ^

 
	
 EI

 
	
 !_s   $C)r!   r"   r#   r0   rF   r   r   rq   r   r   rs   r   r   r$   r   r   r   r   r   r     s     I J (,I$+ '+H#* "&D
% (,I$+ '+H#* ,0F(/ FJBI( 
 
r   r   c                  t    e Zd ZU dZded<   ded<   dZded<   dZded	<   dZd
ed<   dZded<   d Z	e
d        Zy)r   z$
    CSS media rule descriptor.
    r    rq   sourceNr:   r   rr   rs   r   r   z(typing.Optional[typing.List[MediaQuery]]
media_listc                   t               }| j                  |d<   | j                  |d<   | j                  | j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   | j                  +| j                  D cg c]  }|j                          c}|d<   |S c c}w )Nrq   r  r   rv   r   	mediaList)r?   rq   r  r   rs   r   r   r  r@   s      r   r   zCSSMedia.to_json  s    vyyVX??& $D;;" KK//1DM*#'#6#6#>#>#@D ??&6:oo F FD !Gs   0Cc                J    | t        |d         t        |d         d|v rt        |d         nd d|v rt        j                  |d         nd d|v rt        j                  |d         nd d|v r+|d   D cg c]  }t        j                  |       c}      S d       S c c}w )Nrq   r  r   rv   r   r  )rq   r  r   rs   r   r  )r    rx   r   r   
MediaQueryrE   s      r   r   zCSSMedia.from_json  s    T&\"tH~&1<1Ds4,-$;Bd?;((g7PTKY]aKa<11$~2FGgkOZ^bObk9JKA
,,Q/K
 	
 im
 	
 Ls   5B )r!   r"   r#   r0   rF   r   rs   r   r  r   r$   r   r   r   r   r   r     sc     I K (,J$+ ,0F(/ 59N18 <@J8? 
 
r   r   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	r
  z!
    Media query descriptor.
    z!typing.List[MediaQueryExpression]expressionsr   activec                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  |d<   |S c c}w )Nr  r  )r?   r  r   r  r@   s      r   r   zMediaQuery.to_json0  sB    v484D4DEqqyy{E]X Fr   c                     | |d   D cg c]  }t         j                  |       c}t        |d               S c c}w )Nr  r  )r  r  )MediaQueryExpressionr   r   rE   s      r   r   zMediaQuery.from_json6  s=    DHDWXq-77:XX'
 	
Xr   Nrf   r   r   r   r
  r
  %  s/     32 L 
 
r   r
  c                  b    e Zd ZU dZded<   ded<   ded<   dZded	<   dZd
ed<   d Zed        Z	y)r  z,
    Media query expression descriptor.
    r   r-   r    unitfeatureNrr   value_rangeztyping.Optional[float]computed_lengthc                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  |d<   |S )Nr-   r  r  
valueRangecomputedLength)r?   r-   r  r  r  r   r  rM   s     r   r   zMediaQueryExpression.to_jsonR  sw    v

WyyV,,Y'!%!1!1!9!9!;D+%)%9%9D!"r   c           
          | t        |d         t        |d         t        |d         d|v rt        j                  |d         nd d|v rt        |d               S d       S )Nr-   r  r  r  r  )r-   r  r  r  r  )r   r    rx   r   r   s     r   r   zMediaQueryExpression.from_json]  sx    W&T&\"Y(EQUYEY--d<.@A_c=MQU=UE$'7"89
 	

 \`
 	
r   )
r!   r"   r#   r0   rF   r  r  r   r$   r   r   r   r   r  r  >  sO     L I L 15K-4 /3O+2	 
 
r   r  c                      e Zd ZU dZded<   dZded<   dZded<   dZd	ed
<   dZded<   dZ	ded<   dZ
ded<   d Zed        Zy)r   z.
    CSS container query rule descriptor.
    r    rq   Nrr   rs   r   r   r:   rK   z!typing.Optional[dom.PhysicalAxes]physical_axesz typing.Optional[dom.LogicalAxes]logical_axesr   queries_scroll_statec                   t               }| j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   | j
                  | j
                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   | j                  | j                  |d<   |S )Nrq   rv   r   rK   physicalAxeslogicalAxesqueriesScrollState)	r?   rq   rs   r   r   rK   r  r  r  rM   s     r   r   zCSSContainerQuery.to_json  s    vyyV;;" KK//1DM*#'#6#6#>#>#@D 99 99DL)#'#5#5#=#=#?D ("&"3"3";";"=D$$0)-)B)BD%&r   c                    | t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d         nd d|v rt        |d         nd d|v r"t        j
                  j                  |d         nd d|v r"t        j                  j                  |d         nd d|v rt        |d               S d       S )	Nrq   rv   r   rK   r  r   r!  )rq   rs   r   rK   r  r  r  )r    rx   r   r   r   PhysicalAxesLogicalAxesr   r   s     r   r   zCSSContainerQuery.from_json  s    T&\";Bd?;((g7PTKY]aKa<11$~2FGgk&,nT&\"$N\`dNd#**44T.5IJjnKX\`K`2243FGfjEY]aEad+?&@!A
 	
 hl
 	
r   )r!   r"   r#   r0   rF   rs   r   rK   r  r  r  r   r$   r   r   r   r   r   r   h  sv     I ,0F(/ 59N18 "&D
% 8<M4; 6:L29 37/6" 	
 	
r   r   c                  X    e Zd ZU dZded<   ded<   dZded<   dZd	ed
<   d Zed        Z	y)r   z*
    CSS Supports at-rule descriptor.
    r    rq   r   r  Nrr   rs   r   r   c                    t               }| j                  |d<   | j                  |d<   | j                  | j                  j	                         |d<   | j
                  | j
                  j	                         |d<   |S )Nrq   r  rv   r   )r?   rq   r  rs   r   r   rM   s     r   r   zCSSSupports.to_json  sm    vyyVX;;" KK//1DM*#'#6#6#>#>#@D r   c           	          | t        |d         t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d               S d       S )Nrq   r  rv   r   )rq   r  rs   r   )r    r   rx   r   r   r   s     r   r   zCSSSupports.from_json  sn    T&\"X';Bd?;((g7PTKY]aKa<11$~2FG	
 	
 hl	
 	
r   
r!   r"   r#   r0   rF   rs   r   r   r$   r   r   r   r   r   r     sH     I L ,0F(/ 59N18 
 
r   r   c                  N    e Zd ZU dZded<   dZded<   dZded<   d	 Zed
        Z	y)r   z'
    CSS Scope at-rule descriptor.
    r    rq   Nrr   rs   r   r   c                    t               }| j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S Nrq   rv   r   r?   rq   rs   r   r   rM   s     r   r   zCSSScope.to_json  `    vyyV;;" KK//1DM*#'#6#6#>#>#@D r   c                     | t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d               S d       S Nrq   rv   r   )rq   rs   r   r    rx   r   r   r   s     r   r   zCSSScope.from_json  b    T&\";Bd?;((g7PTKY]aKa<11$~2FG
 	
 hl
 	
r   r(  r   r   r   r   r     A     I ,0F(/ 59N18 
 
r   r   c                  N    e Zd ZU dZded<   dZded<   dZded<   d	 Zed
        Z	y)r   z'
    CSS Layer at-rule descriptor.
    r    rq   Nrr   rs   r   r   c                    t               }| j                  |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S r+  r,  rM   s     r   r   zCSSLayer.to_json  r-  r   c                     | t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d               S d       S r/  r0  r   s     r   r   zCSSLayer.from_json   r1  r   r(  r   r   r   r   r     r2  r   r   c                  D    e Zd ZU dZdZded<   dZded<   d Zed        Z	y)	r   z0
    CSS Starting Style at-rule descriptor.
    Nrr   rs   r   r   c                    t               }| j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S )Nrv   r   )r?   rs   r   r   rM   s     r   r   zCSSStartingStyle.to_json  sS    v;;" KK//1DM*#'#6#6#>#>#@D r   c                     | d|v rt         j                  |d         nd d|v rt        j                  |d               S d       S )Nrv   r   )rs   r   )rx   r   r   r   s     r   r   zCSSStartingStyle.from_json  sR    ;Bd?;((g7PTKY]aKa<11$~2FG
 	
gk
 	
r   )
r!   r"   r#   r0   rs   rF   r   r   r$   r   r   r   r   r   r   	  s:    
 ,0F(/ 59N18 
 
r   r   c                  J    e Zd ZU dZded<   ded<   dZded<   d	 Zed
        Zy)CSSLayerDataz
    CSS Layer data.
    r    rK   r   orderNz*typing.Optional[typing.List[CSSLayerData]]
sub_layersc                    t               }| j                  |d<   | j                  |d<   | j                  +| j                  D cg c]  }|j	                          c}|d<   |S c c}w )NrK   r;  	subLayers)r?   rK   r;  r<  r   r@   s      r   r   zCSSLayerData.to_json4  sW    vyyV

W??&6:oo F FD !Gs   A"c           
          | t        |d         t        |d         d|v r+|d   D cg c]  }t        j                  |       c}      S d       S c c}w )NrK   r;  r>  )rK   r;  r<  )r    r   r:  r   rE   s      r   r   zCSSLayerData.from_json<  sd    T&\"W&Q\`dQd4;LMa..q1M
 	
 ko
 	
 Ns   A)	r!   r"   r#   r0   rF   r<  r   r$   r   r   r   r   r:  r:  %  s<     I L >BJ:A 
 
r   r:  c                  P    e Zd ZU dZded<   ded<   ded<   ded<   d	 Zed
        Zy)PlatformFontUsagezP
    Information about amount of glyphs that were rendered with given font.
    r    family_namepost_script_namer   is_custom_fontr   glyph_countc                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   |S )N
familyNamepostScriptNameisCustomFont
glyphCount)r?   rB  rC  rD  rE  rM   s     r   r   zPlatformFontUsage.to_jsonV  sO    v!--\!%!6!6#22^!--\r   c           	     z     | t        |d         t        |d         t        |d         t        |d               S )NrG  rH  rI  rJ  )rB  rC  rD  rE  )r    r   r   r   s     r   r   zPlatformFontUsage.from_json^  sD    D./ &6!78^ 45d<01	
 	
r   Nrf   r   r   r   rA  rA  E  s@         
 
r   rA  c                  Z    e Zd ZU dZded<   ded<   ded<   ded<   ded<   d	 Zed
        Zy)FontVariationAxiszB
    Information about font variation axes for variable fonts
    r    tagrK   r   	min_value	max_valuedefault_valuec                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j
                  |d<   |S )NrN  rK   minValuemaxValuedefaultValue)r?   rN  rK   rO  rP  rQ  rM   s     r   r   zFontVariationAxis.to_json|  sT    vhhUyyV>>Z>>Z#11^r   c           
          | t        |d         t        |d         t        |d         t        |d         t        |d               S )NrN  rK   rS  rT  rU  )rN  rK   rO  rP  rQ  )r    r   r   s     r   r   zFontVariationAxis.from_json  sN    DK T&\"D,-D,-^ 45
 	
r   Nrf   r   r   r   rM  rM  h  sF     
H I    
 
r   rM  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ed<   dZded<   d Zed        Zy)FontFacez
    Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions
    and additional information such as platformFontFamily and fontVariationAxes.
    r    font_family
font_stylefont_variantfont_weightfont_stretchfont_displayunicode_rangesrcplatform_font_familyNz/typing.Optional[typing.List[FontVariationAxis]]font_variation_axesc                   t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j
                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  |d	<   | j                  +| j                  D cg c]  }|j                          c}|d
<   |S c c}w )N
fontFamily	fontStylefontVariant
fontWeightfontStretchfontDisplayunicodeRanger`  platformFontFamilyfontVariationAxes)r?   rY  rZ  r[  r\  r]  r^  r_  r`  ra  rb  r   r@   s      r   r   zFontFace.to_json  s    v!--\ OO["//]!--\"//]"//]#11^hhU%)%>%>!"##/>B>V>V(W(WD$% )Xs   ,Cc                f    | t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d	         d
|v r+|d
   D cg c]  }t        j                  |       c}
      S d 
      S c c}w )Nrd  re  rf  rg  rh  ri  rj  r`  rk  rl  )
rY  rZ  r[  r\  r]  r^  r_  r`  ra  rb  )r    rM  r   rE   s      r   r   zFontFace.from_json  s    D./4,-T-01D./T-01T-01d>23DK !$T*>%?!@gz  C  hCNaIb cA!2!<!<Q!? c
 	
 IM
 	
 !ds   B.)	r!   r"   r#   r0   rF   rb  r   r$   r   r   r   r   rX  rX    sv    
  O      
H  LPHO 
 
r   rX  c                  J    e Zd ZU dZded<   ded<   dZded<   d	 Zed
        Zy)
CSSTryRulez&
    CSS try rule representation.
    r'   r   rI   rJ   Nr   r   c                    t               }| j                  j                         |d<   | j                  j                         |d<   | j                  | j                  j                         |d<   |S )Nr   rJ   r   )r?   r   r   rJ   r   rM   s     r   r   zCSSTryRule.to_json  s_    v,,.X

**,W*#'#6#6#>#>#@D r   c                     | t         j                  |d         t        j                  |d         d|v rt        j                  |d               S d       S )Nr   rJ   r   )r   rJ   r   )r'   r   rI   r   r   s     r   r   zCSSTryRule.from_json  s_    #--d8n=$$T']3KY]aKa<11$~2FG
 	
 hl
 	
r   	r!   r"   r#   r0   rF   r   r   r$   r   r   r   r   ro  ro    s<      O 59N18 
 
r   ro  c                  ^    e Zd ZU dZded<   ded<   ded<   ded	<   d
Zded<   d Zed        Zy
)CSSPositionTryRulez0
    CSS @position-try rule representation.
    rp   rK   r'   r   rI   rJ   r   r  Nr   r   c                8   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  |d<   | j                  | j                  j                         |d<   |S )NrK   r   rJ   r  r   )r?   rK   r   r   rJ   r  r   rM   s     r   r   zCSSPositionTryRule.to_json  s    vyy((*V,,.X

**,WX*#'#6#6#>#>#@D r   c           
          | t         j                  |d         t        j                  |d         t        j                  |d         t	        |d         d|v rt
        j                  |d               S d       S )NrK   r   rJ   r  r   )rK   r   rJ   r  r   )rp   r   r'   rI   r   r   r   s     r   r   zCSSPositionTryRule.from_json  s{    f.#--d8n=$$T']3X'KY]aKa<11$~2FG
 	

 hl
 	
r   rr  r   r   r   rt  rt    sH     K  OL 59N18 
 
r   rt  c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	CSSKeyframesRulez,
    CSS keyframes rule representation.
    rp   animation_nameztyping.List[CSSKeyframeRule]	keyframesc                    t               }| j                  j                         |d<   | j                  D cg c]  }|j                          c}|d<   |S c c}w )NanimationNamerz  )r?   ry  r   rz  r@   s      r   r   zCSSKeyframesRule.to_json'  sL    v $ 3 3 ; ; =_26..AQQYY[A[ Bs   Ac           	          | t         j                  |d         |d   D cg c]  }t        j                  |       c}      S c c}w )Nr|  rz  )ry  rz  )rp   r   CSSKeyframeRulerE   s      r   r   zCSSKeyframesRule.from_json-  sA     ??4+@A=A+=NO003O
 	
Os   A
Nrf   r   r   r   rx  rx    s0      ,+ 
 
r   rx  c                  T    e Zd ZU dZded<   ded<   ded<   dZded	<   d
 Zed        Zy)CSSPropertyRegistrationzW
    Representation of a custom property registration through CSS.registerProperty
    r    property_namer   inheritssyntaxNztyping.Optional[Value]initial_valuec                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  | j                  j                         |d<   |S )NpropertyNamer  r  initialValue)r?   r  r  r  r  r   rM   s     r   r   zCSSPropertyRegistration.to_jsonB  s^    v#11^==ZX)#'#5#5#=#=#?D r   c           	          | t        |d         t        |d         t        |d         d|v rt        j                  |d               S d       S )Nr  r  r  r  )r  r  r  r  )r    r   rp   r   r   s     r   r   z!CSSPropertyRegistration.from_jsonK  s_    d>23$z*+tH~&CQUYCY%//$~*>?	
 	
 `d	
 	
r   )	r!   r"   r#   r0   rF   r  r   r$   r   r   r   r   r  r  5  s=     NK,0M)0 
 
r   r  c                  T    e Zd ZU dZded<   ded<   ded<   dZd	ed
<   d Zed        Zy)CSSFontPaletteValuesRulez6
    CSS font-palette-values rule representation.
    r'   r   rp   font_palette_namerI   rJ   Nr   r   c                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  | j
                  j                         |d<   |S )Nr   fontPaletteNamerJ   r   )r?   r   r   r  rJ   r   rM   s     r   r   z CSSFontPaletteValuesRule.to_jsong  sy    v,,.X"&"8"8"@"@"B

**,W*#'#6#6#>#>#@D r   c           	          | t         j                  |d         t        j                  |d         t        j                  |d         d|v rt        j                  |d               S d       S )Nr   r  rJ   r   )r   r  rJ   r   r'   r   rp   rI   r   r   s     r   r   z"CSSFontPaletteValuesRule.from_jsonp  sq    #--d8n=#ood3D.EF$$T']3KY]aKa<11$~2FG	
 	
 hl	
 	
r   rr  r   r   r   r  r  U  sD       O 59N18 
 
r   r  c                  T    e Zd ZU dZded<   ded<   ded<   dZd	ed
<   d Zed        Zy)CSSPropertyRulez.
    CSS property at-rule representation.
    r'   r   rp   r  rI   rJ   Nr   r   c                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  | j
                  j                         |d<   |S )Nr   r  rJ   r   )r?   r   r   r  rJ   r   rM   s     r   r   zCSSPropertyRule.to_json  sx    v,,.X#1199;^

**,W*#'#6#6#>#>#@D r   c           	          | t         j                  |d         t        j                  |d         t        j                  |d         d|v rt        j                  |d               S d       S )Nr   r  rJ   r   )r   r  rJ   r   r  r   s     r   r   zCSSPropertyRule.from_json  sp    #--d8n=//$~*>?$$T']3KY]aKa<11$~2FG	
 	
 hl	
 	
r   rr  r   r   r   r  r  z  sD       O 59N18 
 
r   r  c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)CSSFunctionParameterz/
    CSS function argument representation.
    r    rK   type_c                V    t               }| j                  |d<   | j                  |d<   |S )NrK   type)r?   rK   r  rM   s     r   r   zCSSFunctionParameter.to_json  s(    vyyVzzVr   c                F     | t        |d         t        |d               S )NrK   r  )rK   r  r   r   s     r   r   zCSSFunctionParameter.from_json  s'    T&\"d6l#
 	
r   Nrf   r   r   r   r  r    s.     I J 
 
r   r  c                  f    e Zd ZU dZded<   ded<   dZded<   dZd	ed
<   dZded<   d Ze	d        Z
y)CSSFunctionConditionNodez8
    CSS function conditional block representation.
    typing.List[CSSFunctionNode]childrenr    condition_textNztyping.Optional[CSSMedia]r   z"typing.Optional[CSSContainerQuery]r   ztyping.Optional[CSSSupports]r   c                   t               }| j                  D cg c]  }|j                          c}|d<   | j                  |d<   | j                  | j                  j                         |d<   | j
                  | j
                  j                         |d<   | j                  | j                  j                         |d<   |S c c}w )Nr  conditionTextr   r   r   )r?   r  r   r  r   r   r   r@   s      r   r   z CSSFunctionConditionNode.to_json  s    v15?AAIIK?Z $ 3 3_::! JJ..0DM!!-'+'='='E'E'GD#$==$#}}446D @s   Cc           
     8    | |d   D cg c]  }t         j                  |       c}t        |d         d|v rt        j                  |d         nd d|v rt        j                  |d         nd d|v rt
        j                  |d               S d       S c c}w )Nr  r  r   r   r   )r  r  r   r   r   )CSSFunctionNoder   r    r   r   r   rE   s      r   r   z"CSSFunctionConditionNode.from_json  s    <@<LMqo//2MtO457>$($$T']3DWimqWq/99$?Q:RSw{@Jd@R[**4
+;<
 	

 Y]
 	
Ms   B)r!   r"   r#   r0   rF   r   r   r   r   r$   r   r   r   r   r  r    sY     +*  (,E$+ =A9@ .2H*1
 
 
r   r  c                  D    e Zd ZU dZdZded<   dZded<   d Zed        Z	y)	r  z5
    Section of the body of a CSS function rule.
    Nz)typing.Optional[CSSFunctionConditionNode]	conditionrR   rJ   c                    t               }| j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S )Nr  rJ   )r?   r  r   rJ   rM   s     r   r   zCSSFunctionNode.to_json  sO    v>>% $ 6 6 8D::! JJ..0DMr   c                     | d|v rt         j                  |d         nd d|v rt        j                  |d               S d       S )Nr  rJ   )r  rJ   )r  r   rI   r   s     r   r   zCSSFunctionNode.from_json  sS    OZ^bOb.88k9JKhl7>$($$T']3
 	
LP
 	
r   )
r!   r"   r#   r0   r  rF   rJ   r   r$   r   r   r   r   r  r    s;     <@I8? (,E$+ 
 
r   r  c                  ^    e Zd ZU dZded<   ded<   ded<   ded	<   d
Zded<   d Zed        Zy
)CSSFunctionRulez.
    CSS function at-rule representation.
    rp   rK   r'   r   z!typing.List[CSSFunctionParameter]
parametersr  r  Nr   r   c                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  D cg c]  }|j                          c}|d<   | j
                  D cg c]  }|j                          c}|d<   | j                  | j                  j                         |d<   |S c c}w c c}w )NrK   r   r  r  r   )r?   rK   r   r   r  r  r   r@   s      r   r   zCSSFunctionRule.to_json  s    vyy((*V,,.X37??CaaiikC\15?AAIIK?Z*#'#6#6#>#>#@D 	 D?s   C>Cc                Z    | t         j                  |d         t        j                  |d         |d   D cg c]  }t        j                  |       c}|d   D cg c]  }t        j                  |       c}d|v rt
        j                  |d               S d       S c c}w c c}w )NrK   r   r  r  r   )rK   r   r  r  r   )rp   r   r'   r  r  r   rE   s      r   r   zCSSFunctionRule.from_json  s    f.#--d8n=CGCUVa,66q9V<@<LMqo//2MKY]aKa<11$~2FG
 	

 hl
 	
 WMs   B#B(rr  r   r   r   r  r    sL     K  21 +* 59N18 
 
r   r  c                  T    e Zd ZU dZded<   ded<   ded<   dZd	ed
<   d Zed        Zy)r~  z+
    CSS keyframe rule representation.
    r'   r   rp   key_textrI   rJ   Nr   r   c                   t               }| j                  j                         |d<   | j                  j                         |d<   | j                  j                         |d<   | j
                  | j
                  j                         |d<   |S )Nr   keyTextrJ   r   )r?   r   r   r  rJ   r   rM   s     r   r   zCSSKeyframeRule.to_json:  su    v,,.X--//1Y

**,W*#'#6#6#>#>#@D r   c           	          | t         j                  |d         t        j                  |d         t        j                  |d         d|v rt        j                  |d               S d       S )Nr   r  rJ   r   )r   r  rJ   r   r  r   s     r   r   zCSSKeyframeRule.from_jsonC  so    #--d8n=__T)_5$$T']3KY]aKa<11$~2FG	
 	
 hl	
 	
r   rr  r   r   r   r~  r~  (  sC      O O 59N18 
 
r   r~  c                  F    e Zd ZU dZded<   ded<   ded<   d Zed	        Zy
)StyleDeclarationEditzE
    A descriptor of operation to mutate style declaration text.
    r   r   rx   rs   r    rq   c                    t               }| j                  j                         |d<   | j                  j                         |d<   | j                  |d<   |S )Nr   rv   rq   )r?   r   r   rs   rq   rM   s     r   r   zStyleDeclarationEdit.to_json[  sJ    v#22::<^++-WyyVr   c                     | t         j                  |d         t        j                  |d         t        |d               S )Nr   rv   rq   )r   rs   rq   )r   r   rx   r    r   s     r   r   zStyleDeclarationEdit.from_jsonb  s@    '11$~2FG((g7T&\"
 	
r   Nrf   r   r   r   r  r  M  s7     !   I 
 
r   r  c              #     K   t               }| j                         |d<   ||d<   |j                         |d<   ||j                         |d<   d|d}|}t        j                  |d         S w)a  
    Inserts a new rule with the given ``ruleText`` in a stylesheet with given ``styleSheetId``, at the
    position specified by ``location``.

    :param style_sheet_id: The css style sheet identifier where a new rule should be inserted.
    :param rule_text: The text of a new rule.
    :param location: Text position of a new rule in the target style sheet.
    :param node_for_property_syntax_validation: **(EXPERIMENTAL)** *(Optional)* NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
    :returns: The newly created rule.
    r   ruleTextlocationnodeForPropertySyntaxValidationzCSS.addRulemethodparamsri   )r?   r   rh   r   )r   	rule_textr  #node_for_property_syntax_validationr  cmd_dictr   s          r   add_ruler  k  s       &F+335F>"F:!))+F:*64W4_4_4a01H >DT&\**s   A,A.c              #     K   t               }| j                         |d<   d|d}|}|d   D cg c]  }t        |       c}S c c}w w)zw
    Returns all class names from specified stylesheet.

    :param style_sheet_id:
    :returns: Class name list.
    r   zCSS.collectClassNamesr  
classNamesr?   r   r    )r   r  r  r   rA   s        r   collect_class_namesr    sU      &F+335F>)H >D ./qCF///s   .A
AA
c              #     K   t               }| j                         |d<   |||d<   d|d}|}t        j                  |d         S w)a  
    Creates a new special "via-inspector" stylesheet in the frame with given ``frameId``.

    :param frame_id: Identifier of the frame where "via-inspector" stylesheet should be created.
    :param force: *(Optional)* If true, creates a new stylesheet for every call. If false, returns a stylesheet previously created by a call with force=false for the frame's document if it exists or creates a new stylesheet (default: false).
    :returns: Identifier of the created "via-inspector" stylesheet.
    r   forcezCSS.createStyleSheetr  r   )r?   r   r   r   )r   r  r  r  r   s        r   create_style_sheetr    s]      &F ((*F9w(H >D!!$~"677s   AAc               #     K   ddi} | }yw)z4
    Disables the CSS agent for the given page.
    r  zCSS.disableNr   r  r   s     r   disabler    s     
 	-H >D   
c               #     K   ddi} | }yw)z
    Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
    enabled until the result of this command is received.
    r  z
CSS.enableNr   r  s     r   enabler    s      	,H >Dr  c              #     K   t               }| j                         |d<   |D cg c]  }| c}|d<   d|d}|}yc c}w w)a*  
    Ensures that the given node will have specified pseudo-classes whenever its style is computed by
    the browser.

    :param node_id: The element id for which to force the pseudo state.
    :param forced_pseudo_classes: Element pseudo classes to force when computing the element's style.
    nodeIdforcedPseudoClasseszCSS.forcePseudoStater  Nr?   r   )node_idforced_pseudo_classesr  rA   r  r   s         r   force_pseudo_stater    sR      &F(F80E$F1Q$FF !(H >D %Gs   "A	=Ac              #  b   K   t               }| j                         |d<   ||d<   d|d}|}yw)z
    Ensures that the given node is in its starting-style state.

    :param node_id: The element id for which to force the starting-style state.
    :param forced: Boolean indicating if this is on or off.
    r  forcedzCSS.forceStartingStyler  Nr  )r  r  r  r  r   s        r   force_starting_styler    s@      &F(F8F8*H >Ds   -/c              #     K   t               }| j                         |d<   d|d}|}d|v r|d   D cg c]  }t        |       c}ndd|v rt        |d         ndd|v rt        |d         fS dfS c c}w w)aY  
    :param node_id: Id of the node to get background colors for.
    :returns: A tuple with the following items:

        0. **backgroundColors** - *(Optional)* The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
        1. **computedFontSize** - *(Optional)* The computed font size for this node, as a CSS computed value string (e.g. '12px').
        2. **computedFontWeight** - *(Optional)* The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
    r  zCSS.getBackgroundColorsr  backgroundColorsNcomputedFontSizecomputedFontWeightr  r  r  r  r   rA   s        r   get_background_colorsr    s      &F(F8+H >D6HD6P012AQ2VZ);t)CD#$%+?4+GD%&'  NR 2s   2A8A32A8c              #     K   t               }| j                         |d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w w)z
    Returns the computed style for a DOM node identified by ``nodeId``.

    :param node_id:
    :returns: Computed style for the specified DOM node.
    r  zCSS.getComputedStyleForNoder  computedStyle)r?   r   r   r   r  s        r   get_computed_style_for_noder  
  s[      &F(F8/H >D;?;PQa$..q1QQQ   .AAAc              #    K   t               }| D cg c]  }| c}|d<   |j                         |d<   |||d<   ||j                         |d<   |||d<   d|d}|}|d   D cg c]  }t        |       c}S c c}w c c}w w)	a;  
    Resolve the specified values in the context of the provided element.
    For example, a value of '1em' is evaluated according to the computed
    'font-size' of the element and a value 'calc(1px + 2px)' will be
    resolved to '3px'.

    :param values: Substitution functions (var()/env()/attr()) and cascade-dependent keywords (revert/revert-layer) do not work.
    :param node_id: Id of the node in whose context the expression is evaluated
    :param property_name: *(Optional)* Only longhands and custom property names are accepted.
    :param pseudo_type: **(EXPERIMENTAL)** *(Optional)* Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
    :param pseudo_identifier: **(EXPERIMENTAL)** *(Optional)* Pseudo element custom ident.
    :returns: 
    valuesr  r  r=   r>   zCSS.resolveValuesr  resultsr  )	r  r  r  r7   r;   r  rA   r  r   s	            r   resolve_valuesr    s     ( &F#)*a*F8(F8 !.~*224|$%6!"%H >D O,qCF,, + -s   B	A;AB&B 8Bc              #     K   t               }| |d<   ||d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w w)zY


    **EXPERIMENTAL**

    :param shorthand_name:
    :param value:
    :returns: 
    shorthandNamer-   zCSS.getLonghandPropertiesr  r  )r?   r   r   )shorthand_namer-   r  r  r   rA   s         r   get_longhand_propertiesr  B  s]      &F,F?F7O-H >D.23G.HIK!!!$IIIs   %AAAc              #     K   t               }| j                         |d<   d|d}|}d|v rt        j                  |d         ndd|v rt        j                  |d         fS dfS w)a  
    Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
    attributes) for a DOM node identified by ``nodeId``.

    :param node_id:
    :returns: A tuple with the following items:

        0. **inlineStyle** - *(Optional)* Inline style for the specified DOM node.
        1. **attributesStyle** - *(Optional)* Attribute-defined element style (e.g. resulting from "width=20 height=100%").
    r  zCSS.getInlineStylesForNoder  rV   NattributesStyler?   r   rI   r   r  r  r  r   s       r   get_inline_styles_for_noder  Z  s      &F(F8.H >D3@D3H4./d7HD7P4 123 VZ s   A$A&c              #  V  K   t               }| j                         |d<   d|d}|}d|v r&|d   D cg c]  }t        j                  |       c}ndd|v rt        j                  |d         ndd|v r'|d   D cg c]  }t
        j                  |       c}fS dfS c c}w c c}w w)a  
    Returns the styles coming from animations & transitions
    including the animation & transition styles coming from inheritance chain.

    **EXPERIMENTAL**

    :param node_id:
    :returns: A tuple with the following items:

        0. **animationStyles** - *(Optional)* Styles coming from animations.
        1. **transitionsStyle** - *(Optional)* Style coming from transitions.
        2. **inherited** - *(Optional)* Inherited style entries for animationsStyle and transitionsStyle from the inheritance chain of the element.
    r  zCSS.getAnimatedStylesForNoder  r]   Nr^   	inherited)r?   r   rH   r   rI   rY   r  s        r   get_animated_styles_for_noder  t  s       &F(F80H >DM^bfMf6G1HIA		$	$Q	'Ilp8Jd8R4 234X\Q\`dQd4;LMa	$	.	.q	1M  ko IMs   2B)B,B)<B$B)c              #    K   t               }| j                         |d<   d|d}|}d|v rt        j                  |d         ndd|v rt        j                  |d         ndd|v r&|d   D cg c]  }t        j                  |       c}ndd|v r&|d   D cg c]  }t
        j                  |       c}ndd	|v r&|d	   D cg c]  }t        j                  |       c}ndd
|v r&|d
   D cg c]  }t        j                  |       c}ndd|v r&|d   D cg c]  }t        j                  |       c}ndd|v r&|d   D cg c]  }t        j                  |       c}ndd|v rt        |d         ndd|v r&|d   D cg c]  }t        j                  |       c}ndd|v r&|d   D cg c]  }t        j                  |       c}ndd|v rt        j                  |d         ndd|v r"t        j                  j                  |d         ndd|v r'|d   D cg c]  }t         j                  |       c}fS dfS c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w c c}w w)a  
    Returns requested styles for a DOM node identified by ``nodeId``.

    :param node_id:
    :returns: A tuple with the following items:

        0. **inlineStyle** - *(Optional)* Inline style for the specified DOM node.
        1. **attributesStyle** - *(Optional)* Attribute-defined element style (e.g. resulting from "width=20 height=100%").
        2. **matchedCSSRules** - *(Optional)* CSS rules matching this node, from all applicable stylesheets.
        3. **pseudoElements** - *(Optional)* Pseudo style matches for this node.
        4. **inherited** - *(Optional)* A chain of inherited styles (from the immediate node parent up to the DOM tree root).
        5. **inheritedPseudoElements** - *(Optional)* A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
        6. **cssKeyframesRules** - *(Optional)* A list of CSS keyframed animations matching this node.
        7. **cssPositionTryRules** - *(Optional)* A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
        8. **activePositionFallbackIndex** - *(Optional)* Index of the active fallback in the applied position-try-fallback property, will not be set if there is no active position-try fallback.
        9. **cssPropertyRules** - *(Optional)* A list of CSS at-property rules matching this node.
        10. **cssPropertyRegistrations** - *(Optional)* A list of CSS property registrations matching this node.
        11. **cssFontPaletteValuesRule** - *(Optional)* A font-palette-values rule matching this node.
        12. **parentLayoutNodeId** - *(Optional)* Id of the first parent element that does not have display: contents.
        13. **cssFunctionRules** - *(Optional)* A list of CSS at-function rules referenced by styles of this node.
    r  zCSS.getMatchedStylesForNoder  rV   Nr  rU   rd   r  inheritedPseudoElementscssKeyframesRulescssPositionTryRulesactivePositionFallbackIndexcssPropertyRulescssPropertyRegistrationscssFontPaletteValuesRuleparentLayoutNodeIdcssFunctionRules)r?   r   rI   r   rD   r6   rP   ra   rx  rt  rn   r  r  r  r   NodeIdr  r  s        r   get_matched_styles_for_noder    s    0 &F(F8/H >D3@D3H4./d7HD7P4 123VZEVZ^E^.?)@AA		Q	AdhO_cgOgD9I4JKq		'	'	*KmqITX\I\43DEa		&	&q	)Ebfaz  C  bCTB[=\]	&	0	0	3]  IMNaeiNi5H0IJ1		#	#A	&JosRgkoRo$7L2MNQ		%	%a	(Nuy4QUY4YD./0_cL^bfLft4F/GH!	"	"1	%Hlp\vz~\~t<V7WX!	 	*	*1	-X  EIPjnrPr **40J+KLx|<PTX<X

T"678^bL^bfLft4F/GH!	"	"1	%H  mq  	BKE]JNHX 	Iss   A,I-.I 
I-I
5I-I
 I-/II-I6I-I!"I-II-.I#
AI-I(94I-c               #  p   K   ddi} | }|d   D cg c]  }t         j                  |       c}S c c}w w)zS
    Returns all media queries parsed by the rendering engine.

    :returns: 
    r  zCSS.getMediaQueriesmedias)r   r   r  r   rA   s      r   get_media_queriesr     sA      	'H >D+/>:aHq!:::   616c              #     K   t               }| j                         |d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w w)z
    Requests information about platform fonts which we used to render child TextNodes in the given
    node.

    :param node_id:
    :returns: Usage statistics for every employed platform font.
    r  zCSS.getPlatformFontsForNoder  fonts)r?   r   rA  r   r  s        r   get_platform_fonts_for_noder    sZ      &F(F8/H >D48MBq''*BBBr  c              #  r   K   t               }| j                         |d<   d|d}|}t        |d         S w)z~
    Returns the current textual content for a stylesheet.

    :param style_sheet_id:
    :returns: The stylesheet text.
    r   zCSS.getStyleSheetTextr  rq   r  )r   r  r  r   s       r   get_style_sheet_textr    sG      &F+335F>)H >DtF|s   57c              #     K   t               }| j                         |d<   d|d}|}t        j                  |d         S w)av  
    Returns all layers parsed by the rendering engine for the tree scope of a node.
    Given a DOM element identified by nodeId, getLayersForNode returns the root
    layer for the nearest ancestor document or shadow root. The layer root contains
    the full layer tree for the tree scope and their ordering.

    **EXPERIMENTAL**

    :param node_id:
    :returns: 
    r  zCSS.getLayersForNoder  	rootLayer)r?   r   r:  r   r  s       r   get_layers_for_noder	    sL      &F(F8(H >D!!${"344s   ?Ac              #     K   t               }| j                         |d<   ||d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w w)z
    Given a CSS selector text and a style sheet ID, getLocationForSelector
    returns an array of locations of the CSS selector in the style sheet.

    **EXPERIMENTAL**

    :param style_sheet_id:
    :param selector_text:
    :returns: 
    r   selectorTextzCSS.getLocationForSelectorr  ranges)r?   r   rx   r   )r   selector_textr  r  r   rA   s         r   get_location_for_selectorr    se      &F+335F>*F>.H >D.28n=K!!!$===s   3AAAc              #  \   K   t               }| | j                         |d<   d|d}|}yw)a  
    Starts tracking the given node for the computed style updates
    and whenever the computed style is updated for node, it queues
    a ``computedStyleUpdated`` event with throttling.
    There can only be 1 node tracked for computed style updates
    so passing a new node id removes tracking from the previous node.
    Pass ``undefined`` to disable tracking.

    **EXPERIMENTAL**

    :param node_id: *(Optional)*
    Nr  z$CSS.trackComputedStyleUpdatesForNoder  r  r  s       r   %track_computed_style_updates_for_noder  (  s<      &F"??,x8H >Ds   *,c              #  ~   K   t               }| D cg c]  }|j                          c}|d<   d|d}|}yc c}w w)aH  
    Starts tracking the given computed styles for updates. The specified array of properties
    replaces the one previously specified. Pass empty array to disable tracking.
    Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
    The changes to computed style properties are only tracked for nodes pushed to the front-end
    by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
    to the front-end, no updates will be issued for the node.

    **EXPERIMENTAL**

    :param properties_to_track:
    propertiesToTrackzCSS.trackComputedStyleUpdatesr  Nr  )properties_to_trackr  rA   r  r   s        r   track_computed_style_updatesr  A  sG      &F8K"L1199;"LF1H >D #Ms   =8=c               #     K   ddi} | }|d   D cg c]!  }t         j                  j                  |      # c}S c c}w w)z
    Polls the next batch of computed style updates.

    **EXPERIMENTAL**

    :returns: The list of node Ids that have their tracked computed styles updated.
    r  zCSS.takeComputedStyleUpdatesnodeIdsr   r  r   r  s      r   take_computed_style_updatesr  Y  sE      	0H >D-1)_=CJJ  #===s   A &;A c              #  l   K   t               }| j                         |d<   ||d<   ||d<   d|d}|}yw)z
    Find a rule with the given active property for the given node and set the new value for this
    property

    :param node_id: The element id for which to set property.
    :param property_name:
    :param value:
    r  r  r-   z$CSS.setEffectivePropertyValueForNoder  Nr  )r  r  r-   r  r  r   s         r   %set_effective_property_value_for_noder  h  sI      &F(F8*F>F7O8H >Ds   24c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the property rule property name.

    :param style_sheet_id:
    :param range_:
    :param property_name:
    :returns: The resulting key text after modification.
    r   rv   r  zCSS.setPropertyRulePropertyNamer  r?   r   rp   r   )r   rs   r  r  r  r   s         r   set_property_rule_property_namer    sf      &F+335F>nn&F7O*F>3H >D??4/00   AAc              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the keyframe rule key text.

    :param style_sheet_id:
    :param range_:
    :param key_text:
    :returns: The resulting key text after modification.
    r   rv   r  zCSS.setKeyframeKeyr  r  )r   rs   r  r  r  r   s         r   set_keyframe_keyr     se      &F+335F>nn&F7O F9&H >D??4	?++r  c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the rule selector.

    :param style_sheet_id:
    :param range_:
    :param text:
    :returns: The resulting CSS media rule after modification.
    r   rv   rq   zCSS.setMediaTextr  r   )r?   r   r   r   r   rs   rq   r  r  r   s         r   set_media_textr#    sf      &F+335F>nn&F7OF6N$H >Dd7m,,r  c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the expression of a container query.

    **EXPERIMENTAL**

    :param style_sheet_id:
    :param range_:
    :param text:
    :returns: The resulting CSS container query rule after modification.
    r   rv   rq   zCSS.setContainerQueryTextr  containerQuery)r?   r   r   r   r"  s         r   set_container_query_textr&    sh      &F+335F>nn&F7OF6N-H >D&&t,<'=>>r  c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the expression of a supports at-rule.

    **EXPERIMENTAL**

    :param style_sheet_id:
    :param range_:
    :param text:
    :returns: The resulting CSS Supports rule after modification.
    r   rv   rq   zCSS.setSupportsTextr  r   )r?   r   r   r   r"  s         r   set_supports_textr(    sg      &F+335F>nn&F7OF6N'H >D  j!122r  c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the expression of a scope at-rule.

    **EXPERIMENTAL**

    :param style_sheet_id:
    :param range_:
    :param text:
    :returns: The resulting CSS Scope rule after modification.
    r   rv   rq   zCSS.setScopeTextr  scope)r?   r   r   r   r"  s         r   set_scope_textr+  	  sf      &F+335F>nn&F7OF6N$H >Dd7m,,r  c              #     K   t               }| j                         |d<   |j                         |d<   ||d<   d|d}|}t        j                  |d         S w)z
    Modifies the rule selector.

    :param style_sheet_id:
    :param range_:
    :param selector:
    :returns: The resulting selector list after modification.
    r   rv   selectorzCSS.setRuleSelectorr  r   )r?   r   r   r   )r   rs   r-  r  r  r   s         r   set_rule_selectorr.  	  sh      &F+335F>nn&F7O!F:'H >D!!$~"677r  c              #     K   t               }| j                         |d<   ||d<   d|d}|}d|v rt        |d         S dS w)z
    Sets the new stylesheet text.

    :param style_sheet_id:
    :param text:
    :returns: *(Optional)* URL of source map associated with script (if any).
    r   rq   zCSS.setStyleSheetTextr  r   Nr  )r   rq   r  r  r   s        r   set_style_sheet_textr0  5	  s]      &F+335F>F6N)H >D(6$(>3tN#$HDHs   A Ac              #     K   t               }| D cg c]  }|j                          c}|d<   ||j                         |d<   d|d}|}|d   D cg c]  }t        j                  |       c}S c c}w c c}w w)a  
    Applies specified style edits one after another in the given order.

    :param edits:
    :param node_for_property_syntax_validation: **(EXPERIMENTAL)** *(Optional)* NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
    :returns: The resulting styles after modification.
    editsr  zCSS.setStyleTextsr  stylesr  )r2  r  r  rA   r  r   s         r   set_style_textsr4  K	  s      &F,12qqyy{2F7O*64W4_4_4a01%H >D+/>:aHq!:: 3 ;s   A<A2+A<A7/A<c               #     K   ddi} | }yw)z)
    Enables the selector recording.
    r  zCSS.startRuleUsageTrackingNr   r  s     r   start_rule_usage_trackingr6  b	  s     
 	.H >Dr  c               #  p   K   ddi} | }|d   D cg c]  }t         j                  |       c}S c c}w w)z
    Stop tracking rule usage and return the list of rules that were used since last call to
    ``takeCoverageDelta`` (or since start of coverage instrumentation).

    :returns: 
    r  zCSS.stopRuleUsageTracking	ruleUsage)r   r   r  s      r   stop_rule_usage_trackingr9  l	  sB      	-H >D,0,=>qI">>>r  c               #     K   ddi} | }|d   D cg c]  }t         j                  |       c}t        |d         fS c c}w w)a  
    Obtain list of rules that became used since last call to this method (or since start of coverage
    instrumentation).

    :returns: A tuple with the following items:

        0. **coverage** - 
        1. **timestamp** - Monotonically increasing time, in seconds.
    r  zCSS.takeCoverageDeltacoverage	timestamp)r   r   r   r  s      r   take_coverage_deltar=  z	  sV      	)H >D)-j)9:A		Q	:d;  :s   A?Ac              #  <   K   t               }| |d<   d|d}|}yw)z
    Enables/disables rendering of local CSS fonts (enabled by default).

    **EXPERIMENTAL**

    :param enabled: Whether rendering of local fonts is enabled.
    enabledzCSS.setLocalFontsEnabledr  N)r?   )r?  r  r  r   s       r   set_local_fonts_enabledr@  	  s/      &FF9,H >Ds   zCSS.fontsUpdatedc                  .    e Zd ZU dZded<   edd       Zy)FontsUpdatedzy
    Fires whenever a web font is updated.  A non-empty font parameter indicates a successfully loaded
    web font.
    ztyping.Optional[FontFace]fontc                V     | d|v rt         j                  |d               S d       S )NrC  )rC  )rX  r   r   s     r   r   zFontsUpdated.from_json	  s4    5;t^##DL1
 	
IM
 	
r   N)r   r   r   rB  r!   r"   r#   r0   rF   r$   r   r   r   r   rB  rB  	  s!    
 $#
 
r   rB  zCSS.mediaQueryResultChangedc                  "    e Zd ZdZedd       Zy)MediaQueryResultChangedz
    Fires whenever a MediaQuery result changes (for example, after a browser window has been
    resized.) The current implementation considers only viewport-dependent media features.
    c                     |        S r   r   r   s     r   r   z!MediaQueryResultChanged.from_json	  s     
 	
r   N)r   r   r   rG  )r!   r"   r#   r0   r$   r   r   r   r   rG  rG  	  s     
 
r   rG  zCSS.styleSheetAddedc                  .    e Zd ZU dZded<   edd       Zy)StyleSheetAddedz@
    Fired whenever an active document stylesheet is added.
    r   headerc                @     | t         j                  |d               S )NrK  )rK  )r   r   r   s     r   r   zStyleSheetAdded.from_json	  s!    &00h@
 	
r   N)r   r   r   rJ  rE  r   r   r   rJ  rJ  	  s!      
 
r   rJ  zCSS.styleSheetChangedc                  .    e Zd ZU dZded<   edd       Zy)StyleSheetChangedzU
    Fired whenever a stylesheet is changed as a result of the client operation.
    r   r   c                @     | t         j                  |d               S Nr   )r   r   r   r   s     r   r   zStyleSheetChanged.from_json	  "    '11$~2FG
 	
r   N)r   r   r   rN  rE  r   r   r   rN  rN  	  s!     ! 
 
r   rN  zCSS.styleSheetRemovedc                  .    e Zd ZU dZded<   edd       Zy)StyleSheetRemovedzB
    Fired whenever an active document stylesheet is removed.
    r   r   c                @     | t         j                  |d               S rP  rQ  r   s     r   r   zStyleSheetRemoved.from_json	  rR  r   N)r   r   r   rT  rE  r   r   r   rT  rT  	  s!     ! 
 
r   rT  zCSS.computedStyleUpdatedc                  .    e Zd ZU dZded<   edd       Zy)ComputedStyleUpdatedz
    **EXPERIMENTAL**


    
dom.NodeIdr  c                T     | t         j                  j                  |d               S )Nr  )r  r  r   s     r   r   zComputedStyleUpdated.from_json	  s%    JJ((h8
 	
r   N)r   r   r   rW  rE  r   r   r   rW  rW  	  s!     
 
r   rW  r   )
r   r   r  r    r  rx   r  typing.Optional[dom.NodeId]r   z3typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSRule])r   r   r   <typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]])r   r   r  r   r   z8typing.Generator[T_JSON_DICT, T_JSON_DICT, StyleSheetId])r   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r  rX  r  typing.List[str]r   r\  )r  rX  r  r   r   r\  )r  rX  r   ztyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[typing.List[str]], typing.Optional[str], typing.Optional[str]]])r  rX  r   zQtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[CSSComputedStyleProperty]])NNN)r  r]  r  rX  r  r:   r7   ztyping.Optional[dom.PseudoType]r;   r:   r   r[  )r  r    r-   r    r   zDtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[CSSProperty]])r  rX  r   zntyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[CSSStyle], typing.Optional[CSSStyle]]])r  rX  r   ztyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[typing.List[CSSAnimationStyle]], typing.Optional[CSSStyle], typing.Optional[typing.List[InheritedAnimatedStyleEntry]]]])r  rX  r   a  typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[CSSStyle], typing.Optional[CSSStyle], typing.Optional[typing.List[RuleMatch]], typing.Optional[typing.List[PseudoElementMatches]], typing.Optional[typing.List[InheritedStyleEntry]], typing.Optional[typing.List[InheritedPseudoElementMatches]], typing.Optional[typing.List[CSSKeyframesRule]], typing.Optional[typing.List[CSSPositionTryRule]], typing.Optional[int], typing.Optional[typing.List[CSSPropertyRule]], typing.Optional[typing.List[CSSPropertyRegistration]], typing.Optional[CSSFontPaletteValuesRule], typing.Optional[dom.NodeId], typing.Optional[typing.List[CSSFunctionRule]]]])r   zAtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[CSSMedia]])r  rX  r   zJtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[PlatformFontUsage]])r   r   r   z/typing.Generator[T_JSON_DICT, T_JSON_DICT, str])r  rX  r   z8typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSLayerData])r   r   r  r    r   zDtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[SourceRange]])r  rZ  r   r\  )r  z%typing.List[CSSComputedStyleProperty]r   r\  )r   zCtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[dom.NodeId]])r  rX  r  r    r-   r    r   r\  )r   r   rs   rx   r  r    r   1typing.Generator[T_JSON_DICT, T_JSON_DICT, Value])r   r   rs   rx   r  r    r   r^  )r   r   rs   rx   rq   r    r   z4typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSMedia])r   r   rs   rx   rq   r    r   z=typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSContainerQuery])r   r   rs   rx   rq   r    r   z7typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSSupports])r   r   rs   rx   rq   r    r   z4typing.Generator[T_JSON_DICT, T_JSON_DICT, CSSScope])r   r   rs   rx   r-  r    r   z8typing.Generator[T_JSON_DICT, T_JSON_DICT, SelectorList])r   r   rq   r    r   z@typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.Optional[str]])r2  z!typing.List[StyleDeclarationEdit]r  rZ  r   zAtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[CSSStyle]])r   zBtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[RuleUsage]])r   zWtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[RuleUsage], float]])r?  r   r   r\  )d
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r    r   Enumr'   r6   rH   rP   rY   ra   rD   rp   ry   r   r   rh   r   r   rx   r   r   rI   r   r   r
  r  r   r   r   r   r   r:  rA  rM  rX  ro  rt  rx  r  r  r  r  r  r  r  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r	  r  r  r  r  r  r  r   r#  r&  r(  r+  r.  r0  r4  r6  r9  r=  r@  rB  rG  rJ  rN  rT  rW  r   r   r   <module>rf     sG	   # * !    	=3 	=tyy & 
 
 
< 
 
 
2 
 
 
2 
 
 
4 
 
 
& 
 
 
0 
 
 
> 
 
 
> 
 
 
0 p
 p
 p
f W
 W
 W
t$)) *  
  
  
F 
 
 
D 
 
 
6 
 
 
* (
 (
 (
V @
 @
 @
F 1
 1
 1
h 
 
 
0 &
 &
 &
R 5
 5
 5
p "
 "
 "
J 
 
 
@ 
 
 
@ 
 
 
6 
 
 
> 
 
 
D $
 $
 $
N ?
 ?
 ?
D 
 
 
> %
 %
 %
P 
 
 
0 
 
 
> !
 !
 !
H !
 !
 !
H 
 
 
0 '
 '
 '
T 
 
 
4 &
 &
 &
R !
 !
 !
H 
 
 
B LP	+$++ + .I	+
 
;+<0$0	C0* (,88$8 
@8./ 
8* 
8( 
O2RR	XR, /37;26"- "-"- ,"- 5	"-
 0"- 
D"-JJJJ 
LJ0	u4 
G<.. 
X
.b
;CC	QC($	6&55	?50>$>> 
L>4 04,	72B	70>  
8	01$11 1 
9	12,$,, , 
9	,2-$-- - 
<	-2?$?? ? 
E	?63$33 3 
?	36-$-- - 
<	-68$88 8 
@	82I$II 
HI0 LP;0;-H; 
I;.?(	7&  

 
  !
 *+

 
  ,
 "#

 
  $
 $%


 

  &

 $%

 
  &
 '(

 
  )
r   