zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
U
[±dÇ¿ã @sîddlmZddlmZmZddlmZddlZddlZddl    m
Z
Gdd„de ƒZ Gd    d
„d
e ƒZ eGd d „d ƒƒZeGd d„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZGdd„dejƒZeGdd„dƒƒZd©d dd d!œd"d#„Zd d$œd%d&„Zdªd'd(d)œd*d+„Zd«d
d,dd-d-d-d-d-d.d/d0œ
d1d2„Zd¬d d3d-d4d5œd6d7„Zd8d9d:œd;d<„Zd8d=d:œd>d?„Zd,d@dAœdBdC„Z d8dDd:œdEdF„Z!dGdHdIœdJdK„Z"d d$œdLdM„Z#dGd dNœdOdP„Z$dd dQœdRdS„Z%d­d
ddTdUœdVdW„Z&d®d-d dXœdYdZ„Z'd¯d8d,d-d-d[d\œd]d^„Z(d_d d`œdadb„Z)dcd ddœdedf„Z*d8dgd dhœdidj„Z+d°d ddkdlœdmdn„Z,d,dodpœdqdr„Z-d±d_ddddsddtduœdvdw„Z.d²dxddodyœdzd{„Z/d|d d}œd~d„Z0d,d d€œdd‚„Z1dƒd d„œd…d†„Z2d³d8d,d-d-d‡dˆœd‰dŠ„Z3d|d d‹œdŒd„Z4d_d,dƒd
d dŽœdd„Z5d´d-d‘d d’œd“d”„Z6d d$œd•d–„Z7dµd‘d d—œd˜d™„Z8edšƒeGd›dœ„dœƒƒƒZ9edƒeGdždŸ„dŸƒƒƒZ:ed ƒeGd¡d¢„d¢ƒƒƒZ;ed£ƒeGd¤d¥„d¥ƒƒƒZ<ed¦ƒeGd§d¨„d¨ƒƒƒZ=dS)¶é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassN)ÚruntimecsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) Ú BreakpointIdz 
    Breakpoint identifier.
    Ústr©ÚreturncCs|S©N©©Úselfr r úgd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v112/debugger.pyÚto_jsonszBreakpointId.to_json©Újsonr cCs||ƒSr r ©Úclsrr r rÚ    from_jsonszBreakpointId.from_jsoncsd tƒ ¡¡S)NzBreakpointId({})©ÚformatÚsuperÚ__repr__r©Ú    __class__r rrszBreakpointId.__repr__©    Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ classmethodrrÚ __classcell__r r rrrs
rcsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) Ú CallFrameIdz 
    Call frame identifier.
    r    r
cCs|Sr r rr r rr"szCallFrameId.to_jsonrcCs||ƒSr r rr r rr%szCallFrameId.from_jsoncsd tƒ ¡¡S)NzCallFrameId({})rrrr rr)szCallFrameId.__repr__rr r rrr$s
r$c@sBeZdZUdZded<ded<dZded<d    d
„Zed d „ƒZdS) ÚLocationú&
    Location in the source code.
    úruntime.ScriptIdÚ    script_idÚintÚ line_numberNútyping.Optional[int]Ú column_numbercCs6tƒ}|j ¡|d<|j|d<|jdk    r2|j|d<|S)NÚscriptIdÚ
lineNumberÚ columnNumber)Údictr(rr*r,©rrr r rr;s 
 
 
zLocation.to_jsoncCs6|tj |d¡t|dƒd|kr.t|dƒnddS)Nr-r.r/)r(r*r,)rÚScriptIdrr)rr r rrCs
 
ýzLocation.from_json)    rrr r!Ú__annotations__r,rr"rr r r rr%-s
 r%c@s6eZdZUdZded<ded<dd„Zedd„ƒZd    S)
ÚScriptPositionr&r)r*r,cCstƒ}|j|d<|j|d<|S)Nr.r/)r0r*r,r1r r rrUs
 
zScriptPosition.to_jsoncCs|t|dƒt|dƒdS)Nr.r/)r*r,©r)rr r rr[s
 
þzScriptPosition.from_jsonN©rrr r!r3rr"rr r r rr4Ls
r4c@s>eZdZUdZded<ded<ded<dd„Zed    d
„ƒZd S) Ú LocationRangez+
    Location range within one script.
    r'r(r4ÚstartÚendcCs4tƒ}|j ¡|d<|j ¡|d<|j ¡|d<|S)Nr-r8r9)r0r(rr8r9r1r r rrns
zLocationRange.to_jsoncCs.|tj |d¡t |d¡t |d¡dS)Nr-r8r9)r(r8r9)rr2rr4rr r rrus
  ýzLocationRange.from_jsonNr6r r r rr7cs
r7c@szeZdZUdZded<ded<ded<ded<d    ed
<d ed <d Zded<d Zded<d Zded<dd„Ze    dd„ƒZ
d S)Ú    CallFramezJ
    JavaScript call frame. Array of call frames form the call stack.
    r$Ú call_frame_idr    Ú function_namer%ÚlocationÚurlztyping.List[Scope]Ú scope_chainúruntime.RemoteObjectÚthisNútyping.Optional[Location]Úfunction_locationz%typing.Optional[runtime.RemoteObject]Ú return_valueútyping.Optional[bool]Úcan_be_restartedcCs tƒ}|j ¡|d<|j|d<|j ¡|d<|j|d<dd„|jDƒ|d<|j ¡|d<|jdk    rp|j ¡|d    <|j    dk    rˆ|j     ¡|d
<|j
dk    rœ|j
|d <|S) NÚ callFrameIdÚ functionNamer=r>cSsg|] }| ¡‘qSr ©r©Ú.0Úir r rÚ
<listcomp>©sz%CallFrame.to_json.<locals>.<listcomp>Ú
scopeChainrAÚfunctionLocationÚ returnValueÚcanBeRestarted) r0r;rr<r=r>r?rArCrDrFr1r r rr£s
 
 
 
 
 
zCallFrame.to_jsonc Csš|t |d¡t|dƒt |d¡t|dƒdd„|dDƒtj |d¡d    |krbt |d    ¡ndd
|kr|tj |d
¡ndd |kr’t|d ƒndd     S) NrGrHr=r>cSsg|]}t |¡‘qSr )ÚScoperrJr r rrMºsz'CallFrame.from_json.<locals>.<listcomp>rNrArOrPrQ)    r;r<r=r>r?rArCrDrF)r$rr    r%rÚ RemoteObjectÚboolrr r rr³s 
 
÷zCallFrame.from_json) rrr r!r3rCrDrFrr"rr r r rr:~s
   r:c@sZeZdZUdZded<ded<dZded<dZd    ed
<dZd    ed <d d „Ze    dd„ƒZ
dS)rRz
    Scope description.
    r    Útype_r@Úobject_Nútyping.Optional[str]ÚnamerBÚstart_locationÚ end_locationcCsftƒ}|j|d<|j ¡|d<|jdk    r2|j|d<|jdk    rJ|j ¡|d<|jdk    rb|j ¡|d<|S)NÚtypeÚobjectrXÚ startLocationÚ endLocation)r0rUrVrrXrYrZr1r r rr×s
 
 
 
 
z Scope.to_jsonc    Csf|t|dƒtj |d¡d|kr.t|dƒndd|krFt |d¡ndd|kr^t |d¡nddS)Nr[r\rXr]r^)rUrVrXrYrZ)r    rrSrr%rr r rrãs
ûzScope.from_json) rrr r!r3rXrYrZrr"rr r r rrRÂs
    rRc@s6eZdZUdZded<ded<dd„Zedd    „ƒZd
S) Ú SearchMatchz$
    Search match for resource.
    Úfloatr*r    Ú line_contentcCstƒ}|j|d<|j|d<|S)Nr.Ú lineContent)r0r*rar1r r rrùs
 
zSearchMatch.to_jsoncCs|t|dƒt|dƒdS)Nr.rb)r*ra)r`r    rr r rrÿs
 
þzSearchMatch.from_jsonNr6r r r rr_îs
r_c@sJeZdZUded<ded<dZded<dZded    <d
d „Zed d „ƒZdS)Ú BreakLocationr'r(r)r*Nr+r,rWrUcCsJtƒ}|j ¡|d<|j|d<|jdk    r2|j|d<|jdk    rF|j|d<|S)Nr-r.r/r[)r0r(rr*r,rUr1r r rrs
 
 
 
 
zBreakLocation.to_jsoncCsL|tj |d¡t|dƒd|kr.t|dƒndd|krDt|dƒnddS)Nr-r.r/r[)r(r*r,rU)rr2rr)r    rr r rrs 
üzBreakLocation.from_json)    rrr r3r,rUrr"rr r r rrcs
 
rcc@s2eZdZUded<ded<dd„Zedd„ƒZd    S)
ÚWasmDisassemblyChunkútyping.List[str]Úlinesztyping.List[int]Úbytecode_offsetscCs2tƒ}dd„|jDƒ|d<dd„|jDƒ|d<|S)NcSsg|]}|‘qSr r rJr r rrM2sz0WasmDisassemblyChunk.to_json.<locals>.<listcomp>rfcSsg|]}|‘qSr r rJr r rrM3sÚbytecodeOffsets)r0rfrgr1r r rr0szWasmDisassemblyChunk.to_jsoncCs(|dd„|dDƒdd„|dDƒdS)NcSsg|] }t|ƒ‘qSr ©r    rJr r rrM9sz2WasmDisassemblyChunk.from_json.<locals>.<listcomp>rfcSsg|] }t|ƒ‘qSr r5rJr r rrM:srh)rfrgr rr r rr6sþzWasmDisassemblyChunk.from_jsonN)rrr r3rr"rr r r rrd(s
 
rdc@s,eZdZdZdZdZdd„Zedd„ƒZdS)    ÚScriptLanguagez,
    Enum of possible script languages.
    Z
JavaScriptZ WebAssemblycCs|jSr )Úvaluerr r rrEszScriptLanguage.to_jsoncCs||ƒSr r rr r rrHszScriptLanguage.from_jsonN)    rrr r!Z JAVA_SCRIPTZ WEB_ASSEMBLYrr"rr r r rrj>s rjc@s:eZdZUdZded<dZded<dd„Zed    d
„ƒZdS) Ú DebugSymbolsz4
    Debug symbols available for a wasm script.
    r    rUNrWÚ external_urlcCs(tƒ}|j|d<|jdk    r$|j|d<|S)Nr[Ú externalURL)r0rUrmr1r r rrXs
 
 
 
zDebugSymbols.to_jsoncCs(|t|dƒd|kr t|dƒnddS)Nr[rn)rUrmrirr r rr_s
þzDebugSymbols.from_json)    rrr r!r3rmrr"rr r r rrlMs
 rlrWz0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r=Útarget_call_framesr ccs6tƒ}| ¡|d<|dk    r"||d<d|dœ}|V}dS)zœ
    Continues execution until specific location is reached.
 
    :param location: Location to continue to.
    :param target_call_frames: *(Optional)*
    r=NZtargetCallFrameszDebugger.continueToLocation©ÚmethodÚparams©r0r)r=rorrÚcmd_dictrr r rÚcontinue_to_locationgs
 þrur
ccsddi}|V}dS)z+
    Disables debugger for given page.
    rqzDebugger.disableNr ©rtrr r rÚdisable|sÿrwztyping.Optional[float]zDtyping.Generator[T_JSON_DICT, T_JSON_DICT, runtime.UniqueDebuggerId])Úmax_scripts_cache_sizer ccs6tƒ}|dk    r||d<d|dœ}|V}tj |d¡S)a¨
    Enables debugger for the given page. Clients should not assume that the debugging has been
    enabled until the result for this command is received.
 
    :param max_scripts_cache_size: **(EXPERIMENTAL)** *(Optional)* The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
    :returns: Unique identifier of the debugger.
    NZmaxScriptsCacheSizezDebugger.enablerpZ
debuggerId)r0rZUniqueDebuggerIdr)rxrrrtrr r rÚenable†s
þryr    rEz"typing.Optional[runtime.TimeDelta]zytyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[runtime.RemoteObject, typing.Optional[runtime.ExceptionDetails]]])
r;Ú
expressionÚ object_groupÚinclude_command_line_apiÚsilentÚreturn_by_valueÚgenerate_previewÚthrow_on_side_effectÚtimeoutr c     csÊtƒ}    | ¡|    d<||    d<|dk    r*||    d<|dk    r:||    d<|dk    rJ||    d<|dk    rZ||    d<|dk    rj||    d<|dk    rz||    d    <|dk    rŽ| ¡|    d
<d |    d œ}
|
V} tj | d ¡d| krÄtj | d¡ndfS)a$
    Evaluates expression on a given call frame.
 
    :param call_frame_id: Call frame identifier to evaluate on.
    :param expression: Expression to evaluate.
    :param object_group: *(Optional)* String object group name to put result into (allows rapid releasing resulting object handles using ```releaseObjectGroup````).
    :param include_command_line_api: *(Optional)* Specifies whether command line API should be available to the evaluated expression, defaults to false.
    :param silent: *(Optional)* In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides ````setPauseOnException``` state.
    :param return_by_value: *(Optional)* Whether the result is expected to be a JSON object that should be sent by value.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)* Whether preview should be generated for the result.
    :param throw_on_side_effect: *(Optional)* Whether to throw an exception if side effect cannot be ruled out during evaluation.
    :param timeout: **(EXPERIMENTAL)** *(Optional)* Terminate execution after timing out (number of milliseconds).
    :returns: A tuple with the following items:
 
        0. **result** - Object wrapper for the evaluation result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    rGrzNZ objectGroupZincludeCommandLineAPIr}Z returnByValueZgeneratePreviewZthrowOnSideEffectrzDebugger.evaluateOnCallFramerpÚresultÚexceptionDetails)r0rrrSrÚExceptionDetails) r;rzr{r|r}r~rr€rrrrtrr r rÚevaluate_on_call_frame›s0  þþr…rBzFtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[BreakLocation]])r8r9Úrestrict_to_functionr ccsXtƒ}| ¡|d<|dk    r&| ¡|d<|dk    r6||d<d|dœ}|V}dd„|d    DƒS)
a
    Returns possible locations for breakpoint. scriptId in start and end range locations should be
    the same.
 
    :param start: Start of range to search possible breakpoint locations in.
    :param end: *(Optional)* End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
    :param restrict_to_function: *(Optional)* Only consider locations which are in the same (non-nested) function as start.
    :returns: List of the possible breakpoint locations.
    r8Nr9ZrestrictToFunctionzDebugger.getPossibleBreakpointsrpcSsg|]}t |¡‘qSr )rcrrJr r rrMìsz,get_possible_breakpoints.<locals>.<listcomp>Ú    locationsrs)r8r9r†rrrtrr r rÚget_possible_breakpointsÓs  þrˆr'zStyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[str, typing.Optional[str]]])r(r ccsFtƒ}| ¡|d<d|dœ}|V}t|dƒd|kr@t|dƒndfS)a&
    Returns source for the script with given id.
 
    :param script_id: Id of the script to get source for.
    :returns: A tuple with the following items:
 
        0. **scriptSource** - Script source (empty in case of Wasm bytecode).
        1. **bytecode** - *(Optional)* Wasm bytecode.
    r-zDebugger.getScriptSourcerpÚ scriptSourceÚbytecodeN©r0rr    ©r(rrrtrr r rÚget_script_sourceïs  þ
þrz{typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[str], int, typing.List[int], WasmDisassemblyChunk]]ccsbtƒ}| ¡|d<d|dœ}|V}d|kr6t|dƒndt|dƒdd„|d    Dƒt |d
¡fS) a9
 
 
    **EXPERIMENTAL**
 
    :param script_id: Id of the script to disassemble
    :returns: A tuple with the following items:
 
        0. **streamId** - *(Optional)* For large modules, return a stream from which additional chunks of disassembly can be read successively.
        1. **totalNumberOfLines** - The total number of lines in the disassembly text.
        2. **functionBodyOffsets** - The offsets of all function bodies, in the format [start1, end1, start2, end2, ...] where all ends are exclusive.
        3. **chunk** - The first chunk of disassembly.
    r-zDebugger.disassembleWasmModulerpÚstreamIdNZtotalNumberOfLinescSsg|] }t|ƒ‘qSr r5rJr r rrM"sz+disassemble_wasm_module.<locals>.<listcomp>ZfunctionBodyOffsetsÚchunk)r0rr    r)rdrrŒr r rÚdisassemble_wasm_modules þ
 ürz@typing.Generator[T_JSON_DICT, T_JSON_DICT, WasmDisassemblyChunk])Ú    stream_idr ccs,tƒ}||d<d|dœ}|V}t |d¡S)a`
    Disassemble the next chunk of lines for the module corresponding to the
    stream. If disassembly is complete, this API will invalidate the streamId
    and return an empty chunk. Any subsequent calls for the now invalid stream
    will return errors.
 
    **EXPERIMENTAL**
 
    :param stream_id:
    :returns: The next chunk of disassembly.
    rŽz!Debugger.nextWasmDisassemblyChunkrpr)r0rdr)r‘rrrtrr r rÚnext_wasm_disassembly_chunk'sþr’z/typing.Generator[T_JSON_DICT, T_JSON_DICT, str]ccs.tƒ}| ¡|d<d|dœ}|V}t|dƒS)zŸ
    This command is deprecated. Use getScriptSource instead.
 
    :param script_id: Id of the Wasm script to get source for.
    :returns: Script source.
    r-zDebugger.getWasmBytecoderprŠr‹rŒr r rÚget_wasm_bytecode?s     þr“zruntime.StackTraceIdz>typing.Generator[T_JSON_DICT, T_JSON_DICT, runtime.StackTrace])Ústack_trace_idr ccs2tƒ}| ¡|d<d|dœ}|V}tj |d¡S)z{
    Returns stack trace with given ``stackTraceId``.
 
    **EXPERIMENTAL**
 
    :param stack_trace_id:
    :returns: 
    Z stackTraceIdzDebugger.getStackTracerpÚ
stackTrace)r0rrÚ
StackTracer)r”rrrtrr r rÚget_stack_traceRs  þr—ccsddi}|V}dS)z1
    Stops on the next JavaScript statement.
    rqzDebugger.pauseNr rvr r rÚpausegsÿr˜)Úparent_stack_trace_idr ccs&tƒ}| ¡|d<d|dœ}|V}dS)z†
 
 
    **EXPERIMENTAL**
 
    :param parent_stack_trace_id: Debugger will pause when async call with given stack trace is started.
    ZparentStackTraceIdzDebugger.pauseOnAsyncCallrpNrs)r™rrrtrr r rÚpause_on_async_callqs
 þrš)Ú breakpoint_idr ccs&tƒ}| ¡|d<d|dœ}|V}dS)zC
    Removes JavaScript breakpoint.
 
    :param breakpoint_id:
    Ú breakpointIdzDebugger.removeBreakpointrpNrs)r›rrrtrr r rÚremove_breakpoint„s  þrzœtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[CallFrame], typing.Optional[runtime.StackTrace], typing.Optional[runtime.StackTraceId]]])r;Úmoder ccsztƒ}| ¡|d<|dk    r"||d<d|dœ}|V}dd„|dDƒd    |krZtj |d    ¡ndd
|krttj |d
¡ndfS) aÓ
    Restarts particular call frame from the beginning. The old, deprecated
    behavior of ``restartFrame`` is to stay paused and allow further CDP commands
    after a restart was scheduled. This can cause problems with restarting, so
    we now continue execution immediatly after it has been scheduled until we
    reach the beginning of the restarted frame.
 
    To stay back-wards compatible, ``restartFrame`` now expects a ``mode``
    parameter to be present. If the ``mode`` parameter is missing, ``restartFrame``
    errors out.
 
    The various return values are deprecated and ``callFrames`` is always empty.
    Use the call frames from the ``Debugger#paused`` events instead, that fires
    once V8 pauses at the beginning of the restarted function.
 
    :param call_frame_id: Call frame identifier to evaluate on.
    :param mode: **(EXPERIMENTAL)** *(Optional)* The ```mode```` parameter must be present and set to 'StepInto', otherwise ````restartFrame``` will error out.
    :returns: A tuple with the following items:
 
        0. **callFrames** - New stack trace.
        1. **asyncStackTrace** - *(Optional)* Async stack trace, if any.
        2. **asyncStackTraceId** - *(Optional)* Async stack trace, if any.
    rGNržzDebugger.restartFramerpcSsg|]}t |¡‘qSr ©r:rrJr r rrMºsz!restart_frame.<locals>.<listcomp>Ú
callFramesÚasyncStackTraceÚasyncStackTraceId)r0rrr–rÚ StackTraceId)r;ržrrrtrr r rÚ restart_frame•s þýr¤)Úterminate_on_resumer ccs*tƒ}|dk    r||d<d|dœ}|V}dS)a¦
    Resumes JavaScript execution.
 
    :param terminate_on_resume: *(Optional)* Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
    NZterminateOnResumezDebugger.resumerp©r0)r¥rrrtrr r rÚresumeÀsþr§zDtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[SearchMatch]])r(ÚqueryÚcase_sensitiveÚis_regexr ccs\tƒ}| ¡|d<||d<|dk    r*||d<|dk    r:||d<d|dœ}|V}dd    „|d
DƒS) aR
    Searches for given string in script content.
 
    :param script_id: Id of the script to search in.
    :param query: String to search for.
    :param case_sensitive: *(Optional)* If true, search is case sensitive.
    :param is_regex: *(Optional)* If true, treats string parameter as regex.
    :returns: List of search matches.
    r-r¨NZ caseSensitiveZisRegexzDebugger.searchInContentrpcSsg|]}t |¡‘qSr )r_rrJr r rrMísz%search_in_content.<locals>.<listcomp>r‚rs)r(r¨r©rªrrrtrr r rÚsearch_in_contentÒs þr«r))Ú    max_depthr ccs"tƒ}||d<d|dœ}|V}dS)zÈ
    Enables or disables async call stacks tracking.
 
    :param max_depth: Maximum depth of async call stacks. Setting to ```0``` will effectively disable collecting async call stacks (default).
    ZmaxDepthzDebugger.setAsyncCallStackDepthrpNr¦)r¬rrrtrr r rÚset_async_call_stack_depthðs þr­re)Úpatternsr ccs,tƒ}dd„|Dƒ|d<d|dœ}|V}dS)a–
    Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
    scripts with url matching one of the patterns. VM will try to leave blackboxed script by
    performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
 
    **EXPERIMENTAL**
 
    :param patterns: Array of regexps that will be used to check script url for blackbox state.
    cSsg|]}|‘qSr r rJr r rrMsz)set_blackbox_patterns.<locals>.<listcomp>r®zDebugger.setBlackboxPatternsrpNr¦)r®rrrtrr r rÚset_blackbox_patternss þr¯ztyping.List[ScriptPosition])r(Ú    positionsr ccs8tƒ}| ¡|d<dd„|Dƒ|d<d|dœ}|V}dS)a¢
    Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
    scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
    Positions array contains positions where blackbox state is changed. First interval isn't
    blackboxed. Array should be sorted.
 
    **EXPERIMENTAL**
 
    :param script_id: Id of the script.
    :param positions:
    r-cSsg|] }| ¡‘qSr rIrJr r rrM'sz)set_blackboxed_ranges.<locals>.<listcomp>r°zDebugger.setBlackboxedRangesrpNrs)r(r°rrrtrr r rÚset_blackboxed_rangess þr±zPtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[BreakpointId, Location]])r=Ú    conditionr ccsNtƒ}| ¡|d<|dk    r"||d<d|dœ}|V}t |d¡t |d¡fS)aé
    Sets JavaScript breakpoint at a given location.
 
    :param location: Location to set breakpoint in.
    :param condition: *(Optional)* Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
    :returns: A tuple with the following items:
 
        0. **breakpointId** - Id of the created breakpoint for further reference.
        1. **actualLocation** - Location this breakpoint resolved into.
    r=Nr²zDebugger.setBreakpointrprœZactualLocation)r0rrrr%)r=r²rrrtrr r rÚset_breakpoint/s þ  þr³z8typing.Generator[T_JSON_DICT, T_JSON_DICT, BreakpointId])Úinstrumentationr ccs,tƒ}||d<d|dœ}|V}t |d¡S)zŸ
    Sets instrumentation breakpoint.
 
    :param instrumentation: Instrumentation name.
    :returns: Id of the created breakpoint for further reference.
    r´z%Debugger.setInstrumentationBreakpointrprœ©r0rr)r´rrrtrr r rÚset_instrumentation_breakpointLs    þr¶r+z]typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[BreakpointId, typing.List[Location]]])r*r>Ú    url_regexÚ script_hashr,r²r c    csŽtƒ}||d<|dk    r||d<|dk    r.||d<|dk    r>||d<|dk    rN||d<|dk    r^||d<d|d    œ}|V}t |d
¡d d „|d DƒfS)aÕ
    Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
    command is issued, all existing parsed scripts will have breakpoints resolved and returned in
    ``locations`` property. Further matching script parsing will result in subsequent
    ``breakpointResolved`` events issued. This logical breakpoint will survive page reloads.
 
    :param line_number: Line number to set breakpoint at.
    :param url: *(Optional)* URL of the resources to set breakpoint on.
    :param url_regex: *(Optional)* Regex pattern for the URLs of the resources to set breakpoints on. Either ```url```` or ````urlRegex``` must be specified.
    :param script_hash: *(Optional)* Script hash of the resources to set breakpoint on.
    :param column_number: *(Optional)* Offset in the line to set breakpoint at.
    :param condition: *(Optional)* Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
    :returns: A tuple with the following items:
 
        0. **breakpointId** - Id of the created breakpoint for further reference.
        1. **locations** - List of the locations this breakpoint resolved into upon addition.
    r.Nr>ZurlRegexZ
scriptHashr/r²zDebugger.setBreakpointByUrlrprœcSsg|]}t |¡‘qSr )r%rrJr r rrM‹sz)set_breakpoint_by_url.<locals>.<listcomp>r‡rµ)    r*r>r·r¸r,r²rrrtrr r rÚset_breakpoint_by_url_s&þ þr¹zruntime.RemoteObjectId)Ú    object_idr²r ccs@tƒ}| ¡|d<|dk    r"||d<d|dœ}|V}t |d¡S)aô
    Sets JavaScript breakpoint before each call to the given function.
    If another function was created from the same source as a given one,
    calling it will also trigger the breakpoint.
 
    **EXPERIMENTAL**
 
    :param object_id: Function object id.
    :param condition: *(Optional)* Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
    :returns: Id of the created breakpoint for further reference.
    ZobjectIdNr²z$Debugger.setBreakpointOnFunctionCallrprœ)r0rrr)rºr²rrrtrr r rÚset_breakpoint_on_function_calls þr»rT)Úactiver ccs"tƒ}||d<d|dœ}|V}dS)zz
    Activates / deactivates all breakpoints on the page.
 
    :param active: New value for breakpoints active state.
    r¼zDebugger.setBreakpointsActiverpNr¦)r¼rrrtrr r rÚset_breakpoints_activeªs þr½)Ústater ccs"tƒ}||d<d|dœ}|V}dS)zì
    Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
    or caught exceptions, no exceptions. Initial pause on exceptions state is ``none``.
 
    :param state: Pause on exceptions mode.
    r¾zDebugger.setPauseOnExceptionsrpNr¦)r¾rrrtrr r rÚset_pause_on_exceptions»s     þr¿zruntime.CallArgument)Ú    new_valuer ccs&tƒ}| ¡|d<d|dœ}|V}dS)z”
    Changes return value in top frame. Available only at return break position.
 
    **EXPERIMENTAL**
 
    :param new_value: New return value.
    ÚnewValuezDebugger.setReturnValuerpNrs)rÀrrrtrr r rÚset_return_valueÍs
 þrÂzôtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[typing.List[CallFrame]], typing.Optional[bool], typing.Optional[runtime.StackTrace], typing.Optional[runtime.StackTraceId], str, typing.Optional[runtime.ExceptionDetails]]])r(Ú script_sourceÚdry_runÚallow_top_frame_editingr c    csØtƒ}| ¡|d<||d<|dk    r*||d<|dk    r:||d<d|dœ}|V}d|krdd    d
„|dDƒndd |krzt|d ƒndd |kr”tj |d ¡ndd |kr®tj |d ¡ndt|dƒd|krÒtj |d¡ndfS)aT
    Edits JavaScript source live.
 
    In general, functions that are currently on the stack can not be edited with
    a single exception: If the edited function is the top-most stack frame and
    that is the only activation of that function on the stack. In this case
    the live edit will be successful and a ``Debugger.restartFrame`` for the
    top-most function is automatically triggered.
 
    :param script_id: Id of the script to edit.
    :param script_source: New content of the script.
    :param dry_run: *(Optional)* If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
    :param allow_top_frame_editing: **(EXPERIMENTAL)** *(Optional)* If true, then ```scriptSource```` is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.
    :returns: A tuple with the following items:
 
        0. **callFrames** - *(Optional)* New stack trace in case editing has happened while VM was stopped.
        1. **stackChanged** - *(Optional)* Whether current call stack  was modified after applying the changes.
        2. **asyncStackTrace** - *(Optional)* Async stack trace, if any.
        3. **asyncStackTraceId** - *(Optional)* Async stack trace, if any.
        4. **status** - Whether the operation was successful or not. Only `` Ok`` denotes a successful live edit while the other enum variants denote why the live edit failed.
        5. **exceptionDetails** - *(Optional)* Exception details if any. Only present when `` status`` is `` CompileError`.
    r-r‰NZdryRunZallowTopFrameEditingzDebugger.setScriptSourcerpr cSsg|]}t |¡‘qSr rŸrJr r rrM    sz%set_script_source.<locals>.<listcomp>Z stackChangedr¡r¢Ústatusrƒ)    r0rrTrr–rr£r    r„)r(rÃrÄrÅrrrtrr r rÚset_script_sourceàs$ þ
úrÇ)Úskipr ccs"tƒ}||d<d|dœ}|V}dS)z
    Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
 
    :param skip: New value for skip pauses state.
    rÈzDebugger.setSkipAllPausesrpNr¦)rÈrrrtrr r rÚset_skip_all_pausess þrÉ)Ú scope_numberÚ variable_namerÀr;r ccsBtƒ}||d<||d<| ¡|d<| ¡|d<d|dœ}|V}dS)aÆ
    Changes value of variable in a callframe. Object-based scopes are not supported and must be
    mutated manually.
 
    :param scope_number: 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
    :param variable_name: Variable name.
    :param new_value: New variable value.
    :param call_frame_id: Id of callframe that holds variable.
    Z scopeNumberZ variableNamerÁrGzDebugger.setVariableValuerpNrs)rÊrËrÀr;rrrtrr r rÚset_variable_value#s  þrÌz+typing.Optional[typing.List[LocationRange]])Úbreak_on_async_callÚ    skip_listr ccsDtƒ}|dk    r||d<|dk    r0dd„|Dƒ|d<d|dœ}|V}dS)aN
    Steps into the function call.
 
    :param break_on_async_call: **(EXPERIMENTAL)** *(Optional)* Debugger will pause on the execution of the first async task which was scheduled before next pause.
    :param skip_list: **(EXPERIMENTAL)** *(Optional)* The skipList specifies location ranges that should be skipped on step into.
    NZbreakOnAsyncCallcSsg|] }| ¡‘qSr rIrJr r rrMLszstep_into.<locals>.<listcomp>ÚskipListzDebugger.stepIntorpr¦)rÍrÎrrrtrr r rÚ    step_into>s
þrÐccsddi}|V}dS)z)
    Steps out of the function call.
    rqzDebugger.stepOutNr rvr r rÚstep_outTsÿrÑ)rÎr ccs4tƒ}|dk    r dd„|Dƒ|d<d|dœ}|V}dS)z¦
    Steps over the statement.
 
    :param skip_list: **(EXPERIMENTAL)** *(Optional)* The skipList specifies location ranges that should be skipped on step over.
    NcSsg|] }| ¡‘qSr rIrJr r rrMhszstep_over.<locals>.<listcomp>rÏzDebugger.stepOverrpr¦)rÎrrrtrr r rÚ    step_over^sþrÒzDebugger.breakpointResolvedc@s6eZdZUdZded<ded<edddœdd    „ƒZd
S) ÚBreakpointResolvedzM
    Fired when breakpoint is resolved to an actual script and location.
    rr›r%r=rrcCs |t |d¡t |d¡dS)Nrœr=)r›r=)rrr%rr r rr{s  þzBreakpointResolved.from_jsonN©rrr r!r3r"rr r r rrÓps
 
rÓzDebugger.pausedc@s^eZdZUdZded<ded<ded<ded    <d
ed <d ed <d ed<edddœdd„ƒZdS)ÚPausedzg
    Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
    ztyping.List[CallFrame]Ú call_framesr    Úreasonútyping.Optional[dict]Údataz!typing.Optional[typing.List[str]]Úhit_breakpointsú#typing.Optional[runtime.StackTrace]Úasync_stack_tracez%typing.Optional[runtime.StackTraceId]Úasync_stack_trace_idÚasync_call_stack_trace_idrrc Cs¢|dd„|dDƒt|dƒd|kr0t|dƒndd|krLdd„|dDƒndd|krftj |d¡ndd    |kr€tj |d    ¡ndd
|krštj |d
¡ndd S) NcSsg|]}t |¡‘qSr rŸrJr r rrM›sz$Paused.from_json.<locals>.<listcomp>r r×rÙZhitBreakpointscSsg|] }t|ƒ‘qSr rirJr r rrMžsr¡r¢ZasyncCallStackTraceId)rÖr×rÙrÚrÜrÝrÞ)r    r0rr–rr£rr r rr˜s
ùzPaused.from_jsonNrÔr r r rrՃs
rÕzDebugger.resumedc@s$eZdZdZedddœdd„ƒZdS)ÚResumedz;
    Fired when the virtual machine resumed execution.
    rrcCs|ƒSr r rr r rr­szResumed.from_jsonN)rrr r!r"rr r r rrߥsrßzDebugger.scriptFailedToParsec@s®eZdZUdZded<ded<ded<ded<ded    <ded
<d ed <ded <ded<ded<ded<ded<ded<ded<ded<ded<ded<edddœdd „ƒZd!S)"ÚScriptFailedToParsez?
    Fired when virtual machine fails to parse the script.
    r'r(r    r>r)Ú
start_lineÚ start_columnÚend_lineÚ
end_columnúruntime.ExecutionContextIdÚexecution_context_idÚhash_rØÚexecution_context_aux_datarWÚsource_map_urlrEÚhas_source_urlÚ    is_moduler+ÚlengthrÛÚ stack_traceÚ code_offsetú(typing.Optional[debugger.ScriptLanguage]Úscript_languageÚ embedder_namerrcCs2|tj |d¡t|dƒt|dƒt|dƒt|dƒt|dƒtj |d¡t|dƒd    |krnt|d    ƒndd
|kr„t|d
ƒndd |kršt|d ƒndd |kr°t|d ƒndd |krÆt|d ƒndd|kràtj |d¡ndd|kröt|dƒndd|krt    j
 |d¡ndd|kr*t|dƒnddS)Nr-r>Ú    startLineÚ startColumnÚendLineÚ    endColumnÚexecutionContextIdÚhashÚexecutionContextAuxDataÚ sourceMapURLÚ hasSourceURLÚisModulerìr•Ú
codeOffsetÚscriptLanguageÚ embedderName)r(r>rárârãrärærçrèrérêrërìrírîrðrñ) rr2rr    r)ÚExecutionContextIdr0rTr–Údebuggerrjrr r rrÝs&
 
 
 
 
 
ïzScriptFailedToParse.from_jsonNrÔr r r rrà´s(
ràzDebugger.scriptParsedc@s¾eZdZUdZded<ded<ded<ded<ded    <ded
<d ed <ded <ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ed dd!œd"d#„ƒZd$S)%Ú ScriptParsedzŽ
    Fired when virtual machine parses script. This event is also fired for all known and uncollected
    scripts upon enabling debugger.
    r'r(r    r>r)rárârãrärårærçrØrèrEÚ is_live_editrWrérêrër+rìrÛrírîrïrðz&typing.Optional[debugger.DebugSymbols]Ú debug_symbolsrñrrcCsf|tj |d¡t|dƒt|dƒt|dƒt|dƒt|dƒtj |d¡t|dƒd    |krnt|d    ƒndd
|kr„t|d
ƒndd |kršt|d ƒndd |kr°t|d ƒndd |krÆt|d ƒndd|krÜt|dƒndd|krötj |d¡ndd|krt|dƒndd|kr*t    j
 |d¡ndd|krFt    j  |d¡ndd|kr^t|dƒnddS)Nr-r>ròrórôrõrör÷røZ
isLiveEditrùrúrûrìr•rürýZ debugSymbolsrþ)r(r>rárârãrärærçrèrrérêrërìrírîrðrrñ) rr2rr    r)rÿr0rTr–rrjrlrr r rr"s*
 
 
 
 
 
ízScriptParsed.from_jsonNrÔr r r rrôs,
r)N)N)NNNNNNN)NN)N)N)NN)N)NNNNN)N)NN)NN)N)>Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚrr    rr$r%r4r7r:rRr_rcrdÚEnumrjrlrurwryr…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àrr r r rÚ<module>sÈ   C+ þ ÿ÷":ý
þ,ÿüþú2þü2þ ÿ  >