
    +g                        S SK Jr  SSKJrJr  S SKJr  S SKrS SKrSSK	J
r
  SSK	Jr  \ " S S	5      5       r\ " S
 S5      5       rSS jrSS jrSS jr    SS jrSS jr\" S5      \ " S S5      5       5       rg)    )annotations   )event_classT_JSON_DICT)	dataclassN)network)runtimec                      \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S	rS
\S'   S	rS
\S'   S	rS\S'   S	r	S\S'   S	r
S\S'   S	rS
\S'   S	rS\S'   S r\S 5       rSrg	)LogEntry   z
Log entry.
strsourceleveltextzruntime.Timestamp	timestampNztyping.Optional[str]categoryurlztyping.Optional[int]line_numberz#typing.Optional[runtime.StackTrace]stack_tracez"typing.Optional[network.RequestId]network_request_id	worker_idz2typing.Optional[typing.List[runtime.RemoteObject]]argsc                   [        5       nU R                  US'   U R                  US'   U R                  US'   U R                  R                  5       US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  R                  5       US'   U R                  b  U R                  R                  5       US	'   U R                  b  U R                  US
'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )Nr   r   r   r   r   r   
lineNumber
stackTracenetworkRequestIdworkerIdr   )dictr   r   r   r   to_jsonr   r   r   r   r   r   r   )selfjsonis      s/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/selenium/webdriver/common/devtools/v131/log.pyr   LogEntry.to_json5   s)   vX

WyyV NN224[==$#}}D88((DK'!%!1!1D'!%!1!1!9!9!;D"".'+'>'>'F'F'HD#$>>%#~~D99 15;AIIK;DL <s   4Ec                j   U " [        US   5      [        US   5      [        US   5      [        R                  R                  US   5      SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [	        US   5      OS SU;   a"  [        R
                  R                  US   5      OS S	U;   a"  [        R                  R                  US	   5      OS S
U;   a  [        US
   5      OS SU;   a5  US    Vs/ s H"  n[        R                  R                  U5      PM$     snS9$ S S9$ s  snf )Nr   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   )	r   r	   	Timestamp	from_jsonint
StackTracer   	RequestIdRemoteObject)clsr!   r"   s      r#   r'   LogEntry.from_jsonK   s0   tH~&d7m$T&\"''11${2CD.8D.@Sj)*d$)TMDK t3?43GD./TLX\`L`**44T,5GHfjXjnrXrw00::4@R;STx|/9T/Ac$z*+tNTX\nT&\J\'&&003\J
 	
 cg
 	
 Ks   >)D0 )__name__
__module____qualname____firstlineno____doc____annotations__r   r   r   r   r   r   r   r   classmethodr'   __static_attributes__r.       r#   r   r      s     K J I ! %)H") !%C	$ )-K%, 8<K4; >B:A '+I#* @DD
<C, 
 
r7   r   c                  D    \ rS rSr% SrS\S'   S\S'   S r\S 5       rS	r	g
)ViolationSetting\   z"
Violation configuration setting.
r   namefloat	thresholdc                V    [        5       nU R                  US'   U R                  US'   U$ )Nr;   r=   )r   r;   r=   )r    r!   s     r#   r   ViolationSetting.to_jsong   s)    vyyV NN[r7   c                @    U " [        US   5      [        US   5      S9$ )Nr;   r=   )r;   r=   )r   r<   r,   r!   s     r#   r'   ViolationSetting.from_jsonm   s(    T&\"D-.
 	
r7   r.   N)
r/   r0   r1   r2   r3   r4   r   r5   r'   r6   r.   r7   r#   r9   r9   \   s/     I  
 
r7   r9   c               #     #    SS0n U v ng7f)z
Clears the log.
methodz	Log.clearNr.   cmd_dictr!   s     r#   clearrG   u   s     
 	+H >D   
c               #     #    SS0n U v ng7f)zV
Disables log domain, prevents further log entries from being reported to the client.
rD   zLog.disableNr.   rE   s     r#   disablerJ      s     
 	-H >DrH   c               #     #    SS0n U v ng7f)zs
Enables log domain, sends the entries collected so far to the client by means of the
``entryAdded`` notification.
rD   z
Log.enableNr.   rE   s     r#   enablerL      s      	,H >DrH   c              #     #    [        5       nU  Vs/ s H  o"R                  5       PM     snUS'   SUS.nUv ngs  snf 7f)zJ
start violation reporting.

:param config: Configuration for violations.
configzLog.startViolationsReport)rD   paramsN)r   r   )rN   rO   r"   rF   r!   s        r#   start_violations_reportrP      sF      &F-34V		V4F8-H >D 5s   ?:?c               #     #    SS0n U v ng7f)z
Stop violation reporting.
rD   zLog.stopViolationsReportNr.   rE   s     r#   stop_violations_reportrR      s     
 	,H >DrH   zLog.entryAddedc                  8    \ rS rSr% SrS\S'   \SS j5       rSrg)	
EntryAdded   z%
Issued when new message was logged.
r   entryc                :    U " [         R                  US   5      S9$ )NrV   )rV   )r   r'   rA   s     r#   r'   EntryAdded.from_json   s!    $$T']3
 	
r7   r.   N)r!   r   returnrT   )	r/   r0   r1   r2   r3   r4   r5   r'   r6   r.   r7   r#   rT   rT      s      O
 
r7   rT   )rY   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])rN   ztyping.List[ViolationSetting]rY   rZ   )
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r   r9   rG   rJ   rL   rP   rR   rT   r.   r7   r#   <module>ra      s    # * !     H
 H
 H
V 
 
 
0-	7" 

 
  
r7   