
    ,h?                       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 ddl	mZ e G d	 d
             Ze G d d             Ze G d d             Ze G d d             Z G d dej"                        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 G d# d$ej"                        Z G d% d&ej"                        Ze G d' d(             Z G d) d*ej"                        ZdRd+ZdSd,Z dSd-Z!dSd.Z"	 	 	 	 dTd/Z#	 dU	 	 	 dVd0Z$	 	 	 	 dWd1Z%	 dU	 	 	 dXd2Z&	 	 	 	 	 	 	 	 	 	 dY	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dZd3Z'	 	 	 	 d[d4Z(dSd5Z)	 	 	 	 d\d6Z*	 	 	 	 d]d7Z+	 dU	 	 	 	 	 d^d8Z,	 	 d_	 	 	 	 	 d`d9Z-	 	 	 	 dad:Z.	 	 	 db	 	 	 	 	 	 	 dcd;Z/	 	 	 	 ddd<Z0	 dU	 	 	 	 	 	 	 ded=Z1	 	 	 	 	 	 dfd>Z2	 dU	 	 	 	 	 	 	 dgd?Z3	 	 	 	 	 	 dhd@Z4	 	 	 	 	 	 didAZ5dSdBZ6	 	 	 	 djdCZ7	 	 	 	 dkdDZ8	 	 	 	 dldEZ9	 dU	 	 	 	 	 dmdFZ:	 	 	 db	 	 	 	 	 	 	 	 	 dndGZ;	 dU	 	 	 dodHZ<	 	 	 	 dpdIZ=	 	 	 	 	 	 dqdJZ>	 	 	 	 drdKZ?	 	 	 	 dsdLZ@	 	 	 db	 	 	 	 	 	 	 	 	 dtdMZA	 	 	 	 dTdNZB edO      e G dP dQ                    ZCy)u    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)network)pagec                  <    e Zd ZU dZded<   ded<   d Zed        Zy)	ScreenOrientationz
    Screen orientation.
    strtype_intanglec                V    t               }| j                  |d<   | j                  |d<   |S )Ntyper   )dictr   r   selfjsons     s/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v134/emulation.pyto_jsonzScreenOrientation.to_json   s(    vzzV

W    c                F     | t        |d         t        |d               S )Nr   r   )r   r   r   r   clsr   s     r   	from_jsonzScreenOrientation.from_json"   s'    d6l#d7m$
 	
r   N__name__
__module____qualname____doc____annotations__r   classmethodr    r   r   r   r      s.     J J 
 
r   r   c                  B    e Zd ZU ded<   ded<   ded<   d Zed        Zy)	DisplayFeaturer   orientationr   offsetmask_lengthc                t    t               }| j                  |d<   | j                  |d<   | j                  |d<   |S )Nr)   r*   
maskLength)r   r)   r*   r+   r   s     r   r   zDisplayFeature.to_json8   s;    v"..]X!--\r   c                `     | t        |d         t        |d         t        |d               S )Nr)   r*   r-   )r)   r*   r+   r   r   s     r   r   zDisplayFeature.from_json?   s5    D/0tH~&D./
 	
r   Nr    r!   r"   r$   r   r%   r   r&   r   r   r(   r(   *   s2      K
  
 
r   r(   c                  .    e Zd ZU ded<   d Zed        Zy)DevicePosturer   r   c                8    t               }| j                  |d<   |S )Nr   )r   r   r   s     r   r   zDevicePosture.to_jsonM   s    vzzVr   c                ,     | t        |d               S )Nr   )r   r   r   s     r   r   zDevicePosture.from_jsonR   s    d6l#
 	
r   Nr/   r&   r   r   r1   r1   H   s"     J
 
 
r   r1   c                  8    e Zd ZU ded<   ded<   d Zed        Zy)MediaFeaturer   namevaluec                V    t               }| j                  |d<   | j                  |d<   |S )Nr7   r8   )r   r7   r8   r   s     r   r   zMediaFeature.to_json_   s(    vyyV

Wr   c                F     | t        |d         t        |d               S )Nr7   r8   )r7   r8   r4   r   s     r   r   zMediaFeature.from_jsone   s'    T&\"d7m$
 	
r   Nr/   r&   r   r   r6   r6   Y   s%    
IJ 
 
r   r6   c                  2    e Zd ZdZdZdZdZd Zed        Z	y)VirtualTimePolicya?  
    advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to
    allow the next delayed task (if any) to run; pause: The virtual time base may not advance;
    pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending
    resource fetches.
    advancepausepauseIfNetworkFetchesPendingc                    | j                   S Nr8   r   s    r   r   zVirtualTimePolicy.to_jsonx       zzr   c                     | |      S rA   r&   r   s     r   r   zVirtualTimePolicy.from_json{       4yr   N)
r    r!   r"   r#   ADVANCEPAUSE PAUSE_IF_NETWORK_FETCHES_PENDINGr   r%   r   r&   r   r   r<   r<   m   s2     GE'E$  r   r<   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)UserAgentBrandVersionzh
    Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
    r   brandversionc                V    t               }| j                  |d<   | j                  |d<   |S )NrL   rM   )r   rL   rM   r   s     r   r   zUserAgentBrandVersion.to_json   s(    v

W,,Yr   c                F     | t        |d         t        |d               S )NrL   rM   )rL   rM   r4   r   s     r   r   zUserAgentBrandVersion.from_json   s'    d7m$Y(
 	
r   Nr   r&   r   r   rK   rK      s,     JL 
 
r   rK   c                      e Zd ZU dZ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	ded<   d Z
ed        Zy	)UserAgentMetadataz
    Used to specify User Agent Client Hints to emulate. See https://wicg.github.io/ua-client-hints
    Missing optional values will be filled in by the target with what it would normally use.
    r   platformplatform_versionarchitecturemodelboolmobileNz3typing.Optional[typing.List[UserAgentBrandVersion]]brandsfull_version_listtyping.Optional[str]full_versionbitnesstyping.Optional[bool]wow64c                B   t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j
                  |d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  +| j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   | j                  | j                  |d	<   | j                  | j                  |d
<   |S c c}w c c}w )NrR   platformVersionrT   rU   rW   rX   fullVersionListfullVersionr\   r^   )r   rR   rS   rT   rU   rW   rX   r   rY   r[   r\   r^   )r   r   is      r   r   zUserAgentMetadata.to_json   s    v==Z"&"7"7#00^

WX;;"37;;?aaiik?DN!!-<@<R<R&Sqqyy{&SD"#("&"3"3D<<#"llDO::! JJDM @&Ss   0D'Dc                    | t        |d         t        |d         t        |d         t        |d         t        |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t        |d	         nd d
|v rt        |d
         
      S d 
      S c c}w c c}w )NrR   r`   rT   rU   rW   rX   ra   rb   r\   r^   )
rR   rS   rT   rU   rW   rX   rY   r[   r\   r^   )r   rV   rK   r   )r   r   rc   s      r   r   zUserAgentMetadata.from_json   s   j)* &7!89T.12d7m$X'S[_cScXO1)33A6Oimgx  }A  hA4PaKbca4>>qAc  GK5Bd5JT-01PT,5,=CY(4)0D$tG}%
 	
 ?C
 	
 Pcs   C:C#)r    r!   r"   r#   r$   rX   rY   r[   r\   r^   r   r%   r   r&   r   r   rQ   rQ      s}     MJL CGF?F NRJQ)-L&-$(G!(#'E '& 
 
r   rQ   c                  F    e Zd 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)
SensorTypezz
    Used to specify sensor types to emulate.
    See https://w3c.github.io/sensors/#automation for more information.
    zabsolute-orientationaccelerometerzambient-lightgravity	gyroscopezlinear-accelerationmagnetometerzrelative-orientationc                    | j                   S rA   rB   rC   s    r   r   zSensorType.to_json   rD   r   c                     | |      S rA   r&   r   s     r   r   zSensorType.from_json   rF   r   N)r    r!   r"   r#   ABSOLUTE_ORIENTATIONACCELEROMETERAMBIENT_LIGHTGRAVITY	GYROSCOPELINEAR_ACCELERATIONMAGNETOMETERRELATIVE_ORIENTATIONr   r%   r   r&   r   r   rf   rf      sM     2#M#MGI/!L1  r   rf   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)	SensorMetadataNr]   	availabletyping.Optional[float]minimum_frequencymaximum_frequencyc                    t               }| j                  | j                  |d<   | j                  | j                  |d<   | j                  | j                  |d<   |S )Nrw   minimumFrequencymaximumFrequency)r   rw   ry   rz   r   s     r   r   zSensorMetadata.to_json   s`    v>>% $D!!-'+'='=D#$!!-'+'='=D#$r   c                     | d|v rt        |d         nd d|v rt        |d         nd d|v rt        |d               S d       S )Nrw   r|   r}   )rw   ry   rz   )rV   floatr   s     r   r   zSensorMetadata.from_json   se    1<1Dd4,-$ASW[A[eD);$<=aeASW[A[eD);$<=
 	
 bf
 	
r   )
r    r!   r"   rw   r$   ry   rz   r   r%   r   r&   r   r   rv   rv      s>    '+I$+04-404-4 
 
r   rv   c                  .    e Zd ZU ded<   d Zed        Zy)SensorReadingSingler   r8   c                8    t               }| j                  |d<   |S )Nr8   )r   r8   r   s     r   r   zSensorReadingSingle.to_json  s    v

Wr   c                ,     | t        |d               S )Nr8   rB   r   r   s     r   r   zSensorReadingSingle.from_json  s    W&
 	
r   Nr/   r&   r   r   r   r     s     L
 
 
r   r   c                  B    e Zd ZU ded<   ded<   ded<   d Zed        Zy)SensorReadingXYZr   xyzc                t    t               }| j                  |d<   | j                  |d<   | j                  |d<   |S )Nr   r   r   )r   r   r   r   r   s     r   r   zSensorReadingXYZ.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   r   r   s     r   r   zSensorReadingXYZ.from_json&  s3    DIDIDI
 	
r   Nr/   r&   r   r   r   r     s*    HHH 
 
r   r   c                  L    e Zd ZU ded<   ded<   ded<   ded<   d Zed        Zy)	SensorReadingQuaternionr   r   r   r   wc                    t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   |S )Nr   r   r   r   )r   r   r   r   r   r   s     r   r   zSensorReadingQuaternion.to_json9  sB    vFFS	FFS	FFS	FFS	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!SensorReadingQuaternion.from_jsonA  s?    DIDIDIDI	
 	
r   Nr/   r&   r   r   r   r   /  s/    HHHH 
 
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)
SensorReadingNz$typing.Optional[SensorReadingSingle]singlez!typing.Optional[SensorReadingXYZ]xyzz(typing.Optional[SensorReadingQuaternion]
quaternionc                   t               }| j                  | j                  j                         |d<   | j                  | j                  j                         |d<   | j                  | j                  j                         |d<   |S )Nr   r   r   )r   r   r   r   r   r   s     r   r   zSensorReading.to_jsonS  so    v;;"![[002DN88((**,DK??&!%!8!8!:Dr   c                     | 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 )Nr   r   r   )r   r   r   )r   r   r   r   r   s     r   r   zSensorReading.from_json]  su    DLPTDT&00h@Z^;@D= **4;7dP\`dPd.88l9KL
 	
 ko
 	
r   )
r    r!   r"   r   r$   r   r   r   r%   r   r&   r   r   r   r   K  s<    37F07-1C	*1;?J8? 
 
r   r   c                  &    e Zd ZdZd Zed        Zy)PressureSourcecpuc                    | j                   S rA   rB   rC   s    r   r   zPressureSource.to_jsoni  rD   r   c                     | |      S rA   r&   r   s     r   r   zPressureSource.from_jsonl  rF   r   N)r    r!   r"   CPUr   r%   r   r&   r   r   r   r   f  s     
C  r   r   c                  2    e Zd ZdZdZdZdZd Zed        Z	y)PressureStatenominalfairseriouscriticalc                    | j                   S rA   rB   rC   s    r   r   zPressureState.to_jsonw  rD   r   c                     | |      S rA   r&   r   s     r   r   zPressureState.from_jsonz  rF   r   N)
r    r!   r"   NOMINALFAIRSERIOUSCRITICALr   r%   r   r&   r   r   r   r   q  s/    GDGH  r   r   c                  2    e Zd ZU dZded<   d Zed        Zy)PressureMetadataNr]   rw   c                P    t               }| j                  | j                  |d<   |S )Nrw   )r   rw   r   s     r   r   zPressureMetadata.to_json  s&    v>>% $Dr   c                B     | d|v rt        |d               S d       S )Nrw   )rw   rV   r   s     r   r   zPressureMetadata.from_json  s0    1<1Dd4,-
 	
JN
 	
r   )r    r!   r"   rw   r$   r   r%   r   r&   r   r   r   r     s&    '+I$+ 
 
r   r   c                  .    e Zd ZdZdZdZd Zed        Zy)DisabledImageTypez3
    Enum of image types that can be disabled.
    avifwebpc                    | j                   S rA   rB   rC   s    r   r   zDisabledImageType.to_json  rD   r   c                     | |      S rA   r&   r   s     r   r   zDisabledImageType.from_json  rF   r   N)	r    r!   r"   r#   AVIFWEBPr   r%   r   r&   r   r   r   r     s,     DD  r   r   c               #  6   K   ddi} | }t        |d         S w)z^
    Tells whether emulation is supported.

    :returns: True if emulation is supported.
    methodzEmulation.canEmulateresultr   cmd_dictr   s     r   can_emulater     s-      	(H >DXs   c               #     K   ddi} | }yw)z/
    Clears the overridden device metrics.
    r   z$Emulation.clearDeviceMetricsOverrideNr&   r   s     r   clear_device_metrics_overrider     s     
 	8H >D   
c               #     K   ddi} | }yw)z?
    Clears the overridden Geolocation Position and Error.
    r   z"Emulation.clearGeolocationOverrideNr&   r   s     r   clear_geolocation_overrider     s     
 	6H >Dr   c               #     K   ddi} | }yw)z[
    Requests that page scale factor is reset to initial values.

    **EXPERIMENTAL**
    r   zEmulation.resetPageScaleFactorNr&   r   s     r   reset_page_scale_factorr     s      	2H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)z
    Enables or disables simulating a focused and active page.

    **EXPERIMENTAL**

    :param enabled: Whether to enable to disable focus emulation.
    enabledz"Emulation.setFocusEmulationEnabledr   paramsNr   r   r   r   r   s       r   set_focus_emulation_enabledr     s/      &FF96H >D   c              #  @   K   t               }| | |d<   d|d}|}yw)z
    Automatically render all web contents using a dark theme.

    **EXPERIMENTAL**

    :param enabled: *(Optional)* Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.
    Nr   z!Emulation.setAutoDarkModeOverrider   r   r   s       r   set_auto_dark_mode_overrider     s5      &F#y5H >D   c              #  <   K   t               }| |d<   d|d}|}yw)z
    Enables CPU throttling to emulate slow CPUs.

    :param rate: Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
    ratezEmulation.setCPUThrottlingRater   Nr   )r   r   r   r   s       r   set_cpu_throttling_rater     s.      &FF6N2H >Dr   c              #  \   K   t               }| | j                         |d<   d|d}|}yw)a  
    Sets or clears an override of the default background color of the frame. This override is used
    if the content does not specify one.

    :param color: *(Optional)* RGBA of the default background color. If not specified, any existing override will be cleared.
    Ncolorz+Emulation.setDefaultBackgroundColorOverrider   r   r   )r   r   r   r   s       r   %set_default_background_color_overrider     s:      &F--/w?H >D   *,c              #  V  K   t               }| |d<   ||d<   ||d<   ||d<   |||d<   |||d<   |||d<   |||d	<   |||d
<   |	|	|d<   |
|
j                         |d<   ||j                         |d<   ||j                         |d<   ||j                         |d<   d|d}|}yw)a!  
    Overrides the values of device screen dimensions (window.screen.width, window.screen.height,
    window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media
    query results).

    :param width: Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
    :param height: Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
    :param device_scale_factor: Overriding device scale factor value. 0 disables the override.
    :param mobile: Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
    :param scale: **(EXPERIMENTAL)** *(Optional)* Scale to apply to resulting view image.
    :param screen_width: **(EXPERIMENTAL)** *(Optional)* Overriding screen width value in pixels (minimum 0, maximum 10000000).
    :param screen_height: **(EXPERIMENTAL)** *(Optional)* Overriding screen height value in pixels (minimum 0, maximum 10000000).
    :param position_x: **(EXPERIMENTAL)** *(Optional)* Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
    :param position_y: **(EXPERIMENTAL)** *(Optional)* Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
    :param dont_set_visible_size: **(EXPERIMENTAL)** *(Optional)* Do not set visible view size, rely upon explicit setVisibleSize call.
    :param screen_orientation: *(Optional)* Screen orientation override.
    :param viewport: **(EXPERIMENTAL)** *(Optional)* If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
    :param display_feature: **(EXPERIMENTAL)** *(Optional)* If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.
    :param device_posture: **(EXPERIMENTAL)** *(Optional)* If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.
    widthheightdeviceScaleFactorrW   NscalescreenWidthscreenHeight	positionX	positionYdontSetVisibleSizescreenOrientationviewportdisplayFeaturedevicePosturez"Emulation.setDeviceMetricsOverrider   r   )r   r   device_scale_factorrW   r   screen_widthscreen_height
position_x
position_ydont_set_visible_sizescreen_orientationr   display_featuredevice_posturer   r   r   s                    r   set_device_metrics_overrider     s    H &FF7OF8"5FF8w ,} !.~({({('<#$%&8&@&@&B"#%--/z"#2#:#:#< !"0"8"8":6H >Ds   B'B)c              #  X   K   t               }| j                         |d<   d|d}|}yw)z
    Start reporting the given posture value to the Device Posture API.
    This override can also be set in setDeviceMetricsOverride().

    **EXPERIMENTAL**

    :param posture:
    posturez"Emulation.setDevicePostureOverrider   Nr   )r   r   r   r   s       r   set_device_posture_overrider   [  s6      &F)F96H >Ds   (*c               #     K   ddi} | }yw)z
    Clears a device posture override set with either setDeviceMetricsOverride()
    or setDevicePostureOverride() and starts using posture information from the
    platform again.
    Does nothing if no override is set.

    **EXPERIMENTAL**
    r   z$Emulation.clearDevicePostureOverrideNr&   r   s     r   clear_device_posture_overrider   o  s      	8H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)z\


    **EXPERIMENTAL**

    :param hidden: Whether scrollbars should be always hidden.
    hiddenzEmulation.setScrollbarsHiddenr   Nr   )r   r   r   r   s       r   set_scrollbars_hiddenr   ~  s/      &FF81H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)zc


    **EXPERIMENTAL**

    :param disabled: Whether document.coookie API should be disabled.
    disabledz#Emulation.setDocumentCookieDisabledr   Nr   )r   r   r   r   s       r   set_document_cookie_disabledr     s/      &F!F:7H >Dr   c              #  J   K   t               }| |d<   |||d<   d|d}|}yw)z


    **EXPERIMENTAL**

    :param enabled: Whether touch emulation based on mouse input should be enabled.
    :param configuration: *(Optional)* Touch/gesture events configuration. Default: current platform.
    r   Nconfigurationz$Emulation.setEmitTouchEventsForMouser   r   )r   r   r   r   r   s        r   set_emit_touch_events_for_mouser     s?      &FF9 "/8H >D   !#c              #     K   t               }| | |d<   |!|D cg c]  }|j                          c}|d<   d|d}|}yc c}w w)z
    Emulates the given media type or media feature for CSS media queries.

    :param media: *(Optional)* Media type to emulate. Empty string disables the override.
    :param features: *(Optional)* Media features to emulate.
    NmediafeatureszEmulation.setEmulatedMediar   r   )r   r   r   rc   r   r   s         r   set_emulated_mediar    sZ      &Fw3;<aaiik<z.H >D =s   AAAc              #  <   K   t               }| |d<   d|d}|}yw)z
    Emulates the given vision deficiency.

    :param type_: Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
    r   z%Emulation.setEmulatedVisionDeficiencyr   Nr   r   r   r   r   s       r   set_emulated_vision_deficiencyr    s.      &FF6N9H >Dr   c              #  \   K   t               }| | |d<   |||d<   |||d<   d|d}|}yw)a  
    Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
    unavailable.

    :param latitude: *(Optional)* Mock latitude
    :param longitude: *(Optional)* Mock longitude
    :param accuracy: *(Optional)* Mock accuracy
    Nlatitude	longitudeaccuracyz Emulation.setGeolocationOverrider   r   )r  r  r  r   r   r   s         r   set_geolocation_overrider	    sU      &F%z'{%z4H >Dr   c              #  r   K   t               }| j                         |d<   d|d}|}t        |d         S w)z>


    **EXPERIMENTAL**

    :param type_:
    :returns: 
    r   z(Emulation.getOverriddenSensorInformationr   requestedSamplingFrequencyr   r   r   r  s       r   !get_overridden_sensor_informationr    sE      &F]]_F6N<H >D2344s   57c              #     K   t               }| |d<   |j                         |d<   ||j                         |d<   d|d}|}yw)a  
    Overrides a platform sensor of a given type. If ``enabled`` is true, calls to
    Sensor.start() will use a virtual sensor as backend rather than fetching
    data from a real hardware sensor. Otherwise, existing virtual
    sensor-backend Sensor objects will fire an error event and new calls to
    Sensor.start() will attempt to use a real sensor instead.

    **EXPERIMENTAL**

    :param enabled:
    :param type_:
    :param metadata: *(Optional)*
    r   r   Nmetadataz"Emulation.setSensorOverrideEnabledr   r   )r   r   r  r   r   r   s         r   set_sensor_override_enabledr    sW     $ &FF9]]_F6N%--/z6H >D   AAc              #  ~   K   t               }| j                         |d<   |j                         |d<   d|d}|}yw)z
    Updates the sensor readings reported by a sensor type previously overridden
    by setSensorOverrideEnabled.

    **EXPERIMENTAL**

    :param type_:
    :param reading:
    r   readingz#Emulation.setSensorOverrideReadingsr   Nr   )r   r  r   r   r   s        r   set_sensor_override_readingsr  0  sE      &F]]_F6N)F97H >D   ;=c              #     K   t               }| |d<   |j                         |d<   ||j                         |d<   d|d}|}yw)aa  
    Overrides a pressure source of a given type, as used by the Compute
    Pressure API, so that updates to PressureObserver.observe() are provided
    via setPressureStateOverride instead of being retrieved from
    platform-provided telemetry data.

    **EXPERIMENTAL**

    :param enabled:
    :param source:
    :param metadata: *(Optional)*
    r   sourceNr  z*Emulation.setPressureSourceOverrideEnabledr   r   )r   r  r  r   r   r   s         r   $set_pressure_source_override_enabledr  G  sY     " &FF9~~'F8%--/z>H >Dr  c              #  ~   K   t               }| j                         |d<   |j                         |d<   d|d}|}yw)a  
    Provides a given pressure state that will be processed and eventually be
    delivered to PressureObserver users. ``source`` must have been previously
    overridden by setPressureSourceOverrideEnabled.

    **EXPERIMENTAL**

    :param source:
    :param state:
    r  statez"Emulation.setPressureStateOverrider   Nr   )r  r  r   r   r   s        r   set_pressure_state_overrider  d  sE      &F~~'F8mmoF7O6H >Dr  c              #  F   K   t               }| |d<   ||d<   d|d}|}yw)z
    Overrides the Idle state.

    :param is_user_active: Mock isUserActive
    :param is_screen_unlocked: Mock isScreenUnlocked
    isUserActiveisScreenUnlockedzEmulation.setIdleOverrider   Nr   )is_user_activeis_screen_unlockedr   r   r   s        r   set_idle_overrider!  |  s:      &F+F>!3F-H >D   !c               #     K   ddi} | }yw)z&
    Clears Idle state overrides.
    r   zEmulation.clearIdleOverrideNr&   r   s     r   clear_idle_overrider$    s     
 	/H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)z
    Overrides value returned by the javascript navigator object.

    **EXPERIMENTAL**

    :param platform: The platform navigator.platform should return.
    rR   zEmulation.setNavigatorOverridesr   Nr   )rR   r   r   r   s       r   set_navigator_overridesr&    s/      &F!F:3H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)zu
    Sets a specified page scale factor.

    **EXPERIMENTAL**

    :param page_scale_factor: Page scale factor.
    pageScaleFactorzEmulation.setPageScaleFactorr   Nr   )page_scale_factorr   r   r   s       r   set_page_scale_factorr*    s0      &F 1F0H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)z|
    Switches script execution in the page.

    :param value: Whether script execution should be disabled in the page.
    r8   z$Emulation.setScriptExecutionDisabledr   Nr   )r8   r   r   r   s       r   set_script_execution_disabledr,    s.      &FF7O8H >Dr   c              #  J   K   t               }| |d<   |||d<   d|d}|}yw)z
    Enables touch on platforms which do not support them.

    :param enabled: Whether the touch event emulation should be enabled.
    :param max_touch_points: *(Optional)* Maximum touch points supported. Defaults to one.
    r   NmaxTouchPointsz"Emulation.setTouchEmulationEnabledr   r   )r   max_touch_pointsr   r   r   s        r   set_touch_emulation_enabledr0    s@      &FF9##3 6H >Dr   c              #     K   t               }| j                         |d<   |||d<   |||d<   ||j                         |d<   d|d}|}t        |d         S w)a#  
    Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets
    the current virtual time policy.  Note this supersedes any previous time budget.

    **EXPERIMENTAL**

    :param policy:
    :param budget: *(Optional)* If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
    :param max_virtual_time_task_starvation_count: *(Optional)* If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
    :param initial_virtual_time: *(Optional)* If set, base::Time::Now will be overridden to initially return this value.
    :returns: Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
    policybudget!maxVirtualTimeTaskStarvationCountinitialVirtualTimezEmulation.setVirtualTimePolicyr   virtualTimeTicksBaser  )r2  r3  &max_virtual_time_task_starvation_countinitial_virtual_timer   r   r   s          r   set_virtual_time_policyr9    s     $ &F~~'F8!x-96\23'';'C'C'E#$2H >D,-..s   AAc              #  @   K   t               }| | |d<   d|d}|}yw)z
    Overrides default host system locale with the specified one.

    **EXPERIMENTAL**

    :param locale: *(Optional)* ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.
    NlocalezEmulation.setLocaleOverrider   r   )r;  r   r   r   s       r   set_locale_overrider<    s5      &F!x/H >Dr   c              #  <   K   t               }| |d<   d|d}|}yw)ag  
    Overrides default host system timezone with the specified one.

    :param timezone_id: The timezone identifier. List of supported timezones: https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt If empty, disables the override and restores default host system timezone.
    
timezoneIdzEmulation.setTimezoneOverrider   Nr   )timezone_idr   r   r   s       r   set_timezone_overrider@    s/      &F&F<1H >Dr   c              #  F   K   t               }| |d<   ||d<   d|d}|}yw)a<  
    Resizes the frame/viewport of the page. Note that this does not affect the frame's container
    (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported
    on Android.

    **EXPERIMENTAL**

    :param width: Frame width (DIP).
    :param height: Frame height (DIP).
    r   r   zEmulation.setVisibleSizer   Nr   )r   r   r   r   r   s        r   set_visible_sizerB  -  s8      &FF7OF8,H >Dr"  c              #  ~   K   t               }| D cg c]  }|j                          c}|d<   d|d}|}yc c}w w)zM


    **EXPERIMENTAL**

    :param image_types: Image types to disable.
    
imageTypeszEmulation.setDisabledImageTypesr   Nr   )image_typesr   rc   r   r   s        r   set_disabled_image_typesrF  E  sE      &F1<=AAIIK=F<3H >D >s   =8=c              #  <   K   t               }| |d<   d|d}|}yw)z]


    **EXPERIMENTAL**

    :param hardware_concurrency: Hardware concurrency to report
    hardwareConcurrencyz(Emulation.setHardwareConcurrencyOverrider   Nr   )hardware_concurrencyr   r   r   s       r   !set_hardware_concurrency_overriderJ  X  s0      &F$8F !<H >Dr   c              #     K   t               }| |d<   |||d<   |||d<   ||j                         |d<   d|d}|}yw)a  
    Allows overriding user agent with the given string.
    ``userAgentMetadata`` must be set for Client Hint headers to be sent.

    :param user_agent: User agent to use.
    :param accept_language: *(Optional)* Browser language to emulate.
    :param platform: *(Optional)* The platform navigator.platform should return.
    :param user_agent_metadata: **(EXPERIMENTAL)** *(Optional)* To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
    	userAgentNacceptLanguagerR   userAgentMetadatazEmulation.setUserAgentOverrider   r   )
user_agentaccept_languagerR   user_agent_metadatar   r   r   s          r   set_user_agent_overriderR  k  sj      &F$F;"#2 %z&&9&A&A&C"#2H >Ds   =?c              #  <   K   t               }| |d<   d|d}|}yw)z
    Allows overriding the automation flag.

    **EXPERIMENTAL**

    :param enabled: Whether the override should be enabled.
    r   zEmulation.setAutomationOverrider   Nr   r   s       r   set_automation_overriderT    s/      &FF93H >Dr   z"Emulation.virtualTimeBudgetExpiredc                  "    e Zd ZdZedd       Zy)VirtualTimeBudgetExpiredz~
    **EXPERIMENTAL**

    Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
    c                     |        S rA   r&   r   s     r   r   z"VirtualTimeBudgetExpired.from_json  s     
 	
r   N)r   r   returnrV  )r    r!   r"   r#   r%   r   r&   r   r   rV  rV    s     
 
r   rV  )rX  z0typing.Generator[T_JSON_DICT, T_JSON_DICT, bool])rX  0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r   rV   rX  rY  rA   )r   r]   rX  rY  )r   r   rX  rY  )r   ztyping.Optional[dom.RGBA]rX  rY  )
NNNNNNNNNN)r   r   r   r   r   r   rW   rV   r   rx   r   typing.Optional[int]r   rZ  r   rZ  r   rZ  r   r]   r   z"typing.Optional[ScreenOrientation]r   ztyping.Optional[page.Viewport]r   ztyping.Optional[DisplayFeature]r   ztyping.Optional[DevicePosture]rX  rY  )r   r1   rX  rY  )r   rV   rX  rY  )r   rV   rX  rY  )r   rV   r   rZ   rX  rY  )NN)r   rZ   r   z*typing.Optional[typing.List[MediaFeature]]rX  rY  )r   r   rX  rY  )NNN)r  rx   r  rx   r  rx   rX  rY  )r   rf   rX  1typing.Generator[T_JSON_DICT, T_JSON_DICT, float])r   rV   r   rf   r  ztyping.Optional[SensorMetadata]rX  rY  )r   rf   r  r   rX  rY  )r   rV   r  r   r  z!typing.Optional[PressureMetadata]rX  rY  )r  r   r  r   rX  rY  )r  rV   r   rV   rX  rY  )rR   r   rX  rY  )r)  r   rX  rY  )r8   rV   rX  rY  )r   rV   r/  rZ  rX  rY  )
r2  r<   r3  rx   r7  rZ  r8  z'typing.Optional[network.TimeSinceEpoch]rX  r[  )r;  rZ   rX  rY  )r?  r   rX  rY  )r   r   r   r   rX  rY  )rE  ztyping.List[DisabledImageType]rX  rY  )rI  r   rX  rY  )
rO  r   rP  rZ   rR   rZ   rQ  z"typing.Optional[UserAgentMetadata]rX  rY  )D
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r
   r   r(   r1   r6   Enumr<   rK   rQ   rf   rv   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  r9  r<  r@  rB  rF  rJ  rR  rT  rV  r&   r   r   <module>rc     s   # * !      
 
 
0 
 
 
: 
 
 
  
 
 
&		 & 
 
 
, ;
 ;
 ;
| , 
 
 
4 
 
 
 
 
 
. 
 
 
6 
 
 
4TYY DII  
 
 
 		 
 		7( *.&	7(	7$ ,0(	70 )--1.2+/+/7;AE37;?9=AAA #A 	A
 &A +A ,A )A )A  5A ?A 1A 9A 7A 
8AH	7(	7&	7* /3+ 
80 '+?C#< 
8,	7$ ,0,0+/() ) 
8	655	850 59 2 
8	< 
84 7; 4 
8	: 
80  
8(	7& 	7&	7& 26. 
8. *.GKHL	/!/&/ 1E/ F	/
 
9/F (,$	7(	7" 
803	7&!	7* 15)-BF	- ' @	
 
8<	7& 12

 
  3
r   